From 4b9f970ef5901f3647dbea491a5411210d27c036 Mon Sep 17 00:00:00 2001 From: patrick Date: Wed, 12 Feb 2025 02:22:50 +0000 Subject: [PATCH] Quick environment --- .devcontainer/Dockerfile | 2 +- .gitignore | 27 +- .htaccess | 9 - PHPMailer/.htaccess | 2 + PHPMailer/LICENSE | 504 + PHPMailer/PHPMailerAutoload.php | 46 + PHPMailer/README.md | 145 + PHPMailer/changelog.md | 555 + PHPMailer/class.phpmailer.php | 3307 +++ PHPMailer/class.pop3.php | 419 + PHPMailer/class.smtp.php | 958 + PHPMailer/composer.json | 33 + PHPMailer/docs/Callback_function_notes.txt | 17 + PHPMailer/docs/DomainKeys_notes.txt | 55 + PHPMailer/docs/Note_for_SMTP_debugging.txt | 17 + PHPMailer/docs/extending.html | 145 + PHPMailer/docs/faq.html | 67 + PHPMailer/docs/generatedocs.sh | 5 + PHPMailer/docs/pop3_article.txt | 50 + PHPMailer/examples/LGPLv3.txt | 165 + PHPMailer/examples/code_generator.phps | 596 + PHPMailer/examples/contents.html | 17 + PHPMailer/examples/exceptions.phps | 41 + PHPMailer/examples/gmail.phps | 63 + PHPMailer/examples/images/phpmailer.png | Bin 0 -> 8670 bytes PHPMailer/examples/images/phpmailer_mini.gif | Bin 0 -> 1042 bytes PHPMailer/examples/index.html | 45 + PHPMailer/examples/mail.phps | 37 + PHPMailer/examples/mailing_list.phps | 51 + PHPMailer/examples/pop_before_smtp.phps | 60 + PHPMailer/examples/scripts/XRegExp.js | 664 + PHPMailer/examples/scripts/shAutoloader.js | 122 + PHPMailer/examples/scripts/shBrushPhp.js | 72 + PHPMailer/examples/scripts/shCore.js | 1 + PHPMailer/examples/scripts/shLegacy.js | 141 + PHPMailer/examples/sendmail.phps | 39 + PHPMailer/examples/smtp.phps | 61 + PHPMailer/examples/smtp_no_auth.phps | 57 + PHPMailer/examples/styles/shCore.css | 46 + PHPMailer/examples/styles/shCoreDefault.css | 77 + PHPMailer/examples/styles/shCoreDjango.css | 78 + PHPMailer/examples/styles/shCoreEclipse.css | 80 + PHPMailer/examples/styles/shCoreEmacs.css | 76 + .../examples/styles/shCoreFadeToGrey.css | 77 + PHPMailer/examples/styles/shCoreMDUltra.css | 76 + PHPMailer/examples/styles/shCoreMidnight.css | 76 + PHPMailer/examples/styles/shCoreRDark.css | 76 + .../examples/styles/shThemeAppleScript.css | 21 + PHPMailer/examples/styles/shThemeDefault.css | 31 + PHPMailer/examples/styles/shThemeDjango.css | 32 + PHPMailer/examples/styles/shThemeEclipse.css | 34 + PHPMailer/examples/styles/shThemeEmacs.css | 30 + .../examples/styles/shThemeFadeToGrey.css | 31 + PHPMailer/examples/styles/shThemeMDUltra.css | 30 + PHPMailer/examples/styles/shThemeMidnight.css | 30 + PHPMailer/examples/styles/shThemeRDark.css | 30 + .../examples/styles/shThemeVisualStudio.css | 31 + PHPMailer/examples/styles/wrapping.png | Bin 0 -> 631 bytes PHPMailer/extras/EasyPeasyICS.php | 90 + PHPMailer/extras/class.html2text.php | 696 + PHPMailer/extras/htmlfilter.php | 861 + PHPMailer/extras/ntlm_sasl_client.php | 185 + PHPMailer/language/phpmailer.lang-ar.php | 26 + PHPMailer/language/phpmailer.lang-be.php | 24 + PHPMailer/language/phpmailer.lang-br.php | 26 + PHPMailer/language/phpmailer.lang-ca.php | 25 + PHPMailer/language/phpmailer.lang-ch.php | 25 + PHPMailer/language/phpmailer.lang-cz.php | 24 + PHPMailer/language/phpmailer.lang-de.php | 24 + PHPMailer/language/phpmailer.lang-dk.php | 25 + PHPMailer/language/phpmailer.lang-eo.php | 24 + PHPMailer/language/phpmailer.lang-es.php | 26 + PHPMailer/language/phpmailer.lang-et.php | 26 + PHPMailer/language/phpmailer.lang-fa.php | 25 + PHPMailer/language/phpmailer.lang-fi.php | 26 + PHPMailer/language/phpmailer.lang-fo.php | 26 + PHPMailer/language/phpmailer.lang-fr.php | 29 + PHPMailer/language/phpmailer.lang-gl.php | 26 + PHPMailer/language/phpmailer.lang-he.php | 25 + PHPMailer/language/phpmailer.lang-hu.php | 24 + PHPMailer/language/phpmailer.lang-it.php | 26 + PHPMailer/language/phpmailer.lang-ja.php | 26 + PHPMailer/language/phpmailer.lang-lt.php | 24 + PHPMailer/language/phpmailer.lang-lv.php | 24 + PHPMailer/language/phpmailer.lang-nl.php | 24 + PHPMailer/language/phpmailer.lang-no.php | 24 + PHPMailer/language/phpmailer.lang-pl.php | 24 + PHPMailer/language/phpmailer.lang-ro.php | 26 + PHPMailer/language/phpmailer.lang-ru.php | 24 + PHPMailer/language/phpmailer.lang-se.php | 25 + PHPMailer/language/phpmailer.lang-sk.php | 25 + PHPMailer/language/phpmailer.lang-tr.php | 26 + PHPMailer/language/phpmailer.lang-uk.php | 24 + PHPMailer/language/phpmailer.lang-zh.php | 25 + PHPMailer/language/phpmailer.lang-zh_cn.php | 26 + PHPMailer/test/fakepopserver.sh | 125 + PHPMailer/test/fakesendmail.sh | 22 + PHPMailer/test/phpmailerLangTest.php | 340 + PHPMailer/test/phpmailerTest.php | 1422 + PHPMailer/test/runfakepopserver.sh | 10 + PHPMailer/test/test_callback.php | 82 + PHPMailer/test/testbootstrap-dist.php | 7 + README.md | 4 + a_change_password.php | 54 + a_delete_account.php | 69 + admin/anneal.inc.php | 407 - admin/award_awardcreatedivisional.php | 251 - admin/award_awards.php | 1191 - admin/award_download.php | 345 - admin/award_upload.php | 799 - admin/awards.inc.php | 67 - admin/awards.php | 50 - admin/cms.php | 224 - admin/committees.php | 369 - admin/communication.inc.php | 178 - admin/communication.php | 996 - admin/communication_send_status.php | 160 - admin/curl.inc.php | 149 - admin/cwsfregister.php | 321 - admin/documentdownloader.php | 36 - admin/documents.php | 57 - admin/donations.php | 179 - admin/donors.php | 1406 - admin/donors_search.php | 130 - admin/exhibithall_sa.php | 698 - admin/export_checkin.php | 115 - admin/fair_stats.php | 536 - admin/fair_stats_select.php | 111 - admin/fix_judges_autocomplete.php | 26 - admin/fundraising.php | 323 - admin/fundraising_campaigns.php | 835 - admin/fundraising_campaigns_prospecting.php | 240 - admin/fundraising_common.inc.php | 13 - admin/fundraising_goals_handler.inc.php | 68 - admin/fundraising_main.inc.php | 88 - admin/fundraising_reports.php | 119 - admin/fundraising_reports_std.php | 171 - admin/fundraising_setup.php | 478 - admin/fundraising_sponsorship.php | 170 - admin/fundraising_sponsorship_handler.inc.php | 82 - admin/fundraising_types.php | 60 - admin/gettranslation.php | 41 - admin/index.php | 110 - admin/judges.inc.php | 268 - admin/judges.php | 53 - admin/judges_info.php | 258 - admin/judges_invite.php | 63 - admin/judges_jdiv.php | 344 - admin/judges_sa.php | 1640 -- admin/judges_sa_launcher.php | 57 - admin/judges_sa_launcher_apache.php | 6 - admin/judges_scheduler_status.php | 155 - admin/judges_scheduler_status_output.php | 16 - admin/judges_schedulerconfig.php | 154 - admin/judges_schedulerconfig_check.inc.php | 265 - admin/judges_teams.php | 453 - admin/judges_teams_members.php | 477 - admin/judges_teams_projects.php | 426 - admin/judges_teams_timeslots.php | 251 - admin/judges_timeslots.php | 429 - admin/judging_score_edit.php | 134 - admin/judging_score_entry.php | 145 - admin/project_editor.php | 487 - admin/regfee_items_manager.php | 55 - admin/registration.php | 41 - admin/registration_list.php | 578 - admin/registration_receivedforms.php | 431 - admin/registration_stats.php | 374 - admin/registration_webconsent.php | 125 - admin/reports.inc.php | 1023 - admin/reports.php | 389 - admin/reports_acscript.php | 310 - admin/reports_appeal_letters.php | 106 - admin/reports_awards.inc.php | 452 - admin/reports_ceremony.php | 109 - admin/reports_committees.inc.php | 173 - admin/reports_editor.php | 665 - admin/reports_fairs.inc.php | 474 - admin/reports_fundraising.inc.php | 206 - admin/reports_gen.php | 280 - admin/reports_judges.inc.php | 1097 - admin/reports_judges.php | 236 - admin/reports_judges_allyears.php | 188 - admin/reports_judges_teams_projects.php | 171 - admin/reports_mailinglabels.php | 98 - admin/reports_mailinglabels_generator.php | 183 - admin/reports_old.php | 168 - admin/reports_program_awards.php | 106 - admin/reports_projects_details.php | 144 - admin/reports_projects_judges_teams.php | 153 - admin/reports_schools.inc.php | 224 - admin/reports_students.inc.php | 1257 - admin/reports_tours.inc.php | 102 - admin/reports_volunteers.inc.php | 164 - admin/rerollprizes.php | 164 - admin/schools.php | 431 - admin/schoolsimport.php | 149 - admin/sciencefairs.php | 43 - admin/send_emailqueue.php | 112 - admin/settranslation.php | 58 - admin/sponsor_contacts.php | 217 - admin/stats.inc.php | 88 - admin/student_editor.php | 650 - admin/tours.php | 45 - admin/tours_assignments.php | 339 - admin/tours_manager.php | 96 - admin/tours_sa.php | 320 - admin/tours_sa_config.php | 143 - admin/tours_sa_status.php | 143 - admin/translations.php | 166 - admin/user_editor_window.php | 204 - admin/user_list.php | 498 - admin/volunteer_positions_manager.php | 55 - admin/volunteers.php | 45 - admin/winners.php | 658 - admin/xml.inc.php | 166 - ajax.inc.php | 34 - app/projectinfo.php | 100 - app/projectlist.php | 80 - app/projects.php | 99 - awards.inc.php | 466 + c_assign_project_numbers.php | 88 + c_award_cwsf.php | 315 + c_award_upload.php | 755 + c_award_winners.php | 411 + c_awards.php | 45 + c_awards_edit.php | 434 + c_awards_list.php | 253 + c_backup.php | 246 + c_check_tours.php | 141 + c_checkin.php | 280 + c_communication.php | 222 + c_communication_queue.php | 91 + c_communication_send.php | 175 + c_config.php | 48 + c_config_categories.php | 238 + c_config_challenges.php | 230 + c_config_cms.php | 141 + c_config_fairs.php | 348 + c_config_logo.php | 177 + c_config_schools.php | 167 + c_config_variables.php | 152 + c_conv_db.php | 105 + c_exhibithall.php | 208 + c_fairs.php | 95 + c_input_ethics.php | 222 + c_input_signature_forms.php | 367 + c_jteam_edit.php | 696 + c_jteam_edit_jteam.php | 74 + c_judge_sanity.php | 204 + c_judge_scheduler.php | 195 + c_judge_score_entry.php | 267 + c_judge_score_summary.php | 518 + c_judging.php | 170 + c_judging_list.php | 59 + c_main.php | 127 + c_register_feeder.php | 191 + c_reports.php | 227 + c_reports_edit.php | 831 + c_rollover.php | 94 + c_stats.php | 47 + c_students.php | 149 + c_timeslots.php | 172 + c_tours.php | 200 + c_tours_edit.php | 220 + c_update.php | 117 + c_user_edit.php | 395 + c_user_list.php | 358 + c_visit_list.php | 322 + c_volunteers.php | 84 + c_volunteers_list.php | 59 + c_ysc_stats.php | 210 + changes.html | 105 + cms.php | 27 - committee.inc.php | 31 - committee/.htaccess | 2 + committee/email_lists.inc.php | 227 + committee/exhibithall.inc.php | 145 + committee/judges.inc.php | 99 + committee/students.inc.php | 39 + committee/volunteers.inc.php | 17 + committee_main.php | 59 - committees.php | 110 - common.inc.php | 2566 +- config.inc.php.template | 29 - config/award_sources.php | 65 - config/backuprestore.php | 348 - config/categories.php | 161 - config/dates.php | 160 - config/divisions.php | 211 - config/divisions_cwsf.php | 82 - config/images.php | 164 - config/index.php | 79 - config/judges_questions.php | 39 - config/languagepacks.php | 120 - config/pagetexts.php | 161 - config/rollover.php | 363 - config/rolloverfiscal.php | 162 - config/safetyquestions.php | 176 - config/signaturepage.php | 153 - config/signaturepage_or_permissionform.php | 27 - config/subdivisions.php | 171 - config/variables.php | 127 - config/versionchecker.php | 72 - config_editor.inc.php | 393 - confirmed_participants.php | 178 - contact.php | 141 - csv.inc.php | 137 + csvimport.inc.php | 82 - curl.inc.php | 162 + data/.htaccess | 2 + db.inc.php | 195 + db/FILES | 7 - db/db.code.version.txt | 1 - db/db.full.11.sql | 849 - db/db.full.12.sql | 853 - db/db.full.13.sql | 875 - db/db.full.148.sql | 3001 -- db/db.full.16.sql | 892 - db/db.full.17.sql | 892 - db/db.full.18.sql | 937 - db/db.full.22.sql | 954 - db/db.full.52.sql | 1737 -- db/db.full.6.sql | 734 - db/db.full.7.sql | 785 - db/db.full.8.sql | 796 - db/db.full.9.sql | 807 - db/db.update.1.sql | 0 db/db.update.10.sql | 4 - db/db.update.100.sql | 30 - db/db.update.101.sql | 6 - db/db.update.102.sql | 4 - db/db.update.103.sql | 1 - db/db.update.104.sql | 9 - db/db.update.105.sql | 2 - db/db.update.106.sql | 1 - db/db.update.107.sql | 5 - db/db.update.108.sql | 2 - db/db.update.109.sql | 3 - db/db.update.11.sql | 24 - db/db.update.110.sql | 7 - db/db.update.111.php | 21 - db/db.update.111.sql | 10 - db/db.update.112.sql | 5 - db/db.update.113.sql | 329 - db/db.update.114.sql | 24 - db/db.update.115.sql | 1 - db/db.update.116.php | 375 - db/db.update.116.sql | 40 - db/db.update.117.php | 28 - db/db.update.117.sql | 21 - db/db.update.118.php | 92 - db/db.update.118.sql | 29 - db/db.update.119.sql | 65 - db/db.update.12.sql | 4 - db/db.update.120.sql | 3 - db/db.update.121.sql | 2 - db/db.update.122.php | 48 - db/db.update.122.sql | 10 - db/db.update.123.sql | 3 - db/db.update.124.sql | 11 - db/db.update.125.sql | 6 - db/db.update.126.sql | 71 - db/db.update.127.sql | 36 - db/db.update.128.sql | 12 - db/db.update.129.php | 57 - db/db.update.129.sql | 0 db/db.update.129.user.inc.php | 880 - db/db.update.13.sql | 20 - db/db.update.130.sql | 4 - db/db.update.131.php | 41 - db/db.update.131.sql | 0 db/db.update.132.sql | 10 - db/db.update.133.sql | 1 - db/db.update.134.sql | 75 - db/db.update.135.sql | 2 - db/db.update.136.php | 31 - db/db.update.136.sql | 6 - db/db.update.137.sql | 3 - db/db.update.138.sql | 2 - db/db.update.139.sql | 2 - db/db.update.14.sql | 2 - db/db.update.140.sql | 5 - db/db.update.141.sql | 3 - db/db.update.142.php | 23 - db/db.update.142.sql | 30 - db/db.update.143.sql | 2 - db/db.update.144.sql | 1 - db/db.update.145.sql | 9 - db/db.update.146.php | 70 - db/db.update.146.sql | 64 - db/db.update.146.user.inc.php | 985 - db/db.update.147.sql | 21 - db/db.update.148.sql | 4 - db/db.update.149.php | 50 - db/db.update.149.sql | 0 db/db.update.149.user.inc.php | 988 - db/db.update.15.sql | 2 - db/db.update.150.sql | 2 - db/db.update.151.sql | 13 - db/db.update.152.sql | 16 - db/db.update.153.sql | 27 - db/db.update.154.sql | 1 - db/db.update.155.php | 20 - db/db.update.155.sql | 7 - db/db.update.156.sql | 2 - db/db.update.157.sql | 3 - db/db.update.158.sql | 2 - db/db.update.159.sql | 1 - db/db.update.16.sql | 4 - db/db.update.160.sql | 5 - db/db.update.161.sql | 3 - db/db.update.162.sql | 1 - db/db.update.163.sql | 4 - db/db.update.164.sql | 1 - db/db.update.165.sql | 17 - db/db.update.166.sql | 2 - db/db.update.167.sql | 1 - db/db.update.168.sql | 2 - db/db.update.169.sql | 8 - db/db.update.17.sql | 4 - db/db.update.170.sql | 1 - db/db.update.171.sql | 1 - db/db.update.172.sql | 1 - db/db.update.173.sql | 24 - db/db.update.174.php | 14 - db/db.update.175.sql | 39 - db/db.update.176.sql | 32 - db/db.update.177.sql | 14 - db/db.update.178.sql | 23 - db/db.update.179.sql | 13 - db/db.update.18.sql | 40 - db/db.update.19.sql | 1 - db/db.update.2.sql | 1 - db/db.update.20.sql | 27 - db/db.update.21.sql | 44 - db/db.update.22.sql | 2 - db/db.update.23.sql | 1 - db/db.update.24.sql | 2 - db/db.update.25.sql | 3 - db/db.update.26.sql | 4 - db/db.update.27.sql | 1 - db/db.update.28.sql | 1 - db/db.update.29.sql | 5 - db/db.update.3.sql | 5 - db/db.update.30.sql | 4 - db/db.update.31.sql | 36 - db/db.update.32.sql | 5 - db/db.update.33.sql | 3 - db/db.update.34.sql | 41 - db/db.update.35.sql | 10 - db/db.update.36.sql | 5 - db/db.update.37.sql | 29 - db/db.update.38.sql | 6 - db/db.update.39.sql | 3 - db/db.update.4.sql | 27 - db/db.update.40.sql | 16 - db/db.update.41.sql | 3 - db/db.update.42.sql | 4 - db/db.update.43.sql | 1 - db/db.update.44.sql | 1 - db/db.update.45.sql | 221 - db/db.update.46.sql | 43 - db/db.update.47.sql | 433 - db/db.update.48.sql | 22 - db/db.update.49.sql | 4 - db/db.update.5.sql | 13 - db/db.update.50.sql | 3 - db/db.update.51.sql | 1 - db/db.update.52.sql | 24 - db/db.update.53.sql | 3 - db/db.update.54.sql | 8 - db/db.update.55.sql | 1 - db/db.update.56.sql | 58 - db/db.update.57.sql | 1 - db/db.update.58.sql | 1 - db/db.update.59.sql | 1 - db/db.update.6.sql | 17 - db/db.update.60.sql | 1 - db/db.update.61.sql | 25 - db/db.update.62.php | 94 - db/db.update.62.sql | 12 - db/db.update.63.sql | 12 - db/db.update.64.sql | 5 - db/db.update.65.sql | 6 - db/db.update.66.sql | 8 - db/db.update.67.sql | 3 - db/db.update.68.sql | 35 - db/db.update.69.sql | 3 - db/db.update.7.sql | 48 - db/db.update.70.sql | 1 - db/db.update.71.sql | 4 - db/db.update.72.sql | 18 - db/db.update.73.sql | 16 - db/db.update.74.sql | 1 - db/db.update.75.php | 62 - db/db.update.75.sql | 10 - db/db.update.76.php | 87 - db/db.update.77.sql | 14 - db/db.update.78.sql | 4 - db/db.update.79.sql | 19 - db/db.update.8.sql | 19 - db/db.update.80.sql | 2 - db/db.update.81.php | 13 - db/db.update.81.sql | 33 - db/db.update.82.sql | 1 - db/db.update.83.sql | 1 - db/db.update.84.sql | 7 - db/db.update.85.sql | 70 - db/db.update.86.sql | 8 - db/db.update.87.php | 50 - db/db.update.87.sql | 2 - db/db.update.88.sql | 10 - db/db.update.89.sql | 1 - db/db.update.9.sql | 9 - db/db.update.90.sql | 2 - db/db.update.91.sql | 35 - db/db.update.92.sql | 13 - db/db.update.93.sql | 2 - db/db.update.94.sql | 4 - db/db.update.95.sql | 15 - db/db.update.96.sql | 1 - db/db.update.97.sql | 31 - db/db.update.98.sql | 19 - db/db.update.99.sql | 32 - db/db.update.999.sql | 32 - db/db_update.php | 141 - debug.inc.php | 22 + email.inc.php | 218 + fair.inc.php | 51 - fair_additional_materials.inc.php | 180 - fair_info.php | 240 - fair_main.php | 67 - fair_stats.php | 369 - fairs.inc.php | 107 + fckeditor/_documentation.html | 38 - fckeditor/_upgrade.html | 39 - fckeditor/_whatsnew.html | 167 - fckeditor/_whatsnew_history.html | 3787 --- .../editor/_source/classes/fckcontextmenu.js | 223 - .../_source/classes/fckdataprocessor.js | 119 - .../classes/fckdocumentfragment_gecko.js | 53 - .../_source/classes/fckdocumentfragment_ie.js | 58 - .../editor/_source/classes/fckdomrange.js | 935 - .../_source/classes/fckdomrange_gecko.js | 104 - .../editor/_source/classes/fckdomrange_ie.js | 199 - .../_source/classes/fckdomrangeiterator.js | 327 - .../editor/_source/classes/fckeditingarea.js | 368 - .../editor/_source/classes/fckelementpath.js | 89 - .../editor/_source/classes/fckenterkey.js | 688 - fckeditor/editor/_source/classes/fckevents.js | 71 - .../editor/_source/classes/fckhtmliterator.js | 142 - fckeditor/editor/_source/classes/fckicon.js | 103 - .../editor/_source/classes/fckiecleanup.js | 68 - .../_source/classes/fckimagepreloader.js | 64 - .../_source/classes/fckkeystrokehandler.js | 141 - .../editor/_source/classes/fckmenublock.js | 153 - .../_source/classes/fckmenublockpanel.js | 54 - .../editor/_source/classes/fckmenuitem.js | 161 - fckeditor/editor/_source/classes/fckpanel.js | 386 - fckeditor/editor/_source/classes/fckplugin.js | 56 - .../editor/_source/classes/fckspecialcombo.js | 376 - fckeditor/editor/_source/classes/fckstyle.js | 1500 - .../editor/_source/classes/fcktoolbar.js | 103 - .../_source/classes/fcktoolbarbreak_gecko.js | 36 - .../_source/classes/fcktoolbarbreak_ie.js | 38 - .../_source/classes/fcktoolbarbutton.js | 81 - .../_source/classes/fcktoolbarbuttonui.js | 198 - .../classes/fcktoolbarfontformatcombo.js | 139 - .../_source/classes/fcktoolbarfontscombo.js | 98 - .../classes/fcktoolbarfontsizecombo.js | 76 - .../_source/classes/fcktoolbarpanelbutton.js | 103 - .../_source/classes/fcktoolbarspecialcombo.js | 146 - .../_source/classes/fcktoolbarstylecombo.js | 200 - .../editor/_source/classes/fckw3crange.js | 451 - fckeditor/editor/_source/classes/fckxml.js | 108 - .../editor/_source/classes/fckxml_gecko.js | 106 - fckeditor/editor/_source/classes/fckxml_ie.js | 93 - .../commandclasses/fck_othercommands.js | 634 - .../commandclasses/fckblockquotecommand.js | 250 - .../commandclasses/fckcorestylecommand.js | 61 - .../_source/commandclasses/fckfitwindow.js | 190 - .../commandclasses/fckindentcommands.js | 282 - .../commandclasses/fckjustifycommands.js | 173 - .../_source/commandclasses/fcklistcommands.js | 382 - .../_source/commandclasses/fcknamedcommand.js | 39 - .../fckpasteplaintextcommand.js | 40 - .../commandclasses/fckpastewordcommand.js | 40 - .../commandclasses/fckremoveformatcommand.js | 45 - .../_source/commandclasses/fckshowblocks.js | 91 - .../fckspellcheckcommand_gecko.js | 41 - .../commandclasses/fckspellcheckcommand_ie.js | 69 - .../_source/commandclasses/fckstylecommand.js | 60 - .../_source/commandclasses/fcktablecommand.js | 106 - .../commandclasses/fcktextcolorcommand.js | 201 - fckeditor/editor/_source/fckconstants.js | 56 - fckeditor/editor/_source/fckeditorapi.js | 178 - .../editor/_source/fckjscoreextensions.js | 166 - fckeditor/editor/_source/fckscriptloader.js | 122 - fckeditor/editor/_source/internals/fck.js | 1252 - .../_source/internals/fck_contextmenu.js | 342 - .../editor/_source/internals/fck_gecko.js | 493 - fckeditor/editor/_source/internals/fck_ie.js | 456 - .../_source/internals/fckbrowserinfo.js | 61 - .../_source/internals/fckcodeformatter.js | 100 - .../editor/_source/internals/fckcommands.js | 172 - .../editor/_source/internals/fckconfig.js | 237 - .../editor/_source/internals/fckdebug.js | 59 - .../_source/internals/fckdebug_empty.js | 31 - .../editor/_source/internals/fckdialog.js | 239 - .../_source/internals/fckdocumentprocessor.js | 270 - .../editor/_source/internals/fckdomtools.js | 1057 - .../_source/internals/fcklanguagemanager.js | 164 - .../_source/internals/fcklisthandler.js | 152 - .../editor/_source/internals/fcklistslib.js | 63 - .../editor/_source/internals/fckplugins.js | 46 - .../editor/_source/internals/fckregexlib.js | 100 - .../editor/_source/internals/fckselection.js | 42 - .../_source/internals/fckselection_gecko.js | 228 - .../_source/internals/fckselection_ie.js | 279 - .../editor/_source/internals/fckstyles.js | 381 - .../_source/internals/fcktablehandler.js | 872 - .../internals/fcktablehandler_gecko.js | 56 - .../_source/internals/fcktablehandler_ie.js | 64 - .../_source/internals/fcktoolbaritems.js | 124 - .../editor/_source/internals/fcktoolbarset.js | 399 - .../editor/_source/internals/fcktools.js | 749 - .../_source/internals/fcktools_gecko.js | 282 - .../editor/_source/internals/fcktools_ie.js | 234 - fckeditor/editor/_source/internals/fckundo.js | 223 - .../editor/_source/internals/fckurlparams.js | 39 - .../editor/_source/internals/fckxhtml.js | 534 - .../_source/internals/fckxhtml_gecko.js | 114 - .../editor/_source/internals/fckxhtml_ie.js | 213 - .../_source/internals/fckxhtmlentities.js | 354 - .../editor/css/behaviors/disablehandles.htc | 15 - .../editor/css/behaviors/showtableborders.htc | 36 - fckeditor/editor/css/fck_editorarea.css | 110 - fckeditor/editor/css/fck_internal.css | 199 - .../editor/css/fck_showtableborders_gecko.css | 49 - fckeditor/editor/css/images/block_address.png | Bin 288 -> 0 bytes .../editor/css/images/block_blockquote.png | Bin 293 -> 0 bytes fckeditor/editor/css/images/block_div.png | Bin 229 -> 0 bytes fckeditor/editor/css/images/block_h1.png | Bin 218 -> 0 bytes fckeditor/editor/css/images/block_h2.png | Bin 220 -> 0 bytes fckeditor/editor/css/images/block_h3.png | Bin 219 -> 0 bytes fckeditor/editor/css/images/block_h4.png | Bin 229 -> 0 bytes fckeditor/editor/css/images/block_h5.png | Bin 236 -> 0 bytes fckeditor/editor/css/images/block_h6.png | Bin 216 -> 0 bytes fckeditor/editor/css/images/block_p.png | Bin 205 -> 0 bytes fckeditor/editor/css/images/block_pre.png | Bin 223 -> 0 bytes fckeditor/editor/css/images/fck_anchor.gif | Bin 184 -> 0 bytes fckeditor/editor/css/images/fck_flashlogo.gif | Bin 599 -> 0 bytes .../editor/css/images/fck_hiddenfield.gif | Bin 105 -> 0 bytes fckeditor/editor/css/images/fck_pagebreak.gif | Bin 54 -> 0 bytes fckeditor/editor/css/images/fck_plugin.gif | Bin 1709 -> 0 bytes .../dialog/common/fck_dialog_common.css | 85 - .../editor/dialog/common/fck_dialog_common.js | 311 - .../editor/dialog/common/images/locked.gif | Bin 74 -> 0 bytes .../editor/dialog/common/images/reset.gif | Bin 104 -> 0 bytes .../editor/dialog/common/images/unlocked.gif | Bin 75 -> 0 bytes fckeditor/editor/dialog/fck_about.html | 161 - .../dialog/fck_about/logo_fckeditor.gif | Bin 2044 -> 0 bytes .../editor/dialog/fck_about/logo_fredck.gif | Bin 920 -> 0 bytes .../fck_about/sponsors/spellchecker_net.gif | Bin 1447 -> 0 bytes fckeditor/editor/dialog/fck_anchor.html | 220 - fckeditor/editor/dialog/fck_button.html | 104 - fckeditor/editor/dialog/fck_checkbox.html | 104 - .../editor/dialog/fck_colorselector.html | 172 - fckeditor/editor/dialog/fck_div.html | 364 - fckeditor/editor/dialog/fck_docprops.html | 600 - .../fck_docprops/fck_document_preview.html | 113 - fckeditor/editor/dialog/fck_flash.html | 152 - .../editor/dialog/fck_flash/fck_flash.js | 300 - .../dialog/fck_flash/fck_flash_preview.html | 50 - fckeditor/editor/dialog/fck_form.html | 109 - fckeditor/editor/dialog/fck_hiddenfield.html | 115 - fckeditor/editor/dialog/fck_image.html | 258 - .../editor/dialog/fck_image/fck_image.js | 512 - .../dialog/fck_image/fck_image_preview.html | 72 - fckeditor/editor/dialog/fck_link.html | 295 - fckeditor/editor/dialog/fck_link/fck_link.js | 893 - fckeditor/editor/dialog/fck_listprop.html | 120 - fckeditor/editor/dialog/fck_paste.html | 346 - fckeditor/editor/dialog/fck_radiobutton.html | 104 - fckeditor/editor/dialog/fck_replace.html | 648 - fckeditor/editor/dialog/fck_select.html | 180 - .../editor/dialog/fck_select/fck_select.js | 194 - fckeditor/editor/dialog/fck_smiley.html | 111 - fckeditor/editor/dialog/fck_source.html | 68 - fckeditor/editor/dialog/fck_specialchar.html | 121 - fckeditor/editor/dialog/fck_spellerpages.html | 70 - .../fck_spellerpages/spellerpages/blank.html | 0 .../spellerpages/controlWindow.js | 87 - .../spellerpages/controls.html | 153 - .../server-scripts/spellchecker.cfm | 148 - .../server-scripts/spellchecker.php | 199 - .../server-scripts/spellchecker.pl | 181 - .../spellerpages/spellChecker.js | 461 - .../spellerpages/spellchecker.html | 71 - .../spellerpages/spellerStyle.css | 49 - .../spellerpages/wordWindow.js | 272 - fckeditor/editor/dialog/fck_table.html | 298 - fckeditor/editor/dialog/fck_tablecell.html | 257 - fckeditor/editor/dialog/fck_template.html | 242 - .../dialog/fck_template/images/template1.gif | Bin 375 -> 0 bytes .../dialog/fck_template/images/template2.gif | Bin 333 -> 0 bytes .../dialog/fck_template/images/template3.gif | Bin 422 -> 0 bytes fckeditor/editor/dialog/fck_textarea.html | 94 - fckeditor/editor/dialog/fck_textfield.html | 136 - fckeditor/editor/dtd/fck_dtd_test.html | 41 - fckeditor/editor/dtd/fck_xhtml10strict.js | 116 - .../editor/dtd/fck_xhtml10transitional.js | 140 - fckeditor/editor/fckdebug.html | 153 - fckeditor/editor/fckdialog.html | 812 - fckeditor/editor/fckeditor.html | 317 - fckeditor/editor/fckeditor.original.html | 424 - .../filemanager/browser/default/browser.css | 87 - .../filemanager/browser/default/browser.html | 200 - .../browser/default/frmactualfolder.html | 95 - .../browser/default/frmcreatefolder.html | 114 - .../browser/default/frmfolders.html | 198 - .../browser/default/frmresourceslist.html | 169 - .../browser/default/frmresourcetype.html | 69 - .../browser/default/frmupload.html | 115 - .../browser/default/images/ButtonArrow.gif | Bin 138 -> 0 bytes .../browser/default/images/Folder.gif | Bin 128 -> 0 bytes .../browser/default/images/Folder32.gif | Bin 281 -> 0 bytes .../browser/default/images/FolderOpened.gif | Bin 132 -> 0 bytes .../browser/default/images/FolderOpened32.gif | Bin 264 -> 0 bytes .../browser/default/images/FolderUp.gif | Bin 132 -> 0 bytes .../browser/default/images/icons/32/ai.gif | Bin 1140 -> 0 bytes .../browser/default/images/icons/32/avi.gif | Bin 454 -> 0 bytes .../browser/default/images/icons/32/bmp.gif | Bin 709 -> 0 bytes .../browser/default/images/icons/32/cs.gif | Bin 224 -> 0 bytes .../default/images/icons/32/default.icon.gif | Bin 177 -> 0 bytes .../browser/default/images/icons/32/dll.gif | Bin 258 -> 0 bytes .../browser/default/images/icons/32/doc.gif | Bin 260 -> 0 bytes .../browser/default/images/icons/32/exe.gif | Bin 170 -> 0 bytes .../browser/default/images/icons/32/fla.gif | Bin 946 -> 0 bytes .../browser/default/images/icons/32/gif.gif | Bin 704 -> 0 bytes .../browser/default/images/icons/32/htm.gif | Bin 1527 -> 0 bytes .../browser/default/images/icons/32/html.gif | Bin 1527 -> 0 bytes .../browser/default/images/icons/32/jpg.gif | Bin 463 -> 0 bytes .../browser/default/images/icons/32/js.gif | Bin 274 -> 0 bytes .../browser/default/images/icons/32/mdb.gif | Bin 274 -> 0 bytes .../browser/default/images/icons/32/mp3.gif | Bin 454 -> 0 bytes .../browser/default/images/icons/32/pdf.gif | Bin 567 -> 0 bytes .../browser/default/images/icons/32/png.gif | Bin 464 -> 0 bytes .../browser/default/images/icons/32/ppt.gif | Bin 254 -> 0 bytes .../browser/default/images/icons/32/rdp.gif | Bin 1493 -> 0 bytes .../browser/default/images/icons/32/swf.gif | Bin 725 -> 0 bytes .../browser/default/images/icons/32/swt.gif | Bin 724 -> 0 bytes .../browser/default/images/icons/32/txt.gif | Bin 213 -> 0 bytes .../browser/default/images/icons/32/vsd.gif | Bin 277 -> 0 bytes .../browser/default/images/icons/32/xls.gif | Bin 271 -> 0 bytes .../browser/default/images/icons/32/xml.gif | Bin 408 -> 0 bytes .../browser/default/images/icons/32/zip.gif | Bin 368 -> 0 bytes .../browser/default/images/icons/ai.gif | Bin 403 -> 0 bytes .../browser/default/images/icons/avi.gif | Bin 249 -> 0 bytes .../browser/default/images/icons/bmp.gif | Bin 126 -> 0 bytes .../browser/default/images/icons/cs.gif | Bin 128 -> 0 bytes .../default/images/icons/default.icon.gif | Bin 113 -> 0 bytes .../browser/default/images/icons/dll.gif | Bin 132 -> 0 bytes .../browser/default/images/icons/doc.gif | Bin 140 -> 0 bytes .../browser/default/images/icons/exe.gif | Bin 109 -> 0 bytes .../browser/default/images/icons/fla.gif | Bin 382 -> 0 bytes .../browser/default/images/icons/gif.gif | Bin 125 -> 0 bytes .../browser/default/images/icons/htm.gif | Bin 621 -> 0 bytes .../browser/default/images/icons/html.gif | Bin 621 -> 0 bytes .../browser/default/images/icons/jpg.gif | Bin 125 -> 0 bytes .../browser/default/images/icons/js.gif | Bin 139 -> 0 bytes .../browser/default/images/icons/mdb.gif | Bin 146 -> 0 bytes .../browser/default/images/icons/mp3.gif | Bin 249 -> 0 bytes .../browser/default/images/icons/pdf.gif | Bin 230 -> 0 bytes .../browser/default/images/icons/png.gif | Bin 125 -> 0 bytes .../browser/default/images/icons/ppt.gif | Bin 139 -> 0 bytes .../browser/default/images/icons/rdp.gif | Bin 606 -> 0 bytes .../browser/default/images/icons/swf.gif | Bin 388 -> 0 bytes .../browser/default/images/icons/swt.gif | Bin 388 -> 0 bytes .../browser/default/images/icons/txt.gif | Bin 122 -> 0 bytes .../browser/default/images/icons/vsd.gif | Bin 136 -> 0 bytes .../browser/default/images/icons/xls.gif | Bin 138 -> 0 bytes .../browser/default/images/icons/xml.gif | Bin 231 -> 0 bytes .../browser/default/images/icons/zip.gif | Bin 235 -> 0 bytes .../browser/default/images/spacer.gif | Bin 43 -> 0 bytes .../filemanager/browser/default/js/common.js | 88 - .../filemanager/browser/default/js/fckxml.js | 147 - .../filemanager/connectors/asp/basexml.asp | 63 - .../connectors/asp/class_upload.asp | 353 - .../filemanager/connectors/asp/commands.asp | 198 - .../filemanager/connectors/asp/config.asp | 128 - .../filemanager/connectors/asp/connector.asp | 88 - .../editor/filemanager/connectors/asp/io.asp | 236 - .../filemanager/connectors/asp/upload.asp | 65 - .../filemanager/connectors/asp/util.asp | 55 - .../filemanager/connectors/aspx/config.ascx | 98 - .../connectors/aspx/connector.aspx | 32 - .../filemanager/connectors/aspx/upload.aspx | 32 - .../connectors/cfm/ImageObject.cfc | 273 - .../connectors/cfm/cf5_connector.cfm | 315 - .../filemanager/connectors/cfm/cf5_upload.cfm | 299 - .../filemanager/connectors/cfm/cf_basexml.cfm | 68 - .../connectors/cfm/cf_commands.cfm | 230 - .../connectors/cfm/cf_connector.cfm | 89 - .../filemanager/connectors/cfm/cf_io.cfm | 291 - .../filemanager/connectors/cfm/cf_upload.cfm | 72 - .../filemanager/connectors/cfm/cf_util.cfm | 131 - .../filemanager/connectors/cfm/config.cfm | 189 - .../filemanager/connectors/cfm/connector.cfm | 32 - .../filemanager/connectors/cfm/image.cfc | 1324 - .../filemanager/connectors/cfm/upload.cfm | 31 - .../filemanager/connectors/lasso/config.lasso | 65 - .../connectors/lasso/connector.lasso | 322 - .../filemanager/connectors/lasso/upload.lasso | 168 - .../filemanager/connectors/perl/basexml.pl | 63 - .../filemanager/connectors/perl/commands.pl | 187 - .../filemanager/connectors/perl/connector.cgi | 136 - .../editor/filemanager/connectors/perl/io.pl | 141 - .../filemanager/connectors/perl/upload.cgi | 117 - .../filemanager/connectors/perl/upload_fck.pl | 686 - .../filemanager/connectors/perl/util.pl | 68 - .../filemanager/connectors/php/basexml.php | 93 - .../filemanager/connectors/php/commands.php | 273 - .../filemanager/connectors/php/config.php | 165 - .../filemanager/connectors/php/connector.php | 87 - .../editor/filemanager/connectors/php/io.php | 295 - .../filemanager/connectors/php/phpcompat.php | 17 - .../filemanager/connectors/php/upload.php | 59 - .../filemanager/connectors/php/util.php | 220 - .../filemanager/connectors/py/config.py | 146 - .../filemanager/connectors/py/connector.py | 118 - .../filemanager/connectors/py/fckcommands.py | 198 - .../filemanager/connectors/py/fckconnector.py | 90 - .../filemanager/connectors/py/fckoutput.py | 116 - .../filemanager/connectors/py/fckutil.py | 126 - .../filemanager/connectors/py/htaccess.txt | 23 - .../filemanager/connectors/py/upload.py | 88 - .../editor/filemanager/connectors/py/wsgi.py | 58 - .../editor/filemanager/connectors/py/zope.py | 188 - .../editor/filemanager/connectors/test.html | 210 - .../filemanager/connectors/uploadtest.html | 192 - fckeditor/editor/images/anchor.gif | Bin 184 -> 0 bytes fckeditor/editor/images/arrow_ltr.gif | Bin 49 -> 0 bytes fckeditor/editor/images/arrow_rtl.gif | Bin 49 -> 0 bytes .../editor/images/smiley/msn/angel_smile.gif | Bin 445 -> 0 bytes .../editor/images/smiley/msn/angry_smile.gif | Bin 453 -> 0 bytes .../editor/images/smiley/msn/broken_heart.gif | Bin 423 -> 0 bytes fckeditor/editor/images/smiley/msn/cake.gif | Bin 453 -> 0 bytes .../images/smiley/msn/confused_smile.gif | Bin 322 -> 0 bytes .../editor/images/smiley/msn/cry_smile.gif | Bin 473 -> 0 bytes .../editor/images/smiley/msn/devil_smile.gif | Bin 444 -> 0 bytes .../images/smiley/msn/embaressed_smile.gif | Bin 1077 -> 0 bytes .../editor/images/smiley/msn/envelope.gif | Bin 1030 -> 0 bytes fckeditor/editor/images/smiley/msn/heart.gif | Bin 1012 -> 0 bytes fckeditor/editor/images/smiley/msn/kiss.gif | Bin 978 -> 0 bytes .../editor/images/smiley/msn/lightbulb.gif | Bin 303 -> 0 bytes .../editor/images/smiley/msn/omg_smile.gif | Bin 342 -> 0 bytes .../images/smiley/msn/regular_smile.gif | Bin 1036 -> 0 bytes .../editor/images/smiley/msn/sad_smile.gif | Bin 1039 -> 0 bytes .../editor/images/smiley/msn/shades_smile.gif | Bin 1059 -> 0 bytes .../editor/images/smiley/msn/teeth_smile.gif | Bin 1064 -> 0 bytes .../editor/images/smiley/msn/thumbs_down.gif | Bin 992 -> 0 bytes .../editor/images/smiley/msn/thumbs_up.gif | Bin 989 -> 0 bytes .../editor/images/smiley/msn/tounge_smile.gif | Bin 1055 -> 0 bytes .../smiley/msn/whatchutalkingabout_smile.gif | Bin 1034 -> 0 bytes .../editor/images/smiley/msn/wink_smile.gif | Bin 1041 -> 0 bytes fckeditor/editor/images/spacer.gif | Bin 43 -> 0 bytes fckeditor/editor/js/fckadobeair.js | 176 - fckeditor/editor/js/fckeditorcode_gecko.js | 108 - fckeditor/editor/js/fckeditorcode_ie.js | 109 - fckeditor/editor/lang/_translationstatus.txt | 78 - fckeditor/editor/lang/af.js | 526 - fckeditor/editor/lang/ar.js | 526 - fckeditor/editor/lang/bg.js | 526 - fckeditor/editor/lang/bn.js | 526 - fckeditor/editor/lang/bs.js | 526 - fckeditor/editor/lang/ca.js | 526 - fckeditor/editor/lang/cs.js | 526 - fckeditor/editor/lang/da.js | 526 - fckeditor/editor/lang/de.js | 526 - fckeditor/editor/lang/el.js | 526 - fckeditor/editor/lang/en-au.js | 526 - fckeditor/editor/lang/en-ca.js | 526 - fckeditor/editor/lang/en-uk.js | 526 - fckeditor/editor/lang/en.js | 526 - fckeditor/editor/lang/eo.js | 526 - fckeditor/editor/lang/es.js | 526 - fckeditor/editor/lang/et.js | 526 - fckeditor/editor/lang/eu.js | 527 - fckeditor/editor/lang/fa.js | 526 - fckeditor/editor/lang/fi.js | 526 - fckeditor/editor/lang/fo.js | 526 - fckeditor/editor/lang/fr-ca.js | 526 - fckeditor/editor/lang/fr.js | 526 - fckeditor/editor/lang/gl.js | 526 - fckeditor/editor/lang/gu.js | 526 - fckeditor/editor/lang/he.js | 526 - fckeditor/editor/lang/hi.js | 526 - fckeditor/editor/lang/hr.js | 526 - fckeditor/editor/lang/hu.js | 526 - fckeditor/editor/lang/it.js | 526 - fckeditor/editor/lang/ja.js | 526 - fckeditor/editor/lang/km.js | 526 - fckeditor/editor/lang/ko.js | 526 - fckeditor/editor/lang/lt.js | 526 - fckeditor/editor/lang/lv.js | 526 - fckeditor/editor/lang/mn.js | 526 - fckeditor/editor/lang/ms.js | 526 - fckeditor/editor/lang/nb.js | 526 - fckeditor/editor/lang/nl.js | 526 - fckeditor/editor/lang/no.js | 526 - fckeditor/editor/lang/pl.js | 526 - fckeditor/editor/lang/pt-br.js | 526 - fckeditor/editor/lang/pt.js | 526 - fckeditor/editor/lang/ro.js | 526 - fckeditor/editor/lang/ru.js | 526 - fckeditor/editor/lang/sk.js | 526 - fckeditor/editor/lang/sl.js | 526 - fckeditor/editor/lang/sr-latn.js | 526 - fckeditor/editor/lang/sr.js | 526 - fckeditor/editor/lang/sv.js | 526 - fckeditor/editor/lang/th.js | 526 - fckeditor/editor/lang/tr.js | 526 - fckeditor/editor/lang/uk.js | 526 - fckeditor/editor/lang/vi.js | 526 - fckeditor/editor/lang/zh-cn.js | 526 - fckeditor/editor/lang/zh.js | 526 - .../editor/plugins/autogrow/fckplugin.js | 99 - .../plugins/bbcode/_sample/sample.config.js | 26 - .../editor/plugins/bbcode/_sample/sample.html | 67 - fckeditor/editor/plugins/bbcode/fckplugin.js | 123 - .../plugins/dragresizetable/fckplugin.js | 524 - .../plugins/placeholder/fck_placeholder.html | 105 - .../editor/plugins/placeholder/fckplugin.js | 187 - .../editor/plugins/placeholder/lang/de.js | 27 - .../editor/plugins/placeholder/lang/en.js | 27 - .../editor/plugins/placeholder/lang/es.js | 27 - .../editor/plugins/placeholder/lang/fr.js | 27 - .../editor/plugins/placeholder/lang/it.js | 27 - .../editor/plugins/placeholder/lang/pl.js | 27 - .../plugins/placeholder/placeholder.gif | Bin 96 -> 0 bytes .../plugins/simplecommands/fckplugin.js | 29 - .../editor/plugins/tablecommands/fckplugin.js | 33 - fckeditor/editor/skins/_fckviewstrips.html | 121 - fckeditor/editor/skins/default/fck_dialog.css | 402 - .../editor/skins/default/fck_dialog_ie6.js | 110 - fckeditor/editor/skins/default/fck_editor.css | 464 - fckeditor/editor/skins/default/fck_strip.gif | Bin 5067 -> 0 bytes .../skins/default/images/dialog.sides.gif | Bin 48 -> 0 bytes .../skins/default/images/dialog.sides.png | Bin 178 -> 0 bytes .../skins/default/images/dialog.sides.rtl.png | Bin 181 -> 0 bytes .../editor/skins/default/images/sprites.gif | Bin 959 -> 0 bytes .../editor/skins/default/images/sprites.png | Bin 3250 -> 0 bytes .../default/images/toolbar.arrowright.gif | Bin 53 -> 0 bytes .../default/images/toolbar.buttonarrow.gif | Bin 46 -> 0 bytes .../skins/default/images/toolbar.collapse.gif | Bin 152 -> 0 bytes .../skins/default/images/toolbar.end.gif | Bin 43 -> 0 bytes .../skins/default/images/toolbar.expand.gif | Bin 152 -> 0 bytes .../default/images/toolbar.separator.gif | Bin 58 -> 0 bytes .../skins/default/images/toolbar.start.gif | Bin 105 -> 0 bytes .../editor/skins/office2003/fck_dialog.css | 402 - .../editor/skins/office2003/fck_dialog_ie6.js | 110 - .../editor/skins/office2003/fck_editor.css | 476 - .../editor/skins/office2003/fck_strip.gif | Bin 9668 -> 0 bytes .../skins/office2003/images/dialog.sides.gif | Bin 48 -> 0 bytes .../skins/office2003/images/dialog.sides.png | Bin 203 -> 0 bytes .../office2003/images/dialog.sides.rtl.png | Bin 205 -> 0 bytes .../skins/office2003/images/sprites.gif | Bin 959 -> 0 bytes .../skins/office2003/images/sprites.png | Bin 3305 -> 0 bytes .../office2003/images/toolbar.arrowright.gif | Bin 53 -> 0 bytes .../skins/office2003/images/toolbar.bg.gif | Bin 73 -> 0 bytes .../office2003/images/toolbar.buttonarrow.gif | Bin 46 -> 0 bytes .../office2003/images/toolbar.collapse.gif | Bin 152 -> 0 bytes .../skins/office2003/images/toolbar.end.gif | Bin 124 -> 0 bytes .../office2003/images/toolbar.expand.gif | Bin 152 -> 0 bytes .../office2003/images/toolbar.separator.gif | Bin 67 -> 0 bytes .../skins/office2003/images/toolbar.start.gif | Bin 99 -> 0 bytes fckeditor/editor/skins/silver/fck_dialog.css | 402 - .../editor/skins/silver/fck_dialog_ie6.js | 110 - fckeditor/editor/skins/silver/fck_editor.css | 473 - fckeditor/editor/skins/silver/fck_strip.gif | Bin 5067 -> 0 bytes .../skins/silver/images/dialog.sides.gif | Bin 48 -> 0 bytes .../skins/silver/images/dialog.sides.png | Bin 198 -> 0 bytes .../skins/silver/images/dialog.sides.rtl.png | Bin 200 -> 0 bytes .../editor/skins/silver/images/sprites.gif | Bin 959 -> 0 bytes .../editor/skins/silver/images/sprites.png | Bin 3278 -> 0 bytes .../silver/images/toolbar.arrowright.gif | Bin 53 -> 0 bytes .../silver/images/toolbar.buttonarrow.gif | Bin 46 -> 0 bytes .../skins/silver/images/toolbar.buttonbg.gif | Bin 829 -> 0 bytes .../skins/silver/images/toolbar.collapse.gif | Bin 152 -> 0 bytes .../skins/silver/images/toolbar.end.gif | Bin 43 -> 0 bytes .../skins/silver/images/toolbar.expand.gif | Bin 152 -> 0 bytes .../skins/silver/images/toolbar.separator.gif | Bin 58 -> 0 bytes .../skins/silver/images/toolbar.start.gif | Bin 105 -> 0 bytes fckeditor/fckconfig.js | 340 - fckeditor/fckeditor.afp | 159 - fckeditor/fckeditor.asp | 235 - fckeditor/fckeditor.cfc | 232 - fckeditor/fckeditor.cfm | 159 - fckeditor/fckeditor.js | 328 - fckeditor/fckeditor.lasso | 108 - fckeditor/fckeditor.php | 31 - fckeditor/fckeditor.pl | 143 - fckeditor/fckeditor.py | 160 - fckeditor/fckeditor_php4.php | 262 - fckeditor/fckeditor_php5.php | 257 - fckeditor/fckpackager.xml | 262 - fckeditor/fckstyles.xml | 111 - fckeditor/fcktemplates.xml | 103 - fckeditor/fckutils.cfm | 78 - fckeditor/license.txt | 1246 - file.php | 172 + files/.htaccess | 2 + files/4.1A_Humans_Low_Risk_0-2.pdf | Bin 0 -> 122134 bytes files/4.1B_Humans_Significant_Risk_0.pdf | Bin 0 -> 191685 bytes files/4.1C_Animals_0-2.pdf | Bin 0 -> 133030 bytes files/research_plan_animals_en.doc | Bin 0 -> 51200 bytes files/research_proposal_en.doc | Bin 0 -> 59392 bytes filter.inc.php | 192 + form.inc.php | 622 + gplheader.txt | 27 - help/judging.html | 134 + helper.inc.php | 75 - images/16/bookmark.gif | Bin 553 -> 0 bytes images/16/bookmark.png | Bin 690 -> 0 bytes images/16/bookmark_disabled.gif | Bin 576 -> 0 bytes images/16/bookmark_disabled.png | Bin 416 -> 0 bytes images/16/button_cancel.gif | Bin 604 -> 0 bytes images/16/button_cancel.png | Bin 890 -> 0 bytes images/16/down.gif | Bin 358 -> 0 bytes images/16/down.png | Bin 406 -> 0 bytes images/16/edit.gif | Bin 1004 -> 0 bytes images/16/edit.png | Bin 691 -> 0 bytes images/16/flagged.png | Bin 890 -> 0 bytes images/16/ok.gif | Bin 313 -> 0 bytes images/16/ok.png | Bin 661 -> 0 bytes images/16/undo.gif | Bin 516 -> 0 bytes images/16/undo.png | Bin 585 -> 0 bytes images/16/up.gif | Bin 359 -> 0 bytes images/16/up.png | Bin 412 -> 0 bytes images/16/update.gif | Bin 390 -> 0 bytes images/16/update.png | Bin 639 -> 0 bytes images/16/update2.gif | Bin 17333 -> 0 bytes images/16/update2.png | Bin 15526 -> 0 bytes images/16/viewmag.gif | Bin 573 -> 0 bytes images/16/viewmag.png | Bin 815 -> 0 bytes images/32/help.gif | Bin 1384 -> 0 bytes images/32/help.png | Bin 1587 -> 0 bytes images/32/help_science_ation.png | Bin 952 -> 0 bytes important_dates.php | 50 - incomplete.inc.php | 529 + index.php | 347 +- install.php | 155 - install2.php | 254 - install3.php | 277 - isef.inc.php | 256 + j_expertise.php | 166 + j_main.php | 144 + j_mentorship.php | 66 + j_options.php | 147 + j_personal.php | 101 + j_schedule.php | 115 + jquery/jquery-1.9.1.min.js | 5 + jquery/jquery-ui.min.css | 6 + jquery/jquery-ui.min.js | 8 + jquery/jquery.mobile-1.4.2.min.css | 3 + jquery/jquery.mobile-1.4.2.min.js | 10 + jquery/jquery.mobile-1.4.2.min.map | 1 + jquery/jquery.mobile-1.4.5.min.css | 3 + jquery/jquery.mobile-1.4.5.min.js | 10 + jquery/jquery.mobile-1.4.5.min.map | 1 + jquery/jquery.ui.touch-punch.min.js | 11 + js/sfiab.js | 101 - judge.inc.php | 176 - judge_availability.php | 169 - judge_expertise.php | 232 - judge_main.php | 130 - judge_other.php | 223 - judge_project_summary.php | 88 - judge_schedule.php | 181 - judge_special_awards.php | 162 - lcsv.php | 160 - less | 777 + lesss | 777 + login.inc.php | 19 + login.php | 339 +- lpdf.php | 932 - ltxt.php | 189 - main_forgot.php | 121 + main_winners.php | 136 + project.inc.php | 575 + project_list_html.php | 54 + project_number.inc.php | 159 + project_summary.php | 105 + projects.inc.php | 362 - questions.inc.php | 485 - readme.txt | 21 + register_participants.inc.php | 579 - register_participants.php | 390 - register_participants_emergencycontact.php | 193 - register_participants_isefforms.php | 379 - register_participants_main.php | 349 - register_participants_mentor.php | 234 - register_participants_namecheck.php | 130 - register_participants_project.php | 410 - ..._participants_project_divisionselector.php | 119 - register_participants_safety.php | 149 - register_participants_signature.old.php | 330 - register_participants_signature.php | 19 - register_participants_signature_tcpdf.php | 235 - register_participants_spawards.php | 212 - register_participants_students.php | 540 - register_participants_tours.php | 271 - remote.inc.php | 667 + remote.php | 631 +- report_ceremony.php | 462 + report_jteam_forms.php | 243 + report_jteam_timetable.php | 286 + report_payments.php | 56 + report_project_timetable.php | 192 + report_signatures.php | 162 + reports.inc.php | 1033 + reports_awards.inc.php | 436 + reports_committee.inc.php | 138 + reports_fairs.inc.php | 269 + reports_judges.inc.php | 561 + reports_students.inc.php | 1172 + reports_volunteers.inc.php | 159 + s_awards.php | 138 + s_cwsf.php | 79 + s_download.php | 82 + s_emergency.php | 109 + s_ethics.php | 531 + s_main.php | 179 + s_mentor.php | 220 + s_partner.php | 414 + s_payment.php | 222 + s_personal.php | 236 + s_project.php | 119 + s_reg_options.php | 71 + s_safety.php | 496 + s_signature.php | 550 + s_signature_edit.php | 247 + s_tours.php | 116 + sanity.inc.php | 32 + schoolaccess.php | 249 - schoolinvite.php | 265 - schools.inc.php | 48 + scripts/.htaccess | 2 + scripts/assignprojectnumbers.php | 92 - scripts/assigntourrankings.php | 62 - scripts/conv_db.inc.php | 111 + scripts/conv_db_awards.inc.php | 144 + scripts/conv_db_categories.inc.php | 30 + scripts/conv_db_committee.inc.php | 50 + scripts/conv_db_config.inc.php | 113 + scripts/conv_db_emails.inc.php | 46 + scripts/conv_db_fairs.inc.php | 44 + scripts/conv_db_judges.inc.php | 95 + scripts/conv_db_reports.inc.php | 150 + scripts/conv_db_schools.inc.php | 94 + scripts/conv_db_sponsors.inc.php | 123 + scripts/conv_db_students.inc.php | 187 + scripts/conv_db_tours.inc.php | 34 + scripts/conv_db_volunteers.inc.php | 48 + scripts/conv_tmp.php | 34 + scripts/emptyregistrations.php | 47 - scripts/emptyscheduledata.php | 51 - scripts/gvrsf_populate_exhibithall.php | 186 + scripts/images/ajax-loader.gif | Bin 0 -> 6242 bytes scripts/install.php | 308 + scripts/judges_fake.php | 173 - scripts/populate_fake.php | 137 - scripts/rolloverschools.php | 89 - scripts/science-ation_db_update.php | 92 - scripts/sfiab_queue_runner.php | 272 + sfiab.css | 998 + sfiab.js | 330 + sha512.js | 497 + signature.php | 291 + sponsor_main.php | 134 - sponsors.inc.php | 65 + src/.gitignore | 1 + src/.htaccess | 2 + src/Makefile | 75 + src/anneal.c | 382 + src/anneal.h | 48 + src/db.h | 43 + src/exhibithall.c | 657 + src/exhibithall.h | 13 + src/judges.c | 1378 + src/judges.h | 10 + src/main.c | 50 + src/robotics.c | 769 + src/sfiab.c | 496 + src/sfiab.h | 77 + src/students.c | 344 + src/students.h | 103 + src/timeslots.c | 701 + src/timeslots.h | 40 + src/tours.c | 313 + src/tours.h | 19 + stats.inc.php | 239 + students_complete.php | 29 + tableeditor.class.php | 1341 - tableeditor.css | 141 - tcpdf.inc.php | 557 +- tcpdf_6/.htaccess | 2 + tcpdf_6/CHANGELOG.TXT | 2726 ++ tcpdf_6/LICENSE.TXT | 858 + tcpdf_6/README.TXT | 111 + tcpdf_6/composer.json | 40 + tcpdf_6/config/.tcpdf_config.php.swp | Bin 0 -> 4096 bytes tcpdf_6/config/tcpdf_config.php | 222 + tcpdf_6/examples/barcodes/example_1d_html.php | 53 + tcpdf_6/examples/barcodes/example_1d_png.php | 53 + tcpdf_6/examples/barcodes/example_1d_svg.php | 53 + tcpdf_6/examples/barcodes/example_1d_svgi.php | 53 + .../barcodes/example_2d_datamatrix_html.php | 53 + .../barcodes/example_2d_datamatrix_png.php | 53 + .../barcodes/example_2d_datamatrix_svg.php | 53 + .../barcodes/example_2d_datamatrix_svgi.php | 53 + .../barcodes/example_2d_pdf417_html.php | 53 + .../barcodes/example_2d_pdf417_png.php | 53 + .../barcodes/example_2d_pdf417_svg.php | 53 + .../barcodes/example_2d_pdf417_svgi.php | 53 + .../barcodes/example_2d_qrcode_html.php | 53 + .../barcodes/example_2d_qrcode_png.php | 53 + .../barcodes/example_2d_qrcode_svg.php | 53 + .../barcodes/example_2d_qrcode_svgi.php | 53 + .../barcodes/tcpdf_barcodes_1d_include.php | 37 + .../barcodes/tcpdf_barcodes_2d_include.php | 37 + tcpdf_6/examples/config/tcpdf_config_alt.php | 222 + tcpdf_6/examples/data/cert/tcpdf.crt | 40 + tcpdf_6/examples/data/cert/tcpdf.fdf | Bin 0 -> 1286 bytes tcpdf_6/examples/data/cert/tcpdf.p12 | Bin 0 -> 1749 bytes tcpdf_6/examples/data/chapter_demo_1.txt | 19 + tcpdf_6/examples/data/chapter_demo_2.txt | 23 + tcpdf_6/examples/data/table_data_demo.txt | 15 + tcpdf_6/examples/data/utf8test.txt | 128 + tcpdf_6/examples/example_001.php | 106 + tcpdf_6/examples/example_002.php | 87 + tcpdf_6/examples/example_003.php | 118 + tcpdf_6/examples/example_004.php | 121 + tcpdf_6/examples/example_005.php | 158 + tcpdf_6/examples/example_006.php | 330 + tcpdf_6/examples/example_007.php | 113 + tcpdf_6/examples/example_008.php | 97 + tcpdf_6/examples/example_009.php | 146 + tcpdf_6/examples/example_010.php | 150 + tcpdf_6/examples/example_011.php | 138 + tcpdf_6/examples/example_012.pdf | Bin 0 -> 13214 bytes tcpdf_6/examples/example_012.php | 205 + tcpdf_6/examples/example_013.php | 229 + tcpdf_6/examples/example_014.php | 194 + tcpdf_6/examples/example_015.php | 161 + tcpdf_6/examples/example_016.php | 134 + tcpdf_6/examples/example_017.php | 117 + tcpdf_6/examples/example_018.php | 128 + tcpdf_6/examples/example_019.php | 98 + tcpdf_6/examples/example_020.php | 146 + tcpdf_6/examples/example_021.php | 91 + tcpdf_6/examples/example_022.php | 146 + tcpdf_6/examples/example_023.php | 113 + tcpdf_6/examples/example_024.php | 140 + tcpdf_6/examples/example_025.php | 118 + tcpdf_6/examples/example_026.php | 145 + tcpdf_6/examples/example_027.php | 418 + tcpdf_6/examples/example_028.php | 138 + tcpdf_6/examples/example_029.php | 124 + tcpdf_6/examples/example_030.php | 188 + tcpdf_6/examples/example_031.php | 103 + tcpdf_6/examples/example_032.php | 93 + tcpdf_6/examples/example_033.php | 105 + tcpdf_6/examples/example_034.php | 96 + tcpdf_6/examples/example_035.php | 111 + tcpdf_6/examples/example_036.php | 89 + tcpdf_6/examples/example_037.php | 147 + tcpdf_6/examples/example_038.php | 92 + tcpdf_6/examples/example_039.php | 104 + tcpdf_6/examples/example_040.php | 116 + tcpdf_6/examples/example_041.php | 90 + tcpdf_6/examples/example_042.php | 102 + tcpdf_6/examples/example_043.php | 85 + tcpdf_6/examples/example_044.php | 128 + tcpdf_6/examples/example_045.php | 130 + tcpdf_6/examples/example_046.php | 123 + tcpdf_6/examples/example_047.php | 117 + tcpdf_6/examples/example_048.php | 313 + tcpdf_6/examples/example_049.php | 126 + tcpdf_6/examples/example_050.php | 210 + tcpdf_6/examples/example_051.php | 145 + tcpdf_6/examples/example_052.php | 121 + tcpdf_6/examples/example_053.php | 108 + tcpdf_6/examples/example_054.php | 128 + tcpdf_6/examples/example_055.php | 115 + tcpdf_6/examples/example_056.php | 133 + tcpdf_6/examples/example_057.php | 268 + tcpdf_6/examples/example_058.php | 94 + tcpdf_6/examples/example_059.php | 190 + tcpdf_6/examples/example_060.php | 108 + tcpdf_6/examples/example_061.php | 264 + tcpdf_6/examples/example_062.php | 140 + tcpdf_6/examples/example_063.php | 131 + tcpdf_6/examples/example_064.php | 176 + tcpdf_6/examples/example_065.php | 98 + tcpdf_6/examples/images/_blank.png | Bin 0 -> 137 bytes tcpdf_6/examples/images/alpha.png | Bin 0 -> 13168 bytes tcpdf_6/examples/images/bug.eps | 1809 ++ tcpdf_6/examples/images/image_demo.jpg | Bin 0 -> 573845 bytes tcpdf_6/examples/images/image_with_alpha.png | Bin 0 -> 230267 bytes tcpdf_6/examples/images/img.png | Bin 0 -> 81634 bytes tcpdf_6/examples/images/logo_example.gif | Bin 0 -> 21022 bytes tcpdf_6/examples/images/logo_example.jpg | Bin 0 -> 32732 bytes tcpdf_6/examples/images/logo_example.png | Bin 0 -> 19411 bytes tcpdf_6/examples/images/pelican.ai | 147 + tcpdf_6/examples/images/tcpdf_cell.png | Bin 0 -> 38415 bytes tcpdf_6/examples/images/tcpdf_logo.jpg | Bin 0 -> 17633 bytes tcpdf_6/examples/images/tcpdf_signature.png | Bin 0 -> 67931 bytes tcpdf_6/examples/images/testsvg.svg | 328 + tcpdf_6/examples/images/tiger.ai | 3599 +++ tcpdf_6/examples/images/tux.svg | 1487 + tcpdf_6/examples/index.php | 115 + tcpdf_6/examples/lang/afr.php | 44 + tcpdf_6/examples/lang/ara.php | 44 + tcpdf_6/examples/lang/aze.php | 44 + tcpdf_6/examples/lang/bel.php | 44 + tcpdf_6/examples/lang/bra.php | 44 + tcpdf_6/examples/lang/bul.php | 44 + tcpdf_6/examples/lang/cat.php | 44 + tcpdf_6/examples/lang/ces.php | 44 + tcpdf_6/examples/lang/chi.php | 44 + tcpdf_6/examples/lang/cym.php | 44 + tcpdf_6/examples/lang/dan.php | 44 + tcpdf_6/examples/lang/eng.php | 44 + tcpdf_6/examples/lang/est.php | 44 + tcpdf_6/examples/lang/eus.php | 44 + tcpdf_6/examples/lang/far.php | 44 + tcpdf_6/examples/lang/fra.php | 44 + tcpdf_6/examples/lang/ger.php | 44 + tcpdf_6/examples/lang/gle.php | 44 + tcpdf_6/examples/lang/glg.php | 44 + tcpdf_6/examples/lang/hat.php | 44 + tcpdf_6/examples/lang/heb.php | 44 + tcpdf_6/examples/lang/hrv.php | 44 + tcpdf_6/examples/lang/hun.php | 44 + tcpdf_6/examples/lang/hye.php | 44 + tcpdf_6/examples/lang/ind.php | 44 + tcpdf_6/examples/lang/ita.php | 44 + tcpdf_6/examples/lang/jpn.php | 44 + tcpdf_6/examples/lang/kat.php | 44 + tcpdf_6/examples/lang/kor.php | 44 + tcpdf_6/examples/lang/mkd.php | 44 + tcpdf_6/examples/lang/mlt.php | 44 + tcpdf_6/examples/lang/msa.php | 44 + tcpdf_6/examples/lang/nld.php | 44 + tcpdf_6/examples/lang/nob.php | 44 + tcpdf_6/examples/lang/pol.php | 44 + tcpdf_6/examples/lang/por.php | 44 + tcpdf_6/examples/lang/ron.php | 44 + tcpdf_6/examples/lang/rus.php | 44 + tcpdf_6/examples/lang/slv.php | 44 + tcpdf_6/examples/lang/spa.php | 44 + tcpdf_6/examples/lang/sqi.php | 44 + tcpdf_6/examples/lang/srp.php | 44 + tcpdf_6/examples/lang/swa.php | 44 + tcpdf_6/examples/lang/swe.php | 44 + tcpdf_6/examples/lang/ukr.php | 44 + tcpdf_6/examples/lang/urd.php | 44 + tcpdf_6/examples/lang/yid.php | 44 + tcpdf_6/examples/lang/zho.php | 44 + tcpdf_6/examples/tcpdf_include.php | 42 + gpl.txt => tcpdf_6/fonts/ae_fonts_2.0/COPYING | 63 + tcpdf_6/fonts/ae_fonts_2.0/ChangeLog | 863 + tcpdf_6/fonts/ae_fonts_2.0/README | 58 + tcpdf_6/fonts/aealarabiya.ctg.z | Bin 0 -> 1849 bytes tcpdf_6/fonts/aealarabiya.php | 15 + tcpdf_6/fonts/aealarabiya.z | Bin 0 -> 56010 bytes tcpdf_6/fonts/aefurat.ctg.z | Bin 0 -> 1843 bytes tcpdf_6/fonts/aefurat.php | 15 + tcpdf_6/fonts/aefurat.z | Bin 0 -> 73899 bytes tcpdf_6/fonts/cid0cs.php | 16 + tcpdf_6/fonts/cid0ct.php | 16 + tcpdf_6/fonts/cid0jp.php | 16 + tcpdf_6/fonts/cid0kr.php | 16 + tcpdf_6/fonts/courier.php | 12 + tcpdf_6/fonts/courierb.php | 12 + tcpdf_6/fonts/courierbi.php | 12 + tcpdf_6/fonts/courieri.php | 12 + tcpdf_6/fonts/dejavu-fonts-ttf-2.33/AUTHORS | 53 + tcpdf_6/fonts/dejavu-fonts-ttf-2.33/BUGS | 3 + tcpdf_6/fonts/dejavu-fonts-ttf-2.33/LICENSE | 99 + tcpdf_6/fonts/dejavu-fonts-ttf-2.33/NEWS | 1315 + tcpdf_6/fonts/dejavu-fonts-ttf-2.33/README | 59 + .../fonts/dejavu-fonts-ttf-2.33/langcover.txt | 242 + .../fonts/dejavu-fonts-ttf-2.33/status.txt | 6657 +++++ .../fonts/dejavu-fonts-ttf-2.33/unicover.txt | 215 + tcpdf_6/fonts/dejavusans.ctg.z | Bin 0 -> 10120 bytes tcpdf_6/fonts/dejavusans.php | 15 + tcpdf_6/fonts/dejavusans.z | Bin 0 -> 361229 bytes tcpdf_6/fonts/dejavusansb.ctg.z | Bin 0 -> 9854 bytes tcpdf_6/fonts/dejavusansb.php | 15 + tcpdf_6/fonts/dejavusansb.z | Bin 0 -> 333391 bytes tcpdf_6/fonts/dejavusansbi.ctg.z | Bin 0 -> 8757 bytes tcpdf_6/fonts/dejavusansbi.php | 15 + tcpdf_6/fonts/dejavusansbi.z | Bin 0 -> 311758 bytes tcpdf_6/fonts/dejavusanscondensed.ctg.z | Bin 0 -> 10120 bytes tcpdf_6/fonts/dejavusanscondensed.php | 15 + tcpdf_6/fonts/dejavusanscondensed.z | Bin 0 -> 314538 bytes tcpdf_6/fonts/dejavusanscondensedb.ctg.z | Bin 0 -> 9854 bytes tcpdf_6/fonts/dejavusanscondensedb.php | 15 + tcpdf_6/fonts/dejavusanscondensedb.z | Bin 0 -> 310831 bytes tcpdf_6/fonts/dejavusanscondensedbi.ctg.z | Bin 0 -> 8757 bytes tcpdf_6/fonts/dejavusanscondensedbi.php | 15 + tcpdf_6/fonts/dejavusanscondensedbi.z | Bin 0 -> 298581 bytes tcpdf_6/fonts/dejavusanscondensedi.ctg.z | Bin 0 -> 8996 bytes tcpdf_6/fonts/dejavusanscondensedi.php | 15 + tcpdf_6/fonts/dejavusanscondensedi.z | Bin 0 -> 295442 bytes tcpdf_6/fonts/dejavusansextralight.ctg.z | Bin 0 -> 3833 bytes tcpdf_6/fonts/dejavusansextralight.php | 15 + tcpdf_6/fonts/dejavusansextralight.z | Bin 0 -> 164360 bytes tcpdf_6/fonts/dejavusansi.ctg.z | Bin 0 -> 8996 bytes tcpdf_6/fonts/dejavusansi.php | 15 + tcpdf_6/fonts/dejavusansi.z | Bin 0 -> 311974 bytes tcpdf_6/fonts/dejavusansmono.ctg.z | Bin 0 -> 6318 bytes tcpdf_6/fonts/dejavusansmono.php | 15 + tcpdf_6/fonts/dejavusansmono.z | Bin 0 -> 196935 bytes tcpdf_6/fonts/dejavusansmonob.ctg.z | Bin 0 -> 6083 bytes tcpdf_6/fonts/dejavusansmonob.php | 15 + tcpdf_6/fonts/dejavusansmonob.z | Bin 0 -> 189280 bytes tcpdf_6/fonts/dejavusansmonobi.ctg.z | Bin 0 -> 4936 bytes tcpdf_6/fonts/dejavusansmonobi.php | 15 + tcpdf_6/fonts/dejavusansmonobi.z | Bin 0 -> 142395 bytes tcpdf_6/fonts/dejavusansmonoi.ctg.z | Bin 0 -> 5173 bytes tcpdf_6/fonts/dejavusansmonoi.php | 15 + tcpdf_6/fonts/dejavusansmonoi.z | Bin 0 -> 144067 bytes tcpdf_6/fonts/dejavuserif.ctg.z | Bin 0 -> 6388 bytes tcpdf_6/fonts/dejavuserif.php | 15 + tcpdf_6/fonts/dejavuserif.z | Bin 0 -> 201425 bytes tcpdf_6/fonts/dejavuserifb.ctg.z | Bin 0 -> 6123 bytes tcpdf_6/fonts/dejavuserifb.php | 15 + tcpdf_6/fonts/dejavuserifb.z | Bin 0 -> 187662 bytes tcpdf_6/fonts/dejavuserifbi.ctg.z | Bin 0 -> 6131 bytes tcpdf_6/fonts/dejavuserifbi.php | 15 + tcpdf_6/fonts/dejavuserifbi.z | Bin 0 -> 187962 bytes tcpdf_6/fonts/dejavuserifcondensed.ctg.z | Bin 0 -> 6388 bytes tcpdf_6/fonts/dejavuserifcondensed.php | 15 + tcpdf_6/fonts/dejavuserifcondensed.z | Bin 0 -> 180739 bytes tcpdf_6/fonts/dejavuserifcondensedb.ctg.z | Bin 0 -> 6123 bytes tcpdf_6/fonts/dejavuserifcondensedb.php | 15 + tcpdf_6/fonts/dejavuserifcondensedb.z | Bin 0 -> 171838 bytes tcpdf_6/fonts/dejavuserifcondensedbi.ctg.z | Bin 0 -> 6131 bytes tcpdf_6/fonts/dejavuserifcondensedbi.php | 15 + tcpdf_6/fonts/dejavuserifcondensedbi.z | Bin 0 -> 189956 bytes tcpdf_6/fonts/dejavuserifcondensedi.ctg.z | Bin 0 -> 6359 bytes tcpdf_6/fonts/dejavuserifcondensedi.php | 15 + tcpdf_6/fonts/dejavuserifcondensedi.z | Bin 0 -> 192309 bytes tcpdf_6/fonts/dejavuserifi.ctg.z | Bin 0 -> 6359 bytes tcpdf_6/fonts/dejavuserifi.php | 15 + tcpdf_6/fonts/dejavuserifi.z | Bin 0 -> 190085 bytes tcpdf_6/fonts/freefont-20120503/AUTHORS | 242 + tcpdf_6/fonts/freefont-20120503/COPYING | 674 + tcpdf_6/fonts/freefont-20120503/CREDITS | 597 + tcpdf_6/fonts/freefont-20120503/ChangeLog | 14707 ++++++++++ tcpdf_6/fonts/freefont-20120503/INSTALL | 98 + tcpdf_6/fonts/freefont-20120503/README | 127 + .../fonts/freefont-20120503/TROUBLESHOOTING | 115 + tcpdf_6/fonts/freefont-20120503/USAGE | 185 + tcpdf_6/fonts/freemono.ctg.z | Bin 0 -> 7904 bytes tcpdf_6/fonts/freemono.php | 15 + tcpdf_6/fonts/freemono.z | Bin 0 -> 303175 bytes tcpdf_6/fonts/freemonob.ctg.z | Bin 0 -> 3970 bytes tcpdf_6/fonts/freemonob.php | 15 + tcpdf_6/fonts/freemonob.z | Bin 0 -> 160602 bytes tcpdf_6/fonts/freemonobi.ctg.z | Bin 0 -> 3528 bytes tcpdf_6/fonts/freemonobi.php | 15 + tcpdf_6/fonts/freemonobi.z | Bin 0 -> 169876 bytes tcpdf_6/fonts/freemonoi.ctg.z | Bin 0 -> 4364 bytes tcpdf_6/fonts/freemonoi.php | 15 + tcpdf_6/fonts/freemonoi.z | Bin 0 -> 221203 bytes tcpdf_6/fonts/freesans.ctg.z | Bin 0 -> 8661 bytes tcpdf_6/fonts/freesans.php | 15 + tcpdf_6/fonts/freesans.z | Bin 0 -> 805933 bytes tcpdf_6/fonts/freesansb.ctg.z | Bin 0 -> 5192 bytes tcpdf_6/fonts/freesansb.php | 15 + tcpdf_6/fonts/freesansb.z | Bin 0 -> 237861 bytes tcpdf_6/fonts/freesansbi.ctg.z | Bin 0 -> 4626 bytes tcpdf_6/fonts/freesansbi.php | 15 + tcpdf_6/fonts/freesansbi.z | Bin 0 -> 194106 bytes tcpdf_6/fonts/freesansi.ctg.z | Bin 0 -> 4927 bytes tcpdf_6/fonts/freesansi.php | 15 + tcpdf_6/fonts/freesansi.z | Bin 0 -> 420785 bytes tcpdf_6/fonts/freeserif.ctg.z | Bin 0 -> 12610 bytes tcpdf_6/fonts/freeserif.php | 15 + tcpdf_6/fonts/freeserif.z | Bin 0 -> 1826908 bytes tcpdf_6/fonts/freeserifb.ctg.z | Bin 0 -> 7836 bytes tcpdf_6/fonts/freeserifb.php | 15 + tcpdf_6/fonts/freeserifb.z | Bin 0 -> 680954 bytes tcpdf_6/fonts/freeserifbi.ctg.z | Bin 0 -> 5105 bytes tcpdf_6/fonts/freeserifbi.php | 15 + tcpdf_6/fonts/freeserifbi.z | Bin 0 -> 341887 bytes tcpdf_6/fonts/freeserifi.ctg.z | Bin 0 -> 5353 bytes tcpdf_6/fonts/freeserifi.php | 15 + tcpdf_6/fonts/freeserifi.z | Bin 0 -> 533721 bytes tcpdf_6/fonts/helvetica.php | 13 + tcpdf_6/fonts/helveticab.php | 12 + tcpdf_6/fonts/helveticabi.php | 12 + tcpdf_6/fonts/helveticai.php | 12 + tcpdf_6/fonts/hysmyeongjostdmedium.php | 48 + tcpdf_6/fonts/kozgopromedium.php | 65 + tcpdf_6/fonts/kozminproregular.php | 63 + tcpdf_6/fonts/msungstdlight.php | 38 + tcpdf_6/fonts/pdfacourier.php | 15 + tcpdf_6/fonts/pdfacourier.z | Bin 0 -> 37462 bytes tcpdf_6/fonts/pdfacourierb.php | 15 + tcpdf_6/fonts/pdfacourierb.z | Bin 0 -> 39522 bytes tcpdf_6/fonts/pdfacourierbi.php | 15 + tcpdf_6/fonts/pdfacourierbi.z | Bin 0 -> 44630 bytes tcpdf_6/fonts/pdfacourieri.php | 15 + tcpdf_6/fonts/pdfacourieri.z | Bin 0 -> 35215 bytes tcpdf_6/fonts/pdfahelvetica.php | 15 + tcpdf_6/fonts/pdfahelvetica.z | Bin 0 -> 25225 bytes tcpdf_6/fonts/pdfahelveticab.php | 15 + tcpdf_6/fonts/pdfahelveticab.z | Bin 0 -> 25573 bytes tcpdf_6/fonts/pdfahelveticabi.php | 15 + tcpdf_6/fonts/pdfahelveticabi.z | Bin 0 -> 32904 bytes tcpdf_6/fonts/pdfahelveticai.php | 15 + tcpdf_6/fonts/pdfahelveticai.z | Bin 0 -> 29045 bytes tcpdf_6/fonts/pdfasymbol.php | 15 + tcpdf_6/fonts/pdfasymbol.z | Bin 0 -> 30439 bytes tcpdf_6/fonts/pdfatimes.php | 15 + tcpdf_6/fonts/pdfatimes.z | Bin 0 -> 38971 bytes tcpdf_6/fonts/pdfatimesb.php | 15 + tcpdf_6/fonts/pdfatimesb.z | Bin 0 -> 38101 bytes tcpdf_6/fonts/pdfatimesbi.php | 15 + tcpdf_6/fonts/pdfatimesbi.z | Bin 0 -> 40653 bytes tcpdf_6/fonts/pdfatimesi.php | 15 + tcpdf_6/fonts/pdfatimesi.z | Bin 0 -> 35856 bytes tcpdf_6/fonts/pdfazapfdingbats.php | 15 + tcpdf_6/fonts/pdfazapfdingbats.z | Bin 0 -> 50713 bytes tcpdf_6/fonts/scriptin.ctg.z | Bin 0 -> 574 bytes tcpdf_6/fonts/scriptin.php | 39 + tcpdf_6/fonts/scriptin.z | Bin 0 -> 50380 bytes tcpdf_6/fonts/segoesb.ctg.z | Bin 0 -> 656 bytes tcpdf_6/fonts/segoesb.php | 39 + tcpdf_6/fonts/segoesb.z | Bin 0 -> 22485 bytes tcpdf_6/fonts/stsongstdlight.php | 39 + tcpdf_6/fonts/symbol.php | 12 + tcpdf_6/fonts/tempsitc.ctg.z | Bin 0 -> 687 bytes tcpdf_6/fonts/tempsitc.php | 15 + tcpdf_6/fonts/tempsitc.z | Bin 0 -> 53575 bytes tcpdf_6/fonts/times.php | 12 + tcpdf_6/fonts/timesb.php | 12 + tcpdf_6/fonts/timesbi.php | 12 + tcpdf_6/fonts/timesi.php | 12 + tcpdf_6/fonts/uni2cid_ac15.php | 6 + tcpdf_6/fonts/uni2cid_ag15.php | 6 + tcpdf_6/fonts/uni2cid_aj16.php | 6 + tcpdf_6/fonts/uni2cid_ak12.php | 6 + tcpdf_6/fonts/zapfdingbats.php | 12 + tcpdf_6/include/barcodes/datamatrix.php | 1153 + tcpdf_6/include/barcodes/pdf417.php | 996 + tcpdf_6/include/barcodes/qrcode.php | 2866 ++ tcpdf_6/include/sRGB.icc | Bin 0 -> 3048 bytes tcpdf_6/include/tcpdf_colors.php | 462 + tcpdf_6/include/tcpdf_filters.php | 481 + tcpdf_6/include/tcpdf_font_data.php | 18447 ++++++++++++ tcpdf_6/include/tcpdf_fonts.php | 2582 ++ tcpdf_6/include/tcpdf_images.php | 355 + tcpdf_6/include/tcpdf_static.php | 2837 ++ tcpdf_6/tcpdf.php | 24280 ++++++++++++++++ tcpdf_6/tcpdf_autoconfig.php | 237 + tcpdf_6/tcpdf_barcodes_1d.php | 2287 ++ tcpdf_6/tcpdf_barcodes_2d.php | 332 + tcpdf_6/tcpdf_config_sfiab.php | 232 + tcpdf_6/tcpdf_import.php | 104 + tcpdf_6/tcpdf_parser.php | 797 + tcpdf_6/tools/.htaccess | 1 + tcpdf_6/tools/tcpdf_addfont.php | 269 + tcpdf_config.php | 200 - .../images/ui-bg_flat_55_999999_40x100.png | Bin 180 -> 0 bytes .../images/ui-bg_flat_75_aaaaaa_40x100.png | Bin 180 -> 0 bytes .../images/ui-bg_glass_45_0078ae_1x400.png | Bin 136 -> 0 bytes .../images/ui-bg_glass_55_f8da4e_1x400.png | Bin 131 -> 0 bytes .../images/ui-bg_glass_75_79c9ec_1x400.png | Bin 177 -> 0 bytes .../ui-bg_gloss-wave_45_e14f1c_500x100.png | Bin 3649 -> 0 bytes .../ui-bg_gloss-wave_50_6eac2c_500x100.png | Bin 4256 -> 0 bytes .../ui-bg_gloss-wave_75_2191c0_500x100.png | Bin 3457 -> 0 bytes .../ui-bg_inset-hard_100_fcfdfd_1x100.png | Bin 88 -> 0 bytes .../images/ui-icons_0078ae_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_056b93_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_d8e7f3_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_e0fdff_256x240.png | Bin 5355 -> 0 bytes .../images/ui-icons_f5e175_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_f7a50d_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_fcd113_256x240.png | Bin 4369 -> 0 bytes theme/classic/jquery-ui-1.7.2.custom.css | 406 - theme/classic/sfiab.css | 444 - theme/classic/theme.php | 27 - theme/icons_classic/Coins-32x32.png | Bin 4310 -> 0 bytes .../icons_classic/accessories-text-editor.png | Bin 5637 -> 0 bytes theme/icons_classic/agt_forum.png | Bin 2385 -> 0 bytes theme/icons_classic/application-pdf.png | Bin 1537 -> 0 bytes ...pplication-vnd.oasis.opendocument.text.png | Bin 1514 -> 0 bytes .../icons_classic/applications-education.png | Bin 1780 -> 0 bytes theme/icons_classic/ark.png | Bin 1927 -> 0 bytes theme/icons_classic/chemical.png | Bin 2075 -> 0 bytes theme/icons_classic/configure.png | Bin 1500 -> 0 bytes theme/icons_classic/date.png | Bin 2458 -> 0 bytes theme/icons_classic/document-multiple.png | Bin 815 -> 0 bytes theme/icons_classic/edit_user.png | Bin 1851 -> 0 bytes theme/icons_classic/edu_science.png | Bin 2121 -> 0 bytes theme/icons_classic/edu_science_canada.png | Bin 4613 -> 0 bytes theme/icons_classic/elempic.png | Bin 1989 -> 0 bytes theme/icons_classic/encrypted.png | Bin 1351 -> 0 bytes theme/icons_classic/flag-blue.png | Bin 4256 -> 0 bytes theme/icons_classic/flag-green.png | Bin 4193 -> 0 bytes theme/icons_classic/folder.png | Bin 1375 -> 0 bytes theme/icons_classic/gear.png | Bin 2287 -> 0 bytes theme/icons_classic/help-contents.png | Bin 1599 -> 0 bytes theme/icons_classic/icons.php | 77 - theme/icons_classic/kanagram.png | Bin 2353 -> 0 bytes theme/icons_classic/kdmconfig.png | Bin 2257 -> 0 bytes theme/icons_classic/klipper.png | Bin 1174 -> 0 bytes theme/icons_classic/kwordquiz.png | Bin 1869 -> 0 bytes theme/icons_classic/kwrite.png | Bin 2079 -> 0 bytes theme/icons_classic/legalmoves.png | Bin 1071 -> 0 bytes theme/icons_classic/mail-mark-unread.png | Bin 794 -> 0 bytes theme/icons_classic/numbers.png | Bin 558 -> 0 bytes theme/icons_classic/package_utilities.png | Bin 1913 -> 0 bytes theme/icons_classic/plasmagik.png | Bin 1912 -> 0 bytes .../preferences-system-performance.png | Bin 1654 -> 0 bytes theme/icons_classic/rebuild.png | Bin 1487 -> 0 bytes theme/icons_classic/rollover_fiscal.png | Bin 2606 -> 0 bytes theme/icons_classic/signature.png | Bin 1066 -> 0 bytes theme/icons_classic/svn_switch.png | Bin 1994 -> 0 bytes theme/icons_classic/system-users.png | Bin 1849 -> 0 bytes theme/icons_classic/toggle_log.png | Bin 2057 -> 0 bytes theme/icons_classic/transfers_list.png | Bin 2550 -> 0 bytes theme/icons_classic/user-group-new.png | Bin 2108 -> 0 bytes theme/icons_classic/vcs_status.png | Bin 2236 -> 0 bytes theme/icons_classic/view_sort_descending.png | Bin 1107 -> 0 bytes theme/icons_science_ation/Coins-32x32.png | Bin 1019 -> 0 bytes .../accessories-text-editor.png | Bin 790 -> 0 bytes theme/icons_science_ation/agt_forum.png | Bin 846 -> 0 bytes theme/icons_science_ation/application-pdf.png | Bin 790 -> 0 bytes ...pplication-vnd.oasis.opendocument.text.png | Bin 676 -> 0 bytes .../applications-education.png | Bin 739 -> 0 bytes theme/icons_science_ation/chemical.png | Bin 706 -> 0 bytes theme/icons_science_ation/configure.png | Bin 754 -> 0 bytes theme/icons_science_ation/date.png | Bin 735 -> 0 bytes .../icons_science_ation/document-multiple.png | Bin 677 -> 0 bytes theme/icons_science_ation/edit_user.png | Bin 787 -> 0 bytes theme/icons_science_ation/edu_science.png | Bin 666 -> 0 bytes .../edu_science_canada.png | Bin 747 -> 0 bytes theme/icons_science_ation/elempic.png | Bin 605 -> 0 bytes theme/icons_science_ation/encrypted.png | Bin 693 -> 0 bytes theme/icons_science_ation/flag-blue.png | Bin 628 -> 0 bytes theme/icons_science_ation/flag-green.png | Bin 628 -> 0 bytes theme/icons_science_ation/folder.png | Bin 573 -> 0 bytes theme/icons_science_ation/gear.png | Bin 891 -> 0 bytes theme/icons_science_ation/help-contents.png | Bin 898 -> 0 bytes theme/icons_science_ation/icons.php | 77 - theme/icons_science_ation/kanagram.png | Bin 956 -> 0 bytes theme/icons_science_ation/kdmconfig.png | Bin 611 -> 0 bytes theme/icons_science_ation/klipper.png | Bin 615 -> 0 bytes theme/icons_science_ation/kwordquiz.png | Bin 773 -> 0 bytes theme/icons_science_ation/kwrite.png | Bin 591 -> 0 bytes theme/icons_science_ation/legalmoves.png | Bin 831 -> 0 bytes .../icons_science_ation/mail-mark-unread.png | Bin 786 -> 0 bytes theme/icons_science_ation/numbers.png | Bin 966 -> 0 bytes .../icons_science_ation/package_utilities.png | Bin 827 -> 0 bytes theme/icons_science_ation/plasmagik.png | Bin 1070 -> 0 bytes theme/icons_science_ation/rebuild.png | Bin 845 -> 0 bytes theme/icons_science_ation/rollover_fiscal.png | Bin 630 -> 0 bytes theme/icons_science_ation/signature.png | Bin 861 -> 0 bytes theme/icons_science_ation/svn_switch.png | Bin 630 -> 0 bytes theme/icons_science_ation/system-users.png | Bin 839 -> 0 bytes theme/icons_science_ation/toggle_log.png | Bin 867 -> 0 bytes theme/icons_science_ation/transfers_list.png | Bin 768 -> 0 bytes theme/icons_science_ation/user-group-new.png | Bin 893 -> 0 bytes theme/icons_science_ation/vcs_status.png | Bin 768 -> 0 bytes .../view_sort_descending.png | Bin 674 -> 0 bytes .../images/ui-bg_flat_55_999999_40x100.png | Bin 180 -> 0 bytes .../images/ui-bg_flat_75_aaaaaa_40x100.png | Bin 180 -> 0 bytes .../images/ui-bg_glass_45_0078ae_1x400.png | Bin 136 -> 0 bytes .../images/ui-bg_glass_55_f8da4e_1x400.png | Bin 131 -> 0 bytes .../images/ui-bg_glass_75_79c9ec_1x400.png | Bin 177 -> 0 bytes .../ui-bg_gloss-wave_45_e14f1c_500x100.png | Bin 3649 -> 0 bytes .../ui-bg_gloss-wave_50_6eac2c_500x100.png | Bin 4256 -> 0 bytes .../ui-bg_gloss-wave_75_2191c0_500x100.png | Bin 3457 -> 0 bytes .../ui-bg_inset-hard_100_fcfdfd_1x100.png | Bin 88 -> 0 bytes .../images/ui-icons_0078ae_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_056b93_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_d8e7f3_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_e0fdff_256x240.png | Bin 5355 -> 0 bytes .../images/ui-icons_f5e175_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_f7a50d_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_fcd113_256x240.png | Bin 4369 -> 0 bytes .../science_ation/jquery-ui-1.7.2.custom.css | 406 - theme/science_ation/sfiab.css | 548 - theme/science_ation/theme-script.js | 5 - theme/science_ation/theme.php | 27 - timeslots.inc.php | 101 + tours.class.php | 155 - translationseditor.inc.php | 45 - translationseditor.js.php | 66 - updates/.htaccess | 2 + updates/1.sql | 31 + updates/11.php | 9 + updates/12.sql | 4 + updates/13.sql | 2 + updates/14.sql | 10 + updates/15.php | 25 + updates/16.php | 26 + updates/16.sql | 24 + updates/17.sql | 17 + updates/18.sql | 20 + updates/19.sql | 5 + updates/20.sql | 9 + updates/21.sql | 16 + updates/22.sql | 1 + updates/23.sql | 3 + updates/24.sql | 6 + updates/25.sql | 11 + updates/26.sql | 8 + updates/27.sql | 1 + updates/28.sql | 1 + updates/29.sql | 5 + updates/3.sql | 4 + updates/30.sql | 30 + updates/31.sql | 37 + updates/33.sql | 2 + updates/34.sql | 4 + updates/35.sql | 8 + updates/36.sql | 9 + updates/37.sql | 1 + updates/38.sql | 2 + updates/39.sql | 7 + updates/40.sql | 36 + updates/41.sql | 3 + updates/42.sql | 4 + updates/43.sql | 3 + updates/44.sql | 6 + updates/45.sql | 1 + updates/46.sql | 2 + updates/47.sql | 4 + updates/48.sql | 3 + updates/49.php | 46 + updates/49.sql | 7 + updates/5.sql | 40 + updates/50.sql | 3 + updates/db_version.txt | 1 + updates/full_16.sql.gz | Bin 0 -> 13106 bytes user.inc.php | 1540 +- user_activate.php | 192 - user_invite.php | 254 - user_login.php | 436 - user_multirole.php | 151 - user_new.php | 273 - user_page.inc.php | 90 - user_password.php | 119 - user_personal.php | 404 - v_main.php | 135 + v_options.php | 67 + v_personal.php | 102 + v_tours.php | 143 + version.txt | 1 - volunteer.inc.php | 56 - volunteer_main.php | 82 - volunteer_position.php | 167 - winners.php | 315 - xml.inc.php | 155 + 1774 files changed, 168116 insertions(+), 166544 deletions(-) delete mode 100644 .htaccess create mode 100644 PHPMailer/.htaccess create mode 100644 PHPMailer/LICENSE create mode 100644 PHPMailer/PHPMailerAutoload.php create mode 100644 PHPMailer/README.md create mode 100644 PHPMailer/changelog.md create mode 100644 PHPMailer/class.phpmailer.php create mode 100644 PHPMailer/class.pop3.php create mode 100644 PHPMailer/class.smtp.php create mode 100644 PHPMailer/composer.json create mode 100644 PHPMailer/docs/Callback_function_notes.txt create mode 100644 PHPMailer/docs/DomainKeys_notes.txt create mode 100644 PHPMailer/docs/Note_for_SMTP_debugging.txt create mode 100644 PHPMailer/docs/extending.html create mode 100644 PHPMailer/docs/faq.html create mode 100755 PHPMailer/docs/generatedocs.sh create mode 100644 PHPMailer/docs/pop3_article.txt create mode 100644 PHPMailer/examples/LGPLv3.txt create mode 100644 PHPMailer/examples/code_generator.phps create mode 100644 PHPMailer/examples/contents.html create mode 100644 PHPMailer/examples/exceptions.phps create mode 100644 PHPMailer/examples/gmail.phps create mode 100644 PHPMailer/examples/images/phpmailer.png create mode 100644 PHPMailer/examples/images/phpmailer_mini.gif create mode 100644 PHPMailer/examples/index.html create mode 100644 PHPMailer/examples/mail.phps create mode 100644 PHPMailer/examples/mailing_list.phps create mode 100644 PHPMailer/examples/pop_before_smtp.phps create mode 100755 PHPMailer/examples/scripts/XRegExp.js create mode 100644 PHPMailer/examples/scripts/shAutoloader.js create mode 100644 PHPMailer/examples/scripts/shBrushPhp.js create mode 100644 PHPMailer/examples/scripts/shCore.js create mode 100644 PHPMailer/examples/scripts/shLegacy.js create mode 100644 PHPMailer/examples/sendmail.phps create mode 100644 PHPMailer/examples/smtp.phps create mode 100644 PHPMailer/examples/smtp_no_auth.phps create mode 100644 PHPMailer/examples/styles/shCore.css create mode 100644 PHPMailer/examples/styles/shCoreDefault.css create mode 100644 PHPMailer/examples/styles/shCoreDjango.css create mode 100644 PHPMailer/examples/styles/shCoreEclipse.css create mode 100644 PHPMailer/examples/styles/shCoreEmacs.css create mode 100644 PHPMailer/examples/styles/shCoreFadeToGrey.css create mode 100644 PHPMailer/examples/styles/shCoreMDUltra.css create mode 100644 PHPMailer/examples/styles/shCoreMidnight.css create mode 100644 PHPMailer/examples/styles/shCoreRDark.css create mode 100644 PHPMailer/examples/styles/shThemeAppleScript.css create mode 100644 PHPMailer/examples/styles/shThemeDefault.css create mode 100644 PHPMailer/examples/styles/shThemeDjango.css create mode 100644 PHPMailer/examples/styles/shThemeEclipse.css create mode 100644 PHPMailer/examples/styles/shThemeEmacs.css create mode 100644 PHPMailer/examples/styles/shThemeFadeToGrey.css create mode 100644 PHPMailer/examples/styles/shThemeMDUltra.css create mode 100644 PHPMailer/examples/styles/shThemeMidnight.css create mode 100644 PHPMailer/examples/styles/shThemeRDark.css create mode 100644 PHPMailer/examples/styles/shThemeVisualStudio.css create mode 100644 PHPMailer/examples/styles/wrapping.png create mode 100644 PHPMailer/extras/EasyPeasyICS.php create mode 100644 PHPMailer/extras/class.html2text.php create mode 100644 PHPMailer/extras/htmlfilter.php create mode 100644 PHPMailer/extras/ntlm_sasl_client.php create mode 100644 PHPMailer/language/phpmailer.lang-ar.php create mode 100644 PHPMailer/language/phpmailer.lang-be.php create mode 100644 PHPMailer/language/phpmailer.lang-br.php create mode 100644 PHPMailer/language/phpmailer.lang-ca.php create mode 100644 PHPMailer/language/phpmailer.lang-ch.php create mode 100644 PHPMailer/language/phpmailer.lang-cz.php create mode 100644 PHPMailer/language/phpmailer.lang-de.php create mode 100644 PHPMailer/language/phpmailer.lang-dk.php create mode 100644 PHPMailer/language/phpmailer.lang-eo.php create mode 100644 PHPMailer/language/phpmailer.lang-es.php create mode 100644 PHPMailer/language/phpmailer.lang-et.php create mode 100644 PHPMailer/language/phpmailer.lang-fa.php create mode 100644 PHPMailer/language/phpmailer.lang-fi.php create mode 100644 PHPMailer/language/phpmailer.lang-fo.php create mode 100644 PHPMailer/language/phpmailer.lang-fr.php create mode 100644 PHPMailer/language/phpmailer.lang-gl.php create mode 100644 PHPMailer/language/phpmailer.lang-he.php create mode 100644 PHPMailer/language/phpmailer.lang-hu.php create mode 100644 PHPMailer/language/phpmailer.lang-it.php create mode 100644 PHPMailer/language/phpmailer.lang-ja.php create mode 100644 PHPMailer/language/phpmailer.lang-lt.php create mode 100644 PHPMailer/language/phpmailer.lang-lv.php create mode 100644 PHPMailer/language/phpmailer.lang-nl.php create mode 100644 PHPMailer/language/phpmailer.lang-no.php create mode 100644 PHPMailer/language/phpmailer.lang-pl.php create mode 100644 PHPMailer/language/phpmailer.lang-ro.php create mode 100644 PHPMailer/language/phpmailer.lang-ru.php create mode 100644 PHPMailer/language/phpmailer.lang-se.php create mode 100644 PHPMailer/language/phpmailer.lang-sk.php create mode 100644 PHPMailer/language/phpmailer.lang-tr.php create mode 100644 PHPMailer/language/phpmailer.lang-uk.php create mode 100644 PHPMailer/language/phpmailer.lang-zh.php create mode 100644 PHPMailer/language/phpmailer.lang-zh_cn.php create mode 100755 PHPMailer/test/fakepopserver.sh create mode 100755 PHPMailer/test/fakesendmail.sh create mode 100644 PHPMailer/test/phpmailerLangTest.php create mode 100644 PHPMailer/test/phpmailerTest.php create mode 100755 PHPMailer/test/runfakepopserver.sh create mode 100644 PHPMailer/test/test_callback.php create mode 100644 PHPMailer/test/testbootstrap-dist.php create mode 100644 README.md create mode 100644 a_change_password.php create mode 100644 a_delete_account.php delete mode 100644 admin/anneal.inc.php delete mode 100644 admin/award_awardcreatedivisional.php delete mode 100644 admin/award_awards.php delete mode 100644 admin/award_download.php delete mode 100644 admin/award_upload.php delete mode 100644 admin/awards.inc.php delete mode 100644 admin/awards.php delete mode 100644 admin/cms.php delete mode 100644 admin/committees.php delete mode 100644 admin/communication.inc.php delete mode 100644 admin/communication.php delete mode 100644 admin/communication_send_status.php delete mode 100644 admin/curl.inc.php delete mode 100644 admin/cwsfregister.php delete mode 100644 admin/documentdownloader.php delete mode 100644 admin/documents.php delete mode 100644 admin/donations.php delete mode 100644 admin/donors.php delete mode 100644 admin/donors_search.php delete mode 100644 admin/exhibithall_sa.php delete mode 100644 admin/export_checkin.php delete mode 100644 admin/fair_stats.php delete mode 100644 admin/fair_stats_select.php delete mode 100644 admin/fix_judges_autocomplete.php delete mode 100644 admin/fundraising.php delete mode 100644 admin/fundraising_campaigns.php delete mode 100644 admin/fundraising_campaigns_prospecting.php delete mode 100644 admin/fundraising_common.inc.php delete mode 100644 admin/fundraising_goals_handler.inc.php delete mode 100644 admin/fundraising_main.inc.php delete mode 100644 admin/fundraising_reports.php delete mode 100644 admin/fundraising_reports_std.php delete mode 100644 admin/fundraising_setup.php delete mode 100644 admin/fundraising_sponsorship.php delete mode 100644 admin/fundraising_sponsorship_handler.inc.php delete mode 100644 admin/fundraising_types.php delete mode 100644 admin/gettranslation.php delete mode 100644 admin/index.php delete mode 100644 admin/judges.inc.php delete mode 100644 admin/judges.php delete mode 100644 admin/judges_info.php delete mode 100644 admin/judges_invite.php delete mode 100644 admin/judges_jdiv.php delete mode 100644 admin/judges_sa.php delete mode 100644 admin/judges_sa_launcher.php delete mode 100644 admin/judges_sa_launcher_apache.php delete mode 100644 admin/judges_scheduler_status.php delete mode 100644 admin/judges_scheduler_status_output.php delete mode 100644 admin/judges_schedulerconfig.php delete mode 100644 admin/judges_schedulerconfig_check.inc.php delete mode 100644 admin/judges_teams.php delete mode 100644 admin/judges_teams_members.php delete mode 100644 admin/judges_teams_projects.php delete mode 100644 admin/judges_teams_timeslots.php delete mode 100644 admin/judges_timeslots.php delete mode 100644 admin/judging_score_edit.php delete mode 100644 admin/judging_score_entry.php delete mode 100644 admin/project_editor.php delete mode 100644 admin/regfee_items_manager.php delete mode 100644 admin/registration.php delete mode 100644 admin/registration_list.php delete mode 100644 admin/registration_receivedforms.php delete mode 100644 admin/registration_stats.php delete mode 100644 admin/registration_webconsent.php delete mode 100644 admin/reports.inc.php delete mode 100644 admin/reports.php delete mode 100644 admin/reports_acscript.php delete mode 100644 admin/reports_appeal_letters.php delete mode 100644 admin/reports_awards.inc.php delete mode 100644 admin/reports_ceremony.php delete mode 100644 admin/reports_committees.inc.php delete mode 100644 admin/reports_editor.php delete mode 100644 admin/reports_fairs.inc.php delete mode 100644 admin/reports_fundraising.inc.php delete mode 100644 admin/reports_gen.php delete mode 100644 admin/reports_judges.inc.php delete mode 100644 admin/reports_judges.php delete mode 100644 admin/reports_judges_allyears.php delete mode 100644 admin/reports_judges_teams_projects.php delete mode 100644 admin/reports_mailinglabels.php delete mode 100644 admin/reports_mailinglabels_generator.php delete mode 100644 admin/reports_old.php delete mode 100644 admin/reports_program_awards.php delete mode 100644 admin/reports_projects_details.php delete mode 100644 admin/reports_projects_judges_teams.php delete mode 100644 admin/reports_schools.inc.php delete mode 100644 admin/reports_students.inc.php delete mode 100644 admin/reports_tours.inc.php delete mode 100644 admin/reports_volunteers.inc.php delete mode 100644 admin/rerollprizes.php delete mode 100644 admin/schools.php delete mode 100644 admin/schoolsimport.php delete mode 100644 admin/sciencefairs.php delete mode 100644 admin/send_emailqueue.php delete mode 100644 admin/settranslation.php delete mode 100644 admin/sponsor_contacts.php delete mode 100644 admin/stats.inc.php delete mode 100644 admin/student_editor.php delete mode 100644 admin/tours.php delete mode 100644 admin/tours_assignments.php delete mode 100644 admin/tours_manager.php delete mode 100644 admin/tours_sa.php delete mode 100644 admin/tours_sa_config.php delete mode 100644 admin/tours_sa_status.php delete mode 100644 admin/translations.php delete mode 100644 admin/user_editor_window.php delete mode 100644 admin/user_list.php delete mode 100644 admin/volunteer_positions_manager.php delete mode 100644 admin/volunteers.php delete mode 100644 admin/winners.php delete mode 100644 admin/xml.inc.php delete mode 100644 ajax.inc.php delete mode 100644 app/projectinfo.php delete mode 100644 app/projectlist.php delete mode 100644 app/projects.php create mode 100644 awards.inc.php create mode 100644 c_assign_project_numbers.php create mode 100644 c_award_cwsf.php create mode 100644 c_award_upload.php create mode 100644 c_award_winners.php create mode 100644 c_awards.php create mode 100644 c_awards_edit.php create mode 100644 c_awards_list.php create mode 100644 c_backup.php create mode 100644 c_check_tours.php create mode 100644 c_checkin.php create mode 100644 c_communication.php create mode 100644 c_communication_queue.php create mode 100644 c_communication_send.php create mode 100644 c_config.php create mode 100644 c_config_categories.php create mode 100644 c_config_challenges.php create mode 100644 c_config_cms.php create mode 100644 c_config_fairs.php create mode 100644 c_config_logo.php create mode 100644 c_config_schools.php create mode 100644 c_config_variables.php create mode 100644 c_conv_db.php create mode 100644 c_exhibithall.php create mode 100644 c_fairs.php create mode 100644 c_input_ethics.php create mode 100644 c_input_signature_forms.php create mode 100644 c_jteam_edit.php create mode 100644 c_jteam_edit_jteam.php create mode 100644 c_judge_sanity.php create mode 100644 c_judge_scheduler.php create mode 100644 c_judge_score_entry.php create mode 100644 c_judge_score_summary.php create mode 100644 c_judging.php create mode 100644 c_judging_list.php create mode 100644 c_main.php create mode 100644 c_register_feeder.php create mode 100644 c_reports.php create mode 100644 c_reports_edit.php create mode 100644 c_rollover.php create mode 100644 c_stats.php create mode 100644 c_students.php create mode 100644 c_timeslots.php create mode 100644 c_tours.php create mode 100644 c_tours_edit.php create mode 100644 c_update.php create mode 100644 c_user_edit.php create mode 100644 c_user_list.php create mode 100644 c_visit_list.php create mode 100644 c_volunteers.php create mode 100644 c_volunteers_list.php create mode 100644 c_ysc_stats.php create mode 100644 changes.html delete mode 100644 cms.php delete mode 100644 committee.inc.php create mode 100644 committee/.htaccess create mode 100644 committee/email_lists.inc.php create mode 100644 committee/exhibithall.inc.php create mode 100644 committee/judges.inc.php create mode 100644 committee/students.inc.php create mode 100644 committee/volunteers.inc.php delete mode 100644 committee_main.php delete mode 100644 committees.php delete mode 100644 config.inc.php.template delete mode 100644 config/award_sources.php delete mode 100644 config/backuprestore.php delete mode 100644 config/categories.php delete mode 100644 config/dates.php delete mode 100644 config/divisions.php delete mode 100644 config/divisions_cwsf.php delete mode 100644 config/images.php delete mode 100644 config/index.php delete mode 100644 config/judges_questions.php delete mode 100644 config/languagepacks.php delete mode 100644 config/pagetexts.php delete mode 100644 config/rollover.php delete mode 100644 config/rolloverfiscal.php delete mode 100644 config/safetyquestions.php delete mode 100644 config/signaturepage.php delete mode 100644 config/signaturepage_or_permissionform.php delete mode 100644 config/subdivisions.php delete mode 100644 config/variables.php delete mode 100644 config/versionchecker.php delete mode 100644 config_editor.inc.php delete mode 100644 confirmed_participants.php delete mode 100644 contact.php create mode 100644 csv.inc.php delete mode 100644 csvimport.inc.php create mode 100644 curl.inc.php create mode 100644 data/.htaccess create mode 100644 db.inc.php delete mode 100644 db/FILES delete mode 100644 db/db.code.version.txt delete mode 100644 db/db.full.11.sql delete mode 100644 db/db.full.12.sql delete mode 100644 db/db.full.13.sql delete mode 100644 db/db.full.148.sql delete mode 100644 db/db.full.16.sql delete mode 100644 db/db.full.17.sql delete mode 100644 db/db.full.18.sql delete mode 100644 db/db.full.22.sql delete mode 100644 db/db.full.52.sql delete mode 100644 db/db.full.6.sql delete mode 100644 db/db.full.7.sql delete mode 100644 db/db.full.8.sql delete mode 100644 db/db.full.9.sql delete mode 100644 db/db.update.1.sql delete mode 100644 db/db.update.10.sql delete mode 100644 db/db.update.100.sql delete mode 100644 db/db.update.101.sql delete mode 100644 db/db.update.102.sql delete mode 100644 db/db.update.103.sql delete mode 100644 db/db.update.104.sql delete mode 100644 db/db.update.105.sql delete mode 100644 db/db.update.106.sql delete mode 100644 db/db.update.107.sql delete mode 100644 db/db.update.108.sql delete mode 100644 db/db.update.109.sql delete mode 100644 db/db.update.11.sql delete mode 100644 db/db.update.110.sql delete mode 100644 db/db.update.111.php delete mode 100644 db/db.update.111.sql delete mode 100644 db/db.update.112.sql delete mode 100644 db/db.update.113.sql delete mode 100644 db/db.update.114.sql delete mode 100644 db/db.update.115.sql delete mode 100644 db/db.update.116.php delete mode 100644 db/db.update.116.sql delete mode 100644 db/db.update.117.php delete mode 100644 db/db.update.117.sql delete mode 100644 db/db.update.118.php delete mode 100644 db/db.update.118.sql delete mode 100644 db/db.update.119.sql delete mode 100644 db/db.update.12.sql delete mode 100644 db/db.update.120.sql delete mode 100644 db/db.update.121.sql delete mode 100644 db/db.update.122.php delete mode 100644 db/db.update.122.sql delete mode 100644 db/db.update.123.sql delete mode 100644 db/db.update.124.sql delete mode 100644 db/db.update.125.sql delete mode 100644 db/db.update.126.sql delete mode 100644 db/db.update.127.sql delete mode 100644 db/db.update.128.sql delete mode 100644 db/db.update.129.php delete mode 100644 db/db.update.129.sql delete mode 100644 db/db.update.129.user.inc.php delete mode 100644 db/db.update.13.sql delete mode 100644 db/db.update.130.sql delete mode 100644 db/db.update.131.php delete mode 100644 db/db.update.131.sql delete mode 100644 db/db.update.132.sql delete mode 100644 db/db.update.133.sql delete mode 100644 db/db.update.134.sql delete mode 100644 db/db.update.135.sql delete mode 100644 db/db.update.136.php delete mode 100644 db/db.update.136.sql delete mode 100644 db/db.update.137.sql delete mode 100644 db/db.update.138.sql delete mode 100644 db/db.update.139.sql delete mode 100644 db/db.update.14.sql delete mode 100644 db/db.update.140.sql delete mode 100644 db/db.update.141.sql delete mode 100644 db/db.update.142.php delete mode 100644 db/db.update.142.sql delete mode 100644 db/db.update.143.sql delete mode 100644 db/db.update.144.sql delete mode 100644 db/db.update.145.sql delete mode 100644 db/db.update.146.php delete mode 100644 db/db.update.146.sql delete mode 100644 db/db.update.146.user.inc.php delete mode 100644 db/db.update.147.sql delete mode 100644 db/db.update.148.sql delete mode 100644 db/db.update.149.php delete mode 100644 db/db.update.149.sql delete mode 100644 db/db.update.149.user.inc.php delete mode 100644 db/db.update.15.sql delete mode 100644 db/db.update.150.sql delete mode 100644 db/db.update.151.sql delete mode 100644 db/db.update.152.sql delete mode 100644 db/db.update.153.sql delete mode 100644 db/db.update.154.sql delete mode 100644 db/db.update.155.php delete mode 100644 db/db.update.155.sql delete mode 100644 db/db.update.156.sql delete mode 100644 db/db.update.157.sql delete mode 100644 db/db.update.158.sql delete mode 100644 db/db.update.159.sql delete mode 100644 db/db.update.16.sql delete mode 100644 db/db.update.160.sql delete mode 100644 db/db.update.161.sql delete mode 100644 db/db.update.162.sql delete mode 100644 db/db.update.163.sql delete mode 100644 db/db.update.164.sql delete mode 100644 db/db.update.165.sql delete mode 100644 db/db.update.166.sql delete mode 100644 db/db.update.167.sql delete mode 100644 db/db.update.168.sql delete mode 100644 db/db.update.169.sql delete mode 100644 db/db.update.17.sql delete mode 100644 db/db.update.170.sql delete mode 100644 db/db.update.171.sql delete mode 100644 db/db.update.172.sql delete mode 100644 db/db.update.173.sql delete mode 100644 db/db.update.174.php delete mode 100644 db/db.update.175.sql delete mode 100644 db/db.update.176.sql delete mode 100644 db/db.update.177.sql delete mode 100644 db/db.update.178.sql delete mode 100644 db/db.update.179.sql delete mode 100644 db/db.update.18.sql delete mode 100644 db/db.update.19.sql delete mode 100644 db/db.update.2.sql delete mode 100644 db/db.update.20.sql delete mode 100644 db/db.update.21.sql delete mode 100644 db/db.update.22.sql delete mode 100644 db/db.update.23.sql delete mode 100644 db/db.update.24.sql delete mode 100644 db/db.update.25.sql delete mode 100644 db/db.update.26.sql delete mode 100644 db/db.update.27.sql delete mode 100644 db/db.update.28.sql delete mode 100644 db/db.update.29.sql delete mode 100644 db/db.update.3.sql delete mode 100644 db/db.update.30.sql delete mode 100644 db/db.update.31.sql delete mode 100644 db/db.update.32.sql delete mode 100644 db/db.update.33.sql delete mode 100644 db/db.update.34.sql delete mode 100644 db/db.update.35.sql delete mode 100644 db/db.update.36.sql delete mode 100644 db/db.update.37.sql delete mode 100644 db/db.update.38.sql delete mode 100644 db/db.update.39.sql delete mode 100644 db/db.update.4.sql delete mode 100644 db/db.update.40.sql delete mode 100644 db/db.update.41.sql delete mode 100644 db/db.update.42.sql delete mode 100644 db/db.update.43.sql delete mode 100644 db/db.update.44.sql delete mode 100644 db/db.update.45.sql delete mode 100644 db/db.update.46.sql delete mode 100644 db/db.update.47.sql delete mode 100644 db/db.update.48.sql delete mode 100644 db/db.update.49.sql delete mode 100644 db/db.update.5.sql delete mode 100644 db/db.update.50.sql delete mode 100644 db/db.update.51.sql delete mode 100644 db/db.update.52.sql delete mode 100644 db/db.update.53.sql delete mode 100644 db/db.update.54.sql delete mode 100644 db/db.update.55.sql delete mode 100644 db/db.update.56.sql delete mode 100644 db/db.update.57.sql delete mode 100644 db/db.update.58.sql delete mode 100644 db/db.update.59.sql delete mode 100644 db/db.update.6.sql delete mode 100644 db/db.update.60.sql delete mode 100644 db/db.update.61.sql delete mode 100644 db/db.update.62.php delete mode 100644 db/db.update.62.sql delete mode 100644 db/db.update.63.sql delete mode 100644 db/db.update.64.sql delete mode 100644 db/db.update.65.sql delete mode 100644 db/db.update.66.sql delete mode 100644 db/db.update.67.sql delete mode 100644 db/db.update.68.sql delete mode 100644 db/db.update.69.sql delete mode 100644 db/db.update.7.sql delete mode 100644 db/db.update.70.sql delete mode 100644 db/db.update.71.sql delete mode 100644 db/db.update.72.sql delete mode 100644 db/db.update.73.sql delete mode 100644 db/db.update.74.sql delete mode 100644 db/db.update.75.php delete mode 100644 db/db.update.75.sql delete mode 100644 db/db.update.76.php delete mode 100644 db/db.update.77.sql delete mode 100644 db/db.update.78.sql delete mode 100644 db/db.update.79.sql delete mode 100644 db/db.update.8.sql delete mode 100644 db/db.update.80.sql delete mode 100644 db/db.update.81.php delete mode 100644 db/db.update.81.sql delete mode 100644 db/db.update.82.sql delete mode 100644 db/db.update.83.sql delete mode 100644 db/db.update.84.sql delete mode 100644 db/db.update.85.sql delete mode 100644 db/db.update.86.sql delete mode 100644 db/db.update.87.php delete mode 100644 db/db.update.87.sql delete mode 100644 db/db.update.88.sql delete mode 100644 db/db.update.89.sql delete mode 100644 db/db.update.9.sql delete mode 100644 db/db.update.90.sql delete mode 100644 db/db.update.91.sql delete mode 100644 db/db.update.92.sql delete mode 100644 db/db.update.93.sql delete mode 100644 db/db.update.94.sql delete mode 100644 db/db.update.95.sql delete mode 100644 db/db.update.96.sql delete mode 100644 db/db.update.97.sql delete mode 100644 db/db.update.98.sql delete mode 100644 db/db.update.99.sql delete mode 100644 db/db.update.999.sql delete mode 100644 db/db_update.php create mode 100644 debug.inc.php create mode 100644 email.inc.php delete mode 100644 fair.inc.php delete mode 100644 fair_additional_materials.inc.php delete mode 100644 fair_info.php delete mode 100644 fair_main.php delete mode 100644 fair_stats.php create mode 100644 fairs.inc.php delete mode 100644 fckeditor/_documentation.html delete mode 100644 fckeditor/_upgrade.html delete mode 100644 fckeditor/_whatsnew.html delete mode 100644 fckeditor/_whatsnew_history.html delete mode 100644 fckeditor/editor/_source/classes/fckcontextmenu.js delete mode 100644 fckeditor/editor/_source/classes/fckdataprocessor.js delete mode 100644 fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js delete mode 100644 fckeditor/editor/_source/classes/fckdocumentfragment_ie.js delete mode 100644 fckeditor/editor/_source/classes/fckdomrange.js delete mode 100644 fckeditor/editor/_source/classes/fckdomrange_gecko.js delete mode 100644 fckeditor/editor/_source/classes/fckdomrange_ie.js delete mode 100644 fckeditor/editor/_source/classes/fckdomrangeiterator.js delete mode 100644 fckeditor/editor/_source/classes/fckeditingarea.js delete mode 100644 fckeditor/editor/_source/classes/fckelementpath.js delete mode 100644 fckeditor/editor/_source/classes/fckenterkey.js delete mode 100644 fckeditor/editor/_source/classes/fckevents.js delete mode 100644 fckeditor/editor/_source/classes/fckhtmliterator.js delete mode 100644 fckeditor/editor/_source/classes/fckicon.js delete mode 100644 fckeditor/editor/_source/classes/fckiecleanup.js delete mode 100644 fckeditor/editor/_source/classes/fckimagepreloader.js delete mode 100644 fckeditor/editor/_source/classes/fckkeystrokehandler.js delete mode 100644 fckeditor/editor/_source/classes/fckmenublock.js delete mode 100644 fckeditor/editor/_source/classes/fckmenublockpanel.js delete mode 100644 fckeditor/editor/_source/classes/fckmenuitem.js delete mode 100644 fckeditor/editor/_source/classes/fckpanel.js delete mode 100644 fckeditor/editor/_source/classes/fckplugin.js delete mode 100644 fckeditor/editor/_source/classes/fckspecialcombo.js delete mode 100644 fckeditor/editor/_source/classes/fckstyle.js delete mode 100644 fckeditor/editor/_source/classes/fcktoolbar.js delete mode 100644 fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js delete mode 100644 fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js delete mode 100644 fckeditor/editor/_source/classes/fcktoolbarbutton.js delete mode 100644 fckeditor/editor/_source/classes/fcktoolbarbuttonui.js delete mode 100644 fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js delete mode 100644 fckeditor/editor/_source/classes/fcktoolbarfontscombo.js delete mode 100644 fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js delete mode 100644 fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js delete mode 100644 fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js delete mode 100644 fckeditor/editor/_source/classes/fcktoolbarstylecombo.js delete mode 100644 fckeditor/editor/_source/classes/fckw3crange.js delete mode 100644 fckeditor/editor/_source/classes/fckxml.js delete mode 100644 fckeditor/editor/_source/classes/fckxml_gecko.js delete mode 100644 fckeditor/editor/_source/classes/fckxml_ie.js delete mode 100644 fckeditor/editor/_source/commandclasses/fck_othercommands.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckblockquotecommand.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckcorestylecommand.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckfitwindow.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckindentcommands.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckjustifycommands.js delete mode 100644 fckeditor/editor/_source/commandclasses/fcklistcommands.js delete mode 100644 fckeditor/editor/_source/commandclasses/fcknamedcommand.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckpastewordcommand.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckremoveformatcommand.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckshowblocks.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js delete mode 100644 fckeditor/editor/_source/commandclasses/fckstylecommand.js delete mode 100644 fckeditor/editor/_source/commandclasses/fcktablecommand.js delete mode 100644 fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js delete mode 100644 fckeditor/editor/_source/fckconstants.js delete mode 100644 fckeditor/editor/_source/fckeditorapi.js delete mode 100644 fckeditor/editor/_source/fckjscoreextensions.js delete mode 100644 fckeditor/editor/_source/fckscriptloader.js delete mode 100644 fckeditor/editor/_source/internals/fck.js delete mode 100644 fckeditor/editor/_source/internals/fck_contextmenu.js delete mode 100644 fckeditor/editor/_source/internals/fck_gecko.js delete mode 100644 fckeditor/editor/_source/internals/fck_ie.js delete mode 100644 fckeditor/editor/_source/internals/fckbrowserinfo.js delete mode 100644 fckeditor/editor/_source/internals/fckcodeformatter.js delete mode 100644 fckeditor/editor/_source/internals/fckcommands.js delete mode 100644 fckeditor/editor/_source/internals/fckconfig.js delete mode 100644 fckeditor/editor/_source/internals/fckdebug.js delete mode 100644 fckeditor/editor/_source/internals/fckdebug_empty.js delete mode 100644 fckeditor/editor/_source/internals/fckdialog.js delete mode 100644 fckeditor/editor/_source/internals/fckdocumentprocessor.js delete mode 100644 fckeditor/editor/_source/internals/fckdomtools.js delete mode 100644 fckeditor/editor/_source/internals/fcklanguagemanager.js delete mode 100644 fckeditor/editor/_source/internals/fcklisthandler.js delete mode 100644 fckeditor/editor/_source/internals/fcklistslib.js delete mode 100644 fckeditor/editor/_source/internals/fckplugins.js delete mode 100644 fckeditor/editor/_source/internals/fckregexlib.js delete mode 100644 fckeditor/editor/_source/internals/fckselection.js delete mode 100644 fckeditor/editor/_source/internals/fckselection_gecko.js delete mode 100644 fckeditor/editor/_source/internals/fckselection_ie.js delete mode 100644 fckeditor/editor/_source/internals/fckstyles.js delete mode 100644 fckeditor/editor/_source/internals/fcktablehandler.js delete mode 100644 fckeditor/editor/_source/internals/fcktablehandler_gecko.js delete mode 100644 fckeditor/editor/_source/internals/fcktablehandler_ie.js delete mode 100644 fckeditor/editor/_source/internals/fcktoolbaritems.js delete mode 100644 fckeditor/editor/_source/internals/fcktoolbarset.js delete mode 100644 fckeditor/editor/_source/internals/fcktools.js delete mode 100644 fckeditor/editor/_source/internals/fcktools_gecko.js delete mode 100644 fckeditor/editor/_source/internals/fcktools_ie.js delete mode 100644 fckeditor/editor/_source/internals/fckundo.js delete mode 100644 fckeditor/editor/_source/internals/fckurlparams.js delete mode 100644 fckeditor/editor/_source/internals/fckxhtml.js delete mode 100644 fckeditor/editor/_source/internals/fckxhtml_gecko.js delete mode 100644 fckeditor/editor/_source/internals/fckxhtml_ie.js delete mode 100644 fckeditor/editor/_source/internals/fckxhtmlentities.js delete mode 100644 fckeditor/editor/css/behaviors/disablehandles.htc delete mode 100644 fckeditor/editor/css/behaviors/showtableborders.htc delete mode 100644 fckeditor/editor/css/fck_editorarea.css delete mode 100644 fckeditor/editor/css/fck_internal.css delete mode 100644 fckeditor/editor/css/fck_showtableborders_gecko.css delete mode 100644 fckeditor/editor/css/images/block_address.png delete mode 100644 fckeditor/editor/css/images/block_blockquote.png delete mode 100644 fckeditor/editor/css/images/block_div.png delete mode 100644 fckeditor/editor/css/images/block_h1.png delete mode 100644 fckeditor/editor/css/images/block_h2.png delete mode 100644 fckeditor/editor/css/images/block_h3.png delete mode 100644 fckeditor/editor/css/images/block_h4.png delete mode 100644 fckeditor/editor/css/images/block_h5.png delete mode 100644 fckeditor/editor/css/images/block_h6.png delete mode 100644 fckeditor/editor/css/images/block_p.png delete mode 100644 fckeditor/editor/css/images/block_pre.png delete mode 100644 fckeditor/editor/css/images/fck_anchor.gif delete mode 100644 fckeditor/editor/css/images/fck_flashlogo.gif delete mode 100644 fckeditor/editor/css/images/fck_hiddenfield.gif delete mode 100644 fckeditor/editor/css/images/fck_pagebreak.gif delete mode 100644 fckeditor/editor/css/images/fck_plugin.gif delete mode 100644 fckeditor/editor/dialog/common/fck_dialog_common.css delete mode 100644 fckeditor/editor/dialog/common/fck_dialog_common.js delete mode 100644 fckeditor/editor/dialog/common/images/locked.gif delete mode 100644 fckeditor/editor/dialog/common/images/reset.gif delete mode 100644 fckeditor/editor/dialog/common/images/unlocked.gif delete mode 100644 fckeditor/editor/dialog/fck_about.html delete mode 100644 fckeditor/editor/dialog/fck_about/logo_fckeditor.gif delete mode 100644 fckeditor/editor/dialog/fck_about/logo_fredck.gif delete mode 100644 fckeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gif delete mode 100644 fckeditor/editor/dialog/fck_anchor.html delete mode 100644 fckeditor/editor/dialog/fck_button.html delete mode 100644 fckeditor/editor/dialog/fck_checkbox.html delete mode 100644 fckeditor/editor/dialog/fck_colorselector.html delete mode 100644 fckeditor/editor/dialog/fck_div.html delete mode 100644 fckeditor/editor/dialog/fck_docprops.html delete mode 100644 fckeditor/editor/dialog/fck_docprops/fck_document_preview.html delete mode 100644 fckeditor/editor/dialog/fck_flash.html delete mode 100644 fckeditor/editor/dialog/fck_flash/fck_flash.js delete mode 100644 fckeditor/editor/dialog/fck_flash/fck_flash_preview.html delete mode 100644 fckeditor/editor/dialog/fck_form.html delete mode 100644 fckeditor/editor/dialog/fck_hiddenfield.html delete mode 100644 fckeditor/editor/dialog/fck_image.html delete mode 100644 fckeditor/editor/dialog/fck_image/fck_image.js delete mode 100644 fckeditor/editor/dialog/fck_image/fck_image_preview.html delete mode 100644 fckeditor/editor/dialog/fck_link.html delete mode 100644 fckeditor/editor/dialog/fck_link/fck_link.js delete mode 100644 fckeditor/editor/dialog/fck_listprop.html delete mode 100644 fckeditor/editor/dialog/fck_paste.html delete mode 100644 fckeditor/editor/dialog/fck_radiobutton.html delete mode 100644 fckeditor/editor/dialog/fck_replace.html delete mode 100644 fckeditor/editor/dialog/fck_select.html delete mode 100644 fckeditor/editor/dialog/fck_select/fck_select.js delete mode 100644 fckeditor/editor/dialog/fck_smiley.html delete mode 100644 fckeditor/editor/dialog/fck_source.html delete mode 100644 fckeditor/editor/dialog/fck_specialchar.html delete mode 100644 fckeditor/editor/dialog/fck_spellerpages.html delete mode 100644 fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html delete mode 100644 fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js delete mode 100644 fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html delete mode 100644 fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm delete mode 100644 fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php delete mode 100644 fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl delete mode 100644 fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js delete mode 100644 fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html delete mode 100644 fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css delete mode 100644 fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js delete mode 100644 fckeditor/editor/dialog/fck_table.html delete mode 100644 fckeditor/editor/dialog/fck_tablecell.html delete mode 100644 fckeditor/editor/dialog/fck_template.html delete mode 100644 fckeditor/editor/dialog/fck_template/images/template1.gif delete mode 100644 fckeditor/editor/dialog/fck_template/images/template2.gif delete mode 100644 fckeditor/editor/dialog/fck_template/images/template3.gif delete mode 100644 fckeditor/editor/dialog/fck_textarea.html delete mode 100644 fckeditor/editor/dialog/fck_textfield.html delete mode 100644 fckeditor/editor/dtd/fck_dtd_test.html delete mode 100644 fckeditor/editor/dtd/fck_xhtml10strict.js delete mode 100644 fckeditor/editor/dtd/fck_xhtml10transitional.js delete mode 100644 fckeditor/editor/fckdebug.html delete mode 100644 fckeditor/editor/fckdialog.html delete mode 100644 fckeditor/editor/fckeditor.html delete mode 100644 fckeditor/editor/fckeditor.original.html delete mode 100644 fckeditor/editor/filemanager/browser/default/browser.css delete mode 100644 fckeditor/editor/filemanager/browser/default/browser.html delete mode 100644 fckeditor/editor/filemanager/browser/default/frmactualfolder.html delete mode 100644 fckeditor/editor/filemanager/browser/default/frmcreatefolder.html delete mode 100644 fckeditor/editor/filemanager/browser/default/frmfolders.html delete mode 100644 fckeditor/editor/filemanager/browser/default/frmresourceslist.html delete mode 100644 fckeditor/editor/filemanager/browser/default/frmresourcetype.html delete mode 100644 fckeditor/editor/filemanager/browser/default/frmupload.html delete mode 100644 fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/Folder.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/Folder32.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/FolderOpened.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/FolderUp.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/ai.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/avi.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/bmp.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/cs.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/default.icon.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/gif.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/html.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/jpg.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/js.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/mdb.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/mp3.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/pdf.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/png.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/ppt.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/rdp.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/txt.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/vsd.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/xls.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/xml.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/ai.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/avi.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/bmp.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/cs.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/default.icon.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/dll.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/doc.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/exe.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/fla.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/gif.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/htm.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/html.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/jpg.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/js.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/mdb.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/mp3.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/pdf.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/png.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/ppt.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/rdp.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/swf.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/swt.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/txt.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/vsd.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/xls.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/xml.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/icons/zip.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/images/spacer.gif delete mode 100644 fckeditor/editor/filemanager/browser/default/js/common.js delete mode 100644 fckeditor/editor/filemanager/browser/default/js/fckxml.js delete mode 100644 fckeditor/editor/filemanager/connectors/asp/basexml.asp delete mode 100644 fckeditor/editor/filemanager/connectors/asp/class_upload.asp delete mode 100644 fckeditor/editor/filemanager/connectors/asp/commands.asp delete mode 100644 fckeditor/editor/filemanager/connectors/asp/config.asp delete mode 100644 fckeditor/editor/filemanager/connectors/asp/connector.asp delete mode 100644 fckeditor/editor/filemanager/connectors/asp/io.asp delete mode 100644 fckeditor/editor/filemanager/connectors/asp/upload.asp delete mode 100644 fckeditor/editor/filemanager/connectors/asp/util.asp delete mode 100644 fckeditor/editor/filemanager/connectors/aspx/config.ascx delete mode 100644 fckeditor/editor/filemanager/connectors/aspx/connector.aspx delete mode 100644 fckeditor/editor/filemanager/connectors/aspx/upload.aspx delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/config.cfm delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/connector.cfm delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/image.cfc delete mode 100644 fckeditor/editor/filemanager/connectors/cfm/upload.cfm delete mode 100644 fckeditor/editor/filemanager/connectors/lasso/config.lasso delete mode 100644 fckeditor/editor/filemanager/connectors/lasso/connector.lasso delete mode 100644 fckeditor/editor/filemanager/connectors/lasso/upload.lasso delete mode 100644 fckeditor/editor/filemanager/connectors/perl/basexml.pl delete mode 100644 fckeditor/editor/filemanager/connectors/perl/commands.pl delete mode 100644 fckeditor/editor/filemanager/connectors/perl/connector.cgi delete mode 100644 fckeditor/editor/filemanager/connectors/perl/io.pl delete mode 100644 fckeditor/editor/filemanager/connectors/perl/upload.cgi delete mode 100644 fckeditor/editor/filemanager/connectors/perl/upload_fck.pl delete mode 100644 fckeditor/editor/filemanager/connectors/perl/util.pl delete mode 100644 fckeditor/editor/filemanager/connectors/php/basexml.php delete mode 100644 fckeditor/editor/filemanager/connectors/php/commands.php delete mode 100644 fckeditor/editor/filemanager/connectors/php/config.php delete mode 100644 fckeditor/editor/filemanager/connectors/php/connector.php delete mode 100644 fckeditor/editor/filemanager/connectors/php/io.php delete mode 100644 fckeditor/editor/filemanager/connectors/php/phpcompat.php delete mode 100644 fckeditor/editor/filemanager/connectors/php/upload.php delete mode 100644 fckeditor/editor/filemanager/connectors/php/util.php delete mode 100644 fckeditor/editor/filemanager/connectors/py/config.py delete mode 100644 fckeditor/editor/filemanager/connectors/py/connector.py delete mode 100644 fckeditor/editor/filemanager/connectors/py/fckcommands.py delete mode 100644 fckeditor/editor/filemanager/connectors/py/fckconnector.py delete mode 100644 fckeditor/editor/filemanager/connectors/py/fckoutput.py delete mode 100644 fckeditor/editor/filemanager/connectors/py/fckutil.py delete mode 100644 fckeditor/editor/filemanager/connectors/py/htaccess.txt delete mode 100644 fckeditor/editor/filemanager/connectors/py/upload.py delete mode 100644 fckeditor/editor/filemanager/connectors/py/wsgi.py delete mode 100644 fckeditor/editor/filemanager/connectors/py/zope.py delete mode 100644 fckeditor/editor/filemanager/connectors/test.html delete mode 100644 fckeditor/editor/filemanager/connectors/uploadtest.html delete mode 100644 fckeditor/editor/images/anchor.gif delete mode 100644 fckeditor/editor/images/arrow_ltr.gif delete mode 100644 fckeditor/editor/images/arrow_rtl.gif delete mode 100644 fckeditor/editor/images/smiley/msn/angel_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/angry_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/broken_heart.gif delete mode 100644 fckeditor/editor/images/smiley/msn/cake.gif delete mode 100644 fckeditor/editor/images/smiley/msn/confused_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/cry_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/devil_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/embaressed_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/envelope.gif delete mode 100644 fckeditor/editor/images/smiley/msn/heart.gif delete mode 100644 fckeditor/editor/images/smiley/msn/kiss.gif delete mode 100644 fckeditor/editor/images/smiley/msn/lightbulb.gif delete mode 100644 fckeditor/editor/images/smiley/msn/omg_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/regular_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/sad_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/shades_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/teeth_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/thumbs_down.gif delete mode 100644 fckeditor/editor/images/smiley/msn/thumbs_up.gif delete mode 100644 fckeditor/editor/images/smiley/msn/tounge_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif delete mode 100644 fckeditor/editor/images/smiley/msn/wink_smile.gif delete mode 100644 fckeditor/editor/images/spacer.gif delete mode 100644 fckeditor/editor/js/fckadobeair.js delete mode 100644 fckeditor/editor/js/fckeditorcode_gecko.js delete mode 100644 fckeditor/editor/js/fckeditorcode_ie.js delete mode 100644 fckeditor/editor/lang/_translationstatus.txt delete mode 100644 fckeditor/editor/lang/af.js delete mode 100644 fckeditor/editor/lang/ar.js delete mode 100644 fckeditor/editor/lang/bg.js delete mode 100644 fckeditor/editor/lang/bn.js delete mode 100644 fckeditor/editor/lang/bs.js delete mode 100644 fckeditor/editor/lang/ca.js delete mode 100644 fckeditor/editor/lang/cs.js delete mode 100644 fckeditor/editor/lang/da.js delete mode 100644 fckeditor/editor/lang/de.js delete mode 100644 fckeditor/editor/lang/el.js delete mode 100644 fckeditor/editor/lang/en-au.js delete mode 100644 fckeditor/editor/lang/en-ca.js delete mode 100644 fckeditor/editor/lang/en-uk.js delete mode 100644 fckeditor/editor/lang/en.js delete mode 100644 fckeditor/editor/lang/eo.js delete mode 100644 fckeditor/editor/lang/es.js delete mode 100644 fckeditor/editor/lang/et.js delete mode 100644 fckeditor/editor/lang/eu.js delete mode 100644 fckeditor/editor/lang/fa.js delete mode 100644 fckeditor/editor/lang/fi.js delete mode 100644 fckeditor/editor/lang/fo.js delete mode 100644 fckeditor/editor/lang/fr-ca.js delete mode 100644 fckeditor/editor/lang/fr.js delete mode 100644 fckeditor/editor/lang/gl.js delete mode 100644 fckeditor/editor/lang/gu.js delete mode 100644 fckeditor/editor/lang/he.js delete mode 100644 fckeditor/editor/lang/hi.js delete mode 100644 fckeditor/editor/lang/hr.js delete mode 100644 fckeditor/editor/lang/hu.js delete mode 100644 fckeditor/editor/lang/it.js delete mode 100644 fckeditor/editor/lang/ja.js delete mode 100644 fckeditor/editor/lang/km.js delete mode 100644 fckeditor/editor/lang/ko.js delete mode 100644 fckeditor/editor/lang/lt.js delete mode 100644 fckeditor/editor/lang/lv.js delete mode 100644 fckeditor/editor/lang/mn.js delete mode 100644 fckeditor/editor/lang/ms.js delete mode 100644 fckeditor/editor/lang/nb.js delete mode 100644 fckeditor/editor/lang/nl.js delete mode 100644 fckeditor/editor/lang/no.js delete mode 100644 fckeditor/editor/lang/pl.js delete mode 100644 fckeditor/editor/lang/pt-br.js delete mode 100644 fckeditor/editor/lang/pt.js delete mode 100644 fckeditor/editor/lang/ro.js delete mode 100644 fckeditor/editor/lang/ru.js delete mode 100644 fckeditor/editor/lang/sk.js delete mode 100644 fckeditor/editor/lang/sl.js delete mode 100644 fckeditor/editor/lang/sr-latn.js delete mode 100644 fckeditor/editor/lang/sr.js delete mode 100644 fckeditor/editor/lang/sv.js delete mode 100644 fckeditor/editor/lang/th.js delete mode 100644 fckeditor/editor/lang/tr.js delete mode 100644 fckeditor/editor/lang/uk.js delete mode 100644 fckeditor/editor/lang/vi.js delete mode 100644 fckeditor/editor/lang/zh-cn.js delete mode 100644 fckeditor/editor/lang/zh.js delete mode 100644 fckeditor/editor/plugins/autogrow/fckplugin.js delete mode 100644 fckeditor/editor/plugins/bbcode/_sample/sample.config.js delete mode 100644 fckeditor/editor/plugins/bbcode/_sample/sample.html delete mode 100644 fckeditor/editor/plugins/bbcode/fckplugin.js delete mode 100644 fckeditor/editor/plugins/dragresizetable/fckplugin.js delete mode 100644 fckeditor/editor/plugins/placeholder/fck_placeholder.html delete mode 100644 fckeditor/editor/plugins/placeholder/fckplugin.js delete mode 100644 fckeditor/editor/plugins/placeholder/lang/de.js delete mode 100644 fckeditor/editor/plugins/placeholder/lang/en.js delete mode 100644 fckeditor/editor/plugins/placeholder/lang/es.js delete mode 100644 fckeditor/editor/plugins/placeholder/lang/fr.js delete mode 100644 fckeditor/editor/plugins/placeholder/lang/it.js delete mode 100644 fckeditor/editor/plugins/placeholder/lang/pl.js delete mode 100644 fckeditor/editor/plugins/placeholder/placeholder.gif delete mode 100644 fckeditor/editor/plugins/simplecommands/fckplugin.js delete mode 100644 fckeditor/editor/plugins/tablecommands/fckplugin.js delete mode 100644 fckeditor/editor/skins/_fckviewstrips.html delete mode 100644 fckeditor/editor/skins/default/fck_dialog.css delete mode 100644 fckeditor/editor/skins/default/fck_dialog_ie6.js delete mode 100644 fckeditor/editor/skins/default/fck_editor.css delete mode 100644 fckeditor/editor/skins/default/fck_strip.gif delete mode 100644 fckeditor/editor/skins/default/images/dialog.sides.gif delete mode 100644 fckeditor/editor/skins/default/images/dialog.sides.png delete mode 100644 fckeditor/editor/skins/default/images/dialog.sides.rtl.png delete mode 100644 fckeditor/editor/skins/default/images/sprites.gif delete mode 100644 fckeditor/editor/skins/default/images/sprites.png delete mode 100644 fckeditor/editor/skins/default/images/toolbar.arrowright.gif delete mode 100644 fckeditor/editor/skins/default/images/toolbar.buttonarrow.gif delete mode 100644 fckeditor/editor/skins/default/images/toolbar.collapse.gif delete mode 100644 fckeditor/editor/skins/default/images/toolbar.end.gif delete mode 100644 fckeditor/editor/skins/default/images/toolbar.expand.gif delete mode 100644 fckeditor/editor/skins/default/images/toolbar.separator.gif delete mode 100644 fckeditor/editor/skins/default/images/toolbar.start.gif delete mode 100644 fckeditor/editor/skins/office2003/fck_dialog.css delete mode 100644 fckeditor/editor/skins/office2003/fck_dialog_ie6.js delete mode 100644 fckeditor/editor/skins/office2003/fck_editor.css delete mode 100644 fckeditor/editor/skins/office2003/fck_strip.gif delete mode 100644 fckeditor/editor/skins/office2003/images/dialog.sides.gif delete mode 100644 fckeditor/editor/skins/office2003/images/dialog.sides.png delete mode 100644 fckeditor/editor/skins/office2003/images/dialog.sides.rtl.png delete mode 100644 fckeditor/editor/skins/office2003/images/sprites.gif delete mode 100644 fckeditor/editor/skins/office2003/images/sprites.png delete mode 100644 fckeditor/editor/skins/office2003/images/toolbar.arrowright.gif delete mode 100644 fckeditor/editor/skins/office2003/images/toolbar.bg.gif delete mode 100644 fckeditor/editor/skins/office2003/images/toolbar.buttonarrow.gif delete mode 100644 fckeditor/editor/skins/office2003/images/toolbar.collapse.gif delete mode 100644 fckeditor/editor/skins/office2003/images/toolbar.end.gif delete mode 100644 fckeditor/editor/skins/office2003/images/toolbar.expand.gif delete mode 100644 fckeditor/editor/skins/office2003/images/toolbar.separator.gif delete mode 100644 fckeditor/editor/skins/office2003/images/toolbar.start.gif delete mode 100644 fckeditor/editor/skins/silver/fck_dialog.css delete mode 100644 fckeditor/editor/skins/silver/fck_dialog_ie6.js delete mode 100644 fckeditor/editor/skins/silver/fck_editor.css delete mode 100644 fckeditor/editor/skins/silver/fck_strip.gif delete mode 100644 fckeditor/editor/skins/silver/images/dialog.sides.gif delete mode 100644 fckeditor/editor/skins/silver/images/dialog.sides.png delete mode 100644 fckeditor/editor/skins/silver/images/dialog.sides.rtl.png delete mode 100644 fckeditor/editor/skins/silver/images/sprites.gif delete mode 100644 fckeditor/editor/skins/silver/images/sprites.png delete mode 100644 fckeditor/editor/skins/silver/images/toolbar.arrowright.gif delete mode 100644 fckeditor/editor/skins/silver/images/toolbar.buttonarrow.gif delete mode 100644 fckeditor/editor/skins/silver/images/toolbar.buttonbg.gif delete mode 100644 fckeditor/editor/skins/silver/images/toolbar.collapse.gif delete mode 100644 fckeditor/editor/skins/silver/images/toolbar.end.gif delete mode 100644 fckeditor/editor/skins/silver/images/toolbar.expand.gif delete mode 100644 fckeditor/editor/skins/silver/images/toolbar.separator.gif delete mode 100644 fckeditor/editor/skins/silver/images/toolbar.start.gif delete mode 100644 fckeditor/fckconfig.js delete mode 100644 fckeditor/fckeditor.afp delete mode 100644 fckeditor/fckeditor.asp delete mode 100644 fckeditor/fckeditor.cfc delete mode 100644 fckeditor/fckeditor.cfm delete mode 100644 fckeditor/fckeditor.js delete mode 100644 fckeditor/fckeditor.lasso delete mode 100644 fckeditor/fckeditor.php delete mode 100644 fckeditor/fckeditor.pl delete mode 100644 fckeditor/fckeditor.py delete mode 100644 fckeditor/fckeditor_php4.php delete mode 100644 fckeditor/fckeditor_php5.php delete mode 100644 fckeditor/fckpackager.xml delete mode 100644 fckeditor/fckstyles.xml delete mode 100644 fckeditor/fcktemplates.xml delete mode 100644 fckeditor/fckutils.cfm delete mode 100644 fckeditor/license.txt create mode 100644 file.php create mode 100644 files/.htaccess create mode 100644 files/4.1A_Humans_Low_Risk_0-2.pdf create mode 100644 files/4.1B_Humans_Significant_Risk_0.pdf create mode 100644 files/4.1C_Animals_0-2.pdf create mode 100644 files/research_plan_animals_en.doc create mode 100644 files/research_proposal_en.doc create mode 100644 filter.inc.php create mode 100644 form.inc.php delete mode 100644 gplheader.txt create mode 100644 help/judging.html delete mode 100644 helper.inc.php delete mode 100644 images/16/bookmark.gif delete mode 100644 images/16/bookmark.png delete mode 100644 images/16/bookmark_disabled.gif delete mode 100644 images/16/bookmark_disabled.png delete mode 100644 images/16/button_cancel.gif delete mode 100644 images/16/button_cancel.png delete mode 100644 images/16/down.gif delete mode 100644 images/16/down.png delete mode 100644 images/16/edit.gif delete mode 100644 images/16/edit.png delete mode 100644 images/16/flagged.png delete mode 100644 images/16/ok.gif delete mode 100644 images/16/ok.png delete mode 100644 images/16/undo.gif delete mode 100644 images/16/undo.png delete mode 100644 images/16/up.gif delete mode 100644 images/16/up.png delete mode 100644 images/16/update.gif delete mode 100644 images/16/update.png delete mode 100644 images/16/update2.gif delete mode 100644 images/16/update2.png delete mode 100644 images/16/viewmag.gif delete mode 100644 images/16/viewmag.png delete mode 100644 images/32/help.gif delete mode 100644 images/32/help.png delete mode 100644 images/32/help_science_ation.png delete mode 100644 important_dates.php create mode 100644 incomplete.inc.php delete mode 100644 install.php delete mode 100644 install2.php delete mode 100644 install3.php create mode 100644 isef.inc.php create mode 100644 j_expertise.php create mode 100644 j_main.php create mode 100644 j_mentorship.php create mode 100644 j_options.php create mode 100644 j_personal.php create mode 100644 j_schedule.php create mode 100644 jquery/jquery-1.9.1.min.js create mode 100644 jquery/jquery-ui.min.css create mode 100644 jquery/jquery-ui.min.js create mode 100644 jquery/jquery.mobile-1.4.2.min.css create mode 100644 jquery/jquery.mobile-1.4.2.min.js create mode 100644 jquery/jquery.mobile-1.4.2.min.map create mode 100644 jquery/jquery.mobile-1.4.5.min.css create mode 100644 jquery/jquery.mobile-1.4.5.min.js create mode 100644 jquery/jquery.mobile-1.4.5.min.map create mode 100644 jquery/jquery.ui.touch-punch.min.js delete mode 100644 js/sfiab.js delete mode 100644 judge.inc.php delete mode 100644 judge_availability.php delete mode 100644 judge_expertise.php delete mode 100644 judge_main.php delete mode 100644 judge_other.php delete mode 100644 judge_project_summary.php delete mode 100644 judge_schedule.php delete mode 100644 judge_special_awards.php delete mode 100644 lcsv.php create mode 100644 less create mode 100644 lesss create mode 100644 login.inc.php delete mode 100644 lpdf.php delete mode 100644 ltxt.php create mode 100644 main_forgot.php create mode 100644 main_winners.php create mode 100644 project.inc.php create mode 100644 project_list_html.php create mode 100644 project_number.inc.php create mode 100644 project_summary.php delete mode 100644 projects.inc.php delete mode 100644 questions.inc.php create mode 100644 readme.txt delete mode 100644 register_participants.inc.php delete mode 100644 register_participants.php delete mode 100644 register_participants_emergencycontact.php delete mode 100644 register_participants_isefforms.php delete mode 100644 register_participants_main.php delete mode 100644 register_participants_mentor.php delete mode 100644 register_participants_namecheck.php delete mode 100644 register_participants_project.php delete mode 100644 register_participants_project_divisionselector.php delete mode 100644 register_participants_safety.php delete mode 100644 register_participants_signature.old.php delete mode 100644 register_participants_signature.php delete mode 100644 register_participants_signature_tcpdf.php delete mode 100644 register_participants_spawards.php delete mode 100644 register_participants_students.php delete mode 100644 register_participants_tours.php create mode 100644 remote.inc.php create mode 100644 report_ceremony.php create mode 100644 report_jteam_forms.php create mode 100644 report_jteam_timetable.php create mode 100644 report_payments.php create mode 100644 report_project_timetable.php create mode 100644 report_signatures.php create mode 100644 reports.inc.php create mode 100644 reports_awards.inc.php create mode 100644 reports_committee.inc.php create mode 100644 reports_fairs.inc.php create mode 100644 reports_judges.inc.php create mode 100644 reports_students.inc.php create mode 100644 reports_volunteers.inc.php create mode 100644 s_awards.php create mode 100644 s_cwsf.php create mode 100644 s_download.php create mode 100644 s_emergency.php create mode 100644 s_ethics.php create mode 100644 s_main.php create mode 100644 s_mentor.php create mode 100644 s_partner.php create mode 100644 s_payment.php create mode 100644 s_personal.php create mode 100644 s_project.php create mode 100644 s_reg_options.php create mode 100644 s_safety.php create mode 100644 s_signature.php create mode 100644 s_signature_edit.php create mode 100644 s_tours.php create mode 100644 sanity.inc.php delete mode 100644 schoolaccess.php delete mode 100644 schoolinvite.php create mode 100644 schools.inc.php create mode 100644 scripts/.htaccess delete mode 100644 scripts/assignprojectnumbers.php delete mode 100644 scripts/assigntourrankings.php create mode 100644 scripts/conv_db.inc.php create mode 100644 scripts/conv_db_awards.inc.php create mode 100644 scripts/conv_db_categories.inc.php create mode 100644 scripts/conv_db_committee.inc.php create mode 100644 scripts/conv_db_config.inc.php create mode 100644 scripts/conv_db_emails.inc.php create mode 100644 scripts/conv_db_fairs.inc.php create mode 100644 scripts/conv_db_judges.inc.php create mode 100644 scripts/conv_db_reports.inc.php create mode 100644 scripts/conv_db_schools.inc.php create mode 100644 scripts/conv_db_sponsors.inc.php create mode 100644 scripts/conv_db_students.inc.php create mode 100644 scripts/conv_db_tours.inc.php create mode 100644 scripts/conv_db_volunteers.inc.php create mode 100644 scripts/conv_tmp.php delete mode 100644 scripts/emptyregistrations.php delete mode 100644 scripts/emptyscheduledata.php create mode 100644 scripts/gvrsf_populate_exhibithall.php create mode 100644 scripts/images/ajax-loader.gif create mode 100644 scripts/install.php delete mode 100644 scripts/judges_fake.php delete mode 100644 scripts/populate_fake.php delete mode 100644 scripts/rolloverschools.php delete mode 100644 scripts/science-ation_db_update.php create mode 100644 scripts/sfiab_queue_runner.php create mode 100644 sfiab.css create mode 100644 sfiab.js create mode 100644 sha512.js create mode 100644 signature.php delete mode 100644 sponsor_main.php create mode 100644 sponsors.inc.php create mode 100644 src/.gitignore create mode 100644 src/.htaccess create mode 100644 src/Makefile create mode 100644 src/anneal.c create mode 100644 src/anneal.h create mode 100644 src/db.h create mode 100644 src/exhibithall.c create mode 100644 src/exhibithall.h create mode 100644 src/judges.c create mode 100644 src/judges.h create mode 100644 src/main.c create mode 100644 src/robotics.c create mode 100644 src/sfiab.c create mode 100644 src/sfiab.h create mode 100644 src/students.c create mode 100644 src/students.h create mode 100644 src/timeslots.c create mode 100644 src/timeslots.h create mode 100644 src/tours.c create mode 100644 src/tours.h create mode 100644 stats.inc.php create mode 100644 students_complete.php delete mode 100644 tableeditor.class.php delete mode 100644 tableeditor.css create mode 100644 tcpdf_6/.htaccess create mode 100644 tcpdf_6/CHANGELOG.TXT create mode 100644 tcpdf_6/LICENSE.TXT create mode 100644 tcpdf_6/README.TXT create mode 100644 tcpdf_6/composer.json create mode 100644 tcpdf_6/config/.tcpdf_config.php.swp create mode 100644 tcpdf_6/config/tcpdf_config.php create mode 100644 tcpdf_6/examples/barcodes/example_1d_html.php create mode 100644 tcpdf_6/examples/barcodes/example_1d_png.php create mode 100644 tcpdf_6/examples/barcodes/example_1d_svg.php create mode 100644 tcpdf_6/examples/barcodes/example_1d_svgi.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_datamatrix_html.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_datamatrix_png.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_datamatrix_svg.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_datamatrix_svgi.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_pdf417_html.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_pdf417_png.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_pdf417_svg.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_pdf417_svgi.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_qrcode_html.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_qrcode_png.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_qrcode_svg.php create mode 100644 tcpdf_6/examples/barcodes/example_2d_qrcode_svgi.php create mode 100644 tcpdf_6/examples/barcodes/tcpdf_barcodes_1d_include.php create mode 100644 tcpdf_6/examples/barcodes/tcpdf_barcodes_2d_include.php create mode 100644 tcpdf_6/examples/config/tcpdf_config_alt.php create mode 100644 tcpdf_6/examples/data/cert/tcpdf.crt create mode 100644 tcpdf_6/examples/data/cert/tcpdf.fdf create mode 100644 tcpdf_6/examples/data/cert/tcpdf.p12 create mode 100644 tcpdf_6/examples/data/chapter_demo_1.txt create mode 100644 tcpdf_6/examples/data/chapter_demo_2.txt create mode 100644 tcpdf_6/examples/data/table_data_demo.txt create mode 100644 tcpdf_6/examples/data/utf8test.txt create mode 100644 tcpdf_6/examples/example_001.php create mode 100644 tcpdf_6/examples/example_002.php create mode 100644 tcpdf_6/examples/example_003.php create mode 100644 tcpdf_6/examples/example_004.php create mode 100644 tcpdf_6/examples/example_005.php create mode 100644 tcpdf_6/examples/example_006.php create mode 100644 tcpdf_6/examples/example_007.php create mode 100644 tcpdf_6/examples/example_008.php create mode 100644 tcpdf_6/examples/example_009.php create mode 100644 tcpdf_6/examples/example_010.php create mode 100644 tcpdf_6/examples/example_011.php create mode 100644 tcpdf_6/examples/example_012.pdf create mode 100644 tcpdf_6/examples/example_012.php create mode 100644 tcpdf_6/examples/example_013.php create mode 100644 tcpdf_6/examples/example_014.php create mode 100644 tcpdf_6/examples/example_015.php create mode 100644 tcpdf_6/examples/example_016.php create mode 100644 tcpdf_6/examples/example_017.php create mode 100644 tcpdf_6/examples/example_018.php create mode 100644 tcpdf_6/examples/example_019.php create mode 100644 tcpdf_6/examples/example_020.php create mode 100644 tcpdf_6/examples/example_021.php create mode 100644 tcpdf_6/examples/example_022.php create mode 100644 tcpdf_6/examples/example_023.php create mode 100644 tcpdf_6/examples/example_024.php create mode 100644 tcpdf_6/examples/example_025.php create mode 100644 tcpdf_6/examples/example_026.php create mode 100644 tcpdf_6/examples/example_027.php create mode 100644 tcpdf_6/examples/example_028.php create mode 100644 tcpdf_6/examples/example_029.php create mode 100644 tcpdf_6/examples/example_030.php create mode 100644 tcpdf_6/examples/example_031.php create mode 100644 tcpdf_6/examples/example_032.php create mode 100644 tcpdf_6/examples/example_033.php create mode 100644 tcpdf_6/examples/example_034.php create mode 100644 tcpdf_6/examples/example_035.php create mode 100644 tcpdf_6/examples/example_036.php create mode 100644 tcpdf_6/examples/example_037.php create mode 100644 tcpdf_6/examples/example_038.php create mode 100644 tcpdf_6/examples/example_039.php create mode 100644 tcpdf_6/examples/example_040.php create mode 100644 tcpdf_6/examples/example_041.php create mode 100644 tcpdf_6/examples/example_042.php create mode 100644 tcpdf_6/examples/example_043.php create mode 100644 tcpdf_6/examples/example_044.php create mode 100644 tcpdf_6/examples/example_045.php create mode 100644 tcpdf_6/examples/example_046.php create mode 100644 tcpdf_6/examples/example_047.php create mode 100644 tcpdf_6/examples/example_048.php create mode 100644 tcpdf_6/examples/example_049.php create mode 100644 tcpdf_6/examples/example_050.php create mode 100644 tcpdf_6/examples/example_051.php create mode 100644 tcpdf_6/examples/example_052.php create mode 100644 tcpdf_6/examples/example_053.php create mode 100644 tcpdf_6/examples/example_054.php create mode 100644 tcpdf_6/examples/example_055.php create mode 100644 tcpdf_6/examples/example_056.php create mode 100644 tcpdf_6/examples/example_057.php create mode 100644 tcpdf_6/examples/example_058.php create mode 100644 tcpdf_6/examples/example_059.php create mode 100644 tcpdf_6/examples/example_060.php create mode 100644 tcpdf_6/examples/example_061.php create mode 100644 tcpdf_6/examples/example_062.php create mode 100644 tcpdf_6/examples/example_063.php create mode 100644 tcpdf_6/examples/example_064.php create mode 100644 tcpdf_6/examples/example_065.php create mode 100644 tcpdf_6/examples/images/_blank.png create mode 100644 tcpdf_6/examples/images/alpha.png create mode 100644 tcpdf_6/examples/images/bug.eps create mode 100644 tcpdf_6/examples/images/image_demo.jpg create mode 100644 tcpdf_6/examples/images/image_with_alpha.png create mode 100644 tcpdf_6/examples/images/img.png create mode 100644 tcpdf_6/examples/images/logo_example.gif create mode 100644 tcpdf_6/examples/images/logo_example.jpg create mode 100644 tcpdf_6/examples/images/logo_example.png create mode 100644 tcpdf_6/examples/images/pelican.ai create mode 100644 tcpdf_6/examples/images/tcpdf_cell.png create mode 100644 tcpdf_6/examples/images/tcpdf_logo.jpg create mode 100644 tcpdf_6/examples/images/tcpdf_signature.png create mode 100644 tcpdf_6/examples/images/testsvg.svg create mode 100644 tcpdf_6/examples/images/tiger.ai create mode 100644 tcpdf_6/examples/images/tux.svg create mode 100644 tcpdf_6/examples/index.php create mode 100644 tcpdf_6/examples/lang/afr.php create mode 100644 tcpdf_6/examples/lang/ara.php create mode 100644 tcpdf_6/examples/lang/aze.php create mode 100644 tcpdf_6/examples/lang/bel.php create mode 100644 tcpdf_6/examples/lang/bra.php create mode 100644 tcpdf_6/examples/lang/bul.php create mode 100644 tcpdf_6/examples/lang/cat.php create mode 100644 tcpdf_6/examples/lang/ces.php create mode 100644 tcpdf_6/examples/lang/chi.php create mode 100644 tcpdf_6/examples/lang/cym.php create mode 100644 tcpdf_6/examples/lang/dan.php create mode 100644 tcpdf_6/examples/lang/eng.php create mode 100644 tcpdf_6/examples/lang/est.php create mode 100644 tcpdf_6/examples/lang/eus.php create mode 100644 tcpdf_6/examples/lang/far.php create mode 100644 tcpdf_6/examples/lang/fra.php create mode 100644 tcpdf_6/examples/lang/ger.php create mode 100644 tcpdf_6/examples/lang/gle.php create mode 100644 tcpdf_6/examples/lang/glg.php create mode 100644 tcpdf_6/examples/lang/hat.php create mode 100644 tcpdf_6/examples/lang/heb.php create mode 100644 tcpdf_6/examples/lang/hrv.php create mode 100644 tcpdf_6/examples/lang/hun.php create mode 100644 tcpdf_6/examples/lang/hye.php create mode 100644 tcpdf_6/examples/lang/ind.php create mode 100644 tcpdf_6/examples/lang/ita.php create mode 100644 tcpdf_6/examples/lang/jpn.php create mode 100644 tcpdf_6/examples/lang/kat.php create mode 100644 tcpdf_6/examples/lang/kor.php create mode 100644 tcpdf_6/examples/lang/mkd.php create mode 100644 tcpdf_6/examples/lang/mlt.php create mode 100644 tcpdf_6/examples/lang/msa.php create mode 100644 tcpdf_6/examples/lang/nld.php create mode 100644 tcpdf_6/examples/lang/nob.php create mode 100644 tcpdf_6/examples/lang/pol.php create mode 100644 tcpdf_6/examples/lang/por.php create mode 100644 tcpdf_6/examples/lang/ron.php create mode 100644 tcpdf_6/examples/lang/rus.php create mode 100644 tcpdf_6/examples/lang/slv.php create mode 100644 tcpdf_6/examples/lang/spa.php create mode 100644 tcpdf_6/examples/lang/sqi.php create mode 100644 tcpdf_6/examples/lang/srp.php create mode 100644 tcpdf_6/examples/lang/swa.php create mode 100644 tcpdf_6/examples/lang/swe.php create mode 100644 tcpdf_6/examples/lang/ukr.php create mode 100644 tcpdf_6/examples/lang/urd.php create mode 100644 tcpdf_6/examples/lang/yid.php create mode 100644 tcpdf_6/examples/lang/zho.php create mode 100644 tcpdf_6/examples/tcpdf_include.php rename gpl.txt => tcpdf_6/fonts/ae_fonts_2.0/COPYING (83%) create mode 100644 tcpdf_6/fonts/ae_fonts_2.0/ChangeLog create mode 100644 tcpdf_6/fonts/ae_fonts_2.0/README create mode 100644 tcpdf_6/fonts/aealarabiya.ctg.z create mode 100644 tcpdf_6/fonts/aealarabiya.php create mode 100644 tcpdf_6/fonts/aealarabiya.z create mode 100644 tcpdf_6/fonts/aefurat.ctg.z create mode 100644 tcpdf_6/fonts/aefurat.php create mode 100644 tcpdf_6/fonts/aefurat.z create mode 100644 tcpdf_6/fonts/cid0cs.php create mode 100644 tcpdf_6/fonts/cid0ct.php create mode 100644 tcpdf_6/fonts/cid0jp.php create mode 100644 tcpdf_6/fonts/cid0kr.php create mode 100644 tcpdf_6/fonts/courier.php create mode 100644 tcpdf_6/fonts/courierb.php create mode 100644 tcpdf_6/fonts/courierbi.php create mode 100644 tcpdf_6/fonts/courieri.php create mode 100644 tcpdf_6/fonts/dejavu-fonts-ttf-2.33/AUTHORS create mode 100644 tcpdf_6/fonts/dejavu-fonts-ttf-2.33/BUGS create mode 100644 tcpdf_6/fonts/dejavu-fonts-ttf-2.33/LICENSE create mode 100644 tcpdf_6/fonts/dejavu-fonts-ttf-2.33/NEWS create mode 100644 tcpdf_6/fonts/dejavu-fonts-ttf-2.33/README create mode 100644 tcpdf_6/fonts/dejavu-fonts-ttf-2.33/langcover.txt create mode 100644 tcpdf_6/fonts/dejavu-fonts-ttf-2.33/status.txt create mode 100644 tcpdf_6/fonts/dejavu-fonts-ttf-2.33/unicover.txt create mode 100644 tcpdf_6/fonts/dejavusans.ctg.z create mode 100644 tcpdf_6/fonts/dejavusans.php create mode 100644 tcpdf_6/fonts/dejavusans.z create mode 100644 tcpdf_6/fonts/dejavusansb.ctg.z create mode 100644 tcpdf_6/fonts/dejavusansb.php create mode 100644 tcpdf_6/fonts/dejavusansb.z create mode 100644 tcpdf_6/fonts/dejavusansbi.ctg.z create mode 100644 tcpdf_6/fonts/dejavusansbi.php create mode 100644 tcpdf_6/fonts/dejavusansbi.z create mode 100644 tcpdf_6/fonts/dejavusanscondensed.ctg.z create mode 100644 tcpdf_6/fonts/dejavusanscondensed.php create mode 100644 tcpdf_6/fonts/dejavusanscondensed.z create mode 100644 tcpdf_6/fonts/dejavusanscondensedb.ctg.z create mode 100644 tcpdf_6/fonts/dejavusanscondensedb.php create mode 100644 tcpdf_6/fonts/dejavusanscondensedb.z create mode 100644 tcpdf_6/fonts/dejavusanscondensedbi.ctg.z create mode 100644 tcpdf_6/fonts/dejavusanscondensedbi.php create mode 100644 tcpdf_6/fonts/dejavusanscondensedbi.z create mode 100644 tcpdf_6/fonts/dejavusanscondensedi.ctg.z create mode 100644 tcpdf_6/fonts/dejavusanscondensedi.php create mode 100644 tcpdf_6/fonts/dejavusanscondensedi.z create mode 100644 tcpdf_6/fonts/dejavusansextralight.ctg.z create mode 100644 tcpdf_6/fonts/dejavusansextralight.php create mode 100644 tcpdf_6/fonts/dejavusansextralight.z create mode 100644 tcpdf_6/fonts/dejavusansi.ctg.z create mode 100644 tcpdf_6/fonts/dejavusansi.php create mode 100644 tcpdf_6/fonts/dejavusansi.z create mode 100644 tcpdf_6/fonts/dejavusansmono.ctg.z create mode 100644 tcpdf_6/fonts/dejavusansmono.php create mode 100644 tcpdf_6/fonts/dejavusansmono.z create mode 100644 tcpdf_6/fonts/dejavusansmonob.ctg.z create mode 100644 tcpdf_6/fonts/dejavusansmonob.php create mode 100644 tcpdf_6/fonts/dejavusansmonob.z create mode 100644 tcpdf_6/fonts/dejavusansmonobi.ctg.z create mode 100644 tcpdf_6/fonts/dejavusansmonobi.php create mode 100644 tcpdf_6/fonts/dejavusansmonobi.z create mode 100644 tcpdf_6/fonts/dejavusansmonoi.ctg.z create mode 100644 tcpdf_6/fonts/dejavusansmonoi.php create mode 100644 tcpdf_6/fonts/dejavusansmonoi.z create mode 100644 tcpdf_6/fonts/dejavuserif.ctg.z create mode 100644 tcpdf_6/fonts/dejavuserif.php create mode 100644 tcpdf_6/fonts/dejavuserif.z create mode 100644 tcpdf_6/fonts/dejavuserifb.ctg.z create mode 100644 tcpdf_6/fonts/dejavuserifb.php create mode 100644 tcpdf_6/fonts/dejavuserifb.z create mode 100644 tcpdf_6/fonts/dejavuserifbi.ctg.z create mode 100644 tcpdf_6/fonts/dejavuserifbi.php create mode 100644 tcpdf_6/fonts/dejavuserifbi.z create mode 100644 tcpdf_6/fonts/dejavuserifcondensed.ctg.z create mode 100644 tcpdf_6/fonts/dejavuserifcondensed.php create mode 100644 tcpdf_6/fonts/dejavuserifcondensed.z create mode 100644 tcpdf_6/fonts/dejavuserifcondensedb.ctg.z create mode 100644 tcpdf_6/fonts/dejavuserifcondensedb.php create mode 100644 tcpdf_6/fonts/dejavuserifcondensedb.z create mode 100644 tcpdf_6/fonts/dejavuserifcondensedbi.ctg.z create mode 100644 tcpdf_6/fonts/dejavuserifcondensedbi.php create mode 100644 tcpdf_6/fonts/dejavuserifcondensedbi.z create mode 100644 tcpdf_6/fonts/dejavuserifcondensedi.ctg.z create mode 100644 tcpdf_6/fonts/dejavuserifcondensedi.php create mode 100644 tcpdf_6/fonts/dejavuserifcondensedi.z create mode 100644 tcpdf_6/fonts/dejavuserifi.ctg.z create mode 100644 tcpdf_6/fonts/dejavuserifi.php create mode 100644 tcpdf_6/fonts/dejavuserifi.z create mode 100644 tcpdf_6/fonts/freefont-20120503/AUTHORS create mode 100644 tcpdf_6/fonts/freefont-20120503/COPYING create mode 100644 tcpdf_6/fonts/freefont-20120503/CREDITS create mode 100644 tcpdf_6/fonts/freefont-20120503/ChangeLog create mode 100644 tcpdf_6/fonts/freefont-20120503/INSTALL create mode 100644 tcpdf_6/fonts/freefont-20120503/README create mode 100644 tcpdf_6/fonts/freefont-20120503/TROUBLESHOOTING create mode 100644 tcpdf_6/fonts/freefont-20120503/USAGE create mode 100644 tcpdf_6/fonts/freemono.ctg.z create mode 100644 tcpdf_6/fonts/freemono.php create mode 100644 tcpdf_6/fonts/freemono.z create mode 100644 tcpdf_6/fonts/freemonob.ctg.z create mode 100644 tcpdf_6/fonts/freemonob.php create mode 100644 tcpdf_6/fonts/freemonob.z create mode 100644 tcpdf_6/fonts/freemonobi.ctg.z create mode 100644 tcpdf_6/fonts/freemonobi.php create mode 100644 tcpdf_6/fonts/freemonobi.z create mode 100644 tcpdf_6/fonts/freemonoi.ctg.z create mode 100644 tcpdf_6/fonts/freemonoi.php create mode 100644 tcpdf_6/fonts/freemonoi.z create mode 100644 tcpdf_6/fonts/freesans.ctg.z create mode 100644 tcpdf_6/fonts/freesans.php create mode 100644 tcpdf_6/fonts/freesans.z create mode 100644 tcpdf_6/fonts/freesansb.ctg.z create mode 100644 tcpdf_6/fonts/freesansb.php create mode 100644 tcpdf_6/fonts/freesansb.z create mode 100644 tcpdf_6/fonts/freesansbi.ctg.z create mode 100644 tcpdf_6/fonts/freesansbi.php create mode 100644 tcpdf_6/fonts/freesansbi.z create mode 100644 tcpdf_6/fonts/freesansi.ctg.z create mode 100644 tcpdf_6/fonts/freesansi.php create mode 100644 tcpdf_6/fonts/freesansi.z create mode 100644 tcpdf_6/fonts/freeserif.ctg.z create mode 100644 tcpdf_6/fonts/freeserif.php create mode 100644 tcpdf_6/fonts/freeserif.z create mode 100644 tcpdf_6/fonts/freeserifb.ctg.z create mode 100644 tcpdf_6/fonts/freeserifb.php create mode 100644 tcpdf_6/fonts/freeserifb.z create mode 100644 tcpdf_6/fonts/freeserifbi.ctg.z create mode 100644 tcpdf_6/fonts/freeserifbi.php create mode 100644 tcpdf_6/fonts/freeserifbi.z create mode 100644 tcpdf_6/fonts/freeserifi.ctg.z create mode 100644 tcpdf_6/fonts/freeserifi.php create mode 100644 tcpdf_6/fonts/freeserifi.z create mode 100644 tcpdf_6/fonts/helvetica.php create mode 100644 tcpdf_6/fonts/helveticab.php create mode 100644 tcpdf_6/fonts/helveticabi.php create mode 100644 tcpdf_6/fonts/helveticai.php create mode 100644 tcpdf_6/fonts/hysmyeongjostdmedium.php create mode 100644 tcpdf_6/fonts/kozgopromedium.php create mode 100644 tcpdf_6/fonts/kozminproregular.php create mode 100644 tcpdf_6/fonts/msungstdlight.php create mode 100644 tcpdf_6/fonts/pdfacourier.php create mode 100644 tcpdf_6/fonts/pdfacourier.z create mode 100644 tcpdf_6/fonts/pdfacourierb.php create mode 100644 tcpdf_6/fonts/pdfacourierb.z create mode 100644 tcpdf_6/fonts/pdfacourierbi.php create mode 100644 tcpdf_6/fonts/pdfacourierbi.z create mode 100644 tcpdf_6/fonts/pdfacourieri.php create mode 100644 tcpdf_6/fonts/pdfacourieri.z create mode 100644 tcpdf_6/fonts/pdfahelvetica.php create mode 100644 tcpdf_6/fonts/pdfahelvetica.z create mode 100644 tcpdf_6/fonts/pdfahelveticab.php create mode 100644 tcpdf_6/fonts/pdfahelveticab.z create mode 100644 tcpdf_6/fonts/pdfahelveticabi.php create mode 100644 tcpdf_6/fonts/pdfahelveticabi.z create mode 100644 tcpdf_6/fonts/pdfahelveticai.php create mode 100644 tcpdf_6/fonts/pdfahelveticai.z create mode 100644 tcpdf_6/fonts/pdfasymbol.php create mode 100644 tcpdf_6/fonts/pdfasymbol.z create mode 100644 tcpdf_6/fonts/pdfatimes.php create mode 100644 tcpdf_6/fonts/pdfatimes.z create mode 100644 tcpdf_6/fonts/pdfatimesb.php create mode 100644 tcpdf_6/fonts/pdfatimesb.z create mode 100644 tcpdf_6/fonts/pdfatimesbi.php create mode 100644 tcpdf_6/fonts/pdfatimesbi.z create mode 100644 tcpdf_6/fonts/pdfatimesi.php create mode 100644 tcpdf_6/fonts/pdfatimesi.z create mode 100644 tcpdf_6/fonts/pdfazapfdingbats.php create mode 100644 tcpdf_6/fonts/pdfazapfdingbats.z create mode 100644 tcpdf_6/fonts/scriptin.ctg.z create mode 100644 tcpdf_6/fonts/scriptin.php create mode 100644 tcpdf_6/fonts/scriptin.z create mode 100644 tcpdf_6/fonts/segoesb.ctg.z create mode 100644 tcpdf_6/fonts/segoesb.php create mode 100644 tcpdf_6/fonts/segoesb.z create mode 100644 tcpdf_6/fonts/stsongstdlight.php create mode 100644 tcpdf_6/fonts/symbol.php create mode 100644 tcpdf_6/fonts/tempsitc.ctg.z create mode 100644 tcpdf_6/fonts/tempsitc.php create mode 100644 tcpdf_6/fonts/tempsitc.z create mode 100644 tcpdf_6/fonts/times.php create mode 100644 tcpdf_6/fonts/timesb.php create mode 100644 tcpdf_6/fonts/timesbi.php create mode 100644 tcpdf_6/fonts/timesi.php create mode 100644 tcpdf_6/fonts/uni2cid_ac15.php create mode 100644 tcpdf_6/fonts/uni2cid_ag15.php create mode 100644 tcpdf_6/fonts/uni2cid_aj16.php create mode 100644 tcpdf_6/fonts/uni2cid_ak12.php create mode 100644 tcpdf_6/fonts/zapfdingbats.php create mode 100644 tcpdf_6/include/barcodes/datamatrix.php create mode 100644 tcpdf_6/include/barcodes/pdf417.php create mode 100644 tcpdf_6/include/barcodes/qrcode.php create mode 100644 tcpdf_6/include/sRGB.icc create mode 100644 tcpdf_6/include/tcpdf_colors.php create mode 100644 tcpdf_6/include/tcpdf_filters.php create mode 100644 tcpdf_6/include/tcpdf_font_data.php create mode 100644 tcpdf_6/include/tcpdf_fonts.php create mode 100644 tcpdf_6/include/tcpdf_images.php create mode 100644 tcpdf_6/include/tcpdf_static.php create mode 100644 tcpdf_6/tcpdf.php create mode 100644 tcpdf_6/tcpdf_autoconfig.php create mode 100644 tcpdf_6/tcpdf_barcodes_1d.php create mode 100644 tcpdf_6/tcpdf_barcodes_2d.php create mode 100644 tcpdf_6/tcpdf_config_sfiab.php create mode 100644 tcpdf_6/tcpdf_import.php create mode 100644 tcpdf_6/tcpdf_parser.php create mode 100644 tcpdf_6/tools/.htaccess create mode 100755 tcpdf_6/tools/tcpdf_addfont.php delete mode 100644 tcpdf_config.php delete mode 100644 theme/classic/images/ui-bg_flat_55_999999_40x100.png delete mode 100644 theme/classic/images/ui-bg_flat_75_aaaaaa_40x100.png delete mode 100644 theme/classic/images/ui-bg_glass_45_0078ae_1x400.png delete mode 100644 theme/classic/images/ui-bg_glass_55_f8da4e_1x400.png delete mode 100644 theme/classic/images/ui-bg_glass_75_79c9ec_1x400.png delete mode 100644 theme/classic/images/ui-bg_gloss-wave_45_e14f1c_500x100.png delete mode 100644 theme/classic/images/ui-bg_gloss-wave_50_6eac2c_500x100.png delete mode 100644 theme/classic/images/ui-bg_gloss-wave_75_2191c0_500x100.png delete mode 100644 theme/classic/images/ui-bg_inset-hard_100_fcfdfd_1x100.png delete mode 100644 theme/classic/images/ui-icons_0078ae_256x240.png delete mode 100644 theme/classic/images/ui-icons_056b93_256x240.png delete mode 100644 theme/classic/images/ui-icons_d8e7f3_256x240.png delete mode 100644 theme/classic/images/ui-icons_e0fdff_256x240.png delete mode 100644 theme/classic/images/ui-icons_f5e175_256x240.png delete mode 100644 theme/classic/images/ui-icons_f7a50d_256x240.png delete mode 100644 theme/classic/images/ui-icons_fcd113_256x240.png delete mode 100644 theme/classic/jquery-ui-1.7.2.custom.css delete mode 100644 theme/classic/sfiab.css delete mode 100644 theme/classic/theme.php delete mode 100644 theme/icons_classic/Coins-32x32.png delete mode 100644 theme/icons_classic/accessories-text-editor.png delete mode 100644 theme/icons_classic/agt_forum.png delete mode 100644 theme/icons_classic/application-pdf.png delete mode 100644 theme/icons_classic/application-vnd.oasis.opendocument.text.png delete mode 100644 theme/icons_classic/applications-education.png delete mode 100644 theme/icons_classic/ark.png delete mode 100644 theme/icons_classic/chemical.png delete mode 100644 theme/icons_classic/configure.png delete mode 100644 theme/icons_classic/date.png delete mode 100644 theme/icons_classic/document-multiple.png delete mode 100644 theme/icons_classic/edit_user.png delete mode 100644 theme/icons_classic/edu_science.png delete mode 100644 theme/icons_classic/edu_science_canada.png delete mode 100644 theme/icons_classic/elempic.png delete mode 100644 theme/icons_classic/encrypted.png delete mode 100644 theme/icons_classic/flag-blue.png delete mode 100644 theme/icons_classic/flag-green.png delete mode 100644 theme/icons_classic/folder.png delete mode 100644 theme/icons_classic/gear.png delete mode 100644 theme/icons_classic/help-contents.png delete mode 100644 theme/icons_classic/icons.php delete mode 100644 theme/icons_classic/kanagram.png delete mode 100644 theme/icons_classic/kdmconfig.png delete mode 100644 theme/icons_classic/klipper.png delete mode 100644 theme/icons_classic/kwordquiz.png delete mode 100644 theme/icons_classic/kwrite.png delete mode 100644 theme/icons_classic/legalmoves.png delete mode 100644 theme/icons_classic/mail-mark-unread.png delete mode 100644 theme/icons_classic/numbers.png delete mode 100644 theme/icons_classic/package_utilities.png delete mode 100644 theme/icons_classic/plasmagik.png delete mode 100644 theme/icons_classic/preferences-system-performance.png delete mode 100644 theme/icons_classic/rebuild.png delete mode 100644 theme/icons_classic/rollover_fiscal.png delete mode 100644 theme/icons_classic/signature.png delete mode 100644 theme/icons_classic/svn_switch.png delete mode 100644 theme/icons_classic/system-users.png delete mode 100644 theme/icons_classic/toggle_log.png delete mode 100644 theme/icons_classic/transfers_list.png delete mode 100644 theme/icons_classic/user-group-new.png delete mode 100644 theme/icons_classic/vcs_status.png delete mode 100644 theme/icons_classic/view_sort_descending.png delete mode 100644 theme/icons_science_ation/Coins-32x32.png delete mode 100644 theme/icons_science_ation/accessories-text-editor.png delete mode 100644 theme/icons_science_ation/agt_forum.png delete mode 100644 theme/icons_science_ation/application-pdf.png delete mode 100644 theme/icons_science_ation/application-vnd.oasis.opendocument.text.png delete mode 100644 theme/icons_science_ation/applications-education.png delete mode 100644 theme/icons_science_ation/chemical.png delete mode 100644 theme/icons_science_ation/configure.png delete mode 100644 theme/icons_science_ation/date.png delete mode 100644 theme/icons_science_ation/document-multiple.png delete mode 100644 theme/icons_science_ation/edit_user.png delete mode 100644 theme/icons_science_ation/edu_science.png delete mode 100644 theme/icons_science_ation/edu_science_canada.png delete mode 100644 theme/icons_science_ation/elempic.png delete mode 100644 theme/icons_science_ation/encrypted.png delete mode 100644 theme/icons_science_ation/flag-blue.png delete mode 100644 theme/icons_science_ation/flag-green.png delete mode 100644 theme/icons_science_ation/folder.png delete mode 100644 theme/icons_science_ation/gear.png delete mode 100644 theme/icons_science_ation/help-contents.png delete mode 100644 theme/icons_science_ation/icons.php delete mode 100644 theme/icons_science_ation/kanagram.png delete mode 100644 theme/icons_science_ation/kdmconfig.png delete mode 100644 theme/icons_science_ation/klipper.png delete mode 100644 theme/icons_science_ation/kwordquiz.png delete mode 100644 theme/icons_science_ation/kwrite.png delete mode 100644 theme/icons_science_ation/legalmoves.png delete mode 100644 theme/icons_science_ation/mail-mark-unread.png delete mode 100644 theme/icons_science_ation/numbers.png delete mode 100644 theme/icons_science_ation/package_utilities.png delete mode 100644 theme/icons_science_ation/plasmagik.png delete mode 100644 theme/icons_science_ation/rebuild.png delete mode 100644 theme/icons_science_ation/rollover_fiscal.png delete mode 100644 theme/icons_science_ation/signature.png delete mode 100644 theme/icons_science_ation/svn_switch.png delete mode 100644 theme/icons_science_ation/system-users.png delete mode 100644 theme/icons_science_ation/toggle_log.png delete mode 100644 theme/icons_science_ation/transfers_list.png delete mode 100644 theme/icons_science_ation/user-group-new.png delete mode 100644 theme/icons_science_ation/vcs_status.png delete mode 100644 theme/icons_science_ation/view_sort_descending.png delete mode 100644 theme/science_ation/images/ui-bg_flat_55_999999_40x100.png delete mode 100644 theme/science_ation/images/ui-bg_flat_75_aaaaaa_40x100.png delete mode 100644 theme/science_ation/images/ui-bg_glass_45_0078ae_1x400.png delete mode 100644 theme/science_ation/images/ui-bg_glass_55_f8da4e_1x400.png delete mode 100644 theme/science_ation/images/ui-bg_glass_75_79c9ec_1x400.png delete mode 100644 theme/science_ation/images/ui-bg_gloss-wave_45_e14f1c_500x100.png delete mode 100644 theme/science_ation/images/ui-bg_gloss-wave_50_6eac2c_500x100.png delete mode 100644 theme/science_ation/images/ui-bg_gloss-wave_75_2191c0_500x100.png delete mode 100644 theme/science_ation/images/ui-bg_inset-hard_100_fcfdfd_1x100.png delete mode 100644 theme/science_ation/images/ui-icons_0078ae_256x240.png delete mode 100644 theme/science_ation/images/ui-icons_056b93_256x240.png delete mode 100644 theme/science_ation/images/ui-icons_d8e7f3_256x240.png delete mode 100644 theme/science_ation/images/ui-icons_e0fdff_256x240.png delete mode 100644 theme/science_ation/images/ui-icons_f5e175_256x240.png delete mode 100644 theme/science_ation/images/ui-icons_f7a50d_256x240.png delete mode 100644 theme/science_ation/images/ui-icons_fcd113_256x240.png delete mode 100644 theme/science_ation/jquery-ui-1.7.2.custom.css delete mode 100644 theme/science_ation/sfiab.css delete mode 100644 theme/science_ation/theme-script.js delete mode 100644 theme/science_ation/theme.php create mode 100644 timeslots.inc.php delete mode 100644 tours.class.php delete mode 100644 translationseditor.inc.php delete mode 100644 translationseditor.js.php create mode 100644 updates/.htaccess create mode 100644 updates/1.sql create mode 100644 updates/11.php create mode 100644 updates/12.sql create mode 100644 updates/13.sql create mode 100644 updates/14.sql create mode 100644 updates/15.php create mode 100644 updates/16.php create mode 100644 updates/16.sql create mode 100644 updates/17.sql create mode 100644 updates/18.sql create mode 100644 updates/19.sql create mode 100644 updates/20.sql create mode 100644 updates/21.sql create mode 100644 updates/22.sql create mode 100644 updates/23.sql create mode 100644 updates/24.sql create mode 100644 updates/25.sql create mode 100644 updates/26.sql create mode 100644 updates/27.sql create mode 100644 updates/28.sql create mode 100644 updates/29.sql create mode 100644 updates/3.sql create mode 100644 updates/30.sql create mode 100644 updates/31.sql create mode 100644 updates/33.sql create mode 100644 updates/34.sql create mode 100644 updates/35.sql create mode 100644 updates/36.sql create mode 100644 updates/37.sql create mode 100644 updates/38.sql create mode 100644 updates/39.sql create mode 100644 updates/40.sql create mode 100644 updates/41.sql create mode 100644 updates/42.sql create mode 100644 updates/43.sql create mode 100644 updates/44.sql create mode 100644 updates/45.sql create mode 100644 updates/46.sql create mode 100644 updates/47.sql create mode 100644 updates/48.sql create mode 100644 updates/49.php create mode 100644 updates/49.sql create mode 100644 updates/5.sql create mode 100644 updates/50.sql create mode 100644 updates/db_version.txt create mode 100644 updates/full_16.sql.gz delete mode 100644 user_activate.php delete mode 100644 user_invite.php delete mode 100644 user_login.php delete mode 100644 user_multirole.php delete mode 100644 user_new.php delete mode 100644 user_page.inc.php delete mode 100644 user_password.php delete mode 100644 user_personal.php create mode 100644 v_main.php create mode 100644 v_options.php create mode 100644 v_personal.php create mode 100644 v_tours.php delete mode 100644 version.txt delete mode 100644 volunteer.inc.php delete mode 100644 volunteer_main.php delete mode 100644 volunteer_position.php delete mode 100644 winners.php create mode 100644 xml.inc.php diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c680c402..2f69754e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,7 +5,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && apt-get clean -y && rm -rf /var/lib/apt/lists/* # Install php-mysql driver -RUN docker-php-ext-install pdo pdo_mysql +RUN docker-php-ext-install pdo pdo_mysql mysqli # [Optional] Uncomment this section to install additional OS packages. RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ diff --git a/.gitignore b/.gitignore index af3cc92d..a38ad9b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,24 @@ -data/ -!.devcontainer/science-ation-blank-generic.sql -.devcontainer/*.sql \ No newline at end of file +# Object files +*.o +*.ko + +# Libraries +*.lib +*.a + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app + +#config +config.inc.php + + +src/db.c diff --git a/.htaccess b/.htaccess deleted file mode 100644 index 92615438..00000000 --- a/.htaccess +++ /dev/null @@ -1,9 +0,0 @@ -php_flag register_globals off -php_flag magic_quotes_gpc off -RewriteEngine On - -RewriteCond %{SCRIPT_FILENAME} !-f -RewriteCond %{SCRIPT_FILENAME} !-l -RewriteCond %{SCRIPT_FILENAME} !-d -RewriteRule ^web/(.*)$ cms.php?f=$1 [L] - diff --git a/PHPMailer/.htaccess b/PHPMailer/.htaccess new file mode 100644 index 00000000..2ff16417 --- /dev/null +++ b/PHPMailer/.htaccess @@ -0,0 +1,2 @@ +Require all denied +Options -Indexes diff --git a/PHPMailer/LICENSE b/PHPMailer/LICENSE new file mode 100644 index 00000000..8e0763d1 --- /dev/null +++ b/PHPMailer/LICENSE @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/PHPMailer/PHPMailerAutoload.php b/PHPMailer/PHPMailerAutoload.php new file mode 100644 index 00000000..be0dad25 --- /dev/null +++ b/PHPMailer/PHPMailerAutoload.php @@ -0,0 +1,46 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2013 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * PHPMailer SPL autoloader. + * @param string $classname The name of the class to load + */ +function PHPMailerAutoload($classname) +{ + //Can't use __DIR__ as it's only in PHP 5.3+ + $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php'; + if (is_readable($filename)) { + require $filename; + } +} + +if (version_compare(PHP_VERSION, '5.1.2', '>=')) { + //SPL autoloading was introduced in PHP 5.1.2 + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + spl_autoload_register('PHPMailerAutoload', true, true); + } else { + spl_autoload_register('PHPMailerAutoload'); + } +} else { + //Fall back to traditional autoload for old PHP versions + function __autoload($classname) + { + PHPMailerAutoload($classname); + } +} diff --git a/PHPMailer/README.md b/PHPMailer/README.md new file mode 100644 index 00000000..adfcda4d --- /dev/null +++ b/PHPMailer/README.md @@ -0,0 +1,145 @@ +# PHPMailer - A full-featured email creation and transfer class for PHP + +Build status: [![Build Status](https://travis-ci.org/Synchro/PHPMailer.png)](https://travis-ci.org/Synchro/PHPMailer) + +## Class Features + +- Probably the world's most popular code for sending email from PHP! +- Used by many open-source projects: Drupal, SugarCRM, Yii, Joomla! and many more +- Integrated SMTP support - send without a local mail server +- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs +- Multipart/alternative emails for mail clients that do not read HTML email +- Support for 8bit, base64, binary, and quoted-printable encoding +- SMTP authentication with LOGIN, PLAIN, NTLM and CRAM-MD5 mechanisms +- Native language support +- DKIM and S/MIME encryption support +- Compatible with PHP 5.0 and later +- Much more! + +## Why you might need it + +Many PHP developers utilize email in their code. The only PHP function that supports this is the mail() function. However, it does not provide any assistance for making use of popular features such as HTML-based emails and attachments. + +Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules - the vast majority of code that you'll find online that uses the mail() function directly is just plain wrong! +*Please* don't be tempted to do it yourself - if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own - try SwiftMailer, Zend_Mail, eZcomponents etc. + +The PHP mail() function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD and OS X platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server. + +## License + +This software is licenced under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html). Please read LICENSE for information on the +software availability and distribution. + +## Installation & loading + +PHPMailer is available via [Composer/Packagist](https://packagist.org/packages/phpmailer/phpmailer). Alternatively, just copy the contents of the PHPMailer folder into somewhere that's in your PHP `include_path` setting. If you don't speak git or just want a tarball, click the 'zip' button at the top of the page in GitHub. + +PHPMailer provides an SPL-compatible autoloader, and that is the preferred way of loading the library - just `require '/path/to/PHPMailerAutoload.php';` and everything should work. The autoloader does not throw errors if it can't find classes so it prepends itself to the SPL list, allowing your own (or your framework's) autoloader to catch errors. SPL autoloading was introduced in PHP 5.1.0, so if you are using a version older than that you will need to require/include each class manually. +PHPMailer does *not* declare a namespace because namespaces were only introduced in PHP 5.3. + +### Minimal installation + +While installing the entire package manually or with composer is simple, convenient and reliable, you may want to include only vital files in your project. At the very least you will need [class.phpmailer.php](class.phpmailer.php). If you're using SMTP, you'll need [class.smtp.php](class.smtp.php), and if you're using POP-before SMTP, you'll need [class.pop3.php](class.pop3.php). For all of these, we recommend you use [the autoloader](PHPMailerAutoload.php) too. You can skip the [language](language/) folder if you're not showing errors to users and can make do with English-only errors. You may need the additional classes in the [extras](extras/) folder if you are using those features, including NTLM authentication, advanced HTML-to-text conversion and ics generation. + +## A Simple Example + +```php +isSMTP(); // Set mailer to use SMTP +$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup server +$mail->SMTPAuth = true; // Enable SMTP authentication +$mail->Username = 'jswan'; // SMTP username +$mail->Password = 'secret'; // SMTP password +$mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl' also accepted + +$mail->From = 'from@example.com'; +$mail->FromName = 'Mailer'; +$mail->addAddress('josh@example.net', 'Josh Adams'); // Add a recipient +$mail->addAddress('ellen@example.com'); // Name is optional +$mail->addReplyTo('info@example.com', 'Information'); +$mail->addCC('cc@example.com'); +$mail->addBCC('bcc@example.com'); + +$mail->WordWrap = 50; // Set word wrap to 50 characters +$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments +$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name +$mail->isHTML(true); // Set email format to HTML + +$mail->Subject = 'Here is the subject'; +$mail->Body = 'This is the HTML message body in bold!'; +$mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; + +if(!$mail->send()) { + echo 'Message could not be sent.'; + echo 'Mailer Error: ' . $mail->ErrorInfo; + exit; +} + +echo 'Message has been sent'; +``` + +You'll find plenty more to play with in the [examples](examples/) folder. + +That's it. You should now be ready to use PHPMailer! + +## Localization +PHPMailer defaults to English, but in the [language](language/) folder you'll find numerous (31 at the time of writing) translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this: + +```php +// To load the French version +$mail->setLanguage('fr', '/optional/path/to/language/directory/'); +``` + +We welcome corrections and new languages. + +## Documentation + +Generated documentation is [available online](http://phpmailer.github.io/PHPMailer/). + +You'll find some basic user-level docs in the [docs](docs/) folder, and you can generate complete API-level documentation using the [generatedocs.sh](docs/generatedocs.sh) shell script in the docs folder, though you'll need to install [PHPDocumentor](http://www.phpdoc.org) first. You may find [the unit tests](test/phpmailerTest.php) a good source of how to do various operations such as encryption. + +## Tests + +There is a PHPUnit test script in the [test](test/) folder. + +Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.png)](https://travis-ci.org/PHPMailer/PHPMailer) + +If this isn't passing, is there something you can do to help? + +## Contributing + +Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues). + +We're particularly interested in fixing edge-cases, expanding test coverage and updating translations. + +With the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone: + +`git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git` + +Please *don't* use the SourceForge or Google Code projects any more. + +## Changelog + +See [changelog](changelog.md). + +## History +- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/). +- Marcus Bointon (coolbru on SF) and Andy Prevost (codeworxtech) took over the project in 2004. +- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski. +- Marcus created his fork on [GitHub](https://github.com/Synchro/PHPMailer). +- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer. +- PHPMailer moves to the [PHPMailer organisation](https://github.com/PHPMailer) on GitHub. + +### What's changed since moving from SourceForge? +- Official successor to the SourceForge and Google Code projects. +- Test suite. +- Continuous integration with Travis-CI. +- Composer support. +- Public development. +- Additional languages and language strings. +- CRAM-MD5 authentication support. +- Preserves full repo history of authors, commits and branches from the original SourceForge project. diff --git a/PHPMailer/changelog.md b/PHPMailer/changelog.md new file mode 100644 index 00000000..6f91ffae --- /dev/null +++ b/PHPMailer/changelog.md @@ -0,0 +1,555 @@ +# ChangeLog + +* Increase timeout to match RFC2821 section 4.5.3.2 and thus not fail greetdelays, fixes #104 +* Add timestamps to default debug output +* Add connection events and new level 3 to debug output options +* Chinese language update (Thanks to @binaryoung) +* Allow custom Mailer types (thanks to @michield) +* Cope with spaces around SMTP host specs +* Fix processing of multiple hosts in connect string +* Added Galician translation (Thanks to @donatorouco) +* Autoloader now prepends +* Minor docs update +* Add Latvian translation (Thanks to @eddsstudio) +* Add Belarusian translation (Thanks to @amaksymiuk) +* Make autoloader work better on older PHP versions +* Avoid double-encoding if mbstring is overloading mail() + +## Version 5.2.7 (September 12th 2013) +* Add Ukranian translation from @Krezalis +* Support for do_verp +* Fix bug in CRAM-MD5 AUTH +* Propagate Debugoutput option to SMTP class (@Reblutus) +* Determine MIME type of attachments automatically +* Add cross-platform, multibyte-safe pathinfo replacement (with tests) and use it +* Add a new 'html' Debugoutput type +* Clean up SMTP debug output, remove embedded HTML +* Some small changes in header formatting to improve IETF msglint test results +* Update test_script to use some recently changed features, rename to code_generator +* Generated code actually works! +* Update SyntaxHighlighter +* Major overhaul and cleanup of example code +* New PHPMailer graphic +* msgHTML now uses RFC2392-compliant content ids +* Add line break normalization function and use it in msgHTML +* Don't set unnecessary reply-to addresses +* Make fakesendmail.sh a bit cleaner and safer +* Set a content-transfer-encoding on multiparts (fixes msglint error) +* Fix cid generation in msgHTML (Thanks to @digitalthought) +* Fix handling of multiple SMTP servers (Thanks to @NanoCaiordo) +* SMTP->connect() now supports stream context options (Thanks to @stanislavdavid) +* Add support for iCal event alternatives (Thanks to @reblutus) +* Update to Polish language file (Thanks to Krzysztof Kowalewski) +* Update to Norwegian language file (Thanks to @datagutten) +* Update to Hungarian language file (Thanks to @dominicus-75) +* Add Persian/Farsi translation from @jaii +* Make SMTPDebug property type match type in SMTP class +* Add unit tests for DKIM +* Major refactor of SMTP class +* Reformat to PSR-2 coding standard +* Introduce autoloader +* Allow overriding of SMTP class +* Overhaul of PHPDocs +* Fix broken Q-encoding +* Czech language update (Thanks to @nemelu) +* Removal of excess blank lines in messages +* Added fake POP server and unit tests for POP-before-SMTP + +## Version 5.2.6 (April 11th 2013) +* Reflect move to PHPMailer GitHub organisation at https://github.com/PHPMailer/PHPMailer +* Fix unbumped version numbers +* Update packagist.org with new location +* Clean up Changelog + +## Version 5.2.5 (April 6th 2013) +* First official release after move from Google Code +* Fixes for qmail when sending via mail() +* Merge in changes from Google code 5.2.4 release +* Minor coding standards cleanup in SMTP class +* Improved unit tests, now tests S/MIME signing +* Travis-CI support on GitHub, runs tests with fake SMTP server + +## Version 5.2.4 (February 19, 2013) +* Fix tag and version bug. +* un-deprecate isSMTP(), isMail(), IsSendmail() and isQmail(). +* Numerous translation updates + +## Version 5.2.3 (February 8, 2013) +* Fix issue with older PCREs and ValidateAddress() (Bugz: 124) +* Add CRAM-MD5 authentication, thanks to Elijah madden, https://github.com/okonomiyaki3000 +* Replacement of obsolete Quoted-Printable encoder with a much better implementation +* Composer package definition +* New language added: Hebrew + +## Version 5.2.2 (December 3, 2012) +* Some fixes and syncs from https://github.com/Synchro/PHPMailer +* Add Slovak translation, thanks to Michal Tinka + +## Version 5.2.2-rc2 (November 6, 2012) +* Fix SMTP server rotation (Bugz: 118) +* Allow override of autogen'ed 'Date' header (for Drupal's + og_mailinglist module) +* No whitespace after '-f' option (Bugz: 116) +* Work around potential warning (Bugz: 114) + +## Version 5.2.2-rc1 (September 28, 2012) +* Header encoding works with long lines (Bugz: 93) +* Turkish language update (Bugz: 94) +* undefined $pattern in EncodeQ bug squashed (Bugz: 98) +* use of mail() in safe_mode now works (Bugz: 96) +* ValidateAddress() now 'public static' so people can override the + default and use their own validation scheme. +* ValidateAddress() no longer uses broken FILTER_VALIDATE_EMAIL +* Added in AUTH PLAIN SMTP authentication + +## Version 5.2.2-beta2 (August 17, 2012) +* Fixed Postfix VERP support (Bugz: 92) +* Allow action_function callbacks to pass/use + the From address (passed as final param) +* Prevent inf look for get_lines() (Bugz: 77) +* New public var ($UseSendmailOptions). Only pass sendmail() + options iff we really are using sendmail or something sendmail + compatible. (Bugz: 75) +* default setting for LE returned to "\n" due to popular demand. + +## Version 5.2.2-beta1 (July 13, 2012) +* Expose PreSend() and PostSend() as public methods to allow + for more control if serializing message sending. +* GetSentMIMEMessage() only constructs the message copy when + needed. Save memory. +* Only pass params to mail() if the underlying MTA is + "sendmail" (as defined as "having the string sendmail + in its pathname") [#69] +* Attachments now work with Amazon SES and others [Bugz#70] +* Debug output now sent to stdout (via echo) or error_log [Bugz#5] +* New var: Debugoutput (for above) [Bugz#5] +* SMTP reads now Timeout aware (new var: Timeout=15) [Bugz#71] +* SMTP reads now can have a Timelimit associated with them + (new var: Timelimit=30)[Bugz#71] +* Fix quoting issue associated with charsets +* default setting for LE is now RFC compliant: "\r\n" +* Return-Path can now be user defined (new var: ReturnPath) + (the default is "" which implies no change from previous + behavior, which was to use either From or Sender) [Bugz#46] +* X-Mailer header can now be disabled (by setting to a + whitespace string, eg " ") [Bugz#66] +* Bugz closed: #68, #60, #42, #43, #59, #55, #66, #48, #49, + #52, #31, #41, #5. #70, #69 + +## Version 5.2.1 (January 16, 2012) +* Closed several bugs#5 +* Performance improvements +* MsgHTML() now returns the message as required. +* New method: GetSentMIMEMessage() (returns full copy of sent message) + +## Version 5.2 (July 19, 2011) +* protected MIME body and header +* better DKIM DNS Resource Record support +* better aly handling +* htmlfilter class added to extras +* moved to Apache Extras + +## Version 5.1 (October 20, 2009) +* fixed filename issue with AddStringAttachment (thanks to Tony) +* fixed "SingleTo" property, now works with Senmail, Qmail, and SMTP in + addition to PHP mail() +* added DKIM digital signing functionality, new properties: + - DKIM_domain (sets the domain name) + - DKIM_private (holds DKIM private key) + - DKIM_passphrase (holds your DKIM passphrase) + - DKIM_selector (holds the DKIM "selector") + - DKIM_identity (holds the identifying email address) +* added callback function support + - callback function parameters include: + result, to, cc, bcc, subject and body + - see the test/test_callback.php file for usage. +* added "auto" identity functionality + - can automatically add: + - Return-path (if Sender not set) + - Reply-To (if ReplyTo not set) + - can be disabled: + - $mail->SetFrom('yourname@yourdomain.com','First Last',false); + - or by adding the $mail->Sender and/or $mail->ReplyTo properties + +Note: "auto" identity added to help with emails ending up in spam or junk boxes because of missing headers + +## Version 5.0.2 (May 24, 2009) +* Fix for missing attachments when inline graphics are present +* Fix for missing Cc in header when using SMTP (mail was sent, + but not displayed in header -- Cc receiver only saw email To: + line and no Cc line, but did get the email (To receiver + saw same) + +## Version 5.0.1 (April 05, 2009) +* Temporary fix for missing attachments + +## Version 5.0.0 (April 02, 2009) +With the release of this version, we are initiating a new version numbering +system to differentiate from the PHP4 version of PHPMailer. +Most notable in this release is fully object oriented code. + +### class.smtp.php: +* Refactored class.smtp.php to support new exception handling +* code size reduced from 29.2 Kb to 25.6 Kb +* Removed unnecessary functions from class.smtp.php: + - public function Expand($name) { + - public function Help($keyword="") { + - public function Noop() { + - public function Send($from) { + - public function SendOrMail($from) { + - public function Verify($name) { + +### class.phpmailer.php: +* Refactored class.phpmailer.php with new exception handling +* Changed processing functionality of Sendmail and Qmail so they cannot be + inadvertently used +* removed getFile() function, just became a simple wrapper for + file_get_contents() +* added check for PHP version (will gracefully exit if not at least PHP 5.0) +* enhanced code to check if an attachment source is the same as an embedded or + inline graphic source to eliminate duplicate attachments + +### New /test_script +We have written a test script you can use to test the script as part of your +installation. Once you press submit, the test script will send a multi-mime +email with either the message you type in or an HTML email with an inline +graphic. Two attachments are included in the email (one of the attachments +is also the inline graphic so you can see that only one copy of the graphic +is sent in the email). The test script will also display the functional +script that you can copy/paste to your editor to duplicate the functionality. + +### New examples +All new examples in both basic and advanced modes. Advanced examples show + Exception handling. + +### PHPDocumentator (phpdocs) documentation for PHPMailer version 5.0.0 +All new documentation + +## Version 2.3 (November 06, 2008) +* added Arabic language (many thanks to Bahjat Al Mostafa) +* removed English language from language files and made it a default within + class.phpmailer.php - if no language is found, it will default to use + the english language translation +* fixed public/private declarations +* corrected line 1728, $basedir to $directory +* added $sign_cert_file to avoid improper duplicate use of $sign_key_file +* corrected $this->Hello on line 612 to $this->Helo +* changed default of $LE to "\r\n" to comply with RFC 2822. Can be set by the user + if default is not acceptable +* removed trim() from return results in EncodeQP +* /test and three files it contained are removed from version 2.3 +* fixed phpunit.php for compliance with PHP5 +* changed $this->AltBody = $textMsg; to $this->AltBody = html_entity_decode($textMsg); +* We have removed the /phpdoc from the downloads. All documentation is now on + the http://phpmailer.codeworxtech.com website. + +## Version 2.2.1 () July 19 2008 +* fixed line 1092 in class.smtp.php (my apologies, error on my part) + +## Version 2.2 () July 15 2008 +* Fixed redirect issue (display of UTF-8 in thank you redirect) +* fixed error in getResponse function declaration (class.pop3.php) +* PHPMailer now PHP6 compliant +* fixed line 1092 in class.smtp.php (endless loop from missing = sign) + +## Version 2.1 (Wed, June 04 2008) +NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE APPRECIATED. + +* added S/MIME functionality (ability to digitally sign emails) + BIG THANKS TO "sergiocambra" for posting this patch back in November 2007. + The "Signed Emails" functionality adds the Sign method to pass the private key + filename and the password to read it, and then email will be sent with + content-type multipart/signed and with the digital signature attached. +* fully compatible with E_STRICT error level + - Please note: + In about half the test environments this development version was subjected + to, an error was thrown for the date() functions used (line 1565 and 1569). + This is NOT a PHPMailer error, it is the result of an incorrectly configured + PHP5 installation. The fix is to modify your 'php.ini' file and include the + date.timezone = America/New York + directive, to your own server timezone + - If you do get this error, and are unable to access your php.ini file: + In your PHP script, add + `date_default_timezone_set('America/Toronto');` + - do not try to use + `$myVar = date_default_timezone_get();` + as a test, it will throw an error. +* added ability to define path (mainly for embedded images) + function `MsgHTML($message,$basedir='')` ... where: + `$basedir` is the fully qualified path +* fixed `MsgHTML()` function: + - Embedded Images where images are specified by `://` will not be altered or embedded +* fixed the return value of SMTP exit code ( pclose ) +* addressed issue of multibyte characters in subject line and truncating +* added ability to have user specified Message ID + (default is still that PHPMailer create a unique Message ID) +* corrected unidentified message type to 'application/octet-stream' +* fixed chunk_split() multibyte issue (thanks to Colin Brown, et al). +* added check for added attachments +* enhanced conversion of HTML to text in MsgHTML (thanks to "brunny") + +## Version 2.1.0beta2 (Sun, Dec 02 2007) +* implemented updated EncodeQP (thanks to coolbru, aka Marcus Bointon) +* finished all testing, all known bugs corrected, enhancements tested + +Note: will NOT work with PHP4. + +Please note, this is BETA software **DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS; INTENDED STRICTLY FOR TESTING** + +## Version 2.1.0beta1 +Please note, this is BETA software +** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS + INTENDED STRICTLY FOR TESTING + +## Version 2.0.0 rc2 (Fri, Nov 16 2007), interim release +* implements new property to control VERP in class.smtp.php + example (requires instantiating class.smtp.php): + $mail->do_verp = true; +* POP-before-SMTP functionality included, thanks to Richard Davey + (see class.pop3.php & pop3_before_smtp_test.php for examples) +* included example showing how to use PHPMailer with GMAIL +* fixed the missing Cc in SendMail() and Mail() + +****************** +A note on sending bulk emails: + +If the email you are sending is not personalized, consider using the +"undisclosed-recipient:;" strategy. That is, put all of your recipients +in the Bcc field and set the To field to "undisclosed-recipients:;". +It's a lot faster (only one send) and saves quite a bit on resources. +Contrary to some opinions, this will not get you listed in spam engines - +it's a legitimate way for you to send emails. + +A partial example for use with PHPMailer: + +``` +$mail->AddAddress("undisclosed-recipients:;"); +$mail->AddBCC("email1@anydomain.com,email2@anyotherdomain.com,email3@anyalternatedomain.com"); +``` + +Many email service providers restrict the number of emails that can be sent +in any given time period. Often that is between 50 - 60 emails maximum +per hour or per send session. + +If that's the case, then break up your Bcc lists into chunks that are one +less than your limit, and put a pause in your script. +******************* + +## Version 2.0.0 rc1 (Thu, Nov 08 2007), interim release +* dramatically simplified using inline graphics ... it's fully automated and requires no user input +* added automatic document type detection for attachments and pictures +* added MsgHTML() function to replace Body tag for HTML emails +* fixed the SendMail security issues (input validation vulnerability) +* enhanced the AddAddresses functionality so that the "Name" portion is used in the email address +* removed the need to use the AltBody method (set from the HTML, or default text used) +* set the PHP Mail() function as the default (still support SendMail, SMTP Mail) +* removed the need to set the IsHTML property (set automatically) +* added Estonian language file by Indrek Päri +* added header injection patch +* added "set" method to permit users to create their own pseudo-properties like 'X-Headers', etc. + example of use: + +``` +$mail->set('X-Priority', '3'); +$mail->set('X-MSMail-Priority', 'Normal'); +``` + +* fixed warning message in SMTP get_lines method +* added TLS/SSL SMTP support. Example of use: + +``` +$mail = new PHPMailer(); +$mail->Mailer = "smtp"; +$mail->Host = "smtp.example.com"; +$mail->SMTPSecure = "tls"; // option +//$mail->SMTPSecure = "ssl"; // option +... +$mail->Send(); +``` + +* PHPMailer has been tested with PHP4 (4.4.7) and PHP5 (5.2.7) +* Works with PHP installed as a module or as CGI-PHP +NOTE: will NOT work with PHP5 in E_STRICT error mode + +## Version 1.73 (Sun, Jun 10 2005) +* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf +* Now has a total of 20 translations +* Fixed alt attachments bug: http://tinyurl.com/98u9k + +## Version 1.72 (Wed, May 25 2004) +* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations. +* Received: Removed this method because spam filter programs like + SpamAssassin reject this header. +* Fixed error count bug. +* SetLanguage default is now "language/". +* Fixed magic_quotes_runtime bug. + +## Version 1.71 (Tue, Jul 28 2003) +* Made several speed enhancements +* Added German and Italian translation files +* Fixed HELO/AUTH bugs on keep-alive connects +* Now provides an error message if language file does not load +* Fixed attachment EOL bug +* Updated some unclear documentation +* Added additional tests and improved others + +## Version 1.70 (Mon, Jun 20 2003) +* Added SMTP keep-alive support +* Added IsError method for error detection +* Added error message translation support (SetLanguage) +* Refactored many methods to increase library performance +* Hello now sends the newer EHLO message before HELO as per RFC 2821 +* Removed the boundary class and replaced it with GetBoundary +* Removed queue support methods +* New $Hostname variable +* New Message-ID header +* Received header reformat +* Helo variable default changed to $Hostname +* Removed extra spaces in Content-Type definition (#667182) +* Return-Path should be set to Sender when set +* Adds Q or B encoding to headers when necessary +* quoted-encoding should now encode NULs \000 +* Fixed encoding of body/AltBody (#553370) +* Adds "To: undisclosed-recipients:;" when all recipients are hidden (BCC) +* Multiple bug fixes + +## Version 1.65 (Fri, Aug 09 2002) +* Fixed non-visible attachment bug (#585097) for Outlook +* SMTP connections are now closed after each transaction +* Fixed SMTP::Expand return value +* Converted SMTP class documentation to phpDocumentor format + +## Version 1.62 (Wed, Jun 26 2002) +* Fixed multi-attach bug +* Set proper word wrapping +* Reduced memory use with attachments +* Added more debugging +* Changed documentation to phpDocumentor format + +## Version 1.60 (Sat, Mar 30 2002) +* Sendmail pipe and address patch (Christian Holtje) +* Added embedded image and read confirmation support (A. Ognio) +* Added unit tests +* Added SMTP timeout support (*nix only) +* Added possibly temporary PluginDir variable for SMTP class +* Added LE message line ending variable +* Refactored boundary and attachment code +* Eliminated SMTP class warnings +* Added SendToQueue method for future queuing support + +## Version 1.54 (Wed, Dec 19 2001) +* Add some queuing support code +* Fixed a pesky multi/alt bug +* Messages are no longer forced to have "To" addresses + +## Version 1.50 (Thu, Nov 08 2001) +* Fix extra lines when not using SMTP mailer +* Set WordWrap variable to int with a zero default + +## Version 1.47 (Tue, Oct 16 2001) +* Fixed Received header code format +* Fixed AltBody order error +* Fixed alternate port warning + +## Version 1.45 (Tue, Sep 25 2001) +* Added enhanced SMTP debug support +* Added support for multiple ports on SMTP +* Added Received header for tracing +* Fixed AddStringAttachment encoding +* Fixed possible header name quote bug +* Fixed wordwrap() trim bug +* Couple other small bug fixes + +## Version 1.41 (Wed, Aug 22 2001) +* Fixed AltBody bug w/o attachments +* Fixed rfc_date() for certain mail servers + +## Version 1.40 (Sun, Aug 12 2001) +* Added multipart/alternative support (AltBody) +* Documentation update +* Fixed bug in Mercury MTA + +## Version 1.29 (Fri, Aug 03 2001) +* Added AddStringAttachment() method +* Added SMTP authentication support + +## Version 1.28 (Mon, Jul 30 2001) +* Fixed a typo in SMTP class +* Fixed header issue with Imail (win32) SMTP server +* Made fopen() calls for attachments use "rb" to fix win32 error + +## Version 1.25 (Mon, Jul 02 2001) +* Added RFC 822 date fix (Patrice) +* Added improved error handling by adding a $ErrorInfo variable +* Removed MailerDebug variable (obsolete with new error handler) + +## Version 1.20 (Mon, Jun 25 2001) +* Added quoted-printable encoding (Patrice) +* Set Version as public and removed PrintVersion() +* Changed phpdoc to only display public variables and methods + +## Version 1.19 (Thu, Jun 21 2001) +* Fixed MS Mail header bug +* Added fix for Bcc problem with mail(). *Does not work on Win32* + (See PHP bug report: http://www.php.net/bugs.php?id=11616) +* mail() no longer passes a fifth parameter when not needed + +## Version 1.15 (Fri, Jun 15 2001) +Note: these changes contributed by Patrice Fournier +* Changed all remaining \n to \r\n +* Bcc: header no longer writen to message except + when sent directly to sendmail +* Added a small message to non-MIME compliant mail reader +* Added Sender variable to change the Sender email + used in -f for sendmail/mail and in 'MAIL FROM' for smtp mode +* Changed boundary setting to a place it will be set only once +* Removed transfer encoding for whole message when using multipart +* Message body now uses Encoding in multipart messages +* Can set encoding and type to attachments 7bit, 8bit + and binary attachment are sent as is, base64 are encoded +* Can set Encoding to base64 to send 8 bits body + through 7 bits servers + +## Version 1.10 (Tue, Jun 12 2001) +* Fixed win32 mail header bug (printed out headers in message body) + +## Version 1.09 (Fri, Jun 08 2001) +* Changed date header to work with Netscape mail programs +* Altered phpdoc documentation + +## Version 1.08 (Tue, Jun 05 2001) +* Added enhanced error-checking +* Added phpdoc documentation to source + +## Version 1.06 (Fri, Jun 01 2001) +* Added optional name for file attachments + +## Version 1.05 (Tue, May 29 2001) +* Code cleanup +* Eliminated sendmail header warning message +* Fixed possible SMTP error + +## Version 1.03 (Thu, May 24 2001) +* Fixed problem where qmail sends out duplicate messages + +## Version 1.02 (Wed, May 23 2001) +* Added multiple recipient and attachment Clear* methods +* Added Sendmail public variable +* Fixed problem with loading SMTP library multiple times + +## Version 0.98 (Tue, May 22 2001) +* Fixed problem with redundant mail hosts sending out multiple messages +* Added additional error handler code +* Added AddCustomHeader() function +* Added support for Microsoft mail client headers (affects priority) +* Fixed small bug with Mailer variable +* Added PrintVersion() function + +## Version 0.92 (Tue, May 15 2001) +* Changed file names to class.phpmailer.php and class.smtp.php to match + current PHP class trend. +* Fixed problem where body not being printed when a message is attached +* Several small bug fixes + +## Version 0.90 (Tue, April 17 2001) +* Initial public release diff --git a/PHPMailer/class.phpmailer.php b/PHPMailer/class.phpmailer.php new file mode 100644 index 00000000..2f6831a8 --- /dev/null +++ b/PHPMailer/class.phpmailer.php @@ -0,0 +1,3307 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2013 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +if (version_compare(PHP_VERSION, '5.0.0', '<')) { + exit("Sorry, PHPMailer will only run on PHP version 5 or greater!\n"); +} + +/** + * PHPMailer - PHP email creation and transport class. + * PHP Version 5.0.0 + * @package PHPMailer + * @author Marcus Bointon (coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2013 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + */ +class PHPMailer +{ + /** + * The PHPMailer Version number. + * @type string + */ + public $Version = '5.2.7'; + + /** + * Email priority. + * Options: 1 = High, 3 = Normal, 5 = low. + * @type int + */ + public $Priority = 3; + + /** + * The character set of the message. + * @type string + */ + public $CharSet = 'iso-8859-1'; + + /** + * The MIME Content-type of the message. + * @type string + */ + public $ContentType = 'text/plain'; + + /** + * The message encoding. + * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". + * @type string + */ + public $Encoding = '8bit'; + + /** + * Holds the most recent mailer error message. + * @type string + */ + public $ErrorInfo = ''; + + /** + * The From email address for the message. + * @type string + */ + public $From = 'root@localhost'; + + /** + * The From name of the message. + * @type string + */ + public $FromName = 'Root User'; + + /** + * The Sender email (Return-Path) of the message. + * If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. + * @type string + */ + public $Sender = ''; + + /** + * The Return-Path of the message. + * If empty, it will be set to either From or Sender. + * @type string + */ + public $ReturnPath = ''; + + /** + * The Subject of the message. + * @type string + */ + public $Subject = ''; + + /** + * An HTML or plain text message body. + * If HTML then call isHTML(true). + * @type string + */ + public $Body = ''; + + /** + * The plain-text message body. + * This body can be read by mail clients that do not have HTML email + * capability such as mutt & Eudora. + * Clients that can read HTML will view the normal Body. + * @type string + */ + public $AltBody = ''; + + /** + * An iCal message part body. + * Only supported in simple alt or alt_inline message types + * To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator + * @link http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ + * @link http://kigkonsult.se/iCalcreator/ + * @type string + */ + public $Ical = ''; + + /** + * The complete compiled MIME message body. + * @access protected + * @type string + */ + protected $MIMEBody = ''; + + /** + * The complete compiled MIME message headers. + * @type string + * @access protected + */ + protected $MIMEHeader = ''; + + /** + * Extra headers that createHeader() doesn't fold in. + * @type string + * @access protected + */ + protected $mailHeader = ''; + + /** + * Word-wrap the message body to this number of chars. + * @type int + */ + public $WordWrap = 0; + + /** + * Which method to use to send mail. + * Options: "mail", "sendmail", or "smtp". + * @type string + */ + public $Mailer = 'mail'; + + /** + * The path to the sendmail program. + * @type string + */ + public $Sendmail = '/usr/sbin/sendmail'; + + /** + * Whether mail() uses a fully sendmail-compatible MTA. + * One which supports sendmail's "-oi -f" options. + * @type bool + */ + public $UseSendmailOptions = true; + + /** + * Path to PHPMailer plugins. + * Useful if the SMTP class is not in the PHP include path. + * @type string + * @deprecated Should not be needed now there is an autoloader. + */ + public $PluginDir = ''; + + /** + * The email address that a reading confirmation should be sent to. + * @type string + */ + public $ConfirmReadingTo = ''; + + /** + * The hostname to use in Message-Id and Received headers + * and as default HELO string. + * If empty, the value returned + * by SERVER_NAME is used or 'localhost.localdomain'. + * @type string + */ + public $Hostname = ''; + + /** + * An ID to be used in the Message-Id header. + * If empty, a unique id will be generated. + * @type string + */ + public $MessageID = ''; + + /** + * The message Date to be used in the Date header. + * If empty, the current date will be added. + * @type string + */ + public $MessageDate = ''; + + /** + * SMTP hosts. + * Either a single hostname or multiple semicolon-delimited hostnames. + * You can also specify a different port + * for each host by using this format: [hostname:port] + * (e.g. "smtp1.example.com:25;smtp2.example.com"). + * Hosts will be tried in order. + * @type string + */ + public $Host = 'localhost'; + + /** + * The default SMTP server port. + * @type int + * @Todo Why is this needed when the SMTP class takes care of it? + */ + public $Port = 25; + + /** + * The SMTP HELO of the message. + * Default is $Hostname. + * @type string + * @see PHPMailer::$Hostname + */ + public $Helo = ''; + + /** + * The secure connection prefix. + * Options: "", "ssl" or "tls" + * @type string + */ + public $SMTPSecure = ''; + + /** + * Whether to use SMTP authentication. + * Uses the Username and Password properties. + * @type bool + * @see PHPMailer::$Username + * @see PHPMailer::$Password + */ + public $SMTPAuth = false; + + /** + * SMTP username. + * @type string + */ + public $Username = ''; + + /** + * SMTP password. + * @type string + */ + public $Password = ''; + + /** + * SMTP auth type. + * Options are LOGIN (default), PLAIN, NTLM, CRAM-MD5 + * @type string + */ + public $AuthType = ''; + + /** + * SMTP realm. + * Used for NTLM auth + * @type string + */ + public $Realm = ''; + + /** + * SMTP workstation. + * Used for NTLM auth + * @type string + */ + public $Workstation = ''; + + /** + * The SMTP server timeout in seconds. + * @type int + */ + public $Timeout = 10; + + /** + * SMTP class debug output mode. + * Options: 0 = off, 1 = commands, 2 = commands and data + * @type int + * @see SMTP::$do_debug + */ + public $SMTPDebug = 0; + + /** + * The function/method to use for debugging output. + * Options: "echo" or "error_log" + * @type string + * @see SMTP::$Debugoutput + */ + public $Debugoutput = "echo"; + + /** + * Whether to keep SMTP connection open after each message. + * If this is set to true then to close the connection + * requires an explicit call to smtpClose(). + * @type bool + */ + public $SMTPKeepAlive = false; + + /** + * Whether to split multiple to addresses into multiple messages + * or send them all in one message. + * @type bool + */ + public $SingleTo = false; + + /** + * Storage for addresses when SingleTo is enabled. + * @type array + * @todo This should really not be public + */ + public $SingleToArray = array(); + + /** + * Whether to generate VERP addresses on send. + * Only applicable when sending via SMTP. + * @link http://en.wikipedia.org/wiki/Variable_envelope_return_path + * @type bool + */ + public $do_verp = false; + + /** + * Whether to allow sending messages with an empty body. + * @type bool + */ + public $AllowEmpty = false; + + /** + * The default line ending. + * @note The default remains "\n". We force CRLF where we know + * it must be used via self::CRLF. + * @type string + */ + public $LE = "\n"; + + /** + * DKIM selector. + * @type string + */ + public $DKIM_selector = ''; + + /** + * DKIM Identity. + * Usually the email address used as the source of the email + * @type string + */ + public $DKIM_identity = ''; + + /** + * DKIM passphrase. + * Used if your key is encrypted. + * @type string + */ + public $DKIM_passphrase = ''; + + /** + * DKIM signing domain name. + * @example 'example.com' + * @type string + */ + public $DKIM_domain = ''; + + /** + * DKIM private key file path. + * @type string + */ + public $DKIM_private = ''; + + /** + * Callback Action function name. + * + * The function that handles the result of the send email action. + * It is called out by send() for each email sent. + * + * Value can be: + * - 'function_name' for function names + * - 'Class::Method' for static method calls + * - array($object, 'Method') for calling methods on $object + * See http://php.net/is_callable manual page for more details. + * + * Parameters: + * bool $result result of the send action + * string $to email address of the recipient + * string $cc cc email addresses + * string $bcc bcc email addresses + * string $subject the subject + * string $body the email body + * string $from email address of sender + * + * @type string + */ + public $action_function = ''; + + /** + * What to use in the X-Mailer header. + * Options: null for default, whitespace for none, or a string to use + * @type string + */ + public $XMailer = ''; + + /** + * An instance of the SMTP sender class. + * @type SMTP + * @access protected + */ + protected $smtp = null; + + /** + * The array of 'to' addresses. + * @type array + * @access protected + */ + protected $to = array(); + + /** + * The array of 'cc' addresses. + * @type array + * @access protected + */ + protected $cc = array(); + + /** + * The array of 'bcc' addresses. + * @type array + * @access protected + */ + protected $bcc = array(); + + /** + * The array of reply-to names and addresses. + * @type array + * @access protected + */ + protected $ReplyTo = array(); + + /** + * An array of all kinds of addresses. + * Includes all of $to, $cc, $bcc, $replyto + * @type array + * @access protected + */ + protected $all_recipients = array(); + + /** + * The array of attachments. + * @type array + * @access protected + */ + protected $attachment = array(); + + /** + * The array of custom headers. + * @type array + * @access protected + */ + protected $CustomHeader = array(); + + /** + * The most recent Message-ID (including angular brackets). + * @type string + * @access protected + */ + protected $lastMessageID = ''; + + /** + * The message's MIME type. + * @type string + * @access protected + */ + protected $message_type = ''; + + /** + * The array of MIME boundary strings. + * @type array + * @access protected + */ + protected $boundary = array(); + + /** + * The array of available languages. + * @type array + * @access protected + */ + protected $language = array(); + + /** + * The number of errors encountered. + * @type integer + * @access protected + */ + protected $error_count = 0; + + /** + * The S/MIME certificate file path. + * @type string + * @access protected + */ + protected $sign_cert_file = ''; + + /** + * The S/MIME key file path. + * @type string + * @access protected + */ + protected $sign_key_file = ''; + + /** + * The S/MIME password for the key. + * Used only if the key is encrypted. + * @type string + * @access protected + */ + protected $sign_key_pass = ''; + + /** + * Whether to throw exceptions for errors. + * @type bool + * @access protected + */ + protected $exceptions = false; + + /** + * Error severity: message only, continue processing + */ + const STOP_MESSAGE = 0; + + /** + * Error severity: message, likely ok to continue processing + */ + const STOP_CONTINUE = 1; + + /** + * Error severity: message, plus full stop, critical error reached + */ + const STOP_CRITICAL = 2; + + /** + * SMTP RFC standard line ending + */ + const CRLF = "\r\n"; + + /** + * Constructor + * @param bool $exceptions Should we throw external exceptions? + */ + public function __construct($exceptions = false) + { + $this->exceptions = ($exceptions == true); + //Make sure our autoloader is loaded + if (version_compare(PHP_VERSION, '5.1.2', '>=') and + !spl_autoload_functions() || !in_array('PHPMailerAutoload', spl_autoload_functions())) { + require 'PHPMailerAutoload.php'; + } + } + + /** + * Destructor. + */ + public function __destruct() + { + if ($this->Mailer == 'smtp') { //close any open SMTP connection nicely + $this->smtpClose(); + } + } + + /** + * Call mail() in a safe_mode-aware fashion. + * Also, unless sendmail_path points to sendmail (or something that + * claims to be sendmail), don't pass params (not a perfect fix, + * but it will do) + * @param string $to To + * @param string $subject Subject + * @param string $body Message Body + * @param string $header Additional Header(s) + * @param string $params Params + * @access private + * @return bool + */ + private function mailPassthru($to, $subject, $body, $header, $params) + { + //Check overloading of mail function to avoid double-encoding + if (ini_get('mbstring.func_overload') & 1) { + $subject = $this->secureHeader($subject); + } else { + $subject = $this->encodeHeader($this->secureHeader($subject)); + } + if (ini_get('safe_mode') || !($this->UseSendmailOptions)) { + $rt = @mail($to, $subject, $body, $header); + } else { + $rt = @mail($to, $subject, $body, $header, $params); + } + return $rt; + } + + /** + * Output debugging info via user-defined method. + * Only if debug output is enabled. + * @see PHPMailer::$Debugoutput + * @see PHPMailer::$SMTPDebug + * @param string $str + */ + protected function edebug($str) + { + if (!$this->SMTPDebug) { + return; + } + switch ($this->Debugoutput) { + case 'error_log': + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking display that's HTML-safe + echo htmlentities(preg_replace('/[\r\n]+/', '', $str), ENT_QUOTES, $this->CharSet) . "
\n"; + break; + case 'echo': + default: + //Just echoes exactly what was received + echo $str; + } + } + + /** + * Sets message type to HTML or plain. + * @param bool $ishtml True for HTML mode. + * @return void + */ + public function isHTML($ishtml = true) + { + if ($ishtml) { + $this->ContentType = 'text/html'; + } else { + $this->ContentType = 'text/plain'; + } + } + + /** + * Send messages using SMTP. + * @return void + */ + public function isSMTP() + { + $this->Mailer = 'smtp'; + } + + /** + * Send messages using PHP's mail() function. + * @return void + */ + public function isMail() + { + $this->Mailer = 'mail'; + } + + /** + * Send messages using $Sendmail. + * @return void + */ + public function isSendmail() + { + if (!stristr(ini_get('sendmail_path'), 'sendmail')) { + $this->Sendmail = '/usr/sbin/sendmail'; + } + $this->Mailer = 'sendmail'; + } + + /** + * Send messages using qmail. + * @return void + */ + public function isQmail() + { + if (!stristr(ini_get('sendmail_path'), 'qmail')) { + $this->Sendmail = '/var/qmail/bin/qmail-inject'; + } + $this->Mailer = 'qmail'; + } + + /** + * Add a "To" address. + * @param string $address + * @param string $name + * @return bool true on success, false if address already used + */ + public function addAddress($address, $name = '') + { + return $this->addAnAddress('to', $address, $name); + } + + /** + * Add a "CC" address. + * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. + * @param string $address + * @param string $name + * @return bool true on success, false if address already used + */ + public function addCC($address, $name = '') + { + return $this->addAnAddress('cc', $address, $name); + } + + /** + * Add a "BCC" address. + * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. + * @param string $address + * @param string $name + * @return bool true on success, false if address already used + */ + public function addBCC($address, $name = '') + { + return $this->addAnAddress('bcc', $address, $name); + } + + /** + * Add a "Reply-to" address. + * @param string $address + * @param string $name + * @return bool + */ + public function addReplyTo($address, $name = '') + { + return $this->addAnAddress('Reply-To', $address, $name); + } + + /** + * Add an address to one of the recipient arrays. + * Addresses that have been added already return false, but do not throw exceptions + * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo' + * @param string $address The email address to send to + * @param string $name + * @throws phpmailerException + * @return bool true on success, false if address already used or invalid in some way + * @access protected + */ + protected function addAnAddress($kind, $address, $name = '') + { + if (!preg_match('/^(to|cc|bcc|Reply-To)$/', $kind)) { + $this->setError($this->lang('Invalid recipient array') . ': ' . $kind); + if ($this->exceptions) { + throw new phpmailerException('Invalid recipient array: ' . $kind); + } + $this->edebug($this->lang('Invalid recipient array') . ': ' . $kind); + return false; + } + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + if (!$this->validateAddress($address)) { + $this->setError($this->lang('invalid_address') . ': ' . $address); + if ($this->exceptions) { + throw new phpmailerException($this->lang('invalid_address') . ': ' . $address); + } + $this->edebug($this->lang('invalid_address') . ': ' . $address); + return false; + } + if ($kind != 'Reply-To') { + if (!isset($this->all_recipients[strtolower($address)])) { + array_push($this->$kind, array($address, $name)); + $this->all_recipients[strtolower($address)] = true; + return true; + } + } else { + if (!array_key_exists(strtolower($address), $this->ReplyTo)) { + $this->ReplyTo[strtolower($address)] = array($address, $name); + return true; + } + } + return false; + } + + /** + * Set the From and FromName properties. + * @param string $address + * @param string $name + * @param bool $auto Whether to also set the Sender address, defaults to true + * @throws phpmailerException + * @return bool + */ + public function setFrom($address, $name = '', $auto = true) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + if (!$this->validateAddress($address)) { + $this->setError($this->lang('invalid_address') . ': ' . $address); + if ($this->exceptions) { + throw new phpmailerException($this->lang('invalid_address') . ': ' . $address); + } + $this->edebug($this->lang('invalid_address') . ': ' . $address); + return false; + } + $this->From = $address; + $this->FromName = $name; + if ($auto) { + if (empty($this->Sender)) { + $this->Sender = $address; + } + } + return true; + } + + /** + * Return the Message-ID header of the last email. + * Technically this is the value from the last time the headers were created, + * but it's also the message ID of the last sent message except in + * pathological cases. + * @return string + */ + public function getLastMessageID() + { + return $this->lastMessageID; + } + + /** + * Check that a string looks like an email address. + * @param string $address The email address to check + * @param string $patternselect A selector for the validation pattern to use : + * 'auto' - pick best one automatically; + * 'pcre8' - use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; + * 'pcre' - use old PCRE implementation; + * 'php' - use PHP built-in FILTER_VALIDATE_EMAIL; faster, less thorough; + * 'noregex' - super fast, really dumb. + * @return bool + * @static + * @access public + */ + public static function validateAddress($address, $patternselect = 'auto') + { + if ($patternselect == 'auto') { + if (defined( + 'PCRE_VERSION' + ) + ) { //Check this instead of extension_loaded so it works when that function is disabled + if (version_compare(PCRE_VERSION, '8.0') >= 0) { + $patternselect = 'pcre8'; + } else { + $patternselect = 'pcre'; + } + } else { + //Filter_var appeared in PHP 5.2.0 and does not require the PCRE extension + if (version_compare(PHP_VERSION, '5.2.0') >= 0) { + $patternselect = 'php'; + } else { + $patternselect = 'noregex'; + } + } + } + switch ($patternselect) { + case 'pcre8': + /** + * Conforms to RFC5322: Uses *correct* regex on which FILTER_VALIDATE_EMAIL is + * based; So why not use FILTER_VALIDATE_EMAIL? Because it was broken to + * not allow a@b type valid addresses :( + * @link http://squiloople.com/2009/12/20/email-address-validation/ + * @copyright 2009-2010 Michael Rushton + * Feel free to use and redistribute this code. But please keep this copyright notice. + */ + return (bool)preg_match( + '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . + '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . + '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . + '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . + '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . + '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . + '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . + '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', + $address + ); + break; + case 'pcre': + //An older regex that doesn't need a recent PCRE + return (bool)preg_match( + '/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>' . + '[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")' . + '(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*' . + '@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})' . + '(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' . + '[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' . + '::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' . + '[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' . + '::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\])$/isD', + $address + ); + break; + case 'php': + default: + return (bool)filter_var($address, FILTER_VALIDATE_EMAIL); + break; + case 'noregex': + //No PCRE! Do something _very_ approximate! + //Check the address is 3 chars or longer and contains an @ that's not the first or last char + return (strlen($address) >= 3 + and strpos($address, '@') >= 1 + and strpos($address, '@') != strlen($address) - 1); + break; + } + } + + /** + * Create a message and send it. + * Uses the sending method specified by $Mailer. + * @throws phpmailerException + * @return bool false on error - See the ErrorInfo property for details of the error. + */ + public function send() + { + try { + if (!$this->preSend()) { + return false; + } + return $this->postSend(); + } catch (phpmailerException $e) { + $this->mailHeader = ''; + $this->setError($e->getMessage()); + if ($this->exceptions) { + throw $e; + } + return false; + } + } + + /** + * Prepare a message for sending. + * @throws phpmailerException + * @return bool + */ + public function preSend() + { + try { + $this->mailHeader = ""; + if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { + throw new phpmailerException($this->lang('provide_address'), self::STOP_CRITICAL); + } + + // Set whether the message is multipart/alternative + if (!empty($this->AltBody)) { + $this->ContentType = 'multipart/alternative'; + } + + $this->error_count = 0; // reset errors + $this->setMessageType(); + // Refuse to send an empty message unless we are specifically allowing it + if (!$this->AllowEmpty and empty($this->Body)) { + throw new phpmailerException($this->lang('empty_message'), self::STOP_CRITICAL); + } + + $this->MIMEHeader = $this->createHeader(); + $this->MIMEBody = $this->createBody(); + + // To capture the complete message when using mail(), create + // an extra header list which createHeader() doesn't fold in + if ($this->Mailer == 'mail') { + if (count($this->to) > 0) { + $this->mailHeader .= $this->addrAppend("To", $this->to); + } else { + $this->mailHeader .= $this->headerLine("To", "undisclosed-recipients:;"); + } + $this->mailHeader .= $this->headerLine( + 'Subject', + $this->encodeHeader($this->secureHeader(trim($this->Subject))) + ); + } + + // Sign with DKIM if enabled + if (!empty($this->DKIM_domain) + && !empty($this->DKIM_private) + && !empty($this->DKIM_selector) + && !empty($this->DKIM_domain) + && file_exists($this->DKIM_private)) { + $header_dkim = $this->DKIM_Add( + $this->MIMEHeader . $this->mailHeader, + $this->encodeHeader($this->secureHeader($this->Subject)), + $this->MIMEBody + ); + $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . self::CRLF . + str_replace("\r\n", "\n", $header_dkim) . self::CRLF; + } + return true; + + } catch (phpmailerException $e) { + $this->setError($e->getMessage()); + if ($this->exceptions) { + throw $e; + } + return false; + } + } + + /** + * Actually send a message. + * Send the email via the selected mechanism + * @throws phpmailerException + * @return bool + */ + public function postSend() + { + try { + // Choose the mailer and send through it + switch ($this->Mailer) { + case 'sendmail': + case 'qmail': + return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); + case 'smtp': + return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); + case 'mail': + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + default: + if (method_exists($this, $this->Mailer.'Send')) { + $sendMethod = $this->Mailer.'Send'; + return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); + } else { + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + } + } + } catch (phpmailerException $e) { + $this->setError($e->getMessage()); + if ($this->exceptions) { + throw $e; + } + $this->edebug($e->getMessage() . "\n"); + } + return false; + } + + /** + * Send mail using the $Sendmail program. + * @param string $header The message headers + * @param string $body The message body + * @see PHPMailer::$Sendmail + * @throws phpmailerException + * @access protected + * @return bool + */ + protected function sendmailSend($header, $body) + { + if ($this->Sender != '') { + if ($this->Mailer == 'qmail') { + $sendmail = sprintf("%s -f%s", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); + } else { + $sendmail = sprintf("%s -oi -f%s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); + } + } else { + if ($this->Mailer == 'qmail') { + $sendmail = sprintf("%s", escapeshellcmd($this->Sendmail)); + } else { + $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail)); + } + } + if ($this->SingleTo === true) { + foreach ($this->SingleToArray as $val) { + if (!@$mail = popen($sendmail, 'w')) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fputs($mail, "To: " . $val . "\n"); + fputs($mail, $header); + fputs($mail, $body); + $result = pclose($mail); + // implement call back function if it exists + $isSent = ($result == 0) ? 1 : 0; + $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body, $this->From); + if ($result != 0) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + } else { + if (!@$mail = popen($sendmail, 'w')) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fputs($mail, $header); + fputs($mail, $body); + $result = pclose($mail); + // implement call back function if it exists + $isSent = ($result == 0) ? 1 : 0; + $this->doCallback($isSent, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); + if ($result != 0) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + return true; + } + + /** + * Send mail using the PHP mail() function. + * @param string $header The message headers + * @param string $body The message body + * @link http://www.php.net/manual/en/book.mail.php + * @throws phpmailerException + * @access protected + * @return bool + */ + protected function mailSend($header, $body) + { + $toArr = array(); + foreach ($this->to as $t) { + $toArr[] = $this->addrFormat($t); + } + $to = implode(', ', $toArr); + + if (empty($this->Sender)) { + $params = " "; + } else { + $params = sprintf("-f%s", $this->Sender); + } + if ($this->Sender != '' and !ini_get('safe_mode')) { + $old_from = ini_get('sendmail_from'); + ini_set('sendmail_from', $this->Sender); + } + $rt = false; + if ($this->SingleTo === true && count($toArr) > 1) { + foreach ($toArr as $val) { + $rt = $this->mailPassthru($val, $this->Subject, $body, $header, $params); + // implement call back function if it exists + $isSent = ($rt == 1) ? 1 : 0; + $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body, $this->From); + } + } else { + $rt = $this->mailPassthru($to, $this->Subject, $body, $header, $params); + // implement call back function if it exists + $isSent = ($rt == 1) ? 1 : 0; + $this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); + } + if (isset($old_from)) { + ini_set('sendmail_from', $old_from); + } + if (!$rt) { + throw new phpmailerException($this->lang('instantiate'), self::STOP_CRITICAL); + } + return true; + } + + /** + * Get an instance to use for SMTP operations. + * Override this function to load your own SMTP implementation + * @return SMTP + */ + public function getSMTPInstance() + { + if (!is_object($this->smtp)) { + $this->smtp = new SMTP; + } + return $this->smtp; + } + + /** + * Send mail via SMTP. + * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. + * Uses the PHPMailerSMTP class by default. + * @see PHPMailer::getSMTPInstance() to use a different class. + * @param string $header The message headers + * @param string $body The message body + * @throws phpmailerException + * @uses SMTP + * @access protected + * @return bool + */ + protected function smtpSend($header, $body) + { + $bad_rcpt = array(); + + if (!$this->smtpConnect()) { + throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); + } + $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; + if (!$this->smtp->mail($smtp_from)) { + $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); + throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL); + } + + // Attempt to send attach all recipients + foreach ($this->to as $to) { + if (!$this->smtp->recipient($to[0])) { + $bad_rcpt[] = $to[0]; + $isSent = 0; + } else { + $isSent = 1; + } + $this->doCallback($isSent, $to[0], '', '', $this->Subject, $body, $this->From); + } + foreach ($this->cc as $cc) { + if (!$this->smtp->recipient($cc[0])) { + $bad_rcpt[] = $cc[0]; + $isSent = 0; + } else { + $isSent = 1; + } + $this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body, $this->From); + } + foreach ($this->bcc as $bcc) { + if (!$this->smtp->recipient($bcc[0])) { + $bad_rcpt[] = $bcc[0]; + $isSent = 0; + } else { + $isSent = 1; + } + $this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body, $this->From); + } + + if (!$this->smtp->data($header . $body)) { + throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL); + } + if ($this->SMTPKeepAlive == true) { + $this->smtp->reset(); + } else { + $this->smtp->quit(); + $this->smtp->close(); + } + if (count($bad_rcpt) > 0) { //Create error message for any bad addresses + throw new phpmailerException( + $this->lang('recipients_failed') . implode(', ', $bad_rcpt), + self::STOP_CONTINUE + ); + } + return true; + } + + /** + * Initiate a connection to an SMTP server. + * Returns false if the operation failed. + * @param array $options An array of options compatible with stream_context_create() + * @uses SMTP + * @access public + * @throws phpmailerException + * @return bool + */ + public function smtpConnect($options = array()) + { + if (is_null($this->smtp)) { + $this->smtp = $this->getSMTPInstance(); + } + + //Already connected? + if ($this->smtp->connected()) { + return true; + } + + $this->smtp->setTimeout($this->Timeout); + $this->smtp->setDebugLevel($this->SMTPDebug); + $this->smtp->setDebugOutput($this->Debugoutput); + $this->smtp->setVerp($this->do_verp); + $hosts = explode(';', $this->Host); + $lastexception = null; + + foreach ($hosts as $hostentry) { + $hostinfo = array(); + if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) { + //Not a valid host entry + continue; + } + //$hostinfo[2]: optional ssl or tls prefix + //$hostinfo[3]: the hostname + //$hostinfo[4]: optional port number + //The host string prefix can temporarily override the current setting for SMTPSecure + //If it's not specified, the default value is used + $prefix = ''; + $tls = ($this->SMTPSecure == 'tls'); + if ($hostinfo[2] == 'ssl' or ($hostinfo[2] == '' and $this->SMTPSecure == 'ssl')) { + $prefix = 'ssl://'; + $tls = false; //Can't have SSL and TLS at once + } elseif ($hostinfo[2] == 'tls') { + $tls = true; + //tls doesn't use a prefix + } + $host = $hostinfo[3]; + $port = $this->Port; + $tport = (integer)$hostinfo[4]; + if ($tport > 0 and $tport < 65536) { + $port = $tport; + } + if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { + try { + if ($this->Helo) { + $hello = $this->Helo; + } else { + $hello = $this->serverHostname(); + } + $this->smtp->hello($hello); + + if ($tls) { + if (!$this->smtp->startTLS()) { + throw new phpmailerException($this->lang('connect_host')); + } + //We must resend HELO after tls negotiation + $this->smtp->hello($hello); + } + if ($this->SMTPAuth) { + if (!$this->smtp->authenticate( + $this->Username, + $this->Password, + $this->AuthType, + $this->Realm, + $this->Workstation + ) + ) { + throw new phpmailerException($this->lang('authenticate')); + } + } + return true; + } catch (phpmailerException $e) { + $lastexception = $e; + //We must have connected, but then failed TLS or Auth, so close connection nicely + $this->smtp->quit(); + } + } + } + //If we get here, all connection attempts have failed, so close connection hard + $this->smtp->close(); + //As we've caught all exceptions, just report whatever the last one was + if ($this->exceptions and !is_null($lastexception)) { + throw $lastexception; + } + return false; + } + + /** + * Close the active SMTP session if one exists. + * @return void + */ + public function smtpClose() + { + if ($this->smtp !== null) { + if ($this->smtp->connected()) { + $this->smtp->quit(); + $this->smtp->close(); + } + } + } + + /** + * Set the language for error messages. + * Returns false if it cannot load the language file. + * The default language is English. + * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") + * @param string $lang_path Path to the language file directory, with trailing separator (slash) + * @return bool + * @access public + */ + public function setLanguage($langcode = 'en', $lang_path = 'language/') + { + //Define full set of translatable strings + $PHPMAILER_LANG = array( + 'authenticate' => 'SMTP Error: Could not authenticate.', + 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', + 'data_not_accepted' => 'SMTP Error: data not accepted.', + 'empty_message' => 'Message body empty', + 'encoding' => 'Unknown encoding: ', + 'execute' => 'Could not execute: ', + 'file_access' => 'Could not access file: ', + 'file_open' => 'File Error: Could not open file: ', + 'from_failed' => 'The following From address failed: ', + 'instantiate' => 'Could not instantiate mail function.', + 'invalid_address' => 'Invalid address', + 'mailer_not_supported' => ' mailer is not supported.', + 'provide_address' => 'You must provide at least one recipient email address.', + 'recipients_failed' => 'SMTP Error: The following recipients failed: ', + 'signing' => 'Signing Error: ', + 'smtp_connect_failed' => 'SMTP connect() failed.', + 'smtp_error' => 'SMTP server error: ', + 'variable_set' => 'Cannot set or reset variable: ' + ); + //Overwrite language-specific strings. + //This way we'll never have missing translations - no more "language string failed to load"! + $l = true; + if ($langcode != 'en') { //There is no English translation file + $l = @include $lang_path . 'phpmailer.lang-' . $langcode . '.php'; + } + $this->language = $PHPMAILER_LANG; + return ($l == true); //Returns false if language not found + } + + /** + * Get the array of strings for the current language. + * @return array + */ + public function getTranslations() + { + return $this->language; + } + + /** + * Create recipient headers. + * @access public + * @param string $type + * @param array $addr An array of recipient, + * where each recipient is a 2-element indexed array with element 0 containing an address + * and element 1 containing a name, like: + * array(array('joe@example.com', 'Joe User'), array('zoe@example.com', 'Zoe User')) + * @return string + */ + public function addrAppend($type, $addr) + { + $addresses = array(); + foreach ($addr as $a) { + $addresses[] = $this->addrFormat($a); + } + return $type . ': ' . implode(', ', $addresses) . $this->LE; + } + + /** + * Format an address for use in a message header. + * @access public + * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name + * like array('joe@example.com', 'Joe User') + * @return string + */ + public function addrFormat($addr) + { + if (empty($addr[1])) { // No name provided + return $this->secureHeader($addr[0]); + } else { + return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . " <" . $this->secureHeader( + $addr[0] + ) . ">"; + } + } + + /** + * Word-wrap message. + * For use with mailers that do not automatically perform wrapping + * and for quoted-printable encoded messages. + * Original written by philippe. + * @param string $message The message to wrap + * @param integer $length The line length to wrap to + * @param bool $qp_mode Whether to run in Quoted-Printable mode + * @access public + * @return string + */ + public function wrapText($message, $length, $qp_mode = false) + { + $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; + // If utf-8 encoding is used, we will need to make sure we don't + // split multibyte characters when we wrap + $is_utf8 = (strtolower($this->CharSet) == "utf-8"); + $lelen = strlen($this->LE); + $crlflen = strlen(self::CRLF); + + $message = $this->fixEOL($message); + if (substr($message, -$lelen) == $this->LE) { + $message = substr($message, 0, -$lelen); + } + + $line = explode($this->LE, $message); // Magic. We know fixEOL uses $LE + $message = ''; + for ($i = 0; $i < count($line); $i++) { + $line_part = explode(' ', $line[$i]); + $buf = ''; + for ($e = 0; $e < count($line_part); $e++) { + $word = $line_part[$e]; + if ($qp_mode and (strlen($word) > $length)) { + $space_left = $length - strlen($buf) - $crlflen; + if ($e != 0) { + if ($space_left > 20) { + $len = $space_left; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == "=") { + $len--; + } elseif (substr($word, $len - 2, 1) == "=") { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + $buf .= ' ' . $part; + $message .= $buf . sprintf("=%s", self::CRLF); + } else { + $message .= $buf . $soft_break; + } + $buf = ''; + } + while (strlen($word) > 0) { + if ($length <= 0) { + break; + } + $len = $length; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == "=") { + $len--; + } elseif (substr($word, $len - 2, 1) == "=") { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + + if (strlen($word) > 0) { + $message .= $part . sprintf("=%s", self::CRLF); + } else { + $buf = $part; + } + } + } else { + $buf_o = $buf; + $buf .= ($e == 0) ? $word : (' ' . $word); + + if (strlen($buf) > $length and $buf_o != '') { + $message .= $buf_o . $soft_break; + $buf = $word; + } + } + } + $message .= $buf . self::CRLF; + } + + return $message; + } + + /** + * Find the last character boundary prior to $maxLength in a utf-8 + * quoted (printable) encoded string. + * Original written by Colin Brown. + * @access public + * @param string $encodedText utf-8 QP text + * @param int $maxLength find last character boundary prior to this length + * @return int + */ + public function utf8CharBoundary($encodedText, $maxLength) + { + $foundSplitPos = false; + $lookBack = 3; + while (!$foundSplitPos) { + $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); + $encodedCharPos = strpos($lastChunk, "="); + if ($encodedCharPos !== false) { + // Found start of encoded character byte within $lookBack block. + // Check the encoded byte value (the 2 chars after the '=') + $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); + $dec = hexdec($hex); + if ($dec < 128) { // Single byte character. + // If the encoded char was found at pos 0, it will fit + // otherwise reduce maxLength to start of the encoded char + $maxLength = ($encodedCharPos == 0) ? $maxLength : + $maxLength - ($lookBack - $encodedCharPos); + $foundSplitPos = true; + } elseif ($dec >= 192) { // First byte of a multi byte character + // Reduce maxLength to split at start of character + $maxLength = $maxLength - ($lookBack - $encodedCharPos); + $foundSplitPos = true; + } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back + $lookBack += 3; + } + } else { + // No encoded character found + $foundSplitPos = true; + } + } + return $maxLength; + } + + + /** + * Set the body wrapping. + * @access public + * @return void + */ + public function setWordWrap() + { + if ($this->WordWrap < 1) { + return; + } + + switch ($this->message_type) { + case 'alt': + case 'alt_inline': + case 'alt_attach': + case 'alt_inline_attach': + $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap); + break; + default: + $this->Body = $this->wrapText($this->Body, $this->WordWrap); + break; + } + } + + /** + * Assemble message headers. + * @access public + * @return string The assembled headers + */ + public function createHeader() + { + $result = ''; + + // Set the boundaries + $uniq_id = md5(uniqid(time())); + $this->boundary[1] = 'b1_' . $uniq_id; + $this->boundary[2] = 'b2_' . $uniq_id; + $this->boundary[3] = 'b3_' . $uniq_id; + + if ($this->MessageDate == '') { + $result .= $this->headerLine('Date', self::rfcDate()); + } else { + $result .= $this->headerLine('Date', $this->MessageDate); + } + + if ($this->ReturnPath) { + $result .= $this->headerLine('Return-Path', '<' . trim($this->ReturnPath) . '>'); + } elseif ($this->Sender == '') { + $result .= $this->headerLine('Return-Path', '<' . trim($this->From) . '>'); + } else { + $result .= $this->headerLine('Return-Path', '<' . trim($this->Sender) . '>'); + } + + // To be created automatically by mail() + if ($this->Mailer != 'mail') { + if ($this->SingleTo === true) { + foreach ($this->to as $t) { + $this->SingleToArray[] = $this->addrFormat($t); + } + } else { + if (count($this->to) > 0) { + $result .= $this->addrAppend('To', $this->to); + } elseif (count($this->cc) == 0) { + $result .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + } + } + + $result .= $this->addrAppend('From', array(array(trim($this->From), $this->FromName))); + + // sendmail and mail() extract Cc from the header before sending + if (count($this->cc) > 0) { + $result .= $this->addrAppend('Cc', $this->cc); + } + + // sendmail and mail() extract Bcc from the header before sending + if (( + $this->Mailer == 'sendmail' or $this->Mailer == 'qmail' or $this->Mailer == 'mail' + ) + and count($this->bcc) > 0 + ) { + $result .= $this->addrAppend('Bcc', $this->bcc); + } + + if (count($this->ReplyTo) > 0) { + $result .= $this->addrAppend('Reply-To', $this->ReplyTo); + } + + // mail() sets the subject itself + if ($this->Mailer != 'mail') { + $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); + } + + if ($this->MessageID != '') { + $this->lastMessageID = $this->MessageID; + } else { + $this->lastMessageID = sprintf("<%s@%s>", $uniq_id, $this->ServerHostname()); + } + $result .= $this->HeaderLine('Message-ID', $this->lastMessageID); + $result .= $this->headerLine('X-Priority', $this->Priority); + if ($this->XMailer == '') { + $result .= $this->headerLine( + 'X-Mailer', + 'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer/)' + ); + } else { + $myXmailer = trim($this->XMailer); + if ($myXmailer) { + $result .= $this->headerLine('X-Mailer', $myXmailer); + } + } + + if ($this->ConfirmReadingTo != '') { + $result .= $this->headerLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>'); + } + + // Add custom headers + for ($index = 0; $index < count($this->CustomHeader); $index++) { + $result .= $this->headerLine( + trim($this->CustomHeader[$index][0]), + $this->encodeHeader(trim($this->CustomHeader[$index][1])) + ); + } + if (!$this->sign_key_file) { + $result .= $this->headerLine('MIME-Version', '1.0'); + $result .= $this->getMailMIME(); + } + + return $result; + } + + /** + * Get the message MIME type headers. + * @access public + * @return string + */ + public function getMailMIME() + { + $result = ''; + switch ($this->message_type) { + case 'inline': + $result .= $this->headerLine('Content-Type', 'multipart/related;'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'attach': + case 'inline_attach': + case 'alt_attach': + case 'alt_inline_attach': + $result .= $this->headerLine('Content-Type', 'multipart/mixed;'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'alt': + case 'alt_inline': + $result .= $this->headerLine('Content-Type', 'multipart/alternative;'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + default: + // Catches case 'plain': and case '': + $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet); + break; + } + //RFC1341 part 5 says 7bit is assumed if not specified + if ($this->Encoding != '7bit') { + $result .= $this->headerLine('Content-Transfer-Encoding', $this->Encoding); + } + + if ($this->Mailer != 'mail') { + $result .= $this->LE; + } + + return $result; + } + + /** + * Returns the whole MIME message. + * Includes complete headers and body. + * Only valid post PreSend(). + * @see PHPMailer::PreSend() + * @access public + * @return string + */ + public function getSentMIMEMessage() + { + return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody; + } + + + /** + * Assemble the message body. + * Returns an empty string on failure. + * @access public + * @throws phpmailerException + * @return string The assembled message body + */ + public function createBody() + { + $body = ''; + + if ($this->sign_key_file) { + $body .= $this->getMailMIME() . $this->LE; + } + + $this->setWordWrap(); + + switch ($this->message_type) { + case 'inline': + $body .= $this->getBoundary($this->boundary[1], '', '', ''); + $body .= $this->encodeString($this->Body, $this->Encoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[1]); + break; + case 'attach': + $body .= $this->getBoundary($this->boundary[1], '', '', ''); + $body .= $this->encodeString($this->Body, $this->Encoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'inline_attach': + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/related;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], '', '', ''); + $body .= $this->encodeString($this->Body, $this->Encoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt': + $body .= $this->getBoundary($this->boundary[1], '', 'text/plain', ''); + $body .= $this->encodeString($this->AltBody, $this->Encoding); + $body .= $this->LE . $this->LE; + $body .= $this->getBoundary($this->boundary[1], '', 'text/html', ''); + $body .= $this->encodeString($this->Body, $this->Encoding); + $body .= $this->LE . $this->LE; + if (!empty($this->Ical)) { + $body .= $this->getBoundary($this->boundary[1], '', 'text/calendar; method=REQUEST', ''); + $body .= $this->encodeString($this->Ical, $this->Encoding); + $body .= $this->LE . $this->LE; + } + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_inline': + $body .= $this->getBoundary($this->boundary[1], '', 'text/plain', ''); + $body .= $this->encodeString($this->AltBody, $this->Encoding); + $body .= $this->LE . $this->LE; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/related;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], '', 'text/html', ''); + $body .= $this->encodeString($this->Body, $this->Encoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= $this->LE; + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_attach': + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], '', 'text/plain', ''); + $body .= $this->encodeString($this->AltBody, $this->Encoding); + $body .= $this->LE . $this->LE; + $body .= $this->getBoundary($this->boundary[2], '', 'text/html', ''); + $body .= $this->encodeString($this->Body, $this->Encoding); + $body .= $this->LE . $this->LE; + $body .= $this->endBoundary($this->boundary[2]); + $body .= $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt_inline_attach': + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], '', 'text/plain', ''); + $body .= $this->encodeString($this->AltBody, $this->Encoding); + $body .= $this->LE . $this->LE; + $body .= $this->textLine('--' . $this->boundary[2]); + $body .= $this->headerLine('Content-Type', 'multipart/related;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[3] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[3], '', 'text/html', ''); + $body .= $this->encodeString($this->Body, $this->Encoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[3]); + $body .= $this->LE; + $body .= $this->endBoundary($this->boundary[2]); + $body .= $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + default: + // catch case 'plain' and case '' + $body .= $this->encodeString($this->Body, $this->Encoding); + break; + } + + if ($this->isError()) { + $body = ''; + } elseif ($this->sign_key_file) { + try { + if (!defined('PKCS7_TEXT')) { + throw new phpmailerException($this->lang('signing') . ' OpenSSL extension missing.'); + } + //TODO would be nice to use php://temp streams here, but need to wrap for PHP < 5.1 + $file = tempnam(sys_get_temp_dir(), 'mail'); + file_put_contents($file, $body); //TODO check this worked + $signed = tempnam(sys_get_temp_dir(), 'signed'); + if (@openssl_pkcs7_sign( + $file, + $signed, + 'file://' . realpath($this->sign_cert_file), + array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), + null + ) + ) { + @unlink($file); + $body = file_get_contents($signed); + @unlink($signed); + } else { + @unlink($file); + @unlink($signed); + throw new phpmailerException($this->lang('signing') . openssl_error_string()); + } + } catch (phpmailerException $e) { + $body = ''; + if ($this->exceptions) { + throw $e; + } + } + } + return $body; + } + + /** + * Return the start of a message boundary. + * @access protected + * @param string $boundary + * @param string $charSet + * @param string $contentType + * @param string $encoding + * @return string + */ + protected function getBoundary($boundary, $charSet, $contentType, $encoding) + { + $result = ''; + if ($charSet == '') { + $charSet = $this->CharSet; + } + if ($contentType == '') { + $contentType = $this->ContentType; + } + if ($encoding == '') { + $encoding = $this->Encoding; + } + $result .= $this->textLine('--' . $boundary); + $result .= sprintf("Content-Type: %s; charset=%s", $contentType, $charSet); + $result .= $this->LE; + $result .= $this->headerLine('Content-Transfer-Encoding', $encoding); + $result .= $this->LE; + + return $result; + } + + /** + * Return the end of a message boundary. + * @access protected + * @param string $boundary + * @return string + */ + protected function endBoundary($boundary) + { + return $this->LE . '--' . $boundary . '--' . $this->LE; + } + + /** + * Set the message type. + * PHPMailer only supports some preset message types, + * not arbitrary MIME structures. + * @access protected + * @return void + */ + protected function setMessageType() + { + $this->message_type = array(); + if ($this->alternativeExists()) { + $this->message_type[] = "alt"; + } + if ($this->inlineImageExists()) { + $this->message_type[] = "inline"; + } + if ($this->attachmentExists()) { + $this->message_type[] = "attach"; + } + $this->message_type = implode("_", $this->message_type); + if ($this->message_type == "") { + $this->message_type = "plain"; + } + } + + /** + * Format a header line. + * @access public + * @param string $name + * @param string $value + * @return string + */ + public function headerLine($name, $value) + { + return $name . ': ' . $value . $this->LE; + } + + /** + * Return a formatted mail line. + * @access public + * @param string $value + * @return string + */ + public function textLine($value) + { + return $value . $this->LE; + } + + /** + * Add an attachment from a path on the filesystem. + * Returns false if the file could not be found or read. + * @param string $path Path to the attachment. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @param string $disposition Disposition to use + * @throws phpmailerException + * @return bool + */ + public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') + { + try { + if (!@is_file($path)) { + throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE); + } + + //If a MIME type is not specified, try to work it out from the file name + if ($type == '') { + $type = self::filenameToType($path); + } + + $filename = basename($path); + if ($name == '') { + $name = $filename; + } + + $this->attachment[] = array( + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => 0 + ); + + } catch (phpmailerException $e) { + $this->setError($e->getMessage()); + if ($this->exceptions) { + throw $e; + } + $this->edebug($e->getMessage() . "\n"); + return false; + } + return true; + } + + /** + * Return the array of attachments. + * @return array + */ + public function getAttachments() + { + return $this->attachment; + } + + /** + * Attach all file, string, and binary attachments to the message. + * Returns an empty string on failure. + * @access protected + * @param string $disposition_type + * @param string $boundary + * @return string + */ + protected function attachAll($disposition_type, $boundary) + { + // Return text of body + $mime = array(); + $cidUniq = array(); + $incl = array(); + + // Add all attachments + foreach ($this->attachment as $attachment) { + // Check if it is a valid disposition_filter + if ($attachment[6] == $disposition_type) { + // Check for string attachment + $string = ''; + $path = ''; + $bString = $attachment[5]; + if ($bString) { + $string = $attachment[0]; + } else { + $path = $attachment[0]; + } + + $inclhash = md5(serialize($attachment)); + if (in_array($inclhash, $incl)) { + continue; + } + $incl[] = $inclhash; + $name = $attachment[2]; + $encoding = $attachment[3]; + $type = $attachment[4]; + $disposition = $attachment[6]; + $cid = $attachment[7]; + if ($disposition == 'inline' && isset($cidUniq[$cid])) { + continue; + } + $cidUniq[$cid] = true; + + $mime[] = sprintf("--%s%s", $boundary, $this->LE); + $mime[] = sprintf( + "Content-Type: %s; name=\"%s\"%s", + $type, + $this->encodeHeader($this->secureHeader($name)), + $this->LE + ); + $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); + + if ($disposition == 'inline') { + $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); + } + + // If a filename contains any of these chars, it should be quoted, + // but not otherwise: RFC2183 & RFC2045 5.1 + // Fixes a warning in IETF's msglint MIME checker + // Allow for bypassing the Content-Disposition header totally + if (!(empty($disposition))) { + if (preg_match('/[ \(\)<>@,;:\\"\/\[\]\?=]/', $name)) { + $mime[] = sprintf( + "Content-Disposition: %s; filename=\"%s\"%s", + $disposition, + $this->encodeHeader($this->secureHeader($name)), + $this->LE . $this->LE + ); + } else { + $mime[] = sprintf( + "Content-Disposition: %s; filename=%s%s", + $disposition, + $this->encodeHeader($this->secureHeader($name)), + $this->LE . $this->LE + ); + } + } else { + $mime[] = $this->LE; + } + + // Encode as string attachment + if ($bString) { + $mime[] = $this->encodeString($string, $encoding); + if ($this->isError()) { + return ''; + } + $mime[] = $this->LE . $this->LE; + } else { + $mime[] = $this->encodeFile($path, $encoding); + if ($this->isError()) { + return ''; + } + $mime[] = $this->LE . $this->LE; + } + } + } + + $mime[] = sprintf("--%s--%s", $boundary, $this->LE); + + return implode("", $mime); + } + + /** + * Encode a file attachment in requested format. + * Returns an empty string on failure. + * @param string $path The full path to the file + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * @throws phpmailerException + * @see EncodeFile(encodeFile + * @access protected + * @return string + */ + protected function encodeFile($path, $encoding = 'base64') + { + try { + if (!is_readable($path)) { + throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE); + } + $magic_quotes = get_magic_quotes_runtime(); + if ($magic_quotes) { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + set_magic_quotes_runtime(0); + } else { + ini_set('magic_quotes_runtime', 0); + } + } + $file_buffer = file_get_contents($path); + $file_buffer = $this->encodeString($file_buffer, $encoding); + if ($magic_quotes) { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + set_magic_quotes_runtime($magic_quotes); + } else { + ini_set('magic_quotes_runtime', $magic_quotes); + } + } + return $file_buffer; + } catch (Exception $e) { + $this->setError($e->getMessage()); + return ''; + } + } + + /** + * Encode a string in requested format. + * Returns an empty string on failure. + * @param string $str The text to encode + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * @access public + * @return string + */ + public function encodeString($str, $encoding = 'base64') + { + $encoded = ''; + switch (strtolower($encoding)) { + case 'base64': + $encoded = chunk_split(base64_encode($str), 76, $this->LE); + break; + case '7bit': + case '8bit': + $encoded = $this->fixEOL($str); + //Make sure it ends with a line break + if (substr($encoded, -(strlen($this->LE))) != $this->LE) { + $encoded .= $this->LE; + } + break; + case 'binary': + $encoded = $str; + break; + case 'quoted-printable': + $encoded = $this->encodeQP($str); + break; + default: + $this->setError($this->lang('encoding') . $encoding); + break; + } + return $encoded; + } + + /** + * Encode a header string optimally. + * Picks shortest of Q, B, quoted-printable or none. + * @access public + * @param string $str + * @param string $position + * @return string + */ + public function encodeHeader($str, $position = 'text') + { + $x = 0; + switch (strtolower($position)) { + case 'phrase': + if (!preg_match('/[\200-\377]/', $str)) { + // Can't use addslashes as we don't know what value has magic_quotes_sybase + $encoded = addcslashes($str, "\0..\37\177\\\""); + if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { + return ($encoded); + } else { + return ("\"$encoded\""); + } + } + $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + /** @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + $x = preg_match_all('/[()"]/', $str, $matches); + // Intentional fall-through + case 'text': + default: + $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + if ($x == 0) { //There are no chars that need encoding + return ($str); + } + + $maxlen = 75 - 7 - strlen($this->CharSet); + // Try to select the encoding which should produce the shortest output + if ($x > strlen($str) / 3) { + //More than a third of the content will need encoding, so B encoding will be most efficient + $encoding = 'B'; + if (function_exists('mb_strlen') && $this->hasMultiBytes($str)) { + // Use a custom function which correctly encodes and wraps long + // multibyte strings without breaking lines within a character + $encoded = $this->base64EncodeWrapMB($str, "\n"); + } else { + $encoded = base64_encode($str); + $maxlen -= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } + } else { + $encoding = 'Q'; + $encoded = $this->encodeQ($str, $position); + $encoded = $this->wrapText($encoded, $maxlen, true); + $encoded = str_replace('=' . self::CRLF, "\n", trim($encoded)); + } + + $encoded = preg_replace('/^(.*)$/m', " =?" . $this->CharSet . "?$encoding?\\1?=", $encoded); + $encoded = trim(str_replace("\n", $this->LE, $encoded)); + + return $encoded; + } + + /** + * Check if a string contains multi-byte characters. + * @access public + * @param string $str multi-byte text to wrap encode + * @return bool + */ + public function hasMultiBytes($str) + { + if (function_exists('mb_strlen')) { + return (strlen($str) > mb_strlen($str, $this->CharSet)); + } else { // Assume no multibytes (we can't handle without mbstring functions anyway) + return false; + } + } + + /** + * Encode and wrap long multibyte strings for mail headers + * without breaking lines within a character. + * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php + * @access public + * @param string $str multi-byte text to wrap encode + * @param string $lf string to use as linefeed/end-of-line + * @return string + */ + public function base64EncodeWrapMB($str, $lf = null) + { + $start = "=?" . $this->CharSet . "?B?"; + $end = "?="; + $encoded = ""; + if ($lf === null) { + $lf = $this->LE; + } + + $mb_length = mb_strlen($str, $this->CharSet); + // Each line must have length <= 75, including $start and $end + $length = 75 - strlen($start) - strlen($end); + // Average multi-byte ratio + $ratio = $mb_length / strlen($str); + // Base64 has a 4:3 ratio + $avgLength = floor($length * $ratio * .75); + + for ($i = 0; $i < $mb_length; $i += $offset) { + $lookBack = 0; + do { + $offset = $avgLength - $lookBack; + $chunk = mb_substr($str, $i, $offset, $this->CharSet); + $chunk = base64_encode($chunk); + $lookBack++; + } while (strlen($chunk) > $length); + $encoded .= $chunk . $lf; + } + + // Chomp the last linefeed + $encoded = substr($encoded, 0, -strlen($lf)); + return $encoded; + } + + /** + * Encode a string in quoted-printable format. + * According to RFC2045 section 6.7. + * @access public + * @param string $string The text to encode + * @param integer $line_max Number of chars allowed on a line before wrapping + * @return string + * @link PHP version adapted from http://www.php.net/manual/en/function.quoted-printable-decode.php#89417 + */ + public function encodeQP($string, $line_max = 76) + { + if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3) + return quoted_printable_encode($string); + } + //Fall back to a pure PHP implementation + $string = str_replace( + array('%20', '%0D%0A.', '%0D%0A', '%'), + array(' ', "\r\n=2E", "\r\n", '='), + rawurlencode($string) + ); + $string = preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string); + return $string; + } + + /** + * Backward compatibility wrapper for an old QP encoding function that was removed. + * @see PHPMailer::encodeQP() + * @access public + * @param string $string + * @param integer $line_max + * @param bool $space_conv + * @return string + * @deprecated Use encodeQP instead. + */ + public function encodeQPphp( + $string, + $line_max = 76, + /** @noinspection PhpUnusedParameterInspection */ $space_conv = false + ) { + return $this->encodeQP($string, $line_max); + } + + /** + * Encode a string using Q encoding. + * @link http://tools.ietf.org/html/rfc2047 + * @param string $str the text to encode + * @param string $position Where the text is going to be used, see the RFC for what that means + * @access public + * @return string + */ + public function encodeQ($str, $position = 'text') + { + //There should not be any EOL in the string + $pattern = ''; + $encoded = str_replace(array("\r", "\n"), '', $str); + switch (strtolower($position)) { + case 'phrase': + //RFC 2047 section 5.3 + $pattern = '^A-Za-z0-9!*+\/ -'; + break; + /** @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + //RFC 2047 section 5.2 + $pattern = '\(\)"'; + //intentional fall-through + //for this reason we build the $pattern without including delimiters and [] + case 'text': + default: + //RFC 2047 section 5.1 + //Replace every high ascii, control, =, ? and _ characters + $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern; + break; + } + $matches = array(); + if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) { + //If the string contains an '=', make sure it's the first thing we replace + //so as to avoid double-encoding + $s = array_search('=', $matches[0]); + if ($s !== false) { + unset($matches[0][$s]); + array_unshift($matches[0], '='); + } + foreach (array_unique($matches[0]) as $char) { + $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded); + } + } + //Replace every spaces to _ (more readable than =20) + return str_replace(' ', '_', $encoded); + } + + + /** + * Add a string or binary attachment (non-filesystem). + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * @param string $string String attachment data. + * @param string $filename Name of the attachment. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @param string $disposition Disposition to use + * @return void + */ + public function addStringAttachment( + $string, + $filename, + $encoding = 'base64', + $type = '', + $disposition = 'attachment' + ) { + //If a MIME type is not specified, try to work it out from the file name + if ($type == '') { + $type = self::filenameToType($filename); + } + // Append to $attachment array + $this->attachment[] = array( + 0 => $string, + 1 => $filename, + 2 => basename($filename), + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => 0 + ); + } + + /** + * Add an embedded (inline) attachment from a file. + * This can include images, sounds, and just about any other document type. + * These differ from 'regular' attachmants in that they are intended to be + * displayed inline with the message, not just attached for download. + * This is used in HTML messages that embed the images + * the HTML refers to using the $cid value. + * @param string $path Path to the attachment. + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File MIME type. + * @param string $disposition Disposition to use + * @return bool True on successfully adding an attachment + */ + public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline') + { + if (!@is_file($path)) { + $this->setError($this->lang('file_access') . $path); + return false; + } + + //If a MIME type is not specified, try to work it out from the file name + if ($type == '') { + $type = self::filenameToType($path); + } + + $filename = basename($path); + if ($name == '') { + $name = $filename; + } + + // Append to $attachment array + $this->attachment[] = array( + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => $cid + ); + return true; + } + + /** + * Add an embedded stringified attachment. + * This can include images, sounds, and just about any other document type. + * Be sure to set the $type to an image type for images: + * JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'. + * @param string $string The attachment binary data. + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML. + * @param string $name + * @param string $encoding File encoding (see $Encoding). + * @param string $type MIME type. + * @param string $disposition Disposition to use + * @return bool True on successfully adding an attachment + */ + public function addStringEmbeddedImage( + $string, + $cid, + $name = '', + $encoding = 'base64', + $type = '', + $disposition = 'inline' + ) { + //If a MIME type is not specified, try to work it out from the name + if ($type == '') { + $type = self::filenameToType($name); + } + + // Append to $attachment array + $this->attachment[] = array( + 0 => $string, + 1 => $name, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => $cid + ); + return true; + } + + /** + * Check if an inline attachment is present. + * @access public + * @return bool + */ + public function inlineImageExists() + { + foreach ($this->attachment as $attachment) { + if ($attachment[6] == 'inline') { + return true; + } + } + return false; + } + + /** + * Check if an attachment (non-inline) is present. + * @return bool + */ + public function attachmentExists() + { + foreach ($this->attachment as $attachment) { + if ($attachment[6] == 'attachment') { + return true; + } + } + return false; + } + + /** + * Check if this message has an alternative body set. + * @return bool + */ + public function alternativeExists() + { + return !empty($this->AltBody); + } + + /** + * Clear all To recipients. + * @return void + */ + public function clearAddresses() + { + foreach ($this->to as $to) { + unset($this->all_recipients[strtolower($to[0])]); + } + $this->to = array(); + } + + /** + * Clear all CC recipients. + * @return void + */ + public function clearCCs() + { + foreach ($this->cc as $cc) { + unset($this->all_recipients[strtolower($cc[0])]); + } + $this->cc = array(); + } + + /** + * Clear all BCC recipients. + * @return void + */ + public function clearBCCs() + { + foreach ($this->bcc as $bcc) { + unset($this->all_recipients[strtolower($bcc[0])]); + } + $this->bcc = array(); + } + + /** + * Clear all ReplyTo recipients. + * @return void + */ + public function clearReplyTos() + { + $this->ReplyTo = array(); + } + + /** + * Clear all recipient types. + * @return void + */ + public function clearAllRecipients() + { + $this->to = array(); + $this->cc = array(); + $this->bcc = array(); + $this->all_recipients = array(); + } + + /** + * Clear all filesystem, string, and binary attachments. + * @return void + */ + public function clearAttachments() + { + $this->attachment = array(); + } + + /** + * Clear all custom headers. + * @return void + */ + public function clearCustomHeaders() + { + $this->CustomHeader = array(); + } + + /** + * Add an error message to the error container. + * @access protected + * @param string $msg + * @return void + */ + protected function setError($msg) + { + $this->error_count++; + if ($this->Mailer == 'smtp' and !is_null($this->smtp)) { + $lasterror = $this->smtp->getError(); + if (!empty($lasterror) and array_key_exists('smtp_msg', $lasterror)) { + $msg .= '

' . $this->lang('smtp_error') . $lasterror['smtp_msg'] . "

\n"; + } + } + $this->ErrorInfo = $msg; + } + + /** + * Return an RFC 822 formatted date. + * @access public + * @return string + * @static + */ + public static function rfcDate() + { + //Set the time zone to whatever the default is to avoid 500 errors + //Will default to UTC if it's not set properly in php.ini + date_default_timezone_set(@date_default_timezone_get()); + return date('D, j M Y H:i:s O'); + } + + /** + * Get the server hostname. + * Returns 'localhost.localdomain' if unknown. + * @access protected + * @return string + */ + protected function serverHostname() + { + if (!empty($this->Hostname)) { + $result = $this->Hostname; + } elseif (isset($_SERVER['SERVER_NAME'])) { + $result = $_SERVER['SERVER_NAME']; + } else { + $result = 'localhost.localdomain'; + } + + return $result; + } + + /** + * Get an error message in the current language. + * @access protected + * @param string $key + * @return string + */ + protected function lang($key) + { + if (count($this->language) < 1) { + $this->setLanguage('en'); // set the default language + } + + if (isset($this->language[$key])) { + return $this->language[$key]; + } else { + return 'Language string failed to load: ' . $key; + } + } + + /** + * Check if an error occurred. + * @access public + * @return bool True if an error did occur. + */ + public function isError() + { + return ($this->error_count > 0); + } + + /** + * Ensure consistent line endings in a string. + * Changes every end of line from CRLF, CR or LF to $this->LE. + * @access public + * @param string $str String to fixEOL + * @return string + */ + public function fixEOL($str) + { + // Normalise to \n + $nstr = str_replace(array("\r\n", "\r"), "\n", $str); + // Now convert LE as needed + if ($this->LE !== "\n") { + $nstr = str_replace("\n", $this->LE, $nstr); + } + return $nstr; + } + + /** + * Add a custom header. + * $name value can be overloaded to contain + * both header name and value (name:value) + * @access public + * @param string $name Custom header name + * @param string $value Header value + * @return void + */ + public function addCustomHeader($name, $value = null) + { + if ($value === null) { + // Value passed in as name:value + $this->CustomHeader[] = explode(':', $name, 2); + } else { + $this->CustomHeader[] = array($name, $value); + } + } + + /** + * Create a message from an HTML string. + * Automatically makes modifications for inline images and backgrounds + * and creates a plain-text version by converting the HTML. + * Overwrites any existing values in $this->Body and $this->AltBody + * @access public + * @param string $message HTML message string + * @param string $basedir baseline directory for path + * @param bool $advanced Whether to use the advanced HTML to text converter + * @return string $message + */ + public function msgHTML($message, $basedir = '', $advanced = false) + { + preg_match_all("/(src|background)=[\"'](.*)[\"']/Ui", $message, $images); + if (isset($images[2])) { + foreach ($images[2] as $i => $url) { + // do not change urls for absolute images (thanks to corvuscorax) + if (!preg_match('#^[A-z]+://#', $url)) { + $filename = basename($url); + $directory = dirname($url); + if ($directory == '.') { + $directory = ''; + } + $cid = md5($url) . '@phpmailer.0'; //RFC2392 S 2 + if (strlen($basedir) > 1 && substr($basedir, -1) != '/') { + $basedir .= '/'; + } + if (strlen($directory) > 1 && substr($directory, -1) != '/') { + $directory .= '/'; + } + if ($this->addEmbeddedImage( + $basedir . $directory . $filename, + $cid, + $filename, + 'base64', + self::_mime_types(self::mb_pathinfo($filename, PATHINFO_EXTENSION)) + ) + ) { + $message = preg_replace( + "/" . $images[1][$i] . "=[\"']" . preg_quote($url, '/') . "[\"']/Ui", + $images[1][$i] . "=\"cid:" . $cid . "\"", + $message + ); + } + } + } + } + $this->isHTML(true); + if (empty($this->AltBody)) { + $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . "\n\n"; + } + //Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better + $this->Body = $this->normalizeBreaks($message); + $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced)); + return $this->Body; + } + + /** + * Convert an HTML string into plain text. + * @param string $html The HTML text to convert + * @param bool $advanced Should this use the more complex html2text converter or just a simple one? + * @return string + */ + public function html2text($html, $advanced = false) + { + if ($advanced) { + require_once 'extras/class.html2text.php'; + $h = new html2text($html); + return $h->get_text(); + } + return html_entity_decode( + trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))), + ENT_QUOTES, + $this->CharSet + ); + } + + /** + * Get the MIME type for a file extension. + * @param string $ext File extension + * @access public + * @return string MIME type of file. + * @static + */ + public static function _mime_types($ext = '') + { + $mimes = array( + 'xl' => 'application/excel', + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'bin' => 'application/macbinary', + 'doc' => 'application/msword', + 'word' => 'application/msword', + 'class' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'dms' => 'application/octet-stream', + 'exe' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'psd' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'so' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'php3' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'php' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'js' => 'application/x-javascript', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => 'application/x-tar', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'zip' => 'application/zip', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'mpga' => 'audio/mpeg', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'wav' => 'audio/x-wav', + 'bmp' => 'image/bmp', + 'gif' => 'image/gif', + 'jpeg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'png' => 'image/png', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'eml' => 'message/rfc822', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', + 'shtml' => 'text/html', + 'log' => 'text/plain', + 'text' => 'text/plain', + 'txt' => 'text/plain', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'mpeg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mov' => 'video/quicktime', + 'qt' => 'video/quicktime', + 'rv' => 'video/vnd.rn-realvideo', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie' + ); + return (array_key_exists(strtolower($ext), $mimes) ? $mimes[strtolower($ext)]: 'application/octet-stream'); + } + + /** + * Map a file name to a MIME type. + * Defaults to 'application/octet-stream', i.e.. arbitrary binary data. + * @param string $filename A file name or full path, does not need to exist as a file + * @return string + * @static + */ + public static function filenameToType($filename) + { + //In case the path is a URL, strip any query string before getting extension + $qpos = strpos($filename, '?'); + if ($qpos !== false) { + $filename = substr($filename, 0, $qpos); + } + $pathinfo = self::mb_pathinfo($filename); + return self::_mime_types($pathinfo['extension']); + } + + /** + * Multi-byte-safe pathinfo replacement. + * Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe. + * Works similarly to the one in PHP >= 5.2.0 + * @link http://www.php.net/manual/en/function.pathinfo.php#107461 + * @param string $path A filename or path, does not need to exist as a file + * @param integer|string $options Either a PATHINFO_* constant, + * or a string name to return only the specified piece, allows 'filename' to work on PHP < 5.2 + * @return string|array + * @static + */ + public static function mb_pathinfo($path, $options = null) + { + $ret = array('dirname' => '', 'basename' => '', 'extension' => '', 'filename' => ''); + $m = array(); + preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im', $path, $m); + if (array_key_exists(1, $m)) { + $ret['dirname'] = $m[1]; + } + if (array_key_exists(2, $m)) { + $ret['basename'] = $m[2]; + } + if (array_key_exists(5, $m)) { + $ret['extension'] = $m[5]; + } + if (array_key_exists(3, $m)) { + $ret['filename'] = $m[3]; + } + switch ($options) { + case PATHINFO_DIRNAME: + case 'dirname': + return $ret['dirname']; + break; + case PATHINFO_BASENAME: + case 'basename': + return $ret['basename']; + break; + case PATHINFO_EXTENSION: + case 'extension': + return $ret['extension']; + break; + case PATHINFO_FILENAME: + case 'filename': + return $ret['filename']; + break; + default: + return $ret; + } + } + + /** + * Set or reset instance properties. + * + * Usage Example: + * $page->set('X-Priority', '3'); + * + * @access public + * @param string $name + * @param mixed $value + * NOTE: will not work with arrays, there are no arrays to set/reset + * @throws phpmailerException + * @return bool + * @todo Should this not be using __set() magic function? + */ + public function set($name, $value = '') + { + try { + if (isset($this->$name)) { + $this->$name = $value; + } else { + throw new phpmailerException($this->lang('variable_set') . $name, self::STOP_CRITICAL); + } + } catch (Exception $e) { + $this->setError($e->getMessage()); + if ($e->getCode() == self::STOP_CRITICAL) { + return false; + } + } + return true; + } + + /** + * Strip newlines to prevent header injection. + * @access public + * @param string $str + * @return string + */ + public function secureHeader($str) + { + return trim(str_replace(array("\r", "\n"), '', $str)); + } + + /** + * Normalize line breaks in a string. + * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. + * Defaults to CRLF (for message bodies) and preserves consecutive breaks. + * @param string $text + * @param string $breaktype What kind of line break to use, defaults to CRLF + * @return string + * @access public + * @static + */ + public static function normalizeBreaks($text, $breaktype = "\r\n") + { + return preg_replace('/(\r\n|\r|\n)/ms', $breaktype, $text); + } + + + /** + * Set the public and private key files and password for S/MIME signing. + * @access public + * @param string $cert_filename + * @param string $key_filename + * @param string $key_pass Password for private key + */ + public function sign($cert_filename, $key_filename, $key_pass) + { + $this->sign_cert_file = $cert_filename; + $this->sign_key_file = $key_filename; + $this->sign_key_pass = $key_pass; + } + + /** + * Quoted-Printable-encode a DKIM header. + * @access public + * @param string $txt + * @return string + */ + public function DKIM_QP($txt) + { + $line = ''; + for ($i = 0; $i < strlen($txt); $i++) { + $ord = ord($txt[$i]); + if (((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E))) { + $line .= $txt[$i]; + } else { + $line .= "=" . sprintf("%02X", $ord); + } + } + return $line; + } + + /** + * Generate a DKIM signature. + * @access public + * @param string $s Header + * @throws phpmailerException + * @return string + */ + public function DKIM_Sign($s) + { + if (!defined('PKCS7_TEXT')) { + if ($this->exceptions) { + throw new phpmailerException($this->lang("signing") . ' OpenSSL extension missing.'); + } + return ''; + } + $privKeyStr = file_get_contents($this->DKIM_private); + if ($this->DKIM_passphrase != '') { + $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); + } else { + $privKey = $privKeyStr; + } + if (openssl_sign($s, $signature, $privKey)) { + return base64_encode($signature); + } + return ''; + } + + /** + * Generate a DKIM canonicalization header. + * @access public + * @param string $s Header + * @return string + */ + public function DKIM_HeaderC($s) + { + $s = preg_replace("/\r\n\s+/", " ", $s); + $lines = explode("\r\n", $s); + foreach ($lines as $key => $line) { + list($heading, $value) = explode(":", $line, 2); + $heading = strtolower($heading); + $value = preg_replace("/\s+/", " ", $value); // Compress useless spaces + $lines[$key] = $heading . ":" . trim($value); // Don't forget to remove WSP around the value + } + $s = implode("\r\n", $lines); + return $s; + } + + /** + * Generate a DKIM canonicalization body. + * @access public + * @param string $body Message Body + * @return string + */ + public function DKIM_BodyC($body) + { + if ($body == '') { + return "\r\n"; + } + // stabilize line endings + $body = str_replace("\r\n", "\n", $body); + $body = str_replace("\n", "\r\n", $body); + // END stabilize line endings + while (substr($body, strlen($body) - 4, 4) == "\r\n\r\n") { + $body = substr($body, 0, strlen($body) - 2); + } + return $body; + } + + /** + * Create the DKIM header and body in a new message header. + * @access public + * @param string $headers_line Header lines + * @param string $subject Subject + * @param string $body Body + * @return string + */ + public function DKIM_Add($headers_line, $subject, $body) + { + $DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms + $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body + $DKIMquery = 'dns/txt'; // Query method + $DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) + $subject_header = "Subject: $subject"; + $headers = explode($this->LE, $headers_line); + $from_header = ''; + $to_header = ''; + $current = ''; + foreach ($headers as $header) { + if (strpos($header, 'From:') === 0) { + $from_header = $header; + $current = 'from_header'; + } elseif (strpos($header, 'To:') === 0) { + $to_header = $header; + $current = 'to_header'; + } else { + if ($current && strpos($header, ' =?') === 0) { + $current .= $header; + } else { + $current = ''; + } + } + } + $from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); + $to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); + $subject = str_replace( + '|', + '=7C', + $this->DKIM_QP($subject_header) + ); // Copied header fields (dkim-quoted-printable) + $body = $this->DKIM_BodyC($body); + $DKIMlen = strlen($body); // Length of body + $DKIMb64 = base64_encode(pack("H*", sha1($body))); // Base64 of packed binary SHA-1 hash of body + $ident = ($this->DKIM_identity == '') ? '' : " i=" . $this->DKIM_identity . ";"; + $dkimhdrs = "DKIM-Signature: v=1; a=" . + $DKIMsignatureType . "; q=" . + $DKIMquery . "; l=" . + $DKIMlen . "; s=" . + $this->DKIM_selector . + ";\r\n" . + "\tt=" . $DKIMtime . "; c=" . $DKIMcanonicalization . ";\r\n" . + "\th=From:To:Subject;\r\n" . + "\td=" . $this->DKIM_domain . ";" . $ident . "\r\n" . + "\tz=$from\r\n" . + "\t|$to\r\n" . + "\t|$subject;\r\n" . + "\tbh=" . $DKIMb64 . ";\r\n" . + "\tb="; + $toSign = $this->DKIM_HeaderC( + $from_header . "\r\n" . $to_header . "\r\n" . $subject_header . "\r\n" . $dkimhdrs + ); + $signed = $this->DKIM_Sign($toSign); + return $dkimhdrs . $signed . "\r\n"; + } + + /** + * Perform a callback. + * @param bool $isSent + * @param string $to + * @param string $cc + * @param string $bcc + * @param string $subject + * @param string $body + * @param string $from + */ + protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from = null) + { + if (!empty($this->action_function) && is_callable($this->action_function)) { + $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from); + call_user_func_array($this->action_function, $params); + } + } +} + +/** + * PHPMailer exception handler + * @package PHPMailer + */ +class phpmailerException extends Exception +{ + /** + * Prettify error message output + * @return string + */ + public function errorMessage() + { + $errorMsg = '' . $this->getMessage() . "
\n"; + return $errorMsg; + } +} diff --git a/PHPMailer/class.pop3.php b/PHPMailer/class.pop3.php new file mode 100644 index 00000000..042b93ac --- /dev/null +++ b/PHPMailer/class.pop3.php @@ -0,0 +1,419 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2013 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * PHPMailer POP-Before-SMTP Authentication Class. + * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. + * Does not support APOP. + * @package PHPMailer + * @author Richard Davey (original author) + * @author Marcus Bointon (coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + */ + +class POP3 +{ + /** + * The POP3 PHPMailer Version number. + * @type string + * @access public + */ + public $Version = '5.2.7'; + + /** + * Default POP3 port number. + * @type int + * @access public + */ + public $POP3_PORT = 110; + + /** + * Default timeout in seconds. + * @type int + * @access public + */ + public $POP3_TIMEOUT = 30; + + /** + * POP3 Carriage Return + Line Feed. + * @type string + * @access public + * @deprecated Use the constant instead + */ + public $CRLF = "\r\n"; + + /** + * Debug display level. + * Options: 0 = no, 1+ = yes + * @type int + * @access public + */ + public $do_debug = 0; + + /** + * POP3 mail server hostname. + * @type string + * @access public + */ + public $host; + + /** + * POP3 port number. + * @type int + * @access public + */ + public $port; + + /** + * POP3 Timeout Value in seconds. + * @type int + * @access public + */ + public $tval; + + /** + * POP3 username + * @type string + * @access public + */ + public $username; + + /** + * POP3 password. + * @type string + * @access public + */ + public $password; + + /** + * Resource handle for the POP3 connection socket. + * @type resource + * @access private + */ + private $pop_conn; + + /** + * Are we connected? + * @type bool + * @access private + */ + private $connected; + + /** + * Error container. + * @type array + * @access private + */ + private $error; + + /** + * Line break constant + */ + const CRLF = "\r\n"; + + /** + * Constructor. + * @access public + */ + public function __construct() + { + $this->pop_conn = 0; + $this->connected = false; + $this->error = null; + } + + /** + * Simple static wrapper for all-in-one POP before SMTP + * @param $host + * @param bool $port + * @param bool $tval + * @param string $username + * @param string $password + * @param int $debug_level + * @return bool + */ + public static function popBeforeSmtp( + $host, + $port = false, + $tval = false, + $username = '', + $password = '', + $debug_level = 0 + ) { + $pop = new POP3; + return $pop->authorise($host, $port, $tval, $username, $password, $debug_level); + } + + /** + * Authenticate with a POP3 server. + * A connect, login, disconnect sequence + * appropriate for POP-before SMTP authorisation. + * @access public + * @param string $host + * @param bool|int $port + * @param bool|int $tval + * @param string $username + * @param string $password + * @param int $debug_level + * @return bool + */ + public function authorise($host, $port = false, $tval = false, $username = '', $password = '', $debug_level = 0) + { + $this->host = $host; + // If no port value provided, use default + if ($port === false) { + $this->port = $this->POP3_PORT; + } else { + $this->port = $port; + } + // If no timeout value provided, use default + if ($tval === false) { + $this->tval = $this->POP3_TIMEOUT; + } else { + $this->tval = $tval; + } + $this->do_debug = $debug_level; + $this->username = $username; + $this->password = $password; + // Refresh the error log + $this->error = null; + // connect + $result = $this->connect($this->host, $this->port, $this->tval); + if ($result) { + $login_result = $this->login($this->username, $this->password); + if ($login_result) { + $this->disconnect(); + return true; + } + } + // We need to disconnect regardless of whether the login succeeded + $this->disconnect(); + return false; + } + + /** + * Connect to a POP3 server. + * @access public + * @param string $host + * @param bool|int $port + * @param integer $tval + * @return boolean + */ + public function connect($host, $port = false, $tval = 30) + { + // Are we already connected? + if ($this->connected) { + return true; + } + + //On Windows this will raise a PHP Warning error if the hostname doesn't exist. + //Rather than suppress it with @fsockopen, capture it cleanly instead + set_error_handler(array($this, 'catchWarning')); + + // connect to the POP3 server + $this->pop_conn = fsockopen( + $host, // POP3 Host + $port, // Port # + $errno, // Error Number + $errstr, // Error Message + $tval + ); // Timeout (seconds) + // Restore the error handler + restore_error_handler(); + // Does the Error Log now contain anything? + if ($this->error && $this->do_debug >= 1) { + $this->displayErrors(); + } + // Did we connect? + if ($this->pop_conn == false) { + // It would appear not... + $this->error = array( + 'error' => "Failed to connect to server $host on port $port", + 'errno' => $errno, + 'errstr' => $errstr + ); + if ($this->do_debug >= 1) { + $this->displayErrors(); + } + return false; + } + + // Increase the stream time-out + // Check for PHP 4.3.0 or later + if (version_compare(phpversion(), '5.0.0', 'ge')) { + stream_set_timeout($this->pop_conn, $tval, 0); + } else { + // Does not work on Windows + if (substr(PHP_OS, 0, 3) !== 'WIN') { + socket_set_timeout($this->pop_conn, $tval, 0); + } + } + + // Get the POP3 server response + $pop3_response = $this->getResponse(); + // Check for the +OK + if ($this->checkResponse($pop3_response)) { + // The connection is established and the POP3 server is talking + $this->connected = true; + return true; + } + return false; + } + + /** + * Log in to the POP3 server. + * Does not support APOP (RFC 2828, 4949). + * @access public + * @param string $username + * @param string $password + * @return boolean + */ + public function login($username = '', $password = '') + { + if ($this->connected == false) { + $this->error = 'Not connected to POP3 server'; + + if ($this->do_debug >= 1) { + $this->displayErrors(); + } + } + if (empty($username)) { + $username = $this->username; + } + if (empty($password)) { + $password = $this->password; + } + + // Send the Username + $this->sendString("USER $username" . self::CRLF); + $pop3_response = $this->getResponse(); + if ($this->checkResponse($pop3_response)) { + // Send the Password + $this->sendString("PASS $password" . self::CRLF); + $pop3_response = $this->getResponse(); + if ($this->checkResponse($pop3_response)) { + return true; + } + } + return false; + } + + /** + * Disconnect from the POP3 server. + * @access public + */ + public function disconnect() + { + $this->sendString('QUIT'); + //The QUIT command may cause the daemon to exit, which will kill our connection + //So ignore errors here + @fclose($this->pop_conn); + } + + /** + * Get a response from the POP3 server. + * $size is the maximum number of bytes to retrieve + * @param integer $size + * @return string + * @access private + */ + private function getResponse($size = 128) + { + $r = fgets($this->pop_conn, $size); + if ($this->do_debug >= 1) { + echo "Server -> Client: $r"; + } + return $r; + } + + /** + * Send raw data to the POP3 server. + * @param string $string + * @return integer + * @access private + */ + private function sendString($string) + { + if ($this->pop_conn) { + if ($this->do_debug >= 2) { //Show client messages when debug >= 2 + echo "Client -> Server: $string"; + } + return fwrite($this->pop_conn, $string, strlen($string)); + } + return 0; + } + + /** + * Checks the POP3 server response. + * Looks for for +OK or -ERR. + * @param string $string + * @return boolean + * @access private + */ + private function checkResponse($string) + { + if (substr($string, 0, 3) !== '+OK') { + $this->error = array( + 'error' => "Server reported an error: $string", + 'errno' => 0, + 'errstr' => '' + ); + if ($this->do_debug >= 1) { + $this->displayErrors(); + } + return false; + } else { + return true; + } + } + + /** + * Display errors if debug is enabled. + * @access private + */ + private function displayErrors() + { + echo '
';
+        foreach ($this->error as $single_error) {
+            print_r($single_error);
+        }
+        echo '
'; + } + + /** + * POP3 connection error handler. + * @param integer $errno + * @param string $errstr + * @param string $errfile + * @param integer $errline + * @access private + */ + private function catchWarning($errno, $errstr, $errfile, $errline) + { + $this->error[] = array( + 'error' => "Connecting to the POP3 server raised a PHP warning: ", + 'errno' => $errno, + 'errstr' => $errstr, + 'errfile' => $errfile, + 'errline' => $errline + ); + } +} diff --git a/PHPMailer/class.smtp.php b/PHPMailer/class.smtp.php new file mode 100644 index 00000000..6366724a --- /dev/null +++ b/PHPMailer/class.smtp.php @@ -0,0 +1,958 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @copyright 2013 Marcus Bointon + * @copyright 2004 - 2008 Andy Prevost + * @copyright 2010 - 2012 Jim Jagielski + * @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL) + */ + +/** + * PHPMailer RFC821 SMTP email transport class. + * + * Implements RFC 821 SMTP commands + * and provides some utility methods for sending mail to an SMTP server. + * + * PHP Version 5.0.0 + * + * @category PHP + * @package PHPMailer + * @link https://github.com/PHPMailer/PHPMailer/blob/master/class.smtp.php + * @author Chris Ryan + * @author Marcus Bointon + * @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL) + */ + +class SMTP +{ + /** + * The PHPMailer SMTP Version number. + */ + const VERSION = '5.2.7'; + + /** + * SMTP line break constant. + */ + const CRLF = "\r\n"; + + /** + * The SMTP port to use if one is not specified. + */ + const DEFAULT_SMTP_PORT = 25; + + /** + * The PHPMailer SMTP Version number. + * @type string + * @deprecated This should be a constant + * @see SMTP::VERSION + */ + public $Version = '5.2.7'; + + /** + * SMTP server port number. + * @type int + * @deprecated This is only ever ued as default value, so should be a constant + * @see SMTP::DEFAULT_SMTP_PORT + */ + public $SMTP_PORT = 25; + + /** + * SMTP reply line ending + * @type string + * @deprecated Use the class constant instead + * @see SMTP::CRLF + */ + public $CRLF = "\r\n"; + + /** + * Debug output level. + * Options: + * 0: no output + * 1: commands + * 2: data and commands + * 3: as 2 plus connection status + * 4: low level data output + * @type int + */ + public $do_debug = 0; + + /** + * The function/method to use for debugging output. + * Options: 'echo', 'html' or 'error_log' + * @type string + */ + public $Debugoutput = 'echo'; + + /** + * Whether to use VERP. + * @type bool + */ + public $do_verp = false; + + /** + * The timeout value for connection, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 + * @type int + */ + public $Timeout = 300; + + /** + * The SMTP timelimit value for reads, in seconds. + * @type int + */ + public $Timelimit = 30; + + /** + * The socket for the server connection. + * @type resource + */ + protected $smtp_conn; + + /** + * Error message, if any, for the last call. + * @type string + */ + protected $error = ''; + + /** + * The reply the server sent to us for HELO. + * @type string + */ + protected $helo_rply = ''; + + /** + * The most recent reply received from the server. + * @type string + */ + protected $last_reply = ''; + + /** + * Constructor. + * @access public + */ + public function __construct() + { + $this->smtp_conn = 0; + $this->error = null; + $this->helo_rply = null; + + $this->do_debug = 0; + } + + /** + * Output debugging info via a user-selected method. + * @param string $str Debug string to output + * @return void + */ + protected function edebug($str) + { + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ) + . "
\n"; + break; + case 'echo': + default: + echo gmdate('Y-m-d H:i:s')."\t".trim($str)."\n"; + } + } + + /** + * Connect to an SMTP server. + * @param string $host SMTP server IP or host name + * @param int $port The port number to connect to + * @param int $timeout How long to wait for the connection to open + * @param array $options An array of options for stream_context_create() + * @access public + * @return bool + */ + public function connect($host, $port = null, $timeout = 30, $options = array()) + { + // Clear errors to avoid confusion + $this->error = null; + + // Make sure we are __not__ connected + if ($this->connected()) { + // Already connected, generate error + $this->error = array('error' => 'Already connected to a server'); + return false; + } + + if (empty($port)) { + $port = self::DEFAULT_SMTP_PORT; + } + + // Connect to the SMTP server + if ($this->do_debug >= 3) { + $this->edebug('Connection: opening'); + } + + $errno = 0; + $errstr = ''; + $socket_context = stream_context_create($options); + //Suppress errors; connection failures are handled at a higher level + $this->smtp_conn = @stream_socket_client( + $host . ":" . $port, + $errno, + $errstr, + $timeout, + STREAM_CLIENT_CONNECT, + $socket_context + ); + + // Verify we connected properly + if (empty($this->smtp_conn)) { + $this->error = array( + 'error' => 'Failed to connect to server', + 'errno' => $errno, + 'errstr' => $errstr + ); + if ($this->do_debug >= 1) { + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] + . ": $errstr ($errno)" + ); + } + return false; + } + if ($this->do_debug >= 3) { + $this->edebug('Connection: opened'); + } + + // SMTP server can take longer to respond, give longer timeout for first read + // Windows does not have support for this timeout function + if (substr(PHP_OS, 0, 3) != 'WIN') { + $max = ini_get('max_execution_time'); + if ($max != 0 && $timeout > $max) { // Don't bother if unlimited + @set_time_limit($timeout); + } + stream_set_timeout($this->smtp_conn, $timeout, 0); + } + + // Get any announcement + $announce = $this->get_lines(); + + if ($this->do_debug >= 2) { + $this->edebug('SERVER -> CLIENT: ' . $announce); + } + + return true; + } + + /** + * Initiate a TLS (encrypted) session. + * @access public + * @return bool + */ + public function startTLS() + { + if (!$this->sendCommand("STARTTLS", "STARTTLS", 220)) { + return false; + } + // Begin encrypted connection + if (!stream_socket_enable_crypto( + $this->smtp_conn, + true, + STREAM_CRYPTO_METHOD_TLS_CLIENT + ) + ) { + return false; + } + return true; + } + + /** + * Perform SMTP authentication. + * Must be run after hello(). + * @see hello() + * @param string $username The user name + * @param string $password The password + * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5) + * @param string $realm The auth realm for NTLM + * @param string $workstation The auth workstation for NTLM + * @access public + * @return bool True if successfully authenticated. + */ + public function authenticate( + $username, + $password, + $authtype = 'LOGIN', + $realm = '', + $workstation = '' + ) { + if (empty($authtype)) { + $authtype = 'LOGIN'; + } + + switch ($authtype) { + case 'PLAIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) { + return false; + } + // Send encoded username and password + if (!$this->sendCommand( + 'User & Password', + base64_encode("\0" . $username . "\0" . $password), + 235 + ) + ) { + return false; + } + break; + case 'LOGIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) { + return false; + } + if (!$this->sendCommand("Username", base64_encode($username), 334)) { + return false; + } + if (!$this->sendCommand("Password", base64_encode($password), 235)) { + return false; + } + break; + case 'NTLM': + /* + * ntlm_sasl_client.php + * Bundled with Permission + * + * How to telnet in windows: + * http://technet.microsoft.com/en-us/library/aa995718%28EXCHG.65%29.aspx + * PROTOCOL Docs http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication + */ + require_once 'extras/ntlm_sasl_client.php'; + $temp = new stdClass(); + $ntlm_client = new ntlm_sasl_client_class; + //Check that functions are available + if (!$ntlm_client->Initialize($temp)) { + $this->error = array('error' => $temp->error); + if ($this->do_debug >= 1) { + $this->edebug( + 'You need to enable some modules in your php.ini file: ' + . $this->error['error'] + ); + } + return false; + } + //msg1 + $msg1 = $ntlm_client->TypeMsg1($realm, $workstation); //msg1 + + if (!$this->sendCommand( + 'AUTH NTLM', + 'AUTH NTLM ' . base64_encode($msg1), + 334 + ) + ) { + return false; + } + + //Though 0 based, there is a white space after the 3 digit number + //msg2 + $challenge = substr($this->last_reply, 3); + $challenge = base64_decode($challenge); + $ntlm_res = $ntlm_client->NTLMResponse( + substr($challenge, 24, 8), + $password + ); + //msg3 + $msg3 = $ntlm_client->TypeMsg3( + $ntlm_res, + $username, + $realm, + $workstation + ); + // send encoded username + return $this->sendCommand('Username', base64_encode($msg3), 235); + break; + case 'CRAM-MD5': + // Start authentication + if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) { + return false; + } + // Get the challenge + $challenge = base64_decode(substr($this->last_reply, 4)); + + // Build the response + $response = $username . ' ' . $this->hmac($challenge, $password); + + // send encoded credentials + return $this->sendCommand('Username', base64_encode($response), 235); + break; + } + return true; + } + + /** + * Calculate an MD5 HMAC hash. + * Works like hash_hmac('md5', $data, $key) + * in case that function is not available + * @param string $data The data to hash + * @param string $key The key to hash with + * @access protected + * @return string + */ + protected function hmac($data, $key) + { + if (function_exists('hash_hmac')) { + return hash_hmac('md5', $data, $key); + } + + // The following borrowed from + // http://php.net/manual/en/function.mhash.php#27225 + + // RFC 2104 HMAC implementation for php. + // Creates an md5 HMAC. + // Eliminates the need to install mhash to compute a HMAC + // Hacked by Lance Rushing + + $b = 64; // byte length for md5 + if (strlen($key) > $b) { + $key = pack('H*', md5($key)); + } + $key = str_pad($key, $b, chr(0x00)); + $ipad = str_pad('', $b, chr(0x36)); + $opad = str_pad('', $b, chr(0x5c)); + $k_ipad = $key ^ $ipad; + $k_opad = $key ^ $opad; + + return md5($k_opad . pack('H*', md5($k_ipad . $data))); + } + + /** + * Check connection state. + * @access public + * @return bool True if connected. + */ + public function connected() + { + if (!empty($this->smtp_conn)) { + $sock_status = stream_get_meta_data($this->smtp_conn); + if ($sock_status['eof']) { + // the socket is valid but we are not connected + if ($this->do_debug >= 1) { + $this->edebug( + 'SMTP NOTICE: EOF caught while checking if connected' + ); + } + $this->close(); + return false; + } + return true; // everything looks good + } + return false; + } + + /** + * Close the socket and clean up the state of the class. + * Don't use this function without first trying to use QUIT. + * @see quit() + * @access public + * @return void + */ + public function close() + { + $this->error = null; // so there is no confusion + $this->helo_rply = null; + if (!empty($this->smtp_conn)) { + // close the connection and cleanup + fclose($this->smtp_conn); + if ($this->do_debug >= 3) { + $this->edebug('Connection: closed'); + } + $this->smtp_conn = 0; + } + } + + /** + * Send an SMTP DATA command. + * Issues a data command and sends the msg_data to the server, + * finializing the mail transaction. $msg_data is the message + * that is to be send with the headers. Each header needs to be + * on a single line followed by a with the message headers + * and the message body being separated by and additional . + * Implements rfc 821: DATA + * @param string $msg_data Message data to send + * @access public + * @return bool + */ + public function data($msg_data) + { + if (!$this->sendCommand('DATA', 'DATA', 354)) { + return false; + } + + /* The server is ready to accept data! + * according to rfc821 we should not send more than 1000 + * including the CRLF + * characters on a single line so we will break the data up + * into lines by \r and/or \n then if needed we will break + * each of those into smaller lines to fit within the limit. + * in addition we will be looking for lines that start with + * a period '.' and append and additional period '.' to that + * line. NOTE: this does not count towards limit. + */ + + // Normalize the line breaks before exploding + $msg_data = str_replace("\r\n", "\n", $msg_data); + $msg_data = str_replace("\r", "\n", $msg_data); + $lines = explode("\n", $msg_data); + + /* We need to find a good way to determine if headers are + * in the msg_data or if it is a straight msg body + * currently I am assuming rfc822 definitions of msg headers + * and if the first field of the first line (':' separated) + * does not contain a space then it _should_ be a header + * and we can process all lines before a blank "" line as + * headers. + */ + + $field = substr($lines[0], 0, strpos($lines[0], ':')); + $in_headers = false; + if (!empty($field) && !strstr($field, ' ')) { + $in_headers = true; + } + + //RFC 2822 section 2.1.1 limit + $max_line_length = 998; + + foreach ($lines as $line) { + $lines_out = null; + if ($line == '' && $in_headers) { + $in_headers = false; + } + // ok we need to break this line up into several smaller lines + while (strlen($line) > $max_line_length) { + $pos = strrpos(substr($line, 0, $max_line_length), ' '); + + // Patch to fix DOS attack + if (!$pos) { + $pos = $max_line_length - 1; + $lines_out[] = substr($line, 0, $pos); + $line = substr($line, $pos); + } else { + $lines_out[] = substr($line, 0, $pos); + $line = substr($line, $pos + 1); + } + + /* If processing headers add a LWSP-char to the front of new line + * rfc822 on long msg headers + */ + if ($in_headers) { + $line = "\t" . $line; + } + } + $lines_out[] = $line; + + // send the lines to the server + while (list(, $line_out) = @each($lines_out)) { + if (strlen($line_out) > 0) { + if (substr($line_out, 0, 1) == '.') { + $line_out = '.' . $line_out; + } + } + $this->client_send($line_out . self::CRLF); + } + } + + // Message data has been sent, complete the command + return $this->sendCommand('DATA END', '.', 250); + } + + /** + * Send an SMTP HELO or EHLO command. + * Used to identify the sending server to the receiving server. + * This makes sure that client and server are in a known state. + * Implements from RFC 821: HELO + * and RFC 2821 EHLO. + * @param string $host The host name or IP to connect to + * @access public + * @return bool + */ + public function hello($host = '') + { + // Try extended hello first (RFC 2821) + if (!$this->sendHello('EHLO', $host)) { + if (!$this->sendHello('HELO', $host)) { + return false; + } + } + + return true; + } + + /** + * Send an SMTP HELO or EHLO command. + * Low-level implementation used by hello() + * @see hello() + * @param string $hello The HELO string + * @param string $host The hostname to say we are + * @access protected + * @return bool + */ + protected function sendHello($hello, $host) + { + $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250); + $this->helo_rply = $this->last_reply; + return $noerror; + } + + /** + * Send an SMTP MAIL command. + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. + * Implements rfc 821: MAIL FROM: + * @param string $from Source address of this message + * @access public + * @return bool + */ + public function mail($from) + { + $useVerp = ($this->do_verp ? ' XVERP' : ''); + return $this->sendCommand( + 'MAIL FROM', + 'MAIL FROM:<' . $from . '>' . $useVerp, + 250 + ); + } + + /** + * Send an SMTP QUIT command. + * Closes the socket if there is no error or the $close_on_error argument is true. + * Implements from rfc 821: QUIT + * @param bool $close_on_error Should the connection close if an error occurs? + * @access public + * @return bool + */ + public function quit($close_on_error = true) + { + $noerror = $this->sendCommand('QUIT', 'QUIT', 221); + $e = $this->error; //Save any error + if ($noerror or $close_on_error) { + $this->close(); + $this->error = $e; //Restore any error from the quit command + } + return $noerror; + } + + /** + * Send an SMTP RCPT command. + * Sets the TO argument to $to. + * Returns true if the recipient was accepted false if it was rejected. + * Implements from rfc 821: RCPT TO: + * @param string $to The address the message is being sent to + * @access public + * @return bool + */ + public function recipient($to) + { + return $this->sendCommand( + 'RCPT TO ', + 'RCPT TO:<' . $to . '>', + array(250, 251) + ); + } + + /** + * Send an SMTP RSET command. + * Abort any transaction that is currently in progress. + * Implements rfc 821: RSET + * @access public + * @return bool True on success. + */ + public function reset() + { + return $this->sendCommand('RSET', 'RSET', 250); + } + + /** + * Send a command to an SMTP server and check its return code. + * @param string $command The command name - not sent to the server + * @param string $commandstring The actual command to send + * @param int|array $expect One or more expected integer success codes + * @access protected + * @return bool True on success. + */ + protected function sendCommand($command, $commandstring, $expect) + { + if (!$this->connected()) { + $this->error = array( + "error" => "Called $command without being connected" + ); + return false; + } + $this->client_send($commandstring . self::CRLF); + + $reply = $this->get_lines(); + $code = substr($reply, 0, 3); + + if ($this->do_debug >= 2) { + $this->edebug('SERVER -> CLIENT: ' . $reply); + } + + if (!in_array($code, (array)$expect)) { + $this->last_reply = null; + $this->error = array( + "error" => "$command command failed", + "smtp_code" => $code, + "detail" => substr($reply, 4) + ); + if ($this->do_debug >= 1) { + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] . ': ' . $reply + ); + } + return false; + } + + $this->last_reply = $reply; + $this->error = null; + return true; + } + + /** + * Send an SMTP SAML command. + * Starts a mail transaction from the email address specified in $from. + * Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. This command + * will send the message to the users terminal if they are logged + * in and send them an email. + * Implements rfc 821: SAML FROM: + * @param string $from The address the message is from + * @access public + * @return bool + */ + public function sendAndMail($from) + { + return $this->sendCommand("SAML", "SAML FROM:$from", 250); + } + + /** + * Send an SMTP VRFY command. + * @param string $name The name to verify + * @access public + * @return bool + */ + public function verify($name) + { + return $this->sendCommand("VRFY", "VRFY $name", array(250, 251)); + } + + /** + * Send an SMTP NOOP command. + * Used to keep keep-alives alive, doesn't actually do anything + * @access public + * @return bool + */ + public function noop() + { + return $this->sendCommand("NOOP", "NOOP", 250); + } + + /** + * Send an SMTP TURN command. + * This is an optional command for SMTP that this class does not support. + * This method is here to make the RFC821 Definition + * complete for this class and __may__ be implemented in future + * Implements from rfc 821: TURN + * @access public + * @return bool + */ + public function turn() + { + $this->error = array( + 'error' => 'The SMTP TURN command is not implemented' + ); + if ($this->do_debug >= 1) { + $this->edebug('SMTP NOTICE: ' . $this->error['error']); + } + return false; + } + + /** + * Send raw data to the server. + * @param string $data The data to send + * @access public + * @return int|bool The number of bytes sent to the server or FALSE on error + */ + public function client_send($data) + { + if ($this->do_debug >= 1) { + $this->edebug("CLIENT -> SERVER: $data"); + } + return fwrite($this->smtp_conn, $data); + } + + /** + * Get the latest error. + * @access public + * @return array + */ + public function getError() + { + return $this->error; + } + + /** + * Get the last reply from the server. + * @access public + * @return string + */ + public function getLastReply() + { + return $this->last_reply; + } + + /** + * Read the SMTP server's response. + * Either before eof or socket timeout occurs on the operation. + * With SMTP we can tell if we have more lines to read if the + * 4th character is '-' symbol. If it is a space then we don't + * need to read anything else. + * @access protected + * @return string + */ + protected function get_lines() + { + $data = ''; + $endtime = 0; + // If the connection is bad, give up now + if (!is_resource($this->smtp_conn)) { + return $data; + } + stream_set_timeout($this->smtp_conn, $this->Timeout); + if ($this->Timelimit > 0) { + $endtime = time() + $this->Timelimit; + } + while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) { + $str = @fgets($this->smtp_conn, 515); + if ($this->do_debug >= 4) { + $this->edebug("SMTP -> get_lines(): \$data was \"$data\""); + $this->edebug("SMTP -> get_lines(): \$str is \"$str\""); + } + $data .= $str; + if ($this->do_debug >= 4) { + $this->edebug("SMTP -> get_lines(): \$data is \"$data\""); + } + // if 4th character is a space, we are done reading, break the loop + if (substr($str, 3, 1) == ' ') { + break; + } + // Timed-out? Log and break + $info = stream_get_meta_data($this->smtp_conn); + if ($info['timed_out']) { + if ($this->do_debug >= 4) { + $this->edebug( + 'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)' + ); + } + break; + } + // Now check if reads took too long + if ($endtime) { + if (time() > $endtime) { + if ($this->do_debug >= 4) { + $this->edebug( + 'SMTP -> get_lines(): timelimit reached (' + . $this->Timelimit . ' sec)' + ); + } + break; + } + } + } + return $data; + } + + /** + * Enable or disable VERP address generation. + * @param bool $enabled + */ + public function setVerp($enabled = false) + { + $this->do_verp = $enabled; + } + + /** + * Get VERP address generation mode. + * @return bool + */ + public function getVerp() + { + return $this->do_verp; + } + + /** + * Set debug output method. + * @param string $method The function/method to use for debugging output. + */ + public function setDebugOutput($method = 'echo') + { + $this->Debugoutput = $method; + } + + /** + * Get debug output method. + * @return string + */ + public function getDebugOutput() + { + return $this->Debugoutput; + } + + /** + * Set debug output level. + * @param int $level + */ + public function setDebugLevel($level = 0) + { + $this->do_debug = $level; + } + + /** + * Get debug output level. + * @return int + */ + public function getDebugLevel() + { + return $this->do_debug; + } + + /** + * Set SMTP timeout. + * @param int $timeout + */ + public function setTimeout($timeout = 0) + { + $this->Timeout = $timeout; + } + + /** + * Get SMTP timeout. + * @return int + */ + public function getTimeout() + { + return $this->Timeout; + } +} diff --git a/PHPMailer/composer.json b/PHPMailer/composer.json new file mode 100644 index 00000000..086f3813 --- /dev/null +++ b/PHPMailer/composer.json @@ -0,0 +1,33 @@ +{ + "name": "phpmailer/phpmailer", + "type": "library", + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "authors": [ + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "require": { + "php": ">=5.0.0" + }, + "require-dev": { + "phpdocumentor/phpdocumentor": "*", + "phpunit/phpunit": "*" + }, + "autoload": { + "classmap": ["class.phpmailer.php", "class.pop3.php", "class.smtp.php"] + }, + "license": "LGPL-2.1" +} \ No newline at end of file diff --git a/PHPMailer/docs/Callback_function_notes.txt b/PHPMailer/docs/Callback_function_notes.txt new file mode 100644 index 00000000..461ea508 --- /dev/null +++ b/PHPMailer/docs/Callback_function_notes.txt @@ -0,0 +1,17 @@ +NEW CALLBACK FUNCTION: +====================== + +We have had requests for a method to process the results of sending emails +through PHPMailer. In this new release, we have implemented a callback +function that passes the results of each email sent (to, cc, and/or bcc). +We have provided an example that echos the results back to the screen. The +callback function can be used for any purpose. With minor modifications, the +callback function can be used to create CSV logs, post results to databases, +etc. + +Please review the test.php script for the example. + +It's pretty straight forward. + +Enjoy! +Andy diff --git a/PHPMailer/docs/DomainKeys_notes.txt b/PHPMailer/docs/DomainKeys_notes.txt new file mode 100644 index 00000000..2ad10f15 --- /dev/null +++ b/PHPMailer/docs/DomainKeys_notes.txt @@ -0,0 +1,55 @@ +CREATE DKIM KEYS and DNS Resource Record: +========================================= + +To create DomainKeys Identified Mail keys, visit: +http://dkim.worxware.com/ +... read the information, fill in the form, and download the ZIP file +containing the public key, private key, DNS Resource Record and instructions +to add to your DNS Zone Record, and the PHPMailer code to enable DKIM +digital signing. + +/*** PROTECT YOUR PRIVATE & PUBLIC KEYS ***/ + +You need to protect your DKIM private and public keys from being viewed or +accessed. Add protection to your .htaccess file as in this example: + +# secure htkeyprivate file + + order allow,deny + deny from all + + +# secure htkeypublic file + + order allow,deny + deny from all + + +(the actual .htaccess additions are in the ZIP file sent back to you from +http://dkim.worxware.com/ + +A few notes on using DomainKey Identified Mail (DKIM): + +You do not need to use PHPMailer to DKIM sign emails IF: +- you enable DomainKey support and add the DNS resource record +- you use your outbound mail server + +If you are a third-party emailer that works on behalf of domain owners to +send their emails from your own server: +- you absolutely have to DKIM sign outbound emails +- the domain owner has to add the DNS resource record to match the + private key, public key, selector, identity, and domain that you create +- use caution with the "selector" ... at least one "selector" will already + exist in the DNS Zone Record of the domain at the domain owner's server + you need to ensure that the "selector" you use is unique +Note: since the IP address will not match the domain owner's DNS Zone record +you can be certain that email providers that validate based on DomainKey will +check the domain owner's DNS Zone record for your DNS resource record. Before +sending out emails on behalf of domain owners, ensure they have entered the +DNS resource record you provided them. + +Enjoy! +Andy + +PS. if you need additional information about DKIM, please see: +http://www.dkim.org/info/dkim-faq.html diff --git a/PHPMailer/docs/Note_for_SMTP_debugging.txt b/PHPMailer/docs/Note_for_SMTP_debugging.txt new file mode 100644 index 00000000..128b2d9d --- /dev/null +++ b/PHPMailer/docs/Note_for_SMTP_debugging.txt @@ -0,0 +1,17 @@ +If you are having problems connecting or sending emails through your SMTP server, the SMTP class can provide more information about the processing/errors taking place. +Use the debug functionality of the class to see what's going on in your connections. To do that, set the debug level in your script. For example: + +$mail->SMTPDebug = 1; +$mail->isSMTP(); // telling the class to use SMTP +$mail->SMTPAuth = true; // enable SMTP authentication +$mail->Port = 26; // set the SMTP port +$mail->Host = "mail.yourhost.com"; // SMTP server +$mail->Username = "name@yourhost.com"; // SMTP account username +$mail->Password = "your password"; // SMTP account password + +Notes on this: +$mail->SMTPDebug = 0; ... will disable debugging (you can also leave this out completely, 0 is the default) +$mail->SMTPDebug = 1; ... will echo errors and server responses +$mail->SMTPDebug = 2; ... will echo errors, server responses and client messages + +And finally, don't forget to disable debugging before going into production. diff --git a/PHPMailer/docs/extending.html b/PHPMailer/docs/extending.html new file mode 100644 index 00000000..97572545 --- /dev/null +++ b/PHPMailer/docs/extending.html @@ -0,0 +1,145 @@ + + +Examples using phpmailer + + + + +

Examples using phpmailer

+ +

1. Advanced Example

+

+ +This demonstrates sending out multiple email messages with binary attachments +from a MySQL database with multipart/alternative support.

+ + + + +
+
+require("class.phpmailer.php");
+
+$mail = new phpmailer();
+
+$mail->From     = "list@example.com";
+$mail->FromName = "List manager";
+$mail->Host     = "smtp1.example.com;smtp2.example.com";
+$mail->Mailer   = "smtp";
+
+@MYSQL_CONNECT("localhost","root","password");
+@mysql_select_db("my_company");
+$query = "SELECT full_name, email, photo FROM employee WHERE id=$id";
+$result = @MYSQL_QUERY($query);
+
+while ($row = mysql_fetch_array ($result))
+{
+    // HTML body
+    $body  = "Hello <font size=\"4\">" . $row["full_name"] . "</font>, <p>";
+    $body .= "<i>Your</i> personal photograph to this message.<p>";
+    $body .= "Sincerely, <br>";
+    $body .= "phpmailer List manager";
+
+    // Plain text body (for mail clients that cannot read HTML)
+    $text_body  = "Hello " . $row["full_name"] . ", \n\n";
+    $text_body .= "Your personal photograph to this message.\n\n";
+    $text_body .= "Sincerely, \n";
+    $text_body .= "phpmailer List manager";
+
+    $mail->Body    = $body;
+    $mail->AltBody = $text_body;
+    $mail->addAddress($row["email"], $row["full_name"]);
+    $mail->addStringAttachment($row["photo"], "YourPhoto.jpg");
+
+    if(!$mail->send())
+        echo "There has been a mail error sending to " . $row["email"] . "<br>";
+
+    // Clear all addresses and attachments for next loop
+    $mail->clearAddresses();
+    $mail->clearAttachments();
+}
+
+
+

+ +

2. Extending phpmailer

+

+ +Extending classes with inheritance is one of the most +powerful features of object-oriented +programming. It allows you to make changes to the +original class for your +own personal use without hacking the original +classes. Plus, it is very +easy to do. I've provided an example: + +

+Here's a class that extends the phpmailer class and sets the defaults +for the particular site:
+PHP include file: mail.inc.php +

+ + + + + +
+
+require("class.phpmailer.php");
+
+class my_phpmailer extends phpmailer {
+    // Set default variables for all new objects
+    var $From     = "from@example.com";
+    var $FromName = "Mailer";
+    var $Host     = "smtp1.example.com;smtp2.example.com";
+    var $Mailer   = "smtp";                         // Alternative to isSMTP()
+    var $WordWrap = 75;
+
+    // Replace the default error_handler
+    function error_handler($msg) {
+        print("My Site Error");
+        print("Description:");
+        printf("%s", $msg);
+        exit;
+    }
+
+    // Create an additional function
+    function do_something($something) {
+        // Place your new code here
+    }
+}
+
+
+
+ +Now here's a normal PHP page in the site, which will have all the defaults set above:
+Normal PHP file: mail_test.php + + + + + +
+
+require("mail.inc.php");
+
+// Instantiate your new class
+$mail = new my_phpmailer;
+
+// Now you only need to add the necessary stuff
+$mail->addAddress("josh@example.com", "Josh Adams");
+$mail->Subject = "Here is the subject";
+$mail->Body    = "This is the message body";
+$mail->addAttachment("c:/temp/11-10-00.zip", "new_name.zip");  // optional name
+
+if(!$mail->send())
+{
+   echo "There was an error sending the message";
+   exit;
+}
+
+echo "Message was sent successfully";
+
+
+ + diff --git a/PHPMailer/docs/faq.html b/PHPMailer/docs/faq.html new file mode 100644 index 00000000..f71c6c89 --- /dev/null +++ b/PHPMailer/docs/faq.html @@ -0,0 +1,67 @@ + + +PHPMailer FAQ + + + +

+
+

PHPMailer FAQ

+
    + +
  • Q: I'm using the SMTP mailer and I keep on getting a timeout message + well before the X seconds I set it for. What gives?
    + A: PHP versions 4.0.4pl1 and earlier have a bug in which sockets timeout + early. You can fix this by re-compiling PHP 4.0.4pl1 with this fix: + timeoutfix.diff. Otherwise you can wait for the new PHP release.

  • + +
  • Q: I am concerned that using include files will take up too much + processing time on my computer. How can I make it run faster?
    + A: PHP by itself is very fast. Much faster than ASP or JSP running on + the same type of server. This is because it has very little overhead compared + to its competitors and it pre-compiles all of + its code before it runs each script (in PHP4). However, all of + this compiling and re-compiling can take up a lot of valuable + computer resources. However, there are programs out there that compile + PHP code and store it in memory (or on mmaped files) to reduce the + processing immensely. Two of these: APC + (Alternative PHP Cache) and Afterburner + (Win32 download) + are excellent free tools that do just this. If you have the money + you might also try Zend Cache, it is + even faster than the open source varieties. All of these tools make your + scripts run faster while also reducing the load on your server. I have tried + them myself and they are quite stable too.

  • + +
  • Q: What mailer gives me the best performance?
    + A: On a single machine the sendmail (or Qmail) is fastest overall. + Next fastest is mail() to give you the best performance. Both do not have the overhead of SMTP. + If you have you have your mail server on a another machine then + SMTP is your only option, but you do get the benefit of redundant mail servers.
    + If you are running a mailing list with thousands of names, the fastest mailers in order are: SMTP, sendmail (or Qmail), mail().

  • + +
  • Q: When I try to attach a file with on my server I get a + "Could not find {file} on filesystem error". Why is this?
    + A: If you are using a Unix machine this is probably because the user + running your web server does not have read access to the directory in question. If you are using Windows, + then the problem probably is that you have used single backslashes to denote directories (\). + A single backslash has a special meaning to PHP so these are not + valid. Instead use double backslashes ("\\") or a single forward + slash ("/").

  • + +
+ +
+
+ + + diff --git a/PHPMailer/docs/generatedocs.sh b/PHPMailer/docs/generatedocs.sh new file mode 100755 index 00000000..f4d065f3 --- /dev/null +++ b/PHPMailer/docs/generatedocs.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# Regenerate PHPMailer documentation +# Run from within the docs folder +rm -rf phpdocs/* +phpdoc --directory .. --target ./phpdoc --ignore test/,examples/,extras/,test_script/ --sourcecode --force --title PHPMailer diff --git a/PHPMailer/docs/pop3_article.txt b/PHPMailer/docs/pop3_article.txt new file mode 100644 index 00000000..fb90b9c7 --- /dev/null +++ b/PHPMailer/docs/pop3_article.txt @@ -0,0 +1,50 @@ +This is built for PHP Mailer 1.72 and was not tested with any previous version. It was developed under PHP 4.3.11 (E_ALL). It works under PHP 5 and 5.1 with E_ALL, but not in Strict mode due to var deprecation (but then neither does PHP Mailer either!). It follows the RFC 1939 standard explicitly and is fully commented. + +With that noted, here is how to implement it: + +I didn't want to modify the PHP Mailer classes at all, so you will have to include/require this class along with the base one. It can sit quite happily in the phpmailer directory. + +When you need it, create your POP3 object + +Right before I invoke PHP Mailer I activate the POP3 authorisation. POP3 before SMTP is a process whereby you login to your web hosts POP3 mail server BEFORE sending out any emails via SMTP. The POP3 logon 'verifies' your ability to send email by SMTP, which typically otherwise blocks you. On my web host (Pair Networks) a single POP3 logon is enough to 'verify' you for 90 minutes. Here is some sample PHP code that activates the POP3 logon and then sends an email via PHP Mailer: + +authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1); +$mail = new PHPMailer(); $mail->SMTPDebug = 2; $mail->isSMTP(); +$mail->isHTML(false); $mail->Host = 'relay.example.com'; +$mail->From = 'mailer@example.com'; +$mail->FromName = 'Example Mailer'; +$mail->Subject = 'My subject'; +$mail->Body = 'Hello world'; +$mail->addAddress('rich@corephp.co.uk', 'Richard Davey'); +if (!$mail->send()) { + echo $mail->ErrorInfo; +} +?> + +The PHP Mailer parts of this code should be obvious to anyone who has used PHP Mailer before. One thing to note - you almost certainly will not need to use SMTP Authentication *and* POP3 before SMTP together. The Authorisation method is a proxy method to all of the others within that class. There are connect, Logon and disconnect methods available, but I wrapped them in the single Authorisation one to make things easier. +The Parameters + +The authorise parameters are as follows: + +$pop->authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1); + + 1. pop3.example.com - The POP3 Mail Server Name (hostname or IP address) + 2. 110 - The POP3 Port on which to connect (default is usually 110, but check with your host) + 3. 30 - A connection time-out value (in seconds) + 4. mailer - The POP3 Username required to logon + 5. password - The POP3 Password required to logon + 6. 1 - The class debug level (0 = off, 1+ = debug output is echoed to the browser) + +Final Comments + the Download + +1) This class does not support APOP connections. This is only because I did not have an APOP server to test with, but if you'd like to see that added just contact me. + +2) Opening and closing lots of POP3 connections can be quite a resource/network drain. If you need to send a whole batch of emails then just perform the authentication once at the start, and then loop through your mail sending script. Providing this process doesn't take longer than the verification period lasts on your POP3 server, you should be fine. With my host that period is 90 minutes, i.e. plenty of time. + +3) If you have heavy requirements for this script (i.e. send a LOT of email on a frequent basis) then I would advise seeking out an alternative sending method (direct SMTP ideally). If this isn't possible then you could modify this class so the 'last authorised' date is recorded somewhere (MySQL, Flat file, etc) meaning you only open a new connection if the old one has expired, saving you precious overhead. + +4) There are lots of other POP3 classes for PHP available. However most of them implement the full POP3 command set, where-as this one is purely for authentication, and much lighter as a result. However using any of the other POP3 classes to just logon to your server would have the same net result. At the end of the day, use whatever method you feel most comfortable with. +Download + +My thanks to Chris Ryan for the inspiration (even if indirectly, via his SMTP class) diff --git a/PHPMailer/examples/LGPLv3.txt b/PHPMailer/examples/LGPLv3.txt new file mode 100644 index 00000000..3f9959fc --- /dev/null +++ b/PHPMailer/examples/LGPLv3.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. \ No newline at end of file diff --git a/PHPMailer/examples/code_generator.phps b/PHPMailer/examples/code_generator.phps new file mode 100644 index 00000000..4af07b3a --- /dev/null +++ b/PHPMailer/examples/code_generator.phps @@ -0,0 +1,596 @@ +CharSet = 'utf-8'; +$mail->Debugoutput = $CFG['smtp_debugoutput']; +$example_code .= "\n\n\$mail = new PHPMailer(true);"; +$example_code .= "\n\$mail->CharSet = 'utf-8';"; + +class phpmailerAppException extends phpmailerException +{ +} + +$example_code .= "\n\nclass phpmailerAppException extends phpmailerException {}"; +$example_code .= "\n\ntry {"; + +try { + if (isset($_POST["submit"]) && $_POST['submit'] == "Submit") { + $to = $_POST['To_Email']; + if (!PHPMailer::validateAddress($to)) { + throw new phpmailerAppException("Email address " . $to . " is invalid -- aborting!"); + } + + $example_code .= "\n\$to = '{$_POST['To_Email']}';"; + $example_code .= "\nif(!PHPMailer::validateAddress(\$to)) {"; + $example_code .= "\n throw new phpmailerAppException(\"Email address \" . " . + "\$to . \" is invalid -- aborting!\");"; + $example_code .= "\n}"; + + switch ($_POST['test_type']) { + case 'smtp': + $mail->isSMTP(); // telling the class to use SMTP + $mail->SMTPDebug = (integer)$_POST['smtp_debug']; + $mail->Host = $_POST['smtp_server']; // SMTP server + $mail->Port = (integer)$_POST['smtp_port']; // set the SMTP port + if ($_POST['smtp_secure']) { + $mail->SMTPSecure = strtolower($_POST['smtp_secure']); + } + $mail->SMTPAuth = array_key_exists('smtp_authenticate', $_POST); // enable SMTP authentication? + if (array_key_exists('smtp_authenticate', $_POST)) { + $mail->Username = $_POST['authenticate_username']; // SMTP account username + $mail->Password = $_POST['authenticate_password']; // SMTP account password + } + + $example_code .= "\n\$mail->isSMTP();"; + $example_code .= "\n\$mail->SMTPDebug = " . $_POST['smtp_debug'] . ";"; + $example_code .= "\n\$mail->Host = \"" . $_POST['smtp_server'] . "\";"; + $example_code .= "\n\$mail->Port = \"" . $_POST['smtp_port'] . "\";"; + $example_code .= "\n\$mail->SMTPSecure = \"" . strtolower($_POST['smtp_secure']) . "\";"; + $example_code .= "\n\$mail->SMTPAuth = " . (array_key_exists( + 'smtp_authenticate', + $_POST + ) ? 'true' : 'false') . ";"; + if (array_key_exists('smtp_authenticate', $_POST)) { + $example_code .= "\n\$mail->Username = \"" . $_POST['authenticate_username'] . "\";"; + $example_code .= "\n\$mail->Password = \"" . $_POST['authenticate_password'] . "\";"; + } + break; + case 'mail': + $mail->isMail(); // telling the class to use PHP's mail() + $example_code .= "\n\$mail->isMail();"; + break; + case 'sendmail': + $mail->isSendmail(); // telling the class to use Sendmail + $example_code .= "\n\$mail->isSendmail();"; + break; + case 'qmail': + $mail->isQmail(); // telling the class to use Qmail + $example_code .= "\n\$mail->isQmail();"; + break; + default: + throw new phpmailerAppException('Invalid test_type provided'); + } + + try { + if ($_POST['From_Name'] != '') { + $mail->addReplyTo($_POST['From_Email'], $_POST['From_Name']); + $mail->From = $_POST['From_Email']; + $mail->FromName = $_POST['From_Name']; + + $example_code .= "\n\$mail->addReplyTo(\"" . + $_POST['From_Email'] . "\", \"" . $_POST['From_Name'] . "\");"; + $example_code .= "\n\$mail->From = \"" . $_POST['From_Email'] . "\";"; + $example_code .= "\n\$mail->FromName = \"" . $_POST['From_Name'] . "\";"; + } else { + $mail->addReplyTo($_POST['From_Email']); + $mail->From = $_POST['From_Email']; + $mail->FromName = $_POST['From_Email']; + + $example_code .= "\n\$mail->addReplyTo(\"" . $_POST['From_Email'] . "\");"; + $example_code .= "\n\$mail->From = \"" . $_POST['From_Email'] . "\";"; + $example_code .= "\n\$mail->FromName = \"" . $_POST['From_Email'] . "\";"; + } + + if ($_POST['To_Name'] != '') { + $mail->addAddress($to, $_POST['To_Name']); + $example_code .= "\n\$mail->addAddress(\"$to\", \"" . $_POST['To_Name'] . "\");"; + } else { + $mail->addAddress($to); + $example_code .= "\n\$mail->addAddress(\"$to\");"; + } + + if ($_POST['bcc_Email'] != '') { + $indiBCC = explode(" ", $_POST['bcc_Email']); + foreach ($indiBCC as $key => $value) { + $mail->addBCC($value); + $example_code .= "\n\$mail->addBCC(\"$value\");"; + } + } + + if ($_POST['cc_Email'] != '') { + $indiCC = explode(" ", $_POST['cc_Email']); + foreach ($indiCC as $key => $value) { + $mail->addCC($value); + $example_code .= "\n\$mail->addCC(\"$value\");"; + } + } + } catch (phpmailerException $e) { //Catch all kinds of bad addressing + throw new phpmailerAppException($e->getMessage()); + } + $mail->Subject = $_POST['Subject'] . ' (PHPMailer test using ' . strtoupper($_POST['test_type']) . ')'; + $example_code .= "\n\$mail->Subject = \"" . $_POST['Subject'] . + '(PHPMailer test using ' . strtoupper($_POST['test_type']) . ')";'; + + if ($_POST['Message'] == '') { + $body = file_get_contents('contents.html'); + } else { + $body = $_POST['Message']; + } + + $example_code .= "\n\$body = <<<'EOT'\n" . htmlentities($body) . "\nEOT;"; + + $mail->WordWrap = 80; // set word wrap + $mail->msgHTML($body, dirname(__FILE__), true); //Create message bodies and embed images + + $example_code .= "\n\$mail->WordWrap = 80;"; + $example_code .= "\n\$mail->msgHTML(\$body, dirname(__FILE__), true); //Create message bodies and embed images"; + + $mail->addAttachment('images/phpmailer_mini.gif', 'phpmailer_mini.gif'); // optional name + $mail->addAttachment('images/phpmailer.png', 'phpmailer.png'); // optional name + $example_code .= "\n\$mail->addAttachment('images/phpmailer_mini.gif'," . + "'phpmailer_mini.gif'); // optional name"; + $example_code .= "\n\$mail->addAttachment('images/phpmailer.png', 'phpmailer.png'); // optional name"; + + try { + $mail->send(); + $results_messages[] = "Message has been sent using " . strtoupper($_POST["test_type"]); + } catch (phpmailerException $e) { + throw new phpmailerAppException("Unable to send to: " . $to . ': ' . $e->getMessage()); + } + + $example_code .= "\n\ntry {"; + $example_code .= "\n \$mail->send();"; + $example_code .= "\n \$results_messages[] = \"Message has been sent using " . + strtoupper($_POST['test_type']) . "\";"; + $example_code .= "\n}"; + $example_code .= "\ncatch (phpmailerException \$e) {"; + $example_code .= "\n throw new phpmailerAppException('Unable to send to: ' . \$to. ': '.\$e->getMessage());"; + $example_code .= "\n}"; + } +} catch (phpmailerAppException $e) { + $results_messages[] = $e->errorMessage(); +} +$example_code .= "\n}"; +$example_code .= "\ncatch (phpmailerAppException \$e) {"; +$example_code .= "\n \$results_messages[] = \$e->errorMessage();"; +$example_code .= "\n}"; +$example_code .= "\n\nif (count(\$results_messages) > 0) {"; +$example_code .= "\n echo \"

Run results

\\n\";"; +$example_code .= "\n echo \"
    \\n\";"; +$example_code .= "\nforeach (\$results_messages as \$result) {"; +$example_code .= "\n echo \"
  • \$result
  • \\n\";"; +$example_code .= "\n}"; +$example_code .= "\necho \"
\\n\";"; +$example_code .= "\n}"; +?> + + + + PHPMailer Test Page + + + + + + + + +"; + echo exit("ERROR: Wrong PHP version. Must be PHP 5 or above."); +} + +if (count($results_messages) > 0) { + echo '

Run results

'; + echo '
    '; + foreach ($results_messages as $result) { + echo "
  • $result
  • "; + } + echo '
'; +} + +if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { + echo "
\n"; + echo "
Script:\n"; + echo "
\n";
+    echo $example_code;
+    echo "\n
\n"; + echo "\n
\n"; +} +?> +
+
+
+
+ Mail Details + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+
Test will include two attachments.
+
+
+
+
+ Mail Test Specs + + + + + +
Test Type +
+ + + required> +
+
+ + + required> +
+
+ + + required> +
+
+ + + required> +
+
+
"> + SMTP Specific Options: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ + value=""> +
+ +
+ +
+
+
+
+
+ +
+
+ +
+ +
+
+
+ + \ No newline at end of file diff --git a/PHPMailer/examples/contents.html b/PHPMailer/examples/contents.html new file mode 100644 index 00000000..9257f6dd --- /dev/null +++ b/PHPMailer/examples/contents.html @@ -0,0 +1,17 @@ + + + + + PHPMailer Test + + +
+

This is a test of PHPMailer.

+
+ PHPMailer rocks +
+

This example uses HTML.

+

The PHPMailer image at the top has been embedded automatically.

+
+ + diff --git a/PHPMailer/examples/exceptions.phps b/PHPMailer/examples/exceptions.phps new file mode 100644 index 00000000..a4b3224d --- /dev/null +++ b/PHPMailer/examples/exceptions.phps @@ -0,0 +1,41 @@ + + + + + PHPMailer - Exceptions test + + +setFrom('from@example.com', 'First Last'); + //Set an alternative reply-to address + $mail->addReplyTo('replyto@example.com', 'First Last'); + //Set who the message is to be sent to + $mail->addAddress('whoto@example.com', 'John Doe'); + //Set the subject line + $mail->Subject = 'PHPMailer Exceptions test'; + //Read an HTML message body from an external file, convert referenced images to embedded, + //and convert the HTML into a basic plain-text alternative body + $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); + //Replace the plain text body with one created manually + $mail->AltBody = 'This is a plain-text message body'; + //Attach an image file + $mail->addAttachment('images/phpmailer_mini.gif'); + //send the message + //Note that we don't need check the response from this because it will throw an exception if it has trouble + $mail->send(); + echo "Message sent!"; +} catch (phpmailerException $e) { + echo $e->errorMessage(); //Pretty error messages from PHPMailer +} catch (Exception $e) { + echo $e->getMessage(); //Boring error messages from anything else! +} +?> + + diff --git a/PHPMailer/examples/gmail.phps b/PHPMailer/examples/gmail.phps new file mode 100644 index 00000000..a1b403ff --- /dev/null +++ b/PHPMailer/examples/gmail.phps @@ -0,0 +1,63 @@ + + + + + PHPMailer - GMail SMTP test + + +isSMTP(); +//Enable SMTP debugging +// 0 = off (for production use) +// 1 = client messages +// 2 = client and server messages +$mail->SMTPDebug = 2; +//Ask for HTML-friendly debug output +$mail->Debugoutput = 'html'; +//Set the hostname of the mail server +$mail->Host = 'smtp.gmail.com'; +//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission +$mail->Port = 587; +//Set the encryption system to use - ssl (deprecated) or tls +$mail->SMTPSecure = 'tls'; +//Whether to use SMTP authentication +$mail->SMTPAuth = true; +//Username to use for SMTP authentication - use full email address for gmail +$mail->Username = "username@gmail.com"; +//Password to use for SMTP authentication +$mail->Password = "yourpassword"; +//Set who the message is to be sent from +$mail->setFrom('from@example.com', 'First Last'); +//Set an alternative reply-to address +$mail->addReplyTo('replyto@example.com', 'First Last'); +//Set who the message is to be sent to +$mail->addAddress('whoto@example.com', 'John Doe'); +//Set the subject line +$mail->Subject = 'PHPMailer GMail SMTP test'; +//Read an HTML message body from an external file, convert referenced images to embedded, +//convert HTML into a basic plain-text alternative body +$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); +//Replace the plain text body with one created manually +$mail->AltBody = 'This is a plain-text message body'; +//Attach an image file +$mail->addAttachment('images/phpmailer_mini.gif'); + +//send the message, check for errors +if (!$mail->send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} +?> + + diff --git a/PHPMailer/examples/images/phpmailer.png b/PHPMailer/examples/images/phpmailer.png new file mode 100644 index 0000000000000000000000000000000000000000..bc7424a3c0dcc6af72af7777de97054d05361aaa GIT binary patch literal 8670 zcmb_?cRZVI-*-^ds+PuHRch~|VnvOjLlAq9P)brH_HLCbEj3y@cI;KOcBxUjBxX^y zV^e$djXu|N-`9OT@A&6UK1t5=x4+->IFHY9{*JtaJi13i$wCPL0BE!{)${-WA}Hb5 z^fDRYdug-OjqpS9RMW%*0HC73_z(e-Q<(sOO9D<%W2EuJ2Ov9ytEi1V!WJg#?fR5p z4FD*3g9wMNFr*Eax2p@>1LUp9{l@}CIKB{zadZ7KK|WFBHhu`2zN&@2{}1AF>y&TNl6icg@}g_ z9BJb%0{6K2UqSvmjvCCv&fV!L(g^|Qx`=CIi$Eb2xw$VA{pjlvViKa_V*iRva8w{*1U*F9J308M*&ty`lHw9lBI372BxRryw?X2!LDIJs#QtIP z@0@?URo!7WNQ65SfpAfRIC;ZdTrWQdp)gQ_(3i^lq|AiLm zFW6L)P!RhcvcDnxqchQic_3U+f9z!?|8n@d@ShH< z2-m0XFb|K51k!)m|6TS^`+vtbfIA`oRntGj|MW8cw_fRAW&K_Fm&5-zvSHp%{|B-! zH2;(A3n}Q&m@rmza)rVF@F8_uTtV!AtN9zgKYCS!3&LIhsf`^>Nk&>)ia_K)#sBp9 zlgs4ax#a#M)!!8VS7!c;FT$;>L`fL@|2+*TQ5M_Q`~m>j&9u~1pxzVfX;kq>278@B z*DpC-hb2}@nwJu*3K-`licm_M<-X6;bBKMf&8$SE|C!u2FV{X9rj6%3?CV7Ywlx5J zXxpd}Y|~{n8a8Uvf@11dIhUH79s83|i|(9DO@VKcJVqzPn>!m1)&lm=Qv)~-PU)g5 z^0jFBm0cqxk{JDI_$y>n% zf&rRjvENlBO~3mW7hJlj5%qzHS?IltsW?2w+OjqL7xwt)_sGcUfh!yeF3>j|bNBe@ zq_h%ain&bGD<>}E?wA`=R=|})Zwx8Rf>JAJv7S4Dq;IY zla;ajN-xPtOUocQ;HY1|UNKQqL0lkq%!S(JOGNCxpf#8AAvWg56fx1>ryHt|f+S-P zmE&SrE?ldEU(S^_?%%cot2;PbJ72)5fdshqzL#LH4vEB$v|uj^Sqo$GdB+NoFQA7w z^!|~U^A#I@AF6&L#)r0@b!g3F`v}}V3%k!{ehqXV^KGdCU(ymVIQOcu#e!|IX@X=L8WkxYc*sAGl z=oS|{J#^NEJR%7?dTZA9cPCE`u^%<(=Q zHheUsj>_yjc(!aeH_|{(bxD<8`%73qAlkFb35_St6(KQjh+FpUm_5bR`v(gUgBjsT zYa8L~`>be??3$YguP~Gp!ugPgj(y(YRE`#!R9G)CGZG?5tDIDrvGYZu>3TI6pw(X9 z&GP`3?HJ7BA0ftSPBE!U0=f5^?MThSBF%r|gNG#mcmHUg7^*y%9@rhXI#&?b!oUkb zN!j`wuB$Vl>ki&Zeohd#D+J)TX4^WYWn?`2`6013puUzPxm32BoWYSlkd+}BEx7fp z6V$mmyN*S`Qd(?OXZ!fnLHCCVdPsKiENvUGxp5|j8UGQF$BPnUEF_7cvX{A}hWfy% z9R)i?7|WI+(s1~w8J^Y{QncdJk6-T_0< zi>=;*8=H=Fg3iGoQ3s9wAGQnfsUaShF~d5_iZ!#P1Q&Rs^Sks~UNqjm0Hm^Nzz1*X z-uEsvGMwG>F%JHCbYo-PLB83}oeZ<>(JrLrR0YO;EnF+bB?hzLLjA?evTWQ*RBJl) zzZrY?b^ER`FmS<5_&f3%yP5WOWJsWdH&&R$fbZ2VOMdS!LR?Q#DUY-c?%uHyM&U+7 zz~Ktv!m^+pfS9hU6Y>yLdiSWhhT5e6r(bl>kCJ}3z=@gZq>qsBSj#u< z`*n1(MlF zoEp?l&ZKiHMn4mBk77j?R8dRymK*jH8ypmH>mT-Cm=$rxNHB+i!*;F)~a2wpm0cpEMVM5~kT|`R>ARXC8 z%O8r5eYp)SV-6^56r2MT_8%KHw*f@a2Y&V+K$uV!f9=z9e0#NaxqPMc@F_uq-X zUfwe6J$(&%{&ir|5y`Z-G=6y%1l^!#DJ@F(G)|lvm394$JR- z)48#c;KyoGc#_KeupOJC36T}&x3`5 zRQZR3zPN0YF-}?|`$qf1R~fS4gys_V4?rg>a60{ zJtN|nuY(3c0|_8!HVyi)VI$-3*~2n_o)tJkqCtVZ^J`~#T^1buS_p(<=6yvCnWTWA z>cAkCTV>Bm=_p*QS}s`5Yi^CT@_4m%hnLN~q!FecGsnenA}b_=2dos*AHAW@y2&`nsi9Fc3 z6IeVzQK$>R71eX{j5UOg!N(un3Z{%X@d?$6lz#Tg_nDKyny;G8$1Euc)|v_luqz*U z@1%$16Pf<%Tajk@eZQmBM>5PjgUGtG5$44Q0O`WL&u&WdHjJD$pR(x5ZAS7~2$KRw z{=L#xEKQ-!#Rxg@HNXAf-PpwXfB|}9oNFey&}${d6xpLGg?2!78UV-E zzrT;)2ruDl8Po9s8HG5HV&;V)je#S4kEc4xpiC34T59IXD#a{Hy_-QNpAv^XTD)gA zD`Q;7vlS!a8XNmxwHmo0EHZxWu*zn4cOA{6fvHQ2k zFoYF}gl+JjrOkhwXxNfDYh9x2lz#SIHe%kFxymNa1q%~ByxW9N?~zE>L2SPxu^-j2lh zV{^we8h#0nTyK`4d@_vGoN8TOFqpn`%Il7<11d$hoq{ZxD1O?zf%Nl2W=E5<1&yvY zzPd>%Q}*Hx{Z_4zM>n@6C{KYWB04m5{0+SQ22yC>En2*8fekV&(;+}7Iagd|ybgO; zfn4e@)$o*5tJCL8+!(7^@U44$-s@;ws7iibI~6c|t*!p&eB5}$`PtEo-qP2cs!6$o z{M6QFBOiQ0MJUaT5U-yw+OJRHWX+g`UsgbVTg~wNXrMOLXu5<|Xnm-CIMGw(ma7@} zsaAd}eD50Lyg^74Z;qJQX1;P?z;Kyz{&ItD#?q&DRu|oXZ|W{P6ny2B?X>zzD52as zk=(kzM0i02a+hAef*44O$pMthTmGK;ZQNEhu+!YrbZoHRoyc{zyfwQ>6|h6$hgdbN z`E|T%LKINr^_kccc>p)m3{qt<_n`Sb(Q0)T*~cy(9N@pk6cqjY0Eep>U&<&$=_s3k zyNA4QE9_D?JCYihXAgc#Mb^k$HCgg>H@@$7UE&WkbFA$x_}OE%c;LJKX~|UDJLacO zKxCiNfw|#Pb=i2+6;n}xhxB}v)!7==%Ylc{vSZ(=MDJ`Qt23A--n@(vuEGcdp$u5m zGh4HKK$T_HH}^+Z*-wun1qZ#Ztkgf*UrQW2{E_Bme5QQcbc!p2hs9F|>}+@TEuGKOp4PWt>UuLBl+jGi zpq87G;oW^1a$oBkt}VO@MXS_B^?M{s-G#R?{U9!*ystIs{?{a%cw!r98N+1}hSyUD z1};R*k7w|>wYWD*whQ@b9U;EYgOhVMRh)rn!*7aiE?JQ#zHKyXV<9AKgNuEgQ^PD@ zY@U;U*5a%96mRf}^vn%d2CYHXv<8<{O$z6XIn1Y+~?~ePcXV3Fk{;A zo;_eyL}t@b*=|x>J2@aRG%yW-zkV!w>Qjj+A}bVXFdXnxl|!5l1Wl*jVN>k3Y&`Qk zpNiH|`lHrw_(Bh_G6} zlyWqfN*I_4%i_1Ji200l?*(A`%8sE3HXjFZD}(bIe;m zXHH+ZCW(j0_Z9kW%)-*$k5|4^DES{)>`y0(6z?-O|JW>JmwM57a=fa*ghd+(J^h?u zRC)Gfq?~rf?~Uu}$&8tSXIL9bsDLOWJF^&(Gkgj%h!0yUDOuPzf9R>7)*>puF!ktK zPQ63F{fS|*HTg&>%wrkk=!c%+VEECb`qfpReV|QgU-ozvDB`<0q+^zdxDl+-=s!N+;F`^QB;5 zCXZllJNZLp{$Uwai7cow8l^+Hot@BSSwf`^r{x}`<2V+m^O;N5@n^sL;ncIEMAvI? z#TCy}S^XHrZYL0DZpsYRf?MXcQV{OVsVXM2uM-ZYCn+(9#cD)?mYW9sDW$2kkGFm- z<~+mOonQ-2cc1O;xhzF7pPnVn{8kd;swdIpY&est9X)P74ST0P!4acJPxoa)k5_b- z_E4#EdCFsP>$lfnqjmjC7CiPLXysN&T~x5(oB=WJVXa;vX94TmEFPR239cIJiVHZX zuve?Y4IXTrEqtNIX6P%xfEXKPNB?-Oa%UyrWJi?x z2T^`%&^W9l*wn?tV(h8~S9%CFYe(V~lD>JQDM4twzO1n$G0p=T*CY^KF)Mj3C%Ao8 ztno`3#Z=^FYs7=}@87+F*UJkze}BZSj$=#ItasDNL)=piUHV99KL}E>-20`e{gr$$ z?y;coe2wMVl5*`S&A40u$V>*wFLd;i(Ffho?7?UDdpTPKWvm&U_Q7g=w0T-DQ3RT3 z0%hO}5>(v7It;!Q`wYK)d(5mPMNwM1xBwIJyYaj%$Tgv&x4a-@{1VS0^RH>)7dHS~ zIWNkt$Cdp!me-ug%_-~ccn$e6knO^{=@GHN(KkYg&YE3PdWd>%Cp8|B6?~2c5EXrn=dYML^X{eQfP$B?9 zIGL+j%WWWKSx6bpVz3Ot0KV~%}FqtI9NbO*wVL<`> zRQ*%!gVe4Wu^VXs%MJ8A+hd?^$Yq`+#fNzwx#_%Dz*AdecBhSk?mNUikapq^=`y40 zNqBXxY=w^;o07VoFT3x_+#=uAPXHn%Z)+ME-MgDXm_|Rk z#^^RQ`pf$Zhv zvQzdZ)(GaZ&MO=)q)_=Ohw~rgeS42+SZxCqFuHwhkLREHYretz+yzg`m?4WYr@6up zRB5YOh`T_L9t%RV0&}`3YgS1z-lt-{`Cca4tM7@LtPv@GUqJuRhm>7@XH^TG)uXK2 zU>Hr9Es}}ZrpSV|Y1rfnNWpDx3ys%YF2D7{;|~LPy7aKT>0;DMzaxdbYxO-lV?J+# zb9Zol0D~skSCs;*V`614Zc}~Ts7$X}N97(FU5(&k^3Qr;fLd@?@9Dky<@&&2!On$w zMN0909<=o4PLCN8u*@JLbGBuPTn26*Uh6vNsn-+wq|j3|ukt2S_hnD-Xg850pKP01 zi_d28*-^DxrcNGGj8mmmiK>b95@mbFR`Q!`&4=7#qbWcj8-`wF;oX#Ni|!s(b)fyT zaPR`XQoO`NI+Fr6XZM{1mUg2>$^e+rJ4ZKc&t0+?z6s|-A*Naufenvd)#-%@4iKKN zw>az-_ga52YT;pAZJk~$9d8_^E=4iWt>xX=y#-k>EVO-cnaTf7lrR0G!C2V1irc3& zTRVB2$f*^cpLH)DV|Lr#vra3G7xGT;ofTfF{orcN#@l-%D4qrZt{qz3`*Vo z8qVp?rIE>sFVe8bP_>(DV8QIGjyBCKALuaAGIkh4^rPJC>9x1#I<~3N`}iU=QoC-+ z7lK5JT7)MQCg&lCA9WiwliupWnNd#{eU{uhy{PDb7^cqIX8rT2%^mGoaBfsD6^4qG zX>dJN`6*Y*beWY9dcvaiZK=Fp3&7B=gSmJ+jL~~5r}-DJk_=R3$|mZ-2B>O`w!Ir% z){TBp6t!Uh^ASN!{u&5!2e`*DGJ42o3d6F5%PsKF>AlO*^2QHGRb)h5%eN6ha~4ZE zkHwFk+o+Nt9@y88Q$q7Ajn62OMCx)LBV$(Vim#KC3&MEVAog>hZF#-rV-iXxc{7jS zXC?T2Q!MR^_; zEt=_8-BI2GW*(**u;+`Do?hy!zgSe;Th1Kn^38{EnxD~$W{n%33w6ufH-=kV>0sNwDXV7VzwXf$QKL>SH?fA zuEJ%A`v?2kb*Xu#e6vPNw5mN{v)r(%eeF2%IMv%^woGR4nWXIw32eT+q{Q`W7t){9 zZWfnQ=7Qx#zKs;)69GS*c%WTSt}QqeuU-A?I)0<>)jRtA!s}DE)M4lc{CqFG<`1_c zV{fu&K6^6T@J!o$M*>QU;g`pI-o&|vsMiwTM?lizwFyDwR$grG+J~{|M#b*tIx<>( zX%2Tmb@nF364oq*q9v4fUK|q|wibLqOv~xA?#nMjTwswJVd>Zq=#LvK0|EUgiYV0A zdm(w=B4?VYwXVp5dV5mOp@rl_>Z;sMr@?1vC*WsY8=AuL-Mcwl_z@m0UD(3HvK?l;T` zxf;qOw|+S`i2j$Mtbigz_II;gCpjW8kHVYwT_c+Xt!3F)?*BMRJQk?H(psl5RGmyT zIc6g=qY>BD__Y{AEZ%a=RP4(0$!Ej!b*C6Whdwr6K&Cx;#2+=6WxnRaM~rdI$|w>% zVS|AKC?1AvRW?pRk_X)B*(?P)rGyPwS|iOi7aiHHGdqqeg>D1RW~ zAbhbp4mTy}+>u6IQ01#5cYlBpr9TQ}j$jnezHFI>N({TEIab|QHyTM|9k>qEsBMjy z<9W~uw0~js6|$)toZO-;8%teR>vypI6)+hurRO>>T9PTV8m@rtX(rvdLo?+K`~yO0XzjT|ck?%~=jHF=V=zPkw)E`6y& zu}}4}{q#?j=*rFq(OAZiiLc#EEl@jL`u0qT&h+~gURD_`N0WT6I#QptUp{Yp9?8Mj ziT2EeAkAUQZwC~HPb$=YE|mLab$sg4%PXB_Y#kpn5!gtJ&6*bGeLQ!4Z;@AJRUj?G zk+A~#oNiRqRmDzp6iL-e&Bs6|G~Rx8{7{pyzfcTLkb=Inv8cb21FiY&B3VM7k15UF zwUpVv5$&E~lJ+CQHl@*jT3LGI*tO?m(ZM~=>D!c}kp&7DE%<;JVnz{rkZIq#_8q~q zo1)1&$@Ddx{UkPRe{-^Sal{O=m(0=Y4o=Cdew33p@(ksgxaabD`#v*MGs<%!UIZ|OZ7_H`0oUs5GQF#EMJ zm7zE3OkzMXS{@_CCH;2b?e!`D7Gz5>(J-RvXt65wF%E^hS1tlka&n0T} zXeNmvORnPvfWR&E@xgkJl)mhHUt*x7eOHVqt;N{7NcV*7%-#{B!0%n|X2Bp>Fgo3iacsgJ4&=8?np5 z`6OFiz;wIzMZlO_*m)40AIYD+JEfP_qx7LL>j`V|{<_D?4Co1pnzGjP;Hxe*f4W^q zTyM>~8T>OZ{r(m8^X^3(Y^Xn%@7xE(16A4YzgtIWi+#~de>rdTUKmInaQvHS>L&;2 UCUCLi;vX1V>W|b)?^=icFF3L%;{X5v literal 0 HcmV?d00001 diff --git a/PHPMailer/examples/images/phpmailer_mini.gif b/PHPMailer/examples/images/phpmailer_mini.gif new file mode 100644 index 0000000000000000000000000000000000000000..dc7d7827cca7fe17cb32e76f0b264842d15f9534 GIT binary patch literal 1042 zcmV+t1nv7rNk%w1VNU=%0M-8hz`($)006;2K*mr|%V1#8aB$XufZLCc;Gdu6udnLA zzwgh__21w6@9+Qr|IEzH$H&LQ!otA7z`nk|yu7@*xw*KwxVN{rwY9ahw6wFcv$C?X zt*x!8si~-_sHUc-q@<*to}QhZot&JUnwpxJn3$E7m6Vi}l9G~Q7s?<@S(b!Mg+*99Zt_S)X2sM8 zY6#>rQ}5oCd1yLWBS>vengia{43J__iUKvA9G(fcYGIi^1Ize3x2@YndQV!Rd1uI@ z0|rn+Iv8oM7=+lg|rL5G907GeCPGaUMVu8 zajG&HZ@0r16-O&zrEyobPs}o`B2}^(1XmI}=G&KwX3u5nRyX3RPp<^URVQrYuFf%E6kqemwY0Kss(X+{f%9HjyERn}LRuIc(2 z_b1+|g{P9(T;cXp(u+e7*!=kS+#669m$E*5NG7S|l1wi7-GbfVC}m+%PI+9FI97B7TbBXwLdKYe z>9wVoVnSKwnqh+3CYx`@=_Z?L!U<-YT7ISHo^@`)!@X(sBXqGbX~ zD4=%+S_hwb(uqc-jkfuypp2qv=9g-QX~v>$jq0bSnD#m6o^@6#DV&7932CBds>-LN zbuQD4ov^Oj>948sYO609JQAy%b;b&;t%I6+>8)bcaKZ(TU@7GeF_1t39oD*dLkk}e z5rGFOyf6a}I;5*F?z-%@>+ZYo#`|s#Hpt+D2u4W2K?o+Kpu!3O2Q2Ww1Q%@Z!3Y + + + + PHPMailer Examples + + +

PHPMailer code examplesPHPMailer logo

+

This folder contains a collection of examples of using PHPMailer.

+

About testing email sending

+

When working on email sending code you'll find yourself worrying about what might happen if all these test emails got sent to your mailing list. The solution is to use a fake mail server, one that acts just like the real thing, but just doesn't actually send anything out. Some offer web interfaces, feedback, logging, the ability to return specific error codes, all things that are useful for testing error handling, authentication etc. Here's a selection of mail testing tools you might like to try:

+
    +
  • FakeEmail, a Python-based fake mail server with a web interface.
  • +
  • smtp-sink, part of the Postfix mail server, so you probably already have this installed. This is used in the Travis-CI configuration to run PHPMailer's unit tests.
  • +
  • FakeSMTP, a Java desktop app with the ability to show an SMTP log and save messages to a folder.
  • +
  • smtp4dev, a dummy SMTP server for Windows.
  • +
  • fakesendmail.sh, part of PHPMailer's test setup, this is a shell script that emulates sendmail for testing 'mail' or 'sendmail' methods in PHPMailer.
  • +
  • msglint, not a mail server, the IETF's MIME structure analyser checks the formatting of your messages.
  • +
+
+

Security note

+

Before running these examples you'll need to rename them with '.php' extensions. They are supplied as '.phps' files which will usually be displayed with syntax highlighting by PHP instead of running them. This prevents potential security issues with running potential spam-gateway code if you happen to deploy these code examples on a live site - please don't do that! Similarly, don't leave your passwords in these files as they will be visible to the world!

+
+

code_generator.phps

+

This script is a simple code generator - fill in the form and hit submit, and it will use when you entered to email you a message, and will also generate PHP code using your settings that you can copy and paste to use in your own apps. If you need to get going quickly, this is probably the best place to start.

+

mail.phps

+

This script is a basic example which creates an email message from an external HTML file, creates a plain text body, sets various addresses, adds an attachment and sends the message. It uses PHP's built-in mail() function which is the simplest to use, but relies on the presence of a local mail server, something which is not usually available on Windows. If you find yourself in that sitution, either install a local mail server, or use a remote one and send using SMTP instead.

+

exceptions.phps

+

The same as the mail example, but shows how to use PHPMailer's optional exceptions for error handling.

+

smtp.phps

+

A simple example sending using SMTP with authentication.

+

smtp_no_auth.phps

+

A simple example sending using SMTP without authentication.

+

sendmail.phps

+

A simple example using sendmail. Sendmail is a program (usually found on Linux/BSD, OS X and other UNIX-alikes) that can be used to submit messages to a local mail server without a lengthy SMTP conversation. It's probably the fastest sending mechanism, but lacks some error reporting features. There are sendmail emulators for most popular mail servers including postfix, qmail, exim etc.

+

gmail.phps

+

Submitting email via Google's Gmail service is a popular use of PHPMailer. It's much the same as normal SMTP sending, just with some specific settings, namely using TLS encryption, authentication is enabled, and it connects to the SMTP submission port 587 on the smtp.gmail.com host. This example does all that.

+

pop_before_smtp.phps

+

Before effective SMTP authentication mechanisms were available, it was common for ISPs to use POP-before-SMTP authentication. As it implies, you authenticate using the POP3 protocol (an older protocol now mostly replaced by the far superior IMAP), and then the SMTP server will allow send access from your IP address for a short while, usually 5-15 minutes. PHPMailer includes a POP3 protocol client, so it can carry out this sequence - it's just like a normal SMTP conversation (without authentication), but connects via POP first.

+

mailing_list.phps

+

This is a somewhat naïve example of sending similar emails to a list of different addresses. It sets up a PHPMailer instance using SMTP, then connects to a MySQL database to retrieve a list of recipients. The code loops over this list, sending email to each person using their info and marks them as sent in the database. It makes use of SMTP keepalive which saves reconnecting and re-authenticating between each message.

+
+

Most of these examples use the 'example.com' domain. This domain is reserved by IANA for illustrative purposes, as documented in RFC 2606. Don't use made-up domains like 'mydomain.com' or 'somedomain.com' in examples as someone, somewhere, probably owns them!

+ + diff --git a/PHPMailer/examples/mail.phps b/PHPMailer/examples/mail.phps new file mode 100644 index 00000000..fcc8ef9d --- /dev/null +++ b/PHPMailer/examples/mail.phps @@ -0,0 +1,37 @@ + + + + + PHPMailer - mail() test + + +setFrom('from@example.com', 'First Last'); +//Set an alternative reply-to address +$mail->addReplyTo('replyto@example.com', 'First Last'); +//Set who the message is to be sent to +$mail->addAddress('whoto@example.com', 'John Doe'); +//Set the subject line +$mail->Subject = 'PHPMailer mail() test'; +//Read an HTML message body from an external file, convert referenced images to embedded, +//convert HTML into a basic plain-text alternative body +$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); +//Replace the plain text body with one created manually +$mail->AltBody = 'This is a plain-text message body'; +//Attach an image file +$mail->addAttachment('images/phpmailer_mini.gif'); + +//send the message, check for errors +if (!$mail->send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} +?> + + diff --git a/PHPMailer/examples/mailing_list.phps b/PHPMailer/examples/mailing_list.phps new file mode 100644 index 00000000..8d0fc5fc --- /dev/null +++ b/PHPMailer/examples/mailing_list.phps @@ -0,0 +1,51 @@ +isSMTP(); +$mail->Host = 'smtp.example.com'; +$mail->SMTPAuth = true; +$mail->SMTPKeepAlive = true; // SMTP connection will not close after each email sent, reduces SMTP overhead +$mail->Host = 'mail.example.com'; +$mail->Port = 25; +$mail->Username = 'yourname@example.com'; +$mail->Password = 'yourpassword'; +$mail->setFrom('list@example.com', 'List manager'); +$mail->addReplyTo('list@example.com', 'List manager'); + +$mail->Subject = "PHPMailer Simple database mailing list test"; + +//connect to the database and select the recipients from your mailing list that have not yet been sent to +//You'll need to alter this to match your database +$mysql = mysql_connect('localhost', 'username', 'password'); +mysql_select_db('mydb', $mysql); +$result = mysql_query("SELECT full_name, email, photo FROM mailinglist WHERE sent = false", $mysql); + +while ($row = mysql_fetch_array($result)) { + $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; + $mail->msgHTML($body); + $mail->addAddress($row['email'], $row['full_name']); + $mail->addStringAttachment($row['photo'], 'YourPhoto.jpg'); //Assumes the image data is stored in the DB + + if (!$mail->send()) { + echo "Mailer Error (" . str_replace("@", "@", $row["email"]) . ') ' . $mail->ErrorInfo . '
'; + break; //Abandon sending + } else { + echo "Message sent to :" . $row['full_name'] . ' (' . str_replace("@", "@", $row['email']) . ')
'; + //Mark it as sent in the DB + mysql_query( + "UPDATE mailinglist SET sent = true WHERE email = '" . mysql_real_escape_string($row['email'], $mysql) . "'" + ); + } + // Clear all addresses and attachments for next loop + $mail->clearAddresses(); + $mail->clearAttachments(); +} diff --git a/PHPMailer/examples/pop_before_smtp.phps b/PHPMailer/examples/pop_before_smtp.phps new file mode 100644 index 00000000..d4012cf8 --- /dev/null +++ b/PHPMailer/examples/pop_before_smtp.phps @@ -0,0 +1,60 @@ + + + + + PHPMailer - POP-before-SMTP test + + +isSMTP(); + //Enable SMTP debugging + // 0 = off (for production use) + // 1 = client messages + // 2 = client and server messages + $mail->SMTPDebug = 2; + //Ask for HTML-friendly debug output + $mail->Debugoutput = 'html'; + //Set the hostname of the mail server + $mail->Host = "mail.example.com"; + //Set the SMTP port number - likely to be 25, 465 or 587 + $mail->Port = 25; + //Whether to use SMTP authentication + $mail->SMTPAuth = false; + //Set who the message is to be sent from + $mail->setFrom('from@example.com', 'First Last'); + //Set an alternative reply-to address + $mail->addReplyTo('replyto@example.com', 'First Last'); + //Set who the message is to be sent to + $mail->addAddress('whoto@example.com', 'John Doe'); + //Set the subject line + $mail->Subject = 'PHPMailer POP-before-SMTP test'; + //Read an HTML message body from an external file, convert referenced images to embedded, + //and convert the HTML into a basic plain-text alternative body + $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); + //Replace the plain text body with one created manually + $mail->AltBody = 'This is a plain-text message body'; + //Attach an image file + $mail->addAttachment('images/phpmailer_mini.gif'); + //send the message + //Note that we don't need check the response from this because it will throw an exception if it has trouble + $mail->send(); + echo "Message sent!"; +} catch (phpmailerException $e) { + echo $e->errorMessage(); //Pretty error messages from PHPMailer +} catch (Exception $e) { + echo $e->getMessage(); //Boring error messages from anything else! +} +?> + + diff --git a/PHPMailer/examples/scripts/XRegExp.js b/PHPMailer/examples/scripts/XRegExp.js new file mode 100755 index 00000000..ebdb9c94 --- /dev/null +++ b/PHPMailer/examples/scripts/XRegExp.js @@ -0,0 +1,664 @@ +// XRegExp 1.5.1 +// (c) 2007-2012 Steven Levithan +// MIT License +// +// Provides an augmented, extensible, cross-browser implementation of regular expressions, +// including support for additional syntax, flags, and methods + +var XRegExp; + +if (XRegExp) { + // Avoid running twice, since that would break references to native globals + throw Error("can't load XRegExp twice in the same frame"); +} + +// Run within an anonymous function to protect variables and avoid new globals +(function (undefined) { + + //--------------------------------- + // Constructor + //--------------------------------- + + // Accepts a pattern and flags; returns a new, extended `RegExp` object. Differs from a native + // regular expression in that additional syntax and flags are supported and cross-browser + // syntax inconsistencies are ameliorated. `XRegExp(/regex/)` clones an existing regex and + // converts to type XRegExp + XRegExp = function (pattern, flags) { + var output = [], + currScope = XRegExp.OUTSIDE_CLASS, + pos = 0, + context, tokenResult, match, chr, regex; + + if (XRegExp.isRegExp(pattern)) { + if (flags !== undefined) + throw TypeError("can't supply flags when constructing one RegExp from another"); + return clone(pattern); + } + // Tokens become part of the regex construction process, so protect against infinite + // recursion when an XRegExp is constructed within a token handler or trigger + if (isInsideConstructor) + throw Error("can't call the XRegExp constructor within token definition functions"); + + flags = flags || ""; + context = { // `this` object for custom tokens + hasNamedCapture: false, + captureNames: [], + hasFlag: function (flag) {return flags.indexOf(flag) > -1;}, + setFlag: function (flag) {flags += flag;} + }; + + while (pos < pattern.length) { + // Check for custom tokens at the current position + tokenResult = runTokens(pattern, pos, currScope, context); + + if (tokenResult) { + output.push(tokenResult.output); + pos += (tokenResult.match[0].length || 1); + } else { + // Check for native multicharacter metasequences (excluding character classes) at + // the current position + if (match = nativ.exec.call(nativeTokens[currScope], pattern.slice(pos))) { + output.push(match[0]); + pos += match[0].length; + } else { + chr = pattern.charAt(pos); + if (chr === "[") + currScope = XRegExp.INSIDE_CLASS; + else if (chr === "]") + currScope = XRegExp.OUTSIDE_CLASS; + // Advance position one character + output.push(chr); + pos++; + } + } + } + + regex = RegExp(output.join(""), nativ.replace.call(flags, flagClip, "")); + regex._xregexp = { + source: pattern, + captureNames: context.hasNamedCapture ? context.captureNames : null + }; + return regex; + }; + + + //--------------------------------- + // Public properties + //--------------------------------- + + XRegExp.version = "1.5.1"; + + // Token scope bitflags + XRegExp.INSIDE_CLASS = 1; + XRegExp.OUTSIDE_CLASS = 2; + + + //--------------------------------- + // Private variables + //--------------------------------- + + var replacementToken = /\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g, + flagClip = /[^gimy]+|([\s\S])(?=[\s\S]*\1)/g, // Nonnative and duplicate flags + quantifier = /^(?:[?*+]|{\d+(?:,\d*)?})\??/, + isInsideConstructor = false, + tokens = [], + // Copy native globals for reference ("native" is an ES3 reserved keyword) + nativ = { + exec: RegExp.prototype.exec, + test: RegExp.prototype.test, + match: String.prototype.match, + replace: String.prototype.replace, + split: String.prototype.split + }, + compliantExecNpcg = nativ.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups + compliantLastIndexIncrement = function () { + var x = /^/g; + nativ.test.call(x, ""); + return !x.lastIndex; + }(), + hasNativeY = RegExp.prototype.sticky !== undefined, + nativeTokens = {}; + + // `nativeTokens` match native multicharacter metasequences only (including deprecated octals, + // excluding character classes) + nativeTokens[XRegExp.INSIDE_CLASS] = /^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/; + nativeTokens[XRegExp.OUTSIDE_CLASS] = /^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/; + + + //--------------------------------- + // Public methods + //--------------------------------- + + // Lets you extend or change XRegExp syntax and create custom flags. This is used internally by + // the XRegExp library and can be used to create XRegExp plugins. This function is intended for + // users with advanced knowledge of JavaScript's regular expression syntax and behavior. It can + // be disabled by `XRegExp.freezeTokens` + XRegExp.addToken = function (regex, handler, scope, trigger) { + tokens.push({ + pattern: clone(regex, "g" + (hasNativeY ? "y" : "")), + handler: handler, + scope: scope || XRegExp.OUTSIDE_CLASS, + trigger: trigger || null + }); + }; + + // Accepts a pattern and flags; returns an extended `RegExp` object. If the pattern and flag + // combination has previously been cached, the cached copy is returned; otherwise the newly + // created regex is cached + XRegExp.cache = function (pattern, flags) { + var key = pattern + "/" + (flags || ""); + return XRegExp.cache[key] || (XRegExp.cache[key] = XRegExp(pattern, flags)); + }; + + // Accepts a `RegExp` instance; returns a copy with the `/g` flag set. The copy has a fresh + // `lastIndex` (set to zero). If you want to copy a regex without forcing the `global` + // property, use `XRegExp(regex)`. Do not use `RegExp(regex)` because it will not preserve + // special properties required for named capture + XRegExp.copyAsGlobal = function (regex) { + return clone(regex, "g"); + }; + + // Accepts a string; returns the string with regex metacharacters escaped. The returned string + // can safely be used at any point within a regex to match the provided literal string. Escaped + // characters are [ ] { } ( ) * + ? - . , \ ^ $ | # and whitespace + XRegExp.escape = function (str) { + return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + }; + + // Accepts a string to search, regex to search with, position to start the search within the + // string (default: 0), and an optional Boolean indicating whether matches must start at-or- + // after the position or at the specified position only. This function ignores the `lastIndex` + // of the provided regex in its own handling, but updates the property for compatibility + XRegExp.execAt = function (str, regex, pos, anchored) { + var r2 = clone(regex, "g" + ((anchored && hasNativeY) ? "y" : "")), + match; + r2.lastIndex = pos = pos || 0; + match = r2.exec(str); // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (anchored && match && match.index !== pos) + match = null; + if (regex.global) + regex.lastIndex = match ? r2.lastIndex : 0; + return match; + }; + + // Breaks the unrestorable link to XRegExp's private list of tokens, thereby preventing + // syntax and flag changes. Should be run after XRegExp and any plugins are loaded + XRegExp.freezeTokens = function () { + XRegExp.addToken = function () { + throw Error("can't run addToken after freezeTokens"); + }; + }; + + // Accepts any value; returns a Boolean indicating whether the argument is a `RegExp` object. + // Note that this is also `true` for regex literals and regexes created by the `XRegExp` + // constructor. This works correctly for variables created in another frame, when `instanceof` + // and `constructor` checks would fail to work as intended + XRegExp.isRegExp = function (o) { + return Object.prototype.toString.call(o) === "[object RegExp]"; + }; + + // Executes `callback` once per match within `str`. Provides a simpler and cleaner way to + // iterate over regex matches compared to the traditional approaches of subverting + // `String.prototype.replace` or repeatedly calling `exec` within a `while` loop + XRegExp.iterate = function (str, regex, callback, context) { + var r2 = clone(regex, "g"), + i = -1, match; + while (match = r2.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (regex.global) + regex.lastIndex = r2.lastIndex; // Doing this to follow expectations if `lastIndex` is checked within `callback` + callback.call(context, match, ++i, str, regex); + if (r2.lastIndex === match.index) + r2.lastIndex++; + } + if (regex.global) + regex.lastIndex = 0; + }; + + // Accepts a string and an array of regexes; returns the result of using each successive regex + // to search within the matches of the previous regex. The array of regexes can also contain + // objects with `regex` and `backref` properties, in which case the named or numbered back- + // references specified are passed forward to the next regex or returned. E.g.: + // var xregexpImgFileNames = XRegExp.matchChain(html, [ + // {regex: /]+)>/i, backref: 1}, // tag attributes + // {regex: XRegExp('(?ix) \\s src=" (? [^"]+ )'), backref: "src"}, // src attribute values + // {regex: XRegExp("^http://xregexp\\.com(/[^#?]+)", "i"), backref: 1}, // xregexp.com paths + // /[^\/]+$/ // filenames (strip directory paths) + // ]); + XRegExp.matchChain = function (str, chain) { + return function recurseChain (values, level) { + var item = chain[level].regex ? chain[level] : {regex: chain[level]}, + regex = clone(item.regex, "g"), + matches = [], i; + for (i = 0; i < values.length; i++) { + XRegExp.iterate(values[i], regex, function (match) { + matches.push(item.backref ? (match[item.backref] || "") : match[0]); + }); + } + return ((level === chain.length - 1) || !matches.length) ? + matches : recurseChain(matches, level + 1); + }([str], 0); + }; + + + //--------------------------------- + // New RegExp prototype methods + //--------------------------------- + + // Accepts a context object and arguments array; returns the result of calling `exec` with the + // first value in the arguments array. the context is ignored but is accepted for congruity + // with `Function.prototype.apply` + RegExp.prototype.apply = function (context, args) { + return this.exec(args[0]); + }; + + // Accepts a context object and string; returns the result of calling `exec` with the provided + // string. the context is ignored but is accepted for congruity with `Function.prototype.call` + RegExp.prototype.call = function (context, str) { + return this.exec(str); + }; + + + //--------------------------------- + // Overriden native methods + //--------------------------------- + + // Adds named capture support (with backreferences returned as `result.name`), and fixes two + // cross-browser issues per ES3: + // - Captured values for nonparticipating capturing groups should be returned as `undefined`, + // rather than the empty string. + // - `lastIndex` should not be incremented after zero-length matches. + RegExp.prototype.exec = function (str) { + var match, name, r2, origLastIndex; + if (!this.global) + origLastIndex = this.lastIndex; + match = nativ.exec.apply(this, arguments); + if (match) { + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { + r2 = RegExp(this.source, nativ.replace.call(getNativeFlags(this), "g", "")); + // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed + // matching due to characters outside the match + nativ.replace.call((str + "").slice(match.index), r2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) + match[i] = undefined; + } + }); + } + // Attach named capture properties + if (this._xregexp && this._xregexp.captureNames) { + for (var i = 1; i < match.length; i++) { + name = this._xregexp.captureNames[i - 1]; + if (name) + match[name] = match[i]; + } + } + // Fix browsers that increment `lastIndex` after zero-length matches + if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) + this.lastIndex--; + } + if (!this.global) + this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + return match; + }; + + // Fix browser bugs in native method + RegExp.prototype.test = function (str) { + // Use the native `exec` to skip some processing overhead, even though the altered + // `exec` would take care of the `lastIndex` fixes + var match, origLastIndex; + if (!this.global) + origLastIndex = this.lastIndex; + match = nativ.exec.call(this, str); + // Fix browsers that increment `lastIndex` after zero-length matches + if (match && !compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) + this.lastIndex--; + if (!this.global) + this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + return !!match; + }; + + // Adds named capture support and fixes browser bugs in native method + String.prototype.match = function (regex) { + if (!XRegExp.isRegExp(regex)) + regex = RegExp(regex); // Native `RegExp` + if (regex.global) { + var result = nativ.match.apply(this, arguments); + regex.lastIndex = 0; // Fix IE bug + return result; + } + return regex.exec(this); // Run the altered `exec` + }; + + // Adds support for `${n}` tokens for named and numbered backreferences in replacement text, + // and provides named backreferences to replacement functions as `arguments[0].name`. Also + // fixes cross-browser differences in replacement text syntax when performing a replacement + // using a nonregex search value, and the value of replacement regexes' `lastIndex` property + // during replacement iterations. Note that this doesn't support SpiderMonkey's proprietary + // third (`flags`) parameter + String.prototype.replace = function (search, replacement) { + var isRegex = XRegExp.isRegExp(search), + captureNames, result, str, origLastIndex; + + // There are too many combinations of search/replacement types/values and browser bugs that + // preclude passing to native `replace`, so don't try + //if (...) + // return nativ.replace.apply(this, arguments); + + if (isRegex) { + if (search._xregexp) + captureNames = search._xregexp.captureNames; // Array or `null` + if (!search.global) + origLastIndex = search.lastIndex; + } else { + search = search + ""; // Type conversion + } + + if (Object.prototype.toString.call(replacement) === "[object Function]") { + result = nativ.replace.call(this + "", search, function () { + if (captureNames) { + // Change the `arguments[0]` string primitive to a String object which can store properties + arguments[0] = new String(arguments[0]); + // Store named backreferences on `arguments[0]` + for (var i = 0; i < captureNames.length; i++) { + if (captureNames[i]) + arguments[0][captureNames[i]] = arguments[i + 1]; + } + } + // Update `lastIndex` before calling `replacement` (fix browsers) + if (isRegex && search.global) + search.lastIndex = arguments[arguments.length - 2] + arguments[0].length; + return replacement.apply(null, arguments); + }); + } else { + str = this + ""; // Type conversion, so `args[args.length - 1]` will be a string (given nonstring `this`) + result = nativ.replace.call(str, search, function () { + var args = arguments; // Keep this function's `arguments` available through closure + return nativ.replace.call(replacement + "", replacementToken, function ($0, $1, $2) { + // Numbered backreference (without delimiters) or special variable + if ($1) { + switch ($1) { + case "$": return "$"; + case "&": return args[0]; + case "`": return args[args.length - 1].slice(0, args[args.length - 2]); + case "'": return args[args.length - 1].slice(args[args.length - 2] + args[0].length); + // Numbered backreference + default: + // What does "$10" mean? + // - Backreference 10, if 10 or more capturing groups exist + // - Backreference 1 followed by "0", if 1-9 capturing groups exist + // - Otherwise, it's the string "$10" + // Also note: + // - Backreferences cannot be more than two digits (enforced by `replacementToken`) + // - "$01" is equivalent to "$1" if a capturing group exists, otherwise it's the string "$01" + // - There is no "$0" token ("$&" is the entire match) + var literalNumbers = ""; + $1 = +$1; // Type conversion; drop leading zero + if (!$1) // `$1` was "0" or "00" + return $0; + while ($1 > args.length - 3) { + literalNumbers = String.prototype.slice.call($1, -1) + literalNumbers; + $1 = Math.floor($1 / 10); // Drop the last digit + } + return ($1 ? args[$1] || "" : "$") + literalNumbers; + } + // Named backreference or delimited numbered backreference + } else { + // What does "${n}" mean? + // - Backreference to numbered capture n. Two differences from "$n": + // - n can be more than two digits + // - Backreference 0 is allowed, and is the entire match + // - Backreference to named capture n, if it exists and is not a number overridden by numbered capture + // - Otherwise, it's the string "${n}" + var n = +$2; // Type conversion; drop leading zeros + if (n <= args.length - 3) + return args[n]; + n = captureNames ? indexOf(captureNames, $2) : -1; + return n > -1 ? args[n + 1] : $0; + } + }); + }); + } + + if (isRegex) { + if (search.global) + search.lastIndex = 0; // Fix IE, Safari bug (last tested IE 9.0.5, Safari 5.1.2 on Windows) + else + search.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) + } + + return result; + }; + + // A consistent cross-browser, ES3 compliant `split` + String.prototype.split = function (s /* separator */, limit) { + // If separator `s` is not a regex, use the native `split` + if (!XRegExp.isRegExp(s)) + return nativ.split.apply(this, arguments); + + var str = this + "", // Type conversion + output = [], + lastLastIndex = 0, + match, lastLength; + + // Behavior for `limit`: if it's... + // - `undefined`: No limit + // - `NaN` or zero: Return an empty array + // - A positive number: Use `Math.floor(limit)` + // - A negative number: No limit + // - Other: Type-convert, then use the above rules + if (limit === undefined || +limit < 0) { + limit = Infinity; + } else { + limit = Math.floor(+limit); + if (!limit) + return []; + } + + // This is required if not `s.global`, and it avoids needing to set `s.lastIndex` to zero + // and restore it to its original value when we're done using the regex + s = XRegExp.copyAsGlobal(s); + + while (match = s.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) + if (s.lastIndex > lastLastIndex) { + output.push(str.slice(lastLastIndex, match.index)); + + if (match.length > 1 && match.index < str.length) + Array.prototype.push.apply(output, match.slice(1)); + + lastLength = match[0].length; + lastLastIndex = s.lastIndex; + + if (output.length >= limit) + break; + } + + if (s.lastIndex === match.index) + s.lastIndex++; + } + + if (lastLastIndex === str.length) { + if (!nativ.test.call(s, "") || lastLength) + output.push(""); + } else { + output.push(str.slice(lastLastIndex)); + } + + return output.length > limit ? output.slice(0, limit) : output; + }; + + + //--------------------------------- + // Private helper functions + //--------------------------------- + + // Supporting function for `XRegExp`, `XRegExp.copyAsGlobal`, etc. Returns a copy of a `RegExp` + // instance with a fresh `lastIndex` (set to zero), preserving properties required for named + // capture. Also allows adding new flags in the process of copying the regex + function clone (regex, additionalFlags) { + if (!XRegExp.isRegExp(regex)) + throw TypeError("type RegExp expected"); + var x = regex._xregexp; + regex = XRegExp(regex.source, getNativeFlags(regex) + (additionalFlags || "")); + if (x) { + regex._xregexp = { + source: x.source, + captureNames: x.captureNames ? x.captureNames.slice(0) : null + }; + } + return regex; + } + + function getNativeFlags (regex) { + return (regex.global ? "g" : "") + + (regex.ignoreCase ? "i" : "") + + (regex.multiline ? "m" : "") + + (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 + (regex.sticky ? "y" : ""); + } + + function runTokens (pattern, index, scope, context) { + var i = tokens.length, + result, match, t; + // Protect against constructing XRegExps within token handler and trigger functions + isInsideConstructor = true; + // Must reset `isInsideConstructor`, even if a `trigger` or `handler` throws + try { + while (i--) { // Run in reverse order + t = tokens[i]; + if ((scope & t.scope) && (!t.trigger || t.trigger.call(context))) { + t.pattern.lastIndex = index; + match = t.pattern.exec(pattern); // Running the altered `exec` here allows use of named backreferences, etc. + if (match && match.index === index) { + result = { + output: t.handler.call(context, match, scope), + match: match + }; + break; + } + } + } + } catch (err) { + throw err; + } finally { + isInsideConstructor = false; + } + return result; + } + + function indexOf (array, item, from) { + if (Array.prototype.indexOf) // Use the native array method if available + return array.indexOf(item, from); + for (var i = from || 0; i < array.length; i++) { + if (array[i] === item) + return i; + } + return -1; + } + + + //--------------------------------- + // Built-in tokens + //--------------------------------- + + // Augment XRegExp's regular expression syntax and flags. Note that when adding tokens, the + // third (`scope`) argument defaults to `XRegExp.OUTSIDE_CLASS` + + // Comment pattern: (?# ) + XRegExp.addToken( + /\(\?#[^)]*\)/, + function (match) { + // Keep tokens separated unless the following token is a quantifier + return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; + } + ); + + // Capturing group (match the opening parenthesis only). + // Required for support of named capturing groups + XRegExp.addToken( + /\((?!\?)/, + function () { + this.captureNames.push(null); + return "("; + } + ); + + // Named capturing group (match the opening delimiter only): (? + XRegExp.addToken( + /\(\?<([$\w]+)>/, + function (match) { + this.captureNames.push(match[1]); + this.hasNamedCapture = true; + return "("; + } + ); + + // Named backreference: \k + XRegExp.addToken( + /\\k<([\w$]+)>/, + function (match) { + var index = indexOf(this.captureNames, match[1]); + // Keep backreferences separate from subsequent literal numbers. Preserve back- + // references to named groups that are undefined at this point as literal strings + return index > -1 ? + "\\" + (index + 1) + (isNaN(match.input.charAt(match.index + match[0].length)) ? "" : "(?:)") : + match[0]; + } + ); + + // Empty character class: [] or [^] + XRegExp.addToken( + /\[\^?]/, + function (match) { + // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S]. + // (?!) should work like \b\B, but is unreliable in Firefox + return match[0] === "[]" ? "\\b\\B" : "[\\s\\S]"; + } + ); + + // Mode modifier at the start of the pattern only, with any combination of flags imsx: (?imsx) + // Does not support x(?i), (?-i), (?i-m), (?i: ), (?i)(?m), etc. + XRegExp.addToken( + /^\(\?([imsx]+)\)/, + function (match) { + this.setFlag(match[1]); + return ""; + } + ); + + // Whitespace and comments, in free-spacing (aka extended) mode only + XRegExp.addToken( + /(?:\s+|#.*)+/, + function (match) { + // Keep tokens separated unless the following token is a quantifier + return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; + }, + XRegExp.OUTSIDE_CLASS, + function () {return this.hasFlag("x");} + ); + + // Dot, in dotall (aka singleline) mode only + XRegExp.addToken( + /\./, + function () {return "[\\s\\S]";}, + XRegExp.OUTSIDE_CLASS, + function () {return this.hasFlag("s");} + ); + + + //--------------------------------- + // Backward compatibility + //--------------------------------- + + // Uncomment the following block for compatibility with XRegExp 1.0-1.2: + /* + XRegExp.matchWithinChain = XRegExp.matchChain; + RegExp.prototype.addFlags = function (s) {return clone(this, s);}; + RegExp.prototype.execAll = function (s) {var r = []; XRegExp.iterate(s, this, function (m) {r.push(m);}); return r;}; + RegExp.prototype.forEachExec = function (s, f, c) {return XRegExp.iterate(s, this, f, c);}; + RegExp.prototype.validate = function (s) {var r = RegExp("^(?:" + this.source + ")$(?!\\s)", getNativeFlags(this)); if (this.global) this.lastIndex = 0; return s.search(r) === 0;}; + */ + +})(); + diff --git a/PHPMailer/examples/scripts/shAutoloader.js b/PHPMailer/examples/scripts/shAutoloader.js new file mode 100644 index 00000000..9f5942ee --- /dev/null +++ b/PHPMailer/examples/scripts/shAutoloader.js @@ -0,0 +1,122 @@ +(function() { + +var sh = SyntaxHighlighter; + +/** + * Provides functionality to dynamically load only the brushes that a needed to render the current page. + * + * There are two syntaxes that autoload understands. For example: + * + * SyntaxHighlighter.autoloader( + * [ 'applescript', 'Scripts/shBrushAppleScript.js' ], + * [ 'actionscript3', 'as3', 'Scripts/shBrushAS3.js' ] + * ); + * + * or a more easily comprehendable one: + * + * SyntaxHighlighter.autoloader( + * 'applescript Scripts/shBrushAppleScript.js', + * 'actionscript3 as3 Scripts/shBrushAS3.js' + * ); + */ +sh.autoloader = function() +{ + var list = arguments, + elements = sh.findElements(), + brushes = {}, + scripts = {}, + all = SyntaxHighlighter.all, + allCalled = false, + allParams = null, + i + ; + + SyntaxHighlighter.all = function(params) + { + allParams = params; + allCalled = true; + }; + + function addBrush(aliases, url) + { + for (var i = 0; i < aliases.length; i++) + brushes[aliases[i]] = url; + }; + + function getAliases(item) + { + return item.pop + ? item + : item.split(/\s+/) + ; + } + + // create table of aliases and script urls + for (i = 0; i < list.length; i++) + { + var aliases = getAliases(list[i]), + url = aliases.pop() + ; + + addBrush(aliases, url); + } + + // dynamically add "; - } - - $q = "UPDATE award_awards SET - award_types_id='" . intval($_POST['award_types_id']) . "', - presenter='" . iconv('UTF-8', 'ISO-8859-1', stripslashes($_POST['presenter'])) . "', - excludefromac='" . (($_POST['excludefromac'] == 1) ? 1 : 0) . "', - cwsfaward='" . (($_POST['cwsfaward'] == 1) ? 1 : 0) . "', - self_nominate='" . (($_POST['self_nominate'] == 'yes') ? 'yes' : 'no') . "', - schedule_judges='" . (($_POST['schedule_judges'] == 'yes') ? 'yes' : 'no') . "', - description='" . iconv('UTF-8', 'ISO-8859-1', stripslashes($_POST['description'])) . "' "; - - if (array_key_exists('name', $_POST)) { - /* - * These values may be disabled, if they name key exists, assume - * they aren't disabled and save them too - */ - $q .= ",name='" . iconv('UTF-8', 'ISO-8859-1', stripslashes($_POST['name'])) . "', - criteria='" . iconv('UTF-8', 'ISO-8859-1', stripslashes($_POST['criteria'])) . "', - sponsors_id='" . intval($_POST['sponsors_id']) . "' "; - } - $q .= "WHERE id=?"; - $q = $pdo->prepare($q); - $q->execute([$id]); - - show_pdo_errors_if_any($pdo); - happy_('Award information saved'); - exit; - - case 'eligibility_load': - $id = intval($_GET['id']); - // select the current categories that this award is linked to - $ret = array('categories' => array(), 'divisions' => array()); - - $q = $pdo->prepare("SELECT * FROM award_awards_projectcategories WHERE award_awards_id=?"); - $q->execute([$id]); - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $ret['categories'][] = $r['projectcategories_id']; - } - - // select the current categories that this award is linked to - $q = $pdo->$prepare("SELECT * FROM award_awards_projectdivisions WHERE award_awards_id=?"); - $q->execute([$id]); - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $ret['divisions'][] = $r['projectdivisions_id']; - } - echo json_encode($ret); - exit; - - case 'eligibility_save': - $id = intval($_POST['award_awards_id']); - - // now add the new ones - if (!is_array($_POST['categories']) || !is_array($_POST['divisions'])) { - error_('Invalid data'); - exit; - } - - // wipe out any old award-category links - $q = $pdo->prepare("DELETE FROM award_awards_projectcategories WHERE award_awards_id=?"); - $q->execute([$id]); - foreach ($_POST['categories'] AS $key => $cat) { - $c = intval($cat); - $q = $pdo->prepare('INSERT INTO award_awards_projectcategories (award_awards_id, projectcategories_id, year) - VALUES (:id, :c, :year)'); - - $q->bindParam(':id', $id, PDO::PARAM_INT); - $q->bindParam(':c', $c, PDO::PARAM_INT); - $q->bindParam(':year', $config['FAIRYEAR'], PDO::PARAM_INT); - - $q->execute(); - } - - // wipe out any old award-divisions links - - $q = $pdo->prepare("DELETE FROM award_awards_projectdivisions WHERE award_awards_id=?"); - $q->execute([$id]); - - // now add the new ones - foreach ($_POST['divisions'] AS $key => $div) { - $d = intval($div); - - $q = $pdo->prepare('INSERT INTO award_awards_projectdivisions (award_awards_id, projectdivisions_id, year) - VALUES (:id, :d, :year)'); - - $q->bindParam(':id', $id, PDO::PARAM_INT); - $q->bindParam(':d', $d, PDO::PARAM_INT); - $q->bindParam(':year', $config['FAIRYEAR'], PDO::PARAM_INT); - - $q->execute(); - show_pdo_errors_if_any($pdo); - } - happy_('Eligibility information saved'); - exit; - - case 'prize_order': - $order = 0; - foreach ($_GET['prizelist'] as $position => $id) { - if ($id == '') - continue; - $order++; - - $q = $pdo->prepare("UPDATE `award_prizes` SET `order`=? WHERE `id`=?"); - $q->execute([$order, $id]); - } - // print_r($_GET); - happy_('Order Updated.'); - exit; - - case 'award_order': - $order = 0; - foreach ($_GET['awardlist'] as $position => $id) { - if ($id == '') - continue; - $order++; - - $q = $pdo->prepare("UPDATE `award_awards` SET `order`=? WHERE `id`=?"); - $q->execute([$order, $id]); - } - happy_('Order updated'); - exit; - - case 'prizeinfo_load': - $id = intval($_GET['id']); - if ($id == -1) { - $q = $pdo->prepare("SELECT * FROM award_prizes WHERE year='-1' AND award_awards_id='0' ORDER BY `order`"); - $q->execute(); - } else { - $q = $pdo->prepare("SELECT * FROM award_prizes WHERE award_awards_id=? ORDER BY `order`"); - $q->execute([$id]); - } - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - foreach ($r AS $k => $v) { - $r[$k] = iconv('ISO-8859-1', 'UTF-8', $v); - } - $ret[] = $r; - } - echo json_encode($ret); - exit; - case 'prize_load': - $id = intval($_GET['id']); - - $q = $pdo->prepare("SELECT * FROM award_prizes WHERE id=?"); - $q->execute([$id]); - $ret = $q->fetch(PDO::FETCH_ASSOC); - foreach ($ret AS $k => $v) { - $ret[$k] = iconv('ISO-8859-1', 'UTF-8', $v); - } - echo json_encode($ret); - exit; - - case 'prize_create': - $aaid = intval($_GET['award_awards_id']); - $year = $config['FAIRYEAR']; - if ($aaid == -1) { - $aaid = 0; - $year = -1; - } - - $q = $pdo->prepare('INSERT INTO award_prizes (award_awards_id, year) VALUES (:aaid, :year)'); - - $q->bindParam(':aaid', $aaid, PDO::PARAM_INT); - $q->bindParam(':year', $year, PDO::PARAM_INT); - - $q->execute(); - - $ret = array('id' => $pdo->lastInsertId()); - echo json_encode($ret); - exit; - - case 'prize_save': - $id = intval($_POST['id']); - - $q = $pdo->prepare('UPDATE award_prizes SET - prize = :prize, - cash = :cash, - scholarship = :scholarship, - value = :value, - number = :number, - excludefromac = :excludefromac, - trophystudentkeeper = :trophystudentkeeper, - trophystudentreturn = :trophystudentreturn, - trophyschoolkeeper = :trophyschoolkeeper, - trophyschoolreturn = :trophyschoolreturn - WHERE id = :id'); - - $q->bindParam(':prize', stripslashes(iconv('UTF-8', 'ISO-8859-1', $_POST['prize'])), PDO::PARAM_STR); - $q->bindValue(':cash', intval($_POST['cash']), PDO::PARAM_INT); - $q->bindValue(':scholarship', intval($_POST['scholarship']), PDO::PARAM_INT); - $q->bindValue(':value', intval($_POST['value']), PDO::PARAM_INT); - $q->bindValue(':number', intval($_POST['number']), PDO::PARAM_INT); - $q->bindValue(':excludefromac', ($_POST['excludefromac'] == 1) ? 1 : 0, PDO::PARAM_INT); - $q->bindValue(':trophystudentkeeper', ($_POST['trophystudentkeeper'] == 1) ? 1 : 0, PDO::PARAM_INT); - $q->bindValue(':trophystudentreturn', ($_POST['trophystudentreturn'] == 1) ? 1 : 0, PDO::PARAM_INT); - $q->bindValue(':trophyschoolkeeper', ($_POST['trophyschoolkeeper'] == 1) ? 1 : 0, PDO::PARAM_INT); - $q->bindValue(':trophyschoolreturn', ($_POST['trophyschoolreturn'] == 1) ? 1 : 0, PDO::PARAM_INT); - $q->bindValue(':id', $id, PDO::PARAM_INT); - - $q->execute(); - - happy_('Prize saved'); - exit; - - case 'prize_delete': - $id = intval($_GET['id']); - award_prize_delete($id); - happy_('Prize deleted'); - exit; - - case 'feeder_load': - $id = intval($_GET['id']); - /* Prepare two lists of fair IDs, for which fairs can upload and download this award */ - - $q = $pdo->prepare("SELECT * FROM fairs_awards_link WHERE award_awards_id=?"); - $q->execute([$id]); - $ul = array(); - $dl = array(); - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - if ($r['upload_winners'] == 'yes') - $ul[$r['fairs_id']] = true; - if ($r['download_award'] == 'yes') - $dl[$r['fairs_id']] = true; - } - - $q = $pdo->prepare("SELECT * FROM award_awards WHERE id=?"); - $q->execute([$id]); - $a = $q->fetch(PDO::FETCH_ASSOC); - ?> -

-
- - - -

/> -

- - -

/> -

-
- - - - - - - - - -
:
/>
/>
-

- - - - - - prepare("SELECT * FROM fairs WHERE type='feeder'"); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - echo ""; - $ch = $dl[$r['id']] == true ? 'checked="checked"' : ''; - echo ""; - $ch = $ul[$r['id']] == true ? 'checked="checked"' : ''; - echo ""; - echo ''; - } - ?> -
{$r['name']}
-
-
- -
- prepare("DELETE FROM fairs_awards_link WHERE award_awards_id=?"); - $q->execute([$id]); - show_pdo_errors_if_any($pdo); - foreach ($data as $fairs_id => $f) { - $dl = ($f['dl'] == true) ? 'yes' : 'no'; - $ul = ($f['ul'] == true) ? 'yes' : 'no'; - - $q = $pdo->prepare("INSERT INTO fairs_awards_link (award_awards_id,fairs_id,download_award,upload_winners) - VALUES (?,?,?,?)"); - $q->execute([$id,$fairs_id,$dl,$ul]); - show_pdo_errors_if_any($pdo); - } - $ident = stripslashes($_POST['identifier']); - $per_fair = $_POST['per_fair'] == 'yes' ? 'yes' : 'no'; - $mat = intval($_POST['additional_materials']); - $w = intval($_POST['register_winners']); - - $q = $pdo->prepare("UPDATE award_awards SET external_identifier=?, - external_additional_materials=?, - external_register_winners=?, - per_fair=? - WHERE id=?"); - $q->execute([[$ident, $mat,$w],$per_fair,$id]); - - happy_('Feeder Fair information saved'); - exit; -} - -send_header('Awards Management', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Awards Main' => 'admin/awards.php')); - -?> - - - - - - - - - - - - -
- -'; -echo i18n('Filter By:'); -echo '
'; - -echo ''; -echo ''; -echo '
'; - -$q = $pdo->prepare('SELECT id,organization FROM sponsors ORDER BY organization'); -$q->execute(); -echo ''; -echo '
'; - -$q = $pdo->prepare('SELECT id, type FROM award_types WHERE year = :year ORDER BY type'); -$q->bindParam(':year', $config['FAIRYEAR'], PDO::PARAM_INT); -$q->execute(); - -echo ''; -echo ''; - -/* - * //FIXME: 'confirmed' no longer exists, we need to lookup their sponsorship record and check the status there, either pending, confirmed or received, dunno if it makes sense to put that here or not.. - * - * echo ""; - */ -echo ''; -echo '
'; - -?> -
-
- - -
-

- -" /> - -$where_asi = $where_asi ?? ''; -$where_ati = $where_ati ?? ''; - -if ($sponsors_id) - $where_asi = "AND sponsors_id='$sponsors_id'"; -if ($award_types_id) - $where_ati = "AND award_types_id='$award_types_id'"; -// if($award_sponsors_confirmed) $where_asc="AND award_sponsors.confirmed='$award_sponsors_confirmed'"; - -$orderby = $orderby ?? ''; - -if (!$orderby) - $orderby = 'ORDER BY `order`'; - -$q = $pdo->prepare("SELECT -award_awards.id, -award_awards.name, -award_awards.order, -award_awards.award_source_fairs_id, -award_types.type, -sponsors.organization -FROM -award_awards -LEFT JOIN sponsors ON sponsors.id = award_awards.sponsors_id -LEFT JOIN award_types ON award_types.id = award_awards.award_types_id -WHERE - award_awards.year=? - $where_asi - $where_ati - AND \taward_types.year=? - $orderby -"); - -$q->execute([$config['FAIRYEAR'],$config['FAIRYEAR']]); - -show_pdo_errors_if_any($pdo); - -if ($q->rowCount()) { - echo '* ' . i18n('Click on the Script Order and drag to re-order the awards'); - echo ''; - echo ''; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo "\n"; - - $hasexternal = false; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($r->award_source_fairs_id) { - $cl = 'externalaward'; - $hasexternal = true; - } else - $cl = ''; - $eh = "style=\"cursor:pointer;\" onclick=\"popup_editor({$r->id},'');\""; - echo "id}\" >\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - - $numq = $pdo->prepare("SELECT SUM(number) AS num FROM award_prizes WHERE award_awards_id=?"); - $numq->execute([$r->id]); - $numr = $numq->fetch(PDO::FETCH_ASSOC); - if (!$numr['num']) - $numr['num'] = 0; - - echo " "; - - echo ' \n"; - echo "\n"; - } - if ($hasexternal) - echo ''; - echo "
' . i18n('Order') . '' . i18n('Sponsor') . '' . i18n('Type') . '' . i18n('Name') . '' . i18n('Prizes') . '' . i18n('Actions') . '
id}\" class=\"drag_handle\" style=\"cursor:move; text-align:right;\">{$r->order}{$r->organization}{$r->type}{$r->name}{$numr['num']}'; - // echo ""; - // echo " "; - echo "id});\" href=\"#\" >"; - - echo "
' . i18n('Indicates award imported from an external source') . '
\n"; - echo ''; -} -echo '
'; -// echo "Edit prizes for the generic prize template"; - -if ($_GET['action'] == 'edit_prize_template') { - ?> - \ No newline at end of file diff --git a/admin/award_download.php b/admin/award_download.php deleted file mode 100644 index f4deba09..00000000 --- a/admin/award_download.php +++ /dev/null @@ -1,345 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT * FROM fairs WHERE id=?"); - $q->execute([$fairs_id]); - $fair = $q->fetch(PDO::FETCH_ASSOC); - if (!($fair['username'] && $fair['password'])) { - echo error(i18n("Username and Password are not set for source '%1'. Please set them in the SFIAB Configuration/External Award Sources editor first", array($r->name))); - return; - } - - echo i18n('Checking %1 for awards...', array($fair['name'])); - echo '
'; - - if ($fair['type'] == 'ysc') { - $req = array('awardrequest' => array( - 'username' => $fair['username'], - 'password' => $fair['password'], - 'year' => $config['FAIRYEAR'], - )); - } else { - $req['getawards'] = array('year' => $config['FAIRYEAR']); - } - - $data = curl_query($fair, $req); - - if ($data['error'] != 0) { - echo error("Server said: {$data['message']}
"); - send_footer(); - exit; - } - echo notice(i18n('Server said: Success')); - // echo "sending [".nl2br(htmlspecialchars($xmldata))."]"; - - $keys = array_keys($data); - if (!array_key_exists('awards', $data)) { - echo error(i18n("Invalid XML response. Expecting '%1' in '%2'", array('awards', join(',', array_keys($data))))); - // echo "response=".print_r($data); - return; - } - - // get a list of all the existing awards for this external source - - $aq = $pdo->prepare("SELECT * FROM award_awards WHERE award_source_fairs_id=? AND year=?"); - $aq->execute([$fairs_id,$config['FAIRYEAR']]); - $existingawards = array(); - while ($ar = $aq->fetch(PDO::FETCH_OBJ)) { - $existingawards[$ar->id] = true; - } - - echo ''; - $awards = $data['awards']; - $postback = $data['postback']; - echo i18n('Postback URL: %1', array($postback)) . '
'; - - $numawards = is_array($awards) ? count($awards) : 0; - echo i18n('Number of Awards: %1', array($numawards)) . '
'; - - if ($numawards == 0) { - echo i18n('No awards to process') . '

'; - return; - } - - $divs = projectdivisions_load(); - $cats = projectcategories_load(); - - foreach ($awards as $award) { - $identifier = $award['identifier']; - $year = $award['year']; - echo i18n('Award Identifier: %1', array($identifier)) . '   '; - echo i18n('Award Year: %1', array($year)) . '
'; - echo i18n('Award Name: %1', array($award['name_en'])) . '
'; - - if ($year != $config['FAIRYEAR']) { - echo error(i18n('Award is not for the current fair year... skipping')); - echo '
'; - continue; - } - - $tq = $pdo->prepare("SELECT * FROM award_awards WHERE - external_identifier=? AND - award_source_fairs_id=? AND - year=?"); - $tq->execute([$identifier,$fairs_id,$year]); - if ($tq->rowCount() == 0) { - /* Award doesn't exist, create it, then update it with the common code below */ - - $q = $pdo->prepare("INSERT INTO award_awards (award_types_id, - year, external_identifier, - award_source_fairs_id) - VALUES (2,?, - ?, - ?)"); - $q->execute([$year,$identifier,$fairs_id]); - $award_id = $pdo->lastInsertId(); - /* By default make all divs/cats eligible */ - foreach ($divs as $id => $d) - $q = $pdo->prepare("INSERT INTO award_awards_projectdivisions(award_awards_id,projectdivisions_id,year) VALUES (?,?,?)"); - $q->execute([$award_id,$id,$config['FAIRYEAR']]); - - foreach ($cats as $id => $c) - $q = $pdo->prepare("INSERT INTO award_awards_projectcategories(award_awards_id,projectcategories_id,year) VALUES (?,?,?)"); - $q->execute([$award_id,$id,$config['FAIRYEAR']]); - } else { - echo i18n('Award already exists, updating info') . '
'; - $awardrecord = $q->fetch(PDO::FETCH_OBJ); - $award_id = $awardrecord->id; - } - - // remove it from the existingawards list - unset($existingawards[$award_id]); - - // check if the sponsor exists, if not, add them - $sponsor_str = $award['sponsor']; - - $sponsorq = $pdo->prepare("SELECT * FROM sponsors WHERE organization=?"); - $sponsorq->execute([$sponsor_str]); - if ($sponsorr = $sponsorq->fetch(PDO::FETCH_OBJ)) { - $sponsor_id = $sponsorr->id; - } else { - $q = $pdo->prepare("INSERT INTO sponsors (organization,year,notes) - VALUES (?,?,'" . "Imported from external source: $r->name" . "')"); - $q->execute([$sponsor_str,$year]); - show_pdo_errors_if_any($pdo); - $sponsor_id = $pdo->lastInsertId(); - } - - $self_nominate = ($award['self_nominate'] == 'yes') ? 'yes' : 'no'; - $schedule_judges = ($award['schedule_judges'] == 'yes') ? 'yes' : 'no'; - - $q = $pdo->prepare("UPDATE award_awards SET - sponsors_id = ?, - name = ?, - criteria = ?, - external_postback = ?, - external_register_winners = ?, - external_additional_materials = ?, - self_nominate = ?, - schedule_judges = ? - WHERE id = ? - AND external_identifier = ? - AND year = ?"); - - $q->execute([ - $sponsor_id, - $award['name_en'], - $award['criteria_en'], - $postback, - ($award['external_register_winners'] == 1) ? 1 : 0, - ($award['external_additional_materials'] == 1) ? 1 : 0, - $self_nominate, - $schedule_judges, - $award_id, - $identifier, - $year - ]); - - show_pdo_errors_if_any($pdo); - - // update the prizes - $prizes = $award['prizes']; - if (!is_array($prizes)) { - continue; - } - - echo i18n('Number of prizes: %1', array(count($prizes))) . '
'; - /* Get existing prizes */ - - $pq = $pdo->prepare("SELECT * FROM award_prizes WHERE award_awards_id=?"); - $pq->execute([$award_id]); - $existingprizes = array(); - while ($pr = $pq->fetch(PDO::FETCH_ASSOC)) - $existingprizes[$pr['prize']] = $pr; - - /* Iterate over the downloaded pizes */ - foreach ($prizes AS $prize) { - // if it doesn't exist, add it - if (!array_key_exists($prize['prize_en'], $existingprizes)) { - /* - * Add a base entry, then update it below, yes it's two sql queries, - * but it's much shorter code, and means changing things in only - * one spot - */ - echo ' ' . i18n('Adding prize %1', array($prize['prize_en'])) . '
'; - $p = stripslashes($prize['prize_en']); - - $q = $pdo->prepare("INSERT INTO award_prizes (award_awards_id,prize,year,external_identifier) - VALUES (?,?,?,?)"); - $q->execute([$award_id,$p,$year,$p]); - $prize_id = $pdo->lastInsertId(); - } else { - $ep = $existingprizes[$prize['prize_en']]; - echo ' ' . i18n('Updating prize %1', array($ep['prize'])) . '
'; - $prize_id = $ep['id']; - // remove it from the list - unset($existingprizes[$ep['prize']]); - } - - if (!array_key_exists('identifier', $prize)) - $prize['identifier'] = $prize['prize_en']; - - $q = $pdo->prepare("UPDATE award_prizes SET - cash =?, - scholarship =?, - value =?, - prize =?, - number =?, - `order` =?, - external_identifier =?, - trophystudentkeeper =?, - trophystudentreturn =?, - trophyschoolkeeper =?, - trophyschoolreturn =? - WHERE id =?"); - - $q->execute([ - intval($prize['cash']), - intval($prize['scholarship']), - intval($prize['value']), - $prize['prize_en'], - intval($prize['number']), - intval($prize['ord']), - stripslashes($prize['identifier']), - intval($prize['trophystudentkeeper']), - intval($prize['trophystudentreturn']), - intval($prize['trophyschoolkeeper']), - intval($prize['trophyschoolreturn']), - $prize_id - ]); - - - show_pdo_errors_if_any($pdo); - // FIXME: update the translations - } - - /* Delete local entries that weren't downloaded */ - foreach ($existingprizes AS $ep) { - echo ' ' . i18n('Removing prize %1', array($ep['prize'])) . '
'; - award_prize_delete($ep['id']); - } - } - echo '
'; - - // remove any awards that are left in the $existingawards array, they must have been removed from the source - foreach ($existingawards AS $aid => $val) { - echo i18n('Removing award id %1 that was removed from external source', array($aid)) . '
'; - award_delete($aid); - } - - echo ''; - exit; -} - -send_header('Download Awards', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Awards Main' => 'admin/awards.php')); - -?> - - - - - - - - -prepare("SELECT * FROM fairs WHERE enable_awards='yes' ORDER BY name"); -$q->execute(); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo "\n"; - echo ""; - echo ''; - echo ''; - // $checkurl.="&check[]={$r->id}"; -} - -/* - * if($links) - * echo "".i18n("Check all sources").""; - */ -?> -
{$r->name}{$r->url}'; - if ($links) - echo "id})\">" . i18n('check') . ''; - else - echo 'n/a'; - echo '
-
-
- - diff --git a/admin/award_upload.php b/admin/award_upload.php deleted file mode 100644 index 670fb9d8..00000000 --- a/admin/award_upload.php +++ /dev/null @@ -1,799 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -require_once ('../common.inc.php'); -require_once ('../user.inc.php'); -require_once ('../projects.inc.php'); -require_once ('curl.inc.php'); -user_auth_required('committee', 'admin'); - -// function get_cwsf_award_winners() -function get_winners($awardid, $fairs_id) -{ - global $config, $pdo; - - /* Mappings of the name we want => to the column name returned in MYSQL */ - $school_fields = array('schoolname' => 'school', - 'schoollang' => 'schoollang', - 'schoollevel' => 'schoollevel', - 'board' => 'board', - 'district' => 'district', - 'phone' => 'phone', - 'fax' => 'fax', - 'address' => 'address', - 'city' => 'city', - 'province_code' => 'province_code', - 'postalcode' => 'postalcode', - 'schoolemail' => 'schoolemail'); - /* 'principal'=>'principal', - 'sciencehead'=>'sciencehead', - 'scienceheademail'=>'scienceheademail', - 'scienceheadphone'=>'scienceheadphone');*/ - - $student_fields = array('firstname' => 'firstname', - 'lastname' => 'lastname', - 'email' => 'email', - 'gender' => 'sex', - 'grade' => 'grade', - 'language' => 'lang', - 'birthdate' => 'dateofbirth', - 'address' => 'address', - 'city' => 'city', - 'province' => 'province', - 'postalcode' => 'postalcode', - 'phone' => 'phone', - 'teachername' => 'teachername', - 'teacheremail' => 'teacheremail'); - - $awards = array(); - if ($awardid == -1) { - /* Get all for this fair */ - - $q = $pdo->prepare("SELECT * FROM award_awards WHERE award_source_fairs_id=? AND year=?"); - $q->execute([$fairs_id,$config['FAIRYEAR']]); - if ($q->rowCount() == 0) { - error_("Can't find award id $awardid"); - return false; - } - while ($a = $q->fetch(PDO::FETCH_ASSOC)) { - $awards[] = $a; - } - } else { - /* Get the award */ - - $q = $pdo->prepare("SELECT * FROM award_awards WHERE id=? AND year=?"); - $q->execute([$awardid,$config['FAIRYEAR']]); - if ($q->rowCount() != 1) { - error_("Can't find award id $awardid"); - return false; - } - $award = $q->fetch(PDO::FETCH_ASSOC); - $awards[] = $award; - } - - /* Get the fair for the div/cat mappings */ - - $q = $pdo->prepare("SELECT * FROM fairs WHERE id=?"); - $q->execute([$award['award_source_fairs_id']]); - $fair = $q->fetch(PDO::FETCH_ASSOC); - - $catmap = unserialize($fair['catmap']); - $divmap = unserialize($fair['divmap']); - - foreach ($awards as $award) { - $winners = array('id' => $award['id'], - 'award_name' => $award['name'], - 'external_identifier' => $award['external_identifier'], - 'year' => $config['FAIRYEAR'], - 'prizes' => array()); - - if ($fair['type'] != 'sfiab') { - /* YSC Compatability */ - $winners['external_postback'] = $award['external_postback']; - } - - /* Get the prizes */ - - $q = $pdo->prepare("SELECT * FROM award_prizes WHERE award_awards_id=?"); - $q->execute([$award['id']]); - while ($prize = $q->fetch(PDO::FETCH_ASSOC)) { - $pid = $prize['id']; - - $wq = $pdo->prepare("SELECT projects.* FROM award_prizes - LEFT JOIN winners ON winners.awards_prizes_id=award_prizes.id - LEFT JOIN projects ON projects.id=winners.projects_id - WHERE - awards_prizes_id=? AND - winners.year=?"); - $wq->execute([$pid,$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - /* Get all projects assigned to this prize */ - $prizewinners = array(); - while ($project = $wq->fetch(PDO::FETCH_ASSOC)) { - /* Get the students */ - - $sq = $pdo->prepare("SELECT * FROM students WHERE registrations_id=? - AND year=?"); - $sq->execute([$project['registrations_id'],$config['FAIRYEAR']]); - $students = array(); - while ($s = $sq->fetch(PDO::FETCH_ASSOC)) { - /* Get the student's school */ - - $schoolq = $pdo->prepare("SELECT * FROM schools WHERE id=?"); - $schoolq->execute([$s['schools_id']]); - $schoolr = $schoolq->fetch(PDO::FETCH_ASSOC); - $school = array('xml_type' => 'school'); /* for ysc compatability */ - foreach ($school_fields as $k => $v) - $school[$k] = $schoolr[$v]; - - /* Pack up the student data too */ - $student = array('xml_type' => 'student', /* for ysc compatability */ - 'school' => $school); - foreach ($student_fields as $k => $v) - $student[$k] = $s[$v]; - - $students[] = $student; - } - /* Turn our load ID into a server-side cat/div id */ - $cat_id = $catmap[$project['projectcategories_id']]; - $div_id = $divmap[$project['projectdivisions_id']]; - - /* Save the project info => students */ - $prizewinners[] = array('xml_type' => 'project', /* for ysc compatability */ - 'projectid' => $project['id'], - 'projectnumber' => $project['projectnumber'], - 'title' => $project['title'], - 'abstract' => $project['summary'], - 'language' => $project['language'], - 'projectcategories_id' => $cat_id, - 'projectdivisions_id' => $div_id, - 'client_projectdivisions_id' => $project['projectdivisions_id'], - 'students' => $students); - } - /* Save the prize info => projects */ - $winners['prizes'][$prize['prize']] = array( - 'id' => $prize['id'], - 'name' => $prize['prize'], - 'xml_type' => 'prize', /* For ysc compatability */ - 'identifier' => $prize['external_identifier'], /* for ysc compatability */ - 'projects' => $prizewinners - ); - } - $all_winners[] = $winners; - } - return $all_winners; -} - -function count_winners($awardid, $fairs_id) -{ - global $config, $pdo; - $count = 0; - $awards = array(); - if ($awardid == -1) { - /* Get all for this fair */ - - $q = $pdo->prepare("SELECT * FROM award_awards WHERE award_source_fairs_id=? AND year=?"); - $q->execute([$fairs_id,$config['FAIRYEAR']]); - if ($q->rowCount() == 0) { - error_("Can't find award id $awardid"); - return 0; - } - while ($a = $q->fetch(PDO::FETCH_ASSOC)) { - $awards[] = $a; - } - } else { - /* Get the award */ - - $q = $pdo->prepare("SELECT * FROM award_awards WHERE id=? AND year=?"); - $q->execute([$awardid,$config['FAIRYEAR']]); - if ($q->rowcount() != 1) { - error_("Can't find award id $awardid"); - return 0; - } - $award = $q->fetch(PDO::FETCH_ASSOC); - $awards[] = $award; - } - - foreach ($awards as $award) { - /* Get the prizes */ - - $q = $pdo->prepare("SELECT * FROM award_prizes WHERE award_awards_id=?"); - $q->execute([$award['id']]); - while ($prize = $q->fetch(PDO::FETCH_ASSOC)) { - $pid = $prize['id']; - - $wq = $pdo->prepare("SELECT COUNT(projects.id) as C FROM award_prizes - LEFT JOIN winners ON winners.awards_prizes_id=award_prizes.id - LEFT JOIN projects ON projects.id=winners.projects_id - WHERE - awards_prizes_id=? AND - winners.year=?"); - $wq->execute([$pid,$config['FAIRYEAR']]); - $wc = $wq->fetch(PDO::FETCH_ASSOC); - $count += $wc['C']; - } - } - return $count; -} - -function load_server_cats_divs($fairs_id) -{ - global $config, $pdo; - - $q = $pdo->prepare("SELECT * FROM fairs WHERE id=?"); - $q->execute([$fairs_id]); - $fair = $q->fetch(PDO::FETCH_ASSOC); - - $req = array('get_categories' => array('year' => $config['FAIRYEAR']), - 'get_divisions' => array('year' => $config['FAIRYEAR'])); - $data = curl_query($fair, $req); - - /* If selected mappings don't exist, try to discover some */ - if (trim($fair['catmap']) != '') { - $catmap = unserialize($fair['catmap']); - } else { - $catmap = array(); - /* Load ours */ - - $q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY mingrade"); - $q->execute([$config['FAIRYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - foreach ($data['categories'] as $id => $c) { - if ($c['mingrade'] == $r->mingrade) { - $catmap[$r->id] = $id; - break; - } - } - } - } - if (trim($fair['divmap']) != '') { - $divmap = unserialize($fair['divmap']); - } else { - $ret['divmap'] = array(); - - $q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); - $q->execute([$config['FAIRYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $lowest = 999; - $lowest_id = 0; - foreach ($data['divisions'] as $id => $d) { - /* Who knew levenshtein was builtin to php as of PHP 4 */ - $l = levenshtein($d['division'], $r->division); - if ($l < $lowest) { - $lowest = $l; - $lowest_id = $id; - } - } - $divmap[$r->id] = $lowest_id; - } - } - return array($data['categories'], $data['divisions'], $catmap, $divmap); -} - -switch (get_value_from_array($_GET, 'action')) { - case 'award_upload': - $award_awards_id = intval($_POST['award_awards_id']); - $fairs_id = intval($_POST['fairs_id']); - $divs = $_POST['div']; - $cats = $_POST['cat']; - - $all_winners = get_winners($award_awards_id, $fairs_id); - - /* Get the fair */ - - $q = $pdo->prepare("SELECT * FROM fairs WHERE id=?"); - $q->execute([$fairs_id]); - $fair = $q->fetch(PDO::FETCH_ASSOC); - - echo '
'; - - /* - * Check that we're going to upload something, and override the - * divisions/cats with the divisions taht were set, and the categories - * that were computed - */ - $upload_something = false; - foreach ($all_winners as &$w) { - foreach ($w['prizes'] as &$p) { - if (count($p['projects'])) - $upload_something = true; - - /* - * Only update divs/cats for SFIAB fairs, the - * YSC/STO awards system doesn't care about divisions, but YSC - * registration does, but that's a different bit of code - */ - if ($fair['type'] != 'sfiab') - continue; - - foreach ($p['projects'] as &$pr) { - $div_id = intval($divs[$w['id']][$p['id']][$pr['projectid']]); - $pr['projectdivisions_id'] = $div_id; - $cat_id = intval($cats[$w['id']][$p['id']][$pr['projectid']]); - $pr['projectcategories_id'] = $cat_id; - } - } - } - - if ($upload_something == false) { - echo notice(i18n('No winners to be uploaded')); - exit; - } - - if ($fair['type'] == 'ysc') { - if ($award_awards_id == -1) { - echo "Multiple uploads not supported for YSC targets.\n"; - exit; - } - - /* - * Pull the single-award out, get_winners() will never - * return more than one award for YSC targets - */ - $winners = array_shift($all_winners); - $w = array(); - foreach ($winners['prizes'] as $prize_name => $prize) { - $w[] = $prize; - } - $req = array('awardwinners' => array( - 'username' => $fair['username'], - 'password' => $fair['password'], - 'identifier' => $winners['external_identifier'], - 'prizes' => $w, - )); - $url = $winners['external_postback']; - } else { - $req = array(); - $req['awards_upload'] = $all_winners; - $url = ''; /* url is ignored for type = sfiab */ - } - echo i18n('Sending winners to %1...', array('' . $fair['name'] . '')); - echo '
'; - // echo "
"; print_r($req); echo "
"; - - $data = curl_query($fair, $req, $url); - - if ($data['error'] != 0) { - echo error('Server said: ' . htmlspecialchars(print_r($data, true))); - } else { - if (is_array($data['notice'])) - echo notice("{$fair['name']} server said:
" . join("\n", $data['notice']) . '
'); - else if (is_array($data['message'])) - echo notice("{$fair['name']} server said:
" . join("\n", $data['message']) . '
'); - else if ($data['message']) - echo notice("{$fair['name']} server said:
" . $data['message'] . '
'); - else - echo notice("{$fair['name']} server said:
" . htmlspecialchars(print_r($data, true)) . '
'); - echo happy(i18n('Upload completed successfully')); - } - exit; - - case 'catdiv_load': - $fairs_id = intval($_GET['fairs_id']); - - list($c, $d, $cm, $dm) = load_server_cats_divs($fairs_id); - $divs = projectdivisions_load(); - - $q = $pdo->prepare("SELECT * FROM fairs WHERE id=?"); - $q->execute([$fairs_id]); - $fair = $q->fetch(PDO::FETCH_ASSOC); - -?>

-
- -
- - - - -"; - echo "'; - } -?> -
{$div['division']} =>
-
-
-$c) { - // $cat[intval($key)] = intval($c); - // } - $div = array(); - foreach ($_POST['div'] AS $key => $d) { - $div[intval($key)] = intval($d); - } - - $catmap = serialize($cat); - $divmap = serialize($div); - - $q = $pdo->prepare("UPDATE fairs SET catmap=?,divmap=? WHERE id=?"); - - $q->execute([$catmap,$divmap,$fairs_id]); - show_pdo_errors_if_any($pdo); - - happy_('Category/Division mapping information saved'); - exit; - - case 'additional_materials': - $award_awards_id = intval($_GET['award_awards_id']); - - $q = $pdo->prepare("SELECT award_source_fairs_id,external_identifier FROM award_awards WHERE id=?"); - $q->execute([$award_awards_id]); - $a = $q->fetch(PDO::FETCH_ASSOC); - - $q = $pdo->prepare("SELECT * FROM fairs WHERE id=?"); - $q->execute([$a['award_source_fairs_id']]); - $fair = $q->fetch(PDO::FETCH_ASSOC); - $req = array('award_additional_materials' => array( - 'year' => $config['FAIRYEAR'], - 'identifier' => $a['external_identifier'] - )); - $data = curl_query($fair, $req, $url); - foreach ($data['award_additional_materials']['pdf']['header'] as $h) - header($h); - echo base64_decode($data['award_additional_materials']['pdf']['data64']); - exit; - - case 'load': - $award_awards_id = intval($_GET['id']); - $fairs_id = intval($_GET['fairs_id']); - - $winners = get_winners($award_awards_id, $fairs_id); - $divs = projectdivisions_load(); - - $q = $pdo->prepare("SELECT * FROM fairs WHERE id=?"); - $q->execute([$fairs_id]); - $fair = $q->fetch(PDO::FETCH_ASSOC); - - echo i18n("The following list of winning projects/students will be sent to: %1. Use the 'Edit Default Division Assignments' button to change the default mappings for divisions. You can over-ride any division assignment by changing it in the list below. Category assignments are done automatically based on grade. When you are happy with the list below, click the 'Upload Winners' button.", array($fair['name'])); - - if ($fair['type'] != 'sfiab') { - echo '

'; - echo i18n('This server does not collection Division information, all division selection is disabled.'); - $server_cats = array(); - $server_divs = array(); - $catmap = array(); - $divmap = array(); - $division_disabled = true; - } else { - list($server_cats, $server_divs, $catmap, $divmap) = load_server_cats_divs($fairs_id); - $division_disabled = false; - } - -?> -

- - -
- - - -'; - if (count($p['projects']) == 0) { - echo i18n('No winners to upload'); - continue; - } - foreach ($p['projects'] as &$pr) { -?> - - -
'; - exit; -} - -send_header('Award Upload', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Awards Main' => 'admin/awards.php')); -echo '
'; - -?> - - - - - - -prepare("SELECT fairs.id, fairs.name, fairs.type, COUNT(award_awards.id) as AWARD_COUNT FROM fairs - LEFT JOIN award_awards ON award_awards.award_source_fairs_id=fairs.id - WHERE award_awards.award_source_fairs_id IS NOT NULL - AND award_awards.year=? - GROUP BY fairs.id - ORDER BY fairs.name "); -$q->execute([$config['FAIRYEAR']]); -show_pdo_errors_if_any($pdo); - -?> -

:

- -
'; - echo "

{$w['award_name']}

"; - foreach ($w['prizes'] as &$p) { - echo '
'; - echo "

{$p['name']}

"; - echo '
     -
-'; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo i18n('Grade') . ': ' . $s['grade']; - echo '
'; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo i18n('School') . ': ' . $s['school']['schoolname']; - echo '
'; - if ($s['grade'] > $highest_grade) - $highest_grade = $s['grade']; - } - $server_cat = ''; - foreach ($server_cats as $c) { - if ($highest_grade >= $c['mingrade'] && $highest_grade <= $c['maxgrade']) { - $server_cat = $c['id']; - } - } -?> -
- - - - - - - - - - -
:
: - -
: ( - )
-
- - - - - -fetch(PDO::FETCH_OBJ)) { - $count = count_winners(-1, $r->id); - ?> - - - - '; -} -?> -
Assigned') ?>
name ?>AWARD_COUNT ?> -type == 'sfiab') - echo "id},-1)\" >" . i18n('Send All') . ''; - else - echo "Not available yet, we're working on it!"; - echo '
-
-
- - -prepare("SELECT award_awards.id, award_awards.name AS awardname, - \t fairs.name as fairname, award_source_fairs_id, - \t fairs.type as fairtype, award_awards.external_additional_materials - FROM award_awards - LEFT JOIN fairs ON fairs.id=award_awards.award_source_fairs_id - WHERE award_awards.award_source_fairs_id IS NOT NULL - AND award_awards.year=? - ORDER BY fairs.name, award_awards.name"); -$q->execute([$config['FAIRYEAR']]); -show_pdo_errors_if_any($pdo); - -?> -

:

- - - - - - - - -fetch(PDO::FETCH_OBJ)) { - $count = count_winners($r->id, $r->award_source_fairs_id); - ?> - - - - '; -} -?> -
Assigned') ?>Info') ?>
awardname ?>fairname ?> - 0) - $onclick = "popup_upload({$r->award_source_fairs_id},{$r->id});return false;"; - else - $onclick = "alert('" . i18n('Assign a winner first') . "');return false;"; - ?> - - - -external_additional_materials) { - echo "id}\" target=\"_blank\">" . i18n('download') . ''; - } - echo '
-
- -
- - -"> */ -send_footer(); -?> diff --git a/admin/awards.inc.php b/admin/awards.inc.php deleted file mode 100644 index 8a865d0f..00000000 --- a/admin/awards.inc.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare('SELECT id FROM award_prizes WHERE award_awards_id=?'); - $q->execute([$award_awards_id]); - - while (($p = $q->fetch(PDO::FETCH_ASSOC))) { - $q = $pdo->prepare("DELETE FROM winners WHERE awards_prizes_id='{$p['id']}'"); - $q->execute(); - } - - /* FIXME: maybe delte judging teams and judge - * assignments and timeslots? - - /* Delete the award */ - - $q = $pdo->prepare('DELETE FROM award_prizes WHERE award_awards_id=?'); - $q->execute([$award_awards_id]); - - $q = $pdo->prepare('DELETE FROM award_awards_projectcategories WHERE award_awards_id=?'); - $q->execute([$award_awards_id]); - - $q = $pdo->prepare('DELETE FROM award_awards_projectdivisions WHERE award_awards_id=?'); - $q->execute([$award_awards_id]); - - $q = $pdo->prepare('DELETE FROM award_awards WHERE id=?'); - $q->execute([$award_awards_id]); -} - -function award_prize_delete($award_prizes_id) -{ - global $pdo; - $q = $pdo->prepare('DELETE FROM winners WHERE award_prizes_id=?'); - $q->execute([$award_prizes_id]); - - $q = $pdo->prepare('DELETE FROM award_prizes WHERE id=?'); - $q->execute([$award_prizes_id]); -} - -?> diff --git a/admin/awards.php b/admin/awards.php deleted file mode 100644 index 30eec426..00000000 --- a/admin/awards.php +++ /dev/null @@ -1,50 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'awards_management'); - -require_once ('rerollprizes.php'); - -echo '
'; -echo '' . i18n('Awards Management') . '
'; -echo '' . i18n('Sponsors') . '
'; -echo '
'; -echo '' . i18n('Edit prize template for the divisional awards') . ''; -echo '
'; -echo '' . i18n('Create divisional awards for all divisions & categories') . '
'; -echo '
'; -echo '' . i18n('Download awards from external sources') . '
'; -echo '' . i18n('Upload award winners to external sources') . '
'; - -send_footer(); - -?> diff --git a/admin/cms.php b/admin/cms.php deleted file mode 100644 index 1b9fe0c2..00000000 --- a/admin/cms.php +++ /dev/null @@ -1,224 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'website_content_management'); - -?> -
- - $langname) { - $filename = stripslashes(get_value_from_array($_POST, 'filename', '')); - // $filename=ereg_replace("[^A-Za-z0-9\.\_\/]","_",$_POST['filename']); - - if (substr($filename, -5) != '.html') - $filename = $filename . '.html'; - - $textname = "text_$lang"; - $titlename = "title_$lang"; - $showlogoname = "showlogo_$lang"; - // get the dt here to insert with ALL the languages, we cant rely on the INSERT NOW() always inserting multiple records with the same timestamp! - $insertdt = date('Y-m-d H:i:s'); - $text = stripslashes(get_value_from_array($_POST, $textname, '')); - - $q = $pdo->prepare("INSERT INTO cms (filename,dt,lang,text,title,showlogo) VALUES ( - ?, - ?, - ?, - ?, - ?, - ? - )"); - $q->execute([$filename,$insertdt,$lang,$text,get_value_from_array($_POST, $titlename, ''),get_value_from_array($_POST, $showlogoname, '')]); - if (!$pdo->errorInfo()) { - echo error(i18n('An error occurred saving %1 in %2', array($filename, $langname))); - $err = true; - } - } - if (!$err) - echo happy(i18n('%1 successfully saved', array($_POST['filename']))); -} - -if (get_value_from_array($_GET, 'filename') || get_value_from_array($_GET, 'action') == 'create') { - echo "<< Back to file list
\n"; - echo '
'; - echo "\n"; - if (get_value_from_array($_GET, 'filename', '')) - echo '\n"; - else - echo 'Choose filename to create: /web/.html
'; - - echo ''; - echo '\n"; - - echo '
'; - foreach ($config['languages'] AS $lang => $langname) { - echo ''; - echo '\n"; - echo '\n"; - echo '\n"; - echo '
'; - - $q = $pdo->prepare("SELECT * FROM cms WHERE filename=? AND lang=? ORDER BY dt DESC LIMIT 1"); - $q->execute([$_GET['filename'],$lang]); - if ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($r->dt == '0000-00-00 00:00:00' || !$r->dt) - $dt = 'Never'; - else - $dt = $r->dt; - echo '' . htmlspecialchars($_GET['filename']) . " - $langname    " . i18n('Last updated') . ": $dt
"; - if ($_GET['dt']) { - $q2 = $pdo->prepare("SELECT * FROM cms WHERE filename=? AND lang=? AND dt<=? ORDER BY dt DESC LIMIT 1"); - $q2->execute([$_GET['filename'], $lang, $_GET['dt']]); - $r2 = $q2->fetch(PDO::FETCH_OBJ); - if ($r2->dt != $r->dt) { - echo "Displaying historical file. Date: $r->dt"; - $r = $r2; - } - } - } else { - echo "$langname
"; //    ".i18n("Last updated").": $dt
"; - } - echo "
' . i18n('Page Title') . ":
' . i18n('Show Logo') . ':'; - if (get_value_property_or_default($r, 'showlogo')) - $ch = 'checked="checked"'; - else - $ch = ''; - echo " " . i18n('Yes'); - echo '   '; - if (!get_value_property_or_default($r, 'showlogo')) - $ch = 'checked="checked"'; - else - $ch = ''; - echo " " . i18n('No'); - - echo "
'; - require_once ('../fckeditor/fckeditor.php'); - - $oFCKeditor = new FCKeditor("text_$lang"); - $oFCKeditor->BasePath = '../fckeditor/'; - $oFCKeditor->Value = get_value_property_or_default($r, 'text'); - $oFCKeditor->Width = '100%'; - $oFCKeditor->Height = 400; - $oFCKeditor->Create(); - - echo "
\n"; - - echo '
'; - } - echo '
'; - echo ''; - - if (get_value_from_array($_GET, 'historylimit', '')) - $historylimit = intval(get_value_from_array($_GET, 'historylimit', '')); - else - $historylimit = 30; - - echo '\n"; - - $q = $pdo->prepare("SELECT DISTINCT(dt) FROM cms WHERE filename=? ORDER BY dt DESC LIMIT $historylimit"); - $q->execute([get_value_from_array($_GET, 'filename')]); - $first = true; - if ($q->rowCount()) { - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($r->dt == $_GET['dt']) - $style = 'font-weight: bold;'; - else - $style = 'font-weight: normal;'; - - if ($first && !$_GET['dt']) - $style = 'font-weight: bold;'; - - echo '\n"; - $first = false; - } - } else - echo "\n"; - - echo "
' . i18n('File History') . "
$r->dt
No History
\n"; - echo "
'; - echo '
'; - echo '\n"; - echo ''; - echo ''; - echo '
'; - echo '\n"; - echo "
\n"; - echo "
\n"; - - echo "
\n"; -} else { - echo i18n('Choose a web page filename to edit'); - echo ' '; - echo '' . i18n('or click here to create a new file') . "
\n"; - - echo ''; - $q = $pdo->prepare('SELECT DISTINCT(filename) AS filename FROM cms ORDER BY filename'); - $q->execute(); - echo ''; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo '"; - $q2 = $pdo->prepare("SELECT dt FROM cms WHERE filename=? ORDER BY dt DESC LIMIT 1"); - $q2->execute([$r->filename]); - $r2 = $q2->fetch(PDO::FETCH_OBJ); - if ($r2->dt == '0000-00-00 00:00:00') - $dt = 'Never'; - else - $dt = $r2->dt; - echo ""; - echo ''; - } - echo '
' . i18n('Filename') . '' . i18n('Last Update') . '
/web/$r->filename$dt
'; -} - -send_footer(); -?> diff --git a/admin/committees.php b/admin/committees.php deleted file mode 100644 index 28eed071..00000000 --- a/admin/committees.php +++ /dev/null @@ -1,369 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'committee_management'); - -$_SESSION['last_page'] = 'committee_management'; -?> - - - -prepare("INSERT INTO committees (name) VALUES (?)"); - $q->execute([$_POST['addcommittee']]); - echo happy(i18n('Committee successfully added')); -} - -if (get_value_from_array($_POST, 'committees_id') && get_value_from_array($_POST, 'committees_ord')) { - // re-order the committees - $x = 0; - $ids = $_POST['committees_id']; - $ords = $_POST['committees_ord']; - - $titles = $_POST['title']; - $pords = $_POST['order']; - while (get_value_from_array($ids, $x)) { - $cid = intval($ids[$x]); - - $q = $pdo->prepare("UPDATE committees SET ord=? WHERE id=?"); - $q->execute([intval($ords[$x]),$cid]); - $x++; - - $ctitle = $titles[$cid]; - $cord = $pords[$cid]; - - /* - * If the committee has no members, don't bother trying to do - * anything - */ - if (!is_array($ctitle)) - continue; - // print_r($ctitle); - - foreach ($ctitle as $uid => $title) { - $o = intval($cord[$uid]); - $t = stripslashes($title); - $u = intval($uid); - - $q = $pdo->prepare("UPDATE committees_link SET title=?, ord=? - WHERE committees_id=? AND users_uid=?"); - $q->execute([$t,$o,$cid,$u]); - } - } - echo happy(i18n('Committees successfully saved')); -} - -if (get_value_from_array($_POST, 'action') == 'assign') { - if (get_value_from_array($_POST, 'committees_id') && get_value_from_array($_POST, 'users_uid')) { - $cid = intval($_POST['committees_id']); - $q = $pdo->prepare("SELECT * FROM committees_link WHERE committees_id=? AND users_uid=?"); - $q->execute([$cid,$uid]); - - if (!$q->rowCount()) { - $q = $pdo->prepare("INSERT INTO committees_link (committees_id,users_uid) VALUES (?,?)"); - $q->execute([$cid,$uid]); - echo happy(i18n('Successfully added member to committee')); - } else - echo error(i18n('That member already exists in that committee')); - } else - echo error(('You must choose both a member and a committee')); -} - -if (get_value_from_array($_GET, 'deletecommittee')) { - $del = intval($_GET['deletecommittee']); - - $q = $pdo->prepare("DELETE FROM committees WHERE id=?"); - $q->execute([$del]); - echo happy(i18n('Committee removed')); -} - -if (get_value_from_array($_POST, 'action') == 'remove') { - /* user_delete takes care of unlinking the user in other tables */ - user_delete($uid, 'committee'); - echo happy(i18n('Committee member deleted')); -} - -if (get_value_from_array($_GET, 'unlinkmember') && get_value_from_array($_GET, 'unlinkcommittee')) { - $mem = intval($_GET['unlinkmember']); - $com = intval($_GET['unlinkcommittee']); - // unlink the member from the committee - - $q = $pdo->prepare("DELETE FROM committees_link WHERE users_uid=? AND committees_id=?"); - $q->execute([$mem,$com]); - echo happy(i18n('Committee member unlinked from committee')); -} - -echo ''; -echo ''; -echo '
'; - -echo '

' . i18n('Add Committee') . "

\n"; -echo "
\n"; -echo "\n"; -echo ''; -echo ' \n"; -echo "
' . i18n('Committee Name') . ':
\n"; -echo "
\n"; - -echo '
 '; - -echo '

' . i18n('Add Committee Member') . "

\n"; -echo "
\n"; -echo "\n"; -echo '\n"; -echo ' \n"; -echo "
' . i18n('Member Email') . ': '; -echo "\n"; -echo "
\n"; -echo '' . i18n('Reload committee list (needed after adding a new member)') . "\n"; -echo "
\n"; - -echo '
'; - -echo '
'; -echo '

' . i18n('Committee Member Management') . "

\n"; -echo "
\n"; -echo ''; -echo ''; - -echo '
'; -echo ''; - -echo ''; -$q = $pdo->prepare("SELECT uid,MAX(year),firstname,lastname,email,deleted FROM users WHERE types LIKE '%committee%' GROUP BY uid ORDER BY firstname"); -$q->execute(); - -echo ''; - -echo ''; - -// The Assign Div -echo '
'; -echo i18n('To Committee') . ': '; -$q = $pdo->prepare('SELECT * FROM committees ORDER BY ord,name'); -$q->execute(); -echo ''; -echo '
'; - -// The Edit or Remove Div - -echo '
'; -echo '
'; - -echo ''; -echo '
'; - -$q = $pdo->prepare('SELECT * FROM committees ORDER BY ord,name'); -$q->execute(); -if ($q->rowCount()) { - echo '

' . i18n('Committees') . '

'; - echo "
\n"; - echo ''; - echo ''; - echo ''; - echo ''; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo '\n"; - - while ($r2 = $q2->fetch(PDO::FETCH_OBJ)) { - if ($u = user_load_by_uid($r2->uid)) { - echo ''; - echo '\n"; - } - } - echo "\n"; - } - echo '\n"; - echo '
' . i18n('Title') . '' . i18n('Order') . '' . i18n('Public Email / Private Email') . '
'; - echo "id\" />"; - echo "ord\" />"; - echo '  ' . i18n($r->name) . ''; - - $q2 = $pdo->prepare("SELECT - committees_link.title, - committees_link.ord, - users.uid, - MAX(users.year) AS my, - users.lastname - FROM committees_link - JOIN users ON users.uid = committees_link.users_uid - WHERE committees_id=? - GROUP BY users.uid - ORDER BY ord, - users.lastname "); - $q2->execute([$r->id]); - - if ($q2->rowCount() == 0) { - echo '   '; - echo "id\">Remove Committee'; - } - - echo "
    '; - echo "\"Edit\""; - echo ' '; - echo "id}\">\"Unlink\""; - echo ''; - echo "{$u['name']}"; - echo ''; - echo "title}\" name=\"title[{$r->id}][{$u['uid']}]\" size=\"15\">"; - echo ''; - echo "ord}\" name=\"order[{$r->id}][{$u['uid']}]\" size=\"2\">"; - - echo ''; - - if (get_value_from_array($u, 'email')) { - list($b, $a) = explode('@', $u['email']); - echo ""; - } - - if (get_value_from_array($u, 'emailprivate')) { - if ($u['email']) - echo ' / '; - list($b, $a) = explode('@', $u['emailprivate']); - echo ""; - } - - echo "
 
'; - echo "
\n"; -} - -send_footer(); -?> - diff --git a/admin/communication.inc.php b/admin/communication.inc.php deleted file mode 100644 index fd098128..00000000 --- a/admin/communication.inc.php +++ /dev/null @@ -1,178 +0,0 @@ - array('name' => 'Committee members (all)', 'query' => - "SELECT u.firstname, u.lastname, u.organization, u.email, u.deleted, q.year FROM users AS u INNER JOIN (SELECT uid, max(year) AS year FROM users GROUP BY uid) AS q ON u.uid = q.uid AND u.year = q.year WHERE u.types LIKE '%committee%' AND u.deleted='no' GROUP BY `u`.`id` ASC"), - /* The WHERE clause evaluates which rows to add to the GROUP - BY, the HAVING clase evaluates which grouped rows show up. We - want to to evaluate 'deleted' AFTER the grouping, so we catch - the case where the MAX(year) has deleted='yes'. If we use WHERE - deleted='no', we'll only add non-deleted rows to the group, and - end up picking up a user active in, say 2007 and 2008, but - deleted in 2009. */ - 'judges_all' => array('name' => 'Judges from all years (except deleted judges)', 'query' => - "SELECT u.firstname, u.lastname, u.email, u.deleted, q.year FROM users AS u INNER JOIN (SELECT uid, max(year) AS year FROM users GROUP BY uid ) AS q ON u.uid = q.uid AND u.year = q.year WHERE u.types LIKE '%judge%' AND u.deleted='no' ORDER BY `u`.`email` ASC"), - 'judges_active_lastyear' => array('name' => 'Judges (all) active from last year', 'query' => - "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='" . ($config['FAIRYEAR'] - 1) . "' AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"), - 'judges_active_thisyear' => array('name' => 'Judges (all) active for this year', 'query' => - "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"), - 'judges_div_active_thisyear' => array('name' => 'Judges (regular judges only) active for this year', 'query' => - "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND deleted='no' AND users_judge.judge_active='yes' AND (users_judge.special_award_only='no' OR users_judge.special_award_only='' OR users_judge.special_award_only IS NULL) ORDER BY email"), - 'judges_spec_active_thisyear' => array('name' => 'Judges (special award judges only) active for this year', 'query' => - "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND deleted='no' AND users_judge.judge_active='yes' AND users_judge.special_award_only='yes' ORDER BY email"), - 'judges_inactive' => array('name' => 'Judges (all) not active for this year', 'query' => - "SELECT firstname, lastname, email, judge_active, deleted, MAX(year) - FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id - WHERE types LIKE '%judge%' - GROUP BY uid HAVING deleted='no' AND ((max(year)='{$config['FAIRYEAR']}' AND judge_active='no') OR max(year)<'{$config['FAIRYEAR']}') - ORDER BY email"), - 'judges_active_complete_thisyear' => array('name' => 'Judges (all) active for this year and complete', 'query' => - "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND users_judge.judge_complete='yes' AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"), - 'judges_active_incomplete_thisyear' => array('name' => 'Judges (all) active for this year but not complete', 'query' => - "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND (users_judge.judge_complete!='yes' OR users_judge.judge_complete IS NULL) AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"), - 'participants_complete_thisyear' => array('name' => 'Participants complete this year', 'query' => - "SELECT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND registrations.year='" . $config['FAIRYEAR'] . "' AND ( registrations.status='complete' OR registrations.status='paymentpending') ORDER BY students.email"), - 'participants_complete_paymentpending_thisyear' => array('name' => 'Participants complete this year but payment pending', 'query' => - "SELECT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND registrations.year='" . $config['FAIRYEAR'] . "' AND registrations.status!='complete' AND registrations.status='paymentpending' ORDER BY students.email"), - 'participants_notcomplete_thisyear' => array('name' => 'Participants not complete this year', 'query' => - "SELECT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND registrations.year='" . $config['FAIRYEAR'] . "' AND registrations.status!='complete' AND registrations.status!='new' ORDER BY students.email"), - 'participants_complete_lastyear' => array('name' => 'Participants complete last year', 'query' => - "SELECT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND registrations.year='" . ($config['FAIRYEAR'] - 1) . "' AND ( registrations.status='complete' OR registrations.status='paymentpending') ORDER BY students.email"), - 'participants_complete_allyears' => array('name' => 'Participants complete all years', 'query' => - "SELECT DISTINCT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND ( registrations.status='complete' OR registrations.status='paymentpending') ORDER BY students.email"), - 'participants_cwsf_thisyear' => array('name' => 'CWSF Winners for this year', 'query' => " - SELECT DISTINCT students.firstname, students.lastname, students.email - FROM award_awards - JOIN award_prizes ON award_prizes.award_awards_id=award_awards.id - JOIN winners ON winners.awards_prizes_id=award_prizes.id - JOIN projects ON winners.projects_id=projects.id - JOIN registrations ON projects.registrations_id=registrations.id - JOIN students ON students.registrations_id=registrations.id - WHERE award_awards.cwsfaward='1' AND winners.year='" . $config['FAIRYEAR'] . "' - ORDER BY students.email"), - 'participants_cwsf_lastyear' => array('name' => 'CWSF Winners from last year', 'query' => " - SELECT DISTINCT students.firstname, students.lastname, students.email - FROM award_awards - JOIN award_prizes ON award_prizes.award_awards_id=award_awards.id - JOIN winners ON winners.awards_prizes_id=award_prizes.id - JOIN projects ON winners.projects_id=projects.id - JOIN registrations ON projects.registrations_id=registrations.id - JOIN students ON students.registrations_id=registrations.id - WHERE award_awards.cwsfaward='1' AND winners.year='" . ($config['FAIRYEAR'] - 1) . "' - ORDER BY students.email"), - 'participants_cwsf_allyears' => array('name' => 'CWSF Winners from all years', 'query' => " - SELECT DISTINCT students.firstname, students.lastname, students.email - FROM award_awards - JOIN award_prizes ON award_prizes.award_awards_id=award_awards.id - JOIN winners ON winners.awards_prizes_id=award_prizes.id - JOIN projects ON winners.projects_id=projects.id - JOIN registrations ON projects.registrations_id=registrations.id - JOIN students ON students.registrations_id=registrations.id - WHERE award_awards.cwsfaward='1' - ORDER BY students.email"), - 'sponsors' => array('name' => 'Organization sponsors', 'query' => - "SELECT id, organization, email FROM sponsors WHERE email!='' ORDER BY email"), - 'sponsors_primarycontacts' => array('name' => 'Organization sponsors (primary contacts)', 'query' => - "SELECT uid, MAX(users.year) AS year, sponsors.organization, users.firstname, users.lastname, users.email, deleted, users_sponsor.primary - FROM sponsors, - users_sponsor, - users - WHERE - users.id=users_sponsor.users_id - AND users_sponsor.sponsors_id=sponsors.id - AND users.types LIKE '%sponsor%' - AND users.email!='' - GROUP BY uid - HAVING deleted='no' AND users_sponsor.primary='yes' - ORDER BY users.email - "), - 'sponsors_allcontacts' => array('name' => 'Organization sponsors (all contacts)', 'query' => - "SELECT DISTINCT(users.email), sponsors.organization, users.firstname, users.lastname, users.email - FROM sponsors, - users_sponsor, - users - WHERE - users.id=users_sponsor.users_id - AND users_sponsor.sponsors_id=sponsors.id - AND users.types LIKE '%sponsor%' - AND users.deleted='no' - AND users.email!='' - ORDER BY users.email - "), - 'sponsors_specialawards' => array('name' => 'Organization sponsors for Special Awards', 'query' => - "SELECT DISTINCT sponsors.id, organization, email - FROM sponsors - JOIN award_awards ON sponsors.id=award_awards.sponsors_id - WHERE - email!='' - AND award_awards.award_types_id=2 - ORDER BY email"), - 'sponsors_primarycontacts_specialawards' => array('name' => 'Organization sponsors for Special Awards (primary contacts)', 'query' => - "SELECT DISTINCT uid, MAX(users.year) AS year, sponsors.organization, users.firstname, users.lastname, users.email, deleted, users_sponsor.primary - FROM sponsors, - users_sponsor, - users, - award_awards - WHERE - users.id=users_sponsor.users_id - AND users_sponsor.sponsors_id=sponsors.id - AND users.types LIKE '%sponsor%' - AND users.email!='' - AND sponsors.id=award_awards.sponsors_id - AND award_awards.award_types_id=2 - GROUP BY uid - HAVING deleted='no' AND users_sponsor.primary='yes' - ORDER BY users.email - "), - 'sponsors_allcontacts_specialawards' => array('name' => 'Organization sponsors for Special Awards (all contacts)', 'query' => - "SELECT DISTINCT(users.email), sponsors.organization, users.firstname, users.lastname, users.email - FROM sponsors, - users_sponsor, - users, - award_awards - WHERE - users.id=users_sponsor.users_id - AND users_sponsor.sponsors_id=sponsors.id - AND users.types LIKE '%sponsor%' - AND users.deleted='no' - AND users.email!='' - AND sponsors.id=award_awards.sponsors_id - AND award_awards.award_types_id=2 - ORDER BY users.email - "), - - /* - * "special_award_sponsors_unconfirmed"=>array("name"=>"Special award sponsors (unconfirmed only)","query"=> - * "SELECT DISTINCT(award_sponsors.id), organization, firstname, lastname, award_contacts.email FROM award_sponsors, award_awards, award_contacts WHERE award_awards.sponsors_id=award_sponsors.id AND award_contacts.award_sponsors_id=award_sponsors.id AND award_sponsors.confirmed='no' AND award_awards.award_types_id='2' AND award_contacts.year='".$config['FAIRYEAR']."'"), - * - * "special_award_sponsors_all"=>array("name"=>"Special award sponsors (all)","query"=> - * "SELECT DISTINCT(award_sponsors.id), organization, firstname, lastname, award_contacts.email FROM award_sponsors, award_awards, award_contacts WHERE award_awards.sponsors_id=award_sponsors.id AND award_contacts.award_sponsors_id=award_sponsors.id AND award_awards.award_types_id='2' AND award_contacts.year='".$config['FAIRYEAR']."'"), - */ - 'school_principals' => array('name' => 'School principals', 'query' => - "SELECT schools.principal_uid AS uid, schools.school, users.firstname AS firstname, users.lastname AS lastname, users.email AS email FROM schools - JOIN users ON schools.principal_uid=users.uid AND users.id=(SELECT id FROM users WHERE users.uid=schools.principal_uid ORDER BY `year` DESC LIMIT 1) - WHERE schools.year='" . $config['FAIRYEAR'] . "' AND users.email!=''"), - 'school_scienceheads' => array('name' => 'School science heads', 'query' => - "SELECT schools.sciencehead_uid AS uid, schools.school, users.firstname AS firstname, users.lastname AS lastname, users.email AS email FROM schools - JOIN users ON schools.sciencehead_uid=users.uid AND users.id=(SELECT id FROM users WHERE users.uid=schools.sciencehead_uid ORDER BY `year` DESC LIMIT 1) - WHERE schools.year='" . $config['FAIRYEAR'] . "' AND users.email!=''"), - 'school_with_project_thisyear' => array('name' => 'Schools with projects this year', 'query' => - 'SELECT DISTINCT(sc.schoolemail) AS email, sc.school AS firstname FROM students AS st LEFT JOIN schools AS sc ON sc.id = st.schools_id WHERE st.year = ' . $config['FAIRYEAR'] . ' AND LENGTH( sc.schoolemail ) !=0 ORDER BY email -'), - 'school_thisyear' => array('name' => 'Schools this year', 'query' => - "SELECT school AS firstname, schoolemail AS email FROM `schools` WHERE `year` ='" . $config['FAIRYEAR'] . "' GROUP BY schoolemail"), - 'school_teachers_thisyear' => array('name' => 'Teachers (as entered by students) this year', 'query' => - "SELECT teachername AS firstname, teacheremail AS email FROM students WHERE year = '" . $config['FAIRYEAR'] . "' GROUP BY teacheremail"), - 'school_teachers_lastyear' => array('name' => 'Teachers (as entered by students) last year', 'query' => - "SELECT teachername AS firstname, teacheremail AS email FROM students WHERE year = '" . ($config['FAIRYEAR'] - 1) . "' GROUP BY teacheremail"), - 'school_teachers_allyears' => array('name' => 'Teachers (as entered by students) all years', 'query' => - 'SELECT teachername AS firstname, teacheremail AS email FROM students GROUP BY teacheremail'), - /* Volunteers */ - 'volunteers_active_complete_thisyear' => array('name' => 'Volunteers active for this year and complete', 'query' => - "SELECT id, firstname, lastname, email FROM users LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id WHERE users.year='{$config['FAIRYEAR']}' AND users_volunteer.volunteer_complete='yes' AND users_volunteer.volunteer_active='yes' AND users.deleted='no' AND types LIKE '%volunteer%' ORDER BY email"), - 'volunteers_active_incomplete_thisyear' => array('name' => 'Volunteers active for this year but not complete', 'query' => - "SELECT id, firstname, lastname, email FROM users LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id WHERE users.year='{$config['FAIRYEAR']}' AND users_volunteer.volunteer_complete='no' AND users_volunteer.volunteer_active='yes' AND users.deleted='no' AND users.types LIKE '%volunteer%' ORDER BY email"), -); -?> diff --git a/admin/communication.php b/admin/communication.php deleted file mode 100644 index fdb55852..00000000 --- a/admin/communication.php +++ /dev/null @@ -1,996 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> ->../data/logs/emailqueue.log 2>&1 &'); -} - -/* - * dialog_choose - * select: comm_dialog_choose_select(emails_id) - * cancel: comm_dialog_choose_cancel() - */ - -switch (get_value_from_array($_GET, 'action')) { - case 'dialog_choose_load': - $emails_id = intval($_GET['emails_id']); - $q = $pdo->prepare('SELECT * FROM emails WHERE id=?'); - $q->execute([$emails_id]); - $e = $q->fetch(PDO::FETCH_ASSOC); - ?> - - - - -
:
:
:
-
-
- - - - quote(stripslashes($name)); - $description = $pdo->quote(stripslashes($description)); - $from = $pdo->quote(stripslashes($from)); - $subject = $pdo->quote(stripslashes($subject)); - $bodyhtml = $pdo->quote(stripslashes($bodyhtml)); - - $type = $pdo->quote($_POST['type']); - $key = $pdo->quote($_POST['key']); - $fcid = $pdo->quote($_POST['fcid']); - - if ($id == 0) { - if ($key && $name) { - $q = $pdo->prepare('INSERT INTO emails(type,val) VALUES(?,?)'); - $q->execute([$type, $key]); - show_pdo_errors_if_any($pdo); - $id = $pdo->lastInsertId(); - } else { - error_('Email Key and Name are required'); - exit; - } - } - - /* Allow the fundraising campaigns id to be NULL, it'll never be 0 */ - $fcstr = ($fcid == 0) ? 'NULL' : "'$fcid'"; - - $body = getTextFromHtml($bodyhtml); - $q = $pdo->prepare('UPDATE emails SET - name=?, - description=?, - `from`=?, - subject=?, - body=?, - bodyhtml=?, - fundraising_campaigns_id=? - WHERE id=?'); - $q->execute([$name, $description, $from, $subject, $body, $bodyhtml, $fcstr, $id]); - show_pdo_errors_if_any($pdo); - happy_('Email Saved'); - exit; - -case 'dialog_edit': - if (array_key_exists('id', $_GET)) { - $id = intval($_GET['id']); - $cloneid = 0; - } else if (array_key_exists('cloneid', $_GET)) { - $id = intval($_GET['cloneid']); - $clone_id = $id; - } else { - /* new email, set defaults which may be specified */ - $id = 0; - $key = htmlspecialchars($_GET['key']); - if (array_key_exists('fundraising_campaigns_id', $_GET)) { - $fcid = intval($_GET['fundraising_campaigns_id']); - $type = 'fundraising'; - $q = $pdo->prepare('SELECT * FROM fundraising_campaigns WHERE id=?'); - $q->execute([$fcid]); - $fc = $q->fetch(PDO::FETCH_OBJ); - $name = i18n('%1 communication for %2', array(ucfirst($key), $fc->name)); - } else { - $fcid = 0; - $type = (array_key_exists('type', $_GET)) ? $_GET['type'] : 'user'; - } - - $from = $_SESSION['name'] . ' <' . $_SESSION['email'] . '>'; - } - if ($id) { - $q = $pdo->prepare('SELECT * FROM emails WHERE id=?'); - $q->execute([$id]); - if ($q->rowCount() != 1) { - echo 'Ambiguous edit'; - exit; - } - $e = $q->fetch(PDO::FETCH_ASSOC); - - /* - * If we're supposed to clone it, load it then zero out the - * id so we make a new record on save, and override the key - */ - if ($clone_id) { - $e['id'] = 0; - $e['val'] = $_GET['key']; - $e['fundraising_campaigns_id'] = $_GET['fundraising_campaigns_id']; - } - $emails_id = $e['id']; - $name = htmlspecialchars($e['name']); - $key = htmlspecialchars($e['val']); - $description = htmlspecialchars($e['description']); - $from = htmlspecialchars($e['from']); - if (!$from && $config['fairmanageremail']) - $from = 'Fair Manager <' . $config['fairmanageremail'] . '>'; - $subject = htmlspecialchars($e['subject']); - $body = $e['body']; - $bodyhtml = $e['bodyhtml']; - $fcid = intval($e['fundraising_campaigns_id']); - if ($bodyhtml == '') - $bodyhtml = nl2br($body); - } - - ?> - - - - - - - prepare('SELECT * FROM emails WHERE `val`=?'); - $emailq->execute([$_GET['template']]); - $e = $emailq->fetch(PDO::FETCH_ASSOC); - } else - $e = null; - - $from = htmlspecialchars($_SESSION['name'] . ' <' . $_SESSION['email'] . '>'); - $to = htmlspecialchars($u['emailrecipient']); - $subject = htmlspecialchars($e['subject']); - - // useless but we might as well have it - $name = htmlspecialchars($e['name']); - $key = htmlspecialchars($e['val']); - $description = htmlspecialchars($e['description']); - - // do the replacements from the template now, so what the person see's is what gets sent. - $body = communication_replace_vars($e['body'], $u); - $bodyhtml = communication_replace_vars($e['bodyhtml'], $u); - - // if there's no html,. grab the html from the non-html version - if ($bodyhtml == '') - $bodyhtml = nl2br($body); - ?> - - - - prepare('SELECT * FROM emails ORDER BY type,name'); - $q->execute(); - echo ''; - echo ''; - echo ' '; - echo ' '; - echo ' '; - echo ''; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($r->fundraising_campaigns_id) - $fcid = $r->fundraising_campaigns_id; - else - $fcid = 'null'; - if ($r->name) - $name = $r->name; - else - $name = i18n('no email name specified'); - - echo ''; - echo ""; - - echo ' \n"; - echo ''; - } - echo '
' . i18n('Name') . '' . i18n('Type') . '' . i18n('Actions') . '
id,$fcid)\">", htmlspecialchars($name) . '$r->type'; - // only user emails can be deleted, system ones are required and cannot be removed - if ($r->type == 'user') { - echo ' '; - echo "id\">'; - echo ' '; - echo "id\">" . i18n('Send') . ''; - } - echo "
'; - exit; - - case 'cancel': - if ($_GET['cancel']) { - $q = $pdo->prepare('UPDATE emailqueue SET finished=NOW() WHERE id=?'); - $q->execute([intval($_GET['cancel'])]); - - $q = $pdo->prepare("UPDATE emailqueue_recipients SET result='cancelled' WHERE emailqueue_id=? AND sent IS NULL AND result IS NULL"); - $q->execute([intval($_GET['cancel'])]); - echo 'ok'; - } - exit; - - case 'loadaddresses': - if ($_GET['query'] && array_key_exists($_GET['query'], $mailqueries)) { - $q = $pdo->prepare($mailqueries[$_GET['query']]['query']); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($r->organization) - $s = "($r->organization) "; - else - $s = ''; - echo "$r->firstname $r->lastname {$s}<$r->email>
"; - } - } - - exit; -} - -if (get_value_from_array($_GET, 'action') == 'sendqueue') { - $fcid = intval($_POST['fundraising_campaigns_id']); - $emailid = intval($_POST['emails_id']); - - $fcq = $pdo->prepare('SELECT * FROM fundraising_campaigns WHERE id=?'); - $fcq->execute([$fcid]); - $fc = $fcq->fetch(PDO::FETCH_OBJ); - - $emailq = $pdo->prepare('SELECT * FROM emails WHERE id=?'); - $emailq->execute([$emailid]); - $email = $emailq->fetch(PDO::FETCH_OBJ); - - $recipq = $pdo->prepare('SELECT * FROM fundraising_campaigns_users_link - WHERE fundraising_campaigns_id=?'); - $recipq->execute([$fcid]); - show_pdo_errors_if_any($pdo); - - $numtotal = $recipq->rowCount(); - - $q = $pdo->prepare("INSERT INTO emailqueue (val, name, users_uid, `from`, subject, body, bodyhtml, `type`, fundraising_campaigns_id, started, finished, numtotal, numsent) - \tVALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NOW(), NULL, ?, 0)"); - - $q->execute([ - $email->val, - $email->name, - $_SESSION['users_uid'], - $email->from, - $email->subject, - $email->body, - $email->bodyhtml, - $email->type, - $fcid, - $numtotal - ]); - - $emailqueueid = $pdo->lastInsertId(); - show_pdo_errors_if_any($pdo); - - $urlproto = $_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://'; - $urlmain = "$urlproto{$_SERVER['HTTP_HOST']}{$config['SFIABDIRECTORY']}"; - $urllogin = "$urlmain/login.php"; - while ($r = $recipq->fetch(PDO::FETCH_OBJ)) { - $u = user_load_by_uid($r->users_uid); - - // we only send school access codes to science heads or principals - - $acq = $pdo->prepare('SELECT accesscode FROM schools WHERE (sciencehead_uid=? OR principal_uid=? AND `year`=?'); - $acq->execute([$u['uid'], $config['FAIRYEAR']]); - $acr = $acq->fetch(PDO::FETCH_OBJ); - $accesscode = $acr->accesscode; - - $replacements = array( - 'FAIRNAME' => $config['fairname'], - 'SALUTATION' => $u['salutation'], - 'FIRSTNAME' => $u['firstname'], - 'LASTNAME' => $u['lastname'], - 'NAME' => $u['name'], - 'EMAIL' => $u['email'], - 'ORGANIZATION' => $u['sponsor']['organization'], - 'URLMAIN' => $urlmain, - 'URLLOGIN' => $urllogin, - 'ACCESSCODE' => $accesscode, - ); - - if ($u['email'] && $u['email'][0] != '*') { - $q = $pdo->prepare('INSERT INTO emailqueue_recipients (emailqueue_id, toemail, toname, replacements, sent) VALUES (?, ?, ?, ?, NULL)'); - - $q->execute([ - $emailqueueid, - $u['email'], - $u['name'], - json_encode($replacements) - ]); - - show_pdo_errors_if_any($pdo); - } - $q = $pdo->prepare('UPDATE emails SET lastsent=NOW() WHERE id=?'); - $q->execute([$emailid]); - } - echo 'ok'; - launchQueue(); - exit; -} -send_header('Communication', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'communication'); -echo '
'; -?> - - prepare("DELETE FROM emails WHERE id=? AND `type`='user'"); - $q->execute([$_GET['delete']]); - echo happy('Email successfully deleted'); -} - -if (get_value_from_array($_GET, 'action') == 'send' && get_value_from_array($_GET, 'send')) { - show_pdo_errors_if_any($pdo); - - $q = $pdo->prepare('SELECT * FROM emails WHERE id=?'); - $q->execute([$_GET['send']]); - - $r = $q->fetch(PDO::FETCH_OBJ); - - echo i18n('Please confirm you would like to send the following email, and choose who to send it to'); - echo '
'; - echo '
'; - echo '
'; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - if ($r->bodyhtml) { - $body = $r->bodyhtml; - } else { - $body = nl2br(htmlspecialchars($r->body)); - } - - echo ''; - - echo '
From:' . htmlspecialchars($r->from) . '
To:'; - echo ''; - echo ''; - echo ''; - echo '
Date:' . date('r') . '
Subject:' . htmlspecialchars($r->subject) . '
' . $body . '
(' . mb_detect_encoding($body) . ')
'; - - if (!function_exists('exec')) { - echo "
Sending requires php's exec() function to be available
\n"; - } else { - echo ''; - echo ''; - echo '
'; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo '
'; - echo ''; - echo '
'; - echo '
'; - } - // echo $str; -} else if (get_value_from_array($_POST, 'action') == 'reallysend' && get_value_from_array($_POST, 'reallysend') && get_value_from_array($_POST, 'to')) { - $emailid = intval($_POST['reallysend']); - $emailq = $pdo->prepare('SELECT * FROM emails WHERE id=?'); - $emailq->execute([$emailid]); - $email = $emailq->fetch(PDO::FETCH_OBJ); - $to = $_POST['to']; - - if (array_key_exists($to, $mailqueries)) { - $recipq = $pdo->prepare($mailqueries[$to]['query']); - $recipq->execute(); - } - - $numtotal = $recipq->rowCount(); - $q = $pdo->prepare('INSERT INTO emailqueue (val, name, users_uid, `from`, subject, body, bodyhtml, `type`, fundraising_campaigns_id, started, finished, numtotal, numsent) VALUES (?, ?, ?, ?, ?, ?, ?, ?, NULL, NOW(), NULL, ?, 0)'); - - $q->execute([ - $email->val, - $email->name, - $_SESSION['users_uid'], - $email->from, - $email->subject, - $email->body, - $email->bodyhtml, - $email->type, - $numtotal - ]); - - $emailqueueid = $pdo->lastInsertId(); - show_pdo_errors_if_any($pdo); - - $urlproto = $_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://'; - $urlmain = "$urlproto{$_SERVER['HTTP_HOST']}{$config['SFIABDIRECTORY']}"; - $urllogin = "$urlmain/login.php"; - - while ($r = $recipq->fetch(PDO::FETCH_OBJ)) { - if ($r->uid) - $u = user_load_by_uid($r->uid); - else if ($r->users_uid) - $u = user_load_by_uid($r->users_uid); - else { - $toname = $r->firstname . ' ' . $r->lastname; - $toemail = $r->email; - - $replacements = array( - 'FAIRNAME' => $config['fairname'], - 'FIRSTNAME' => $r->firstname, - 'LASTNAME' => $r->lastname, - 'NAME' => $r->firstname . ' ' . $r->lastname, - 'EMAIL' => $r->email, - 'ORGANIZATION' => $r->organization, - 'URLMAIN' => $urlmain, - 'URLLOGIN' => $urllogin, - 'ACCESSCODE' => 'unknown', - ); - } - if ($u) { - // we only send school access codes to science heads or principals - $acq = $pdo->prepare('SELECT accesscode FROM schools WHERE (sciencehead_uid=? OR principal_uid=?) AND `year`=?'); - $acq->execute([$u['uid'], $u['uid'], $config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - $acr = $acq->fetch(PDO::FETCH_OBJ); - $accesscode = $acr->accesscode; - - $replacements = array( - 'FAIRNAME' => $config['fairname'], - 'SALUTATION' => $u['salutation'], - 'FIRSTNAME' => $u['firstname'], - 'LASTNAME' => $u['lastname'], - 'NAME' => $u['name'], - 'EMAIL' => $u['email'], - 'ORGANIZATION' => $u['sponsor']['organization'], - 'URLMAIN' => $urlmain, - 'URLLOGIN' => $urllogin, - 'ACCESSCODE' => $accesscode, - ); - - $toname = $u['name']; - $toemail = $u['email']; - } - - if ($toemail) { - $q = $pdo->prepare('INSERT INTO emailqueue_recipients (emailqueue_id, toemail, toname, replacements, sent) VALUES (?, ?, ?, ?, NULL)'); - - $q->execute([ - $emailqueueid, - $toemail, - $toname, - json_encode($replacements) - ]); - - show_pdo_errors_if_any($pdo); - } - - $q = $pdo->prepare('UPDATE emails SET lastsent=NOW() WHERE id=?'); - $q->execute([$emailid]); - } - launchQueue(); - echo '
'; - echo happy('Email Communication sending has started!'); - echo '
'; - echo 'Click here to see the sending progress'; -} else if (get_value_from_array($_GET, 'action') == 'restartqueue') { - launchQueue(); - echo '
'; - echo happy('Email Communication sending has started!'); - echo '
'; - echo 'Click here to see the sending progress'; -} else { - if (!$config['fairmanageremail']) - echo notice(i18n("Warning: The 'Fair Manager Email' has not been set in SFIAB Configuration / Configuration Variables / Global. Please set it. The 'Fair Manager Email' is the default 'From' address for all emails and without a 'From' address, no emails can be sent!")); - - echo '' . i18n('Email Queue Status and History') . '
'; - echo '' . i18n('Add New Email') . ''; - echo "
\n"; - echo "
\n"; - echo '
'; - ?> - - diff --git a/admin/communication_send_status.php b/admin/communication_send_status.php deleted file mode 100644 index a8d84191..00000000 --- a/admin/communication_send_status.php +++ /dev/null @@ -1,160 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare('SELECT * FROM emailqueue WHERE finished IS NULL'); - $q->execute(); - - if ($config['emailqueue_lock'] || $q->rowCount()) { - echo '

' . i18n('Active Send Queues') . "

\n"; - - $q = $pdo->prepare('SELECT *,UNIX_TIMESTAMP(started) AS ts FROM emailqueue WHERE finished IS NULL ORDER BY started DESC'); - $q->execute(); - if (!$config['emailqueue_lock']) { - echo error(i18n("It looks like there's emails waiting to send, but the sending process isnt running.") - . '
' - . '' . i18n('Click here to manually restart the process') . ''); - } - - echo ''; - echo ''; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo "\n"; - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo " \n"; - echo " \n"; - echo " \n"; - $remaining = $r->numtotal - $r->numsent; - $now = time(); - $duration = $now - $r->ts; - $num = $r->numsent + $r->numfailed; - echo " \n"; - echo ''; - echo ''; - echo "'; - echo "\n"; - } - echo '
' . i18n('Name') . "' . i18n('Subject') . "' . i18n('Started') . "' . i18n('Progress') . "' . i18n('Duration') . "' . i18n('ETA') . "' . i18n('Cancel') . "
$r->name$r->subject$r->started$num / $r->numtotal'; - echo format_duration($duration); - echo ''; - if ($r->numsent || $r->numfailed) { - $emailspersecond = ($r->numsent + $r->numfailed) / $duration; - $remainingduration = $remaining / $emailspersecond; - echo format_duration($remainingduration); - } else { - echo 'Unknown'; - } - echo 'id)\">" . i18n('cancel') . '
'; - echo "

\n"; - } else { - echo notice('No Email Communications are currently being sent out'); - ?> - - prepare('SELECT * FROM emailqueue WHERE finished IS NOT NULL ORDER BY started DESC LIMIT 10'); - $q->execute(); - echo '

' . i18n('Completed Send Queues') . "

\n"; - echo "\n"; - echo ''; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - // FIXME: comment bounced until we implement it - // echo " \n"; - echo "\n"; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - // echo " \n"; - echo "\n"; - } - echo "
' . i18n('Name') . "' . i18n('Subject') . "' . i18n('Started') . "' . i18n('Finished') . "' . i18n('Total Emails') . "' . i18n('Success') . "' . i18n('Failed') . "".i18n("Bounced")."
$r->name$r->subject$r->started$r->finished$r->numtotal$r->numsent$r->numfailed$r->numbounced
\n"; - exit; -} - -send_header('Communication Sending Status', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Communication' => 'admin/communication.php')); -?> - - '; -echo '
'; -echo '
'; -echo '
'; - -send_footer(); -?> diff --git a/admin/curl.inc.php b/admin/curl.inc.php deleted file mode 100644 index 486f1dea..00000000 --- a/admin/curl.inc.php +++ /dev/null @@ -1,149 +0,0 @@ - - * Copyright (C) 2009 David Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -";print_r($array);echo ""; - $keys = array_keys($array); - foreach ($keys as $k) { - if (!is_array($array[$k])) { - echo "Not array at key $k"; - exit; - } - - /* Special cases, leave these as arrays of entries */ - if ($k == 'award' || $k == 'prize') { - foreach ($array[$k] as &$a) { - xml_dearray($a); - } - continue; - } - - if (count($array[$k]) != 1) { - echo 'Unexpected multielement array, stop.'; - exit; - }; - $array[$k] = $array[$k][0]; - - if (is_array($array[$k])) { - xml_dearray($array[$k]); - } - } -} - -function curl_query($fair, $data, $ysc_url = '') -{ - global $output; - switch ($fair['type']) { - case 'sfiab': - $url = $fair['url'] . '/remote.php'; - $var = 'json'; - $d = array(); - $d['auth'] = array('username' => $fair['username'], - 'password' => $fair['password']); - $str = json_encode(array_merge($d, $data)); - break; - case 'ysc': - if ($ysc_url == '') - $url = $fair['url']; - else - $url = $ysc_url; - $var = 'xml'; - $output = ''; - xmlCreateRecurse($data); - $str = $output; - break; - default: - echo "Unknown fair type {$fair['type']}"; - break; - } - - // debug_("Curl Send: (type:{$fair['type']}=>$url ysc_url=>$ysc_url) $str"); - - $ch = curl_init(); // / initialize a cURL session - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_HEADER, 0); // / Header control - curl_setopt($ch, CURLOPT_POST, 1); // / tell it to make a POST, not a GET - curl_setopt($ch, CURLOPT_POSTFIELDS, "$var=" . urlencode($str)); // / put the query string here starting with "?" - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // / This allows the output to be set into a variable $datastream - // curl_setopt ($ch, CURLOPT_POSTFIELDSIZE, 0); - curl_setopt($ch, CURLOPT_TIMEOUT, 360); - curl_setopt($ch, CURLOPT_SSLVERSION, 3); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - $datastream = curl_exec($ch); // / execute the curl session and return the output to a variable $datastream - curl_close($ch); // / close the curl session - - // debug_("Server Returned: ".urldecode($datastream)); - - switch ($fair['type']) { - case 'sfiab': - $ret = json_decode(urldecode($datastream), true); - break; - case 'ysc': - $datastream = str_replace(' standalone="yes"', '', $datastream); - /* Return is XML, make a return array */ - $response = xml_parsexml($datastream); - - if (!is_array($response)) { - $ret['message'] = $datastream; - $ret['error'] = 0; - return $ret; - } - /* De-array everything */ - xml_dearray($response); - $key = array_keys($response); - - // echo "
";print_r($response);echo "
"; - - switch ($key[0]) { - case 'awardresponse': - /* Full response */ - $ret = $response['awardresponse']; - - /* Undo variable to array */ - $ret['awards'] = $ret['awards']['award']; - foreach ($ret['awards'] as &$a) - $a['prizes'] = $a['prizes']['prize']; - - $ret['error'] = 0; - $ret['message'] = ''; - break; - case 'awardwinnersresponse': - /* Parse return */ - $ret['error'] = ($response['awardwinnersresponse']['status'] == 'failed') ? 1 : 0; - $ret['message'] = $response['awardwinnersresponse']['statusmessage']; - break; - } - break; - } - // n debug_("Returning: ".print_r($ret, true)); - return $ret; -} -?> diff --git a/admin/cwsfregister.php b/admin/cwsfregister.php deleted file mode 100644 index f03f44a2..00000000 --- a/admin/cwsfregister.php +++ /dev/null @@ -1,321 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -include 'xml.inc.php'; -require_once ('../user.inc.php'); - -function get_cwsf_award_winners() -{ - global $config, $pdo; - $winners = array(); - - $q = $pdo->prepare("SELECT * FROM award_awards WHERE cwsfaward='1' AND year=?"); - $q->execute([$config['FAIRYEAR']]); - - if ($q->rowCount() == 1) { - $award = $q->fetch(PDO::FETCH_OBJ); - $pq = $pdo->prepare("SELECT * FROM award_prizes WHERE award_awards_id=?"); - $pq->execute([$award->id]); - - while ($prize = $pq->fetch(PDO::FETCH_OBJ)) { - $wq = $pdo->prepare("SELECT - projects.id, - projects.projectnumber, - projects.title, - projects.summary, - projects.registrations_id, - projects.cwsfdivisionid, - projects.projectdivisions_id - - FROM - winners, - projects - WHERE - winners.projects_id=projects.id AND - awards_prizes_id=? AND - winners.year=?"); - $wq->execute([$prize->id, $config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - - while ($project = $wq->fetch(PDO::FETCH_OBJ)) { - $sq = $pdo->prepare("SELECT * FROM students WHERE registrations_id=? AND year=?"); - $sq->execute([$project->registrations_id, $config['FAIRYEAR']]); - - $students = array(); - $cwsf_agecategory = 0; - - while ($s = $sq->fetch(PDO::FETCH_OBJ)) { - if ($s->grade >= 7 && $s->grade <= 8) { - if ($cwsf_agecategory < 1) - $cwsf_agecategory = 1; - } - if ($s->grade >= 9 && $s->grade <= 10) { - if ($cwsf_agecategory < 2) - $cwsf_agecategory = 2; - } - if ($s->grade >= 11 && $s->grade <= 13) { - if ($cwsf_agecategory < 3) - $cwsf_agecategory = 3; - } - $students[] = array( - 'xml_type' => 'student', - 'firstname' => $s->firstname, - 'lastname' => $s->lastname, - 'email' => $s->email, - 'gender' => $s->sex, - 'grade' => $s->grade, - 'language' => $s->lang, - 'birthdate' => $s->dateofbirth, - 'address1' => $s->address, - 'address2' => '', - 'city' => $s->city, - 'province' => $s->province, - 'postalcode' => $s->postalcode, - 'homephone' => $s->phone, - 'cellphone' => '', - ); - } - $winners[] = array( - 'xml_type' => 'project', - 'projectid' => $project->id, - 'projectnumber' => $project->projectnumber, - 'title' => $project->title, - 'abstract' => $project->summary, - 'category_id' => $cwsf_agecategory, - 'division_id' => $project->cwsfdivisionid, - 'projectdivisions_id' => $project->projectdivisions_id, - 'students' => $students, - ); - } - } - // print_r($award); - } - return $winners; -} - -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'one-click_cwsf_registration'); -echo '
'; - -if (count(get_value_from_array($_POST, 'cwsfdivision', []))) { - foreach ($_POST['cwsfdivision'] AS $p => $d) { - $q = $pdo->prepare("UPDATE projects SET cwsfdivisionid=? WHERE id=?"); - $q->execute([$d, $p]); - } - echo happy(i18n('CWSF Project Divisions saved')); -} - -if (get_value_from_array($_POST, 'action') == 'register' && $_POST['xml']) { - if (function_exists('curl_init')) { - $ch = curl_init(); // / initialize a cURL session - curl_setopt($ch, CURLOPT_URL, 'https://secure.ysf-fsj.ca/registration/xmlregister.php'); - curl_setopt($ch, CURLOPT_HEADER, 0); // / Header control - curl_setopt($ch, CURLOPT_POST, 1); // / tell it to make a POST, not a GET - curl_setopt($ch, CURLOPT_POSTFIELDS, 'xml=' . $_POST['xml']); // / put the query string here starting with "?" - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // / This allows the output to be set into a variable $datastream - curl_setopt($ch, CURLOPT_POSTFIELDSIZE, 0); - curl_setopt($ch, CURLOPT_TIMEOUT, 360); - curl_setopt($ch, CURLOPT_SSLVERSION, 3); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - $datastream = curl_exec($ch); // / execute the curl session and return the output to a variable $datastream - $datastream = str_replace(' standalone="yes"', '', $datastream); - // echo "curl close
"; - curl_close($ch); // / close the curl session - - echo i18n('The YSC Registration Server said:') . '
'; - echo notice($datastream); - } else { - echo error('CURL Support Missing'); - echo i18n('Your PHP installation does not support CURL. You will need to login to the YSC system as the regional coodinator and upload the XML data manually'); - } - send_footer(); - exit; -} - -/* Load the YSC fair */ -$q = $pdo->prepare("SELECT * FROM fairs WHERE abbrv='YSC'"); -$q->execute(); -if ($q->rowCount() < 1) { - echo error(i18n('You have not defined the YSC upstream fair in the Science Fair Management area.')); - $ok = false; -} else { - $f = $q->fetch(PDO::FETCH_ASSOC); - $ysc_region_id = $f['username']; - $ysc_region_password = $f['password']; -} -$ok = true; -// make sure we have the ysc_region_id and ysc_region_password -if ($ysc_region_id == '') { - echo error(i18n('You have not yet specified a username for YSC (your Region ID). Go to the Science Fair Management page to set it')); - $ok = false; -} -if ($ysc_region_password == '') { - echo error(i18n('You have not yet specified a password for YSC (your Region Password). Go to the Science Fair Management page to set it')); - $ok = false; -} - -if ($ok) { - $q = $pdo->prepare("SELECT * FROM award_awards WHERE cwsfaward='1' AND year=?"); - $q->execute([$config['FAIRYEAR']]); - if (!$q->rowCount()) { - echo error(i18n('Cannot find an award that is specified as the Canada-Wide Science Fair Award')); - echo i18n('Please go to the awards manager and select which award identifies your CWSF students'); - } else if ($q->rowCount() > 1) { - echo error(i18n('There is more than one award that is identified as your Canada-Wide Science Fair award.')); - echo i18n('Please go to the awards manager and choose only one award that identifies your CWSF students'); - } else { - $award = $q->fetch(PDO::FETCH_OBJ); - echo '' . i18n('CWSF Award') . ': ' . $award->name . '
'; - echo i18n("Please review the list of winning projects/students below. If it is all correct then you can click the 'Register for CWSF' button at the bottom of the page to send the information to YSC"); - echo '
'; - echo '
'; - $winners = get_cwsf_award_winners(); - echo '' . i18n('Found %1 CWSF prize winners', array(count($winners))) . ''; - echo '
'; - $error = false; - echo '
'; - echo ''; - echo ''; - echo ''; - echo ''; - - foreach ($winners AS $winner) { - echo ''; - } - echo ''; - echo '
' . i18n('Project Information') . '' . i18n('Project Division / CWSF Project Division') . '
'; - echo ''; - echo $winner['projectnumber'] . ' - ' . $winner['title']; - echo ''; - echo '
'; - foreach ($winner['students'] AS $s) { - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo i18n('Name') . ': '; - echo $s['firstname'] . ' ' . $s['lastname']; - echo '
'; - - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo i18n('Email') . ': ' . $s['email']; - if (!$s['email']) { - echo error(i18n('No Email Address'), 'inline'); - $error = true; - } - echo '
'; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - - echo i18n('Grade') . ': ' . $s['grade']; - if (!$s['grade']) { - echo error(i18n('No Grade'), 'inline'); - $error = true; - } - - echo '
'; - } - if (!$winner['division_id']) { - echo '
'; - echo error(i18n('Choose a CWSF Division'), 'inline'); - $error = true; - } - - echo '
'; - - $t = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? AND id=?"); - $t->execute([$config['FAIRYEAR'], $winner['projectdivisions_id']]); - $tr = $t->fetch(PDO::FETCH_OBJ); - echo $tr->division; - echo '
'; - - echo '\n"; - - echo '
'; - echo ''; - echo '
'; - echo '
'; - - if (!$error) { - $reg = array('registration' => array( - 'ysf_region_id' => $ysc_region_id, - 'ysf_region_password' => $ysc_region_password, - 'projects' => $winners - )); - - $output = ''; - xmlCreateRecurse($reg); - $xmldata = $output; - - echo '

' . i18n('The following data will be sent to Youth Science Canada') . '

'; - echo '
'; - echo ''; - echo ''; - echo '
'; - echo '
'; - echo i18n('Warning! You can only use this feature once, and it will send whatever data is listed above. If you try to submit this data a second time to YSC it will not work. So please make sure everything is correct before submitting!'); - echo '
'; - echo '
'; - echo ''; - echo '
'; - } else { - echo error(i18n('You must correct the above errors before registration can proceed')); - } - } -} - -send_footer(); - -?> diff --git a/admin/documentdownloader.php b/admin/documentdownloader.php deleted file mode 100644 index c69dbb2e..00000000 --- a/admin/documentdownloader.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT * FROM documents WHERE id=?"); -$q->execute([$_GET['id']]); -if ($r = $q->fetch(PDO::FETCH_OBJ)) { - header('Content-type: ' . trim(exec("file -bi ../data/documents/$r->filename"))); - header('Content-disposition: inline; filename="' . $r->filename . '"'); - header('Content-length: ' . filesize("../data/documents/$r->filename")); - readfile("../data/documents/$r->filename"); -} -?> diff --git a/admin/documents.php b/admin/documents.php deleted file mode 100644 index 208196ec..00000000 --- a/admin/documents.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'internal_document_management'); - -$editor = new TableEditor('documents', - array( - 'date' => 'Date', - 'title' => 'Document Title', - 'sel_category' => 'Category', - 'filename' => 'Filename', - )); -$editor->setPrimaryKey('id'); -$editor->setUploadPath('../data/documents'); -$editor->setDefaultSortField('sel_category,date'); -$editor->setRecordType('Document'); -$editor->setFieldDefaultValue('date', date('Y-m-d')); -$editor->setDownloadLink('documentdownloader.php'); -$editor->execute(); - -send_footer(); -?> diff --git a/admin/donations.php b/admin/donations.php deleted file mode 100644 index c7890f24..00000000 --- a/admin/donations.php +++ /dev/null @@ -1,179 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Fundraising' => 'admin/fundraising.php'), - 'fundraising'); - -?> - -prepare("SELECT * FROM fundraising WHERE year=?"); -$q->execute([$config['FAIRYEAR']]); -if (!$q->rowCount()) { - $q = $pdo->prepare("SELECT * FROM fundraising WHERE year='-1'"); - - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $q = $pdo->prepare("INSERT INTO fundraising (`type`,`name`,`description`,`system`,`goal`,`year`) VALUES (?,?,?,?,?,?)"); - $q->execute([$r->type,$r->name,$r->description,$r->system,$r->goal,$config['FAIRYEAR']]); - } -} - -echo '
'; -echo '
'; - -echo "
\n"; -echo "
\n"; -echo "Manage Donation Levels\n"; -echo "
\n"; -echo "Manage Donors\n"; -echo "
\n"; - -?> - - - diff --git a/admin/donors.php b/admin/donors.php deleted file mode 100644 index 2db33ead..00000000 --- a/admin/donors.php +++ /dev/null @@ -1,1406 +0,0 @@ - - * Copyright (C) 2008 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare('SELECT * FROM sponsors WHERE id=?'); - $q->execute([$id]); - $ret = $q->fetch(PDO::FETCH_ASSOC); - echo json_encode($ret); - exit; - break; - - case 'organizationinfo_save': - $id = intval($_POST['sponsor_id']); - - if ($id == -1) { - $q = $pdo->prepare('INSERT INTO sponsors (year) VALUES (?)'); - $q->execute([$config['FAIRYEAR']]); - $id = $pdo->lastInsertId(); - echo json_encode(array('id' => $id)); - save_activityinfo('Created donor/sponsor', $id, $_SESSION['users_uid'], 'System'); - $createnew = true; - } else - $createnew = false; - if ($id) { - if ($_POST['fundingselectiondate'] == '') { - $_POST['fundingselectiondate'] = '0000-00-00'; - } - - if ($_POST['proposalsubmissiondate'] == '') { - $_POST['proposalsubmissiondate'] = '0000-00-00'; - } - - if (!$_POST['waiveraccepted']) { - $_POST['waiveraccepted'] = 'no'; - } - - $exec = 'UPDATE sponsors SET ' - . 'donortype=?, ' - . 'organization=?, ' - . 'address=?, ' - . 'address2=?, ' - . 'city=?, ' - . 'province_code=?, ' - . 'postalcode=?, ' - . 'phone=?, ' - . 'tollfree=?, ' - . 'fax=?, ' - . 'email=?, ' - . 'website=?, ' - . 'notes=?, ' - . 'donationpolicyurl=?, ' - . 'fundingselectiondate=?, ' - . 'proposalsubmissiondate=?, ' - . 'waiveraccepted=? ' - . 'WHERE id=?'; - $q = $pdo->prepare($exec); - $q->execute([stripslashes($_POST['donortype']), stripslashes($_POST['organization']), stripslashes($_POST['address']), - stripslashes($_POST['address2']), stripslashes($_POST['city']), stripslashes($_POST['province_code']), - stripslashes($_POST['postalcode']), stripslashes($_POST['phone']), stripslashes($_POST['tollfree']), - stripslashes($_POST['fax']), stripslashes($_POST['email']), stripslashes($_POST['website']), - stripslashes($_POST['notes']), stripslashes($_POST['donationpolicyurl']), stripslashes($_POST['fundingselectiondate']), - stripslashes($_POST['proposalsubmissiondate']), stripslashes($_POST['waiveraccepted']), $id]); - show_pdo_errors_if_any($pdo); - - // FIXME accept the logo - // "logo='".mysql_escape_string(stripslashes($_POST['logo']))."', ". - // ($comment , $donorId, $userId, $type, $campaign_id=null){ - if (!$createnew) { - save_activityinfo('Updated donor/sponsor details', $id, $_SESSION['users_uid'], 'System'); - happy_('Donor/Sponsor Details saved'); - } - } - exit; - break; - - case 'sponsorshipinfo_load': - $id = intval($_GET['id']); - echo '

' . i18n('Summary') . "

\n"; - echo "\n"; - - // LAST DONATION - $q = $pdo->prepare('SELECT * FROM fundraising_donations WHERE sponsors_id=? ORDER BY datereceived DESC LIMIT 1'); - $q->execute([$id]); - if ($r = $q->fetch(PDO::FETCH_OBJ)) - $lastdonation = i18n('%1 on %2', array(format_money($r->value, false), format_date($r->datereceived)), array('Donation amount', 'Donation date')); - else - $lastdonation = i18n('Never'); - - // TOTAL THIS YEAR - $q = $pdo->prepare("SELECT SUM(value) AS total FROM fundraising_donations - WHERE sponsors_id=? - AND status='received' - AND fiscalyear=? - "); - $q->execute([$id, $config['FISCALYEAR']]); - if ($r = $q->fetch(PDO::FETCH_OBJ)) - $totalthisyear = format_money($r->total, false); - else - $totalthisyear = format_money(0); - - // TOTAL LAST YEAR - $lastyear = $config['FISCALYEAR'] - 1; - $q = $pdo->prepare("SELECT SUM(value) AS total FROM fundraising_donations - WHERE sponsors_id=? - AND status='received' - AND fiscalyear=? - "); - $q->execute([$id, $lastyear]); - - if ($r = $q->fetch(PDO::FETCH_OBJ)) - $totallastyear = format_money($r->total, false); - else - $totallastyear = format_money(0); - - // OUTPUT - echo '\n"; - echo '\n"; - echo '\n"; - echo "
' . i18n('Last Donation') . "$lastdonation
' . i18n('Total This Year') . "$totalthisyear
' . i18n('Total Last Year') . "$totallastyear
\n"; - - echo "
\n"; - echo '

' . i18n('Donations/Sponsorships') . "

\n"; - echo '
'; - $q = $pdo->prepare("SELECT fundraising_donations.*, - fundraising_campaigns.name AS campaignname - FROM fundraising_donations - LEFT JOIN fundraising_campaigns ON fundraising_donations.fundraising_campaigns_id=fundraising_campaigns.id - WHERE sponsors_id=? - AND status='received' - AND fundraising_donations.fiscalyear=? - ORDER BY datereceived DESC"); - $q->execute([$id, $config['FISCALYEAR']]); - show_pdo_errors_if_any($pdo); - - if ($q->rowCount()) { - echo ''; - echo ''; - echo ''; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ''; - echo ''; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo "\n"; - echo ' \n"; - $goal = getGoal($r->fundraising_goal); - echo " "; - echo " "; - echo ' '; - echo ' '; - echo "\n"; - } - echo "
' . i18n('Date') . "' . i18n('Purpose') . "' . i18n('Appeal') . "' . i18n('Value') . "' . i18n('Remove') . "
' . format_date($r->datereceived) . "$goal->name$r->campaignname' . format_money($r->value, false) . ''; - echo "id,$id)\" href=\"#\">'; - echo '
\n"; - } else { - echo i18n('No donations this year') . '
'; - } - - echo '' . i18n('View full donation history') . ''; - echo '
'; - echo '\n"; - echo "
\n"; - echo '

' . i18n('Add New Donation/Sponsorship') . "

\n"; - - echo '
'; - echo "\n"; - echo ''; - echo '\n"; - - echo '\n"; - - echo '\n"; - echo '\n"; - echo '\n"; - - /* - * echo ""; - * echo "\n"; - */ - echo '\n"; - echo "
'; - echo i18n('Appeal') . ':'; - echo ''; - - // loop through each contact in the donor - $query = $pdo->prepare("SELECT users.id,users.uid,users.deleted,MAX(year) - FROM users - LEFT JOIN users_sponsor ON users_sponsor.users_id=users.id - WHERE - sponsors_id=? - AND types LIKE '%sponsor%' - GROUP BY uid - HAVING deleted='no' - ORDER BY users_sponsor.primary DESC,lastname,firstname - "); - $query->execute([$id]); - show_pdo_errors_if_any($pdo); - $uids = array(); - while ($r = $query->fetch(PDO::FETCH_OBJ)) { - $uids[] = $r->uid; - } - - $q = $pdo->prepare('SELECT * FROM fundraising_campaigns - WHERE fiscalyear=? - ORDER BY name'); - $q->execute([$config['FISCALYEAR']]); - $str = ''; - echo '\n"; - echo "
'; - echo i18n('Purpose') . ':'; - echo ''; - echo '\n"; - echo '\n"; - echo "
' . i18n('Date Received') . ':
' . i18n('Amount') . ":\$
' . i18n('Type of Support') . ':'; - $supporttypes = array('Gift - no receipt'); - if ($config['registered_charity']) - $supporttypes[] = 'Donation - with receipt'; - $supporttypes[] = 'Sponsorship'; - echo "\n"; - echo "
"; - * echo "".i18n("Generate Thank You")."
\n"; - echo "
\n"; - - exit; - break; - - case 'contactsinfo_load': - // make sure a donor id has been selected - if ($_GET['id']) { - draw_contactsinfo_form(); - } - exit; - break; - - case 'contactsinfo_save': - save_contact(); - exit; - break; - case 'contactsinfo_delete': - delete_contact(); - exit; - break; - case 'contactsinfo_addexisting': - addexisting_contact(); - exit; - break; - case 'activityinfo_load': - // make sure a donor id has been selected - if ($_GET['id']) { - draw_activityinfo_form(); - } - exit; - break; - case 'activityinfo_save': - // ($comment , $donorId, $userId, $type, $campaign_id=null){ - if (save_activityinfo( - $_POST['comment'], - $_GET['id'], - $_SESSION['users_uid'], - $_POST['type'], - $_POST['fundraising_campaigns_id'] - )) { - happy_('Activity Logged'); - } else { - error_('Unable to save activity log'); - } - exit; - break; - - case 'newcontactsearch': - if ($_POST['email']) { - $q = $pdo->prepare("SELECT *,MAX(year) FROM users WHERE email=? GROUP BY uid HAVING deleted='no'"); - $q->execute([trim($_POST['email'])]); - } - - if ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo i18n('There is an exact email address match for %1', array($_POST['email'])); - echo ''; - - ?> - - - - prepare("SELECT *,MAX(year) FROM users WHERE '$searchstr' GROUP BY uid HAVING deleted='no'"); - $q->execute(); - $num = $q->rowCount(); - if ($num == 0) { - echo i18n('No existing users match, will create a new user'); - } else if ($num < 15) { - echo i18n('Did you mean one of these existing users? (click to choose one)') . '
'; - echo ''; - } else { - echo i18n('There are %1 existing users that match, please enter more details', array($num)); - } - } - echo '
'; - exit; - break; - case 'donation_add': - $campaignid = intval($_POST['fundraising_campaigns_id']); - $sponsorid = intval($_POST['sponsors_id']); - $goal = $_POST['fundraising_goal']; - $value = intval($_POST['value']); - $supporttype = $_POST['supporttype']; - $datereceived = $_POST['datereceived']; - - if ($goal && $value && $supporttype) { - $q = $pdo->prepare("INSERT INTO fundraising_donations (sponsors_id,fundraising_goal,fundraising_campaigns_id,value,status,probability,fiscalyear,thanked,datereceived,supporttype) VALUES ( - ?, - ?, - ?, - ?, - 'received', - '100', - ?, - 'no', - ?, - ? - )"); - $q->execute([$sponsorid, $goal, $campaignid, $value, $config['FISCALYEAR'], $datereceived, $supporttype]); - $id = $pdo->lastInsertId(); - $logStr = getDonationString($id); - save_activityinfo("Added donation/sponsorship: $logStr", $sponsorid, $_SESSION['users_uid'], 'System'); - show_pdo_errors_if_any($pdo); - - happy_('Donation/sponsorship added'); - } else { - error_('All fields are required'); - } - - exit; - break; - case 'donation_remove': - // function save_activityinfo($comment, $donorId, $userId, $type, $campaign_id=null){ - $id = intval($_POST['id']); - $sponsorid = intval($_POST['sponsors_id']); - if ($logStr = getDonationString($id)) { - save_activityinfo("Removed donation/sponsorship: $logStr", $sponsorid, $_SESSION['users_uid'], 'System'); - happy_('Donation/sponsorship removed'); - $q = $pdo->prepare('DELETE FROM fundraising_donations WHERE id=? AND sponsors_id=?'); - $q->execute([$id, $sponsorid]); - show_pdo_errors_if_any($pdo); - } else { - error_('Invalid donation/sponsorship to remove'); - } - exit; - break; -} - -send_header( - 'Donor/Sponsor Management', - array( - 'Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Fundraising' => 'admin/fundraising.php' - ) -); - -// delete the contact who has been submitted in _POST -function delete_contact() -{ - global $pdo; - if (array_key_exists('userid', $_POST)) { - $uid = $_POST['userid']; - $data = $pdo->prepare("SELECT CONCAT_WS(' ', users.firstname, users.lastname) AS name FROM users WHERE id=?"); - $data->execute([$uid]); - $namedata = $data->fetch(); - $name = trim($namedata['name']); - user_delete($uid, 'sponsor'); - happy_('Deleted contact %1', array($name)); - - // ($comment , $donorId, $userId, $type, $campaign_id=null){ - save_activityinfo("Deleted contact \"$name\"", $_GET['id'], $_SESSION['users_uid'], 'System'); - } -} - -function addexisting_contact() -{ - $uid = intval($_POST['uid']); - $sponsors_id = intval($_POST['id']); - echo "Linking uid=$uid to sponsors_id=$sponsors_id
"; - - $u = []; - - echo "uid $uid has users.id {$u['id']}"; - - $u = user_load_by_uid($uid); - $u['sponsors_id'] = $sponsors_id; - $u['types'][] = 'sponsor'; - user_save($u); - - save_activityinfo('Existing user (' . $u['firstname'] . ' ' . $u['lastname'] . ') linked to donor/sponsor', $sponsors_id, $_SESSION['users_uid'], 'System'); - happy_('Added existing user to donor/sponsor'); -} - -// save the contact info -function save_contact() -{ - global $config, $pdo; - // happy_("happy!"); - if (validate_contactdata()) { - // load or create the user, according to the situation - if ($_POST['recordtype'] == 'new') { - if ($_POST['email']) { - $q = $pdo->prepare("SELECT *,MAX(year) FROM users WHERE email=? GROUP BY uid HAVING deleted='no'"); - $q->execute([trim($_POST['email'])]); - if ($q->rowCount()) { - error_('A user with that email address already exists'); - exit; - } - } - - // this is a new record being submitted. Create the user. - $successMessage = 'Contact created successfully'; - $successLog = 'Added contact '; - $u = user_create('sponsor', $_POST['email']); - $id = $u['id']; - } else if ($_POST['recordtype'] == 'existing') { - // this is an existing record being updated. Load the user. - $successMessage = 'Contact updated successfully'; - $successLog = 'Updated contact '; - - $u = user_load($_POST['userid']); - $id = intval($_POST['userid']); - } - - $sponsor_id = $_POST['sponsor_id']; - $p = ($_POST['primary'] == 'yes') ? 'yes' : 'no'; - if ($p == 'no') { - /* Make sure this sponsor ($sponsor_id) has a primary */ - $query = "SELECT users_id - FROM users_sponsor, users - WHERE - users_sponsor.users_id=users.id - AND sponsors_id=? - AND `primary`='yes' - AND year=? - AND users_id!=?"; - $q = $pdo->prepare($query); - $q->execute([$sponsor_id, $config['FAIRYEAR'], $id]); - if ($q->rowCount() == 0) { - /* This has to be the primary since there isn't one already */ - $p = 'yes'; - } - } else { - /* Unset all other primaries */ - $q = $pdo->prepare("UPDATE users_sponsor SET `primary`='no' - WHERE sponsors_id=? AND users_id !=?"); - $q->execute([$sponsor_id, $id]); - } - - // we now know whether or not they're the primary user. Update them with that, - // along with all of the user info that's been submitted. - $u['primary'] = $p; - $u['salutation'] = $_POST['salutation']; - $u['firstname'] = $_POST['firstname']; - $u['lastname'] = $_POST['lastname']; - $u['position'] = $_POST['position']; - $u['phonework'] = $_POST['phonework']; - $u['phonecell'] = $_POST['phonecell']; - $u['phonehome'] = $_POST['phonehome']; - $u['address'] = $_POST['address']; - $u['address2'] = $_POST['address2']; - $u['city'] = $_POST['city']; - $u['postalcode'] = $_POST['postalcode']; - $u['province'] = $_POST['province_code']; - $u['fax'] = $_POST['fax']; - $u['email'] = $_POST['email']; - $u['notes'] = $_POST['notes']; - $u['sponsors_id'] = $sponsor_id; - user_save($u); - $name = trim($u['firstname'] . ' ' . $u['lastname']); - // ($comment , $donorId, $userId, $type, $campaign_id=null){ - save_activityinfo($successLog . '"' . $name . '"', $sponsor_id, $_SESSION['users_uid'], 'System'); - happy_($successMessage); - } else { - // something's wrong with the user data submitted. Should flag the fields where - // appropriate, but for now just pop up an error - error_('Form not filled out'); - } -} - -// FIXME: dummy filler function for now. Should go through all of the fields -// submitted and validate before hitting the database -function validate_contactdata() -{ - $returnval = true; - if ($_POST['recordtype'] != 'new' && $_POST['recordtype'] != 'existing') { - $returnval = false; - } - - return $returnval; -} - -// draw a group of forms for editing and creating new contacts -function draw_contactsinfo_form($contact = null) -{ - global $config, $pdo; - - // make sure we know what sponsor we're dealing with here - if (!isset($sponsor_id)) { - if ($_GET['id']) - $sponsor_id = $_GET['id']; - else if ($_POST['id']) - $sponsor_id = $_POST['id']; - $buttontext = i18n('Add Contact'); - } - - // start our accordion - echo "
\n"; - - // loop through each contact and draw a form with their data in it. - - $query = $pdo->prepare("SELECT *,MAX(year) FROM users LEFT JOIN users_sponsor ON users_sponsor.users_id=users.id - WHERE - sponsors_id=? - AND types LIKE '%sponsor%' - GROUP BY uid - HAVING deleted='no' - ORDER BY users_sponsor.primary DESC,lastname,firstname - "); - $query->execute([$sponsor_id]); - show_pdo_errors_if_any($pdo); - - while ($contact = $query->fetch()) { - // draw a header for this user - echo '

'; - echo $contact['firstname'] . ' ' . $contact['lastname']; - echo "

\n"; - - // and draw the actual form - echo "
\n"; - draw_contact_form($sponsor_id, $contact); - echo "
\n"; - } - - // draw an empty form in which to enter a new user - echo '

New Contact'; - echo "

\n"; - echo "
\n"; - - // and do the blank one - echo '
'; - draw_contact_form($sponsor_id); - echo "
\n"; - - // and finally end the accordion - echo "
\n"; -} - -// draw a form in which to enter information about the various contacts -function draw_contact_form($sponsor_id, $contact = null) -{ - global $salutations, $config, $pdo; - - // grab the sponsor details, so we can do diff things for individual vs organization - $q = $pdo->prepare('SELECT * FROM sponsors WHERE id=?'); - $q->execute([$sponsor_id]); - $sponsor = $q->fetch(PDO::FETCH_OBJ); - - if ($contact != null) { - $id = $contact['id']; - } else { - $id = 'new'; - if ($sponsor->donortype == 'individual') { - list($firstname, $lastname) = explode(' ', $sponsor->organization, 2); - $contact['firstname'] = $firstname; - $contact['lastname'] = $lastname; - $contact['email'] = $sponsor->email; - $contact['phonehome'] = $sponsor->phone; - } else { - $contact['phonework'] = $sponsor->phone; - } - - $contact['fax'] = $sponsor->fax; - $contact['address'] = $sponsor->address; - $contact['address2'] = $sponsor->address2; - $contact['city'] = $sponsor->city; - $contact['province'] = $sponsor->province_code; - $contact['postalcode'] = $sponsor->postalcode; - } - - echo '
\n"; - echo "\n"; - if ($id == 'new') { - echo "\n"; - $newcontactsearch = 'onkeypress="return newcontactsearch()"'; - $newcontactsave = 'id="contactnewsave"'; - } else { - echo "\n"; - echo '\n"; - } - ?> - - - - - - donortype == 'individual') { - $d = 'disabled="disabled"'; - } else - $d = ''; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - '; - echo ''; - ?> - -
- - value="">
type="text" name="firstname" value=""> type="text" name="lastname" value="">
type="text" name="email" size="60" value="">
- -
- - - '; - if ($id != 'new') - echo ''; - echo '
-
- -
- - - - - - - - - - - - - - - - - - - - - prepare($query); - $q->execute([$sponsorid]); - show_pdo_errors_if_any($pdo); - if ($q->rowCount()) { - while ($r = $q->fetch()) { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo "\n"; - } - } else { - echo ''; - } - ?> - - -
- '; - echo '\n"; - $logtypes = array('Appeal', 'Phone Call', 'Email', 'Personal Visit', 'Other'); - foreach ($logtypes as $lt) { - echo "\n"; - } - echo "\n"; - ?> - - prepare('SELECT * FROM fundraising_campaigns WHERE fiscalyear=? ORDER BY name'); - $q->execute([$config['FISCALYEAR']]); - echo '\n"; - ?> -
' . $r['dt'] . '' . $r['name'] . '' . $r['type'] . '' . $r['campaignname'] . '' . $r['log'] . '
' . i18n('No records') . '
-
-prepare($query); - $q->execute([$donorId, $userId, $comment, $type, $cid]); - show_pdo_errors_if_any($pdo); -} - -function getDonationString($id) -{ - global $config, $pdo; - $q = $pdo->prepare('SELECT fundraising_donations.*, - fundraising_campaigns.name AS campaignname - FROM fundraising_donations - LEFT JOIN fundraising_campaigns ON fundraising_donations.fundraising_campaigns_id=fundraising_campaigns.id - WHERE fundraising_donations.id=? - AND fundraising_donations.fiscalyear=? - '); - $q->execute([$id, $config['FISCALYEAR']]); - show_pdo_errors_if_any($pdo); - $str = ''; - if ($r = $q->fetch(PDO::FETCH_OBJ)) { - $str .= format_date($r->datereceived) . ' - '; - $goal = getGoal($r->fundraising_goal); - if ($goal) { - $str .= i18n('Goal: %1', array($goal->name)); - } else { - $str .= i18n('Goal: none'); - } - $str .= ' - '; - if ($r->campaignname) { - $str .= i18n('Campaign: %1', array($r->campaignname)); - } else { - $str .= i18n('Campaign: none'); - } - $str .= ' - '; - $str .= ' Value: ' . format_money($r->value, false); - } else { - return false; - } - return $str; -} - -?> - -'; -echo ''; -echo "Add New Donor(s)/Sponsor(s)\n"; -echo ''; -echo ''; -echo "View/Modify Donor(s)/Sponsor(s)\n"; -echo ''; -echo ''; -echo '
'; -?> - - - - -
-
- - - \ No newline at end of file diff --git a/admin/donors_search.php b/admin/donors_search.php deleted file mode 100644 index 8d00fa70..00000000 --- a/admin/donors_search.php +++ /dev/null @@ -1,130 +0,0 @@ - - * Copyright (C) 2008 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -\n"; - -// $q=mysql_query("SELECT * FROM award_sponsors WHERE year='".$config['FAIRYEAR']."' ORDER BY organization"); -// we want to show all years, infact that year field probably shouldnt even be there. -$sql = ''; -if (get_value_from_array($_POST, 'search')) - $sql .= " AND organization LIKE '%" . $_POST['search'] . "%' "; - -// NEEDS AN ARRAY AS AN ARGUMENT INSTEAD OF A STRING -if (count(get_value_from_array($_POST, 'donortype', []))) { - $sql .= ' AND (0 '; - foreach ($_POST['donortype'] AS $d) { - $sql .= " OR donortype='$d'"; - } - $sql .= ') '; -} -$query = "SELECT * FROM sponsors WHERE 1 $sql ORDER BY organization"; -// echo "query=$query"; -$q = $pdo->prepare($query); -$q->execute(); -get_value_from_array($_POST, 'donortype'); -$thisyear = $config['FISCALYEAR']; -$lastyear = $config['FISCALYEAR'] - 1; -$rows = array(); - -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $cq = $pdo->prepare("SELECT SUM(value) AS total FROM fundraising_donations WHERE sponsors_id=? AND status='received' AND fiscalyear=?"); - $cq->execute([$r->id,$thisyear]); - $cr = $cq->fetch(PDO::FETCH_OBJ); - $thisyeartotal = $cr->total; - $cq = $pdo->prepare("SELECT SUM(value) AS total FROM fundraising_donations WHERE sponsors_id=? AND status='received' AND fiscalyear=?"); - $cq->execute([$r->id,$lastyear]); - $cr = $cq->fetch(PDO::FETCH_OBJ); - $lastyeartotal = $cr->total; - if ($lastyeartotal) - $change = round(($thisyeartotal - $lastyeartotal) / $lastyeartotal * 100); - else - $change = 'N/A'; - $rows[] = array('id' => $r->id, 'name' => $r->organization, 'thisyeartotal' => $thisyeartotal, 'lastyeartotal' => $lastyeartotal, 'change' => $change); -} -$thisyearsort = array(); -if (!get_value_from_array($_POST, 'order')) { - // if order is not given, lets order by donation amount this year - foreach ($rows AS $key => $val) { - $thisyearsort[$key] = $val['thisyeartotal']; - } - array_multisort($thisyearsort, SORT_DESC, $rows); -} - -if (get_value_from_array($_POST, 'limit')) { - $limit = $_POST['limit']; -} else { - $limit = 10; - echo '

' . i18n('Top 10 donors this year') . '

'; -} - -echo ''; -echo ''; -echo ''; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ''; -echo "\n"; - -$x = 0; -foreach ($rows AS $r) { - echo "\n"; - $eh = "style=\"cursor:pointer;\" onclick=\"open_editor({$r['id']});\""; - echo " \n"; - echo ' \n"; - echo ' \n"; - if (is_numeric($r['change'])) { - $n = $r['change'] / 2 + 50; - if ($n < 0) - $n = 0; - if ($n > 100) - $n = 100; - $col = 'color: ' . colour_to_percent($n); - $sign = '%'; - } else { - $col = ''; - $sign = ''; - } - echo " \n"; - echo "\n"; - - $x++; - if ($x == $limit) - break; -} - -echo "
' . i18n('Donor/Sponsor') . '' . i18n('Total $ this year') . '' . i18n('Total $ last year') . '' . i18n('% change') . '
{$r['name']}'; - echo format_money($r['thisyeartotal']); - echo "'; - echo format_money($r['lastyeartotal']); - echo ""; - echo $r['change'] . $sign; - echo "
\n"; - -?> diff --git a/admin/exhibithall_sa.php b/admin/exhibithall_sa.php deleted file mode 100644 index 4485b706..00000000 --- a/admin/exhibithall_sa.php +++ /dev/null @@ -1,698 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -src */ - $r = deg2rad(-$deg); - return array(round($x * cos($r) - $y * sin($r), 6), round($x * sin($r) + $y * cos($r), 6)); -} - -function point_translate($x, $y, $dx, $dy) -{ - return array($x + $dx, $y + $dy); -} - -function is_point_in_object($x, $y, $o) -{ - /* Translate the point to the object origin */ - list($x, $y) = point_translate($x, $y, -$o['x'], -$o['y']); - /* Rotate the point to the object's frame of reference */ - list($x, $y) = point_rotate($x, $y, -$o['orientation']); - /* Is it within the object now ? */ - if (abs($x) <= $o['w2'] && abs($y) <= $o['h2']) - return true; - return false; -} - -function queue_new() -{ - return array('head' => NULL, 'tail' => NULL); -} - -function grid_path_cmp($a, $b) -{ - /* This must return an integer! Strange-things(tm) happen if it doesn't */ - if ($a['distance'] == $b['distance']) - return 0; - return ($a['distance'] < $b['distance']) ? -1 : 1; -} - -function grid_path_check(&$i_eh, &$queue, &$loc, &$end, $ix, $iy) -{ - $next_loc = &$i_eh[$ix][$iy]; - // TRACE("Checking next loc($ix,$iy) ({$next_loc['x']},{$next_loc['y']})\n"); - - /* Don't revisit anything */ - if ($next_loc['visited'] == true) { - // TRACE(" Already Visited.\n"); - return false; - } - $next_loc['visited'] = true; - - if (count($next_loc['ids']) != 0) { - // TRACE(" Object occupying this gridloc.\n"); - /* There's something here, can't do anything */ - return false; - } - - $next_loc['distance'] = distance($next_loc['x'], $next_loc['y'], $end['x'], $end['y']); - $next_loc['path_length'] = $loc['path_length'] + 1; - // TRACE(" distance={$next_loc['distance']}, path_length={$next_loc['path_length']}\n"); - - /* Add to processing queue in order */ - array_push($queue, $next_loc); -} - -function grid_path($src, $dst) -{ - global $exhibithall; - $i_eh = &$exhibithall[$src['exhibithall_id']]; - $start = &$i_eh[$src['front_grid_ix']][$src['front_grid_iy']]; - $end = &$i_eh[$dst['front_grid_ix']][$dst['front_grid_iy']]; - - // TRACE("Path ({$start['x']},{$start['y']}) -> ({$end['x']},{$end['y']})\n"); - - /* Clean out temp data */ - for ($x = 0; $x < $i_eh['grid_w']; $x++) { - for ($y = 0; $y < $i_eh['grid_h']; $y++) { - $i_eh[$x][$y]['visited'] = false; - } - } - - // print_r($i_eh); - - /* Seed the exploration queue */ - $queue = array(); - $start['distance'] = distance($start['x'], $start['y'], $end['x'], $end['y']); - $start['path_length'] = 0; - $start['visited'] = true; - array_push($queue, $start); - - while (1) { - if (count($queue) == 0) - break; - - // print_r($queue); - /* Dequeue head */ - $loc = array_shift($queue); - - /* Cut it off after a long walk */ - if ($loc['path_length'] > 25) - break; - - // TRACE("Dequeue: ({$loc['x']},{$loc['y']})\n"); - - /* Is this our destionation ? */ - if ($loc['x'] == $end['x'] && $loc['y'] == $end['y']) { - // TRACE("Found destination, path_length={$loc['path_length']}\n"); - return $loc['path_length']; - } - - /* All 4 directions */ - if ($loc['ix'] > 0) - grid_path_check($i_eh, $queue, $loc, $end, $loc['ix'] - 1, $loc['iy']); - if ($loc['ix'] < $i_eh['grid_w'] - 1) - grid_path_check($i_eh, $queue, $loc, $end, $loc['ix'] + 1, $loc['iy']); - if ($loc['iy'] > 0) - grid_path_check($i_eh, $queue, $loc, $end, $loc['ix'], $loc['iy'] - 1); - if ($loc['iy'] < $i_eh['grid_h'] - 1) - grid_path_check($i_eh, $queue, $loc, $end, $loc['ix'], $loc['iy'] + 1); - usort($queue, 'grid_path_cmp'); - } - // TRACE("No path found\n"); - // exit; - return 100; -} - -TRACE("
\n");
-
-/* Load exhibit halls */
-$exhibithall = array();
-$q = $pdo->prepare("SELECT * FROM exhibithall WHERE type='exhibithall'");
-$q->execute();
-TRACE("Loading exhibit halls...\n");
-while (($r = $q->fetch(PDO::FETCH_ASSOC))) {
-	$r['divs'] = unserialize($r['divs']);
-	$r['cats'] = unserialize($r['cats']);
-	$exhibithall[$r['id']] = $r;
-	TRACE("   - {$r['name']}\n");
-}
-
-/* Load objects */
-$objects = array();
-$q = $pdo->prepare("SELECT * FROM exhibithall WHERE type='wall' OR type='project'");
-$q->execute();
-TRACE("Loading objects...\n");
-while (($r = $q->fetch([PDO::FETCH_ASSOC]))) {
-	$r['divs'] = unserialize($r['divs']);
-	$r['cats'] = unserialize($r['cats']);
-	$objects[$r['id']] = $r;
-}
-TRACE(count($objects) . " objects loaded.\n");
-
-/* Compute stuff */
-foreach ($objects as $oid => $o) {
-	$objects[$oid]['w2'] = $o['w'] / 2;
-	$objects[$oid]['h2'] = $o['h'] / 2;
-}
-
-/* The grid size is the smallest object dimension */
-$grid_size = 100;
-foreach ($objects as $oid => $o) {
-	if ($grid_size > $o['w'])
-		$grid_size = $o['w'];
-	if ($grid_size > $o['h'])
-		$grid_size = $o['h'];
-}
-$grid_size /= 2;
-
-TRACE("Grid size: {$grid_size}m\n");
-
-// print_r($exhibithall);
-
-// print_r($objects);
-
-$div = array();
-TRACE("Loading Project Divisions...\n");
-$q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year='{$config['FAIRYEAR']}' ORDER BY id");
-while ($r = $q->fetch(PDO::FETCH_OBJ)) {
-	$divshort[$r->id] = $r->division_shortform;
-	$div[$r->id] = $r->division;
-	TRACE("   {$r->id} - {$div[$r->id]}\n");
-}
-
-TRACE("Loading Project Age Categories...\n");
-$cat = array();
-$q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY id");
-$q->execute([$config['FAIRYEAR']]);
-while ($r = $q->fetch(PDO::FETCH_OBJ)) {
-	$catshort[$r->id] = $r->category_shortform;
-	$cat[$r->id] = $r->category;
-	TRACE("   {$r->id} - {$r->category}\n");
-}
-
-TRACE("Loading Projects...\n");
-$projects = array();
-$q = $pdo->prepare("SELECT projects.* FROM projects, registrations 
-				WHERE
-					projects.year=? 
-					AND registrations.id = projects.registrations_id
-				" . getJudgingEligibilityCode());
-$q->execute([$config['FAIRYEAR']]);
-while ($p = $q->fetch(PDO::FETCH_OBJ)) {
-	$qq = $pdo->prepare("SELECT grade,schools_id FROM students WHERE registrations_id=?");
-	$qq->execute([$p->registrations_id]);
-	$num_students = $qq->rowCouunt();
-	$grade = 0;
-	$schools_id = 0;
-	while ($s = $qq->fetch(PDO::FETCH_ASSOC)) {
-		if ($s['grade'] > $grade) {
-			$grade = $s['grade'];
-			$schools_id = $s['schools_id'];
-		}
-	}
-	$projects[$p->id] = array(
-		'projects_id' => $p->id,
-		'div' => $p->projectdivisions_id,
-		'cat' => $p->projectcategories_id,
-		'grade' => $grade,
-		'schools_id' => $schools_id,
-		'req_electricity' => $p->req_electricity,
-		'projectnumber' => $p->projectnumber,
-		'floornumber' => $p->floornumber,
-		'num_students' => $num_students
-	);
-}
-TRACE(count($projects) . " projects loaded.\n");
-
-if ($action == 'pn') {
-	TRACE("Generating Project Numbers from Floor Locations...\n");
-	foreach ($projects as $p) {
-		$c = $catshort[$p['cat']];
-		$d = $divshort[$p['div']];
-		$n = sprintf('%03d', $p['floornumber']);
-		$pn = "$c $n $d";
-		TRACE("Project {$p['projects_id']} at loc {$p['floornumber']}: $pn\n");
-		$q = $pdo->prepare("UPDATE projects SET projectnumber=? WHERE id=?");
-		$q->execute([$pn,$p['projects_id']]);
-	}
-	TRACE("Done.\n");
-	exit;
-}
-
-/* Assign objects to grid locations */
-foreach ($exhibithall as &$i_eh) {
-	TRACE("Assigning objects to grid locations for {$i_eh['name']}...\n");
-	$ix = 0;
-	$i_eh['grid_w'] = 0;
-	$i_eh['grid_h'] = 0;
-	for ($x = 0; $x <= $i_eh['w']; $x += $grid_size, $ix++) {
-		if ($ix <= $i_eh['grid_w'])
-			$i_eh['grid_w'] = $ix + 1;
-		$iy = 0;
-		for ($y = 0; $y <= $i_eh['h']; $y += $grid_size, $iy++) {
-			if ($iy <= $i_eh['grid_h'])
-				$i_eh['grid_h'] = $iy + 1;
-			/* Initialize element if required */
-			if (!is_array($i_eh[$ix][$iy])) {
-				$i_eh[$ix][$iy] = array('x' => $x, 'ix' => $ix,
-					'y' => $y, 'iy' => $iy,
-					'ids' => array(),
-					'project_front' => 0);
-			}
-
-			/* Scan all objects */
-			foreach ($objects as $oid => $o) {
-				if ($o['exhibithall_id'] != $i_eh['id'])
-					continue;
-				if (is_point_in_object($x, $y, $o)) {
-					$i_eh[$ix][$iy]['ids'][] = $oid;
-				}
-			}
-		}
-	}
-	TRACE("Grid locations: {$i_eh['grid_w']}x{$i_eh['grid_h']}\n");
-}
-TRACE("Done.\n");
-
-function distance($x1, $y1, $x2, $y2)
-{
-	return sqrt(($x1 - $x2) * ($x1 - $x2) + ($y1 - $y2) * ($y1 - $y2));
-}
-
-TRACE("Computing gridlocation of front of projects...\n");
-foreach ($objects as $oid => $o) {
-	if ($o['type'] != 'project')
-		continue;
-
-	/* Get a pointer to the exhibit hall */
-	$i_eh = &$exhibithall[$o['exhibithall_id']];
-
-	/* Compute the xy of the front (that's the bottom edge of the unrotate project) */
-	$fx = 0;
-	$fy = $o['h2'];
-	//	TRACE("Front orig: ($fx,$fy)\n");
-
-	/* Rotate the point */
-	list($fx, $fy) = point_rotate($fx, $fy, $o['orientation']);
-	//	TRACE("Front rotate by {$o['orientation']}: ($fx,$fy) \n");
-	/* Translate it to the proper position of the object */
-	list($fx, $fy) = point_translate($fx, $fy, $o['x'], $o['y']);
-
-	//	TRACE("Front: ($fx,$fy) $grid_size\n");
-	/* Snap to grid offsets */
-	$gx = intval($fx / $grid_size);  // * $grid_size;
-	$gy = intval($fy / $grid_size);  // * $grid_size;
-
-	//	TRACE("Search grid around $gx, $gy\n");
-
-	/*
-	 * Search around that grid for a free spot, closest to $fx,$fy,
-	 * with no objects and no object_front
-	 */
-	$smallest_d = $i_eh['w'];
-	$smallest_ix = 0;
-	$smallest_iy = 0;
-	$found = false;
-	for ($x = $gx - 1; $x <= $gx + 1; $x++) {
-		for ($y = $gy - 1; $y <= $gy + 1; $y++) {
-			//			TRACE("At ($x, $y) :\n");
-			//			print_r($i_eh[$x][$y]);
-			if (count($i_eh[$x][$y]['ids']))
-				continue;
-			if ($i_eh[$x][$y]['project_front'] > 0)
-				continue;
-
-			/* Check distance */
-			$d = distance($i_eh[$x][$y]['x'], $i_eh[$x][$y]['y'], $fx, $fy);
-			if ($d < $smallest_d) {
-				$smallest_d = $d;
-				$smallest_ix = $x;
-				$smallest_iy = $y;
-				$found = true;
-			}
-		}
-	}
-
-	if ($found == false) {
-		echo "ERROR: couldn't find project front for:\n";
-		print_r($o);
-		exit;
-	}
-
-	$i_eh[$smallest_ix][$smallest_iy]['project_front'] = $oid;
-	$objects[$oid]['front_x'] = $fx;
-	$objects[$oid]['front_y'] = $fy;
-	$objects[$oid]['front_grid_ix'] = $smallest_ix;
-	$objects[$oid]['front_grid_iy'] = $smallest_iy;
-}
-TRACE("Done.\n");
-
-switch ($action) {
-	case 'images':
-		exhibithall_images();
-		exit;
-}
-
-/* Compute closest projects to each project */
-$project_distance = 100 / $grid_size;
-foreach ($objects as $oid => $o) {
-	if ($o['type'] != 'project')
-		continue;
-
-	TRACE("Computing paths for {$o['name']}...\n");
-
-	/* Get a pointer to the exhibit hall */
-	$i_eh = &$exhibithall[$o['exhibithall_id']];
-
-	/* Starting grid location */
-	$grid_start = &$i_eh[$o['front_grid_ix']][$o['front_grid_iy']];
-
-	/* Path to all other objects in the same exhibit hall */
-	foreach ($objects as $d_oid => $d_o) {
-		if ($d_oid == $oid)
-			continue;
-		if ($o['exhibithall_id'] != $d_o['exhibithall_id'])
-			continue;
-
-		$d = grid_path($o, $d_o);
-		$objects[$oid]['nearby_projects'][] = array('distance' => $d, 'id' => $d_oid);
-		if ($d < $project_distance)
-			$project_distance = $d;
-	}
-	/* Use the grid_path_cmp to sort the projects based on 'distance' */
-	usort($objects[$oid]['nearby_projects'], 'grid_path_cmp');
-}
-TRACE("Project Distance: {$project_distance} hops\n");
-
-/* Compute project distances */
-foreach ($objects as $oid => $o) {
-	if ($o['type'] != 'project')
-		continue;
-	foreach ($objects[$oid]['nearby_projects'] as &$nearby_project) {
-		$nearby_project['project_distance'] = $nearby_project['distance'] / $project_distance;
-	}
-}
-
-/* Build a list of floor objects for the annealer */
-$floor_objects = array();
-$x = 0;
-foreach ($objects as $oid => $o) {
-	if ($o['type'] != 'project')
-		continue;
-	$objects[$oid]['floor_object_offset'] = $x;  /* The same as the annealer bucket id */
-	$floor_objects[$x++] = &$objects[$oid];
-}
-
-/*
- * Project floor location cost:
- * - Keep divisions together
- * - keep grades together
- * - a project should have one of the same school nearby or adjacent, but not a lot nearby
- */
-function project_cost(&$annealer, $bucket_id, $ids)
-{
-	global $floor_objects, $projects, $exhibithall, $objects;
-	$cost = 0;
-
-	/* Get the floor object */
-	$o = &$floor_objects[$bucket_id];
-
-	/* The exhibit hall */
-	$eh = &$exhibithall[$o['exhibithall_id']];
-
-	if (count($ids) == 0) {
-		//		TRACE("No items in bucket, returning 0.\n");
-		return 0;
-	}
-	if (count($ids) > 1) {
-		echo "More than one item in bucket! Bug somewhere.\n";
-		exit;
-	}
-
-	/* Get the project info */
-	$p = &$projects[$ids[0]];
-
-	$school_match = 0;
-	$div_match = 0;
-	$grade_match = 0;
-
-	$x = 0;
-	//	TRACE("Cost for bucket $bucket_id...\n");
-	$min = $p['grade'];
-	$max = $p['grade'];
-	foreach ($o['nearby_projects'] as &$n) {
-		/* Get the nearby project object */
-		$nearby_o = &$objects[$n['id']];
-
-		//		TRACE("   Scanning nearby location {$n['id']} (distance={$n['distance']})\n");
-		//		print_r($nearby_o);
-
-		$nearby_bucket_id = $nearby_o['floor_object_offset'];
-		$nearby_bkt = &$annealer->bucket[$nearby_bucket_id];
-
-		//		TRACE("      Bucket id: {$nearby_bucket_id} with  ".count($nearby_bkt)." items\n");
-		if (count($nearby_bkt) == 0)
-			continue;
-
-		$nearby_p = &$projects[$nearby_bkt[0]];
-
-		/* Only consider closest 5 projects for school */
-		if ($nearby_p['schools_id'] == $p['schools_id']) {
-			if ($x < 5)
-				$school_match++;
-		}
-
-		/* Closest 5 projects for divs */
-		if ($nearby_p['div'] == $p['div']) {
-			if ($x < 5)
-				$div_match++;
-		}
-
-		/* Closest 10 for grade variance */
-		if ($x < 10) {
-			if ($nearby_p['grade'] < $min)
-				$min = $nearby_p['grade'];
-			if ($nearby_p['grade'] > $max)
-				$max = $nearby_p['grade'];
-		}
-		$x++;
-		if ($x == 10)
-			break;
-	}
-
-	if ($school_match == 0) {
-		//		TRACE("   No school nearby\n");
-		$cost += 5;
-	}
-	if ($school_match > 2) {
-		//		TRACE("   Too many schools bunched up\n");
-		$cost += 2 * ($school_match - 1);
-	}
-
-	if ($div_match < 2) {
-		//		TRACE("   No divs nearby\n");
-		$cost += 20;
-	}
-	if ($div_match > 4) {
-		//		TRACE("   Divs bunching up\n");
-		$cost += 10 * ($div_match - 4);
-	}
-
-	if ($max - $min > 0) {
-		/* Don't want bunching up grades eitehr */
-		//		TRACE("   Grades too spread out\n");
-		$cost += 50 * ($max - $min);
-	}
-
-	/* Make sure this project is allowed in this exhibit hall */
-	if (!in_array($p['div'], $eh['divs']))
-		$cost += 1000;
-	if (!in_array($p['cat'], $eh['cats']))
-		$cost += 1000;
-
-	/* Make sure this project is allowed in this floor object too */
-	if (count($o['divs']) > 0 && !in_array($p['div'], $o['divs']))
-		$cost += 1000;
-	if (count($o['cats']) > 0 && !in_array($p['cat'], $o['cats']))
-		$cost += 1000;
-
-	/* Match electricity */
-	if ($p['req_electricity'] == 'yes' && $o['has_electricity'] == 'no') {
-		$cost += 1000;
-	}
-
-	//	TRACE("Cost for bucket $bucket_id = $cost\n");
-	return $cost;
-}
-
-function project_bucket_ids($annealer, $bucket_id)
-{
-	global $floor_objects, $objects;
-	$recompute_ids = array($bucket_id);
-
-	/* Get the floor object */
-	$o = &$floor_objects[$bucket_id];
-
-	/* Find the 10 closest projects */
-	$x = 0;
-	foreach ($o['nearby_projects'] as &$n) {
-		$nearby_o = &$objects[$n['id']];
-		$recompute_ids[] = $nearby_o['floor_object_offset'];
-		$x++;
-		if ($x == 15)
-			break;
-	}
-	return $recompute_ids;
-}
-
-$e = 10 * ($config['effort'] / 1000) * pow(count($projects), 1.3333);
-$project_ids = array_keys($projects);
-
-// array_splice($project_ids, 20);
-
-$a = new annealer(count($floor_objects), 125, $e, 0.9,
-	project_cost, $project_ids);
-$a->set_max_items_per_bucket(1);
-// $a->set_delta_cost_bucket_ids_callback(project_bucket_ids);
-$a->anneal();
-
-for ($x = 0; $x < $a->num_buckets; $x++) {
-	$bkt = $a->bucket[$x];
-	if (count($bkt) > 1) {
-		TRACE("Assigned more than one project to bucket $x\n");
-		exit;
-	}
-	if (count($bkt) == 0)
-		continue;
-
-	/* Get the project id in this bucket */
-	$projects_id = array_shift($bkt);
-	echo "p:$projects_id, n:{$floor_objects[$x]['floornumber']}\n";
-	/* Get the floor object for the same bucket and floor number */
-	$projects[$projects_id]['floornumber'] = $floor_objects[$x]['floornumber'];
-}
-
-print_r($projects);
-
-/* Assign floor numbers */
-$q = $pdo->prepare("UPDATE projects SET floornumber=0 WHERE year=?");
-$q->execute([$config['FAIRYEAR']]);
-
-foreach ($projects as $pid => $p) {
-	$q = $pdo->prepare("UPDATE projects SET floornumber=? WHERE id=?");
-	$q->execute([$p['floornumber'],$pid]);
-	TRACE("Project $pid => Floor number {$p['floornumber']}\n");
-}
-
-TRACE('
'); - -function exhibithall_images() -{ - global $exhibithall, $objects, $projects; - - /* Assign project IDs to objects */ - foreach ($objects as $oid => $o) { - foreach ($projects as $pid => $p) { - if ($p['floornumber'] == $o['floornumber']) { - $objects[$oid]['projects_id'] = $pid; - break; - } - } - } - - foreach ($exhibithall as &$i_eh) { - $i = imagecreatetruecolor($i_eh['w'] * 100, $i_eh['h'] * 100); - $c_grey = imagecolorallocate($i, 128, 128, 128); - $c_white = imagecolorallocate($i, 255, 255, 255); - $c_black = imagecolorallocate($i, 0, 0, 0); - - // Fill the background with the color selected above. - imagefill($i, 0, 0, $c_white); - imagerectangle($i, 0, 0, $i_eh['w'] * 100 - 1, $i_eh['h'] * 100 - 1, $c_black); - - for ($ix = 0; $ix <= $i_eh['grid_w']; $ix++) { - for ($iy = 0; $iy <= $i_eh['grid_h']; $iy++) { - $l = $i_eh[$ix][$iy]; - if (count($l['ids']) > 0) { - imageellipse($i, $l['x'] * 100, $l['y'] * 100, 1, 1, $c_black); - } else { - imageellipse($i, $l['x'] * 100, $l['y'] * 100, 1, 1, $c_grey); - } - } - } - foreach ($objects as $oid => $o) { - if ($o['exhibithall_id'] != $i_eh['id']) - continue; - - list($x1, $y1) = point_rotate(-$o['w2'], -$o['h2'], $o['orientation']); - list($x2, $y2) = point_rotate($o['w2'], $o['h2'], $o['orientation']); - imagerectangle($i, ($o['x'] + $x1) * 100, ($o['y'] + $y1) * 100, ($o['x'] + $x2) * 100, ($o['y'] + $y2) * 100, $c_black); - - $p = $projects[$o['projects_id']]; - imagestring($i, 4, $o['x'] * 100 - 30, $o['y'] * 100 - 35, "{$o['floornumber']} ({$p['projects_id']})", $c_black); - imagestring($i, 4, $o['x'] * 100 - 30, $o['y'] * 100 - 20, "gr:{$p['grade']} ", $c_black); - $d = $divshort[$p['div']]; - imagestring($i, 4, $o['x'] * 100 - 30, $o['y'] * 100 - 5, "d:$d ({$p['div']})", $c_black); - imagestring($i, 4, $o['x'] * 100 - 30, $o['y'] * 100 + 10, "s:{$p['schools_id']}", $c_black); - imagestring($i, 4, $o['x'] * 100 - 30, $o['y'] * 100 + 25, "e:{$p['req_electricity']}", $c_black); - } - - imagepng($i, "./eh-{$i_eh['id']}.png"); - } -} - -?> diff --git a/admin/export_checkin.php b/admin/export_checkin.php deleted file mode 100644 index 77d18a14..00000000 --- a/admin/export_checkin.php +++ /dev/null @@ -1,115 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT * FROM projectcategories WHERE year=? AND id=?"); -$catq->execute([$config['FAIRYEAR'],$_GET['cat']]); -if ($catr = $catq->fetch(PDO::FETCH_OBJ)) { - $pdf = new lpdf(i18n($config['fairname']), - i18n('Checkin List') . ' - ' . i18n($catr->category), - $_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'); - - $pdf->newPage(); - $pdf->setFontSize(11); - $q = $pdo->prepare("SELECT registrations.id AS reg_id, - registrations.num AS reg_num, - registrations.status, - projects.title, - projects.projectnumber, - projects.projectdivisions_id - FROM - registrations - left outer join projects on projects.registrations_id=registrations.id - WHERE - registrations.year=? - AND ( registrations.status='complete' OR registrations.status='paymentpending' ) - AND projects.projectcategories_id=? - ORDER BY - projects.title - "); - $q->execute([$config['FAIRYEAR'],$catr->id]); - show_pdo_errors_if_any($pdo); - - $table = array(); - - // only show the 'paid' column if the regfee > 0. if registration is fee, then we dont care about the 'paid' column! - if ($config['regfee'] > 0) { - $table['header'] = array(i18n('Paid?'), i18n('Proj #'), i18n('Project Title'), i18n('Student(s)'), i18n('Div')); - $table['widths'] = array(0.5, 0.6, 3.5, 2.4, 0.5); - $table['dataalign'] = array('center', 'left', 'left', 'left', 'center'); - } else { - $table['header'] = array(i18n('Proj #'), i18n('Project Title'), i18n('Student(s)'), i18n('Div')); - $table['widths'] = array(0.6, 3.7, 2.7, 0.5); - $table['dataalign'] = array('left', 'left', 'left', 'center'); - } - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $divq = $pdo->prepare("SELECT division,division_shortform FROM projectdivisions WHERE year=? AND id=?"); - $divq->execute([$config['FAIRYEAR'],$r->projectdivisions_id]); - $divr = $divq->fetch(PDO::FETCH_OBJ); - - $sq = $pdo->prepare("SELECT students.firstname, - students.lastname - FROM - students - WHERE - students.registrations_id=? - "); - $sq->execute([$r->reg_id]); - - $students = ''; - $studnum = 0; - while ($studentinfo = $sq->fetch(PDO::FETCH_OBJ)) { - if ($studnum > 0) - $students .= ', '; - $students .= "$studentinfo->firstname $studentinfo->lastname"; - $studnum++; - } - - // only show the paid column if regfee >0 - if ($config['regfee'] > 0) { - switch ($r->status) { - case 'paymentpending': - $status_text = 'No'; - break; - case 'complete': - $status_text = ''; - break; - } - $status_text = i18n($status_text); - - $table['data'][] = array($status_text, $r->proj_num, $r->title, $students, i18n($divr->division_shortform)); - } else - $table['data'][] = array($r->projectnumber, $r->title, $students, i18n($divr->division_shortform)); - } - - $pdf->addTable($table); - - $pdf->output(); -} -?> diff --git a/admin/fair_stats.php b/admin/fair_stats.php deleted file mode 100644 index 7e88994d..00000000 --- a/admin/fair_stats.php +++ /dev/null @@ -1,536 +0,0 @@ - - * Copyright (C) 2009 David Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT id FROM fairs WHERE abbrv='YSC'"); - $q->execute(); - $r = $q->fetch(PDO::FETCH_ASSOC); - $_GET['id'] = $r['id']; -} - -function stats_to_ysc($fair, $stats) -{ - if ($fair['type'] == 'ysc') { - /* Map data into YSC tags */ - $y = array(); - $y['numschoolstotal'] = $stats['schools_total']; - $y['numschoolsactive'] = $stats['schools_active']; - $y['numstudents'] = $stats['students_total']; - $y['numk6m'] = $stats['male_1'] + $stats['male_4']; - $y['numk6f'] = $stats['female_1'] + $stats['female_4']; - $y['num78m'] = $stats['male_7']; - $y['num78f'] = $stats['female_7']; - $y['num910m'] = $stats['male_9']; - $y['num910f'] = $stats['female_9']; - $y['num11upm'] = $stats['male_11']; - $y['num11upf'] = $stats['female_11']; - $y['projk6'] = $stats['projects_1'] + $stats['projects_4']; - $y['proj78'] = $stats['projects_7']; - $y['proj910'] = $stats['projects_9']; - $y['proj11up'] = $stats['projects_11']; - $y['committee'] = $stats['committee_members']; - $y['judges'] = $stats['judges']; - return $y; - } - return $stats; -} - -send_header('Upload Fair Statistics and Information', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'fair_stats'); -echo '
'; - -/* SFIAB config options server side */ -$server_config = array(); -$server_config['participation'] = false; -$server_config['schools_ext'] = false; -$server_config['minorities'] = false; -$server_config['guests'] = false; -$server_config['sffbc_misc'] = false; -$server_config['info'] = false; -$server_config['next_chair'] = false; -$server_config['scholarships'] = false; -$server_config['delegates'] = false; - -if (get_value_from_array($_GET, 'year')) - $year = intval(get_value_from_array($_GET, 'year')); -else - $year = $config['FAIRYEAR']; - -if (get_value_from_array($_GET, 'id')) - $fairs_id = intval($_GET['id']); -else if (get_value_from_array($_POST, 'id')) - $fairs_id = intval($_POST['id']); -else - $fairs_id = -1; - -if ($fairs_id != -1) { - $q = $pdo->prepare("SELECT * FROM fairs WHERE id=?"); - $q->execute([$fairs_id]); - $fair = $q->fetch(PDO::FETCH_ASSOC); -} - -$action = get_value_from_array($_POST, 'action'); - -if ($action == 'sendstats') { - foreach (array_keys($stats_data) as $k) { - $stats[$k] = get_value_from_array($_POST, $k); - } - $stats['year'] = $year; - if ($fair['type'] == 'ysc') { - $st = stats_to_ysc($fair, $stats); - $req = array('affiliation' => array( - 'ysf_region_id' => $fair['username'], - 'ysf_region_password' => $fair['password'], - 'year' => $year, - 'stats' => $st - )); - } else { - $req = array('stats' => $stats); - } - - if (function_exists('curl_init')) { - $r = curl_query($fair, $req, - 'https://secure.ysf-fsj.ca/registration/xmlaffiliation.php'); - if ($r['error'] == 0) - echo happy(i18n('The %1 Server said:', array($fair['name'])) . ' ' . $r['message']); - else - echo error(i18n('The %1 Server said:', array($fair['name'])) . ' ' . $r['message']); - // $fairs_id = -1; - // $year = $config['FAIRYEAR']; - } else { - echo error('CURL Support Missing'); - echo i18n('Your PHP installation does not support CURL. You will need to login to the YSC system as the regional coodinator and upload the XML data manually'); - send_footer(); - exit; - } -} - -global $PHPSELF; -echo "
"; -$q = $pdo->prepare("SELECT * FROM fairs WHERE `type`='sfiab' OR `type`='ysc' AND enable_stats='yes'"); -$q->execute(); -echo '\n"; - -$q = $pdo->prepare('SELECT DISTINCT(year) AS year FROM config WHERE year>0 ORDER BY year'); -$q->execute(); -echo '\n"; -echo ''; -echo '
'; -echo '
'; -echo '
'; - -if ($fairs_id == -1) { - echo i18n('Statistics will be shown below this line before being sent. Please select a destination and year first.'); - /* Wait for them to select somethign before generating stats */ - send_footer(); - exit; -} - -$ok = true; -if (trim($fair['username']) == '') { - echo error(i18n('You have not yet specified a username for this server. Go to the Science Fair Management page to set it')); - $ok = false; -} -if (trim($fair['password']) == '') { - echo error(i18n('You have not yet specified a password for this server. Go to the Science Fair Management page to set it')); - $ok = false; -} - -if ($fair['type'] == 'ysc') { - $data['statconfig'] = array('participation'); -} else { - echo notice(i18n('Getting stats request and downloading existing stats from server %1', array($fair['url']))); - /* Query the server to see what stats we need */ - $q = array('getstats' => array('year' => $year)); - - $data = curl_query($fair, $q); - - if ($data['error'] != 0) { - echo error("Server said: {$data['message']}
"); - send_footer(); - exit; - } - echo notice(i18n('Server said: Success')); -} -echo '
'; -echo i18n('This server has requested the following stats for your %1 fair:', array($year)); -echo '

'; - -foreach ($data['statconfig'] as $k) { - $server_config[$k] = true; -} - -/* Gather all stats, then we'll decide what to send */ -$stats = array(); -$stats['year'] = $year; - -/* Now, overwrite all the stats with what we pulled down from the server */ -if (is_array(get_value_from_array($data, 'stats'))) { - foreach ($data['stats'] as $k => $v) { - $stats[$k] = $v; - } -} -// print_r($data['stats'][0]); - -/* And now, overwrite all the stuff we pulled down with stats we can compute */ - -// number of schools -$q = $pdo->prepare("SELECT COUNT(id) AS num FROM schools WHERE year=?"); -$q->execute([$year]); -$r = $q->fetch(PDO::FETCH_OBJ); -$stats['schools_total'] = $r->num; - -// number of schools participating -$q = $pdo->prepare("SELECT DISTINCT(students.schools_id) AS sid, schools.* - \t\t \tFROM students - LEFT JOIN registrations ON students.registrations_id=registrations.id - LEFT JOIN schools ON students.schools_id=schools.id - WHERE students.year=? - AND registrations.year=? - AND (registrations.status='complete' OR registrations.status='paymentpending')"); -$q->execute([$year,$year]); -$stats['schools_active'] = $q->rowCount(); -$stats['schools_public'] = 0; -$stats['schools_private'] = 0; -$stats['schools_atrisk'] = 0; -$districts = array(); -while ($si = $q->fetch(PDO::FETCH_ASSOC)) { - if ($si['designate'] == 'public') - $stats['schools_public']++; - if ($si['designate'] == 'independent') - $stats['schools_private']++; - if ($si['atrisk'] == 'yes') - $stats['schools_atrisk']++; - $bd = $si['board'] . '~' . $si['district']; - if (!in_array($bd, $districts)) - $districts[] = $bd; -} -$stats['schools_districts'] = count($districts); - -// numbers of students: -$q = $pdo->prepare("SELECT students.*,schools.* -\t \t\tFROM students - LEFT JOIN registrations ON students.registrations_id=registrations.id - LEFT JOIN schools on students.schools_id=schools.id - WHERE students.year=? - AND registrations.year=? - AND (registrations.status='complete' OR registrations.status='paymentpending')"); -$q->execute([$year,$year]); -show_pdo_errors_if_any($pdo); -$stats['students_total'] = $q->rowCount(); -$stats['students_public'] = 0; -$stats['students_private'] = 0; -$stats['students_atrisk'] = 0; -$grademap = array(1 => 1, 2 => 1, 3 => 1, 4 => 4, 5 => 4, 6 => 4, 7 => 7, 8 => 7, - 9 => 9, 10 => 9, 11 => 11, 12 => 11, 13 => 11); -foreach ($grademap as $k => $g) { - $stats["male_$g"] = 0; - $stats["female_$g"] = 0; - $stats["projects_$g"] = 0; -} -$unknown = array(); -while ($s = $q->fetch(PDO::FETCH_ASSOC)) { - if (!in_array($s['sex'], array('male', 'female'))) - $unknown[$grademap[$s['grade']]]++; - else - $stats["{$s['sex']}_{$grademap[$s['grade']]}"]++; - - if ($s['designate'] == 'public') - $stats['students_public']++; - if ($s['designate'] == 'independent') - $stats['students_private']++; - if ($s['atrisk'] == 'yes') - $stats['students_atrisk']++; -} - -foreach ($unknown as $g => $a) { - $m = round($a / 2); - $f = $a - $m; - $stats["male_$g"] += $m; - $stats["female_$g"] += $f; -} - -// projects -$q = $pdo->prepare("SELECT MAX(students.grade) AS grade FROM students -\t \t\tLEFT JOIN registrations ON students.registrations_id=registrations.id - LEFT JOIN projects ON projects.registrations_id=registrations.id - WHERE students.year=? - AND registrations.year=? - AND projects.year=? - AND (registrations.status='complete' OR registrations.status='paymentpending') - GROUP BY projects.id"); -$q->execute([$year,$year,$year]); -show_pdo_errors_if_any($pdo); -while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $stats["projects_{$grademap[$r['grade']]}"]++; -} - -$q = $pdo->prepare("SELECT COUNT(id) AS num FROM users - \t\t\t\tLEFT JOIN users_committee ON users_committee.users_id=users.id -\t \t\tWHERE types LIKE '%committee%' - AND year=? - AND users_committee.committee_active='yes' - AND deleted='no'"); -$q->execute([$year]); -$r = $q->fetch(PDO::FETCH_OBJ); -$stats['committee_members'] = $r->num; - -$q = $pdo->prepare("SELECT COUNT(id) AS num FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id - \t\t\t\t\tWHERE users.year=? - AND users.types LIKE '%judge%' - AND users.deleted='no' - AND users_judge.judge_complete='yes' - AND users_judge.judge_active='yes'"); -$q->execute([$year]); -$r = $q->fetch(PDO::FETCH_OBJ); -$stats['judges'] = $r->num; - -/* All stats have been gathered, print them */ - -/* Print all blocks the server requests */ -echo "
"; -echo ''; - -if ($server_config['info']) { - echo '

' . i18n('%1 Fair information', array($year)) . '

'; - echo ''; - echo ''; - echo ""; - echo ''; - echo ""; - echo ''; - echo ''; - echo ''; - echo ""; - echo ''; - echo ''; - echo ''; - echo ""; - echo '
' . i18n('Fair Start Date') . ':(YYYY-MM-DD)
' . i18n('Fair End Date') . ':(YYYY-MM-DD)
' . i18n('Fair Location/Address') . ':
' . i18n('Fair Budget') . ':\$
' . i18n('Youth Science Canada Affiliation Complete') . '?
' . i18n('Charity Number or Information') . '?
'; - echo '
'; - echo '
'; -} - -if ($server_config['next_chair']) { - echo '

' . i18n('%1 - %2 Chairperson (if known)', array($year, $year + 1)) . '

'; - echo ''; - echo ''; - echo ""; - echo ''; - echo ""; - echo ''; - echo ""; - echo ''; - echo ""; - echo ''; - echo ""; - echo ''; - - echo '
' . i18n('Name') . ': ' . i18n('Email') . ':
' . i18n('Tel. Bus') . ': ' . i18n('Tel. Home') . ':
' . i18n('Fax') . ':
'; - echo '

'; -} - -if ($server_config['delegates']) { - echo '

' . i18n('%1 CWSF Delegates and Alternatives', array($year)) . '

'; - echo ''; - echo ''; - for ($x = 1; $x <= 3; $x++) { - $sizes = array('small' => 'Small', 'medium' => 'Medium', 'large' => 'Large', 'xlarge' => 'X-Large'); - echo ""; - echo ""; - echo "'; - } - echo '
' . i18n('Delegate Name(s)') . '' . i18n('Email') . '' . i18n('Jacket Size') . '
'; - echo i18n('Remember, the jackets fit smaller than normal sizes.'); - echo '

'; -} - -if ($server_config['scholarships']) { - echo '

' . i18n('%1 Scholarships', array($year)) . '

'; - echo 'How many university/college scholarships are available at your fair? (use a format like:
6 - University of British Columbia - Entrance Scholarships
'; - echo ''; - echo '

'; -} - -if ($server_config['participation']) { - $rangemap = array(1 => '1-3', 4 => '4-6', 7 => '7-8', 9 => '9-10', 11 => '11-12'); - echo '

' . i18n('%1 Fair participation', array($year)) . '

'; - echo '
'; - echo i18n('Number of students') . ": {$stats['students_total']}"; - echo ''; - echo ''; - foreach ($rangemap as $k => $v) - echo ""; - echo ''; - echo ''; - foreach ($rangemap as $k => $v) - echo ""; - echo ''; - echo ''; - foreach ($rangemap as $k => $v) - echo ""; - echo ''; - echo ''; - foreach ($rangemap as $k => $v) - echo ""; - echo ''; - echo '
' . i18n('Grade') . '
$v
' . i18n('Male') . '{$stats["male_$k"]}
' . i18n('Female') . '{$stats["female_$k"]}
' . i18n('Projects') . '{$stats["projects_$k"]}
'; - echo '
'; - echo i18n('Number of schools') . ": {$stats['schools_total']}"; - echo '
'; - echo i18n('Number of active schools') . ": {$stats['schools_active']}"; - echo '
'; - echo '
'; - echo i18n("Number of committee members: %1 (note: this is number of committee members who logged in to SFIAB for the year, anyone who was active but didn't log in to SFIAB will NOT be counted)", array($stats['committee_members'])); - echo '
'; - echo i18n('Number of judges') . ": {$stats['judges']}"; - echo '
'; - echo '
'; - echo '
'; -} - -if ($server_config['schools_ext']) { - echo '

' . i18n('%1 Extended School/Participant data', array($year)) . '

'; - echo '
'; - echo i18n('Public schools: %1 (%2 students).', array( - $stats['schools_public'], $stats['students_public'] - )); - echo '
'; - echo i18n('Private/Independent schools: %1 (%2 students).', array( - $stats['schools_private'], $stats['students_private'] - )); - echo '
'; - echo i18n('At-risk/inner city schools: %1 (%2 students).', array( - $stats['schools_atrisk'], $stats['students_atrisk'] - )); - echo '
'; - echo i18n('Number of school boards/distrcits: %1', array( - $stats['schools_districts'] - )); - echo '
'; - echo '
'; - echo '
'; -} -if ($server_config['minorities']) { - echo '

' . i18n('%1 Data on minority groups', array($year)) . '

'; - echo '
'; - echo ''; - echo ''; - echo '
' . i18n('Number of First Nations students'); - echo ": "; - echo '
'; - echo '
'; - echo '
'; -} -if ($server_config['guests']) { - echo '

' . i18n('%1 Guests visiting the fair', array($year)) . '

'; - echo '
'; - echo ''; - echo ''; - echo ''; - echo '
' . i18n('Number of Students that visited the fair (tours, etc.)'); - echo ": "; - echo '
' . i18n('Number of Public Guests that visited the fair'); - echo ": "; - echo '
'; - echo '
'; - echo '
'; -} - -if ($server_config['sffbc_misc']) { - echo '

' . i18n('%1 Misc. SFFBC Questions', array($year)) . '

'; - echo '
'; - echo ''; - echo ''; - echo ''; - echo ''; - echo '
' . i18n('Number of Teachers supporting student projects'); - echo ": "; - echo '
' . i18n('Number of Students indicating increased interest in science & technology'); - echo ": "; - echo '
' . i18n('Number of Students considering careers in science & technology'); - echo ": "; - echo '
'; - echo '
'; - echo '
'; -} -$keys = array_keys($stats_data); -foreach ($keys as $k) { - if (isset($stats_data[$k]['manual']) && $stats_data[$k]['manual'] == true) - continue; - echo ""; -} - -$d = ($ok == true) ? '' : 'disabled="disabled"'; -echo '"; -echo '
'; -echo '
'; -echo '
'; - -debug_('Fair Info: ' . print_r($fair, true)); -debug_('Server Config: ' . print_r($server_config, true)); -debug_('Stats: ' . print_r($stats, true)); - -send_footer(); -?> diff --git a/admin/fair_stats_select.php b/admin/fair_stats_select.php deleted file mode 100644 index 3be42ac5..00000000 --- a/admin/fair_stats_select.php +++ /dev/null @@ -1,111 +0,0 @@ - - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation, version 2. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ -?> - 'Feeder Fair', 'sfiab' => 'SFIAB Upstream', 'ysc' => 'YSC/CWSF Upstream'); - $stats = array('participation' => 'Particpation Numbers', - 'schools_ext' => 'Extra school participation data, number of public/private school students', - 'minorities' => 'Data on minority group participation', - 'guests' => 'Number of student, public guests', - 'sffbc_misc' => 'Number of teachers supporting science, number of students interested in careers in science', - 'info' => 'Fair address, dates, budget, charity info', - 'next_chair' => 'The chair of the regional fair next year', - 'scholarships' => 'Information about scholarships available to be won', - 'delegates' => 'Delegate information/jacket size for CWSF', - ); - - user_auth_required('committee', 'admin'); - - - switch($_GET['action']) { - case 'save': - print_r($_POST); - $id = intval($_POST['fairs_id']); - if(!is_array($_POST['stats'])) $_POST['stats'] = array(); - foreach($_POST['stats'] as $k=>$s) { - if(!array_key_exists($s, $stats)) { - echo "Undefined stat $s, abort.\n"; - exit; - } - } - $s = join(',', $_POST['stats']); - $q = $pdo->prepare("UPDATE fairs SET gather_stats=? WHERE id=?"); - $q->execute([$s,$id]); - show_pdo_errors_if_any($pdo); - echo "UPDATE fairs SET gather_stats='$s' WHERE id='$id'"; - happy_("Saved"); - exit; - - } - /* Load the user we're editting */ - $u = user_load($_SESSION['embed_edit_id']); - /* Load the fair attached to the user */ - $q = $pdo->prepare("SELECT * FROM fairs WHERE id=?"); - $q->execute([$u['fairs_id']]); - $f = $q->fetch(PDO::FETCH_ASSOC); - -?> - -

- - - -'.i18n('Select which statistics to request from the feeder fair').'

'; - } else { - echo '

'.i18n('Not supported for upstream fairs').'

'; - exit; - } - -?> -
- - -$d) { - $ch = in_array($s, $selected_stats) ? 'checked="checked"' : ''; - echo ""; - echo ""; - } -?> - -
".i18n($d)."
-
- -
- - - diff --git a/admin/fix_judges_autocomplete.php b/admin/fix_judges_autocomplete.php deleted file mode 100644 index 91a839ac..00000000 --- a/admin/fix_judges_autocomplete.php +++ /dev/null @@ -1,26 +0,0 @@ -prepare('SELECT * FROM judges WHERE passwordexpiry IS NULL'); -$q->execute(); -while ($i = $q->fetch(PDO::FETCH_OBJ)) { - echo "Autocompleting Judge {$i->email}
"; - $id = $i->id; - - $p = password_hash(generatePassword(), PASSWORD_BCRYPT); - $stmt = $pdo->prepare("UPDATE judges SET password=?,complete=?"); - $stmt->execute([$p, 'yes']); - show_pdo_errors_if_any($pdo); - $stmt = $pdo->prepare("DELETE FROM judges_years WHERE judges_id=?"); - $stmt->execute([$id]); - show_pdo_errors_if_any($pdo); - $stmt = $pdo->prepare("INSERT INTO judges_years (`judges_id`,`year`) VALUES (?, ?)"); - $stmt->execute([$id, $config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); -} - -?> diff --git a/admin/fundraising.php b/admin/fundraising.php deleted file mode 100644 index 9c881115..00000000 --- a/admin/fundraising.php +++ /dev/null @@ -1,323 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - - -

-prepare("SELECT * FROM fundraising_goals WHERE fiscalyear=? ORDER BY deadline"); - $q->execute([$config['FISCALYEAR']]); -?> - - - - - - - - - - - fetch(PDO::FETCH_OBJ)) { - // lookup all donations made towards this goal - $recq = $pdo->prepare("SELECT SUM(value) AS received FROM fundraising_donations WHERE fundraising_goal=? AND fiscalyear=? AND status='received'"); - $recq->execute([$r->goal,$config['FISCALYEAR']]); - show_pdo_errors_if_any($pdo); - $recr = $recq->fetch(PDO::FETCH_OBJ); - $received = $recr->received; - if ($r->budget) - $percent = round($received / $r->budget * 100, 1); - else - $percent = 0; - - echo ""; - echo ''; - echo ''; - $col = colour_to_percent($percent); - echo ""; - echo '\n"; - } -?> -
$r->name' . format_money($r->budget, false) . '' . format_money($received, false) . '{$percent}%' . format_date($r->deadline) . "
-
- -

- - - - - - - - - - - - - -prepare("SELECT * FROM fundraising_campaigns WHERE fiscalyear=?"); - $q->execute([$config['FISCALYEAR']]); - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $goalq = $pdo->prepare("SELECT * FROM fundraising_goals WHERE goal=? AND fiscalyear=?"); - $goalq->execute([$r->fundraising_goal,$config['FISCALYEAR']]); - $goalr = $goalq->fetch(PDO::FETCH_OBJ); - $recq = $pdo->prepare("SELECT SUM(value) AS received FROM fundraising_donations WHERE fundraising_campaigns_id=? AND fiscalyear=? AND status='received'"); - $recq->execute([$r->id,$config['FISCALYEAR']]); - show_pdo_errors_if_any($pdo); - $recr = $recq->fetch(PDO::FETCH_OBJ); - $received = $recr->received; - if ($r->target) - $percent = round($received / $r->target * 100, 1); - else - $percent = 0; - $col = colour_to_percent($percent); - - if (!$goalr) { - $goalr = new stdClass(); - $goalr->name = ''; - } - - echo "id'\">\n"; - echo " \n"; - echo " \n"; - echo ' \n"; - echo ' '; - echo ' \n"; - echo ' \n"; - echo " \n"; - echo " "; - echo "\n"; - } -?> - -
$r->name$r->type' . format_date($r->startdate) . "' . format_date($r->enddate) . '' . format_money($r->target, false) . "' . format_money($received, false) . "{$percent}%$goalr->name
- -
- -
-

-

-prepare("SELECT id,value, thanked, status, sponsors_id, datereceived, -\tDATE_ADD(datereceived, INTERVAL 1 MONTH) < NOW() AS onemonth, -\tDATE_ADD(datereceived, INTERVAL 2 MONTH) < NOW() AS twomonth - FROM fundraising_donations - WHERE thanked='no' AND status='received' - AND fiscalyear=? - ORDER BY datereceived - "); - $q->execute([$config['FISCALYEAR']]); - show_pdo_errors_if_any($pdo); - - if ($q->rowCount()) { - echo ''; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo "\n"; - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $dq = $pdo->prepare("SELECT organization AS name FROM sponsors WHERE id=?"); - $dq->execute([$r->sponsors_id]); - $dr = $dq->fetch(PDO::FETCH_OBJ); - if ($r->twomonth) - $s = 'style="background-color: ' . colour_to_percent(0) . ';"'; - else if ($r->onemonth) - $s = 'style="background-color: ' . colour_to_percent(50) . ';"'; - else - $s = ''; - - $u = getUserForSponsor($r->sponsors_id); - - echo ""; - echo " "; - echo ' '; - echo ' '; - echo ' '; - } else { - echo i18n('No contact'); - } - echo "\n"; - echo "\n"; - } - echo "
' . i18n('Name') . "' . i18n('Date Received') . "' . i18n('Amount') . "' . i18n('Generate Thank You') . "' . i18n('Thanked') . "
$dr->name' . format_date($r->datereceived) . '' . format_money($r->value) . ''; - if ($u) { - echo "" . i18n('Generate Thank You') . 'id\" onclick=\"return thanked($r->id)\">
\n"; - } else { - echo i18n("No Thank You's pending"); - echo "
\n"; - } -?> -
- -
-

-prepare("SELECT value, receiptrequired, receiptsent, status, sponsors_id, datereceived, -\tDATE_ADD(datereceived, INTERVAL 1 MONTH) < NOW() AS onemonth, -\tDATE_ADD(datereceived, INTERVAL 2 MONTH) < NOW() AS twomonth - FROM fundraising_donations - WHERE (receiptrequired='yes' AND receiptsent='no') AND status='received' - AND fiscalyear=? - ORDER BY datereceived - "); - $q->execute([$config['FISCALYEAR']]); - show_pdo_errors_if_any($pdo); - if ($q->rowCount()) { - echo ''; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo "\n"; - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $dq = $pdo->prepare("SELECT organization AS name FROM sponsors WHERE id=?"); - $dq->execute([$r->sponsors_id]); - $dr = $dq->fetch(PDO::FETCH_OBJ); - if ($r->twomonth) - $s = 'style="background-color: ' . colour_to_percent(0) . ';"'; - else if ($r->onemonth) - $s = 'style="background-color: ' . colour_to_percent(50) . ';"'; - else - $s = ''; - - echo ""; - echo " "; - echo ' '; - echo ' '; - echo ' '; - echo "\n"; - } - echo "
' . i18n('Name') . "' . i18n('Date Received') . "' . i18n('Amount') . "' . i18n('Generate Receipt') . "
$dr->name' . format_date($r->datereceived) . '' . format_money($r->value) . ''; - echo '' . i18n('Generate Receipt') . '
\n"; - } else { - echo i18n('No Receipts pending'); - echo "
\n"; - } -?> - -
-

-prepare('SELECT * FROM fundraising_campaigns WHERE followupdate>=NOW() ORDER BY followupdate LIMIT 5'); - $q->execute(); - show_pdo_errors_if_any($pdo); - if ($q->rowCount()) { - echo ''; - echo ''; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo "\n"; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo "\n"; - } - echo "
' . i18n('Appeal') . "' . i18n('Start Date') . "' . i18n('Follow-Up Date') . "
$r->name" . format_date($r->startdate) . '' . format_date($r->followupdate) . "
\n"; - } else { - echo i18n('No appeal follow-ups'); - echo "
\n"; - } - -?> -
-

Upcoming Proposals

-prepare('SELECT * FROM sponsors WHERE fundingselectiondate>=NOW() OR proposalsubmissiondate>=NOW() ORDER BY fundingselectiondate LIMIT 5'); - $q->execute(); - show_pdo_errors_if_any($pdo); - - if ($q->rowCount()) { - echo ''; - echo ''; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo "\n"; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ""; - echo ''; - echo ''; - echo "\n"; - } - echo "
' . i18n('Name') . "' . i18n('Proposal Submission Date') . "' . i18n('Funding Selection Date') . "
$r->organization' . format_date($r->proposalsubmissiondate) . '' . format_date($r->fundingselectiondate) . '
\n"; - } else { - echo i18n('No proposals upcoming'); - } - - exit; -} else if (get_value_from_array($_POST, 'thanked')) { - foreach ($_POST['thanked'] AS $t) { - $stmt = $pdo->prepare("UPDATE fundraising_donations SET thanked='yes' WHERE id=?"); - $stmt->execute([$t]); - } -} - -send_header('Fundraising', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Fundraising' => 'admin/fundraising.php'), - 'fundraising'); -?> - - -
- - diff --git a/admin/fundraising_campaigns.php b/admin/fundraising_campaigns.php deleted file mode 100644 index 8f7dd82d..00000000 --- a/admin/fundraising_campaigns.php +++ /dev/null @@ -1,835 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -\n"; - $q = $pdo->prepare("SELECT * FROM fundraising_campaigns WHERE fiscalyear=? ORDER BY name"); - $q->execute([$config['FISCALYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo '

' . htmlspecialchars($r->name) . "

\n"; - echo "
id}\">\n"; - echo "
id}\" method=\"post\" action=\"{$_SERVER['PHP_SELF']}\" onsubmit=\"return campaigninfo_save($r->id)\">\n"; - echo "id}\" />\n"; - echo "\n"; - display_campaign_form($r); - ?> - - -
-
-
-
-
- -

-
-
- - - - - -
-
-
-
-
- - - - - - - - - - - - - - - -prepare("SELECT * FROM fundraising_campaigns WHERE fiscalyear=?"); - $q->execute([$config['FISCALYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $goalq = $pdo->prepare("SELECT * FROM fundraising_goals WHERE goal=? AND fiscalyear=?"); - $goalq->execute([$r->fundraising_goal,$config['FISCALYEAR']]); - $goalr = $goalq->fetch(PDO::FETCH_OBJ); - $recq = $pdo->prepare("SELECT SUM(value) AS received FROM fundraising_donations WHERE fundraising_campaigns_id=? AND fiscalyear=? AND status='received'"); - $recq->execute([$r->id,$config['FISCALYEAR']]); - show_pdo_errors_if_any($pdo); - $recr = $recq->fetch(PDO::FETCH_OBJ); - $received = $recr->received; - if ($r->target) - $percent = round($received / $r->target * 100, 1); - else - $percent = 0; - $col = colour_to_percent($percent); - - if (!$goalr) { - $goalr = new stdClass(); - $goalr->name = ''; - } - - echo "id)\">\n"; - echo " \n"; - echo " \n"; - echo ' \n"; - echo ' '; - echo ' \n"; - echo ' \n"; - echo " \n"; - echo " "; - echo "\n"; - } -?> -
$r->name$r->type' . format_date($r->startdate) . "' . format_date($r->enddate) . '' . format_money($r->target, false) . "' . format_money($received, false) . "{$percent}%$goalr->name
- -
-prepare("SELECT * FROM fundraising_campaigns WHERE id=?"); - $q->execute([$id]); - $campaign = $q->fetch(PDO::FETCH_OBJ); - echo "

$campaign->name

\n"; -?> -
-
    -
  • -
  • -
  • -
  • -
-
- overview tab -
-
- donations tab -
-
- prospects tab -
-
- communications tab -
-
-prepare("SELECT * FROM fundraising_campaigns WHERE id=? AND fiscalyear=?"); - $q->execute([$campaign_id,$config['FISCALYEAR']]); - if ($r = $q->fetch(PDO::FETCH_OBJ)) { - $goalr = getGoal($r->fundraising_goal); - $recq = $pdo->prepare("SELECT SUM(value) AS received FROM fundraising_donations WHERE fundraising_campaigns_id=? AND fiscalyear=? AND status='received'"); - $recq->execute([$r->id,$config['FISCALYEAR']]); - show_pdo_errors_if_any($pdo); - $recr = $recq->fetch(PDO::FETCH_OBJ); - $received = $recr->received; - if ($r->target) - $percent = round($received / $r->target * 100, 1); - else - $percent = 0; - $col = colour_to_percent($percent); - echo ''; - echo "\n"; - echo ' \n"; - echo ' \n"; - echo "\n"; - echo ' '; - echo "\n"; - echo ' '; - echo "\n"; - echo ' "; - echo "\n"; - echo ' \n"; - echo "\n"; - echo ' \n"; - echo "\n"; - echo ' \n"; - echo "\n"; - echo "
' . i18n('Type') . "$r->type
' . i18n('Start Date') . '' . format_date($r->startdate) . "
' . i18n('Follow-Up Date') . '' . format_date($r->followupdate) . '
' . i18n('End Date') . '' . format_date($r->enddate) . '
' . i18n('Default Purpose') . "$goalr->name
' . i18n('Target') . '' . format_money($r->target, false) . "
' . i18n('Received') . '' . format_money($received, false) . "
' . i18n('% to Budget') . "{$percent}%
\n"; - } - exit; - break; - - case 'manage_tab_donations': - $campaign_id = intval($_GET['id']); - $q = $pdo->prepare("SELECT * FROM fundraising_campaigns WHERE id=? AND fiscalyear=?"); - $q->execute([$campaign_id,$config['FISCALYEAR']]); - if ($campaign = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo ''; - echo ''; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ''; - echo "\n"; - - $q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE fundraising_campaigns_id='$campaign_id' AND status='received' ORDER BY datereceived DESC"); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $goal = getGoal($r->fundraising_goal); - $sq = $pdo->prepare("SELECT * FROM sponsors WHERE id=?"); - $sq->execute([$r->sponsors_id]); - $sponsor = $sq->fetch(PDO::FETCH_OBJ); - echo '\n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo ' \n"; - echo "\n"; - } - echo "
' . i18n('Date') . "' . i18n('Donor/Sponsor') . "' . i18n('Purpose') . "' . i18n('Amount') . "' . i18n('Type of Support') . "
' . format_date($r->datereceived) . "' . $sponsor->organization . "' . $goal->name . "' . format_money($r->value) . "' . i18n($r->supporttype) . "
\n"; - } - exit; - break; - - case 'manage_tab_prospects': - $donationhistorylist = array('never' => 'Never donated/sponsored', 'past' => 'Donated/sponsored in the past', 'lastyear' => 'Donated/sponsored last year', 'thisyear' => 'Donated/sponsored this year'); - $emailaddresslist = array('available' => 'Available', 'notavaialble' => 'Not Available'); - - $rolelist = array( - 'judge' => 'Judge', - 'teacher' => 'Teacher', - 'sciencehead' => 'School Science Head', - 'principal' => 'School Principal', - 'parent' => 'Parent', - 'committee' => 'Committee', - 'volunteer' => 'Volunteer', - 'alumni' => 'Alumni (not implemented)', - 'mentor' => 'Mentor (not implemented)', - ); - $campaign_id = intval($_GET['id']); - $q = $pdo->prepare("SELECT * FROM fundraising_campaigns WHERE id=? AND fiscalyear=?"); - $q->execute([$campaign_id,$config['FISCALYEAR']]); - $campaign = $q->fetch(PDO::FETCH_OBJ); - if ($campaign->filterparameters) { - echo '

' . i18n('User List') . "

\n"; - $params = unserialize($campaign->filterparameters); - echo ''; - echo '\n"; - if (is_array($params['donationhistory'])) { - echo '\n"; - } - // echo "\n"; - if (is_array($params['emailaddress'])) { - echo '\n"; - } - if ($params['donortype'] == 'individual' && is_array($params['individual_type'])) { - echo '\n"; - } else if (is_array($params['contacttype'])) { - echo '\n"; - } - - echo "
' . i18n('Donor Type') . '' . i18n(ucfirst($params['donortype'])) . "
' . i18n('Donation History') . ''; - foreach ($params['donationhistory'] AS $d) { - echo i18n($donationhistorylist[$d]) . "
\n"; - } - echo "
".i18n("Donation Level").""; - // echo "
' . i18n('Email Address') . ''; - foreach ($params['emailaddress'] AS $e) { - echo i18n($emailaddresslist[$e]) . "
\n"; - } - echo "
' . i18n('Role') . ''; - foreach ($params['individual_type'] AS $e) { - echo i18n($rolelist[$e]) . "
\n"; - } - echo "
' . i18n('Role') . ''; - foreach ($params['contacttype'] AS $e) { - echo i18n(ucfirst($e)) . '
'; - } - echo "
\n"; - // params: individual/org - // donation history - // donation level - // email address - // role ind - // role org - - echo '
'; - echo "
\n"; - echo "\n"; - $q = $pdo->prepare("SELECT * FROM fundraising_campaigns_users_link WHERE fundraising_campaigns_id=?"); - $q->execute([$campaign_id]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $u = user_load_by_uid($r->users_uid); - // hopefully this never returns false, but who knows.. - if ($u) { - echo '\n"; - echo '
'; - } - } - echo '
'; - echo '
'; - - echo '
'; - echo '\n"; - echo ''; - echo '\n"; - // echo ""; - // echo "\n"; - echo "
\n"; - } else { - ?> -

- - - - -
: -
-
-
- - - - - - -
-
-
- prepare("SELECT * FROM fundraising_campaigns WHERE id=? AND fiscalyear=?"); - $q->execute([$campaign_id,$config['FISCALYEAR']]); - if ($r = $q->fetch(PDO::FETCH_OBJ)) { - } - $communications = array('initial' => 'Initial Communication', - 'followup' => 'Follow-Up Communication'); - - foreach ($communications as $key => $name) { - echo '

' . i18n($name) . "

\n"; - // check if they have one in the emails database - $q = $pdo->prepare("SELECT * FROM emails WHERE fundraising_campaigns_id=? AND val=?"); - $q->execute([$campaign_id,$key]); - if ($email = $q->fetch(PDO::FETCH_OBJ)) { - echo '
'; - echo "id,$campaign_id)\">'; - echo '  '; - echo "id);\" href=\"\">'; - echo '
'; - - echo ''; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo "
' . i18n('Subject') . '' . htmlspecialchars($email->subject) . "
' . i18n('From') . '' . htmlspecialchars($email->from) . "
' . $email->bodyhtml . "
'; - echo ''; - echo '\n"; - echo "\n"; - echo "\n"; - echo "
'; - // we let them always send it again for now... might change this back later, but i think just notifying them of when it was last sent is enough and keeps teh form more consistent - echo "id)\" value=\"" . i18n('Send as email') . '" />'; - echo "
\n"; - if ($email->lastsent) { - list($date, $time) = explode(' ', $email->lastsent); - echo i18n('Last Sent'); - echo '
' . format_date($date); - echo '
' . format_time($time); - } - echo "
\n"; - echo "
\n"; - } else { - echo "\n"; - } - echo '
'; - } - exit; - break; - - case 'prospect_removeselected': - $campaignid = intval($_POST['fundraising_campaigns_id']); - print_r($_POST); - if (is_array($_POST['prospectremovefromlist'])) { - $uidlist = implode(',', $_POST['prospectremovefromlist']); - $query = "DELETE FROM fundraising_campaigns_users_link WHERE fundraising_campaigns_id=? AND users_uid IN ($uidlist)"; - $stmt = $pdo->prepare($query); - $stmt->execute([$campaignid]); - show_pdo_errors_if_any($pdo); - } - // if theres nobody left in the list we need to reset the filter params as well - $q = $pdo->prepare("SELECT COUNT(*) AS num FROM fundraising_campaigns_users_link WHERE fundraising_campaigns_id=?"); - $q->execute([$campaignid]); - $r = $q->fetch(PDO::FETCH_OBJ); - if ($r->num == 0) { - $stmt = $pdo->prepare("UPDATE fundraising_campaigns SET filterparameters=NULL WHERE id=?"); - $stmt->execute([$campaignid]); - } - - happy_('Selected users removed from list'); - exit; - break; - - case 'prospect_removeall': - $campaignid = intval($_POST['fundraising_campaigns_id']); - $stmt = $pdo->prepare("DELETE FROM fundraising_campaigns_users_link WHERE fundraising_campaigns_id=?"); - $stmt->execute([$campaignid]); - $stmt = $pdo->prepare("UPDATE fundraising_campaigns SET filterparameters=NULL WHERE id=?"); - $stmt->execute([$campaignid]); - happy_('All users removed from list'); - exit; - break; - - case 'communication_remove': - $emails_id = $_POST['id']; - // check if its been sent, if so, it cannot be deleted, sorry! - $q = $pdo->prepare("SELECT * FROM emails WHERE id=?"); - $q->execute([$emails_id]); - $e = $q->fetch(PDO::FETCH_OBJ); - if ($e->lastsent) { - error_('Cannot remove an email that has already been sent'); - } else { - $stmt = $pdo->prepare("DELETE FROM emails WHERE id=?"); - $stmt->execute([$emails_id]); - happy_('Communicaton removed'); - } - - break; -} - -function save_campaign_info() -{ - global $config, $pdo; - if (!$_POST['name']) { - error_('Appeal Name is required'); - return; - } - if (!$_POST['startdate']) - $startdate = date('Y-m-d'); - else - $startdate = $_POST['startdate']; - - if (!$_GET['id']) { - $query = "INSERT INTO fundraising_campaigns (name, fiscalyear) VALUES (?,?)"; - echo $query; - $stmt = $pdo->prepare($query); - $stmt->execute([stripslashes($_POST['name']),$config['FISCALYEAR']]); - $id = $pdo->lastInsertId(); - happy_('Appeal Created'); - } else { - $id = $_GET['id']; - happy_('Appeal Saved'); - } - $stmt = $pdo->prepare("UPDATE fundraising_campaigns SET - name=?, - `type`=?, - startdate=?, - followupdate=?, - enddate=?, - target=?, - fundraising_goal=? - WHERE id=?"); - $stmt->execute([stripslashes($_POST['name']),$_POST['type'],$startdate,$_POST['followupdate'],$_POST['enddate'],$_POST['target'],$_POST['fundraising_goal'],$id]); -} - -send_header('Appeal Management', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Fundraising' => 'admin/fundraising.php'), - 'fundraising'); -?> - - - - - - - - - - - - startdate; - else - $sd = date('Y-m-d'); - ?> - - - - - - - $ - - prepare("SELECT * FROM fundraising_goals WHERE fiscalyear=? ORDER BY name"); - $fgq->execute([$config['FISCALYEAR']]); - echo '\n"; - ?> - - - - -
-Create/Modify Appeals - -Appeal Management -
-
- - - - diff --git a/admin/fundraising_campaigns_prospecting.php b/admin/fundraising_campaigns_prospecting.php deleted file mode 100644 index 8ea06c32..00000000 --- a/admin/fundraising_campaigns_prospecting.php +++ /dev/null @@ -1,240 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare('SELECT id, organization AS name, address, address2, city, province_code, postalcode FROM sponsors ORDER BY name'); - - $q->execute(); - show_pdo_errors_if_any($pdo); - - if (!$_POST['contacttype']) - $contacttype = array('primary', 'secondary'); - else - $contacttype = $_POST['contacttype']; - - $primary = ''; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - foreach ($contacttype AS $ct) { - switch ($ct) { - case 'primary': - $primary = 'yes'; - break; - case 'secondary': - $primary = 'no'; - break; - } - $cq = $pdo->prepare("SELECT *,MAX(year) FROM users LEFT JOIN users_sponsor ON users_sponsor.users_id=users.id - WHERE - sponsors_id='" . $r->id . "' - AND `primary`='$primary' - AND types LIKE '%sponsor%' - GROUP BY uid - HAVING deleted='no' - ORDER BY users_sponsor.primary DESC,lastname,firstname - "); - $cq->execute(); - - show_pdo_errors_if_any($pdo); - while ($cr = $cq->fetch(PDO::FETCH_OBJ)) { - if (!$userslist[$cr->uid]) - $userslist[$cr->uid] = user_load($cr->users_id); - } - } - } -} else if ($_POST['donortype'] == 'individual') { - if (!$_POST['individual_type']) - $individual_type = array('judge', 'teacher', 'sciencehead', 'principal', 'parent', 'mentor', 'committee', 'volunteer', 'students'); - else - $individual_type = $_POST['individual_type']; - - foreach ($individual_type AS $t) { - $query = "SELECT *,MAX(year) FROM users WHERE types LIKE '%$t%' GROUP BY uid HAVING deleted='no' ORDER BY lastname,firstname"; - $q = $pdo->prepare($query); - $q->execute(); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if (!$userslist[$r->uid]) - $userslist[$r->uid] = user_load_by_uid($r->uid); - } - } -} - -// okie dokie, now we need to filter ou the list on the other criteria -if ($_POST['emailaddress']) { - $emailaddress = $_POST['emailaddress']; -} else { - $emailaddress = array('available', 'not available'); -} - -if (count($emailaddress) == 1) { - $emailavailablelist = array(); - $emailnotavailablelist = array(); - - foreach ($userslist AS $uid => $u) { - if ($u['email']) - $emailavailablelist[$uid] = $u; - else - $emailnotavailablelist[$uid] = $u; - } - - if ($emailaddress[0] == 'available') { - $userslist = $emailavailablelist; - } else { - $userslist = $emailnotavailablelist; - } -} - -if ($_POST['donationhistory']) { - $donationhistory = $_POST['donationhistory']; -} else { - $donationhistory = array('never', 'past', 'lastyear', 'thisyear'); -} - -/* - * FIXME: put this back in as it would eliminate a lot of processing - * - * if(in_array('never',$donationhistory) && in_array('past',$donationhistory)) { - * //these cancel eachother out basically, so include everyone - * unset($donationhistory[array_search("never",$donationhistory)]); - * unset($donationhistory[array_search("past",$donationhistory)]); - * } - */ - -$neverlist = $userslist; -$pastlist = $userslist; -$lastyearlist = $userslist; -$thisyearlist = $userslist; - -// if they dont have a sponsors id, then they,ve never donated for sure, so keep them -// if they DO have a sponsors id, we need to check if tere is a donation record for them -// and if so, remove them if there is because tey have donated in the past - -foreach ($neverlist AS $uid => $u) { - if ($u['sponsors_id']) { - $q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id=?"); - $q->execute([$u['sponsors_id']]); - if ($q->rowCount()) { - // echo "removing $uid because they have donated in the past
"; - unset($neverlist[$uid]); - } - } -} - -// if they dont have a sponsors id, then they,ve never donated for sure, get rid of them -// if they DO have a sponsors id, we need to check if tere is a donation record for them -// and if not remove them if there is because tey have not donated in the past - -foreach ($pastlist AS $uid => $u) { - if ($u['sponsors_id']) { - $q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id=?"); - $q->execute([$u['sponsors_id']]); - if (!$q->rowCount()) { - // echo "removing $uid because they have NOT donated in the past
"; - unset($pastlist[$uid]); - } - } else { - // echo "removing $uid because they have NOT donated in the past
"; - unset($pastlist[$uid]); - } -} - -$lastyear = $config['FISCALYEAR'] - 1; - -foreach ($lastyearlist AS $uid => $u) { - if ($u['sponsors_id']) { - $q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id=? AND fiscalyear=?"); - $q->execute([$u['sponsors_id'],$lastyear]); - if (!$q->rowCount()) { - // echo "removing $uid because they have NOT donated last year
"; - unset($lastyearlist[$uid]); - } - } else { - // echo "removing $uid because they have NOT donated last year
"; - unset($lastyearlist[$uid]); - } -} - -foreach ($thisyearlist AS $uid => $u) { - if ($u['sponsors_id']) { - $q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE status='received' AND sponsors_id=? AND fiscalyear=?"); - $q->execute([$u['sponsors_id'],$config['FISCALYEAR']]); - if (!$q->rowCount()) { - // echo "removing $uid because they have NOT donated this year
"; - unset($thisyearlist[$uid]); - } - } else { - // echo "removing $uid because they have NOT donated this year
"; - unset($thisyearlist[$uid]); - } -} - -/* - * echo "neverlist:".count($neverlist)."
"; - * echo "pastlist:".count($pastlist)."
"; - * echo "lastyearlist:".count($lastyearlist)."
"; - * echo "thisyearlist:".count($thisyearlist)."
"; - */ - -$userslist = array(); -foreach ($donationhistory AS $dh) { - $arr = $dh . 'list'; - foreach ($$arr AS $uid => $u) { - $userslist[$uid] = $u; - } -} - -if ($_GET['generatelist']) { - $campaignid = $_POST['fundraising_campaigns_id']; - $params = serialize($_POST); - echo "params=$params"; - $stmt = $pdo->prepare("UPDATE fundraising_campaigns SET filterparameters=? WHERE id=?"); - $stmt->execute([$params,$campaignid]); - $uids = array_keys($userslist); - foreach ($uids AS $u) { - $stmt = $pdo->prepare("INSERT INTO fundraising_campaigns_users_link (fundraising_campaigns_id, users_uid) VALUES (?,?)"); - $stmt->execute([$campaignid,$u]); - } - - echo 'List created'; -} else { - // just show the results - $usersnum = count($userslist); - echo i18n('%1 users match the given criteria', array($usersnum)) . '
'; - echo '\n"; - // print_r($userslist); - // print_r($otherlist); -} - -echo '

'; -echo nl2br(print_r($_POST, true)); - -?> diff --git a/admin/fundraising_common.inc.php b/admin/fundraising_common.inc.php deleted file mode 100644 index 55b68ba1..00000000 --- a/admin/fundraising_common.inc.php +++ /dev/null @@ -1,13 +0,0 @@ -prepare("SELECT * FROM fundraising_goals WHERE goal=? AND fiscalyear=? LIMIT 1"); - $q->execute([$goal,$config['FISCALYEAR']]); - return $q->fetch(PDO::FETCH_OBJ); -} - -?> diff --git a/admin/fundraising_goals_handler.inc.php b/admin/fundraising_goals_handler.inc.php deleted file mode 100644 index 0b38be3c..00000000 --- a/admin/fundraising_goals_handler.inc.php +++ /dev/null @@ -1,68 +0,0 @@ -prepare("SELECT * FROM fundraising_goals WHERE id=? AND year=?"); - $q->execute([$id,$config['FISCALYEAR']]); - $f = $q->fetch(PDO::FETCH_OBJ); - // hold yer horses, no deleting system funds! - if ($f) { - if ($f->system == 'no') { - $stmt = $pdo->prepare("DELETE FROM fundraising_donations WHERE fundraising_goal=? AND fiscalyear=?"); - $stmt->execute([$f->type,$config['FISCALYEAR']]); - $stmt = $pdo->prepare("DELETE FROM fundraising_goals WHERE id=?"); - $stmt->execute([$id]); - if ($pdo->rowCount()) - happy_('Successfully removed fund %1', array($f->name)); - } else { - error_('Cannot remove system fund'); - } - } - exit; -} -if ($_POST['action'] == 'fundedit' || $_POST['action'] == 'fundadd') { - $fundraising_id = intval($_POST['fundraising_id']); - if ($fundraising_id) { - $q = $pdo->prepare("SELECT * FROM fundraising_goals WHERE id=?"); - $q->execute([$fundraising_id]); - $f = $q->fetch(PDO::FETCH_OBJ); - $system = $f->system; - } - $name = $_POST['name']; - $goal = $_POST['goal']; - $description = $_POST['description']; - $budget = intval($_POST['budget']); -} - -if ($_POST['action'] == 'fundedit') { - if (($system == 'yes' && $budget) || ($system == 'no' && $budget && $goal && $name)) { - if ($system == 'yes') { - $stmt = $pdo->prepare("UPDATE fundraising SET budget=?, description=? WHERE id=?"); - $stmt->execute([$budget,$description,$fundraising_id]); - } else { - $stmt = $pdo->prepare("UPDATE fundraising SET budget=?, description=?, goal=?, name=? WHERE id=?"); - $stmt->execute([$budget,$description,$goal,$name,$fundraising_id]); - } - - if ($pdo->errorInfo()) - error_('MySQL Error: %1', array($pdo->errorInfo())); - else - happy_('Saved fund changes'); - } else { - error_('Required fields were missing, please try again'); - } - exit; -} -if ($_POST['action'] == 'fundadd') { - if ($goal && $type && $name) { - $stmt = $pdo->prepare("INSERT INTO fundraising_goals (goal,name,description,system,budget,fiscalyear) VALUES (?,?,?,'no',?,?)"); - $stmt->execute([$goal,$name,$description,$budget,$config['FISCALYEAR']]); - happy_('Added new fund'); - } else - error_('Required fields were missing, please try again'); - if ($pdo->errorInfo()) - error_('MySQL Error: %1', array($pdo->errorInfo())); - exit; -} - -?> diff --git a/admin/fundraising_main.inc.php b/admin/fundraising_main.inc.php deleted file mode 100644 index f7f74535..00000000 --- a/admin/fundraising_main.inc.php +++ /dev/null @@ -1,88 +0,0 @@ -prepare("SELECT * FROM fundraising_goals WHERE fiscalyear=? ORDER BY system DESC,goal"); - $q->execute([$config['FISCALYEAR']]); - echo ''; - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo '\n"; - echo '\n"; - echo '\n"; - echo "\n"; - - if ($r->type == 'general') - $orsql .= 'OR fundraising_type IS NULL'; - - $typetotal = 0; - $typeprobtotal = 0; - $sq = $pdo->prepare(" - (SELECT fundraising_donations.id, sponsors.organization AS name, - fundraising_donations.value, fundraising_donations.status, fundraising_donations.probability - FROM fundraising_donations - JOIN sponsors ON fundraising_donations.sponsors_id = sponsors.id - WHERE (fundraising_donations.fundraising_goal = ? OR fundraising_donations.fundraising_goal = ?) - AND fundraising_donations.fiscalyear = ?) - - UNION - - (SELECT fundraising_donations.id, CONCAT(users.firstname, ' ', users.lastname) AS name, - fundraising_donations.value, fundraising_donations.status, fundraising_donations.probability - FROM fundraising_donations - JOIN users ON fundraising_donations.users_uid = users.uid - WHERE (fundraising_donations.fundraising_goal = ? OR fundraising_donations.fundraising_goal = ?) - AND fundraising_donations.fiscalyear = ?) - - ORDER BY status DESC, probability DESC, name"); - $sq->execute([$r->goal, $orsql, $config['FISCALYEAR'], $r->goal, $orsql, $config['FISCALYEAR']]); - show_pdo_errors_if_any($pdo); - while ($sr = $sq->fetch(PDO::FETCH_OBJ)) { - echo "id\" class=\"fundraising{$sr->status}\">"; - echo ''; - echo "\n"; - echo ""; - echo ''; - echo ''; - } else - echo "\n"; - - $probval = $sr->probability / 100 * $sr->value; - echo ''; - echo "\n"; - echo "\n"; - $typeprobtotal += $probval; - $typetotal += $sr->value; - } - echo ''; - echo ""; - echo '\n"; - echo '\n"; - echo '\n"; - $typediff = $typeprobtotal - $r->goal; - echo '\n"; - echo "\n"; - - $totalgoal += $r->goal; - $totaldiff += $typediff; - echo "\n"; - } - echo ''; - echo ''; - echo '\n"; - echo "
id')\" href=\"#\">'; - if ($r->system == 'no') { - // echo "id\">"; - echo "id)\" border=\"0\" src=\"" . $config['SFIABDIRECTORY'] . '/images/16/button_cancel.' . $config['icon_extension'] . '">'; - // echo ""; - } - - echo "' . i18n($r->name) . "' . format_money($r->budget) . "
'; - echo "id)\" border=\"0\" src=\"" . $config['SFIABDIRECTORY'] . '/images/16/button_cancel.' . $config['icon_extension'] . '">'; - echo 'id&fundraising_type=$r->type')\">"; - echo "$sr->name$sr->status'; - if ($sr->status == 'pending') { - echo "$sr->probability%"; - echo '' . format_money($sr->value) . '' . format_money($probval) . '
type')\" href=\"#\">add' . i18n('%1 Total', array($r->name), array('Fundraising type total, eg) Award Sponsorship Total')) . "' . format_money($typetotal) . "' . format_money($typeprobtotal) . "' . format_money($typediff) . "
 
add fund type' . i18n('Total Net Position') . '' . format_money($totaldiff) . "
\n"; - exit; -} diff --git a/admin/fundraising_reports.php b/admin/fundraising_reports.php deleted file mode 100644 index 505a43c2..00000000 --- a/admin/fundraising_reports.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Fundraising' => 'admin/fundraising.php'), - 'fundraising'); -?> - -

Standard Reports

-
-

List of Prospects by Appeal

-
- - -
- Choose an appeal: - -
- - -
- Report Type: - - -
- -
- -
-

Results of Appeal by Purpose

-
-
- - - -
- Choose a Purpose: - - -
- Report Type: - - -
- -
-
-
-
-
-
- -

Custom Reports

- - diff --git a/admin/fundraising_reports_std.php b/admin/fundraising_reports_std.php deleted file mode 100644 index e738050c..00000000 --- a/admin/fundraising_reports_std.php +++ /dev/null @@ -1,171 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -newPage(); - $rep->setFontSize(8); - } - $sql = "SELECT * FROM fundraising_campaigns WHERE fiscalyear=? "; - if ($_GET['fundraising_campaigns_id']) { - $sql .= " AND id=?"; - } - $sql .= ' ORDER BY name'; - $q = $pdo->prepare($sql); - $q->execute([$config['FISCALYEAR'],intval($_GET['fundraising_campaigns_id'])]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $rep->heading($r->name); - $table = array(); - $table['header'] = array('Name', 'Contact', 'Phone', 'Address', '$ appeal', '$ this year', '$ last year', '%chg'); - $table['widths'] = array(1.5, 1, 1, 1, 0.9, 0.9, 0.9, 0.5); - $table['dataalign'] = array('left', 'left', 'left', 'left', 'right', 'right', 'right', 'center'); - - $thisyear = $config['FISCALYEAR']; - $lastyear = $config['FISCALYEAR'] - 1; - - $pq = $pdo->prepare("SELECT * FROM fundraising_campaigns_users_link WHERE fundraising_campaigns_id=?"); - $pq->execute([$r->id]); - while ($pr = $pq->fetch(PDO::FETCH_OBJ)) { - $u = user_load_by_uid($pr->users_uid); - // hopefully this never returns false, but who knows.. - if ($u) { - // we only want the primaries, yea, i know... we have this werid confusing between a USER being linked to a sponsor and then a sponsor having multiple users - // and then only getting the primary contact for the sponsor even if it might not be the user thats in teh campaign... my brain hurts - // if($u['primary']=="no") - // continue; - // gah i dont know what the heck to do here - - if ($u['sponsors_id']) { - $cq = $pdo->prepare("SELECT SUM(value) AS total FROM fundraising_donations WHERE sponsors_id=? AND fundraising_campaigns_id=? AND status='received' AND fiscalyear=?"); - $cq->execute([$u['sponsors_id'],$r->id,$thisyear]); - $cr = $cq->fetch(PDO::FETCH_OBJ); - $thisappeal = $cr->total; - $cq = $pdo->prepare("SELECT SUM(value) AS total FROM fundraising_donations WHERE sponsors_id=? AND status='received' AND fiscalyear=?"); - $cq->execute([$u['sponsors_id'],$thisyear]); - $cr = $cq->fetch(PDO::FETCH_OBJ); - $thisyeartotal = $cr->total; - $cq = $pdo->prepare("SELECT SUM(value) AS total FROM fundraising_donations WHERE sponsors_id=? AND status='received' AND fiscalyear=?"); - $cq->execute([$u['sponsors_id'],$lastyear]); - $cr = $cq->fetch(PDO::FETCH_OBJ); - $lastyeartotal = $cr->total; - if ($lastyeartotal) - $change = round(($thisyeartotal - $lastyeartotal) / $lastyeartotal * 100); - else - $change = 'N/A'; - $name = $u['sponsor']['organization']; - } else { - $name = $u['firstname'] . ' ' . $u['lastname']; - $thisappeal = 0; - $thisyeartotal = 0; - $lastyeartotal = 0; - $change = 0; - } - $table['data'][] = array( - $name, - $u['firstname'] . ' ' . $u['lastname'], - $u['phonework'], - $u['address'] . ' ' . $u['address2'], - $thisappeal, - $thisyeartotal, - $lastyeartotal, - $change - ); - } - } - $rep->addTable($table); - } - - break; - - case 2: - if ($type == 'csv') { - $rep = new lcsv($config['FAIRNAME'], 'Results of Appeal by Purpose', ''); - } else if ($type == 'pdf') { - $rep = new lpdf(i18n($config['fairname']), - i18n('Results of Appeal by Purpose'), - $_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'); - $rep->newPage(); - $rep->setFontSize(8); - } - $sql = "SELECT * FROM fundraising_goals WHERE fiscalyear=? "; - if ($_GET['goal']) { - $sql .= " AND goal=?"; - } - $sql .= ' ORDER BY name'; - $q = $pdo->prepare($sql); - $q->execute([$config['FISCALYEAR'],$_GET['goal']]); - show_pdo_errors_if_any($pdo); - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $rep->heading($r->name) . ' (' . $r->budget . ')'; - - $table = array(); - $table['header'] = array('Appeal Name', 'Target', 'Received', '% to Budget', '# of Prospects', '# of Donors/Sponsors', 'Rate of Response', 'Average Amount Given'); - $table['widths'] = array(1.5, 0.5, 0.5, 0.75, 0.9, 0.9, 0.9, 0.5); - $table['dataalign'] = array('left', 'right', 'right', 'center', 'center', 'center', 'center', 'right'); - - $cq = $pdo->prepare("SELECT * FROM fundraising_campaigns WHERE fundraising_goal=? AND fiscalyear=?"); - $cq->execute([$r->goal,$config['FISCALYEAR']]); - while ($cr = $cq->fetch(PDO::FETCH_OBJ)) { - $table['data'][] = array( - $cr->name, - $cr->target, - $received, - $percenttobudget, - $numprospects, - $numdonors, - $rate, - $avgamount - ); - } - - $rep->addTable($table); - } - - break; - } - - $rep->output(); -} else - header('Location: fundraising_reports.php'); - -?> diff --git a/admin/fundraising_setup.php b/admin/fundraising_setup.php deleted file mode 100644 index 6db73b45..00000000 --- a/admin/fundraising_setup.php +++ /dev/null @@ -1,478 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT * FROM fundraising_donor_levels WHERE fiscalyear=?"); -$q->execute([$config['FISCALYEAR']]); -if (!$q->rowCount()) { - $q = $pdo->prepare("SELECT * FROM fundraising_donor_levels WHERE fiscalyear='-1'"); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO fundraising_donor_levels (`level`,`min`,`max`,`description`,`fiscalyear`) VALUES ( - ?, - ?, - ?, - ?, - ?)')"); - - $stmt->execute([$r->level,$r->min,$r->max,$r->description,$config['FISCALYEAR']]); - } -} - -// first, insert any default fundraising goals -$q = $pdo->prepare("SELECT * FROM fundraising_goals WHERE fiscalyear=?"); -$q->execute([$config['FISCALYEAR']]); -if (!$q->rowCount()) { - $q = $pdo->prepare("SELECT * FROM fundraising_goals WHERE fiscalyear='-1'"); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO fundraising_goals (`goal`,`name`,`description`,`system`,`budget`,`fiscalyear`) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?)"); - $stmt->execute([stripslashes($r->goal),stripslashes($r->name),stripslashes($r->description),$r->system,$r->budget, $config['FISCALYEAR']]); - } -} - -switch (get_value_from_array($_GET, 'gettab')) { - case 'levels': - $q = $pdo->prepare("SELECT * FROM fundraising_donor_levels WHERE fiscalyear=? ORDER BY max"); - $q->execute([$config['FISCALYEAR']]); - echo "
\n"; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo "

$r->level (" . format_money($r->min, false) . ' to ' . format_money($r->max, false) . ")

\n"; - echo "
id\">\n"; - echo "
id\" onsubmit=\"return level_save($r->id)\">\n"; - echo "id\">\n"; - echo ''; - echo '\n"; - echo '\n"; - echo '\n"; - echo "
'; - echo i18n('Level Name') . ':
'; - echo i18n('Value Range') . ":\$min\"> to \$max\">
\n"; - echo "
'; - echo i18n('Description/Benefits') . ':
'; - echo "
\n"; - echo '
'; - echo ''; - echo ''; - echo 'id)\" >"; - echo "
\n"; - echo '
'; - echo "
\n"; - } - - echo "

Create New Level

\n"; - echo "
\n"; - echo "
\n"; - - echo ''; - echo '\n"; - echo '\n"; - echo '\n"; - echo "
'; - echo i18n('Level Name') . ":
'; - echo i18n('Value Range') . ":\$ to \$
\n"; - echo "
'; - echo i18n('Description/Benefits') . ':
'; - echo "
\n"; - - echo '
'; - echo ''; - echo ''; - echo "
\n"; - echo "
\n"; - echo "
\n"; - - echo "
\n"; - - exit; - break; - - case 'goals': - $q = $pdo->prepare("SELECT * FROM fundraising_goals WHERE fiscalyear=? ORDER BY name"); - $q->execute([$config['FISCALYEAR']]); - echo "
\n"; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo "

$r->name (" . format_money($r->budget, false) . ') Deadline: ' . format_date($r->deadline) . "

\n"; - echo "
id\">\n"; - echo "
id\" onsubmit=\"return goal_save($r->id)\">\n"; - echo "id\">\n"; - - echo ''; - echo '\n"; - echo '"; - echo '"; - echo '\n"; - echo "
'; - echo i18n('Purpose') . ':
'; - echo i18n('Budget Amount') . ":\$budget\">
'; - echo i18n('Deadline') . ":deadline\">
'; - echo i18n('Description') . ':
'; - echo "
\n"; - echo '
'; - echo ''; - echo ''; - echo 'id)\" >"; - echo "
\n"; - echo '
'; - echo "
\n"; - } - - echo "

Create New Purpose

\n"; - echo "
\n"; - echo "
\n"; - echo ''; - echo '\n"; - echo ''; - echo ''; - echo '\n"; - echo "
'; - echo i18n('Purpose Name') . ":
'; - echo i18n('Budget Amount') . ':$
'; - echo i18n('Deadline') . ':
'; - echo i18n('Description') . ':
'; - echo "
\n"; - - echo '
'; - echo ''; - echo ''; - echo "
\n"; - echo "
\n"; - echo "
\n"; - - echo "
\n"; - - exit; - break; - - case 'setup': - echo '
'; - echo ''; - echo '\n"; - echo '\n"; - echo ''; - echo '\n"; - echo ''; - echo '"; - echo ''; - echo '\n"; - echo "
' . i18n('Current Fiscal Year') . ''; - echo $config['FISCALYEAR']; - echo "
' . i18n('Fiscal Year End') . ''; - list($month, $day) = explode('-', $config['fiscal_yearend']); - emit_month_selector('fiscalendmonth', $month); - emit_day_selector('fiscalendday', $day); - echo "
' . i18n('Is your organization a registered charity?') . ''; - if ($config['registered_charity'] == 'yes') - $ch = 'checked="checked"'; - else - $ch = ''; - echo "'; - echo '   '; - if ($config['registered_charity'] == 'no') - $ch = 'checked="checked"'; - else - $ch = ''; - echo "'; - echo "
' . i18n('Charity Registration Number') . "
\n"; - echo "
\n"; - exit; - break; -} - -switch (get_value_from_array($_GET, 'action')) { - case 'level_save': - $id = $_POST['id']; - if (!($_POST['level'] && $_POST['min'] && $_POST['max'])) { - error_('Level name, minimum and maximum value range are required'); - exit; - } - if ($_POST['min'] >= $_POST['max']) { - error_('Value range minimum must be smaller than range maximum'); - exit; - } - - if ($id) { - $stmt = $pdo->prepare("UPDATE fundraising_donor_levels SET - min=?, - max=?, - level=?, - description=? - WHERE id=? AND fiscalyear=? - "); - $stmt->execute([$_POST['min'],$_POST['max'],stripslashes($_POST['level']),stripslashes($_POST['description']),$id,$config['FISCALYEAR']]); - happy_('Level Saved'); - } else { - $stmt = $pdo->prepare("INSERT INTO fundraising_donor_levels (`level`,`min`,`max`,`description`,`fiscalyear`) VALUES ( - ?, - ?, - ?, - ?, - ?)"); - $stmt->execute([$_POST['level'],$_POST['min'],$_POST['max'],$_POST['description'],$config['FISCALYEAR']]); - happy_('Level Created'); - } - exit; - break; - case 'level_delete': - $id = $_POST['id']; - $stmt = $pdo->prepare("DELETE FROM fundraising_donor_levels WHERE id=? AND fiscalyear=?"); - $stmt->execute([$id,$config['FISCALYEAR']]); - happy_('Level Deleted'); - exit; - break; - - case 'goal_save': - $id = $_POST['id']; - if (!($_POST['name'] && $_POST['budget'])) { - error_('Purpose name and budget are required'); - exit; - } - if ($id) { - $stmt = $pdo->prepare("UPDATE fundraising_goals SET - budget=?, - deadline=?, - name=?, - description=? - WHERE id=? AND fiscalyear=? - "); - $stmt->execute([$_POST['budget'],$_POST['deadline'],stripslashes($_POST['name']),stripslashes($_POST['description']),$id,$config['FISCALYEAR']]); - happy_('Purpose Saved'); - } else { - $goal = strtolower($_POST['name']); - $goal = preg_replace('/[^a-z]/', '', $goal); - echo "SELECT * FROM fundraising_goals WHERE goal='$goal' AND fiscalyear='{$config['FISCALYEAR']}'"; - $q = $pdo->prepare("SELECT * FROM fundraising_goals WHERE goal=? AND fiscalyear=?"); - $q->execute([$goal,$config['FISCALYEAR']]); - show_pdo_errors_if_any($pdo); - if ($q->rowCount()) { - error_('The automatically generated purpose key (%1) generated from (%2) is not unique. Please try a different Purpose Name', array($goal, $_POST['name'])); - exit; - } - - $stmt = $pdo->prepare("INSERT INTO fundraising_goals (`goal`,`name`,`budget`,`deadline`,`description`,`fiscalyear`) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?)"); - $stmt->execute([$goal,$_POST['name'],$_POST['budget'],$_POST['deadline'],$_POST['description'],$config['FISCALYEAR']]); - happy_('Purpose Created'); - } - exit; - break; - case 'goal_delete': - $id = $_POST['id']; - // they cant delete system ones - $q = $pdo->prepare("SELECT * FROM fundraising_goals WHERE id=? AND fiscalyear=?"); - $q->execute([$id,$config['FISCALYEAR']]); - if (!$r = $q->fetch(PDO::FETCH_OBJ)) { - error_('Invalid goal to delete'); - exit; - } - if ($r->system == 'yes') { - error_('Fundraising goals created automatically and used by the system cannot be deleted'); - exit; - } - $q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE fundraising_goal=? AND fiscalyear=?"); - $q->execute([$r->goal,$config['FISCALYEAR']]); - if ($q->rowCount()) { - error_('This goal already has donations assigned to it, it cannot be deleted'); - exit; - } - - $stmt = $pdo->prepare("DELETE FROM fundraising_goals WHERE id=? AND fiscalyear=?"); - $stmt->execute([$id,$config['FISCALYEAR']]); - happy_('Purpose Deleted'); - exit; - break; - - case 'setup_save': - $fye = sprintf('%02d-%02d', intval($_POST['fiscalendmonth']), intval($_POST['fiscalendday'])); - - $stmt = $pdo->prepare("UPDATE config SET val=? WHERE var='fiscal_yearend' AND year=?"); - $stmt->execute([$fye,$config['FAIRYEAR']]); - - $stmt = $pdo->prepare("UPDATE config SET val=? WHERE var='registered_charity' AND year=?"); - $stmt->execute([$_POST['registeredcharity'],$config['FAIRYEAR']]); - - $stmt = $pdo->prepare("UPDATE config SET val=? WHERE var='charity_number' AND year=?"); - $stmt->execute([$_POST['charitynumber'],$config['FAIRYEAR']]); - happy_('Fundraising module setup saved'); - exit; - break; -} - -send_header('Fundraising Setup', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Fundraising' => 'admin/fundraising.php')); - -?> - - -
-
-
    -
  • -
  • -
  • -
- -
-
-
-
-
-
-
-
- - diff --git a/admin/fundraising_sponsorship.php b/admin/fundraising_sponsorship.php deleted file mode 100644 index 6495ec98..00000000 --- a/admin/fundraising_sponsorship.php +++ /dev/null @@ -1,170 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT fundraising_donations.*, sponsors.organization FROM fundraising_donations,sponsors WHERE fundraising_donations.id=? AND fundraising_donations.sponsors_id=sponsors.id"); - $q->execute([$id]); - $sponsorship = $q->fetch(PDO::FETCH_OBJ); - $formaction = 'sponsorshipedit'; -} else { - $formaction = 'sponsorshipadd'; - $fundraising_type = $_GET['fundraising_type']; -} -?> - -'; -echo ""; -echo ""; -echo ''; - -if ($formaction == 'sponsorshipadd') { - echo ''; - echo '\n"; - - echo ''; - echo ''; - echo '\n"; - - echo ''; - echo '\n"; - -echo ''; -echo '\n"; -echo '\n"; - -echo ''; -echo '\n"; - -echo ''; -echo '\n"; - -echo "
' . i18n('Donor Type') . ''; - echo ' ' . i18n('Organization'); - echo ' '; - echo ' '; - echo ' '; - echo ' ' . i18n('Individual'); - echo "
' . i18n('Donor') . ''; - - $q = $pdo->prepare('SELECT * FROM sponsors ORDER BY organization'); - $q->execute(); - show_pdo_errors_if_any($pdo); - echo ''; - - $q = $pdo->prepare("SELECT users.*, MAX(year) AS year FROM users WHERE (firstname!='' AND lastname!='') GROUP BY uid HAVING deleted='no' ORDER BY lastname,firstname"); - $q->execute(); - show_pdo_errors_if_any($pdo); - echo '
' . i18n('Donor Type') . ''; - if ($sponsorship->sponsors_id) - echo i18n('Organization'); - else - echo i18n('Individual'); - echo "
' . i18n('Donor') . ''; - echo $sponsorship->organization; -} -echo "
' . i18n('Donation Allocation') . ''; -$q = $pdo->prepare("SELECT * FROM fundraising WHERE year='{$config['FAIRYEAR']}' ORDER BY name"); -$q->execute(); -show_pdo_errors_if_any($pdo); -echo '\n"; -echo "
' . i18n('Amount') . "value\">
' . i18n('Status') . ''; -echo '\n"; -echo "
' . i18n('Probability') . ''; -echo '\n"; -echo "
\n"; -echo "\n"; - -?> diff --git a/admin/fundraising_sponsorship_handler.inc.php b/admin/fundraising_sponsorship_handler.inc.php deleted file mode 100644 index a1a391cb..00000000 --- a/admin/fundraising_sponsorship_handler.inc.php +++ /dev/null @@ -1,82 +0,0 @@ -prepare("DELETE FROM fundraising_donations WHERE id=?"); - $stmt->execute([intval($_POST['delete'])]); - if ($pdo->rowCount()) - happy_('Successfully removed sponsorship'); - exit; -} - -if ($_POST['action'] == 'sponsorshipedit' || $_POST['action'] == 'sponsorshipadd') { - $sponsors_id = intval($_POST['sponsors_id']); - $fundraising_donations_id = intval($_POST['fundraising_donations_id']); - $fundraising_type = $_POST['fundraising_type']; - - $value = $_POST['value']; - $status = $_POST['status']; - $probability = $_POST['probability']; - - if ($status == 'confirmed' || $status == 'received') - $probability = '100'; - if ($probability == 100 && $status == 'pending') - $status = 'confirmed'; -} - -if ($_POST['action'] == 'sponsorshipedit') { - if ($fundraising_donations_id && $fundraising_type && $value) { - $q = $pdo->prepare("SELECT * FROM fundraising_donations WHERE id=?"); - $q->execute([$fundraising_donations_id]); - $current = $q->fetch(PDO::FETCH_OBJ); - - unset($log); - $log = array(); - if ($current->fundraising_type != $fundraising_type) - $log[] = "Changed sponsorship type from $current->fundraising_type to $fundraising_type"; - - if ($current->value != $value) - $log[] = "Changed sponsorship value from $current->value to $value"; - - if ($current->status != $status) - $log[] = "Changed sponsorship status from $current->status to $status"; - - if ($current->probability != $probability) - $log[] = "Changed sponsorship probability from $current->probability to $probability"; - - if (count($log)) { - $stmt = $pdo->prepare("UPDATE fundraising_donations SET fundraising_type=?, value=?, status=?, probability=? WHERE id=?"); - $stmt->execute([$fundraising_type,$value,$status,$probability,$fundraising_donations_id]); - foreach ($log AS $l) { - $stmt = $pdo->prepare("INSERT INTO fundraising_donor_logs (sponsors_id,dt,users_id,log) VALUES ( - ?, - NOW(), - ?, - ?)"); - $stmt->execute([$current->sponsors_id,$_SESSION['users_id'],$l]); - } - if ($pdo->errorInfo()) - echo error_($pdo->errorInfo()); - else - echo happy_('Saved sponsorship changes'); - } else - echo error_('No changes were made'); - } else { - echo error_('Required fields were missing, please try again' . print_r($_POST, true)); - } - exit; -} -if ($_POST['action'] == 'sponsorshipadd') { - if ($sponsors_id && $fundraising_type && $value) { - $stmt = $pdo->prepare("INSERT INTO fundraising_donations (sponsors_id,fundraising_type,value,status,probability,fiscalyear) VALUES (?,?,?,?,?,?)"); - $stmt->execute([$sponsors_id,$fundraising_type,$value,$status,$probability,$config['FISCALYEAR']]); - - $stmt = $pdo->prepare("INSERT INTO fundraising_donor_logs (sponsors_id,dt,users_id,log) VALUES (?,NOW(),?, Created sponsorship: type=?, value=\$?, status=?, probability=?%) "); - happy_('Added new sponsorship'); - $stmt->execute([$sponsors_id,$_SESSION['users_id'],$fundraising_type,$value,$status,$probability]); - } else - error_('Required fields were missing, please try again'); - if ($pdo->errorInfo()) - error_($pdo->errorInfo()); - exit; -} - -?> diff --git a/admin/fundraising_types.php b/admin/fundraising_types.php deleted file mode 100644 index 68e1429a..00000000 --- a/admin/fundraising_types.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT * FROM fundraising WHERE id=?"); - $q->execute([$id]); - // echo "

Edit Fund

"; - $fund = $q->fetch(PDO::FETCH_OBJ); - $formaction = 'fundedit'; -} else { - // echo "

Create New Fund

"; - $formaction = 'fundadd'; -} -echo '
'; -echo ""; -echo ""; - -echo ''; -if ($fund->system == 'yes') { - echo '\n"; - echo '\n"; - echo '\n"; -} else { - echo '\n"; - echo '\n"; - echo '\n"; -} -echo '\n"; -echo '\n"; -echo "
' . i18n('Type') . '' . i18n('System (non-editable)') . "
' . i18n('Name') . '' . htmlspecialchars($fund->name) . "
' . i18n('Key') . '' . htmlspecialchars($fund->type) . "
' . i18n('Type') . '' . i18n('Custom (editable)') . "
' . i18n('Name') . '
' . i18n('Key') . '
' . i18n('Description') . '
' . i18n('Goal') . "goal\">
\n"; -echo "
\n"; - -?> diff --git a/admin/gettranslation.php b/admin/gettranslation.php deleted file mode 100644 index 11120790..00000000 --- a/admin/gettranslation.php +++ /dev/null @@ -1,41 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - $ln) { - if ($l == $config['default_language']) - continue; - $q = $pdo->prepare("SELECT * FROM translations WHERE lang=? AND strmd5=?"); - $q->execute([$l,md5(iconv('ISO-8859-1', 'UTF-8', $_GET['str']))]); - if ($r = $q->fetch(PDO::FETCH_OBJ)) - $ret[$l] = iconv('ISO-8859-1', 'UTF-8', $r->val); - else - $ret[$l] = ''; -} -echo json_encode($ret); -?> diff --git a/admin/index.php b/admin/index.php deleted file mode 100644 index 67701a87..00000000 --- a/admin/index.php +++ /dev/null @@ -1,110 +0,0 @@ - - * Copyright (C) 2005-2008 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php'), - 'administration'); - -echo ''; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo "
' . theme_icon('participant_registration') . '
' . i18n('Participant Registration') . '
' . theme_icon('committee_management') . '
' . i18n('Committee Management') . '
' . theme_icon('judging_management') . '
' . i18n('Judging Management') . '
'; -if ($config['volunteer_enable'] == 'yes') - echo '' . theme_icon('volunteer_management') . '
' . i18n('Volunteer Management') . '
'; -else - // {echo theme_icon("volunteer_management")."
".i18n("Volunteer Management")."
(".i18n("disabled").")"}; - echo '
\n"; -echo '
'; -echo ''; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo " \n"; - -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; - -echo ''; -echo " \n"; - -echo ' '; -echo "\n"; -echo " \n"; -echo "
' . theme_icon('awards_management') . '
' . i18n('Awards Management') . '
' . theme_icon('schools_management') . '
' . i18n('Schools Management') . '
'; -if ($config['tours_enable'] == 'yes') - echo '' . theme_icon('tour_management') . '
' . i18n('Tour Management') . '
'; -else - // {echo theme_icon("tour_management")."
".i18n("Tour Management")."
(".i18n("disabled").")";} - echo '
'; -if ($config['participant_regfee_items_enable'] == 'yes') - echo '' . theme_icon('registration_fee_items_management') . '
' . i18n('Registration Fee Items Management') . '
'; -else - // {echo theme_icon("registration_fee_items_management")."
".i18n("Registration Fee Items Management")."
(".i18n("disabled").")";} - echo '
' . theme_icon('print/export_reports') . '
' . i18n('Print / Export Reports') . '
' . theme_icon('print_awards_ceremony_scripts') . '
' . i18n('Print Award Ceremony Scripts') . '
' . theme_icon('report_management') . '
' . i18n('Report Management') . '
' . theme_icon('translations_management') . '
' . i18n('Translations Management') . '
\n"; -echo '
'; -echo ''; -echo ' '; -echo ' '; - -/* - * echo " "; - * echo " "; - * echo " "; - */ -if (get_value_from_array($config, 'score_entry_enable') == 'yes') { - echo ''; -} -echo " \n"; -echo "
' . theme_icon('enter_winning_projects') . '
' . i18n('Enter Winning Projects') . '
".theme_icon("one-click_cwsf_registration")."
".i18n("One-Click CWSF Registration")."
".theme_icon("fair_stats")."
".i18n("Upload Fair Statistics")."
".theme_icon("sciencefair_management")."
".i18n("Feeder/Upstream Fair Management")."
' . theme_icon('judging_score_entry') . '
' . i18n('Judging Score Entry') . '
\n"; -echo '
'; -echo ''; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -if (get_value_from_array($config, 'score_entry_enable') == 'yes') { - echo ''; -} -// echo " "; -echo " \n"; -echo "
' . theme_icon('communication') . '
' . i18n('Communication (Send Emails)') . '
' . theme_icon('internal_document_management') . '
' . i18n('Internal Document Management') . '
' . theme_icon('website_content_management') . '
' . i18n('Website Content Management') . '
' . theme_icon('fundraising') . '
' . i18n('Fundraising') . '
' . theme_icon('judging_score_entry') . '
' . i18n('Evaluations Plugin') . '
Go To Evaluations
\n"; - -send_footer(); -?> diff --git a/admin/judges.inc.php b/admin/judges.inc.php deleted file mode 100644 index 6f46aee6..00000000 --- a/admin/judges.inc.php +++ /dev/null @@ -1,268 +0,0 @@ -prepare("SELECT judges_teams.id, - judges_teams.num, - judges_teams.name - FROM - judges_teams - WHERE - judges_teams.year=? - ORDER BY - num,name"); - $q->execute([$config['FAIRYEAR']]); - - $lastteamid = -1; - $lastteamnum = -1; - show_pdo_errors_if_any($pdo); - $teams = array(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $teams[$r->id]['id'] = $r->id; - $teams[$r->id]['num'] = $r->num; - $teams[$r->id]['name'] = $r->name; - $lastteamid = $r->id; - $lastteamnum = $r->num; - - /* Load timeslots */ - $rounds = array(); - $tq = $pdo->prepare("SELECT * FROM judges_teams_timeslots_link - LEFT JOIN judges_timeslots ON judges_timeslots.id=judges_teams_timeslots_link.judges_timeslots_id - WHERE judges_teams_timeslots_link.judges_teams_id=?"); - $tq->execute([$r->id]); - $teams[$r->id]['timeslots'] = array(); - $teams[$r->id]['rounds'] = array(); - - while ($ts = $tq->fetch(PDO::FETCH_ASSOC)) { - $teams[$r->id]['timeslots'][] = $ts; - $rounds[$ts['round_id']] = $ts['round_id']; - } - - foreach ($rounds as $round_id) { - $tq = $pdo->prepare("SELECT * FROM judges_timeslots WHERE id=?"); - $tq->execute([$round_id]); - $teams[$r->id]['rounds'][] = $tq->fetch(PDO::FETCH_ASSOC); - } - - // get the members for this team - $mq = $pdo->prepare("SELECT \t - users.id AS judges_id, - users.firstname, - users.lastname, - judges_teams_link.captain - FROM - users, - judges_teams_link - WHERE - judges_teams_link.users_id=users.id AND - judges_teams_link.judges_teams_id=? - ORDER BY - captain DESC, - lastname, - firstname"); - $mq->execute([$r->id]); - show_pdo_errors_if_any($pdo); - - $teamlangs = array(); - while ($mr = $mq->fetch(PDO::FETCH_OBJ)) { - $u = user_load($mr->judges_id, false); - $judgelangs = join('/', $u['languages']); - foreach ($u['languages'] AS $l) { - if (!in_array($l, $teamlangs)) - $teamlangs[] = $l; - } - - $teams[$lastteamid]['members'][] = array( - 'id' => $mr->judges_id, - 'firstname' => $mr->firstname, - 'lastname' => $mr->lastname, - 'captain' => $mr->captain, - 'languages' => $judgelangs, - 'languages_array' => $u['languages'] - ); - } - $teams[$r->id]['languages_members'] = $teamlangs; - - // we also need to add all the languages that the team must JUDGE to the teams languages. - $lq = $pdo->prepare("SELECT projects.language - FROM judges_teams_timeslots_projects_link - LEFT JOIN projects ON judges_teams_timeslots_projects_link.projects_id=projects.id - WHERE judges_teams_timeslots_projects_link.year=? AND - judges_teams_id=? AND language!='' "); - $lq->execute([$config['FAIRYEAR'],$r->id]); - show_pdo_errors_if_any($pdo); - $projectlangs = array(); - while ($lr = $lq->fetch(PDO::FETCH_OBJ)) { - if (!in_array($lr->language, $projectlangs)) - $projectlangs[] = $lr->language; - if (!in_array($lr->language, $teamlangs)) - $teamlangs[] = $lr->language; - } - $teams[$r->id]['languages_projects'] = $projectlangs; - $teams[$r->id]['languages'] = $teamlangs; - - // get the awards for this team - $aq = $pdo->prepare("SELECT award_awards.id, - award_awards.name, - award_awards.criteria, - award_awards.award_types_id, - award_types.type AS award_type - FROM - award_awards, - judges_teams_awards_link, - award_types - WHERE - judges_teams_awards_link.award_awards_id=award_awards.id - AND judges_teams_awards_link.judges_teams_id=? - AND award_awards.award_types_id=award_types.id - AND award_types.year=? - ORDER BY - name - "); - $aq->execute([$r->id,$config['FAIRYEAR']]); - while ($ar = $aq->fetch(PDO::FETCH_OBJ)) { - $teams[$r->id]['awards'][] = array( - 'id' => $ar->id, - 'name' => $ar->name, - 'criteria' => $ar->criteria, - 'award_types_id' => $ar->award_types_id, - 'award_type' => $ar->award_type - ); - } - } - return $teams; -} - -function getJudgingTeam($teamid) -{ - global $config; - global $pdo; - $q = $pdo->prepare("SELECT \tjudges_teams.id, - judges_teams.num, - judges_teams.name - - FROM - judges_teams - WHERE - judges_teams.year=? AND - judges_teams.id=? - ORDER BY - num, - name - "); - $q->execute([$config['FAIRYEAR'],$teamid]); - - $team = array(); - - $first = true; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $team['id'] = $r->id; - $team['num'] = $r->num; - $team['name'] = $r->name; - - // get the members for this team - $mq = $pdo->prepare("SELECT \t - users.id AS judges_id, - users.firstname, - users.lastname, - judges_teams_link.captain - - FROM - users, - judges_teams_link - WHERE - judges_teams_link.users_id=users.id AND - judges_teams_link.judges_teams_id=? - ORDER BY - captain DESC, - lastname, - firstname"); - $mq->execute([$r->id]); - show_pdo_errors_if_any($pdo); - - while ($mr = $mq->fetch(PDO::FETCH_OBJ)) { - $team['members'][] = array( - 'id' => $mr->judges_id, - 'firstname' => $mr->firstname, - 'lastname' => $mr->lastname, - 'captain' => $mr->captain - ); - } - - // get the awards for this team - $aq = $pdo->prepare("SELECT award_awards.id, - award_awards.name, - award_awards.award_types_id, - award_types.type AS award_type - FROM - award_awards, - judges_teams_awards_link, - award_types - WHERE - judges_teams_awards_link.award_awards_id=award_awards.id - AND judges_teams_awards_link.judges_teams_id=? - AND award_awards.award_types_id=award_types.id - AND award_types.year=? - ORDER BY - name - "); - $aq->execute([$r->id,$config['FAIRYEAR']]); - while ($ar = $aq->fetch(PDO::FETCH_OBJ)) { - $team['awards'][] = array( - 'id' => $ar->id, - 'name' => $ar->name, - 'award_types_id' => $ar->award_types_id, - 'award_type' => $ar->award_type - ); - } - } - - return $team; -} - -function getJudgingEligibilityCode() -{ - global $config; - switch ($config['project_status']) { - case 'open': - return " AND registrations.status != 'open' "; - break; - case 'payment_pending': - return " AND registrations.status IN ('paymentpending', 'complete')"; - break; - case 'complete': - return " AND registrations.status = 'complete'"; - break; - } -} - -function teamMemberToName($member) -{ - return $member['firstname'] . ' ' . $member['lastname']; -} - -function judges_load_all() -{ - global $config, $pdo; - - $ret = array(); - - $query = "SELECT id FROM users WHERE types LIKE '%judge%' - AND year=? - AND deleted='no' - ORDER BY lastname, firstname"; - $r = $pdo->prepare($query); - $r->execute([$config['FAIRYEAR']]); - while ($i = $r->fetch(PDO::FETCH_ASSOC)) { - $u = user_load($i['id']); - if ($u['judge_complete'] == 'no') - continue; - if ($u['judge_active'] == 'no') - continue; - - $ret[$i['id']] = $u; - } - return $ret; -} - -?> diff --git a/admin/judges.php b/admin/judges.php deleted file mode 100644 index 90382fb4..00000000 --- a/admin/judges.php +++ /dev/null @@ -1,53 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'judging_management'); -echo '
'; -echo '' . i18n('Judges') . ''; -echo '' . i18n('Create the Judging Schedule') . ''; -echo '' . i18n('Edit the Judging Schedule') . ''; - -send_footer(); - -?> diff --git a/admin/judges_info.php b/admin/judges_info.php deleted file mode 100644 index 6d91a0fa..00000000 --- a/admin/judges_info.php +++ /dev/null @@ -1,258 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'Very Low', - -1 => 'Low', - 0 => 'Indifferent', - 1 => 'Medium', - 2 => 'High' -); - -$id = intval($_GET['id']); -$judgeinfo = user_load($id); - -send_popup_header('Judge Information'); -echo '
'; - -if ($id < 1) { - echo error(i18n('No Judge ID passed to Judges Info')); - send_popup_footer(); - exit; -} - -?> - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
::
::
::
::
::
- -prepare("SELECT * FROM judges_availability WHERE users_id=? ORDER BY `start`"); - $q->execute([$judgeinfo['id']]); - $sel = array(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $st = substr($r->start, 0, 5); - $end = substr($r->end, 0, 5); - $availabilityText .= "
  • $st - $end
  • "; - } - if (strlen($availabilityText) > 0) { - $availabilityText = '
      ' . $availabilityText . '
    '; - } else { - $availabilityText = i18n('Unspecified'); - } -} -echo '
    '; - -// is their info complete? -$completeText = $judgeinfo['judge_complete'] == 'yes' ? 'Yes' : 'No'; -$activeText = $judgeinfo['judge_active'] == 'yes' ? 'Yes' : 'No'; - -// find out if they've signed up for judging any special awards -$specialAwardsText = ''; -if ($judgeinfo['special_award_only'] == 'yes') { - $query = 'SELECT aa.name AS awardname FROM judges_specialaward_sel jss' - . ' JOIN users ON jss.users_id = users.id' - . ' JOIN award_awards aa ON aa.id = jss.award_awards_id' - . ' WHERE users.id=?'; - $results = $pdo->prepare($query); - $results->execute([$id]); - while ($record = $results . fetch()) { - $awardList[] = $record['awardname']; - } - $specialAwardsText .= implode(', ', $awardList); -} else { - $specialAwardsText .= i18n('None'); -} - -// get their preference for age category -$q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=?"); -$q->execute([$config['FAIRYEAR']]); - -$catPreferenceText = $pdo->errorInfo() . '
      '; -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $p = intval($judgeinfo['cat_prefs'][$r->id]); - $catPreferenceText .= '
    • ' . i18n($r->category) . ": {$preferencechoices[$p]}
    • "; -} -$catPreferenceText .= '
    '; - -?> - - - - -
    -
      - -
    • : -
    • - -
    • : -
    • - -
    • : -
    • - -
    • : -
    • - -
    • : -
    • - - ' . i18n('Time Availability') . ': '; - echo $availabilityText . ''; - } - ?> -
    -
    -

    - -prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); -$q->execute([$config['FAIRYEAR']]); -$divs = array(); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $divs[] = $r->id; - $divnames[$r->id] = $r->division; -} - -foreach ($divs as $div) { - $p = $judgeinfo['div_prefs'][$div]; - echo ''; - echo " "; - - echo ''; - echo ''; -} -echo "\n"; -echo ' '; -echo " \n"; -echo "\n"; -?> -
    ' . i18n($divnames[$div]) . ':$p/5'; - $subq = $pdo->prepare("SELECT * FROM projectsubdivisions WHERE - projectdivisions_id=? AND year=? ORDER BY subdivision"); - $subq->execute([$div,$config['FAIRYEAR']]); - $sd = array(); - while ($subr = $subq->fetch(PDO::FETCH_OBJ)) { - if ($u['div_prefs_sub'][$subr->id] == 1) { - $sd[] = $subdivr->subdivision; - } - } - - // Only show subdiv if main div >=3 - if ($p >= 3) - echo implode(', ', $sd); - else - echo ' '; - - echo '
    ' . i18n('Other') . ':{$judgeinfo['expertise_other']}
    "; -echo "
    -
    -
    '; - -/* - * send_popup_header("Judge Information"); - */ - -/* - * echo "\n"; - * echo " ".i18n("Time Availability").":"; - * $q = mysql_query("SELECT * FROM judges_availability WHERE users_id=\"{$judgeinfo['id']}\" ORDER BY `start`"); - * $sel = array(); - * while($r=$q->fetch(PDO::FETCH_OBJ)) { - * $st = substr($r->start, 0, 5); - * $end = substr($r->end, 0, 5); - * echo "$st - $end
    "; - * } - * echo ""; - * echo ""; - */ - -// send_popup_footer(); -?> diff --git a/admin/judges_invite.php b/admin/judges_invite.php deleted file mode 100644 index ddfd3443..00000000 --- a/admin/judges_invite.php +++ /dev/null @@ -1,63 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judges' => 'admin/judges.php')); -echo '
    '; -if ($_POST['action'] == 'invite' && $_POST['email']) { - $q = $pdo->prepare("SELECT id FROM judges WHERE email=?"); - $q->execute([$_POST['email']]); - if ($q->rowCount()) { - echo error(i18n('A judge already exists with that email address')); - } else { - $pass = generatePassword(); - $hash = password_hash($pass, PASSWORD_BCRYPT); - $stmt = $pdo->prepare("INSERT INTO judges (email,password) VALUES (?, ?)"); - $stmt->execute([$_POST['email'], $hash]); - email_send('new_judge_invite', stripslashes($_POST['email']), array('FAIRNAME' => $config['fairname']), array('FAIRNAME' => $config['fairname'], 'EMAIL' => stripslashes($_POST['email']), 'PASSWORD' => $pass)); - - echo happy(i18n('%1 has been invited to be a judge', array($_POST['email']))); - } -} - -echo i18n("Enter the judge's email address to invite them to be a judge"); -echo "
    \n"; -echo "
    \n"; -echo "
    \n"; -echo "\n"; -echo i18n('Email') . ': '; -echo "\n"; -echo '\n"; -echo "
    \n"; - -send_footer(); -?> diff --git a/admin/judges_jdiv.php b/admin/judges_jdiv.php deleted file mode 100644 index 8e393cd6..00000000 --- a/admin/judges_jdiv.php +++ /dev/null @@ -1,344 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judges' => 'admin/judges.php')); -echo i18n('Instructions: The goal is to create groupings that have the least number of divisions/categories required to have at least %1 projects in the group. %1 is the number of projects that a single team can judge that you have specifed in the judge scheduler configuration. Judge division groupings indicate which divisions/categories can be judged together (by the same team of judges), so the divisons/categories should be somewhat similar to ensure there are judges that can handle judging all divisions assigned to a grouping.', array($config['max_projects_per_team'])); -?> - - - -prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); -$q->execute([$config['FAIRYEAR']]); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $divshort[$r->id] = $r->division_shortform; - $div[$r->id] = $r->division; -} - -$cat = array(); -$q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY id"); -$q->execute([$config['FAIRYEAR']]); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $cat[$r->id] = $r->category; -} - -$dkeys = array_keys($div); -$ckeys = array_keys($cat); - -if ($config['filterdivisionbycategory'] == 'yes') { - $q = $pdo->prepare("SELECT * FROM projectcategoriesdivisions_link WHERE year=? ORDER BY projectdivisions_id,projectcategories_id"); - $q->execute([$config['FAIRYEAR']]); - $divcat = array(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $divcat[] = array('c' => $r->projectcategories_id, 'd' => $r->projectdivisions_id); - } -} else { - $divcat = array(); - foreach ($dkeys AS $d) { - foreach ($ckeys AS $c) { - $divcat[] = array('c' => $c, 'd' => $d); - } - } -} - -$langr = array(); -$q = $pdo->prepare("SELECT * FROM languages WHERE active='Y'"); -$q->execute(); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $langr[$r->lang] = $r->langname; -} - -function get_all_divs() -{ - global $config, $pdo; - global $divshort, $div, $cat, $langr; - global $divcat; - - $cdlcheck = array(); - $cdl = array(); - $q = $pdo->prepare('SELECT * FROM judges_jdiv'); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $cdl[$r->id]['id'] = $r->id; - $cdl[$r->id]['jdiv'] = $r->jdiv_id; - $cdl[$r->id]['div'] = $r->projectdivisions_id; - $cdl[$r->id]['cat'] = $r->projectcategories_id; - $cdl[$r->id]['lang'] = $r->lang; - - $cdlcheck[$r->projectcategories_id][$r->projectdivisions_id][$r->lang] = 1; - } - - /* Check for missing cdls */ - $divkeys = array_keys($divshort); - $catkeys = array_keys($cat); - $lankeys = array_keys($langr); - - foreach ($divcat AS $dc) { - $y = $dc['d']; - $x = $dc['c']; - foreach ($lankeys as $z) { - if ($cdlcheck[$x][$y][$z] == 1) - continue; - - /* - * Also, make an entry in the DB, so that this isn't - * unassigned anymore - */ - $stmt = $pdo->prepare('INSERT INTO judges_jdiv (id, jdiv_id, projectdivisions_id, projectcategories_id, lang) ' - . " VALUES('', 0,?,?,?)"); - $stmt->execute([$y,$x,$z]); - $q = $pdo->prepare('SELECT id FROM judges_jdiv WHERE ' - . " projectdivisions_id=?" - . " AND projectcategories_id=?" - . " AND lang=?"); - $q->execute([$y,$x,$z]); - $r = $q->fetch(PDO::FETCH_OBJ); - - $cdl[$r->id]['id'] = $r->id; - $cdl[$r->id]['jdiv'] = 0; /* Unassigned */ - $cdl[$r->id]['cat'] = $x; - $cdl[$r->id]['div'] = $y; - $cdl[$r->id]['lang'] = $z; - } - reset($lankeys); - } - reset($divcat); - - /* Make names for all the DCLs, and count the number of projects */ - $dkeys = array_keys($cdl); - foreach ($dkeys as $id) { - $x = $cat[$cdl[$id]['cat']]; - $y = $divshort[$cdl[$id]['div']]; - $z = $div[$cdl[$id]['div']]; - $q = $pdo->prepare('SELECT count(projects.id) AS cnt FROM projects,registrations WHERE ' - . " projectdivisions_id=?" - . " AND projectcategories_id=?" - . " AND language=?" - . " AND registrations.year=?" - . ' AND projects.registrations_id=registrations.id' - . " AND (registrations.status='complete' OR registrations.status='paymentpending')"); - $q->execute([$cdl[$id]['div'],$cdl[$id]['cat'],$cdl[$id]['lang'],$config['FAIRYEAR']]); - - $r = $q->fetch(PDO::FETCH_OBJ); - show_pdo_errors_if_any($pdo); - $c = $r->cnt; - - $cdl[$id]['name'] = "$x $y ({$cdl[$id]['lang']}) ($c project" . ($c == 1 ? '' : 's') . ')'; - $cdl[$id]['lname'] = "$x $z ({$cdl[$id]['lang']}) ($c project" . ($c == 1 ? '' : 's') . ')'; - $cdl[$id]['projects'] = $c; - } - return $cdl; -} - -if (get_value_from_array($_POST, 'action') == 'add' && get_value_from_array($_POST, 'jdiv_id') && count(get_value_from_array($_POST, 'cdllist', [])) > 0) { - foreach ($_POST['cdllist'] AS $selectedcdl) { - $q = $pdo->prepare("UPDATE judges_jdiv SET jdiv_id=? WHERE " - . " id=?"); - $q->execute([$_POST['jdiv_id'],$selectedcdl]); - } - echo happy(i18n('Judging Division(s) successfully added')); -} - -if (get_value_from_array($_GET, 'action') == 'del' && get_value_from_array($_GET, 'cdl_id')) { - $stmt = $pdo->prepare("UPDATE judges_jdiv SET jdiv_id=0 WHERE id=?"); - $stmt->execute([$_GET['cdl_id']]); -} - -if (get_value_from_array($_GET, 'action') == 'empty' && get_value_from_array($_GET, 'jdiv_id')) { - $stmt = $pdo->prepare("UPDATE judges_jdiv SET jdiv_id=0 WHERE jdiv_id=?"); - $stmt->execute([$_GET['jdiv_id']]); - echo happy(i18n('Emptied all divisions from Judging Division Group %1', array($_GET['jdiv_id']))); -} - -if (get_value_from_array($_GET, 'action') == 'recreate') { - // just delete them all, they'll be recreated automagically - $stmt = $pdo->prepare('TRUNCATE TABLE judges_jdiv'); - $stmt->execute(); - echo happy(i18n('Recreated all division/category/language options')); -} - -/* Sort out all the judging divisions */ -$cdl = get_all_divs(); - -$dkeys = array_keys($cdl); - -/* - * Count the divisions, or, use the posted variable so we can create new - * and empty judging divisions - */ -if (get_value_from_array($_POST, 'jdivs') > 0) { - $jdivs = $_POST['jdivs']; -} else { - $jdivs = 0; - foreach ($dkeys as $d) { - if ($cdl[$d]['jdiv'] > $jdivs) - $jdivs = $cdl[$d]['jdiv']; - } -} - -reset($dkeys); -$showdivlist = false; -foreach ($dkeys as $id) { - if ($cdl[$id]['jdiv'] == 0) { - $showdivlist = true; - break; - } -} - -echo '
    '; -echo ''; -echo ""; -echo ''; -echo ''; -echo ''; -echo ''; - -if ($showdivlist) { - echo ''; -} -echo ''; -echo ''; -echo ''; - -if ($showdivlist) { - echo ''; -} -echo ''; -echo '
    ' . i18n('Division List'); - echo '
    '; - echo '
    ' . i18n('Judging Division Groups') . '
    '; - echo ''; - echo ''; - -/* Print he groupings of the assigned ones */ -for ($jdiv = 1; $jdiv <= $jdivs; $jdiv++) { - echo '
    '; - - echo ''; - echo '
    '; - if ($showdivlist) { - echo "
    "; - } - echo '
    '; - echo ""; - echo ''; - echo ' ' . i18n('Empty') . ' '; - echo ''; - - echo '
    '; - - $p = 0; - reset($dkeys); - foreach ($dkeys as $id) { - if ($cdl[$id]['jdiv'] != $jdiv) - continue; - $p += $cdl[$id]['projects']; - } - - echo "\n"; - echo "\n"; - - $x = 0; - reset($dkeys); - foreach ($dkeys as $id) { - if ($cdl[$id]['jdiv'] != $jdiv) - continue; - - echo ''; - $x++; - } - - if ($x) { - echo ''; - } else { - echo ''; - } - - echo '
    Judging Division $jdiv ($p project" . ($p == 1 ? '' : 's') . ')'; - echo "
    '; - echo "'; - echo ''; - - echo $cdl[$id]['lname']; - echo '
    '; - // echo ""; - // echo " ".i18n("Empty All Divisions")." "; - // echo ""; - // echo ""; - echo '
    '; - echo error(i18n('No divisions present'), 'inline'); - echo '
    '; - - echo '
    '; -} -echo '
    '; - -echo '
    '; - -echo '
    '; -echo '
    '; - -echo '
    '; -echo '' . i18n('Re-create all division/category/language options') . '. ' . i18n('This will completely empty ALL of your groupings and recreate all the possibly division/category/language options. Do this if for example you end up with a division/category that should not exist (due to the config option to filter divisions by category, or due to changing your divisions/categories alltogether)'); -echo '
    '; -echo '
    '; - -send_footer(); - -?> diff --git a/admin/judges_sa.php b/admin/judges_sa.php deleted file mode 100644 index 11f47c91..00000000 --- a/admin/judges_sa.php +++ /dev/null @@ -1,1640 +0,0 @@ - - * Copyright (C) 2008-2012 Youth Science Ontario - * Copyright (C) 2005-2012 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -run($bat_filename,0,false ); for Windows IIS it seems: -// All the $_SERVER variables are set as if were a website page so any variable I have tried will cause a bailout -// THUS.. There is no test I have found to verify this was run from the command line (or in background) for Windows -if (get_value_from_array($_SERVER, 'SERVER_ADDR')) { - echo 'This script must be run from the command line'; - exit; -} - -// function TRACE() { } -// function TRACE_R() { } -function TRACE($str) -{ - print ($str); -} - -function TRACE_R($array) -{ - print_r($array); -} - -TRACE('
    ');
    -
    -$round_divisional1 = NULL;
    -$round_divisional2 = NULL;
    -
    -function set_status($txt)
    -{
    -	global $pdo;
    -	TRACE("Status: $txt\n");
    -	$stmt = $pdo->prepare("UPDATE config SET val=? WHERE 
    -			var='judge_scheduler_activity' AND year=0");
    -	$stmt->execute([$txt]);
    -}
    -
    -$set_percent_last_percent = -1;
    -
    -function set_percent($n)
    -{
    -	global $pdo;
    -	global $set_percent_last_percent;
    -	$p = floor($n);
    -	if ($p == $set_percent_last_percent)
    -		return;
    -	TRACE("Progress: $p\%\n");
    -	$stmt = $pdo->prepare("UPDATE config SET val=? WHERE 
    -			var='judge_scheduler_percent' AND year=0");
    -	$stmt->execute([$p]);
    -	$set_percent_last_percent = $p;
    -}
    -
    -set_status('Initializing...');
    -set_percent(0);
    -
    -/*
    - * The cost function is:
    - *  + 50 * each judge below the min for each team
    - *  + 10 * each judge above the max for each team
    - *  +  2 * each level of preference away from the
    - *      max level for each judge
    - *  + 40 if the team doesn't have a chair.
    - *  + 25 for each memember on the team that can't speak the language
    - *       of the judging team
    - *
    - *  ( ex: if a judge has selected LS->2, PS->0, CS->-1
    - *      	then matching that judge with a:
    - *      LS = -4,
    - *      PS = 0,
    - *      CS = -2,
    - *      else = 0
    - *  )
    - */
    -
    -/* Compute the cost of adding a judge to a team */
    -
    -function judges_cost_function($annealer, $bucket_id, $ids)
    -{
    -	global $config;
    -	global $jteam;
    -	global $judges, $round_divisional2;
    -
    -	/* Bucket ID is the team number */
    -	/* ids are the judge ids currently in the bucket */
    -
    -	//	TRACE("Bucket id=$bucket_id, ids=");
    -	//	TRACE_R($ids);
    -
    -	$cost = 0;
    -	$have_chair = false;
    -	$have_div2 = false;
    -	$years_experience = 0;
    -
    -	if ($bucket_id == 0) {
    -		/*
    -		 * This is the placeholder for all judges, there's a slight
    -		 * cost for not using a judge
    -		 */
    -		$cost = count($ids) * 5;
    -		//		TRACE("Extra judge team cost=$cost\n");
    -		return $cost;
    -	}
    -
    -	$t = &$jteam[$bucket_id];
    -
    -	/* Compute the over max / under min costs */
    -	$c = count($ids);
    -	$min = ($c < $t['min_judges']) ? $t['min_judges'] - $c : 0;
    -	$max = ($c > $t['max_judges']) ? $c - $t['max_judges'] : 0;
    -	$cost += $min * 50;
    -	$cost += $max * 10;
    -
    -	// add an additional large cost above the minimum requirement cost if the team is completely empty
    -	if ($c == 0)
    -		$cost += 50;
    -
    -	//	TRACE("Under min=$min, over max=$max\n");
    -
    -	/* For each judge on the team, score their preferences */
    -	for ($x = 0; $x < count($ids); $x++) {
    -		$j = &$judges[$ids[$x]];
    -
    -		/*
    -		 * Get the division, and see where it fits with this
    -		 * judges preferences
    -		 */
    -		$cpref = 0;
    -		for ($y = 0; $y < count($t['cats']); $y++) {
    -			$l = $t['cats'][$y];
    -			/* Lookup the judge cat pref for this category */
    -			$pref = -$j['cat_prefs'][$l] + 2;
    -			/* $pref = 0 (best match) --- 4 (worst match) */
    -			// but wait, if they're "indifferent" then we really dont care, so the cost for it shoudl be 0.
    -			if ($pref == 2)
    -				$pref = 0;
    -
    -			$cpref += $pref;
    -		}
    -		$dpref = 0;
    -		for ($y = 0; $y < count($t['divs']); $y++) {
    -			$l = $t['divs'][$y];
    -			/* Lookup the judge cat pref for this category */
    -			$pref = -$j['div_prefs'][$l] + 5;
    -			/* $pref = 0 (best match) --- 4 (worst match) */
    -			$dpref += $pref;
    -		}
    -
    -		//		TRACE("Judge {$ids[$x]}({$j['name']}) cp=$cpref, dp=$dpref\n");
    -
    -		$cost += 2 * $cpref;
    -		// division matching is more important than category matching
    -		$cost += 3 * $dpref;
    -
    -		/* See if the judge is willing to chair a team */
    -		if ($j['willing_chair'] == 'yes')
    -			$have_chair = true;
    -
    -		/*
    -		 * For each lang the team needs that the judge doesn't have,
    -		 * increase the cost
    -		 */
    -		for ($y = 0; $y < count($t['langs']); $y++) {
    -			$l = $t['langs'][$y];
    -			if (!in_array($l, $j['languages']))
    -				$cost += 45;
    -		}
    -
    -		/*
    -		 * For each additional language that the judge knows that they dont need
    -		 * increase the cost, this should hopefully stop the condition where
    -		 * it uses up all the bilingual judges for english only teams
    -		 * leaving no french/bilingual judges for the french teams
    -		 */
    -		$tlangs_count = count($t['langs']);
    -		$jlangs_count = count($j['languages']);
    -		if ($jlangs_count > $tlangs_count)
    -			$cost += ($jlangs_count - $tlangs_count) * 15;
    -
    -		/*
    -		 * If divisional round2 is enabled, make sure there is a judge
    -		 * on the team for round2
    -		 */
    -		if ($j['available_for_divisional2'] == true)
    -			$have_div2 = true;
    -
    -		/* Add up the years experience */
    -		$years_experience += $j['years_school'] + $j['years_regional'] + $j['years_national'];
    -		$years_experience_weighted += $j['years_school'] + $j['years_regional'] * 2 + $j['years_national'] * 4;
    -	}
    -	/* Huge penalty for a team without a willing chair, but only if the min judges per team >1 */
    -	if (!$have_chair && $config['min_judges_per_team'] > 1)
    -		$cost += 40;
    -
    -	/* Huge penalty for not having a round2 person on the team */
    -	if ($round_divisional2 != NULL) {
    -		if ($have_div2 == false)
    -			$cost += 40;
    -	}
    -
    -	/*
    -	 * Small penalty for a jteam with very little experience,
    -	 * but only if there's more than 1 person on the team
    -	 */
    -	if ($years_experience_weighted < 5 && count($ids) > 1) {
    -		$cost += (5 - $years_experience_weighted) * 2;
    -	}
    -
    -	//	TRACE("Team $bucket_id, cost is $cost\n");
    -
    -	return $cost;
    -}
    -
    -$current_jdiv = array();
    -
    -function jdiv_compute_cost($annealer, $bucket_id, $ids)
    -{
    -	/* IDS is a list of project ids for a judging team */
    -	global $current_jdiv;
    -
    -	$cost = 0;
    -	$t_div = array();
    -	$t_cat = array();
    -	$t_lang = array();
    -
    -	/*
    -	 * Foreach project this jteam is judging, record the
    -	 * div/cat/lang
    -	 */
    -	for ($x = 0; $x < count($ids); $x++) {
    -		$proj = &$current_jdiv['projects'][$ids[$x]];
    -		if (!in_array($proj['div'], $t_div))
    -			$t_div[] = $proj['div'];
    -		if (!in_array($proj['cat'], $t_cat))
    -			$t_cat[] = $proj['cat'];
    -		if (!in_array($proj['lang'], $t_lang))
    -			$t_lang[] = $proj['lang'];
    -	}
    -	/* Square the project count for highter penalties for more projects */
    -	$cost += floor(abs(count($ids) - $annealer->items_per_bucket)) * 100;
    -	/* Score 100 pts for multiple languages */
    -	$cost += (count($t_lang) - 1) * 75;
    -	/* Score 25pts for multiple divs/cats */
    -	$cost += (count($t_div) - 1) * 25;
    -	$cost += (count($t_cat) - 1) * 25;
    -
    -	/*
    -	 * Score +200 pts for each duplicate project this team is judging, we
    -	 * really don't want a jteam judging the same project twice
    -	 */
    -	for ($x = 0; $x < count($ids) - 1; $x++) {
    -		for ($y = $x + 1; $y < count($ids); $y++) {
    -			if ($ids[$x] == $ids[$y])
    -				$cost += 200;
    -		}
    -	}
    -	return $cost;
    -}
    -
    -/*
    - * Returns true if a judge time preference indicates they are available for the
    - * specified round.  Always returns true if judge time availablility selection
    - * is off
    - */
    -function judge_available_for_round($j, $r)
    -{
    -	global $config;
    -	if ($config['judges_availability_enable'] == 'no')
    -		return true;
    -
    -	foreach ($j['availability'] as $a) {
    -		if ($a['start'] <= $r['starttime'] &&
    -				$a['end'] >= $r['endtime'] &&
    -				$a['date'] == $r['date']) {
    -			return true;
    -		}
    -	}
    -	return false;
    -}
    -
    -function judge_mark_for_round($j, $r)
    -{
    -	/*
    -	 * The judge has been assigned to round $r, modify their available to
    -	 * exclude any time that falls within this time
    -	 * TODO: modify the DB to store date/times in timestamps, so we don't
    -	 * have to deal with dates separately.
    -	 */
    -	global $config;
    -	global $judges;
    -	if ($config['judges_availability_enable'] == 'no')
    -		return true;
    -
    -	/*
    -	 * Grab a pointer to the real judge, because we want to
    -	 * modify it, not a copy of it
    -	 */
    -	$ju = &$judges[$j['id']];
    -
    -	$availability = &$ju['availability'];
    -	foreach ($availability as $key => &$a) {
    -		if ($r['starttime'] >= $a['start'] && $r['starttime'] <= $a['end']) {
    -			/*
    -			 * Round starts in the middle of this availablity slot
    -			 * modify this availabilty so it doesn't overlap
    -			 */
    -			/* This may cause $a['start'] == $a['end'], that's ok */
    -			$a['end'] = $r['starttime'];
    -			//			TRACE("adjust starttime\n");
    -		}
    -
    -		if ($r['endtime'] >= $a['start'] && $r['endtime'] <= $a['end']) {
    -			/*
    -			 * Round ends in the middle of this availablity slot
    -			 * modify this availabilty so it doesn't overlap
    -			 */
    -			/* This may cause $a['start'] == $a['end'], that's ok */
    -			$a['start'] = $r['endtime'];
    -			//			TRACE("adjust endtime\n");
    -		}
    -
    -		if ($a['start'] >= $a['end']) {
    -			/* Delete the whole round */
    -			unset($ju['availability'][$key]);
    -		}
    -	}
    -
    -	//	print_r($ju['availability']);
    -}
    -
    -/*
    - * UNUSED: should be moved to the timeslot manager to ensure rounds
    - * don't overlap.
    - */
    -function rounds_overlap($r1, $r2)
    -{
    -	$s1 = strtotime("{$r1['date']} {$r1['starttime']}");
    -	$e1 = strtotime("{$r1['date']} {$r1['endtime']}");
    -	$s2 = strtotime("{$r1['date']} {$r2['starttime']}");
    -	$e2 = strtotime("{$r1['date']} {$r2['endtime']}");
    -
    -	if ($s1 <= $s2 && $e1 > $s1)
    -		return true;
    -	if ($s1 > $s2 && $s1 < $e2)
    -		return true;
    -	return false;
    -}
    -
    -/* Print a judge */
    -function pr_judge(&$jt, $jid)
    -{
    -	global $judges;
    -	$j = &$judges[$jid];
    -	print ("   - {$j['name']} (" . join(' ', $j['languages']) . ')');
    -	print ('(');
    -	foreach ($jt['cats'] as $c)
    -		print ("c{$c}={$j['cat_prefs'][$c]} ");
    -	echo ' / ';
    -	foreach ($j['cat_prefs'] AS $k => $v) {
    -		print ("c{$k}=$v ");
    -	}
    -	echo ') (';
    -
    -	foreach ($jt['divs'] as $d)
    -		print ("d{$d}={$j['div_prefs'][$d]} ");
    -
    -	echo ' / ';
    -	foreach ($j['div_prefs'] AS $k => $v) {
    -		print ("d{$k}=$v ");
    -	}
    -
    -	print (')');
    -	if ($j['willing_chair'] == 'yes')
    -		print (' chair ');
    -
    -	print ("\n");
    -}
    -
    -set_status('Loading Data From Database...');
    -TRACE("\n\n");
    -$div = array();
    -TRACE("Loading Project Divisions...\n");
    -$q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id");
    -$q->execute([$config['FAIRYEAR']]);
    -while ($r = $q->fetch(PDO::FETCH_OBJ)) {
    -	$divshort[$r->id] = $r->division_shortform;
    -	$div[$r->id] = $r->division;
    -	TRACE("   {$r->id} - {$div[$r->id]}\n");
    -}
    -
    -TRACE("Loading Project Age Categories...\n");
    -$cat = array();
    -$q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY id");
    -$q->execute([$config['FAIRYEAR']]);
    -while ($r = $q->fetch(PDO::FETCH_OBJ)) {
    -	$cat[$r->id] = $r->category;
    -	TRACE("   {$r->id} - {$r->category}\n");
    -}
    -
    -TRACE("Loading Languages...\n");
    -$langr = array();
    -$q = $pdo->prepare("SELECT * FROM languages WHERE active='Y'");
    -$q->execute();
    -while ($r = $q->fetch(PDO::FETCH_OBJ)) {
    -	$langr[$r->lang] = $r->langname;
    -	TRACE("   {$r->lang} - {$r->langname}\n");
    -}
    -
    -TRACE("Loading Judging Round time data...\n");
    -$round_special_awards = array();
    -$round = array();
    -$q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE round_id='0' AND `year`=?");
    -$q->execute([$config['FAIRYEAR']]);
    -/* Loads judges_timeslots.id, .starttime, .endtime, .date, .name */
    -while ($r = $q->fetch(PDO::FETCH_ASSOC)) {
    -	TRACE("   id:{$r['id']} type:{$r['type']} name:{$r['name']}\n");
    -
    -	$qq = $pdo->prepare("SELECT * FROM judges_timeslots WHERE round_id=?");
    -	$qq->execute([$r['id']]);
    -	if ($qq->rowCount() == 0) {
    -		echo "ERROR: Round type:{$r['type']} name:{$r['name']} has no judging timeslots!  Abort.\n";
    -		exit;
    -	}
    -	while ($rr = $qq->fetch(PDO::FETCH_ASSOC)) {
    -		TRACE("      Timeslot: {$rr['starttime']}-{$rr['endtime']}\n");
    -		$r['timeslots'][] = $rr;
    -	}
    -	$round[] = $r;
    -
    -	if ($r['type'] == 'divisional1')
    -		$round_divisional1 = $r;
    -	if ($r['type'] == 'divisional2')
    -		$round_divisional2 = $r;
    -	if ($r['type'] == 'special')
    -		$round_special_awards[] = $r;
    -}
    -
    -if ($round_divisional1 == NULL) {
    -	echo "No divisional1 round defined! Aborting!\n";
    -	exit;
    -}
    -
    -$jdiv = array();
    -TRACE("Loading Judging Division Configuration and Projects...\n");
    -$q = $pdo->prepare('SELECT * FROM judges_jdiv');
    -$q->execute();
    -while ($r = $q->fetch(PDO::FETCH_OBJ)) {
    -	/* Ignore jdiv 0 (all unassigned div/cats) */
    -	if ($r->jdiv_id == 0)
    -		continue;
    -
    -	$jdiv[$r->jdiv_id]['config'][] = array('div' => $r->projectdivisions_id,
    -		'cat' => $r->projectcategories_id,
    -		'lang' => $r->lang);
    -}
    -
    -$keys = array_keys($jdiv);
    -foreach ($keys as $jdiv_id) {
    -	TRACE("    $jdiv_id	- ");
    -	$jdiv[$jdiv_id]['projects'] = array();
    -	for ($x = 0; $x < count($jdiv[$jdiv_id]['config']); $x++) {
    -		$d = $jdiv[$jdiv_id]['config'][$x];
    -		if ($x > 0)
    -			TRACE("\t- ");
    -		TRACE($cat[$d['cat']] . ' ' . $div[$d['div']] . ' - ' . $langr[$d['lang']]);
    -		$qp = $pdo->prepare('SELECT projects.* FROM projects, registrations WHERE '
    -			. " projects.year=? AND "
    -			. " projectdivisions_id=? AND "
    -			. " projectcategories_id=? AND "
    -			. " language=? AND "
    -			. ' registrations.id = projects.registrations_id '
    -			. getJudgingEligibilityCode());
    -		$qp->execute([$config['FAIRYEAR'],$d['div'],$d['cat'],$d['lang']]);
    -		$count = 0;
    -		while ($rp = $qp->fetch(PDO::FETCH_OBJ)) {
    -			$jdiv[$jdiv_id]['projects'][$rp->id] = array(
    -				'div' => $d['div'],
    -				'cat' => $d['cat'],
    -				'lang' => $d['lang']
    -			);
    -			$jdiv[$jdiv_id]['award_ids'] = array();
    -			$count++;
    -		}
    -		TRACE(" ($count projects)\n");
    -	}
    -	if (count($jdiv[$jdiv_id]['projects']) == 0) {
    -		TRACE("\t- This div has no projects, removing.\n");
    -		unset($jdiv[$jdiv_id]);
    -	}
    -}
    -
    -/* Clean out the judging teams that were autocreated in a previous run */
    -TRACE('Deleting autocreated divisional and special award judging teams:');
    -$q = $pdo->prepare("SELECT * FROM judges_teams WHERE autocreate_type_id=1 AND year=?");
    -$q->execute([$config['FAIRYEAR']]);
    -while ($r = $q->fetch(PDO::FETCH_OBJ)) {
    -	$id = $r->id;
    -	print (" $id");
    -	/* Clean out the judges_teams_link */
    -
    -	$stmt = $pdo->prepare("DELETE FROM judges_teams_link WHERE judges_teams_id=? AND year=?");
    -	$stmt->execute([$id,$config['FAIRYEAR']]);
    -	show_pdo_errors_if_any($pdo);
    -	/* Awards */
    -
    -	$stmt = $pdo->prepare("DELETE FROM judges_teams_awards_link WHERE judges_teams_id=? AND year=?");
    -	$stmt->execute([$id,$config['FAIRYEAR']]);
    -	show_pdo_errors_if_any($pdo);
    -	/* Timeslots */
    -
    -	$stmt = $pdo->prepare("DELETE FROM judges_teams_timeslots_link WHERE judges_teams_id=? AND year=?");
    -	$stmt->execute([$id,$config['FAIRYEAR']]);
    -	show_pdo_errors_if_any($pdo);
    -	/* Timeslots projects */
    -
    -	$stmt = $pdo->prepare("DELETE FROM judges_teams_timeslots_projects_link WHERE judges_teams_id=? AND year=?");
    -	$stmt->execute([$id,$config['FAIRYEAR']]);
    -	show_pdo_errors_if_any($pdo);
    -}
    -echo "\n";
    -
    -/* Finally, delete all the autocreated judges teams */
    -$stmt = $pdo->prepare("DELETE FROM judges_teams WHERE autocreate_type_id=1 AND year=?");
    -$stmt->execute([$config['FAIRYEAR']]);
    -show_pdo_errors_if_any($pdo);
    -
    -/*
    - * Also delete any judges_teams_link that link to teams that dont exist, just
    - * in case
    - */
    -$q = $pdo->prepare("SELECT judges_teams_link.id, judges_teams.id AS judges_teams_id 
    -			FROM judges_teams_link 
    -			LEFT JOIN judges_teams ON judges_teams_link.judges_teams_id=judges_teams.id 
    -			WHERE judges_teams_link.year=?");
    -
    -$q->execute([$config['FAIRYEAR']]);
    -$n = 0;
    -while ($r = $q->fetch(PDO::FETCH_OBJ)) {
    -	if (!$r->judges_teams_id) {
    -		$stmt = $pdo->prepare("DELETE FROM judges_teams_link WHERE id=?");
    -		$stmt->execute([$r->id]);
    -		$n++;
    -	}
    -}
    -print ("Deleted $n orphaned team linkings\n");
    -TRACE(" Done.\n");
    -
    -set_status('Loading Judges');
    -
    -$judges = judges_load_all();
    -
    -foreach ($judges as &$j) {
    -	if ($j['judge_active'] == 'no') {
    -		TRACE("   {$j['name']} has their judge profile deactivated, skipping.\n");
    -		unset($judges[$j['id']]);
    -		continue;
    -	}
    -	if ($j['judge_complete'] == 'no') {
    -		TRACE("   {$j['name']} hasn't completed their judge profile, skipping.\n");
    -		unset($judges[$j['id']]);
    -		continue;
    -	}
    -
    -	$q = $pdo->prepare("SELECT users_id FROM judges_teams_link WHERE 
    -				users_id=?
    -				AND year=?");
    -	$q->execute([$j['id'],$config['FAIRYEAR']]);
    -	if ($q->rowCount() != 0) {
    -		TRACE("   {$j['name']} is already on a judging team, skipping.\n");
    -		unset($judges[$j['id']]);
    -		continue;
    -	}
    -	if ($config['judges_availability_enable'] == 'yes') {
    -		/* Load the judge time availability */
    -		$q = $pdo->prepare("SELECT * FROM judges_availability WHERE users_id=? ORDER BY `start`");
    -		$q->execute([$j['id']]);
    -		if ($q->rowCount() == 0) {
    -			TRACE("   {$j['name']} hasn't selected any time availability, POTENTIAL BUG (they shouldn't be marked as complete).\n");
    -			TRACE("      Ignoring this judge.\n");
    -			unset($judges[$j['id']]);
    -			continue;
    -		}
    -
    -		while ($r = $q->fetch(PDO::FETCH_ASSOC)) {
    -			$j['availability'][] = $r;
    -		}
    -	}
    -
    -	/* Load special award preferences */
    -	$q = $pdo->prepare("SELECT award_awards.id,award_awards.name FROM 
    -				judges_specialaward_sel,award_awards 
    -				WHERE
    -				award_awards.id=judges_specialaward_sel.award_awards_id
    -				AND judges_specialaward_sel.users_id=?
    -				AND award_awards.year=?");
    -	$q->execute([$j['id'],$config['FAIRYEAR']]);
    -	show_pdo_errors_if_any($pdo);
    -
    -	if ($j['special_award_only'] == 'yes') {
    -		TRACE("   {$j['name']} is a special awards only.\n");
    -		/* Find their special award id */
    -		if ($q->rowCount() == 0) {
    -			TRACE("      NO special award selected! (removing special award only request)\n");
    -			$j['special_award_only'] = 'no';
    -			//		} else if($q->rowCount()> 1) {
    -			//			TRACE("      More than ONE special award selected (removing special award only request):\n");
    -			//			$j['special_award_only'] = 'no';
    -		}
    -	}
    -
    -	$j['special_awards'] = array();
    -	while ($r = $q->fetch(PDO::FETCH_OBJ)) {
    -		if ($j['special_award_only'] == 'yes') {
    -			TRACE("      {$r->name}\n");
    -		}
    -
    -		/*
    -		 * Add them to the SA judge list (modify the actual list, not
    -		 * $j, which is a copy
    -		 */
    -		$j['special_awards'][] = $r->id;
    -	}
    -
    -	/*
    -	 * optimization, so the div1 cost function can try to find one
    -	 * round2 judge per team
    -	 */
    -	$j['available_for_divisional2'] = judge_available_for_round($j, $round_divisional2);
    -}
    -unset($j);
    -
    -TRACE('Loaded ' . count($judges) . " judges\n");
    -$jteam[0]['max_judges'] = count($judges);
    -
    -if (count($judges) == 0) {
    -	echo "No judges available. Aborting!\n";
    -	set_status('Error - no judges available...');
    -	set_percent(0);
    -	exit;
    -}
    -
    -/*
    - * Load the numbers for any user-defined judge teams that already exist,
    - * these numbers will be off-limits for auto-assigning numbers
    - */
    -$q = $pdo->prepare("SELECT * FROM judges_teams WHERE year=?");
    -$q->execute([$config['FAIRYEAR']]);
    -$used_judges_teams_numbers = array();
    -while ($i = $q->fetch(PDO::FETCH_ASSOC)) {
    -	$used_judges_teams_numbers[] = $i['num'];
    -}
    -echo "The following judge team numbers are already used: \n";
    -print_r($used_judges_teams_numbers);
    -
    -$next_judges_teams_number_try = 1;
    -
    -/* A function to get the next available number */
    -function next_judges_teams_number()
    -{
    -	global $used_judges_teams_numbers;
    -	global $next_judges_teams_number_try;
    -
    -	while (1) {
    -		if (!in_array($next_judges_teams_number_try, $used_judges_teams_numbers))
    -			break;
    -
    -		$next_judges_teams_number_try++;
    -	}
    -	$r = $next_judges_teams_number_try;
    -	$next_judges_teams_number_try++;
    -	return $r;
    -}
    -
    -function judge_team_create($num, $name)
    -{
    -	global $config, $pdo;
    -	$name = $pdo->quote($name);
    -	$stmt = $pdo->prepare('
    -    INSERT INTO judges_teams (num, name, autocreate_type_id, year)
    -    VALUES (:num, :name, :autocreate_type_id, :year)
    -');
    -
    -	$stmt->bindValue(':num', $num, PDO::PARAM_INT);
    -	$stmt->bindValue(':name', $name, PDO::PARAM_STR);
    -	$stmt->bindValue(':autocreate_type_id', 1, PDO::PARAM_INT);
    -	$stmt->bindValue(':year', $config['FAIRYEAR'], PDO::PARAM_INT);
    -	$stmt->execute();
    -	$id = $pdo->lastInsertId();
    -	return $id;
    -}
    -
    -function judge_team_add_judge($team_id, $users_id)
    -{
    -	global $config, $judges;
    -	$stmt = $pdo->prepare("INSERT INTO judges_teams_link (users_id, judges_teams_id, captain, year) VALUES (?, ?, ?, ?)");
    -	$stmt->execute([$users_id, $team_id, $judges[$users_id]['willing_chair'], $config['FAIRYEAR']]);
    -	
    -	show_pdo_errors_if_any($pdo);
    -}
    -
    -/*
    - * Round 1 Divisional Scheduling
    - * 	- Compute required divisional judge teams
    - * 	- Delete existing ones
    - * 	- Anneal Projects to Teams
    - * 	- Anneal Judtes to Projects
    - */
    -
    -set_status('Computing required judging teams');
    -TRACE("   Each judging team may judge {$config['max_projects_per_team']} projects\n");
    -TRACE("   Each project must be judged {$config['times_judged']} times\n");
    -
    -$keys = array_keys($jdiv);
    -foreach ($keys as $jdiv_id) {
    -	$c = count($jdiv[$jdiv_id]['projects']);
    -	$t = ceil($c / $config['max_projects_per_team'] * $config['times_judged']);
    -	if ($t < $config['times_judged'])
    -		$t = $config['times_judged'];
    -	TRACE("   $jdiv_id has $c projects, requires $t judging teams\n");
    -	$jdiv[$jdiv_id]['num_jteams'] = $t;
    -}
    -
    -$jteam = array();
    -$jteam_id = 0;
    -/* Create one more jteam, for anyone the annealer doesn't want to place */
    -$jteam[$jteam_id]['id'] = $jteam_id;
    -$jteam[$jteam_id]['projects'] = array();
    -$jteam[$jteam_id]['divs'] = array();
    -$jteam[$jteam_id]['cats'] = array();
    -$jteam[$jteam_id]['langs'] = array();
    -$jteam[$jteam_id]['min_judges'] = 0;
    -$jteam[$jteam_id]['max_judges'] = 0;
    -$jteam_id++;
    -
    -set_status('Assigning projects to judging teams');
    -$keys = array_keys($jdiv);
    -for ($k = 0; $k < count($keys); $k++) {
    -	$jdiv_id = $keys[$k];
    -	TRACE("Judging Division $jdiv_id ({$jdiv[$jdiv_id]['num_jteams']} teams): \n");
    -	$project_ids = array();
    -	for ($x = 0; $x < $config['times_judged']; $x++) {
    -		$project_ids = array_merge($project_ids, array_keys($jdiv[$jdiv_id]['projects']));
    -	}
    -	$current_jdiv = $jdiv[$jdiv_id];
    -
    -	$e = 100 + 10 * ($config['effort'] / 1000);
    -	$a = new annealer($jdiv[$jdiv_id]['num_jteams'], 125, $e, 0.9,
    -		'jdiv_compute_cost', $project_ids);
    -	$a->anneal();
    -
    -	$jdiv[$jdiv_id]['jteams'] = array();
    -	for ($x = 0; $x < $a->num_buckets; $x++) {
    -		$bkt = $a->bucket[$x];
    -		TRACE("   SubTeam $x: (jteam $jteam_id)\n");
    -		$jdiv[$jdiv_id]['jteams'][] = $jteam_id;
    -
    -		$jteam[$jteam_id]['id'] = $jteam_id;
    -		$jteam[$jteam_id]['num'] = next_judges_teams_number();
    -		$jteam[$jteam_id]['projects'] = $a->bucket[$x];
    -		$jteam[$jteam_id]['sub'] = $x;
    -		$jteam[$jteam_id]['jdiv_id'] = $jdiv_id;
    -		$jteam[$jteam_id]['divs'] = array();
    -		$jteam[$jteam_id]['cats'] = array();
    -		$jteam[$jteam_id]['langs'] = array();
    -		$jteam[$jteam_id]['min_judges'] = $config['min_judges_per_team'];
    -		$jteam[$jteam_id]['max_judges'] = $config['max_judges_per_team'];
    -
    -		foreach ($bkt as $projid) {
    -			$p = $jdiv[$jdiv_id]['projects'][$projid];
    -			TRACE("      $projid - " . $cat[$p['cat']] . ' ' . $div[$p['div']] . ' - ' . $langr[$p['lang']] . "\n");
    -			if (!in_array($p['cat'], $jteam[$jteam_id]['cats'])) {
    -				$jteam[$jteam_id]['cats'][] = $p['cat'];
    -			}
    -			if (!in_array($p['div'], $jteam[$jteam_id]['divs'])) {
    -				$jteam[$jteam_id]['divs'][] = $p['div'];
    -			}
    -			if (!in_array($p['lang'], $jteam[$jteam_id]['langs'])) {
    -				$jteam[$jteam_id]['langs'][] = $p['lang'];
    -			}
    -		}
    -		$jteam_id++;
    -	}
    -}
    -
    -TRACE('There are ' . (count($jteam) - 1) . " judging teams\n");
    -
    -TRACE("Finding judges available for round1 divisional\n");
    -$div1_judge_ids = array();
    -foreach ($judges as $j) {
    -	if (judge_available_for_round($j, $round_divisional1) == false)
    -		continue;
    -	if ($j['special_award_only'] == 'yes')
    -		continue;
    -
    -	/* If we get here, the judge is ok for div1 */
    -	$div1_judge_ids[] = $j['id'];
    -}
    -
    -TRACE(count($div1_judge_ids) . " judges available for round1 divisional\n");
    -
    -function judges_to_teams_update($progress, $total)
    -{
    -	set_percent(($progress * 50) / $total);
    -}
    -
    -set_status('Assigning Judges to Teams');
    -
    -$e = $config['effort'];
    -$a = new annealer(count($jteam), 25, $e, 0.98, 'judges_cost_function', $div1_judge_ids);
    -$a->set_update_callback('judges_to_teams_update');
    -$a->anneal();
    -
    -for ($x = 1; $x < count($jteam); $x++) {
    -	$t = &$jteam[$x];
    -	print ("Judging Team {$t['num']}: cost={$a->bucket_cost[$x]} ");
    -	$lang_array = $t['langs'];
    -	asort($lang_array);
    -	$langstr = implode(' ', $lang_array);
    -
    -	// sort the cats and divs too, so we dont end up with "int/sen" <--> "sen/int"
    -	asort($t['cats']);
    -	asort($t['divs']);
    -
    -	print ("langs=($langstr) ");
    -	print ('cats=(');
    -	$catstr = '';
    -
    -	if (count($t['cats'])) {
    -		$first = true;
    -		foreach ($t['cats'] AS $cid) {
    -			print ('c' . $cid . ' ');
    -			if (!$first)
    -				$catstr .= '+';
    -			$catstr .= $cat[$cid];
    -			$first = false;
    -		}
    -	}
    -	print (') divs=(');
    -	$divstr = '';
    -	if (count($t['divs'])) {
    -		$first = true;
    -		foreach ($t['divs'] AS $did) {
    -			print ('d' . $did . ' ');
    -			if (!$first)
    -				$divstr .= '/';
    -			$divstr .= $div[$did];
    -			$first = false;
    -		}
    -	}
    -	print (")\n");
    -
    -	/* Add this judging team to the database */
    -	$tn = "$catstr $divstr ($langstr) " . ($t['sub'] + 1);
    -
    -	$team_id = judge_team_create($t['num'], $tn);
    -
    -	$t['team_id'] = $team_id;
    -
    -	$ids = $a->bucket[$x];
    -	for ($y = 0; $y < count($ids); $y++) {
    -		pr_judge($t, $ids[$y]);
    -		$j = &$judges[$ids[$y]];
    -
    -		/* Mark this judge as used in round1 divisional */
    -		judge_mark_for_round($j, $round_divisional1);
    -
    -		/* Add the judge to our internal team list */
    -		$t['judge_ids'][] = $j['id'];
    -
    -		/* Write the SQL to do it */
    -		judge_team_add_judge($team_id, $j['id']);
    -	}
    -
    -	/*
    -	 * Get the original jdiv that this team was created from.  The exact
    -	 * breakdown of each and every div/cat/lang that this team is judging
    -	 * is in the jdiv['config'] array
    -	 */
    -	$jd = $jdiv[$t['jdiv_id']];
    -	for ($y = 0; $y < count($jd['config']); $y++) {
    -		$cfg = $jd['config'][$y];
    -		$q = $pdo->prepare("SELECT award_awards.id FROM 
    -						award_awards,
    -						award_awards_projectcategories,
    -						award_awards_projectdivisions
    -					WHERE 
    -						award_awards.year=?
    -						AND award_awards.id=award_awards_projectcategories.award_awards_id
    -						AND award_awards.id=award_awards_projectdivisions.award_awards_id
    -						AND award_awards_projectcategories.projectcategories_id=?
    -						AND award_awards_projectdivisions.projectdivisions_id=?
    -						AND award_awards.award_types_id='1'
    -					");
    -		$q->execute([$config['FAIRYEAR'],$cfg['cat'],$cfg['div']]);
    -		if ($q->rowCount() != 1) {
    -			echo error(i18n('Cannot find award for %1 - %2', array($cat[$cfg['cat']], $div[$cfg['div']])));
    -		} else {
    -			$r = $q->fetch(PDO::FETCH_OBJ);
    -			$stmt = $pdo->prepare("INSERT INTO judges_teams_awards_link (award_awards_id,judges_teams_id,year) VALUES (?,?,?)");
    -			$stmt->execute([$r->id,$team_id,$config['FAIRYEAR']]);
    -			/* Add the award ID to the jdiv, if it's not already there */
    -			if (!in_array($r->id, $jdiv[$t['jdiv_id']]['award_ids'])) {
    -				$jdiv[$t['jdiv_id']]['award_ids'][] = $r->id;
    -			}
    -		}
    -	}
    -}
    -
    -print ("Unused Judges:\n");
    -$ids = $a->bucket[0];
    -
    -for ($y = 0; $y < count(get_value_or_default($ids, [])); $y++) {
    -	pr_judge($jteam[0], $ids[$y]);
    -}
    -
    -/*
    - * Round 2 Divisional Scheduling
    - * 	- Find a judge on each team that is available for both rounds
    - * 	- Mark them as used
    - * 	- No annealing required
    - */
    -
    -if ($round_divisional2 == NULL) {
    -	echo "No Round 2 Divisional defined, skipping.\n";
    -} else {
    -	echo "Finding round2 carry-over judges:\n";
    -
    -	foreach ($jdiv as $jdiv_id => $jd) {
    -		$num = next_judges_teams_number();
    -		$team_id = judge_team_create($num, 'Round 2 Divisional ' . $jdiv_id);
    -
    -		TRACE("Created Round2 team id $team_id\n");
    -
    -		/* Find all the jteams in this jdiv */
    -		for ($x = 1; $x < count($jteam); $x++) {
    -			$t = &$jteam[$x];
    -
    -			if ($t['jdiv_id'] != $jdiv_id)
    -				continue;
    -
    -			TRACE("   Round1 team #{$t['num']} ({$t['id']})\n");
    -
    -			$rep_id = NULL;
    -			$chair_rep = false;
    -
    -			/*
    -			 * We would like the willing_chair to be the person that sticks around
    -			 * for round2, but if that's not possible, prefer anyone on the jteam be
    -			 * around for round2
    -			 */
    -			foreach ($t['judge_ids'] as $judge_id) {
    -				$j = &$judges[$judge_id];
    -				if (judge_available_for_round($j, $round_divisional2)) {
    -					if ($j['willing_chair'] == true) {
    -						$rep_id = $judge_id;
    -						$chair_rep = true;
    -						break;
    -					} else if ($chair_rep == false) {
    -						$rep_id = $judge_id;
    -					}
    -				}
    -			}
    -			if ($rep_id != NULL) {
    -				pr_judge($t, $rep_id);
    -				/* Mark this judge as used in this round */
    -				judge_mark_for_round($judges[$rep_id], $round_divisional2);
    -				/* Write it to the DB */
    -				judge_team_add_judge($team_id, $rep_id);
    -			} else {
    -				echo "WARNING: Team $x has no carryover judge.\n";
    -			}
    -		}
    -
    -		/* Assign all the awards in this jdiv */
    -		foreach ($jd['award_ids'] as $aid) {
    -			$stmt = $pdo->prepare("INSERT INTO judges_teams_awards_link (award_awards_id,judges_teams_id,year) VALUES (?,?,?)");
    -			$stmt->execute([$aid,$team_id,$config['FAIRYEAR']]);
    -		}
    -	}
    -}
    -
    -/*
    - * Special Awards
    - * 	- Find ALL special award rounds
    - * 		- special case: for awards with judges who are special awards
    - * 		  only, that award should match their timeslot
    - * 	- Assign special awards to rounds based on needed judges
    - * 	- Assign judges to teams
    - */
    -
    -/* ==================================================================== */
    -
    -/*
    - * Two functions for the Special Award Annealer, if special award
    - * scheduling is disabled, these will never get called
    - */
    -$current_jteam_ids = array();
    -
    -function judges_sa_cost_function($annealer, $bucket_id, $ids)
    -{
    -	global $sa_jteam;
    -	global $judges, $current_jteam_ids;
    -
    -	/* Bucket ID is the team number */
    -	/* ids are the judge ids currently in the bucket */
    -
    -	$cost = 0;
    -	if ($bucket_id == 0) {
    -		/* This is the placeholder */
    -		$cost = count($ids) * 50;
    -		return $cost;
    -	}
    -
    -	$t = &$sa_jteam[$current_jteam_ids[$bucket_id]];
    -
    -	/* Compute the over max / under min costs */
    -	$c = count($ids);
    -	$min = ($c < $t['min_judges']) ? $t['min_judges'] - $c : 0;
    -	$max = ($c > $t['max_judges']) ? $c - $t['max_judges'] : 0;
    -	$cost += $min * 50;
    -	$cost += $max * 10;
    -
    -	/* For each judge on the team, score their preferences */
    -	for ($x = 0; $x < count($ids); $x++) {
    -		$j = &$judges[$ids[$x]];
    -		$apref = 0;
    -
    -		/*
    -		 * Make sure this judge isn't on the team more than
    -		 * once.  For S-A only judges, we duplicate the judge IDs
    -		 * so the judge can be scheduled on multiple teams
    -		 */
    -		if ($j['special_award_only'] == 'yes') {
    -			for ($i = 0; $i < count($ids); $i++) {
    -				if ($i == $x)
    -					continue;
    -				if ($ids[$i] == $ids[$x])
    -					$cost += 1000;
    -			}
    -		}
    -
    -		/*
    -		 * See if the sa_jteam award id (what the team is judging)
    -		 * is in the judges selection list
    -		 */
    -		/* Run through all awards this team is judging */
    -		//		TRACE("   - {$j['name']}\n");
    -		foreach ($t['award_ids'] as $aid) {
    -			if (in_array($aid, $j['special_awards'])) {
    -				// /				TRACE("       - award match\n");
    -				/* This judge wants to judge this award */
    -				/* No cost */
    -			} else {
    -				if ($j['special_award_only'] == 'yes') {
    -					//					TRACE("       - sa only mismatch\n");
    -
    -					/*
    -					 * This judge is for an award, but
    -					 * NOT assigned to the proper one,
    -					 * HUGE cost
    -					 */
    -					$cost += 500;
    -				}
    -				$apref++;
    -			}
    -		}
    -		$cost += 5 * $apref;
    -	}
    -
    -	//	TRACE("Team $bucket_id, cost is $cost\n");
    -
    -	return $cost;
    -}
    -
    -if ($config['scheduler_enable_sa_scheduling'] == 'yes') {
    -	TRACE("Finding judges for special award round(s)\n");
    -	foreach ($round_special_awards as &$r) {
    -		$r['available_judge_ids'] = array();
    -	}
    -
    -	$total_judges = 0;
    -	foreach ($judges as &$j) {
    -		TRACE("   {$j['firstname']} {$j['lastname']}\n");
    -		foreach ($round_special_awards as &$r) {
    -			if (judge_available_for_round($j, $r) == true) {
    -				TRACE("      {$r['name']} yes\n");
    -				$r['available_judge_ids'][] = $j['id'];
    -				$total_judges++;
    -			} else {
    -				TRACE("      {$r['name']} no\n");
    -			}
    -		}
    -	}
    -	unset($j);
    -	unset($r);
    -
    -	set_status('Creating Special Award Judging Teams (one team per award)');
    -
    -	/* Load special awards */
    -	$q = "SELECT award_awards.name,award_awards.id FROM award_awards,award_types
    -		WHERE 
    -			award_awards.year=?
    -			AND award_types.id=award_awards.award_types_id
    -			AND award_awards.schedule_judges='yes'
    -			AND award_types.year=?
    -			AND award_types.type='Special' 
    -		";
    -	$r = $pdo->prepare($q);
    -	$r->execute([$config['FAIRYEAR'],$config['FAIRYEAR']]);
    -	print ($pdo->errorInfo());
    -	/* sa_jteam for leftover judges, if any */
    -	$sa_jteam = array();
    -	$sa_jteam[0]['id'] = 0;
    -	$sa_jteam[0]['projects'] = array();
    -	$sa_jteam[0]['langs'] = array();
    -	$sa_jteam[0]['min_judges'] = 0;
    -	$sa_jteam[0]['max_judges'] = 0;
    -	$sa_jteam[0]['award_ids'] = array();
    -
    -	$x = 1;
    -	$required_judges = 0;
    -	while ($i = $r->fetch(PDO::FETCH_OBJ)) {
    -		$projects = getProjectsNominatedForSpecialAward($i->id);
    -		$languages = getLanguagesOfProjectsNominatedForSpecialAward($i->id);
    -
    -		/*
    -		 * Construct an internal team for annealing, and create
    -		 * a DB team too
    -		 */
    -		$sa_jteam[$x]['num'] = next_judges_teams_number();
    -		$sa_jteam[$x]['id'] = judge_team_create($sa_jteam[$x]['num'], $i->name . ' (' . implode(' ', $languages) . ')');
    -		/* Note, we use $x instead of the ID, because the DB id could be zero. */
    -		$sa_jteam[$x]['projects'] = $projects;
    -		$sa_jteam[$x]['round'] = NULL;
    -		$sa_jteam[$x]['sub'] = 0;
    -		$sa_jteam[$x]['langs'] = array();
    -		$min = floor(count($projects) / $config['projects_per_special_award_judge']) + 1;
    -		$sa_jteam[$x]['min_judges'] = $min;
    -		$sa_jteam[$x]['max_judges'] = $min;
    -		$sa_jteam[$x]['award_ids'] = array($i->id);
    -		$sa_jteam[$x]['name'] = $i->name;
    -
    -		$required_judges += $min;
    -
    -		/* Link the award to this team */
    -		$stmt = $pdo->prepare("INSERT INTO judges_teams_awards_link (award_awards_id,judges_teams_id,year) 
    -				VALUES (?,?,?)");
    -		$stmt->execute([$i->id,$sa_jteam[$x]['id'],$config['FAIRYEAR']]);
    -
    -		TRACE("Created Team: {$i->name}, " . count($projects) . " projects => $min judges needed (db id:{$sa_jteam[$x]['id']}) \n");
    -		$x++;
    -	}
    -	TRACE("Total Judges: $total_judges, Required: $required_judges\n");
    -
    -	/* ==================================================================== */
    -	set_status("Assigning Special Award Teams to Special Award Round(s)\n");
    -
    -	/*
    -	 * Compute how many judges each round needs based on the total number
    -	 * of needed judges, e.g. if SAround1 has 10 judges available and SAround2
    -	 * has 20 judges available, and we total need 90 judges, then we
    -	 * want to assign jteams so that SAround1 has 30 slots, and SAround2 has
    -	 * 60 to balance the deficit
    -	 */
    -	foreach ($round_special_awards as &$r) {
    -		$x = count($r['available_judge_ids']);
    -		$target = ($x * $required_judges) / $total_judges;
    -		$r['target_judges'] = $target;
    -		TRACE("Round {$r['name']} should be assigned $target judge timeslots\n");
    -
    -		/*
    -		 * Setup for the next step, always add special award
    -		 * judge team 0 to ALL rounds
    -		 */
    -		$r['jteam_ids'] = array(0);
    -		$r['assigned_judges'] = 0;
    -	}
    -	unset($r);
    -
    -	/* ==================================================================== */
    -
    -	/*
    -	 * Scan the list of special awards, check each special award to see if
    -	 * it has special award only judges, we want those special awards pre-assigned
    -	 * to rounds where ALL SA-only judges are available, or, as best we can.
    -	 */
    -	foreach ($sa_jteam as $x => &$jt) {
    -		if ($x == 0)
    -			continue;
    -
    -		$sa_judges = array();
    -		foreach ($round_special_awards as $i => $r) {
    -			$sa_round_count[$i] = 0;
    -		}
    -
    -		foreach ($jt['award_ids'] as $aid) {
    -			foreach ($judges as $jid => $j) {
    -				if ($j['special_award_only'] == 'no')
    -					continue;
    -				if (in_array($aid, $j['special_awards'])) {
    -					$sa_judges[] = $jid;
    -					foreach ($round_special_awards as $i => $r) {
    -						//						TRACE("Checking {$j['name']} in round {$r['name']}\n");
    -						if (judge_available_for_round($j, $r)) {
    -							//							TRACE("   yes, round $i ++\n");
    -							$sa_round_count[$i]++;
    -						}
    -					}
    -				}
    -			}
    -		}
    -
    -		/* If there are no SA-only judges, skip the pre-assignment */
    -		if (count($sa_judges) == 0)
    -			continue;
    -
    -		/*
    -		 * There are count($sa_judges), find the round
    -		 * with the highest count
    -		 */
    -		$highest_count = 0;
    -		$highest_offset = -1;
    -		foreach ($round_special_awards as $i => $r) {
    -			if ($sa_round_count[$i] > $highest_count || $highest_offset == -1) {
    -				$highest_count = $sa_round_count[$i];
    -				$highest_offset = $i;
    -			}
    -		}
    -		/* Assign this jteam to that round */
    -		$round_special_awards[$highest_offset]['jteam_ids'][] = $x;
    -		$round_special_awards[$highest_offset]['assigned_judges'] += $jt['min_judges'];
    -		TRACE("Pre-assigning Team {$jt['name']} to Round {$round_special_awards[$highest_offset]['name']}\n");
    -		$jt['assigned'] = true;
    -
    -		/*
    -		 * If the max judges for the jteam is less than the max, update the max,
    -		 * this prevents the scheduler from trying to remove sa-only judges
    -		 * from the jteam because of the over-max cost penalty
    -		 */
    -		if ($jt['max_judges'] < count($sa_judges)) {
    -			TRACE('   Changing max_judges to ' . count($sa_judges) . " to accomodate all SA-only judge requests.\n");
    -			$jt['max_judges'] = count($sa_judges);
    -		}
    -	}
    -	unset($jt);
    -
    -	/*
    -	 * Use a greedy algorithm to assign the remaining jteams.  First sort
    -	 * the teams by the number of judges needed so those can be assigned
    -	 * first
    -	 */
    -	function sa_cmp($a, $b)
    -	{
    -		return $b['min_judges'] - $a['min_judges'];
    -	}
    -
    -	uasort($sa_jteam, 'sa_cmp');
    -
    -	foreach ($sa_jteam as $x => $jt) {
    -		if ($x == 0)
    -			continue;
    -		if ($jt['assigned'] == true)
    -			continue;
    -
    -		$highest = 0;
    -		$highest_offset = -1;
    -
    -		/*
    -		 * Find the round with the highest missing judges, this works
    -		 * even if the $p computation is negative
    -		 */
    -		foreach ($round_special_awards as $o => $r) {
    -			$p = $r['target_judges'] - $r['assigned_judges'];
    -			//			TRACE("   Round {$r['name']} p=$p\n");
    -			if ($highest_offset == -1 || $p > $highest) {
    -				$highest = $p;
    -				$highest_offset = $o;
    -			}
    -		}
    -		/* Assign this jteam id to the special award round */
    -		$round_special_awards[$highest_offset]['jteam_ids'][] = $x;
    -		$round_special_awards[$highest_offset]['assigned_judges'] += $jt['min_judges'];
    -		TRACE("Assigned Team {$jt['name']} to Round {$round_special_awards[$highest_offset]['name']}\n");
    -	}
    -	unset($jt);
    -
    -	/*
    -	 * Now that teams have been assigned to rounds, search for all the
    -	 * SA only judges again, and duplicate the available judge id if they are signed
    -	 * up to judge more than one award in the round
    -	 */
    -	foreach ($judges as &$j) {
    -		if ($j['special_award_only'] == 'no')
    -			continue;
    -
    -		foreach ($round_special_awards as &$r) {
    -			$count = 0;
    -			if (judge_available_for_round($j, $r) == false)
    -				continue;
    -
    -			/* Find out how many of their special awards are in this round. */
    -			foreach ($sa_jteam as $jt_id => &$jt) {
    -				/* Is the team in this round? */
    -				if (!in_array($jt_id, $r['jteam_ids']))
    -					continue;
    -
    -				/* Is this SA judge requsing an award judged by this team? */
    -				foreach ($jt['award_ids'] as $aid) {
    -					if (in_array($aid, $j['special_awards']))
    -						$count++;
    -				}
    -			}
    -			unset($jt);
    -			while ($count > 1) {
    -				$r['available_judge_ids'][] = $j['id'];
    -				$count--;
    -				TRACE("   Duplicate {$j['firstname']} {$j['lastname']} for multiple SA-only request in round {$r['name']}\n");
    -			}
    -		}
    -		unset($r);
    -	}
    -	unset($j);
    -
    -	/* Now, anneal in each special award round */
    -	foreach ($round_special_awards as $r) {
    -		set_status("Assigning Judges in round {$r['name']}\n");
    -
    -		$current_jteam_ids = $r['jteam_ids'];
    -		$judge_ids = $r['available_judge_ids'];
    -
    -		$e = $config['effort'];
    -		$a = new annealer(count($r['jteam_ids']), 25, $e, 0.98,
    -			'judges_sa_cost_function', $judge_ids);
    -		// $a->set_update_callback(judges_to_teams_update);
    -		// $a->set_pick_move(judges_sa_pick_move);
    -		$a->anneal();
    -
    -		$x = 0;
    -
    -		unset($t);
    -		unset($tid);
    -
    -		foreach ($r['jteam_ids'] as $tid) {
    -			if ($tid == 0) {
    -				$x++;
    -				continue;
    -			}
    -
    -			$t = &$sa_jteam[$tid];
    -
    -			print ("Judging Team {$t['id']} \"{$t['name']}\": cost={$a->bucket_cost[$x]} #=({$t['min_judges']},{$t['max_judges']}) ");
    -
    -			//	print("langs=(");
    -			/*	$langstr="";
    -				for($y=0; $yprepare("INSERT INTO judges_teams_timeslots_link 
    -							(judges_teams_id,judges_timeslots_id,year)
    -							VALUES (?,?,?)");
    -			$stmt->execute([$t['id'],$r['timeslots'][0]['id'],$config['FAIRYEAR']]);
    -			show_pdo_errors_if_any($pdo);
    -
    -			foreach ($t['projects'] as $proj) {
    -				$pid = $proj['id'];
    -				$stmt = $pdo->prepare("INSERT INTO judges_teams_timeslots_projects_link 
    -								(judges_teams_id,judges_timeslots_id,projects_id,year)
    -								VALUES (?,?,?,?)");
    -				$stmt->execute([$t['id'],$r['timeslots'][0]['id'],$pid,$config['FAIRYEAR']]);
    -				show_pdo_errors_if_any($pdo);
    -			}
    -			$ids = $a->bucket[$x];
    -			foreach ($a->bucket[$x] as $jid) {
    -				//		pr_judge($t, $ids[$y]);
    -
    -				$j = &$judges[$jid];
    -				print ("   - {$j['name']}\n");
    -
    -				/* Link Judges to the judging team we just inserted */
    -				judge_team_add_judge($t['id'], $jid);
    -			}
    -			$x++;
    -		}
    -	}
    -}
    -
    -/* Resume normal flow now */
    -
    -/*
    - * Timeslot Scheduling
    - */
    -
    -/* ==================================================================== */
    -set_status('Assigning Judging Teams and Projects to Timeslots');
    -
    -TRACE("Loading Divisional1 Timeslot Data\n");
    -$available_timeslots = array();
    -
    -$q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE 
    -			round_id=? 
    -			AND year=? 
    -			AND type='timeslot'
    -			ORDER BY date,starttime");
    -$q->execute([$round_divisional1['id'],$config['FAIRYEAR']]);
    -$x = 0;
    -while ($r = $q->fetch(PDO::FETCH_OBJ)) {
    -	$available_timeslots[] = array('id' => $r->id,
    -		'date' => $r->date,
    -		'starttime' => substr($r->starttime, 0, -3),
    -		'endtime' => substr($r->endtime, 0, -3));
    -	print ('   ' . $available_timeslots[$x]['starttime'] . ' -> '
    -		. $available_timeslots[$x]['endtime'] . "\n");
    -	$x++;
    -}
    -
    -$n_timeslots = count($available_timeslots);
    -
    -/* First, check to see if the project is being judged 3 or
    - * more times in a row, OR, if it has large gaps that aren't
    - at the end of the judging */
    -
    -/*
    - * I'm going to leave this here, for now, we shoudl do something like
    - * this at some point in evaluating projects, but right now
    - * the randomness is pretty good.
    - */
    -/*	for($x=0; $x 2) $cost += $z_count;
    - * 				$r_count++;
    - * 				$z_count=0;
    - * 				if($r_count > 2) $cost += $r_count;
    - * 			}
    - * 		}
    - * 	}
    - */
    -
    -function timeslot_pick_move($a)
    -{
    -	/*
    -	 * Use the existing pick move, but we want the item numbers
    -	 * in each bucket to always be the same
    -	 */
    -	list($b1, $i1, $b2, $i2) = $a->pick_move();
    -	$i2 = $i1;
    -	return array($b1, $i1, $b2, $i2);
    -}
    -
    -function timeslot_cost_function($annealer, $bucket_id, $ids)
    -{
    -	$cost = 0;
    -
    -	/*
    -	 * Check to make sure a judge isn't judging two projects
    -	 * at the same time
    -	 */
    -	$n_pids = count($ids);
    -	for ($x = 0; $x < $n_pids - 1; $x++) {
    -		$jteam_id1 = $ids[$x];
    -		if ($jteam_id1 == 0)
    -			continue;
    -		for ($y = $x + 1; $y < $n_pids; $y++) {
    -			$jteam_id2 = $ids[$y];
    -			if ($jteam_id1 == $jteam_id2)
    -				$cost += 50;
    -		}
    -	}
    -	return $cost;
    -}
    -
    -$keys = array_keys($jdiv);
    -$keys_count = count($keys);
    -for ($k = 0; $k < $keys_count; $k++) {
    -	$jdiv_id = $keys[$k];
    -
    -	$pids = array_keys($jdiv[$jdiv_id]['projects']);
    -	$n_projects = count($pids);
    -
    -	if ($n_projects == 0)
    -		continue;
    -
    -	unset($project_rlookup);
    -	$project_rlookup = array();
    -
    -	for ($x = 0; $x < count($pids); $x++) {
    -		$project_rlookup[$pids[$x]] = $x;
    -	}
    -
    -	//	$current_jdiv = $jdiv_id;
    -
    -	printf("jdiv $jdiv_id, $n_projects projects in this jdiv\n");
    -	unset($jteams_ids);
    -	$jteams_ids = array();
    -	/* Pad to the correct length */
    -	for ($x = 0; $x < ($n_timeslots * $n_projects); $x++)
    -		$jteams_ids[] = 0;
    -
    -	printf('total of ' . count($jteams_ids) . " slots (should be $n_timeslots * $n_projects)\n");
    -
    -	/*
    -	 * Fill out the jteam array with a jteam_id for each time the
    -	 * jteam_id is supposed to judge a project
    -	 */
    -	$jteams = $jdiv[$jdiv_id]['jteams'];
    -
    -	foreach ($jteams as $jteam_id) {
    -		for ($y = 0; $y < count($jteam[$jteam_id]['projects']); $y++) {
    -			$pid = $jteam[$jteam_id]['projects'][$y];
    -			$idx = $project_rlookup[$pid];
    -
    -			for ($o = $idx;; $o += $n_projects) {
    -				if ($jteams_ids[$o] != 0)
    -					continue;
    -
    -				$jteams_ids[$o] = $jteam_id;
    -				break;
    -			}
    -		}
    -	}
    -
    -	/*
    -	 * $y = 0;
    -	 *     foreach($jteams as $jteam_id) {
    -	 * 	$o = 0;
    -	 * 	print("setting up jteam $jteam_id\n");
    -	 *     print_r($jteam[$jteam_id]);
    -	 * 	foreach($jteam[$jteam_id]['projects'] as $pid) {
    -	 * 		$jteams_ids[$y * $n_timeslots + $o] = $jteam_id;
    -	 * 		$o++;
    -	 * 	}
    -	 * 	$y++;
    -	 * }
    -	 * printf("jteams_ids=\n");
    -	 *     print_r($jteams_ids);
    -	 */
    -	print ('Jteams ids len=' . count($jteams_ids));
    -	print ("n_timeslots=$n_timeslots\n");
    -
    -	set_percent(50 + ($k / $keys_count) * 50);
    -
    -	$e = 500 + 50 * ($config['effort'] / 1000);
    -	$a = new annealer($n_timeslots, 100, $e, 0.98, 'timeslot_cost_function', $jteams_ids);
    -	$a->set_pick_move('timeslot_pick_move');
    -	$a->anneal();
    -
    -	printf('             ');
    -	for ($y = 0; $y < $n_timeslots; $y++) {
    -		printf('%4d ', $y + 1);
    -	}
    -	printf("\n");
    -
    -	for ($x = 0; $x < count($pids); $x++) {
    -		$pid = $pids[$x];
    -		printf('Project %4d: ', $pid);
    -
    -		for ($y = 0; $y < $n_timeslots; $y++) {
    -			$jteam_id = $a->bucket[$y][$x];
    -			printf('%4d ', $jteam[$jteam_id]['id']);
    -
    -			if ($jteam_id == 0)
    -				continue;
    -
    -			/* if jteam_id isn't 0, instert it into the db */
    -			$stmt = $pdo->prepare('INSERT INTO judges_teams_timeslots_link (judges_teams_id,judges_timeslots_id,year) VALUES (?,?,?)');
    -			$stmt->execute([$jteam[$jteam_id]['team_id'],$available_timeslots[$y]['id'],$config['FAIRYEAR']]);
    -
    -			$stmt = $pdo->prepare('INSERT INTO judges_teams_timeslots_projects_link (judges_teams_id,judges_timeslots_id,projects_id,year) VALUES (?,?,?,?)');
    -			$stmt->execute([$jteam[$jteam_id]['team_id'],$available_timeslots[$y]['id'],$pid,$config['FAIRYEAR']]);
    -		}
    -		printf("\n");
    -	}
    -}
    -
    -TRACE("All Done.\n");
    -echo '
    '; - -set_percent(-1); -set_status('Done'); - -// echo happy("Scheduler completed successfully"); - -// send_footer(); -?> diff --git a/admin/judges_sa_launcher.php b/admin/judges_sa_launcher.php deleted file mode 100644 index 526555f6..00000000 --- a/admin/judges_sa_launcher.php +++ /dev/null @@ -1,57 +0,0 @@ -../data/logs/judge_scheduler_' . date('YmdHis') . '.log 2>&1 &' . "\n"); - fwrite($bat_file, 'EXIT' . "\n"); - fclose($bat_file); - } - $WshShell = new COM('WScript.Shell'); - // next line designed for Windows os with IIS web server. It will probably fail if Windows using apache web server - try { - $oExec = $WshShell->run($bat_filename, 0, false); // THIS SHOULD WORK for windows using IIS as webserver. - } catch (Exception $e) { - // if the wshshell-> run fails then we are perhaps running an apache server and the next might work. - // But, the call in judges_sa_launcher_apache.php does not return until completed so I use this logic - // to inform the user how to get to the status page. - // CAUTION: This path REQUIRES that php be compiled with CLI option and other things Dennis does not understand! - // This may work for some servers. NEVER use this on a shared server - you will hog it and get your account suspended. - echo ' This server requires manual intervention to start the scheduler and to navigate to the Status page.
    '; - echo ' The scheduler will run at normal priority - which in some servers may present a sluggish response.
    '; - echo ' Please follow these instruction exactly:
    '; - echo " 1. Click 'Start the Scheduler' link ONCE. (You will not see any change in this screen)
    "; - echo " *** DO NOT Click 'Start the Scheduler' more than once!
    "; - echo " 2. Click 'Check the Status' link and wait. (You will be taken to the Status Page. There, you should see that the scheduler is running.)
    "; - echo '
    Start the Scheduler

    '; - echo 'Check the Status
    '; - exit; - // This is the call that works - but it does not return until judges_sa is finished so... I launch it from another window - // exec("php judges_sa.php >../data/logs/judge_scheduler_".date("YmdHis").".log 2>&1 &"); - } -} else { - // *nix server - // add PHP_SELF just so when we do a process listing on the server we know which fair its running for - // the argument does not get used by the script at all - exec("nice php judges_sa.php {$_SERVER['PHP_SELF']} >../data/logs/judge_scheduler_" . date('YmdHis') . '.log 2>&1 &'); -} -// usleep(1500000); // 1.5 second to allow the judges_sa to update the % status to 0% otherwise the status page will think its not running if it gets there too soon -header('Location: judges_scheduler_status.php'); -exit; -?> diff --git a/admin/judges_sa_launcher_apache.php b/admin/judges_sa_launcher_apache.php deleted file mode 100644 index ca585b0b..00000000 --- a/admin/judges_sa_launcher_apache.php +++ /dev/null @@ -1,6 +0,0 @@ -../data/logs/judge_scheduler_' . date('YmdHis') . '.log 2>&1 &'); -exit; -?> - diff --git a/admin/judges_scheduler_status.php b/admin/judges_scheduler_status.php deleted file mode 100644 index de2bbd39..00000000 --- a/admin/judges_scheduler_status.php +++ /dev/null @@ -1,155 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judges' => 'admin/judges.php')); -?> - - - -'; - echo '
    '; - echo '' . i18n('Judges Scheduler Configuration') . ''; -} else { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo '
    ' . i18n('Scheduler status') . ':
    ' . i18n('Scheduler percent') . ':
    ' . i18n('Scheduler ETA') . ':
    '; - - echo '
    '; - echo i18n('When scheduling is finished, the following links will be useful'); - echo '
    '; - echo '' . i18n('Manage Judge Teams') . ''; - echo '
    '; - echo '' . i18n('Manage Judge Members') . ''; - echo '
    '; - echo '' . i18n('Print/Export Reports') . ''; - echo '
    '; - echo '
    '; - echo "Note: If you are using Windows Internet Explorer and do not see status updates do this:
    Click menu bar 'Tools' then 'Internet Options'.
    In the 'General' Tab under 'Browsing history' click 'Settings'.
    Under 'Check for newer versions of stored pages:'
    Select the option 'Every time I visit the webpage'.
    Click OK then OK"; -} -send_footer(); - -?> diff --git a/admin/judges_scheduler_status_output.php b/admin/judges_scheduler_status_output.php deleted file mode 100644 index fcf78c5e..00000000 --- a/admin/judges_scheduler_status_output.php +++ /dev/null @@ -1,16 +0,0 @@ -prepare("SELECT val FROM config WHERE year='0' AND var='judge_scheduler_percent'"); -$q->execute(); -$r = $q->fetch(PDO::FETCH_OBJ); -$percent = $r->val; - -$q = $pdo->prepare("SELECT val FROM config WHERE year='0' AND var='judge_scheduler_activity'"); -$q->execute(); -$r = $q->fetch(PDO::FETCH_OBJ); -$status = $r->val; - -echo "$percent:$status\n"; -?> diff --git a/admin/judges_schedulerconfig.php b/admin/judges_schedulerconfig.php deleted file mode 100644 index 6227bfd4..00000000 --- a/admin/judges_schedulerconfig.php +++ /dev/null @@ -1,154 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this pr\n"; - * ogram; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judges' => 'admin/judges.php')); - -config_editor('Judge Scheduler', $config['FAIRYEAR'], 'var', $_SERVER['PHP_SELF']); -echo '
    '; - -if (get_value_from_array($_GET, 'action') == 'reset') { - $stmt = $pdo->prepare("UPDATE config SET `val`='-1' WHERE `var`='judge_scheduler_percent' AND `year`=0"); - $stmt->execute(); - $config['judge_scheduler_percent'] = '-1'; - echo happy(i18n('Judge scheduler status forcibly reset')); -} - -if ($config['judge_scheduler_percent'] == '-1') { - $ok = 1; - - echo ""; - echo '

    Timeslots

    - ' . i18n('Timeslot Manager') . ''; - echo '
    '; - - $timeslots = judges_scheduler_check_timeslots(); - if ($timeslots > 0) { - echo happy(i18n('There are %1 timeslot(s) defined for divisional judging, good', array($timeslots))); - } else { - echo error(i18n('There are no timeslots defined for divisional judging')); - $ok = 0; - } - - if ($config['scheduler_enable_sa_scheduling'] == 'yes') { - $timeslots = judges_scheduler_check_timeslots_sa(); - if ($timeslots > 0) { - echo happy(i18n('There are %1 timeslot(s) defined for special awards judging, good', array($timeslots))); - } else { - echo error(i18n('There are no timeslots defined for special awards judging (but the scheduler is configured to do special awards judging)')); - $ok = 0; - } - } - - echo ""; - echo '

    Awards

    - ' . i18n('Awards Manager') . ''; - echo '
    '; - - $missing_awards = judges_scheduler_check_awards(); - if (count($missing_awards) == 0) { - echo happy(i18n('There is a single divisional award for each division/category, good')); - } else { - echo '
    The following divisional awards problems were identified:
      '; - for ($x = 0; $x < count($missing_awards); $x++) { - print ($missing_awards[$x] . '
      '); - } - echo '
    '; - echo error(i18n('There needs to be exactly one award for each division/category')); - $ok = 0; - } - - echo ""; - echo '

    Divisional Judging Groupings

    - ' . i18n('Divisional Judging Groupings Manager') . ''; - echo '
    '; - - $jdivs = judges_scheduler_check_jdivs(); - if ($jdivs > 1) { - echo happy(i18n('There are %1 divisional groups defined for divisional judging, good', array($jdivs))); - } else { - echo error(i18n('There is not more than 1 divisional groups defined for divisional judging. Please assign ALL categories/divisions/languages to judging groupings before continuing')); - $ok = 0; - } - - echo '

    Projects and Judges


    '; - - $k = judges_scheduler_check_judges(); - - if (!$k) - $ok = 0; - - if ($ok) { - echo i18n("Everything looks in order, we're ready to create the - divisional awards judging teams. Click link below to start the scheduler. - Please be patient as it may take several minutes find an good solution to - the judging team assignments."); - - echo '
    '; - echo '
    '; - - echo '' . i18n('Start the judging scheduler to create judging teams and judging schedule') . ''; - } else { - echo '
    '; - echo '
    '; - - echo '' . i18n('Something above looks bad, but you can start the judging scheduler anyways with the understanding that results will NOT be optimal, or in fact, the scheduler may not work at all!') . ''; - } -} else { - echo '
    '; - echo ''; - echo i18n('The scheduler is currently running'); - echo ''; - echo '
    '; - echo '
    '; - echo '' . i18n('Click here to check the judging scheduler progress') . ''; - echo '
    '; - echo '
    '; - echo '
    '; - echo i18n('If the scheduler is not running (and you are 100% sure that it is not!) click the link below to reset the scheduler status'); - echo '
    '; - echo '' . i18n('Reset judge scheduler status') . '';; -} - -echo '
    '; -echo '
    '; -echo '
    '; - -send_footer(); - -?> diff --git a/admin/judges_schedulerconfig_check.inc.php b/admin/judges_schedulerconfig_check.inc.php deleted file mode 100644 index 6e1f83a1..00000000 --- a/admin/judges_schedulerconfig_check.inc.php +++ /dev/null @@ -1,265 +0,0 @@ -prepare('SELECT * FROM judges_timeslots WHERE ' - . " year=?" - . " AND `type`='divisional1'"); - $q->execute([$config['FAIRYEAR']]); - if ($q->rowCount()) { - $round = $q->fetch(PDO::FETCH_OBJ); - $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE round_id=? AND type='timeslot'"); - $q->execute([$round->id]); - return $q->rowCount(); - } else - return 0; -} - -function judges_scheduler_check_timeslots_sa() -{ - global $config, $pdo; - $rows = 0; - - $q = $pdo->prepare('SELECT * FROM judges_timeslots WHERE ' - . " year=?" - . " AND `type`='special'"); - $q->execute([$config['FAIRYEAR']]); - if ($q->rowCount()) { - while (($round = $q->fetch(PDO::FETCH_OBJ))) { - $rq = $pdo->prepare("SELECT * FROM judges_timeslots WHERE round_id=? AND type='timeslot'"); - $rq->execute([$round->id]); - $rows += $rq->rowCount(); - } - } - return $rows; -} - -function judges_scheduler_check_awards() -{ - global $config, $pdo; - - $q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); - $q->execute([$config['FAIRYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) - $div[$r->id] = $r->division; - - $q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY id"); - $q->execute([$config['FAIRYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) - $cat[$r->id] = $r->category; - - $dkeys = array_keys($div); - $ckeys = array_keys($cat); - - if ($config['filterdivisionbycategory'] == 'yes') { - $q = $pdo->prepare("SELECT * FROM projectcategoriesdivisions_link WHERE year=? ORDER BY projectdivisions_id,projectcategories_id"); - $q->execute([$config['FAIRYEAR']]); - $divcat = array(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $divcat[] = array('c' => $r->projectcategories_id, 'd' => $r->projectdivisions_id); - } - } else { - $divcat = array(); - foreach ($dkeys AS $d) { - foreach ($ckeys AS $c) { - $divcat[] = array('c' => $c, 'd' => $d); - } - } - } - - $missing_awards = array(); - foreach ($divcat AS $dc) { - $d = $dc['d']; - $c = $dc['c']; - $q = $pdo->prepare("SELECT award_awards.id FROM - award_awards, - award_awards_projectcategories, - award_awards_projectdivisions - WHERE - award_awards.year=? - AND award_awards_projectcategories.year=? - AND award_awards_projectdivisions.year=? - AND award_awards.id=award_awards_projectcategories.award_awards_id - AND award_awards.id=award_awards_projectdivisions.award_awards_id - AND award_awards_projectcategories.projectcategories_id=? - AND award_awards_projectdivisions.projectdivisions_id=? - AND award_awards.award_types_id='1' - "); - $q->execute([$config['FAIRYEAR'],$config['FAIRYEAR'],$config['FAIRYEAR'],$c,$d]); - show_pdo_errors_if_any($pdo); - if ($q->rowCount() != 1) { - $missing_awards[] = "{$cat[$c]} - {$div[$d]} (" . i18n('%1 found', array($q->rowCount())) . ')'; - } - } - return $missing_awards; -} - -function judges_scheduler_check_jdivs() -{ - global $config, $pdo; - - $q = $pdo->prepare('SELECT DISTINCT jdiv_id FROM judges_jdiv '); - $q->execute(); - $rows = $q->rowCount(); - - return $rows; -} - -function judges_scheduler_check_judges() -{ - global $config, $pdo; - $ok = 1; - - $jdiv = array(); - $projectlanguagetotal = array(); - $projecttotal = 0; - - $q = $pdo->prepare('SELECT * FROM judges_jdiv ORDER BY jdiv_id'); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - /* Ignore any div/cat with jdiv 0 */ - if ($r->jdiv_id == 0) - continue; - - $d = $r->projectdivisions_id; - $c = $r->projectcategories_id; - $l = $r->lang; - - $qp = $pdo->prepare('SELECT COUNT(projects.id) as cnt FROM projects, registrations WHERE ' - . " projects.year=? AND " - . " projectdivisions_id=? AND " - . " projectcategories_id=? AND " - . " language=? AND " - . ' registrations.id = projects.registrations_id ' - . getJudgingEligibilityCode()); - $qp->execute([$config['FAIRYEAR'],$d,$c,$l]); - $qr = $qp->fetch(PDO::FETCH_OBJ); - - // if (get_value_from_3d_array($jdiv, $r->jdiv_id, 'num_projects', 'total') !== null){ - $jdiv[$r->jdiv_id]['num_projects']['total'] += $qr->cnt; - // } - - $jdiv[$r->jdiv_id]['num_projects'][$l] += $qr->cnt; - - $projectlanguagetotal[$l] += $qr->cnt; - $projecttotal += $qr->cnt; - } - - $totalteams['total'] = 0; - echo '' - . '' - . ''; - - echo ''; - echo ''; - foreach ($config['languages'] AS $lkey => $lname) - echo ""; - echo ''; - foreach ($config['languages'] AS $lkey => $lname) - echo ""; - echo "\n"; - - foreach ($jdiv AS $jdiv_id => $jd) { - $c = $jd['num_projects']['total']; - - // total judge teams calculation - $t['total'] = ceil($c / $config['max_projects_per_team'] * $config['times_judged']); - if ($t['total'] < $config['times_judged'] && $c > 0) - $t['total'] = $config['times_judged']; - $jdiv[$jdiv_id]['num_jteams']['total'] = $t['total']; - $totalteams['total'] += $t['total']; - // language teams calculation - foreach ($config['languages'] AS $lkey => $lname) { - $c = $jd['num_projects'][$lkey]; - $t['total_' . $lkey] = ceil($c / $config['max_projects_per_team'] * $config['times_judged']); - if ($t['total_' . $lkey] < $config['times_judged'] && $c > 0) - $t['total_' . $lkey] = $config['times_judged']; - $jdiv[$jdiv_id]['num_jteams']['total_' . $lkey] = $t['total_' . $lkey]; - $totalteams['total_' . $lkey] += $t['total_' . $lkey]; - } - - echo ""; - echo ""; - $langstr = ''; - foreach ($config['languages'] AS $lkey => $lname) { - $clang = ($jd['num_projects'][$lkey] ? $jd['num_projects'][$lkey] : 0); - echo ""; - } - echo ""; - foreach ($config['languages'] AS $lkey => $lname) { - $clang = ($jd['num_projects'][$lkey] ? $jd['num_projects'][$lkey] : 0); - // echo ""; - echo ""; - } - - echo ''; - } - echo '
    ' . i18n('Projects') . '' . i18n('Estimated Required Teams') . '
    ' . i18n('Total') . '$lkey' . i18n('Total') . '$lkey
    Judging Division Group $jdiv_id{$jd['num_projects']['total']}$clang{$t['total']}{$t['total']}{$t['total_' . $lkey]}
    '; - - echo '
    '; - echo ''; - echo i18n('Total judging teams required: %1', array($totalteams['total'])); - echo '
    '; - echo '
    '; - $minjudges['total'] = ($totalteams['total'] * $config['min_judges_per_team']); - $maxjudges['total'] = ($totalteams['total'] * $config['max_judges_per_team']); - echo i18n('Minimum number of judges required: %1', array($minjudges['total'])) . '
    '; - - foreach ($config['languages'] AS $lkey => $lname) { - if ($minjudges['total'] && $projecttotal) - $minjudges[$lkey] = round($totalteams['total_' . $lkey] * $config['min_judges_per_team']); // $projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']); - else - $minjudges[$lkey] = 0; - - echo '   ' . i18n('Minimum number of %1 judges required: %2', array($lname, $minjudges[$lkey])) . '
    '; - } - - echo i18n('Maximum number of judges needed: %1', array($maxjudges['total'])); - echo '
    '; - echo '
    '; - - /* $jq=mysql_query("SELECT COUNT(judges.id) AS num FROM judges,judges_years WHERE complete='yes' AND deleted='no' AND judges_years.year='{$config['FAIRYEAR']}' AND judges_years.judges_id=judges.id"); - $jr=mysql_fetch_object($jq); - $currentjudges=$jr->num;*/ - /* FIXME: this his highly inefficient :), but won't be done very often */ - $judges = judges_load_all(); - $currentjudges = count($judges); - echo "Current number of registered judges: $currentjudges"; - echo '
    '; - echo '
    '; - if ($currentjudges < $minjudges['total']) { - echo error(i18n('You do not have sufficient number of total judges based on your parameters')); - $ok = false; - } - - foreach ($config['languages'] AS $lkey => $lname) { - $lcount = 0; - foreach ($judges AS $j) { - foreach ($j['languages'] AS $jlang) { - if ($jlang == $lkey) - $lcount++; - } - } - - $currentjudges = $lcount; - echo '  ' . i18n('Current number of registered judges that can judge in %1: %2', array($lname, $currentjudges)) . ''; - echo '
    '; - if ($currentjudges < $minjudges[$lkey]) { - echo error(i18n('You do not have sufficient number of %1 judges based on your parameters', array($lname))); - $ok = false; - } - } - - if (!$ok) { - echo '  '; - echo '' . i18n('Update Scheduler Configuration') . ' (' . i18n('or get more judges!') . ')'; - } else - echo happy(i18n('You have a sufficient number of judges based on your parameters')); - - // now check if we can find a divisional award for each division and category - return $ok; -} - -?> diff --git a/admin/judges_teams.php b/admin/judges_teams.php deleted file mode 100644 index 75e06575..00000000 --- a/admin/judges_teams.php +++ /dev/null @@ -1,453 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("DELETE FROM judges_teams_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$_GET['delete'],$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams_timeslots_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$_GET['delete'],$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams_timeslots_projects_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$_GET['delete'],$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams_awards_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$_GET['delete'],$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams WHERE id=? AND year=?"); - $stmt->execute([$_GET['delete'],$config['FAIRYEAR']]); - message_push(happy(i18n('Judge team successfully removed, and all of its corresponding members, timeslots, projects and awards unlinked from team'))); -} - -if (get_value_or_default($action) == 'deletealldivisional') { - $q2 = $pdo->prepare("SELECT * - FROM \t - judges_teams - WHERE - year=? - AND autocreate_type_id='1' - "); - $q2->execute([$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - $numdeleted = 0; - while ($r2 = $q2->fetch(PDO::FETCH_OBJ)) { - // okay now we can start deleting things! whew! - // first delete any linkings to the team - - $stmt = $pdo->prepare("DELETE FROM judges_teams_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$r2->id,$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams_timeslots_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$r2->id,$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams_timeslots_projects_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$r2->id,$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams_awards_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$r2->id,$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams WHERE id=? AND year=?"); - $stmt->execute([$r2->id,$config['FAIRYEAR']]); - $numdeleted++; - } - if ($numdeleted) - message_push(happy(i18n('Successfully deleted %1 auto-created divisional team(s)', array($numdeleted)))); - else - message_push(error(i18n('There were no auto-created divisional teams to delete'))); -} - -if (get_value_or_default($action) == 'deleteall') { - $q2 = $pdo->prepare("SELECT * - FROM \tjudges_teams - WHERE - year=? - "); - $q2->execute([$config['FAIRYEAR']]); - $numdeleted = 0; - while ($r2 = $q2->FETCH(PDO::FETCH_OBJ)) { - // okay now we can start deleting things! whew! - // first delete any linkings to the team - - $stmt = $pdo->prepare("DELETE FROM judges_teams_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$r2->id,$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams_timeslots_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$r2->id,$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams_timeslots_projects_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$r2->id,$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams_awards_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$r2->id,$config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM judges_teams WHERE id=? AND year=?"); - $stmt->execute([$r2->id,$config['FAIRYEAR']]); - $numdeleted++; - } - if ($numdeleted) - message_push(happy(i18n('Successfully deleted %1 team(s)', array($numdeleted)))); - else - message_push(error(i18n('There were no teams to delete'))); -} - -if ((get_value_or_default($action) == 'save' || $action == 'assign') && $edit) { - // if we're updating or assigning, it doesnt matter, lets do the same thing (save record, add award - // but when we're done, if we're "assign" then go back to edit that team - // if we're save, then go back to the team list - $err = false; - $q = $pdo->prepare("UPDATE judges_teams SET num=?, name=? WHERE id=?"); - $q->execute([ $_POST['team_num'],(stripslashes($_POST['team_name'])),$edit]); - if ($pdo->errorInfo()) { - $err = true; - message_push(error($pdo->errorInfo())); - } - - if ($_POST['award']) { - // we can only have 1 special award assigned to any given team so we'll be able to properly - // manage the projects that we assign to the team. If there was more than one special award - // the judges wouldnt know which projects to judge for which award. This doesnt apply for divisions - // because the category/division is obvious based on project numbesr. A divisional judge team could easily - // be assigned to do all of Comp Sci - Junior, Intermediate and Senior without any problems. - $q = $pdo->prepare("SELECT award_types.type FROM award_awards, award_types WHERE award_awards.award_types_id=award_types.id AND award_awards.id=?"); - $q->execute([$_POST['award']]); - $aw = $q->fetch(PDO::FETCHH_OBJ); - - $addaward = true; - if ($aw->type == 'Special') { - $q = $pdo->prepare("SELECT COUNT(*) AS num FROM - judges_teams_awards_link, - award_awards, - award_types - WHERE - judges_teams_awards_link.judges_teams_id=? - AND judges_teams_awards_link.award_awards_id=award_awards.id - AND award_awards.award_types_id=award_types.id - AND award_types.type='Special' - "); - $q->exxecute([$edit]); - $r = $q->fetch(PDO::FETCHH_OBJ); - echo "special awards: $r->num"; - if ($r->num) { - $addaward = false; - message_push(error(i18n('Sorry, only one Special Award can be assigned to a judging team'))); - } else { - $addaward = true; - } - } - - if ($addaward) { - // link up the award - $stmt = $pdo->prepare("INSERT INTO judges_teams_awards_link (award_awards_id,judges_teams_id,year) VALUES (?,?,?)"); - $stmt->execute([$_POST['award'],$edit,$config['FAIRYEAR']]); - message_push(happy(i18n('Award assigned to team'))); - } - } - - if ($action == 'assign') - $action = 'edit'; - else if ($action == 'save') { - if ($err) - $action = 'edit'; - else { - message_push(happy(i18n('Team successfully saved'))); - unset($action); - unset($edit); - } - } -} - -if (get_value_or_default($action) == 'unassign') { - $stmt = $pdo->prepare("DELETE FROM judges_teams_awards_link WHERE judges_teams_id=? AND award_awards_id=? AND year=?"); - $stmt->execute([$edit,$_GET['unassign'],$config['FAIRYEAR']]); - message_push(happy(i18n('Award unassigned from judge team'))); - // keep editing the same team - $action = 'edit'; -} - -if (get_value_or_default($action) == 'createall') { - // first make sure we dont have any non-divisional award teams (dont want people hitting refresh and adding all the teams twice - $q = $pdo->prepare("SELECT COUNT(*) AS c FROM judges_teams WHERE autocreate_type_id!='1' AND year=?"); - $q->execute([$config['FAIRYEAR']]); - $r = $q->fetch(PDO::FETCH_OBJ); - if ($r->c) { - message_push(error(i18n("Cannot 'Create All' teams when any divisional teams currently exist. Try deleting all existing non-divisional teams first."))); - } else { - // grab all the awards - $q = $pdo->prepare("SELECT - award_awards.*, - award_types.type AS award_type, - award_types.order AS award_types_order - FROM \t - award_awards, - award_types - WHERE \t - award_awards.award_types_id=award_types.id - AND award_awards.year=? - AND award_types.year=? - AND award_types_id!='1' - ORDER BY - award_types_order, - award_awards.order, - name"); - $q->execute([$config['FAIRYEAR'],$config['FAIRYEAR']]); - - // startat - $q2 = $pdo->prepare("SELECT MAX(num) AS lastnum FROM judges_teams WHERE year=?"); - $q2->execute([$config['FAIRYEAR']]); - $r2 = $q2->fetch(PDO::FETCH_OBJ); - if ($r2->lastnum) - $num = $r2->lastnum + 1; - else - $num = 1; - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - // print_r($r); - $name = "($r->award_type) $r->name"; - $stmt = $pdo->prepare('INSERT INTO judges_teams (num, name, autocreate_type_id, year) - VALUES (:num, :name, :autocreate_type_id, :year)'); - $stmt->bindParam(':num', $num); - $stmt->bindParam(':name', $name); - $stmt->bindParam(':autocreate_type_id', $r->award_types_id); - $stmt->bindParam(':year', $config['FAIRYEAR']); - $stmt->execute(); - show_pdo_errors_if_any($pdo); - $team_id = $pdo->lastInsertId(); - if ($team_id) { - // now link the new team to the award - $stmt = $pdo->prepare("INSERT INTO judges_teams_awards_link (award_awards_id,judges_teams_id,year) VALUES (?,?,?)"); - $stmt->execute([$r->id,$team_id,$config['FAIRYEAR']]); - message_push(happy(i18n('Created team #%1: %2', array($num, $name)))); - } else { - message_push(error(i18n('Error creating team #%1: %2', array($num, $name)))); - } - $num++; - } - } -} - -if (get_value_or_default($action) == 'add' && $_GET['num']) { - $stmt = $pdo->prepare("INSERT INTO judges_teams(num,year) VALUES (?,?)"); - $stmt->execute([$_GET['num'],$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - $edit = $pdo->lastInsertId(); - $action = 'edit'; -} - -if (get_value_or_default($action) == 'edit' && $edit) { - send_header('Edit Judging Team', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judges' => 'admin/judges.php', - 'Manage Judging Teams' => 'admin/judges_teams.php')); -?> - - -'; - $team = getJudgingTeam($edit); - - if (!$_SESSION['viewstate']['judges_teams_awards_show']) - $_SESSION['viewstate']['judges_teams_awards_show'] = 'unassigned'; - // now update the judges_teams_awards_show viewstate - if (get_value_from_array($_GET, 'judges_teams_awards_show')) - $_SESSION['viewstate']['judges_teams_awards_show'] = $_GET['judges_teams_awards_show']; - - echo '
    '; - echo ''; - echo ""; - - echo ''; - echo ''; - echo ''; - echo ''; - echo '
    ' . i18n('Team Number') . ':
    ' . i18n('Team Name') . ':
    ' . i18n('Awards') . ':'; - - if (count(get_value_from_array($team, 'awards', []))) { - foreach ($team['awards'] AS $award) { - echo ''; - echo ' (' . $award['award_type'] . ') ' . $award['name'] . '
    '; - } - } - - echo ''; - if ($_SESSION['viewstate']['judges_teams_awards_show'] == 'all') { - echo "'; - echo ''; - } else { - echo ''; - echo "'; - } - echo ''; - - if ($_SESSION['viewstate']['judges_teams_awards_show'] == 'all') { - $querystr = "SELECT - award_awards.id, - award_awards.name, - award_types.type AS award_type, - award_types.order AS award_type_order - FROM - award_awards, - award_types - WHERE - award_awards.year='" . $config['FAIRYEAR'] . "' - AND award_types.id=award_awards.award_types_id - AND award_types.year='{$config['FAIRYEAR']}' - ORDER BY - award_type_order, - name - "; - } else { - $querystr = "SELECT - award_awards.id, - award_awards.name, - award_types.type AS award_type, - award_types.order AS award_type_order - FROM - ( - award_awards, - award_types - ) - LEFT JOIN judges_teams_awards_link ON award_awards.id = judges_teams_awards_link.award_awards_id - WHERE - award_awards.year=? AND - judges_teams_awards_link.award_awards_id IS NULL - AND award_types.id=award_awards.award_types_id - AND award_types.year=? - ORDER BY - award_type_order, - name"; - } - - echo ''; - echo '
    " . i18n('show unassigned') . '' . i18n('show all') . '' . i18n('show unassigned') . '" . i18n('show all') . '
    '; - $q = $pdo->prepare($querystr); - $q->execute([$config['FAIRYEAR'],$config['FAIRYEAR']]); - - show_pdo_errors_if_any($pdo); - echo ''; - echo ''; - echo '
    '; - - echo '
    '; - echo ''; - echo '
    '; -} else { - send_header('Manage Judging Teams', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judges' => 'admin/judges.php')); - echo '
    '; - - $teams = getJudgingTeams(); - $newteamnum = null; - if (count($teams)) { - // grab an array of all the current team numbers - foreach ($teams AS $team) - $teamnumbers[$team['num']] = 1; - - // start at 1, and find the next available team number - $newteamnum = 1; - while (get_value_from_array($teamnumbers, $newteamnum) == 1) { - $newteamnum++; - } - } - - echo ''; - echo '
    '; - $q = $pdo->prepare("SELECT COUNT(*) AS c FROM judges_teams WHERE autocreate_type_id!='1' AND year=?"); - $q->execute([$config['FAIRYEAR']]); - $r = $q->fetch(PDO::FETCH_OBJ); - if (!$r->c) { - echo '' . i18n('Automatically create one new team for every non-divisional award') . '
    '; - } - - echo "" . i18n('Manually add individual team') . '
    '; - echo '
    '; - - if (count($teams)) { - echo 'Delete all teams assigned to divisional awards'; - echo '
    '; - echo 'Delete all teams
    '; - echo '
    '; - - echo "\n"; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - foreach ($teams AS $team) { - echo ''; - - echo ''; - - echo ' \n"; - echo "\n"; - } - echo '
    NumTeam NameAward(s)Actions
    #' . $team['num'] . ''; - echo $team['name']; - echo ''; - if (count(get_value_from_array($team, 'awards', []))) { - foreach ($team['awards'] AS $award) { - echo $award['name'] . '
    '; - } - } else { - echo error(i18n('No award assigned to team'), 'inline'); - } - echo '
    '; - echo ''; - echo ' '; - echo ''; - - echo "
    '; - echo ''; - echo '
    '; - } else { - echo ''; - } -} -send_footer(); - -?> diff --git a/admin/judges_teams_members.php b/admin/judges_teams_members.php deleted file mode 100644 index d33d313f..00000000 --- a/admin/judges_teams_members.php +++ /dev/null @@ -1,477 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judges' => 'admin/judges.php')); -?> - - 0) { - // first check if this team exists. - $q = $pdo->prepare("SELECT id,name FROM judges_teams WHERE num=? AND year=?"); - $q->execute([$_POST['team_num'],$config['FAIRYEAR']]); - if ($q->rowCount()) { - $r = $q->fetch(PDO::FETCH_OBJ); - $team_id = $r->id; - $team_name = $r->name; - - // if the team is empty, we'll add the first person as the captain - $team = getJudgingTeam($team_id); - if (count(get_value_from_array($team, 'members', []))) - $captain = 'no'; - else - $captain = 'yes'; - } - $added = 0; - - foreach ($_POST['judgelist'] AS $selectedjudge) { - // before we insert them, we need to make sure they dont already belong to this team. We can not have the same judge assigned to the same team multiple times. - - $q = $pdo->prepare("SELECT * FROM judges_teams_link WHERE users_id=? AND judges_teams_id=?"); - $q->execute([$selectedjudge,$team_id]); - if ($q->rowCount()) { - echo notice(i18n('Judge (%1) already belongs to judging team: %2', array($selectedjudge, $team_name))); - } else { - // lets make the first one we add a captain, the rest, non-captains :) - $stmt = $pdo->prepare("INSERT INTO judges_teams_link (users_id,judges_teams_id,captain,year) VALUES (?,?,?,?)"); - $stmt->execute([$selectedjudge,$team_id,$captain,$config['FAIRYEAR']]); - $added++; - } - // if this is alreayd no, then who cares, but if its the first one that is going into the new team, then - // captain will be yes, and we only want the first one assigned to a new team to be the captain - // sno now we can set this back to no - $captain = 'no'; - } - if ($added == 1) - $j = i18n('judge'); - else - $j = i18n('judges'); - - echo happy(i18n('%1 %2 added to team #%3 (%4)', array($added, $j, $_POST['team_num'], $team_name))); -} - -if (get_value_from_array($_GET, 'action') == 'del' && get_value_from_array($_GET, 'team_num') && get_value_from_array($_GET, 'team_id') && get_value_from_array($_GET, 'users_id')) { - $stmt = $pdo->prepare("DELETE FROM judges_teams_link WHERE users_id=? AND judges_teams_id=? AND year=?"); - $stmt->execute([$_GET['users_id'],$_GET['team_id'],$config['FAIRYEAR']]); - echo happy(i18n('Removed judge from team #%1 (%2)', array($_GET['team_num'], $_GET['team_name']))); - - // if there is still members left in the team, make sure we have a captain still - $q = $pdo->prepare("SELECT * FROM judges_teams_link WHERE judges_teams_id=? AND year=?"); - $q->execute([$_GET['team_id'],$config['FAIRYEAR']]); - if ($q->rowCount()) { - // make sure the team still has a captain! - // FIXME: this might best come from the "i am willing to be a team captain" question under the judges profile - $gotcaptain = false; - $first = true; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($first) { - $firstjudge = $r->users_id; - $first = false; - } - - if ($r->captain == 'yes') { - $gotcaptain = true; - break; - } - } - if (!$gotcaptain) { - // make the first judge the captain - $stmt = $pdo->prepare("UPDATE judges_teams_link SET captain='yes' WHERE judges_teams_id=? AND users_id=? AND year=?"); - $stmt->execute([$_GET['team_id'],$firstjudge,$config['FAIRYEAR']]); - echo notice(i18n('Team captain was removed. A new team captain has been automatically assigned')); - } - } -} - -if (get_value_from_array($_GET, 'action') == 'empty' && get_value_from_array($_GET, 'team_num') && get_value_from_array($_GET, 'team_id')) { - $stmt = $pdo->prepare("DELETE FROM judges_teams_link WHERE judges_teams_id=? AND year=?"); - $stmt->execute([$_GET['team_id'],$config['FAIRYEAR']]); - echo happy(i18n('Emptied all judges from team #%1 (%2)', array($_GET['team_num'], $_GET['team_name']))); -} - -if (get_value_from_array($_POST, 'action') == 'saveteamnames') { - if (count($_POST['team_names'])) { - foreach ($_POST['team_names'] AS $team_id => $team_name) { - $stmt = $pdo->prepare("UPDATE judges_teams SET name=? WHERE id=?"); - $stmt->execute([stripslashes($team_name),$team_id]); - } - echo happy(i18n('Team names successfully saved')); - } -} - -if (get_value_from_array($_GET, 'action') == 'addcaptain') { - // teams can have as many captains as they want, so just add it. - $stmt = $pdo->prepare("UPDATE judges_teams_link SET captain='yes' WHERE judges_teams_id=? AND users_id=?"); - $stmt->execute([ $_GET['team_id'],$_GET['judge_id']]); - echo happy(i18n('Team captain assigned')); -} - -if (get_value_from_array($_GET, 'action') == 'removecaptain') { - // teams must always have at least one captain, so if we only have one, and we are trying to remove it, dont let them! - $q = $pdo->prepare("SELECT * FROM judges_teams_link WHERE captain='yes' AND judges_teams_id=?"); - $q->execute([$_GET['team_id']]); - if ($q->rowCount() < 2) { - echo error(i18n('A judge team must always have at least one captain')); - } else { - $pdo->prepare("UPDATE judges_teams_link SET captain='no' WHERE judges_teams_id=? AND users_id=?"); - $pdo->execute([$_GET['team_id'],$_GET['judge_id']]); - echo happy(i18n('Team captain removed')); - } -} - -if (get_value_from_array($_GET, 'action') == 'autoassignspecial') { - /* Load all the judges (judge_complete=yes, deleted=no, year=fairyear) */ - $judgelist = judges_load_all(); - - /* Load all the teams */ - $teams = array(); - $q = $pdo->prepare("SELECT * FROM judges_teams WHERE year=?"); - $q->execute([$config['FAIRYEAR']]); - while ($i = $q->fetch(PDO::FETCH_ASSOC)) { - $teams[$i['id']] = $i; - } - - /* And the links */ - $links = array(); - $q = $pdo->prepare("SELECT * FROM judges_teams_link WHERE year=?"); - $q->execute([$config['FAIRYEAR']]); - while ($i = $q->fetch(PDO::FETCH_ASSOC)) { - $judgelist[$i['users_id']]['teams_links'][] = $i; - } - - $jlist = array(); - - /* Remove all judges that have a link */ - foreach ($judgelist as $j) { - if (count($j['teams_links']) == 0 && $j['special_award_only'] == 'yes') - $jlist[] = $j['id']; - } - echo 'We have ' . count($jlist) . ' special awards judges to assign'; - foreach ($jlist AS $jid) { - $j = $judgelist[$jid]; - if (is_array($j['special_award_selected']) && count($j['special_award_selected'])) { - // assing them to ALL teams for ALL awards - foreach ($j['special_award_selected'] AS $awardid) { - echo "Looking for a team for award $awardid
    "; - // find the award id linked to a team - $q = $pdo->prepare("SELECT * FROM judges_teams_awards_link WHERE award_awards_id=? AND year=?"); - $q->execute([$awardid,$config['FAIRYEAR']]); - if ($q->rowCount()) { - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO judges_teams_link (users_id,judges_teams_id,captain,year) VALUES (?,?,'yes',?)"); - $stmt->execute([$jid,$r->judges_teams_id,$config['FAIRYEAR']]); - echo happy(i18n('%1 %2 to their special award(s) team(s)', array($j['firstname'], $j['lastname']))); - } - } else { - echo error(i18n('%1 %2 not assigned - No team found that is judging award id %1', array($awardid))); - } - } - } else { - echo error(i18n('%1 %2 has indicated special awards only, but didnt selected any awards', array($j['firstname'], $j['lastname']))); - } - } -} - -if (!$_SESSION['viewstate']['judges_teams_list_show']) - $_SESSION['viewstate']['judges_teams_list_show'] = 'unassigned'; -// now update the judges_teams_list_show viewstate -if (get_value_from_array($_GET, 'judges_teams_list_show')) - $_SESSION['viewstate']['judges_teams_list_show'] = $_GET['judges_teams_list_show']; - -echo '
    '; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo '
    ' . i18n('Judges List'); -echo '
    '; -echo ''; -echo '
    ' . i18n('Judge Teams') . '
    '; -echo ''; -if ($_SESSION['viewstate']['judges_teams_list_show'] == 'all') { - echo ''; - echo ''; -} else { - echo ''; - echo ''; -} -echo '
    ' . i18n('show unassigned') . '' . i18n('show all') . '' . i18n('show unassigned') . '' . i18n('show all') . '
    '; - -/* Load all the judges (judge_complete=yes, deleted=no, year=fairyear) */ -$judgelist = judges_load_all(); - -/* Load all the teams */ -$teams = array(); -$q = $pdo->prepare("SELECT * FROM judges_teams WHERE year=?"); -$q->execute([$config['FAIRYEAR']]); -while ($i = $q->fetch(PDO::FETCH_ASSOC)) { - $teams[$i['id']] = $i; -} - -/* And the links */ -$links = array(); -$q = $pdo->prepare("SELECT * FROM judges_teams_link WHERE year=?"); -$q->execute([$config['FAIRYEAR']]); -while ($i = $q->fetch(PDO::FETCH_ASSOC)) { - $judgelist[$i['users_id']]['teams_links'][] = $i; -} - -$jlist = array(); -if ($_SESSION['viewstate']['judges_teams_list_show'] == 'unassigned') { - /* Remove all judges that have a link */ - foreach ($judgelist as $j) { - if (count(get_value_from_array($j, 'teams_links', [])) == 0) - $jlist[] = $j['id']; - } -} else { - $jlist = array_keys($judgelist); -} - -echo '
    '; -echo i18n('Listing %1 judges', array(count($jlist))); -echo '
    '; -echo '
    '; -show_pdo_errors_if_any($pdo); -echo ''; -echo '
    '; -echo "Auto-Assign Special Awards Judges to Special Awards Teams\n"; -echo '
    '; - -$teams = getJudgingTeams(); - -foreach ($teams AS $team) { - echo '
    '; - - echo ''; - echo '
    '; - echo ''; - echo ''; - - echo "\n"; - echo '\n"; - echo ''; - - if (count(get_value_from_array($team, 'members', []))) { - foreach ($team['members'] AS $member) { - $j = &$judgelist[$member['id']]; - echo ''; - } - - echo ''; - } else { - echo ''; - } - - echo '
    #' . $team['num'] . ': '; - echo $team['name']; - echo "
    '; - foreach ($team['rounds'] as $ts) { - echo "{$ts['name']}: " . format_time($ts['starttime']) . ' - ' . format_time($ts['endtime']) . '
    '; - } - echo '
    '; - - /* - * if($team['num']=="89") { - * echo "
    ";
    -			 * 	print_r($team);
    -			 * 	print_r($j);
    -			 * 	echo "
    "; - * } - */ - - $langerr = false; - $judgeerr = false; - foreach ($team['languages'] AS $teamlang) { - if (is_array($j['languages'])) { - if (!in_array($teamlang, $j['languages'])) { - $langerr = true; - break; - } - } else { - $langerr = true; - } - } - - if (!$j['id']) { - $judgeerr = true; - } - - echo ''; - echo '
    '; - if ($langerr || $judgeerr) - echo ''; - if ($judgeerr) { - echo 'ERROR: this judge is assigned to the team, but they are not an active/complete judge!
    '; - } - - if ($member['captain'] == 'yes') { - echo ''; - echo ''; - echo ' '; - } else { - echo ''; - echo ''; - echo ' '; - } - echo ''; - echo $member['firstname'] . ' ' . $member['lastname']; - if (is_array($j['languages'])) - $l = is_array($j['languages']) ? join(' ', $j['languages']) : ''; - - echo " ($l)\n"; - if ($langerr || $judgeerr) - echo "
    \n"; - echo '
    '; - echo ''; - echo ' ' . i18n('Empty All Members') . ' '; - echo ''; - echo ''; - echo '
    '; - echo error(i18n('Team has no members'), 'inline'); - echo '
    '; - - echo '
    '; -} - -echo '
    '; - -echo '
    '; -echo '
    '; -echo ''; -echo '
    '; - -send_footer(); - -?> diff --git a/admin/judges_teams_projects.php b/admin/judges_teams_projects.php deleted file mode 100644 index c3427b83..00000000 --- a/admin/judges_teams_projects.php +++ /dev/null @@ -1,426 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judges' => 'admin/judges.php')); -?> - - - '; -$action = null; -if (get_value_from_array($_GET, 'actio')) - $action = $_GET['action']; -else if (get_value_from_array($_POST, 'action')) - $action = $_POST['action']; - -if (get_value_from_array($_GET, 'edit')) - $edit = $_GET['edit']; -else if (get_value_from_array($_POST, 'edit')) - $edit = $_POST['edit']; - -if (!get_value_from_2d_array($_SESSION, 'viewstate', 'judges_projects_list_show')) - $_SESSION['viewstate']['judges_projects_list_show'] = 'unassigned'; -// now update the judges_teams_list_show viewstate -if (get_value_from_array($_GET, 'judges_projects_list_show')) - $_SESSION['viewstate']['judges_projects_list_show'] = $_GET['judges_projects_list_show']; - -if (!get_value_from_2d_array($_SESSION, 'viewstate', 'judges_projects_list_eligible')) - $_SESSION['viewstate']['judges_projects_list_eligible'] = 'true'; -// now update the judges_teams_list_show viewstate -if (get_value_from_array($_GET, 'judges_projects_list_eligible')) - $_SESSION['viewstate']['judges_projects_list_eligible'] = $_GET['judges_projects_list_eligible']; - -if (get_value_from_array($_GET, 'action') == 'delete' && $_GET['delete'] && $_GET['edit']) { - $stmt = $pdo->prepare("DELETE FROM judges_teams_timeslots_projects_link WHERE id=?"); - $stmt->execute([$_GET['delete']]); - echo happy(i18n('Judging team project successfully removed')); - $action = 'edit'; -} - -if (get_value_from_array($_POST, 'action') == 'assign' && $_POST['edit'] && $_POST['timeslot'] && $_POST['project_id']) { - $stmt = $pdo->prepare("INSERT INTO judges_teams_timeslots_projects_link (judges_teams_id,judges_timeslots_id,projects_id,year) VALUES (?,?,?,?)"); - $stmt->execute([$_POST['edit'],$_POST['timeslot'],$_POST['project_id'],$config['FAIRYEAR']]); - echo happy(i18n('Project assigned to team timeslot')); -} - -$q = $pdo->prepare("SELECT DISTINCT(date) AS d FROM judges_timeslots WHERE year=?"); -$q->execute([$config['FAIRYEAR']]); -if ($q->rowCount() > 1) - $show_date = true; -else - $show_date = false; - -if (($action == 'edit' || $action == 'assign') && $edit) { - echo 'Back to Judging Teams Projects List'; - echo '
    '; - echo "\n"; - echo "\n"; - echo "\n"; - $team = getJudgingTeam($edit); - - echo '' . $team['name'] . ' (#' . $team['num'] . ')
    '; - if (count($team['members'])) { - $memberlist = '  '; - foreach ($team['members'] AS $member) { - if ($member['captain'] == 'yes') - $memberlist .= ''; - $memberlist .= $member['firstname'] . ' ' . $member['lastname']; - if ($member['captain'] == 'yes') - $memberlist .= ''; - $memberlist .= ', '; - } - echo '' . i18n('Judging Team Members') . ': '; - $memberlist = substr($memberlist, 0, -2); - echo '
    '; - } else - $memberlist = error(i18n('Team has no members assigned to it. Assign Judges Here')); - echo $memberlist; - echo '
    '; - echo '
    '; - - // we need award_ids for use below to get the eligible projects, so lets build the array here while we're displaying the awards - $award_ids = array(); - if (count($team['awards'])) { - $awardlist = '  '; - foreach ($team['awards'] AS $award) { - $awardlist .= $award['name']; - $awardlist .= ', '; - $award_ids[] = $award['id']; - } - echo '' . i18n('Judging Team Awards') . ': '; - $awardlist = substr($awardlist, 0, -2); - echo '
    '; - } else - $awardlist = error(i18n('Team has no awards assigned to it. Assign Awards Here')); - echo $awardlist; - - // get the timeslots that this team has. - $q = $pdo->prepare("SELECT - judges_timeslots.id, - judges_timeslots.date, - judges_timeslots.starttime, - judges_timeslots.endtime - FROM - judges_timeslots, - judges_teams, - judges_teams_timeslots_link - WHERE - judges_teams.id=? AND - judges_teams.id=judges_teams_timeslots_link.judges_teams_id AND - judges_timeslots.id=judges_teams_timeslots_link.judges_timeslots_id - ORDER BY - date,starttime - "); - $q->execute([$team['id']]); - - $numslots = $q - rowCount(); - if ($numslots) { - echo '
    '; - echo '
    '; - if ($_SESSION['viewstate']['judges_projects_list_eligible'] == 'true') - $ch = 'checked="checked"'; - else - $ch = ''; - - echo " " . i18n('Only show projects eligible/nominated for awards assigned to this team'); - echo ''; - echo ''; - - echo ''; - if ($_SESSION['viewstate']['judges_projects_list_show'] == 'all') { - echo "'; - echo ''; - } else { - echo ''; - echo "'; - } - echo ''; - echo ''; - echo ''; - echo '
    " . i18n('show unassigned') . '' . i18n('show all') . '' . i18n('show unassigned') . '" . i18n('show all') . ' 
    '; - - if ($_SESSION['viewstate']['judges_projects_list_show'] == 'all') { - $querystr = 'SELECT - projects.id, - projects.projectnumber, - projects.title, - registrations.status - FROM - projects, - registrations - WHERE - projectnumber is not null - ' . getJudgingEligibilityCode() . " AND - projects.registrations_id=registrations.id AND - projects.year=? - ORDER BY - projectnumber"; - } else if ($_SESSION['viewstate']['judges_projects_list_show'] == 'unassigned') { - $querystr = "SELECT - projects.id, - projects.projectnumber, - projects.title, - registrations.status - FROM - projects - LEFT JOIN judges_teams_timeslots_projects_link ON projects.id = judges_teams_timeslots_projects_link.projects_id, - registrations - WHERE - projectnumber is not null - ' . getJudgingEligibilityCode(). ' AND - projects.registrations_id=registrations.id AND - judges_teams_timeslots_projects_link.projects_id IS NULL AND - projects.year=? - ORDER BY - projectnumber"; - } - - $pq = $pdo->prepare($querystr); - $pq->execute([$config['FAIRYEAR'],$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - - $eligibleprojects = getProjectsEligibleOrNominatedForAwards($award_ids); - // echo nl2br(print_r($eligibleprojects,true)); - // the keys are the project numbers, so lets get an array of those too so we can use in_array below - $eligibleprojectsnumbers = array_keys($eligibleprojects); - // echo nl2br(print_r($eligibleprojects,true)); - - $numprojects = 0; - echo ''; - echo ''; - echo i18n('%1 projects listed', array($numprojects)); - echo '
    '; - - echo '
    '; - echo '
    '; - - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - } - echo '
    ' . i18n('Timeslot') . '' . i18n('Project') . '
    '; - - echo ''; - if ($show_date) - echo format_date($r->date) . ' '; - echo format_time($r->starttime); - echo ' - '; - echo format_time($r->endtime); - echo ''; - echo ''; - - $projq = $pdo->prepare("SELECT - judges_teams_timeslots_projects_link.id AS link_id, - projects.projectnumber, - projects.id, - projects.title - FROM - projects, - judges_teams_timeslots_projects_link - WHERE - judges_teams_timeslots_projects_link.judges_timeslots_id=? AND - judges_teams_timeslots_projects_link.judges_teams_id=? AND - judges_teams_timeslots_projects_link.projects_id=projects.id AND - judges_teams_timeslots_projects_link.year=? - ORDER BY - projectnumber - "); - $projq->execute([$r->id,$team['id'],$config['FAIRYEAR']]); - - show_pdo_errors_if_any($pdo); - while ($proj = $projq->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo "$proj->projectnumber - $proj->title
    "; - } - echo "id]\" type=\"button\" onclick=\"assign('$r->id')\" value=\"" . i18n('Assign') . '">'; - - echo '
    '; - } else { - echo error(i18n('Team has no timeslots assigned to it. Assign Timeslots Here')); - } - - echo '
    '; -} else { - echo ''; - - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - - $teams = getJudgingTeams(); - foreach ($teams AS $team) { - echo ''; - echo ''; - echo ''; - echo ''; - } - - echo '
    ' . i18n('Team') . '' . i18n('Timeslots and Projects') . '
    '; - echo '' . $team['name'] . ' (#' . $team['num'] . ')
    '; - $memberlist = ''; - if (count(get_value_from_array($team, 'members', []))) { - foreach ($team['members'] AS $member) { - echo '  '; - $err = false; - foreach ($team['languages_projects'] AS $projectlang) { - if (!in_array($projectlang, $member['languages_array'])) { - $err = true; - break; - } - } - if ($err) - echo ''; - if ($member['captain'] == 'yes') - echo ''; - echo $member['firstname'] . ' ' . $member['lastname'] . ' (' . $member['languages'] . ')
    '; - if ($member['captain'] == 'yes') - echo '
    '; - if ($err) - echo '
    '; - } - } - echo '
    '; - // get the timeslots that this team has. - $q = $pdo->prepare("SELECT - judges_timeslots.id, - judges_timeslots.date, - judges_timeslots.starttime, - judges_timeslots.endtime - FROM - judges_timeslots, - judges_teams, - judges_teams_timeslots_link - WHERE - judges_teams.id=? AND - judges_teams.id=judges_teams_timeslots_link.judges_teams_id AND - judges_timeslots.id=judges_teams_timeslots_link.judges_timeslots_id - ORDER BY - date,starttime - "); - $q->execute([$team['id']]); - $numslots = $q->rowCount(); - - echo '' . i18n('Edit team project assignments') . ''; - - echo ''; - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - } - echo '
    '; - - echo ''; - if ($show_date) - echo format_date($r->date) . ' '; - echo format_time($r->starttime); - echo ' - '; - echo format_time($r->endtime); - echo ''; - echo ''; - - $projq = $pdo->prepare("SELECT - projects.projectnumber, - projects.id, - projects.title, - projects.language - FROM - projects, - judges_teams_timeslots_projects_link - WHERE - judges_teams_timeslots_projects_link.judges_timeslots_id=? AND - judges_teams_timeslots_projects_link.judges_teams_id=? AND - judges_teams_timeslots_projects_link.projects_id=projects.id AND - judges_teams_timeslots_projects_link.year=? - ORDER BY - projectnumber - "); - $projq->execute([$r->id,$team['id'],$config['FAIRYEAR']]); - - show_pdo_errors_if_any($pdo); - while ($proj = $projq->fetch(PDO::FETCH_OBJ)) { - if (!in_array($proj->language, $team['languages_members'])) - echo ''; - - echo "$proj->projectnumber - $proj->title ($proj->language)"; - - if (!in_array($proj->language, $team['languages_members'])) - echo "\n"; - echo '
    '; - } - echo '
    '; - - echo '
    '; -} - -send_footer(); -?> diff --git a/admin/judges_teams_timeslots.php b/admin/judges_teams_timeslots.php deleted file mode 100644 index 8c0c8e15..00000000 --- a/admin/judges_teams_timeslots.php +++ /dev/null @@ -1,251 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'Judging Timeslot', - 'divisional1' => 'Divisional Round 1', - 'divisional2' => 'Divisional Round 2', - 'grand' => 'Grand Awards', - 'special' => 'Special Awards'); -if (array_key_exists('action', $_GET)) - $action = $_GET['action']; -if (array_key_exists('action', $_POST)) - $action = $_POST['action']; - -if (get_value_from_array($_GET, 'action') && $action == 'delete') { - $id = intval($_GET['delete']); - $stmt = $pdo->prepare("DELETE FROM judges_teams_timeslots_link WHERE id=?"); - $stmt->execute([$id]); - message_push(happy(i18n('Judging team timeslot successfully removed'))); -} - -if (array_key_exists('empty', $_GET) && $action == 'empty') { - $id = intval($_GET['empty']); - $stmt = $pdo->prepare("DELETE FROM judges_teams_timeslots_link WHERE judges_teams_id=?"); - $stmt->execute([$id]); - message_push(happy(i18n('Judging team timeslots successfully removed'))); -} - -if ($action == 'assign') { - // the db handles the uniqueness (to ensure the same timeslot isnt assigned to the same team more than once) - // so all we'll do here is just mass insert without regards for whats already there. - if (count($_POST['teams']) && count($_POST['timeslots'])) { - foreach ($_POST['teams'] AS $tm) { - foreach ($_POST['timeslots'] AS $ts) { - $stmt = $pdo->prepare("INSERT INTO judges_teams_timeslots_link (judges_teams_id,judges_timeslots_id,year) - VALUES (?,?,?)"); - $stmt->execute([$tm,$ts,$config['FAIRYEAR']]); - } - } - message_push(happy(i18n('%1 Timeslots assigned to %2 teams', array(count($_POST['timeslots']), count($_POST['teams']))))); - } else { - message_push(error(i18n('You must select both team(s) and timeslot(s) to assign'))); - } -} - -send_header('Judging Teams Timeslots', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judges' => 'admin/judges.php')); - -?> - - - '; - -echo '
    '; -echo ''; - -echo 'Choose timeslots to assign:
    '; -echo 'select all'; -echo ' | '; -echo 'select none'; -echo ' | '; -echo 'invert selection'; - -$q = $pdo->prepare("SELECT DISTINCT(date) AS d FROM judges_timeslots WHERE year=?"); -$q->execute([$config['FAIRYEAR']]); -if ($q->rowCount() > 1) - $show_date = true; -else - $show_date = false; - -echo ''; -echo ''; -echo ''; -if ($show_date) - echo ''; -echo ''; -echo ''; -echo "\n"; - -$q = $pdo->prepare("SELECT * FROM judges_timeslots - WHERE year=? - AND round_id='0' ORDER BY date,starttime"); -$q->execute([$config['FAIRYEAR']]); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - $span = $show_date ? 4 : 3; - echo "'; - $qq = $pdo->prepare("SELECT * FROM judges_timeslots - WHERE round_id=? ORDER BY date,starttime"); - $qq->execute([$r->id]); - while ($rr = $qq->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo ""; - if ($show_date) - echo ''; - echo ''; - echo ''; - echo "\n"; - } -} -echo '
     ' . i18n('Date') . '' . i18n('Start Time') . '' . i18n('End Time') . '
    {$r->name} (" . $round_str[$r->type] . ')
    id}\" />' . format_date($r->date) . '' . format_time($rr->starttime) . '' . format_time($rr->endtime) . '
    '; - -echo '
    '; -echo '
    '; -echo 'Choose teams to assign the above selected timeslots to:'; -echo '
    '; - -echo 'select all'; -echo ' | '; -echo 'select none'; -echo ' | '; -echo 'invert selection'; - -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; - -$teams = getJudgingTeams(); -foreach ($teams AS $team) { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; -} - -echo '
     ' . i18n('Team') . '' . i18n('Timeslots') . '
    '; - echo '' . $team['name'] . ' (#' . $team['num'] . ')
    '; - $memberlist = ''; - if (count(get_value_from_array($team, 'members', []))) { - foreach ($team['members'] AS $member) { - echo '  '; - if ($member['captain'] == 'yes') - echo ''; - echo $member['firstname'] . ' ' . $member['lastname'] . '
    '; - if ($member['captain'] == 'yes') - echo '
    '; - } - } - echo '
    '; - // get the timeslots that this team has. - $q = $pdo->prepare("SELECT - judges_teams_timeslots_link.id, - judges_timeslots.date, - judges_timeslots.starttime, - judges_timeslots.endtime - FROM - judges_timeslots, - judges_teams, - judges_teams_timeslots_link - WHERE - judges_teams.id=? AND - judges_teams.id=judges_teams_timeslots_link.judges_teams_id AND - judges_timeslots.id=judges_teams_timeslots_link.judges_timeslots_id - ORDER BY - date,starttime - "); - $q->execute([$team['id']]); - $numslots = $q->rowCount(); - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - if ($show_date) - echo format_date($r->date); - echo format_time($r->starttime); - echo ' - '; - echo format_time($r->endtime); - echo "  id\">'; - echo ''; - echo '
    '; - } - if ($numslots) - echo '  remove all'; - - echo '
    '; - -echo '
    '; -echo '
    '; -echo ''; -echo '
    '; - -send_footer(); -?> diff --git a/admin/judges_timeslots.php b/admin/judges_timeslots.php deleted file mode 100644 index 37512ae3..00000000 --- a/admin/judges_timeslots.php +++ /dev/null @@ -1,429 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'Judging Timeslot', - 'divisional1' => 'Divisional Round 1', - 'divisional2' => 'Divisional Round 2', - 'grand' => 'Grand Awards', - 'special' => 'Special Awards'); - -if (array_key_exists('action', $_POST)) - $action = $_POST['action']; -else if (array_key_exists('action', $_GET)) - $action = $_GET['action']; -else - $action = ''; - -if (array_key_exists('round_id', $_POST)) - $round_id = intval($_POST['round_id']); -else if (array_key_exists('round_id', $_GET)) - $round_id = intval($_GET['round_id']); -else - $round_id = 0; - -if (array_key_exists('timeslot_id', $_POST)) - $timeslot_id = intval($_POST['timeslot_id']); -else if (array_key_exists('timeslot_id', $_GET)) - $timeslot_id = intval($_GET['timeslot_id']); -else - $timeslot_id = 0; - -if ($action == 'saveround') { - $save = true; - /* Sanity check all the values */ - $y = intval($_POST['date_year']); - $m = intval($_POST['date_month']); - $d = intval($_POST['date_day']); - if ($y && $m && $d) - $date = "$y-$m-$d"; - else { - $save = false; - message_push(error(i18n('Date is required'))); - } - - if (array_key_exists('starttime_hour', $_POST) && array_key_exists('starttime_minute', $_POST)) { - $starttime = sprintf('%02d:%02d:00', intval($_POST['starttime_hour']), intval($_POST['starttime_minute'])); - } else { - $save = false; - message_push(error(i18n('Start Time is required'))); - } - - if (array_key_exists('endtime_hour', $_POST) && array_key_exists('endtime_minute', $_POST)) { - $endtime = sprintf('%02d:%02d:00', intval($_POST['endtime_hour']), intval($_POST['endtime_minute'])); - } else { - $save = false; - message_push(error(i18n('End Time is required'))); - } - - $type = $_POST['type']; - if (!array_key_exists($type, $round_str)) { - $save = false; - message_push(error(i18n('Invalid type specified'))); - } - - $name = stripslashes($_POST['name']); - - if ($save == true) { - if ($round_id == 0) { - /* New entry */ - $stmt = $pdo->prepare("INSERT INTO judges_timeslots (round_id,year) VALUES('0',?)"); - $stmt->execute([$config['FAIRYEAR']]); - $round_id = $pdo->lastInsertId(); - } - - $stmt = $pdo->prepare("UPDATE judges_timeslots SET `date`=?, - starttime=?, endtime=?, - `name`=?, - `type`=? WHERE id=?"); - $stmt->execute([$date,$starttime,$endtime,$name,$type,$round_id]); - - show_pdo_errors_if_any($pdo); - message_push(happy(i18n('Round successfully saved'))); - $action = ''; - } -} - -if ($action == 'deleteround') { - $stmt = $pdo->prepare("DELETE FROM judges_timeslots WHERE id=?"); - $stmt->execute([$round_id]); - /* Also delete all timeslots */ - - $stmt = $pdo->prepare("DELETE FROM judges_timeslots WHERE round_id=?"); - $stmt->execute([$round_id]); - message_push(happy(i18n('Round successfully removed'))); - $action = ''; -} -if ($action == 'deletetimeslot') { - $stmt = $pdo->prepare("DELETE FROM judges_timeslots WHERE id=?"); - $stmt->execute([$timeslot_id]); - message_push(happy(i18n('Timeslot successfully removed'))); - $action = ''; -} - -if ($action == 'savetimeslot') { - $save = true; - - $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE id=?"); - $q->execute([$round_id]); - $round_data = $q->fetch(PDO::FETCH_ASSOC); - - $date = $round_data['date']; - - if (array_key_exists('starttime_hour', $_POST) && array_key_exists('starttime_minute', $_POST)) { - $starttime = sprintf('%02d:%02d:00', intval($_POST['starttime_hour']), intval($_POST['starttime_minute'])); - } else { - $save = false; - message_push(error(i18n('Start Time is required'))); - } - - if (array_key_exists('endtime_hour', $_POST) && array_key_exists('endtime_minute', $_POST)) { - $endtime = sprintf('%02d:%02d:00', intval($_POST['endtime_hour']), intval($_POST['endtime_minute'])); - } else { - $save = false; - message_push(error(i18n('End Time is required'))); - } - - if ($save == true) { - if ($timeslot_id == 0) { - /* New entry */ - $stmt = $pdo->prepare("INSERT INTO judges_timeslots (round_id,date,type,year) VALUES(?, - ?,'timeslot',?)"); - $stmt->execute([$round_id,$date,$config['FAIRYEAR']]); - $timeslot_id = $pdo->lastInsertId(); - } - - $stmt = $pdo->prepare("UPDATE judges_timeslots SET starttime=?, endtime=? - WHERE id=?"); - $stmt->execute([$starttime,$endtime,$timeslot_id]); - - show_pdo_errors_if_any($pdo); - message_push(happy(i18n('Timeslot successfully saved'))); - $action = ''; - } -} - -if ($action == 'savemultiple') { - $save = true; - - $addnum = intval($_POST['addnum']); - $duration = intval($_POST['duration']); - $break = intval($_POST['break']); - - if (array_key_exists('starttime_hour', $_POST) && array_key_exists('starttime_minute', $_POST) && $addnum && $duration) { - $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE id=?"); - $q->execute([$round_id]); - $round_data = $q->fetch(PDO::FETCH_ASSOC); - - $date = $round_data['date']; - - $hr = intval($_POST['starttime_hour']); - $min = intval($_POST['starttime_minute']); - - $tt = $duration + $break; - - for ($x = 0; $x < $addnum; $x++) { - $q = $pdo->prepare("SELECT - DATE_ADD(?, INTERVAL ? MINUTE) AS endtime, - DATE_ADD(?, INTERVAL ? MINUTE) AS startnext"); - - $q->execute([ - "$date $hr:$min:00", $duration, - "$date $hr:$min:00", $tt - ]); - - show_pdo_errors_if_any($pdo); - $r = $q->fetch(PDO::FETCH_OBJ); - list($ed, $et) = explode(' ', $r->endtime); - list($nd, $nt) = explode(' ', $r->startnext); - - $starttime = sprintf('%02d:%02d:00', $hr, $min); - - $stmt = $pdo->prepare("INSERT INTO judges_timeslots (date,type,round_id,starttime,endtime,year) VALUES ( - ?,'timeslot',?, - ?,?, - ?)"); - $stmt->execute([$date,$round_data['id'],$starttime,$et,$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - $date = $nd; - list($s_h, $s_m, $s_s) = explode(':', $nt); - list($e_h, $e_m, $e_s) = explode(':', $et); - message_push(happy(i18n('Adding timeslot: %1', array("$date $hr:$min - $e_h:$e_m")))); - $hr = $s_h; - $min = $s_m; - } - $action = ''; - } else { - message_push(error(i18n('All fields are required to add multiple timeslots'))); - } -} - -if ($action == '') { - send_header('Judging Rounds and Timeslots', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judges' => 'admin/judges.php')); -} else { - send_header('Judging Rounds and Timeslots', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judges' => 'admin/judges.php', - 'Judging Rounds and Timeslots' => 'admin/judges_timeslots.php')); -} -echo '
    '; - -if ($action == 'addround' || $action == 'editround') { - echo '
    '; - echo "\n"; - echo "\n"; - - if ($action == 'addround') { - echo '

    Add New Judging Round

    '; - $r = array(); - $r['date'] = $config['dates']['fairdate']; - } else { - echo '

    Edit Judging Round

    '; - $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE id=?"); - $q->execute([$round_id]); - if ($q->rowCount() != 1) { - echo "UNKNOWN ROUND $round_id"; - exit; - } - $r = $q->fetch(PDO::FETCH_ASSOC); - } - - echo ''; - echo ''; - - echo ''; - echo ''; - echo ''; - echo '
    ' . i18n('Round Type') . ':'; - echo ''; - - echo '
    ' . i18n('Name') . ':'; - echo '
    ' . i18n('Date') . ':'; - emit_date_selector('date', $r['date']); - - echo '
    ' . i18n('Start Time') . ':'; - emit_time_selector('starttime', get_value_from_array($r, 'starttime')); - - echo '
    ' . i18n('End Time') . ':'; - emit_time_selector('endtime', get_value_from_array($r, 'endtime')); - - echo '
    '; - - echo ''; - echo '
    '; -} - -if ($action == 'addtimeslot' || $action == 'edittimeslot') { - echo '
    '; - echo "\n"; - echo "\n"; - echo "\n"; - - $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE id=?"); - $q->execute([$round_id]); - $round_data = $q->fetch(PDO::FETCH_ASSOC); - - if ($action == 'addtimeslot') { - echo '

    Add New Judging Timeslot

    '; - $r = array(); - $r['date'] = $round_data['date']; - } else { - echo '

    Edit Judging Timeslot

    '; - $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE id=?"); - $q->execute([$timeslot_id]); - if ($q->rowCount() != 1) { - echo "UNKNOWN ROUND $round_id"; - exit; - } - $r = $q->fetch(PDO::FETCH_ASSOC); - } - - echo ''; - echo '"; - echo '"; - - echo ''; - echo ''; - echo '
    ' . i18n('Round Type') . ":{$round_str[$round_data['type']]}
    ' . i18n('Name') . ":{$round_data['name']}
    ' . i18n('Start Time') . ':'; - emit_time_selector('starttime', $r['starttime']); - - echo '
    ' . i18n('End Time') . ':'; - emit_time_selector('endtime', $r['endtime']); - - echo '
    '; - - echo ''; - echo '
    '; -} - -if ($action == 'addmultiple') { - echo '

    Add Multiple New Judging Timeslots

    '; - - echo '
    '; - echo "\n"; - echo "\n"; - echo "\n"; - - $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE id=?"); - $q->execute([$round_id]); - $round_data = $q->fetch(PDO::FETCH_ASSOC); - - echo ''; - echo '"; - echo '"; - echo ''; - echo ''; - echo ''; - echo ''; - - echo ''; - echo '
    ' . i18n('Round Type') . ":{$round_str[$round_data['type']]}
    ' . i18n('Name') . ":{$round_data['name']}
    ' . i18n('Add') . ''; - echo ' '; - echo i18n('new timeslots'); - echo '
    ' . i18n('Starting timeslots at') . ''; - emit_time_selector('starttime'); - echo '
    ' . i18n('With a duration of') . ''; - echo ' '; - echo i18n('minutes') . '
    ' . i18n('And a break of') . ''; - echo ' '; - echo i18n('minutes') . '
    '; - echo ''; - echo '
    '; - - echo '
    '; -} - -if ($action == '') { - echo '' . i18n('Add new round') . '
    '; - echo '
    '; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - - $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE year=? AND `type`!='timeslot' ORDER BY date,starttime"); - $q->execute([$config['FAIRYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - $qq = $pdo->prepare("SELECT * FROM judges_timeslots WHERE round_id=? ORDER BY `date`,`starttime`"); - $qq->execute([$r->id]); - $c = $qq->rowCount() + 1; - - echo "'; - echo ''; - echo ''; - echo "'; - echo ' \n"; - - echo ''; - - while ($rr = $qq->fetch(PDO::FETCH_OBJ)) { - echo ''; - // echo ""; - echo ''; - echo ''; - echo ''; - - echo ' \n"; - echo ''; - } - } - echo '
    ' . i18n('Date') . '' . i18n('Start Time') . '' . i18n('End Time') . '' . i18n('Judging Round') . '' . i18n('Actions') . '
    " . format_date($r->date) . '' . format_time($r->starttime) . '
    '; - - echo '
    ' . format_time($r->endtime) . '{$r->name} (" . i18n($round_str[$r->type]) . ')'; - echo "id}\">"; - echo ' '; - echo "id}\">"; - - echo "id}\">(new) "; - echo "id}\">(multiple)
    "; - echo "
    ' . format_time($rr->starttime) . '' . format_time($rr->endtime) . '' . i18n($round_str[$rr->type]) . ''; - echo "id}×lot_id={$rr->id}\">"; - echo ' '; - echo "id}\">"; - - echo "
    '; -} - -send_footer(); -?> diff --git a/admin/judging_score_edit.php b/admin/judging_score_edit.php deleted file mode 100644 index bea4e119..00000000 --- a/admin/judging_score_edit.php +++ /dev/null @@ -1,134 +0,0 @@ - - * Copyright (C) 2005-2006 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Judging Score Entry' => 'admin/judging_score_entry.php')); - -$year = $config['FAIRYEAR']; -$project_id = NULL; -if ($_GET['projectid']) { - $project_id = $_GET['projectid']; -} else if ($_POST['projectid']) { - $project_id = $_POST['projectid']; - $curr_team = $_POST['score_count']; - while ($curr_team > 0) { - if ($_POST['team_' . $curr_team . '_score'] != '') { - $score = $_POST['team_' . $curr_team . '_score']; - if ($score == 0) { - $score = 'NULL'; - } else { - $score = $score; - } - if ($score > 100.0) { - $score_error = '*** ERROR **** You entered a value greater than 100.00'; - } - $stmt = $pdo->prepare("UPDATE judges_teams_timeslots_projects_link - SET score=? - WHERE judges_teams_id =? - and projects_id =? and year=?"); - $stmt->execute([$score,$_POST['team_' . $curr_team . '_id'],$project_id,$year]); - show_pdo_errors_if_any($pdo); - } - $curr_team--; - } -} - -?> -prepare("SELECT * FROM projects WHERE projects.id =?"); - $q->execute([$project_id]); - $r = $q->fetch(PDO::FETCH_OBJ); - $project_number = $r->projectnumber; - $project_title = $r->title; - $q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY id"); - $q->execute([$year]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) - $cats[$r->id] = $r->category; - - $q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); - $q->execute([$year]); - - $q = $pdo->prepare("SELECT judges_teams_timeslots_projects_link.judges_teams_id, - \t score, - \t judges_teams.num - \t FROM judges_teams_timeslots_projects_link, - \t judges_teams - \t WHERE judges_teams_timeslots_projects_link.judges_teams_id = judges_teams.id - \t AND projects_id =? ORDER BY judges_teams_id"); - $q->execute([$project_id]); - show_pdo_errors_if_any($pdo); - echo 'Project# ' . $project_number . ' ' . $project_title . '
    '; - if ($score_error != '') { - echo $score_error . '
    '; - } - echo '
    '; - echo ''; - echo ""; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - - $i = 1; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $team = getJudgingTeam($r->judges_teams_id); - $teamNames = array_map('teamMemberToName', $team['members']); - echo "\n"; - echo "\n"; - echo '\n"; - echo "\n"; - echo "\n"; - echo "\n"; - $i++; - } - echo "
    ' . i18n('Team Number') . '' . i18n('Judges') . '' . i18n('Score') . '' . i18n('New Score') . '
    \n"; - echo $r->num; - echo 'judges_teams_id\"/>\n"; - echo "'; - echo implode(', ', $teamNames); - echo "\n"; - if ($r->score) { - echo $r->score; - } else { - echo 'None'; - } - echo "\n\n"; - echo 'score\"/>\n"; - echo "
    \n"; - echo "\n"; - echo "
    \n"; -} else { - echo i18n('Invalid Project ID.'); -} diff --git a/admin/judging_score_entry.php b/admin/judging_score_entry.php deleted file mode 100644 index e7c4f8ae..00000000 --- a/admin/judging_score_entry.php +++ /dev/null @@ -1,145 +0,0 @@ - - * Copyright (C) 2005-2006 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php')); -} -?> -prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY id"); -$q->execute([$year]); -while ($r = $q->fetch(PDO::FETCH_OBJ)) - $cats[$r->id] = $r->category; - -$q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); -$q->execute([$year]); -while ($r = $q->fetch(PDO::FETCH_OBJ)) - $divs[$r->id] = $r->division; - -$ORDERBY = 'projects.projectcategories_id, projects.projectdivisions_id, projects.projectnumber'; - -$q = $pdo->prepare("SELECT registrations.id AS reg_id, - registrations.num AS reg_num, - projects.id as projectid, - projects.title, - projects.projectnumber, - projects.projectcategories_id, - projects.projectdivisions_id, - judges_teams_id as res_team_id, - avg(score) as score, - avg(score + (SELECT 70-avg(score) - \t FROM judges_teams_timeslots_projects_link - \t WHERE judges_teams_id = res_team_id)) - \t AS norm_score - FROM - registrations - left outer join projects on projects.registrations_id=registrations.id - left outer join judges_teams_timeslots_projects_link on projects.id=judges_teams_timeslots_projects_link.projects_id - WHERE - registrations.year=?" - . getJudgingEligibilityCode() . " - GROUP BY projectid - ORDER BY - $ORDERBY - "); -$q->execute([$year]); -show_pdo_errors_if_any($pdo); - -if ($_GET['csv'] != 'yes') { - echo "" . i18n('Generate CSV Report') . "\n"; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; -} else { - echo "Project #\tTitle\tCategory\tDivision\tScore\tNormalized Scores\tJudge Name\tJudges Score\n"; -} - -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($_GET['csv'] == 'yes') { - echo "$r->projectnumber \t ? \t ? \t ? \t ? \t ? "; - $p = $pdo->prepare("SELECT judges_teams_timeslots_projects_link.judges_teams_id, score, judges_teams.num - FROM judges_teams_timeslots_projects_link, judges_teams - WHERE judges_teams_timeslots_projects_link.judges_teams_id = judges_teams.id - AND projects_id = ? - ORDER BY judges_teams_id"); - - $p->execute([$r->title, $cats[$r->projectcategories_id], $divs[$r->projectdivisions_id], $r->score, $r->norm_score, $r->projectid]); - - show_pdo_errors_if_any($pdo); - while ($s = $p->fetch(PDO::FETCH_OBJ)) { - $team = getJudgingTeam($s->judges_teams_id); - $teamNames = array_map('teamMemberToName', $team['members']); - echo "\t " . implode(', ', $teamNames) . " \t $s->score"; - } - echo "\n"; - } else { - echo ''; - echo "\n"; - echo "\n"; - - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo "\n"; - } -} -if ($_GET['csv'] != 'yes') { - echo "
    ' . i18n('Proj Num') . '' . i18n('Project Title') . '' . i18n('Age Category') . '' . i18n('Division') . '' . i18n('Score') . '' . i18n('Normalized Score') . '' . i18n('Action') . '
    $r->projectnumber$r->title' . i18n($cats[$r->projectcategories_id]) . "' . i18n($divs[$r->projectdivisions_id]) . "' . number_format($r->score, 2) . "' . number_format($r->norm_score, 2) . "'; - if ($year == $config['FAIRYEAR']) { - echo "projectid\">"; - echo i18n('Edit Scores'); - echo ''; - } - echo "
    \n"; - echo '
    '; - - send_footer(); -} -?> diff --git a/admin/project_editor.php b/admin/project_editor.php deleted file mode 100644 index cf42b24d..00000000 --- a/admin/project_editor.php +++ /dev/null @@ -1,487 +0,0 @@ - - * Copyright (C) 2005-2006 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -// This file was modified Jan of 2014 by Richard Sin -// Project type has been added and can be toggled by configuration. -// Feedback box also has been added for flagging purposes - -?> -prepare('SELECT * FROM projects WHERE - registrations_id=? - AND year=? - AND fairs_id=?'); - - $q->execute([$registrations_id, $config['FAIRYEAR'], $fairs_id]); - if ($q->rowCount() != 1) { - echo 'permission denied.'; - exit; - } - /* Ok, they have permission */ - } -} - -switch ($action) { - case 'project_load': - project_load(); - break; - case 'project_regenerate_number': - /* Save first */ - project_save(); - - /* Now generate */ - $q = $pdo->prepare('SELECT id FROM projects WHERE registrations_id=? AND year=?'); - $q->execute([$registrations_id, $config['FAIRYEAR']]); - $i = $q->fetch(PDO::FETCH_ASSOC); - - $id = $i['id']; - - $stmt = $pdo->prepare("UPDATE projects SET projectnumber=NULL,projectsort=NULL, - projectnumber_seq='0',projectsort_seq='0' - WHERE id=?"); - $stmt->execute([$id]); - show_pdo_errors_if_any($pdo); - list($pn, $ps, $pns, $pss) = generateProjectNumber($registrations_id); - - // print("Generated Project Number [$pn]"); - $stmt = $pdo->prepare('UPDATE projects SET projectnumber=?,projectsort=?, - projectnumber_seq=?,projectsort_seq=? - WHERE id=?'); - $stmt->execute([$pn, $ps, $pns, $pss, $id]); - happy_("Generated and Saved Project Number: $pn"); - - break; - - case 'project_save': - project_save(); - break; - default: - break; -} - -exit; - -function project_save() -{ - global $registrations_id, $config, $pdo; - - // first, lets make sure this project really does belong to them - $q = $pdo->prepare('SELECT * FROM projects WHERE registrations_id=? AND year=?'); - $q->execute([$registrations_id, $config['FAIRYEAR']]); - $projectinfo = $q->fetch(PDO::FETCH_OBJ); - if (!$projectinfo) { - echo error(i18n('Invalid project to update')); - } - - $summarywords = preg_split('/[\s,]+/', $_POST['summary']); - $summarywordcount = count($summarywords); - if ($summarywordcount > $config['participant_project_summary_wordmax']) - $summarycountok = 0; - else - $summarycountok = 1; - - // check if it is flagged then update it - - if (empty($_POST['feedback'])) { - $stmt = $pdo->prepare('UPDATE projects SET ' - . "flagged='0'" - . 'WHERE id=?'); - $stmt->execute([intval($_POST['id'])]); - } else { - $stmt = $pdo->prepare('UPDATE projects SET ' - . "flagged='1'" - . 'WHERE id=?'); - $stmt->execute([intval($_POST['id'])]); - } - show_pdo_errors_if_any($pdo); - happy_('Flagging process successfully updated'); - - if ($config['participant_project_title_charmax'] && strlen(stripslashes($_POST['title'])) > $config['participant_project_title_charmax']) { // 0 for no limit, eg 255 database field limit - $title = substr(stripslashes($_POST['title']), 0, $config['participant_project_title_charmax']); - error_('Project title truncated to %1 characters', array($config['participant_project_title_charmax'])); - } else - $title = stripslashes($_POST['title']); - - $stmt = $pdo->prepare( - 'UPDATE projects SET - title = :title, - projectdivisions_id = :projectdivisions_id, - projecttype = :projecttype, - language = :language, - req_table = :req_table, - req_electricity = :req_electricity, - req_special = :req_special, - human_participants = :human_participants, - animal_participants = :animal_participants, - summary = :summary, - summarycountok = :summarycountok, - feedback = :feedback, - projectsort = :projectsort - WHERE id = :id' - ); - - $stmt->bindValue(':title', $_POST['title']); - $stmt->bindValue(':projectdivisions_id', intval($_POST['projectdivisions_id'])); - $stmt->bindValue(':projecttype', $_POST['projecttype']); - $stmt->bindValue(':language', $_POST['language']); - $stmt->bindValue(':req_table', $_POST['req_table']); - $stmt->bindValue(':req_electricity', $_POST['req_electricity']); - $stmt->bindValue(':req_special', $_POST['req_special']); - $stmt->bindValue(':human_participants', $_POST['human_participants']); - $stmt->bindValue(':animal_participants', $_POST['animal_participants']); - $stmt->bindValue(':summary', $_POST['summary']); - $stmt->bindValue(':summarycountok', $summarycountok); - $stmt->bindValue(':feedback', $_POST['feedback']); - $stmt->bindValue(':projectsort', $_POST['projectsort']); - $stmt->bindValue(':id', intval($_POST['id'])); - - $stmt->execute(); - - show_pdo_errors_if_any($pdo); - happy_('Project information successfully updated'); - - // check if they changed the project number - if ($_POST['projectnumber'] != $projectinfo->projectnumber) { - // check if the new one is available - $q = $pdo->prepare("SELECT * FROM projects WHERE year=? AND projectnumber=?"); - $q->execute([$config['FAIRYEAR'], $_POST['projectnumber']]); - if ($q->rowCount()) { - error_('Could not change project number. %1 is already in use', array($_POST['projectnumber'])); - } else { - $stmt = $pdo->prepare('UPDATE projects SET - projectnumber=? - WHERE id=?'); - $stmt->execute([$_POST['projectnumber'], $_POST['id']]); - happy_('Project number successfully changed to %1', array($_POST['projectnumber'])); - } - } -} - -function project_load() -{ - global $registrations_id, $config, $pdo; - - // $projectcategories_id=null; - // now lets find out their MAX grade, so we can pre-set the Age Category - $q = $pdo->prepare('SELECT MAX(grade) AS maxgrade FROM students WHERE registrations_id=?'); - $q->execute([$registrations_id]); - $gradeinfo = $q->fetch(PDO::FETCH_OBJ); - - // now lets grab all the age categories, so we can choose one based on the max grade - $q = $pdo->prepare('SELECT * FROM projectcategories WHERE year=? ORDER BY id'); - $q->execute([$config['FAIRYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - // save these in an array, just incase we need them later (FIXME: remove this array if we dont need it) - $agecategories[$r->id]['category'] = $r->category; - $agecategories[$r->id]['mingrade'] = $r->mingrade; - $agecategories[$r->id]['maxgrade'] = $r->maxgrade; - - if ($gradeinfo->maxgrade >= $r->mingrade && $gradeinfo->maxgrade <= $r->maxgrade) - $projectcategories_id = $r->id; - } - - // now select their project info - $q = $pdo->prepare('SELECT * FROM projects WHERE registrations_id=? AND year=?'); - // check if it exists, if we didnt find any record, lets insert one - $q->execute([$registrations_id, $config['FAIRYEAR']]); - $projectinfo = $q->fetch(PDO::FETCH_OBJ); - if (!$projectinfo) { - $stmt = $pdo->prepare('INSERT INTO projects (registrations_id,projectcategories_id,year) VALUES (?,?,?)'); - // and then pull it back out - $stmt->execute([$registrations_id, $projectcategories_id, $config['FAIRYEAR']]); - $q = $pdo->prepare('SELECT * FROM projects WHERE registrations_id=? AND year=?'); - $q->execute([$registrations_id, $config['FAIRYEAR']]); - $projectinfo = $q->fetch(PDO::FETCH_OBJ); - } - - // make sure that if they changed their grade on the student page, we update their projectcategories_id accordingly - if ($projectcategories_id && $projectinfo->projectcategories_id != $projectcategories_id) { - echo notice(i18n('Age category changed, updating to %1', array($agecategories[$projectcategories_id]['category']))); - $stmt = $pdo->prepare('UPDATE projects SET projectcategories_id=? WHERE id=?'); - $stmt->execute([$projectcategories_id, $projectinfo->id]); - } - - // output the current status - ?> - - - -
    - - - - - - - - - - - - -prepare('SELECT * FROM projecttypes ORDER BY type'); - $q->execute(); - echo ''; - } - ?> - - - - - - '; - - echo ''; - - echo ''; - - echo ' -
    : - -
    : - -
    :
    ' . i18n('Project Type') . ': '; - echo "' . REQUIREDFIELD . '
    : ()
    : -prepare('SELECT projectdivisions.* FROM projectdivisions,projectcategoriesdivisions_link WHERE projectdivisions.id=projectdivisions_id AND projectcategories_id=? AND projectdivisions.year=? AND projectcategoriesdivisions_link.year=? ORDER BY division'); - $q->execute([$projectcategories_id, $config['FAIRYEAR'], $config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - } else { - $q = $pdo->prepare('SELECT * FROM projectdivisions WHERE year=? ORDER BY division'); - $q->execute([$config['FAIRYEAR']]); - } - - echo '' . REQUIREDFIELD; - - if ($config['usedivisionselector'] == 'yes') { - ?> - - '; - echo i18n('WARNING! If you change the division you must manually change the project number too! It will NOT be assigned a new number automatically'); - echo '
    ' . i18n('Language') . ': '; - echo "' . REQUIREDFIELD; - echo '
    ' . i18n('Requirements') . ': '; - echo ''; - - if ($config['participant_project_table'] == 'no') { - // if we arent asking them if they want a table or not, then we set it to 'yes' assuming everyone will get a table - echo ' '; - } else { - echo ''; - echo ' '; - if ($projectinfo->req_table == 'yes') - $check = 'checked="checked"'; - else - $check = ''; - echo " "; - echo ' '; - if ($projectinfo->req_table == 'no') - $check = 'checked="checked"'; - else - $check = ''; - echo " "; - echo ''; - } - - if ($config['participant_project_electricity'] == 'no') { - // if we arent asking them if they want electricity or not, then we set it to 'yes' assuming everyone will get electricity - echo ' '; - } else { - echo ''; - echo ' '; - if ($projectinfo->req_electricity == 'yes') - $check = 'checked="checked"'; - else - $check = ''; - echo " "; - echo ' '; - if ($projectinfo->req_electricity == 'no') - $check = 'checked="checked"'; - else - $check = ''; - echo " "; - echo ''; - } - - echo ''; - echo ' '; - echo " "; - echo ''; - - echo '
    ' . i18n('Table') . REQUIREDFIELD . 'Yes No
    ' . i18n('Electricity') . REQUIREDFIELD . 'Yes No
    ' . i18n('Special') . 'req_special\" />
    '; - - if ($config['ethics_questions'] == 'yes') - // If we have set ethics questions to yes then ask the ethics questions! - { - echo '
    ' . i18n('Ethics Questions') . ':'; - echo ''; - echo ''; - echo ' '; - if ($projectinfo->human_participants == 'yes') - $check = 'checked="checked"'; - else - $check = ''; - echo " "; - echo ' '; - if ($projectinfo->human_participants == 'no') - $check = 'checked="checked"'; - else - $check = ''; - echo " "; - echo ''; - - echo ''; - echo ' '; - if ($projectinfo->animal_participants == 'yes') - $check = 'checked="checked"'; - else - $check = ''; - echo " "; - echo ' '; - if ($projectinfo->animal_participants == 'no') - $check = 'checked="checked"'; - else - $check = ''; - echo " "; - echo ''; - echo '
    ' . i18n('My project involves human participants') . REQUIREDFIELD . 'Yes No
    ' . i18n('My project involves animals') . REQUIREDFIELD . 'Yes No
    '; - } - echo '
    ' . i18n('Summary') . ': ' . REQUIREDFIELD . '
    '; - - $summarywords = preg_split('/[\s,]+/', $projectinfo->summary); - $summarywordcount = count($summarywords); - if ($summarywordcount > $config['participant_project_summary_wordmax']) - echo '
    '; - else - echo '
    '; - - echo "$summarywordcount/"; - echo i18n('%1 words maximum', array($config['participant_project_summary_wordmax'])); - echo '
    '; - - echo '
    ' . i18n('Feedback') . ':
    '; - - ?> -
    - -
    - diff --git a/admin/regfee_items_manager.php b/admin/regfee_items_manager.php deleted file mode 100644 index 19a47559..00000000 --- a/admin/regfee_items_manager.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'registration_fee_items_management'); - -$editor = new TableEditor('regfee_items', - array( - 'name' => 'Name (for regfee line)', - 'description' => 'Description', - 'cost' => 'Cost', - 'per' => 'Cost Per', - ), null, - array('year' => $config['FAIRYEAR'])); - -$editor->setPrimaryKey('id'); -$editor->setDefaultSortField('description'); -$editor->setRecordType('Registration Fee Item'); -$editor->setFieldOptions('per', array(array('key' => 'student', 'val' => 'Student'), - array('key' => 'project', 'val' => 'Project'))); -$editor->setFieldInputType('per', 'select'); -$editor->filterList('year', $config['FAIRYEAR']); - -$editor->execute(); - -send_footer(); -?> diff --git a/admin/registration.php b/admin/registration.php deleted file mode 100644 index cd3c00bd..00000000 --- a/admin/registration.php +++ /dev/null @@ -1,41 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'participant_registration'); -echo '
    '; -echo '' . i18n("Input Received $plural_participationform") . '
    '; -echo '' . i18n('Registration List and Student/Project Editor') . '
    '; -echo '' . i18n('Registration Statistics') . '
    '; -echo '' . i18n('Website Consent') . '
    '; - -send_footer(); -?> diff --git a/admin/registration_list.php b/admin/registration_list.php deleted file mode 100644 index d01ef4e3..00000000 --- a/admin/registration_list.php +++ /dev/null @@ -1,578 +0,0 @@ - - * Copyright (C) 2005-2006 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -// This file was modified Jan of 2014 by Richard Sin -// Flagging has been added to monitor projects with concern. - -?> -prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY id"); -$q->execute([$year]); - -while ($r = $q->fetch(PDO::FETCH_OBJ)) - $cats[$r->id] = $r->category; - -$q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); -$q->execute([$year]); - -while ($r = $q->fetch(PDO::FETCH_OBJ)) - $divs[$r->id] = $r->division; - -$action = get_value_from_array($_GET, 'action'); -switch ($action) { - case 'load_row': - $id = intval($_GET['id']); - $q = list_query($year, '', $id); - $r = $q->fetch(PDO::FETCH_OBJ); - print_row($r); - exit; - - case 'delete': - $regid = intval($_GET['id']); - $q = $pdo->prepare("SELECT * FROM projects WHERE registrations_id=?"); - $q->execute([$regid]); - if ($q->rowCount()) { - $p = $q->fetch(PDO::FETCH_ASSOC); - $stmt = $pdo->prepare("DELETE FROM winners WHERE projects_id=?"); - $stmt->execute([$p['id']]); - } - - $stmt = $pdo->prepare("DELETE FROM registrations WHERE id=? AND year=?"); - $stmt->execute([$regid,$config['FAIRYEAR']]); - - $stmt = $pdo->prepare("DELETE FROM students WHERE registrations_id=? AND year=?"); - $stmt->execute([$regid,$config['FAIRYEAR']]); - - $stmt = $pdo->prepare("DELETE FROM projects WHERE registrations_id=? AND year=?"); - $stmt->execute([$regid,$config['FAIRYEAR']]); - - $stmt = $pdo->prepare("DELETE FROM safety WHERE registrations_id=? AND year=?"); - $stmt->execute([$regid,$config['FAIRYEAR']]); - - $stmt = $pdo->prepare("DELETE FROM questions_answers WHERE registrations_id=? AND year=?"); - $stmt->execute([$regid,$config['FAIRYEAR']]); - - $stmt = $pdo->prepare("DELETE FROM mentors WHERE registrations_id=? AND year=?"); - $stmt->execute([$regid,$config['FAIRYEAR']]); - - $stmt = $pdo->prepare("DELETE FROM emergencycontact WHERE registrations_id=? AND year=?"); - $stmt->execute([$regid,$config['FAIRYEAR']]); - happy_('Registration and all related data successfully deleted'); - exit; -} - -if ($auth_type == 'committee') { - send_header('Registration Management', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Participant Registration' => 'admin/registration.php')); -} else { - send_header('Student/Project Management', - array('Fair Main' => 'fair_main.php')); -} - -?> - - - - - - - - - -
    - - - -
    - : -
    -
    -'; -echo ""; -if ($showstatus) - $stat = '&showstatus=' . $showstatus; -echo '' . i18n('Status') . ''; -echo '' . i18n('Email Address') . ''; -echo '' . i18n('Reg Num') . ''; -echo '' . i18n('Proj Num') . ''; -echo '' . i18n('Project Title') . ''; -echo '' . i18n('Age Category') . ''; -echo '' . i18n('Division') . ''; -echo '' . i18n('School(s)') . ''; -echo '' . i18n('Student(s)') . ''; -echo '' . i18n('Flagged') . ''; -echo '' . i18n('Action') . ''; -echo ''; - -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo "reg_id}\">"; - print_row($r); - echo ''; -} -echo ''; - -echo '

    The statistics have moved here: Registration Statistics

    '; - -send_footer(); - -/* Now some helper functions we call more than once */ -function list_query($year, $wherestatus, $reg_id) -{ - global $auth_type, $pdo; - - $reg = ''; - if ($reg_id != false) - $reg = "AND registrations.id='$reg_id'"; - - $fair = ''; - if ($auth_type == 'fair') { - $fair = "AND projects.fairs_id='{$_SESSION['fairs_id']}'"; - } - - $q = $pdo->prepare("SELECT registrations.id AS reg_id, - registrations.num AS reg_num, - registrations.status, - registrations.email, - projects.title, - projects.projectnumber, - projects.projectcategories_id, - projects.projectdivisions_id, - projects.feedback, - projects.flagged - FROM - registrations - left outer join projects on projects.registrations_id=registrations.id - WHERE - 1 - AND registrations.year=? - $wherestatus - $reg $fair - ORDER BY - registrations.status DESC, projects.title - "); - $q->execute([$year]); - - show_pdo_errors_if_any($pdo); - return $q; -} - -function print_row($r) -{ - global $cats, $divs, $config, $year, $pdo; - $status_text = null; - switch (get_value_property_or_default($r, 'status')) { - case 'new': - $status_text = 'New'; - break; - case 'open': - $status_text = 'Open'; - break; - case 'paymentpending': - $status_text = 'Payment Pending'; - break; - case 'complete': - $status_text = 'Complete'; - break; - } - - $status_text = i18n($status_text); - - $scl = 'style="cursor:pointer;" onclick="popup_editor(\'' . get_value_property_or_default($r, 'reg_id') . "','');\""; - $pcl = 'style="cursor:pointer;" onclick="popup_editor(\'' . get_value_property_or_default($r, 'reg_id') . "','project');\""; - - echo "{$status_text}"; - // echo "" . get_value_property_or_default($r, 'email') . ''; - // echo "" . get_value_property_or_default($r, 'reg_num') . ''; - // $pn = str_replace(' ', ' ', get_value_property_or_default($r, 'projectnumber', '')); - // echo "$pn"; - // echo "" . get_value_property_or_default($r, 'title') . ''; - - // echo "" . i18n(get_value_from_array($cats, get_value_property_or_default($r, 'projectcategories_id'), '')) . ''; - // echo "" . i18n(get_value_from_array($divs, get_value_property_or_default($r, 'projectdivisions_id', ''))) . ''; - - echo "{$r->email}"; - echo "{$r->reg_num}"; - $pn = str_replace(' ', ' ', $r->projectnumber); - echo "$pn"; - echo "{$r->title}"; - - echo "".i18n($cats[$r->projectcategories_id]).""; - echo "".i18n($divs[$r->projectdivisions_id]).""; - - - - $sq = $pdo->prepare("SELECT students.firstname, - students.lastname, - students.id, - schools.school, - schools.board, - schools.id AS schools_id - FROM - students,schools - WHERE - students.registrations_id=? - AND - students.schools_id=schools.id - "); - $sq->execute([$r->reg_id]); - show_pdo_errors_if_any($pdo); - - $studnum = 1; - $schools = ''; - $students = ''; - while ($studentinfo = $sq->fetch(PDO::FETCH_OBJ)) { - $students .= "$studentinfo->firstname $studentinfo->lastname
    "; - $schools .= "$studentinfo->school
    "; - } - - echo "$schools"; - echo "$students"; - - echo ''; - if ($r->flagged == false) { - echo 'reg_id','project');\" >"; - echo ''; - echo ''; - } else { - echo 'reg_id','project');\" >"; - echo ''; - echo ''; - } - - echo ''; - if ($year == $config['FAIRYEAR']) { - echo 'reg_id});return false\" >"; - echo ''; - echo ''; - - echo '
    '; - echo ''; - echo "email\">"; - echo "reg_num\">"; - echo ''; - echo '
    '; - } - echo ''; -} -?> diff --git a/admin/registration_receivedforms.php b/admin/registration_receivedforms.php deleted file mode 100644 index 85638685..00000000 --- a/admin/registration_receivedforms.php +++ /dev/null @@ -1,431 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -// This file was modified March of 2015 by Sebastian Ruan -// Receive all button was added - -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Participant Registration' => 'admin/registration.php')); -echo '
    '; - -$showformatbottom = true; -if (get_value_from_array($_POST, 'action') == 'received' && get_value_from_array($_POST, 'registration_number')) { - $q = $pdo->prepare("SELECT * FROM registrations WHERE num=? AND year=?"); - $q->execute([$_POST['registration_number'],$config['FAIRYEAR']]); - if ($q->rowCount() == 1) { - $r = $q->fetch(PDO::FETCH_OBJ); - $reg_id = $r->id; - $reg_num = $r->num; - $reg_status = $r->status; - - if ($r->status == 'new') { - echo error(i18n('Invalid Registration Status (%1 is New). Cannot receive an empty form.', array($_POST['registration_number']))); - } else { - // make sure all of the statuses are correct - $statusstudent = studentStatus($reg_id); - $statusemergencycontact = emergencycontactStatus($reg_id); - $statusproject = projectStatus($reg_id); - if ($config['participant_mentor'] == 'yes') - $statusmentor = mentorStatus($reg_id); - else - $statusmentor = 'complete'; - $statussafety = safetyStatus($reg_id); - $statusnamecheck = namecheckStatus($reg_id); - - if ( - $statusstudent == 'complete' && - $statusemergencycontact == 'complete' && - $statusproject == 'complete' && - $statusmentor == 'complete' && - $statussafety == 'complete' && - $statusnamecheck == 'complete' - ) { - $q = $pdo->prepare("SELECT projects.title, - projectcategories.category, - projectdivisions.division - FROM - projects,projectcategories,projectdivisions - WHERE - projects.registrations_id=? - AND - projects.projectcategories_id=projectcategories.id - AND - projects.projectdivisions_id=projectdivisions.id - AND - projectcategories.year=projects.year - AND - projectdivisions.year=projects.year - "); - $q->execute([$reg_id]); - - show_pdo_errors_if_any($pdo); - $projectinfo = $q->fetch(PDO::FETCH_OBJ); - echo ''; - echo ''; - switch ($reg_status) { - case 'paymentpending': - $status_text = 'Payment Pending'; - break; - case 'complete': - $status_text = 'Complete'; - break; - case 'open': - $status_text = 'Open'; - break; - } - echo '"; - - echo '"; - echo '"; - echo '"; - - $q = $pdo->prepare("SELECT students.firstname, - students.lastname, - schools.school - FROM - students,schools - WHERE - students.registrations_id=? - AND - students.schools_id=schools.id - "); - $q->execute([$reg_id]); - - $studnum = 1; - while ($studentinfo = $q->fetch(PDO::FETCH_OBJ)) { - echo '"; - - echo '"; - $studnum++; - } - - list($regfee, $regfeedata) = computeRegistrationFee($reg_id); - echo ''; - echo "
    ' . i18n('Registration Summary for %1', array($reg_num)) . '
    ' . i18n('Registration Status') . "$status_text
    ' . i18n('Registration Number') . "$reg_num
    ' . i18n('Project Title') . "$projectinfo->title
    ' . i18n('Category / Division') . "$projectinfo->category / $projectinfo->division
    ' . i18n('School %1', array($studnum)) . "$studentinfo->school
    ' . i18n('Student %1', array($studnum)) . "$studentinfo->firstname $studentinfo->lastname
    ' . i18n('Registration Fee') . '' . sprintf('$%.02f', $regfee) . '
    \n"; - echo '
    '; - - if ($r->status != 'complete') { - echo ''; - echo ''; - echo ''; - echo '\n"; - echo ''; - echo '
    '; - echo i18n('Is this the correct form to register?'); - echo '
    '; - - echo '
    '; - echo ""; - echo ''; - echo ''; - echo '
    '; - - if ($config['regfee'] > 0) { - echo '
    '; - echo ""; - echo ''; - echo ''; - echo '
    '; - - echo '
    '; - echo ""; - echo ''; - echo ''; - echo '
    '; - } else { - echo '
    '; - echo ""; - echo ''; - echo ''; - echo '
    '; - } - echo '
    '; - - echo "
    '; - $showformatbottom = false; - } else { - echo i18n('This form has already been received. Registration is complete'); - echo '
    '; - echo "" . i18n('Click here to unregister this project') . ''; - echo '
    '; - echo '
    '; - } - } else { - echo error(i18n('All registration sections are not complete. Cannot register incomplete form')); - } - } - } else { - echo error(i18n('Invalid Registration Number (%1)', array($_POST['registration_number']))); - } -} else if ((get_value_from_array($_POST, 'action') == 'receivedyes' || get_value_from_array($_POST, 'action') == 'receivedyesnocash') && get_value_from_array($_POST, 'registration_number')) { - $regnum = intval($_POST['registration_number']); - $checkNumQuery = $pdo->prepare("SELECT projectnumber - FROM projects, registrations - WHERE projects.registrations_id = registrations.id - AND num=? - AND registrations.year=?"); - $checkNumQuery->execute([$regnum,$config['FAIRYEAR']]); - $checkNumResults = $checkNumQuery->fetch(PDO::FETCH_OBJ); - $projectnum = $checkNumResults->projectnumber; - - $q = $pdo->prepare("SELECT id FROM registrations WHERE num=? AND year=?"); - $q->execute([$regnum, $config['FAIRYEAR']]); - $r = $q->fetch(PDO::FETCH_OBJ); - $reg_id = $r->id; - - if ($projectnum == null) { - list($projectnumber, $ps, $pns, $pss) = generateProjectNumber($reg_id); - $stmt = $pdo->prepare("UPDATE projects SET projectnumber='$projectnumber', - projectsort='$ps',projectnumber_seq='$pns',projectsort_seq='$pss' - WHERE registrations_id='$reg_id' AND year=$config{['FAIRYEAR']}"); - $stmt->execute(); - echo happy(i18n('Assigned Project Number: %1', array($projectnumber))); - } else - $projectnumber = $projectnum; - - // get all students with this registration number - $recipients = getEmailRecipientsForRegistration($reg_id); - - if ($_POST['action'] == 'receivedyes') { - // actually set it to 'complete' - $stmt = $pdo->prepare("UPDATE registrations SET status='complete' WHERE num=? AND year=?"); - $stmt->execute([$regnum,$config['FAIRYEAR']]); - foreach ($recipients AS $recip) { - $to = $recip['to']; - $subsub = array(); - $subbod = array( - 'TO' => $recip['to'], - 'EMAIL' => $recip['email'], - 'FIRSTNAME' => $recip['firstname'], - 'LASTNAME' => $recip['lastname'], - 'NAME' => $recip['firstname'] . ' ' . $recip['lastname'], - 'REGNUM' => $regnum, - 'PROJECTNUMBER' => $projectnumber, - ); - email_send('register_participants_received', $to, $subsub, $subbod); - } - - echo happy(i18n('Registration of form %1 successfully completed', array($regnum))); - } else if ($_POST['action'] == 'receivedyesnocash') { - // actually set it to 'paymentpending' - $stmt = $pdo->prepare("UPDATE registrations SET status='paymentpending' WHERE num=? AND year=?"); - $stmt->execute([$regnum,$config['FAIRYEAR']]); - foreach ($recipients AS $recip) { - $to = $recip['to']; - $subsub = array(); - $subbod = array( - 'TO' => $recip['to'], - 'EMAIL' => $recip['email'], - 'FIRSTNAME' => $recip['firstname'], - 'LASTNAME' => $recip['lastname'], - 'NAME' => $recip['firstname'] . ' ' . $recip['lastname'], - 'REGNUM' => $regnum, - 'PROJECTNUMBER' => $projectnumber, - ); - - email_send('register_participants_paymentpending', $to, $subsub, $subbod); - } - echo happy(i18n('Registration of form %1 marked as payment pending', array($regnum))); - } -} else if (get_value_from_array($_POST, 'action') == 'receivedno' && get_value_from_array($_POST, 'registration_number')) { - echo notice(i18n('Registration of form %1 cancelled', array($_POST['registration_number']))); -} else if (get_value_from_array($_GET, 'action') == 'unregister' && get_value_from_array($_GET, 'registration_number')) { - $reg_num = intval(trim($_GET['registration_number'])); - $q = $pdo->prepare("SELECT registrations.id AS reg_id, projects.id AS proj_id FROM projects,registrations WHERE projects.registrations_id=registrations.id AND registrations.year=? AND registrations.num=?"); - $q->execute([$config['FAIRYEAR'],$reg_num]); - $r = $q->fetch(PDO::FETCH_OBJ); - $stmt = $pdo->prepare("UPDATE projects SET projectnumber=null, projectsort=null, projectnumber_seq=0, projectsort_seq=0 WHERE id=? AND year=?"); - $stmt->execute([$r->proj_id,$config['FAIRYEAR']]); - $stmt = $pdo->prepare("UPDATE registrations SET status='open' WHERE id=? AND year=?"); - $stmt->execute([$r->reg_id,$config['FAIRYEAR']]); - echo happy(i18n('Successfully unregistered project')); -} - -if ($showformatbottom) { - echo ''; - echo ''; - echo '
    '; - echo '
    '; - echo ''; - echo i18n("Enter the registration number from the $signatureformpermissionform : ") . '
    '; - echo ''; - echo ''; - echo '
    '; - ?> - -
    '; - echo '
    '; - echo 'This button does not keep track of payments'; - echo '
    '; - echo '
    '; - echo ''; - echo '"; - echo '
    '; - echo '
    '; - echo '
    '; - echo i18n(" 'Receive All' notes:
    • The button will mark all open-status students that have completed registration as having their $signatureformpermissionform received. -
    • Students with above status will be emailed a \"$signatureformpermissionform received\" confirmation. -
    • Project numbers will be assigned to these students' projects. -
    "); -} - -if (get_value_from_array($_POST, 'action') == 'receive_all') { - // Grab all projects that don't have project numbers. Status should therefor be open or new but not complete - $query_noprojectnumber = $pdo->prepare('SELECT * FROM projects WHERE projectnumber IS NULL AND year =?'); - // Define arrays to append to later - $query_noprojectnumber->execute([$config['FAIRYEAR']]); - $completed_students = array(); - $incomplete_students = array(); - $newstatus_students = array(); - - // loop through each project that doesn't have a project number - while ($studentproject = $query_noprojectnumber->fetch(PDO::FETCH_ASSOC)) { - // Grab registration information about the current project - $q = $pdo->prepare("SELECT * FROM registrations WHERE id=? AND year=?"); - $q->execute([$studentproject['registrations_id'],$config['FAIRYEAR']]); - $r = $q->fetch(PDO::FETCH_OBJ); - $reg_id = $r->id; - $reg_num = $r->num; - $reg_status = $r->status; - - // student has completed some or all of the registration process for their project. Let's find out which one is true - if ($r->status != 'new') { - // make sure all of the statuses are correct - $statusstudent = studentStatus($reg_id); - $statusemergencycontact = emergencycontactStatus($reg_id); - $statusproject = projectStatus($reg_id); - if ($config['participant_mentor'] == 'yes') - $statusmentor = mentorStatus($reg_id); - else - $statusmentor = 'complete'; - $statussafety = safetyStatus($reg_id); - $statusnamecheck = namecheckStatus($reg_id); - - if ( - $statusstudent == 'complete' && - $statusemergencycontact == 'complete' && - // S$statusproject == "complete" && - $statusmentor == 'complete' && - $statussafety == 'complete' && - $statusnamecheck == 'complete' && - $r->status != 'complete' - // above: project status must not be complete. If it is complete signature page/permission form has already been received. - ) { - // Generate project number and update it in data base - list($projectnumber, $ps, $pns, $pss) = generateProjectNumber($reg_id); - $stmt = $pdo->prepare("UPDATE projects SET projectnumber=?, - projectsort=?,projectnumber_seq=?,projectsort_seq=? - WHERE registrations_id=? AND year=?"); - $stmt->execute([$projectnumber,$ps,$pns,$pss,$reg_id,$config['FAIRYEAR']]); - - // email stuff - // get all students with this registration number - // $recipients=getEmailRecipientsForRegistration($reg_id); - - // Set status to 'complete' - $stmt = $pdo->prepare("UPDATE registrations SET status='complete' WHERE num=? AND year=?"); - $stmt->execute([$reg_num,$config['FAIRYEAR']]); - /*foreach($recipients AS $recip) { - $to=$recip['to']; - $subsub=array(); - $subbod=array( - "TO"=>$recip['to'], - "EMAIL"=>$recip['email'], - "FIRSTNAME"=>$recip['firstname'], - "LASTNAME"=>$recip['lastname'], - "NAME"=>$recip['firstname']." ".$recip['lastname'], - "REGNUM"=>$regnum, - "PROJECTNUMBER"=>$projectnumber, - ); - email_send("register_participants_received",$to,$subsub,$subbod); - }*/ - - // End email stuff - // add cuurent registration number to completed_students array - $completed_students[] = $reg_num; - } else { - // or add current registration number to incomplete_student array - $incomplete_students[] = $reg_num; - } - } - // New status automatically means student has not completed the registration process for their project. So execute below: - else { - // or add current registration number to newstatus_students array - $newstatus_students[] = $reg_num; - } - } - // Find how many project numbers were assigned/how many projects have complete status (ie signature page/permission form is considered received) - $total_completed = count($completed_students); - - // since incomplete_students and newstatus_students both did not get project numbers and are not considered as having signature page/permission form received - // combine them - $total_incomplete = array_merge($incomplete_students, $newstatus_students); - - echo '

    '; - echo ''; - echo ''; - - // display below only if there are registration numbers that don't have project numbers and the students have not completed the registration process - if (count($total_incomplete) > 0) { - echo ''; - echo ''; - $string = ''; - echo ''; - echo ''; - echo ''; - } - echo '
    ' . i18n("$total_completed student(s) registered as $non_capital_participationform received.") . '
    ' . i18n("Registration numbers which are NOT marked as having their $non_capital_participationform received are shown below:") . '
     
    '; - - // create a string that contains all incomplete registration numbers - foreach ($total_incomplete as $regnum) { - $string = $string . i18n($regnum); - $string = $string . ', '; - } - - // delete the comma at the end of the string - $string = substr($string, 0, strlen($string) - 2); - echo $string; - echo '
     
    '; - echo i18n('The above registration numbers correspond to projects in which the registration process has not been completed by the student.'); - echo '
    '; - echo happy_(i18n('Received all permision forms for complete students')); -} - -send_footer(); - -?> \ No newline at end of file diff --git a/admin/registration_stats.php b/admin/registration_stats.php deleted file mode 100644 index 80a6a2a4..00000000 --- a/admin/registration_stats.php +++ /dev/null @@ -1,374 +0,0 @@ - - * Copyright (C) 2005-2006 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Participant Registration' => 'admin/registration.php')); - -echo '
    '; -echo i18n('Choose Status') . ':'; -echo '
    '; -echo ''; -echo '
    '; - -$q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY id"); -$q->execute([$year]); -while ($r = $q->fetch(PDO::FETCH_OBJ)) - $cats[$r->id] = $r->category; - -$q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); -$q->execute([$year]); -while ($r = $q->fetch(PDO::FETCH_OBJ)) - $divs[$r->id] = $r->division; - -if ($showstatus) { - switch ($showstatus) { - case 'complete': - $wherestatus = "AND status='complete' "; - break; - case 'paymentpending': - $wherestatus = "AND status='paymentpending' "; - break; - case 'completeorpaymentpending': - $wherestatus = "AND (status='complete' OR status='paymentpending') "; - break; - case 'open': - $wherestatus = "AND status='open' "; - break; - case 'new': - $wherestatus = "AND status='new' "; - break; - default: - $wherestatus = ''; - } -} else - $wherestatus = ''; -switch (get_value_from_array($_GET, 'sort')) { - case 'status': - $ORDERBY = 'registrations.status DESC, projects.title'; - break; - case 'num': - $ORDERBY = 'registrations.num'; - break; - case 'projnum': - $ORDERBY = 'projects.projectsort, projects.projectnumber'; - break; - case 'title': - $ORDERBY = 'projects.title, registrations.status DESC'; - break; - case 'cat': - $ORDERBY = 'projects.projectcategories_id, projects.title'; - break; - case 'div': - $ORDERBY = 'projects.projectdivisions_id, projects.title'; - break; - default: - $ORDERBY = 'registrations.status DESC, projects.title'; - break; -} - -$q = $pdo->prepare("SELECT registrations.id AS reg_id, - registrations.num AS reg_num, - registrations.status, - registrations.email, - projects.title, - projects.projectnumber, - projects.projectcategories_id, - projects.projectdivisions_id, - projects.language - FROM - registrations - left outer join projects on projects.registrations_id=registrations.id - WHERE - 1 - AND registrations.year=?, - $wherestatus - ORDER BY - $ORDERBY - "); -$q->execute([$year]); -show_pdo_errors_if_any($pdo); - -$stats_totalprojects = 0; -$stats_totalstudents = 0; -$stats_divisions = array(); -$stats_categories = array(); -$stats_students_catdiv = array(); -$stats_projects_catdiv = array(); -$stats_students_schools = array(); -$stats_projects_schools = array(); -$stats_projects_lang = array(); -$schools_names = array(); -$languages = array(); - -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stats_totalprojects++; - - $stats_divisions[$r->projectdivisions_id] = add_or_initialize($stats_divisions, $r->projectdivisions_id); - $stats_categories[$r->projectcategories_id] = add_or_initialize($stats_categories, $r->projectcategories_id); - $stats_projects_catdiv[$r->projectcategories_id][$r->projectdivisions_id] = add_or_initialize_multi_2($stats_projects_catdiv, $r->projectcategories_id, $r->projectdivisions_id); - $stats_projects_lang[$r->projectcategories_id][$r->projectdivisions_id][$r->language] = add_or_initialize_multi_3($stats_projects_lang, $r->projectcategories_id, $r->projectdivisions_id, $r->language); - - $languages[$r->language] = add_or_initialize($languages, $r->language); - - switch ($r->status) { - case 'new': - $status_text = 'New'; - break; - case 'open': - $status_text = 'Open'; - break; - case 'paymentpending': - $status_text = 'Payment Pending'; - break; - case 'complete': - $status_text = 'Complete'; - break; - } - $status_text = i18n($status_text); - - $sq = $pdo->prepare("SELECT students.firstname, - students.lastname, - students.id, - schools.school, - schools.board, - schools.id AS schools_id - FROM - students,schools - WHERE - students.registrations_id=? - AND - students.schools_id=schools.id - "); - $sq->execute([$r->reg_id]); - show_pdo_errors_if_any($pdo); - - $studnum = 1; - $schools = ''; - $students = ''; - $lastschoolid = -1; - while ($studentinfo = $sq->fetch(PDO::FETCH_OBJ)) { - $stats_totalstudents++; - $stats_students_catdiv[$r->projectcategories_id][$r->projectdivisions_id]++; - $stats_students_schools[$r->projectcategories_id][$studentinfo->schools_id]++; - $schools_names[$studentinfo->schools_id] = $studentinfo->school . " ($studentinfo->board)"; - $lastschoolid = $studentinfo->schools_id; - } - // this really isnt right, its only taking the school from the last student in the project to count towards the school's project totals - // but there's really no other way - $stats_projects_schools[$r->projectcategories_id][$lastschoolid] = add_or_initialize_multi_2($stats_projects_schools, $r->projectcategories_id, $lastschoolid); -} - -echo ''; -echo "'; -echo ''; - -echo ''; -echo "'; -echo ''; -echo ''; -echo "'; -echo ''; - -echo '

    {$status_str[$showstatus]} - " . i18n('Students / projects per age category / division') . '

    '; -echo ''; -echo ''; -foreach ($cats AS $c => $cn) { - echo "'; -} -echo ''; -echo ''; -foreach ($divs AS $d => $dn) { - echo ""; - $tstud = 0; - $tstudcat = array(); - $tproj = 0; - $tprojcat = array(); - foreach ($cats AS $c => $cn) { - echo ''; - - $tstud += $stats_students_catdiv[$c][$d] ?? 0; - $tproj += $stats_projects_catdiv[$c][$d] ?? 0; - - $tstudcat[$c] = add_or_initialize($tstudcat, $c, $stats_students_catdiv[$c][$d] ?? 0); - $tprojcat[$c] = add_or_initialize($tprojcat, $c, $stats_projects_catdiv[$c][$d] ?? 0); - } - echo ''; - echo ''; -} -echo ''; -$tstud = 0; -$tproj = 0; -foreach ($cats AS $c => $cn) { - echo ''; - $tstud += $tstudcat[$c]; - $tproj += $tprojcat[$c]; -} -echo ''; -echo ''; - -echo '
    $cn
    " . i18n('Stud | Proj') . '
    ' . i18n('Total') . '
    ' . i18n('Stud | Proj') . '
    $dn'; - - echo ($stats_students_catdiv[$c][$d] ?? 0); - echo '    '; - echo ($stats_projects_catdiv[$c][$d] ?? 0); - echo ''; - echo ($tstud ? $tstud : 0); - echo '    '; - echo ($tproj ? $tproj : 0); - echo '
    ' . i18n('Total') . ''; - echo ($tstudcat[$c] ? $tstudcat[$c] : 0); - echo '    '; - echo ($tprojcat[$c] ? $tprojcat[$c] : 0); - echo ''; -echo ($tstud); -echo '    '; -echo ($tproj); -echo '
    '; -echo '

    {$status_str[$showstatus]} - " . i18n('Students / projects per age category / school') . '

    '; -echo ''; -echo ''; -foreach ($cats AS $c => $cn) { - echo "'; -} -echo ''; -echo ''; - -asort($schools_names); -foreach ($schools_names AS $id => $sn) { - echo ""; - $tstud = 0; - $tproj = 0; - foreach ($cats AS $c => $cn) { - echo ''; - $tstud += $stats_students_schools[$c][$id]; - $tproj += $stats_projects_schools[$c][$id]; - } - echo ''; - echo ''; -} -echo '
    $cn
    " . i18n('Stud | Proj') . '
    ' . i18n('Total') . '
    ' . i18n('Stud | Proj') . '
    $sn' . ($stats_students_schools[$c][$id] ? $stats_students_schools[$c][$id] : 0); - echo '    '; - echo ($stats_projects_schools[$c][$id] ? $stats_projects_schools[$c][$id] : 0) . '' . ($tstud ? $tstud : 0); - echo '    '; - echo ($tproj ? $tproj : 0) . '
    '; -echo i18n('%1 schools total', array(count($schools_names))); - -echo '

    {$status_str[$showstatus]} - " . i18n('Projects per age category / division / language') . '

    '; -echo ''; -echo ''; -foreach ($cats AS $c => $cn) { - echo ""; -} -echo "'; -echo ''; -ksort($languages); -$tprojcat = array(); -foreach ($cats AS $c => $cn) { - foreach ($languages AS $l => $ln) { - echo ""; - } -} -foreach ($languages AS $l => $ln) { - echo ""; -} -echo ''; -foreach ($divs AS $d => $dn) { - echo ""; - $tproj = array(); - foreach ($cats AS $c => $cn) { - foreach ($languages AS $l => $ln) { - echo ''; - $tproj[$l] = add_or_initialize($tproj, $l, $stats_projects_lang[$c][$d][$l] ?? 0); - $tprojcat[$c][$l] = add_or_initialize_multi_2($tprojcat, $c, $l, $stats_projects_lang[$c][$d][$l] ?? 0); - } - } - foreach ($tproj AS $l => $ln) { - echo ''; - } - echo ''; -} -echo ''; -$tproj = array(); -foreach ($cats AS $c => $cn) { - foreach ($languages AS $l => $ln) { - echo ''; - $tproj[$l] = add_or_initialize($tproj, $l, $tprojcat[$c][$l] ?? 0); - } -} -foreach ($tproj AS $l => $ln) { - echo ''; -} -echo ''; - -echo '
    $cn" . i18n('Total') . '
    $l$l
    $dn'; - echo ($stats_projects_lang[$c][$d][$l] ?? 0); - echo ''; - echo ($ln ? $ln : 0); - echo '
    ' . i18n('Total') . ''; - echo ($tprojcat[$c][$l] ? $tprojcat[$c][$l] : 0); - echo ''; - echo ($ln); - echo '
    '; - -echo '
    '; - -echo '
    '; -echo i18n("Note: statistics reflect the numbers of the current 'Status' selected at the top of the page"); -echo '
    '; -echo '
    '; - -send_footer(); -?> diff --git a/admin/registration_webconsent.php b/admin/registration_webconsent.php deleted file mode 100644 index 43bcea80..00000000 --- a/admin/registration_webconsent.php +++ /dev/null @@ -1,125 +0,0 @@ - - * Copyright (C) 2005-2006 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Participant Registration' => 'admin/registration.php')); - -echo '
    '; - -if (get_value_from_array($_POST, 'changed')) { - $numchanged = 0; - foreach ($_POST['changed'] AS $id => $val) { - if ($val == 1) { - $numchanged++; - $webfirst = get_value_from_2d_array($_POST, 'webfirst', $id) == 'yes' ? 'yes' : 'no'; - $weblast = get_value_from_2d_array($_POST, 'weblast', $id) == 'yes' ? 'yes' : 'no'; - $webphoto = get_value_from_2d_array($_POST, 'webphoto', $id) == 'yes' ? 'yes' : 'no'; - - $stmt = $pdo->prepare("UPDATE students SET - webfirst=?, - weblast=?, - webphoto=? - WHERE - id=?"); - $stmt->execute([$webfirst,$weblast,$webphoto,$id]); - } - } - - if ($numchanged == 1) { - echo happy(i18n('1 student record updated')); - } else if ($numchanged > 1) { - echo happy(i18n('%1 student records updated', array($numchanged))); - } else { - echo error(i18n('No student records where changed')); - } -} -?> - - - prepare("SELECT students.firstname, - students.lastname, - students.id, - projects.projectnumber, - students.webfirst, - students.weblast, - students.webphoto - FROM - students, - registrations, - projects - WHERE - students.registrations_id=registrations.id - AND\t( registrations.status = 'complete' OR registrations.status='paymentpending' ) - AND\tprojects.registrations_id=registrations.id - AND \tregistrations.year=? - AND \tprojects.year=? - AND \tstudents.year=? - ORDER BY projectnumber - "); -$sq->execute([$config['FAIRYEAR'],$config['FAIRYEAR'],$config['FAIRYEAR']]); -show_pdo_errors_if_any($pdo); - -echo '
    '; -echo ''; -echo ''; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ''; - -while ($r = $sq->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo ""; - echo ""; - $ch = $r->webfirst == 'yes' ? 'checked="checked"' : ''; - echo ""; - $ch = $r->weblast == 'yes' ? 'checked="checked"' : ''; - echo ""; - $ch = $r->webphoto == 'yes' ? 'checked="checked"' : ''; - echo ""; - echo ''; -} -echo '
    ' . i18n('Proj #') . '' . i18n('Student Name') . '' . i18n('First') . '' . i18n('Last') . '' . i18n('Photo') . '
    $r->projectnumberid\" type=\"hidden\" name=\"changed[$r->id]\" value=\"0\">$r->firstname $r->lastnameid]\" value=\"yes\" onchange=\"changed($r->id)\">id]\" value=\"yes\" onchange=\"changed($r->id)\">id]\" value=\"yes\" onchange=\"changed($r->id)\">
    '; -echo ''; -echo '
    '; - -send_footer(); -?> diff --git a/admin/reports.inc.php b/admin/reports.inc.php deleted file mode 100644 index f13be9b1..00000000 --- a/admin/reports.inc.php +++ /dev/null @@ -1,1023 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -// This file was modified Jan of 2014 by Richard Sin -// A glitch that prints out both english and french columns has been modified. - - require_once("reports_students.inc.php"); /* $report_students_fields */ - require_once("reports_judges.inc.php"); /* $report_students_fields */ - require_once("reports_awards.inc.php"); /* $report_students_fields */ - require_once("reports_committees.inc.php"); /* $report_students_fields */ - require_once("reports_volunteers.inc.php"); /* $report_volunteers_fields */ - require_once("reports_schools.inc.php"); - require_once("reports_tours.inc.php"); - require_once("reports_fairs.inc.php"); - require_once("reports_fundraising.inc.php"); - - require_once('../lpdf.php'); - require_once('../lcsv.php'); - require_once('../tcpdf.inc.php'); - - $filter_ops = array( 0 => '=', - 1 => '<=', - 2 => '>=', - 3 => '<', - 4 => '>', - 5 => '!=', - 6 => 'IS', - 7 => 'IS NOT', - 8 => 'LIKE', - 9 => 'NOT LIKE ', - ); - - $report_options = array(); - $report_options['type'] = array('desc' => 'Report Format', - 'values' => array('pdf'=>'PDF', 'csv'=>'CSV', 'label'=>'Label', 'tcpdf_label'=>'TCPDF Label (experimental)') - ); - $report_options['group_new_page'] = array('desc' => 'Start each new grouping on a new page', - 'values' => array('no'=>'No', 'yes'=>'Yes') - ); - $report_options['allow_multiline'] = array('desc' => 'Allow table rows to span multiple lines', - 'values' => array('no'=>'No', 'yes'=>'Yes') - ); - $report_options['fit_columns'] = array('desc' => 'Scale column widths to fit on the page width', - 'values' => array('no'=>'No', 'yes'=>'Yes') - ); - $report_options['label_box'] = array('desc' => 'Draw a box around each label', - 'values' => array('no'=>'No', 'yes'=>'Yes') - ); - $report_options['field_box'] = array('desc' => 'Draw a box around each text field on the label', - 'values' => array('no'=>'No', 'yes'=>'Yes') - ); - $report_options['label_fairname'] = array('desc' => 'Print the fair name at the top of each label', - 'values' => array('no'=>'No', 'yes'=>'Yes') - ); - $report_options['label_logo'] = array('desc' => 'Print the fair logo at the top of each label', - 'values' => array('no'=>'No', 'yes'=>'Yes') - ); - $report_options['default_font_size'] = array('desc' => 'Default font size to use in the report', - 'values' => array( - '10'=>'10', - '11'=>'11', '12'=>'12', - '13'=>'13', '14'=>'14', '15'=>'15', '16'=>'16', '18'=>'18', - '20'=>'20', '22'=>'22', '24'=>'24' - ) - ); - - -/* -Viceroy Grand Avery rows? w x h" per page - & Toy -LRP 130 99180 5960 3 2 5/8 x 1 30 -LRP 120 99189 5961 2 4 x 1 20 -LRP 114 99179 5959 7 4 x 1 1/2 14 -LRP 214 99190 5962 7 4 x 1 1/3 14 -LRP 110 99181 5963 5 4 x 2 10 -LRP 106 99763 5964 3 4 x 3 1/3 6 -LRP 100 99764 5965 1 8 1/2 x 11 1 -LRP 180 99765 5967 4 1 3/4 x 1/2 80 */ - - -/* FIXME: put these in a databse */ - $report_stock = array(); - $report_stock['fullpage'] = array('name' => 'Letter 8.5 x 11 (3/4" margin)', - 'page_width' => 8.5, - 'page_height' => 11, - 'label_width' => 7, - 'x_spacing' => 0, - 'cols' => 1, - 'label_height' => 9.5, - 'y_spacing' => 0, - 'rows' => 1, - 'page_format' => 'LETTER', - 'page_orientation' => 'P', - ); - - $report_stock['fullpage_landscape'] = array('name' => 'Letter 8.5 x 11 Landscape (3/4" margin)', - 'page_width' => 11, - 'page_height' => 8.5, - 'label_width' => 9.5, - 'x_spacing' => 0, - 'cols' => 1, - 'label_height' => 7, - 'y_spacing' => 0, - 'rows' => 1, - 'page_format' => 'LETTER', - 'page_orientation' => 'L', - ); - - $report_stock['fullpage_full'] = array('name' => 'Letter 8.5 x 11 (no margin)', - 'page_width' => 8.5, - 'page_height' => 11, - 'label_width' => 8.5, - 'x_spacing' => 0, - 'cols' => 1, - 'label_height' => 11, - 'y_spacing' => 0, - 'rows' => 1, - 'page_format' => 'LETTER', - 'page_orientation' => 'P', - ); - - $report_stock['fullpage_landscape_full'] = array('name' => 'Letter 8.5 x 11 Landscape (no margin)', - 'page_width' => 11, - 'page_height' => 8.5, - 'label_width' => 11, - 'x_spacing' => 0, - 'cols' => 1, - 'label_height' => 8.5, - 'y_spacing' => 0, - 'rows' => 1, - 'page_format' => 'LETTER', - 'page_orientation' => 'L', - ); - - $report_stock['5161'] = array('name' => 'Avery 5161/5261/5961/8161, G&T 99189 (1"x4")', - 'page_width' => 8.5, - 'page_height' => 11, - 'label_width' => 4, - 'x_spacing' => 0.15, - 'cols' => 2, - 'label_height' => 1, - 'y_spacing' => 0.00, - 'y_padding' => 0.05, - 'rows' => 10, - 'page_format' => 'LETTER', - 'page_orientation' => 'P', - ); - - $report_stock['5162'] = array('name' => 'Avery 5162/5262/5962/8162/8462, G&T 99190 (1 1/3"x4")', - 'page_width' => 8.5, - 'page_height' => 11, - 'label_width' => 3.99, - 'x_spacing' => 0.187, - 'cols' => 2, - 'label_height' => 1.326, - 'y_spacing' => 0.00, - 'y_padding' => 0.30, - 'rows' => 7, - 'page_format' => 'LETTER', - 'page_orientation' => 'P', - ); - $report_stock['5163'] = array('name' => 'Avery 5163/5263/5963/8163/8463, G&T 99181 (2"x4")', - 'page_width' => 8.5, - 'page_height' => 11, - 'label_width' => 4, - 'x_spacing' => 0.1719, - 'cols' => 2, - 'label_height' => 2, - 'y_spacing' => 0.00, - 'rows' => 5, - 'page_format' => 'LETTER', - 'page_orientation' => 'P', - ); - -/* This is combined with 5161 - $report_stock['5961'] = array('name' => 'Avery 5961, G&T 99189 (1"x4")', - 'page_width' => 8.5, - 'page_height' => 11, - 'label_width' => 4, - 'x_spacing' => 0.08, - 'cols' => 2, - 'label_height' => 1, - 'y_spacing' => 0.08, - 'rows' => 10, - ); -*/ - - $report_stock['5164'] = array('name' => 'Avery 5164/5264/5964/8164, G&T 99763 (4"x3 1/3")', - 'page_width' => 8.5, - 'page_height' => 11, - 'label_width' => 4, - 'x_spacing' => 3/16, - 'cols' => 2, - 'label_height' => 3 + 1/3, - 'y_spacing' => 0, - 'rows' => 3, - 'page_format' => 'LETTER', /* tcpdf format */ - 'page_orientation' => 'P', /* tcpdf orientation */ - - ); - $report_stock['nametag'] = array('name' => 'Cards 4"x3"', - 'page_width' => 8.5, - 'page_height' => 11, - 'label_width' => 4, - 'x_spacing' => 0, - 'cols' => 2, - 'label_height' => 3, - 'y_spacing' => 0, - 'rows' => 3, - 'page_format' => 'LETTER', - 'page_orientation' => 'P', - ); - - $report_stock['letter_4up'] = array('name' => 'Fullpage, 4up', - 'page_width' => 8.5, - 'page_height' => 11, - 'label_width' => 4, - 'x_spacing' => 0.25, - 'cols' => 2, - 'label_height' => 5, - 'y_spacing' => 0.25, - 'rows' => 2, - 'page_format' => 'LETTER', - 'page_orientation' => 'P', - ); - - $report_stock['ledger'] = array('name' => 'Ledger/Tabloid 11 x 17', - 'page_width' => 11, - 'page_height' => 17, - 'label_width' => 11, - 'x_spacing' => 0, - 'cols' => 1, - 'label_height' => 17, - 'y_spacing' => 0, - 'rows' => 1, - 'page_format' => 'LETTER', - 'page_orientation' => 'P', - ); - - $report_stock['ledger_landscape'] = array('name' => 'Ledger/Tabloid 11 x 17 Landscape', - 'page_width' => 17, - 'page_height' => 11, - 'label_width' => 17, - 'x_spacing' => 0, - 'cols' => 1, - 'label_height' => 11, - 'y_spacing' => 0, - 'rows' => 1, - 'page_format' => 'LETTER', - 'page_orientation' => 'P', - ); - - -$report_options['stock'] = array('desc' => "Paper Type", - 'values' => array() ); - - -/* Add more types to the report format */ -foreach($report_stock as $n=>$v) { - $report_options['stock']['values'][$n] = $v['name']; -} - - - $allow_options = array_keys($report_options); - - /* A list of custom reports, as close as possible to a real report - * format, but with the 'custom_url' attached. */ - $report_custom = array(); - $x = 1; - $report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Mailing Labels', - 'desc' => 'Mailing Label Generator', - 'custom_url' => 'admin/reports_mailinglabels.php', - 'creator' => 'The Grant Brothers'); - $x++; - $report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Project Details (PDF)', - 'desc' => 'Project Details', - 'custom_url' => 'admin/reports_projects_details.php?type=pdf', - 'creator' => 'The Grant Brothers'); - $x++; - $report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Judges List (CSV)', - 'desc' => 'Judges List', - 'custom_url' => 'admin/reports_judges.php?type=csv', - 'creator' => 'The Grant Brothers'); - $x++; - $report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Judges List (CSV) -- ALL YEARS', - 'desc' => 'Judges List - All Years', - 'custom_url' => 'admin/reports_judges_allyears.php?type=csv', - 'creator' => 'The Grant Brothers'); - $x++; - $report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Judging Teams Project Assignments (PDF)', - 'desc' => 'Judging Teams Project Assignments', - 'custom_url' => 'admin/reports_judges_teams_projects.php?type=pdf', - 'creator' => 'The Grant Brothers'); - $x++; - $report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Judging Teams Project Assignments (CSV)', - 'desc' => 'Judging Teams Project Assignments', - 'custom_url' => 'admin/reports_judges_teams_projects.php?type=csv', - 'creator' => 'The Grant Brothers'); - $x++; - $report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Projects Judging Team Assignments (PDF)', - 'desc' => 'Projects Judging Team Assignments', - 'custom_url' => 'admin/reports_projects_judges_teams.php?type=pdf', - 'creator' => 'The Grant Brothers'); - $x++; - $report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Projects Judging Team Assignments (CSV)', - 'desc' => 'Projects Judging Team Assignments', - 'custom_url' => 'admin/reports_projects_judges_teams.php?type=csv', - 'creator' => 'The Grant Brothers'); - $x++; - $report_custom[$x] = array('id' => $x, 'name' => 'Custom -- Award List for Award Ceremony Program (CSV)', - 'desc' => 'Award List for Award Ceremony Program creation', - 'custom_url' => 'admin/reports_program_awards.php?type=csv', - 'creator' => 'The Grant Brothers'); - - function report_save_field($report, $type, $loc) - { - global $allow_options; - global $report_students_fields, $report_judges_fields, $report_awards_fields; - global $report_committees_fields, $report_schools_fields; - global $report_volunteers_fields, $report_fairs_fields; - global $report_tours_fields, $report_fundraisings_fields; - - global $pdo; - - $fieldvar = "report_{$report['type']}s_fields"; - $allow_fields = array_keys($$fieldvar); - - /* First delete all existing fields */ - $stmt = $pdo->prepare("DELETE FROM reports_items - WHERE `reports_id`=? - AND `type`=?"); - $stmt->execute([$report['id'],$type]); - /* Now add new ones */ - - if(count($report[$type]) == 0) return; - - $q = ''; - $x = 0; - foreach($report[$type] as $k=>$v) { - if($type == 'option') { - /* field, value, x, y, w, h, lines, face, align, valign, fn, fs, fsize, overflow */ - $vals = "".$pdo->quote($k).",".$pdo->quote($v).",'0','0','0','0','0','','','','','','0','truncate'"; - } else { - if(get_value_from_array($v, 'lines') == 0) $v['lines'] =1; - $fs = is_array(get_value_from_array($v,'fontstyle')) ? implode(',',$v['fontstyle']) : ''; - $opts = get_value_from_array($v, 'align') . " " .$pdo->quote(get_value_from_array($v, 'valign', '')); - $vals = "'".get_value_from_array($v, 'field')."','".get_value_from_array($v, 'value')."', - '".get_value_from_array($v,'x')."','".get_value_from_array($v, 'y')."','".get_value_from_array($v, 'w')."', - '".get_value_from_array($v, 'h')."','".get_value_from_array($v,'lines')."','".get_value_from_array($v, 'face')."', - '$opts','".get_value_from_array($v, 'valign')."', - '".get_value_from_array($v, 'fontname')."','$fs','".get_value_from_array($v, 'fontsize')."', - '".get_value_from_array($v, 'on_overflow')."'"; - } - if($q != '') $q .= ','; - $q .= "({$report['id']}, '$type','$x',$vals)"; - $x++; - } - - - $stmt = $pdo->prepare("INSERT INTO reports_items(`reports_id`,`type`,`ord`, - `field`,`value`,`x`, `y`, `w`, `h`, - `lines`, `face`, `align`,`valign`, - `fontname`,`fontstyle`,`fontsize`,`on_overflow`) - VALUES ?"); - - $stmt->execute([$q]); - show_pdo_errors_if_any($pdo); - - } - - function report_load($report_id) - { - global $allow_options, $report_students_fields, $report_judges_fields; - global $report_committees_fields, $report_awards_fields; - global $report_schools_fields, $report_volunteers_fields; - global $report_tours_fields, $report_fairs_fields; - global $report_fundraisings_fields; - - global $pdo; - - $report = array(); - - $q = $pdo->prepare("SELECT * FROM reports WHERE id=?"); - $q->execute([$report_id]); - $r = $q->fetch(PDO::FETCH_ASSOC); - $report['name'] = get_value_from_array($r, 'name'); - $report['id'] = get_value_from_array($r, 'id'); - $report['system_report_id'] = get_value_from_array($r, 'system_report_id'); - $report['desc'] = get_value_from_array($r,'desc'); - $report['creator'] = get_value_from_array($r,'creator'); - $report['type'] = get_value_from_array($r, 'type'); - - $report['col'] = array(); - $report['sort'] = array(); - $report['group'] = array(); - $report['distinct'] = array(); - $report['options'] = array(); - $report['filter'] = array(); - $report['loc'] = array(); - - $fieldvar = "report_{$report['type']}s_fields"; - - if(is_array($$fieldvar)) - $allow_fields = array_keys($$fieldvar); - else - $allow_fields=array(); - - $q = $pdo->prepare("SELECT * FROM reports_items - WHERE reports_id=? - ORDER BY `ord`"); - $q->execute([$report['id']]); - show_pdo_errors_if_any($pdo); - - if($q->rowCount() == 0) return $report; - - while($a = $q->fetch(PDO::FETCH_ASSOC)) { - $f = $a['field']; - $t = $a['type']; - switch($t) { - case 'option': - /* We dont' care about order, just construct - * ['option'][name] = value; */ - if(!in_array($f, $allow_options)) { -// print("Type[$type] Field[$f] not allowed.\n"); - break; - } - $report['option'][$f] = $a['value']; - default: - if(!in_array($f, $allow_fields)) { -// print("Type[$type] Field[$f] not allowed.\n"); - break; - } - /* Pull out all the data */ - $val = array(); - $col_fields = array('field', 'x', 'y', 'w', 'h', 'lines', 'face', 'align', 'valign', 'value', 'fontname','fontsize','on_overflow'); - foreach($col_fields as $lf) $val[$lf] = $a[$lf]; - $val['fontstyle'] = explode(',', $a['fontstyle']); - /* valign, fontname, fontsize,fontstyle are unused, except in tcpdf reports - (i.e. nothign has changed, only adding on */ - - if($val['lines'] == 0) $val['lines'] = 1; - $opts = explode(" ", $val['align']); - $align_opts = array ('left', 'right', 'center'); - $valign_opts = array ('vtop', 'vbottom', 'vcenter'); - $style_opts = array ('bold'); - foreach($opts as $o) { - if(in_array($o, $align_opts)) $val['align'] = $o; - if(in_array($o, $valign_opts)) $val['valign'] = $o; - if(in_array($o, $valign_opts)) $val['face'] = $o; - } - - $report[$t][$a['ord']] = $val; - break; - } - } -//`int_r($report); - return $report; - } - - function report_save($report) - { global $pdo; - if($report['id'] == 0) { - /* New report */ - $stmt = $pdo->prepare("INSERT INTO reports (`id`) VALUES ('')"); - $stmt->execute(); - $report['id'] = $pdo->lastInsertId(); - } else { - /* if the report['id'] is not zero, see if this is a - * systeim report before doing anything. */ - $q = $pdo->prepare("SELECT system_report_id FROM reports WHERE id=?"); - $q->execute([$report['id']]); - $i = $q->fetch(PDO::FETCH_ASSOC); - if(intval($i['system_report_id']) != 0) { - /* This is a system report, the editor (should) - * properly setup the editor pages so that the user - * cannot save this report. The only way to get here - * is by directly modifying the POST variables.. so.. - * we don't have to worry about being user friendly. */ - echo "ERROR: attempt to save a system report (reports.id={$report['id']})"; - exit; - } - } - - -/* print("
    ");
    -	print_r($_POST);
    -	print_r($report);
    -	print("
    "); -*/ - - $stmt = $pdo->prepare("UPDATE reports SET - `name`=?, - `desc`=?, - `creator`=?, - `type`=? - WHERE `id`=?"); - $stmt->execute([$report['name'],$report['desc'],$report['creator'],$report['type'],$report['id']]); - - report_save_field($report, 'col', get_value_from_array($report, 'loc')); - report_save_field($report, 'group', array()); - report_save_field($report, 'sort', array()); - report_save_field($report, 'distinct', array()); - report_save_field($report, 'option', array()); - report_save_field($report, 'filter', array()); - return $report['id']; - } - - function report_load_all() - { - global $pdo; - $ret = array(); - $q = $pdo->prepare("SELECT * FROM reports ORDER BY `name`"); - $q->execute(); - while($r = $q->fetch(PDO::FETCH_ASSOC)) { - $report = array(); - $report['name'] = $r['name']; - $report['id'] = $r['id']; - $report['desc'] = $r['desc']; - $report['creator'] = $r['creator']; - $report['type'] = $r['type']; - $ret[] = $report; - } - return $ret; - } - - function report_delete($report_id) - { - global $pdo; - $r = intval($report_id); - /* if the report['id'] is not zero, see if this is a - * systeim report before doing anything. */ - $q = $pdo->prepare("SELECT system_report_id FROM reports WHERE id=?"); - $q->execute([$r]); - $i = $q->fetch(PDO::FETCH_ASSOC); - if(intval($i['system_report_id']) != 0) { - /* This is a system report, the editor (should) - * properly setup the editor pages so that the user - * cannot delete this report. The only way to get here - * is by directly modifying the POST variables.. so.. - * we don't have to worry about being user friendly. */ - echo "ERROR: attempt to delete a system report (reports.id=$r)"; - exit; - } - $stmt = $pdo->prepare("DELETE FROM reports WHERE `id`=?"); - $stmt->execute([$r]); - $stmt = $pdo->prepare("DELETE FROM reports_items WHERE `reports_id`=?"); - $stmt->execute([$r]); -} - - - function report_gen($report) - { -foreach($report['col'] as $v) - - global $config, $report_students_fields, $report_judges_fields, $report_awards_fields, $report_schools_fields; - global $report_stock, $report_committees_fields, $report_volunteers_fields; - global $report_tours_fields, $report_fairs_fields; - global $report_fundraisings_fields; - global $filter_ops; - -//foreach($report as $k=>$v){ -//print_r($k.' ~ >'); -//print_r($v); -//print_r('

    '); -//} - $fieldvar = "report_{$report['type']}s_fields"; - $fields = $$fieldvar; - - $gen_mode = ''; - $fieldname = array(); - $thead = array(); - - $table['header']=array(); - $table['widths']=array(); - $table['dataalign']=array(); - $table['option']=array(); - $table['total']=0; - - /* Validate the stock */ - if($report['option']['stock'] != '') { - if(!array_key_exists($report['option']['stock'], $report_stock)) { - echo "Invalid stock [{$report['option']['stock']}]"; - exit; - } - } - - switch($report['option']['type']) { - case 'csv': - $rep=new lcsv(i18n($report['name'])); - $gen_mode = 'table'; - break; - case 'label': - /* Label */ - $label_stock = $report_stock[$report['option']['stock']]; - $rep=new lpdf( i18n($config['fairname']), - i18n($report['name']), - $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo.gif"); - $rep->setPageStyle("labels"); - $rep->newPage($label_stock['page_width'], $label_stock['page_height']); - $rep->setFontSize(11); - $rep->setLabelDimensions($label_stock['label_width'], $label_stock['label_height'], - $label_stock['x_spacing'], $label_stock['y_spacing'],11,$label_stock['y_padding']); - $gen_mode = 'label'; - break; - case 'pdf': case '': - /* FIXME: handle landscape pages in here */ - $label_stock = $report_stock[$report['option']['stock']]; - $rep=new lpdf( i18n($config['fairname']), - i18n($report['name']), - $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo.gif"); - $rep->newPage($label_stock['page_width'], $label_stock['page_height']); - if($report['option']['default_font_size']) { - $rep->setDefaultFontSize($report['option']['default_font_size']); - $rep->setFontSize($report['option']['default_font_size']); - } - else { - $rep->setDefaultFontSize(11); - $rep->setFontSize(11); - } - - $gen_mode = 'table'; - if($report['option']['allow_multiline'] == 'yes') - $table['option']['allow_multiline'] = true; - break; - case 'tcpdf_label': - $label_stock = $report_stock[$report['option']['stock']]; - $show_box = ($report['option']['label_box'] == 'yes') ? true : false; - $show_fair = ($report['option']['label_fairname'] == 'yes') ? true : false; - $show_logo = ($report['option']['label_logo'] == 'yes') ? true : false; - - $rep=new pdf($report['name'], $label_stock['page_format'], $label_stock['page_orientation']); - $rep->setup_for_labels($show_box, $show_fair, $show_logo, - $label_stock['label_width'] * 25.4, $label_stock['label_height'] * 25.4, - $label_stock['x_spacing'] * 25.4, $label_stock['y_spacing'] * 25.4, - $label_stock['rows'], $label_stock['cols']); - $gen_mode = 'tcpdf_label'; - break; - - default: - echo "Invalid type [{$report['option']['type']}]"; - exit; - } - - $sel = array(); - $x=0; - $group_by = array(); - $post_group_by = array(); - $components = array(); - $order = array(); - - $total_width = 0; - $scale_width = 0; - $temp=array(); - $count=0; - foreach($report['col'] as $o=>$d) { - if($config['default_language']!='fr'){ - if(strpos($d['field'],'fr_')!='fr_'){ - $temp[$count]=$d; - $count++; - } - } - } - $report['col']=$temp; - /* Add up the column widths, and figure out which - * ones are scalable, just in case */ - foreach($report['col'] as $o=>$d) { - $f = $d['field']; - $total_width += $fields[$f]['width']; - if($fields[$f]['scalable'] == true) - $scale_width += $fields[$f]['width']; - } - - /* Determine the scale factor (use the label width so - * we can enforce margins) */ - - if($report['option']['fit_columns'] == 'yes') { // && $total_width > $label_stock['label_width']) { - $static_width = $total_width - $scale_width; - if($scale_width){ - if ($label_stock['label_width'] - $static_width > 0) { - $scale_factor = ($label_stock['label_width'] - $static_width) / $scale_width; - } else { - $scale_factor = $label_stock['label_width']/$total_width; - } - } else { - $scale_factor = 1.0; - } - } else { - $scale_factor = 1.0; - } - - /* Select columns to display */ - foreach($report['col'] as $o=>$d) { - $f = $d['field']; - $table['header'][] = i18n($fields[$f]['header']); - $sf = ($fields[$f]['scalable'] == true) ? $scale_factor : 1.0; - $table['widths'][] = $fields[$f]['width'] * $sf; - $table['dataalign'][] = 'left'; - $sel[] = "{$fields[$f]['table']} AS C$x"; - $fieldname[$f] = "C$x"; - /* We want to add these to group by, but AFTER all the other group bys */ - if(is_array($fields[$f]['group_by'])) - $post_group_by = array_merge($group_by, $fields[$f]['group_by']); - - if(is_array($fields[$f]['components'])) { - $components = array_merge($components, - $fields[$f]['components']); - } - $x++; - } - - /* We also want to select any column groupings, but we won't display them */ - foreach($report['group'] as $o=>$d) { - $f = $d['field']; - if(!isset($fieldname[$f])) { - $sel[] = "{$fields[$f]['table']} AS G$o"; - $fieldname[$f] = "G$o"; - } - - if(isset($fields[$f]['table_sort'])) - $order[] = $fields[$f]['table_sort']; - else - $order[] = $fieldname[$f]; - - if(is_array($fields[$f]['components'])) { - $components = array_merge($components, - $fields[$f]['components']); - } - } - - - /* If no sort order is specified, make the first field the order */ - if(count($report['sort']) == 0) - $report['sort'] = array(0 => array('field' => $report['col'][0]['field'])); - - foreach($report['sort'] as $o=>$d) { - $f = $d['field']; - if(!isset($fieldname[$f])) { - $sel[] = "{$fields[$f]['table']} AS S$o"; - $fieldname[$f] = "S$o"; - } - - if(isset($fields[$f]['table_sort'])) - $order[] = $fields[$f]['table_sort']; - else - $order[] = $fieldname[$f]; - } - - foreach($report['distinct'] as $o=>$d) { - $f = $d['field']; - if(!isset($fieldname[$f])) { - $sel[] = "{$fields[$f]['table']} AS D$o"; - $fieldname[$f] = "D$o"; - } - $group_by[] = $fieldname[$f]; - } - - foreach($report['filter'] as $o=>$d) { - $f = $d['field']; - if(!isset($fieldname[$f])) { - $sel[] = "{$fields[$f]['table']} AS F$o"; - $fieldname[$f] = "F$o"; - } - $t = $filter_ops[$d['x']]; - $filter[] = "{$fields[$f]['table']} $t '{$d['value']}'"; - if(is_array($fields[$f]['components'])) { - $components = array_merge($components, - $fields[$f]['components']); - } - } - $sel = implode(",", $sel); - $order = implode(",", $order); - - - if(!isset($report['year'])) { - $report['year'] = $config['FAIRYEAR']; - } - - $group_by = array_merge($group_by, $post_group_by); - $group_query = ""; - if(count($group_by)) { - $group_query = "GROUP BY ".implode(",", $group_by); - } - - $filter_query = ""; - if(count($filter)) { - $filter_query = " AND ".implode(" AND ", $filter); - } - - $func = "report_{$report['type']}s_fromwhere"; - $q = call_user_func_array($func, array($report, $components)); - - $q = "SELECT $sel $q $filter_query $group_query ORDER BY $order"; - $r = $pdo->prepare($q); - $r->execute(); - -// print_r($report); -// print_r($report['filter']); -// echo "$q"; - - - if($r == false) { - echo "The report database query has failed. This is - unfortunate but not your fault. Please send the following to - your fair administrator, or visit http://www.sfiab.ca and submit - a bug report so we can get this fixed.
    "; - echo "
    ";
    -		echo "Query: [$q]
    "; - echo "Error: [".$pdo->erroInfo()."]
    "; - echo "
    "; - exit; - } - show_pdo_errors_if_any($pdo); - - $ncols = count($report['col']); - $n_groups = count($report['group']); - $last_group_data = array(); - -// echo "
    ";print_r($rep);
    -	while($i = $r->fetch(PDO::FETCH_ASSOC)) {
    -		
    -		if($n_groups > 0) {
    -			$group_change = false;
    -			/* See if any of the "group" fields have changed */
    -			foreach($report['group'] as $x=>$g) {
    -				$c = $fieldname[$g['field']];				
    -
    -				if($fields[$g['field']]['exec_function'])
    -					$i_c=call_user_func_array($fields[$g['field']]['exec_function'], array($report,$f,$i[$c]));
    -				else
    -					$i_c=$i[$c];
    -
    -				if($last_group_data[$c] != $i_c)
    -					$group_change = true;
    -
    -				$last_group_data[$c] = $i_c;
    -			}
    -
    -			if($group_change) {
    -				/* Dump the last table */
    -
    -				if(count($table['data'])) {
    -				//	print_r($table);
    -					$rep->addTable($table);  //table is the content
    -					$rep->nextLine();
    -					$table['data'] = array();
    -					$table['total'] = 0;
    -					/* Start a new page AFTER a table is
    -					* dumped, so the first page doesn't
    -					* end up blank */
    -					if($report['option']['group_new_page'] == 'yes') {
    -						$rep->newPage();
    -					} else {
    -						$rep->hr();
    -						$rep->vspace(-0.1);
    -					}
    -				}
    -				
    -				/* Construct a new header */
    -				$h = implode(" -- ", $last_group_data);
    -				$rep->heading($h);
    -				$rep->nextLine();
    -			}
    -			
    -		}
    -
    -		$data = array();
    -		if($gen_mode == 'label') {
    -			$show_box = ($report['option']['label_box'] == 'yes') ? true : false;
    -			$show_fair = ($report['option']['label_fairname'] == 'yes') ? true : false;
    -			$show_logo = ($report['option']['label_logo'] == 'yes') ? true : false;
    -			$rep->newLabel($show_box, $show_fair, $show_logo);
    -		} else if($gen_mode == 'tcpdf_label') {
    -			$rep->label_new();
    -		}
    -
    -		foreach($report['col'] as $o=>$d) {			//fill in one page
    -			$f = $d['field'];
    -
    -			if(is_array($fields[$f]['value_map'])) {
    -				$v = $fields[$f]['value_map'][$i["C$o"]];
    -			} else if(is_callable($fields[$f]['exec_function'])) {
    -				$v = call_user_func_array($fields[$f]['exec_function'], array($report, $f, $i["C$o"]));
    -			} else {
    -				$v =  $i["C$o"];
    -			}
    -
    -			if($gen_mode == 'table') {
    -				$data[] = $v;
    -			} else if($gen_mode == 'label') {
    -				$opt = array();
    -				if($d['face'] == 'bold') $opt[] = 'bold';
    -				$opt[] = $d['align'];
    -				$opt[] = $d['valign'];
    -				if($report['option']['field_box'] == 'yes') 
    -					$opt[] = 'field_box';
    -
    -//the page content is filled
    -				/* Special column, draw a box */
    -				if($f == 'static_box') {
    -					$rep->addLabelBox($d['x'], $d['y'], $d['w'],
    -								$d['h']);
    -				} else {
    -					/* Special column, override result with static text */
    -					if($f == 'static_text') $v = $d['value'];
    -
    -					$lh = ($d['lines'] == 0) ? 0 : $d['h']/$d['lines'];
    -					$rep->addLabelText2($d['x'], $d['y'], $d['w'],
    -							$d['h'], $lh,
    -							$v, $opt);
    -				}
    -			} else if($gen_mode == 'tcpdf_label') {
    -				/* Setup additional options */
    -				$show_box = ($report['option']['field_box'] == 'yes') ? true : false;
    -
    -//				echo "
    "; print_r($d);
    -
    -				switch($f) {
    -				case 'static_box':
    -					$rep->label_rect($d['x'], $d['y'], $d['w'], $d['h']);
    -					break;
    -				case 'fair_logo':
    -					$rep->label_fair_logo($d['x'], $d['y'], $d['w'], $d['h'], $show_box);
    -					break;
    -				case "projectbarcode":
    -					$style = array(
    -					'border' => 2,
    -					'vpadding' => 'auto',
    -					'hpadding' => 'auto',
    -					'fgcolor' => array(0,0,0),
    -					'bgcolor' => false, //array(255,255,255)
    -					'module_width' => 2, // width of a single module in points
    -					'module_height' => 2 // height of a single module in points
    -					);
    -					$rep->label_barcode($v, 'QRCODE,H', $d['x'], $d['y'], $d['w'], $d['h'], $style, 'N');
    -				break;
    -					
    -				default:
    -					if($f == 'static_text') 
    -						$v = $d['value'];
    -
    -					$v = iconv("ISO-8859-1","UTF-8",$v);
    -
    -					$rep->label_text($d['x'], $d['y'], $d['w'], $d['h'],
    -					$v, $show_box, $d['align'], $d['valign'],
    -					$d['fontname'],$d['fontstyle'],$d['fontsize'],
    -					$d['on_overflow']);
    -
    -					break;
    -				}
    -
    -
    -
    -/*
    -				if($f == 'static_box') {
    -					$rep->label_rect($d['x'], $d['y'], $d['w'], $d['h']);
    -				} else {
    -					if($f == 'static_text') $v = $d['value'];
    -
    -					$v = iconv("ISO-8859-1//TRANSLIT", "UTF-8", $v);
    -					if($f=="projectbarcode") {
    -						$style = array(
    -							'border' => 2,
    -							'vpadding' => 'auto',
    -							'hpadding' => 'auto',
    -							'fgcolor' => array(0,0,0),
    -							'bgcolor' => false, //array(255,255,255)
    -							'module_width' => 2, // width of a single module in points
    -							'module_height' => 2 // height of a single module in points
    -						);
    -						$rep->label_barcode($v, 'QRCODE,H', $d['x'], $d['y'], $d['w'], $d['h'], $style, 'N');
    -					}
    -					else {
    -						$rep->label_text($d['x'], $d['y'], $d['w'], $d['h'],
    -								$v, $show_box, $d['align'], $d['valign'],
    -								$d['fontname'],$d['fontstyle'],$d['fontsize'],
    -								$d['on_overflow']);
    -					}
    -
    -				}
    -				*/
    -
    -			}
    -//}
    -
    -			if($fields[$f]['total'] == true)
    -				$table['total'] += $v;
    -		}
    -		if(count($data)) $table['data'][] = $data;
    -	}
    -	if(count($table['data'])) {
    -		$rep->addTable($table);
    -	}
    -
    -
    -	$rep->output();
    -}
    -
    -?>
    diff --git a/admin/reports.php b/admin/reports.php
    deleted file mode 100644
    index 6ae5a17a..00000000
    --- a/admin/reports.php
    +++ /dev/null
    @@ -1,389 +0,0 @@
    -
    - * Copyright (C) 2005 James Grant 
    - * Copyright (C) 2024 AlgoLibre Inc. 
    - *
    - * This program is free software; you can redistribute it and/or
    - * modify it under the terms of the GNU General Public
    - * License as published by the Free Software Foundation, version 2.
    - *
    - * This program is distributed in the hope that it will be useful,
    - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    - *  General Public License for more details.
    - *
    - * You should have received a copy of the GNU General Public License
    - * along with this program; see the file COPYING.  If not, write to
    - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    - * Boston, MA 02111-1307, USA.
    - */
    -?>
    -prepare("DELETE FROM reports_committee WHERE
    -			users_id=? AND id=?");
    -		$stmt->execute([$_SESSION['users_uid'],$id]);
    -		happy_('Report successfully removed');
    -		exit;
    -	case 'reload':
    -		$edit_mode = true;
    -		$reports_id = intval(get_value_from_array($_POST, 'reports_id'));
    -		exit;
    -
    -	case 'load_report':
    -		$id = intval($_GET['id']);
    -
    -		/* Load report */
    -		if ($id == -1) {
    -			$reports_id = intval($_GET['reports_id']);
    -			$report = report_load($reports_id);
    -
    -			$ret['id'] = -1;
    -			$ret['reports_id'] = $reports_id;
    -			$ret['type'] = $report['option']['type'];
    -			$ret['stock'] = $report['option']['stock'];
    -			$ret['comment'] = $report['desc'];
    -			$ret['name'] = $report['name'];
    -			$ret['category'] = '';
    -		} else {
    -			$q = $pdo->prepare("SELECT * FROM reports_committee WHERE id=?");
    -			$q->execute([$id]);
    -			$ret = $q->fetch(PDO::FETCH_ASSOC);
    -			$ret['type'] = $ret['format'];
    -		}
    -
    -		/* Load available categories */
    -		$q = $pdo->prepare("SELECT DISTINCT category FROM reports_committee
    - \t\t\tWHERE users_id=?
    -			ORDER BY category");
    -		$q->execute([$_SESSION['users_uid']]);
    -		while ($i = $q->fetch(PDO::FETCH_OBJ))
    -			$ret['cat'][] = $i->category;
    -		echo json_encode($ret);
    -		exit;
    -
    -	case 'save':
    -		echo 'POST: ';
    -		print_r($_POST);
    -		$id = intval($_POST['id']);
    -		$reports_id = intval($_POST['reports_id']);
    -		if ($id == -1) {
    -			/* New entry */
    -			$stmt = $pdo->prepare("INSERT INTO `reports_committee` (`users_id`,`reports_id`) 
    -			VALUES(?,?);");
    -			$stmt->execute([$_SESSION['users_uid'],$reports_id]);
    -			show_pdo_errors_if_any($pdo);
    -			$id = $pdo->lastInsertId();
    -		}
    -
    -		/* Update entry */
    -		$category = $_POST['category'];
    -		$category_exist = $_POST['category_exist'];
    -		$comment = stripslashes($_POST['comment']);
    -
    -		if ($category_exist != '')
    -			$category = $category_exist;
    -		$category = stripslashes(trim($category));
    -
    -		if ($category == '')
    -			$category = 'default';
    -
    -		if ($reports_id > 0) {
    -			/* SFIAB report */
    -			$type = $_POST['type'];
    -			$stock = $_POST['stock'];
    -			if (!array_key_exists($type, $report_options['type']['values'])) {
    -				error_("Invalid format: type=$type");
    -				exit;
    -			}
    -			if (!array_key_exists($stock, $report_stock)) {
    -				error_("Invalid stock: stock=$stock");
    -				exit;
    -			}
    -		} else {
    -			/* Old custom */
    -			$type = '';
    -			$stock = '';
    -		}
    -
    -		$stmt = $pdo->prepare("UPDATE `reports_committee` SET
    -			`category`=?,
    -			`comment`=?,
    -			`format`=?,
    -			`stock`=?
    -			WHERE id=?");
    -		$stmt->execute([$category,$comment,$type,$stock,$id]);
    -		happy_('Saved');
    -		exit;
    -}
    -
    -// send the header
    -send_header('My Reports',
    -	array('Committee Main' => 'committee_main.php'),
    -	'print/export_reports');
    -
    -/* Send a greeting */
    -echo i18n('Welcome to the new report interface.  You can select and save specific reports under specific categories so you can always find the report you need without having to go through the list each time.  To begin customizing this list, click on the "Edit This List" button at the bottom of this page.');
    -?>
    -

    - - -prepare("SELECT reports_committee.*,reports.name - \t\t\tFROM reports_committee - LEFT JOIN reports ON reports.id=reports_committee.reports_id - \t\t\tWHERE users_id=? - ORDER BY category,id"); -$q->execute([$_SESSION['users_uid']]); -show_pdo_errors_if_any($pdo); -if ($q->rowCount() == 0) { - echo i18n('You have no reports saved'); -} else { - $last_category = ''; - $x = 0; - echo ''; - while ($i = $q->fetch(PDO::FETCH_OBJ)) { - $x++; - if ($last_category != $i->category) { - /* New category */ - echo '"; - $last_category = $i->category; - } - - if ($i->reports_id > 0) { - // $url = "admin/reports_gen.php?id={$i->reports_id}&show_options=1"; - $name = "reports_id})\">{$i->name}"; - } else { - $name = "reports_id]['custom_url']}\"> - {$report_custom[-$i->reports_id]['name']}"; - } - ?> - - - - - -reports_id > 0) { - * echo ''; - * } - */ - } - echo '

    '; - if (get_value_or_default($edit_mode) == true) - echo i18n('Category') . ': '; - echo "{$i->category}

    comment ?> - -
    '; - * echo ''; - * echo i18n('Format').": {$i->format}, "; - * echo i18n('Paper').": {$report_stock[$i->stock]['name']}, "; - * echo i18n('Year').": {$config['FAIRYEAR']}"; - * echo ''; - * echo '
    '; -} - -?> - - -
    - -
    -
    - - $r) { - $r['id'] = -$id; - $reports[-$id] = $r; -} -?> - -
    -

    - -
    -
    - - -
    -
    - - - - - diff --git a/admin/reports_acscript.php b/admin/reports_acscript.php deleted file mode 100644 index 5ab33ea2..00000000 --- a/admin/reports_acscript.php +++ /dev/null @@ -1,310 +0,0 @@ - $val) { - $show_category[] = "projects.projectcategories_id='$id'"; - } - if ($show_unawarded_prizes == 'yes') { - $show_category[] = 'projects.projectcategories_id IS NULL'; - } - $and_categories = join(' OR ', $show_category); -} else { - $and_categories = '1'; -} - -$show_criteria = (get_value_from_array($_GET, 'show_criteria') == 'on') ? true : false; - -$type = $_GET['type']; -if (!$type) - $type = 'pdf'; - -$scriptformat = $_GET['scriptformat']; -if (!$scriptformat) - $scriptformat = 'default'; - -if ($type == 'pdf') { - $rep = new lpdf(i18n($config['fairname']), - i18n('Awards Ceremony Script'), - $_SERVER['DOCUMENT_ROOT'] . $config['SFIABDIRECTORY'] . '/data/logo-200.gif'); - - $rep->newPage(); - if ($scriptformat == 'default') - $rep->setFontSize(12); - if ($scriptformat == 'formatted') - $rep->setFontSize(14); -} else if ($type == 'csv') { - $rep = new lcsv(i18n('Awards Ceremony Script')); -} -$q = $pdo->prepare("SELECT - award_awards.id, - award_awards.name, - award_awards.presenter, - award_awards.description, - award_awards.criteria, - award_awards.order AS awards_order, - award_types.type, - sponsors.organization - FROM - award_awards, - award_types, - sponsors - WHERE - award_awards.year=? - AND award_types.year=? - AND award_awards.award_types_id=award_types.id - AND award_awards.sponsors_id=sponsors.id - AND award_awards.excludefromac='0', - ? - ORDER BY awards_order"); -$q->execute([$foryear,$foryear,$awardtype]); - -show_pdo_errors_if_any($pdo); -// echo "
    ";
    -if (!$q->rowCount()) {
    -	$rep->output();
    -	exit;
    -}
    -$awards = array();
    -
    -while ($r = $q->fetch(PDO::FETCH_OBJ)) {
    -	$pq = $pdo->prepare("SELECT 
    -						award_prizes.prize,
    -						award_prizes.number,
    -						award_prizes.id,
    -						award_prizes.cash,
    -						award_prizes.scholarship,
    -						winners.projects_id,
    -						projects.projectnumber,
    -						projects.title,
    -						projects.projectcategories_id,
    -						projects.registrations_id AS reg_id
    -					FROM 
    -						award_prizes 
    -						LEFT JOIN winners ON winners.awards_prizes_id=award_prizes.id
    -						LEFT JOIN projects ON projects.id=winners.projects_id
    -					WHERE 
    -						award_awards_id=? 
    -						AND award_prizes.year=?
    -						AND award_prizes.excludefromac='0'
    -						AND (?)
    -					ORDER BY 
    -						`order`,
    -						projects.projectnumber");
    -	$pq->execute([$r->id,$foryear,$and_categories]);
    -	show_pdo_errors_if_any($pdo);
    -
    -	$r->winners = array();
    -	$r->awarded_count = 0;
    -
    -	while ($w = $pq->fetch(PDO::FETCH_OBJ)) {
    -		if ($w->projects_id) {
    -			$r->awarded_count++;
    -		}
    -		if ($r->type == 'Divisional' && $group_by_prize == true) {
    -			/* Search awards for an award name that matches this prize */
    -			$found = false;
    -			foreach ($awards as &$p_award) {
    -				if ($p_award->name == $w->prize) {
    -					/*
    -					 * Match!  Set the prize name to the award name,
    -					 * and add the prize to the award
    -					 */
    -					$w->prize = $r->name;
    -					$p_award->winners[] = $w;
    -					$found = true;
    -					//						echo "Add to award {$p_award->name}: ";		print_r($w);
    -					break;
    -				}
    -			}
    -			if ($found == false) {
    -				/* Make a new award and set it equal to the prize name */
    -				$n = $r->name;
    -				$new_award = clone ($r);
    -				$new_award->name = $w->prize;
    -				/* Now add the prize with the award's name */
    -				$w->prize = $n;
    -				$new_award->winners[] = $w;
    -				$awards[] = $new_award;
    -				//					echo "Create Award:"; print_r($new_award);
    -			}
    -		} else {
    -			//				echo "Add non-div winner\n";
    -			$r->winners[] = $w;
    -		}
    -	}
    -
    -	if ($show_unawarded_awards == 'no' && $r->awarded_count == 0) {
    -		/* No winners */
    -		continue;
    -	}
    -
    -	if ($r->type == 'Divisional' && $group_by_prize == true) {
    -		/* Do nothing */
    -	} else {
    -		$awards[] = $r;
    -	}
    -}
    -//	echo '
    ';	print_r($awards);
    -
    -foreach ($awards as $r) {
    -	if ($scriptformat == 'formatted')
    -		$rep->newPage();
    -
    -	if ($scriptformat == 'default')
    -		$rep->heading("$r->name  ($r->type)");
    -	if ($scriptformat == 'formatted') {
    -		$rep->setFontBold();
    -		$rep->addText("$r->name  ($r->type)");
    -		$rep->setFontNormal();
    -	}
    -	if ($r->type != 'Divisional')
    -		$rep->addText(i18n('Sponsored by: %1', array($r->organization)));
    -	if ($r->presenter)
    -		$rep->addText(i18n('Presented by: %1', array($r->presenter)));
    -	if ($r->description)
    -		$rep->addText(i18n('Description: %1', array($r->description)));
    -	if ($show_criteria)
    -		$rep->addText(i18n('Criteria: %1', array($r->criteria)));
    -
    -	if ($scriptformat == 'formatted')
    -		$rep->nextline();
    -
    -	if ($r->awarded_count == 0) {
    -		$rep->addText('Not awarded');
    -	}
    -
    -	$prevprizeid = -1;
    -
    -	foreach ($r->winners as $pr) {
    -		if ($pr->projectnumber || $show_unawarded_prizes == 'yes') {
    -			if ($prevprizeid != $pr->id) {
    -				$prizetext = $pr->prize;
    -
    -				if ($pr->cash || $pr->scholarship) {
    -					$prizetext .= ' (';
    -					if ($pr->cash && $pr->scholarship)
    -						$prizetext .= "\$$pr->cash cash / \$$pr->scholarship scholarship";
    -					else if ($pr->cash)
    -						$prizetext .= "\$$pr->cash cash";
    -					else if ($pr->scholarship)
    -						$prizetext .= "\$$pr->scholarship scholarship";
    -					$prizetext .= ')';
    -				}
    -				if ($scriptformat == 'default')
    -					$rep->addText($prizetext);
    -				if ($scriptformat == 'formatted') {
    -					$rep->setFontBold();
    -					$rep->addText($prizetext);
    -					$rep->setFontNormal();
    -					$rep->nextline();
    -				}
    -
    -				$prevprizeid = $pr->id;
    -			}
    -
    -			if ($pr->projectnumber) {
    -				if ($scriptformat == 'default')
    -					$rep->addText("    ($pr->projectnumber) $pr->title");
    -
    -				$sq = $pdo->prepare("SELECT students.firstname,
    -									students.lastname,
    -									students.pronunciation,
    -									students.schools_id,
    -									schools.school
    -								FROM
    -									students,
    -									schools
    -								WHERE
    -									students.registrations_id=?
    -									AND students.schools_id=schools.id
    -								");
    -				$sq->execute([$pr->reg_id]);
    -
    -				$students = '       Students: ';
    -				$studnum = 0;
    -				$pronounce = '';
    -				$rawpronounce = '';
    -				while ($studentinfo = $sq->fetch(PDO::FETCH_OBJ)) {
    -					if ($studnum > 0)
    -						$students .= ', ';
    -					$students .= "$studentinfo->firstname $studentinfo->lastname";
    -
    -					if ($studnum > 0)
    -						$pronounce .= ', ';
    -					$pronounce .= "\"{$studentinfo->pronunciation}\"";
    -					$rawpronounce .= "{$studentinfo->pronunciation}";
    -
    -					$student_winner[$studnum] = "$studentinfo->firstname $studentinfo->lastname";
    -					$student_win_pronunc[$studnum] = "$studentinfo->pronunciation";
    -					$student_school[$studnum] = $studentinfo->school;
    -					$studnum++;
    -				}
    -
    -				if ($scriptformat == 'default') {
    -					$rep->addText($students);
    -					if (trim($rawpronounce) != '' && $show_pronunciation == TRUE)
    -						$rep->addText("       Pronunciation: $pronounce");
    -					$rep->addText("       School: {$student_school[0]}");
    -				}
    -				if ($scriptformat == 'formatted') {
    -					$rep->addTextX("$pr->projectnumber", 0.5);
    -					for ($x = 0; $x < $studnum; $x++) {
    -						$rep->addTextX($student_winner[$x], 1.4);
    -						$rep->addTextX($student_school[$x], 5.5);
    -						if ($show_pronunciation == TRUE && $student_win_pronunc[$x]) {
    -							$rep->nextline();
    -							$rep->addTextX("({$student_win_pronunc[$x]})", 2.0);
    -						}
    -						if ($type == 'pdf')
    -							$rep->nextline();
    -					}
    -					if (($studnum == 1) && ($type == 'csv'))
    -						$rep->addTextX('');
    -					if (($studnum == 1) && ($type == 'csv'))
    -						$rep->addTextX('');
    -					$rep->addText($pr->title, 'left', 1.4);
    -					if ($type == 'pdf')
    -						$rep->nextline();
    -					$rep->nextline();
    -				}
    -			} else {
    -				$rep->addText('    Prize not awarded');
    -			}
    -		}
    -	}
    -	$rep->nextLine();
    -}
    -
    -$rep->output();
    -?>
    diff --git a/admin/reports_appeal_letters.php b/admin/reports_appeal_letters.php
    deleted file mode 100644
    index 0984bfdd..00000000
    --- a/admin/reports_appeal_letters.php
    +++ /dev/null
    @@ -1,106 +0,0 @@
    -
    - * Copyright (C) 2005 James Grant 
    - *
    - * This program is free software; you can redistribute it and/or
    - * modify it under the terms of the GNU General Public
    - * License as published by the Free Software Foundation, version 2.
    - *
    - * This program is distributed in the hope that it will be useful,
    - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    - *  General Public License for more details.
    - *
    - * You should have received a copy of the GNU General Public License
    - * along with this program; see the file COPYING.  If not, write to
    - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    - * Boston, MA 02111-1307, USA.
    - */
    -?>
    -SetCreator('SFIAB');
    -$pdf->SetAuthor('SFIAB');
    -$pdf->SetTitle($config['fairname']);
    -$pdf->SetSubject('Fundraising Appeal Letters');
    -$pdf->SetKeywords('');
    -
    -// set default header data
    -$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
    -
    -// set header and footer fonts
    -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
    -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
    -
    -// set default monospaced font
    -$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
    -
    -// set margins
    -$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
    -$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
    -$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
    -
    -// set auto page breaks
    -$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
    -$pdf->setPrintFooter(false);
    -
    -// set image scale factor
    -$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
    -
    -// set some language-dependent strings
    -// $pdf->setLanguageArray($l);
    -
    -/* Load the users */
    -$users = array();
    -$q = $pdo->prepare("SELECT * FROM fundraising_campaigns_users_link WHERE fundraising_campaigns_id=?");
    -$q->execute([$fcid]);
    -while ($l = $q->fetch(PDO::FETCH_ASSOC)) {
    -	$uid = $l['users_uid'];
    -	$users[$uid] = user_load_by_uid($uid);
    -}
    -
    -/* Grab all the emails */
    -$q = $pdo->prepare("SELECT * FROM emails WHERE fundraising_campaigns_id=? AND val=?");
    -$q->execute([$fcid,$key]);
    -
    -while ($e = $q->fetch(PDO::FETCH_ASSOC)) {
    -	foreach ($users as $uid => &$u) {
    -		$subject = communication_replace_vars($e['subject'], $u);
    -		$body = communication_replace_vars($e['bodyhtml'], $u);
    -		/* these dont' need substitutions */
    -		$to = $u['name'];
    -		$date = date('F j, Y');
    -
    -		$html = "
    -				
    -				
    -			
    Attn: $to
    Subject: $subject
    Date: $date
    -
    "; - - $pdf->AddPage(); - $pdf->writeHTML($html); - $pdf->writeHTML($body); - $pdf->lastPage(); - } -} -$pdf->Output('report.pdf', 'I'); - -?> diff --git a/admin/reports_awards.inc.php b/admin/reports_awards.inc.php deleted file mode 100644 index b06ac190..00000000 --- a/admin/reports_awards.inc.php +++ /dev/null @@ -1,452 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -function report_awards_fr($report, $field, $text) -{ - return i18n($text, array(), array(), 'fr'); -} - -function report_cash_words($report, $field, $text) -{ - return wordify($text, true); -} - -$report_awards_fields = array( - 'name' => array( - 'start_option_group' => 'Award Information', - 'name' => 'Award -- Name', - 'header' => 'Award Name', - 'width' => 3.0, - 'table' => 'award_awards.name' - ), - 'name_fr' => array( - 'name' => 'Award -- Name (French)', - 'header' => 'Award Name', - 'width' => 3.0, - 'table' => 'award_awards.name', - 'exec_function' => 'report_awards_fr' - ), - 'criteria' => array( - 'name' => 'Award -- Criteria', - 'header' => 'Award Criteria', - 'width' => 3.0, - 'table' => 'award_awards.criteria' - ), - 'criteria_fr' => array( - 'name' => 'Award -- Criteria (French)', - 'header' => 'Award Criteria', - 'width' => 3.0, - 'table' => 'award_awards.criteria', - 'exec_function' => 'report_awards_fr' - ), - 'presenter' => array( - 'name' => 'Award -- Presenter', - 'header' => 'Award Presenter', - 'width' => 1.5, - 'table' => 'award_awards.presenter' - ), - 'order' => array( - 'name' => 'Award -- Order', - 'header' => 'Award Order', - 'width' => 0.5, - 'table' => 'award_awards.order' - ), - 'cwsfaward' => array( - 'name' => 'Award -- CWSF Award', - 'header' => 'CWSF', - 'width' => 0.5, - 'table' => 'award_awards.cwsfaward', - 'value_map' => array('0' => 'No', '1' => 'Yes') - ), - 'type' => array( - 'name' => 'Award -- Type', - 'header' => 'Award Type', - 'width' => 1.0, - 'table' => 'award_types.type' - ), - 'empty_winner_box' => array( - 'name' => 'Award -- Empty Winner Box (for hand entry on printed reports)', - 'header' => 'Winner', - 'width' => 1.0, - 'table' => "CONCAT('')" - ), - 'sponsor_organization' => array( - 'start_option_group' => 'Sponsor Information', - 'name' => 'Sponsor -- Organization', - 'header' => 'Sponsor Organization', - 'width' => 2.0, - 'table' => 'sponsors.organization' - ), - 'sponsor_phone' => array( - 'name' => 'Sponsor -- Phone', - 'header' => 'Sp. Phone', - 'width' => 1, - 'table' => 'sponsors.phone' - ), - 'sponsor_fax' => array( - 'name' => 'Sponsor -- Fax', - 'header' => 'Sp. Fax', - 'width' => 1, - 'table' => 'sponsors.fax' - ), - 'sponsor_address' => array( - 'name' => 'Sponsor -- Street Address', - 'header' => 'Sponsor Address', - 'width' => 2.0, - 'table' => 'sponsors.address' - ), - 'sponsor_city' => array( - 'name' => 'Sponsor -- City', - 'header' => 'Sp. City', - 'width' => 1.5, - 'table' => 'sponsors.city' - ), - 'sponsor_province' => array( - 'name' => 'Sponsor -- ' . $config['provincestate'], - 'header' => 'Sp. ' . $config['provincestate'], - 'width' => 0.75, - 'table' => 'sponsors.province_code' - ), - 'sponsor_postal' => array( - 'name' => 'Sponsor -- ' . $config['postalzip'], - 'header' => 'Sp. ' . $config['postalzip'], - 'width' => 0.75, - 'table' => 'sponsors.postalcode' - ), - 'sponsor_notes' => array( - 'name' => 'Sponsor -- Notes', - 'header' => 'Sponsor Notes', - 'width' => 3, - 'table' => 'sponsors.notes' - ), - 'sponsorship_status' => array( - 'name' => 'Sponsorship -- Status', - 'header' => 'Sp. Status', - 'width' => 0.5, - 'table' => 'sponsorships.status', - 'value_map' => array('pending' => 'Pending', 'confirmed' => 'Confirmed'), 'received' => 'Received' - ), - 'pcontact_salutation' => array( - 'start_option_group' => 'Sponsor Primary Contact', - 'name' => 'Primary Contact -- Salutation', - 'header' => 'Cnct. Salutation', - 'width' => 1.0, - 'table' => 'PRIMARYCONTACTUSER.salutation' - ), - 'pcontact_last_name' => array( - 'name' => 'Primary Contact -- Last Name', - 'header' => 'Cnct. Last Name', - 'width' => 1.0, - 'table' => 'PRIMARYCONTACTUSER.lastname' - ), - 'pcontact_first_name' => array( - 'name' => 'Primary Contact -- First Name', - 'header' => 'Cnct. First Name', - 'width' => 1.0, - 'table' => 'PRIMARYCONTACTUSER.firstname' - ), - 'pcontact_name' => array( - 'name' => 'Primary Contact -- Full Name (last, first)', - 'header' => 'Contact Name', - 'width' => 1.75, - 'table' => "CONCAT(PRIMARYCONTACTUSER.lastname, ', ', PRIMARYCONTACTUSER.firstname)", - 'table_sort' => 'PRIMARYCONTACTUSER.lastname' - ), - 'pcontact_namefl' => array( - 'name' => 'Primary Contact -- Full Name (salutation first last)', - 'header' => 'Contact Name', - 'width' => 1.75, - 'table' => "CONCAT(PRIMARYCONTACTUSER.salutation, ' ', PRIMARYCONTACTUSER.firstname, ' ', PRIMARYCONTACTUSER.lastname)", - 'table_sort' => 'PRIMARYCONTACTUSER.lastname' - ), - 'pcontact_position' => array( - 'name' => 'Primary Contact -- Position', - 'header' => 'Cnct. Position', - 'width' => 1.25, - 'table' => 'PRIMARYCONTACT.position' - ), - 'pcontact_email' => array( - 'name' => 'Primary Contact -- Email', - 'header' => 'Cnct. Email', - 'width' => 2.0, - 'table' => 'PRIMARYCONTACTUSER.email' - ), - 'pcontact_hphone' => array( - 'name' => 'Primary Contact -- Home Phone', - 'header' => 'Cnct. Home', - 'width' => 1, - 'table' => 'PRIMARYCONTACTUSER.phonehome' - ), - 'pcontact_wphone' => array( - 'name' => 'Primary Contact -- Work Phone', - 'header' => 'Cnct. Work', - 'width' => 1, - 'table' => 'PRIMARYCONTACTUSER.phonework' - ), - 'pcontact_cphone' => array( - 'name' => 'Primary Contact -- Cell Phone', - 'header' => 'Cnct. Cell', - 'width' => 1, - 'table' => 'PRIMARYCONTACTUSER.phonecell' - ), - 'pcontact_fax' => array( - 'name' => 'Primary Contact -- Fax', - 'header' => 'Cnct. Fax', - 'width' => 1, - 'table' => 'PRIMARYCONTACTUSER.fax' - ), - 'pcontact_notes' => array( - 'name' => 'Primary Contact -- Notes', - 'header' => 'Contact Notes', - 'width' => 3, - 'table' => 'PRIMARYCONTACT.notes' - ), - 'pcontact_address' => array( - 'name' => 'Primary Contact Address -- Street', - 'header' => 'Address', - 'width' => 2.0, - 'table' => "CONCAT(PRIMARYCONTACTUSER.address, ' ', PRIMARYCONTACTUSER.address2)" - ), - 'pcontact_city' => array( - 'name' => 'Primary Contact Address -- City', - 'header' => 'City', - 'width' => 1.5, - 'table' => 'PRIMARYCONTACTUSER.city' - ), - 'pcontact_province' => array( - 'name' => 'Primary Contact Address -- ' . $config['provincestate'], - 'header' => $config['provincestate'], - 'width' => 0.75, - 'table' => 'PRIMARYCONTACTUSER.province' - ), - 'pcontact_postal' => array( - 'name' => 'Primary Contact Address -- ' . $config['postalzip'], - 'header' => $config['postalzip'], - 'width' => 0.75, - 'table' => 'PRIMARYCONTACTUSER.postalcode' - ), - 'pcontact_city_prov' => array( - 'name' => 'Primary Contact Address -- City, ' . $config['provincestate'] . ' (for mailing)', - 'header' => 'City', - 'width' => 1.5, - 'table' => "CONCAT(PRIMARYCONTACTUSER.city, ', ', PRIMARYCONTACTUSER.province)" - ), - 'judgeteamname' => array( - 'start_option_group' => 'Judging Team', - 'components' => array('judgingteam'), - 'name' => 'Judging Team -- Name', - 'header' => 'Judging Team', - 'width' => 3.0, - 'table' => 'judges_teams.name' - ), - 'judgeteamnum' => array( - 'components' => array('judgingteam'), - 'name' => 'Judging Team -- Number', - 'header' => 'Team', - 'width' => 0.5, - 'table' => 'judges_teams.num' - ), - 'judgeteammembers_name' => array( - 'components' => array('judgingteam', 'judgingteammembers'), - 'name' => 'Judging Team -- Judge Name', - 'header' => 'Judge Name', - 'width' => 1.5, - 'table' => "CONCAT(judges.firstname, ' ', judges.lastname)" - ), - 'judgeteammembers' => array( - 'components' => array('judgingteam', 'judgingteammembers'), - 'name' => 'Judging Team -- Members (REQUIRES MySQL 5.0)', - 'header' => 'Team Members', - 'width' => 3.0, - 'table' => "GROUP_CONCAT(judges.firstname, ' ', judges.lastname ORDER BY judges.lastname SEPARATOR ', ')", - 'group_by' => array('award_awards.id', 'judges_teams.num') - ), - 'prize_name' => array( - 'start_option_group' => 'Prize Info (Duplicates award data for each prize, omits awards with no prizes)', - 'name' => 'Prize -- Name', - 'header' => 'Prize Name', - 'width' => 2, - 'table' => 'award_prizes.prize', - 'components' => array('prizes') - ), - 'prize_cash' => array( - 'name' => 'Prize -- Cash Amount', - 'header' => 'Cash', - 'width' => 0.5, - 'table' => 'award_prizes.cash', - 'components' => array('prizes') - ), - 'prize_cash_words' => array( - 'name' => 'Prize -- Cash Amount In Words', - 'header' => 'Cash', - 'width' => 0.5, - 'table' => 'award_prizes.cash', - 'components' => array('prizes'), - 'exec_function' => 'report_cash_words' - ), - 'prize_scholarship' => array( - 'name' => 'Prize -- Scholarship Amount', - 'header' => 'Scholarship', - 'width' => 0.75, - 'table' => 'award_prizes.scholarship', - 'components' => array('prizes') - ), - 'prize_value' => array( - 'name' => 'Prize -- Value Amount', - 'header' => 'Value', - 'width' => 0.5, - 'table' => 'award_prizes.value', - 'components' => array('prizes') - ), - - /* - * Don't have projectcategories and projectdivisions - * 'prize_fullname' => array( - * 'name' => 'Prize -- Name, Category, Division', - * 'header' => 'Prize Name', - * 'width' => 4, - * 'table' => "CONCAT(award_prizes.prize,' in ',projectcategories.category,' ', projectdivisions.division)", - * 'table_sort' => 'award_prizes.order', - * 'components' => array('prizes')), - */ - 'prize_trophy_any' => array( - 'name' => "Prize -- Trophy ('Yes' if the award has a trophy)", - 'header' => 'Trophy', - 'width' => 0.5, - 'table' => "IF ( award_prizes.trophystudentkeeper=1 - OR award_prizes.trophystudentreturn=1 - OR award_prizes.trophyschoolkeeper=1 - OR award_prizes.trophyschoolreturn=1, 'Yes', 'No')", - 'components' => array('prizes') - ), - 'prize_trophy_return' => array( - 'name' => "Prize -- Annual Trophy ('Yes' if the award has a school or student trophy that isn't a keeper)", - 'header' => 'Trophy', - 'width' => 0.5, - 'table' => "IF ( award_prizes.trophystudentreturn=1 - OR award_prizes.trophyschoolreturn=1, 'Yes', 'No')", - 'components' => array('prizes') - ), - 'prize_trophy_return_student' => array( - 'name' => "Prize -- Annual Student Trophy ('Yes' if the award has astudent trophy that isn't a keeper)", - 'header' => 'Ind.', - 'width' => 0.5, - 'table' => "IF ( award_prizes.trophystudentreturn=1, 'Yes', 'No')", - 'components' => array('prizes') - ), - 'prize_trophy_return_school' => array( - 'name' => "Prize -- Annual School Trophy ('Yes' if the award has a school trophy that isn't a keeper)", - 'header' => 'Sch.', - 'width' => 0.5, - 'table' => "IF ( award_prizes.trophyschoolreturn=1, 'Yes', 'No')", - 'components' => array('prizes') - ), - 'prize_all' => array( - 'name' => 'Prize -- Lists all prize data (name, cash, scholarship, value, trophies)', - 'header' => 'Prize', - 'width' => 2, - 'table' => "CONCAT( - IF(award_prizes.prize != '', CONCAT(award_prizes.prize,' -', ''),''), - IF(award_prizes.cash != '', CONCAT('\$',award_prizes.cash,' -'), ''), - IF(award_prizes.scholarship != '', CONCAT('\$',award_prizes.scholarship,' scholarship -'), ''), - IF(award_prizes.value != '', CONCAT('\$',award_prizes.value,' value -'), ''), - IF(award_prizes.trophystudentkeeper != '', CONCAT('Student Keeper Trophy -'), ''), - IF(award_prizes.trophystudentreturn != '', CONCAT('Student Annual-Return Trophy -'), ''), - IF(award_prizes.trophyschoolkeeper != '', CONCAT('School Keeper Trophy -'), ''), - IF(award_prizes.trophyschoolreturn != '', CONCAT('School Annual-Return Trophy -'), '') - )", - 'components' => array('prizes') - ), -); - -function report_awards_fromwhere($report, $components) -{ - global $config, $report_awards_fields; - - $fields = $report_awards_fields; - $year = $report['year']; - - $judges_join = ''; - $judges_where = ''; - if (in_array('judgingteam', $components)) { - $judges_join = 'LEFT JOIN judges_teams_awards_link ON judges_teams_awards_link.award_awards_id=award_awards.id - LEFT JOIN judges_teams ON judges_teams.id=judges_teams_awards_link.judges_teams_id'; - $judges_where = "AND judges_teams_awards_link.year='$year' - AND judges_teams.year='$year'"; - } - - $judges_members_join = ''; - $judges_members_where = ''; - if (in_array('judgingteammembers', $components)) { - $judges_members_join = 'LEFT JOIN judges_teams_link ON judges_teams_link.judges_teams_id=judges_teams.id - LEFT JOIN judges ON judges.id=judges_teams_link.judges_id'; - - $judges_members_where = "AND judges_teams_link.year='$year'"; - } - - $prizes_join = ''; - if (in_array('prizes', $components)) { - $prizes_join = 'LEFT JOIN award_prizes ON award_prizes.award_awards_id=award_awards.id'; - - /* - * Don't need a where filter, the prize is attached by unique ID to an award - * that is already from the correct year. - */ - } - - $q = " FROM award_awards - LEFT JOIN sponsors ON ( - sponsors.id=award_awards.sponsors_id) - LEFT JOIN award_types ON award_types.id=award_types_id - LEFT JOIN users_sponsor AS PRIMARYCONTACT ON ( - PRIMARYCONTACT.sponsors_id=sponsors.id - AND PRIMARYCONTACT.`primary`='yes') - LEFT JOIN users AS PRIMARYCONTACTUSER ON ( - PRIMARYCONTACT.users_id=PRIMARYCONTACTUSER.id) - $judges_join - $judges_members_join - $prizes_join - WHERE - award_awards.year='$year' - AND award_types.year='$year' - $judges_where - $judges_members_where - "; - - return $q; -} - -?> diff --git a/admin/reports_ceremony.php b/admin/reports_ceremony.php deleted file mode 100644 index 06ecd0c9..00000000 --- a/admin/reports_ceremony.php +++ /dev/null @@ -1,109 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'print_awards_ceremony_scripts'); -echo '
    '; -echo '
    '; -echo ''; - -echo ''; - -// list output formats -echo " -\t "; - -echo "\n"; -echo ''; -// list award subsets to output -echo ''; -echo "\n"; -echo ''; - -// list award formats to output -echo ' - "; - -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; - -echo ''; -echo '
    ' . i18n('Year') . ':'; - -// get the year information, use fairname since it should be there for all years[right?] -$results = $pdo->prepare("SELECT year FROM config WHERE var='fairname' AND year > 0 ORDER BY year DESC"); -$results->execute(); - -echo '
    - \t\t" . i18n('Type') . ": -\t -\t \t
    ' . i18n('Award Type') . ':
    - ' . i18n('Script Format') . ": - -
    ' . i18n('Show awards without winners') . ':
    ' . i18n('Show prizes without winners') . ':
    ' . i18n('Show criteria for each award') . ':
    ' . i18n('Show student name pronunciation') . ':
    ' . i18n('Group divisional results by Prize (instead of Award Name). This groups all the honourable mentions in all divisions together, all the bronzes together, etc.') . ':
    ' . i18n('Include the following age categories') . ':'; -$q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY id"); -$q->execute([$config['FAIRYEAR']]); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo "id}]\" type=\"checkbox\" checked=\"checked\" />"; - echo '' . i18n($r->category) . '
    '; -} - -echo '
    '; -echo ''; -echo '
    '; - -send_footer(); -?> diff --git a/admin/reports_committees.inc.php b/admin/reports_committees.inc.php deleted file mode 100644 index 0654e41f..00000000 --- a/admin/reports_committees.inc.php +++ /dev/null @@ -1,173 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -$report_committees_fields = array( - 'name' => array( - 'name' => 'Committee Member -- Full Name ', - 'header' => 'Name', - 'width' => 1.75, - 'table' => "CONCAT(users.firstname, ' ', users.lastname)", - 'table_sort' => 'users.lastname' - ), - 'last_name' => array( - 'name' => 'Committee Member -- Last Name', - 'header' => 'Last Name', - 'width' => 1.0, - 'table' => 'users.lastname' - ), - 'first_name' => array( - 'name' => 'Committee Member -- First Name', - 'header' => 'First Name', - 'width' => 1.0, - 'table' => 'users.firstname' - ), - 'email' => array( - 'name' => 'Committee Member -- Email', - 'header' => 'Email', - 'width' => 2.0, - 'table' => 'users.email' - ), - 'phone_home' => array( - 'name' => 'Committee Member -- Phone (Home)', - 'header' => 'Phone(Home)', - 'width' => 1, - 'table' => 'users.phonehome' - ), - 'phone_work' => array( - 'name' => 'Committee Member -- Phone (Work)', - 'header' => 'Phone(Work)', - 'width' => 1.25, - 'table' => 'users.phonework' - ), - 'phone_cel' => array( - 'name' => 'Committee Member -- Phone (Cel)', - 'header' => 'Phone(Cel)', - 'width' => 1, - 'table' => 'users.phonecell' - ), - 'address' => array( - 'name' => 'Committee Member -- Address Street', - 'header' => 'Address', - 'width' => 2.0, - 'table' => "CONCAT(users.address, ' ', users.address2)" - ), - 'city' => array( - 'name' => 'Committee Member -- Address City', - 'header' => 'City', - 'width' => 1.5, - 'table' => 'users.city' - ), - 'province' => array( - 'name' => 'Committee Member -- Address ' . $config['provincestate'], - 'header' => $config['provincestate'], - 'width' => 0.75, - 'table' => 'users.province' - ), - 'postal' => array( - 'name' => 'Committee Member -- Address ' . $config['postalzip'], - 'header' => $config['postalzip'], - 'width' => 0.75, - 'table' => 'users.postalcode' - ), - 'organization' => array( - 'name' => 'Committee Member -- Organization', - 'header' => 'Organization', - 'width' => 2, - 'table' => 'users.organization' - ), - 'committee' => array( - 'name' => 'Committee Member -- Committee Name', - 'header' => 'Committee', - 'width' => 2, - 'table' => 'committees.name' - ), - 'title' => array( - 'name' => 'Committee Member -- Title on Committee', - 'header' => 'Title', - 'width' => 2, - 'table' => 'committees_link.title' - ), - 'committeetitle' => array( - 'name' => 'Committee Member -- Committee and Title', - 'header' => 'Committee and Title', - 'width' => 2, - 'table' => "CONCAT(committees.name, ' - ', committees_link.title)" - ), - 'firstaid' => array( - 'name' => 'Committee Member -- First Aid Training', - 'header' => 'F.Aid', - 'width' => 0.5, - 'table' => 'users.firstaid', - 'value_map' => array('no' => 'no', 'yes' => 'YES') - ), - 'cpr' => array( - 'name' => 'Committee Member -- CPR Training', - 'header' => 'CPR', - 'width' => 0.5, - 'table' => 'users.cpr', - 'value_map' => array('no' => 'no', 'yes' => 'YES') - ), - 'static_text' => array( - 'name' => 'Static Text (useful for labels)', - 'header' => '', - 'width' => 0.1, - 'table' => "CONCAT(' ')" - ), -); - -function report_committees_fromwhere($report, $components) -{ - global $config, $report_committees_fields; - - $fields = $report_committees_fields; - $year = $report['year']; - - /* - * $teams_from = ''; - * $teams_where = ''; - * if(in_array('teams', $components)) { - * $teams_from = ",committees_teams_link, committees_teams"; - * $teams_where = "AND committees_teams_link.committees_id=users.id - * AND committees_teams_link.year='$year' - * AND committees_teams.id=committees_teams_link.committees_teams_id - * AND committees_teams.year='$year'"; - * } - */ - $q = "\tFROM - committees_link - JOIN committees ON committees_link.committees_id=committees.id - JOIN users - ON committees_link.users_uid=users.uid - LEFT OUTER JOIN users u2 - ON u2.uid=users.uid - AND u2.year>users.year - WHERE - users.types LIKE '%committee%' - AND u2.uid IS NULL - "; - - return $q; -} - -?> diff --git a/admin/reports_editor.php b/admin/reports_editor.php deleted file mode 100644 index 8b331176..00000000 --- a/admin/reports_editor.php +++ /dev/null @@ -1,665 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'x', 'Y' => 'y', 'W' => 'w', 'H' => 'h', 'Lines' => 'lines'); - -function field_selector($name, $id, $selected) -{ - global $fields; - $in_optgroup = false; - echo "'; -} - -function selector($name, $a, $selected, $onchange = '') -{ - echo "'; -} - -function parse_fields($f) -{ - global $locs; - $ret = array(); - if (!is_array(get_value_from_array($_POST, $f))) - return array(); - $x = 0; - foreach ($_POST[$f] as $o => $d) { - if (is_array($d)) { - $a = array(); - foreach ($d as $l => $v) { - /* Scrub the array data */ - $floatloc = array_values($locs); - if ($l == 'field' || $l == 'value') { - $v = stripslashes($v); - } else if (in_array($l, $floatloc)) { - $v = floatval($v); - if ($l == 'lines' && $v == 0) - $v = 1; - } else if ($l == 'face') { - $v = ($v == 'bold') ? 'bold' : ''; - } else if ($l == 'align') { - $aligns = array('left', 'right', 'center'); - if (!in_array($v, $aligns)) { - echo "Invalid alignment $v"; - exit; - } - } else if ($l == 'valign') { - $aligns = array('vtop', 'vbottom', 'vcenter', 'top', 'middle', 'bottom'); - if (!in_array($v, $aligns)) { - echo "Invalid valignment $v"; - exit; - } - } - $a[$l] = $v; - } - if (trim($a['field']) == '') - continue; - $ret[$x] = $a; - } else { - if (trim($d) == '') - continue; - $ret[$x]['field'] = stripslashes($d); - } - $x++; - } - return $ret; -} - -function parse_options($f) -{ - $ret = array(); - if (!is_array(get_value_from_array($_POST, $f))) - return array(); - foreach ($_POST[$f] as $c => $v) { - if (trim($c) == '') - continue; - $ret[$c] = stripslashes($v); - } - return $ret; -} - -/* Decode the report */ -$report = array(); -$report['id'] = intval(get_value_from_array($_POST, 'id', '')); -$report['name'] = stripslashes(get_value_from_array($_POST, 'name', '')); -$report['creator'] = stripslashes(get_value_from_array($_POST, 'creator', '')); -$report['desc'] = stripslashes(get_value_from_array($_POST, 'desc', '')); -$report['type'] = stripslashes(get_value_from_array($_POST, 'type', '')); -$report['col'] = parse_fields('col'); -$report['group'] = parse_fields('group'); -$report['sort'] = parse_fields('sort'); -$report['distinct'] = parse_fields('distinct'); -$report['option'] = parse_options('option'); -$report['filter'] = parse_fields('filter'); - -// print("
    ");print_r($_POST);print("
    "); -// print("
    ");print_r($report);print("
    "); - -$reloadaction = get_value_from_array($_POST, 'reloadaction', ''); -$loadaction = get_value_from_array($_POST, 'loadaction', ''); -$colaction = get_value_from_array($_POST, 'colaction', ''); -$repaction = get_value_from_array($_POST, 'repaction', ''); - -$repaction_save = $repaction; - -/* Sort out priorities */ -if ($reloadaction != '') { - $loadaction = ''; - $colaction = ''; - $repaction = ''; -} - -if ($loadaction != '') { - $id = intval($_POST['id']); - $report = report_load($id); - if ($id == 0) - $report['type'] = 'student'; - $colaction = ''; - $repaction = ''; -} - -if ($colaction != '') { - $repaction = ''; -} - -if ($repaction == 'try') { - /* Generate the report from what was passed through POST */ - report_gen($report); - exit; -} - -send_header('Reports Editor', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'report_management'); - -?> - -'; - $q = $pdo->prepare('SELECT system_report_id FROM reports WHERE 1 ORDER BY system_report_id DESC'); - $q->execute(); - $r = $q->fetch(PDO::FETCH_ASSOC); - $sid = $r['system_report_id'] + 1; - $n = $report['name']; - $c = $report['creator']; - $d = $report['desc']; - $t = $report['type']; - - echo "INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES\n"; - echo " ('', '$sid', '$n', '$d', '$c', '$t');\n"; - - echo 'INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES '; - - /* Do the options */ - $x = 0; - foreach ($report['option'] as $k => $v) { - echo "\n\t('', LAST_INSERT_ID(), 'option', $x, '$k', '" . $v . "', 0, 0, 0, 0, 0, '', ''),"; - $x++; - } - /* Do the fields */ - $fs = array('col', 'group', 'sort', 'distinct', 'filter'); - $first = true; - foreach ($fs as $f) { - foreach ($report[$f] as $x => $v) { - $k = $v['field']; - $vx = intval($v['x']); - $vy = intval($v['y']); - $vw = intval($v['w']); - $vh = intval($v['h']); - $vlines = intval($v['lines']); - if ($vlines == 0) - $vlines = 1; - $face = $v['face']; - $align = $v['align'] . ' ' . $v['valign']; - $value = stripslashes($v['value']); - if (!$first) - echo ','; - $first = false; - echo "\n\t('', LAST_INSERT_ID(), '$f', $x, '$k', '$value', $vx, $vy, $vw, $vh, $vlines, '$face', '$align')"; - } - } - echo ";\n"; - echo '
    '; -} - -/* ---- Setup ------ */ - -$n_columns = intval(get_value_from_array($_POST, 'ncolumns')); -$n = count($report['col']) + 1; -if ($n > $n_columns) - $n_columns = $n; -if ($colaction == 'add') - $n_columns += 3; - -$fieldvar = "report_{$report['type']}s_fields"; -if (isset($$fieldvar)) - $fields = $$fieldvar; - -echo '
    '; - -echo '
    '; -echo ''; -echo ''; -echo '
    '; -echo '
    '; - -echo '
    '; -echo ""; -echo ""; - -echo '

    Report Information

    '; -echo ''; -echo ''; -echo ""; -echo ''; -echo ''; -echo ""; -echo ''; -echo ''; -echo ""; -echo ''; -echo ''; -echo ''; -echo '
    Name:
    Created By:
    Description:
    Type: '; -selector('type', array('student' => 'Student Report', 'judge' => 'Judge Report', - 'award' => 'Award Report', 'committee' => 'Committee Member Report', - 'school' => 'School Report', 'volunteer' => 'Volunteer Report', - 'tour' => 'Tour Report', 'fair' => 'Feeder Fair Report', - 'fundraising' => 'Fundraising Report'), - $report['type'], - 'onChange="reportReload();"'); -echo ''; -echo '
    '; - -echo '

    Report Data

    '; -echo ''; -$x = 0; -// only go through the columns if there are columns to go through -if (count($report['col'])) { - foreach ($report['col'] as $o => $d) { - echo ''; - echo ''; - $x++; - $canvasLabels[] = $fields[$report['col'][$o]['field']]['name']; // ['field']; - } -} -for (; $x < $n_columns; $x++) { - echo ''; - echo ''; -} -echo ''; -echo ''; -echo "
    Column ' . ($x + 1) . ': '; - if (intval($x) != intval($o)) { - echo ('WARNING, out of order!'); - } - field_selector("col[$o][field]", "col$o", $d['field']); - echo '
    Column ' . ($x + 1) . ': '; - field_selector("col[$x][field]", "col$x", ''); - echo '
    '; -echo ''; -echo ''; -echo '
    \n"; - -$doCanvasSample = false; -$doCanvasSampletcpdf = false; -$l_w = get_value_from_2d_array($report_stock, get_value_from_2d_array($report, 'option', 'stock', ''), 'label_width'); -$l_h = get_value_from_2d_array($report_stock, get_value_from_2d_array($report, 'option', 'stock', ''), 'label_height'); - -if ($l_w && $l_h && $report['option']['type'] == 'label') { - echo '

    Label Data Locations

    '; - pdf_begin_page; - $doCanvasSample = true; - $ratio = $l_h / $l_w; - $canvaswidth = 600; - $canvasheight = round($canvaswidth * $ratio); - echo "
    "; - echo "
    \n"; - echo "\n"; -} - -if ($l_w && $l_h && $report['option']['type'] == 'tcpdf_label') { - echo '

    Label Data Locations - TCPDF

    '; - - $l_w *= 25.4; - $l_h *= 25.4; - $doCanvasSampletcpdf = true; - $ratio = $l_h / $l_w; - $canvaswidth = 600; - $canvasheight = round($canvaswidth * $ratio); - echo "
    "; - echo "
    \n"; - echo "\n"; -} - -echo ''; -$x = 0; - -if (get_value_from_2d_array($report, 'option', 'type') == 'label' || get_value_from_2d_array($report, 'option', 'type') == 'tcpdf_label') { - $fontlist = array('' => 'Default'); - $fl = PDF::getFontList(); - foreach ($fl as $f) - $fontlist[$f] = $f; - // print_r($fl); - - foreach ($report['col'] as $o => $d) { - $f = $d['field']; - echo ''; - echo ''; - echo ''; - } -} -echo "
    Loc ' . ($o + 1) . ': '; - $script = ''; - foreach ($locs as $k => $v) { - if ($k == 'Lines' && $report['option']['type'] != 'label') - continue; - echo "$k="; - $script .= "{$d[$v]},"; - } - - if ($report['option']['type'] == 'label') { - echo 'Face='; - selector("col[$x][face]", array('' => '', 'bold' => 'Bold'), $d['face']); - } - echo 'Align'; - selector("col[$x][align]", array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'), - $d['align']); - echo 'vAlign'; - if ($report['option']['type'] == 'label') { - selector("col[$x][valign]", array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'), - $d['valign']); - } else { - selector("col[$x][valign]", array('middle' => 'Middle', 'top' => 'Top', 'bottom' => 'Bottom'), - $d['valign']); - - echo 'Font='; - selector("col[$x][fontname]", $fontlist, $d['fontname']); - selector("col[$x][fontstyle]", array('' => '', 'bold' => 'Bold'), $d['fontstyle']); - echo ""; - echo 'pt '; - echo 'OnOverflow='; - selector("col[$x][on_overflow]", array('tuncate' => 'Truncate', '...' => 'Add ...', 'scale' => 'Scale'), $d['on_overflow']); - } - - if ($f == 'static_text') { - echo "
    Text="; - } else { - echo ""; - } - if ($doCanvasSample) - echo "\n"; - if ($doCanvasSampletcpdf) - echo "\n"; - - $x++; - } - for (; $x < $n_columns; $x++) { - echo '
    Loc ' . ($x + 1) . ': '; - foreach ($locs as $k => $v) { - if ($k == 'Lines' && $report['option']['type'] != 'label') - continue; - echo "$k="; - } - if ($report['option']['type'] == 'label') { - echo 'Face='; - selector("col[$x][face]", array('' => '', 'bold' => 'Bold'), ''); - } - - echo 'Align'; - selector("col[$x][align]", array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'), - 'center'); - echo 'vAlign'; - if ($report['option']['type'] == 'label') { - selector("col[$x][valign]", array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'), - 'top'); - } else { - selector("col[$x][valign]", array('middle' => 'Middle', 'top' => 'Top', 'bottom' => 'Bottom'), 'middle'); - - echo 'Font='; - selector("col[$x][fontname]", $fontlist, ''); - selector("col[$x][fontstyle]", array('' => '', 'bold' => 'Bold'), ''); - echo ""; - echo 'pt '; - echo 'OnOverflow='; - selector("col[$x][on_overflow]", array('Truncate' => 'truncate', 'Add ...' => '...', 'Scale' => 'scale'), ''); - } - echo ""; - echo '
    \n"; -echo '

    Grouping

    '; -for ($x = 0; $x < 3; $x++) { - echo 'Group By' . ($x + 1) . ': '; - $f = get_value_from_3d_array($report, 'group', $x, 'field'); - field_selector("group[$x]", "group$x", $f); - echo '
    '; -} -echo '

    Sorting

    '; -for ($x = 0; $x < 5; $x++) { - echo 'Sort By' . ($x + 1) . ': '; - $f = get_value_from_3d_array($report, 'sort', $x, 'field'); - field_selector("sort[$x]", "sort$x", $f); - echo '
    '; -} -echo '

    Distinct

    '; -echo 'Distinct Column: '; -$x = 0; -$f = get_value_from_3d_array($report, 'distinct', $x, 'field'); -field_selector("distinct[$x]", 'distinct0', $f); - -echo '

    Filtering

    '; -echo ''; -for ($x = 0; $x < 3; $x++) { - echo ''; -} -echo '
    Filter' . ($x + 1) . ':'; - field_selector("filter[$x][field]", "filter$x", get_value_from_3d_array($report, 'filter', $x, 'field')); - echo '
    '; - selector("filter[$x][x]", $filter_ops, get_value_from_3d_array($report, 'filter', $x, 'x')); - $v = get_value_from_3d_array($report, 'filter', $x, 'value'); - echo "Text="; - echo '
    '; - -echo '

    Options

    '; -foreach ($report_options as $ok => $o) { - echo "{$o['desc']}:
    \n"; -} - -echo '
    '; -if (get_value_from_array($report, 'system_report_id') != 0) { - echo notice(i18n("This is a system report, it cannot be changed or deleted. To save changes you have made to it, please select the 'Save as a new report' option.")); -} -echo ''; -echo ''; - -echo '
    '; - -send_footer(); -?> diff --git a/admin/reports_fairs.inc.php b/admin/reports_fairs.inc.php deleted file mode 100644 index 97cadbe7..00000000 --- a/admin/reports_fairs.inc.php +++ /dev/null @@ -1,474 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -$report_fairs_fields = array( - 'fair_name' => array( - 'name' => 'Fair -- Fair Name', - 'header' => 'Name', - 'width' => 1.5, - 'table' => 'fairs.name' - ), - 'fairstats_year' => array( - 'name' => 'Fair Stats -- Year', - 'header' => 'Year', - 'width' => 1, - 'table' => 'fairs_stats.year', - 'components' => array('fairs_stats') - ), - 'fairstats_year' => array( - 'name' => 'Fair Stats -- Year', - 'header' => 'Year', - 'width' => 1, - 'table' => 'fairs_stats.year', - 'components' => array('fairs_stats') - ), - 'fairstats_start_date' => array( - 'name' => 'Fair Stats -- Fair Start', - 'header' => 'Fair Start', - 'width' => 1, - 'table' => 'fairs_stats.start_date', - 'components' => array('fairs_stats') - ), - 'fairstats_end_date' => array( - 'name' => 'Fair Stats -- Fair End', - 'header' => 'Fair End', - 'width' => 1, - 'table' => 'fairs_stats.end_date', - 'components' => array('fairs_stats') - ), - 'fairstats_budget' => array( - 'name' => 'Fair Stats -- Budget', - 'header' => 'Budget', - 'width' => 1, - 'table' => 'fairs_stats.budget', - 'components' => array('fairs_stats') - ), - 'fairstats_address' => array( - 'name' => 'Fair Stats -- Fair Location', - 'header' => 'Fair Location', - 'width' => 1, - 'table' => 'fairs_stats.address', - 'components' => array('fairs_stats') - ), - 'fairstats_ysf_affiliation_complete' => array( - 'name' => 'Fair Stats -- YSC Affilitation Complete', - 'header' => 'YSC Affilitation Complete', - 'width' => 1, - 'table' => 'fairs_stats.ysf_affiliation_complete', - 'components' => array('fairs_stats') - ), - 'fairstats_charity' => array( - 'name' => 'Fair Stats -- Charity Number/Info', - 'header' => 'Charity Number/Info', - 'width' => 1, - 'table' => 'fairs_stats.charity', - 'components' => array('fairs_stats') - ), - 'fairstats_scholarships' => array( - 'name' => 'Fair Stats -- Scholarship Info', - 'header' => 'Scholarship Info', - 'width' => 1, - 'table' => 'fairs_stats.scholarships', - 'components' => array('fairs_stats') - ), - 'fairstats_male_1' => array( - 'name' => 'Fair Stats -- Males Grade 1-3', - 'header' => 'Males Grade 1-3', - 'width' => 1, - 'table' => 'fairs_stats.male_1', - 'components' => array('fairs_stats') - ), - 'fairstats_male_4' => array( - 'name' => 'Fair Stats -- Males Grade 4-6', - 'header' => 'Males Grade 4-6', - 'width' => 1, - 'table' => 'fairs_stats.male_4', - 'components' => array('fairs_stats') - ), - 'fairstats_male_7' => array( - 'name' => 'Fair Stats -- Males Grade 7-8', - 'header' => 'Males Grade 7-8', - 'width' => 1, - 'table' => 'fairs_stats.male_7', - 'components' => array('fairs_stats') - ), - 'fairstats_male_9' => array( - 'name' => 'Fair Stats -- Males Grade 9-10', - 'header' => 'Males Grade 9-10', - 'width' => 1, - 'table' => 'fairs_stats.male_9', - 'components' => array('fairs_stats') - ), - 'fairstats_male_11' => array( - 'name' => 'Fair Stats -- Males Grade 11-12', - 'header' => 'Males Grade 11-12', - 'width' => 1, - 'table' => 'fairs_stats.male_11', - 'components' => array('fairs_stats') - ), - 'fairstats_female_1' => array( - 'name' => 'Fair Stats -- Females Grade 1-3', - 'header' => 'Females Grade 1-3', - 'width' => 1, - 'table' => 'fairs_stats.female_1', - 'components' => array('fairs_stats') - ), - 'fairstats_female_4' => array( - 'name' => 'Fair Stats -- Females Grade 4-6', - 'header' => 'Females Grade 4-6', - 'width' => 1, - 'table' => 'fairs_stats.female_4', - 'components' => array('fairs_stats') - ), - 'fairstats_female_7' => array( - 'name' => 'Fair Stats -- Females Grade 7-8', - 'header' => 'Females Grade 7-8', - 'width' => 1, - 'table' => 'fairs_stats.female_7', - 'components' => array('fairs_stats') - ), - 'fairstats_female_9' => array( - 'name' => 'Fair Stats -- Females Grade 9-10', - 'header' => 'Females Grade 9-10', - 'width' => 1, - 'table' => 'fairs_stats.female_9', - 'components' => array('fairs_stats') - ), - 'fairstats_female_11' => array( - 'name' => 'Fair Stats -- Females Grade 11-12', - 'header' => 'Females Grade 11-12', - 'width' => 1, - 'table' => 'fairs_stats.female_11', - 'components' => array('fairs_stats') - ), - 'fairstats_projects_1' => array( - 'name' => 'Fair Stats -- Projects Grade 1-3', - 'header' => 'Projects Grade 1-3', - 'width' => 1, - 'table' => 'fairs_stats.projects_1', - 'components' => array('fairs_stats') - ), - 'fairstats_projects_4' => array( - 'name' => 'Fair Stats -- Projects Grade 4-6', - 'header' => 'Projects Grade 4-6', - 'width' => 1, - 'table' => 'fairs_stats.projects_4', - 'components' => array('fairs_stats') - ), - 'fairstats_projects_7' => array( - 'name' => 'Fair Stats -- Projects Grade 7-8', - 'header' => 'Projects Grade 7-8', - 'width' => 1, - 'table' => 'fairs_stats.projects_7', - 'components' => array('fairs_stats') - ), - 'fairstats_projects_9' => array( - 'name' => 'Fair Stats -- Projects Grade 9-10', - 'header' => 'Projects Grade 9-10', - 'width' => 1, - 'table' => 'fairs_stats.projects_9', - 'components' => array('fairs_stats') - ), - 'fairstats_projects_11' => array( - 'name' => 'Fair Stats -- Projects Grade 11-12', - 'header' => 'Projects Grade 11-12', - 'width' => 1, - 'table' => 'fairs_stats.projects_11', - 'components' => array('fairs_stats') - ), - 'fairstats_firstnations' => array( - 'name' => 'Fair Stats -- First Nations Students', - 'header' => 'First Nations Students', - 'width' => 1, - 'table' => 'fairs_stats.firstnations', - 'components' => array('fairs_stats') - ), - 'fairstats_students_atrisk' => array( - 'name' => 'Fair Stats -- Inner City Students', - 'header' => 'Inner City Students', - 'width' => 1, - 'table' => 'fairs_stats.students_atrisk', - 'components' => array('fairs_stats') - ), - 'fairstats_schools_atrisk' => array( - 'name' => 'Fair Stats -- Inner City Schools', - 'header' => 'Inner City Schools', - 'width' => 1, - 'table' => 'fairs_stats.schools_atrisk', - 'components' => array('fairs_stats') - ), - 'fairstats_students_total' => array( - 'name' => 'Fair Stats -- Total Participants', - 'header' => 'Total Participants', - 'width' => 1, - 'table' => 'fairs_stats.students_total', - 'components' => array('fairs_stats') - ), - 'fairstats_schools_total' => array( - 'name' => 'Fair Stats -- Total Schools', - 'header' => 'Total Schools', - 'width' => 1, - 'table' => 'fairs_stats.schools_total', - 'components' => array('fairs_stats') - ), - 'fairstats_schools_active' => array( - 'name' => 'Fair Stats -- Active Schools', - 'header' => 'Active Schools', - 'width' => 1, - 'table' => 'fairs_stats.schools_active', - 'components' => array('fairs_stats') - ), - 'fairstats_students_public' => array( - 'name' => 'Fair Stats -- Participants from Public', - 'header' => 'Participants from Public', - 'width' => 1, - 'table' => 'fairs_stats.students_public', - 'components' => array('fairs_stats') - ), - 'fairstats_schools_public' => array( - 'name' => 'Fair Stats -- Public Schools', - 'header' => 'Public Schools', - 'width' => 1, - 'table' => 'fairs_stats.schools_public', - 'components' => array('fairs_stats') - ), - 'fairstats_students_private' => array( - 'name' => 'Fair Stats -- Participants from Independent', - 'header' => 'Participants from Independent', - 'width' => 1, - 'table' => 'fairs_stats.students_private', - 'components' => array('fairs_stats') - ), - 'fairstats_schools_private' => array( - 'name' => 'Fair Stats -- Independent Schools', - 'header' => 'Independent Schools', - 'width' => 1, - 'table' => 'fairs_stats.schools_private', - 'components' => array('fairs_stats') - ), - 'fairstats_schools_districts' => array( - 'name' => 'Fair Stats -- School Districts', - 'header' => 'School Districts', - 'width' => 1, - 'table' => 'fairs_stats.schools_districts', - 'components' => array('fairs_stats') - ), - 'fairstats_studentsvisiting' => array( - 'name' => 'Fair Stats -- Students Visiting', - 'header' => 'Students Visiting', - 'width' => 1, - 'table' => 'fairs_stats.studentsvisiting', - 'components' => array('fairs_stats') - ), - 'fairstats_publicvisiting' => array( - 'name' => 'Fair Stats -- Public Guests Visting', - 'header' => 'Public Guests Visting', - 'width' => 1, - 'table' => 'fairs_stats.publicvisiting', - 'components' => array('fairs_stats') - ), - 'fairstats_teacherssupporting' => array( - 'name' => 'Fair Stats -- Teachers Supporting Projects', - 'header' => 'Teachers Supporting Projects', - 'width' => 1, - 'table' => 'fairs_stats.teacherssupporting', - 'components' => array('fairs_stats') - ), - 'fairstats_increasedinterest' => array( - 'name' => 'Fair Stats -- Students Increased Interest in Science', - 'header' => 'Students Increased Interest in Science', - 'width' => 1, - 'table' => 'fairs_stats.increasedinterest', - 'components' => array('fairs_stats') - ), - 'fairstats_consideringcareer' => array( - 'name' => 'Fair Stats -- Students Considering Career in Science', - 'header' => 'Students Considering Career in Science', - 'width' => 1, - 'table' => 'fairs_stats.consideringcareer', - 'components' => array('fairs_stats') - ), - 'fairstats_committee_members' => array( - 'name' => 'Fair Stats -- Committee Members', - 'header' => 'Committee Members', - 'width' => 1, - 'table' => 'fairs_stats.committee_members', - 'components' => array('fairs_stats') - ), - 'fairstats_judges' => array( - 'name' => 'Fair Stats -- Judges', - 'header' => 'Judges', - 'width' => 1, - 'table' => 'fairs_stats.judges', - 'components' => array('fairs_stats') - ), - 'fairstats_next_chair_name' => array( - 'name' => 'Fair Stats -- Regional Chairperson Name', - 'header' => 'Regional Chairperson Name', - 'width' => 1, - 'table' => 'fairs_stats.next_chair_name', - 'components' => array('fairs_stats') - ), - 'fairstats_next_chair_email' => array( - 'name' => 'Fair Stats -- Email', - 'header' => 'Email', - 'width' => 1, - 'table' => 'fairs_stats.next_chair_email', - 'components' => array('fairs_stats') - ), - 'fairstats_next_chair_hphone' => array( - 'name' => 'Fair Stats -- Home Phone', - 'header' => 'Home Phone', - 'width' => 1, - 'table' => 'fairs_stats.next_chair_hphone', - 'components' => array('fairs_stats') - ), - 'fairstats_next_chair_bphone' => array( - 'name' => 'Fair Stats -- Business Phone', - 'header' => 'Business Phone', - 'width' => 1, - 'table' => 'fairs_stats.next_chair_bphone', - 'components' => array('fairs_stats') - ), - 'fairstats_next_chair_fax' => array( - 'name' => 'Fair Stats -- Fax', - 'header' => 'Fax', - 'width' => 1, - 'table' => 'fairs_stats.next_chair_fax', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate1' => array( - 'name' => 'Fair Stats -- Delegate 1', - 'header' => 'Delegate 1', - 'width' => 1, - 'table' => 'fairs_stats.delegate1', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate2' => array( - 'name' => 'Fair Stats -- Delegate 2', - 'header' => 'Delegate 2', - 'width' => 1, - 'table' => 'fairs_stats.delegate2', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate3' => array( - 'name' => 'Fair Stats -- Delegate 3', - 'header' => 'Delegate 3', - 'width' => 1, - 'table' => 'fairs_stats.delegate3', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate4' => array( - 'name' => 'Fair Stats -- Delegate 4', - 'header' => 'Delegate 4', - 'width' => 1, - 'table' => 'fairs_stats.delegate4', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate1_email' => array( - 'name' => 'Fair Stats -- Delegate 1 Email', - 'header' => 'Delegate 1 Email', - 'width' => 1, - 'table' => 'fairs_stats.delegate1_email', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate2_email' => array( - 'name' => 'Fair Stats -- Delegate 2 Email', - 'header' => 'Delegate 2 Email', - 'width' => 1, - 'table' => 'fairs_stats.delegate2_email', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate3_email' => array( - 'name' => 'Fair Stats -- Delegate 3 Email', - 'header' => 'Delegate 3 Email', - 'width' => 1, - 'table' => 'fairs_stats.delegate3_email', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate4_email' => array( - 'name' => 'Fair Stats -- Delegate 4 Email', - 'header' => 'Delegate 4 Email', - 'width' => 1, - 'table' => 'fairs_stats.delegate4_email', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate1_size' => array( - 'name' => 'Fair Stats -- Delegate 1 Jacket Size', - 'header' => 'Delegate 1 Jacket Size', - 'width' => 1, - 'table' => 'fairs_stats.delegate1_size', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate2_size' => array( - 'name' => 'Fair Stats -- Delegate 2 Jacket Size', - 'header' => 'Delegate 2 Jacket Size', - 'width' => 1, - 'table' => 'fairs_stats.delegate2_size', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate3_size' => array( - 'name' => 'Fair Stats -- Delegate 3 Jacket Size', - 'header' => 'Delegate 3 Jacket Size', - 'width' => 1, - 'table' => 'fairs_stats.delegate3_size', - 'components' => array('fairs_stats') - ), - 'fairstats_delegate4_size' => array( - 'name' => 'Fair Stats -- Delegate 4 Jacket Size', - 'header' => 'Delegate 4 Jacket Size', - 'width' => 1, - 'table' => 'fairs_stats.delegate4_size', - 'components' => array('fairs_stats') - ), - 'static_text' => array( - 'name' => 'Static Text (useful for labels)', - 'header' => '', - 'width' => 0.1, - 'table' => "CONCAT(' ')" - ), -); - -function report_fairs_fromwhere($report, $components) -{ - global $config, $report_fairs_fields; - - $fields = $report_fairs_fields; - $year = $report['year']; - - if (in_array('fairs_stats', $components)) { - $fs_from = 'LEFT JOIN fairs_stats ON fairs_stats.fairs_id=fairs.id'; - $fs_where = "fairs_stats.year='$year'"; - } - - $q = " FROM \tfairs - $fs_from - WHERE - 1 AND - $fs_where - "; - - return $q; -} - -?> diff --git a/admin/reports_fundraising.inc.php b/admin/reports_fundraising.inc.php deleted file mode 100644 index 1408672f..00000000 --- a/admin/reports_fundraising.inc.php +++ /dev/null @@ -1,206 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Take the language array in users_fundraising, unserialize it, and join it - * with a space - */ -function report_fundraisings_languages($report, $field, $text) -{ - $l = unserialize($text); - return join(' ', $l); -} - -/* Components: */ - -/* - * Yes, fundraisings, the generator takes the report type (also the user.type in many cases) and - * just adds an 's' to find the fields and the functions. - */ -$report_fundraisings_fields = array( - 'fundraising_campaigns_id' => array( - 'start_option_group' => 'Campaign ID', - 'name' => 'Fundraising Campaign numerical ID', - 'header' => 'ID', - 'width' => 0.25, - 'table' => 'fundraising_campaigns.id' - ), - 'salutation' => array( - 'start_option_group' => 'Contact Information', - 'name' => 'Contact -- Salutation (Mr., Mrs., etc.)', - 'header' => 'Sal', - 'width' => 0.5, - 'table' => 'users.salutation', - 'components' => array('users') - ), - 'namefl' => array( - 'name' => 'Contact -- Full Name (first last)', - 'header' => 'Name', - 'width' => 1.75, - 'table' => "CONCAT(users.firstname, ' ', users.lastname)", - 'table_sort' => 'users.lastname', - 'components' => array('users') - ), - 'email' => array( - 'name' => 'Contact -- Email', - 'header' => 'Email', - 'width' => 2.0, - 'table' => 'users.email', - 'components' => array('users') - ), - 'phone_home' => array( - 'name' => 'Contact -- Phone (Home)', - 'header' => 'Phone(Home)', - 'width' => 1, - 'table' => 'users.phonehome', - 'components' => array('users') - ), - 'phone_work' => array( - 'name' => 'Contact -- Phone (Work)', - 'header' => 'Phone(Work)', - 'width' => 1.25, - 'table' => 'users.phonework', - 'components' => array('users') - ), - 'organization' => array( - 'name' => 'Contact -- Organization', - 'header' => 'Organization', - 'width' => 2, - 'table' => 'users.organization', - 'components' => array('users') - ), - 'position' => array( - 'name' => 'Contact -- Position', - 'header' => 'Position', - 'width' => 2, - 'table' => 'users_sponsor.position', - 'components' => array('users') - ), - 'address' => array( - 'start_option_group' => 'Contact Address', - 'name' => 'Contact Address -- Street', - 'header' => 'Address', - 'width' => 2.0, - 'table' => "CONCAT(users.address, ' ', users.address2)", - 'components' => array('users') - ), - 'city' => array( - 'name' => 'Contact Address -- City', - 'header' => 'City', - 'width' => 1.5, - 'table' => 'users.city', - 'components' => array('users') - ), - 'province' => array( - 'name' => 'Contact Address -- ' . $config['provincestate'], - 'header' => $config['provincestate'], - 'width' => 0.75, - 'table' => 'users.province', - 'components' => array('users') - ), - 'postal' => array( - 'name' => 'Contact Address -- ' . $config['postalzip'], - 'header' => $config['postalzip'], - 'width' => 0.75, - 'table' => 'users.postalcode', - 'components' => array('users') - ), - 'city_prov' => array( - 'name' => 'Contact Address -- City, ' . $config['provincestate'] . ' (for mailing)', - 'header' => 'City', - 'width' => 1.5, - 'table' => "CONCAT(users.city, ', ', users.province)", - 'components' => array('users') - ), - 'year' => array( - 'start_option_group' => 'Miscellaneous', - 'name' => 'Contact -- Year', - 'header' => 'Year', - 'width' => 0.5, - 'table' => 'users.year', - 'components' => array('users') - ), - 'user_filter' => array( - 'name' => 'User Filter by MAX(year)', - 'header' => '', - 'width' => 0.1, - 'table' => 'MAX(users.year)', - 'group_by' => array('users.uid'), - 'components' => array('users') - ), - 'static_text' => array( - 'name' => 'Static Text (useful for labels)', - 'header' => '', - 'width' => 0.1, - 'table' => "CONCAT(' ')" - ), -); - -function report_fundraisings_fromwhere($report, $components) -{ - global $config, $report_fundraisings_fields; - - $fields = $report_fundraisings_fields; - $year = $report['year']; - - if (in_array('users', $components)) { - $users_from = 'LEFT JOIN fundraising_campaigns_users_link ON fundraising_campaigns.id=fundraising_campaigns_users_link.fundraising_campaigns_id - LEFT JOIN users ON users.uid=fundraising_campaigns_users_link.users_uid - LEFT JOIN users_sponsor ON users_sponsor.users_id=users.id'; - $users_where = "users.deleted!='yes' AND"; - } - - /* - * $teams_from = ''; - * $teams_where = ''; - * if(in_array('teams', $components)) { - * $teams_from = "LEFT JOIN fundraisings_teams_link ON judges_teams_link.users_id=users.id - * LEFT JOIN fundraisings_teams ON judges_teams.id=judges_teams_link.judges_teams_id"; - * $teams_where = "AND fundraisings_teams_link.year='$year' - * AND fundraisings_teams.year='$year'"; - * } - * - * $projects_from=''; - * $projects_where=''; - * if(in_array('projects', $components)) { - * $projects_from = "LEFT JOIN fundraisings_teams_timeslots_projects_link ON - * fundraisings_teams_timeslots_projects_link.judges_teams_id=judges_teams.id - * LEFT JOIN projects ON projects.id=fundraisings_teams_timeslots_projects_link.projects_id - * LEFT JOIN fundraisings_timeslots ON judges_timeslots.id=judges_teams_timeslots_projects_link.judges_timeslots_id"; - * $projects_where = "AND fundraisings_teams_timeslots_projects_link.year='$year' - * AND projects.year='$year'"; - * } - */ - - $q = " FROM \tfundraising_campaigns - $users_from - WHERE - $users_where - 1 - "; - - return $q; -} - -?> diff --git a/admin/reports_gen.php b/admin/reports_gen.php deleted file mode 100644 index 51fbf010..00000000 --- a/admin/reports_gen.php +++ /dev/null @@ -1,280 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT id FROM reports WHERE system_report_id=?"); - $q->execute([$sid]); - $r = $q->fetch(PDO::FETCH_OBJ); - $id = $r['id']; -} - -$report = report_load($id); -/* Add a custom filter if specified */ -$filter_args = ''; -if (is_array($_GET['filter'])) { - foreach ($_GET['filter'] as $f => $v) { - $report['filter'][] = array('field' => $v['field'], 'x' => $v['x'], 'value' => $v['value']); - $filter_args .= "&filter[$f][field]={$v['field']}&filter[$f][x]={$v['x']}&filter[$f][value]={$v['value']}"; - } -} - -switch ($_GET['action']) { - case 'dialog_gen': - if ($id < 0) { - $u = "{$config['SFIABDIRECTORY']}/{$report_custom[-$id]['custom_url']}"; - ?> - - - - - 'committee_main.php', - 'My Reports' => 'admin/reports.php' -)); - -echo '
    '; -echo ""; - -echo ''; -echo ''; -echo ""; -echo ''; -echo ""; -echo ''; -echo ""; - -echo ''; -/* See if the report is in this committee member's list */ -$q = $pdo->prepare("SELECT * FROM reports_committee - \t\t\tWHERE users_id=? - AND reports_id=?"); -$q->execute([$_SESSION['users_uid'],$report['id']]); -echo ''; -if ($q->rowCount() > 0) { - /* Yes, it is */ - $i = $q->fetch(PDO::FETCH_OBJ); - echo ''; - echo ""; - echo ''; - echo ""; -} else { - echo ''; -} -echo ''; -echo ''; - -$format = $report['options']['type']; -$stock = $report['options']['stock']; -$year = $config['FAIRYEAR']; - -/* Out of all the report optoins, we really only want these ones */ -$option_keys = array('type', 'stock'); -foreach ($report_options as $ok => $o) { - if (!in_array($ok, $option_keys)) - continue; - echo ""; - echo "'; -} -/* Find all the years */ -$q = $pdo->prepare('SELECT DISTINCT year FROM config WHERE year>1000 ORDER BY year DESC'); -$q->execute(); -echo ''; -echo ''; - -echo '
    ' . i18n('Report Name') . ':{$report['name']}
    ' . i18n('Description') . ':{$report['desc']}
    ' . i18n('Created By') . ':{$report['creator']}

    ' . i18n('My Reports Info') . '

    ' . i18n('Category') . ':{$i->category}
    ' . i18n('Comment') . ':{$i->comment}
    ' . i18n("This report is NOT in your 'My Reports' list.") . '

    ' . i18n('Report Options') . '

    {$o['desc']}:
    ' . i18n('Year') . ':
    '; - -echo '
    '; -echo ''; -echo '
    '; - -send_footer(); - -?> diff --git a/admin/reports_judges.inc.php b/admin/reports_judges.inc.php deleted file mode 100644 index 77826b62..00000000 --- a/admin/reports_judges.inc.php +++ /dev/null @@ -1,1097 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -require_once ('../questions.inc.php'); - -/* - * Take the language array in users_judge, unserialize it, and join it - * with a space - */ -function report_judges_languages($report, $field, $text) -{ - $l = unserialize($text); - return ($l ? join(' ', $l) : ''); -} - -/* - * It's possible to get through this code and need to have access to more - * than one year, so we're going to index this array by year first - */ -$report_judges_divs = array(); -$report_judges_cats = array(); - -function report_judges_load_divs($year) -{ - global $report_judges_divs; - global $pdo; - /* Load divisions for this year, only once */ - if (!array_key_exists($year, $report_judges_divs)) { - $report_judges_divs[$year] = array(); - $q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=?"); - $q->execute([$year]); - while (($d = $q->fetch(PDO::FETCH_ASSOC))) { - $report_judges_divs[$year][$d['id']] = $d; - } - } -} - -function report_judges_load_cats($year) -{ - global $report_judges_cats; - global $pdo; - if (!array_key_exists($year, $report_judges_cats)) { - $q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=?"); - $q->execute([$year]); - while (($c = $q->fetch(PDO::FETCH_ASSOC))) { - $report_judges_cats[$year][$c['id']] = $c; - } - } -} - -/* Return all divisions rated at expertise level x */ -function report_judges_divs_at_exp($report, $field, $text) -{ - global $report_judges_divs; - - /* field is divs_at_exp_x[_long] */ - $exp = substr($field, 12, 1); - $long = (strlen($field) == 13) ? false : true; - - /* Text is users_judge.div_prefs */ - $year = $report['year']; - $divprefs = unserialize($text); - if (!is_array($divprefs)) - return ''; - - report_judges_load_divs($year); - - /* Find all the requested selections, and add them to the return */ - $ret = array(); - $retl = array(); - foreach ($divprefs as $div_id => $sel) { - if ($sel != $exp) - continue; - $ret[] = $report_judges_divs[$year][$div_id]['division_shortform']; - $retl[] = $report_judges_divs[$year][$div_id]['division']; - } - /* Join it all together with spaces */ - if ($long == false) - return join(' ', $ret); - return join(', ', $retl); -} - -function report_judges_cats_at_pref($report, $field, $text) -{ - global $report_judges_cats; - $prefs = array('H' => 2, 'h' => 1, 'i' => 0, 'l' => -1, 'L' => -2); - - /* field is cats_at_pref_x[_long] */ - $pref = $prefs[substr($field, 13, 1)]; - $long = (strlen($field) == 14) ? false : true; - - /* Text is users_judge.cat_prefs */ - $year = $report['year']; - $catprefs = unserialize($text); - if (!is_array($catprefs)) - return ''; - - report_judges_load_cats($year); - - /* Find all 2-highest selections, and add them to the return */ - $ret = array(); - $retl = array(); - foreach ($catprefs as $cat_id => $sel) { - if ($sel != $pref) - continue; - $ret[] = $report_judges_cats[$year][$cat_id]['category_shortform']; - $retl[] = $report_judges_cats[$year][$cat_id]['category']; - } - /* Join it all together with spaces */ - if ($long == false) - return join(' ', $ret); - return join(', ', $retl); -} - -function report_judges_custom_question($report, $field, $text) -{ - global $pdo; - /* Field is 'question_x', users_id is passed in $text */ - $q_ord = substr($field, 9); - $year = $report['year']; - $users_id = $text; - - /* Find the actual question ID */ - $q = $pdo->prepare("SELECT * FROM questions WHERE year=? AND ord=?"); - $q->execute([$year,$q_ord]); - if ($q->rowCount() != 1) - return 'Question not specified'; - $question = $q->fetch(PDO::FETCH_ASSOC); - - $q = $pdo->prepare("SELECT * FROM question_answers WHERE users_id=? AND questions_id=?"); - $q->execute([$users_id,$question['id']]); - if ($q->rowCount() != 1) - return ''; - $answer = $q->fetch(PDO::FETCH_ASSOC); - return $answer['answer']; -} - -function report_judges_div_exp($report, $field, $text) -{ - /* Field is 'div_exp_x', users_id is passed in $text */ - $div_id = substr($field, 8); - $year = $report['year']; - $users_id = $text; - - $divprefs = unserialize($text); - if (!is_array($divprefs)) - return ''; - - return $divprefs[$div_id]; -} - -function report_judges_cat_pref($report, $field, $text) -{ - $prefs = array(-2 => 'Lowest', -1 => 'Low', - 0 => '--', - '1' => 'High', 2 => 'Highest'); - /* Field is 'div_pref_x', users_id is passed in $text */ - $cat_id = substr($field, 9); - $year = $report['year']; - $users_id = $text; - - $catprefs = unserialize($text); - if (!is_array($catprefs)) - return ''; - - return i18n($prefs[$catprefs[$cat_id]]); -} - -function report_judges_team_members($report, $field, $text) -{ - global $pdo; - $year = $report['year']; - $judges_teams_id = $text; - $q = $pdo->prepare("SELECT * FROM judges_teams_link - LEFT JOIN users ON judges_teams_link.users_id=users.id - WHERE judges_teams_link.year=? - AND judges_teams_link.judges_teams_id=?"); - $q->execute([$year,$judges_teams_id]); - $ret = ''; - while (($m = $q->fetch(PDO::FETCH_ASSOC))) { - $add = false; - switch ($field) { - case 'team_captain': - if ($m['captain'] == 'yes') - $add = true; - break; - - case 'team_members_all_except_this': - /* Not implemented, need to pass teams_id AND users_id in here */ - break; - - case 'team_members_all_except_captain': - if ($m['captain'] == 'no') - $add = true; - break; - - case 'team_members_all': - $add = true; - break; - } - - if ($add) { - if ($ret != '') - $ret .= ', '; - $ret .= "{$m['firstname']} {$m['lastname']}"; - } - } - return $ret; -} - -// $round_special_awards = array(); -$report_judges_rounds = array(); - -function report_judges_load_rounds($year) -{ - global $pdo; - global $config, $report_judges_rounds; - if (count($report_judges_rounds)) - return; - - $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE round_id='0' AND `year`=?"); - $q->execute([$year]); - /* Loads judges_timeslots.id, .starttime, .endtime, .date, .name */ - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $report_judges_rounds[] = $r; - - if ($r['type'] == 'divisional1') - $report_judges_rounds['divisional1'] = $r; - if ($r['type'] == 'divisional2') - $report_judges_rounds['divisional2'] = $r; - } - // if($r['type'] == 'special') $round_special_awards[] = $r; -} - -function report_judges_specialaward($report, $field, $text) -{ - global $config, $report_judges_rounds, $pdo; - $year = $report['year']; - $award_id = $text; - $q = $pdo->prepare("SELECT * FROM award_awards WHERE id=?"); - $q->execute([intval($award_id)]); - $r = $q->fetch(PDO::FETCH_OBJ); - return $r->name; -} - -function report_judges_time_availability($report, $field, $text) -{ - global $config, $report_judges_rounds, $pdo; - $year = $report['year']; - $users_id = $text; - - report_judges_load_rounds($year); - - switch ($field) { - case 'available_in_divisional1': - $round = $report_judges_rounds['divisional1']; - break; - case 'available_in_divisional2': - $round = $report_judges_rounds['divisional2']; - break; - default: - echo 'Not implemented.'; - exit; - } - - $q = $pdo->prepare("SELECT * FROM judges_availability WHERE users_id=?"); - $q->execute([$users_id]); - // echo mysql_error(); - while (($r = $q->fetch(PDO::FETCH_ASSOC))) { - if ($r['start'] <= $round['starttime'] && - $r['end'] >= $round['endtime'] && - $r['date'] == $round['date']) { - return 'Yes'; - } - } - return 'No'; -} - -/* Components: languages, teams */ - -$report_judges_fields = array( - 'last_name' => array( - 'name' => 'Judge -- Last Name', - 'header' => 'Last Name', - 'width' => 1.0, - 'table' => 'users.lastname' - ), - 'first_name' => array( - 'name' => 'Judge -- First Name', - 'header' => 'First Name', - 'width' => 1.0, - 'table' => 'users.firstname' - ), - 'name' => array( - 'name' => 'Judge -- Full Name (last, first)', - 'header' => 'Name', - 'width' => 1.75, - 'table' => "CONCAT(users.lastname, ', ', users.firstname)", - 'table_sort' => 'users.lastname' - ), - 'namefl' => array( - 'name' => 'Judge -- Full Name (first last)', - 'header' => 'Name', - 'width' => 1.75, - 'table' => "CONCAT(users.firstname, ' ', users.lastname)", - 'table_sort' => 'users.lastname' - ), - 'email' => array( - 'name' => 'Judge -- Email', - 'header' => 'Email', - 'width' => 2.0, - 'table' => 'users.email' - ), - 'address' => array( - 'name' => 'Judge -- Address Street', - 'header' => 'Address', - 'width' => 2.0, - 'table' => "CONCAT(users.address, ' ', users.address2)" - ), - 'city' => array( - 'name' => 'Judge -- Address City', - 'header' => 'City', - 'width' => 1.5, - 'table' => 'users.city' - ), - 'province' => array( - 'name' => 'Judge -- Address ' . $config['provincestate'], - 'header' => $config['provincestate'], - 'width' => 0.75, - 'table' => 'users.province' - ), - 'postal' => array( - 'name' => 'Judge -- Address ' . $config['postalzip'], - 'header' => $config['postalzip'], - 'width' => 0.75, - 'table' => 'users.postalcode' - ), - 'phone_home' => array( - 'name' => 'Judge -- Phone (Home)', - 'header' => 'Phone(Home)', - 'width' => 1, - 'table' => 'users.phonehome' - ), - 'phone_work' => array( - 'name' => 'Judge -- Phone (Work)', - 'header' => 'Phone(Work)', - 'width' => 1.25, - 'table' => 'users.phonework' - ), - 'organization' => array( - 'name' => 'Judge -- Organization', - 'header' => 'Organization', - 'width' => 2, - 'table' => 'users.organization' - ), - 'languages' => array( - 'name' => 'Judge -- Languages', - 'header' => 'Lang', - 'width' => 0.75, - 'table' => 'users_judge.languages', - 'exec_function' => 'report_judges_languages', - 'components' => array('users_judge') - ), - 'complete' => array( - 'name' => 'Judge -- Registration Complete', - 'header' => 'Cmpl', - 'width' => 0.4, - 'table' => 'users_judge.judge_complete', - 'value_map' => array('no' => 'No', 'yes' => 'Yes'), - 'components' => array('users_judge') - ), - 'active' => array( - 'name' => 'Judge -- Registration Active for this year', - 'header' => 'Act', - 'width' => 0.4, - 'table' => 'users_judge.judge_active', - 'value_map' => array('no' => 'No', 'yes' => 'Yes'), - 'components' => array('users_judge') - ), - 'willing_chair' => array( - 'name' => 'Judge -- Willing Chair', - 'header' => 'Will Chair?', - 'width' => 1, - 'table' => 'users_judge.willing_chair', - 'value_map' => array('no' => 'No', 'yes' => 'Yes'), - 'components' => array('users_judge') - ), - 'years_school' => array( - 'name' => 'Judge -- Years of Experience at School level', - 'header' => 'Sch', - 'width' => 0.5, - 'table' => 'users_judge.years_school', - 'components' => array('users_judge') - ), - 'years_regional' => array( - 'name' => 'Judge -- Years of Experience at Regional level', - 'header' => 'Rgn', - 'width' => 0.5, - 'table' => 'users_judge.years_regional', - 'components' => array('users_judge') - ), - 'years_national' => array( - 'name' => 'Judge -- Years of Experience at National level', - 'header' => 'Ntl', - 'width' => 0.5, - 'table' => 'users_judge.years_national', - 'components' => array('users_judge') - ), - 'highest_psd' => array( - 'name' => 'Judge -- Highest Post-Secondary Degree', - 'header' => 'Highest PSD', - 'width' => 1.25, - 'table' => 'users_judge.highest_psd', - 'components' => array('users_judge') - ), - /* Headers for Division Expertise/Preference Selection */ - 'divs_at_exp_5' => array( - 'name' => 'Judge -- Divisions Selected as Expertise 5-Expert (Shortform)', - 'header' => 'Expert Div', - 'width' => 1, - 'table' => 'users_judge.div_prefs', - 'exec_function' => 'report_judges_divs_at_exp', - 'components' => array('users_judge') - ), - 'divs_at_exp_5_long' => array( - 'name' => 'Judge -- Divisions Selected as Expertise 5-Expert (Full division names)', - 'header' => 'Expert Div', - 'width' => 1.5, - 'table' => 'users_judge.div_prefs', - 'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */ - 'components' => array('users_judge') - ), - 'divs_at_exp_4' => array( - 'name' => 'Judge -- Divisions Selected as Expertise 4 (Shortform)', - 'header' => '4 Div', - 'width' => 1, - 'table' => 'users_judge.div_prefs', - 'exec_function' => 'report_judges_divs_at_exp', - 'components' => array('users_judge') - ), - 'divs_at_exp_4_long' => array( - 'name' => 'Judge -- Divisions Selected as Expertise 4 (Full division names)', - 'header' => '4 Div', - 'width' => 1.5, - 'table' => 'users_judge.div_prefs', - 'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */ - 'components' => array('users_judge') - ), - 'divs_at_exp_3' => array( - 'name' => 'Judge -- Divisions Selected as Expertise 3 (Shortform)', - 'header' => '3 Div', - 'width' => 1, - 'table' => 'users_judge.div_prefs', - 'exec_function' => 'report_judges_divs_at_exp', - 'components' => array('users_judge') - ), - 'divs_at_exp_3_long' => array( - 'name' => 'Judge -- Divisions Selected as Expertise 3 (Full division names)', - 'header' => '3 Div', - 'width' => 1.5, - 'table' => 'users_judge.div_prefs', - 'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */ - 'components' => array('users_judge') - ), - 'other_exp' => array( - 'name' => 'Judge -- Other Expertise', - 'header' => 'Expertise Other', - 'width' => 2, - 'table' => 'users_judge.expertise_other', - 'components' => array('users_judge') - ), - /* Fill these in below, they're all the same */ - 'div_exp_1' => array(), - 'div_exp_2' => array(), - 'div_exp_3' => array(), - 'div_exp_4' => array(), - 'div_exp_5' => array(), - 'div_exp_6' => array(), - 'div_exp_7' => array(), - 'div_exp_8' => array(), - 'div_exp_9' => array(), - 'div_exp_10' => array(), - 'div_exp_11' => array(), - 'div_exp_12' => array(), - 'div_exp_13' => array(), - 'div_exp_14' => array(), - 'div_exp_15' => array(), - 'div_exp_16' => array(), - 'div_exp_17' => array(), - 'div_exp_18' => array(), - 'div_exp_19' => array(), - 'div_exp_20' => array(), - 'div_exp_21' => array(), - 'div_exp_22' => array(), - 'div_exp_23' => array(), - 'div_exp_24' => array(), - 'div_exp_25' => array(), - 'div_exp_26' => array(), - 'div_exp_27' => array(), - 'div_exp_28' => array(), - 'div_exp_29' => array(), - 'div_exp_30' => array(), - 'div_exp_31' => array(), - 'div_exp_32' => array(), - 'div_exp_33' => array(), - 'div_exp_34' => array(), - 'div_exp_35' => array(), - 'div_exp_36' => array(), - 'div_exp_37' => array(), - 'div_exp_38' => array(), - 'div_exp_39' => array(), - 'div_exp_40' => array(), - 'div_exp_41' => array(), - 'div_exp_42' => array(), - 'div_exp_43' => array(), - 'div_exp_44' => array(), - 'div_exp_45' => array(), - 'div_exp_46' => array(), - 'div_exp_47' => array(), - 'div_exp_48' => array(), - 'div_exp_49' => array(), - 'div_exp_50' => array(), - /* Category preferences */ - 'cats_at_pref_H' => array( - 'name' => 'Judge -- Age Categories Selected as Preference: Highest (Shortform)', - 'header' => 'Highest', - 'width' => 0.8, - 'table' => 'users_judge.cat_prefs', - 'exec_function' => 'report_judges_cats_at_pref', - 'components' => array('users_judge') - ), - 'cats_at_pref_H_long' => array( - 'name' => 'Judge -- Age Categories Selected as Preference: Highest (Full category names)', - 'header' => 'Highest', - 'width' => 1.2, - 'table' => 'users_judge.cat_prefs', - 'exec_function' => 'report_judges_cats_at_pref', /* Yes, the same function as cats_at_pref_H */ - 'components' => array('users_judge') - ), - 'cats_at_pref_h' => array( - 'name' => 'Judge -- Age Categories Selected as Preference: High (Shortform)', - 'header' => 'High', - 'width' => 0.8, - 'table' => 'users_judge.cat_prefs', - 'exec_function' => 'report_judges_cats_at_pref', - 'components' => array('users_judge') - ), - 'cats_at_pref_h_long' => array( - 'name' => 'Judge -- Age Categories Selected as Preference: High (Full category names)', - 'header' => 'High', - 'width' => 1.2, - 'table' => 'users_judge.cat_prefs', - 'exec_function' => 'report_judges_cats_at_pref', /* Yes, the same function as cats_at_pref_H */ - 'components' => array('users_judge') - ), - 'cats_at_pref_i' => array( - 'name' => 'Judge -- Age Categories Selected as Preference: Indifferent (Shortform)', - 'header' => 'Indifferent', - 'width' => 0.8, - 'table' => 'users_judge.cat_prefs', - 'exec_function' => 'report_judges_cats_at_pref', - 'components' => array('users_judge') - ), - 'cats_at_pref_i_long' => array( - 'name' => 'Judge -- Age Categories Selected as Preference: Indifferent (Full category names)', - 'header' => 'Indifferent', - 'width' => 1.2, - 'table' => 'users_judge.cat_prefs', - 'exec_function' => 'report_judges_cats_at_pref', /* Yes, the same function as cats_at_pref_H */ - 'components' => array('users_judge') - ), - 'cat_pref_1' => array( - 'name' => 'Judge -- Age Category Preference for Category ID 1', - 'header' => 'cat1', - 'width' => 0.5, - 'table' => 'users_judge.cat_prefs', - 'editor_disabled' => true, /* Only disables in the report editor, a report can still use it */ - 'exec_function' => 'report_judges_cat_pref', - 'components' => array('users_judge') - ), - 'cat_pref_2' => array( - 'name' => 'Judge -- Age Category Preference for Category ID 2', - 'header' => 'cat2', - 'width' => 0.5, - 'table' => 'users_judge.cat_prefs', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_cat_pref', - 'components' => array('users_judge') - ), - 'cat_pref_3' => array( - 'name' => 'Judge -- Age Category Preference for Category ID 3', - 'header' => 'cat3', - 'width' => 0.5, - 'table' => 'users_judge.cat_prefs', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_cat_pref', - 'components' => array('users_judge') - ), - 'cat_pref_4' => array( - 'name' => 'Judge -- Age Category Preference for Category ID 4', - 'header' => 'cat4', - 'width' => 0.5, - 'table' => 'users_judge.cat_prefs', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_cat_pref', - 'components' => array('users_judge') - ), - 'cat_pref_5' => array( - 'name' => 'Judge -- Age Category Preference for Category ID 5', - 'header' => 'cat5', - 'width' => 0.5, - 'table' => 'users_judge.cat_prefs', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_cat_pref', - 'components' => array('users_judge') - ), - 'cat_pref_6' => array( - 'name' => 'Judge -- Age Category Preference for Category ID 6', - 'header' => 'cat6', - 'width' => 0.5, - 'table' => 'users_judge.cat_prefs', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_cat_pref', - 'components' => array('users_judge') - ), - 'cat_pref_7' => array( - 'name' => 'Judge -- Age Category Preference for Category ID 7', - 'header' => 'cat7', - 'width' => 0.5, - 'table' => 'users_judge.cat_prefs', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_cat_pref', - 'components' => array('users_judge') - ), - 'cat_pref_8' => array( - 'name' => 'Judge -- Age Category Preference for Category ID 8', - 'header' => 'cat8', - 'width' => 0.5, - 'table' => 'users_judge.cat_prefs', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_cat_pref', - 'components' => array('users_judge') - ), - 'cat_pref_9' => array( - 'name' => 'Judge -- Age Category Preference for Category ID 9', - 'header' => 'cat9', - 'width' => 0.5, - 'table' => 'users_judge.cat_prefs', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_cat_pref', - 'components' => array('users_judge') - ), - 'cat_pref_10' => array( - 'name' => 'Judge -- Age Category Preference for Category ID 10', - 'header' => 'cat10', - 'width' => 0.5, - 'table' => 'users_judge.cat_prefs', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_cat_pref', - 'components' => array('users_judge') - ), - /* Time Availability */ - 'available_in_divisional1' => array( - 'name' => 'Time Availability -- Available in Divisional Round 1 ', - 'header' => 'R1', - 'width' => 0.5, - 'exec_function' => 'report_judges_time_availability', - 'table' => 'users.id' - ), - 'available_in_divisional2' => array( - 'name' => 'Time Availability -- Available in Divisional Round 2 ', - 'header' => 'R2', - 'width' => 0.5, - 'exec_function' => 'report_judges_time_availability', - 'table' => 'users.id' - ), - /* Others */ - 'special_award_only' => array( - 'name' => 'Judge -- Special Award Only Requested', - 'header' => 'SA Only', - 'width' => 0.8, - 'table' => 'users_judge.special_award_only', - 'components' => array('users_judge') - ), - 'special_award_only_sa' => array( - 'name' => 'Judge -- Special Award Only - Selected Special Award', - 'header' => 'Selected Special Award', - 'width' => 2.5, - 'table' => 'judges_specialaward_sel.award_awards_id', - 'exec_function' => 'report_judges_specialaward', - 'components' => array('users_judge') - ), - 'year' => array( - 'name' => 'Judge -- Year', - 'header' => 'Year', - 'width' => 0.5, - 'table' => 'users.year' - ), - 'captain' => array( - 'name' => 'Judge Team -- Team Captain? (Is the judge the captain? Yes/No)', - 'header' => 'Cptn', - 'width' => 0.5, - 'table' => 'judges_teams_link.captain', - 'value_map' => array('no' => 'No', 'yes' => 'Yes'), - 'components' => array('teams') - ), - 'team' => array( - 'name' => 'Judge Team -- Name', - 'header' => 'Team Name', - 'width' => 3.0, - 'table' => 'judges_teams.name', - 'components' => array('teams') - ), - 'teamnum' => array( - 'name' => 'Judge Team -- Team Number', - 'header' => 'Team', - 'width' => 0.5, - 'table' => 'judges_teams.num', - 'components' => array('teams') - ), - - /* - * Fixme, this requires passing 2 args to the function, can't do that yet - * 'team_members_all_except_this' => array( - * 'name' => 'Judge Team -- All other team members', - * 'header' => 'Members', - * 'width' => 2, - * 'table' => 'judges_teams.id', - * 'exec_function' => 'report_judges_team_members', - * 'components' => array('teams')), - */ - 'team_captain' => array( - 'name' => 'Judge Team -- Name of the Team Captain', - 'header' => 'Captain', - 'width' => 1.75, - 'table' => 'judges_teams.id', - 'exec_function' => 'report_judges_team_members', - 'components' => array('teams') - ), - 'team_members_all_except_captain' => array( - 'name' => 'Judge Team -- All team members, except the Captain', - 'header' => 'Members', - 'width' => 2, - 'table' => 'judges_teams.id', - 'exec_function' => 'report_judges_team_members', - 'components' => array('teams') - ), - 'team_members_all' => array( - 'name' => 'Judge Team -- All team members including the Captain', - 'header' => 'Members', - 'width' => 2, - 'table' => 'judges_teams.id', - 'exec_function' => 'report_judges_team_members', - 'components' => array('teams') - ), - 'project_pn' => array( - 'name' => 'Project -- Number', - 'header' => 'Number', - 'width' => 0.5, - 'table' => 'projects.projectnumber', - 'components' => array('teams', 'projects') - ), - 'project_title' => array( - 'name' => 'Project -- Title', - 'header' => 'Project', - 'width' => 3, - 'table' => 'projects.title', - 'components' => array('teams', 'projects') - ), - 'project_summary' => array( - 'name' => 'Project -- Summary', - 'header' => 'Summary', - 'width' => 5, - 'table' => 'projects.summary', - 'components' => array('teams', 'projects') - ), - 'project_language' => array( - 'name' => 'Project -- Language', - 'header' => 'Lang', - 'width' => 0.4, - 'table' => 'projects.language', - 'components' => array('teams', 'projects') - ), - 'project_students' => array( - 'name' => 'Project -- Student Name(s) (REQUIRES MYSQL 5.0) ', - 'header' => 'Student(s)', - 'width' => 3.0, - 'table' => "GROUP_CONCAT(students.firstname, ' ', students.lastname ORDER BY students.lastname SEPARATOR ', ')", - 'group_by' => array('users.id', 'judges_teams_timeslots_projects_link.id'), - 'components' => array('teams', 'projects', 'students') - ), - 'project_timeslot_start' => array( - 'name' => 'Project -- Timeslot Start Time (HH:MM)', - 'header' => 'Start', - 'width' => 0.75, - 'table' => "TIME_FORMAT(judges_timeslots.starttime,'%H:%i')", - 'components' => array('teams', 'projects') - ), - 'project_timeslot_end ' => array( - 'name' => 'Project -- Timeslot End Time (HH:MM)', - 'header' => 'End', - 'width' => 0.75, - 'table' => "TIME_FORMAT(judges_timeslots.endtime,'%H:%i')", - 'components' => array('teams', 'projects') - ), - 'project_timeslot' => array( - 'name' => 'Project -- Timeslot Start - End (HH:MM - HH:MM)', - 'header' => 'Timeslot', - 'width' => 1.5, - 'table' => "CONCAT(TIME_FORMAT(judges_timeslots.starttime,'%H:%i'),'-',TIME_FORMAT(judges_timeslots.endtime,'%H:%i'))", - 'components' => array('teams', 'projects') - ), - 'project_timeslot_date' => array( - 'name' => 'Project -- Timeslot Date - (YYYY-MM-DD)', - 'header' => 'Timeslot Date', - 'width' => 1, - 'table' => 'judges_timeslots.date', - 'components' => array('teams', 'projects') - ), - 'rank' => array( - 'name' => 'Project -- Rank (left blank for judges to fill out)', - 'header' => 'Rank', - 'width' => 1.0, - 'table' => '""' - ), - 'question_1' => array( - 'name' => 'Judge -- Custom Judge Registration Question 1', - 'header' => 'Q1', - 'width' => 1, - 'table' => 'users.id', - 'editor_disabled' => true, /* Only disables in the report editor, a report can still use it */ - 'exec_function' => 'report_judges_custom_question' - ), - 'question_2' => array( - 'name' => 'Judge -- Custom Judge Registration Question 2', - 'header' => 'Q2', - 'width' => 1, - 'table' => 'users.id', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_custom_question' - ), - 'question_3' => array( - 'name' => 'Judge -- Custom Judge Registration Question 3', - 'header' => 'Q3', - 'width' => 1, - 'table' => 'users.id', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_custom_question' - ), - 'question_4' => array( - 'name' => 'Judge -- Custom Judge Registration Question 4', - 'header' => 'Q4', - 'width' => 1, - 'table' => 'users.id', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_custom_question' - ), - 'question_5' => array( - 'name' => 'Judge -- Custom Judge Registration Question 5', - 'header' => 'Q5', - 'width' => 1, - 'table' => 'users.id', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_custom_question' - ), - 'question_6' => array( - 'name' => 'Judge -- Custom Judge Registration Question 6', - 'header' => 'Q6', - 'width' => 1, - 'table' => 'users.id', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_custom_question' - ), - 'question_7' => array( - 'name' => 'Judge -- Custom Judge Registration Question 7', - 'header' => 'Q7', - 'width' => 1, - 'table' => 'users.id', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_custom_question' - ), - 'question_8' => array( - 'name' => 'Judge -- Custom Judge Registration Question 8', - 'header' => 'Q8', - 'width' => 1, - 'table' => 'users.id', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_custom_question' - ), - 'question_9' => array( - 'name' => 'Judge -- Custom Judge Registration Question 9', - 'header' => 'Q9', - 'width' => 1, - 'table' => 'users.id', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_custom_question' - ), - 'question_10' => array( - 'name' => 'Judge -- Custom Judge Registration Question 10', - 'header' => 'Q10', - 'width' => 1, - 'table' => 'users.id', - 'editor_disabled' => true, - 'exec_function' => 'report_judges_custom_question' - ), - 'static_text' => array( - 'name' => 'Static Text (useful for labels)', - 'header' => '', - 'width' => 0.1, - 'table' => "CONCAT(' ')" - ), -); - -/* Fill in big expansions */ -/* div_exp */ -for ($x = 1; $x <= 50; $x++) { - $f = "div_exp_$x"; - $report_judges_fields["div_exp_$x"] = array( - 'name' => "Judge -- Expertise for Division ID $x", - 'header' => "div$x", - 'width' => 0.5, - 'table' => 'users_judge.div_prefs', - 'editor_disabled' => true, /* Only disables in the report editor, a report can still use it */ - 'exec_function' => 'report_judges_div_exp', - 'components' => array('users_judge') - ); -} - -/* - * Overwrite the question_1 .. question_10 fields with the - * question name and header from the list of questions - */ -function report_judges_update_questions($year) -{ - global $report_judges_fields; - $qs = questions_load_questions('judgereg', $year); - if (count($qs) > 10) { - echo 'Not enough judge question fields, please file a bug report at sfiab.ca and report that you have ' . count($qs) . ' custom judge questions, but the system can handle a maximum of 10.'; - exit; - } - foreach ($qs as $qid => $q) { - $f = "question_{$q['ord']}"; - $report_judges_fields[$f]['header'] = $q['db_heading']; - $report_judges_fields[$f]['name'] = 'Judge -- Custom Judge Question: ' . $q['question']; - $report_judges_fields[$f]['editor_disabled'] = false; - } -} - -function report_judges_update_divs($year) -{ - global $report_judges_fields, $report_judges_divs; - - report_judges_load_divs($year); - - if (count($report_judges_divs[$year]) > 50) { - echo 'Not enough judge division fields, please file a bug report at sfiab.ca and report that you have ' . count($report_judges_divs[$year]) . ' divisions, but the system can handle a maximum of 50.'; - exit; - } - foreach ($report_judges_divs[$year] as $div_id => $d) { - $f = "div_exp_$div_id"; - $report_judges_fields[$f]['header'] = "{$d['division_shortform']} - {$d['division']}"; - $report_judges_fields[$f]['name'] = 'Judge -- Expertise in Division: ' . $d['division']; - $report_judges_fields[$f]['editor_disabled'] = false; - } -} - -function report_judges_update_cats($year) -{ - global $report_judges_fields, $report_judges_cats; - - report_judges_load_cats($year); - - if ($report_judges_cats[$year] != NULL) { - if (count($report_judges_cats[$year]) > 10) { - echo 'Not enough judge age category fields, please file a bug report at science-ation.ca and report that you have ' . count($report_judges_cats[$year]) . ' age categories, but the system can handle a maximum of 10.'; - exit; - } - if (is_array($report_judges_cats[$year])) { - foreach ($report_judges_cats[$year] as $cat_id => $d) { - $f = "cat_pref_$cat_id"; - $report_judges_fields[$f]['header'] = "{$d['category_shortform']} - {$d['category']}"; - $report_judges_fields[$f]['name'] = 'Judge -- Preference for Age Category: ' . $d['category']; - $report_judges_fields[$f]['editor_disabled'] = false; - } - } - } else { - echo 'Judge age categories not set up.'; - exit; - } -} - -$report_judges_questions_updated = false; - -/* - * Do the overwrites for the current year, this is for the editor, because - * it doesn't call a _fromwhere - */ -report_judges_update_questions($config['FAIRYEAR']); -report_judges_update_divs($config['FAIRYEAR']); -report_judges_update_cats($config['FAIRYEAR']); - -function report_judges_fromwhere($report, $components) -{ - global $config, $report_judges_fields, $report_judges_questions_updated; - - $year = $report['year']; - - if ($report_judges_questions_updated == false) { - /* - * Do overwrites for the report year, overwriting the previous - * overwrites for the current year, because the report year - * could be different, and the questions may have changed - */ - report_judges_update_questions($year); - $report_judges_questions_updated = true; - } - - if (in_array('users_judge', $components)) { - $uj_from = 'LEFT JOIN users_judge ON users_judge.users_id=users.id'; - $uj_from .= ' LEFT JOIN judges_specialaward_sel ON judges_specialaward_sel.users_id=users.id'; - } - - $teams_from = ''; - $teams_where = ''; - if (in_array('teams', $components)) { - $teams_from = 'LEFT JOIN judges_teams_link ON judges_teams_link.users_id=users.id - LEFT JOIN judges_teams ON judges_teams.id=judges_teams_link.judges_teams_id'; - $teams_where = "AND judges_teams_link.year='$year' - AND judges_teams.year='$year'"; - } - - $projects_from = ''; - $projects_where = ''; - if (in_array('projects', $components)) { - $projects_from = 'LEFT JOIN judges_teams_timeslots_projects_link ON - judges_teams_timeslots_projects_link.judges_teams_id=judges_teams.id - LEFT JOIN projects ON projects.id=judges_teams_timeslots_projects_link.projects_id - LEFT JOIN judges_timeslots ON judges_timeslots.id=judges_teams_timeslots_projects_link.judges_timeslots_id'; - $projects_where = "AND judges_teams_timeslots_projects_link.year='$year' - AND projects.year='$year'"; - } - - $students_from = ''; - $students_where = ''; - if (in_array('students', $components)) { - $students_from = 'LEFT JOIN students ON students.registrations_id=projects.registrations_id'; - $students_where = "AND students.year='$year'"; - } - - /* Search the report for a filter based on judge year */ - $year_where = "AND users.year='$year'"; - foreach ($report['filter'] as $d) { - if ($d['field'] == 'year') { - /* Don't interally filter on year, we'll do it externally */ - $year_where = ''; - } - } - - $q = " FROM \tusers - $teams_from - $projects_from - $students_from - $uj_from - WHERE - users.types LIKE '%judge%' - $year_where - $teams_where - $projects_where - $students_where - AND deleted='no' - "; - - return $q; -} - -?> diff --git a/admin/reports_judges.php b/admin/reports_judges.php deleted file mode 100644 index ab72bbc5..00000000 --- a/admin/reports_judges.php +++ /dev/null @@ -1,236 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -newPage(); - $rep->setFontSize(11); -} else if ($type == 'csv') { - $rep = new lcsv(i18n('Judge List')); -} - -$table = array(); -$table['header'] = array( - i18n('ID'), - i18n('Unique ID'), - i18n('Last Name'), - i18n('First Name'), - i18n('Email'), - i18n('Phone Home'), - i18n('Phone Work'), - i18n('Phone Work Ext'), - i18n('Phone Cell'), - i18n('Languages'), - i18n('Organization'), - i18n('Address 1'), - i18n('Address 2'), - i18n('City'), - i18n($config['provincestate']), - i18n($config['postalzip']), - i18n('Highest PostSecDeg'), - i18n('Professional Quals'), - i18n('Expertise Other') -); - -/* Append headers for all the custom questions */ -$qs = questions_load_questions('judgereg', $config['FAIRYEAR']); -$keys = array_keys($qs); -foreach ($keys as $qid) { - $table['header'][] = i18n($qs[$qid]['db_heading']); -} - -// grab the list of divisions, because the last fields of the table will be the sub-divisions -$q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY id"); -$q->execute([$config['FAIRYEAR']]); -$numcats = $q->rowCount(); -$catheadings = array(); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $cats[] = $r->id; - $catheadings[] = "$r->category (out of 5)"; -} -// grab the list of divisions, because the last fields of the table will be the sub-divisions -$q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); -$q->execute([$config['FAIRYEAR']]); -$divheadings = array(); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $divs[] = $r->id; - $divheadings[] = "$r->division (out of 5)"; - $divheadings[] = "$r->division subdivisions"; -} - -// now append the arrays together -$table['header'] = array_merge($table['header'], array_merge($catheadings, $divheadings)); - -$times = array(); -$datetimeheadings = array(); - -/* Load the judging rounds */ -$q = $pdo->prepare("SELECT date,starttime,endtime,name FROM judges_timeslots WHERE round_id='0' AND year=? ORDER BY starttime,type"); -$q->execute([$config['FAIRYEAR']]); -$x = 0; -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $found = false; - foreach ($times as $xx => $t) { - if ($t['date'] == $r->date && $t['starttime'] == $r->starttime && $t['endtime'] == $r->endtime) { - $times[$xx]['name'] .= ", {$r->name}"; - $found = true; - break; - } - } - if (!$found) { - $times[$x] = array('date' => $r->date, - 'starttime' => $r->starttime, - 'endtime' => $r->endtime, - 'name' => $r->name); - $datetimeheadings[] = $r->name; - $x++; - } -} - -$table['header'] = array_merge($table['header'], $datetimeheadings); - -// fill these in if we ever make this PDFable -$table['widths'] = array(); -$table['dataalign'] = array(); - -$q = $pdo->prepare("SELECT - users.*, - users_judge.* - FROM - users - JOIN users_judge ON users.id=users_judge.users_id - WHERE - users.deleted='no' AND - users.year=? - AND users.types LIKE '%judge%' - - ORDER BY - lastname, - firstname"); -$q->execute([$config['FAIRYEAR']]); -show_pdo_errors_if_any($pdo); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $u = user_load($r->id); - - $expertise_other = str_replace("\n", ' ', $r->expertise_other); - $expertise_other = str_replace("\r", '', $expertise_other); - - if (isset($divdata)) - unset($divdata); - $divdata = array(); - if (isset($catdata)) - unset($catdata); - $catdata = array(); - $languages = ''; - - foreach ($u['cat_prefs'] AS $c) { - $catdata[] = $c + 2; - } - - foreach ($u['div_prefs'] AS $d) { - $divdata[] = $d; - // FIXME: 2010-01-22 - James - get the sub divisions for now we use a placeholder - $divdata[] = ''; - } - - foreach ($u['languages'] AS $k => $v) { - $languages .= "$v/"; - } - $languages = substr($languages, 0, -1); - - $qarray = array(); - $qans = questions_load_answers('judgereg', $r->id, $config['FAIRYEAR']); - $keys = array_keys($qans); - foreach ($keys as $qid) { - $qarray[] = $qans[$qid]; - } - - $tq = $pdo->prepare('SELECT * FROM judges_availability WHERE users_id=? ORDER BY `start`'); - $tq->execute([$r->id]); - - $sel = array(); - $timedata = array(); - while ($tr = $tq->fetch(PDO::FETCH_OBJ)) { - foreach ($times as $x => $t) { - if ($tr->start == $t['starttime'] && $tr->end == $t['endtime'] && $tr->date == $t['date']) { - $sel[$x] = true; - } - } - } - - foreach ($times as $x => $t) { - if (get_value_from_array($sel, $x) == true) { - $timedata[] = 'yes'; - } else { - $timedata[] = 'no'; - } - } - - $tmp = array( - $r->id, - $r->uid, - $r->lastname, - $r->firstname, - $r->email, - $r->phonehome, - $r->phonework, - get_value_property_or_default($r, 'phoneworkext'), - $r->phonecell, - $languages, - $r->organization, - $r->address, - $r->address2, - $r->city, - $r->province, - $r->postalcode, - $r->highest_psd, - get_value_property_or_default($r, 'professional_quals'), - $expertise_other - ); - $tmp = array_merge($tmp, $qarray); - - $extradata = array_merge($catdata, $divdata); - $table['data'][] = array_merge(array_merge($tmp, $extradata), $timedata); -} - -$rep->addTable($table); -$rep->output(); - -?> diff --git a/admin/reports_judges_allyears.php b/admin/reports_judges_allyears.php deleted file mode 100644 index fc387a56..00000000 --- a/admin/reports_judges_allyears.php +++ /dev/null @@ -1,188 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -newPage(); - $rep->setFontSize(11); -} else if ($type == 'csv') { - $rep = new lcsv(i18n('Judge List')); -} - -$table = array(); -$table['header'] = array( - i18n('ID'), - i18n('Unique ID'), - i18n('Year'), - i18n('Last Name'), - i18n('First Name'), - i18n('Email'), - i18n('Phone Home'), - i18n('Phone Work'), - i18n('Phone Work Ext'), - i18n('Phone Cell'), - i18n('Languages'), - i18n('Organization'), - i18n('Address 1'), - i18n('Address 2'), - i18n('City'), - i18n($config['provincestate']), - i18n($config['postalzip']), - i18n('Highest PostSecDeg'), - i18n('Professional Quals'), - i18n('Expertise Other') -); - -/* Append headers for all the custom questions */ -$qs = questions_load_questions('judgereg', $config['FAIRYEAR']); -$keys = array_keys($qs); -foreach ($keys as $qid) { - $table['header'][] = i18n($qs[$qid]['db_heading']); -} - -// grab the list of divisions, because the last fields of the table will be the sub-divisions -$q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY id"); -$q->execute([$config['FAIRYEAR']]); -$numcats = $q->rowCount(); -$catheadings = array(); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $cats[] = $r->id; - $catheadings[] = "$r->category (out of 5)"; -} -// grab the list of divisions, because the last fields of the table will be the sub-divisions -$q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); -$q->execute([$config['FAIRYEAR']]); -$divheadings = array(); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $divs[] = $r->id; - $divheadings[] = "$r->division (out of 5)"; - $divheadings[] = "$r->division subdivisions"; -} - -// now append the arrays together -$table['header'] = array_merge($table['header'], array_merge($catheadings, $divheadings)); - -// fill these in if we ever make this PDFable -$table['widths'] = array(); -$table['dataalign'] = array(); - -$q = $pdo->prepare("SELECT - users.*, - users_judge.* - FROM - users - JOIN users_judge ON users.id=users_judge.users_id - WHERE - users.deleted='no' - AND users.types LIKE '%judge%' - ORDER BY - lastname, - firstname, - year"); -$q->execute(); -show_pdo_errors_if_any($pdo); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $u = user_load($r->id); - - $expertise_other = str_replace("\n", ' ', $r->expertise_other); - $expertise_other = str_replace("\r", '', $expertise_other); - - if (isset($divdata)) - unset($divdata); - $divdata = array(); - if (isset($catdata)) - unset($catdata); - $catdata = array(); - $languages = ''; - - foreach ($u['cat_prefs'] AS $c) { - $catdata[] = $c + 2; - } - - foreach ($u['div_prefs'] AS $d) { - $divdata[] = $d; - // FIXME: 2010-01-22 - James - get the sub divisions for now we use a placeholder - $divdata[] = ''; - } - - foreach ($u['languages'] AS $k => $v) { - $languages .= "$v/"; - } - $languages = substr($languages, 0, -1); - - $qarray = array(); - $qans = questions_load_answers('judgereg', $r->id, $config['FAIRYEAR']); - $keys = array_keys($qans); - foreach ($keys as $qid) { - $qarray[] = $qans[$qid]; - } - - $tmp = array( - $r->id, - $r->uid, - $r->year, - $r->lastname, - $r->firstname, - $r->email, - $r->phonehome, - $r->phonework, - get_value_property_or_default($r, 'phoneworkext'), - $r->phonecell, - $languages, - $r->organization, - $r->address, - $r->address2, - $r->city, - $r->province, - $r->postalcode, - $r->highest_psd, - get_value_property_or_default($r, 'professional_quals'), - $expertise_other - ); - $tmp = array_merge($tmp, $qarray); - - $extradata = array_merge($catdata, $divdata); - $table['data'][] = array_merge($tmp, $extradata); -} - -$rep->addTable($table); -$rep->output(); - -?> diff --git a/admin/reports_judges_teams_projects.php b/admin/reports_judges_teams_projects.php deleted file mode 100644 index 9f2193e7..00000000 --- a/admin/reports_judges_teams_projects.php +++ /dev/null @@ -1,171 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -newPage(); - $rep->setFontSize(11); -} else if ($type == 'csv') { - $rep = new lcsv(i18n('Judging Team Project Assignments')); -} - -$teams = getJudgingTeams(); - -$q = $pdo->prepare("SELECT DISTINCT(date) AS d FROM judges_timeslots WHERE year=?"); -$q->execute([$config['FAIRYEAR']]); -if ($q->rowCount() > 1) - $show_date = true; -else - $show_date = false; - -foreach ($teams AS $team) { - $table = array(); - $table['header'] = array(i18n('Timeslot'), i18n('Proj #'), i18n('Project Title')); - if ($show_date) - $table['widths'] = array(2.5, 0.75, 3.75); - else - $table['widths'] = array(1.5, 0.75, 4.75); - - $table['dataalign'] = array('center', 'center', 'left'); - - $rep->heading($team['name'] . ' (' . $team['num'] . ')'); - - $memberlist = ''; - if (count(get_value_from_array($team, 'members', []))) { - foreach ($team['members'] AS $member) { - $memberlist .= $member['firstname'] . ' ' . $member['lastname']; - if ($member['captain'] == 'yes') - $memberlist .= '*'; - $memberlist .= ', '; - } - $memberlist = substr($memberlist, 0, -2); - } - $rep->addText($memberlist); - - if (count($team['awards'])) { - $rep->heading(i18n('Awards that this team judges') . ':'); - foreach ($team['awards'] AS $award) { - $rep->addText($award['name']); - $rep->addText(i18n('Criteria') . ': ' . $award['criteria']); - - // get category eligibility - $q = $pdo->prepare("SELECT projectcategories.category FROM projectcategories, award_awards_projectcategories WHERE award_awards_projectcategories.projectcategories_id=projectcategories.id AND award_awards_projectcategories.award_awards_id=? AND award_awards_projectcategories.year=? AND projectcategories.year=? ORDER BY category"); - $q->execute([$award['id'],$config['FAIRYEAR'],$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - $cats = ''; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($cats) - $cats .= ', ' . i18n($r->category); - else - $cats = i18n($r->category); - } - $rep->addText(i18n('Categories') . ": $cats"); - - // get division eligibility - $q = $pdo->prepare("SELECT projectdivisions.division_shortform FROM projectdivisions, award_awards_projectdivisions WHERE award_awards_projectdivisions.projectdivisions_id=projectdivisions.id AND award_awards_projectdivisions.award_awards_id=? AND award_awards_projectdivisions.year=? AND projectdivisions.year=? ORDER BY division_shortform"); - $q->execute([$award['id'],$config['FAIRYEAR'],$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - $divs = ''; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($divs) - $divs .= ', ' . i18n($r->division_shortform); - else - $divs = i18n($r->division_shortform); - } - $rep->addText(i18n('Divisions') . ": $divs"); - } - } - - $rep->nextLine(); - - // get the timeslots that this team has. - $q = $pdo->prepare("SELECT - judges_timeslots.id, - judges_timeslots.date, - judges_timeslots.starttime, - judges_timeslots.endtime - FROM - judges_timeslots, - judges_teams, - judges_teams_timeslots_link - WHERE - judges_teams.id=? AND - judges_teams.id=judges_teams_timeslots_link.judges_teams_id AND - judges_timeslots.id=judges_teams_timeslots_link.judges_timeslots_id - ORDER BY - date,starttime - "); - $q->execute([$team['id']]); - $numslots = $q->rowCount(); - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($show_date) - $timeslot = format_date($r->date) . ' '; - else - $timeslot = ''; - $timeslot .= format_time($r->starttime) . ' - ' . format_time($r->endtime); - - $projq = $pdo->prepare("SELECT - projects.projectnumber, - projects.id, - projects.title - FROM - projects, - judges_teams_timeslots_projects_link - WHERE - judges_teams_timeslots_projects_link.judges_timeslots_id=? AND - judges_teams_timeslots_projects_link.judges_teams_id=? AND - judges_teams_timeslots_projects_link.projects_id=projects.id AND - judges_teams_timeslots_projects_link.year=? - ORDER BY - projectnumber - "); - $projq->execute([$r->id,$team['id'],$config['FAIRYEAR']]); - - while ($proj = $projq->fetch(PDO::FETCH_OBJ)) { - $table['data'][] = array($timeslot, $proj->projectnumber, $proj->title); - // make the timeslot empty so we dont list it each time if there's more than one project in the timeslot - $timeslot = ''; - } - } - $rep->addTable($table); - $rep->newPage(); - unset($table); -} - -$rep->output(); -?> diff --git a/admin/reports_mailinglabels.php b/admin/reports_mailinglabels.php deleted file mode 100644 index ad559d80..00000000 --- a/admin/reports_mailinglabels.php +++ /dev/null @@ -1,98 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Reports' => 'admin/reports.php')); - -?> - - - -'; - -echo '
    '; -echo ''; -echo ''; -echo ''; - -echo ''; -echo '
    '; - -echo ''; - -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo '
    Label Height:"
    Label Width:"
    Label Y-Space:"
    Label X-Space:"
    Font Size:pt
    Top Padding:"
    '; -echo ''; - -echo '
    '; - -send_footer(); -?> diff --git a/admin/reports_mailinglabels_generator.php b/admin/reports_mailinglabels_generator.php deleted file mode 100644 index 6d776137..00000000 --- a/admin/reports_mailinglabels_generator.php +++ /dev/null @@ -1,183 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -setPageStyle('labels'); - $rep->newPage(8.5, 11); - $rep->setLabelDimensions($card_width, $card_height, $xspacer, $yspacer, $fontsize, $toppadding); - } else if ($_GET['type'] == 'csv') { - $rep = new lcsv(i18n("$reportname Mailing Labels")); - } - - switch ($report) { - // IF(schools.sciencehead=\"\",\"Science Department Head\",schools.sciencehead) AS co, - case 'schools': - $q = $pdo->prepare("SELECT - schools.school AS name, - schools.board AS board, - schools.schoollang, - schools.sciencehead AS co, - schools.address AS address, - schools.city AS city, - schools.province_code AS province, - schools.postalcode AS postalcode - FROM - schools - WHERE - year=? - ORDER BY - school - "); - $q->execute([$config['FAIRYEAR']]); - break; - - case 'sponsors': - $q = $pdo->prepare("SELECT - award_sponsors.organization AS name, - award_sponsors.address AS address, - award_sponsors.city AS city, - award_sponsors.province_code AS province, - award_sponsors.postalcode AS postalcode, - IF(award_contacts.salutation=\"\", - CONCAT(award_contacts.firstname,' ',award_contacts.lastname), - CONCAT(award_contacts.salutation,' ',award_contacts.firstname,' ',award_contacts.lastname)) - AS co - FROM - award_sponsors, - award_contacts - WHERE - award_sponsors.confirmed='yes' - AND award_contacts.award_sponsors_id=award_sponsors.id - ORDER BY - organization - "); - $q->execute(); - break; - - case 'judges': - $q = $pdo->prepare("SELECT - CONCAT(judges.firstname,' ',judges.lastname) AS name, - IF(judges.address2=\"\", - judges.address, - CONCAT(judges.address,' ',judges.address2) - ) AS address, - '' AS co, - judges.city AS city, - judges.province AS province, - judges.postalcode AS postalcode - FROM - judges, - judges_years - WHERE - judges_years.judges_id=judges.id - AND judges_years.year=? - ORDER BY - lastname,firstname - "); - $q->execute([$config['FAIRYEAR']]); - break; - } - - if ($_GET['type'] == 'csv') { - $table = array(); - $table['header'] = array( - i18n('Name'), - i18n('C/O'), - i18n('Address'), - i18n('City'), - i18n($config['provincestate']), - i18n($config['postalzip']) - ); - } - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - // handle C/O differently for schools, becuase, well, french schools are picky! - if ($report == 'schools') { - if ($r->sciencehead) - $coname = $r->sciencehead; - else - $coname = i18n('Science Department Head', array(), array(), $r->schoollang); - - $co = i18n('C/O %1', array($coname), array('Name of person'), $r->schoollang); - - $name = $r->name; - if ($r->board) - $name .= ' [' . $r->board . ']'; - } else { - $co = "C/O $r->co"; - $name = $r->name; - } - - if ($_GET['type'] == 'pdf') { - $rep->newLabel(); - $rep->mailingLabel($name, $co, $r->address, $r->city, $r->province, $r->postalcode); - } else if ($_GET['type'] == 'csv') { - $table['data'][] = array($name, $co, $r->address, $r->city, $r->province, $r->postalcode); - } - } - - if ($_GET['type'] == 'csv') - $rep->addTable($table); - - $rep->output(); -} -?> diff --git a/admin/reports_old.php b/admin/reports_old.php deleted file mode 100644 index 5e493e67..00000000 --- a/admin/reports_old.php +++ /dev/null @@ -1,168 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php')); -echo '
    '; -echo error("This page will no longer be available after Summer 2008. Please use the new 'My Reports' interface. "); - -$id = intval($_POST['id']); -echo '

    ' . i18n('All Reports') . '

    '; -echo '
    '; -echo ''; -echo ''; -echo ""; -echo '
    '; -echo '
    '; -echo '
    '; - -echo '

    ' . i18n('Custom Reports') . '

    '; - -/* - * echo i18n("Day of Fair Registration/Checkin Forms (All Categories)").": "; - * echo "PDF   "; - * echo "CSV   "; - */ - -// lets split this up by age category, - -/* - * $catq=mysql_query("SELECT * FROM projectcategories WHERE year='".$config['FAIRYEAR']."' ORDER BY id"); - * while($catr=mysql_fetch_object($catq)) - * { - * echo ""; - * echo "id\">$catr->category (PDF)   "; - * echo "
    "; - * echo "id\">$catr->category (CSV)   "; - * echo ""; - * } - */ -echo '
    '; -echo i18n('Mailing Labels') . ': '; -echo '' . i18n('Mailing Label Generator') . ''; - -echo '
    '; -echo '
    '; -echo i18n('School Access Codes') . ': '; -echo 'PDF   '; -echo 'CSV   '; -// echo "PDF   "; -// echo "CSV   "; - -echo '
    '; -echo i18n('Student Emergency Contact Names/Numbers') . ': '; -echo 'PDF   '; -echo 'CSV   '; -echo '
    '; -echo i18n('Students/Projects From Each School') . ': '; -echo 'PDF   '; -echo 'CSV   '; - -echo '
    '; -echo i18n('Project Logistical Requirements (tables, electricity)') . ': '; -echo 'PDF   '; -echo 'CSV   '; -echo '
    '; - -echo i18n('Project Table Labels') . ': '; -echo 'PDF   '; -echo '
    '; - -echo i18n('Project Summary Details') . ': '; -echo 'PDF   '; -echo '
    '; -echo i18n('Nametags') . ': '; -echo 'Students PDF   '; -echo 'Students CSV   '; -echo 'Judges PDF   '; -echo 'Judges CSV   '; -echo 'Committee PDF   '; -echo 'Committee CSV   '; - -echo '
    '; -echo '
    '; -echo i18n('Judges List') . ': '; -echo 'Judge List (CSV)   '; - -echo '
    '; -echo i18n('Judging Teams') . ': '; -echo 'List (CSV)   '; -echo 'List (PDF)   '; -echo 'Team Awards (CSV)   '; -echo 'Team Awards (PDF)   '; - -echo '
    '; -echo i18n('Judging Teams Project Assignments') . ': '; -echo 'CSV   '; -echo 'PDF   '; - -echo '
    '; -echo i18n('Projects Judging Team Assignments') . ': '; -echo 'CSV   '; -echo 'PDF   '; - -echo '
    '; -echo i18n('Project Identification Labels (for judging sheets)') . ': '; -echo 'PDF   '; -echo '
    '; -echo '
    '; - -echo i18n('Awards list for Program') . ': '; -echo 'CSV   '; - -echo '
    '; -echo i18n('Award Ceremony Script') . ': '; -echo 'FULL PDF  '; -echo '(Divisional)   '; -echo '(Special)   '; -echo '(Interdisciplinary)   '; -echo '(Other)   '; -echo '(Grand)   '; -echo '
    '; -echo i18n('Award Ceremony Script') . ': '; -echo 'CSV   '; -echo '
    '; -echo 'Award Winners CSV   '; -echo '
    '; - -send_footer(); -?> diff --git a/admin/reports_program_awards.php b/admin/reports_program_awards.php deleted file mode 100644 index 0f0f9ae9..00000000 --- a/admin/reports_program_awards.php +++ /dev/null @@ -1,106 +0,0 @@ -newPage(); - $rep->setFontSize(11); -} else if ($type == 'csv') { - $rep = new lcsv(i18n('Program Awards')); -} -$q = $pdo->prepare("SELECT - award_awards.id, - award_awards.name, - award_awards.criteria, - award_awards.presenter, - award_awards.order AS awards_order, - award_types.type - FROM - award_awards, - award_types - WHERE - award_awards.year=? - AND\taward_types.year=? - AND\taward_awards.award_types_id=award_types.id - AND\taward_awards.excludefromac='0' - AND\t(award_types.type='special' OR award_types.type='grand') - ORDER BY awards_order"); -$q->execute([$config['FAIRYEAR'],$config['FAIRYEAR']]); - -show_pdo_errors_if_any($pdo); - -if ($q->rowCount()) { - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $rep->heading(i18n($r->name)); - - // get teh age categories - $acq = $pdo->prepare("SELECT projectcategories.category FROM projectcategories, award_awards_projectcategories WHERE projectcategories.year=? AND award_awards_projectcategories.year=? AND award_awards_projectcategories.award_awards_id=? AND award_awards_projectcategories.projectcategories_id=projectcategories.id ORDER BY projectcategories.id"); - $acq->execute([$config['FAIRYEAR'],$config['FAIRYEAR'],$r->id]); - show_pdo_errors_if_any($pdo); - $cats = ''; - while ($acr = $acq->fetch(PDO::FETCH_OBJ)) { - $cats .= i18n($acr->category) . ', '; - } - $cats = substr($cats, 0, -2); - $rep->addText("$cats: " . i18n($r->criteria)); - - $pq = $pdo->prepare("SELECT - award_prizes.prize, - award_prizes.number, - award_prizes.id, - award_prizes.cash, - award_prizes.scholarship - FROM - award_prizes - WHERE - award_awards_id=? - AND award_prizes.year=? - AND award_prizes.excludefromac='0' - ORDER BY - `order`"); - $pq->execute([$r->id,$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - $prevprizeid = -1; - while ($pr = $pq->fetch(PDO::FETCH_OBJ)) { - if ($prevprizeid != $pr->id) { - $prizetext = ''; - if ($pr->number > 1) - $prizetext .= i18n('%1 prizes of', array($pr->number)) . ' '; - - if ($pr->prize) - $prizetext .= i18n($pr->prize); - - if ($pr->cash || $pr->scholarship) { - if ($pr->prize) - $prizetext .= ' ('; - if ($pr->cash && $pr->scholarship) - $prizetext .= "\$$pr->cash / \$$pr->scholarship " . i18n('scholarship'); - else if ($pr->cash) - $prizetext .= "\$$pr->cash"; - else if ($pr->scholarship) - $prizetext .= "\$$pr->scholarship " . i18n('scholarship'); - - if ($pr->prize) - $prizetext .= ')'; - } - $rep->addText($prizetext); - - $prevprizeid = $pr->id; - } - } - $rep->nextLine(); - } -} -$rep->output(); -?> diff --git a/admin/reports_projects_details.php b/admin/reports_projects_details.php deleted file mode 100644 index added665..00000000 --- a/admin/reports_projects_details.php +++ /dev/null @@ -1,144 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -newPage(); - $rep->setFontSize(11); -} else if ($type == 'csv') { - $rep = new lcsv(i18n('Project Details')); -} - -$projq = $pdo->prepare("SELECT - registrations.id AS reg_id, - registrations.num AS reg_num, - projects.id, - projects.title, - projects.projectnumber, - projects.projectdivisions_id, - projects.projectcategories_id, - projects.summary, - projects.req_electricity, - projects.req_table, - projects.req_special, - projects.language, - projectdivisions.division, - projectcategories.category - FROM - registrations - LEFT JOIN projects on projects.registrations_id=registrations.id - LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id - LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id - - WHERE - projects.year=? - AND projectdivisions.year=? - AND projectcategories.year=? - AND ( registrations.status='complete' - \t OR registrations.status='paymentpending' ) - ORDER BY - projects.projectnumber - "); -$projq->execute([$config['FAIRYEAR'],$config['FAIRYEAR'],$config['FAIRYEAR']]); -show_pdo_errors_if_any($pdo); - -$totalprojects = $projq->rowCount(); -$projectcount = 0; - -while ($proj = $projq->fetch(PDO::FETCH_OBJ)) { - $projectcount++; - $sq = $pdo->prepare("SELECT students.firstname, - students.lastname - FROM - students - WHERE - students.registrations_id=? - "); - $sq->execute([$proj->reg_id]); - $students = ''; - $studnum = 0; - while ($studentinfo = $sq->fetch(PDO::FETCH_OBJ)) { - if ($studnum > 0) - $students .= ', '; - $students .= "$studentinfo->firstname $studentinfo->lastname"; - $studnum++; - } - $rep->heading(i18n('Project Information')); - $rep->nextline(); - - $table = array(); - // $table['header']=array(i18n("Timeslot"),i18n("Judging Team")); - $table['widths'] = array(1.25, 4.75); - $table['dataalign'] = array('left', 'left'); - $table['data'][] = array(i18n('Project Number'), $proj->projectnumber); - $table['data'][] = array(i18n('Project Title'), $proj->title); - $table['data'][] = array(i18n('Age Category'), $proj->category); - $table['data'][] = array(i18n('Division'), $proj->division); - $table['data'][] = array(i18n('Students'), $students); - $table['data'][] = array(i18n('Table?'), $proj->req_table); - $table['data'][] = array(i18n('Electricity?'), $proj->req_electricity); - $table['data'][] = array(i18n('Special Requests'), $proj->req_special); - $table['data'][] = array(i18n('Language'), $proj->language); - $rep->addTable($table); - unset($table); - - $q = $pdo->prepare("SELECT * FROM mentors WHERE registrations_id=?"); - $q->execute([$proj->reg_id]); - $rep->nextline(); - $rep->heading(i18n('Mentor Information')); - $rep->nextline(); - - if ($q->rowCount()) { - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $rep->addText(i18n('%1 %2 from %3', array($r->firstname, $r->lastname, $r->organization))); - $rep->addText(i18n('Phone: %1 Email: %2', array($r->phone, $r->email))); - } - } else { - $rep->addText(i18n('No mentors')); - } - - $rep->nextline(); - $rep->heading(i18n('Project Summary')); - $rep->nextline(); - $rep->addText($proj->summary); - - if ($projectcount != $totalprojects) - $rep->newPage(); -} - -$rep->output(); -?> diff --git a/admin/reports_projects_judges_teams.php b/admin/reports_projects_judges_teams.php deleted file mode 100644 index e1714fe4..00000000 --- a/admin/reports_projects_judges_teams.php +++ /dev/null @@ -1,153 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -newPage(); - $rep->setFontSize(11); -} else if ($type == 'csv') { - $rep = new lcsv(i18n('Project Judging Team Assignments')); -} - -$teams = getJudgingTeams(); - -$q = $pdo->prepare("SELECT DISTINCT(date) AS d FROM judges_timeslots WHERE year=?"); -$q->execute([$config['FAIRYEAR']]); -if ($q->rowCount() > 1) - $show_date = true; -else - $show_date = false; - -$projq = $pdo->prepare("SELECT - registrations.id AS reg_id, - registrations.num AS reg_num, - projects.id, - projects.title, - projects.projectnumber, - projects.projectdivisions_id, - projects.projectcategories_id, - projectdivisions.division, - projectcategories.category - FROM - registrations - LEFT JOIN projects ON projects.registrations_id=registrations.id - LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id - LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id - - WHERE - projects.year=? - AND projectdivisions.year=? - AND projectcategories.year=? - AND ( registrations.status='complete' - \t OR registrations.status='paymentpending' ) - ORDER BY - projects.projectnumber - "); -$projq->execute([$config['FAIRYEAR'],$config['FAIRYEAR'],$config['FAIRYEAR']]); -show_pdo_errors_if_any($pdo); - -while ($proj = $projq->fetch(PDO::FETCH_OBJ)) { - $rep->heading('(' . $proj->projectnumber . ') ' . $proj->title); - - $sq = $pdo->prepare("SELECT students.firstname, - students.lastname - FROM - students - WHERE - students.registrations_id=? - "); - $sq->execute([$proj->reg_id]); - - $students = ''; - $studnum = 0; - while ($studentinfo = $sq->fetch(PDO::FETCH_OBJ)) { - if ($studnum > 0) - $students .= ', '; - $students .= "$studentinfo->firstname $studentinfo->lastname"; - $studnum++; - } - $rep->addText($students); - $rep->nextLine(); - - $table = array(); - $table['header'] = array(i18n('Timeslot'), i18n('Judging Team')); - if ($show_date) - $table['widths'] = array(2.5, 4.5); - else - $table['widths'] = array(1.5, 5.5); - - $table['dataalign'] = array('center', 'left'); - - // get the timeslots that this project has assigned to been judged. - $q = $pdo->prepare("SELECT - judges_timeslots.date, - judges_timeslots.starttime, - judges_timeslots.endtime, - judges_teams.name - FROM - judges_teams_timeslots_projects_link - LEFT JOIN judges_timeslots ON judges_teams_timeslots_projects_link.judges_timeslots_id=judges_timeslots.id - LEFT JOIN judges_teams ON judges_teams_timeslots_projects_link.judges_teams_id=judges_teams.id - WHERE - judges_teams_timeslots_projects_link.projects_id=? - AND judges_teams_timeslots_projects_link.year=? - ORDER BY - date,starttime - "); - $q->execute([$proj->id,$config['FAIRYEAR']]); - $numslots = $q->rowCount(); - - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($show_date) - $timeslot = format_date($r->date) . ' '; - else - $timeslot = ''; - $timeslot .= format_time($r->starttime) . ' - ' . format_time($r->endtime); - - $table['data'][] = array($timeslot, $r->name); - } - $rep->addTable($table); - $rep->newPage(); - unset($table); -} - -$rep->output(); -?> diff --git a/admin/reports_schools.inc.php b/admin/reports_schools.inc.php deleted file mode 100644 index 91c95171..00000000 --- a/admin/reports_schools.inc.php +++ /dev/null @@ -1,224 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -function reports_schools_principal($report, $field, $text) -{ - $year = $report['year']; - if ($text > 0) { /* text is the uid */ - $u = user_load_by_uid_year($text, $year); - return $u['name']; - } - return ''; -} - -function reports_schools_sciencehead($report, $field, $text) -{ - $year = $report['year']; - if ($text > 0) { /* text is the uid */ - $u = user_load_by_uid_year($text, $year); - return i18n('%1 or Science Department Head', array($u['name'])); - } - return i18n('Science Department Head'); -} - -function reports_schools_shphone($report, $field, $text) -{ - $year = $report['year']; - if ($text > 0) { /* text is the uid */ - $u = user_load_by_uid_year($text, $year); - return $u['phonework']; - } - return ''; -} - -function reports_schools_shemail($report, $field, $text) -{ - $year = $report['year']; - if ($text > 0) { /* text is the uid */ - $u = user_load_by_uid_year($text, $year); - return $u['email']; - } - return ''; -} - -$report_schools_fields = array( - 'school' => array( - 'name' => 'School -- Name', - 'header' => 'School Name', - 'width' => 2.25, - 'table' => 'schools.school' - ), - 'schooladdr' => array( - 'name' => 'School -- Full Address', - 'header' => 'School Address', - 'width' => 3.0, - 'table' => "CONCAT(schools.address, ', ', schools.city, ', ', schools.province_code, ', ', schools.postalcode)" - ), - 'school_phone' => array( - 'name' => 'School -- Phone', - 'header' => 'School Phone', - 'width' => 1, - 'table' => 'schools.phone' - ), - 'school_fax' => array( - 'name' => 'School -- Fax', - 'header' => 'School Fax', - 'width' => 1, - 'table' => 'schools.fax' - ), - 'school_email' => array( - 'name' => 'School -- Email', - 'header' => 'School Email', - 'width' => 1, - 'table' => 'schools.schoolemail' - ), - 'school_address' => array( - 'name' => 'School Address -- Street Address', - 'header' => 'Address', - 'width' => 2.0, - 'table' => 'schools.address' - ), - 'school_city' => array( - 'name' => 'School Address -- City', - 'header' => 'City', - 'width' => 1.5, - 'table' => 'schools.city' - ), - 'school_province' => array( - 'name' => 'School Address -- ' . $config['provincestate'], - 'header' => $config['provincestate'], - 'width' => 0.75, - 'table' => 'schools.province_code' - ), - 'school_city_prov' => array( - 'name' => 'School Address -- City, ' . $config['provincestate'] . ' (for mailing)', - 'header' => 'City', - 'width' => 1.5, - 'table' => "CONCAT(schools.city, ', ', schools.province_code)" - ), - 'school_postal' => array( - 'name' => 'School Address -- ' . $config['postalzip'], - 'header' => $config['postalzip'], - 'width' => 0.75, - 'table' => 'schools.postalcode' - ), - 'school_lang' => array( - 'name' => 'School -- Language Code', - 'header' => 'Lang', - 'width' => 0.5, - 'table' => 'schools.schoollang' - ), - 'school_level' => array( - 'name' => 'School -- Grade Levels', - 'header' => 'Level', - 'width' => 1.0, - 'table' => 'schools.schoollevel' - ), - 'school_board' => array( - 'name' => 'School -- Board', - 'header' => 'Board', - 'width' => 1.0, - 'table' => 'schools.board' - ), - 'school_district' => array( - 'name' => 'School -- District', - 'header' => 'District', - 'width' => 1.0, - 'table' => 'schools.district' - ), - 'school_principal' => array( - 'name' => 'School -- Principal', - 'header' => 'Principal', - 'width' => 1.25, - 'table' => 'schools.principal_uid', - 'exec_function' => 'reports_schools_principal' - ), - 'school_sh' => array( - 'name' => 'School -- Science Head', - 'header' => 'Science Head', - 'width' => 1.25, - 'table' => 'schools.sciencehead_uid', - 'exec_function' => 'reports_schools_sciencehead' - ), - 'school_shphone' => array( - 'name' => 'School -- Science Head Phone', - 'header' => 'Science Hd Phone', - 'width' => 1, - 'table' => 'schools.sciencehead_uid', - 'exec_function' => 'reports_schools_shphone' - ), - 'school_shemail' => array( - 'name' => 'School -- Science Head Email', - 'header' => 'Science Head Email', - 'width' => 1.5, - 'table' => 'schools.sciencehead_uid', - 'exec_function' => 'reports_schools_shemail' - ), - 'school_accesscode' => array( - 'name' => 'School -- Access Code', - 'header' => 'Access Code', - 'width' => 1.1, - 'table' => 'schools.accesscode' - ), - 'school_registration_password' => array( - 'name' => 'School -- Registration Password', - 'header' => 'Reg Pass', - 'width' => 0.75, - 'table' => 'schools.registration_password' - ), - 'school_project_limit' => array( - 'name' => 'School -- Project Limit', - 'header' => 'Limit', - 'width' => 0.75, - 'table' => 'schools.projectlimit' - ), - 'school_project_limit_per' => array( - 'name' => 'School -- Project Limit Per', - 'header' => 'Limit Per', - 'width' => 1.0, - 'table' => 'schools.projectlimitper' - ), -); - -function report_schools_fromwhere($report, $components) -{ - global $config, $report_schools_fields; - - $fields = $report_schools_fields; - $year = $report['year']; - - $q = " FROM - schools - WHERE - schools.year='$year' - "; - - return $q; -} - -?> diff --git a/admin/reports_students.inc.php b/admin/reports_students.inc.php deleted file mode 100644 index 6bfe34e7..00000000 --- a/admin/reports_students.inc.php +++ /dev/null @@ -1,1257 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -// This file was modified Jan of 2014 by Richard Sin -// Project Type has been added to the list. -// Cheque Splitting algorithm is added. - -function report_students_i18n_fr($report, $field, $text) -{ - return i18n($text, array(), array(), 'fr'); -} - -function report_student_cash_words($report, $field, $text) -{ - return wordify($text, true); -} - -function report_student_cash_cheque($report, $field, $text) -{ - return sprintf('$***%0.2f', $text); -} - -function report_student_get_date_today($report, $field, $text) -{ - return format_date(time()); -} - -function report_student_get_date_today_for_cheques($report, $field, $text) -{ - global $config; - $format = $config['cheque_date_format']; - $format = str_replace(array('YYYY', 'MM', 'DD'), array('Y', 'm', 'd'), $format); - if (!(strlen($format) == 3 && strstr('Y', $format) !== null && strstr('m', $format) !== null && strstr('d', $format) !== null)) { - $format = 'Ymd'; - } - return implode(' ', preg_split('//', date($format), -1)); -} - -function report_student_get_cheque_date_format($report, $field, $text) -{ - global $config; - return implode(' ', preg_split('//', $config['cheque_date_format'], -1)); -} - -function report_student_safety_question($report, $field, $text) -{ - global $pdo; - /* Field is 'safetyquestion_x', registration_id is passed in $text */ - $q_ord = intval(substr($field, 15)); - $regid = $text; - - // safetyquestions start counting 1-10, but when we LIMIT, we need to index on 0-9 - $q_ord--; - - $q = $pdo->prepare("SELECT safetyquestions.question, - safety.answer - FROM safetyquestions - JOIN safety ON safetyquestions.id=safety.safetyquestions_id - WHERE safety.registrations_id=? - ORDER BY safetyquestions.ord LIMIT $q_ord,1"); - $q->execute([$regid]); - - $r = $q->fetch(PDO::FETCH_OBJ); - return $r->answer; -} - -function reports_students_numstudents($report, $field, $text) -{ - global $pdo; - $year = $report['year']; - $q = $pdo->prepare("SELECT students.id FROM students - WHERE students.registrations_id=? - AND students.year=?"); - $q->execute([$text,$year]); - return $q->rowCount(); -} - -function reports_students_award_selfnom_num($report, $field, $text, $n) -{ - global $pdo; - $year = $report['year']; - $q = $pdo->prepare("SELECT award_awards.name FROM - projects - LEFT JOIN project_specialawards_link ON project_specialawards_link.projects_id=projects.id - LEFT JOIN award_awards ON award_awards.id=project_specialawards_link.award_awards_id - WHERE projects.id=? - AND projects.year=? - AND project_specialawards_link.year=? - LIMIT ?,1"); - $q->execute([$text,$year,$year,$n]); - show_pdo_errors_if_any($pdo); - $i = $q->fetch(PDO::FETCH_OBJ); - return $i['name']; -} - -function reports_students_award_selfnom_1($report, $field, $text) -{ - return reports_students_award_selfnom_num($report, $field, $text, 0); -} - -function reports_students_award_selfnom_2($report, $field, $text) -{ - return reports_students_award_selfnom_num($report, $field, $text, 1); -} - -function reports_students_award_selfnom_3($report, $field, $text) -{ - return reports_students_award_selfnom_num($report, $field, $text, 2); -} - -function reports_students_award_selfnom_4($report, $field, $text) -{ - return reports_students_award_selfnom_num($report, $field, $text, 3); -} - -function reports_students_award_selfnom_5($report, $field, $text) -{ - return reports_students_award_selfnom_num($report, $field, $text, 4); -} - -function reports_students_school_principal($report, $field, $text) -{ - $year = $report['year']; - if ($text > 0) { /* text is the uid */ - $u = user_load_by_uid_year($text, $year); - return $u['name']; - } - return ''; -} - -function report_student_regfee_item($report, $field, $text) -{ - $year = $report['year']; - $id = intval(substr($field, 12)); - $q = $pdo->prepare("SELECT regfee_items_id FROM regfee_items_link WHERE students_id=? AND regfee_items_id=?"); - $q->execute([$text,$id]); - show_pdo_errors_if_any($pdo); - if ($r = $q->fetch(PDO::FETCH_OBJ)) { - return i18n('Yes'); - } else { - return i18n('No'); - } -} - -$q = $pdo->prepare("SELECT * FROM regfee_items WHERE year=?"); -$q->execute([$config['FAIRYEAR']]); -$regfeeitems = array(); -$first = true; -while ($i = $q->fetch(PDO::FETCH_ASSOC)) { - $regfeeitems['regfee_item_' . $i['id']] = array( - 'name' => "Registration Fee Items -- {$i['name']}", - 'header' => $i['name'], - 'width' => 1, - 'table' => 'students.id', - 'table_sort' => 'students.id', - 'exec_function' => 'report_student_regfee_item' - ); - - if ($first) - $regfeeitems['regfee_item_' . $i['id']] = array_merge($regfeeitems['regfee_item_' . $i['id']], array('start_option_group' => 'Registration Fee Items')); - $first = false; -} - -$report_students_fields = array( - 'pn' => array( - 'name' => 'Project Number', - 'header' => '#', - 'width' => 0.7, - 'table' => 'projects.projectnumber', - 'table_sort' => 'projects.projectsort, projects.projectnumber' - ), - 'projectbarcode' => array( - 'name' => 'Project Barcode', - 'header' => 'Barcode', - 'width' => 1, - 'table' => 'projects.projectnumber', - 'table_sort' => 'projects.projectsort, projects.projectnumber', - ), - 'last_name' => array( - 'start_option_group' => 'Student Name Information', - 'name' => 'Student -- Last Name', - 'header' => 'Last Name', - 'width' => 1.0, - 'table' => 'students.lastname' - ), - 'first_name' => array( - 'name' => 'Student -- First Name', - 'header' => 'First Name', - 'width' => 1.0, - 'table' => 'students.firstname' - ), - 'name' => array( - 'name' => 'Student -- Full Name (last, first)', - 'header' => 'Name', - 'width' => 1.75, - 'scalable' => true, - 'table' => "CONCAT(students.lastname, ', ', students.firstname)", - 'table_sort' => 'students.lastname' - ), - 'namefl' => array( - 'name' => 'Student -- Full Name (first last)', - 'header' => 'Name', - 'width' => 1.75, - 'scalable' => true, - 'table' => "CONCAT(students.firstname, ' ', students.lastname)", - 'table_sort' => 'students.lastname' - ), - 'partner' => array( - 'name' => 'Student -- Partner Name (last, first)', - 'header' => 'Partner', - 'width' => 1.5, - 'scalable' => true, - 'table' => "CONCAT(students2.lastname, ', ', students2.firstname)", - 'components' => array('partner') - ), - 'partnerfl' => array( - 'name' => 'Student -- Partner Name (first last)', - 'header' => 'Partner', - 'width' => 1.5, - 'scalable' => true, - 'table' => "CONCAT(students2.firstname, ' ', students2.lastname)", - 'components' => array('partner') - ), - 'bothnames' => array( - 'name' => 'Student -- Both Student Names', - 'header' => 'Student(s)', - 'width' => 3.0, - 'scalable' => true, - 'table' => "CONCAT(students.firstname, ' ', students.lastname, IF(students2.lastname IS NULL,'', CONCAT(', ', students2.firstname, ' ', students2.lastname)))", - 'table_sort' => 'students.lastname', - 'components' => array('partner') - ), - 'allnames' => array( - 'name' => 'Student -- All Student Names (REQUIRES MYSQL 5.0) ', - 'header' => 'Student(s)', - 'width' => 3.0, - 'scalable' => true, - 'table' => "GROUP_CONCAT(students.firstname, ' ', students.lastname ORDER BY students.lastname SEPARATOR ', ')", - 'group_by' => array('students.registrations_id') - ), - 'allnames_split' => array( - 'name' => 'Student -- All Student Names (REQUIRES 5.0) (Split) ', - 'header' => 'Student(s)', - 'width' => 3.0, - 'scalable' => true, - 'table' => "CONCAT(students.firstname, ' ', students.lastname)", - ), - 'pronunciation' => array( - 'name' => 'Student -- Name Pronunciation', - 'header' => 'Pronunciation', - 'width' => 2.0, - 'table' => 'students.pronunciation' - ), - 'email' => array( - 'start_option_group' => 'Student Contact Information', - 'name' => 'Student -- Email', - 'header' => 'Email', - 'width' => 2.25, - 'scalable' => true, - 'table' => 'students.email' - ), - 'phone' => array( - 'name' => 'Student -- Phone', - 'header' => 'Phone', - 'width' => 1.0, - 'table' => 'students.phone' - ), - 'address' => array( - 'name' => 'Student -- Street Address', - 'header' => 'Address', - 'width' => 2.0, - 'scalable' => true, - 'table' => 'students.address' - ), - 'city' => array( - 'name' => 'Student -- City', - 'header' => 'City', - 'width' => 1.5, - 'table' => 'students.city' - ), - 'county' => array( - 'name' => 'Student -- County', - 'header' => 'County', - 'width' => 1.5, - 'table' => 'students.county' - ), - 'province' => array( - 'name' => 'Student -- ' . $config['provincestate'], - 'header' => $config['provincestate'], - 'width' => 0.75, - 'table' => 'students.province' - ), - 'postal' => array( - 'name' => 'Student -- ' . $config['postalzip'], - 'header' => $config['postalzip'], - 'width' => 0.75, - 'table' => 'students.postalcode' - ), - 'address_full' => array( - 'name' => 'Student -- Full Address', - 'header' => 'Address', - 'width' => 3.0, - 'scalable' => true, - 'table' => "CONCAT(students.address, ', ', students.city, ', ', students.province, ', ', students.postalcode)" - ), - 'address_full_with_county' => array( - 'name' => 'Student -- Full Address Including County', - 'header' => 'Address', - 'width' => 3.0, - 'scalable' => true, - 'table' => "CONCAT(students.address, ', ', students.city, ', ', students.county, ', ', students.province, ', ', students.postalcode)" - ), - 'grade' => array( - 'start_option_group' => 'Other Student Information', - 'name' => 'Student -- Grade', - 'header' => 'Gr.', - 'width' => 0.3, - 'table' => 'students.grade' - ), - 'grade_str' => array( - 'name' => 'Student -- Grade ("Grade x", not just the number)', - 'header' => 'Gr.', - 'width' => 0.3, - 'table_sort' => 'students.grade', - 'table' => "CONCAT('Grade ', students.grade)" - ), - 'gender' => array( - 'name' => 'Student -- Gender', - 'header' => 'Gender', - 'width' => 0.5, - 'table' => 'students.sex', - 'value_map' => array('male' => 'Male', 'female' => 'Female') - ), - 'birthdate' => array( - 'name' => 'Student -- Birthdate', - 'header' => 'Birthdate', - 'width' => 0.9, - 'table' => 'students.dateofbirth' - ), - 'age' => array( - 'name' => 'Student -- Age (when this report is created)', - 'header' => 'Age', - 'width' => 0.4, - 'table' => "DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(students.dateofbirth)), '%Y')+0", - 'table_sort' => 'students.dateofbirth' - ), - 'tshirt' => array( - 'name' => 'Student -- T-Shirt Size', - 'header' => 'T-Shirt', - 'width' => 0.7, - 'table' => 'students.tshirt', - 'value_map' => array('none' => '', 'xsmall' => 'X-Small', 'small' => 'Small', 'medium' => 'Medium', - 'large' => 'Large', 'xlarge' => 'X-Large') - ), - 'medicalalert' => array( - 'name' => 'Student -- Medical Alert Info', - 'header' => 'medical', - 'width' => 2.0, - 'table' => 'students.medicalalert' - ), - 'foodreq' => array( - 'name' => 'Student -- Food Requirements', - 'header' => 'Food.Req.', - 'width' => 2.0, - 'table' => 'students.foodreq' - ), - 'registrations_num' => array( - 'start_option_group' => 'Student Registration Information', - 'name' => 'Student -- Registration Number', - 'header' => 'RegNum', - 'width' => 1, - 'table' => 'registrations.num' - ), - 'paid' => array( - 'name' => 'Paid', - 'header' => 'Paid', - 'width' => '0.4', - 'table' => 'registrations.status', - 'value_map' => array('complete' => '', 'paymentpending' => 'No') - ), - /* Project Information */ - 'title' => array( - 'start_option_group' => 'Project Information', - 'name' => 'Project -- Title', - 'header' => 'Project Title', - 'width' => 2.75, - 'scalable' => true, - 'table' => 'projects.title' - ), - 'shorttitle' => array( - 'name' => 'Project -- Short Title', - 'header' => 'Short Title', - 'width' => 2, - 'table' => 'projects.shorttitle' - ), - 'division' => array( - 'name' => 'Project -- Division', - 'header' => 'Division', - 'width' => 1.0, - 'table' => 'projectdivisions.division' - ), - 'projecttype' => array( - 'name' => 'Project -- Type', - 'header' => 'Type', - 'width' => 1.0, - 'table' => 'projects.projecttype' - ), - 'div' => array( - 'name' => 'Project -- Division Short Form', - 'header' => 'Div', - 'width' => 0.4, - 'table' => 'projectdivisions.division_shortform' - ), - 'fr_division' => array( - 'name' => 'Project -- Division (French)', - 'header' => i18n('Division', array(), array(), 'fr'), - 'width' => 3.0, - 'table' => 'projectdivisions.division', - 'exec_function' => 'report_students_i18n_fr' - ), - 'category' => array( - 'name' => 'Project -- Category', - 'header' => 'Category', - 'width' => 1, - 'table_sort' => 'projectcategories.id', - 'table' => 'projectcategories.category' - ), - 'cat' => array( - 'name' => 'Project -- Category Short Form', - 'header' => 'cat', - 'width' => 0.4, - 'table' => 'projectcategories.category_shortform' - ), - 'fr_category' => array( - 'name' => 'Project -- Category (French)', - 'header' => i18n('Category', array(), array(), 'fr'), - 'width' => 1, - 'table_sort' => 'projectcategories.id', - 'table' => 'projectcategories.category', - 'exec_function' => 'report_students_i18n_fr' - ), - 'categorydivision' => array( - 'name' => 'Project -- Category and Division', - 'header' => 'Category/Division', - 'width' => 3.5, - 'table_sort' => 'projectcategories.id', - 'table' => "CONCAT(projectcategories.category,' - ', projectdivisions.division)" - ), - 'divisioncategory' => array( - 'name' => 'Project -- Division and Category', - 'header' => 'Division/Category', - 'width' => 3.5, - 'table_sort' => 'projectdivisions.id', - 'table' => "CONCAT(projectdivisions.division,' - ',projectcategories.category)" - ), - 'summary' => array( - 'name' => 'Project -- Summary', - 'header' => 'Project Summary', - 'width' => 4.0, - 'scalable' => true, - 'table' => 'projects.summary' - ), - 'title_summary' => array( - 'name' => 'Project -- Title and Summary', - 'header' => 'Project Title and Summary', - 'width' => 5.0, - 'scalable' => true, - 'table' => "CONCAT('Title: ', projects.title, '\n',projects.summary)" - ), - 'language' => array( - 'name' => 'Project -- Language', - 'header' => 'Lang', - 'width' => 1.0, - 'table' => 'projects.language' - ), - 'numstudents' => array( - 'name' => 'Project -- Number of Students', - 'header' => 'Stu.', - 'width' => 0.5, - 'table' => 'students.registrations_id', - 'exec_function' => 'reports_students_numstudents' - ), - 'rank' => array( - 'name' => 'Project -- Rank (left blank for judges to fill out)', - 'header' => 'Rank', - 'width' => 1.0, - 'table' => '""' - ), - 'req_elec' => array( - 'name' => 'Project -- If the project requires electricity', - 'header' => 'Elec', - 'width' => 0.5, - 'table' => 'projects.req_electricity', - 'value_map' => array('no' => '', 'yes' => 'Yes') - ), - 'req_table' => array( - 'name' => 'Project -- If the project requires a table', - 'header' => 'Table', - 'width' => 0.5, - 'table' => 'projects.req_table', - 'value_map' => array('no' => '', 'yes' => 'Yes') - ), - 'human_participants' => array( - 'name' => 'Project -- If the project uses human participants', - 'header' => 'Human Par.', - 'width' => 0.5, - 'table' => 'projects.human_participants', - 'value_map' => array('no' => 'No', 'yes' => 'Yes') - ), - 'animal_participants' => array( - 'name' => 'Project -- If the project requires animals', - 'header' => 'animal Par', - 'width' => 0.5, - 'table' => 'projects.animal_participants', - 'value_map' => array('no' => 'No', 'yes' => 'Yes') - ), - 'req_special' => array( - 'name' => 'Project -- Any special requirements the project has', - 'header' => 'Special Requirements', - 'width' => 3, - 'table' => 'projects.req_special' - ), - 'safetyquestion_1' => array( - 'start_option_group' => 'Project Safety Questions', - 'name' => 'Project Safety -- Safety Question 1', - 'header' => 'Q1', - 'width' => 15, /* mm */ - 'table' => 'registrations.id', - 'exec_function' => 'report_student_safety_question' - ), - 'safetyquestion_2' => array( - 'name' => 'Project Safety -- Safety Question 2', - 'header' => 'Q2', - 'width' => 15, /* mm */ - 'table' => 'registrations.id', - 'exec_function' => 'report_student_safety_question' - ), - 'safetyquestion_3' => array( - 'name' => 'Project Safety -- Safety Question 3', - 'header' => 'Q3', - 'width' => 15, /* mm */ - 'table' => 'registrations.id', - 'exec_function' => 'report_student_safety_question' - ), - 'safetyquestion_4' => array( - 'name' => 'Project Safety -- Safety Question 4', - 'header' => 'Q4', - 'width' => 15, /* mm */ - 'table' => 'registrations.id', - 'exec_function' => 'report_student_safety_question' - ), - 'safetyquestion_5' => array( - 'name' => 'Project Safety -- Safety Question 5', - 'header' => 'Q5', - 'width' => 15, /* mm */ - 'table' => 'registrations.id', - 'exec_function' => 'report_student_safety_question' - ), - 'safetyquestion_6' => array( - 'name' => 'Project Safety -- Safety Question 6', - 'header' => 'Q6', - 'width' => 15, /* mm */ - 'table' => 'registrations.id', - 'exec_function' => 'report_student_safety_question' - ), - 'safetyquestion_7' => array( - 'name' => 'Project Safety -- Safety Question 7', - 'header' => 'Q7', - 'width' => 15, /* mm */ - 'table' => 'registrations.id', - 'exec_function' => 'report_student_safety_question' - ), - 'safetyquestion_8' => array( - 'name' => 'Project Safety -- Safety Question 8', - 'header' => 'Q8', - 'width' => 15, /* mm */ - 'table' => 'registrations.id', - 'exec_function' => 'report_student_safety_question' - ), - 'safetyquestion_9' => array( - 'name' => 'Project Safety -- Safety Question 9', - 'header' => 'Q9', - 'width' => 15, /* mm */ - 'table' => 'registrations.id', - 'exec_function' => 'report_student_safety_question' - ), - 'safetyquestion_10' => array( - 'name' => 'Project Safety -- Safety Question 10', - 'header' => 'Q10', - 'width' => 15, /* mm */ - 'table' => 'registrations.id', - 'exec_function' => 'report_student_safety_question' - ), - 'school' => array( - 'start_option_group' => 'School Information', - 'name' => 'School -- Name', - 'header' => 'School Name', - 'width' => 2.25, - 'scalable' => true, - 'table' => 'schools.school' - ), - 'schooladdr' => array( - 'name' => 'School -- Full Address', - 'header' => 'School Address', - 'width' => 3.0, - 'scalable' => true, - 'table' => "CONCAT(schools.address, ', ', schools.city, ', ', schools.province_code, ', ', schools.postalcode)" - ), - 'teacher' => array( - 'name' => 'School -- Teacher Name (as entered by the student)', - 'header' => 'Teacher', - 'width' => 1.5, - 'table' => 'students.teachername' - ), - 'teacheremail' => array( - 'name' => 'School -- Teacher Email (as entered by the student)', - 'header' => 'Teacher Email', - 'width' => 2.0, - 'table' => 'students.teacheremail' - ), - 'school_phone' => array( - 'name' => 'School -- Phone', - 'header' => 'School Phone', - 'width' => 1, - 'table' => 'schools.phone' - ), - 'school_fax' => array( - 'name' => 'School -- Fax', - 'header' => 'School Fax', - 'width' => 1, - 'table' => 'schools.fax' - ), - 'school_address' => array( - 'name' => 'School -- Street Address', - 'header' => 'Address', - 'width' => 2.0, - 'table' => 'schools.address' - ), - 'school_city' => array( - 'name' => 'School -- City', - 'header' => 'City', - 'width' => 1.0, - 'table' => 'schools.city' - ), - 'school_province' => array( - 'name' => 'School -- ' . $config['provincestate'], - 'header' => $config['provincestate'], - 'width' => 0.75, - 'table' => 'schools.province_code' - ), - 'school_city_prov' => array( - 'name' => 'School -- City, ' . $config['provincestate'] . ' (for mailing)', - 'header' => 'City', - 'width' => 1.5, - 'table' => "CONCAT(schools.city, ', ', schools.province_code)" - ), - 'school_postal' => array( - 'name' => 'School -- ' . $config['postalzip'], - 'header' => $config['postalzip'], - 'width' => 0.75, - 'table' => 'schools.postalcode' - ), - 'school_principal' => array( - 'name' => 'School -- Principal', - 'header' => 'Principal', - 'width' => 1.25, - 'table' => 'schools.principal_uid', - 'exec_function' => 'reports_students_school_principal' - ), - 'school_board' => array( - 'name' => 'School -- Board ID', - 'header' => 'Board', - 'width' => 0.75, - 'table' => 'schools.board' - ), - 'awards' => array( - 'start_option_group' => 'Awards assigned to student (warning: duplicates student entries for multiple awards won!)', - 'name' => 'Award -- Type + Name', - 'header' => 'Award Name', - 'width' => 4, - 'table' => "CONCAT(IF(award_types.type='Other','Special',award_types.type),' ', award_awards.name)", - 'table_sort' => 'award_awards.name', - 'components' => array('awards') - ), - 'award_name' => array( - 'name' => 'Award -- Name', - 'header' => 'Award Name', - 'width' => 4, - 'table' => 'award_awards.name', - 'components' => array('awards') - ), - 'award_excludefromac' => array( - 'name' => 'Award -- Exclude from Award Ceremony (Yes/No)', - 'header' => 'Exclude', - 'width' => 0.5, - 'table' => 'award_awards.excludefromac', - 'value_map' => array('no' => 'No', 'yes' => 'Yes') - ), - 'order' => array( - 'name' => 'Award -- Order', - 'header' => 'Award Order', - 'width' => 0.5, - 'table' => 'award_awards.order', - 'table_sort' => 'award_awards.order', - 'components' => array('awards') - ), - 'award_prize_script_order' => array( - 'name' => 'Award -- Script Order', - 'header' => 'Prize Script Order', - 'width' => 4, - 'table' => 'award_prizes.id', - 'table_sort' => 'award_prizes.id DESC', - 'components' => array('awards') - ), - 'award_type' => array( - 'name' => 'Award -- Type (Divisional, Special, etc.)', - 'header' => 'Award Type', - 'width' => 1, - 'table' => 'award_types.type', - 'components' => array('awards') - ), - 'sponsor' => array( - 'name' => 'Award -- Sponsor DB ID', - 'header' => 'Award Sponsor', - 'width' => 1.5, - 'table' => 'award_awards.sponsors_id', - 'table_sort' => 'award_awards.sponsors_id', - 'components' => array('awards') - ), - 'pn_awards' => array( - 'name' => 'Award -- Project Num + Award Name (will be unique for each award)', - 'header' => 'Award Name', - 'width' => 4, - 'table' => "CONCAT(projects.projectnumber,' ', award_awards.name)", - 'table_sort' => 'award_awards.order', - 'components' => array('awards') - ), - 'award_prize_name' => array( - 'name' => 'Award -- Prize Name', - 'header' => 'Prize Name', - 'width' => 2, - 'table' => 'award_prizes.prize', - 'components' => array('awards') - ), - 'award_prize_cash' => array( - 'name' => 'Award -- Prize Cash Amount', - 'header' => 'Cash', - 'width' => 0.5, - 'table' => 'award_prizes.cash', - 'components' => array('awards') - ), - 'award_prize_cash_split' => array( - 'name' => 'Award -- Prize Cash Amount (Split)', - 'header' => 'Cash', - 'width' => 0.5, - 'table' => 'award_prizes.cash/a.count', - 'components' => array('awards') - ), - 'award_prize_cash_cheque' => array( - 'name' => 'Award -- Prize Cash Amount for Cheques', - 'header' => 'Cash', - 'width' => 0.5, - 'table' => 'award_prizes.cash', - 'components' => array('awards'), - 'exec_function' => 'report_student_cash_cheque' - ), - 'award_prize_cash_cheque_split' => array( - 'name' => 'Award -- Prize Cash Amount for Cheques (Split)', - 'header' => 'Cash', - 'width' => 0.5, - 'table' => 'award_prizes.cash/a.count', - 'components' => array('awards'), - 'exec_function' => 'report_student_cash_cheque' - ), - 'award_prize_cash_words' => array( - 'name' => 'Award -- Prize Cash Amount In Words', - 'header' => 'Cash', - 'width' => 0.5, - 'table' => 'award_prizes.cash', - 'components' => array('awards'), - 'exec_function' => 'report_student_cash_words' - ), - 'award_prize_cash_words_split' => array( - 'name' => 'Award -- Prize Cash Amount In Words (Split)', - 'header' => 'Cash', - 'width' => 0.5, - 'table' => 'award_prizes.cash/a.count', - 'components' => array('awards'), - 'exec_function' => 'report_student_cash_words' - ), - 'award_prize_scholarship' => array( - 'name' => 'Award -- Prize Scholarship Amount', - 'header' => 'Scholarship', - 'width' => 0.75, - 'table' => 'award_prizes.scholarship', - 'components' => array('awards') - ), - 'award_prize_value' => array( - 'name' => 'Award -- Prize Value Amount', - 'header' => 'Value', - 'width' => 0.5, - 'table' => 'award_prizes.value', - 'components' => array('awards') - ), - 'award_prize_fullname' => array( - 'name' => 'Award -- Prize Name, Category, Division', - 'header' => 'Prize Name', - 'width' => 4, - 'table' => "CONCAT(award_prizes.prize,' in ',projectcategories.category,' ', projectdivisions.division)", - 'table_sort' => 'award_prizes.order', - 'components' => array('awards') - ), - 'award_prize_trophy_any' => array( - 'name' => "Award -- Trophy ('Yes' if the award has a trophy)", - 'header' => 'Trophy', - 'width' => 0.5, - 'table' => "IF ( award_prizes.trophystudentkeeper=1 - OR award_prizes.trophystudentreturn=1 - OR award_prizes.trophyschoolkeeper=1 - OR award_prizes.trophyschoolreturn=1, 'Yes', 'No')", - 'components' => array('awards') - ), - 'award_prize_trophy_return' => array( - 'name' => "Award -- Annual Trophy ('Yes' if the award has a school or student trophy that isn't a keeper)", - 'header' => 'Trophy', - 'width' => 0.5, - 'table' => "IF ( award_prizes.trophystudentreturn=1 - OR award_prizes.trophyschoolreturn=1, 'Yes', 'No')", - 'components' => array('awards') - ), - 'award_prize_trophy_return_student' => array( - 'name' => "Award -- Annual Student Trophy ('Yes' if the award has astudent trophy that isn't a keeper)", - 'header' => 'Ind.', - 'width' => 0.5, - 'table' => "IF ( award_prizes.trophystudentreturn=1, 'Yes', 'No')", - 'components' => array('awards') - ), - 'award_prize_trophy_return_school' => array( - 'name' => "Award -- Annual School Trophy ('Yes' if the award has a school trophy that isn't a keeper)", - 'header' => 'Sch.', - 'width' => 0.5, - 'table' => "IF ( award_prizes.trophyschoolreturn=1, 'Yes', 'No')", - 'components' => array('awards') - ), - 'nom_awards' => array( - 'start_option_group' => 'Nominated Awards (warning: duplicates student for multiple awards!)', - 'name' => 'Award Nominations -- Award Name', - 'header' => 'Award Name', - 'width' => 4, - 'table' => "CONCAT(award_types.type,' -- ',award_awards.name)", - 'table_sort' => 'award_awards.name', - 'components' => array('awards_nominations') - ), - 'nom_pn_awards' => array( - 'name' => 'Award Nominations -- Project Num + Award Name(will be unique)', - 'header' => 'Award Name', - 'width' => 4, - 'table' => "CONCAT(projects.projectnumber,' ', award_awards.name)", - 'table_sort' => 'award_awards.name', - 'components' => array('awards_nominations') - ), - 'nom_awards_name_1' => array( - 'name' => 'Award Nominations -- Self-Nominated Special Award 1', - 'header' => 'Award Name', - 'width' => 3, - 'table' => 'projects.id', - 'table_sort' => 'projects.id', - 'exec_function' => 'reports_students_award_selfnom_1' - ), - 'nom_awards_name_2' => array( - 'name' => 'Award Nominations -- Self-Nominated Special Award 2', - 'header' => 'Award Name', - 'width' => 3, - 'table' => 'projects.id', - 'table_sort' => 'projects.id', - 'exec_function' => 'reports_students_award_selfnom_2' - ), - 'nom_awards_name_3' => array( - 'name' => 'Award Nominations -- Self-Nominated Special Award 3', - 'header' => 'Award Name', - 'width' => 3, - 'table' => 'projects.id', - 'table_sort' => 'projects.id', - 'exec_function' => 'reports_students_award_selfnom_3' - ), - 'nom_awards_name_4' => array( - 'name' => 'Award Nominations -- Self-Nominated Special Award 4', - 'header' => 'Award Name', - 'width' => 3, - 'table' => 'projects.id', - 'table_sort' => 'projects.id', - 'exec_function' => 'reports_students_award_selfnom_4' - ), - 'nom_awards_name_5' => array( - 'name' => 'Award Nominations -- Self-Nominated Special Award 5', - 'header' => 'Award Name', - 'width' => 3, - 'table' => 'projects.id', - 'table_sort' => 'projects.id', - 'exec_function' => 'reports_students_award_selfnom_5' - ), - /* Emergency Contact Info */ - 'emerg_name' => array( - 'start_option_group' => 'Emergency Contact Information', - 'name' => 'Emergency Contact -- Name', - 'header' => 'Contact Name', - 'width' => 1.5, - 'table' => "CONCAT(emergencycontact.firstname, ' ', emergencycontact.lastname)", - 'components' => array('emergencycontacts') - ), - 'emerg_relation' => array( - 'name' => 'Emergency Contact -- Relationship', - 'header' => 'Relation', - 'width' => 1, - 'table' => 'emergencycontact.relation', - 'components' => array('emergencycontacts') - ), - 'emerg_phone' => array( - 'name' => 'Emergency Contact -- Phone', - 'header' => 'Emrg.Phone', - 'width' => 1, - 'table' => "CONCAT(emergencycontact.phone1, ' ', emergencycontact.phone2, ' ', emergencycontact.phone3, ' ', emergencycontact.phone4)", - 'components' => array('emergencycontacts') - ), - 'emerg_email' => array( - 'name' => 'Emergency Contact -- Email', - 'header' => 'Email', - 'width' => 1, - 'table' => 'emergencycontact.email', - 'components' => array('emergencycontacts') - ), - /* Tour Information */ - 'tour_assign_name' => array( - 'start_option_group' => 'Tour Information', - 'name' => 'Tours -- Assigned Tour Name', - 'header' => 'Tour', - 'width' => 4, - 'table' => 'tours.name', - 'components' => array('tours') - ), - 'tour_assign_num' => array( - 'name' => 'Tours -- Assigned Tour Number', - 'header' => 'Tour', - 'width' => 0.5, - 'table' => 'tours.num', - 'components' => array('tours') - ), - 'tour_assign_numname' => array( - 'name' => 'Tours -- Assigned Tour Number and Name', - 'header' => 'Tour', - 'width' => 4, - 'table' => "CONCAT(tours.num,': ', tours.name)", - 'table_sort' => 'tours.num', - 'components' => array('tours') - ), - /* Mentor Information */ - 'mentor_name_proj' => array( - 'start_option_group' => 'Mentor Information', - 'name' => 'Mentor -- Project and Name (Distinct for each Project+Mentor pair)', - 'header' => 'Mentor Name', - 'width' => 1.75, - 'scalable' => true, - 'table' => "CONCAT('projects.projectnumber', ' - ', mentors.firstname, ', ', mentors.lastname)", - 'table_sort' => 'mentors.lastname', - 'components' => array('mentors') - ), - 'mentor_last_name' => array( - 'name' => 'Mentor -- Last Name', - 'header' => 'Last Name', - 'width' => 1.0, - 'table' => 'mentors.lastname', - 'components' => array('mentors') - ), - 'mentor_first_name' => array( - 'name' => 'Mentor -- First Name', - 'header' => 'First Name', - 'width' => 1.0, - 'table' => 'mentors.firstname', - 'components' => array('mentors') - ), - 'mentor_name' => array( - 'name' => 'Mentor -- Full Name (last, first)', - 'header' => 'Mentor Name', - 'width' => 1.75, - 'scalable' => true, - 'table' => "CONCAT(mentors.lastname, ', ', mentors.firstname)", - 'table_sort' => 'mentors.lastname', - 'components' => array('mentors') - ), - 'mentor_namefl' => array( - 'name' => 'Mentor -- Full Name (first last)', - 'header' => 'Mentor Name', - 'width' => 1.75, - 'scalable' => true, - 'table' => "CONCAT(mentors.firstname, ' ', mentors.lastname)", - 'table_sort' => 'mentors.lastname', - 'components' => array('mentors') - ), - 'mentor_email' => array( - 'name' => 'Mentor -- Email', - 'header' => 'Mentor Email', - 'width' => 2.0, - 'scalable' => true, - 'table' => 'mentors.email', - 'components' => array('mentors') - ), - 'mentor_phone' => array( - 'name' => 'Mentor -- Phone', - 'header' => 'Mentor Phone', - 'width' => 1, - 'table' => 'mentors.phone', - 'components' => array('mentors') - ), - 'mentor_organization' => array( - 'name' => 'Mentor -- Organization', - 'header' => 'Mentor Org.', - 'width' => 1.5, - 'scalable' => true, - 'table' => 'mentors.organization', - 'components' => array('mentors') - ), - 'mentor_position' => array( - 'name' => 'Mentor -- Position', - 'header' => 'Position', - 'width' => 1, - 'scalable' => true, - 'table' => 'mentors.position', - 'components' => array('mentors') - ), - 'mentor_description' => array( - 'name' => 'Mentor -- Description of Help', - 'header' => 'Description of Help', - 'width' => 3.0, - 'scalable' => true, - 'table' => 'mentors.description', - 'components' => array('mentors') - ), - /* Fair Information */ - 'feeder_fair_name' => array( - 'start_option_group' => 'Fair Information', - 'name' => 'Feeder Fair -- Name', - 'header' => 'Fair Name', - 'width' => 1.5, - 'table' => 'fairs.name', - 'components' => array('fairs') - ), - 'feeder_fair_abbrv' => array( - 'name' => 'Feeder Fair -- Abbreviation', - 'header' => 'Fair', - 'width' => 0.75, - 'table' => 'fairs.abbrv', - 'components' => array('fairs') - ), - 'fair_year' => array( - 'name' => 'Fair -- Year', - 'header' => 'Year', - 'width' => 0.5, - 'table' => "{$config['FAIRYEAR']}" - ), - 'fair_name' => array( - 'name' => 'Fair -- Name', - 'header' => 'Fair Name', - 'width' => 3, - 'table' => "'" . $config['fairname'] . "'" - ), - 'fair_logo' => array( - 'name' => 'Fair -- Logo (for Labels only)', - 'header' => '', - 'width' => 1, /* mm */ - 'table' => "CONCAT(' ')" - ), - /* Special/Misc/Other */ - 'static_text' => array( - 'start_option_group' => 'Special Fields', - 'name' => 'Label -- Static Text', - 'header' => '', - 'width' => 0.1, - 'table' => "CONCAT(' ')" - ), - 'static_box' => array( - 'name' => 'Label -- Static Box', - 'header' => '', - 'width' => 0.1, - 'table' => "CONCAT(' ')" - ), - 'easyparse_allnames' => array( - 'name' => 'Easy Parse -- All Student Names (REQUIRES MYSQL 5.0) ', - 'header' => 'Student(s)', - 'width' => 3.0, - 'table' => "GROUP_CONCAT(students.lastname, ',', students.firstname ORDER BY students.lastname SEPARATOR ':')", - 'group_by' => array('students.registrations_id') - ), - 'special_tshirt_count' => array( - 'name' => 'Special -- T-Shirt Size Count', - 'header' => 'Count', - 'width' => 0.5, - 'table' => 'COUNT(*)', - 'total' => true, - 'group_by' => array('students.tshirt') - ), - 'current_date' => array( - 'name' => 'Current Date', - 'header' => 'Date', - 'width' => 0.5, - 'table' => "CONCAT(' ')", - 'exec_function' => 'report_student_get_date_today' - ), - 'current_date_for_cheques' => array( - 'name' => 'Current Date for Cheques', - 'header' => 'Date', - 'width' => 0.5, - 'table' => "CONCAT(' ')", - 'exec_function' => 'report_student_get_date_today_for_cheques' - ), - 'current_date_format_for_cheques' => array( - 'name' => 'Current Date Format for Cheques', - 'header' => 'Format', - 'width' => 0.5, - 'table' => "CONCAT(' ')", - 'exec_function' => 'report_student_get_cheque_date_format' - ), -); - -$report_students_fields = array_merge($report_students_fields, $regfeeitems); - -function report_students_fromwhere($report, $components) -{ - global $config, $report_students_fields; - - $fields = $report_students_fields; - $year = $report['year']; - - $awards_join = ''; - $awards_where = ''; - - if (in_array('awards', $components)) { - /* - * This requires some extra gymnastics and will duplicate - * students/projects if they have won multiple awards - */ - $awards_join = 'LEFT JOIN winners ON winners.projects_id = projects.id - LEFT JOIN award_prizes ON award_prizes.id = winners.awards_prizes_id - LEFT JOIN award_awards ON award_awards.id = award_prizes.award_awards_id - LEFT JOIN award_types ON award_types.id=award_awards.award_types_id - LEFT JOIN (SELECT registrations_id AS id, COUNT( * ) AS count - FROM students - GROUP BY registrations_id) a - ON a.id=students.registrations_id'; - $awards_where = " AND winners.year='$year' - AND award_awards.year='$year' - AND award_prizes.year='$year' - AND award_types.year='$year' "; - } - - if (in_array('awards_nominations', $components)) { - $awards_join = 'LEFT JOIN project_specialawards_link - ON(projects.id=project_specialawards_link.projects_id), - award_awards,award_types'; - $awards_where = " AND project_specialawards_link.award_awards_id=award_awards.id - AND award_types.id=award_awards.award_types_id - AND award_awards.year='$year' - AND award_types.year='$year' "; - } - - $partner_join = ''; - if (in_array('partner', $components)) { - $partner_join = 'LEFT JOIN students AS students2 - ON(students2.registrations_id=students.registrations_id - AND students2.id != students.id)'; - } - - $tour_join = ''; - $tour_where = ''; - if (in_array('tours', $components)) { - $tour_join = 'LEFT JOIN tours_choice ON (students.id=tours_choice.students_id AND tours_choice.rank=0), tours'; - $tour_where = "AND tours.year='$year' - AND tours.id=tours_choice.tour_id"; - } - - $emergencycontact_join = ''; - if (in_array('emergencycontacts', $components)) { - /* No need to put the year in here, students.id is unique across years */ - $emergencycontact_join = 'LEFT JOIN emergencycontact ON - emergencycontact.students_id=students.id '; - } - - $mentor_join = ''; - $mentor_where = ''; - if (in_array('mentors', $components)) { - $mentor_join = 'LEFT JOIN mentors ON - mentors.registrations_id=students.registrations_id'; - $mentor_where = "AND mentors.year='$year'"; - } - - $fairs_join = ''; - if (in_array('fairs', $components)) { - $fairs_join = 'LEFT JOIN fairs ON fairs.id=projects.fairs_id'; - } - - if ($report['option']['include_incomplete_registrations'] == 'yes') - $reg_where = ''; - else - $reg_where = "AND (registrations.status='complete' OR registrations.status='paymentpending')"; - - $q = " FROM students - LEFT JOIN registrations ON registrations.id=students.registrations_id - LEFT JOIN schools ON schools.id=students.schools_id - LEFT JOIN projects ON projects.registrations_id=students.registrations_id - LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id - LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id - $emergencycontact_join - $partner_join - $mentor_join - $tour_join - $awards_join - $fairs_join - WHERE - students.year='$year' - AND projects.year='$year' - AND registrations.year='$year' - AND projectcategories.year='$year' - AND projectdivisions.year='$year' - $reg_where - $mentor_where - $awards_where - $tour_where - "; - - return $q; -} - -?> diff --git a/admin/reports_tours.inc.php b/admin/reports_tours.inc.php deleted file mode 100644 index 282c80b6..00000000 --- a/admin/reports_tours.inc.php +++ /dev/null @@ -1,102 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -$report_tours_fields = array( - 'tour_name' => array( - 'name' => 'Tour -- Name', - 'header' => 'Tour Name', - 'width' => 3, - 'table' => 'tours.name' - ), - 'tour_num' => array( - 'name' => 'Tour -- Number', - 'header' => 'Num', - 'width' => 0.75, - 'table' => 'tours.num' - ), - 'tour_desc' => array( - 'name' => 'Tour -- Description', - 'header' => 'Tour Description', - 'width' => 3.0, - 'table' => 'tours.description' - ), - 'tour_capacity' => array( - 'name' => 'Tour -- Capacity', - 'header' => 'Cap', - 'width' => 0.4, - 'table' => 'tours.capacity' - ), - 'tour_mingrade' => array( - 'name' => 'Tour -- Minimum Grade', - 'header' => 'Min Gr.', - 'width' => 0.4, - 'table' => 'tours.grade_min' - ), - 'tour_maxgrade' => array( - 'name' => 'Tour -- Maximum Grade', - 'header' => 'Max Gr.', - 'width' => 0.4, - 'table' => 'tours.grade_max' - ), - 'tour_location' => array( - 'name' => 'Tour -- Location', - 'header' => 'Tour Location', - 'width' => 2.0, - 'table' => 'tours.location' - ), - 'tour_contact' => array( - 'name' => 'Tour -- Contact', - 'header' => 'Contact', - 'width' => 1.5, - 'table' => 'tours.contact' - ), - 'tour_id' => array( - 'name' => 'Tour -- Database ID', - 'header' => '#', - 'width' => 0.4, - 'table' => 'tours.id' - ), -); - -function report_tours_fromwhere($report, $components) -{ - global $config, $report_tours_fields; - - $fields = $report_tours_fields; - $year = $report['year']; - - $q = " FROM - tours - WHERE - tours.year='$year' - "; - - return $q; -} - -?> diff --git a/admin/reports_volunteers.inc.php b/admin/reports_volunteers.inc.php deleted file mode 100644 index 9d69049d..00000000 --- a/admin/reports_volunteers.inc.php +++ /dev/null @@ -1,164 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -$report_volunteers_fields = array( - 'last_name' => array( - 'name' => 'Volunteer -- Last Name', - 'header' => 'Last Name', - 'width' => 1.0, - 'table' => 'users.lastname' - ), - 'first_name' => array( - 'name' => 'Volunteer -- First Name', - 'header' => 'First Name', - 'width' => 1.0, - 'table' => 'users.firstname' - ), - 'name' => array( - 'name' => 'Volunteer -- Full Name (last, first)', - 'header' => 'Name', - 'width' => 1.75, - 'table' => "CONCAT(users.lastname, ', ', users.firstname)", - 'table_sort' => 'users.lastname' - ), - 'namefl' => array( - 'name' => 'Volunteer -- Full Name (first last)', - 'header' => 'Name', - 'width' => 1.75, - 'table' => "CONCAT(users.firstname, ' ', users.lastname)", - 'table_sort' => 'users.lastname' - ), - 'email' => array( - 'name' => 'Volunteer -- Email', - 'header' => 'Email', - 'width' => 1.75, - 'table' => 'users.email' - ), - 'phone' => array( - 'name' => 'Volunteer -- Phone', - 'header' => 'Phone', - 'width' => 1.0, - 'table' => 'users.phonehome' - ), - 'cell' => array( - 'name' => 'Volunteer -- Cell', - 'header' => 'Cell', - 'width' => 1.0, - 'table' => 'users.phonecell' - ), - 'organization' => array( - 'name' => 'Volunteer -- Phone', - 'header' => 'Organziation', - 'width' => 1.0, - 'table' => 'users.organization' - ), - 'firstaid' => array( - 'name' => 'Volunteer -- First Aid Training', - 'header' => 'F.Aid', - 'width' => 0.5, - 'table' => 'users.firstaid', - 'value_map' => array('no' => 'no', 'yes' => 'YES') - ), - 'cpr' => array( - 'name' => 'Volunteer -- CPR Training', - 'header' => 'CPR', - 'width' => 0.5, - 'table' => 'users.cpr', - 'value_map' => array('no' => 'no', 'yes' => 'YES') - ), - 'complete' => array( - 'name' => 'Volunteer -- Registration Complete', - 'header' => 'Cmpl', - 'width' => 0.4, - 'table' => 'users_volunteer.volunteer_complete', - 'value_map' => array('no' => 'No', 'yes' => 'Yes'), - 'components' => array('users_volunteer') - ), - 'position_name' => array( - 'name' => 'Volunteer Position -- Name', - 'header' => 'Position', - 'width' => 3, - 'table' => 'volunteer_positions.name', - 'components' => array('signup') - ), - 'fair_year' => array( - 'name' => 'Fair -- Year', - 'header' => 'Year', - 'width' => 0.5, - 'table' => "{$config['FAIRYEAR']}" - ), - 'fair_name' => array( - 'name' => 'Fair -- Name', - 'header' => 'Fair Name', - 'width' => 3, - 'table' => "'" . $config['fairname'] . "'" - ), - 'static_text' => array( - 'name' => 'Static Text (useful for labels)', - 'header' => '', - 'width' => 0.1, - 'table' => "CONCAT(' ')" - ), -); - -function report_volunteers_fromwhere($report, $components) -{ - global $config, $report_volutneers_fields; - - $fields = $report_volutneers_fields; - $year = $report['year']; - - if (in_array('users_volunteer', $components)) { - $uv_from = 'LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id'; - } - - $signup_join = ''; - $signup_where = ''; - - if (in_array('signup', $components)) { - $signup_join = 'LEFT JOIN volunteer_positions_signup - ON (users.id=volunteer_positions_signup.users_id) - LEFT JOIN volunteer_positions - ON (volunteer_positions_signup.volunteer_positions_id=volunteer_positions.id)'; - $signup_where = "AND (volunteer_positions_signup.year = '$year' OR volunteer_positions_signup.year IS NULL)"; - } - - $q = " FROM - users - $signup_join - $uv_from - WHERE - users.types LIKE '%volunteer%' - AND users.year='$year' - $signup_where - "; - - return $q; -} - -?> diff --git a/admin/rerollprizes.php b/admin/rerollprizes.php deleted file mode 100644 index 8349ac8d..00000000 --- a/admin/rerollprizes.php +++ /dev/null @@ -1,164 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -// THIS FILE IS NEEDED to fix a bug in the rollover script that some people might have already used -// the prizes werent properly rolled over, so if it detects that there are no prizes this year but there were -// prizes last year, it re-rolls the prizes over properly. -// it only does this if the number of awards matchces exactly (aka hasnt been modified yet since the rollover) -// it is safe to include this script at any point, since it does all the checks required. -// this file will eventually be deleted - -// we know the years needed, so hardcode them in -$currentfairyear = 2007; -$newfairyear = 2008; - -// first make sure they have indeed done the rollover... -if ($config['FAIRYEAR'] == 2008) { - // make sure the number of awards are identical (aka they havent added any new ones) - $nq1 = $pdo->prepare("SELECT * FROM award_awards WHERE year=?"); - $nq1->execute([$newfairyear]); - $nq2 = $pdo->prepare("SELECT * FROM award_awards WHERE year=?"); - $nq2->execute([$currentfairyear]); - if ($nq1->rowCount() == $nq2->rowcount()) { - $npq1 = $pdo->prepare("SELECT * FROM award_prizes WHERE year?"); - $npq1->execute([$newfairyear]); - $npq2 = $pdo->prepare("SELECT * FROM award_prizes WHERE year=?"); - $npq2->execute([$currentfairyear]); - - if ($npq2->rowCount() > 0 && $npq1->rowCount() == 0) { - echo '
    '; - echo notice(i18n('A BUG WAS IDENTIFIED IN YOUR PREVIOUS YEAR ROLLOVER WHICH CAUSED AWARD PRIZES TO NOT BE ROLLED OVER PROPERLY. THEY ARE NOW BEING RE-ROLLED OVER WITH THE PROPER PRIZE INFORMATION. THIS WILL ONLY HAPPEN ONCE.')) . '
    '; - $stmt = $pdo->prepare("DELETE FROM award_awards WHERE year=?"); - $stmt->execute([$newfairyear]); - $stmt = $pdo->prepare("DELETE FROM award_prizes WHERE year=?"); - $stmt->execute([$newfairyear]); - $stmt = $pdo->prepare("DELETE FROM award_contacts WHERE year=?"); - $stmt->execute([$newfairyear]); - $stmt = $pdo->prepare("DELETE FROM award_types WHERE year=?"); - $stmt->execute([$newfairyear]); - $stmt = $pdo->prepare("DELETE FROM award_awards_projectcategories WHERE year=?"); - $stmt->execute([$newfairyear]); - $stmt = $pdo->prepare("DELETE FROM award_awards_projectdivisions WHERE year=?"); - $stmt->execute([$newfairyear]); - - echo i18n('Rolling awards') . '
    '; - // awards - $q = $pdo->prepare("SELECT * FROM award_awards WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO award_awards (award_sponsors_id,award_types_id,name,criteria,presenter,`order`,year,excludefromac,cwsfaward) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?)"); - $stmt->execute([$r->award_sponsors_id,$r->award_types_i ,$r->name,$r->criteria,$r->presenter,$r->order,$newfairyear,$r->excludefromac,$r->cwsfaward ]); - $award_awards_id = $pdo->lastInsertId(); - - $q2 = $pdo->prepare("SELECT * FROM award_awards_projectcategories WHERE year=? AND award_awards_id=?"); - $q2->execute([$currentfairyear,$r->id]); - show_pdo_errors_if_any($pdo); - while ($r2 = $q2->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO award_awards_projectcategories (award_awards_id,projectcategories_id,year) VALUES ( - ?, - ?, - ?)"); - $stmt->execute([$award_awards_id,$r2->projectcategories_id,$newfairyear]); - } - - $q2 = $pdo->prepare("SELECT * FROM award_awards_projectdivisions WHERE year=? AND award_awards_id=?"); - $q2->execute([$currentfairyear,$r->id]); - show_pdo_errors_if_any($pdo); - while ($r2 = $q2->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO award_awards_projectdivisions (award_awards_id,projectdivisions_id,year) VALUES ( - ?, - ?, - ?"); - $stmt->execute([$award_awards_id,$r2->projectdivisions_id,$newfairyear]); - } - - echo i18n('  Rolling award prizes') . '
    '; - $q2 = $pdo->prepare("SELECT * FROM award_prizes WHERE year=? AND award_awards_id=?"); - $q2->execute([$currentfairyear,$r->id]); - show_pdo_errors_if_any($pdo); - while ($r2 = $q2->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO award_prizes (award_awards_id,cash,scholarship,`value`,prize,number,`order`,year,excludefromac) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?)"); - } - } - $q2->execute([$award_awards_id,$r2->cash,$r2->scholarship,$r2->value,$r2->prize,$r2->number,$r2->order,$newfairyear,$r2->excludefromac]); - echo i18n('Rolling award contacts') . '
    '; - // award contacts - $q = $pdo->prepare("SELECT * FROM award_contacts WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) - $stmt = $pdo->prepare("INSERT INTO award_contacts (award_sponsors_id,salutation,firstname,lastname,position,email,phonehome,phonework,phonecell,fax,notes,year) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?)"); - - $stmt->execute([$r->award_sponsors_id,$r->salutation,$r->firstname,$r->lastname,$r->position,$r->email,$r->phonehome,$r->phonework,$r->phonecell,$r->fax,$r->notes,$newfairyear]); - echo i18n('Rolling award types') . '
    '; - // award types - $q = $pdo->prepare("SELECT * FROM award_types WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) - $stmt = $pdo->prepare("INSERT INTO award_types (id,type,`order`,year) VALUES ( - ?, - ?, - ?, - ?)"); - $stmt->execute([$r->id,$r->type,$r->order,$newfairyear]); - } - } -} -?> diff --git a/admin/schools.php b/admin/schools.php deleted file mode 100644 index 125d4cb2..00000000 --- a/admin/schools.php +++ /dev/null @@ -1,431 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare('INSERT INTO schools (year) VALUES (?)'); - $q->execute([$config['FAIRYEAR']]); - $id = $pdo->lastInsertId(); - } else - $id = intval(get_value_from_array($_POST, 'id')); - - $atrisk = get_value_from_array($_POST, 'atrisk') == 'yes' ? 'yes' : 'no'; - - /* - * "sciencehead='".mysql_escape_string(stripslashes($_POST['sciencehead']))."', ". - * "scienceheadphone='".mysql_escape_string(stripslashes($_POST['scienceheadphone']))."', ". - * "scienceheademail='".mysql_escape_string(stripslashes($_POST['scienceheademail']))."', ". - * "principal='".mysql_escape_string(stripslashes($_POST['principal']))."', ". - */ - - /* Get the uids for principal/science head */ - $q = $pdo->prepare('SELECT principal_uid,sciencehead_uid FROM schools WHERE id=?'); - $q->execute([$id]); - $i = $q->fetch(PDO::FETCH_ASSOC); - - $principal_update = ''; - $sciencehead_update = ''; - - // list($first, $last) - $split = explode(' ', get_value_from_array($_POST, 'principal') ?? '', 2); - - if (count($split) === 2) { - list($first, $last) = $split; - } else { - $first = $split[0]; - $last = ''; - } - - /* - * Load existing entry if it exists, else make an entry if - * there is data, else, do nothing - */ - if (get_value_from_array($i, 'principal_uid') > 0) - $pl = user_load_by_uid($i['principal_uid']); - else if ($first != '' && $last != '') { - $pl = user_create('principal', "*$first$last" . generatePassword()); - $principal_update = "principal_uid='{$pl['uid']}',"; - } else - $pl = false; - - $em = get_value_from_array($_POST, 'principalemail'); - - /* - * If we loaded or created an entry, either - * update and save, or purge it - */ - if (is_array($pl)) { - if ($first == '' && $last == '') { - user_purge($pl, 'principal'); - $principal_update = 'principal_uid=NULL,'; - } else { - $pl['firstname'] = $first; - $pl['lastname'] = $last; - $pl['email'] = $em; - user_save($pl); - } - } - - /* Get info about science head */ - // FIX ME - $split = explode(' ', get_value_from_array($_POST, 'principal') ?? '', 2); - - if (count($split) === 2) { - list($first, $last) = $split; - } else { - $first = $split[0]; - $last = ''; - } - $em = get_value_from_array($_POST, 'scienceheademail'); - if ($em == '' && ($first != '' || $last != '')) - $em = "*$first$last" . generatePassword(); - - /* - * Load existing record, or create new if there's something - * to insert - */ - $sh = false; - if ($i['sciencehead_uid'] > 0) { - $sh = user_load_by_uid($i['sciencehead_uid']); - - /* - * It's possile for sh to be false now, happens when the user is - * deleted outside the school editor, this condition needs to be - * fixed. If we let it go, the saving the teacher info will - * silently fail. So let's just create a new teacher - */ - - if (is_array($sh) && ($em != $sh['email'] || $em == '')) { - /* - * If the emails don't match we have no way of knowing if we're creating a different - * user, or doing a correction, assume it's a different user - */ - user_purge($sh, 'teacher'); - $sh = false; - } - } - - /* - * If there was no teacher loaded, or if we just purged it, create a new one - * if there's an email address - */ - if ($sh == false && $em != '') { - $sh = user_create('teacher', $em); - $sciencehead_update = "sciencehead_uid='{$sh['uid']}',"; - } - - /* If we have a record update it */ - if (is_array($sh)) { - $sh['firstname'] = $first; - $sh['lastname'] = $last; - $sh['phonework'] = $_POST['scienceheadphone']; - $sh['email'] = $em; - $sh['username'] = $em; - user_save($sh); - } - - $exec = 'UPDATE schools SET - school=?, - schoollang=?, - designate=?, - schoollevel=?, - board=?, - district=?, - address=?, - city=?, - province_code=?, - postalcode=?, - schoolemail=?, - phone=?, - fax=?, - registration_password=?, - projectlimit=?, - projectlimitper=?, - accesscode=?, - sciencehead=?, - principal=?, - atrisk=? - WHERE id=?'; - - $stmt = $pdo->prepare($exec); - $stmt->execute([ - get_value_from_array($_POST, 'school'), - get_value_from_array($_POST, 'schoollang'), - get_value_from_array($_POST, 'designate'), // FIXED: Corrected key name - get_value_from_array($_POST, 'schoollevel'), - get_value_from_array($_POST, 'board'), - get_value_from_array($_POST, 'district'), - get_value_from_array($_POST, 'address'), - get_value_from_array($_POST, 'city'), - get_value_from_array($_POST, 'province_code'), - get_value_from_array($_POST, 'postalcode'), - get_value_from_array($_POST, 'schoolemail'), - get_value_from_array($_POST, 'phone'), - get_value_from_array($_POST, 'fax'), - get_value_from_array($_POST, 'registration_password'), - get_value_from_array($_POST, 'projectlimit'), - get_value_from_array($_POST, 'projectlimitper'), - get_value_from_array($_POST, 'accesscode'), - get_value_from_array($_POST, 'sciencehead'), // FIXED: Using function for consistency - get_value_from_array($_POST, 'principal'), - get_value_from_array($_POST, 'atrisk'), - get_value_from_array($_POST, 'id') - ]); - - show_pdo_errors_if_any($pdo); - - if (get_value_from_array($_POST, 'save') == 'add') - $notice = 'added'; - else - $notice = 'saved'; -} - -if (get_value_from_array($_GET, 'action') == 'delete' && get_value_from_array($_GET, 'delete', '')) { - $stmt = $pdo->prepare('DELETE FROM schools WHERE id=?'); - $stmt->execute([$_GET['delete']]); - $notice = 'deleted'; -} - -if (get_value_from_array($_GET, 'action') == 'clearaccesscodes') { - $stmt = $pdo->prepare("UPDATE schools SET accesscode='' WHERE year=?"); - $stmt->execute([$config['FAIRYEAR']]); - $notice = 'clearaccess'; -} - -if (get_value_from_array($_GET, 'action') == 'makeaccesscodes') { - $q = $pdo->prepare("SELECT id FROM schools WHERE year=? AND (accesscode IS NULL OR accesscode='')"); - $q->execute([$config['FAIRYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $ac = generatePassword(5); - $stmt = $pdo->prepare('UPDATE schools SET accesscode=? WHERE id=? AND year=?'); - $stmt->execute([$ac, $r->id, $config['FAIRYEAR']]); - } - $notice = 'makeaccess'; -} - -if (get_value_from_array($_GET, 'action') == 'edit' || get_value_from_array($_GET, 'action') == 'add') { - send_header(get_value_from_array($_GET, 'action') == 'edit' ? 'Edit School' : 'Add New School', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'School Management' => 'admin/schools.php'), - 'schools_management'); - if (get_value_from_array($_GET, 'action') == 'edit') { - $buttontext = 'Save School'; - $q = $pdo->prepare('SELECT * FROM schools WHERE id=?'); - $q->execute([get_value_from_array($_GET, 'edit', '')]); - $r = $q->fetch(PDO::FETCH_OBJ); - } else if (get_value_from_array($_GET, 'action') == 'add') { - $buttontext = 'Add School'; - } - $buttontext = i18n($buttontext); - - echo "
    \n"; - echo '\n"; - - if (get_value_from_array($_GET, 'action') == 'edit') - echo '\n"; - - echo "\n"; - - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - - if (get_value_property_or_default($r, 'principal_uid') > 0) - $pl = user_load_by_uid(get_value_property_or_default($r, 'principal_uid')); - else - $pl = array(); - /* Don't show autogenerated emails */ - - $e = get_value_from_array($pl, 'email', 0) == '*' ? '' : get_value_from_array($pl, 'email'); - echo '\n"; - echo '\n"; - - echo '\n"; - echo '\n"; - echo ''; - if (get_value_property_or_default($r, 'sciencehead_uid', '') > 0) - $sh = user_load_by_uid(get_value_property_or_default($r, 'sciencehead_uid', '')); - else - $sh = array(); - /* Don't show autogenerated emails */ - $e = get_value_from_2d_array($sh, 'email', 0, '') == '*' ? '' : get_value_from_2d_array($sh, 'email', ''); - echo '\n"; - echo '\n"; - echo '\n"; - - if ($config['participant_registration_type'] == 'schoolpassword') { - echo ''; - echo '\n"; - } - echo ''; - if ($config['participant_registration_type'] == 'invite') { - echo ''; - echo '\n"; - } else { - echo ''; - } - echo ''; - - $ch = get_value_property_or_default($r, 'atrisk', '') == 'yes' ? 'checked="checked"' : ''; - echo "\n"; - echo ''; - echo "\n"; - - echo "
    ' . i18n('School Name') . '
    ' . i18n('School Language') . ''; - echo ''; - - echo "
    ' . i18n('School Designation') . ''; - $des = array('' => 'Choose', 'public' => 'Public', - 'independent' => 'Independent/Private', - 'home' => 'Home School'); - echo '
    ' . i18n('School Level') . '
    ' . i18n('School Board') . '
    ' . i18n('School District') . '
    ' . i18n('Address') . '
    ' . i18n('City') . '
    ' . i18n($config['provincestate']) . ''; - emit_province_selector('province_code', get_value_property_or_default($r, 'province_code', '')); - echo "
    ' . i18n($config['postalzip']) . '
    ' . i18n('Phone') . '
    ' . i18n('Fax') . '
    ' . i18n('Principal') . '
    ' . i18n('Principal Email') . '
    ' . i18n('School Email') . '
    ' . i18n('Access Code') . '

    ' . i18n('Science head/teacher or science fair contact at school') . '
    ' . i18n('Email') . '
    ' . i18n('Name') . '
    ' . i18n('Phone') . '

    ' . i18n('Participant Registration Password') . '
    ' . i18n('Password') . '

    ' . i18n('Participant Registration Limits') . '
    ' . i18n('Set to 0 to have no registration limit') . '
    ' . i18n('Maximum of') . ' '; - echo ''; - echo ' '; - echo i18n('projects'); - echo ' '; - echo ''; - echo "
    ' . i18n("Participant registration limits are currently disabled. In order to use participant registration limits for schools, the participant registration type must be set to 'invite' in Configuration / Configuration Variables") . '

    ' . i18n('Demographic Information') . '
    " . i18n('Inner City or At-Risk school') . "
     
    \n"; - echo "
    \n"; -} else { - send_header('School Management', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'schools_management'); - - global $notice; - switch ($notice) { - case 'added': - echo happy('School successfully added'); - break; - case 'saved': - echo happy('Successfully saved changes to school'); - break; - case 'deleted': - echo happy('School successfully deleted'); - break; - case 'clearaccess': - echo happy('Access Codes successfully cleared from all schools'); - break; - case 'makeaccess': - echo happy("Access Codes successfully set for schools that didn't have one"); - break; - } - - echo '
    '; - echo '' . i18n('Add new school') . "\n"; - echo '
    '; - echo '' . i18n('Import schools from CSV') . "\n"; - echo '
    '; - echo '' . i18n('Create Access Code for any school without one') . "\n"; - echo '
    '; - echo '' . i18n('Remove Access Codes from all schools') . "\n"; - echo '
    '; - echo ''; - echo ''; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - if ($config['participant_registration_type'] == 'schoolpassword') - echo ' '; - echo ' '; - echo ' '; - echo "\n"; - - $q = $pdo->prepare('SELECT * FROM schools WHERE year=? ORDER BY school'); - $q->execute([$config['FAIRYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - - $sciencehead = ''; - if ($r->sciencehead_uid > 0) { - $sh = user_load_by_uid($r->sciencehead_uid); - $sciencehead = $sh['name']; - } - echo " \n"; - if ($config['participant_registration_type'] == 'schoolpassword') - echo " \n"; - echo " \n"; - - echo ' \n"; - echo "\n"; - } - - echo "
    ' . i18n('School') . '' . i18n('Address') . '' . i18n('Phone') . '' . i18n('Contact') . '' . i18n('Reg Pass') . '' . i18n('Access Code') . '' . i18n('Action') . '
    $r->school$r->address, $r->city, $r->postalcode$r->phone$sciencehead$r->registration_password$r->accesscode'; - echo "id\">'; - echo ' '; - echo "id\">'; - - echo "
    \n"; -} - -send_footer(); - -?> diff --git a/admin/schoolsimport.php b/admin/schoolsimport.php deleted file mode 100644 index 918d4c56..00000000 --- a/admin/schoolsimport.php +++ /dev/null @@ -1,149 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'School Management' => 'admin/schools.php')); - -$showform = true; - -if (get_value_from_array($_POST, 'action') == 'import') { - if (!$_FILES['schools']['error'] && $_FILES['schools']['size'] > 0) { - $showform = false; - $CSVP = new CSVParser(); - $CSVP->parseFile($_FILES['schools']['tmp_name']); - if (count($CSVP->data) > 0) { - // okay it looks like we have something.. lets dump the current stuff - if ($_POST['emptycurrent'] == 1) { - echo happy(i18n('Old school data erased')); - $stmt = $pdo->prepare("DELETE FROM schools WHERE year=?"); - $stmt->execute([$config['FAIRYEAR']]); - } - - $loaded = 0; - foreach ($CSVP->data AS $row) { - for ($n = 0; $n < count($row); $n++) { - $row[$n] = trim($row[$n]); - } - - $email = $row[16]; - if ($email != '') { - $scienceHead = user_load_by_email($email); - if (!$scienceHead) { - $scienceHead = user_create('teacher', $email); - $scienceHead['email'] = $email; - } - list($first, $last) = explode(' ', $row[15], 2); - $scienceHead['firstname'] = $first; - $scienceHead['lastname'] = $last; - $scienceHead['phonework'] = $row[17]; - user_save($scienceHead); - } - - $email = $row[12]; - if ($email != '') { - $principal = user_load_by_email($email); - if (!$principal) { - $principal = user_create('principal', $email); - $principal['email'] = $email; - } - list($first, $last) = explode(' ', $row[11], 2); - $principal['firstname'] = $first; - $principal['lastname'] = $last; - $principal['phonework'] = $row[13]; - user_save($principal); - } - $stmt = $pdo->prepare("INSERT INTO schools (school,schoollang,schoollevel,board,district,phone,fax,address,city,province_code,postalcode,schoolemail,accesscode,registration_password,projectlimit,projectlimitper,year,principal_uid,sciencehead_uid) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?)"); - $stmt->execute([stripslashes($row[0]),stripslashes($row[1],stripslashes($row[2]),stripslashes($row[3])), - stripslashes($row[4]),stripslashes($row[5]),stripslashes($row[6]),stripslashes($row[7]),stripslashes($row[8]), - stripslashes($row[9]),stripslashes($row[10]),stripslashes($row[14]),stripslashes($row[18]),stripslashes($row[19]), - stripslashes($row[20]),stripslashes($row[21]),$config['FAIRYEAR'],$principal['uid'],$scienceHead['uid']]); - if (!$pdo->errorInfo()) - $loaded++; - else - show_pdo_errors_if_any($pdo); - } - echo happy(i18n('Successfully loaded %1 schools', array($loaded))); - echo '' . i18n('School Management') . '
    '; - } else { - echo error(i18n('Found no CSV data in the uploaded file')); - } - print_r($data); - } else { - echo error(i18n('Please choose a valid CSV file to upload')); - $showform = true; - } -} - -if ($showform) { - echo '
    '; - echo i18n('Choose the CSV file containing the school information. The COLUMNS of the file must contain the following information, in this exact order, separated by comma\'s (,) with fields optionally enclosed by quotes ("):'); - echo '
    '; - echo '
    '; - echo i18n('School Name, School Lang, School Level, Board, District, Phone, Fax, Address, City, %1, %2, Principal, Principal Email, Principal Phone, School Email, Science Head, Science Head Email, Science Head Phone, Access Code, Registration Password, Project Limit, Project Limit Per(total or agecategory)', array(i18n($config['provincestate']), i18n($config['postalzip']))); - - echo '
    '; - echo '
    '; - echo '
    '; - echo ''; - echo '' . i18n('Empty all current school information before importing?') . '
    '; - echo ''; - echo '\n"; - echo '
    '; -} - -send_footer(); - -?> diff --git a/admin/sciencefairs.php b/admin/sciencefairs.php deleted file mode 100644 index 8754e8ad..00000000 --- a/admin/sciencefairs.php +++ /dev/null @@ -1,43 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'sciencefair_management'); -echo '
    '; -echo '' . i18n('Science Fair Manager') . '
    '; - -send_footer(); - -?> diff --git a/admin/send_emailqueue.php b/admin/send_emailqueue.php deleted file mode 100644 index c02e7ad5..00000000 --- a/admin/send_emailqueue.php +++ /dev/null @@ -1,112 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("UPDATE config SET val='" . date('r') . "' WHERE var='emailqueue_lock'"); - $stmt->execute(); - - // loop forever, but not really, it'll get break'd as soon as there's nothing left to send - while (true) { - $q = $pdo->prepare('SELECT * FROM emailqueue_recipients WHERE sent IS NULL AND result IS NULL LIMIT 1'); - $q->execute(); - if ($q->rowCount()) { - $r = $q->fetch(PDO::FETCH_OBJ); - $eq = $pdo->prepare("SELECT * FROM emailqueue WHERE id=?"); - $eq->execute([$r->emailqueue_id]); - $email = $eq->fetch(PDO::FETCH_OBJ); - - $blank = array(); - $replacements = (array) json_decode($r->replacements); - - if ($email->body) - $body = communication_replace_vars($email->body, $blank, $replacements); - else if ($email->bodyhtml) { - $body = strip_tags(communication_replace_vars($email->bodyhtml, $blank, $replacements)); - } else { - $body = 'No message body specified'; - } - - if ($email->bodyhtml) - $bodyhtml = communication_replace_vars($email->bodyhtml, $blank, $replacements); - - if ($r->toname) { - $to = "\"$r->toname\" <$r->toemail>"; - } else { - $to = $r->toemail; - } - - echo "$email->id,$r->id,$to: "; - - $result = email_send_new($to, $email->from, $email->subject, $body, $bodyhtml); - - if ($result) { - $stmt = $pdo->prepare("UPDATE emailqueue_recipients SET sent=NOW(), `result`='ok' WHERE id=?"); - $stmt->execute([$r->id]); - show_pdo_errors_if_any($pdo); - $newnumsent = $email->numsent + 1; - $stmt = $pdo->prepare("UPDATE emailqueue SET numsent=? WHERE id=?"); - $stmt->execute([$newnumsent,$email->id]); - show_pdo_errors_if_any($pdo); - echo "ok\n"; - } else { - $stmt = $pdo->prepare("UPDATE emailqueue_recipients SET `sent`=NOW(), `result`='failed' WHERE id=?"); - $stmt->execute([$r->id]); - show_pdo_errors_if_any($pdo); - $newnumfailed = $email->numfailed + 1; - $stmt = $pdo->prepare("UPDATE emailqueue SET numfailed=? WHERE id=?"); - $stmt->execute([$newnumfailed,$email->id]); - show_pdo_errors_if_any($pdo); - echo "failed\n"; - } - // now check if we're done yet - $rq = $pdo->prepare("SELECT COUNT(*) AS num FROM emailqueue_recipients WHERE sent IS NULL AND emailqueue_id=?"); - $rq->execute([$email->id]); - $rr = $rq->fetch(PDO::FETCH_OBJ); - if ($rr->num == 0) { - $stmt = $pdo->prepare("UPDATE emailqueue SET finished=NOW() WHERE id=?"); - $stmt->execute([$email->id]); - } - usleep(rand($sleepmin, $sleepmax)); - } else - break; - } - $stmt = $pdo->prepare("UPDATE config SET val='' WHERE var='emailqueue_lock'"); - $stmt->execute(); -} else { - echo "Already locked\n"; -} - -?> diff --git a/admin/settranslation.php b/admin/settranslation.php deleted file mode 100644 index 0494b490..00000000 --- a/admin/settranslation.php +++ /dev/null @@ -1,58 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - $ln) { - if ($l == $config['default_language']) - continue; - - // check if it exists; - $m = md5($_POST['translate_str_hidden']); - - if ($_POST['translate_' . $l]) { - $q = $pdo->prepare("SELECT * FROM translations WHERE lang=? AND strmd5=?"); - $q->execute([$l,$m]); - - if ($q->rowCount()) { - $stmt = $pdo->prepare("UPDATE translations SET val=? WHERE lang=? AND strmd5=?"); - $stmt->execute([iconv('UTF-8', 'ISO-8859-1', stripslashes($_POST['translate_' . $l])),$l,$m]); - } else { - $stmt = $pdo->prepare("INSERT INTO translations (lang,strmd5,str,val) VALUES (?,?,?,?)"); - $stmt->execute([$l,$m,iconv('UTF-8', 'ISO-8859-1', stripslashes($_POST['translate_str_hidden'])),iconv('UTF-8', 'ISO-8859-1', stripslashes($_POST['translate_' . $l]))]); - } - } else { - $stmt = $pdo->prepare("DELETE FROM translations WHERE lang=? AND strmd5=?"); - $stmt->execute([$l,$m]); - } -} -echo 'ok'; - -?> diff --git a/admin/sponsor_contacts.php b/admin/sponsor_contacts.php deleted file mode 100644 index 8af6e8c3..00000000 --- a/admin/sponsor_contacts.php +++ /dev/null @@ -1,217 +0,0 @@ - - * Copyright (C) 2005-2008 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Donor' => 'admin/donors.php')); - -if ($_GET['sponsors_id']) - $sponsors_id = $_GET['sponsors_id']; -else if ($_POST['sponsors_id']) - $sponsors_id = $_POST['sponsors_id']; -?> - -prepare('SELECT id,organization FROM sponsors ORDER BY organization'); -$q->execute(); -echo '
    '; -echo ''; -echo '
    '; - -if ($sponsors_id) { - if ($_POST['save'] == 'edit' || $_POST['save'] == 'add') { - $p = ($_POST['primary'] == 'yes') ? 'yes' : 'no'; - - if ($_POST['save'] == 'add') { - $u = user_create('sponsor', $_POST['email']); - $id = $u['id']; - } else { - $u = user_load($_POST['id']); - $id = intval($_POST['id']); - } - - if ($p == 'no') { - /* Make sure this sponsor ($sponsors_id) has a primary */ - $q = $pdo->prepare("SELECT users_id - FROM users_sponsor, users - WHERE - users_sponsor.users_id=users.id - AND sponsors_id=? - AND `primary`='yes' - AND year=? - AND users_id!=?"); - $q->execute([$sponsors_id,$config['FAIRYEAR'],$id]); - if ($q->rowCount() == 0) { - /* This must be the primary */ - $p = 'yes'; - } - } else { - /* Unset all other primaries */ - $stmt = $pdo->prepare("UPDATE users_sponsor SET `primary`='no' - WHERE sponsors_id=?"); - $stmt->execute([$sponsors_id]); - } - - $u['primary'] = $p; - $u['salutation'] = $_POST['salutation']; - $u['firstname'] = $_POST['firstname']; - $u['lastname'] = $_POST['lastname']; - $u['position'] = $_POST['position']; - $u['phonework'] = $_POST['phonework']; - $u['phonecell'] = $_POST['phonecell']; - $u['phonehome'] = $_POST['phonehome']; - $u['fax'] = $_POST['fax']; - $u['email'] = $_POST['email']; - $u['notes'] = $_POST['notes']; - $u['sponsors_id'] = $sponsors_id; - user_save($u); - - if ($_POST['save'] == 'add') - echo happy(i18n('Contact successfully added')); - else - echo happy(i18n('Successfully saved changes to contact')); - } - - if ($_GET['action'] == 'delete' && $_GET['delete']) { - user_delete(intval($_GET['delete'])); - echo happy('Contact successfully deleted'); - } - - if ($_GET['action'] == 'edit' || $_GET['action'] == 'add') { - echo "<< " . i18n('Back to %1 Contacts', array($sponsors_organization)) . "\n"; - if ($_GET['action'] == 'edit') { - echo '

    ' . i18n('Edit %1 Contact', array($sponsors_organization)) . "

    \n"; - $buttontext = 'Save Contact'; - // $q=mysql_query("SELECT * FROM sponsor_contacts WHERE id='".$_GET['edit']."'"); - // $r=$q->fetch(PDO::fETCH_OBJ); - $u = user_load(intval($_GET['edit'])); - } else if ($_GET['action'] == 'add') { - echo '

    ' . i18n('Add %1 Contact', array($sponsors_organization)) . "

    \n"; - $buttontext = 'Add Contact'; - } - $buttontext = i18n($buttontext); - - echo "
    \n"; - echo "\n"; - echo '\n"; - - if ($_GET['action'] == 'edit') - echo '\n"; - - echo "\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo '\n"; - echo "\n"; - - echo "
    ' . i18n('Salutation') . '
    ' . i18n('First Name') . '
    ' . i18n('Last Name') . '
    ' . i18n('Position') . '
    ' . i18n('Phone (Work)') . '
    ' . i18n('Phone (Cell)') . '
    ' . i18n('Phone (Home)') . '
    ' . i18n('Fax') . '
    ' . i18n('Email') . '
    ' . i18n('Notes') . '
    ' . i18n('Primary Contact') . '
    \n"; - echo "
    \n"; - } else { - echo '
    '; - echo "" . i18n('Add New Contact to %1', array($sponsors_organization)) . "\n"; - echo '
    '; - - $q = $pdo->prepare("SELECT * FROM users LEFT JOIN users_sponsor ON users_sponsor.users_id=users.id - \t WHERE year=? - \t AND sponsors_id=? - \t AND deleted='no' - \t ORDER BY lastname,firstname"); - $q->execute([$config['FAIRYEAR'],$sponsors_id]); - show_pdo_errors_if_any($pdo); - - if ($q->rowCount()) { - echo ''; - echo ''; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo "\n"; - - while ($r = $q->fetch(PDO::fETCH_OBJ)) { - echo "\n"; - echo ' \n"; - echo ' '; - echo " \n"; - echo " \n"; - $p = i18n(($r->primary == 'yes') ? 'Yes' : 'No'); - echo " \n"; - echo ' \n"; - echo "\n"; - } - - echo "
    ' . i18n('Name') . '' . i18n('Email') . '' . i18n('Phone (Work)') . '' . i18n('Phone (Cell)') . '' . i18n('Primary') . 'Actions
    '; - if ($r->salutation) - echo $r->salutation . ' '; - echo "$r->firstname $r->lastname'; - if ($r->email) { - list($eb, $ea) = split('@', $r->email); - echo ""; - } else - echo ' '; - - echo ' $r->phonework$r->phonecell$p'; - // FIXME: should we just go to /user_personal.php here instead? - echo "id\">'; - echo ' '; - echo "id\">'; - echo "
    \n"; - } - } -} - -send_footer(); - -?> diff --git a/admin/stats.inc.php b/admin/stats.inc.php deleted file mode 100644 index ef744e50..00000000 --- a/admin/stats.inc.php +++ /dev/null @@ -1,88 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -$stats_data = array( - 'start_date' => array('manual' => true), - 'end_date' => array('manual' => true), - 'address' => array('manual' => true), - 'budget' => array('manual' => true), - 'ysf_affiliation_complete' => array('manual' => true), - 'charity' => array('manual' => true), - 'male_1' => array(), - 'male_4' => array(), - 'male_7' => array(), - 'male_9' => array(), - 'male_11' => array(), - 'female_1' => array(), - 'female_4' => array(), - 'female_7' => array(), - 'female_9' => array(), - 'female_11' => array(), - 'projects_1' => array(), - 'projects_4' => array(), - 'projects_7' => array(), - 'projects_9' => array(), - 'projects_11' => array(), - 'students_total' => array(), - 'schools_total' => array(), - 'schools_active' => array(), - 'students_public' => array(), - 'schools_public' => array(), - 'students_private' => array(), - 'schools_private' => array(), - 'schools_districts' => array(), - 'studentsvisiting' => array('manual' => true), - 'publicvisiting' => array('manual' => true), - 'firstnations' => array('manual' => true), - 'students_atrisk' => array(), - 'schools_atrisk' => array(), - 'teacherssupporting' => array('manual' => true), - 'increasedinterest' => array('manual' => true), - 'consideringcareer' => array('manual' => true), - 'committee_members' => array(), - 'judges' => array(), - 'next_chair_name' => array('manual' => true), - 'next_chair_email' => array('manual' => true), - 'next_chair_hphone' => array('manual' => true), - 'next_chair_bphone' => array('manual' => true), - 'next_chair_fax' => array('manual' => true), - 'scholarships' => array('manual' => true), - 'delegate1' => array('manual' => true), - 'delegate2' => array('manual' => true), - 'delegate3' => array('manual' => true), - 'delegate4' => array('manual' => true), - 'delegate1_email' => array('manual' => true), - 'delegate2_email' => array('manual' => true), - 'delegate3_email' => array('manual' => true), - 'delegate4_email' => array('manual' => true), - 'delegate1_size' => array('manual' => true), - 'delegate2_size' => array('manual' => true), - 'delegate3_size' => array('manual' => true), - 'delegate4_size' => array('manual' => true), -); -?> diff --git a/admin/student_editor.php b/admin/student_editor.php deleted file mode 100644 index 894468c5..00000000 --- a/admin/student_editor.php +++ /dev/null @@ -1,650 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT * FROM projects WHERE - registrations_id=? - AND year=? - AND fairs_id=?"); - $q->execute([$registrations_id,$config['FAIRYEAR'],$fairs_id]); - if ($q->rowCount() != 1) { - echo 'permission denied.'; - exit; - } - /* Ok, they have permission */ - } -} - -switch ($action) { - case 'registration_load': - registration_load(); - exit; - - case 'registration_save': - registration_save(); - exit; - - case 'students_load': - students_load(); - exit; - - case 'students_save': - students_save(); - exit; - - case 'student_remove': - $remove_id = intval($_GET['students_id']); - $q = $pdo->prepare("SELECT id FROM students WHERE id=? AND registrations_id=?"); - $q->execute([$remove_id,$registrations_id]); - if ($q->rowCount() != 1) { - error_('Invalid student to remove'); - exit; - } - if ($q->rowCount() != 1) { - error_('Invalid student to remove'); - exit; - } - - $stmt = $pdo->prepare("DELETE FROM students WHERE id=? AND registrations_id=?"); - $stmt->execute([$remove_id,$registrations_id]); - - // now see if they have an emergency contact that also needs to be removed - $q = $pdo->prepare("SELECT id FROM emergencycontact WHERE students_id=? AND registrations_id=? AND year=?"); - $q->execute([$remove_id,$registrations_id,$config['FAIRYEAR']]); - // no need to error message if this doesnt exist - if ($q->rowCount() == 1) { - $stmt = $do->prepare("DELETE FROM emergencycontact WHERE students_id=? AND registrations_id=? AND year=?"); - $stmt->execute([$remove_id,$registrations_id,$config['FAIRYEAR']]); - } - - if ($q->rowCount() != 1) { - error_('Invalid student to remove'); - exit; - } - - $stmt = $pdo->prepare("DELETE FROM students WHERE id=? AND registrations_id=?"); - $stmt->execute([$remove_id,$registrations_id]); - - // now see if they have an emergency contact that also needs to be removed - $q = $pdo->prepare("SELECT id FROM emergencycontact WHERE students_id=? AND registrations_id=? AND year=?"); - $q->execute([$remove_id,$registrations_id,$config['FAIRYEAR']]); - - // no need to error message if this doesnt exist - if ($q->rowCount() == 1) { - $stmt = $do->prepare("DELETE FROM emergencycontact WHERE students_id=? AND registrations_id=? AND year=?"); - $stmt->execute([$remove_id,$registrations_id,$config['FAIRYEAR']]); - } - - $stmt = $pdo->prepare("DELETE FROM students WHERE id=? AND registrations_id=?"); - $stmt->execute([$remove_id,$registrations_id]); - - // now see if they have an emergency contact that also needs to be removed - $q = $pdo->prepare("SELECT id FROM emergencycontact WHERE students_id=? AND registrations_id=? AND year=?"); - $q->execute([$remove_id,$registrations_id,$config['FAIRYEAR']]); - // no need to error message if this doesnt exist - if ($q->rowCount() == 1) { - $stmt = $do->prepare("DELETE FROM emergencycontact WHERE students_id=? AND registrations_id=? AND year=?"); - $stmt->execute([$remove_id,$registrations_id,$config['FAIRYEAR']]); - } - happy_('Student successfully removed'); - exit; - - default: - exit; -} - -exit; - -// now do any data saves -function students_save() -{ - global $registrations_id, $config, $pdo; - - $x = 1; - while ($_POST['num'][$x]) { - if ($_POST['id'][$x] == 0) { - // if they use schoolpassword or singlepassword, then we need to set the school based on the school stored in the registration record. for anything else they can choose the school on their own. - if ($config['participant_registration_type'] == 'schoolpassword' || $config['participant_registration_type'] == 'invite') { - $q = $pdo->prepare("SELECT schools_id FROM registrations WHERE id=? AND YEAR=?"); - $q->execute([$registrations_id,$config['FAIRYEAR']]); - $r = $q->fetch(PDO::FETCH_OBJ); - $schools_id = $r->schools_id; - $schoolvalue = "'$schools_id', "; - } else { - $schoolvalue = "'" . stripslashes($_POST['schools_id'][$x]) . "', "; - } - // INSERT new record - $dob = $_POST['year'][$x] . '-' . $_POST['month'][$x] . '-' . $_POST['day'][$x]; - $stmt = $pdo->prepare('INSERT INTO students (registrations_id,firstname,lastname,sex,email,address,city,province,postalcode,phone,dateofbirth,grade,schools_id,tshirt,medicalalert,foodreq,teachername,teacheremail,year) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?)'); - $stmt->execute([$registrations_id,iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['firstname'][$x])), - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['lastname'][$x])),stripslashes($_POST['sex'][$x]), - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['email'][$x])),iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['address'][$x])), - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['city'][$x])),iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['province'][$x])), - stripslashes($_POST['postalcode'][$x]),stripslashes($_POST['phone'][$x]),$dob,stripslashes($_POST['grade'][$x]), - $schoolvalue,stripslashes($_POST['tshirt'][$x]),stripslashes($_POST['medicalalert'][$x]),stripslashes($_POST['foodreq'][$x]), - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['teachername'][$x])),iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['teacheremail'][$x])), - $config['FAIRYEAR']]); - - happy_('%1 %2 successfully added', array($_POST['firstname'][$x], $_POST['lastname'][$x])); - } else { - // if they use schoolpassword or singlepassword, then we dont need to save teh schools_id because its already set when they inserted the record, and we dont allow them to change their school. - if (($config['participant_registration_type'] == 'schoolpassword' || $config['participant_registration_type'] == 'invite') && !$_POST['schools_id'][$x]) { - $schoolquery = ''; - } else if ($_POST['schools_id'][$x]) { - $schoolquery = "schools_id='" . stripslashes($_POST['schools_id'][$x]) . "', "; - } else - $schoolquery = ''; - - // UPDATE existing record - $dob = $_POST['year'][$x] . '-' . $_POST['month'][$x] . '-' . $_POST['day'][$x]; - $stmt = $pdo->prepare("UPDATE students SET - firstname=?, - lastname=?, - sex=?, - email=?, - address=?, - city=?, - province=?, - postalcode=?, - phone=?, - dateofbirth=?, - grade=?, - $schoolquery - medicalalert=?, - foodreq=?, - teachername=?, - teacheremail=?, - tshirt=? - WHERE id=?"); - - $stmt->execute([ - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['firstname'][$x])), - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['lastname'][$x])), - stripslashes($_POST['sex'][$x]), - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['email'][$x])), - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['address'][$x])), - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['city'][$x])), - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['province'][$x])), - stripslashes($_POST['postalcode'][$x]), - stripslashes($_POST['phone'][$x]), - $dob, - stripslashes($_POST['grade'][$x]), - stripslashes($_POST['medicalalert'][$x]), - stripslashes($_POST['foodreq'][$x]), - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['teachername'][$x])), - iconv('UTF-8', 'ISO-8859-1//TRANSLIT', stripslashes($_POST['teacheremail'][$x])), - stripslashes($_POST['tshirt'][$x]), - $_POST['id'][$x] - ]); - - happy_('%1 %2 successfully updated', array(iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $_POST['firstname'][$x]), iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $_POST['lastname'][$x]))); - } - $x++; - } -} - -function students_load() -{ - global $registrations_id, $config, $pdo; - - // now query and display - $q = $pdo->prepare("SELECT * FROM students WHERE - registrations_id=? - AND year=?"); - $q->execute([$registrations_id,$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - - $numfound = $q->rowCount(); - - $numtoshow = intval(get_value_from_array($_GET, 'numstudents')); - if ($numtoshow == 0) - $numtoshow = $numfound; - - echo '
    '; - echo i18n('Number of students that worked on the project: '); - echo "'; - echo '
    '; - - echo '
    '; - for ($x = 1; $x <= $numtoshow; $x++) { - $studentinfo = $q->fetch(PDO::FETCH_OBJ); - echo '

    ' . i18n('Student %1 Details', array($x)) . '

    '; - // if we have a valid student, set their ID, so we can UPDATE when we submit - // if there is no record for this student, then set the ID to 0, so we will INSERT when we submit - if (get_value_property_or_default($studentinfo, 'id')) - $id = $studentinfo->id; - else - $id = 0; - - // true should work here, it just has to be set to _something_ for it to work. - echo ""; - - // save the ID, or 0 if it doesnt exist - echo ""; - echo ''; - echo "\n"; - echo ' \n"; - echo ' \n"; - echo "\n"; - - if ($config['participant_student_personal'] == 'yes') { - echo "\n"; - echo ' \n"; - echo " \n"; - echo "\n"; - - echo "\n"; - echo ' \n"; - - if ($config['participant_student_personal'] == 'yes') { - echo ' \n"; - } else { - echo ''; - } - - echo "\n"; - - if ($config['participant_student_personal'] == 'yes') { - echo "\n"; - echo ' \n"; - echo ' \n"; - echo "\n"; - echo "\n"; - echo ' \n"; - echo ' \n"; - echo "\n"; - - echo "\n"; - echo ' \n"; - } else - echo ''; - - echo ' '; - echo ''; - - if ($config['participant_student_tshirt'] == 'yes') { - echo "\n"; - echo ' \n"; - echo ''; - } - - if ($config['participant_student_personal'] == 'yes') { - echo "\n"; - echo ''; - echo "\n"; - } - - if ($config['participant_student_foodreq'] == 'yes') { - echo "\n"; - echo ''; - echo "\n"; - } - - echo "\n"; - echo ' \n"; - echo "\n"; - - echo "\n"; - echo ' \n"; - echo ' \n"; - echo "\n"; - - echo '
    ' . i18n('First Name') . "' . REQUIREDFIELD . "' . i18n('Last Name') . "' . REQUIREDFIELD . "
    ' . i18n('Gender') . ''; - echo "' . REQUIREDFIELD; - } - echo "
    ' . i18n('Email Address') . "' . REQUIREDFIELD . "' . i18n('City') . "' . REQUIREDFIELD . "
    ' . i18n('Address') . "' . REQUIREDFIELD . "' . i18n($config['provincestate']) . ''; - emit_province_selector("province[$x]", get_value_property_or_default($studentinfo, 'province')); - echo REQUIREDFIELD . "
    ' . i18n($config['postalzip']) . "' . REQUIREDFIELD . "' . i18n('Phone') . "' . REQUIREDFIELD . "
    ' . i18n('Date of Birth') . "\n"; - list($year, $month, $day) = explode('-', get_value_property_or_default($studentinfo, 'dateofbirth', '')); - echo '
    '; - emit_day_selector("day[$x]", $day); - echo "\n"; - emit_month_selector("month[$x]", $month); - echo "\n"; - - // the year selector should be based on the min/max grades possible - // assume min age of 3 for grade=0 (kindergarden) - // assume max age of 18 for grade=12 - $minyearselect = $config['FAIRYEAR'] - 6 - $config['maxgrade']; - $maxyearselect = $config['FAIRYEAR'] - 3 - $config['mingrade']; - emit_year_selector("year[$x]", $year, $minyearselect, $maxyearselect); - echo '' . REQUIREDFIELD . "
    \n"; - echo "
    ' . i18n('Grade') . "\n"; - - echo "\n"; - echo REQUIREDFIELD . '
    ' . i18n('T-Shirt Size') . ''; - echo " '; - echo "
    ' . i18n('Medical Alert Info') . ''; - echo "medicalalert\" />"; - echo '
    ' . i18n('Special Food Requirements') . ''; - echo "'; - echo '
    ' . i18n('School') . ''; - if ($config['participant_registration_type'] == 'open' || $config['participant_registration_type'] == 'singlepassword' || $config['participant_registration_type'] == 'openorinvite' || ($studentinfo && !$studentinfo->schools_id)) { - $schoolq = $pdo->prepare("SELECT id,school,city FROM schools WHERE year=? ORDER by city,school"); - $schoolq->execute([$config['FAIRYEAR']]); - echo "' . REQUIREDFIELD; - } else { - $schoolq = $pdo->prepare("SELECT id,school FROM schools WHERE year=? AND id=?"); - $schoolq->execute([$config['FAIRYEAR'],$studentinfo->schools_id]); - $r = $schoolq->fetch(PDO::FETCH_OBJ); - echo $r->school; - } - - echo "
    ' . i18n('Teacher Name') . "' . i18n('Teacher Email') . "
    '; - - if ($numfound > $config['minstudentsperproject'] && $studentinfo->id) { - /* - * Create a hidden with same id as the button and some extra, so we can find it inside - * the button even with: this.id"+_studebts_id" - */ - echo "id}_students_id\" name=\"students_remove[]\" value=\"{$studentinfo->id}\" />"; - - /* Define the button */ - echo "
    '; - - echo '

    '; - } - - echo '
    '; - echo '
    '; - } - echo '
    '; - echo i18n('WARNING! If you make a change to the grade that would affect the project number, you must update the project number manually, it will NOT be automatically updated'); - echo '
    '; - echo '\n"; - echo '
    '; - echo '
    '; -} - -function registration_load() -{ - global $registrations_id, $config, $auth_type, $pdo; - - /* Load reg data */ - if ($registrations_id == -1) { - /* New project */ - /* Find a reg num */ - do { - $regnum = rand(100000, 999999); - $q = $pdo->prepare("SELECT * FROM registrations WHERE num=? AND year=?"); - $q->execute([$regnum, $config['FAIRYEAR']]); - } while ($q->rowCount() > 0); - - $r['num'] = $regnum; - - echo notice(i18n('New registration number generated.')); - echo notice(i18n('This new registration will added when the "Save Registration Information" button is pressed below. At that time the other tabs will become available.')); - } else { - $q = $pdo->prepare("SELECT * FROM registrations WHERE id=?"); - $q->execute([$registrations_id]); - if ($q->rowCount() != 1) - $r = array(); - else { - $r = $q->fetch(PDO::FETCH_ASSOC); - /* Get the fair from the project */ - $q = $pdo->prepare("SELECT fairs_id FROM projects WHERE registrations_id=?"); - $q->execute([$registrations_id]); - if ($q->rowCount() == 1) { - $p = $q->fetch(PDO::FETCH_ASSOC); - $r['fairs_id'] = $p['fairs_id']; - } - } - } - - /* Load fairs */ - $fairs = array(); - $q = $pdo->prepare("SELECT * FROM fairs WHERE type='feeder'"); - $q->execute(); - while (($f = $q->fetch(PDO::FETCH_ASSOC))) { - $fairs[$f['id']] = $f; - } - - /* Print form */ - $status = array('new' => 'New', 'open' => 'Open', 'paymentpending' => 'Payment Pending', 'complete' => 'Complete'); - - ?> -
    - - - - - - - - - - - - 0) { -?> - - - - -\n"; - } - ?> -
    :
    :
    :
    : - -
    -

    - -
    -prepare("INSERT INTO registrations (start,schools_id,year) VALUES ( - NOW(), NULL,?)"); - $stmt->execute([$config['FAIRYEAR']]); - $registrations_id = $pdo->lastInsertId(); - - /* Create one student and a project */ - $stmt = $pdo->prepare("INSERT INTO students (registrations_id,email,year) VALUES ( - - ?,?,?)"); - $stmt->execute([$registrations_id,$registration_email,$config['FAIRYEAR']]); - $stmt = $pdo->prepare("INSERT INTO projects (registrations_id,year) VALUES ( - - ?,?)"); - $stmt->execute([$registrations_id,$config['FAIRYEAR']]); - happy_('Created student and project record'); - } - - /* Update registration */ - $stmt = $pdo->prepare("UPDATE registrations SET - num=?, - status=?, - email=? - WHERE - id=?"); - $stmt->execute([$registration_num,$registration_status,$registration_email,$registrations_id]); - show_pdo_errors_if_any($pdo); - - /* - * And the fairs_id, override anythign specified - * if the user is a fair, force their own fairs_id - */ - if ($auth_type == 'fair') - $fairs_id = $_SESSION['fairs_id']; - $stmt = $pdo->prepare("UPDATE projects SET - fairs_id=? - WHERE - registrations_id=?"); - $stmt->execute([$fairs_id,$registrations_id]); - show_pdo_errors_if_any($pdo); - happy_('Information Saved'); - echo ''; -} - -?> diff --git a/admin/tours.php b/admin/tours.php deleted file mode 100644 index 8dd45cef..00000000 --- a/admin/tours.php +++ /dev/null @@ -1,45 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'tour_management'); -echo '' . i18n('Manage Tours') . ' ' . i18n('- Add, Delete, Edit, and List tours') . '
    '; -echo '' . i18n('Edit Student-Tour Assignments') . '
    '; -echo '
    '; -echo '' . i18n('Automatic Tour Assignments') . '
    '; - -send_footer(); - -?> diff --git a/admin/tours_assignments.php b/admin/tours_assignments.php deleted file mode 100644 index 683f9a45..00000000 --- a/admin/tours_assignments.php +++ /dev/null @@ -1,339 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare($query); -$r->execute([$config['FAIRYEAR']]); -$tours = array(); -while ($i = $r->fetch(PDO::FETCH_OBJ)) { - $tours[$i->id]['name'] = $i->name; - $tours[$i->id]['num'] = $i->num; -} - -if (get_value_from_array($_GET, 'action') == 'info') { - $sid = intval($_GET['id']); - - $query = "SELECT * FROM students WHERE id=? - AND year=?"; - $r = $pdo->prepare($query); - $r->execute([$sid,$config['FAIRYEAR']]); - $i = $r->fetch(PDO::FETCH_OBJ); - - send_popup_header(i18n('Student Tour Rank Information - %1 %2', - array($i->firstname, $i->lastname))); - $query = "SELECT * FROM tours_choice - WHERE students_id=? - AND year=? - ORDER BY rank"; - $r = $pdo->prepare($query); - $r->execute([$sid,$config['FAIRYEAR']]); - echo ''; - $count = $r->rowwCount(); - while ($i = $r->fetch(PDO::FETCH_OBJ)) { - echo ''; - } - echo '
    '; - if ($i->rank == 0) { - echo '' . i18n('Current Assigned Tour') . ':'; - echo ''; - echo "#{$tours[$i->tour_id]['num']}: {$tours[$i->tour_id]['name']}"; - echo '

    '; - $count--; - } else { - echo '' . i18n('Tour Preference %1', - array($i->rank)) . ':'; - echo '
    '; - echo "#{$tours[$i->tour_id]['num']}: {$tours[$i->tour_id]['name']}"; - echo ''; - if ($i->rank == 1) - echo i18n('(Most Preferred)'); - if ($i->rank == $count) - echo i18n('(Least Preferred)'); - } - echo '
    '; - - send_popup_footer(); - exit; -} - -send_header('Tour Assignments', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Tours' => 'admin/tours.php')); -?> - - - 0) { - // make sure the tour is valid - if (!array_key_exists($tours_id, $tours)) { - /* Someone is hacking the POST */ - echo 'HALT: Tour list changed between the form and the POST.'; - exit; - } - - $added = 0; - foreach ($student_list AS $sid) { - /* Make sure the student exists */ - $sid = intval($sid); - - $q = $pdo->prepare("SELECT registrations_id FROM students - WHERE id=?"); - $q->execute([$sid]); - $i = $q->fetch(PDO::FETCH_OBJ); - $rid = $i->registrations_id; - - /* Delete any old linking */ - $stmt = $pdo->prepare("DELETE FROM tours_choice WHERE - students_id=? AND - year=? AND - rank='0'"); - $stmt->execute([$sid,$config['FAIRYEAR']]); - /* Connect this student to this tour */ - $stmt = $pdo->prepare("INSERT INTO tours_choice - (`students_id`,`registrations_id`, - `tour_id`,`year`,`rank`) - VALUES ( - ?,?,?, - ?,'0')"); - $stmt->execute([$sid,$rid,$tours_id,$config['FAIRYEAR']]); - $added++; - } - if ($added == 1) - $j = i18n('student'); - else - $j = i18n('students'); - - echo happy(i18n('%1 %2 added to tour #%3 (%4)', array( - $added, $j, $tours[$tours_id]['num'], $tours[$tours_id]['name'] - ))); -} - -$tours_id = intval(get_value_from_array($_GET, 'tours_id')); -$students_id = intval(get_value_from_array($_GET, 'students_id')); - -if (get_value_from_array($_GET, 'action') == 'del' && $tours_id > 0 && $students_id > 0) { - $stmt = $pdo->prepare("DELETE FROM tours_choice - WHERE students_id=? - AND year=? - AND rank='0'"); - $stmt->execute([$students_id,$config['FAIRYEAR']]); - - echo happy(i18n('Removed student from tour #%1 (%2)', array($tours[$tours_id]['num'], $tours[$tours_id]['name']))); -} - -if (get_value_from_array($_GET, 'action') == 'empty' && $tours_id > 0) { - $stmt = $po->prepare("DELETE FROM tours_choice WHERE - tour_id=? - AND year=? - AND rank='0'"); - $stmt->execute([$tours_id,$config['FAIRYEAR']]); - echo happy(i18n('Emptied all students from tour #%1 (%2)', array($tours[$tours_id]['num'], $tours[$tours_id]['name']))); -} - -if (!$_SESSION['viewstate']['students_teams_list_show']) - $_SESSION['viewstate']['students_teams_list_show'] = 'unassigned'; -// now update the students_teams_list_show viewstate -if (get_value_from_array($_GET, 'students_teams_list_show')) - $_SESSION['viewstate']['students_teams_list_show'] = $_GET['students_teams_list_show']; - -echo '
    '; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo '
    ' . i18n('Student List'); -echo '
    '; -echo ''; -echo '
    ' . i18n('Tours') . '
    '; - -/* - * Load students with the current tour selections - * (rank=0), or if there is no selection, make - * rank NULL, and tours_id NULL - */ -$querystr = "SELECT \tstudents.firstname, students.lastname, - students.id, - tours_choice.tour_id, tours_choice.rank - FROM - students - LEFT JOIN tours_choice ON (tours_choice.students_id=students.id AND tours_choice.rank=0) - LEFT JOIN registrations ON registrations.id=students.registrations_id - WHERE - students.year=? AND - (tours_choice.year=? OR - \t tours_choice.year IS NULL) AND - registrations.status='complete' - ORDER BY - students.lastname, - students.firstname, - tours_choice.rank"; - -$q = $pdo->prepare($querystr); -$q->execute([$config['FAIRYEAR'],$config['FAIRYEAR']]); - -show_pdo_errors_if_any($pdo); - -$student = array(); -$last_student_id = -1; -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $id = $r->id; - $tours_id = $r->tour_id; - $rank = $r->rank; - - if ($id != $last_student_id) { - $last_student_id = $id; - - $student[$id]['name'] = $r->firstname . ' ' . $r->lastname; - } - if ($tours_id != NULL) { - $tours[$tours_id]['students'][] = $id; - $student[$id]['tours_id'] = $tours_id; - } -} - -// rint_r($student); -echo ''; -echo ''; - -echo ''; -foreach ($tours as $tid => $t) { - echo ''; - $x = 0; - if (is_array($t['students'])) { - foreach ($t['students'] AS $sid) { - $s = $student[$sid]; - if ($x == 0) - echo ''; - echo ''; - if ($x == 2) { - echo ''; - $x = 0; - } else - $x++; - } - if ($x != 0) - echo ''; - echo ''; - } else { - echo ''; - } -} - -echo '

    '; - - echo ""; - echo " #{$t['num']}: {$t['name']} "; - echo '
    '; - echo "'; - echo ' '; - echo ""; - echo "{$s['name']}"; - echo '
    '; - echo ""; - echo ' ' . i18n('Empty All Members') . ' '; - echo ''; - echo ''; - echo '
    '; - echo error(i18n('Tour has no members'), 'inline'); - echo '
    '; - -echo '
    '; - -echo '
    '; -echo '
    '; - -send_footer(); - -?> diff --git a/admin/tours_manager.php b/admin/tours_manager.php deleted file mode 100644 index 6c1da4e7..00000000 --- a/admin/tours_manager.php +++ /dev/null @@ -1,96 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Tours' => 'admin/tours.php')); - -if ($_GET['action'] == 'renumber') { - $q = $pdo->prepare("SELECT id FROM tours WHERE year=?"); - $q->execute([$config['FAIRYEAR']]); - $x = 1; - while ($i = $q->fetch(PDP::FETCH_OBJ)) { - $stmt = $pdo->prepare("UPDATE tours SET num=? WHERE id=?"); - $stmt->execute([$x,$i->id]); - $x++; - } - echo happy(i18n('Tours successfully renumbered')); -} - -?> - - -setDebug(true); -$editor->filterList("(tours.year={$config['FAIRYEAR']} OR tours.year IS NULL)"); - -$editor->execute(); - -if ($_GET['TableEditorAction'] == '') { - echo i18n('You can automatically erase all the tour numbers and - re-number them (starting from 1) by clicking on the link below. - This will NOT affect any students who have already specified - their tour preferences. It will not change which tours - students have been assigned to (if that has been completed - too). It MAY cause the tour numbers to change, so if you have - already printed reports with the tour numbers on them, they - will need to be re--printed.'); - - echo '

    '; - echo 'Renumber ALL Tours'; -} - -send_footer(); -?> diff --git a/admin/tours_sa.php b/admin/tours_sa.php deleted file mode 100644 index 1a0a4afa..00000000 --- a/admin/tours_sa.php +++ /dev/null @@ -1,320 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -'); - -function set_status($txt) -{ - TRACE("Status: $txt\n"); - $stmt = $pdo->prepare("UPDATE config SET val=? WHERE - var='tours_assigner_activity' AND year=0"); - $stmt->execute([$txt]); -} - -$set_percent_last_percent = -1; - -function set_percent($n) -{ - global $set_percent_last_percent; - $p = floor($n); - if ($p == $set_percent_last_percent) - return; - TRACE("Progress: $p\%\n"); - $set_percent_last_percent = $p; - $stmt = $pdo->prepare("UPDATE config SET val=? WHERE - var='tours_assigner_percent' AND year=0"); - $stmt->execute([$p]); -} - -set_status('Initializing...'); -set_percent(0); - -/* - * The cost function is: - * - Foreach student in a tour - * +15 - Above the grade level - * +25 - Below the grade level - * +2 - Noone from the same school - * If ranked (rank=1,2,3,4,...): - * +(rank*rank*5 - 5) = +0, +15, +40, +75 - * If not ranked and max choices specified - * +(max_choices*max_choices*5) (always greater than ranked) - * else max choices not specified - * +((max_choices-1)*(max_choices-1)*5) - * - Foreach tour - * +100 for each student above the capacity - * +200 for each student below 1/4 the capacity,but - * zero if the tour is empty - * - * Notes: - * - If a student doesn't fill in all their choices, we don't want to give - * them an unfair scheduling advantage. They'll significantly increase - * the cost if they don't get their chosen tour, whereas someone who - * specifies all the choices will gradually increase the cost. So, we - * want to make it "more ok" for the annealer to place someone who - * hasn't ranked their max number of tours in any tour, and make it - * "less ok" for someone who has specified all the rankings to be placed - * anywhere. - */ - -function tour_cost_function($annealer, $bucket_id, $ids) -{ - global $config; - global $tid; - global $tours; - global $students; - /* Bucket ID is the tour number */ - /* ids are the student ids currently in the bucket */ - - // TRACE("Bucket id=$bucket_id, ids="); - // TRACE_R($ids); - - $cost = 0; - - $t = &$tours[$bucket_id]; - $tid = $t['id']; - - /* Compute the over max / under min costs */ - $c = count($ids); - $over = ($c > $t['capacity']) ? $c - $t['capacity'] : 0; - if ($c > 0) - $under = ($c < ($t['capacity'] / 4)) ? ($t['capacity'] / 4) - $c : 0; - else - $under = 0; - - $cost += $over * 100; - $cost += $under * 200; - - // TRACE("Under min=$min, over max=$max\n"); - // TRACE("($bucket_id) {$t['id']} #{$t['num']} {$t['name']} (cap:{$t['capacity']} grade:{$t['grade_min']}-{$t['grade_max']})\n"); - - $schools = array(); - /* For each student on the tour */ - foreach ($ids as $x => $sid) { - $s = &$students[$sid]; - - // $tids = implode(' ', $s['rank']); - // TRACE(" - {$s['name']} ($tids) (g:{$s['grade']} sid:{$sid} sch:{$s['schools_id']})\n"); - /* Score the rank */ - if (count($s['rank']) == 0) { - /* - * The student hasn't made any selection, assume they - * are ok whereever we put them. - */ - $rank_cost = 0; - // TRACE(" -> No choices!\n"); - } else { - $rank_cost = -1; - foreach ($s['rank'] as $rank => $rank_tid) { - // TRACE(" -> Searching for tid $tid at rank $rank -> $rank_tid\n"); - if ($rank_tid != $tid) - continue; - $rank_cost = ($rank * $rank * 5) - 5; - // TRACE(" -> matched tid $tid at rank $rank\n"); - break; - } - } - - if ($rank_cost == -1) { - /* Coulnd't find tour id in the student ranks */ - if (count($s['rank']) < $config['tours_choices_max']) { - /* - * Student didn't choose their max # of tours, - * give a slightly lower cost - */ - $rank_cost = ($config['tours_choices_max'] - 1) * ($config['tours_choices_max'] - 1) * 5; - } else { - /* - * Student chose max tours and they're in a - * tour they didn't pick, big cost. - */ - $rank_cost = $config['tours_choices_max'] * $config['tours_choices_max'] * 5; - } - } - // TRACE(" -> rank cost $rank_cost\n"); - $cost += $rank_cost; - - /* Check for student below/above grade range */ - if ($s['grade'] < $t['grade_min']) - $cost += 15; - if ($s['grade'] > $t['grade_max']) - $cost += 25; - - /* Record the school */ - $schools[$s['schools_id']]++; - } - - /* Search the schools array for insteances of '1' */ - foreach ($schools as $sid => $cnt) { - if ($cnt == 1) - $cost += 2; - } - - // TRACE("Final for bucket $bucket_id, cost is $cost\n"); - - return $cost; -} - -set_status('Cleaning existing tour assignments...'); -TRACE("\n\n"); -$q = $pdo->prepare("DELETE FROM tours_choice - WHERE year=? - AND rank='0'"); -$q->execute([$config['FAIRYEAR']]); - -set_status('Loading Data From Database...'); -TRACE("\n\n"); -TRACE("Tours...\n"); -$tours = array(); -$q = $pdo->prepare("SELECT * FROM tours WHERE year=?"); -$q-> execute([$config['FAIRYEAR']]); -$x = 0; - -/* - * Index with $x here, because these need to match up with the bucket ids of - * the annealer - */ -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $tours[$x]['capacity'] = $r->capacity; - $tours[$x]['grade_min'] = $r->grade_min; - $tours[$x]['grade_max'] = $r->grade_max; - $tours[$x]['id'] = $r->id; - $tours[$x]['name'] = $r->name; - TRACE(" ($x) #{$r->id}: #{$r->num} {$r->name} (cap:{$r->capacity} grade:{$r->grade_min}-{$r->grade_max})\n"); - $x++; -} - -$students = array(); -TRACE("Loading Students...\n"); -$q = $pdo->prepare("SELECT students.id,students.grade, - students.registrations_id, - students.schools_id, - students.firstname, students.lastname - FROM students - LEFT JOIN registrations ON registrations.id=students.registrations_id - WHERE - students.year=? - AND ( registrations.status='complete' - OR registrations.status='paymentpending' ) - ORDER BY - students.id - "); -$q->execute([$config['FAIRYEAR']]); -$last_sid = -1; -TRACE($pdo->errorInfo()); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $sid = $r->id; - $students[$sid]['name'] = $r->firstname . ' ' . $r->lastname; - $students[$sid]['grade'] = $r->grade; - $students[$sid]['registrations_id'] = $r->registrations_id; - $students[$sid]['rank'] = array(); - $students[$sid]['schools_id'] = $r->schools_id; -} -$student_ids = array_keys($students); -TRACE(' ' . (count($student_ids)) . " students loaded\n"); - -TRACE("Loading Tour Selection Preferences...\n"); -$q = $pdo->prepare("SELECT * FROM tours_choice WHERE - tours_choice.year=? - ORDER BY rank "); -$q->execute([$config['FAIRYEAR']]); -TRACE($pdo->errorInfo()); -$x = 0; -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $sid = $r->students_id; - if (!array_key_exists($sid, $students)) - continue; - $students[$sid]['rank'][$r->rank] = $r->tour_id; - $x++; -} -TRACE(" $x preferences loaded.\n"); - -function tours_assignment_update($progress, $total) -{ - set_percent(($progress * 50) / $total); -} - -TRACE("Effort: {$config['tours_assigner_effort']}\n"); -set_status('Assigning students to tours'); -$e = 100 + 10 * ($config['tours_assigner_effort'] / 100); -$a = new annealer(count($tours), 50, $e, 0.98, - tour_cost_function, $student_ids); -$a->set_update_callback(tours_assignment_update); -$a->anneal(); - -/* Record the assignments */ -foreach ($tours as $x => $t) { - TRACE("($x) {$t['id']} #{$t['num']} {$t['name']} (cap:{$t['capacity']} grade:{$t['grade_min']}-{$t['grade_max']})\n"); - - $sids = $a->bucket[$x]; - - TRACE(" - Cost:{$a->bucket_cost[$x]} Students: " . (count($sids)) . "\n"); - foreach ($sids as $sid) { - $s = $students[$sid]; - $tids = implode(' ', $s['rank']); - TRACE(" - {$s['name']} ($tids) (g:{$s['grade']} sid:{$sid} sch:{$s['schools_id']})\n"); - $stmt = $pdo->prepare("INSERT INTO tours_choice - (`students_id`,`registrations_id`, - `tour_id`,`year`,`rank`) - VALUES (?,?,?,?,0)"); - $stmt->execute([$sid,$s['registrations_id'],$t['id'],$config['FAIRYEAR']]); - } -} - -TRACE("All Done.\n"); -echo '
    '; - -set_percent(-1); -set_status('Done'); - -// echo happy("Scheduler completed successfully"); - -// send_footer(); -?> diff --git a/admin/tours_sa_config.php b/admin/tours_sa_config.php deleted file mode 100644 index ac4fc264..00000000 --- a/admin/tours_sa_config.php +++ /dev/null @@ -1,143 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -/dev/null 2>&1 &'); - usleep(1000000); // 1 second to allow the judges_sa to update the % status to 0% otherwise the status page will think its not running if it gets there too soon - header('Location: tours_sa_status.php'); - exit; -} - -$action = config_editor_handle_actions('Tour Assigner', $config['FAIRYEAR'], 'var'); -if ($action == 'update') { - header('Location: tours_sa_config.php'); - exit; -} - -send_header('Automatic Tour Assignment Configuration', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Tours' => 'admin/tours.php')); - -config_editor('Tour Assigner', $config['FAIRYEAR'], 'var', $_SERVER['PHP_SELF']); - -echo '
    '; - -function tours_check_tours() -{ - global $config; - global $pdo; - $q = $pdo->prepare("SELECT * FROM tours WHERE year=?"); - $q->execute([$config['FAIRYEAR']]); - return $q->rowCount(); -} - -function tours_check_students() -{ - global $config; - global $pdo; - $q = $pdo->prepare("SELECT students.id - FROM students - LEFT JOIN tours_choice ON (tours_choice.students_id=students.id) - LEFT JOIN registrations ON (registrations.id=students.registrations_id) - WHERE - students.year=? - AND tours_choice.year=? - AND registrations.status='complete' - ORDER BY - students.id, tours_choice.rank - "); - $q->execute([$config['FAIRYEAR'],$config['FAIRYEAR']]); - return $q->rowCount(); -} - -if (get_value_from_array($_GET, 'action') == 'reset') { - $stmt = $pdo->prepare("UPDATE config SET `val`='-1' WHERE `var`='tours_assigner_percent' AND `year`=0"); - $stmt->execute(); - $config['tours_assigner_percent'] == '-1'; - echo happy(i18n('Judge assigner status forcibly reset')); -} - -if ($config['tours_assigner_percent'] == '-1') { - $ok = 1; - - $tours = tours_check_tours(); - if ($tours > 0) { - echo happy(i18n('There are %1 tours defined, good', array($tours))); - } else { - echo error(i18n('There are no tours defined.')); - $ok = 0; - } - - $x = tours_check_students(); - if ($x > 0) { - echo happy(i18n('There are %1 student-tour rankings, good', array($x))); - } else { - echo error(i18n('There are no student-tour rankings.')); - $ok = 0; - } - - if ($ok) { - echo i18n("Everything looks in order, we're ready to automatically - assign the students to the tours. Click link below to start the process. - Please be patient as it may take several minutes find a good solution."); - - echo '
    '; - echo '
    '; - - echo '' . i18n('Automatically Assign Students to Tours') . ''; - } -} else { - echo '
    '; - echo ''; - echo i18n('Automatic assignemnts are currently in progress'); - echo ''; - echo '
    '; - echo '
    '; - echo '' . i18n('Click here to check the tour assignment progress') . ''; - echo '
    '; - echo '
    '; - echo '
    '; - echo i18n('If it is not running (and you are 100% sure that it is not!) click the link below to reset the status'); - echo '
    '; - echo '' . i18n('Reset automatic tour assignment status') . '';; -} - -echo '
    '; -echo '
    '; -echo '
    '; - -send_footer(); - -?> diff --git a/admin/tours_sa_status.php b/admin/tours_sa_status.php deleted file mode 100644 index 5b095cbc..00000000 --- a/admin/tours_sa_status.php +++ /dev/null @@ -1,143 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT val FROM config WHERE year='0' AND var='tours_assigner_percent'"); - $q->execute(); - $r = $q->fetch(PDO::FETCH_OBJ); - $percent = $r->val; - - $q = $pdo->prepare("SELECT val FROM config WHERE year='0' AND var='tours_assigner_activity'"); - $q->execute(); - $r = $q->fetch(PDO::FETCH_OBJ); - $status = $r->val; - - echo "$percent:$status\n"; - exit; -} - -require ('../common.inc.php'); -send_header('Scheduler Status', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Tours' => 'admin/tours.php')); -require_once ('../ajax.inc.php'); -?>DBHOST'updatestatus').innerHTML="Updating..."; - var url="tours_sa_status.php?action=output"; - http.open("GET",url,true); - http.onreadystatechange=handleResponse; - http.send(null); -} - -function clearUpdatingMessage() -{ - document.getElementById('updatestatus').innerHTML="Working..."; - -} - -function handleResponse()DBHOST -{ - try { - - if(http.readyState==4) - {DBHOST - var obj=http.responseText.split(":"); - document.getEleDBHOSTmentById('schedulerstatus').innerHTML=obj[1]; - if(obj[0]=="-1") - { - document.getElementById('schedulerpercent').innerHTML="100%"; - document.getElementById('updatestatus').innerHTML="Scheduling Complete"; - document.getDBHOSTElementById('schedulereta').innerHTML="Complete"; - } - else - { - document.getElementById('schedulerpercent').innerHTML=obj[0]+"%"; - setTimeout('DBHOSTupdateStatus()',5000); - document.getElementById('updatestatus').innerHTML="Updating... Done!"; - setTimeout('DBHOSTclearUpdatingMessage()',500); - - var currentTime=new Date(); - if(starttime==0) - { - starttime=currentTime.getTime(); - startpercent=obj[0]; - } - deltatime=cDBHOSTurrentTime.getTime()-starttime; - deltapercent=obj[0]-startpercent; - - avgtimeperpercent=deltatime/deltapercent; - remainingpercent=100-obj[0]; - remainingtime=remainingpercent*avgtimeperpercent; - if(remainingtime && obj[0]>0) - document.getElementById('schedulereta').innerHTML=Math.round(remainingtime/1000)+" seconds"; - else - document.getElementById('schedulereta').innerHTML="Calculating..."; - } - } - } - catch(e)DBHOST - { - alert('caught error'+e); - - } -} - - - -'; - echo '
    '; - echo '' . i18n('Automatic Tour Assignment Configuration') . ''; -} else { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo '
    ' . i18n('Assignment status') . ':
    ' . i18n('Assignment percent') . ':
    ' . i18n('Assignment ETA') . ':
    '; - - echo '
    '; - echo i18n('When the assignments are complete, the following links will be useful:'); - echo '
    '; -?> - - diff --git a/admin/translations.php b/admin/translations.php deleted file mode 100644 index 7add4c5d..00000000 --- a/admin/translations.php +++ /dev/null @@ -1,166 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'translations_management'); - -// by default, we will edit the french translations -if (get_value_from_array($_GET, 'translang')) - $_SESSION['translang'] = $_GET['translang']; - -if (!get_value_from_array($_SESSION, 'translang')) - $_SESSION['translang'] = 'fr'; - -$show = false; - -if (get_value_from_array($_GET, 'show')) - $show = $_GET['show']; -else if (get_value_from_array($_POST, 'show')) - $show = $_POST['show']; - -if (!$show) - $show = 'missing'; - -if (get_value_from_array($_POST, 'action') == 'save') { - // first, delete anything thats supposed to eb deleted - if (count(get_value_from_array($_POST, 'delete', []))) { - foreach ($_POST['delete'] AS $del) { - $stmt = $pdo->prepare("DELETE FROM translations WHERE lang=? AND strmd5=?"); - $stmt->execute([$_SESSION['translang'],$del]); - } - echo happy(i18n('Translation(s) deleted')); - } - if ($_POST['changedFields']) { - $changed = split(',', $_POST['changedFields']); - foreach ($changed AS $ch) { - $stmt = $pdo->prepare("UPDATE translations SET val=? WHERE strmd5=? AND lang=?"); - $stmt->execute([stripslashes($_POST['val'][$ch]),$ch ,$_SESSION['translang']]); - } - echo happy(i18n('Translation(s) saved')); - } -} - -echo ''; -echo ''; -echo '
    '; -echo i18n('Choose a language to manage translations for'); -echo ''; -echo '
    '; -echo ''; -echo '
    '; -echo '
    '; - -if ($show == 'missing') { - echo i18n('Show missing translations'); - echo '  |  '; - echo '' . i18n('Show all translations') . ''; -} else { - echo '' . i18n('Show missing translations') . ''; - echo '  |  '; - echo i18n('Show all translations'); -} - -echo '
    '; -echo '
    '; -echo i18n('Instructions: Enter the translation below the string and click Save. Only one translation can be saved at a time. The terms %1, %2, etc get substituded with various arguments to the string, so they must appear in the translation if they are in the original string.'); -echo '
    '; -echo '
    '; - -if ($show == 'missing') - $showquery = "AND ( val is null OR val='' )"; -else - $showquery = ''; - -$q = $pdo->prepare("SELECT * FROM translations WHERE lang=? $showquery ORDER BY str"); -$q->execute([get_value_from_array($_SESSION, 'translang')]); -$num = $q->rowCount(); -echo i18n('Showing %1 translation strings', array($num), array('number of strings')); - -echo '
    '; -echo ""; -echo ''; -echo ''; -?> - - -'; -echo ''; -echo '\n"; -echo ''; -global $translangname; -echo '' . i18n('English') . ' / ' . $translangname . "\n"; -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo ''; - echo "strmd5\">\n"; - echo ''; - echo htmlspecialchars($r->str); - if ($r->argsdesc) - echo '
    ' . i18n('Arguments:') . " $r->argsdesc "; - echo ''; - echo ''; - echo ''; - echo "strmd5}\" onchange=\"return doFocus('{$r->strmd5}');\" style=\"width: 95%\" type=\"text\" name=\"val[{$r->strmd5}]\" value=\"" . htmlspecialchars($r->val) . '" />'; - echo ''; -} -echo ''; -echo ''; -echo "
    \n"; - -send_footer(); -?> diff --git a/admin/user_editor_window.php b/admin/user_editor_window.php deleted file mode 100644 index c14f3825..00000000 --- a/admin/user_editor_window.php +++ /dev/null @@ -1,204 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - array( - 'label' => 'Fair Information', - 'types' => array('fair'), - 'file' => '../fair_info.php', - 'enabled' => true, - ), - 'fairstatsgathering' => array( - 'label' => 'Fair Stats Gathering', - 'types' => array('fair'), - 'file' => 'fair_stats_select.php', - 'enabled' => true, - ), - 'personal' => array( - 'label' => 'Personal', - 'types' => array('student', 'judge', 'committee', 'volunteer', 'sponsor', 'fair'), - 'file' => '../user_personal.php', - 'enabled' => true - ), - 'roles' => array( - 'label' => 'Roles/Account', - 'types' => array('student', 'judge', 'committee', 'volunteer', 'sponsor', 'fair'), - 'file' => '../user_activate.php', - 'enabled' => true - ), - 'judgeother' => array( - 'label' => 'Judge Other', - 'types' => array('judge'), - 'file' => '../judge_other.php', - 'enabled' => true - ), - 'judgeexpertise' => array( - 'label' => 'Expertise', - 'types' => array('judge'), - 'file' => '../judge_expertise.php', - 'enabled' => true - ), - 'judgeavailability' => array( - 'label' => 'Time Avail.', - 'types' => array('judge'), - 'file' => '../judge_availability.php', - 'enabled' => $config['judges_availability_enable'] == 'yes' ? true : false - ), - 'judgesa' => array( - 'label' => 'Special Awards', - 'types' => array('judge'), - 'file' => '../judge_special_awards.php', - 'enabled' => true, - ), - 'volunteerpos' => array( - 'label' => 'Volunteer Positions', - 'types' => array('volunteer'), - 'file' => '../volunteer_position.php', - 'enabled' => true, - ), - 'fairstats' => array( - 'label' => 'Fair Statistics and Information', - 'types' => array('fair'), - 'file' => '../fair_stats.php', - 'enabled' => true, - ), -); - -if (array_key_exists('username', $_GET)) { - $username = $_GET['username']; - $type = $_GET['type']; - $un = $username; - $q = $pdo->prepare("SELECT id,MAX(year),deleted FROM users WHERE username=? GROUP BY uid"); - $q->execute([$un]); - show_pdo_errors_if_any($pdo); - - if ($q->rowCount()) { - $r = $q->fetch(PDO::FETCH_OBJ); - if ($r->deleted == 'no') { - /* Load the user */ - $u = user_load_by_email($username); - if (in_array($type, $u['types'])) { - echo "Username already exists with role '$type'"; - exit; - } else { - /* - * Add the role, user_create does a role_allowed check - * so we'll never add a judge/committee role to a student - */ - user_create($type, $username, $u); - } - } else { - // undelete them? - $stmt = $pdo->prepare("UPDATE users SET deleted='no' WHERE id=?"); - $stmt->execute([$r->id]); - // then load them? - $u = user_load($r->id); - } - } else { - $u = user_create($type, $username); - $u['email'] = $username; - } - user_save($u); - $id = $u['id']; -} else { - $id = $_GET['id']; -} - -$u = user_load($id); - -$selected = get_value_from_array($_GET, 'tab'); -if (!array_key_exists($selected, $tabs)) { - if (in_array('fair', $u['types'])) - $selected = 'fairinfo'; - else - $selected = 'personal'; -} - -if (get_value_from_array($_GET, 'sub') == 1) { - $_SESSION['embed'] = true; - $_SESSION['embed_submit_url'] = "{$_SERVER['PHP_SELF']}?id=$id&tab=$selected"; - $_SESSION['embed_edit_id'] = $id; - $t = $tabs[$selected]; - include ("{$t['file']}"); - - unset($_SESSION['embed']); - unset($_SESSION['embed_edit_id']); - unset($_SESSION['embed_submit_url']); - exit; -} - -send_popup_header(i18n('User Editor') . ": {$u['name']}"); - -/* Setup tabs */ -echo '
    '; -echo '
      '; -$index = 0; -$selected_index = 0; -foreach ($tabs as $k => $t) { - /* Make sure the tab is enabled */ - if ($t['enabled'] == false) - continue; - /* Make sure the user has the right type to see the tab */ - $i = array_intersect($t['types'], $u['types']); - if (count($i) == 0) - continue; - - if ($k == $selected) - $selected_index = $index; - $index++; - - /* Show the tab */ - $href = "{$_SERVER['PHP_SELF']}?id=$id&tab=$k&sub=1"; - echo "
    • " . i18n($t['label']) . '
    • '; -} -echo '
    '; - -?> - - - diff --git a/admin/user_list.php b/admin/user_list.php deleted file mode 100644 index 79b71b87..00000000 --- a/admin/user_list.php +++ /dev/null @@ -1,498 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -// This file was modified March of 2015 by Sebastian Ruan -/* Flagging for judges has been added to monitor concerns. - Update User button also added; allows super users to update - a judge to the current fair year without logging in as them. */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php')); -?> - - -prepare("SELECT id,uid,year FROM users WHERE uid=? - ORDER BY year DESC LIMIT 1"); - $query->execute([$user['uid']]); - - $user_new = $query->fetch(PDO::FETCH_ASSOC); - - // Make sure our user is NOT in the current FAIRYEAR (again, this helps with page refresh to work ) - if ($user_new['year'] != $config['FAIRYEAR']) { - /* Update user to new year via dupelicating row into new id. - If multiple Roles, all updated */ - user_dupe($user, $config['FAIRYEAR']); - message_push(happy(i18n('User Updated'))); - - // find the newly updated user - $q_reload = $pdo->prepare("SELECT id FROM users WHERE uid=? - ORDER BY year DESC LIMIT 1"); - $q_reload->execute([$user['uid']]); - - $reload_user = $q_reload->fetch(PDO::FETCH_ASSOC); - - ?> - - '; -echo '- ' . i18n('Hide Display Options') . ''; - -echo '
    '; - -echo '
    '; -echo ''; -$x = 0; -foreach ($user_what as $k => $v) { - $sel = (in_array($k, $show_types)) ? 'checked="checked"' : ''; - echo "'; - if ($x) - echo ''; - $x = ~$x; -} -echo ''; - -echo ''; -echo '
    ' . i18n('Type') . ':" . i18n($v) . '
    ' . i18n('Complete') . ':'; -echo ''; - -echo '
    ' . i18n('Year') . ':'; -echo ''; -echo '
    '; -echo '
    '; -echo ''; -echo '
    '; -echo '
    '; - -echo '
    '; - -echo '
    ' . i18n('Add New User') . ''; -echo ''; -echo '
    '; -echo '
    '; - -/* Grab a list of users */ -$w = array(); -foreach ($show_types as $t) { - $w[] = "u1.types LIKE '%$t%'"; -} -$where_types = 'AND (' . join(' OR ', $w) . ')'; - -$where_complete = ''; -if ($show_complete == 'yes') { - foreach ($show_types as $t) { - $where_complete .= "AND ({$t}_complete='yes' OR {$t}_complete IS NULL) "; - } -} - -$having_year = ''; - -if ($show_year == 'current') - $having_year = "AND u1.year={$config['FAIRYEAR']}"; - -echo ''; - -$querystr = "SELECT - * - FROM - users u1 - LEFT JOIN `users_committee` ON `users_committee`.`users_id`=`u1`.`id` - LEFT JOIN `users_judge` ON `users_judge`.`users_id`=`u1`.`id` - LEFT JOIN `users_volunteer` ON `users_volunteer`.`users_id`=`u1`.`id` - LEFT JOIN `users_fair` ON `users_fair`.`users_id`=`u1`.`id` - LEFT JOIN `users_sponsor` ON `users_sponsor`.`users_id`=`u1`.`id`\t - WHERE u1.year=( SELECT MAX(`year`) FROM users u2 WHERE u1.uid=u2.uid ) - GROUP BY uid - HAVING - u1.deleted='no' - ? - ? - ? - ORDER BY - lastname ASC, - firstname ASC, - year DESC"; - -$q = $pdo->prepare($querystr); -$q->execute([$having_year,$where_types,$where_complete]); - -show_pdo_errors_if_any($pdo); -$num = $q->rowCount(); -show_pdo_errors_if_any($pdo); -echo i18n('Listing %1 people total. See the table at the bottom for the totals by status


    ', array($num)); -echo i18n(" Notes:
    • Deleting users from this list is a permanent operation and cannot be undone. Consider editing the user and deactivating or deleting roles in their account instead. - \t \t\t
    • Updating a user to the current fair year allows you to then complete the user from this list. - \t
    • A flagged judge indicates there is text in the private information field for that judge. - \t
    • Only committee members can see text entered into the private information field for judges. This field is not seen nor editable by any judge."); - -echo '
    '; -echo ''; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ''; -echo ''; - -$tally = array(); -$tally['active'] = array(); -$tally['inactive'] = array(); -$tally['active']['complete'] = 0; -$tally['active']['incomplete'] = 0; -$tally['inactive']['complete'] = 0; -$tally['inactive']['incomplete'] = 0; -while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - // JAMES - TEMP - due to the previous error with improperly setting judge status to NOT complete when special awards was turned off - // we now need to make sure we re-calculate all the judge statuses somehow, so might as well do it here. - // FIXME: remove this after all the fairs are done this year SUMMER 2010 - if (in_array('judge', $show_types)) { - $u = user_load_by_uid($r['uid']); - - // we also set the $r array so it displays properly on first load - if (judge_status_update($u) == 'complete') - $r['judge_complete'] = 'yes'; - else { - $r['judge_complete'] = 'no'; - } - } - $types = explode(',', $r['types']); - $span = count($types) > 1 ? 'rowspan="' . count($types) . '"' : ''; - echo "'; - - echo ""; - - echo ""; - - $first = true; - $complete = false; - $incomplete = false; - foreach ($types as $t) { - if (!$first) - echo ''; - echo ""; - - echo ''; - - echo ''; - - // Begin flagging process - - echo ''; - - // end flagging process - - if ($first) { - if ($name == ' ') - $name = 'Noname'; - - /* Finish off the the first line */ - // If judge not in current fair year need seperate icons so that all icons align nicely in the table - if ($t == 'judge' and $r['year'] != $config['FAIRYEAR']) { - echo "'; - } - - $first = false; - } - echo ''; - - if ($complete) { - $tally[$userstate]['complete']++; - } else if ($incomplete) { - $tally[$userstate]['incomplete']++; - } -} - -echo '
    ' . i18n('Name') . '' . i18n('Email Address') . '' . i18n('Year') . '' . i18n('Type(s)') . '' . i18n('Active') . '' . i18n('Complete') . '' . i18n('Flagged') . '' . i18n('Actions') . '
    "; - - $name = "{$r['firstname']} {$r['lastname']}"; - if (in_array('fair', $types)) { - $qq = $pdo->prepare("SELECT * FROM users_fair - LEFT JOIN fairs ON fairs.id=users_fair.fairs_id - WHERE users_id=?"); - $qq->execute([$r['id']]); - $rr = $qq->fetch(PDO::FETCH_ASSOC); - $name = '{' . get_value_from_array($rr, 'name') . '}' . ((trim($name) == '') ? '' : "
    ($name)"); - } - echo "$name"; - echo '
    {$r['email']}{$r['year']}
    {$user_what[$t]}'; - if (get_value_from_array($r, "{$t}_active") == 'yes') { - echo '
    ' . i18n('yes') . '
    '; - $userstate = 'active'; - } else { - echo '
    ' . i18n('no') . '
    '; - $userstate = 'inactive'; - } - echo '
    '; - if (in_array($t, array('parent', 'committee', 'alumni', 'mentor', 'fair'))) { - /* Do nothing, there's nothing to complete */ - } else if ($r["{$t}_complete"] == 'yes') { - echo '
    ' . i18n('yes') . '
    '; - $complete = true; - } else { - echo '
    ' . i18n('no') . '
    '; - $incomplete = true; - } - echo '
    '; - - // Must be a judge in order to be flagged - if ($t == 'judge') { - /* Determine if judge is flagged and display X icon. - Icon is clickable. Brings user to user_editor_window file. - Would preferably ALSO bring the user to the judge other tab*/ - if ($r['flagged_judge'] == '1') { - echo '"; - echo ''; - echo ''; - - // Otherwise judge is not flagged; display checkmark icon. Also clickable. - } else { - echo '"; - echo ''; - echo ''; - } - } else { - // Do nothing. Only judges can be flagged. - } - - echo '"; - echo '      '; // aligns icons - echo " "; - echo '"; - echo " "; - } else { - echo ""; - echo " "; - echo '"; - } - - echo '
    '; - -// let's make a table with the complete/incomplete counts and the active/inacteve states -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    List Totals
    CompleteIncompleteTotal
    Active
    Inactive
    Total
    - diff --git a/admin/volunteer_positions_manager.php b/admin/volunteer_positions_manager.php deleted file mode 100644 index 0fd90b84..00000000 --- a/admin/volunteer_positions_manager.php +++ /dev/null @@ -1,55 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/', - 'Volunteer Management' => 'admin/volunteers.php')); - -$editor = new TableEditor('volunteer_positions', - array('name' => 'Name', - 'desc' => 'Description', - 'meet_place' => 'Location Information', - 'start' => 'Start Day/Time', - 'end' => 'End Day/Time'), null, - array('year' => $config['FAIRYEAR'])); - -$editor->setPrimaryKey('id'); -$editor->setDefaultSortField('start,name'); -$editor->setRecordType('Volunteer Position'); -$editor->filterList('year', $config['FAIRYEAR']); -$editor->execute(); - -send_footer(); -?> diff --git a/admin/volunteers.php b/admin/volunteers.php deleted file mode 100644 index e1f94179..00000000 --- a/admin/volunteers.php +++ /dev/null @@ -1,45 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'volunteer_management'); -echo '
    '; -echo '' . i18n('Volunteer Manager') . '
    '; -echo '' . i18n('Volunteer Position Management') . '
    '; -echo '' . i18n('Invite Volunteers') . '
    '; - -send_footer(); - -?> diff --git a/admin/winners.php b/admin/winners.php deleted file mode 100644 index 14b98d8b..00000000 --- a/admin/winners.php +++ /dev/null @@ -1,658 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT * FROM fairs WHERE type='feeder' ORDER BY name"); -$q->execute(); -while (($f = $q->fetch(PDO::FETCH_ASSOC))) { - $fairs[$f['id']] = $f; -} - -switch ($action) { - case 'addwinner': - $prize_id = intval($_GET['prize_id']); - $projects_id = intval($_GET['projects_id']); - - if (!$prize_id || !$projects_id) { - error_('Illegal Assignment'); - exit; - } - - // first check how many we are allowed to have - $q = $pdo->prepare('SELECT number FROM award_prizes WHERE id=?'); - $q->execute([$prize_id]); - show_pdo_errors_if_any($pdo); - $r = $q->fetch(PDO::FETCH_ASSOC); - $number = $r['number']; - - /* Get the award info */ - $q = $pdo->prepare('SELECT * FROM award_awards WHERE id=?'); - $q->execute([$award_awards_id]); - show_pdo_errors_if_any($pdo); - $a = $q->fetch(PDO::FETCH_ASSOC); - - /* Get the project */ - $q = $pdo->prepare('SELECT fairs_id FROM projects WHERE id=?'); - $q->execute([$projects_id]); - show_pdo_errors_if_any($pdo); - $p = $q->fetch(PDO::FETCH_ASSOC); - $fairs_id = $p['fairs_id']; - - /* - * Quick sanity check don't let a fair user do an assignment for someone not - * in their fair - */ - if ($auth_type == 'fair' && $fairs_id != $_SESSION['fairs_id']) { - error_('Illegal Assignemnt'); - exit; - } - - if ($a['per_fair'] == 'yes') { - /* Count is the number of this fair already assigned */ - $q = $pdo->prepare('SELECT COUNT(*) AS count FROM winners - LEFT JOIN projects ON winners.projects_id=projects.id - WHERE - projects.fairs_id=? - awards_prizes_id=?'); - $q->execute([$fairs_id, $prize_id]); - show_pdo_errors_if_any($pdo); - $r = $q->fetch(PDO::FETCH_ASSOC); - $count = $r['count']; - } else { - /* Count is the total number assigned */ - $q = $pdo->prepare('SELECT COUNT(*) AS count FROM winners WHERE awards_prizes_id=?'); - $q->execute([$prize_id]); - show_pdo_errors_if_any($pdo); - $r = $q->fetch(PDO::FETCH_ASSOC); - $count = $r['count']; - } - - if ($count < $number) { - $stmt = $pdo->prepare('INSERT INTO winners (awards_prizes_id,projects_id,year) VALUES (?,?,?)'); - $stmt->execute([$prize_id, $projects_id, $config['FAIRYEAR']]); - happy_('Winning project added'); - } else { - error_('This prize cannot accept any more winners. Maximum: %1', $number); - } - - exit; - - case 'deletewinner': - $prize_id = intval($_GET['prize_id']); - $projects_id = intval($_GET['projects_id']); - - if ($prize_id && $projects_id) { - $stmt = $pdo->prepare('DELETE FROM winners WHERE awards_prizes_id=? AND projects_id=?'); - $stmt->execute([$prize_id, $projects_id]); - happy_('Winning project removed'); - } - exit; - case 'award_load': - $fairs_id = intval($_GET['fairs_id']); - /* Load the award */ - $q = $pdo->prepare("SELECT - award_awards.id, - award_awards.name, - award_awards.criteria, - award_awards.order AS awards_order, - award_awards.per_fair, - award_awards.external_additional_materials, - award_awards.award_source_fairs_id, - award_types.type - FROM - award_awards , - award_types - WHERE - award_awards.year=? - AND\taward_awards.award_types_id=award_types.id - AND \taward_types.year=award_awards.year - AND\taward_awards.id=? - "); - $q->execute([$config['FAIRYEAR'], $award_awards_id]); - - show_pdo_errors_if_any($pdo); - - if ($q->rowCount() != 1) { - echo i18n("Invalid award to load $award_awards_id"); - exit; - } - $r = $q->fetch(PDO::FETCH_ASSOC); - print_award($r, $fairs_id); - exit; - - case 'edit_load': - $fairs_id = intval($_GET['fairs_id']); - - /* Force the fair user to only edit their fair */ - // if($auth_type == 'fair') $fairs_id = $_SESSION['fairs_id']; - - /* Load the award */ - $q = $pdo->prepare("SELECT - award_awards.id, - award_awards.name, - award_awards.criteria, - award_awards.order AS awards_order, - award_awards.per_fair, - award_awards.external_additional_materials, - award_awards.award_source_fairs_id, - award_types.type - FROM - award_awards , - award_types - WHERE - award_awards.year=? - AND\taward_awards.award_types_id=award_types.id - AND \taward_types.year=award_awards.year - AND\taward_awards.id=? - "); - $q->execute([$config['FAIRYEAR'], $award_awards_id]); - - show_pdo_errors_if_any($pdo); - - if ($q->rowCount() != 1) { - echo i18n("Invalid award to edit $award_awards_id"); - exit; - } - - $r = $q->fetch(PDO::FETCH_ASSOC); - - $editor_data = array(); - - /* Load projects */ - if ($r['type'] == 'Special') { - $editor_data['projects_nominated'] = getProjectsNominatedForSpecialAward($r['id']); - $editor_data['disable_nominated'] = false; - } else { - $editor_data['projects_nominated'] = array(); - $editor_data['disable_nominated'] = true; - } - $editor_data['projects_eligible'] = getProjectsEligibleForAward($r['id']); - - /* Print the award header */ - echo '
    '; - if ($fairs_id) - echo '

    ' . i18n('Winners from') . ": {$fairs[$fairs_id]['name']}

    "; - echo "{$r['type']} - {$r['name']}
    "; - echo "{$r['criteria']}
    "; - - /* Print the award with editor */ - print_award($r, $fairs_id, true, $editor_data); - exit; - - case 'additional_materials': - $fairs_id = intval($_GET['fairs_id']); - $q = $pdo->prepare('SELECT * FROM award_awards WHERE id=?'); - $q->execute([$award_awards_id]); - if ($fairs_id == 0) { - echo "Unsupported Action: Can't get additional materials for fairs_id=0. Edit the project and set it's fair to anything except 'Local/Unspecified'."; - exit; - } - $a = $q->fetch(PDO::FETCH_ASSOC); - $q = $pdo->prepare('SELECT * FROM fairs WHERE id=?'); - $q->execute([$fairs_id]); - $fair = $q->fetch(PDO::FETCH_ASSOC); - $pdf = fair_additional_materials($fair, $a, $config['FAIRYEAR']); - foreach ($pdf['header'] as $h) - header($h); - echo $pdf['data']; - exit; -} - -if ($auth_type == 'fair') { - send_header('Enter Winning Projects', - array('Science Fair Main' => 'fair_main.php'), - 'enter_winning_projects'); -} else { - send_header('Enter Winning Projects', - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php'), - 'enter_winning_projects'); -} - -?> - - - -prepare("SELECT - award_awards.id, - award_awards.name, - award_awards.order AS awards_order, - award_awards.per_fair, - award_awards.external_additional_materials, - award_awards.award_source_fairs_id, - award_types.type, - sponsors.organization - FROM - award_awards $fair_join, - award_types, - sponsors - WHERE - award_awards.year=? - AND award_awards.award_types_id=award_types.id - AND award_types.year=? - AND award_awards.sponsors_id=sponsors.id - $fair_where - ORDER BY awards_order"); -$q->execute([$config['FAIRYEAR'], $config['FAIRYEAR']]); - -show_pdo_errors_if_any($pdo); - -if ($q->rowCount() == 0) { - echo i18n('No awards to display.'); - send_footer(); - exit; -} - -echo '
    '; -echo i18n('Choose an award to assign winners'); -echo '
    '; -echo '
    '; - -$fairs_id = ($auth_type == 'fair') ? $_SESSION['fairs_id'] : 0; - -while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - if ($r['per_fair'] == 'yes' && $auth_type != 'fair') { -?> - - ()
    - $f) { - ?> -
    -
    - -'; - } - } else { - ?> - - - ()
    -
    -'; - } - echo '
    '; -} - -function print_award(&$r, $fairs_id, $editor = false, $editor_data = array()) -{ - global $config, $auth_type; - global $pdo; - - // echo "fair=$fairs_id"; - - /* - * Setup the winner filter, we don't want to restrict this - * to a specific fair for the 'fair' user - */ - $fairs_where = ''; - if ($r['per_fair'] == 'yes') { - if ($fairs_id == 0) { - echo "blank fairs_id for per-fair award. bug.\n"; - exit; - } - /* For per-fair awards, filter the results */ - $fairs_where = "AND projects.fairs_id='$fairs_id'"; - } - - /* Force the 'fair' user to only edit their own fair */ - if ($auth_type == 'fair') - $fairs_id = $_SESSION['fairs_id']; - - /* Load prizes for this award */ - $q = $pdo->prepare('SELECT - award_prizes.prize, - award_prizes.number, - award_prizes.id, - award_prizes.cash, - award_prizes.scholarship - FROM - award_prizes - WHERE - award_awards_id=? - AND award_prizes.year=? - ORDER BY - `order`'); - $q->execute([$r['id'], $config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - - echo '
    '; - $has_winners = false; - while ($pr = $q->fetch(PDO::FETCH_OBJ)) { - if ($editor == true) { - echo '

    '; - } - - echo "  {$pr->prize}"; - if ($pr->cash || $pr->scholarship) { - echo ' ('; - if ($pr->cash && $pr->scholarship) - echo "\${$pr->cash} cash / \${$pr->scholarship} scholarship"; - else if ($pr->cash) - echo "\${$pr->cash} cash"; - else if ($pr->scholarship) - echo "\${$pr->scholarship} scholarship"; - echo ')'; - } - - /* Load winners for this prize */ - $cq = $pdo->prepare('SELECT winners.projects_id, - projects.projectnumber, - projects.title, - projects.fairs_id - FROM - winners - LEFT JOIN projects ON projects.id=winners.projects_id - WHERE - winners.awards_prizes_id=? - ? '); - $cq->execute([$pr->id, $fairs_where]); - show_pdo_errors_if_any($pdo); - $count = $cq->rowCount(); - // echo "winners=$count"; - - /* Print count */ - $colour = ($count < $pr->number) ? 'red' : 'green'; - echo " [$count/{$pr->number}]"; - echo ''; - echo '
    '; - - /* List current winners for this prize */ - $winners = array(); - while ($w = $cq->fetch(PDO::FETCH_ASSOC)) { - if ($w['projectnumber']) { - echo '    '; - if ($editor == true) { - /* Print the delete X before the project */ - if ($auth_type == 'fair' && $w['fairs_id'] != $fairs_id) { - /* show a blank so everything lines up */ - echo '    '; - } else { - echo "id},{$w['projects_id']});return false;\" href=\"#\" >"; - echo ""; - echo ' '; - } - $winners[] = $w['projects_id']; - } - $has_winners = true; - echo "({$w['projectnumber']}) {$w['title']}"; - echo '
    '; - } else { - /* echo "    "; - echo "No winner(s) specified"; */ - } - } - - /* Unlist all the winners we just printed from ALL lists */ - if ($editor == true) { - echo ''; - } - - /* Print the select box if we need it */ - if ($editor == true && $count < $pr->number) { - $n_nom = 0; - $n_eli = 0; - ?> -
    -
    -     - - - -
        - : - - - - -
    - - -
    '; - if ($r['external_additional_materials'] == 1 && $editor == false && $r['award_source_fairs_id'] == NULL) { - $d = 'disabled="disabled"'; - $a = ''; - if ($has_winners == true) { - echo ""; - $d = ''; - $a = ''; - } - echo "$a
    "; - } - echo '
    '; -} - -send_footer(); - -?> diff --git a/admin/xml.inc.php b/admin/xml.inc.php deleted file mode 100644 index 11750a5b..00000000 --- a/admin/xml.inc.php +++ /dev/null @@ -1,166 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -function xmlCreateRecurse($d) -{ - global $indent; - global $output; - foreach ($d AS $key => $val) { - if (is_numeric($key)) { - if ($val['xml_type']) { - for ($x = 0; $x < $indent; $x++) - $output .= ' '; - $output .= '<' . $val['xml_type'] . ">\n"; - $indent++; - xmlCreateRecurse($val); - $indent--; - for ($x = 0; $x < $indent; $x++) - $output .= ' '; - $output .= '\n"; - } else { - for ($x = 0; $x < $indent; $x++) - $output .= ' '; - $output .= "<$key>\n"; - $indent++; - xmlCreateRecurse($val); - $indent--; - for ($x = 0; $x < $indent; $x++) - $output .= ' '; - $output .= "\n"; - } - } else if (is_array($val)) { - for ($x = 0; $x < $indent; $x++) - $output .= ' '; - $output .= "<$key>\n"; - $indent++; - xmlCreateRecurse($val); - $indent--; - for ($x = 0; $x < $indent; $x++) - $output .= ' '; - $output .= "\n"; - } else { - if ($key != 'xml_type' && $key != 'projectid' && $key != 'projectdivisions_id') { - for ($x = 0; $x < $indent; $x++) - $output .= ' '; - $output .= "<$key>$val\n"; - } - } - } -} - -// Mainfunction to parse the XML defined by URL -function xml_parsexml($String) -{ - global $Data; - $Encoding = xml_encoding($String); - $String = xml_deleteelements($String, '?'); - $String = xml_deleteelements($String, '!'); - $Data = xml_readxml($String, $Data, $Encoding); - return ($Data); -} - -// Get encoding of xml -function xml_encoding($String) -{ - if (substr_count($String, '', $Start); - $Content = substr($String, $Start, $End - $Start); - $EncodingStart = strpos($Content, 'encoding="') + 10; - $EncodingEnd = strpos($Content, '"', $EncodingStart); - $Encoding = substr($Content, $EncodingStart, $EncodingEnd - $EncodingStart); - } else { - $Encoding = ''; - } - return $Encoding; -} - -// Delete elements -function xml_deleteelements($String, $Char) -{ - while (substr_count($String, "<$Char")) { - $Start = strpos($String, "<$Char"); - $End = strpos($String, '>', $Start + 1) + 1; - $String = substr($String, 0, $Start) . substr($String, $End); - } - return $String; -} - -// Read XML and transform into array -function xml_readxml($String, $Data, $Encoding = '') -{ - while ($Node = xml_nextnode($String)) { - $TmpData = ''; - $Start = strpos($String, '>', strpos($String, "<$Node")) + 1; - $End = strpos($String, "", $Start); - $ThisContent = trim(substr($String, $Start, $End - $Start)); - $String = trim(substr($String, $End + strlen($Node) + 3)); - if (substr_count($ThisContent, '<')) { - $TmpData = xml_readxml($ThisContent, $TmpData, $Encoding); - $Data[$Node][] = $TmpData; - } else { - if ($Encoding == 'UTF-8') { - $ThisContent = utf8_decode($ThisContent); - } - $ThisContent = str_replace('>', '>', $ThisContent); - $ThisContent = str_replace('<', '<', $ThisContent); - $ThisContent = str_replace('"e;', '"', $ThisContent); - $ThisContent = str_replace(''', "'", $ThisContent); - $ThisContent = str_replace('&', '&', $ThisContent); - $Data[$Node][] = $ThisContent; - } - } - return $Data; -} - -// Get next node -function xml_nextnode($String) -{ - if (substr_count($String, '<') != substr_count($String, '/>')) { - $Start = strpos($String, '<') + 1; - while (substr($String, $Start, 1) == '/') { - if (substr_count($String, '<')) { - return ''; - } - $Start = strpos($String, '<', $Start) + 1; - } - $End = strpos($String, '>', $Start); - $Node = substr($String, $Start, $End - $Start); - if ($Node[strlen($Node) - 1] == '/') { - $String = substr($String, $End + 1); - $Node = xml_nextnode($String); - } else { - if (substr_count($Node, ' ')) { - $Node = substr($Node, 0, strpos($String, ' ', $Start) - $Start); - } - } - return $Node; - } -} - -?> diff --git a/ajax.inc.php b/ajax.inc.php deleted file mode 100644 index ab69d0dd..00000000 --- a/ajax.inc.php +++ /dev/null @@ -1,34 +0,0 @@ - diff --git a/app/projectinfo.php b/app/projectinfo.php deleted file mode 100644 index 8cc98aac..00000000 --- a/app/projectinfo.php +++ /dev/null @@ -1,100 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT (NOW()>=?) AS test"); -$q->execute([$config['dates']['postparticipants']]); -$r = $q->fetch(PDO::FETCH_OBJ); - -$pn = trim($_GET['n']); - -if ($r->test) { - $q = $pdo->prepare("SELECT - registrations.id AS reg_id, - registrations.status, - projects.title, - projects.summary, - projects.projectnumber, - projects.projectcategories_id, - projects.projectdivisions_id, - projectcategories.category, - projectdivisions.division - - FROM - registrations - LEFT JOIN projects on projects.registrations_id=registrations.id - LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id - LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id - WHERE - registrations.year=? - AND projectcategories.year=? - AND projectdivisions.year=? - AND (status='complete' OR status='paymentpending') - AND projects.projectnumber=? - LIMIT 1 - "); - $q->execute([$config['FAIRYEAR'],$config['FAIRYEAR'],$config['FAIRYEAR'],$pn]); - show_pdo_errors_if_any($pdo); - $r = $q->fetch(PDO::FETCH_ASSOC); - - $regid = $r['reg_id']; - - $q2 = $pdo->prepare("SELECT firstname,lastname,webfirst,weblast,schools.school FROM students JOIN schools ON students.schools_id=schools.id WHERE registrations_id=? ORDER BY lastname"); - $q2->execute([$regid]); - $students = ''; - while ($stud = $q2->fetch(PDO::FETCH_OBJ)) { - if ($stud->webfirst == 'yes') - $students .= "$stud->firstname "; - if ($stud->weblast == 'yes') - $students .= "$stud->lastname "; - if ($stud->webfirst == 'yes' || $stud->weblast == 'yes') - $students .= ', '; - - // we just use the last school, it should match - $school = $stud->school; - } - if (strlen($students)) - $students = substr($students, 0, -2); - - $ret = array(); - foreach ($r AS $k => $v) { - $ret[$k] = iconv('ISO-8859-1', 'UTF-8//TRANSLIT', trim($v)); - } - $ret['students'] = iconv('ISO-8859-1', 'UTF-8//TRANSLIT', trim($students)); - $ret['school'] = iconv('ISO-8859-1', 'UTF-8//TRANSLIT', trim($school)); - $ret['photo'] = ''; -} -// simulate slow loading -// usleep(2000000); -echo json_encode($ret); -?> diff --git a/app/projectlist.php b/app/projectlist.php deleted file mode 100644 index e0b2f425..00000000 --- a/app/projectlist.php +++ /dev/null @@ -1,80 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT (NOW()>=?) AS test"); -$q->execute([$config['dates']['postparticipants']]); -$r = $q->fetch(PDO::FETCH_OBJ); - -if ($r->test) { - $q = $pdo->prepare("SELECT registrations.id AS reg_id, - registrations.status, - projects.title, - projects.projectnumber, - projects.projectcategories_id, - projects.projectdivisions_id, - projectcategories.category, - projectdivisions.division - - FROM - registrations - LEFT JOIN projects on projects.registrations_id=registrations.id - LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id - LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id - WHERE - 1 - AND registrations.year=? - AND projectcategories.year=? - AND projectdivisions.year=? - AND (status='complete' OR status='paymentpending') - ORDER BY - projectcategories.id, - projectdivisions.id, - projects.projectnumber - "); - $q->execute([$config['FAIRYEAR'],$config['FAIRYEAR'],$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - - $lastcat = 'something_that_does_not_exist'; - $lastdiv = 'something_that_does_not_exist'; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if (!$r->title) - $t = '{no title}'; - else - $t = $r->title; - - $ret['[' . $r->projectcategories_id . '] ' . $r->category . ' - ' . $r->division][] = array('n' => $r->projectnumber, 't' => iconv('ISO-8859-1', 'UTF-8', $t)); - } -} - -echo json_encode($ret); -?> diff --git a/app/projects.php b/app/projects.php deleted file mode 100644 index ba8a5108..00000000 --- a/app/projects.php +++ /dev/null @@ -1,99 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT (NOW()>=?) AS test"); -$q->execute([$config['dates']['postparticipants']]); -$r = $q->fetch(PDO::FETCH_OBJ); -$ret = array(); - -if ($r->test) { - $ret['status'] = 'ok'; - - $q = $pdo->prepare("SELECT registrations.id AS reg_id, - registrations.status, - projects.id AS projects_id, - projects.title, - projects.projectnumber, - projects.projectcategories_id, - projects.projectdivisions_id, - projectcategories.category, - projectdivisions.division - - FROM - registrations - LEFT JOIN projects on projects.registrations_id=registrations.id - LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id - LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id - WHERE - 1 - AND registrations.year=? - AND projectcategories.year=? - AND projectdivisions.year=? - AND (status='complete' OR status='paymentpending') - ORDER BY - projectcategories.id, - projectdivisions.id, - projects.projectnumber - "); - $q->execute([$config['FAIRYEAR'],$config['FAIRYEAR'],$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - - $lastcat = 'something_that_does_not_exist'; - $lastdiv = 'something_that_does_not_exist'; - $projects = array(); - while ($r = $q->fetch(PDO::fETCH_OBJ)) { - if (!$r->title) - $t = '{no title}'; - else - $t = $r->title; - - if (file_exists("../data/photos/{$config['FAIRYEAR']}/{$r->projects_id}.jpg")) { - $photo = true; - } else { - $photo = false; - } - - $projects['[' . $r->projectcategories_id . '] ' . $r->category . ' - ' . $r->division][] = array( - 'n' => $r->projectnumber, - 't' => iconv('ISO-8859-1', 'UTF-8//TRANSLIT', trim($t)), - 'p' => $photo - ); - } - $ret['projects'] = $projects; -} else { - $ret['status'] = 'error'; - $ret['error'] = "Project list for this fair will be made public on {$config['dates']['postparticipants']}"; -} - -echo json_encode($ret); -?> diff --git a/awards.inc.php b/awards.inc.php new file mode 100644 index 00000000..61d08e9d --- /dev/null +++ b/awards.inc.php @@ -0,0 +1,466 @@ + 'Divisional', + 'special' => 'Special', + 'other' => 'Other', + 'grand' => 'Grand'); + +$award_trophies = array('keeper'=>'Student Keeper', + 'return'=>'Student Return', + 'school_keeper'=>'School Keeper', + 'school_return'=>'School Return'); + + +function award_create($mysqli, $year) +{ + $mysqli->query("INSERT INTO awards(`year`) VALUES('$year')"); + $aid = $mysqli->insert_id; + debug(" create awward {$aid}, mysql:".$myslqi->error); + return $aid; +} + +function award_load($mysqli, $id , $data = NULL) +{ + $id = (int)$id; + if($data !== NULL) { + $a = $data; + $id = $a['id']; + } else { + $q = $mysqli->query("SELECT * FROM awards WHERE id='$id'"); + $a = $q->fetch_assoc(); + print($mysqli->error); + } + + $a['categories'] = explode(',',$a['categories']); + filter_bool_or_null($a['schedule_judges']); + filter_bool_or_null($a['self_nominate']); + filter_bool_or_null($a['include_in_script']); + filter_int_or_null($a['ord']); + filter_int($a['sponsor_uid']); + filter_int($a['upstream_fair_id']); + filter_int($a['upstream_award_id']); + filter_bool($a['upstream_register_winners']); + filter_int_list($a['feeder_fair_ids']); + + /* Make a copy for the original */ + unset($a['original']); + $original = $a; + $a['original'] = $original; + + /* This reverse-links $prize['award'] to a reference to the original award, + * so it does create a recursion, but can't really avoid that unless we make + * more copies */ + $a['prizes'] = array(); + $a['prizes_in_order'] = array(); + $q = $mysqli->query("SELECT * FROM award_prizes WHERE award_id='$id' ORDER BY `ord`"); + while($p = $q->fetch_assoc()) { + $prize = prize_load($mysqli, 0, $p); + $pid = $prize['id']; + + $a['prizes'][$pid] = $prize; + /* Link back to award */ + $a['prizes'][$pid]['award'] = &$a; + /* Also store it in order as a reference */ + $a['prizes_in_order'][] = &$a['prizes'][$pid]; + } + + + return $a; +} + +function award_load_by_prize($mysqli, $prize_id) +{ + /* Find the award to load */ + $q = $mysqli->query("SELECT award_id FROM award_prizes WHERE id='$pid'"); + $p = $q->fetch_assoc(); + return award_load($mysqli, $p['award_id']); +} + +function award_load_all($mysqli) +{ + global $config; + $q = $mysqli->query("SELECT * FROM awards WHERE year='{$config['year']}' ORDER BY `ord`"); + $awards = array(); + while($d = $q->fetch_assoc()) { + $awards[intval($d['id'])] = award_load($mysqli, 0, $d); + } + return $awards; +} + +function award_load_special_for_select($mysqli) +{ + global $config; + $q = $mysqli->query("SELECT * FROM awards WHERE (`type`='special' OR `type`='other') AND year='{$config['year']}' AND schedule_judges='1' ORDER BY `name`"); + $awards = array(); + while($d = $q->fetch_assoc()) { + $awards[$d['id']] = award_load($mysqli, 0, $d); + } + return $awards; +} + +function award_load_special_for_project_select($mysqli, &$p) +{ + global $config; + $q = $mysqli->query("SELECT * FROM awards WHERE `type`='special' + AND FIND_IN_SET('{$p['cat_id']}',`categories`)>0 + AND `self_nominate` = 1 + AND year='{$config['year']}' + ORDER BY `name`"); +// print($mysqli->error); + $awards = array(); + while($d = $q->fetch_assoc()) { + $awards[$d['id']] = award_load($mysqli, 0, $d); + } + return $awards; +} + + +function prize_create($mysqli, &$a) +{ + $q = $mysqli->query("SELECT MAX(ord) FROM award_prizes WHERE award_id='{$a['id']}'"); + $r = $q->fetch_row(); + $ord = (int)$r[0] + 1; + + $mysqli->query("INSERT INTO award_prizes(`award_id`,`ord`) VALUES('{$a['id']}','$ord')"); + $prize_id = $mysqli->insert_id; + + debug("prize_create: created new prize={$prize_id}, ord=$ord for award {$a['id']}\n"); + + $a['prizes'][$prize_id] = prize_load($mysqli, $prize_id); + return $prize_id; +} + +/* Can be called independently, but not a good idea, can't save a prize indepedently */ +function prize_load($mysqli, $pid, $data=NULL) +{ + if($data === NULL) { + $q = $mysqli->query("SELECT * FROM award_prizes WHERE id='$pid'"); + $p = $q->fetch_assoc(); + } else { + $p = $data; + $pid = $p['id']; + } + + filter_str_list($p['trophies']); + filter_int($p['id']); + filter_int($p['upstream_prize_id']); + + unset($p['original']); + $original = $p; + $p['original'] = $original; + return $p; +} + +/* Remember to save the award after doing this */ +function prize_delete($mysqli, &$a, $pid) +{ + $mysqli->real_query("DELETE FROM award_prizes WHERE id='$pid'"); + + unset($a['prizes'][$pid]); + /* Remove it from the prizes_in_order too */ + +} + +function award_delete($mysqli, &$a) +{ + debug("Delete award {$a['id']}:{$a['name']}\n"); + $mysqli->real_query("DELETE FROM award_prizes WHERE award_id='{$a['id']}'"); + debug(" mysql:".$myslqi->error); + $mysqli->real_query("DELETE FROM awards WHERE id='{$a['id']}'"); + debug(" mysql:".$myslqi->error); +} + +function award_save($mysqli, &$a) +{ + $original_feeder_fairs = $a['original']['feeder_fair_ids']; + + foreach($a['prizes'] as $pid=>&$p) { + generic_save($mysqli, $p, "award_prizes", "id"); + } + generic_save($mysqli, $a, "awards", "id"); + + /* Does this award have any feeder fairs? or did the feeder fairs change? */ + if($original_feeder_fairs != $a['feeder_fair_ids'] || count($a['feeder_fair_ids']) > 0) { + /* Broadcast this award to all feeder fairs, using the queue. + * Any fairs that aren't allowed to have it will be sent a delete */ + remote_queue_push_award_to_all_fairs($mysqli, $a); + } +} + +function award_load_cwsf($mysqli) +{ + global $config; + $q = $mysqli->query("SELECT * FROM awards WHERE year='{$config['year']}' AND cwsf_award='1'"); + if($q->num_rows != 1) return NULL; + + return award_load($mysqli, -1, $q->fetch_assoc()); +} + +function prize_load_winners($mysqli, &$prize, $load_students = true) +{ + $q = $mysqli->query("SELECT * FROM winners WHERE award_prize_id='{$prize['id']}'"); + $projects = array(); + while($r = $q->fetch_assoc()) { + $pid = (int)$r['pid']; + $projects[$pid] = project_load($mysqli, $pid); + if($load_students) { + project_load_students($mysqli, $projects[$pid]); + } + } + return $projects; +} + +function award_update_divisional($mysqli) +{ + global $config; + /* Ensures there is a div award for each age cat. Creates missing awards + * Ensures the prizes are as specified in the config + * (judge_divisional_prizes, highest prize first) , creates them if + * they don't exist */ + $cats = categories_load($mysqli); + $div_awards = array(); + foreach($cats as $cid=>&$cat) { + $div_awards[$cid] = NULL; + } + + debug("Checking divisional awards...\n"); + $q = $mysqli->query("SELECT * FROM awards WHERE year='{$config['year']}' AND `type`='divisional' ORDER BY `ord`"); + while($d = $q->fetch_assoc()) { + $ok = true; + $a = award_load($mysqli, 0, $d); + $cid = $a['categories'][0]; + if(!array_key_exists($cid, $cats)) { + debug(" Div award {$a['name']} has non-existant cat id '$cid'\n"); + $ok = false; + } + + /* Skip awards (and delete them below if there not exactly one category, + * or if there are duplicates */ + if(count($a['categories']) != 1) $ok = false; + if($div_awards[$cid] !== NULL) $ok = false; + + if($ok) { + debug(" Found divisional award: {$a['name']}\n"); + $div_awards[$a['categories'][0]] = $a; + } else { + debug(" Deleting unknown divisional award: {$a['name']}\n"); + award_delete($mysqli, $a); + } + + } + + /* Make a trimmed ordered list of prizes by the order they should + * appear. The first in judge_divisional_prizes is the highest award, so + * it gets the highest order... count them and work backwards */ + $div_prizes = array(); + $order = count($config['judge_divisional_prizes']); + foreach($config['judge_divisional_prizes'] as $prize_name) { + $div_prizes[trim($prize_name)] = $order; + $order -= 1; + } + debug(" Divisional prize list: ".print_r($div_prizes, true)."\n"); + + + /* See if there are any divisional awards missing */ + foreach($div_awards as $cid=>$a) { + debug(" Check div award:".print_r($a, true)."\n"); + if($a === NULL) { + $sponsor_uid = sponsor_create_or_get($mysqli, $config['fair_abbreviation']); + $aid = award_create($mysqli, $config['year']); + $a = award_load($mysqli, $aid); + $div_awards[$cid] = $a; + + $a['name'] = $cats[$cid]['name'].' Divisional'; + $a['categories'] = array($cid); + $a['self_nominate'] = 0; + $a['include_in_script'] = 1; + $a['schedule_judges'] = 1; + $a['ord'] = $cid; + $a['sponsor_uid'] = $sponsor_uid; + + debug(" Created divisional award: {$a['name']}".print_r($a, true)."\n"); + + award_save($mysqli, $a); + } + + debug(" Checking Prizes in divisional award: {$a['name']}\n"); + /* Check prizes */ + $tmp_div_prizes = $div_prizes; + foreach($a['prizes'] as $prize_id=>&$prize) { + /* Make sure this prize name is in the div prize list and hasn't already been seen. + * we do that by removing items from a copy of the div list while checking it */ + if(array_key_exists($prize['name'], $tmp_div_prizes)) { + /* Set the order, then unset the prize from the temp array so we can't find + * it again. If a div award has two Gold Prizes, for example, the second will be + * deleted. */ + $prize['ord'] = $tmp_div_prizes[$prize['name']]; + debug(" Found order:prize {$prize['ord']}:{$prize['name']}\n"); + unset($tmp_div_prizes[$prize['name']]); + } else { + /* This prize isn't in the div prizes, so delete it */ + debug(" Deleting unknown prize {$prize['name']}\n"); + prize_delete($mysqli, $a, $prize_id); + } + } + /* Anything left in the tmp_div_rpizes array needs to be created as a prize */ + foreach($tmp_div_prizes as $prize_name=>$order) { + $prize_id = prize_create($mysqli, $a); + $a['prizes'][$prize_id]['name'] = $prize_name; + $a['prizes'][$prize_id]['ord'] = $order; + debug(" Creating new prize {$a['prizes'][$prize_id]['ord']}:{$a['prizes'][$prize_id]['name']}\n"); + } + award_save($mysqli, $a); + } + debug(" Divisional award check complete\n"); + +} + + +function award_sync($mysqli, $fair, $incoming_award) +{ + global $config; + $year = intval($incoming_award['year']); + $incoming_award_id = intval($incoming_award['id']); + if($year <= 0) exit(); + if($incoming_award_id <= 0) exit; + + $q = $mysqli->query("SELECT * FROM awards WHERE upstream_fair_id='{$fair['id']}' AND upstream_award_id='$incoming_award_id' AND year='$year'"); + if($q->num_rows > 0) { + /* Award exists, we can load and update */ + $data = $q->fetch_assoc(); + $a = award_load($mysqli, -1, $data); + debug("award_sync: found local award id={$a['id']}\n"); + } else { + /* Create a new award */ + $aid = award_create($mysqli, $year); + $a = award_load($mysqli, $aid); + debug("award_sync: created new award id={$a['id']}\n"); + } + + if(array_key_exists('delete', $incoming_award)) { + debug("award_sync: deleting award.\n"); + award_delete($mysqli, $a); + return; + } + + + $a['name'] = $incoming_award['name']; + $a['s_desc'] = $incoming_award['s_desc']; + $a['j_desc'] = $incoming_award['j_desc']; + $a['schedule_judges'] = $incoming_award['schedule_judges']; + $a['include_in_script'] = $incoming_award['include_in_script']; + $a['self_nominate'] = $incoming_award['self_nominate']; + $a['type'] = $incoming_award['type']; + $a['upstream_fair_id'] = $fair['id']; + $a['upstream_award_id'] = $incoming_award_id; + $p['upstream_register_winners'] = $incoming_award['upstream_register_winners']; + $a['sponsor_uid'] = sponsor_create_or_get($mysqli, $incoming_award['sponsor_organization'], $year); + + /* Map grades to categories */ + $a['categories'] = array(); + foreach($incoming_award['grades'] as $g) { + $cat_id = category_get_from_grade($mysqli, $g); + if(!in_array($cat_id, $a['categories'])) { + $a['categories'][] = $cat_id; + } + } + + + /* upstream prize id -> our prize id */ + $upstream_prize_id_map = array(); + $local_prizes_seen = array(); + foreach($a['prizes'] as $pid=>&$p) { + $upstream_prize_id_map[$p['upstream_prize_id']] = $pid; + $local_prizes_seen[$pid] = false; + } + + $seen_prize_ids = array(); + foreach($incoming_award['prizes'] as &$incoming_prize) { + if(array_key_exists($incoming_prize['id'], $upstream_prize_id_map)) { + $prize_id = $upstream_prize_id_map[$incoming_prize['id']]; + debug("award_sync: found existing prize={$prize_id}\n"); + } else { + /* Create it */ + $prize_id = prize_create($mysqli, $a); + debug("award_sync: created new prize={$prize_id}\n"); + } + $p = &$a['prizes'][$prize_id]; + + /* Overwrite or set prize feields */ + $p['name'] = $incoming_prize['name']; + $p['cash'] = $incoming_prize['cash']; + $p['scholarship'] = $incoming_prize['scholarship']; + $p['value'] = $incoming_prize['value']; + $p['trophies'] = $incoming_prize['trophies']; + $p['number'] = $incoming_prize['number']; + $p['upstream_prize_id'] = $incoming_prize['id']; + $local_prizes_seen[$prize_id] = true; + } + + /* Any prizes we didn't see have been removed from this award */ + foreach($local_prizes_seen as $pid=>$seen) { + if($seen == false) { + debug("award_sync: delete prize={$pid}\n"); + prize_delete($mysqli, $a, $pid); + } + } +// debug("award_sync: save award: ".print_r($a, true)."\n"); + award_save($mysqli, $a); +} + +/* Get a copy of an award for exporting, basically just make a copy and + * delete stuff we don't want or need to export */ +function award_get_export($mysqli, &$fair, &$a) +{ + global $config; + $categories = categories_load($mysqli, $a['year']); + + /* Is this fair allowed to have this award? if not, just send + * the award id, year, and a delete flag */ + debug("award_get_export: feeder fair: {$fair['id']}, ids=".print_r($a['feeder_fair_ids'], true)."\n"); + + if(!in_array($fair['id'], $a['feeder_fair_ids'])) { + $export_a = array(); + $export_a['id'] = $a['id']; + $export_a['year'] = $a['year']; + $export_a['delete'] = 1; + return $export_a; + } + + $export_a = $a; + foreach($export_a['prizes'] as $pid=>&$p) { + unset($p['original']); + unset($p['ord']); + unset($p['upstream_prize_id']); + unset($p['award']); + } + unset($export_a['c_desc']); + unset($export_a['presenter']); + unset($export_a['cwsf_award']); + unset($export_a['original']); + unset($export_a['prizes_in_order']); + + /* Turn categories into grades */ + $export_a['grades'] = array(); + foreach($a['categories'] as $cat_id) { + $cat = $categories[$cat_id]; + for($g=$cat['min_grade'] ; $g<=$cat['max_grade']; $g++) { + $export_a['grades'][] = $g; + } + } + + /* Turn any sponsor into just an organization name */ + $export_a['sponsor_organization'] = $config['fair_abbreviation']; + if($a['sponsor_uid'] > 0) { + $u_sponsor = user_load($mysqli, $a['sponsor_uid']); + $export_a['sponsor_organization'] = $u_sponsor['organization']; + } + return $export_a; +} + +?> diff --git a/c_assign_project_numbers.php b/c_assign_project_numbers.php new file mode 100644 index 00000000..f1b4976b --- /dev/null +++ b/c_assign_project_numbers.php @@ -0,0 +1,88 @@ +'; + + +sfiab_page_begin($u, "Assign Project Numbers", $page_id, $help); + +$projects = projects_load_all($mysqli, true); + +?> + +
    + +

    Assign Project Numbers

    + +&$p) { + if($p['number'] == '' or $p['number'] === NULL) { + project_number_assign($mysqli, $p); + project_save($mysqli, $p); + print("{$p['number']} - {$p['title']}
    "); + } + } ?> + + All Done. Go Back + &$p) { + if($p['number'] == '' or $p['number'] === NULL) { + $accepted_projects_with_no_number += 1; + } + } +?> +

    There are / + accepted projects with no number. + +

    There are no projects that need a number. Use the Input Signature Forms page to accept projects. + +

    Use the button below to assign a project number to these + projects. This will not + change any project numbers already assigned. + + +

    + diff --git a/c_award_cwsf.php b/c_award_cwsf.php new file mode 100644 index 00000000..3b4d68f8 --- /dev/null +++ b/c_award_cwsf.php @@ -0,0 +1,315 @@ + + Copyright (C) 2005 James Grant + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +require_once('common.inc.php'); +require_once('xml.inc.php'); +require_once('user.inc.php'); +require_once('project.inc.php'); +require_once('awards.inc.php'); +require_once('form.inc.php'); + +$mysqli = sfiab_init('committee'); + +$cwsf_divisions = array( + 1=>"Discovery", + 2=>"Energy", + 3=>"Environment", + 4=>"Health", + 5=>"Information", + 6=>"Innovation", + 7=>"Resources" +); + +$page_id = "c_award_cwsf"; + +$challenges = challenges_load($mysqli); + +foreach($challenges as &$c) { + /* Default so we assign the project to some challenge */ + $c['cwsf_division_id'] = 0; + /* Try for a better match */ + foreach($cwsf_divisions as $did=>$d) { + if(strcmp($d, $c['name']) == 0) $c['cwsf_division_id'] = $did; + } +} + +$award = award_load_cwsf($mysqli); + +if($award === NULL) { + print("Unable to find CWSF award!"); + exit(); +} + +/* Get the first and only prize */ +$prize = NULL; +foreach($award['prizes'] as &$p) { + $prize = &$p; + break; +} + +$winners = prize_load_winners($mysqli, $prize); + +function get_cwsf_winners_for_xml($mysqli, &$winners) +{ + global $config, $challenges; + + $xml_data = array(); + foreach($winners as $pid=>&$project) { + $students=array(); + $cwsf_agecategory=0; + + if(!array_key_exists('students', $project)) { + print("Project $pid has no sudents"); + print_r($project); + } + foreach($project['students'] as &$s) { + switch($s['grade']) { + case 7: case 8: + $cat = 1; break; + case 9: case 10: + $cat = 2; break; + case 11: case 12: case 13: + $cat = 3; break; + default: + print("Can't handle student in grade {$s['grade']}:"); + print_r($s); + exit(); + } + if($cwsf_agecategory<$cat) $cwsf_agecategory=$cat; + + $students[]=array( + "xml_type"=>"student", + "firstname"=>$s['firstname'], + "lastname"=>$s['lastname'], + "email"=>$s['email'], + "gender"=>$s['sex'], + "grade"=>$s['grade'], + "language"=>$s['language'], + "birthdate"=>$s['birthdate'], + "address1"=>$s['address'], + "address2"=>"", + "city"=>$s['city'], + "province"=>$s['province'], + "postalcode"=>$s['postalcode'], + "homephone"=>$s['phone1'], + "cellphone"=>"", + ); + } + + $xml_data[]=array( + "xml_type"=>"project", + "projectid"=>$project['pid'], + "projectnumber"=>$project['number'], + "title"=>$project['title'], + "abstract"=>$project['abstract'], + "category_id"=>$cwsf_agecategory, + "division_id"=>$challenges[$project['challenge_id']]['cwsf_division_id'], + "projectdivisions_id"=>$project['challenge_id'], + "students"=>$students, + ); + //print_r($award); + } + + + return $xml_data; + } + + +$action = array_key_exists('action', $_POST) ? $_POST['action'] : ''; + +switch($action) { +case 'cwsfdivision': + foreach($_POST['cwsfdivision'] AS $p=>$d) + { + mysql_query("UPDATE projects SET cwsfdivisionid='$d' WHERE id='$p'"); + } + echo happy(i18n("CWSF Project Divisions saved")); + exit(); + + +case 'register': + + if(!function_exists('curl_init')) { + form_ajax_response(array('status'=>1, 'error'=>'Your PHP installation does not support CURL. You will need to login to the YSC system as the regional coodinator and upload the XML data manually')); + exit(); + } + + $xml = urldecode($_POST['xml']); + +// print_r($xml); + + $ch = curl_init(); /// initialize a cURL session + curl_setopt ($ch, CURLOPT_URL,"https://secure.youthscience.ca/registration/xmlregister.php"); + curl_setopt ($ch, CURLOPT_HEADER, 0); /// Header control + curl_setopt ($ch, CURLOPT_POST, 1); /// tell it to make a POST, not a GET + curl_setopt ($ch, CURLOPT_POSTFIELDS, "xml=".$xml); /// put the query string here starting with "?" + curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); /// This allows the output to be set into a variable $datastream +// curl_setopt ($ch, CURLOPT_POSTFIELDSIZE, 0); + curl_setopt ($ch, CURLOPT_TIMEOUT, 360); + curl_setopt ($ch, CURLOPT_SSLVERSION, 3); + curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, false); +// $datastream = "deadbeef"; + $datastream = curl_exec ($ch); /// execute the curl session and return the output to a variable $datastream + $datastream = str_replace(" standalone=\"yes\"","",$datastream); + // echo "curl close
    "; + curl_close ($ch); /// close the curl session + + form_ajax_response(array('status'=>0, 'happy'=> 'The YSC Registration Server said: '.$datastream)); + exit(); + } + + +$help = '

    '; +sfiab_page_begin($u, "CWSF Registration", $page_id, $help); + +?> + + +

    + +query("SELECT * FROM fairs WHERE abbrv='YSC'"); + if($q->num_rows < 1) { + $error = "
  • You have not defined the YSC upstream fair in the Science Fair Management area."; + $ok = false; + } else { + $f = $q->fetch_assoc(); + $ysc_region_id = $f['username']; + $ysc_region_password = $f['password']; + } + //make sure we have the ysc_region_id and ysc_region_password + if($ysc_region_id == '') { + $error .= "
  • You have not yet specified a username for YSC (your Region ID). Go to the Science Fair Management page to set it"; + $ok=false; + } + if($ysc_region_password == '') { + $error .= "
  • You have not yet specified a password for YSC (your Region Password). Go to the Science Fair Management page to set it"; + $ok=false; + } + + if($award == NULL) { + $error .= "
  • Cannot find an award, or there is more than one award, that is specified as the Canada-Wide Science Fair Award. Please go to the awards manager and select which award identifies your CWSF students"; + $ok=false; + + } + + if(count($award['prizes']) != 1) { + $error .= "
  • The cwsf award has ".count($award['prizes'])." prizes. Should have exactly one."; + $ok=false; + + } + + form_page_begin($page_id, array(), $ok?'':'Found some problems preventing CWSF registration:'); + + + if(!$ok) { +?>
    +
  • +'); +// print_r($winners); + + $reg=array("registration"=>array( + "ysf_region_id"=>$ysc_region_id, + "ysf_region_password"=>$ysc_region_password, + "projects"=>get_cwsf_winners_for_xml($mysqli, $winners), + ) + ); + /* xmlcreaterecurse uses $output and $indent as a global variable */ + $output=""; + $indent = 0; + xmlCreateRecurse($reg); + $xmldata=$output; + +?> + + +

    Upload to CWSF

    + +

    CWSF Award:
    + +

    Please review the list of winning projects/students below. If it is + all correct then you can click the 'Register for CWSF' button at the + bottom of the page to send the information to YSC + +

    Found winning projects in the CWSF award + + + + + + + + + + + + + +
    Project InformationProject Division / CWSF Project Division
    - +
    + + +     Name:
    +     Email:
    +     Grade:
    + +
    + Fair Challenge:
    + CWSF Challenge:
    +
    + +

    You only get one shot at this. Once you submit this data for + this year, it will not work again. If any changes need to be made, + your regional coordinator will need to login to the YSC system and make + the changes. + + + +

    Raw XML to be Sent to YSC Server

    +
    +
    + +
    + diff --git a/c_award_upload.php b/c_award_upload.php new file mode 100644 index 00000000..e345e9c4 --- /dev/null +++ b/c_award_upload.php @@ -0,0 +1,755 @@ + + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +require_once('../common.inc.php'); +require_once('../user.inc.php'); +require_once('../projects.inc.php'); +require_once('curl.inc.php'); +user_auth_required('committee', 'admin'); + +//function get_cwsf_award_winners() +function get_winners($awardid, $fair_id) +{ + global $config; + + /* Mappings of the name we want => to the column name returned in MYSQL */ + $school_fields = array( 'schoolname'=>'school', + 'schoollang'=>'schoollang', + 'schoollevel'=>'schoollevel', + 'board'=>'board', + 'district'=>'district', + 'phone'=>'phone', + 'fax'=>'fax', + 'address'=>'address', + 'city'=>'city', + 'province_code'=>'province_code', + 'postalcode'=>'postalcode', + 'schoolemail'=>'schoolemail'); +/* 'principal'=>'principal', + 'sciencehead'=>'sciencehead', + 'scienceheademail'=>'scienceheademail', + 'scienceheadphone'=>'scienceheadphone');*/ + + $student_fields = array('firstname'=>'firstname', + 'lastname'=>'lastname', + 'email'=>'email', + 'gender'=>'sex', + 'grade'=>'grade', + 'language'=>'lang', + 'birthdate'=>'dateofbirth', + 'address'=>'address', + 'city'=>'city', + 'province'=>'province', + 'postalcode'=>'postalcode', + 'phone'=>'phone', + 'teachername'=>'teachername', + 'teacheremail'=>'teacheremail'); + + + $awards = array(); + if($awardid == -1) { + /* Get all for this fair */ + $q=mysql_query("SELECT * FROM award_awards WHERE award_source_fair_id='$fair_id' AND year='{$config['FAIRYEAR']}'"); + if(mysql_num_rows($q) == 0) { + error_("Can't find award id $awardid"); + return false; + } + while($a = mysql_fetch_assoc($q)) { + $awards[] = $a; + } + } else { + /* Get the award */ + $q=mysql_query("SELECT * FROM award_awards WHERE id='$awardid' AND year='{$config['FAIRYEAR']}'"); + if(mysql_num_rows($q)!=1) { + error_("Can't find award id $awardid"); + return false; + } + $award=mysql_fetch_assoc($q); + $awards[] = $award; + } + + /* Get the fair for the div/cat mappings */ + $q = mysql_query("SELECT * FROM fairs WHERE id='{$award['award_source_fair_id']}'"); + $fair = mysql_fetch_assoc($q); + $catmap = unserialize($fair['catmap']); + $divmap = unserialize($fair['divmap']); + + + foreach($awards as $award) { + $winners=array( 'id' => $award['id'], + 'award_name' => $award['name'], + 'external_identifier' => $award['external_identifier'], + 'year' => $config['FAIRYEAR'], + 'prizes' => array()); + + if($fair['type'] != 'sfiab') { + /* YSC Compatability */ + $winners['external_postback'] = $award['external_postback']; + } + + /* Get the prizes */ + $q=mysql_query("SELECT * FROM award_prizes WHERE award_awards_id='{$award['id']}'"); + while($prize=mysql_fetch_assoc($q)) { + $pid = $prize['id']; + $wq=mysql_query("SELECT projects.* FROM award_prizes + LEFT JOIN winners ON winners.award_prize_id=award_prizes.id + LEFT JOIN projects ON projects.pid=winners.pid + WHERE + award_prize_id='$pid' AND + winners.year='{$config['FAIRYEAR']}'"); + echo mysql_error(); + /* Get all projects assigned to this prize */ + $prizewinners = array(); + while($project=mysql_fetch_assoc($wq)) { + + /* Get the students */ + $sq=mysql_query("SELECT * FROM students WHERE registrations_id='{$project['registrations_id']}' + AND year='{$config['FAIRYEAR']}'"); + $students=array(); + while($s=mysql_fetch_assoc($sq)) { + + /* Get the student's school */ + $schoolq=mysql_query("SELECT * FROM schools WHERE id='{$s['schools_id']}'"); + $schoolr=mysql_fetch_assoc($schoolq); + $school = array("xml_type"=>"school");/* for ysc compatability */ + foreach($school_fields as $k=>$v) + $school[$k] = $schoolr[$v]; + + /* Pack up the student data too */ + $student = array('xml_type'=>'student',/* for ysc compatability */ + 'school' => $school); + foreach($student_fields as $k=>$v) + $student[$k] = $s[$v]; + + $students[] = $student; + + } + /* Turn our load ID into a server-side cat/div id */ + $cat_id = $catmap[$project['projectcategories_id']]; + $div_id = $divmap[$project['projectdivisions_id']]; + + /* Save the project info => students */ + $prizewinners[]=array( 'xml_type' => 'project',/* for ysc compatability */ + 'projectid'=>$project['id'], + 'projectnumber'=>$project['projectnumber'], + 'title'=>utf8_encode($project['title']), + 'abstract'=>utf8_encode($project['summary']), + 'language'=>$project['language'], + 'projectcategories_id'=>$cat_id, + 'projectdivisions_id'=>$div_id, + 'client_projectdivisions_id' => $project['projectdivisions_id'], + 'students'=>$students ); + } + /* Save the prize info => projects */ + $winners['prizes'][$prize['prize']] = array( + 'id' => $prize['id'], + 'name' => $prize['prize'], + 'xml_type'=>'prize', /* For ysc compatability */ + 'identifier'=>$prize['external_identifier'], /* for ysc compatability */ + 'projects'=>$prizewinners); + } + $all_winners[] = $winners; + } + return $all_winners; +} + +function count_winners($awardid, $fair_id) +{ + global $config; + $count = 0; + $awards = array(); + if($awardid == -1) { + /* Get all for this fair */ + $q=mysql_query("SELECT * FROM award_awards WHERE award_source_fair_id='$fair_id' AND year='{$config['FAIRYEAR']}'"); + if(mysql_num_rows($q) == 0) { + error_("Can't find award id $awardid"); + return 0; + } + while($a = mysql_fetch_assoc($q)) { + $awards[] = $a; + } + } else { + /* Get the award */ + $q=mysql_query("SELECT * FROM award_awards WHERE id='$awardid' AND year='{$config['FAIRYEAR']}'"); + if(mysql_num_rows($q)!=1) { + error_("Can't find award id $awardid"); + return 0; + } + $award=mysql_fetch_assoc($q); + $awards[] = $award; + } + + foreach($awards as $award) { + /* Get the prizes */ + $q=mysql_query("SELECT * FROM award_prizes WHERE award_awards_id='{$award['id']}'"); + while($prize=mysql_fetch_assoc($q)) { + $pid = $prize['id']; + $wq=mysql_query("SELECT COUNT(projects.id) as C FROM award_prizes + LEFT JOIN winners ON winners.award_prize_id=award_prizes.id + LEFT JOIN projects ON projects.pid=winners.pid + WHERE + award_prize_id='$pid' AND + winners.year='{$config['FAIRYEAR']}'"); + $wc = mysql_fetch_assoc($wq); + $count += $wc['C']; + } + } + return $count; + +} + + +function load_server_cats_divs($fair_id) +{ + global $config; + $q = mysql_query("SELECT * FROM fairs WHERE id='$fair_id'"); + $fair = mysql_fetch_assoc($q); + + $req = array('get_categories' => array('year' => $config['FAIRYEAR']), + 'get_divisions' => array('year' => $config['FAIRYEAR']) + ); + $data = curl_query($fair, $req); + + /* If selected mappings don't exist, try to discover some */ + if(trim($fair['catmap']) != '') { + $catmap = unserialize($fair['catmap']); + } else { + $catmap = array(); + /* Load ours */ + $q=mysql_query("SELECT * FROM projectcategories WHERE year='{$config['FAIRYEAR']}' ORDER BY mingrade"); + while($r=mysql_fetch_object($q)) { + foreach($data['categories'] as $id=>$c) { + if($c['mingrade'] == $r->mingrade) { + $catmap[$r->id] = $id; + break; + } + } + } + } + if(trim($fair['divmap']) != '') { + $divmap = unserialize($fair['divmap']); + } else { + $ret['divmap'] = array(); + $q=mysql_query("SELECT * FROM projectdivisions WHERE year='{$config['FAIRYEAR']}' ORDER BY id"); + while($r=mysql_fetch_object($q)) { + $lowest = 999; + $lowest_id = 0; + foreach($data['divisions'] as $id=>$d) { + /* Who knew levenshtein was builtin to php as of PHP 4 */ + $l = levenshtein($d['division'], $r->division); + if($l < $lowest) { + $lowest = $l; + $lowest_id = $id; + } + } + $divmap[$r->id] = $lowest_id; + } + } + return array($data['categories'], $data['divisions'], $catmap, $divmap); +} + +switch($_GET['action']) { +case 'award_upload': + $award_awards_id = intval($_POST['award_awards_id']); + $fair_id = intval($_POST['fair_id']); + $divs = $_POST['div']; + $cats = $_POST['cat']; + + + $all_winners = get_winners($award_awards_id, $fair_id); + + /* Get the fair */ + $q = mysql_query("SELECT * FROM fairs WHERE id='$fair_id}'"); + $fair = mysql_fetch_assoc($q); + + echo '
    '; + /* Check that we're going to upload something, and override the + * divisions/cats with the divisions taht were set, and the categories + * that were computed */ + $upload_something = false; + foreach($all_winners as &$w) { + foreach($w['prizes'] as &$p) { + + if(count($p['projects'])) + $upload_something = true; + + /* Only update divs/cats for SFIAB fairs, the + * YSC/STO awards system doesn't care about divisions, but YSC + * registration does, but that's a different bit of code */ + if($fair['type'] != 'sfiab') continue; + + foreach($p['projects'] as &$pr) { + $div_id = intval($divs[$w['id']][$p['id']][$pr['projectid']]); + $pr['projectdivisions_id'] = $div_id; + $cat_id = intval($cats[$w['id']][$p['id']][$pr['projectid']]); + $pr['projectcategories_id'] = $cat_id; + } + } + } + + if($upload_something == false) { + echo notice(i18n('No winners to be uploaded')); + exit; + } + + + if($fair['type'] == 'ysc') { + if($award_awards_id == -1) { + echo "Multiple uploads not supported for YSC targets.\n"; + exit; + } + /* Pull the single-award out, get_winners() will never + * return more than one award for YSC targets */ + $winners = array_shift($all_winners); + $w = array(); + foreach($winners['prizes'] as $prize_name=>$prize) { + $w[] = $prize; + } + $req=array("awardwinners"=>array( + "username"=>$fair['username'], + "password"=>$fair['password'], + "identifier"=>$winners['external_identifier'], + "prizes"=>$w, + ) + ); + $url = $winners['external_postback']; + } else { + $req = array(); + $req['awards_upload'] = $all_winners; + $url = ''; /* url is ignored for type = sfiab */ + + } + echo i18n("Sending winners to %1...", array(''.$fair['name'].'')); + echo '
    '; +// echo "
    "; print_r($req); echo "
    "; + + $data = curl_query($fair, $req, $url); + + if($data['error'] != 0) { + echo error("Server said: ".htmlspecialchars(print_r($data,true))); + } else { + if(is_array($data['notice'])) + echo notice("{$fair['name']} server said:
    ".join("\n", $data['notice'])."
    "); + else if(is_array($data['message'])) + echo notice("{$fair['name']} server said:
    ".join("\n", $data['message'])."
    "); + else if($data['message']) + echo notice("{$fair['name']} server said:
    ".$data['message']."
    "); + else + echo notice("{$fair['name']} server said:
    ".htmlspecialchars(print_r($data,true))."
    "); + echo happy(i18n("Upload completed successfully")); + } + exit; + +case 'catdiv_load': + $fair_id = intval($_GET['fair_id']); + + list($c, $d, $cm, $dm) = load_server_cats_divs($fair_id); + $divs = projectdivisions_load(); + + $q = mysql_query("SELECT * FROM fairs WHERE id='$fair_id}'"); + $fair = mysql_fetch_assoc($q); + +?>

    +
    + +
    + + + + +"; + echo "'; + } +?> +
    {$div['division']} =>
    +
    +
    +$c) { +// $cat[intval($key)] = intval($c); +// } + $div = array(); + foreach($_POST['div'] AS $key=>$d) { + $div[intval($key)] = intval($d); + } + + $catmap = mysql_real_escape_string(serialize($cat)); + $divmap = mysql_real_escape_string(serialize($div)); + mysql_query("UPDATE fairs SET catmap='$catmap',divmap='$divmap' WHERE id='$fair_id'"); + echo "UPDATE fairs SET catmap='$catmap',divmap='$divmap' WHERE id='$fair_id'"; + echo mysql_error(); + + happy_("Category/Division mapping information saved"); + exit; + +case 'additional_materials': + $award_awards_id = intval($_GET['award_awards_id']); + $q = mysql_query("SELECT award_source_fair_id,external_identifier FROM award_awards WHERE id='$award_awards_id'"); + $a = mysql_fetch_assoc($q); + $q = mysql_query("SELECT * FROM fairs WHERE id='{$a['award_source_fair_id']}'"); + $fair = mysql_fetch_assoc($q); + $req = array('award_additional_materials' => array( + 'year'=>$config['FAIRYEAR'], + 'identifier'=>$a['external_identifier']) + ); + $data = curl_query($fair, $req, $url); + foreach($data['award_additional_materials']['pdf']['header'] as $h) + header($h); + echo base64_decode($data['award_additional_materials']['pdf']['data64']); + exit; + +case 'load': + $award_awards_id = intval($_GET['id']); + $fair_id = intval($_GET['fair_id']); + + $winners = get_winners($award_awards_id, $fair_id); + $divs = projectdivisions_load(); + + $q = mysql_query("SELECT * FROM fairs WHERE id='$fair_id}'"); + $fair = mysql_fetch_assoc($q); + + echo i18n("The following list of winning projects/students will be sent to: %1. Use the 'Edit Default Division Assignments' button to change the default mappings for divisions. You can over-ride any division assignment by changing it in the list below. Category assignments are done automatically based on grade. When you are happy with the list below, click the 'Upload Winners' button.", array($fair['name'])); + + if($fair['type'] != 'sfiab') { + echo '

    '; + echo i18n('This server does not collection Division information, all division selection is disabled.'); + $server_cats = array(); + $server_divs = array(); + $catmap =array(); + $divmap = array(); + $division_disabled = true; + } else { + list($server_cats, $server_divs, $catmap, $divmap) = load_server_cats_divs($fair_id); + $division_disabled = false; + } + +?> +

    + + +
    + + + +'; + if(count($p['projects']) == 0) { + echo i18n('No winners to upload'); + continue; + } + foreach($p['projects'] as &$pr) { +?> + + +
    '; + exit; + +} + + + send_header("Award Upload", + array('Committee Main' => 'committee_main.php', + 'Administration' => 'admin/index.php', + 'Awards Main' => 'admin/awards.php') + ); + echo "
    "; + +?> + + + + + + + +

    :

    + +
    "; + echo "

    {$w['award_name']}

    "; + foreach($w['prizes'] as &$p) { + echo "
    "; + echo "

    {$p['name']}

    "; + echo '
         -
    +"; + echo " "; echo " "; echo " "; echo " "; + echo i18n("Grade").": ".$s['grade']; + echo "
    "; + echo " "; echo " "; echo " "; echo " "; + echo i18n("School").": ".$s['school']['schoolname']; + echo '
    '; + if($s['grade'] > $highest_grade) $highest_grade = $s['grade']; + } + $server_cat = ''; + foreach($server_cats as $c) { + if($highest_grade >= $c['mingrade'] && $highest_grade <= $c['maxgrade']) { + $server_cat = $c['id']; + } + } +?> +
    + + + + + + + + + + +
    :
    : + +
    : ( - )
    +
    + + + + + +id); +?> + + + + "; +} +?> +
    Assigned")?>
    name?>AWARD_COUNT?> +type == 'sfiab') + echo "id},-1)\" >".i18n("Send All").""; + else + echo "Not available yet, we're working on it!"; + echo "
    +
    +
    + + + +

    :

    + + + + + + + + +id, $r->award_source_fair_id); +?> + + + + '; +} +?> +
    Assigned")?>Info")?>
    awardname?>fairname?> + 0) + $onclick = "popup_upload({$r->award_source_fair_id},{$r->id});return false;"; + else + $onclick = "alert('".i18n('Assign a winner first')."');return false;"; +?> + + + +external_additional_materials) { + echo "id}\" target=\"_blank\">".i18n("download").""; + } + echo '
    +
    + +
    + + +"> */ +send_footer(); +?> diff --git a/c_award_winners.php b/c_award_winners.php new file mode 100644 index 00000000..c046156d --- /dev/null +++ b/c_award_winners.php @@ -0,0 +1,411 @@ +query("DELETE FROM winners WHERE `award_prize_id`='$prize_id' AND `pid`='$pid'"); + + if($prize['upstream_prize_id'] > 0) { + /* Push the winner normally, this will query the winners table + * to see if they're attached to the prize or not * and send the + * appropriate delete */ + remote_queue_push_winner_to_fair($mysqli, $prize['id'], $pid); + } + + form_ajax_response(array('status'=>0, 'happy'=>get_prize_count($prize) )); + exit(); + +case 'padd': + /* Add a project to a prize */ + $prize_id = (int)$_POST['prize_id']; + $pid = (int)$_POST['pid']; + $prize = prize_load($mysqli, $prize_id); + /* This insert may fail because the table is keyed to unique (prize, project, year). That's + * ok, just read the error and return that so the javascirpt doesn't think the insert was + * successful */ + $mysqli->query("INSERT INTO winners(`award_prize_id`,`pid`,`year`,`fair_id`) + VALUES('$prize_id','$pid','{$config['year']}','0')"); + + if($mysqli->errno == 0) { + $error = 0; + if($prize['upstream_prize_id'] > 0) { + remote_queue_push_winner_to_fair($mysqli, $prize['id'], $pid); + } + } else { + $error = 1; + } + form_ajax_response(array('status'=>$error, 'happy'=>get_prize_count($prize) )); + exit(); + +case 'padd_mass': + /* Add a project to a prize */ + $prize_id = (int)$_POST['prize_id']; + $pids = $_POST['pid']; + $prize = prize_load($mysqli, $prize_id); + + $projects = projects_load_all($mysqli, false, $config['year']); + foreach($projects as $pid=>$p) { + $key = sprintf("%03d", $p['floor_number']); + $map[$key] = $pid; + } + + /* This insert may fail because the table is keyed to unique (prize, project, year). That's + * ok, just read the error and return that so the javascirpt doesn't think the insert was + * successful */ + $error = 0; + foreach($pids as $pid) { + if(array_key_exists($pid, $map)) { + $ipid = $map[$pid]; + $mysqli->query("INSERT INTO winners(`award_prize_id`,`pid`,`year`,`fair_id`) + VALUES('$prize_id','$ipid','{$config['year']}','0')"); + + if($mysqli->errno == 0) { + if($prize['upstream_prize_id'] > 0) { + remote_queue_push_winner_to_fair($mysqli, $prize['id'], $ipid); + } + } else { + $error = 1; + } + } else { + $error = 1; + } + } + form_ajax_response(array('status'=>$error, 'happy'=>get_prize_count($prize) )); + exit(); +} + +/* Load all winners */ +$winners = array(); +$q = $mysqli->query("SELECT * FROM winners WHERE year='{$config['year']}'"); +while($r = $q->fetch_assoc()) { + $prize_id = (int)$r['award_prize_id']; + if(!array_key_exists($prize_id, $winners)) { + $winners[$prize_id] = array(); + } + $winners[$prize_id][] = (int)$r['pid']; +} + +$projects = projects_load_all($mysqli, false, $config['year']); + +$page_id = 'c_award_winners'; +$help = '

    Enter Winning Projects'; +sfiab_page_begin($u, "Enter Winning Projects", $page_id, $help); +?> + + +

    + +

    To add/edit winners, click on the number count beside each prize + (e.g., [0 / 4]). + +

    Use the search bar to + filter the list by award or prize names, or winners. After editing a project, + refresh this page to update the search index (or the search won't reflect the recent edits). + +

      +$type) { + $filter_text = $type; +?>
    • +

      Awards

      +
    • + +&$a) { + if($a['type'] != $tid) continue; + award_li($a); + } + } +?> + +
    + + 75) $title = substr($title, 0, 72)."..."; + $lang = $p['language']; + + if($p['disqualified_from_awards']) $pn = "DISQUALIFIED FROM AWARDS ".$p['number']; + else $pn = $p['number']; + + if($tr == true) { ?> + () + + () + + +query("SELECT * FROM winners WHERE `award_prize_id`='{$prize['id']}'"); + $pcount = (int)$q->num_rows; + } else { + if(!array_key_exists($prize['id'], $winners)) { + $pcount = 0; + } else { + $pcount = count($winners[$prize['id']]); + } + } + + if($pcount == 0) { + $colour = "red"; + } else { + $colour = "green"; + } + return "[$pcount / {$prize['number']}]"; +} + +function award_li(&$a) { + + global $awards, $page_id, $awards, $projects, $winners; + global $fairs; + + $filter_text = $a['type'].' '.$a['name']. ' '.$a['c_desc']; + foreach($a['prizes'] as &$prize) { + $filter_text .= ' '.$prize['name']; + if(array_key_exists($prize['id'], $winners)) { + foreach($winners[$prize['id']] as $pid) { + if(!array_key_exists($pid, $projects)) continue; + $filter_text .= ' '.$projects[$pid]['number'].' '.$projects[$pid]['title']; + } + } + } +?> +
  • +

    + + + 0) { +?>
    + This award is from the . Winners will be automatically uploaded as they are assigned/removed. + + This award has a prize that registers winner at the . Once all winners are assigned you must finalize their registrations by going to Awards -> Finalize Upstream Winners. Accounts for all the uploaded winners will be created (and they will be sent emails) only when this is done. Assigning winners now does not create accounts or send any emails. + +
    +   + + + +
    + + +
    + + +
  • + + +
    + + +
    +
    + + + + +
    + + + + + diff --git a/c_awards.php b/c_awards.php new file mode 100644 index 00000000..a4016005 --- /dev/null +++ b/c_awards.php @@ -0,0 +1,45 @@ + + + + + + diff --git a/c_awards_edit.php b/c_awards_edit.php new file mode 100644 index 00000000..40185394 --- /dev/null +++ b/c_awards_edit.php @@ -0,0 +1,434 @@ + 0) ? true : false; + + if(!$remote_award) { + post_text($a['name'],'name'); + post_text($a['type'],'type'); + post_text($a['j_desc'],'j_desc'); + post_text($a['s_desc'],'s_desc'); + post_int($a['sponsor_uid'], 'sponsor_uid'); + post_bool($a['self_nominate'],'self_nominate'); + post_int($a['ord'],'ord'); + post_array($a['categories'], 'categories', $cats); + $a['feeder_fair_ids'] = array(); + post_array($a['feeder_fair_ids'], 'feeder_fair_ids', $fairs); + post_bool($a['upstream_register_winners'], 'upstream_register_winners'); + post_bool($a['cwsf_award'],'cwsf_award'); + } + + post_bool($a['include_in_script'],'include_in_script'); + post_bool($a['schedule_judges'],'schedule_judges'); + post_text($a['presenter'],'presenter'); + post_text($a['c_desc'],'c_desc'); + + + $updates = array(); + if(!$remote_award && $a['sponsor_uid'] == 0) { + /* Insert a new sponsor, provided the name doesn't already exist */ + $updates['sponsor_uid'] = 1; + + $sponsor_org = "New Sponsor"; + post_text($sponsor_org, 'sponsor_organization'); + $sponsor_uid = sponsor_create_or_get($mysqli, $sponsor_org); + $updates['sponsor_uid'] = $sponsor_uid; + + $a['sponsor_uid'] = $sponsor_uid; + } + + if(!$remote_award) { + /* Iterate over the $_POST['prizes'][prize_id] and save data for each prize */ + if(array_key_exists('prize', $_POST)) { + foreach($_POST['prize'] as $pid=>$p) { + $pid = (int)$pid; + + if(!array_key_exists($pid, $a['prizes'])) { + print("Prize id not found, stop."); + exit(); + } + + $prize = &$a['prizes'][$pid]; + + post_text($prize['name'],array('prize', $pid, 'name') ); + post_int($prize['number'],array('prize', $pid, 'number') ); + post_float($prize['cash'],array('prize', $pid, 'cash')); + post_float($prize['scholarship'],array('prize', $pid, 'scholarship')); + post_float($prize['value'],array('prize', $pid, 'value')); + post_array($prize['trophies'], array('prize',$pid,'trophies'), $award_trophies); + } + } + } + + award_save($mysqli, $a); + + $response = array('status'=>0, 'val'=>$updates); + if($action == 'save_back') { + $response['location'] = 'back'; + } + + form_ajax_response($response); + exit(); + + +case 'del': + $aid = (int)$_POST['aid']; + if($aid > 0) { + $a = award_load($mysqli, $aid); + if($a['upstream_fair_id'] > 0) { + /* Can't del an award with an upstream fair id, someone is trying to bypass the html? */ + exit(); + } + $mysqli->real_query("UPDATE awards SET `ord`=`ord`-1 WHERE year='{$config['year']}' AND ord > '{$a['ord']}'"); + /* Delete prizes and awards */ + $mysqli->real_query("DELETE FROM award_prizes WHERE award_id='$aid'"); + $mysqli->real_query("DELETE FROM awards WHERE id='$aid'"); + form_ajax_response(0); + exit(); + } + form_ajax_response(1); + exit(); + +case 'pdel': + $pid = (int)$_POST['pid']; + if($pid) { + /* Load prize by pid, because that's all we have */ + $prize = prize_load($mysqli, $pid); + + /* Now load the entire award so we can modify it and push out an update */ + $a = award_load($mysqli, $prize['award_id']); + if($a['upstream_fair_id'] > 0) { + /* Can't prize del an award with an upstream fair id, someone is trying to bypass the html? */ + exit(); + } + + prize_delete($mysqli, $a, $pid); + award_save($mysqli, $a); + form_ajax_response(0); + exit(); + } + form_ajax_response(1); + exit(); + +case 'padd': + $aid = (int)$_POST['aid']; + if($aid > 0) { + $a = award_load($mysqli, $aid); + if($a['upstream_fair_id'] > 0) { + /* Can't prize add an award with an upstream fair id, someone is trying to bypass the html? */ + exit(); + } + $pid = prize_create($mysqli, $a); + $a['prizes'][$pid]['name'] = 'New prize'; + $a['prizes'][$pid]['number'] = 1; + award_save($mysqli, $a); + print_prize_div($form_id, $a['prizes'][$pid], true); + } + exit(); +} + +$help = '

    Edit the award'; + + +sfiab_page_begin($u, "Edit Award", $page_id, $help); + + +function print_prize_div($form_id, &$p, $show) +{ + global $award_trophies; + global $form_disabled; + global $div_award; + + $pid = $p['id']; + $show_attr = $show ? 'data-collapsed="false"' : ''; + +?>

    data-collapsed-icon="carat-r" and data-expanded-icon="carat-d"> +

    + + + + + +
    + + + +
    + +

    This award was automatically downloaded from the . Because it is a downloaded award, some field cannot be changed. Upstream changes are automatically downloaded. + +

    This is a divisional award. It is created automatically and some field cannot be changed. To edit the prize names, go to the Judge Scheduling options in the Configuration Variables. +

    + + Cancel, Go Back + +

    Prizes

    +

    Prizes are listed in the order they will appear in the ceremony script. To change the prize order, drag and drop the prizes in the list below (or on the Award List page). +

    + +
    + + + Create a New Prize
    + Cancel, Go Back + +

    Feeder Fairs

    +
    +

    Feeder Fair Options

    +

    Any fair you check below will automatically download this award and it will appear in their awards list. If/when each fair + assigns winners, they will be automatically uploaded back to this fair. + +

    You can also make accounts for winners assigned by a feeder + fair so they can become participants in this fair. When winners + are assigned, an option will appear on the main committee page + to send welcome emails to these participants. Welcome emails + are not sent automatically because winner uploading is + automatic and a feeder fair could assign a winner by mistake, + then remove the assignment. We don't want to immediately send + welcome emails in that case.

    + +
    + + +

    + Delete Award (and Prizes)
    + + +
    + + + + + + diff --git a/c_awards_list.php b/c_awards_list.php new file mode 100644 index 00000000..0d8a9d6a --- /dev/null +++ b/c_awards_list.php @@ -0,0 +1,253 @@ +query("UPDATE awards SET ord='$ord' WHERE id='$aid'"); + } + form_ajax_response(0); + exit(); + +case 'prize_order': + /* Called prizes in an award are reordered. prizes is an array + * of prizes, in order, starting from ord=1 */ + $ord = 0; +// print_r($_POST); + + foreach($_POST['prizes'] as $prize_id) { + $ord++; + $prize_id = (int)$prize_id; + if($prize_id == 0) continue; + + $mysqli->query("UPDATE award_prizes SET ord='$ord' WHERE id='$prize_id'"); + } + form_ajax_response(0); + exit(); + +case 'add': + /* Create an award with a default name and ord=1 (move all other awards down one). + * Create a prize for it too */ + $mysqli->real_query("UPDATE awards SET `ord` = `ord`+1 WHERE year='{$config['year']}'"); + $mysqli->real_query("INSERT INTO awards (`name`,`ord`,`year`,`type`) VALUES('New Award',1,'{$config['year']}','special')"); + $aid = $mysqli->insert_id; + $a = award_load($mysqli, $aid); + $pid = prize_create($mysqli, $a); + $a['prizes'][$pid]['name'] = 'New prize'; + $a['prizes'][$pid]['number'] = 1; + $a['prizes'][$pid]['ord'] = 1; + award_save($mysqli, $a); + /* Print the award id, the js function takes this and redirects to c_awards_edit?aid=..." */ + print("$aid"); + exit(); +} + +$sponsors = sponsors_load_all($mysqli); +$fairs = fair_load_all_upstream($mysqli); + +/* Update divisional awards. This will be a noop if everything is up to date */ +award_update_divisional($mysqli); + + +$help = 'Use the button to edit the award and prizes. Drag and drop the icon to reorder the awards. Drag the [=] handle before each prize to re-order the prizes within the award. Awards/Prizes at the top of the list will go first in the award ceremony.'; + +sfiab_page_begin($u, "Edit Awards", $page_id, $help); + +?> + + +
    + + + +

    Use the button to edit the award and prizes. Drag and drop the icon to reorder the awards. +

    Drag the [=] handle before each prize to re-order the prizes within the award. Awards/Prizes at the top of the list will go first in the award ceremony. + + + + + + + + + + +$a) { + + $prizes = ''; + if(count($a['prizes']) == 0) { + $prizes = 'Award has NO prizes (it can\'t be awarded)'; + } + + ?> + + + + + + + +
    Order /
    Type
    Name / Prize(s)Include
    in
    Script
    Sched.
    Judges
    Students
    Self-
    Nominate
    +
    +
    +
    + Move + Edit +
    + +
    + + + + + + +
    + +
    From Upstream Fair: + + +
    Presented By: + + 0 && array_key_exists($a['sponsor_uid'], $sponsors) ) { + $s = $sponsors[$a['sponsor_uid']]['organization']; + } else { + $s = "NOT SET -- Please set a sponsor"; + } ?> +
    Sponsored By: + +
    Script':'No
    Script
    '?>
    Judges':'No
    Judges
    '?>
    Nom.':'No
    Nom.
    '?>
    + + +
    Award has NO prizes which means it can't be awarded. Edit the award to add prizes. + + + + + + + + + + 0) $strs[] = "$".$p['cash']." cash"; + if($p['scholarship'] > 0) $strs[] = "$".$p['scholarship']." scholarship"; + if($p['value'] > 0) $strs[] = "$".$p['value']." value"; + foreach($p['trophies'] as $t) { + $strs[] = "Trophy ".$award_trophies[$t]; + } + $str = join("
    ", $strs); +?> + + + + +
    [=]
    + +
    + New Award + +

    + + + + + + diff --git a/c_backup.php b/c_backup.php new file mode 100644 index 00000000..f150a8a6 --- /dev/null +++ b/c_backup.php @@ -0,0 +1,246 @@ + + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +?> +query("SHOW TABLES FROM `$dbdatabase`"); + while($tr=$tableq->fetch_row()) { + /* For each table... */ + $table=$tr[0]; + $dump.="#TABLE: $table\n"; + + # Drop and create the table + $dump.="DROP TABLE IF EXISTS `$table`;\n"; + + $createq = $mysqli->query("SHOW CREATE TABLE `$table`"); + $r = $createq->fetch_assoc(); + $dump .= $r['Create Table'].";\n"; + + /* Get all the columns */ + $columnq=$mysqli->query("SHOW COLUMNS FROM `$table`"); + unset($fields); + $fields=array(); + while($cr=$columnq->fetch_assoc()) { + $fields[]=$cr['Field']; + } + $insert_str="INSERT INTO `$table` (`".join('`,`', $fields)."`) VALUES \n"; + + /* Create an INSERT command for all the data */ + $dataq=$mysqli->query("SELECT * FROM `$table` ORDER BY `{$fields[0]}`"); + $cnt = 0; + $cnt_total = $dataq->num_rows; + while($data=$dataq->fetch_assoc() ) { + + if($cnt % 10 == 0) { + $dump .= $insert_str; + } + + $value_str = ' ('; + foreach($fields AS $field) { + if(is_null($data[$field])) + $value_str.="NULL,"; + else + { + $escaped=str_replace("\\","\\\\",$data[$field]); + $escaped=str_replace("'","''",$escaped); + $escaped=str_replace("\n","\\n",$escaped); + $escaped=str_replace("\r","\\r",$escaped); + $value_str.="'".$escaped."',"; + } + } + $value_str=substr($value_str,0,-1); + $value_str.=")"; + + $dump.=$value_str; + + /* Should we append a ; for the last entry or before a new header, or a , if there are more values */ + $cnt += 1; + if($cnt == $cnt_total || $cnt % 10 == 0) { + $dump .= ";\n"; + } else { + /* There are more */ + $dump .= ",\n"; + } + } + } + /* gzip makes it about 10x smaller */ + $gzdump = gzencode($dump); + header("Content-type: application/x-gzip"); + header("Content-Disposition: attachment; filename=sfiab_backup_".date("Y-m-d-H-i-s",$ts).".sql.gz"); + header("Content-Length: ".strlen($gzdump)); + //Make IE with SSL work + header("Pragma: public"); + print($gzdump); + exit(); + +case 'restore': + + print("
    Begin Restore.\n");
    +	/* File should be in $_FILES['restore'], check the $_FILES array: */
    +	if ( !isset($_FILES['restore']['error']) || is_array($_FILES['restore']['error'])) {
    +		exit();
    +	}
    +	print("Received a file.\n");
    +
    +	/* Make sure the file uploaded successfully */
    +	if($_FILES['restore']['error'] != UPLOAD_ERR_OK) {
    +		$message = "";
    +		switch($_FILES['restore']['error']) {
    +		case UPLOAD_ERR_INI_SIZE: 
    +			$message = "The uploaded file exceeds the upload_max_filesize directive in php.ini"; 
    +			break; 
    +		case UPLOAD_ERR_FORM_SIZE: 
    +			$message = "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form";
    +			break; 
    +		case UPLOAD_ERR_PARTIAL: 
    +			$message = "The uploaded file was only partially uploaded"; 
    +			break; 
    +		case UPLOAD_ERR_NO_FILE: 
    +			$message = "No file was uploaded"; 
    +			break; 
    +		case UPLOAD_ERR_NO_TMP_DIR: 
    +			$message = "Missing a temporary folder"; 
    +			break; 
    +		case UPLOAD_ERR_CANT_WRITE: 
    +			$message = "Failed to write file to disk"; 
    +			break; 
    +		case UPLOAD_ERR_EXTENSION: 
    +			$message = "File upload stopped by extension"; 
    +			break; 
    +		default: 
    +			$message = "Unknown upload error"; 
    +			break; 
    +		} 
    +		form_ajax_response(array('status'=>1, 'error'=>'File Upload Failed: '.$message));
    +		exit();
    +	}
    +	print("File OK.\n");
    +
    +	$fp = gzopen($_FILES['restore']['tmp_name'], "rb");
    +
    +	/* Get the first 4 lines of the file to check */
    +	$hdr = array();
    +	for($x=0;$x<4;$x++) {
    +		$hdr[$x] = trim(fgets($fp));
    +	}
    +
    +	if(substr($hdr[0], 0, 17) != "#SFIAB SQL BACKUP") {
    +		print("\nERROR: File is NOT an SFIAB Backup. Stop.\n");
    +//		form_ajax_response(array('status'=>1, 'error'=>'File is not an SFIAB backup'));
    +		exit();
    +	}
    +	print("File is an SFIAB Backup.\n");
    +
    +	/* The backup needs to go back into a database of the same version, or things will get broken */
    +	$m = preg_match("/^#SFIAB DB VERSION: ([0-9]+)/", $hdr[2], $matches);
    +	if($m != 1) {
    +		print("\nERROR: File database version is corrupt. Stop.\n");
    +//		form_ajax_response(array('status'=>1, 'error'=>'File database version is not properly formatted'));
    +		exit();
    +	}
    +	print("File is DB Version {$matches[1]}\n");
    +
    +	print("Starting multiread restore...\n");
    +	db_apply_update($mysqli, $fp);
    +	gzclose($fp);
    +	unlink($_FILES['restore']['tmp_name']);
    +
    +	print("Restore Complete.\n\nYou may have to login again because the database was just completely overriden.  You can try the link below though, it might work.\n");
    +	print("
    "); +?> + Go Back +0, 'info'=>'Database Restored')); + exit(); +} + + +$page_id = "c_backup"; +$help = "

    Backup and Restore"; +sfiab_page_begin($u, "Backup and Restore", $page_id, $help); +?> + +

    +

    Backup Database

    +

    This downloads a file containing your entire SFIAB database. Save it somewhere safe, it contains student contact information, judging results, private committee information, everything. + +


    + +

    Restore Database

    + +

    Consider doing a database backup before restoring a different database file so you can go back the current state. +

    Choose a database backup file to upload: + +

    + + + +
    + + +
    + + diff --git a/c_check_tours.php b/c_check_tours.php new file mode 100644 index 00000000..785ea807 --- /dev/null +++ b/c_check_tours.php @@ -0,0 +1,141 @@ + +'; + +sfiab_page_begin($u, "Sanity Check Tours", $page_id, $help); + +?> + + +
    + + +

    Sanity Check Tours

    + +

    not accepted have been assigned to a tour. +

    / accepted students do not have a tour. + +

    Not Accepted Students with a Tour

    + + + + + + + +
    StudentAssigned Tour
    # - + +
    + +

    Accepted Students without a Tour

    + +

    / accepted students do not have a tour. + + + + + +&$t) { + $t['count'] = 0; +} + +foreach($users as $uid=>&$s) { + if($s['tour_id'] > 0) { + $tours[$s['tour_id']]['count'] += 1; + } +} + + +foreach($students_accepted_without_tour as &$s) { +?> + + + + + + +
    StudentTour ChoicesTour Capacity
    +Tour not found (tours edited after registration opened?)"; + } else { + $tour_name = "#{$tours[$tour_id_pref]['num']} - {$tours[$tour_id_pref]['name']}"; + } ?> + + :
    + +
    + + / + +
    + +
    +
    + + +

    + + diff --git a/c_checkin.php b/c_checkin.php new file mode 100644 index 00000000..d6f91426 --- /dev/null +++ b/c_checkin.php @@ -0,0 +1,280 @@ +query("SELECT * FROM projects WHERE year='$year' AND accepted='1' ORDER BY number_sort "); + $projects_tmp = array(); + while($p = $q->fetch_assoc()) { + $p_temp = project_load($mysqli, $p['pid'], $p); + + if($p_temp['number_sort'] == 0) { + $p_temp['number_sort'] = $p['pid']; + } + $projects_tmp[$p['pid']] = $p_temp; + } + + $projects = array(); + /* Now match users to projects, copying projects + * into the real return array as we find them */ + $q = $mysqli->query("SELECT users.*,schools.school FROM users + LEFT JOIN schools ON users.schools_id=schools.id + WHERE users.year='$year' + AND users.enabled = '1' + AND users.s_accepted = '1' + AND users.new = '0' + AND FIND_IN_SET('student', users.`roles`)>0 + "); + $users = array(); + while($j = $q->fetch_assoc()) { + $p_user = user_load($mysqli, -1, -1, NULL, $j); + $pid = $p_user['s_pid']; + + if($pid == 0) { + print("No project for student uid={$p_user['uid']}
    "); + } + + if(!array_key_exists($pid, $projects)) { + $projects[$pid] = $projects_tmp[$pid]; + $projects[$pid]['students'] = array(); + $projects[$pid]['s_complete'] = true; + } + + $projects[$pid]['students'][] = $p_user; + if($p_user['s_complete'] == 0) { + $projects[$pid]['s_complete'] = false; + } + + $projects[$pid]['visit'] = false; + $projects[$pid]['visit_notes'] = ''; + + } + + $q = $mysqli->query("SELECT pid,notes,visit FROM visit_list WHERE uid='{$u['uid']}'"); + while($d = $q->fetch_row()) { + $pid = (int)$d[0]; + $notes = $d[1]; + $visit = (int)$d[2]; + if(array_key_exists($pid, $projects)) { + $projects[$pid]['visit'] = $visit; + $projects[$pid]['visit_notes'] = $notes; + } + } + + return $projects; +} + + +$page_id = 'c_checkin_list'; +$help = '

    '; + + +sfiab_page_begin($u, "Checkin List", $page_id, $help); + +?> + + +

    + +

    Checkin and Tshirt List

    + +

    The "Save" button below is only for the notes field. The Checkin and Tshirt buttons update the database immediately when clicked. + +

    + + + + diff --git a/c_communication.php b/c_communication.php new file mode 100644 index 00000000..fc577ac2 --- /dev/null +++ b/c_communication.php @@ -0,0 +1,222 @@ +Communication'; + +$action = ''; +if(array_key_exists('action', $_POST)) { + $action = $_POST['action']; +} else if(array_key_exists('action', $_GET)) { + $action = $_GET['action']; +} + +$from_name = array('email_chair' => $config['fair_abbreviation']." Chair", + 'email_chiefjudge' => $config['fair_abbreviation']." Chief Judge", + 'email_ethics' => $config['fair_abbreviation']." Ethics", + 'email_registration' => $config['fair_abbreviation']." Registration"); + +$from_email = array('email_chair' => $from_name['email_chair']." <".$config['email_chair'].">", + 'email_chiefjudge' => $from_name['email_chiefjudge']." <".$config['email_chiefjudge'].">", + 'email_ethics' => $from_name['email_ethics']." <".$config['email_ethics'].">", + 'email_registration' => $from_name['email_registration']." <".$config['email_registration'].">", + 'specify_email' => "Other - Enter the from email name and address below"); + +switch($action) { + +case 'new': + $eid = email_create($mysqli); + +case 'edit': + if($action == 'new') { + /* Fell through from above, leave eid alone */ + } else { + $eid = (int)$_GET['eid']; + if($eid == 0) exit(); + } + + /* load available categories */ + $sections = array(); + $q = $mysqli->query("SELECT DISTINCT(`section`) AS S FROM emails ORDER BY `section`"); + while($s = $q->fetch_assoc()) { + $sections = $s['S']; + } + + sfiab_page_begin($u, "Edit Email", $page_id.'_edit', $help); +?> +
    + +

    Edit Email

    +$val) { + if($e['from_name'] == $val) { + $email_key = $key; + break; + } + } +?> + +
    +

    Email Replacement Keys

    + +
    + +

    Replacement Keys can be used in the subject and body of the email. +

    > +
    + + Cancel +
    + + + + + + +
    +0, 'location'=>'back')); + exit(); + +case 'delete': + $eid = (int)$_POST['eid']; + if($eid == 0) exit(); + + $e = email_load($mysqli, '', $eid); + if($e['section'] == 'System') exit(); + + $q = $mysqli->real_query("DELETE FROM emails WHERE id='$eid'"); + form_ajax_response(array('status'=>0, 'location'=>'back')); + exit(); + +}; + + +sfiab_page_begin($u, "Send Emails", $page_id, $help); + +$emails = array(); +$q = $mysqli->query("SELECT * FROM emails ORDER BY `section`,`name` "); +while($e = $q->fetch_assoc()) { + $emails[] = $e; +} + + +?> +
    +

    Actions

    + +

    Send / Edit Emails

    +

    Click on an email below to send it. You'll be shown the full email text and have to confirm who to send it to before it actually sends. Click on the gear icon on the right of each email to edit or delete it. + + +

    + + + diff --git a/c_communication_queue.php b/c_communication_queue.php new file mode 100644 index 00000000..c2e29865 --- /dev/null +++ b/c_communication_queue.php @@ -0,0 +1,91 @@ +Communication'; + +$emails = array(); +$q = $mysqli->query("SELECT * FROM emails"); +while($e = $q->fetch_assoc()) { + $emails[$e['id']] = email_load($mysqli, '', -1, $e); +} + +$action = ''; +if(array_key_exists('action', $_GET)) { + $action = $_GET['action']; +} + +switch($action) { +case 'qdelall': + $mysqli->real_query("DELETE FROM queue WHERE command='email' AND result='queued'"); + $action = ''; + break; + +case 'qstop': + queue_stop($mysqli); + $action = ''; + break; +case 'qstart': + queue_start($mysqli); + $action = ''; + break; + +} + + +sfiab_page_begin($u, "Email Queue", $page_id, $help); +?> + + +
    +

    Current Email Queue

    +query("SELECT * FROM queue WHERE command='email' AND result='queued'"); +?> +

    Current Email Queue Status is: + + Stopped + + Active + +
    +

    Queued Emails: num_rows?> + +

    + + + +fetch_assoc()) { +?> + + + + + + + diff --git a/c_communication_send.php b/c_communication_send.php new file mode 100644 index 00000000..46333c30 --- /dev/null +++ b/c_communication_send.php @@ -0,0 +1,175 @@ +Communication'; + +$action = ''; +if(array_key_exists('action', $_POST)) { + $action = $_POST['action']; +} + +switch($action) { +case 'send': + $eid = (int)$_POST['eid']; + $to = $_POST['list']; + $year = $_POST['year']; + + if($year != 'all') { + $year = (int)$year; + if($year == 0) { + form_ajax_response(array('status'=>1, 'error'=>'Please select a year')); + exit(); + } + $year_q = "year='$year'"; + } else { + $year_q = '1'; + } + + + if(!array_key_exists($to, $email_lists)) { + exit(); + } + + $q = $mysqli->query("SELECT * FROM emails WHERE id=$eid"); + $e = $q->fetch_assoc(); + + $elist = &$email_lists[$to]; + + if($to == 'one_user') { + $usernames = explode(',', $_POST['username']); + $users = array(); + foreach($usernames as $username) { + $username = $mysqli->real_escape_string(trim($username)); + $uu = user_load_by_username($mysqli, $username); + if($uu === NULL) { + form_ajax_response(array('status'=>1, 'error'=>"Unknown username $username, no email sent to any user")); + exit; + } + $users[] = $uu; + } + + foreach($users as $uu) { + email_send($mysqli, $e['name'], $uu); + } + } else { + /* Query all users, fetch only email per username */ + $query = "SELECT * FROM users WHERE $year_q AND {$elist['where']} ORDER BY `year` DESC"; +// print($query); + $r = $mysqli->query($query); + print($mysqli->error); + + $users = array(); + $emails = array(); + while($ua = $r->fetch_assoc()) { + $u = user_load_from_data($mysqli, $ua); + if(array_key_exists($u['email'], $emails)) { + /* Email already seen, send to the same email only in the same year + * e.g., multiple registrations int he same year using the same email */ + if($emails[$u['email']] != $u['year']) { + continue; + } + } + /* Tag this email with the year to avoid dupes */ + $emails[$u['email']] = $u['year']; + /* Add this user to the list of recipients */ + $users[] = $u; + } + email_send_to_list($mysqli, $e['name'], $users); + } + form_ajax_response(array('status'=>0, 'location'=>'c_communication_queue.php')); + exit(); +} + +sfiab_page_begin($u, "Send Email", $page_id, $help); + +?> + + +
    +query("SELECT MIN(year) AS M FROM users"); + $u = $q->fetch_assoc(); + $min_year = (int)$u['M']; + $year_list = array(); + for($y=$config['year']; $y>=$min_year; $y--) { + $year_list[$y] = $y; + } + $year_list['all'] = "All Years"; + + $q = $mysqli->query("SELECT * FROM emails WHERE id=$eid"); + $e = $q->fetch_assoc(); + form_page_begin($page_id, array()); + $current_list = ''; + $username = ''; + + + + +?> +

    Send Email

    + +

    +


    + + + + +
    + +
    + +

    Note: It may take a few minutes (literally minutes) of seemingly doing nothing to inject mail to lots of recipients. + When it's done the page will change to the email send queue page.

    + + + Cancel, Don't Send + + +
    + + + + + diff --git a/c_config.php b/c_config.php new file mode 100644 index 00000000..28c7d754 --- /dev/null +++ b/c_config.php @@ -0,0 +1,48 @@ + + + + + + diff --git a/c_config_categories.php b/c_config_categories.php new file mode 100644 index 00000000..73fd01f9 --- /dev/null +++ b/c_config_categories.php @@ -0,0 +1,238 @@ +query("UPDATE categories SET cat_id='$ord' WHERE id='$id'"); + } + form_ajax_response(0); + exit(); + +case 'add': + /* Create a new age category */ + $q = $mysqli->query("SELECT MAX(cat_id) FROM categories WHERE year='{$config['year']}'"); + + if($q->num_rows > 0) { + $r = $q->fetch_row(); + $max_cat_id = $r[0] + 1; + } else { + $max_cat_id = 1; + } + $mysqli->real_query("INSERT INTO categories(`cat_id`,`name`,`shortform`,`min_grade`,`max_grade`,`year`) VALUES('$max_cat_id','New Category','N','12','13','{$config['year']}')"); + $id = $mysqli->insert_id; + /* Print the id so the caller can jump to the edit page with the right cat id */ + print("$id"); + exit(); + +case 'save': + $id = (int)$_POST['id']; + post_text($shortform, 'shortform'); + post_text($name, 'name'); + post_int($min_grade, 'min_grade'); + post_int($max_grade, 'max_grade'); + + $shortform = $mysqli->real_escape_string($shortform); + $name = $mysqli->real_escape_string($name); + + $mysqli->real_query("UPDATE categories SET `shortform`='$shortform',`name`='$name',min_grade='$min_grade',max_grade='$max_grade' WHERE id='$id'"); + form_ajax_response(array('status'=>0, 'location'=>'c_config_categories.php')); + exit(); + +case 'del': + /* Delete by id (not cid) and year just to be safe */ + $id = (int)$_POST['id']; + $mysqli->real_query("DELETE FROM categories WHERE `id`='$id' AND `year`='{$config['year']}'"); + form_ajax_response(0); + exit(); +} + +if(array_key_exists('edit', $_GET)) { + $page = 'edit'; +} else { + $page = ''; +} + +switch($page) { +case 'edit': + $id = (int)$_GET['edit']; + $page_id = 'c_config_edit_category'; + $help = '

    '; + sfiab_page_begin($u, "Edit Categories", $page_id, $help); + +?> +

    + +&$c) { + if($c['id'] == $id) { + $category = $cid; + } + } + + /* Couldn't find the category */ + if($category === NULL) { + exit(); + } + +?> +

    Edit Age Category:

    + Cancel +'; + + sfiab_page_begin($u, "Edit Categories", $page_id, $help); + +?> + + +
    + + + +

    Use the Move button to drag and drop to re-order the categories. The category number always starts at 1 and increases by 1 for each category, and it may be used in the project number (depend on the project number configuration). + + +

    EmailTo Name (uid)To EmailStatus
    ()Queued
    + + + + + + + + + +$c) { +?> + + + + + + + + + + + + +
    Number ShortFormNameMin GradeMax Grade

    +
    +
    + Move + Edit + Delete +
    +
    + New Category + + + +
    + + + + + + diff --git a/c_config_challenges.php b/c_config_challenges.php new file mode 100644 index 00000000..405d9116 --- /dev/null +++ b/c_config_challenges.php @@ -0,0 +1,230 @@ +query("UPDATE challenges SET chal_id='$ord' WHERE id='$id'"); + } + form_ajax_response(0); + exit(); + +case 'add': + /* Create a new age challenge */ + $q = $mysqli->query("SELECT MAX(chal_id) FROM challenges WHERE year='{$config['year']}'"); + + if($q->num_rows > 0) { + $r = $q->fetch_row(); + $max_chal_id = $r[0] + 1; + } else { + $max_chal_id = 1; + } + $mysqli->real_query("INSERT INTO challenges(`chal_id`,`name`,`shortform`,`year`) VALUES('$max_chal_id','New Challenge','N','{$config['year']}')"); + $id = $mysqli->insert_id; + /* Print the id so the caller can jump to the edit page with the right cat id */ + print("$id"); + exit(); + +case 'save': + $id = (int)$_POST['id']; + post_text($shortform, 'shortform'); + post_text($name, 'name'); + + $shortform = $mysqli->real_escape_string($shortform); + $name = $mysqli->real_escape_string($name); + + $mysqli->real_query("UPDATE challenges SET `shortform`='$shortform',`name`='$name' WHERE id='$id'"); + form_ajax_response(array('status'=>0, 'location'=>'c_config_challenges.php')); + exit(); + +case 'del': + /* Delete by id (not cid) and year just to be safe */ + $id = (int)$_POST['id']; + $mysqli->real_query("DELETE FROM challenges WHERE `id`='$id' AND `year`='{$config['year']}'"); + form_ajax_response(0); + exit(); +} + +if(array_key_exists('edit', $_GET)) { + $page = 'edit'; +} else { + $page = ''; +} + +switch($page) { +case 'edit': + $id = (int)$_GET['edit']; + $page_id = 'c_config_edit_challenge'; + $help = '

    '; + sfiab_page_begin($u, "Edit Challenges", $page_id, $help); + +?> +

    + +&$c) { + if($c['id'] == $id) { + $challenge = $cid; + } + } + + /* Couldn't find the challenge */ + if($challenge === NULL) { + exit(); + } + +?> +

    Edit Age Challenge:

    + Cancel +'; + + sfiab_page_begin($u, "Edit Challenges", $page_id, $help); + +?> + + +
    + + + +

    Use the Move button to drag and drop to re-order the challenges. The challenge number always starts at 1 and increases by 1 for each challenge, and it may be used in the project number (depend on the project number configuration). + + + + + + + + + + +$c) { +?> + + + + + + + + + + +
    Number ShortFormName

    +
    +
    + Move + Edit + Delete +
    +
    + New Challenge + + + +

    + + + + + + diff --git a/c_config_cms.php b/c_config_cms.php new file mode 100644 index 00000000..6ac28e6f --- /dev/null +++ b/c_config_cms.php @@ -0,0 +1,141 @@ +query("SELECT * FROM `cms` ORDER BY `type`,`name`"); +while($r = $q->fetch_assoc()) { + $cms_pages[$r['name']] = $r['head']; +} + +$action = ''; +if(array_key_exists('action', $_POST)) { + $action = $_POST['action']; +} +switch($action) { +case 'get': + $name = $_POST['name']; + if(!array_key_exists($name, $cms_pages)) { + exit(); + } + + $q = $mysqli->query("SELECT `text`,`desc`,`type` FROM cms WHERE name='$name'"); + $r = $q->fetch_row(); + + $vals = array(); + $vals['text'] = $r[0]; + $vals['desc'] = $r[1]; + + form_ajax_response(array('status'=>0, 'val'=>$vals)); + exit(); + +case 'save': + $name = $_POST['name']; + if(!array_key_exists($name, $cms_pages)) { + exit(); + } + + $text = ''; + post_text($text,'text'); + + $text = $mysqli->real_escape_string($text); + + $mysqli->real_query("UPDATE cms SET `text`='$text', `language`='en', `use`='1' WHERE `name`='$name'"); + form_ajax_response(0); + exit(); + +} + +sfiab_page_begin($u, "Edit Page Text", $page_id); + +?> + + +
    + +

    Page Text and Signature Form Text

    +query("SELECT `text`,`desc` FROM cms WHERE name='main'"); + $r = $q->fetch_row(); + $text = $r[0]; + $desc = $r[1]; + + form_begin($form_id, 'c_config_cms.php'); + $v = 'main'; + form_select($form_id, 'name', "Page/Item", $cms_pages, $v); +?> +
    +
    +

    Email Replacement Keys

    + +
    + +
    +
    +

    Download Sample Signature Form / Electronic Signature Pages

    +$c) { + if($c['max_grade'] > $max_grade) { + $max_grade = $c['max_grade']; + $max_cat = (int)$c['cat_id']; + } + } + + $sig_form_id = $page_id.'_sig_form'; + form_begin($sig_form_id, 's_signature.php', false, false); + form_hidden($sig_form_id, 'pdf', 1); + form_radio_h($sig_form_id, 'cat_id', "Category", $cats, $max_cat); + $d = 1; + form_radio_h($sig_form_id, 'num_students', "Number of Students", array(1=>'1', 2=>'2') , $d); + form_button($sig_form_id, 'sample', "Download Sample Paper Signature Form"); + form_end($sig_form_id); ?> +
    + View Sample Student Electronic Signature Page + View Sample Parent/Guardian Electronic Signature Page + View Sample Teacher Electronic Signature Page +
    + + + +
    + + + + + + diff --git a/c_config_fairs.php b/c_config_fairs.php new file mode 100644 index 00000000..be7f489a --- /dev/null +++ b/c_config_fairs.php @@ -0,0 +1,348 @@ +query("SELECT time,result FROM log WHERE `year`='{$config['year']}' AND `type`='sync_stats' AND fair_id='$fair_id' ORDER BY `time` DESC LIMIT 1"); + if($q->num_rows != 1) { + $text = 'never'; + } else { + $r = $q->fetch_assoc(); + $text = date("F j, Y h:ia", strtotime($r['time'])).'
    '; + if($r['result'] == 1) { + $text .= 'OK'; + } else { + $text .= 'failed'; + } + } + return $text; +} + + +$action = ''; +if(array_key_exists('action', $_POST)) { + $action = $_POST['action']; +} +switch($action) { + +case 'add': + $fair_id = fair_create($mysqli); + /* Print the id so the caller can jump to the edit page with the right id */ + print("$fair_id"); + exit(); + +case 'pass': + $id = (int)$_POST['id']; + $f = fair_load($mysqli, $id); + $f['password'] = base64_encode(mcrypt_create_iv(96, MCRYPT_DEV_URANDOM)); + fair_save($mysqli, $f); + form_ajax_response(array('status'=>0, 'val' => array('password' => $f['password']))) ; + exit(); + +case 'check': + $id = (int)$_POST['id']; + $f = fair_load($mysqli, $id); + post_text($f['url'], 'url'); + if($f['password'] === NULL) $f['password'] = ''; + $ret = remote_ping($mysqli, $f); + if($ret['error'] == 0) { + $val = array(); + if($f['name'] == '') { + $f['name'] = $ret['name']; + $val['name'] = $ret['name']; + } + if($f['abbrv'] == '') { + $f['abbrv'] = $ret['abbrv']; + $val['abbrv'] = $ret['abbrv']; + } + $f['password'] = $f['original']['password']; + fair_save($mysqli, $f); + form_ajax_response(array('status'=>0, 'happy'=>"Server Responded: {$ret['name']}. Use the \"Check Authentication\" button to verify the secret key works", 'val' => $val)) ; + exit(); + } + form_ajax_response(array('status'=>1, 'error'=>"Server couldn't be contacted")); + exit(); + +case 'auth': + $id = (int)$_POST['id']; + $f = fair_load($mysqli, $id); + $ret = remote_auth_ping($mysqli, $f); + if($ret['error'] == 0) { + form_ajax_response(array('status'=>0, 'happy'=>"Server Responded: {$ret['name']}. Everything seems to be working")) ; + exit(); + } + form_ajax_response(array('status'=>1, 'error'=>"Authentication failed. Make sure the remote fair is using the same secret key")); + exit(); + + + +case 'saveback': +case 'save': + $id = (int)$_POST['id']; + $f = fair_load($mysqli, $id); + + post_text($f['name'], 'name'); + post_text($f['abbrv'], 'abbrv'); + post_text($f['type'], 'type'); + post_text($f['url'], 'url'); + post_text($f['website'], 'website'); + post_text($f['password'], 'password'); + if($f['type'] == 'ysc') { + post_text($f['username'], 'username'); + } else { + $f['username'] = ''; + } + fair_save($mysqli, $f); + + $ret = array('status'=>0); + if($action == 'saveback') { + $ret['location'] = 'c_config_fairs.php'; + } + form_ajax_response($ret); + exit(); + +case 'del': + /* Delete by id (not cid) and year just to be safe */ + $id = (int)$_POST['id']; + $mysqli->real_query("DELETE FROM fairs WHERE `id`='$id'"); + form_ajax_response(array('status'=>1, 'location' => 'c_config_fairs.php')); + exit(); + +case 'allstats': + remote_queue_get_stats_from_all_fairs($mysqli, $config['year']); + form_ajax_response(0); + exit(); + +case 'sync': + $id = (int)$_POST['id']; + $f = fair_load($mysqli, $id); + if($f['type'] == 'sfiab_upstream') { + /* Push our stats to upstream */ + $response = remote_push_stats_to_fair($mysqli, $f, $config['year']); + } else if($f['type'] == 'old_sfiab2_feeder') { + /* Get stats from an old sfiab 2 */ + $response = remote_get_stats_from_fair_old_sfiab2($mysqli, $f, $config['year']); + } else { + /* Get stats from upstream */ + $response = remote_get_stats_from_fair($mysqli, $f, $config['year']); + } + + $text = get_last_sync($mysqli, $id); + print($text); + exit(); +} + +if(array_key_exists('edit', $_GET)) { + $page = 'edit'; +} else { + $page = ''; +} + +switch($page) { +case 'edit': + $id = (int)$_GET['edit']; + $page_id = 'c_config_edit_fair'; + $help = '

    '; + sfiab_page_begin($u, "Edit Fairs", $page_id, $help); + +?> +

    + + +

    Edit Fair:

    +

    For creating a new fair: Enter the Server Address, then press "Check Server", that will verify the server and populate the Name and Abbreviation + Cancel, Go Back + +


    +

    Check Authentication

    +

    Use this button to check that your secret key is working after you have saved all the information above

    + +
    +

    How To Connect two SFIABs

    +

    On the Feeder Fair: +

    • Create a fair entry for the Upstream fair, select the type as 'Upstream' +
    • Enter the server address (usually the website of the registration system) +
    • Enter or generate a secret key. Both the Upstream and Feeder fair must have the SAME secret key, so generate it on one, and enter it on the other +
    + On the Upstream Fair: +
    • Create a fair entry for the Feeder fair, select the type as 'Feeder' +
    • Enter the server address (usually the website of the registration system) +
    • Enter or generate a secret key. Both the Upstream and Feeder fair must have the SAME secret key, so generate it on one, and enter it on the other +
    + +
    +

    Delete Fair

    +'; + + sfiab_page_begin($u, "Edit Fairs", $page_id, $help); +?> +
    + + + +

    Feeder/Upstream Fairs

    +

    Fair Types: +

    • Feeder Fairs are fairs that provide this fair with students. This fair may export awards to feeder fairs, retrieve winners for those awards, and download fair statistics. +
    • Upstream Fairs are fairs that this fair can send students to. This fair can upload winners (of awards downloaded from the upstream fair) to the upstream fair, and can upload fair statistics. +
    • Youth Science Canada is a special type of upstream fair that uses a different communication protocol. Winners uploaded to this fair are registered for the CWSF. +
    + + + + + + + + + + +&$f) { + + $sync_text = get_last_sync($mysqli, $fid); + + + switch($f['type']) { + case 'sfiab_feeder': + case 'sfiab_upstream': + case 'old_sfiab2_feeder': + $sync_link = "href=\"#\" onclick=\"fair_sync_stats({$f['id']})\""; + break; + case 'ysc': + $sync_link = "href=\"c_ysc_stats.php\""; + break; + } + +?> + + + + + + + + + + + +
    Fair nameTypeLast Stats Sync
    + +
    + New Fair + +
    +

    Statistics Synchronization

    + SFIAB does three types of synchronization. The last two (awards and winners) are automatic. + +
    • Fair statistics (like student counts) from feeder fairs to upstream fairs +
    • External Awards from upstream fairs to feeder fairs +
    • Winners for External Awards from feeder fairs back to upstream fairs +
    + + Before generating reports with statistics from feeder fairs, they + should all be synchronized. It may take a minute or two for all feeder + fairs to respond. + + + + + + +
    + + + + + + diff --git a/c_config_logo.php b/c_config_logo.php new file mode 100644 index 00000000..709f87f4 --- /dev/null +++ b/c_config_logo.php @@ -0,0 +1,177 @@ + + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +?> +1, 'error'=>'File Upload Failed')); + exit(); + } + + if ($_FILES['image']['size'] > 5000000) { + print("File not OK1"); + exit(); + } + + $finfo = finfo_open(FILEINFO_MIME_TYPE); + $mimetype_ext = array( 'image/jpeg' => 'jpg', + 'image/png' => 'png', + 'image/gif' => 'gif' ); + + $mimetype = finfo_file($finfo, $_FILES['image']['tmp_name']); + if(!array_key_exists($mimetype, $mimetype_ext)) { + print("File not OK2"); + exit(); + } + $ext = $mimetype_ext[$mimetype]; + + /* Final check, the image size */ + $image_size = getimagesize($_FILES['image']['tmp_name']); + if(!array($image_size)) { + print("File not OK3"); + exit(); + } + + $w = $image_size[0]; + $h = $image_size[1]; + $type = $image_size[2]; + + if($w < 2 || $w > 10000 || $h < 2 || $h > 10000) { + print("File not OK4"); + exit(); + } + + switch($type) { + case IMAGETYPE_GIF: + case IMAGETYPE_JPEG: + case IMAGETYPE_PNG: + case IMAGETYPE_JPEG2000: + break; + default: + print("File not OK5"); + exit(); + } + + + $orig_logo_filename = "files/logo-original.$ext"; + move_uploaded_file($_FILES['image']['tmp_name'], $orig_logo_filename); + + /* Now turn it into a jpg of various sizes */ + $image_data = file_get_contents($orig_logo_filename); + $image = imagecreatefromstring($image_data); + + if($w != imagesx($image) || $h != imagesy($image) ) { + print("File not OK"); + exit(); + } + + + $ratio = $h / $w; + debug("Source image {$w}x{$h}, ratio=$ratio\n"); + foreach(array($w, 500, 100) as $new_w) { + $new_h = round($new_w * $ratio); + $i = imagecreate($new_w, $new_h); + imagecolorallocate($i,255,255,255); + imagecolortransparent($i,0); + imagecopyresized($i, $image, 0, 0, 0, 0, $new_w, $new_h, $w, $h); + $f = ($new_w == $w) ? "logo.jpg" : "logo-$new_w.jpg"; + imagejpeg($i, "files/$f",95); + imagedestroy($i); + } + +// print("Images Created."); +// print("
    "); + break; +} + +$page_id = "c_fair_logo"; +$help = "

    Fair Logo - upload any PNG, GIF, or JPG."; +sfiab_page_begin($u, "Fair Logo", $page_id, $help); +?> + +

    +

    Fair Logo

    +

    Upload any PNG, GIF, or JPG. It works better if it's square-ish. + The fair logo is added to all generated reports and the student + signature page.
    + + + + +

    No Fair Image detected, this means reports will be broken. + + + +

    + + + +
    + + +
    + + diff --git a/c_config_schools.php b/c_config_schools.php new file mode 100644 index 00000000..c3bc0da2 --- /dev/null +++ b/c_config_schools.php @@ -0,0 +1,167 @@ +0, 'location'=>'c_config_schools.php')); + exit(); + +case 'del': + /* Delete by id (not cid) and year just to be safe */ + $id = (int)$_POST['id']; + $mysqli->real_query("DELETE FROM schools WHERE `id`='$id' AND `year`='{$config['year']}'"); + form_ajax_response(0); + exit(); +} + +if(array_key_exists('edit', $_GET)) { + $page = 'edit'; +} else { + $page = ''; +} + +switch($page) { +case 'edit': + $id = (int)$_GET['edit']; + $page_id = 'c_config_edit_school'; + $help = '

    '; + sfiab_page_begin($u, "Edit Schools", $page_id, $help); + +?> +

    + + +

    Edit School:

    + Cancel +'; + + sfiab_page_begin($u, "Edit Schools", $page_id, $help); + +?> + + +
    + + + + + + + + + + + + +$s) { +?> + + + + + + + + + + +
    SchoolCityProvince
    +
    + Edit + Delete +
    +
    + New School + + + +
    + + + + + + diff --git a/c_config_variables.php b/c_config_variables.php new file mode 100644 index 00000000..3776b9c2 --- /dev/null +++ b/c_config_variables.php @@ -0,0 +1,152 @@ +$tz) { + $timezones[$tz] = $tz; +} + +$cfg = array(); +$q = $mysqli->query("SELECT * FROM config WHERE category!='system' ORDER BY category,`order`,var"); +while($r = $q->fetch_assoc()) { + if(!array_key_exists($r['category'], $cfg)) $cfg[$r['category']] = array(); + $cfg[$r['category']][$r['var']] = $r; +} + +$cfg_tab_names = array(); +foreach($cfg as $k=>&$v) { + $cfg_tab_names[$k] = str_replace(' ', '_', $k); + //$ksort($v); +} +//ksort($cfg); + +$action = array_key_exists('action', $_POST) ? $_POST['action'] : ''; +switch($action) { +case 'save': + $need_update_divisional = False; + /* Scan everythign that was just saved */ + foreach($_POST as $p=>$v) { + if(substr($p, 0, 4) == 'cfg_') { + $var = substr($p, 4); + $val = $mysqli->real_escape_string($v); + $mysqli->real_query("UPDATE config SET `val`='$val' WHERE `var`='$var'"); + + /* Do variable-dependent things when a variable is saved */ + switch($var) { + case 'judge_divisional_prizes': + $need_update_divisional = True; + break; + } + } + } + + /* Reload config */ + sfiab_load_config($mysqli); + + /* Do any additional updates with the new config */ + if($need_update_divisional) { + debug("config judge_divisional_prizes was saved, running award_update_divisional()\n"); + award_update_divisional($mysqli); + } + form_ajax_response(0); + exit(); +} + +$page_id = 'c_config_variables'; +$help = '

    SFIAB Configuration'; +sfiab_page_begin($u, "SFIAB Configuration", $page_id, $help); +?> + +

    + +

    Don't change these unless you know what you're doing! + +

    +
      + + +
    • + +
    + +&$v) { ?> +
    +

    +&$d) { + switch($d['type']) { + case 'yesno': + form_yesno($form_id, 'cfg_'.$d['var'], $d['var'], $d['val']); + break; + case 'timezone': + form_select($form_id, 'cfg_'.$d['var'], $d['var'], $timezones, $d['val']); + break; + case 'select': + $l = explode('|', $d['type_values']); + $opts = array(); + foreach($l as $item) { + $item_l = explode('=', $item, 2); + if(count($item_l) == 2) { + $opts[$item_l[0]] = $item_l[1]; + } else { + $opts[$item_l[0]] = $item_l[0]; + } + } +// print_r($opts); + form_select($form_id, 'cfg_'.$d['var'], $d['var'], $opts, $d['val']); + break; + + default: + form_text($form_id, 'cfg_'.$d['var'], $d['var'], $d['val']); + break; + } + } + form_submit($form_id, 'save', "Save", "Saved"); + form_end($form_id); + + ?> + +


    +

    Help

    + +&$d) { ?> + + +
    :
    + +
    + + +
    + + + + + + + diff --git a/c_conv_db.php b/c_conv_db.php new file mode 100644 index 00000000..0250ad13 --- /dev/null +++ b/c_conv_db.php @@ -0,0 +1,105 @@ + 1) { + switch($_SERVER['argv'][1]) { + case '--go': + $action = 'go'; + break; + } +} + +if(array_key_exists('SERVER_ADDR', $_SERVER)) { + /* Run from server, requires committee */ + $mysqli = sfiab_init('committee'); +} else { + /* From command line we dont' have to start a session or check the session, should probably + * prohibit this in the future */ + $mysqli = sfiab_db_connect(); + sfiab_load_config($mysqli); +} + + +$old_db = "sfiab_gvrsf"; + +/* Connect to old sfiab db */ +$mysqli_old = new mysqli($dbhost, $dbuser, $dbpassword, $old_db); + +print("
    \n");
    +
    +print("Configuration:\n");
    +print("   Old Database: $old_db\n");
    +print("   New Database: $dbdatabase\n");
    +
    +/* Figure out which years to convert */
    +$skip_years = array();
    +$q = $mysqli->query("SELECT DISTINCT(year) FROM config");
    +while($r = $q->fetch_assoc()) {
    +	$skip_years[] = (int)$r['year'];
    +}
    +
    +$years = array();
    +$q = $mysqli_old->query("SELECT DISTINCT(year) FROM config WHERE year>1");
    +while($r = $q->fetch_assoc()) {
    +	$y = (int)$r['year'];
    +	if(!in_array($y, $skip_years)) {
    +		$years[] = $y;
    +	}
    +}
    +
    +sort($years);
    +
    +print("   Will convert years: ".join(', ', $years)."\n");
    +
    +require_once('scripts/conv_db_categories.inc.php');
    +require_once('scripts/conv_db_sponsors.inc.php');
    +require_once('scripts/conv_db_awards.inc.php');
    +require_once('scripts/conv_db_schools.inc.php');
    +require_once('scripts/conv_db_tours.inc.php');
    +require_once('scripts/conv_db_students.inc.php');
    +require_once('scripts/conv_db_judges.inc.php');
    +require_once('scripts/conv_db_fairs.inc.php');
    +require_once('scripts/conv_db_reports.inc.php');
    +require_once('scripts/conv_db_emails.inc.php');
    +require_once('scripts/conv_db_volunteers.inc.php');
    +require_once('scripts/conv_db_committee.inc.php');
    +
    +if($action == 'go') {
    +
    +	load_sponsors($mysqli, $mysqli_old);
    +
    +//	conv_reports($mysqli, $mysqli_old);
    +//	conv_fairs($mysqli, $mysqli_old);
    +//	conv_emails($mysqli, $mysqli_old);
    +
    +	foreach($years as $year) {
    +		conv_categories($mysqli, $mysqli_old, $year);
    +		conv_schools($mysqli, $mysqli_old, $year);
    +		conv_tours($mysqli, $mysqli_old, $year);
    +	}
    +
    +	foreach($years as $year) {
    +		clear_sponsors($mysqli, $year);
    +		conv_awards($mysqli, $mysqli_old, $year);
    +		conv_students($mysqli, $mysqli_old, $year);
    +		conv_winners($mysqli, $mysqli_old, $year);
    +
    +		conv_judges($mysqli, $mysqli_old, $year);
    +		conv_committee($mysqli, $mysqli_old, $year);
    +		conv_volunteers($mysqli, $mysqli_old, $year);
    +	}
    +} else {
    +	print("Use '--go' if you actually want to run this.  It will DELETE EVERYTHING in your New Database for the above years and replace it all with data from the Old Database.\n");
    +}
    +
    +
    +
    +?>
    diff --git a/c_exhibithall.php b/c_exhibithall.php
    new file mode 100644
    index 00000000..0a6476a1
    --- /dev/null
    +++ b/c_exhibithall.php
    @@ -0,0 +1,208 @@
    +
    +
    +   This program is free software; you can redistribute it and/or
    +   modify it under the terms of the GNU General Public
    +   License as published by the Free Software Foundation, version 2.
    +
    +   This program is distributed in the hope that it will be useful,
    +   but WITHOUT ANY WARRANTY; without even the implied warranty of
    +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +    General Public License for more details.
    +
    +   You should have received a copy of the GNU General Public License
    +   along with this program; see the file COPYING.  If not, write to
    +   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    +   Boston, MA 02111-1307, USA.
    +*/
    +?>
    +src */
    +	$r = deg2rad(-$deg);
    +	return array(round($x*cos($r) - $y*sin($r), 6), round($x*sin($r) + $y*cos($r), 6));
    +}
    +
    +function point_translate($x, $y, $dx, $dy)
    +{
    +	return array ($x+$dx, $y+$dy);
    +}
    +
    +function is_point_in_object($x, $y, $o)
    +{
    +	/* Translate the point to the object origin */
    +	list($x, $y) = point_translate($x, $y, -$o['x'], -$o['y']);
    +	/* Rotate the point to the object's frame of reference*/
    +	list($x, $y) = point_rotate($x, $y, -$o['orientation']);
    +	/* Is it within the object now ? */
    +	if(abs($x) <= $o['w2'] && abs($y) <= $o['h2'])
    +		return true;
    +	return false;
    +}
    +
    +function queue_new()
    +{
    +	return array('head' => NULL, 'tail' => NULL);
    +}
    +
    +TRACE("
    \n");
    +
    +/* Load exhibit halls */
    +$exhibithall = array();
    +$q = $mysqli->query("SELECT * FROM exhibithall WHERE type='exhibithall'");
    +TRACE("Loading exhibit halls...\n");
    +while(($r = $q->fetch_assoc())) {
    +	$r['challenges'] = explode(',', $r['challenges']); //unserialize($r['challenges']);
    +	$r['cats'] = explode(',', $r['cats']); //unserialize($r['cats']);
    +	$exhibithall[$r['id']] = $r;
    +	TRACE("   - {$r['name']}\n");
    +}
    +
    +/* Load objects */
    +$objects = array();
    +$q = $mysqli->query("SELECT * FROM exhibithall WHERE type='wall' OR type='project'");
    +TRACE("Loading objects...\n");
    +while(($r = $q->fetch_assoc())) {
    +	$r['challenges'] = unserialize($r['challenges']);
    +	$r['cats'] = unserialize($r['cats']);
    +	$r['pid'] = 0;
    +	$objects[$r['floornumber']] = $r;
    +}
    +TRACE(count($objects)." objects loaded.\n");
    +
    +/* Compute stuff */
    +foreach($objects as $oid=>$o) {
    +	$objects[$oid]['w2'] = $o['w']/2;
    +	$objects[$oid]['h2'] = $o['h']/2;
    +}
    +
    +/* The grid size is the smallest object dimension */
    +$grid_size = 100;
    +foreach($objects as $oid=>$o) {
    +	if($grid_size > $o['w']) $grid_size = $o['w'];
    +	if($grid_size > $o['h']) $grid_size = $o['h'];
    +}
    +$grid_size /= 2;
    +TRACE("Grid size: {$grid_size}m\n");
    +
    +foreach($exhibithall as $eid=>&$eh) {
    +	$eh['grid_w'] = (int)($eh['w'] / $grid_size) + 1;
    +	$eh['grid_h'] = (int)($eh['h'] / $grid_size) + 1;
    +}
    +
    +
    +
    +//print_r($exhibithall);
    +
    +//print_r($objects);
    +
    +$challenges = challenges_load($mysqli);
    +$cats = categories_load($mysqli);
    +
    +$projects = projects_load_all($mysqli);
    +TRACE(count($projects)." projects loaded.\n");
    +
    +foreach($projects as &$p) {
    +	$objects[$p['floor_number']]['pid'] = $p['pid'];
    +
    +	project_load_students($mysqli, $p);
    +}
    +
    +
    +switch($action) {
    +case 'images':
    +	exhibithall_images();
    +	exit;
    +}
    +
    +function exhibithall_images()
    +{
    +	global $exhibithall, $objects, $projects, $challenges;
    +
    +	foreach($exhibithall as &$i_eh) {
    +
    +
    +		$i = imagecreatetruecolor($i_eh['w']*100, $i_eh['h']*100);
    +		$c_grey = imagecolorallocate($i, 128, 128, 128);
    +		$c_white = imagecolorallocate($i, 255, 255, 255);
    +		$c_black = imagecolorallocate($i, 0, 0, 0);
    +
    +		// Fill the background with the color selected above.
    +		imagefill($i, 0, 0, $c_white);
    +		imagerectangle($i, 0, 0, $i_eh['w']*100 - 1, $i_eh['h']*100 - 1, $c_black);
    +
    +		for($ix=0;$ix<=$i_eh['grid_w'];$ix++) {
    +			for($iy=0;$iy<=$i_eh['grid_h'];$iy++) {
    +//				$l = $i_eh[$ix][$iy];
    +//				if(count($l['ids']) > 0) {
    +//					imageellipse($i, $l['x']*100, $l['y']*100, 1, 1, $c_black);
    +//				} else {
    +					imageellipse($i, $ix*100, $iy*100, 1, 1, $c_grey);
    +//				}
    +			}
    +		}
    +		foreach($objects as $oid=>$o) {
    +			if($o['exhibithall_id'] != $i_eh['id']) continue;
    +			
    +
    +			list($x1,$y1) = point_rotate(-$o['w2'], -$o['h2'], $o['orientation']);
    +			list($x2,$y2) = point_rotate($o['w2'], $o['h2'], $o['orientation']);
    +			imagerectangle($i, ($o['x']+$x1)*100, ($o['y']+$y1)*100, ($o['x']+$x2)*100, ($o['y']+$y2)*100, $c_black);
    +
    +			$pid = $o['pid'];
    +			if($pid <= 0) continue;
    +
    +			$p = $projects[$o['pid']];
    +			imagestring($i, 4, $o['x']*100 - 30, $o['y']*100 - 35, "{$o['floornumber']} ({$p['pid']})", $c_black);
    +			imagestring($i, 4, $o['x']*100 - 30, $o['y']*100 - 20, "gr:{$p['students'][0]['grade']}  ", $c_black);
    +			$d = $challenges[$p['challenge_id']]['shortform'];
    +			imagestring($i, 4, $o['x']*100 - 30, $o['y']*100 - 5, "d:$d ({$p['challenge_id']})", $c_black);
    +			imagestring($i, 4, $o['x']*100 - 30, $o['y']*100 + 10, "s:{$p['students'][0]['schools_id']}", $c_black);
    +			imagestring($i, 4, $o['x']*100 - 30, $o['y']*100 + 25, "e:{$p['req_electricity']}", $c_black);
    +
    +		
    +		}
    +
    +
    +		imagepng($i, "./eh-{$i_eh['id']}.png");
    +
    +	}
    +}
    +
    +
    +
    +?>
    diff --git a/c_fairs.php b/c_fairs.php
    new file mode 100644
    index 00000000..9ef798d8
    --- /dev/null
    +++ b/c_fairs.php
    @@ -0,0 +1,95 @@
    +
    +
    +
    + + +

    Feeder/Upstream Fairs

    +

    Feeder Fairs are fairs that provide this fair with students. This fair may export awards to feeder fairs, retrieve winners for those awards, and download fair statistics. +

    Upstream Fairs are fairs that this fair can send students to. This fair can upload winners (of awards downloaded from the upstream fair) back to the upstream fair. +

    Youth Science Canada is a special type of upstream fair that uses a different communication protocol. Winners uploaded to this fair are registered for the CWSF. + + + + + + + +&$f) { + if($f['type'] == 'sfiab_feeder') { + $q = $mysqli->query("SELECT * FROM log WHERE `year`='{$config['year']}' AND `type`='sync_stats' AND `result`='1' AND fair_id='$fid' ORDER BY `time` DESC LIMIT 1"); + if($q->num_rows != 1) { + $last_sync = 'never'; + } else { + $r = $q->fetch_assoc(); + $last_sync = date("F j, Y h:ia", strtotime($r['time'])); + } + } else { + $last_sync = '--'; + } + ?> + + + + + +
    Fair NameTypeLast Stats Sync
    + + +

    Statistics Synchronization

    + SFIAB does three types of synchronization. The last two (awards and winners) are automatic. + +
    • Fair statistics (like student counts) from feeder fairs to upstream fairs +
    • External Awards from upstream fairs to feeder fairs +
    • Winners for External Awards from feeder fairs back to upstream fairs +
    + + Before generating reports with statistics from feeder fairs, they + should all be synchronized. It may take a minute or two for all feeder + fairs to respond. + + + +
    + + + diff --git a/c_input_ethics.php b/c_input_ethics.php new file mode 100644 index 00000000..a526956a --- /dev/null +++ b/c_input_ethics.php @@ -0,0 +1,222 @@ + 0) { + $p = project_load($mysqli, $pid); + $p['ethics_approved'] = 1; + project_save($mysqli, $p); + } + form_ajax_response(0); + exit(); + +case 'i': + $pid = (int)$_POST['pid']; + if($pid > 0) { + $p = project_load($mysqli, $pid); + $p['ethics_approved'] = 0; + project_save($mysqli, $p); + } + form_ajax_response(0); + exit(); + +} + +function l_projects_load_all($mysqli, $year) +{ + /* Load projects first */ + $q = $mysqli->query("SELECT * FROM projects WHERE year='$year' "); + $projects_tmp = array(); + while($p = $q->fetch_assoc()) { + $p_temp = project_load($mysqli, $p['pid'], $p); + $projects_tmp[$p['pid']] = $p_temp; + } + + $projects = array(); + /* Now match users to projects, copying projects + * into the real return array as we find them */ + $q = $mysqli->query("SELECT users.*,schools.school FROM users + LEFT JOIN schools ON users.schools_id=schools.id + WHERE users.year='$year' + AND users.enabled = '1' + AND users.new = '0' + AND FIND_IN_SET('student', users.`roles`)>0 + "); + $users = array(); + while($j = $q->fetch_assoc()) { + $p_user = user_load($mysqli, -1, -1, NULL, $j); + $pid = $p_user['s_pid']; + + if($pid == 0) { + print("No project for student uid={$p_user['uid']}
    "); + } + + if(!array_key_exists($pid, $projects)) { + $projects[$pid] = $projects_tmp[$pid]; + $projects[$pid]['students'] = array(); + $projects[$pid]['s_complete'] = true; + } + + $projects[$pid]['students'][] = $p_user; + if($p_user['s_complete'] == 0) { + $projects[$pid]['s_complete'] = false; + } + } + return $projects; +} + + +$page_id = 'c_input_ethics'; +$help = '

    There are + two buttons that may appear: Mark as Approved and Mark as NOT Approved. The Mark as + Approved button is red so you can scan through the list quickly + and find all projects that are not approved for ethics but need to be. Similarly the Mark as NOT Approved button is green + so you can find all the projects with ethics approval. When the green Mark as NOT Approved button is showing, it means the + project has been marked as having ethics approval.'; + + +sfiab_page_begin($u, "Input Ethics Approval", $page_id, $help); + +?> + + +

    + +

    Input Ethics Approvals

    + +

    Use the list below to mark projects having ethics approval. There are + two buttons that may appear: Mark as Approved and Mark as NOT Approved. The Mark as + Approved button is red so you can scan through the list quickly + and find all projects that are not approved for ethics but need to be. Similarly the Mark as NOT Approved button is green + so you can find all the projects with ethics approval. When the green Mark as NOT Approved button is showing, it means the + project has been marked as having ethics approval. + +

    + + + + + + + diff --git a/c_input_signature_forms.php b/c_input_signature_forms.php new file mode 100644 index 00000000..e9d33eb2 --- /dev/null +++ b/c_input_signature_forms.php @@ -0,0 +1,367 @@ + 0) { + $p = project_load($mysqli, $pid); + project_load_students($mysqli, $p); + + $ok = true; + foreach($p['students'] as &$u) { + /* User must be "complete" */ + if($u['s_complete'] != 1) { + $ok = false; + } + } + + if($ok == true) { + $p['accepted'] = 1; + project_save($mysqli, $p); + + foreach($p['students'] as &$u) { + $u['s_accepted'] = 1; + user_save($mysqli, $u); + } + form_ajax_response(0); + } else { + form_ajax_response(1); + } + exit(); + } + form_ajax_response(1); + exit(); + +case 'i': + $pid = (int)$_POST['pid']; + if($pid > 0) { + $p = project_load($mysqli, $pid); + project_load_students($mysqli, $p); + + $p['accepted'] = 0; + project_number_clear($mysqli, $p); + project_save($mysqli, $p); + + foreach($p['students'] as &$u) { + /* User must be "complete" */ + $u['s_accepted'] = 0; + user_save($mysqli, $u); + } + form_ajax_response(0); + exit(); + } + form_ajax_response(1); + exit(); + + +} + + +foreach($_GET as $k=>$v) { + switch($k) { + case 'roles': + $g_roles = explode(',', $v); + foreach($g_roles as $r) { + if(!array_key_exists($r, $sfiab_roles)) exit(); + $roles[] = $r; + } + $_SESSION['edit_return'] = $roles; + break; + case 'edit': + $uid = (int)$v; + $new_u = user_load($mysqli, $uid); + $_SESSION['edit_uid'] = $uid; + $_SESSION['edit_roles'] = $new_u['roles']; + $_SESSION['edit_name'] = $new_u['name']; + header("Location: ".user_homepage($new_u)); + exit(); + + case 'return': + unset($_SESSION['edit_uid']); + unset($_SESSION['edit_roles']); + unset($_SESSION['edit_name']); + $roles = $_SESSION['edit_return']; + break; + } +} + +if(count($roles) == 0) { + $roles = array('committee'); + $_SESSION['edit_return'] = $roles; + +} + + +function l_projects_load_all($mysqli, $year) +{ + /* Load projects first */ + $q = $mysqli->query("SELECT * FROM projects WHERE year='$year' "); + $projects_tmp = array(); + while($p = $q->fetch_assoc()) { + $p_temp = project_load($mysqli, $p['pid'], $p); + $projects_tmp[$p['pid']] = $p_temp; + } + + $projects = array(); + /* Now match users to projects, copying projects + * into the real return array as we find them */ + $q = $mysqli->query("SELECT users.*,schools.school FROM users + LEFT JOIN schools ON users.schools_id=schools.id + WHERE users.year='$year' + AND users.enabled = '1' + AND users.new = '0' + AND FIND_IN_SET('student', users.`roles`)>0 + "); + $users = array(); + while($j = $q->fetch_assoc()) { + $p_user = user_load($mysqli, -1, -1, NULL, $j); + $pid = $p_user['s_pid']; + + $p_user['signatures'] = array(); + $users[$p_user['uid']] = $p_user; + + if($pid == 0) { + print("No project for student uid={$p_user['uid']}
    "); + } + + if(!array_key_exists($pid, $projects)) { + $projects[$pid] = $projects_tmp[$pid]; + $projects[$pid]['students'] = array(); + $projects[$pid]['s_complete'] = true; + } + + $projects[$pid]['students'][] = &$users[$p_user['uid']]; + if($p_user['s_complete'] == 0) { + $projects[$pid]['s_complete'] = false; + } + } + + /* Do the same for signatures (doesn't matter if they're not enabled here) */ + $q = $mysqli->query("SELECT * FROM signatures WHERE year='$year' and `date_signed`!='0000-00-00 00:00:00'"); + while($s = $q->fetch_assoc()) { + $uid = $s['uid']; + $p_user = &$users[$uid]; + $p_user['signatures'][$s['type']] = $s; + } + + ksort($projects); + + return $projects; +} + + +$page_id = 'c_input_signature_forms'; +$help = '

    There are + two buttons that may appear: Mark as Complete, + and Mark as Incomplete. The Mark as + Complete button is red so you can scan through the list quickly + and find all incomplete (red) applications. Similarly the Mark as Incomplete button is green + so you can find all the complete ones. When the green Mark as Incomplete button is showing, it means the + project has been marked as complete.'; + + +sfiab_page_begin($u, "Input Signature Forms", $page_id, $help); + +?> + + +

    + +

    Input Signature Forms

    + +

    Use the list below to mark registrations as complete. There are + two buttons that may appear: Mark as Complete and Mark as Incomplete. The Mark as + Complete button is red so you can scan through the list quickly + and find all incomplete (red) applications. Similarly the Mark as Incomplete button is green + so you can find all the complete ones. When the green Mark as Incomplete button is showing, it means the + project has been marked as complete. + +

    Marking a project as Incomplete also clears the project number. If + you mark a project as incomplete, then mark it as complete again, you + will need to re-assign the project numbers. + +

    After most or all projects are complete, proceed to Assign Project Numbers. + Project numbers can be safely assigned more than once without + overwriting numbers already assigned. + + +

      + +query("SELECT * FROM payments WHERE year='{$config['year']}' AND `status`='completed' ORDER BY completed_time"); +$payment_for_user = array(); +while( ($r = $q->fetch_assoc()) ) { + $payment = payment_load($mysqli, 0, NULL, $r); + foreach($payment['payfor_uids'] as $uid) { + $payment_for_user[$uid] = $payment; + } +} + + +foreach($projects as $pid=>&$p) { + if($p['s_complete'] == false) continue; + + $filter_text = "{$p['pid']} {$p['title']}"; + $accepted = $p['students'][0]['s_accepted'] ? true : false; + $paid = $p['students'][0]['s_paid'] ? true : false; + foreach($p['students'] as &$s) { + $filter_text .= " {$s['name']} {$s['school']}"; + if($accepted != $s['s_accepted']) + $accepted = false; + if($paid != $s['s_paid']) + $paid = false; + } + + $total_paid = 0; + $all_paid = true; + foreach($p['students'] as &$s) { + if(!array_key_exists($s['uid'], $payment_for_user)) { + $all_paid = false; + continue; + } + $total_paid = $payment_for_user[$s['uid']]['amount']; + } + + list($regfee, $regitems) = compute_registration_fee($mysqli, $p, $p['students']); + + if($all_paid == false) { + $paid_colour = 'red'; + $paid = ""; + } else { + $paid_colour = 'green'; + $paid = ' (Paid)'; + } + +?> +
    • +

      Project :

      +
      +
      + +(incomplete)' : '(complete)'; +?> + + + + + + + + + +
      , Grade ,
      eSig:By on ()
      +
      + Registration Fee: $>
      + + + + + + + + + +
          PayPal on for : $(Transaction: , Receipt: )
      + + Ethics: Required but not approved
      + + +
      + +
      +
    • + +
    + + + + + + + diff --git a/c_jteam_edit.php b/c_jteam_edit.php new file mode 100644 index 00000000..aa0870e8 --- /dev/null +++ b/c_jteam_edit.php @@ -0,0 +1,696 @@ +0,'location'=>'c_jteam_edit.php')); + exit(); + +case 'jdel': + /* Remove a judge from a judging team */ + $jteam_id = (int)$_POST['jteam_id']; + $j_uid = (int)$_POST['uid']; + + $jteam = jteam_load($mysqli, $jteam_id); + + /* Need to fix this, deleting timeslot assignments can leave holds in the timeslot, we need a way to automatically fix them , + * what we need is an incremental way to build a judge timeslot schedule that doesn't depend on running the full + * timeslot scheduler */ +// $mysqli->query("DELETE FROM timeslot_assignments WHERE judging_team_id='$jteam_id' AND judge_id='$j_uid'"); + + $new_uids = array(); + foreach($jteam['user_ids'] as $uid) { + if($uid == $j_uid) continue; + $new_uids[] = $uid; + } + $jteam['user_ids'] = $new_uids; + jteam_save($mysqli, $jteam); + form_ajax_response(array('status'=>$jteam['round'])); + exit(); + +case 'jadd': + /* Add a judge to a jduging team */ + $jteam_id = (int)$_POST['jteam_id']; + $j_uid = (int)$_POST['uid']; + $jteam = jteam_load($mysqli, $jteam_id); + $jteam['user_ids'][] = $j_uid; + jteam_save($mysqli, $jteam); + /* Pass back the jteam round so the JS can setup the proper links + * and mvoe table elements around from the right unused judge list */ + form_ajax_response(array('status'=>$jteam['round'])); + exit(); + +case 'jautoadd': + + $projects = projects_load_all($mysqli); + + /* Add a best-match single free judge to a judging team */ + $jteam_id = (int)$_POST['jteam_id']; + $jteam = jteam_load($mysqli, $jteam_id); + + $j_uid = false; + + /* Build a list of divs for this jteam */ + $jteam_divs = array(); + foreach($jteam['project_ids'] as $pid) { + $p = &$projects[$pid]; + $pref = $p['isef_id']; + if($isef_divs[$pref]['parent'] != false) + $div = $isef_divs[$pref]['parent']; + else + $div = $isef_divs[$pref]['div']; + if(!array_key_exists($div, $jteam_divs)) { + $jteam_divs[$div] = 0; + } + $jteam_divs[$div] += 1; + } + + $best_matches = -1; + $best_judge_id = 0; + foreach($judges as $uid=>&$j) { + + if(!in_array($jteam['round'], $j['j_rounds'])) continue; + + if(!$j['attending'] || !$j['j_complete'] || !$j['enabled']) continue; + + /* Make sure this judge isn't assigned to a slot already */ + $q = $mysqli->query("SELECT * FROM judging_teams WHERE FIND_IN_SET('$uid',`user_ids`)>0 AND round='{$jteam['round']}'"); + if($q->num_rows > 0) { + /* Judge is already assigned in this round */ + continue; + } + + /* This judge is free in this round, see how their expertise matches */ + $matches = 0; + foreach($j['j_div_pref'] as $pref) { + if($pref > 0) { + if($isef_divs[$pref]['parent'] != false) + $d = $isef_divs[$pref]['parent']; + else + $d = $isef_divs[$pref]['div']; + if(array_key_exists($d, $jteam_divs) && $jteam_divs[$d] > 0) { + $matches += 1; + } + } + } + + if($matches > $best_matches) { + $best_matches = $matches; + $best_judge_id = $uid; + } + } + + if($best_matches > -1) { + $jteam['user_ids'][] = $best_judge_id; + jteam_save($mysqli, $jteam); + } + + form_ajax_response(array('status'=>$jteam['round'], 'info'=>$best_judge_id)); + exit(); + + +case 'pdel': + /* Remove a project from a judging team */ + $jteam_id = (int)$_POST['jteam_id']; + $del_pid = (int)$_POST['pid']; + + $jteam = jteam_load($mysqli, $jteam_id); + + $mysqli->query("DELETE FROM timeslot_assignments WHERE judging_team_id='$jteam_id' AND pid='$del_pid'"); + + $new_pids = array(); + foreach($jteam['project_ids'] as $pid) { + if($pid == $del_pid) continue; + $new_pids[] = $pid; + } + $jteam['project_ids'] = $new_pids; + jteam_save($mysqli, $jteam); + form_ajax_response(array('status'=>0)); + exit(); + +case 'padd': + /* Add a project to a jduging team */ + $jteam_id = (int)$_POST['jteam_id']; + $pid = (int)$_POST['pid']; + $jteam = jteam_load($mysqli, $jteam_id); + $jteam['project_ids'][] = $pid; + jteam_save($mysqli, $jteam); + form_ajax_response(array('status'=>0)); + exit(); + + +} + + +$projects = projects_load_all($mysqli, $config['year']); +$jteams = jteams_load_all($mysqli, $config['year']); +$rounds = timeslots_load_rounds($mysqli); + +$page_id = 'c_jteam_list'; + +$help = '

    ISEF divisions: +

      '; +foreach($isef_divs as $id=>$d) { + if($d['parent'] == false) { + $help .= '
    • '.$d['div'].' - '.$d['name'].'
    • '; + } +} +$help .= '
    '; + +sfiab_page_begin($u, "Judging Teams List", $page_id, $help); + +/* +
    */ +?> + + +
    +

    Unused Judges

    + +&$r) { + $judge_list = array(); + foreach($judges as $jid=>&$j) { + if(in_array($round, $j['j_rounds']) && $j['j_complete'] == 1 && $j['attending']) { + /* Is this judge on a jteam in ths round? */ + $found = false; + foreach($jteams as &$jteam) { + if($jteam['round'] != $round) continue; + + foreach($jteam['user_ids'] as $uid) { + if($uid == $j['uid']) { + $found = true; + break; + } + } + if($found == true) break; + } + if(!$found) { + $judge_list[] =& $j; + } + } + } +?> +
    +

    - Unused Judges

    + +
    +
    + + count($judge_list)/2 ) { +?>
    +
    +
    + +
    +
    +
    + + +

    Judging Teams

    + +
      + +&$r) { + foreach(array('Divisional','Special','Other') as $t) { + +?>
    • -

    • + + 0) { + $a =& $awards[$jteam['award_id']]; + if($t == 'Divisional' && $a['type'] != 'divisional') continue; + if($t == 'Special' && $a['type'] != 'special') continue; + if($t == 'Other' && ($a['type'] == 'divisional' || $a['type'] == 'special') ) continue; + } else { + if($t != 'Other') continue; + } + jteam_li($jteam); + } + unset($jteam); + } + } + unset($r); + + +?> + +
    + + JudgeCat Pref + Div Pref + Years + Langs + Lead? + + 0) { + if($isef_divs[$pref]['parent'] != false) + $d = $isef_divs[$pref]['parent']; + else + $d = $isef_divs[$pref]['div']; + + $div_pref .= $d.' '; + } + } + $exp = $j['j_years_regional'] + $j['j_years_national']; + } + + $langs = ''; + if(is_array($j['j_languages'])) { + if(in_array('en', $j['j_languages'])) $langs.= 'en '; + if(in_array('fr', $j['j_languages'])) $langs.= 'fr '; + } + + $lead = $j['j_willing_lead'] ? 'y' : 'n'; + + if($tr == true) { ?> + + + + + + + + + 50) $title = substr($title, 0, 47)."..."; + + $lang = $p['language']; + + if($tr == true) { ?> + + + + + + + + 0 ? $awards[$jteam['award_id']]['name'] : 'None'; +?> +
  • +

    # -

    +
    +
    + Award: :
    + Round:
    + + + +
    +
    + + + + +
    + +
    + + + + + + + + + +
    ProjectTitleCatDivLang
    INVALID PROJECT Project ID
    +
    +
    + +
  • + + + + +
    + + &$j) { + judge_row($j); + } + unset($j); + ?> +
    + + &$p) { + project_row($p); + } + unset($p); + ?> +
    +
    + + + + +
    + + + + + diff --git a/c_jteam_edit_jteam.php b/c_jteam_edit_jteam.php new file mode 100644 index 00000000..5749e01e --- /dev/null +++ b/c_jteam_edit_jteam.php @@ -0,0 +1,74 @@ +0, 'location'=>'c_jteam_edit.php')); + exit(); +} + +$help = ' +
    • +
    '; + +sfiab_page_begin($u, "Edit Jteam", $page_id, $help); + +?> + + +
    + + + + +
    + + + + + + diff --git a/c_judge_sanity.php b/c_judge_sanity.php new file mode 100644 index 00000000..961e50f6 --- /dev/null +++ b/c_judge_sanity.php @@ -0,0 +1,204 @@ +$round0_div_jteam_count Round 1 Divisional Judging Teams have enough judges to judge each project {$config['div_times_each_project_judged']} times"); +} else { + $notices['Judging Teams']['r1div_judges'] = array("OK All $round0_div_jteam_count Round 1 Divisional Judging Teams have {$config['div_times_each_project_judged']} judges"); +} + +$num_timeslots = count($timeslots); +if($num_timeslots > 1) { + $notices['Judging Teams']['r2div_judges'] = array("OK All $round1_div_jteam_count Round 2 Divisional (Cusp) Judging Teams have {$config['judge_cusp_max_team']} judges"); +} +$notices['Judging Teams']['bad_projects'] = array("OK Projects assigned to all Judging Teams are accepted and exist"); +$notices['Judging Teams']['sa_judges'] = array("OK All Special Award Judging Teams have (at most) {$config['judge_sa_max_projects']} projects per judge"); + +foreach($jteams as &$jteam) { + + if($config['judge_div_shuffle']) { + $judges_required = (int)((count($jteam['project_ids']) * $config['div_times_each_project_judged']) / $num_timeslots) + 1; + } else { + $judges_required = $config['div_times_each_project_judged']; + } + + if($jteam['round'] == 0 && $awards[$jteam['award_id']]['type'] == 'divisional') { + $c = count($jteam['user_ids']); + /* round1 divisional */ + if($c < $config['div_times_each_project_judged']) { + $notices['Judging Teams']['r1div_judges'][] = "NO Round 1 Divisional Judging Team {$jteam['name']} has $c judges, but needs $judges_required so that each project can be judged {$config['div_times_each_project_judged']} times"; + } + } + if($jteam['round'] == 1 && $awards[$jteam['award_id']]['type'] == 'divisional') { + $c = count($jteam['user_ids']); + /* round1 divisional */ + if($c < $config['judge_cusp_max_team']) { + $notices['Judging Teams']['r2div_judges'][] = "NO Round 2 Divisional (Cusp) Judging Team {$jteam['name']} has $c judges. Not {$config['judge_cusp_max_team']}"; + } + } + /* Make sure all projects exist */ + foreach($jteam['project_ids'] as $pid) { + if(!array_key_exists($pid, $projects)) { + $notices['Judging Teams']['bad_projects'][] = "ER Judging {$jteam['name']} is assigned (pid:$pid), but it doesn't exist. Project deleted or not accepted?"; + } + } + + if($awards[$jteam['award_id']]['type'] == 'special') { + $c = count($jteam['user_ids']); + $p = count($jteam['project_ids']); + if($c * (int)$config['judge_sa_max_projects'] < $p) { + $notices['Judging Teams']['sa_judges'][] = "NO Special Award Judging Team {$jteam['name']} has $c judges and $p projects. More than {$config['judge_sa_max_projects']} projects per judge"; + } + } +} + +$notices['Awards'] = array(); +$notices['Awards']['all_sa'] = array("OK All Special Awards Marked as 'Schedule Judges' have a Judging Team"); +foreach($awards as &$award) { + if($award['type'] == 'special' && $award['schedule_judges'] == 1) { + /* Find the judging team */ + $found = false; + foreach($jteams as &$jteam) { + if($jteam['award_id'] == $award['id']) { + $found = true; + break; + } + } + if($found == false) { + $notices['Awards']['all_sa'][] = "ER Award {$award['name']} is marked 'Schedule Judges', but has no Judging Team"; + } + } +} + +$num_projects = count($projects); + +$notices['Projects'] = array(); +$notices['Projects']['r1assigned'] = array("OK All $num_projects projects have a Round 1 Divisional judging team"); +$notices['Projects']['unavailable'] = array("OK No Projects have restricted timeslot availability requirements"); +$notices['Projects']['disqualified_from_awards'] = array("OK No Projects have been disqualifed from winning awards"); +foreach($projects as $pid=>&$p) { + /* Check that each project is judged in round 1 */ + $found = false; + foreach($jteams as &$jteam) { + if($jteam['round'] == 0 && $awards[$jteam['award_id']]['type'] == 'divisional') { + if(in_array($pid, $jteam['project_ids'])) { + $found = true; + break; + } + } + } + if(!$found) { + $notices['Projects']['r1assigned'][] = "ER Project (id:$pid) \"{$p['number']}\" is not assigned to a Round 1 Judging Team."; + } + + /* Info notices for timeslot execptions */ + if(count($p['unavailable_timeslots'])) { + $notices['Projects']['unavailable'][] = "IN Project (id:$pid) \"{$p['number']}\" has been marked as unavailabled in the following timeslots: ".join(',', $p['unavailable_timeslots']); + } + + if($p['disqualified_from_awards']) { + $notices['Projects']['disqualified_from_awards'][] = "IN Project (id:$pid) \"{$p['number']}\" has been marked as Disqualified From Awards"; + } + +} + + +?> + + +
    + + + +

    Judging Sanity Checks

    +
      +$ns) { ?> +
    • +$n) { + if(count($n) == 1) { + $ns_to_display = $n; + } else{ + $ns_to_display = array_slice($n, 1); + } + foreach($ns_to_display as $txt) { + $n_type = substr($txt, 0, 2); + + print("
    • "); + switch(substr($txt, 0, 2)) { + case 'OK': + print("OK:"); + break; + case 'NO': + print("Notice:"); + break; + case 'ER': + print("ERROR:"); + break; + case 'IN': + print("Info:"); + break; + } + print(substr($txt, 2)); + print("
    • "); + } + } + } ?> +
    + +
    + + + diff --git a/c_judge_scheduler.php b/c_judge_scheduler.php new file mode 100644 index 00000000..956720f7 --- /dev/null +++ b/c_judge_scheduler.php @@ -0,0 +1,195 @@ +query("SELECT `id` FROM log WHERE `type`='judge_scheduler' AND `result`='1' AND `year`='{$config['year']}' ORDER BY `id` DESC LIMIT 1"); + if($q->num_rows != 1) { + $r['running'] = false; + $r['messages'] = ""; + $r['percent'] = 0; + } else { + $d = $q->fetch_assoc(); + + /* Get all messages */ + $r['running'] = true; + $r['messages'] = ''; + $q = $mysqli->query("SELECT * FROM log WHERE `id`>='{$d['id']}' AND `type`='judge_scheduler' AND year='{$config['year']}' ORDER BY `id`"); + while($d = $q->fetch_assoc()) { + $r['messages'] .= $d['data']."
    "; + $r['percent'] = $d['result']; + if($d['result'] == 100) { + $r['running'] = false; + } + } + } + /* Get data from most recent run of the scheduler from the log */ + + print(json_encode($r)); + exit(); + +case 'run': + sfiab_log($mysqli, "judge_scheduler", $u, 1, "Initializing..."); + $mysqli->real_query("INSERT INTO queue(`command`,`result`) VALUES('judge_scheduler','queued')"); + queue_start($mysqli); + form_ajax_response(array('status'=>0, )); + exit(); + +case 'run_ts': + sfiab_log($mysqli, "judge_scheduler", $u, 1, "Initializing..."); + $mysqli->real_query("INSERT INTO queue(`command`,`result`) VALUES('timeslot_scheduler','queued')"); + queue_start($mysqli); + form_ajax_response(array('status'=>0, )); + exit(); + +} + +sfiab_page_begin($u, "Judge Scheduler", $page_id); + +$timeslots = timeslots_load_all($mysqli); +?> + + +
    + +

    Judge Scheduler Settings

    +

    These settings can be changed on the Configuration Variables - Judge Scheduler + and Timeslots pages. + + + +query("SELECT * FROM config WHERE category='Judge Scheduler' ORDER BY `order`,var"); + while($r = $q->fetch_assoc()) { + if($r['var'] == 'judge_divisional_prizes' || $r['var'] == 'judge_divisional_distribution') { + continue; + } ?> + + + + + +
    Divisional Prizes and Distribution + + - %
    + +
    Timeslots + + + + + +
    - - - timeslots of minutes each.
    +
    + +


    +

    Run The Scheduler

    +

    The judge scheduler takes about one minute to run. It will: +

    • Delete all automatically created judging teams (e.g., from a previous run of this scheduler), manually created judging teams are not touched. +
    • Create new judging teams for divisional, CUSP, and every special award marked as "schedule judges" +
    • Assign judges to teams +
    • Assign projects to divisional teams and special awards teams +
    • Assign projects to specific judges for divisional teams +
    • Create a judging schedule for each judging team and project (printable on the reports page) +
    +

    Additional help is is available: Judge Scheduler Documentation + + + +


    +

    Scheduler Status

    + + + +
    Status:
    Output:
    + +

    The complete output log is available here: Judge Scheduler Log + + + +

    + + + + + diff --git a/c_judge_score_entry.php b/c_judge_score_entry.php new file mode 100644 index 00000000..cd714dd0 --- /dev/null +++ b/c_judge_score_entry.php @@ -0,0 +1,267 @@ +&$project) { + $q = $mysqli->query("SELECT * FROM judging_scores WHERE pid='$pid'"); + if($q->num_rows == 0) { + $scores[$pid] = array('scientific'=>'', 'originality'=>'', 'communication'=>'', 'total'=>0); + } else { + $scores[$pid] = $q->fetch_assoc(); + filter_int($scores[$pid]['scientific']); + filter_int($scores[$pid]['originality']); + filter_int($scores[$pid]['communication']); + + $map = array(0=> '', 1=>'1L', 2=>'1M', 3=>'1H', + 4=>'2L', 5=>'2M', 6=>'2H', + 7=>'3L', 8=>'3M', 9=>'3H', + 10=>'4L', 11=>'4M', 12=>'4H'); + + $scores[$pid]['scientific'] = $map[$scores[$pid]['scientific']]; + $scores[$pid]['originality'] = $map[$scores[$pid]['originality']]; + $scores[$pid]['communication'] = $map[$scores[$pid]['communication']]; + } +} + + + +function check_score($score) +{ + $int_score = 0; + if(strlen($score) != 2) return NULL; + + $n = (int)substr($score, 0, 1); + $lmh = strtolower(substr($score, 1, 1)); + + if($n < 1 || $n > 4) return NULL; + switch($lmh) { + case 'l': $x = 1; break; + case 'm': $x = 2; break; + case 'h': $x = 3; break; + default: + return NULL; + } + + /* map to 1L=1, 1M=2, ... 4H=12 */ + $int_score = ($n - 1) * 3 + $x; + return $int_score; +} + + +switch($action) { +case 'save': + /* Add a project to a prize */ + $pid = (int)$_POST['pid']; + + $sc = ''; + $or = ''; + $co = ''; + post_text($sc, 'scientific'); + post_text($or, 'originality'); + post_text($co, 'communication'); + + if($sc == '' && $or == '' && $co == '') { + $mysqli->query("DELETE FROM judging_scores WHERE pid='$pid'"); + form_ajax_response(array('status'=>0, 'val'=>array('total'=>"--"))); + exit(); + } + + + /* Error check */ + $scientific = check_score($sc); + $originality = check_score($or); + $communication = check_score($co); + + if($scientific === NULL || $originality === NULL || $communication === NULL) { + form_ajax_response(1); + return; + } + + $total = ($scientific * 3) + ($originality * 2) + ($communication * 1); + + /* Does it exist? */ + $q = $mysqli->query("SELECT * FROM judging_scores WHERE pid='$pid'"); + if($q->num_rows != 1) { + $mysqli->query("DELETE FROM judging_scores WHERE pid='$pid'"); + $mysqli->query("INSERT INTO judging_scores (`pid`,`scientific`,`originality`,`communication`,`total`) VALUES('$pid','0','0','0','0')"); + + } + $mysqli->query("UPDATE judging_scores SET `scientific`='$scientific',`originality`='$originality', + `communication`='$communication',`total`='$total' WHERE pid='$pid'"); + + form_ajax_response(array('status'=>0, 'val'=>array('total'=>"$total"))); + exit(); +} + +$page_id = 'c_judge_score_entry'; +$help = '

    Enter Judging Scores'; +sfiab_page_begin($u, "Enter Judging Scores", $page_id, $help); +?> + + +

    + +

    You can search by judging team number using #number. e.g., #6 for judging team 6. +

    You can reload this page to force a search cache update and search for "missing" to see all the projects with no scores yet + +

      +&$project) { + $filter_text = $project['title'].' '.$project['number']; + $form_id = $page_id.'_'.$pid; + + if(!array_key_exists('round_1_jteam', $project)) { + print("coulnd't find round 1 jteam for project: ".print_r($project)); + continue; + } + $jteam = &$project['round_1_jteam']; + $filter_text .= ' #'.$jteam['num']; +?> +
    • +

      -

      + + + + + + + + +
      + -
      +
      + + + -- + + + + + + + + + + + + + +
      + +
    • + +
    + +
    + + + + + diff --git a/c_judge_score_summary.php b/c_judge_score_summary.php new file mode 100644 index 00000000..4e668868 --- /dev/null +++ b/c_judge_score_summary.php @@ -0,0 +1,518 @@ +&$project) { + $q = $mysqli->query("SELECT * FROM judging_scores WHERE pid='$pid'"); + if($q->num_rows == 0) { + $scores[$pid] = array('scientific'=>'', 'originality'=>'', 'communication'=>'', 'total'=>0); + } else { + $scores[$pid] = $q->fetch_assoc(); + filter_int($scores[$pid]['scientific']); + filter_int($scores[$pid]['originality']); + filter_int($scores[$pid]['communication']); + + $map = array(0=> '', 1=>'1L', 2=>'1M', 3=>'1H', + 4=>'2L', 5=>'2M', 6=>'2H', + 7=>'3L', 8=>'3M', 9=>'3H', + 10=>'4L', 11=>'4M', 12=>'4H'); + + $scores[$pid]['scientific'] = $map[$scores[$pid]['scientific']]; + $scores[$pid]['originality'] = $map[$scores[$pid]['originality']]; + $scores[$pid]['communication'] = $map[$scores[$pid]['communication']]; + } + $project['jscore'] = $scores[$pid]; +} + +/* Sort projects by cat and then score */ +$projects_sorted = array(); +foreach($cats as $cid=>$c) { + $projects_sorted[$cid] = array(); +} + +foreach($projects as $pid=>&$project) { + $projects_sorted[$project['cat_id']][$pid] = &$project; + $project['cusp_index'] = count($cusp_sections)-1; /* Start at 'nothing' */ + + if(!array_key_exists('cat_id', $project)) { + print("
    cat id is missing from project $pid: ".print_r($project, true));
    +	}
    +}
    +function score_cmp($a, $b) {
    +	return (int)$b['jscore']['total'] - (int)$a['jscore']['total'];
    +}
    +
    +/* Reindex array so the highest score is at index 0 */
    +foreach($cats as $cid=>$c) {
    +	uasort($projects_sorted[$cid], 'score_cmp');
    +
    +	$n = array();
    +	$i = 0;
    +	foreach($projects_sorted[$cid] as $pid=>&$p) {
    +		$n[$i] = &$p;
    +		$i++;
    +	}
    +	$projects_sorted[$cid] = $n;
    +}
    +
    +/* Desired number of projects at each index, adjusted for cusp teams */
    +$target_projects_at_cusp = array();
    +/* Actual number of projects at each inded */
    +$n_projects_at_cusp = array();
    +/* Medal distribution (even indexes), and the number of projects that are assined up to the previous index (odd indexes)
    + *  actual number[odd index] - medal distribution[odd index] = number of projects to assign down to the next index */
    +$medal_distribution = array();
    +
    +/* Sort out which projects get what */
    +foreach($cats as $cid=>$c) {
    +	$total_projects = count($projects_sorted[$cid]);
    +
    +	debug("\n".$c['name']."- $total_projects projects \n");
    +
    +	$n_projects_at_cusp[$cid] = array_fill(0, count($config['judge_divisional_distribution'])*2, 0);
    +	$target_projects_at_cusp[$cid] = array_fill(0, count($config['judge_divisional_distribution'])*2, 0);
    +	$medal_distribution[$cid] = array_fill(0, count($config['judge_divisional_distribution'])*2, 0);
    +	/* Build an array of fractions for each div award and cusp team 
    +	 * even indexes = div award (not rejudged)
    +	 * odd indexes = cusp team (rejudged) */
    +
    +	$half_projects_per_cusp = (int)($config['projects_per_cusp'] / 2);
    +	$index = 0;
    +	foreach($config['judge_divisional_distribution'] as $c) {
    +		$c /= 100;
    +		$n = (int)round($c * $total_projects);
    +		$medal_distribution[$cid][$index] = $n;
    +		/* Each cusp has 3 parts:
    +		 * - top $config['projects_per_cusp']/2 projects that are assigned to [$index - 1] (unless $index=0)
    +		 * - middle $n - $config['projects_per_cusp'] that are assigned to [$index]
    +		 * - bottom $config['projects_per_cusp']/2 projects that are assigned to [$index + 1]
    +		 * We are not allowed to distribute more than $n projects, top and bottom are split
    +		 *  evenly (ties to bottom), the middle could be zero 
    +		 * By calculating the split this way, the CUSP judging teams can just assign 
    +		 *  half the projects to the div above, and half to the div below.  Although that will
    +		 *  change below */
    +
    +		/* There is no cusp above gold (index == 0) so just remove the top cusp/2 projects completely */
    +		$top = ($index == 0) ? 0 : $half_projects_per_cusp;
    +		$bot = $half_projects_per_cusp;
    +
    +		if($top + $bot > $n) {
    +			/* If there are more cusp projects for judging than actual projects in this cusp
    +			 * recalculate top/bot as a ratio of the projects that are available.
    +			 *  This either computes a 50/50 split, or a 0/100 if top==0, but it is written to
    +			 *  handle any ratio */
    +			$top = (int)($n * ($top / ($top + $bot) ));
    +			$bot = $n - $top;
    +			$mid = 0;
    +		} else {
    +			/* There are enough projects for a 3-way split, so assign mid whatever is left */
    +			$mid = $n - ($top + $bot);
    +		}
    +
    +		/* Add top, mid, bot to the right project target counts */
    +		if($index > 0) 	$target_projects_at_cusp[$cid][$index - 1] += $top;
    +		$target_projects_at_cusp[$cid][$index] += $mid;
    +		$target_projects_at_cusp[$cid][$index + 1] += $bot;
    +		$index += 2;
    +	}
    +	/* Add another half to the projects at the last cusp so the HM-nothing cusp doesn't get a target 
    +	 * of just three projects, want it to be six */
    +	$target_projects_at_cusp[$cid][$index-1] += $half_projects_per_cusp;
    +
    +	debug("CUSP: target project counts:\n");
    +	for($index=0; $index $target_n?\n");
    +				/* Div section */
    +				if($n_projects_at_cusp[$cid][$index] + $n_to_add > $target_n) {
    +					/* Won't fit */
    +					debug("CUSP         add to next index\n");
    +					$add_to_index = $index + 1;
    +					$force_change_index = true;
    +				} else {
    +					debug("CUSP         add to current index\n");
    +					$add_to_index = $index;
    +				}
    +			} else {
    +				/* Current index is a cusp team */
    +				$add_to_index = $index;
    +			}
    +
    +			/* Add it */
    +			for($j = $p_start; $j <= $p_end; $j++) {
    +				$projects_sorted[$cid][$j]['cusp_index'] = $add_to_index;
    +			}
    +			$n_projects_at_cusp[$cid][$add_to_index] += $n_to_add;
    +			$total_n += $n_to_add;
    +
    +			/* Adjust the next start and reset the score */
    +			$p_start = $project_index + 1;
    +			$current_jscore = -1;
    +
    +			debug("CUSP:      cusp[{$cusp_sections[$index]}] now has {$n_projects_at_cusp[$cid][$index]}/{$target_n} projects\n");
    +			/* Stop adding to this index if it's now full */
    +			if($force_change_index || $n_projects_at_cusp[$cid][$index] >= $target_n) {
    +				break;
    +			}
    +		}
    +	}
    +
    +	/* Calculate the up/down just for printing */
    +	for($index=0; $index&$a) {
    +		if($a['type'] == 'divisional' && in_array($cid, $a['categories'])) {
    +			$award = &$a;
    +			break;
    +		}
    +	}
    +
    +	debug("Assign projects for CUSP category $cid:{$cats[$cid]['name']}\n");
    +
    +	if($award === NULL) {
    +		print("Error, couldn't find divisional award");
    +		debug("   Error: Couldn't find divisional award.\n");
    +		exit();
    +	}
    +		
    +	/* Ensure it only has one categroy */
    +	if(count($award['categories']) != 1) {
    +		print("Error, turn on debug.");
    +		debug("   Error:Divisional Award has more than one category\n");
    +		exit();
    +	}
    +
    +	debug("   Found divisional award {$award['id']}:{$award['name']}\n");
    +	/* Now iterate over the prizes find the jteam for each prize, and assign projects.
    +	 * Start at the last index above 'nothing' and work backwards.  The prizes_in_order
    +	 * are HM -> gold */
    +	$match_cusp_index = count($cusp_sections)-2;
    +	foreach($award['prizes_in_order'] as &$prize) {
    +
    +		unset($jteam);
    +		$jteam = NULL;
    +		foreach($jteams as $jteam_id=>&$jt) {
    +			if($jt['prize_id'] == $prize['id']) {
    +				$jteam = &$jt;
    +				break;
    +			}
    +		}
    +		debug("   Processing prize {$prize['id']}:{$prize['name']}\n");
    +
    +		if($jteam === NULL) {
    +			print("Coudln't find jteam");
    +			debug("   Couldn't find jteam for prize\n");
    +			exit();
    +		}
    +
    +		debug("   Found jteam {$jteam['id']}:{$jteam['name']}\n");
    +
    +		/* Delete projects on all cusp teams for $cid */
    +		$jteam['project_ids'] = array();
    +
    +		/* Assign new projects */
    +		foreach($projects_sorted[$cid] as $index=>&$project) {
    +			if($project['cusp_index'] == $match_cusp_index) {
    +				$jteam['project_ids'][] = $project['pid'];
    +			}
    +		}
    +		debug("   Added projects: ".join(',', $jteam['project_ids'])."\n");
    +
    +		/* Also record the number of cusp up projects (those that get this prize), all other projects
    +		 * get the next prize down */
    +		$up = $medal_distribution[$cid][$match_cusp_index];
    +		$down = $n_projects_at_cusp[$cid][$match_cusp_index] - $up;
    +		debug("   Award distribution up=$up, down=$down\n");
    +		if($up + $down != count($jteam['project_ids'])) {
    +			print("Error, turn on debug");
    +			debug("   Prize has $up up + $down down != ".count($jteam['project_ids'])." project ids which were added\n");
    +			exit();
    +		}
    +
    +		$jteam['cusp_n_up'] = $up;
    +
    +		/* Increment to next cusp index */
    +		$match_cusp_index -= 2;
    +
    +		jteam_save($mysqli, $jteam);
    +	}
    +
    +	form_ajax_response(array('status'=>0));
    +	exit();
    +}
    +
    +
    +$page_id = 'c_judge_score_summary';
    +$help = '

    Judging Scores Summary'; +sfiab_page_begin($u, "Judging Scores Summary", $page_id, $help); +?> + + +

    + + + + +

    Using the following medal distributions: +

      + +
    • : % + +
    + +

    Choose a category below, review the Cusp projects, then assign the projects to Cusp judging teams. +


    + +
    +
    +
      +$c) { ?> +
    • + +
    +
    + +$c) { + $current_section = -1; + $x = 0; +?> +
    + + +

    Medal Allocations: +

      + +
    • : project(s) + +
    + + + + + + + + + + + + + +&$project) { + $x++; + if($current_section != $project['cusp_index']) { + $index = $project['cusp_index']; + $current_section = $index; ?> + + + + + + + + + + + + + +
    RankNumberProjectSciOrgCommTotal

    +Assign $up {$plist[($index-1)/2]}, $down {$plist[($index+1)/2]}"); + + } + + if($project['cusp_index'] < count($cusp_sections)-1) { + print(" - target: {$n_projects_at_cusp[$cid][$index]} / {$target_projects_at_cusp[$cid][$index]} project(s)"); + } + + + ?> +
    +
    + +
    + +
    + + + diff --git a/c_judging.php b/c_judging.php new file mode 100644 index 00000000..79ebd44d --- /dev/null +++ b/c_judging.php @@ -0,0 +1,170 @@ + + +
    + +0, 'special'=>0); + $jteam_judge_count[$r] = array('divisional'=>0, 'special'=>0); + $judges_used_in_round[$r] = array(); + $unused_judge_count[$r] = 0; + } + + foreach($judges as &$j) { + if($j['attending'] == 0) { + $j_not_attending++; + } else { + if($j['j_complete']) { + $all = true; + foreach($j['j_rounds'] as $r) { + if($r >= $num_rounds) { + continue; + } + if($r === NULL || $r == -1) { + $all = false; + continue; + } + $j_round[$r] += 1; + } + if($all) $j_round_all += 1; + $j_complete += 1; + } else { + $j_incomplete += 1; + } + } + } + + + foreach($jteams as &$jteam) { + $round = $jteam['round']; + + if($round >= $num_rounds) { + /* Can create teams for rounds that don't exist, like cusp teams */ + continue; + } + + $n_judges = count($jteam['user_ids']); + if($jteam['award_id'] < 1) { + $type = 'special'; + } else { + $type = $awards[$jteam['award_id']]['type']; + if($type == 'grand' || $type == 'other') $type = 'special'; + } + + $jteam_count[$round][$type] += 1; + $jteam_judge_count[$round][$type] += $n_judges; + + $judges_used_in_round[$round] = array_merge($judges_used_in_round[$round], $jteam['user_ids']); + } + + /* Count unused judges */ + foreach($judges as &$j) { + for($r=0; $r<$num_rounds; $r++) { + if(in_array($r, $j['j_rounds']) && !in_array($j['uid'], $judges_used_in_round[$r])) { + $unused_judge_count[$r]+=1; + } + } + } + + $timeslot_msg = ''; + if($num_rounds == 0) { + $timeslot_msg = "
    ERROR: There are 0 judging rounds defined"; + } + +?> +

    Stats

    + +
    + + +&$t) { + $r = $t['round']; ?> + + + + +
    Complete Judges
    All
    Total
    +
    + + + + +
    Incomplete Judges
    Incomplete
    Not Attending
    +
    + + + +&$t) { + $r = $t['round']; ?> + + + +
    Judging Teams
    DivisionalSpecialUnused
    Teams
    Judges
    + +
    + + +

    Judges

    + + + +

    Judging Assignments

    + + +

    Judge Score Entry

    +
    + + + diff --git a/c_judging_list.php b/c_judging_list.php new file mode 100644 index 00000000..c4a2c760 --- /dev/null +++ b/c_judging_list.php @@ -0,0 +1,59 @@ + + + +
    + +Work in progress... + + + + + + diff --git a/c_main.php b/c_main.php new file mode 100644 index 00000000..ea33c5a8 --- /dev/null +++ b/c_main.php @@ -0,0 +1,127 @@ +
  • nothing - no help yet. +'; + +sfiab_page_begin($u, "Committee Main", 'c_main', $help); + + +?> + +
    + +

    Hello

    + + 0) { + $pending_actions['c_register_feeder.php'] = "".count($new_users)." students from feeder fairs have not been sent a registration email, click here to send them"; + } + + $now = date( 'Y-m-d H:i:s' ); + if($now > $config['date_fair_ends']) { + /* Have stats been sent to YSC? */ + } + + + + if($config['tours_enable']) { + $users = students_load_all($mysqli); + $num_accepted = 0; + $students_accepted_without_tour = sanity_get_accepted_students_without_tour($mysqli, $users, $num_accepted); + $students_not_accepted_with_tour = sanity_get_not_accepted_students_with_tour($mysqli, $users); + + if(count($students_not_accepted_with_tour) > 0 || count($students_accepted_without_tour) > 0) { + $str = ''; + if(count($students_not_accepted_with_tour) > 0) { + $str .= "".count($students_not_accepted_with_tour)." not accepted students are assigned to a tour."; + } + if(count($students_accepted_without_tour) > 0) { + $str .= "".count($students_accepted_without_tour)." / $num_accepted accepted students have not been assigned a tour"; + } + $pending_actions['c_check_tours.php'] = $str; + } + } + + if(count($pending_actions) > 0) { ?> +

    Pending Actions

    +
      +$text) { ?> +
    • + +
    +Closed'; + break; + + case 1: /* Open */ + $str = 'Open'; + $str .= ", closes on ".date('F d, Y', strtotime($config['date_'.$type.'_registration_closes'])); + break; + + case 2: /* Open in prereg, add when it opens for real */ + $str = 'Pre-Registration'; + $str .= ", opens on ".date('F d, Y', strtotime($config['date_student_registration_opens'])); + break; + + case -2: /* Not open yet */ + $str = 'Not Open Yet'; + if($type == 'student' && $config['preregistration_enable']) { + $str .= ", pre-registration opens on ".date('F d, Y', strtotime($config['date_student_preregistration_opens'])); + } else { + $str .= ", opens on ".date('F d, Y', strtotime($config['date_'.$type.'_registration_opens'])); + } + break; + } + + return $str; +} + ?> + +

    Sanity Checks

    + + +

    Committee Members

    + + +
    + + diff --git a/c_register_feeder.php b/c_register_feeder.php new file mode 100644 index 00000000..bf8d8980 --- /dev/null +++ b/c_register_feeder.php @@ -0,0 +1,191 @@ + +'; + +sfiab_page_begin($u, "Register Participants from Feeder Fairs", $page_id, $help); + +function get_new_users_for_prize($mysqli, &$all_users, &$award, &$prize) +{ + $users = array(); + $winning_projects = prize_load_winners($mysqli, $prize, false); + foreach($all_users as $uid=>&$user) { + if(array_key_exists($user['s_pid'], $winning_projects)) { + $users[$uid] = $user; + } + } + return $users; +} + +function get_new_users_for_fair($mysqli, &$all_users, &$fair) +{ + $users = array(); + foreach($all_users as $uid=>&$user) { + if($user['fair_id'] == $fair['id']) { + $users[$uid] = $user; + } + } + return $users; +} + +?> + + +
    + + 0) { + $award = award_load($mysqli, $award_id); + $send_list = get_new_users_for_prize($mysqli, $new_users, $award, $award['prizes'][$prize_id]); + } + break; + +case 'send_by_fair': + $fair_id = (int)$_POST['fair_id']; + if($fair_id > 0) { + $fair = fair_load($mysqli, $fair_id); + $send_list = get_new_users_for_fair($mysqli, $new_users, $fair); + } + break; +} + + +if(count($send_list) > 0) { + debug("Sending feeder fair welcome emails to ".count($send_list)." users\n"); + foreach($send_list as $uid=>&$user) { + email_send_welcome_email($mysqli, $user); + } +?> +

    + emails were just sent. It may take a few moments for to determine if they were sent successfully or not. Try refreshing this page in a minute or two +&$a) { + if($a['upstream_register_winners']) { + $feeder_awards[$aid] = $a; + } +} + +form_page_begin($page_id, array()); +?> +

    Send Feeder Fair Welcome Emails

    + +When Feeder Fairs upload winners to this fair for an award marked as +"register participants at this fair", accounts are created for all +winners with random passwords. The final step is to send a welcome +email to all winners of such awards. + +

    All Participants Needing Welcome Email

    + + +

    By Award

    + + +&$a) { + /* Count users */ + foreach($a['prizes'] as $prize_id=>&$prize) { + $users = get_new_users_for_prize($mysqli, $new_users, $award, $prize); +?> + + + + + + +&$fair) { + + if($fair['type'] != 'sfiab_feeder') { + continue; + } + $users = get_new_users_for_fair($mysqli, $new_users, $fair); +?> + + + + + + +&$user) { + $fair = $fairs[$user['fair_id']]; +?> + + + + + + +
    Award#Needing Welcome Email
    - + +
    +

    By Feeder Fair

    +
    Fair#Needing Welcome Email
    + +
    +

    Individually

    +
    Fair/AwardName/Email

    + + + +
    + + diff --git a/c_reports.php b/c_reports.php new file mode 100644 index 00000000..b2d70bc3 --- /dev/null +++ b/c_reports.php @@ -0,0 +1,227 @@ +Download Reports'; + +$action = ''; +if(array_key_exists('action', $_GET)) { + $action = $_GET['action']; +} +if(array_key_exists('action', $_POST)) { + $action = $_POST['action']; +} + +switch($action) { +case 'get_options': + $rid = (int)$_POST['rid']; + $r = report_load($mysqli, $rid); + + $vals = array(); + $vals['format'] = $r['format']; + $vals['include_registrations'] = $r['include_registrations']; + $vals['test'] = time(NULL); + + form_ajax_response(array('status'=>0, 'val'=>$vals)); + exit(); + + +case 'download': + $rid = (int)$_GET['rid']; + $r = report_load($mysqli, $rid); + /* Add report overrides */ + $include_registrations = $_GET['include_registrations']; + if(array_key_exists($include_registrations, $report_options['include_registrations']['values'])) { + $r['include_registrations'] = $include_registrations; + } + + $year = (int)$_GET['year']; + $r['year'] = $year; + + if(array_key_exists($_GET['format'], $report_options['format']['values'])) { + $r['format'] = $_GET['format']; + } + + report_gen($mysqli, $r); + exit(); +} + +sfiab_page_begin($u, "Download Reports", $page_id, $help); + +$q = $mysqli->query("SELECT MIN(year) AS M FROM users"); +$u = $q->fetch_assoc(); +$min_year = $u['M']; + +$timeslots = timeslots_load_rounds($mysqli); + + +?> +
    +

    Download Reports

    + +
    + +$v) { + $options[$o] = $v['default']; + } + $options['year'] = (int)$config['year']; + +?> +
    +

    Report Options

    += $min_year; $x--) { + $years[(int)$x] = $x; + } + form_radio_h($form_id, 'year', "Year", $years, $options); + form_radio_h($form_id, 'format', "Report Format", $report_options['format']['values'], $options); + form_select($form_id, 'include_registrations', "Include Registrations", $report_options['include_registrations']['values'], $options); + $t = ''; + form_text($form_id, 'test', "test", $t); +?> +
    + + +

    Award Ceremony Scripts

    + + + + + + + + +
    Junior Awards Ceremony: + +
    Int+Senior Awards Ceremony: + +
    + + + + +
    Awards Ceremony: + +
    + +
    + +

    Judging Reports and Forms

    + + + + + + + +
    Project Judging Schedules for the Students:
    (one per page, takes a few seconds to generate)
    +
    Judging Team Schedules:
    (one judging team per page)
    +
    +&$ts) { ?> + - Divisional + - Special + +
    +
    Judging Team Hand-In Forms:
    (one judging team per page)
    +
    +&$ts) { ?> + - Divisional + - Special + +
    +
    +
    + + +

    Signed Electronic Signature Forms

    + + + +
    Electronic Signatures: +
    +
    + + +

    PayPal Payments

    + + + +
    Payments: +
    +
    + + +

    Edit Reports

    + + + + +
    + + diff --git a/c_reports_edit.php b/c_reports_edit.php new file mode 100644 index 00000000..f2a72099 --- /dev/null +++ b/c_reports_edit.php @@ -0,0 +1,831 @@ + + Copyright (C) 2005 James Grant + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +require_once('common.inc.php'); +require_once('project.inc.php'); +require_once('filter.inc.php'); +require_once('user.inc.php'); +require_once('form.inc.php'); +require_once('reports.inc.php'); + +$mysqli = sfiab_init('committee'); + +/* Define all the report field globals, depends on mysqli and $config */ +report_init($mysqli); + +$u = user_load($mysqli); + +$page_id = 'c_report_editor'; +$help = '

    Edit Reports'; + +$rid = 0; +if(array_key_exists('rid', $_GET)) { + $rid = (int)$_GET['rid']; +} + +$action = ''; +if(array_key_exists('action', $_POST)) { + $action = $_POST['action']; +} + +function post_report() +{ + global $report_font_styles, $report_options; + + $report = array(); + post_int($report['id'], 'rid'); + post_text($report['name'], 'name'); + post_text($report['section'], 'section'); + post_text($report['creator'], 'creator'); + post_text($report['desc'], 'desc'); + post_text($report['type'], 'type'); + + if(array_key_exists('option', $_POST)) { + foreach($_POST['option'] as $o=>$v) { + if(!array_key_exists($o, $report_options)) continue; + post_text($report[$o], array('option',$o)); + } + } + + /* For these, just do $report['col'][$i]['field'] = $_POST['col'][$i] */ + foreach(array('col') as $c) { + $report[$c] = array(); + if(!array_key_exists($c, $_POST)) continue; + + $num = count($_POST[$c]); + for($i=0; $i<$num; $i++) { + if(trim($_POST[$c][$i]['field']) == '') continue; + $report[$c][$i] = array(); + /* post_float($var, $keys) if keys is an array, it searches for $_POST[$c][$i]['x'] here */ + post_float($report[$c][$i]['x'], array($c, $i, 'x')); + post_float($report[$c][$i]['y'], array($c, $i, 'y')); + post_float($report[$c][$i]['w'], array($c, $i, 'w')); + post_float($report[$c][$i]['h'], array($c, $i, 'h')); + post_float($report[$c][$i]['min_w'], array($c, $i, 'min_w')); + post_float($report[$c][$i]['h_rows'], array($c, $i, 'h_rows')); + post_text($report[$c][$i]['field'], array($c, $i, 'field')); + post_text($report[$c][$i]['value'], array($c, $i, 'value')); + post_text($report[$c][$i]['fontname'], array($c, $i, 'fontname')); + $report[$c][$i]['fontstyle'] = array(); /* There may be no fontstyle posted, set a blank array and + overwrite if needed */ + post_array($report[$c][$i]['fontstyle'], array($c, $i, 'fontstyle'), $report_font_styles); + post_float($report[$c][$i]['fontsize'], array($c, $i, 'fontsize')); + post_text($report[$c][$i]['align'], array($c, $i, 'align')); + post_text($report[$c][$i]['valign'], array($c, $i, 'valign')); + post_text($report[$c][$i]['on_overflow'], array($c, $i, 'on_overflow')); + } + } + foreach(array('group','sort','distinct') as $c) { + $report[$c] = array(); + if(!array_key_exists($c, $_POST)) continue; + + $num = count($_POST[$c]); + for($i=0; $i<$num; $i++) { + if(trim($_POST[$c][$i]) == '') continue; + $report[$c][$i] = array(); + post_text($report[$c][$i]['field'], array($c, $i)); + } + } + + /* Full parse */ + foreach(array('filter') as $c) { + $report[$c] = array(); + if(!array_key_exists($c, $_POST)) continue; + + $num = count($_POST[$c]); + for($i=0; $i<$num; $i++) { + if(trim($_POST[$c][$i]['field']) == '') continue; + $report[$c][$i] = array(); + post_float($report[$c][$i]['x'], array($c, $i, 'x')); + post_text($report[$c][$i]['field'], array($c, $i, 'field')); + post_text($report[$c][$i]['value'], array($c, $i, 'value')); + } + } + debug("Loaded postted report: ".print_r($report, true)); + + return $report; +} + +switch($action) { +case 'save': + $r = post_report(); +// print_r($r); + report_save($mysqli, $r); + form_ajax_response(array('status'=>0)); + exit(); + +case 'load': + $rid = (int)$_POST['rid']; + form_ajax_response(array('status'=>0, 'location'=>"c_reports_edit.php?rid=$rid")); + exit(); + +case 'delete': + $rid = (int)$_POST['rid']; + report_delete($mysqli, $rid); + form_ajax_response(array('status'=>0, 'location'=>'c_reports_edit.php')); + exit(); + +case 'new': + $report = report_create($mysqli); + form_ajax_response(array('status'=>0, 'location'=>"c_reports_edit.php?rid={$report['id']}")); + exit(); +} + + + +sfiab_page_begin($u, "Edit Reports", $page_id, $help); +?> + +

    +

    Edit Reports

    + 0) { + $form_id = $page_id.'form_edit'; + $r = report_load($mysqli, $rid); + $fieldvar = "report_{$r['type']}s_fields"; + $fields = $$fieldvar; + + print("

    debug

    ");
    +		print_r($r);
    +		print("
    "); +?> +
    + +

    Report Information

    + +$f) { + if(array_key_exists('editor_disabled', $f)) continue; + if(array_key_exists('start_option_group', $f)) { + $gr = $f['start_option_group']; + $report_fields[$gr] = array(); + } + $report_fields[$gr][$k] = $f['name']; + } + + form_begin($form_id, 'c_reports_edit.php' ); + form_hidden($form_id, 'rid', $r['id']); + form_text($form_id, 'name', 'Name', $r); + form_text($form_id, 'section', 'Section', $r); + form_textbox($form_id, 'desc', 'Description', $r); + form_text($form_id, 'creator', 'Creator', $r); + form_select($form_id, 'type', 'Type', $report_types, $r); +?>

    Options

    +$d) { + $v = $r[$o]; + $display = ""; + if($d['format'] != 'all' && $d['format'] != $r['format']) { + $display = 'style="display:none;"'; + } +?>
    > +
    +

    Report Data

    +$d) { + $i = $index + 1; + form_select_optgroup($form_id, "col[$index][field]", "Column $i Data", $report_fields, $d['field']); + form_radio_h($form_id, "col[$index][align]", "Column $i Align", $report_col_align, $d['align'], '', false, false, true); + form_radio_h($form_id, "col[$index][valign]", "Column $i V-Align", $report_col_valign, $d['valign'], '', false, false, true); + form_radio_h($form_id, "col[$index][on_overflow]", "Column $i Overflow", $report_col_on_overflow, $d['on_overflow'], '', false, false, true); +// form_text_inline($form_id, "col_fontname[$index]", $d['fontname'], 'text', 'max-width="10"'); +// $n = array("col_fontstyle[$index]" => $d['fontstyle']); +// form_select($form_id, "col_fontstyle[$index]", NULL, $report_font_styles, $n, '', false, true, true); +// form_text_inline($form_id, "col_fontsize[$index]", $d['fontsize']); + form_hidden($form_id, "col[$index][fontname]", $d['fontname']); + foreach($d['fontstyle'] as $s) { + form_hidden($form_id, "col[$index][fontstyle][]", $s); + } + if($r['format'] == 'label') { + form_int($form_id, "col[$index][fontsize]", "Label $i Font Size", $d['fontsize']); + form_int($form_id, "col[$index][x]", "Label $i X", $d['x']); + form_int($form_id, "col[$index][y]", "Label $i Y", $d['y']); + form_int($form_id, "col[$index][w]", "Label $i Width", $d['w']); + form_int($form_id, "col[$index][h]", "Label $i Height", $d['h']); + form_int($form_id, "col[$index][h_rows]", "Label $i Num Rows (0=auto)", $d['h_rows']); + form_hidden($form_id, "col[$index][min_w]", $d['min_w']); + } else { + form_hidden($form_id, "col[$index][fontsize]", $d['fontsize']); + form_hidden($form_id, "col[$index][x]", $d['x']); + form_hidden($form_id, "col[$index][y]", $d['y']); + form_hidden($form_id, "col[$index][w]", $d['w']); + form_hidden($form_id, "col[$index][h]", $d['h']); + form_hidden($form_id, "col[$index][min_w]", $d['min_w']); + form_hidden($form_id, "col[$index][h_rows]", $d['h_rows']); + } + print("
    "); +?> +"); + } + + +?>

    Sort By

    +

    Group By

    +

    Distinct Column

    +

    Filter By

    + + +
    + + + + + + + + +"; + $q = mysql_query("SELECT system_report_id FROM reports WHERE 1 ORDER BY system_report_id DESC"); + $r = mysql_fetch_assoc($q); + $sid = $r['system_report_id'] + 1; + $n = mysql_escape_string($report['name']); + $c = mysql_escape_string($report['creator']); + $d = mysql_escape_string($report['desc']); + $t = mysql_escape_string($report['type']); + + echo "INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES\n"; + echo "\t('', '$sid', '$n', '$d', '$c', '$t');\n"; + + echo "INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES "; + + /* Do the options */ + $x = 0; + foreach($report['option'] as $k=>$v) { + echo "\n\t('', LAST_INSERT_ID(), 'option', $x, '$k', '$v', 0, 0, 0, 0, 0, '', ''),"; + $x++; + } + /* Do the fields */ + $fs = array('col', 'group', 'sort', 'distinct', 'filter'); + $first = true; + foreach($fs as $f) { + foreach($report[$f] as $x=>$v) { + $k = $v['field']; + $vx = intval($v['x']); + $vy = intval($v['y']); + $vw = intval($v['w']); + $vh = intval($v['h']); + $vlines = intval($v['lines']); + if($vlines == 0) $vlines = 1; + $face = $v['face']; + $align = $v['align']. ' ' . $v['valign']; + $value=mysql_escape_string(stripslashes($v['value'])); + if(!$first) echo ','; + $first = false; + echo "\n\t('', LAST_INSERT_ID(), '$f', $x, '$k', '$value', $vx, $vy, $vw, $vh, $vlines, '$face', '$align')"; + } + } + echo ";\n"; + echo "
  • "; + } + + + + /* ---- Setup ------ */ + + $n_columns = intval($_POST['ncolumns']); + $n = count($report['col']) + 1; + if($n > $n_columns) $n_columns = $n; + if($colaction == 'add') $n_columns+=3; + + $fieldvar = "report_{$report['type']}s_fields"; + if(isset($$fieldvar)) $fields = $$fieldvar; + + + echo "
    "; + + echo ""; + echo ""; + echo ""; + echo ""; + echo "
    "; + + + echo "
    "; + echo ""; + echo ""; + + echo "

    Report Information

    "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
    Name:
    Created By:
    Description:
    Type: "; + selector('type', array('student' => 'Student Report', 'judge' => 'Judge Report', + 'award' => 'Award Report', 'committee' => 'Committee Member Report', + 'school' => 'School Report', 'volunteer' => 'Volunteer Report', + 'tour' => 'Tour Report', 'fair' => 'Feeder Fair Report', + ), + $report['type'], + "onChange=\"reportReload();\""); + echo ""; + echo "
    "; + + echo "

    Report Data

    "; + echo ""; + $x=0; + //only go through the columns if there are columns to go through + if(count($report['col'])) { + foreach($report['col'] as $o=>$d) { + echo ""; + echo ""; + $x++; + $canvasLabels[]=$fields[$report['col'][$o]['field']]['name']; //['field']; + } + } + for(;$x<$n_columns;$x++) { + echo ""; + echo ""; + + } + echo ""; + echo ""; + echo "
    Column ".($x + 1).": "; + if(intval($x) != intval($o)) { + echo ("WARNING, out of order!"); + } + field_selector("col[$o][field]", "col$o", $d['field']); + echo "
    Column ".($x + 1).": "; + field_selector("col[$x][field]", "col$x", ''); + echo "
    "; + echo ""; + echo ""; + echo "
    \n"; + +$doCanvasSample = false; +$doCanvasSampletcpdf = false; + $l_w=$report_stock[$report['option']['stock']]['label_width']; + $l_h=$report_stock[$report['option']['stock']]['label_height']; + if($l_w && $l_h && $report['option']['type']=="label") { + echo "

    Label Data Locations

    "; + + $doCanvasSample=true; + $ratio=$l_h/$l_w; + $canvaswidth=600; + $canvasheight=round($canvaswidth*$ratio); + echo "
    "; + echo "
    \n"; + echo "\n"; + } + + if($l_w && $l_h && $report['option']['type']=="tcpdf_label") { + echo "

    Label Data Locations - TCPDF

    "; + + $l_w *= 25.4; + $l_h *= 25.4; + $doCanvasSampletcpdf=true; + $ratio=$l_h/$l_w; + $canvaswidth=600; + $canvasheight=round($canvaswidth*$ratio); + echo "
    "; + echo "
    \n"; + echo "\n"; + } + + + echo ""; + $x=0; + + + if($report['option']['type'] == 'label' || $report['option']['type'] == 'tcpdf_label') { + $fontlist = array('' => 'Default'); + $fl = PDF::getFontList(); + foreach($fl as $f) $fontlist[$f] = $f; +// print_r($fl); + + foreach($report['col'] as $o=>$d) { + $f = $d['field']; + echo ""; + echo ""; + echo ""; + } + } + echo "
    Loc ".($o+1).": "; + $script=""; + foreach($locs as $k=>$v) { + if($k=='Lines' && $report['option']['type'] != 'label') continue; + echo "$k="; + $script.="{$d[$v]},"; + } + + if($report['option']['type'] == 'label') { + echo 'Face='; + selector("col[$x][face]", array('' => '', 'bold' => 'Bold'), $d['face']); + } + echo 'Align'; + selector("col[$x][align]", array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'), + $d['align']); + echo 'vAlign'; + if($report['option']['type'] == 'label') { + selector("col[$x][valign]", array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'), + $d['valign']); + } else { + selector("col[$x][valign]", array('middle' => 'Middle', 'top' => 'Top', 'bottom' => 'Bottom'), + $d['valign']); + + echo 'Font='; + selector("col[$x][fontname]", $fontlist, $d['fontname']); + selector("col[$x][fontstyle]", array('' => '', 'bold' => 'Bold'), $d['fontstyle']); + echo ""; + echo 'pt '; + echo 'OnOverflow='; + selector("col[$x][on_overflow]", array('tuncate'=>'Truncate','...'=>'Add ...', 'scale'=>'Scale'), $d['on_overflow']); + } + + if($f == 'static_text') { + echo "
    Text="; + } else { + echo ""; + } + if($doCanvasSample) + echo "\n"; + if($doCanvasSampletcpdf) + echo "\n"; + + $x++; + } + for(;$x<$n_columns;$x++) { + echo "
    Loc ".($x+1).": "; + foreach($locs as $k=>$v) { + if($k=='Lines' && $report['option']['type'] != 'label') continue; + echo "$k="; + } + if($report['option']['type'] == 'label') { + echo 'Face='; + selector("col[$x][face]", array('' => '', 'bold' => 'Bold'), ''); + } + + echo 'Align'; + selector("col[$x][align]", array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'), + 'center'); + echo 'vAlign'; + if($report['option']['type'] == 'label') { + selector("col[$x][valign]", array('vcenter' => 'Center', 'vtop' => 'Top', 'vbottom' => 'Bottom'), + 'top'); + } else { + selector("col[$x][valign]", array('middle' => 'Middle', 'top' => 'Top', 'bottom' => 'Bottom'), 'middle'); + + echo 'Font='; + selector("col[$x][fontname]", $fontlist, ''); + selector("col[$x][fontstyle]", array('' => '', 'bold' => 'Bold'), ''); + echo ""; + echo 'pt '; + echo 'OnOverflow='; + selector("col[$x][on_overflow]", array('Truncate'=>'truncate','Add ...'=>'...', 'Scale'=>'scale'),''); + } + echo ""; + echo "
    \n"; + echo "

    Grouping

    "; + for($x=0;$x<2;$x++) { + echo "Group By".($x + 1).": "; + $f = $report['group'][$x]['field']; + field_selector("group[$x]", "group$x", $f); + echo "
    "; + } + echo "

    Sorting

    "; + for($x=0;$x<3;$x++) { + echo "Sort By".($x + 1).": "; + $f = $report['sort'][$x]['field']; + field_selector("sort[$x]", "sort$x",$f); + echo "
    "; + } + echo "

    Distinct

    "; + echo "Distinct Column: "; + $x=0; + $f = $report['distinct'][$x]['field']; + field_selector("distinct[$x]", "distinct0", $f); + + echo "

    Filtering

    "; + echo ""; + for($x=0;$x<3;$x++) { + echo ""; + } + echo "
    Filter".($x + 1).":"; + field_selector("filter[$x][field]", "filter$x",$report['filter'][$x]['field']); + echo "
    "; + selector("filter[$x][x]", $filter_ops,$report['filter'][$x]['x']); + $v = $report['filter'][$x]['value']; + echo "Text="; + echo "
    "; + + echo "

    Options

    "; + foreach($report_options as $ok=>$o) { + echo "{$o['desc']}:
    \n"; + } + + echo "
    "; + if($report['system_report_id'] != 0) { + echo notice(i18n('This is a system report, it cannot be changed or deleted. To save changes you have made to it, please select the \'Save as a new report\' option.')); + } + echo ""; + echo ""; + + echo "
    "; + + send_footer(); +?> diff --git a/c_rollover.php b/c_rollover.php new file mode 100644 index 00000000..3d7aa8ea --- /dev/null +++ b/c_rollover.php @@ -0,0 +1,94 @@ + +'; + +sfiab_page_begin($u, "Rollover Fair Year", $page_id, $help); + +?> + + +
    + + + All Done. Go Back + +

    Rolling over the fair year prepares the fair for a new year. The + current year is . The new year is whatever you'd like, + usually the current year + 1, so . The rollover process + copies data for the new year, leaving a copy in the + current year so that reports generated for past years make sense and + reflect the data as it was. + +

    The following data is duplicated for the new year: Awards and Prizes, Categories, Challenges, Configuration Dates, Schools, Sponsors, Timeslots, and Tours +

      +
    • 52 weeks (for each year) are added to the Configuration Dates so they fall on the same day of the week after the rollover. +
    + +

    The following data doesn't change year-over-year, so is not copied: CMS (page contents), Configuration (all except Dates), Emails, Reports + +

    The following data is NOT rolled over because it is not needed for a new year: Judging Assignments, Judging Teams, Projects + +

    Users are a special case. Users are copied to the new year one-by-one when a user logs in (provided the last activity on the account wasn't to delete or disable it). + + + + +

    + + diff --git a/c_stats.php b/c_stats.php new file mode 100644 index 00000000..1cbc4e76 --- /dev/null +++ b/c_stats.php @@ -0,0 +1,47 @@ + + +
    + + +

    Statistics

    + +

    Other Fairs

    + + +

    Logs

    + + +
    + + + diff --git a/c_students.php b/c_students.php new file mode 100644 index 00000000..b78d7e1c --- /dev/null +++ b/c_students.php @@ -0,0 +1,149 @@ + +
    + 0, 'complete'=>0); + + $stats = array(); + foreach($cats as $c) { + $stats[$c['cat_id']] = array('students'=>$stats_line, 'projects'=>$stats_line); + } + $stats['total'] = array('students'=>$stats_line, 'projects'=>$stats_line); + + foreach($students as &$s) { + if($s['s_accepted'] == 1) { + $p =& $projects[$s['s_pid']]; + $stats['total']['students']['accepted']+=1; + if(!array_key_exists($p['cat_id'], $stats)) { + print("array key doesn't exist for cat_id=[{$p['cat_id']}]
    "); + print_r($p); + print_r(array_keys($stats)); + } + $stats[$p['cat_id']]['students']['accepted']+=1; + } else if($s['s_complete'] == 1) { + $p =& $projects[$s['s_pid']]; + $stats['total']['students']['complete']+=1; + if(!array_key_exists($p['cat_id'], $stats)) { + print("array key doesn't exist for cat_id=[{$p['cat_id']}]
    "); + print_r($p); + print_r(array_keys($stats)); + } + $stats[$p['cat_id']]['students']['complete']+=1; + $p['complete'] = true; + } else { + if(array_key_exists($s['s_pid'], $projects)) { + $p =& $projects[$s['s_pid']]; + $p['complete'] = false; + } + } + + } + + foreach($projects as &$p) { + if($p['accepted']) { + $stats['total']['projects']['accepted']+=1; + $stats[$p['cat_id']]['projects']['accepted']+=1; + } + if(array_key_exists('complete', $p) && $p['complete'] == true) { + $stats['total']['projects']['complete']+=1; + $stats[$p['cat_id']]['projects']['complete']+=1; + } + } + + + + + + +?> +

    Stats

    +

    Accepted Students and Projects means a signature form has been received and marked in the system. Complete Students and Projects could print a signature form, but it hasn't been received or entered into the system yet. + + + + + +$c) { ?> + + + + + + + + + + + + + +
    AcceptedComplete
    StudentsProjectsStudentsProjects
    Total
    + + +

    Students

    + + + + +Projects +

    FIXME: coming soon. +*/ +?> + +

    Signature Forms and Project Numbers

    + + +

    Checkin and Tshirt List

    + +

    Ethics Approval

    + + +

    Visit Lists

    +
    + + + diff --git a/c_timeslots.php b/c_timeslots.php new file mode 100644 index 00000000..88c5f798 --- /dev/null +++ b/c_timeslots.php @@ -0,0 +1,172 @@ +$p) { + + $ts = &$timeslots[$tid]; + post_int($ts['start'], array('ts', $tid, 'start')); +// $timeslot_start = strtotime($_POST['ts'][$tid]['start']); +// if($timeslot_start === false) { +// $ts['start'] = 0; +// } else { +// $ts['start'] = (int)(($timeslot_start - $fair_start) / 60); +// } + if($ts['start'] < 0 || $ts['start'] > 100000) { + $ts['start'] = 0; + } + + post_int($ts['round'],array('ts', $tid, 'round') ); + post_int($ts['num_timeslots'],array('ts', $tid, 'num_timeslots') ); + post_int($ts['timeslot_length'],array('ts', $tid, 'timeslot_length')); + timeslot_save($mysqli, $ts); + } + form_ajax_response(0); + exit(); + + +case 'del': + $tid = (int)$_POST['tid']; + if($tid > 0) { + timeslot_delete($mysqli, $tid); + form_ajax_response(0); + exit(); + } + form_ajax_response(1); + exit(); + +case 'add': + $tid = timeslot_create($mysqli); + $ts = timeslot_load($mysqli, $tid); + $x = count($timeslots) + 1; + $ts['name'] = "Round ".$x; + print_timeslot_div($form_id, $tid, $ts); + exit(); +} + + + +$help = '

    Edit the award'; +sfiab_page_begin($u, "Timeslot Editor", $page_id, $help); + + +function print_timeslot_div($form_id, $tid, &$ts) +{ + global $config; + +?> +

    +

    Judging Round Number

    + + +
    + + + +
    + +

    Timeslots

    +
      +
    • The rounds are automatically numbered and should not overlap +
    • The start time is relative to the start of the fair, defined in the configuration section. Currently: . Specify in minutes, don't have calendar integration for the start time yet, sorry. +
    • I'll clean up this interface when I have time, but for now it works +
    +

    So for example, Round one might be defined as: 120 start, 9 timeslots, + 20 minute timeslot length. That means the first judging round starts 2 + hours after the fair begins and has 9 timeslots each of 20 minutes (3 + hours total). +

    The judge scheduler uses the round number (automatically assigned in order), number of timeslots, and timeslot length to schedule judges. +

    The report system uses the timeslot start time, number of timeslots, and timeslot length to create project and judge schedules. +

    The judge registration pages uses the timeslot start time, total length (num timeslots * timeslot length), and name to ask judges to select which judging rounds (by name) they are available for judging. + + + +

    + +
    + + Create a New Timeslot
    + + +
    + + + + + diff --git a/c_tours.php b/c_tours.php new file mode 100644 index 00000000..a2bcbda4 --- /dev/null +++ b/c_tours.php @@ -0,0 +1,200 @@ +query("SELECT `id` FROM log WHERE `type`='tour_scheduler' AND `result`='1' AND `year`='{$config['year']}' ORDER BY `id` DESC LIMIT 1"); + if($q->num_rows != 1) { + $r['running'] = false; + $r['messages'] = ""; + $r['percent'] = 0; + } else { + $d = $q->fetch_assoc(); + + /* Get all messages */ + $r['running'] = true; + $r['messages'] = ''; + $q = $mysqli->query("SELECT * FROM log WHERE `id`>='{$d['id']}' AND `type`='tour_scheduler' AND year='{$config['year']}' ORDER BY `id`"); + $last_message = ''; + while($d = $q->fetch_assoc()) { + if($last_message != $d['data']) { + $r['messages'] .= $d['data']."
    "; + $last_message = $d['data']; + } + $r['percent'] = $d['result']; + if($d['result'] == 100) { + $r['running'] = false; + } + } + } + /* Get data from most recent run of the scheduler from the log */ + + print(json_encode($r)); + exit(); + +case 'run': + sfiab_log($mysqli, "tour_scheduler", $u, 1, "Initializing..."); + $mysqli->real_query("INSERT INTO queue(`command`,`result`) VALUES('tour_scheduler','queued')"); + queue_start($mysqli); + form_ajax_response(array('status'=>0, )); + exit(); + +} + +sfiab_page_begin($u, "Tours", $page_id); + +?> + + +
    + +&$t) { + /* Count max tour slots per grade */ + for($g=$t['grade_min']; $g <= $t['grade_max']; $g++) { + if(!array_key_exists($g, $stats['by_grade'])) { + $stats['by_grade'][$g] = 0; + } + $stats['by_grade'][$g] += $t['capacity_max']; + } + $stats['max_total'] += $t['capacity_max']; + $stats['min_total'] += $t['capacity_min']; + } + + $stats['students_assigned'] = 0; + $students = students_load_all_accepted($mysqli); + foreach($students as $sid => &$s) { + if($s['tour_id'] === NULL) continue; + if($s['tour_id'] > 0) { + $stats['students_assigned'] += 1; + } + } + +?>

    Stats

    +
      +
    • Total Number of Tours: +
    • Total Min/Max capacity: - +
    • Capacity by category: + + +&$c) { + $c_str = $c['name']; + for($g = $c['min_grade']; $g <=$c['max_grade']; $g++) { +?> + +
      CategoryGradeMax Capacity
      +
    • Accepted students assigned to a tour: / +
    + + + + +

    Tours

    + + + +

    Tour Assignments

    +

    Individual students can be assigned to a Tour on the Student List/Editor pages. + +

    The tour scheduler takes about a minute to run and will: +

    • Delete all tour assignments for this year +
    • Assign students to tours +
    + + +
    +

    Scheduler Status

    + + + +
    Status:
    Output:
    + +

    The complete output log is available here: Tour Scheduler Log + + +

    + + + + + diff --git a/c_tours_edit.php b/c_tours_edit.php new file mode 100644 index 00000000..e9e277fb --- /dev/null +++ b/c_tours_edit.php @@ -0,0 +1,220 @@ +0, 'location'=>'c_tours_edit.php')); + exit(); + +case 'del': + /* Delete tour */ + $tid = (int)$_POST['id']; + if($tid > 0) { + $mysqli->real_query("DELETE FROM tours WHERE id='$tid'"); + form_ajax_response(0); + exit(); + } + form_ajax_response(1); + exit(); + +case 'add': + $tid = tour_create($mysqli); + /* Print the id so the caller can jump to the edit page with the right id */ + print("$tid"); + exit(); + +case 'order': + $ord = 0; + foreach($_POST['ids'] as $tid) { + $ord++; + $tid = (int)$tid; + if($tid == 0) continue; + + $mysqli->query("UPDATE tours SET num='$ord' WHERE id='$tid'"); + } + form_ajax_response(0); + exit(); + break; + +} + +if(array_key_exists('edit', $_GET)) { + $page = 'edit'; +} else { + $page = ''; +} + +switch($page) { +case 'edit': + $tid = (int)$_GET['edit']; + $page_id = 'c_tours_edit'; + $help = '

    '; + sfiab_page_begin($u, "Edit Tour", $page_id, $help); + +?> +

    + + +

    Edit Tour:

    + Cancel +'; + + sfiab_page_begin($u, "Edit Tours", $page_id, $help); + +?> + + +
    + + + + + + + + + + + + + +$t) { +?> + + + + + + + + + + + +
    Tour / DescriptionCapacityGradesContact / Location
    -
    - -
    +
    + Move + Edit + Delete +
    +
    + New Tour + + + +
    + + + + + + diff --git a/c_update.php b/c_update.php new file mode 100644 index 00000000..0daf7101 --- /dev/null +++ b/c_update.php @@ -0,0 +1,117 @@ + + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +?> +query("SELECT * FROM config WHERE `year`='0'"); + while($r = $q->fetch_assoc()) { + unset($r['year']); + $c_0[$r['var']] = $r; + } + + $q = $mysqli->query("SELECT * FROM config WHERE `year`='$year'"); + while($r = $q->fetch_assoc()) { + $var = $r['var']; + if(!array_key_exists($var, $c_0)) { + $data=array(); + foreach($c_0[$var] as $k=>$v) { + $vals[] = "'".$mysqli->real_escape_string($v)."'"; + } + $mysqli->real_query("INSERT INTO config(`year`,`".join('`,`',array_keys($c_0[$var]))."`) VALUES + ('$year',".join(',', $vals).")"); + } + } +} + +$update_start = $config['db_version'] + 1; +$update_end = $db_version; + +print("
    \n");
    +print("Performing database updates from $update_start to $update_end\n");
    +
    +
    +for($ver = $update_start; $ver <= $update_end; $ver++) {
    +
    +	print("Applying update $ver...\n");
    +
    +	if(file_exists("updates/$ver.php")) {
    +		include("updates/$ver.php");
    +	}
    +
    +	if(is_callable("pre_$ver")) {
    +		print("   updates/$ver.php::pre_$ver() exists - running...\n");
    +		call_user_func("pre_$ver", $mysqli);
    +		print("   updates/$ver.php::pre_$ver() done.\n");
    +	}
    +
    +	if(file_exists("updates/$ver.sql")) {
    +		print("   updates/$ver.sql detected - applying update...\n");
    +		$fp = fopen("updates/$ver.sql", "rt");
    +		db_apply_update($mysqli, $fp);
    +		fclose($fp);
    +	}
    +	else {
    +		print("   updates/$ver.sql not found, skipping\n");
    +	}
    +
    +	if(is_callable("post_$ver")) {
    +		print("   updates/$ver.php::post_$ver() exists - running...\n");
    +		call_user_func("post_$ver", $mysqli);
    +		print("   updates/$ver.php::post_$ver() done.\n");
    +	}
    +
    +//	update_config($mysqli, $config['year']);
    +}
    +
    +print("Done.\n");
    +
    +$mysqli->real_query("UPDATE config SET val='$update_end' WHERE var='db_version'");
    +
    +print("
    \n"); + + +?> diff --git a/c_user_edit.php b/c_user_edit.php new file mode 100644 index 00000000..c0fd0c49 --- /dev/null +++ b/c_user_edit.php @@ -0,0 +1,395 @@ +Edit a User'; + +$edit_uid = 0; +if(array_key_exists('uid', $_POST)) { + $edit_uid = (int)$_POST['uid']; +} else if(array_key_exists('uid', $_GET)) { + $edit_uid = (int)$_GET['uid']; +} +if($edit_uid == 0) exit(); + +$edit_u = user_load($mysqli, $edit_uid); + +$edit_p = NULL; +if(in_array('student', $edit_u['roles'])) { + $edit_p = project_load($mysqli, $edit_u['s_pid']); +} + +$action = ''; +if(array_key_exists('action', $_POST)) { + $action = $_POST['action']; +} + +switch($action) { +case 'save': +case 'save_back': + post_text($edit_u['firstname'], 'firstname'); + post_text($edit_u['lastname'], 'lastname'); + post_text($edit_u['email'], 'email'); + post_text($edit_u['username'], 'username'); + post_bool($edit_u['attending'], 'attending'); + post_text($edit_u['reg_close_override'], 'reg_close_override'); + + if($config['tshirt_enable']) { + post_text($edit_u['tshirt'], 'tshirt'); + if(!array_key_exists($edit_u['tshirt'], $tshirt_sizes)) { + $edit_u['tshirt'] = NULL; + } + } + + if($config['tours_enable']) { + if(in_array('student', $edit_u['roles'])) { + post_int($edit_u['tour_id'], 'tour_id'); + } + } + + if($edit_u['reg_close_override'] !== NULL) { + $d = date_parse($edit_u['reg_close_override']); + if($d['year'] > 1900 && $d['month'] > 0 && $d['day'] > 0) { + $edit_u['reg_close_override'] = sprintf("%04d-%02d-%02d 23:59:59", $d['year'], $d['month'], $d['day']); + } else { + $edit_u['reg_close_override'] = NULL; + } + } + user_save($mysqli, $edit_u); + if($action == 'save') { + form_ajax_response(array('status'=>0)); + } else { + form_ajax_response(array('status'=>0, 'location'=>'back')); + } + exit(); + +case 'psave': +case 'psave_back': + if(in_array('student', $edit_u['roles'])) { + post_int($edit_p['disqualified_from_awards'], 'disqualified_from_awards'); + post_int($edit_p['number_sort'], 'number_sort'); + post_int($edit_p['floor_number'], 'floor_number'); + post_text($edit_p['number'], 'number'); + + $edit_p['unavailable_timeslots'] = array(); + $timeslots = timeslots_load_all($mysqli); + foreach($timeslots as $tid=>&$ts) { + $a = array(); + post_array($a, "unavailable_timeslots$tid"); + $edit_p['unavailable_timeslots'] = array_merge($edit_p['unavailable_timeslots'] , $a); + } + + project_save($mysqli, $edit_p); + + if($action == 'psave') { + form_ajax_response(array('status'=>0)); + } else { + form_ajax_response(array('status'=>0, 'location'=>'back')); + } + } + exit(); + +case 'jsave': +case 'jsave_back': + if(in_array('judge', $edit_u['roles'])) { + /* j_avoid_project_ids may not exist in the POST, that means it's empty */ + $edit_u['j_avoid_project_ids'] = array(); + post_array($edit_u['j_avoid_project_ids'], 'j_avoid_project_ids'); + user_save($mysqli, $edit_u); + + if($action == 'jsave') { + form_ajax_response(array('status'=>0)); + } else { + form_ajax_response(array('status'=>0, 'location'=>'back')); + } + } + exit(); + +case 'assign_project_number': + $result = project_number_assign($mysqli, $edit_p); + if($result != true) { + form_ajax_response(array('status'=>1)); + } else { + $updates = array('number' => $edit_p['number'], 'floor_number'=>$edit_p['floor_number'], 'number_sort'=>$edit_p['number_sort']); + form_ajax_response(array('status'=>0, 'val'=>$updates)); + } + project_save($mysqli, $edit_p); + exit(); + +case 'delete_project_number': + project_number_clear($mysqli, $edit_p); + project_save($mysqli, $edit_p); + $updates = array('number' => '', 'floor_number'=>'', 'number_sort'=>''); + form_ajax_response(array('status'=>0, 'val'=>$updates)); + exit(); + + +case 'purge': + if(in_array('student', $edit_u['roles'])) { + $mysqli->real_query("DELETE FROM emergency_contacts WHERE `uid`='$edit_uid'"); + /* If only one student in project, delete project too */ + $q_in_project = $mysqli->query("SELECT uid FROM users WHERE `s_pid`='{$edit_u['s_pid']}'"); + if($q_in_project->num_rows == 1) { + $mysqli->real_query("DELETE FROM projects WHERE pid='{$edit_u['s_pid']}'"); + $mysqli->real_query("DELETE FROM mentors WHERE pid='{$edit_u['s_pid']}'"); + } + $mysqli->real_query("DELETE FROM signatures WHERE `uid`='$edit_uid'"); + } + /* Do this for all users, doesn't matter if it's a student or not */ + $mysqli->real_query("DELETE FROM partner_requests WHERE to_uid='$edit_uid' OR from_uid='$edit_uid'"); + /* Purge the user */ + $mysqli->real_query("DELETE FROM users WHERE uid='$edit_uid'"); + form_ajax_response(0); + exit(); + + +case 'del': + $edit_u['enabled'] = 0; + user_save($mysqli, $edit_u); + form_ajax_response(0); + exit(); + +case 'resend': + /* Note: also scrambles their password */ + email_send_welcome_email($mysqli, $edit_u); + form_ajax_response(0); + exit(); + +case 'change_pw': + $pw1 = $_POST['pw1']; + $pw2 = $_POST['pw2']; + if($pw1 != $pw2) { + form_ajax_response_error(1, 'Passwords don\'t match'); + exit(); + } + user_change_password($mysqli, $edit_u, $pw1); + form_ajax_response(0); + exit(); +case 'sig_del': + $key = $mysqli->real_escape_string($_POST['key']); + if(strlen($key) != 32) { + exit(); + } + $mysqli->query("DELETE FROM signatures WHERE `key`='$key'"); + form_ajax_response(array('status'=>0, 'location'=>"c_user_edit.php?uid=$edit_uid")); + exit(); +} + + + +sfiab_page_begin($u, "Edit User", $page_id, $help); + +form_page_begin($page_id, array()); +?> +
    + +Back + +

    Edit

    +'Yes, I\'ll be there', '0'=>'No, I can\'t make it'); + form_radio_h($form_id, 'attending', "At the fair", $sel, $edit_u['attending']); + form_text($form_id, 'reg_close_override', "Registration Close Override", $edit_u, 'date'); + + if($config['tshirt_enable']) { + form_select($form_id, 'tshirt', 'T-Shirt', $tshirt_sizes, $edit_u); + } + + if($config['tours_enable']) { + if(in_array('student', $edit_u['roles'])) { + $tours = tour_get_for_student_select($mysqli, $edit_u); + form_select($form_id, 'tour_id', 'Assigned Tour', $tours, $edit_u['tour_id']); + } + } + form_submit($form_id, 'save', 'Save', 'User Saved'); + form_submit($form_id, 'save_back', 'Save and Go Back', 'User Saved'); + form_end($form_id); + + +if(in_array('student', $edit_u['roles'])) { ?> +

    Project - -

    +&$ts) { + $data = array(); + + foreach($ts['timeslots'] as $num=>&$t) { + $key = $t['round'].':'.$t['num']; + $data[$key] = date('H:i', $t['start_timestamp']).'
    - '.date('H:i', $t['end_timestamp']); + } + form_check_group($form_id, "unavailable_timeslots$tid", "{$ts['name']} Unavailable Timeslots", $data, $edit_p['unavailable_timeslots']); + } + + + $attrs = ''; + if(!$edit_p['accepted']) { + $attrs = "disabled='disabled'"; + } + form_button($form_id, 'assign_project_number', 'Automatically Assign Project Number', 'g', 'check','', $attrs); + form_button($form_id, 'delete_project_number', 'Remove Assigned Project Number', 'r', 'delete', '', $attrs); +?>
    +

    Electronic Signatures

    + + + +query("SELECT * FROM signatures WHERE uid='{$edit_u['uid']}'"); + $sigs = array(); + while($r = $q->fetch_assoc()) { + $sig = signature_load($mysqli, NULL, $r); + $sigs[$sig['type']] = $sig; + } + foreach(array('student','parent','teacher') as $sig_type) { + $sig_name = $signature_types[$sig_type]; + if(array_key_exists($sig_type, $sigs)) { + $sig = $sigs[$sig_type]; + } else { + $sig = NULL; + } + + if($sig == NULL || $sig['date_sent'] == '0000-00-00 00:00:00') { + /* Doesn't exist */ + $sent = 'Not Sent'; + $status = 0; + } else if ($sig['date_signed'] != '0000-00-00 00:00:00') { + $sent = "Signed by {$sig['signed_name']} ({$sig['email']}) on ".date('F j, g:ia', strtotime($sig['date_signed'])); + $status = 2; + } else { + /* Not signed yet */ + $sent = "Sent to {$sig['name']} ({$sig['email']}) on ".date('F j, g:ia', strtotime($sig['date_sent'])); + $status = 1; + }?> + + + + + + + + +
    + + Waiting for Signature + + Signature Received + +
    + +

    Judge Information

    + +

    You can specify that a judge is not allowed to judge certain projects. This works for all assignments except CUSP assignments where the judging teams are created before the CUSP projects are known. +&$p) { + $project_list[$pid] = $p['number'].' - '.$p['title']; + } + + $form_id = $page_id.'_judge_form'; + form_begin($form_id, 'c_user_edit.php'); + form_hidden($form_id, 'uid', $edit_u['uid']); + form_multiselect($form_id, 'j_avoid_project_ids[]', 'Avoid Projects', $project_list, $edit_u); + form_submit($form_id, 'jsave', 'Save', 'Judge Information Saved'); + form_submit($form_id, 'jsave_back', 'Save and Go Back', 'Judge Information Saved'); + form_end($form_id); +} +?> + + +

    Change Password

    +

    Passwords must be at least 8 characters long and contain at least one letter, one number, and one non-alphanumberic character (something other than a letter and a number) + + +

    Actions

    + + + + + + + + + + + + + + + + + + +
    Re-send Welcome EmailResend the initial welcome email to the user. This also re-scrambles their password.
    Change To UserTemporarily change to this user. You can also do this by pressing the gear icon beside each user on the user list page.
    DeleteThis deletes the user but keeps a copy of their info to avoid breaking database links... e.g. if it's a student that won an award, the student info will still be available and linked to an award. This just + means the student cannot login anymore and can never recover their password. This action can be undone if you have direct access to the database (will add SFIAB support eventually).
    PurgePurging a user deletes all traces of them. They are deleted from winner lists, judging teams, tours, projects, everything, like they never existed. This action cannot be undone. They're gone.
    + + +
    + + + diff --git a/c_user_list.php b/c_user_list.php new file mode 100644 index 00000000..feeb318e --- /dev/null +++ b/c_user_list.php @@ -0,0 +1,358 @@ +$v) { + switch($k) { + case 'roles': + if(!is_array($_GET['roles'])) exit(); + foreach($_GET['roles'] as $r) { + if(!array_key_exists($r, $sfiab_roles)) exit(); + $roles[] = $r; + } + $_SESSION['edit_return'] = $roles; + break; + + case 'years': + if(!is_array($_GET['years'])) exit(); + foreach($_GET['years'] as $y) { + $year = (int)$y; + if($year > 0 && $year < 9999) { + $years[] = $year; + } else if($year == -1) { + $years = array(-1); + break; + } + } + break; + + case 'status': + if(!is_array($_GET['status'])) exit(); + foreach($_GET['status'] as $s) { + if(in_array($s, array('complete', 'active','new','accepted'))) { + $status[] = $s; + } + } + break; + + case 'attending': + if(!is_array($_GET['attending'])) exit(); + foreach($_GET['attending'] as $s) { + if(in_array($s, array('attending', 'not_attending'))) { + $attending[] = $s; + } + } + break; + + case 'show_filter': + $filter_collapsed = "false"; + break; + + + case 'edit': + $uid = (int)$v; + $new_u = user_load($mysqli, $uid); + + /* Create a project */ + if($new_u['s_pid'] === NULL && in_array('student', $new_u['roles'])) { + $new_u['s_pid'] = project_create($mysqli); + user_save($mysqli, $new_u); + } + + $_SESSION['edit_uid'] = $uid; + $_SESSION['edit_roles'] = $new_u['roles']; + $_SESSION['edit_name'] = $new_u['name']; + header("Location: ".user_homepage($new_u)); + exit(); + + case 'return': + unset($_SESSION['edit_uid']); + unset($_SESSION['edit_roles']); + unset($_SESSION['edit_name']); + $roles = $_SESSION['edit_return']; + break; + } +} + +if(count($roles) == 0) { + $roles = array('committee'); + $_SESSION['edit_return'] = $roles; +} + +if(count($years) == 0) { + $years[] = $config['year']; +} + +if(count($status) == 0) { + $status[] = 'complete'; + $status[] = 'active'; +} + +if(count($attending) == 0) { + $attending = array('attending', 'not_attending'); +} + + +$page_id = 'c_user_list'; + +sfiab_page_begin($u, "User List", $page_id); + +?> + + +
    + +
    +

    User List Options

    +$data) { + $roles_sel[$type] = $data['name']; + } + + form_begin($form_id, "c_user_list.php", false, false, "get"); + form_check_group($form_id, 'roles', "Show Roles", $roles_sel, $roles); + form_hidden($form_id, "show_filter", "1"); + + /* Find the full range of years */ + $q = $mysqli->query("SELECT DISTINCT(`year`) FROM `users` ORDER BY `year` DESC"); + $years_sel = array(); + while($r = $q->fetch_row()) { + $y = (int)$r[0]; + $years_sel[$y] = $y; + } + $years_sel["-1"] = "Latest for each user"; + form_check_group($form_id, 'years', "Show Years", $years_sel, $years); + + $status_sel = array('complete' => 'Complete', 'active' => 'Active', 'new' => 'New', 'accepted' => 'Accepted (students only)'); + form_check_group($form_id, 'status', "Show Status", $status_sel, $status); + + $attending_sel = array('attending' => "Attending", 'not_attending'=>'Not Attending'); + form_check_group($form_id, 'attending', "Show Attending", $attending_sel, $attending); + + + form_button($form_id, 'filter', 'Apply Filters'); + form_end($form_id); +?> + +
    + + + +$hide_columns = array(); +$hide_columns['pid'] = true; +$hide_columns['school'] = true; +$hide_columns['project_number'] = true; + +$q_roles_array = array(); +foreach($roles as $r) { + $q_roles_array[] = "FIND_IN_SET('$r',`roles`)>0"; + if($r == 'student') { + $hide_columns['school'] = false; + } + +} +$q_roles = "( ".join(' OR ', $q_roles_array)." )"; + +if(count($status) == 0) { + /* Can't happen */ + $q_status = '1'; +} else { + $a = array(); + if(in_array('complete', $status)) $a[] = "(`enabled`='1' AND (`j_complete`='1' OR `s_complete`='1' OR `v_complete`='1' OR FIND_IN_SET('committee',`roles`)>0 ) )"; + if(in_array('accepted', $status)) $a[] = "(`enabled`='1' AND `s_accepted`='1')"; + if(in_array('active', $status)) $a[] = "`enabled`='1'"; + if(in_array('new', $status)) $a[] = "(`new`='1' AND `enabled`='1')"; + $q_status = "(".join(' OR ', $a).")"; +} +$c = count($attending); +if($c == 0 || $c == 2) { + /* Nothing (can't happen) or both selected, return all attending status */ + $q_attending = '1'; +} else { + $q_attending = in_array('attending', $attending) ? "`attending`='1'" : "`attending`='0'"; +} + +if(count($years) == 0 || $years[0] == -1) { + /* This returns all rows that match the inner query, so if there's a deleted an non-deleted user in the max_year, + * this returns a single line, and the INNER JOIN creates two lines. The enabled=1 filters it back down to one */ + $q_join = "INNER JOIN ( + SELECT max(year) max_year, username + FROM users + GROUP BY username + ) u2 + ON `u`.username = `u2`.username + AND `u`.year = `u2`.max_year"; + $q_year = "1"; +} else { + /* Not trying to find the max year for each user, just filter directly by year */ + $q_year = "year IN ('".join("','", $years)."')"; + $q_join = ''; +} + +$query = "SELECT * FROM users u + $q_join + WHERE + $q_year + AND $q_roles + AND $q_status + AND $q_attending + "; +$q = $mysqli->query($query); +//print($query); +print($mysqli->error); + +$schools = school_load_all($mysqli); +$projects = projects_load_all($mysqli, false); + +$users = array(); +while($user_data = $q->fetch_assoc()) { + $users[] = user_load($mysqli, -1, -1, NULL, $user_data); +} + + +?> + + */ ?> + + + + + + +
    + + + + + + + + + + + + + + +Complete+Accepted'; + } else { + $status .= 'Complete'; + } + } else { + $status .= 'Incomplete'; + } + } + } + if($user['new'] == 1) { + $status = 'New'; + } else if($user['enabled'] == 0) { + $status = 'Deleted'; + } else if(!$user['attending']) { + $status = 'Not Attending'; + } + + $link = "c_user_list.php?edit={$user['uid']}"; + + $org = ''; + if(in_array('sponsor', $user['roles'])) { + $org = $user['organization'].' - '; + } + + $school_str = $user['schools_id'] > 0 ? $schools[$user['schools_id']]['school'] : ''; + + $project_number = $user['s_pid'] > 0 ? $projects[$user['s_pid']]['number'] : ''; + +?> + + + + + + + + + + + + +
    Name / EmailUsernameSchoolReg IDProj NumRole / StatusYear


    + Edit + Edit +
    + +

    + + + + + diff --git a/c_visit_list.php b/c_visit_list.php new file mode 100644 index 00000000..c917a4ea --- /dev/null +++ b/c_visit_list.php @@ -0,0 +1,322 @@ + 0) { + $visit = 0; + post_int($visit, 'visit'); + $notes = $mysqli->real_escape_string($_POST['notes']); + $mysqli->real_query("DELETE FROM visit_list WHERE uid='{$u['uid']}' AND pid='$pid'"); + print($mysqli->error); + $mysqli->real_query("INSERT INTO visit_list(`uid`,`pid`,`notes`,`visit`) VALUES('{$u['uid']}','$pid','$notes','$visit')"); + print($mysqli->error); + form_ajax_response(0); + exit(); + } + form_ajax_response(1); + exit(); + +case 'print': + + $projects = l_projects_load_all($mysqli, $config['year'], $u); + $timeslots = timeslots_load_all($mysqli); + + $generate_rounds = array(); + for($round=0;$round&$ts) { + $timeslots_by_round[$ts['round']] = $ts; + } + + foreach($projects as &$project) { + $project['timeslots'] = array(); + foreach($timeslots as $timeslot_id=>&$ts) { + $project['timeslots'][$timeslot_id] = array(); + } + } + + $q = $mysqli->query("SELECT * FROM timeslot_assignments WHERE year='{$config['year']}'"); + while($r = $q->fetch_assoc()) { + $pid = $r['pid']; + $judge_id = $r['judge_id']; + $jteam_id = $r['judging_team_id']; + $timeslot_num = $r['timeslot_num']; + $timeslot_id = $r['timeslot_id']; + + /* Make a list of slot types for each round for each project */ + $projects[$pid]['timeslots'][$timeslot_id][$timeslot_num] = $r['type']; + } + + + $pdf=new pdf( "Visit List", $config['year'] ); + + foreach($generate_rounds as $round ) { + $ts = &$timeslots_by_round[$round]; + $timeslot_id = $ts['id']; + /* Do the rounds in order, we built this array in order */ + $pdf->AddPage(); + + + $x = $pdf->GetX(); + $y = $pdf->GetY(); + $pdf->setFontSize(14); + $pdf->SetXY(-40, 10); + $pdf->Cell(30, 0, $ts['name'], 0); + $pdf->SetXY($x, $y); + $pdf->setFontSize(11); + + $n = array(); + $html = "

    {$u['firstname']}'s Visit List




    "; + $pdf->WriteHTML($html); + + $table = array('col'=>array(), 'widths'=>array() ); + + $table['fields'] = array('time'); + $table['header']['time'] = 'Time'; + $table['col']['time'] = array('on_overflow' => '', + 'align' => 'center'); + $table['widths']['time'] = 20; + $table['total'] = 0; + $table['data'] = array(); + + + /* Use the same logic for cusp and SA teams, except query a different slot type */ + $slot_type = 'special'; + + $table['header']['time'] = 'Project'; + for($itimeslot=0; $itimeslot<$ts['num_timeslots']; $itimeslot++) { + $table['fields'][] = "T$itimeslot"; + $table['header']["T$itimeslot"] = date("g:i", $ts['timeslots'][$itimeslot]['start_timestamp']); + $table['col']["T$itimeslot"] = array('on_overflow' => '', + 'align' => 'center'); + $table['widths']["T$itimeslot"] = 20; + } + + $sorted_project_ids = array(); + foreach($projects as &$p) { + $sorted_project_ids[$p['number_sort']] = $p['pid']; + } + ksort($sorted_project_ids); + + $showed_vbar = false; + foreach($sorted_project_ids as $pid) { + $row = array(); + $project = &$projects[$pid]; + + if($project['visit'] == 0) continue; + + $row['time'] = $project['number']; + + for($itimeslot=0; $itimeslot<$ts['num_timeslots']; $itimeslot++) { + + if($project['timeslots'][$timeslot_id] == NULL) { + print("project $pid timeslots [$timeslot_id] is nULL\n"); + print_r($project); + } + + if(!array_key_exists($itimeslot, $project['timeslots'][$timeslot_id])) { + + print("
    Timeslot $itimeslot doesn't exist in timeslots[$timeslot_id] for pid:$pid: ");
    +						print_r($project);
    +						exit();
    +					}
    +
    +			
    +				$txt = '';
    +				if($project['timeslots'][$timeslot_id][$itimeslot] == $slot_type) {
    +					$txt = 'O';
    +				} else if($slot_type == 'special' && $project['timeslots'][$timeslot_id][$itimeslot] == 'divisional') {
    +					$txt = '+';
    +					$showed_vbar =true;
    +				}
    +				$row["T$itimeslot"] = $txt;
    +			}
    +			$table['data'][] = $row;
    +		}
    +
    +
    +		$pdf->add_table($table);
    +		$pdf->WriteHTML("
    • O = Student has Divisional Judging
    • ". + ($showed_vbar ? '
    •  + = Student has Special Awards Judging
    • ' : ''). + "
    "); + } + + print($pdf->output()); + exit(); +} + +function l_projects_load_all($mysqli, $year, &$u) +{ + /* Load projects first */ + $q = $mysqli->query("SELECT * FROM projects WHERE year='$year' ORDER BY number_sort "); + $projects_tmp = array(); + while($p = $q->fetch_assoc()) { + $p_temp = project_load($mysqli, $p['pid'], $p); + $projects_tmp[$p['pid']] = $p_temp; + } + + $projects = array(); + /* Now match users to projects, copying projects + * into the real return array as we find them */ + $q = $mysqli->query("SELECT users.*,schools.school FROM users + LEFT JOIN schools ON users.schools_id=schools.id + WHERE users.year='$year' + AND users.enabled = '1' + AND users.new = '0' + AND FIND_IN_SET('student', users.`roles`)>0 + "); + $users = array(); + while($j = $q->fetch_assoc()) { + $p_user = user_load($mysqli, -1, -1, NULL, $j); + $pid = $p_user['s_pid']; + + if($pid == 0) { + print("No project for student uid={$p_user['uid']}
    "); + } + + if(!array_key_exists($pid, $projects)) { + $projects[$pid] = $projects_tmp[$pid]; + $projects[$pid]['students'] = array(); + $projects[$pid]['s_complete'] = true; + } + + $projects[$pid]['students'][] = $p_user; + if($p_user['s_complete'] == 0) { + $projects[$pid]['s_complete'] = false; + } + + $projects[$pid]['visit'] = false; + $projects[$pid]['visit_notes'] = ''; + + } + + $q = $mysqli->query("SELECT pid,notes,visit FROM visit_list WHERE uid='{$u['uid']}'"); + while($d = $q->fetch_row()) { + $pid = (int)$d[0]; + $notes = $d[1]; + $visit = (int)$d[2]; + if(array_key_exists($pid, $projects)) { + $projects[$pid]['visit'] = $visit; + $projects[$pid]['visit_notes'] = $notes; + } + } + + return $projects; +} + + +$page_id = 'c_visit_list'; +$help = '

    '; + + +sfiab_page_begin($u, "Visit List", $page_id, $help); + +?> + + +

    + +

    Visit List

    + +
      + + +
    • +

      Project :

      + +
      +
      + + + + + + + + +
      , Grade ,
      +
      +
      +
      +'Visit'); + form_check_group($form_id, 'visit', NULL, $data, $p['visit']); +?> +
      +
      + +
      + + +
      + +
    • + +
    + + diff --git a/c_volunteers.php b/c_volunteers.php new file mode 100644 index 00000000..0d9b6af7 --- /dev/null +++ b/c_volunteers.php @@ -0,0 +1,84 @@ + + + + +
    + + +

    *** Note: Volunteer registration is disabled in the configuration.

    + + +

    Working on the links in here. + + +

    Volunteers

    +

    Complete: / , plus not attending: . + +

    + + + +

    Volunteer Assignments

    + + +
    + + + diff --git a/c_volunteers_list.php b/c_volunteers_list.php new file mode 100644 index 00000000..54fe115e --- /dev/null +++ b/c_volunteers_list.php @@ -0,0 +1,59 @@ + + + +
    + +Work in progress... + +
      + +Not Attending'; + else if($j['v_complete']) + $status = 'Complete'; + else + $status = 'Incomplete'; + +?> +
    • +

      + fixme, info here + +
    • + +
    + + + + diff --git a/c_ysc_stats.php b/c_ysc_stats.php new file mode 100644 index 00000000..c2de1b60 --- /dev/null +++ b/c_ysc_stats.php @@ -0,0 +1,210 @@ + + Copyright (C) 2005 James Grant + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +require_once('common.inc.php'); +require_once('xml.inc.php'); +require_once('user.inc.php'); +require_once('project.inc.php'); +require_once('awards.inc.php'); +require_once('form.inc.php'); +require_once('stats.inc.php'); + + +$mysqli = sfiab_init('committee'); + +$page_id = "c_ysc_stats"; + + +$fair = array(); + +$stats = stats_get_export($mysqli, $fair, $config['year']); + +function s($a, $i) +{ + global $stats; + if(array_key_exists($i, $stats[$a])) { + return $stats[$a][$i]; + } + return 0; +} + +$q = $mysqli->query("SELECT COUNT(`id`) FROM `schools` WHERE year='{$config['year']}'"); +$r = $q->fetch_row(); +$total_schools = $r[0]; + +$ysc_stats = array(); +$ysc_stats ["numschoolstotal"]=$total_schools; +$ysc_stats ["numschoolsactive"]=$stats['schools']; +$ysc_stats ["numstudents"]=$stats['students_public'] + $stats['students_private']; +$ysc_stats ["numk6m"]=s('male',1) + s('male',2) + s('male',3) + s('male',4) + s('male',5) + s('male',6) ; +$ysc_stats ["numk6f"]=s('female',1) + s('female',2) + s('female',3) + s('female',4) + s('female',5) + s('female',6) ; +$ysc_stats ["num78m"]=s('male',7) + s('male',8); +$ysc_stats ["num78f"]=s('female',7) + s('female',8); +$ysc_stats ["num910m"]=s('male',9) + s('male',10); +$ysc_stats ["num910f"]=s('female',9) + s('female',10); +$ysc_stats ["num11upm"]=s('male',12) + s('male',12) + s('male',13); +$ysc_stats ["num11upf"]=s('female',12) + s('female',12) + s('female',13); +$ysc_stats ["projk6"]=s('project',1) + s('project',2) + s('project',3) + s('project',4) + s('project',5) + s('project',6) ; +$ysc_stats ["proj78"]=s('project',7) + s('project',8); +$ysc_stats ["proj910"]=s('project',9) + s('project',10); +$ysc_stats ["proj11up"]=s('project',12) + s('project',12) + s('project',13); +$ysc_stats ["committee"]=$stats['committee_members']; +$ysc_stats ["judges"]=$stats['judges']; + +$ysc_region_id = NULL; +$ysc_region_password = NULL; +$ysc_name = ''; + +$q = $mysqli->query("SELECT * FROM fairs WHERE abbrv='YSC'"); +if($q->num_rows >= 1) { + $f = $q->fetch_assoc(); + $ysc_region_id = $f['username']; + $ysc_region_password = $f['password']; + $ysc_name = $f['name']; +} + +$xml_data=array("affiliation"=>array( + "ysf_region_id"=>$ysc_region_id, + "ysf_region_password"=>$ysc_region_password, + 'year'=>$config['year'], + 'stats'=>$ysc_stats + ) + ); + +/* xmlcreaterecurse uses $output and $indent as a global variable */ +$output=""; +$indent = 0; +xmlCreateRecurse($xml_data); +$xml = $output; + +$action = array_key_exists('action', $_POST) ? $_POST['action'] : ''; + +switch($action) { +case 'send': + if($ysc_region_id === NULL) exit(); + + if(!function_exists('curl_init')) { + form_ajax_response(array('status'=>1, 'error'=>'Your PHP installation does not support CURL. You will need to login to the YSC system as the regional coodinator and upload the XML data manually')); + exit(); + } + +// print_r($_POST['xml']); + + $ch = curl_init(); /// initialize a cURL session + curl_setopt ($ch, CURLOPT_URL,"https://secure.youthscience.ca/registration/xmlaffiliation.php"); + curl_setopt ($ch, CURLOPT_HEADER, 0); /// Header control + curl_setopt ($ch, CURLOPT_POST, 1); /// tell it to make a POST, not a GET + curl_setopt ($ch, CURLOPT_POSTFIELDS, "xml=".$xml); /// put the query string here starting with "?" + curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); /// This allows the output to be set into a variable $datastream +// curl_setopt ($ch, CURLOPT_POSTFIELDSIZE, 0); + curl_setopt ($ch, CURLOPT_TIMEOUT, 360); + curl_setopt ($ch, CURLOPT_SSLVERSION, 3); + curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, false); +// $datastream = "deadbeef"; + $datastream = curl_exec ($ch); /// execute the curl session and return the output to a variable $datastream + $datastream = str_replace(" standalone=\"yes\"","",$datastream); + // echo "curl close
    "; + curl_close ($ch); /// close the curl session + +// $response=xml_parsexml($datastream); + + $ret = array(); + $ret['status'] = 0; + if(strstr($datastream, 'successfully updated')) { + $ret['status'] = 1; + $ret['happy'] = 'Statistics successfully updated'; + } else { + $ret['error'] = 'Update failed'; + } + sfiab_log_sync_stats($mysqli, $f['id'], $ret['status']); + + $ret['info'] = "The YSC Registration Server said: ".$datastream; + form_ajax_response($ret); + exit(); + } + + +$help = '

    '; +sfiab_page_begin($u, "$ysc_name Affiliation Statistics", $page_id, $help); + +?> + + +

    + +You have not yet specified a username for $ysc_name (your Region ID). Go to the Science Fair Management page to set it"; + $ok=false; + } + if($ysc_region_password == '') { + $error .= "
  • You have not yet specified a password for $ysc_name (your Region Password). Go to the Science Fair Management page to set it"; + $ok=false; + } + + form_page_begin($page_id, array(), $ok?'':'Found some problems preventing uploading YSC statistics:'); + + if(!$ok) { +?>
    +
  • + + + +

    Upload Statistics to

    + +

    The following data will be sent to + + + +$v) { ?> + + +
    + + +

    Raw XML to be Sent to Server

    +
    +
    + + + +
    + diff --git a/changes.html b/changes.html new file mode 100644 index 00000000..12cc3027 --- /dev/null +++ b/changes.html @@ -0,0 +1,105 @@ + + +

    Differences and Requirements for the new SFIAB

    + +

    The new Science Fair in a Box (SFIAB) version 3 is a complete rewrite of the +old SFIAB. This document highlights the major differences and between the new +version (SFIAB 3) and the old version you are currently using (SFIAB 2). This +rewrite was done for several reasons: + +

      +
    • The size of the code due to the number of fair-specific features +(hundreds of them) made it challenging to add new features without +inadvertently breaking existing ones. SFIAB 3 removes many of the little-used +and unused features. + +
    • The number of configuration options was daunting, hard to understand, and +hard to maintain. SFIAB 3 removes many of the configuration options which +simplifies and streamlines the entire system + +
    • The underlying code and database architecture was hard to adapt to modern +technology like mobile devices. SFIAB 3 has full mobile support, and uses a +database layout that is faster. You'll notice the difference just loading the +user list. + +
    • CWSF concepts like challenges and unified judging of age categories were +hard to fit in to the existing code. Supporting both the new challenge +system and the old division system would make the code even more complex and +unmaintainable. SFIAB 3 follows the CWSF model of a fair. Many fairs were +already asking for challenge support. + +
    • We actually want to help our regional fairs, rather than use all our free +time to maintain SFIAB. + +
    + +

    Essentially, to use the new SFIAB, you must model your fair like the +Canada-Wide. Many fairs already do this. + +

    You are free to continue using the old SFIAB if the new one doesn't fit into +your fair model, we just won't be adding new features to it. + + +

    Detailed Feature Comparison, SFIAB 3 vs. SFIAB 2

    + +

    General

    +
      +
    • Full mobile and tablet support +
    • Cleaner and faster interface +
    • Fundraising system is removed +
    • Translation system is removed (no French translation of SFIAB available) +
    • Multiple fairs per SFIAB installation is removed +
    • Full judging support and score entry for CUSP judging (see below) +
    • Automatic award download from linked regional/national fairs, automatic winner and stats upload. +
    • Judge and Tour schedulers rewritten, about 100 times faster now. +As such, the configurable effort settings are removed. Only high-effort is available. + +
    + +

    Registration

    +
      +
    • Only open registration is supported. Password-protected and school-specific registration is not supported +
        +
      • Registration may now be opened for a single user (student, judge) after general registration closes +
      +
    • Registration fee is per-student (or none). Per-project registration fee is not supported +
    • Support for multiple users on a single email address +
    • Project numbers are only assigned after the signature form is received +
    • Required/optional information fields are no longer configurable +
    • Configurable registration-fee items are not supported +
    • Students must register separately and one must invite the other to a project. The signature page/registration can then be completed as a pair. +
    • ISEF project divisions are used to match students with judges +
    + +

    Setup

    +
      +
    • Age categories and challenges are configurable, but each age category must be judged together. Divisions are gone. +
    • Maximum 2 students per project, not configurable. +
    • Sub-categories and sub-divisions (sub-challenges) are all no longer supported +
    + +

    Schools

    +
      +
    • School/Teacher login is not supported. It will be added again, but currently is unavailable +
    + + +

    Judging

    +
      +
    • The only supported judging system is two-round CUSP judging +
        +
      • This is not a requirement. Judges can register and the judge scheduler can assign them to teams and projects and generate forms for each judging team. But all the scoring/winner entry must be done manually after that. +
      +
    • The only supported judge scoring system is 3*scientific + 2*originality 1*communication. Each of the three is scored using a number from 1-4, with low,medium,high for each number. +
        +
      • This is not a requirement, but this is how the judge forms are created (not configurable). No other form of electronic entry is available. +
      +
    • Support added to generate judging score forms and time schedules for each judging team and project +
    • Support added for disqualified projects and projects unavailable in specific timeslots (the judge timeslot scheduler will assign judges appropriately) +
    • Automatic generation of second-round CUSP judging teams and projects to judge +
    • Judge score entry system to determine winners in each category +
    + + + + diff --git a/cms.php b/cms.php deleted file mode 100644 index 8f7fed43..00000000 --- a/cms.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - diff --git a/committee.inc.php b/committee.inc.php deleted file mode 100644 index 4b506ad8..00000000 --- a/committee.inc.php +++ /dev/null @@ -1,31 +0,0 @@ - diff --git a/committee/.htaccess b/committee/.htaccess new file mode 100644 index 00000000..2ff16417 --- /dev/null +++ b/committee/.htaccess @@ -0,0 +1,2 @@ +Require all denied +Options -Indexes diff --git a/committee/email_lists.inc.php b/committee/email_lists.inc.php new file mode 100644 index 00000000..4528f5f2 --- /dev/null +++ b/committee/email_lists.inc.php @@ -0,0 +1,227 @@ + array( 'name' => 'Judges -- All complete and incomplete, includes not-attending', + 'where' => "FIND_IN_SET('judge',`roles`)>0 AND `enabled`='1' AND `new`='0'", + ), + 'judges_complete' => array( 'name' => 'Judges -- Complete (and attending)', + 'where' => "FIND_IN_SET('judge',`roles`)>0 AND `enabled`='1' AND `j_complete`='1' AND `attending`='1'", + ), + 'judges_incomplete' => array( 'name' => 'Judges -- Incomplete (and attending)', + 'where' => "FIND_IN_SET('judge',`roles`)>0 AND `enabled`='1' AND `j_complete`='0' AND `attending`='1' AND `new`='0'", + ), + + 'students_accepted' => array( 'name' => 'Students -- Accepted (sig. form received)', + 'where' => "FIND_IN_SET('student',`roles`)>0 AND `s_accepted`='1' AND `enabled`='1'", + ), + 'students_complete' => array( 'name' => 'Students -- Complete (but no sig form yet)', + 'where' => "FIND_IN_SET('student',`roles`)>0 AND `s_complete`='1' AND `enabled`='1'", + ), + 'students_incomplete' => array( 'name' => 'Students -- Incomplete', + 'where' => "FIND_IN_SET('student',`roles`)>0 AND `s_complete`='0' AND `enabled`='1' AND `new`='0'", + ), + 'volunteers_complete' => array( 'name' => 'Volunteers -- Complete (and attending)', + 'where' => "FIND_IN_SET('volunteer',`roles`)>0 AND `v_complete`='1' AND `enabled`='1' AND `attending`='1' ", + ), + 'volunteers_incomplete' => array( 'name' => 'Volunteers -- Incomplete', + 'where' => "FIND_IN_SET('volunteer',`roles`)>0 AND `v_complete`='0' AND `enabled`='1' AND `attending`='1' AND `new`='0'", + ), + + 'one_user' => array( 'name' => 'Send to a single (active or complete) user', + 'where' => " `enabled`='1' AND `new`='0'", + ), + ); + + + + + + + +/* + "committee_all"=>array("name"=>"Committee members (all)","query"=> + "SELECT firstname, lastname, organization, email FROM users WHERE types LIKE '%committee%' AND deleted='no' GROUP BY uid"), +*/ + /* The WHERE clause evaluates which rows to add to the GROUP + BY, the HAVING clase evaluates which grouped rows show up. We + want to to evaluate 'deleted' AFTER the grouping, so we catch + the case where the MAX(year) has deleted='yes'. If we use WHERE + deleted='no', we'll only add non-deleted rows to the group, and + end up picking up a user active in, say 2007 and 2008, but + deleted in 2009. */ +/* + "judges_all"=>array("name"=>"Judges from all years (except deleted judges)","query"=> + "SELECT firstname, lastname, email, deleted, MAX(year) + FROM users WHERE types LIKE '%judge%' GROUP BY uid HAVING deleted='no' ORDER BY email"), + + "judges_active_thisyear"=>array("name"=>"Judges (all) active for this year", "query"=> + "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"), + + "judges_div_active_thisyear"=>array("name"=>"Judges (regular judges only) active for this year", "query"=> + "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND deleted='no' AND users_judge.judge_active='yes' AND (users_judge.special_award_only='no' OR users_judge.special_award_only='' OR users_judge.special_award_only IS NULL) ORDER BY email"), + + "judges_spec_active_thisyear"=>array("name"=>"Judges (special award judges only) active for this year", "query"=> + "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND deleted='no' AND users_judge.judge_active='yes' AND users_judge.special_award_only='yes' ORDER BY email"), + + "judges_inactive"=>array("name"=>"Judges not active for this year", "query"=> + "SELECT firstname, lastname, email, judge_active, deleted, MAX(year) + FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id + WHERE types LIKE '%judge%' + GROUP BY uid HAVING deleted='no' AND ((max(year)='{$config['FAIRYEAR']}' AND judge_active='no') OR max(year)<'{$config['FAIRYEAR']}') + ORDER BY email"), + + "judges_active_complete_thisyear"=>array("name"=>"Judges active for this year and complete", "query"=> + "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND users_judge.judge_complete='yes' AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"), + + "judges_active_incomplete_thisyear"=>array("name"=>"Judges active for this year but not complete", "query"=> + "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND users_judge.judge_complete='no' AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"), + + "participants_complete_thisyear"=>array("name"=>"Participants complete this year","query"=> + "SELECT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND registrations.year='".$config['FAIRYEAR']."' AND ( registrations.status='complete' OR registrations.status='paymentpending') ORDER BY students.email"), + + "participants_complete_paymentpending_thisyear"=>array("name"=>"Participants complete this year but payment pending","query"=> + "SELECT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND registrations.year='".$config['FAIRYEAR']."' AND registrations.status!='complete' AND registrations.status='paymentpending' ORDER BY students.email"), + + "participants_notcomplete_thisyear"=>array("name"=>"Participants not complete this year","query"=> + "SELECT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND registrations.year='".$config['FAIRYEAR']."' AND registrations.status!='complete' AND registrations.status!='new' ORDER BY students.email"), + + "participants_complete_lastyear"=>array("name"=>"Participants complete last year","query"=> + "SELECT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND registrations.year='".($config['FAIRYEAR']-1)."' AND ( registrations.status='complete' OR registrations.status='paymentpending') ORDER BY students.email"), + + "participants_complete_allyears"=>array("name"=>"Participants complete all years","query"=> + "SELECT DISTINCT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND ( registrations.status='complete' OR registrations.status='paymentpending') ORDER BY students.email"), + + "participants_cwsf_thisyear"=>array("name"=>"CWSF Winners for this year","query"=>" + SELECT DISTINCT students.firstname, students.lastname, students.email + FROM award_awards + JOIN award_prizes ON award_prizes.award_awards_id=award_awards.id + JOIN winners ON winners.award_prize_id=award_prizes.id + JOIN projects ON winners.projects_id=projects.id + JOIN registrations ON projects.registrations_id=registrations.id + JOIN students ON students.registrations_id=registrations.id + WHERE award_awards.cwsfaward='1' AND winners.year='".$config['FAIRYEAR']."' + ORDER BY students.email"), + + "sponsors"=>array("name"=>"Organization sponsors","query"=> + "SELECT id, organization, email FROM sponsors WHERE email!='' ORDER BY email"), + + "sponsors_primarycontacts"=>array("name"=>"Organization sponsors (primary contacts)","query"=> + "SELECT uid, MAX(users.year) AS year, sponsors.organization, users.firstname, users.lastname, users.email, deleted, users_sponsor.primary + FROM sponsors, + users_sponsor, + users + WHERE + users.id=users_sponsor.users_id + AND users_sponsor.sponsors_id=sponsors.id + AND users.types LIKE '%sponsor%' + AND users.email!='' + GROUP BY uid + HAVING deleted='no' AND users_sponsor.primary='yes' + ORDER BY users.email + "), + + "sponsors_allcontacts"=>array("name"=>"Organization sponsors (all contacts)","query"=> + "SELECT DISTINCT(users.email), sponsors.organization, users.firstname, users.lastname, users.email + FROM sponsors, + users_sponsor, + users + WHERE + users.id=users_sponsor.users_id + AND users_sponsor.sponsors_id=sponsors.id + AND users.types LIKE '%sponsor%' + AND users.deleted='no' + AND users.email!='' + ORDER BY users.email + "), + + "sponsors_specialawards"=>array("name"=>"Organization sponsors for Special Awards","query"=> + "SELECT DISTINCT sponsors.id, organization, email + FROM sponsors + JOIN award_awards ON sponsors.id=award_awards.sponsors_id + WHERE + email!='' + AND award_awards.award_types_id=2 + ORDER BY email"), + + + "sponsors_primarycontacts_specialawards"=>array("name"=>"Organization sponsors for Special Awards (primary contacts)","query"=> + "SELECT DISTINCT uid, MAX(users.year) AS year, sponsors.organization, users.firstname, users.lastname, users.email, deleted, users_sponsor.primary + FROM sponsors, + users_sponsor, + users, + award_awards + WHERE + users.id=users_sponsor.users_id + AND users_sponsor.sponsors_id=sponsors.id + AND users.types LIKE '%sponsor%' + AND users.email!='' + AND sponsors.id=award_awards.sponsors_id + AND award_awards.award_types_id=2 + GROUP BY uid + HAVING deleted='no' AND users_sponsor.primary='yes' + ORDER BY users.email + "), + + "sponsors_allcontacts_specialawards"=>array("name"=>"Organization sponsors for Special Awards (all contacts)","query"=> + "SELECT DISTINCT(users.email), sponsors.organization, users.firstname, users.lastname, users.email + FROM sponsors, + users_sponsor, + users, + award_awards + WHERE + users.id=users_sponsor.users_id + AND users_sponsor.sponsors_id=sponsors.id + AND users.types LIKE '%sponsor%' + AND users.deleted='no' + AND users.email!='' + AND sponsors.id=award_awards.sponsors_id + AND award_awards.award_types_id=2 + ORDER BY users.email + "), +*/ +/* + "special_award_sponsors_unconfirmed"=>array("name"=>"Special award sponsors (unconfirmed only)","query"=> + "SELECT DISTINCT(award_sponsors.id), organization, firstname, lastname, award_contacts.email FROM award_sponsors, award_awards, award_contacts WHERE award_awards.sponsors_id=award_sponsors.id AND award_contacts.award_sponsors_id=award_sponsors.id AND award_sponsors.confirmed='no' AND award_awards.award_types_id='2' AND award_contacts.year='".$config['FAIRYEAR']."'"), + + "special_award_sponsors_all"=>array("name"=>"Special award sponsors (all)","query"=> + "SELECT DISTINCT(award_sponsors.id), organization, firstname, lastname, award_contacts.email FROM award_sponsors, award_awards, award_contacts WHERE award_awards.sponsors_id=award_sponsors.id AND award_contacts.award_sponsors_id=award_sponsors.id AND award_awards.award_types_id='2' AND award_contacts.year='".$config['FAIRYEAR']."'"), + +*/ +/* + "school_principals"=>array("name"=>"School principals","query"=> + "SELECT schools.principal_uid AS uid, schools.school, users.firstname AS firstname, users.lastname AS lastname, users.email AS email FROM schools + JOIN users ON schools.principal_uid=users.uid AND users.id=(SELECT id FROM users WHERE users.uid=schools.principal_uid ORDER BY `year` DESC LIMIT 1) + WHERE schools.year='".$config['FAIRYEAR']."' AND users.email!=''"), + + "school_scienceheads"=>array("name"=>"School science heads","query"=> + "SELECT schools.sciencehead_uid AS uid, schools.school, users.firstname AS firstname, users.lastname AS lastname, users.email AS email FROM schools + JOIN users ON schools.sciencehead_uid=users.uid AND users.id=(SELECT id FROM users WHERE users.uid=schools.sciencehead_uid ORDER BY `year` DESC LIMIT 1) + WHERE schools.year='".$config['FAIRYEAR']."' AND users.email!=''"), + + "school_teachers_thisyear"=>array("name"=>"Teachers (as entered by students) this year","query"=> + "SELECT teacheremail AS email, MIN(teachername) AS firstname FROM students WHERE year='".$config['FAIRYEAR']."' AND teacheremail!='' GROUP BY teacheremail"), + + "school_teachers_lastyear"=>array("name"=>"Teachers (as entered by students) last year","query"=> + "SELECT DISTINCT(teacheremail) AS email, teachername AS firstname FROM students WHERE year='".($config['FAIRYEAR']-1)."' AND teacheremail!=''"), + + "school_teachers_allyears"=>array("name"=>"Teachers (as entered by students) all years","query"=> + "SELECT DISTINCT(teacheremail) AS email, teachername AS firstname FROM students WHERE teacheremail!=''"), + */ +/* Volunteers */ +/* + "volunteers_active_complete_thisyear"=>array("name"=>"Volunteers active for this year and complete", "query"=> + "SELECT id, firstname, lastname, email FROM users LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id WHERE users.year='{$config['FAIRYEAR']}' AND users_volunteer.volunteer_complete='yes' AND users_volunteer.volunteer_active='yes' AND users.deleted='no' AND types LIKE '%volunteer%' ORDER BY email"), + + "volunteers_active_incomplete_thisyear"=>array("name"=>"Volunteers active for this year but not complete", "query"=> + "SELECT id, firstname, lastname, email FROM users LEFT JOIN users_volunteer ON users_volunteer.users_id=users.id WHERE users.year='{$config['FAIRYEAR']}' AND users_volunteer.volunteer_complete='no' AND users_volunteer.volunteer_active='yes' AND users.deleted='no' AND users.types LIKE '%volunteer%' ORDER BY email"), +*/ +?> diff --git a/committee/exhibithall.inc.php b/committee/exhibithall.inc.php new file mode 100644 index 00000000..74253509 --- /dev/null +++ b/committee/exhibithall.inc.php @@ -0,0 +1,145 @@ +1); +$loc[] = array('y'=>-1.2, 'r'=>3); +$loc[] = array('y'=>-1.2*3); +$loc[] = array('y'=>-1.2, 'r'=>3); +$loc[] = array('y'=>-1.2*3); +$loc[] = array('y'=>-1.2, 'r'=>3); + +$loc[] = array('x'=>3, 'y'=>1.2, 'o'=>180); +$loc[] = array('y'=>1.2, 'r'=>17); + +$loc[] = array('x'=>.8, 'o'=>-180); +$loc[] = array('y'=>-1.2, 'r'=>17); + +$loc[] = array('x'=>3, 'o'=>180); +$loc[] = array('y'=>1.2, 'r'=>17); + +$loc[] = array('x'=>.8, 'o'=>-180); +$loc[] = array('y'=>-1.2, 'r'=>17); + +$loc[] = array('x'=>3, 'o'=>180); +$loc[] = array('y'=>1.2, 'r'=>17); + +$loc[] = array('x'=>.8, 'o'=>-180); +$loc[] = array('y'=>-1.2, 'r'=>17); + +$loc[] = array('x'=>3, 'y'=>-1.2, 'o'=>180); +$loc[] = array('y'=>1.2, 'r'=>17); +//$loc[] = array('x'=>.8, 'o'=>-180); + +/* +$loc[] = array('y'=>1.2, 'r'=>3); +$loc[] = array('y'=>1.2*3); +$loc[] = array('y'=>1.2, 'r'=>2); +$loc[] = array('y'=>1.2*3); + +$loc[] = array('y'=>1.2, ); +$loc[] = array('y'=>1.2*5); +$loc[] = array('y'=>1.2); +*/ + +/* Along the bottom */ +/*$loc[] = array('reset'=>true, 'x'=>13.4, 'y'=>34.6, 'o' => 180); +$loc[] = array('x'=>-1.2, 'r'=>5); +$loc[] = array('x'=>-2.4); +$loc[] = array('x'=>-1.2, 'r'=>3); +*/ + +/* And the party room */ +$loc[] = array('reset'=>true, 'x'=>7.8, 'y'=>26.2, 'o' => 270, 'eh'=>2,'floornumber'=>175); +$loc[] = array('y'=>-1.2, 'r'=>19); + +$loc[] = array('x'=>-3.3, 'y'=>1.2, 'o'=>-180); +$loc[] = array('y'=>1.2, 'r'=>17); + +$loc[] = array('x'=>-.8, 'o'=>180); +$loc[] = array('y'=>-1.2, 'r'=>17); + +$loc[] = array('x'=>-3.3, 'y'=>-1.2, 'o'=>-180); +$loc[] = array('y'=>1.2, 'r'=>17); + +/* Along the bottom */ +/* +$loc[] = array('reset'=>true, 'x'=>2, 'y'=>25.8, 'o' => 180 ); +$loc[] = array('x'=>1.2, 'r'=>3); +*/ + +$objects = array(); + +$floornumber = 1; +$oid = 0; + +$x = $sx; +$y = $sy; +$o = $so; +$eh = 1; +foreach($loc as $l) { + $r = $l['r']; + if($l['eh'] != 0) $eh = $l['eh']; + if($r == 0) $r = 1; + while($r > 0) { + if($l['reset'] == true) { + $x = $l['x']; + $y = $l['y']; + $o = $l['o']; + if(array_key_exists('floornumber',$l)) + $floornumber = $l['floornumber']; + } else { + $x += $l['x']; + $y += $l['y']; + $o += $l['o']; + } + + $objects[$oid] = array( 'name' => "Location $oid", + 'id' => $oid, + 'w' => 1.2, + 'h' => 0.8, + 'x' => $x, + 'y' => $y, + 'o' => $o, + 'type' => 'project', + 'floor_number' => $floornumber++, + 'eh_id' => $eh, + 'divs' => array(), + 'cats' => array(), + 'has_electricity' => 'yes', + ); + //rint_r($objects[$oid]); + $oid++; + $r--; + } +} + +echo "Defined {$oid} projects.\n"; + +echo "Saving to database...\n"; +/* Save to DB */ +mysql_query("DELETE FROM exhibithall WHERE type='project'"); +foreach($objects as $oid=>$o) { + $divs = serialize($o['divs']); + $cats = serialize($o['cats']); + mysql_query("INSERT INTO exhibithall(`id`,`name`,`type`,`x`,`y`,`w`,`h`,`orientation`,`exhibithall_id`,`floornumber`,`divs`,`cats`,`has_electricity`) + VALUES('', '{$o['name']}','{$o['type']}', + '{$o['x']}','{$o['y']}','{$o['w']}','{$o['h']}', + '{$o['o']}', + '{$o['eh_id']}', + '{$o['floor_number']}','$divs','$cats', + '{$o['has_electricity']}')"); +} +echo "Done.\n"; + diff --git a/committee/judges.inc.php b/committee/judges.inc.php new file mode 100644 index 00000000..52c3141e --- /dev/null +++ b/committee/judges.inc.php @@ -0,0 +1,99 @@ +query("SELECT * FROM users WHERE + year='$year' + AND FIND_IN_SET('judge',`roles`)>0 + AND `enabled`='1'"); + $judges = array(); + while($j = $q->fetch_assoc()) { + $judges[(int)$j['uid']] = user_load($mysqli, -1, -1, NULL, $j); + } + return $judges; +} + + + +function jteam_load($mysqli, $jteam_id, $pdata = false) +{ + if($pdata == false) { + $r = $mysqli->query("SELECT * FROM judging_teams WHERE id=$jteam_id LIMIT 1"); + if($r->num_rows == 0) { + return NULL; + } + $jteam = $r->fetch_assoc(); + } else { + $jteam = $pdata; + } + + filter_int_list($jteam['project_ids']); + filter_int_list($jteam['user_ids']); + filter_int($jteam['award_id']); + filter_int($jteam['num']); + filter_int($jteam['round']); + filter_int($jteam['prize_id']); + filter_int($jteam['cusp_n_up']); + + /* HACK Remove zeros because sometimes they get added, not sure how */ + $l = array(); + foreach($jteam['user_ids'] as $uid) { + if($uid > 0) { + $l[] = $uid; + } + } + $jteam['user_ids'] = $l; + + unset($jteam['original']); + $original = $jteam; + $jteam['original'] = $original; + return $jteam; +} + +function jteams_load_all($mysqli, $year=NULL) +{ + global $config; + if($year === NULL) $year = $config['year']; + $q = $mysqli->query("SELECT * FROM judging_teams WHERE + judging_teams.year='$year'"); + $jteams = array(); + while($j = $q->fetch_assoc()) { + $jteams[(int)$j['id']] = jteam_load($mysqli, -1, $j); + } + return $jteams; +} + +function jteams_load_all_for_judge($mysqli, $judge_id, $year=NULL) +{ + global $config; + if($year === NULL) $year = $config['year']; + $q = $mysqli->query("SELECT * FROM judging_teams WHERE + judging_teams.year='$year' + AND FIND_IN_SET('$judge_id',`judging_teams`.`user_ids`)>0 + ORDER BY `round` "); + $jteams = array(); + while($j = $q->fetch_assoc()) { + $jteams[intval($j['id'])] = jteam_load($mysqli, -1, $j); + } + return $jteams; + +} + +function jteam_save($mysqli, &$jteam) +{ + generic_save($mysqli, $jteam, "judging_teams", "id"); +} + +function jteam_create($mysqli) +{ + global $config; + $mysqli->real_query("INSERT INTO judging_teams (`name`,`autocreated`,`year`) VALUES ('New Judging Team', '0','{$config['year']}')"); + $id = $mysqli->insert_id; + return jteam_load($mysqli, $id); +} + +?> diff --git a/committee/students.inc.php b/committee/students.inc.php new file mode 100644 index 00000000..b4c01eed --- /dev/null +++ b/committee/students.inc.php @@ -0,0 +1,39 @@ +query("SELECT * FROM users WHERE + year='$year' + AND FIND_IN_SET('student',`roles`)>0 + AND enabled = '1' + "); + $students = array(); + while($j = $q->fetch_assoc()) { + $students[] = user_load($mysqli, -1, -1, NULL, $j); + } + return $students; +} + +function students_load_all_accepted($mysqli, $year=0) +{ + global $config; + if($year == 0) $year = $config['year']; + + $q = $mysqli->query("SELECT * FROM users WHERE + year='$year' + AND FIND_IN_SET('student',`roles`)>0 + AND enabled = '1' + AND s_accepted = '1' + "); + $students = array(); + while($j = $q->fetch_assoc()) { + $students[(int)$j['uid']] = user_load($mysqli, -1, -1, NULL, $j); + } + return $students; +} + +?> diff --git a/committee/volunteers.inc.php b/committee/volunteers.inc.php new file mode 100644 index 00000000..feae29b1 --- /dev/null +++ b/committee/volunteers.inc.php @@ -0,0 +1,17 @@ +query("SELECT * FROM users WHERE + year='$year' + AND FIND_IN_SET('volunteer',`roles`)>0"); + $volunteers = array(); + while($j = $q->fetch_assoc()) { + $volunteers[] = user_load($mysqli, -1, -1, NULL, $j); + } + return $volunteers; +} + + +?> diff --git a/committee_main.php b/committee_main.php deleted file mode 100644 index 02cd1d27..00000000 --- a/committee_main.php +++ /dev/null @@ -1,59 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2007 David Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -%1', array($_SESSION['name'])); -echo '
    '; -echo '
    '; - -echo ''; -echo ' '; -if (committee_auth_has_access('config')) { - echo ' '; -} -if (committee_auth_has_access('admin')) { - echo ' '; - echo ' '; -} -echo " \n"; - -echo " \n"; -echo ' '; -echo ' '; -echo ' '; -echo " \n"; -echo "
    ' . theme_icon('configuration') . '
    ' . i18n('Configure SFIAB') . '
    ' . theme_icon('administration') . '
    ' . i18n('Administer the Fair') . '
    ' . theme_icon('print/export_reports') . '
    ' . i18n('My Reports (View/Print/Edit)') . '
    ' . theme_icon('edit_profile') . '
    ' . i18n('Edit My Profile') . '
    ' . theme_icon('change_password') . '
    ' . i18n('Change My Password') . '
    ' . theme_icon('manage_roles') . '
    ' . i18n('Manage My Roles') . '
    \n"; - -send_footer(); -?> diff --git a/committees.php b/committees.php deleted file mode 100644 index 74d1010a..00000000 --- a/committees.php +++ /dev/null @@ -1,110 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -'; -$q = $pdo->prepare('SELECT * FROM committees ORDER BY ord,name'); -$q->execute(); - -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - /* Select all the u$q=("SELECT * FROM committees ORDER BY ord,name");sers in the committee, using MAX(year) for the most recent year */ - $q2 = $pdo->prepare("SELECT committees_link.*,users.uid,MAX(users.year),users.lastname - FROM committees_link LEFT JOIN users ON users.uid = committees_link.users_uid - WHERE committees_id=? - GROUP BY users.uid ORDER BY ord,users.lastname"); - $q2->execute([$r->id]); - // if there's nobody in this committee, then just skip it and go on to the next one. - if ($q2->rowCount() == 0) - continue; - - echo ''; - echo '

    ' . i18n($r->name) . '

    '; - echo "\n"; - - show_pdo_errors_if_any($pdo); - - while ($r2 = $q2->fetch(PDO::FETCH_OBJ)) { - $uid = $r2->users_uid; - $u = user_load_by_uid($uid); - - $output = $config['committee_publiclayout']; - - $name = get_value_from_array($r2, 'firstname') . ' ' . $r2->lastname; - - $output = str_replace('name', get_value_from_array($u, 'name', ''), $output); - $output = str_replace('title', $r2->title, $output); - - // make sure we do emailprivate before email so we dont match the wrong thing - if ((get_value_from_array($u, 'emailprivate')) && get_value_from_array($u, 'displayemail') == 'yes') { - list($b, $a) = explode('@', $u['emailprivate']); - $output = str_replace('emailprivate', "", $output); - } else - $output = str_replace('emailprivate', '', $output); - - if (get_value_from_array($u, 'email') && get_value_from_array($u, 'displayemail') == 'yes') { - list($b, $a) = explode('@', $u['email']); - $output = str_replace('email', "", $output); - } else - $output = str_replace('email', '', $output); - - $output = str_replace('phonehome', get_value_from_array($u, 'phonehome', ''), $output); - $output = str_replace('phonework', get_value_from_array($u, 'phonework', ''), $output); - $output = str_replace('phonecell', get_value_from_array($u, 'phonecell', ''), $output); - $output = str_replace('fax', get_value_from_array($u, 'fax', ''), $output); - - echo $output; - - /* - * echo ""; - * echo "    $r2->name"; - * echo ""; - * if($r2->title) echo "    $r2->title"; - * else echo " "; - * echo ""; - * if($r2->email) - * { - * echo "     "; - * list($b,$a)=explode("@",$r2->email); - * echo ""; - * } - * else - * echo " "; - * - * echo "\n"; - */ - } - echo " \n"; -} -echo ''; - -echo '
    '; -echo '' . i18n('Contact a committee member') . ''; - -send_footer(); -?> diff --git a/common.inc.php b/common.inc.php index 605a17db..fc896017 100644 --- a/common.inc.php +++ b/common.inc.php @@ -1,1609 +1,1149 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -*'); +/* It's kinda important that there be no blank lines BEFORE this, or they're sent as newlines. This messes + * up login.php */ -// figure out the directory to prepend to directoroy names, depending on if we are in a subdirectory or not -// Dennis Fix so works in windows servers. -// Windows based servers use '\' in directories. This code works for WIN servers and or *nix servers. -if (substr(getcwd(), -6) == '/admin' || substr(getcwd(), -6) == '\admin') - $prependdir = '../'; -else if (substr(getcwd(), -6) == '/super' || substr(getcwd(), -6) == '\super') - $prependdir = '../'; -else if (substr(getcwd(), -7) == '/config' || substr(getcwd(), -7) == '\config') - $prependdir = '../'; -else if (substr(getcwd(), -3) == '/db' || substr(getcwd(), -3) == '\db') - $prependdir = '../'; -else if (substr(getcwd(), -8) == '/scripts' || substr(getcwd(), -8) == '\scripts') - $prependdir = '../'; -else if (substr(getcwd(), -4) == '/app' || substr(getcwd(), -4) == '\app') - $prependdir = '../'; -else - $prependdir = ''; +$config = array(); -$sfiabversion = @file($prependdir . 'version.txt'); -$config['version'] = trim($sfiabversion[0]); +$sfiab_roles = array( 'student' => array('name' => 'Student'), +// 'teacher' => array(), + 'judge' => array('name' => 'Judge'), + 'committee' => array('name' => 'Committee'), + 'volunteer' => array('name' => 'Volunteer'), + 'sponsor' => array('name' => 'Sponsor') + ); -// make sure the data subdirectory is writable, if its not, then we're screwed, so make sure it is! -if (!is_writable($prependdir . 'data')) { - echo 'SFIAB ERROR'; - echo '

    Science Fair In A Box - ERROR

    '; - echo 'data/ subdirectory is not writable by the web server'; - echo '
    '; - echo '

    Details

    '; - echo 'The data/ subdirectory is used to store files uploaded through the SFIAB software. The web server must have write access to this directory in order to function properly. Please contact your system administrator (if you are the system administrator, chown/chmod the data directory appropriately).'; - echo '
    '; - echo ''; - exit; -} +$tshirt_sizes = array('none' => 'None', + 'xsmall' => 'X-Small', + 'small' => 'Small', + 'medium' => 'Medium', + 'large' => 'Large', + 'xlarge' => 'X-Large' ); -if (file_exists($prependdir . 'data/config.inc.php')) { - require_once ($prependdir . 'data/config.inc.php'); -} else { - echo 'SFIAB'; - echo '

    Science Fair In A Box - Installation

    '; - echo 'It looks like this is a new installation of SFIAB, and the database has not yet been configured. Please choose from the following options:
    '; - echo '
    '; - echo 'Proceed with Fresh SFIAB Installation'; - echo '
    '; - echo ''; - exit; -} +$pages_disabled_in_preregistration = array ('s_tours', 's_awards','s_signature', 's_payment' ); -$dsn = "mysql:host=db;dbname=$DBNAME;charset=utf8mb4"; +$signature_types = array('student' => 'Exhibitor', 'parent' => 'Parent/Guardian', 'teacher'=>'Teacher', 'ethics'=>'Supervisor'); -$pdo = new PDO($dsn, $DBUSER, $DBPASS); -if (!$pdo) { - echo 'SFIAB ERROR'; - echo '

    Science Fair In A Box - ERROR

    '; - echo 'Cannot connect to database!'; - echo ''; - exit; -} - -// find out the fair year and any other 'year=0' configuration parameters (things that dont change as the years go on) - -// we might get an error if installation step 2 is not done (ie, the config table doesnt even exist) - -// if we have 0 (<1) then install2 is not done, which would get caught above, -// if we have 1 (<2) then insatll3 is not done (no entries for FAIRYEAR and SFIABDIRECTORY) -$q = $pdo->prepare("SELECT * FROM config WHERE year='0'"); -$q->execute(); - -if ($pdo->errorInfo()[0] != '00000') { - echo 'SFIAB ERROR'; - echo '

    Science Fair In A Box - ERROR

    '; - echo 'SFIAB installation is not complete. Please go to Installer Step 2 to complete the installation process'; - echo '
    '; - echo ''; - exit; -} - -if ($q->rowCount() < 2) { - echo 'SFIAB ERROR'; - echo '

    Science Fair In A Box - ERROR

    '; - echo 'SFIAB installation is not complete. Please go to Installer Step 3 to complete the installation process'; - echo '
    '; - echo ''; - exit; -} else { - while ($r = $q->fetch()) { - $config[$r['var']] = $r['val']; - } -} - -$dbdbversion = $config['DBVERSION']; -$dbcodeversion = @file($prependdir . 'db/db.code.version.txt'); -$dbcodeversion = trim($dbcodeversion[0]); - -if (!$dbdbversion) { - echo 'SFIAB ERROR'; - echo '

    Science Fair In A Box - ERROR

    '; - echo 'SFIAB installation is not complete. Please go to Installer Step 2 to complete the installation process'; - echo '
    '; - echo ''; - exit; -} - -if (!$_SERVER['REQUEST_URI'] == 'db_update.php' && ($dbcodeversion != $dbdbversion)) { - echo 'SFIAB ERROR'; - echo '

    Science Fair In A Box - ERROR

    '; - echo 'SFIAB database and code are mismatched'; - echo '
    '; - echo 'Please run the db_update.php script in order to update'; - echo '
    '; - echo 'your database to the same version as the code'; - echo '
    '; - echo '
    '; - echo '
    '; - echo '

    Details

    '; - echo 'Current SFIAB codebase requires DB version: ' . $dbcodeversion; - echo '
    '; - echo 'Current SFIAB database is detected as version: ' . $dbdbversion; - echo '
    '; - echo ''; - exit; -} - -// now pull the rest of the configuration -$q = $pdo->prepare('SELECT * FROM config WHERE year=?'); -$q->execute([$config['FAIRYEAR']]); -while ($r = $q->fetch()) { - $config[$r['var']] = $r['val']; -} - -// now pull the dates -$q = $pdo->prepare('SELECT * FROM dates WHERE year=?'); -$q->execute([$config['FAIRYEAR']]); -while ($r = $q->fetch()) { - $config['dates'][$r['name']] = $r['date']; -} - -// and now pull the theme -require_once ("theme/{$config['theme']}/theme.php"); -require_once ("theme/{$config['theme_icons']}/icons.php"); - -require_once ('committee.inc.php'); - -if ($config['SFIABDIRECTORY'] == '') { - session_name('SFIABSESSID'); - session_set_cookie_params(0, '/'); -} else { - session_name('SFIABSESSID' . preg_replace('/[^A-Za-z]/', '_', $config['SFIABDIRECTORY'])); - session_set_cookie_params(0, $config['SFIABDIRECTORY']); -} - -session_start(); - -// detect the browser first, so we know what icons to use - we store this in the config array as well -// even though its not configurable by the fair -if (stristr(get_value_from_array($_SERVER, 'HTTP_USER_AGENT', ''), 'MSIE')) - $config['icon_extension'] = 'gif'; -else - $config['icon_extension'] = 'png'; - -// now get the languages, and make sure we have at least one active language - -$q = $pdo->prepare("SELECT * FROM languages WHERE active='Y' ORDER BY langname"); -$q->execute(); -if ($q->rowCount() == 0) { - echo 'No active languages defined, defaulting to English'; - $config['languages']['en'] = 'English'; -} else { - while ($r = $q->fetch()) { - $config['languages'][$r['lang']] = $r['langname']; - } -} -// now if no language has been set yet, lets set it to the default language - -if (!get_value_from_array($_SESSION, 'lang')) { - // first try the default language, if that doesnt work, use "en" - if ($config['default_language']) - $_SESSION['lang'] = $config['default_language']; - else - $_SESSION['lang'] = 'en'; -} - -// only allow debug to get set if we're using a development version (odd numbered ending) -if (substr($config['version'], -1) % 2 != 0) - if (get_value_from_array($_GET, 'debug')) - $_SESSION['debug'] = $_GET['debug']; - -// if the user has switched languages, go ahead and switch the session variable -if (array_key_exists('switchlanguage', $_GET)) { - // first, make sure its a valid language: - if ($config['languages'][$_GET['switchlanguage']]) { - $_SESSION['lang'] = $_GET['switchlanguage']; - } else { - // invalid language, dont do anything - } -} - -function i18n($str, $args = array(), $argsdesc = array(), $forcelang = '') +function sfiab_db_connect() { - global $pdo; - if (!$str) - return ''; + global $dbhost, $dbuser, $dbpassword, $dbdatabase; + $mysqli = new mysqli($dbhost, $dbuser, $dbpassword, $dbdatabase); + return $mysqli; +} - if ($forcelang) { - $savelang = $_SESSION['lang']; - $_SESSION['lang'] = $forcelang; +function sfiab_session_is_active() +{ + if ( version_compare(phpversion(), '5.4.0', '>=') ) { + return session_status() === PHP_SESSION_ACTIVE ? TRUE : FALSE; + } else { + return session_id() === '' ? FALSE : TRUE; + } +} + +function sfiab_load_config($mysqli) +{ + global $config; + $q = $mysqli->query("SELECT var,val FROM config WHERE 1"); + while($r = $q->fetch_row()) { + $config[$r[0]] = $r[1]; } - if ($_SESSION['lang']) { - if ($_SESSION['lang'] == 'en') { - for ($x = 1; $x <= count($args); $x++) { - $str = str_replace("%$x", get_value_from_array($args, $x - 1, ''), $str); + if(array_key_exists('HTTP_HOST', $_SERVER)) { + /* The fair URL is http[s]://, then the HTTP host, then the real directory of this script with the real document root removed */ + $real_docroot = realpath($_SERVER['DOCUMENT_ROOT']); + $real_dir = realpath(__DIR__); + $config['fair_url'] = (array_key_exists('HTTPS', $_SERVER) ? 'https://' : 'http://') + .$_SERVER['HTTP_HOST'].substr($real_dir, strlen($real_docroot) ); + + } + $config['provincestate'] = 'Province'; + $config['postalzip'] = 'Postal Code'; + + $a = explode(',', $config['judge_divisional_distribution']); + $config['judge_divisional_distribution'] = array(); + foreach($a as $d) { + $config['judge_divisional_distribution'][] = (int)$d; + } + $a = explode(',', $config['judge_divisional_prizes']); + $config['judge_divisional_prizes'] = array(); + foreach($a as $p) { + $config['judge_divisional_prizes'][] = $p; + } + + date_default_timezone_set($config['timezone']); +} + +function sfiab_init($roles, $skip_password_expiry_check=false) +{ + global $config; + $mysqli = sfiab_db_connect(); + sfiab_load_config($mysqli); + + $db_version = intval(file_get_contents('updates/db_version.txt', 0, NULL, 0, 5)); + if($db_version != $config['db_version']) { + print("The database needs to be updated (have={$config['db_version']}, latest={$db_version})."); + exit(); + } + + sfiab_session_start(); + + if($roles !== NULL) { + if(!is_array($roles)) { + $roles = array($roles); + } + sfiab_check_access($mysqli, $roles, $skip_password_expiry_check); + } + return $mysqli; +} + +function sfiab_log($mysqli, $type, &$u_or_uid, $result=0, $data='', $message='', $pid=0, $fair_id=0, $email_id=0, $award_id=0, $prize_id=0) +{ + global $config; + + if(array_key_exists('REMOTE_ADDR', $_SERVER)) { + $ip = $_SERVER['REMOTE_ADDR']; + } else { + $ip = "commandline"; + } + + $pid = (int)$pid; + if(is_array($u_or_uid)) { + $uid = $u_or_uid['uid']; + $pid = $u_or_uid['s_pid']; + if($data == '') { + $data = $u_or_uid['username']; + } + } else if(is_null($u_or_uid) || $u_or_uid == 0) { + $uid = 0; + if(sfiab_session_is_active()) { + if(array_key_exists('uid', $_SESSION)) { + $uid = $_SESSION['uid']; + $pid = $_SESSION['u']['s_pid']; } - if ($forcelang) - $_SESSION['lang'] = $savelang; - return $str; - } else { - $q = $pdo->prepare('SELECT * FROM translations WHERE lang=? AND strmd5=?'); - $q->execute([$_SESSION['lang'], md5($str)]); - if ($r = $q->fetch()) { - if ($r['val']) { - $ret = $r['val']; + } + } else { + $uid = (int)$u_or_uid; + } - for ($x = 1; $x <= count($args); $x++) { - $ret = str_replace("%$x", $args[$x - 1], $ret); - } - if ($forcelang) - $_SESSION['lang'] = $savelang; - return $ret; - } else { - for ($x = 1; $x <= count($args); $x++) { - $str = str_replace("%$x", $args[$x - 1], $str); - } - if ($forcelang) - $_SESSION['lang'] = $savelang; - return '{{' . $str . '}}'; - } - } else { - if (count($argsdesc)) { - $argsdescstring = ''; - $n = 1; - foreach ($argsdesc as $ad) { - $argsdescstring .= "%$n=$ad, "; - $n++; - } - $argsdescstring = substr($argsdescstring, 0, -2); - $argsdescstring = $pdo->quote($argsdescstring) . "'"; - } else - $argsdescstring = 'null'; + $type = $mysqli->real_escape_string($type); + $data = $mysqli->real_escape_string($data); + $m = $mysqli->real_escape_string($message); + $year = $config['year']; + $fair_id = (int)$fair_id; + $result = (int)$result; + $email_id = (int)$email_id; + $award_id = (int)$award_id; + $prize_id = (int)$prize_id; + $result = (int)$result; - $stmt = $pdo->prepare('INSERT INTO translations (lang,strmd5,str,argsdesc,val) VALUES (?,?,?,?,?)'); - $stmt->execute([$_SESSION['lang'], md5($str), $pdo->quote($str), $argsdescstring, '']); - for ($x = 1; $x <= count($args); $x++) { - $str = str_replace("%$x", $args[$x - 1], $str); - } - if ($forcelang) - $_SESSION['lang'] = $savelang; - return '{{' . $str . '}}'; + $mysqli->real_query("INSERT INTO log (`ip`,`uid`,`pid`,`fair_id`,`email_id`,`award_id`,`prize_id`,`year`,`time`,`type`,`data`,`message`,`result`) + VALUES('$ip','$uid','$pid','$fair_id','$email_id','$award_id','$prize_id','$year',NOW(),'$type','$data','$m','$result')"); + $str = "uid=$uid"; + if($fair_id > 0) $str .= ", fair_id=$fair_id"; + if($email_id > 0) $str .= ", email_id=$email_id"; + if($award_id > 0) $str .= ", award_id:prize_id=$award_id:$prize_id"; + debug("sfiab_log: $type: $result, $ip, $year, $str, $data, $m\n"); + if($mysqli->error != '') { + debug("sfiab_log: {$mysqli->error}\n"); + } +} + +function sfiab_log_sync_stats($mysqli, $fair_id, $result) +{ + $uid = 0; + sfiab_log($mysqli, "sync_stats", $uid, $result, "", "", 0, $fair_id); +} + +function sfiab_log_push_award($mysqli, $fair_id, $award_id, $result, $data='') +{ + $uid = 0; + sfiab_log($mysqli, "push_award", $uid, $result, $data, "", 0, $fair_id, 0, $award_id); +} + +function sfiab_log_push_winner($mysqli, $fair_id, $award_id, $prize_id, $project_id, $result) +{ + $uid = 0; + sfiab_log($mysqli, "push_winner", $uid, $result, "", "", $project_id, $fair_id, 0, $award_id, $prize_id); +} + +function sfiab_log_email_send($mysqli, $email_id, $uid, $email, $error_message, $result) +{ + sfiab_log($mysqli, "email_send", $uid, $result, $email, $error_message, 0, 0, $email_id); +} + +function sfiab_log_register($mysqli, $u_or_username, $email, $role, $error_message, $result) +{ + if(is_array($u_or_username)) { + $u = &$u_or_username; + $username = $u['username']; + } else { + $u = NULL; + $username = "$u_or_username"; + } + sfiab_log($mysqli, "register", $u, $result, "{$username}, {$email}, {$role}", $error_message); +} + +function sfiab_log_login($mysqli, $u_or_username, $reason, $result) +{ + if(is_array($u_or_username)) { + $u = &$u_or_username; + $username = $u['username']; + } else { + $u = NULL; + $username = "$u_or_username"; + } + sfiab_log($mysqli, "login", $u, $result, $username, $reason); +} + +function sfiab_session_start() +{ + $session_name = 'sfiab'; + $secure = false; + $httponly = true; /* Don't let javascript get the session id */ + + ini_set('session.use_only_cookies', 1); + $cookieParams = session_get_cookie_params(); + session_set_cookie_params($cookieParams["lifetime"], $cookieParams["path"], $cookieParams["domain"], $secure, $httponly); + session_name($session_name); + session_start(); + + $session_hash = hash('sha512', 'X'.$_SERVER['REMOTE_ADDR'].'X'.$_SERVER['HTTP_USER_AGENT']); + /* Hash the passwd with the browser, the browser shouldn't change. we can check + * it every page load */ + if(array_key_exists('session_hash', $_SESSION)) { + if($_SESSION['session_hash'] != $session_hash) { + /* Something changed, user is trying to session hijack? start a new session */ + session_regenerate_id(); + session_unset(); + } + } + $_SESSION['session_hash'] = $session_hash; +} + +function sfiab_logged_in() +{ + if(!isset($_SESSION['unique_uid'], $_SESSION['username'])) + return false; + return true; +} + +function sfiab_user_is_a($role) +{ + if(!sfiab_logged_in()) return false; + if(in_array($role, $_SESSION['roles'])) + return true; + return false; +} + +/* Roles is an array of roles to allow */ +function sfiab_check_access($mysqli, $roles, $skip_expiry_check) +{ + global $config; + /* FIXME: this needs work */ + + /* Mostly from http://www.wikihow.com/Create-a-Secure-Login-Script-in-PHP-and-MySQL */ + if(!sfiab_logged_in()) { + header("Location: index.php#login"); + exit(); + } + + /* If the password has expired don't let the user go anywhere else */ + if($_SESSION['password_expired'] && !$skip_expiry_check) { +?> + + +query("SELECT roles FROM users WHERE `uid`='$uid' LIMIT 1"); + if($q->num_rows != 1) { + print("Access Denied
    "); + exit(); + } + $r = $q->fetch_row(); + $db_roles = $r[0]; + + /* If editting another user, enforce committee no mater what + * the page asked for */ + if(array_key_exists('edit_uid', $_SESSION)) { + $roles = array('committee'); + } + + if(count($roles) > 0) { + $db_roles = explode(',',$db_roles); + $ok = false; + /* Check the auth type */ + foreach($roles as $r) { + if(in_array($r, $db_roles)) { + $ok = true; } } - } else { - // no language set, assume english - if ($forcelang) - $_SESSION['lang'] = $savelang; - return $str; + if(!$ok) { + print("Access Denied
    "); + exit(); + } } } -function error($str, $type = 'normal') +function sfiab_left_nav_incomplete_count($page_id) { - if ($type == 'normal') - return "
    $str

    "; - else if ($type == 'inline') - return "$str
    "; + $count = 0; + if(array_key_exists('incomplete', $_SESSION)) { + if(array_key_exists($page_id, $_SESSION['incomplete'])) { + $fields = $_SESSION['incomplete'][$page_id]; + $count = count($fields); + } + } + return $count; +} +function sfiab_print_left_nav_menu_entries(&$u, $current_page_id, $menu) +{ + /* $u could be NULL! */ + global $pages_disabled_in_preregistration; + + foreach($menu as $id=>$d) { + + if($d === NULL) continue; + + /* Disable some entries if in pregregistration mode */ + $cl = ($current_page_id == $id) ? 'class="ui-li-selected"' : ''; + $disable_link = false; + if(is_array($u) && sfiab_preregistration_is_open($u)) { + if(in_array($id, $pages_disabled_in_preregistration)) { + $cl = 'class="ui-li-disabled"'; + $disable_link = true; + } + } + + $theme = ($id == 'c_editing') ? 'data-theme="l"' : ''; + + $count = sfiab_left_nav_incomplete_count($id); + $style = ($count == 0) ? 'style="display: none;"' : ''; + $incomplete = "$count"; + /* Apply $sel to the
  • and the so it actually shows up */ +?> +
  • > + + + + data-rel="external" data-ajax="false" data-transition="fade" data-inline="true" > + + + +
  • +$str

    "; - else if ($type == 'inline') - return "$str
    "; + /* $u could be NULL! */ + + /* Count all incomplete */ + $count = 0; + foreach($menu as $id=>$d) { + if($d === NULL) continue; + $count += sfiab_left_nav_incomplete_count($id); + } + $style = ($count == 0) ? 'style="display: none;"' : ''; + $incomplete = "$count"; + $collapsed = array_key_exists($current_page_id, $menu) ? 'false' : 'true'; +?> +
    +

    +
      + +
    +
    +$str

    "; - else if ($type == 'inline') - return "$str
    "; + /* $u could be NULL! */ + + global $config; + $main_menu = array( + 'welcome' => array('Welcome', 'index.php#welcome'), + 'important_dates' => array('Important Dates', 'index.php#important_dates'), + 'winners' => array('Winners', 'main_winners.php'), + 'committee' => array('Committee', 'index.php#committee'), + 'contact' => array('Contact Us', 'index.php#contact'), + ); + + $student_menu = array('s_home' => array('Student Home', 's_main.php'), + 's_personal' => array('Personal Info', 's_personal.php'), + 's_emergency' => array('Emergency Contact', 's_emergency.php'), + 's_reg_options' => array('Options', 's_reg_options.php'), + 's_tours' => array('Tours', 's_tours.php'), + 's_partner' => array('Partner', 's_partner.php'), + 's_project' => array('Project Info', 's_project.php'), + 's_ethics' => array('Project Ethics', 's_ethics.php'), + 's_safety' => array('Project Safety', 's_safety.php'), + 's_mentor' => array('Mentor Info', 's_mentor.php'), + 's_awards' => array('Award Selection', 's_awards.php'), + 's_cwsf' => array('Canada-Wide Eligibility', 's_cwsf.php'), + 's_signature' => array('Signature Form', 's_signature.php'), + 's_payment' => array('Registration Fee', 's_payment.php'), + 's_download' => array('Photos and Downloads', 's_download.php'), + ); + if($config['fair_abbreviation'] != 'GVRSF' && $config['fair_abbreviation'] != 'ERSF') unset($student_menu['s_download']); /* Only GVRSF for now, uploads aren't ready */ + if(!$config['tours_enable']) unset($student_menu['s_tours']); + if(!$config['student_enable_award_selection']) unset($student_menu['s_awards']); + if(!$config['student_enable_cwsf_eligibility']) unset($student_menu['s_cwsf']); + + + $judge_menu = array('j_home' => array('Judge Home', 'j_main.php'), + 'j_personal' => array('Personal Info', 'j_personal.php'), + 'j_options' => array('Judging Options', 'j_options.php'), + 'j_expertise' => array('Judging Expertise', 'j_expertise.php'), + 'j_mentorship' => array('Mentorship', 'j_mentorship.php'), + 'j_schedule' => array('Judging Assignments', 'j_schedule.php'), + ); + + $volunteer_menu = array('v_home' => array('Volunteer Home', 'v_main.php'), + 'v_personal' => array('Personal Info', 'v_personal.php'), + 'v_options' => array('Options', 'v_options.php'), + 'v_tours' => array('Tours', 'v_tours.php'), + ); + if(!$config['tours_enable']) { + unset($volunteer_menu['v_tours']); + } + + $committee_menu = array('c_main' => array('Committee Home', 'c_main.php'), + 'c_awards' => array('Awards', 'c_awards.php'), + 'c_awards_list' => NULL, + 'c_awards_edit' => NULL, + 'c_award_winners' => NULL, + 'c_backup' => NULL, + 'c_check_tours' => NULL, + 'c_config' => array('Configuration', 'c_config.php'), + 'c_config_variables' => NULL, + 'c_config_categories' => NULL, + 'c_config_challenges' => NULL, + 'c_config_logo' => NULL, + 'c_config_cms' => NULL, + 'c_config_fairs' => NULL, + 'c_judging' => array('Judging', 'c_judging.php'), + 'c_judge_sanity' => NULL, + 'c_judge_score_entry' => NULL, + 'c_judge_score_summary' => NULL, + 'c_judge_scheduler' => NULL, + 'c_reports' => array('Reports', 'c_reports.php'), + 'c_communication' => array('Send Emails', 'c_communication.php'), + 'c_stats' => array('Statistics and Logs', 'c_stats.php'), + 'c_ysc_stats' => NULL, + 'c_students' => array('Students / Projects', 'c_students.php'), + 'c_assign_project_numbers' => NULL, + 'c_input_signature_forms' => NULL, + 'c_input_ethics' => NULL, + 'c_tours' => array('Tours', 'c_tours.php'), + 'c_tours_edit' => NULL, + 'c_tours_list' => NULL, + 'c_volunteers' => array('Volunteers', 'c_volunteers.php'), + 'c_user_list' => NULL, + 'c_user_edit' => NULL, + 'c_register_feeder' => NULL, + 'c_report_editor' => NULL, + 'c_timeslots' => NULL, + 'c_timeslots_assign' => NULL, + 'c_jteam_edit' => NULL, + 'c_jteam_list' => NULL, + 'c_input_signature_forms' => NULL, + 'c_communication_send' => NULL, + 'c_communication_queue' => NULL, + 'c_visit_list' => NULL, + 'c_checkin_list' => NULL, + ); + + $login_menu = array('register' => array('Registration', 'index.php#register'), + 'login' => array('Login', 'index.php#login'), + ); + + $prescreen_menu = array('s_ethics' => array('Ethics Interactive Flowchart', 's_ethics.php'), + 's_safety' => array('Safety Interactive Flowchart', 's_safety.php'), + ); + + + $account_menu = array('a_change_password' => array('Change Password', 'a_change_password.php'), + 'a_delete_account' => array('Delete Account', 'a_delete_account.php'), + ); + $logout_menu = array( 'logout' => array('Logout', 'login.php?action=logout'), + ); + + $user_edit_menu = array ('c_editing' => array('Return To Your User', 'c_user_list.php?return=1'), + ); +?> + +
    +

    + + +
      + +
    + +
      + + + +
    + + +
      + +
    + +
    + + + + + +
    +

    Help

    + +
    + + + + + + + + + <?=$title?> + + + + + + + + + + + + +// +// + +} + +function output_end() +{ +?> + + +
    + +
    + +
    + +
    +query("SELECT * FROM challenges WHERE year='$year'"); + while($c=$q->fetch_assoc()) { + $challenges[$c['chal_id']] = $c; + } + } + return $challenges; +} + +function categories_load($mysqli, $year = false) +{ + global $config; + static $categories = NULL; + + if($year == false) $year = $config['year']; + + if($categories === NULL) { + $categories = array(); + $q = $mysqli->query("SELECT * FROM categories WHERE year='$year' ORDER BY cat_id"); + while($c=$q->fetch_assoc()) { + filter_int($c['min_grade']); + filter_int($c['max_grade']); + $categories[$c['cat_id']] = $c; + } + } + return $categories; +} + +function category_get_from_grade($mysqli, $grade) +{ + /* Note: to category_get_from_grade for a different year, just call categories_load first to cache + * another year */ + $categories = categories_load($mysqli); + + foreach($categories as $cid=>&$c) { + if($grade >=$c['min_grade'] && $grade <= $c['max_grade']) + return $cid; + } + return false; +} + +function categories_grade_range($mysqli, $year = false) +{ + global $config; + + if($year == false) $year = $config['year']; + $q = $mysqli->query("SELECT MIN(min_grade),MAX(max_grade) FROM categories WHERE year='$year'"); + $r = $q->fetch_row(); + $min_grade = $r[0]; + $max_grade = $r[1]; + + return array($min_grade, $max_grade); +} + +function print_replace_vars_table(&$u) +{ + global $config; ?> - - +

    Text in [ALL CAPS] surrounded in square brackets has special meaning. Here is a list of replacements that will be made:

    + + + + + + + + - - - - <? if ($title && !$titletranslated) - echo i18n($title); - else if ($title) - echo $title; - else - echo i18n($config['fairname']); ?> + + + + + + - - - - + + + + + + + +
    KeyExampleReplacement
    Fair Information
    [FAIRNAME]The name of the science fair.
    [FAIRABBR]The abbreviation for the science fair name.
    [LOGIN_LINK]/index.php#loginA URL pointing to the login page on the registration site.
    [FAIR_URL]The main URL for the registration site.
    [YEAR]The current fair year.
    Info Specific to the Email Recipient
    [FIRSTNAME]The first name of the email recipient.
    [LASTNAME]The last name of the email recipient.
    [NAME]The full name (first + last) of the email recipient.
    [PASSWORD]35db324fcThe plain-text password of the mail recipient. This only works in the "New Registration" and "Forgot Password" emails because the password is generated at the time the email is sent. At all other times, the user's password is encoded in the database using a one-way cryptographic hash. It cannot be unencoded.
    [SALUTATION]Dr. Salutation to be used for the mail recipient.
    [USERNAME]The username of the email recipient.
    [USERNAME_LIST]A list of ALL usernames associated with the email of the recipient.
    Email Addresses
    [EMAIL_CHAIR]The chair email address.
    [EMAIL_REGISTRATION]The registration coordinator's email address.
    [EMAIL_ETHICS]The ethics committee's email address
    [EMAIL_CHIEFJUDGE]The chief judge's email address.
    + - - - - +function replace_vars($text, &$u=NULL, $additional_vars = array(), $html = false) +{ + global $config; + $rep = array( '/\[FAIRNAME\]/' => $config['fair_name'], + '/\[FAIRABBR\]/' => $config['fair_abbreviation'], + '/\[YEAR\]/' => $config['year'], + '/\[CHAIR_EMAIL\]/' => $html ? mailto($config['email_chair']) : $config['email_chair'], + '/\[EMAIL_CHAIR\]/' => $html ? mailto($config['email_chair']) : $config['email_chair'], + '/\[EMAIL_REGISTRATION\]/' => $html ? mailto($config['email_registration']) : $config['email_registration'], + '/\[EMAIL_ETHICS\]/' => $html ? mailto($config['email_ethics']) : $config['email_ethics'], + '/\[EMAIL_CHIEFJUDGE\]/' => $html ? mailto($config['email_chiefjudge']) : $config['email_chiefjudge'], + '/\[DATE_FORMS_DUE\]/' => date('F d, Y', strtotime($config['date_student_registration_closes']) + 60*60*24), - - - - - - - - -
    - -
    - '; - if (isset($_SESSION['users_type'])) { - $types = array( - 'volunteer' => 'Volunteer', - 'judge' => 'Judge', - 'student' => 'Participant', - 'committee' => 'Committee Member', - 'fair' => 'Science Fair' ); - if ($_SESSION['users_type'] != false) { - echo i18n($types[$_SESSION['users_type']]); - } - echo ' {' . get_value_from_array($_SESSION, 'email') . '}: '; - if ($_SESSION['multirole'] == true) { - echo "[" . i18n('Switch Roles') . '] '; - } - echo "[" . i18n('Logout') . ']'; - } else if (isset($_SESSION['email'])) { - /* Backwards compatible login settings */ - if (isset($_SESSION['registration_id'])) { - echo i18n('Participant'); - echo " {$_SESSION['email']}: "; - echo "[" . i18n('Logout') . ']'; - } else { - echo ' '; - } + + /* A list of variables that aren't always available. */ + foreach($additional_vars as $var=>&$val) { + switch($var) { + case 'fair_url': + /* We can get a whole lot of vars from the config */ + $rep['/\[LOGIN_LINK\]/'] = $val.'/index.php#login'; + $rep['/\[FAIR_URL\]/'] = $val; + break; + case 'password': + case 'username_list': + case 'student_name': + $rep['/\['.strtoupper($var).'\]/'] = $val; + break; + case 'signature_key': + $rep['/\[SIGNATURE_LINK\]/'] = $additional_vars['fair_url'].'/signature.php?k='.$val; + break; + } + } + + if(is_array($u)) { + /* Replacements that depend on a user */ + $rep += array( + '/\[NAME\]/' => $u['name'], + '/\[EMAIL\]/' => $html ? mailto($u['email']) : $u['email'], + '/\[USERNAME\]/' => $u['username'], + '/\[SALUTATION\]/' => $u['salutation'], + '/\[FIRSTNAME\]/' => $u['firstname'], + '/\[LASTNAME\]/' => $u['lastname'], + '/\[GRADE\]/' => $u['grade'], + '/\[ORGANIZATION\]/' => $u['organization'], + ); + + if($u['sex'] == 'male') { + $rep['/\[HISHER\]/'] = 'his'; + $rep['/\[HIMHER\]/'] = 'him'; + } else if($u['sex'] == 'female') { + $rep['/\[HISHER\]/'] = 'her'; + $rep['/\[HIMHER\]/'] = 'her'; } else { - echo i18n('Not Logged In'); + $rep['/\[HISHER\]/'] = 'his / her'; + $rep['/\[HIMHER\]/'] = 'him / her'; } - echo '
    '; - ?> - - - - - '; - - if ($icon && theme_icon($icon)) { - echo ''; - echo '
    - ' . i18n('You are here:') . ' '; - foreach ($nav as $t => $l) { - echo "" . i18n($t) . ' » '; - } - if (!$titletranslated) - echo i18n($title); - else - echo $title; - echo ''; - } - ?> - -
    -
    '; - echo theme_icon($icon); - echo ''; - } else - echo ''; - - if ($title && !$titletranslated) - echo '

    ' . i18n($title) . '

    '; - else if ($title) - echo '

    ' . $title . '

    '; - - // if we're under /admin or /config then we want to show the ? help icon - if (substr(getcwd(), -6) == '/admin' || substr(getcwd(), -7) == '/config' || substr(getcwd(), -6) == '\admin' || substr(getcwd(), -7) == '\config') { - if (get_value_from_array($_SERVER, 'REDIRECT_SCRIPT_URL')) - $fname = substr($_SERVER['REDIRECT_SCRIPT_URL'], strlen($config['SFIABDIRECTORY']) + 1); - else - $fname = substr($_SERVER['PHP_SELF'], strlen($config['SFIABDIRECTORY']) + 1); - echo "
    '; } - '
    '; - display_messages(); + return preg_replace(array_keys($rep), array_values($rep), $text); } -/* END OF send_header */ +function cms_get($mysqli, $name, &$u = NULL) +{ + $q = $mysqli->query("SELECT `text`,`use` FROM `cms` WHERE `name`='$name'"); + print($mysqli->error); + $r = $q->fetch_assoc(); + if($r['use'] == 1) { + $r = replace_vars($r['text'], $u, array(), true); + $r = preg_replace('/\[FILE ([A-Za-z0-9_-]+\.[a-z]+)\]/', 'file.php?f=$1', $r); + return $r; + } + return NULL; +} -function send_footer() + +function compute_per_user_reg_fee($mysqli, &$p, &$users) { global $config; - ?> - - - -
    - -
    Debug...
    - - - - - - -\n"; - ?> - - - - - - - <?= i18n($title) ?> - - - - - - - - - - - - - - -
    - - ' . i18n($title) . ''; -} - -function send_popup_footer() -{ - ?> -
    -
    - -
    Debug...
    - - - - - -\n"; - $months = array('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); - echo '\n"; - for ($x = 1; $x <= 12; $x++) { - if ($x == $selected) - $s = 'selected="selected"'; - else - $s = ''; - echo "\n"; - } - - echo "\n"; -} - -function emit_day_selector($name, $selected = '') -{ - echo "\n"; -} - -function emit_year_selector($name, $selected = '', $min = 0, $max = 0) -{ - $curyear = date('Y'); - echo "\n"; -} - -function emit_date_selector($name, $selected = '') -{ - if ($selected) { - list($year, $month, $day) = explode('-', $selected); - } - echo ''; - echo ''; - echo '
    '; - emit_year_selector($name . '_year', $year); - echo ''; - emit_month_selector($name . '_month', $month); - echo ''; - emit_day_selector($name . '_day', $day); - echo '
    '; -} - -function emit_hour_selector($name, $selected = '') -{ - if ($selected != '') - $selected = (int) $selected; - echo "\n"; -} - -function emit_minute_selector($name, $selected = '') -{ - $mins = array('00', '05', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55'); - echo "\n"; -} - -function emit_time_selector($name, $selected = '') -{ - global $hour; - global $minute; - if ($selected) { - list($hour, $minute, $second) = explode(':', $selected); - } - echo ''; - echo ''; - echo '
    '; - emit_hour_selector($name . '_hour', $hour); - echo ''; - emit_minute_selector($name . '_minute', $minute); - echo '
    '; -} - -function emit_province_selector($name, $selected = '', $extra = '') -{ - global $config; - - global $pdo; - $q = $pdo->prepare('SELECT * FROM provinces WHERE countries_code=? ORDER BY province'); - $q->execute([$config['country']]); - - if ($q->rowCount() == 1) { - $r = $q->fetch(PDO::FETCH_OBJ); - - echo "code\">"; - echo i18n($r->province); - } else { - echo "\n"; - } -} - -function outputStatus($status) -{ - $ret = ''; - switch ($status) { - case 'incomplete': - $ret .= '
    '; - $ret .= i18n('Incomplete'); - $ret .= '
    '; - break; - case 'complete': - $ret .= '
    '; - $ret .= i18n('Complete'); - $ret .= '
    '; - break; - case 'empty': - $ret .= '
    '; - $ret .= i18n('Empty'); - $ret .= '
    '; - break; - - default: - $ret .= i18n('Unknown'); - break; + $ret[$u['uid']]['subtotal'] = $subtotal; + $ret['total'] += $subtotal; } return $ret; } -// returns true if its a valid email address, false if its not -function isEmailAddress($str) +function compute_registration_fee($mysqli, &$p, &$users) { - if (preg_match('/^[+a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})$/i', $str)) - return true; - else - return false; -} + global $config; + $ret = array(); -function communication_get_user_replacements(&$u) -{ - global $config; - $rep = array( - 'FAIRNAME' => $config['fairname'], - 'NAME' => $u['name'], - 'EMAIL' => $u['email'], - 'PASSWORD' => $u['password'], - 'SALUTATION' => $u['salutation'], - 'FIRSTNAME' => $u['firstname'], - 'LASTNAME' => $u['lastname'], - 'ORGANIZATION' => $u['sponsor']['organization'], - ); - return $rep; -} + $regfee_items = array(); + $n_students = count($users); + $regfee = 0; -function communication_replace_vars($text, &$u, $otherrep = array()) -{ - global $config; - if ($u) { - $userrep = communication_get_user_replacements($u); +/* $regfee_items[] = array('id' => 'funrun', + 'name' => 'Science Fair Fun Run ', + 'per' => 'student', + 'cost' => 50, + ); +*/ + $n_tshirts = 0; + $sel = array(); + foreach($users as $u) { + if($u['tshirt'] != 'none' && $config['tshirt_enable']) $n_tshirts++; + + /* Check their regfee items too */ +/* if($config['participant_regfee_items_enable'] != 'yes') continue; + + $sel_q = mysql_query("SELECT * FROM regfee_items_link + WHERE students_id={$s->id}"); + while($info_q = mysql_fetch_assoc($sel_q)) { + $sel[] = $info_q['regfee_items_id']; + }*/ + } + + if(true) { /* Reg per student */ + $f = $config['regfee'] * $n_students; + $ret[] = array( 'id' => 'regfee', + 'text' => "Fair Registration (per student)", + 'base' => $config['regfee'], + 'num' => $n_students, + 'ext' => $f ); + $regfee += $f; } else { - $userrep = array(); + $ret[] = array( 'id' => 'regfee', + 'text' => "Fair Registration (per project)", + 'base' => $config['regfee'], + 'num' => 1, + 'ext' => $config['regfee'] ); + $regfee += $config['regfee']; } - $rep = array_merge($userrep, $otherrep); - foreach ($rep as $k => $v) { - $text = preg_replace("/\[$k\]/", $v, $text); + if($config['tshirt_enable']) { + $tsc = floatval($config['tshirt_cost']); + if($tsc != 0.0) { + $f = $n_tshirts * $tsc; + $regfee += $f; + if($n_tshirts != 0) { + $ret[] = array( 'id' => 'tshirt', + 'text' => "T-Shirts", + 'base' => $tsc, + 'num' => $n_tshirts, + 'ext' => $f); + } + } } + + /* $sel will be empty if regfee_items is disabled */ + foreach($regfee_items as $rfi) { + $cnt = 0; + foreach($sel as $s) if($rfi['id'] == $s) $cnt++; + + if($cnt == 0) continue; + + $tsc = floatval($rfi['cost']); + + /* If it's per project, force the count to 1 */ + if($rfi['per'] == 'project') { + $cnt = 1; + } + + $f = $tsc * $cnt; + $ret[] = array( 'id' => "regfee_item_{$rfi['id']}", + 'text' => "{$rfi['name']} (per {$rfi['per']})" , + 'base' => $tsc, + 'num' => $cnt, + 'ext' => $f); + $regfee += $f; + } + return array($regfee, $ret); +} + +function i18n($text) +{ return $text; } -function email_send($val, $to, $sub_subject = array(), $sub_body = array()) +/* Returns: + * -2 registration isn't open yet + * -1 registration is closed + * 1 registration is open + * 2 preregistration is open */ +function sfiab_registration_status($u, $role=NULL) { - global $config, $pdo; + global $config; + $prereg_open_date = NULL; + $reg_close_date = ''; - /* - * Standard substitutions that are constant no matter who - * the $to is - */ - $urlproto = $_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://'; - $urlmain = "$urlproto{$_SERVER['HTTP_HOST']}{$config['SFIABDIRECTORY']}"; - $urllogin = "$urlmain/login.php"; - $stdsub = array( - 'FAIRNAME' => i18n($config['fairname']), - 'URLMAIN' => $urlmain, - 'URLLOGIN' => $urllogin, - ); - /* Add standard subs to existing sub arrays */ - $sub_subject = array_merge($sub_subject, $stdsub); - $sub_body = array_merge($sub_body, $stdsub); + $now = date( 'Y-m-d H:i:s' ); - // if our "to" doesnt look like a valid email, then forget about sending it. - if (!isEmailAddress($to)) { - return false; + if($role !== NULL) { + if($role == 'student') { + if($config['preregistration_enable']) { + $prereg_open_date = $config['date_student_preregistration_opens']; + } + $reg_open_date = $config['date_student_registration_opens']; + $reg_close_date = $config['date_student_registration_closes']; + } else if ($role == 'judge') { + $reg_open_date = $config['date_judge_registration_opens']; + $reg_close_date = $config['date_judge_registration_closes']; + } else if ($role == 'volunteer') { + /* Use judge registration */ + $reg_open_date = $config['date_judge_registration_opens']; + $reg_close_date = $config['date_judge_registration_closes']; + } else { + return 1; /* Open */ + } + } else { + /* Registration is always open for a committee editting a user */ + if(sfiab_session_is_active()) { + if(array_key_exists('edit_uid', $_SESSION)) { + return 1; /* Open */ + } + } + + /* Get the normal reg close date, if the student's submission + * has been accepted, disregard any reg close override and just + * return that their reg is closed */ + if(in_array('student', $u['roles'])) { + if($config['preregistration_enable']) { + $prereg_open_date = $config['date_student_preregistration_opens']; + } + $reg_open_date = $config['date_student_registration_opens']; + $reg_close_date = $config['date_student_registration_closes']; + + /* Accetped students registrations are closed*/ + if($u['s_accepted']) { + return -1; /* Closed */ + } + + } else if (in_array('judge', $u['roles'])) { + $reg_open_date = $config['date_judge_registration_opens']; + $reg_close_date = $config['date_judge_registration_closes']; + } else if (in_array('volunteer', $u['roles'])) { + /* Use judge registration */ + $reg_open_date = $config['date_judge_registration_opens']; + $reg_close_date = $config['date_judge_registration_closes']; + } else { + return 1; /* Open */ + } + + /* If there is an override, set the registration to open, and use the + * specified reg close date */ + if($u['reg_close_override'] !== NULL) { + $reg_close_date = $u['reg_close_override']; + if($now < $u['reg_close_override']) { + /* Registration should be open, fudge the open date too */ + $reg_open_date = $now; + $prereg_open_date = NULL; + } + } } - $q = $pdo->prepare('SELECT * FROM emails WHERE val=?'); - $q->execute([$val]); - if ($r = $q->fetch(PDO::FETCH_OBJ)) { - // we dont want to translate these, the messages themselves shoudl contain whatever languages they need - $subject = $r->subject; - $body = $r->body; - $bodyhtml = $r->bodyhtml; - - /* Eventually we should just do this with communication_replace_vars() */ - if (count($sub_subject)) { - foreach ($sub_subject as $sub_k => $sub_v) { - $subject = preg_replace("/\[$sub_k\]/", "$sub_v", $subject); - } - } - if (count($sub_body)) { - foreach ($sub_body as $sub_k => $sub_v) { - $body = preg_replace("/\[$sub_k\]/", "$sub_v", $body); - } + if($prereg_open_date !== NULL) { + if($now > $prereg_open_date && $now < $reg_open_date) { + return 2; /* Pre registration */ } + } - if (count($sub_body)) { - foreach ($sub_body as $sub_k => $sub_v) { - $bodyhtml = preg_replace("/\[$sub_k\]/", "$sub_v", $bodyhtml); - } - } - - if ($r->from) - $fr = $r->from; - else if ($config['fairmanageremail']) - $fr = $config['fairmanageremail']; - else - $fr = ''; - - // only send the email if we have a from - if ($fr) { - // send using RMail - email_send_new($to, $fr, $subject, $body, $bodyhtml); - } else - echo error(i18n("CRITICAL ERROR: email '%1' does not have a 'From' and the Fair Manager Email is not configured", array($val), array('email key name'))); + if($now < $reg_open_date) { + return -2; /* Not yet open */ + } else if ($now < $reg_close_date) { + return 1; /* Open */ } else { - echo error(i18n("CRITICAL ERROR: email '%1' not found", array($val), array('email key name'))); + return -1; /* Closed */ } } -function curl_request($to, $from, $subject, $text, $bodyhtml) +/* Is registration open for this user? reads the customer user override first + * then uses the global date */ + +function sfiab_registration_is_closed($u, $role=NULL) { - global $EMAIL_TRANSPORTER_URL; + $status = sfiab_registration_status($u, $role); + if($status < 0) { + /* Status < 0 means registration is closed */ + return true; + } + return false; +} - $url = $EMAIL_TRANSPORTER_URL; +function sfiab_preregistration_is_open(&$u) +{ + $status = sfiab_registration_status($u); + if($status == 2) { + return true; + } + return false; +} - // The data you want to send via POST - // $fields = [ - // '__VIEWSTATE ' => $state, - // '__EVENTVALIDATION' => $valid, - // 'btnSubmit' => 'Submit' - // ]; +function sfiab_check_abort_in_preregistration(&$u, $page_id) +{ + global $pages_disabled_in_preregistration; + if(sfiab_preregistration_is_open($u)) { + if(in_array($page_id, $pages_disabled_in_preregistration)) { + print("This page is closed in pre-registration."); + exit(); + return false; + } + } + return true; +} - // $fields = '{ - // "from" :"' . $from . '", - // "to" :"' . $to . '", - // "subject" :"' . $subject . '", - // "text" :"' . $text . '", - // "html": "' . $bodyhtml . '" - // }'; - - $fields = [ - 'from' => $from, - 'to' => $to, - 'subject' => $subject, - 'text' => $text, - 'html' => $bodyhtml - ]; - - $fields_json = json_encode($fields); - error_log($fields_json); - - // url-ify the data for the POST - // $fields_string = http_build_query($fields); - - // open connection - $ch = curl_init(); - - // set the url, number of POST vars, POST data - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_json); - curl_setopt($ch, CURLOPT_HTTPHEADER, array( - 'Content-Type: application/json', - 'Connection: Keep-Alive' - )); - curl_setopt($ch, CURLOPT_VERBOSE, true); - - // So that curl_exec returns the contents of the cURL; rather than echoing it - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - // execute post - $result = curl_exec($ch); - error_log('cURL Error: ' . curl_error($ch)); - error_log('result_from_function' . $result); +/* antispambot like from wordpress */ +function antispambot($email) +{ + $result = ''; + for($x=0; $x < strlen($email); $x++ ) { + $c = $email[$x]; + if($c == '@' || rand(0,1) == 0 ) { + $result .= '&#'.ord($c).';'; + } else { + $result .= $c; + } + } return $result; } -function email_send_new($to, $from, $subject, $text, $bodyhtml) +function mailto($email) { - curl_request($to, $from, $subject, $text, $bodyhtml); + return ''.antispambot($email).''; } -/* - * require_once("Rmail/Rmail.php"); - * require_once("Rmail/RFC822.php"); - * - * // this sends out an all-ready-to-go email, it does no substitution or changes or database lookups or anything - * function email_send_new($to, $from, $subject, $body, $bodyhtml = '') - * { - * $mail = new RMail(); - * $mail->setFrom($from); - * $mail->setSubject($subject); - * $mail->setText($body); - * - * $r = new Mail_RFC822($from); - * $structure = $r->parseAddressList($from); - * $s = $structure[0]; - * $ret = sprintf('%s@%s', $s->mailbox, $s->host); - * $mail->setReturnPath($ret); - * $mail->setHeader('Bounce-To', $ret); - * - * // only add the html if we have it - * if ($bodyhtml) { - * $mail->setHTML($bodyhtml); - * } - * - * if (is_array($to)) { - * return $mail->send($to); - * } else { - * return $mail->send(array($to)); - * } - * } - */ -/* - * returns an array of arrays - * [ 0 ] = array ( to, firstname, lastname, email ) - * [ 1 ] = array ( to, firstname, lastname, email ) - * ...etc - */ -function getEmailRecipientsForRegistration($reg_id) -{ - global $config, $pdo; - // okay first grab the registration record, to see if we should email the kids, the teacher, and/or the parents - $q = $pdo->prepare('SELECT * FROM registrations WHERE id=? AND year=?'); - $q->execute([$reg_id, $config['FAIRYEAR']]); - $registration = $q->fetch(); - if ($registration->emailcontact && isEmailAddress($registration->emailcontact)) { - $ret[] = array( - 'to' => $registration->emailcontact, - 'firstname' => '', - 'lastname' => '', - 'email' => $registration->emailcontact, - ); - } - - $sq = $pdo->prepare('SELECT * FROM students WHERE registrations_id=? AND year=?'); - $sq->execute([$reg_id, $config['FAIRYEAR']]); - $ret = array(); - while ($sr = $sq->fetch()) { - if ($sr->email && isEmailAddress($sr->email)) { - $to = $sr->email; - - $ret[] = array( - 'to' => $to, - 'firstname' => $sr->firstname, - 'lastname' => $sr->lastname, - 'email' => $sr->email, - ); - } - } - return $ret; -} - -function output_page_text($textname) -{ - global $config; - global $pdo; - - $q = $pdo->prepare('SELECT * FROM pagetext WHERE textname=? AND year=? AND lang=?'); - $q->execute([$textname, $config['FAIRYEAR'], $_SESSION['lang']]); - if ($q->rowCount()) - $r = $q->fetch(); - else { - // not defined, lets grab the default text - $q = $pdo->prepare("SELECT * FROM pagetext WHERE textname=? AND year='-1' AND lang=?"); - $q->execute([ - $textname, $config['default_language'] - ]); - $r = $q->fetch(); - } - - // if it looks like we have HTML content, dont do a nl2br, if there's no html, then do the nl2br - if (get_value_property_or_default($r, 'text') !== null and strlen($r->text) == strlen(strip_tags($r->text))) - echo nl2br($r->text); - else - echo get_value_property_or_default($r, 'text'); -} - -function output_page_cms($filename) -{ - global $config; - global $pdo; - - $q = $pdo->prepare('SELECT * FROM cms WHERE filename=? AND lang=? ORDER BY dt DESC LIMIT 1'); - $q->execute([$filename, $_SESSION['lang']]); - if ($q->rowCount()) { - $r = $q->fetch(); - send_header($r['title'], null, null, true); - - if (file_exists('data/logo-200.gif') && $r['showlogo'] == 1) - echo ''; - - // if it looks like we have HTML content, dont do a nl2br, if there's no html, then do the nl2br - if ($r['text'] !== null and strlen($r['text']) == strlen(strip_tags($r['text']))) - echo nl2br($r['text']); - else - echo $r['text']; - } else { - send_header('Error: File not found'); - echo error(i18n('The file you have requested (%1), does not exist on the server.', array($filename))); - return; - // not defined, lets grab the default text - } - - send_footer(); -} - -// config specific warning -function config_warnings() {} - -// admin specific warnings -function admin_warnings() {} - -// warnings to show to both config and/or admin people -function committee_warnings() -{ - global $config, $pdo; - // it is vital that each year the system be rolled over before we start it again - // we should do this, say, 4 months after the FAIRDATE, so its soon enough that they should see - // the message as soon as they login to start preparing for hte new year, but not too late to do it - // properly :) - - $q = $pdo->prepare('SELECT DATE_ADD(?, INTERVAL 4 MONTH) < NOW() AS rollovercheck'); - $q->execute([$config['dates']['fairdate']]); - - $r = $q->fetch(PDO::FETCH_OBJ); - - // FIXME Clear out Important Dates as part of rollover - if ($r->rollovercheck) { - echo error(i18n("It has been more than 4 months since your fair. In order to prepare the system for the next year's fair, you should go to the SFIAB Configuration page, and click on 'Rollover Fair Year'. Do not start updating the system with new information until the year has been properly rolled over.")); - } - - $q = $pdo->prepare('SELECT * FROM award_prizes WHERE `external_identifier` IS NOT NULL - AND external_identifier=prize'); - $q->execute(); - if ($q->rowCount() > 0) { - /* - * The bug was that the external_identifier was set to the prize name.. so only display the warning - * if we find that case for a non-sfiab external fair - */ - while (($p = $q->fetch(PDO::FETCH_ASSOC))) { - $qq = $pdo->prepare("SELECT * FROM award_awards - LEFT JOIN fairs ON fairs.id=award_awards.award_source_fairs_id - WHERE award_awards.id=? - AND year=? - AND award_awards.award_source_fairs_id IS NOT NULL - AND fairs.type='ysc' "); - $qq->execute([$p['award_awards_id'], $config['FAIRYEAR']]); - } - } -} - -$CWSFDivisions = array( - 1 => 'Discovery', - 2 => 'Energy', - 3 => 'Environment', - 4 => 'Health', - 5 => 'Information', - 6 => 'Innovation', - 7 => 'Resources' -); - -function theme_icon($icon, $width = 0) -{ - global $theme_icons, $config; - - $w = ($width == 0) ? '' : "width=\"$width\""; - if ($theme_icons['icons'][$icon]) - return "\""'; - - return ''; -} - -// $d can be a unix timestamp integer, OR a text string, eg 2008-01-22 -function format_date($d) -{ - global $config; - if (is_numeric($d)) - return date($config['dateformat'], $d); - else { - if ($d != '0000-00-00') - return date($config['dateformat'], strtotime($d)); - else { - return i18n('Not set.'); - // return '0000-00-00'; - } - } -} - -// $t can be a unix timestamp integer, or a text string, eg 10:23:48 -function format_time($t) -{ - global $config; - if (is_numeric($t)) - return date($config['timeformat'], $t); - else - return date($config['timeformat'], strtotime($t)); -} - -// $dt can be a unix timestamp integer, or a text string, eg 2008-01-22 10:23:48 -function format_datetime($dt) -{ - if (is_numeric($dt)) { - return format_date($dt) . ' ' . i18n('at') . ' ' . format_time($dt); - } else { - list($d, $t) = explode(' ', $dt); - return format_date($d) . ' ' . i18n('at') . ' ' . format_time($t); - } -} - -function format_money($n, $decimals = true) -{ - global $neg; - if ($n < 0) { - $neg = true; - $n = $n * -1; - } - // get the part before the decimal - $before = floor(get_value_or_default($n, 0)); - $out = ''; - - // space it out in blocks of three - for ($x = strlen($before); $x > 3; $x -= 3) { - $out = substr($before, $x - 3, 3) . ' ' . $out; - } - if ($x > 0) - $out = substr($before, 0, $x) . ' ' . $out; - - // trim any leading/trailing space that was added - $out = trim($out); - - if ($neg) - $negdisp = '-'; - else - $negdisp = ''; - - if ($decimals) { - // get everything after the decimal place, and %02f it. - $after = substr(strstr(sprintf('%.02f', $n), '.'), 1); - - // finally display it with the right language localization - if ($_SESSION['lang'] == 'fr') - return sprintf('%s%s,%s $', $negdisp, $out, $after); - else - return sprintf('%s$%s.%s', $negdisp, $out, $after); - } else { - if ($_SESSION['lang'] == 'fr') - return sprintf('%s%s $', $negdisp, $out); - else - return sprintf('%s$%s', $negdisp, $out); - } -} - -function message_push($m) -{ - if (!is_array($_SESSION['messages'])) - $_SESSION['messages'] = array(); - $_SESSION['messages'][] = $m; -} - -function notice_($str, $i18n_array = array(), $timeout = -1, $type = 'notice') -{ - if ($timeout == -1) - $timeout = 5000; - echo ""; -} - -function happy_($str, $i18n_array = array(), $timeout = -1) -{ - notice_($str, $i18n_array, $timeout, 'happy'); -} - -function error_($str, $i18n_array = array(), $timeout = -1) -{ - notice_($str, $i18n_array, $timeout, 'error'); -} - -function debug_($str) -{ - if (get_value_from_array($_SESSION, 'debug') != true) - return; - $s = str_replace("\n", '', nl2br(htmlspecialchars($str))) . '
    '; - echo ""; -} - -// this function returns a HTML colour code ranging between red and green, with yellow in the middle based on the percent passed into it -function colour_to_percent($percent) -{ - // 0 is red - // 50 is yellow - // 100 is green - - if ($percent <= 50) - $red = 255; - else - $red = (100 - $percent) * 2 / 100 * 255; - ; - - if ($percent > 50) - $green = 255; - else - $green = ($percent) * 2 / 100 * 255; - ; - - // echo "red=$red"; - // echo "green=$green"; - $str = '#' . sprintf('%02s', dechex($red)) . sprintf('%02s', dechex($green)) . '00'; - return $str; -} - -function format_duration($seconds, $granularity = 2) -{ - $units = array( - '1 year|:count years' => 31536000, - '1 week|:count weeks' => 604800, - '1 day|:count days' => 86400, - '1 hour|:count hours' => 3600, - '1 min|:count min' => 60, - '1 sec|:count sec' => 1 - ); - $output = ''; - // $output.=time()." - ".$timestamp." = ".$seconds; - foreach ($units as $key => $value) { - $key = explode('|', $key); - if ($seconds >= $value) { - $count = floor($seconds / $value); - $output .= ($output ? ' ' : ''); - $output .= ($count == 1) ? $key[0] : str_replace(':count', $count, $key[1]); - $seconds %= $value; - $granularity--; - } - if ($granularity == 0) { - break; - } - } - return $output ? $output : '0 sec'; -} - -function getTextFromHtml($html) -{ - // first, replace an

    with


    - $text = str_replace('

    ', '


    ', $html); - // next, replace a
    with

    - $text = str_replace('
    ', '

    ', $html); - // now replace any
    with newlines - $text = preg_replace('//', chr(13) . chr(10), $text); - // and strip the rest of the tags - $text = strip_tags($text); - - // a few common html entities - // replace & with & first, so multiply-encoded entities will decode (like "&#160;") - $text = str_replace('&', '&', $text); - $text = str_replace(' ', ' ', $text); - $text = str_replace(' ', ' ', $text); - $text = str_replace('<', '<', $text); - $text = str_replace('>', '>', $text); - - // text version should always wrap at 75 chars, some mail severs wont accept - // mail with very long lines - $text = wordwrap($text, 75, "\n", true); - - return $text; -} - -function getUserForSponsor($sponsor_id) -{ - global $pdo; - // loop through each contact and draw a form with their data in it. - $q = $pdo->prepare("SELECT *,MAX(year) FROM users LEFT JOIN users_sponsor ON users_sponsor.users_id=users.id - WHERE - sponsors_id=? - AND types LIKE '%sponsor%' - GROUP BY uid - HAVING deleted='no' - ORDER BY users_sponsor.primary DESC,lastname,firstname - LIMIT 1 - "); - $q->execute([$sponsor_id]); - $r = $q->fetch(); - return user_load_by_uid($r->uid); -} - -function projectdivisions_load($year = false) -{ - global $config, $pdo; - if ($year == false) - $year = $config['FAIRYEAR']; - $divs = array(); - $q = $pdo->prepare('SELECT * FROM projectdivisions WHERE year=?'); - $q->execute([$year]); - while ($d = $q->fetch(PDO::FETCH_ASSOC)) - $divs[$d['id']] = $d; - return $divs; -} - -function projectcategories_load($year = false) -{ - global $config, $pdo; - if ($year == false) - $year = $config['FAIRYEAR']; - $cats = array(); - $q = $pdo->prepare('SELECT * FROM projectcategories WHERE year=?'); - $q->execute([$year]); - while ($c = $q->fetch(PDO::FETCH_ASSOC)) - $cats[$c['id']] = $c; - return $cats; -} - -// Converts the numeric value "$val" to an English text representation of it (e.g. "two thousand four"). -// If the "$monetize" flag is set to true, then it's formatted to be useable on printed cheques (e.g. "***** Two Thousand Four 00/100 *****". -function wordify($val, $monetize = false) -{ - $digits = array('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'); - if ($monetize) { - $pennies = intval(($val - intval($val)) * 100); - $returnval = 'and ' . sprintf('%02d', $pennies) . '/100'; - } else if ($val != intval($val)) { - $dec = $val - intval($val); - $returnval = 'point'; - while ($dec) { - $dec *= 10; - $returnval .= ' ' . smallIntToText(intval($dec)); - $dec -= intval($dec); - } - } - $val = intval($val); - $powerofthousand = array( - '', - 'Thousand', - 'Million', - 'Billion', - 'trillion', - 'quadrillion' - ); - $n = 0; - if (!$val) { - $returnval = 'Zero ' . $returnval; - } else { - while ($val > 0) { - $sectionVal = $val % 1000; - if ($sectionVal != 0) { - $sectionText = smallIntToText($sectionVal); - if ($powerofthousand[$n] != '') { - $returnval = $sectionText . ' ' . $powerofthousand[$n] . ' ' . $returnval; - } else { - $returnval = $sectionText . ' ' . $returnval; - } - } - $val = intval($val / 1000); - $n++; - } - } - if ($monetize) - $returnval = '***' . $returnval; - return $returnval; -} - -// Converts a number between zero and one thousand to Canadian English text -function smallIntToText($number) -{ - $number %= 1000; - $rvals = array( - 0 => 'Zero', - 1 => 'One', - 2 => 'Two', - 3 => 'Three', - 4 => 'Four', - 5 => 'Five', - 6 => 'Six', - 7 => 'Seven', - 8 => 'Eight', - 9 => 'Nine', - 10 => 'Ten', - 11 => 'Eleven', - 12 => 'Twelve', - 13 => 'Thirteen', - 14 => 'Fourteen', - 15 => 'Fifteen', - 16 => 'Sixteen', - 17 => 'Seventeen', - 18 => 'Eighteen', - 19 => 'Nineteen', - 20 => 'Twenty', - 30 => 'Thirty', - 40 => 'Forty', - 50 => 'Fifty', - 60 => 'Sixty', - 70 => 'Seventy', - 80 => 'Eighty', - 90 => 'Ninety', - ); - if (array_key_exists($number, $rvals)) - return $rvals[$number]; - $returnval = ''; - if ($number >= 100) { - $hundred = intval($number / 100); - $returnval = $rvals[$hundred] . ' Hundred'; - $number -= 100 * $hundred; - } - if (array_key_exists($number, $rvals)) { - if ($number > 0) - $returnval .= ' ' . $rvals[$number]; - return $returnval; - } - if ($number >= 10) { - $ten = intval($number / 10); - if ($returnval != '') - $returnval .= ' '; - $returnval .= $rvals[10 * $ten]; - $number -= 10 * $ten; - } - if ($number > 0) { - $returnval .= ' ' . $rvals[$number]; - } - return $returnval; -} - -?> \ No newline at end of file +/* It's kinda important that there be no blank lines AFTER this, or they're sent as newlines. This messes + * up login.php */ +?> diff --git a/config.inc.php.template b/config.inc.php.template deleted file mode 100644 index 11cf31f9..00000000 --- a/config.inc.php.template +++ /dev/null @@ -1,29 +0,0 @@ - - Copyright (C) 2005 James Grant - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation, version 2. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ -?> - diff --git a/config/award_sources.php b/config/award_sources.php deleted file mode 100644 index b4c0e704..00000000 --- a/config/award_sources.php +++ /dev/null @@ -1,65 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'external_award_sources'); - -$editor = new TableEditor('award_sources', - array( - 'enabled' => 'Enabled?', - 'name' => 'Name', - 'website' => 'Help URL', - 'username' => 'Username', - ), - array( - 'enabled' => 'Enabled?', - 'name' => 'Name', - 'url' => 'Source URL', - 'website' => 'Help URL', - 'username' => 'Username', - 'password' => 'Password' - )); - -$editor->setPrimaryKey('id'); -$editor->setDefaultSortField('name'); -$editor->setRecordType('Award Source'); -$editor->execute(); - -echo '
    '; -echo i18n("Open the 'Help URL' in your browser to see if the award source applies to your fair and to obtain the username/password for the source if it does."); - -send_footer(); -?> diff --git a/config/backuprestore.php b/config/backuprestore.php deleted file mode 100644 index 9c655ceb..00000000 --- a/config/backuprestore.php +++ /dev/null @@ -1,348 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SHOW TABLES FROM $DBNAME"); - $tableq->execute(); - while ($tr = $tableq->fetch(PDO::FETCH_NUM)) { - $table = $tr[0]; - $dump .= "#TABLE: $table\n"; - $columnq = $pdo->prepare("SHOW COLUMNS FROM $table"); - $columnq->execute(); - $str = "INSERT INTO `$table` ("; - unset($fields); - $fields = array(); - while ($cr = $columnq->fetch(PDO::FETCH_OBJ)) { - $str .= '`' . $cr->Field . '`,'; - $fields[] = $cr->Field; - } - $str = substr($str, 0, -1); - $str .= ') VALUES ('; - - $dataq = $pdo->prepare("SELECT * FROM `$table` ORDER BY $fields[0]"); - $dataq->execute(); - while ($data = $dataq->fetch(PDO::FETCH_OBJ)) { - $insertstr = $str; - foreach ($fields AS $field) { - if (is_null($data->$field)) - $insertstr .= 'NULL,'; - else { - $escaped = str_replace('\\', '\\\\', $data->$field); - $escaped = str_replace("'", "''", $escaped); - $escaped = str_replace("\n", '\n', $escaped); - $escaped = str_replace("\r", '\r', $escaped); - $insertstr .= "'" . $escaped . "',"; - } - } - $insertstr = substr($insertstr, 0, -1); - $insertstr .= ');'; - - $dump .= $insertstr . "\n"; - } - } - header('Content-Type: text/sql'); - header('Content-Disposition: attachment; filename=sfiab_backup_' . date('Y-m-d-H-i-s', $ts) . '.sql'); - header('Content-Length: ' . strlen($dump)); - // Make IE with SSL work - header('Pragma: public'); - echo $dump; -} else if (get_value_from_array($_POST, 'action') == 'restore') { - echo send_header('Database Backup/Restore', - array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'backup_restore'); - echo i18n('Processing file: %1', array($_FILES['restore']['name'])) . "
    \n"; - echo "
    \n"; - do { - // hmm just some random filename - $tmpfilename = md5(rand() . time() . $_FILES['restore']['name']); - } while (file_exists("../data/backuprestore/$tmpfilename")); - - move_uploaded_file($_FILES['restore']['tmp_name'], "../data/backuprestore/$tmpfilename"); - - $fp = fopen("../data/backuprestore/$tmpfilename", 'r'); - - for ($x = 0; $x < 4; $x++) { - $line = fgets($fp, 1024); - $hdr[$x] = split(':', trim($line), 2); - } - fclose($fp); - - if (trim($hdr[0][0]) == '#SFIAB SQL BACKUP') { - echo "\n"; - $now = date('r'); - echo '\n"; - if (trim($hdr[0][1]) < trim($now)) - $cl = 'happy'; - else { - $cl = 'error'; - $err = true; - } - echo "\n"; - if (version_compare(trim($hdr[1][1]), $config['version']) == 0) - $cl = 'happy'; - else { - $cl = 'error'; - $err = true; - } - echo "\n"; - if (version_compare(trim($hdr[2][1]), $config['DBVERSION']) == 0) - $cl = 'happy'; - else { - $cl = 'error'; - $err = true; - } - echo "\n"; - if (trim($hdr[3][1]) == $config['fairname']) - $cl = 'happy'; - else { - $cl = 'error'; - $err = true; - } - echo "\n"; - echo "
    ' . i18n('Information') . '' . i18n('Restore File') . '' . i18n('Live System') . "
    " . i18n('Date/Time') . '' . $hdr[0][1] . "$now
    " . i18n('SFIAB Version') . '' . $hdr[1][1] . '' . $config['version'] . "
    " . i18n('Database Version') . '' . $hdr[2][1] . '' . $config['DBVERSION'] . "
    " . i18n('Fair Name') . '' . $hdr[3][1] . '' . $config['fairname'] . "
    \n"; - echo "
    \n"; - if ($err) { - echo error(i18n('Warning, there are discrepencies between the restore file and your current live system. Proceed at your own risk!')); - } - - echo "
    \n"; - echo "\n"; - echo '\n"; - echo "\n"; - echo ''; - echo "
    \n"; - echo "
    \n"; - echo ''; - echo i18n('If you are not going to proceed, please click here to clean up the temporary files which may contain confidential information!'); - echo "\n"; - } else { - echo error(i18n('This file is NOT a SFIAB SQL BACKUP file')); - echo i18n('Only backups created with the SFIAB Backup Creator can be used to restore from.'); - echo "
    \n"; - } - - send_footer(); -} else if (get_value_from_array($_POST, 'action') == 'restoreproceed') { - echo send_header('Database Backup/Restore', - array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'backup_restore'); - - // make sure the filename's good before we used it - if (mb_ereg('^[a-z0-9]{32}$', $_POST['realfilename']) && file_exists('../data/backuprestore/' . $_POST['realfilename'])) { - $filename = $_POST['realfilename']; - echo i18n('Proceeding with database restore from %1', array($_POST['filename'])) . '...'; - $lines = file("../data/backuprestore/$filename"); - $err = false; - echo '
    ';
    -		foreach ($lines AS $line) {
    -			$line = trim($line);
    -			if (mb_ereg('^#TABLE: (.*)', $line, $args)) {
    -				// empty out the table
    -				$sql = "TRUNCATE TABLE $args[1]";
    -				//			echo $sql."\n";
    -
    -				$stmt = $pdo->prepare($sql);
    -				$stmt->execute();
    -			} else if (mb_ereg('^#', $line)) {
    -				// just skip it
    -			} else {
    -				// insert the new data
    -
    -				$stmt = $pdo->prepare($line);
    -				$stmt->execute();
    -				if ($pdo->errorInfo()) {
    -					echo $line . "\n";
    -					echo $pdo->errorInfo() . "\n";
    -					$err = true;
    -				}
    -			}
    -		}
    -		echo '
    '; - if ($err) { - echo error(i18n('An error occured while importing the restore database')); - } else - echo happy(i18n('Database successfully restored')); - - unlink("../data/backuprestore/$filename"); - } else - echo error(i18n('Invalid filename')); - - send_footer(); -} else if (get_value_from_array($_POST, 'action') == 'clean_judges') { - // select all judges - $query = $pdo->prepare('SELECT * FROM users WHERE types LIKE "judge"'); - $query->execute(); - show_pdo_errors_if_any($pdo); - - // Go through each judge and test: - while ($judge = $query->fetch(PDO::FETCH_ASSOC)) { - // if they are deleted - if ($judge['deleted'] == 'yes') { - // Make types an array if it isn't already. Allows user_purge function to work properly - if (!is_array($judge['types'])) { - $judge['types'] = array($judge['types']); - } - - user_purge($judge, 'judge'); - } else { - // Find max year of judge - $max_year_query = $pdo->prepare('SELECT year FROM users WHERE uid =? ORDER BY year DESC limit 1'); - $max_year_query->execute([$judge['uid']]); - $judge_max_year = $max_year_query->fetch(PDO::FETCH_ASSOC); - // Grab old judge info. - // Old judge info consists of all entries in the database that are not the most recent for the specific judge - $deletable = $pdo->prepare('SELECT * FROM users WHERE uid =? AND year NOT LIKE ?'); - $deletable->execute([$judge['uid'],$judge_max_year['year']]); - // and if they have old data from previous fair years - if ($deletable->rowCount() > 0) { - // delete old data one by one - while ($old_judge_data = $deletable->fetch(PDO::FETCH_ASSOC)) { - if (!isset($old_judge_data['type']) && !is_array($old_judge_data['type'])) { - $old_judge_data['types'] = array($old_judge_data['types']); - } - user_purge($old_judge_data, 'judge'); - } - } - } - } - - echo send_header('Database Backup/Restore', - array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'backup_restore'); - - $stmt = $pdo->prepare('OPTIMIZE TABLE users, users_judge'); - $stmt->execute(); - - if ($pdo->errorInfo()[0] == 0) { - echo happy(i18n('Old judge data purged.')); - } else { - error(i18n($pdo->errorInfo()[0])); - } -} else if (get_value_from_array($_POST, 'action') == 'clean_parents') { - $query_parents = $pdo->prepare('SELECT * FROM users WHERE types LIKE "parent" AND year !=?'); - $query_parents->execute([$config['FAIRYEAR']]); - while ($parent = $query_parents->fetch(PDO::FETCH_ASSOC)) { - if (!is_array($parent['types'])) { - $parent['types'] = array($parent['types']); - } - - user_purge($parent, 'parent'); - } - - echo send_header('Database Backup/Restore', - array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'backup_restore'); - - $stmt = $pdo->prepare('OPTIMIZE TABLE users, users_parent'); - $stmt->execute(); - - if ($pdo->errorInfo()[0] == 0) { - echo happy(i18n('Old parent data purged.')); - } else { - error(i18n($pdo->errorInfo()[0])); - } -} else { - echo send_header('Database Backup/Restore', - array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'backup_restore'); - - // we try to remove temp files every time we load this page, who knows, maybe they navigated away - // last time instead of clicking the link to come back here - $dh = opendir('../data/backuprestore'); - $removed = false; - while ($fn = readdir($dh)) { - if (mb_ereg('[a-z0-9]{32}', $fn)) { - unlink("../data/backuprestore/$fn"); - $removed = true; - } - } - closedir($dh); - - if ($removed) { - echo happy(i18n('Temporary files successfully removed')); - } - - echo '

    ' . i18n('Backup Database') . "

    \n"; - echo '' . i18n('Create Database Backup File') . "
    \n"; - echo "

    \n"; - echo "
    \n"; - - echo '

    ' . i18n('Restore Database') . "

    \n"; - echo error(i18n('WARNING: Importing a backup will completely DESTROY all data currently in the database and replace it with what is in the backup file')); - echo "
    \n"; - echo "\n"; - echo "\n"; - echo '\n"; - echo "
    \n"; - - echo '
    '; - echo '

    ' . i18n('Clean Database') . "

    \n"; - echo error(i18n('WARNING: Cleaning the database COMPLETELY DELETES old data on users')); - - echo ' RECOMMENDED: Backup database before using the below buttons

    '; - - echo " Remove Old Judge Data
    • All information about who has judged in past fairs will be lost -\t
    • All deleted judges will be purged from the system
    "; - - echo "
    Remove Old Emergency Contact / Parent Data
    • All parent information or other emergency contact information from all previous fair years will be purged from the system -\t \t\t\t\t\t\t\t\t\t\t\t\t
    • It will no longer be possible to email any emergency contacts from previous fair years once the button is clicked

    "; - echo ''; - echo '', 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. (date|registration). If "date" is used, it must be configured under "Important Dates" section.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_type', 'open', 'The type of Participant Registration to use: open | singlepassword | schoolpassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'judge_registration_type', 'open', 'The type of Judge Registration to use: open | singlepassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_singlepassword', '', 'The single password to use for participant registration if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration','-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'judge_registration_singlepassword', '', 'The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registraiton', '-1'); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregclose', 'Special Awards self-nomination closes', -1); - -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('fr', 'Français', 'Y'); - -INSERT INTO `provinces` (`code`, `province`) VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('QC', 'Québec'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('YK', 'Yukon Territory'); - -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, -1); -INSERT INTO `award_types` VALUES (2, 'Special', 2, -1); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, -1); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, -1); -INSERT INTO `award_types` VALUES (5, 'Other', 4, -1); - -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('register_participants_main_instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', -1); -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('index', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, generate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', -1); - -INSERT INTO `emails` VALUES ('', 'register_participants_resend_regnum', 'Participant Registration - Resend Registration Number', 'Resend the password to the participant if they submit a ''forgot regnum'' request', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'We have received a request for the retrieval of your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_participant', 'New Participant', 'Email that new participants receive when they are added to the system', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_judge_invite', 'New Judge Invitation', 'This is sent to a new judge when they are invited using the invite judges administration section, only available when judge_registraiton_type=invite', 'registration@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\r\n\r\nEmail Address: [EMAIL]\r\nPassword: [PASSWORD]\r\n\r\nYou can change your password once you login.', 'system'); -INSERT INTO `emails` VALUES ('', 'register_judges_resend_password', 'Judges Registration - Resend Password', 'Resend the password to the judge if they submit a ''forgot password'' request', 'website@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'We have received a request for the retrieval of your password from this email address. Please find your existing password below Judge Email Address: [EMAIL] Judge Registration Password: [PASSWORD] ', 'system'); - - -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'timeslot_length', '12', 'The length of time (in minutes) that a judging timeslot should be', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'timeslot_break', '3', 'The length of time (in minutes) between timeslots to allow judges to move between projects', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_times_judged', '3', 'The number of times that each project must be judged (by different judging teams)', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_timeslots', '20', 'The number of timeslots available during the judging period', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_projects_per_team', '5', 'The maximum number of projects that a team can judge', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'min_judges_per_team', '2', 'The minimum number of judges that should be on a judging team', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_judges_per_team', '4', 'The maximum number of judges that should be on a judging team', '-1'); - -INSERT INTO `config` (`var`,`val`,`year`) VALUES ('DBVERSION','11','0'); - diff --git a/db/db.full.12.sql b/db/db.full.12.sql deleted file mode 100644 index 08d2094a..00000000 --- a/db/db.full.12.sql +++ /dev/null @@ -1,853 +0,0 @@ --- phpMyAdmin SQL Dump --- version 2.6.0-rc2 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 26, 2005 at 04:29 PM --- Server version: 4.0.24 --- PHP Version: 4.3.11 --- --- Database: `sfiab` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL, - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - UNIQUE (id,year) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0' -) TYPE=MyISAM; -ALTER TABLE `config` ADD UNIQUE (`var`,`year`); - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `catpref` int(10) unsigned default NULL, - `divpref` int(10) unsigned default NULL, - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `autocreate_type_id` int(11) default NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `lastupdate` DATETIME NOT NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY (`textname`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - `registration_password` varchar(32) NOT NULL default '', - `projectlimit` int(10) NOT NULL default '0', - `projectlimitper` ENUM('total','agecategory') NOT NULL default 'total', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `sex` enum('male','female') NOT NULL default 'male', - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` enum('small','medium','large','xlarge') NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - `argsdesc` text default NULL, - PRIMARY KEY (`strmd5`), - KEY `strmd5` (`strmd5`), - KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_catpref` --- - -CREATE TABLE `judges_catpref` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `judges_id` INT NOT NULL , - `projectcategories_id` INT NOT NULL , - `rank` INT NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_schedulerconfig` --- - -CREATE TABLE `judges_schedulerconfig` ( - `var` VARCHAR( 64 ) NOT NULL DEFAULT '', - `val` TEXT NOT NULL , - `description` TEXT NOT NULL , - `year` INT( 11 ) NOT NULL DEFAULT '0', - UNIQUE KEY `var` ( `var` , `year` ) -) TYPE = MYISAM ; - - --- Now insert everything - -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairname', '', 'Name of the fair', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('default_language', 'en', 'The default language if no language has yet been specified', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minstudentsperproject', '1', 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxstudentsperproject', '2', 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('mingrade', '7', 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxgrade', '12', 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minage', '10', 'The minimum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxage', '21', 'The maximum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxmentorsperproject', '5', 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minmentorsperproject', '0', 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('usedivisionselector', 'yes', 'Specify whether to use the division selector flowchart questions to help decide on the division (yes/no)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minjudgeage', '21', 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxjudgeage', '100', 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('participant_student_foodreq', 'yes', 'Ask for students special food requirements (yes/no). Should be yes if you plan on providing lunch', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee', '', 'Registration Fee', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee_per', 'student', 'Registration fee is per student, or per project? (student/project)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('project_num_format', 'CDN', 'C=Category, D=Divison, N=2 digit Number', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_publiclayout', '', 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. If "date" is used, it must be configured under "Important Dates" section. If you do not wish to allow students to self-nominate for special awards, set to "none" (none|date|registration)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_type', 'open', 'The type of Participant Registration to use: open | singlepassword | schoolpassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'judge_registration_type', 'open', 'The type of Judge Registration to use: open | singlepassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_singlepassword', '', 'The single password to use for participant registration if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration','-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'judge_registration_singlepassword', '', 'The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registraiton', '-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'participant_student_tshirt', 'no', 'Ask for students their T-Shirt size (yes/no).', '-1'); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregclose', 'Special Awards self-nomination closes', -1); - -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('fr', 'Français', 'Y'); - -INSERT INTO `provinces` (`code`, `province`) VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('QC', 'Québec'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('YK', 'Yukon Territory'); - -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, -1); -INSERT INTO `award_types` VALUES (2, 'Special', 2, -1); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, -1); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, -1); -INSERT INTO `award_types` VALUES (5, 'Other', 4, -1); - -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('register_participants_main_instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', -1); -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('index', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, generate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', -1); - -INSERT INTO `emails` VALUES ('', 'register_participants_resend_regnum', 'Participant Registration - Resend Registration Number', 'Resend the password to the participant if they submit a ''forgot regnum'' request', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'We have received a request for the retrieval of your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_participant', 'New Participant', 'Email that new participants receive when they are added to the system', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_judge_invite', 'New Judge Invitation', 'This is sent to a new judge when they are invited using the invite judges administration section, only available when judge_registraiton_type=invite', 'registration@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\r\n\r\nEmail Address: [EMAIL]\r\nPassword: [PASSWORD]\r\n\r\nYou can change your password once you login.', 'system'); -INSERT INTO `emails` VALUES ('', 'register_judges_resend_password', 'Judges Registration - Resend Password', 'Resend the password to the judge if they submit a ''forgot password'' request', 'website@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'We have received a request for the retrieval of your password from this email address. Please find your existing password below Judge Email Address: [EMAIL] Judge Registration Password: [PASSWORD] ', 'system'); - - -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'timeslot_length', '12', 'The length of time (in minutes) that a judging timeslot should be', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'timeslot_break', '3', 'The length of time (in minutes) between timeslots to allow judges to move between projects', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_times_judged', '3', 'The number of times that each project must be judged (by different judging teams)', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_timeslots', '20', 'The number of timeslots available during the judging period', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_projects_per_team', '5', 'The maximum number of projects that a team can judge', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'min_judges_per_team', '2', 'The minimum number of judges that should be on a judging team', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_judges_per_team', '4', 'The maximum number of judges that should be on a judging team', '-1'); - -INSERT INTO `config` (`var`,`val`,`year`) VALUES ('DBVERSION','12','0'); - diff --git a/db/db.full.13.sql b/db/db.full.13.sql deleted file mode 100644 index feaca039..00000000 --- a/db/db.full.13.sql +++ /dev/null @@ -1,875 +0,0 @@ --- phpMyAdmin SQL Dump --- version 2.6.0-rc2 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 26, 2005 at 04:29 PM --- Server version: 4.0.24 --- PHP Version: 4.3.11 --- --- Database: `sfiab` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL, - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - UNIQUE (id,year) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0' -) TYPE=MyISAM; -ALTER TABLE `config` ADD UNIQUE (`var`,`year`); - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `catpref` int(10) unsigned default NULL, - `divpref` int(10) unsigned default NULL, - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `autocreate_type_id` int(11) default NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `allowdivisional` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `lastupdate` DATETIME NOT NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY (`textname`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `summarycountok` tinyint(1) NOT NULL default '1', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `board` varchar(64) NOT NULL default '', - `district` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - `registration_password` varchar(32) NOT NULL default '', - `projectlimit` int(10) NOT NULL default '0', - `projectlimitper` ENUM('total','agecategory') NOT NULL default 'total', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `sex` enum('male','female') NOT NULL default 'male', - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` enum('small','medium','large','xlarge') NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - `argsdesc` text default NULL, - PRIMARY KEY (`strmd5`), - KEY `strmd5` (`strmd5`), - KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_catpref` --- - -CREATE TABLE `judges_catpref` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `judges_id` INT NOT NULL , - `projectcategories_id` INT NOT NULL , - `rank` INT NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_schedulerconfig` --- - -CREATE TABLE `judges_schedulerconfig` ( - `var` VARCHAR( 64 ) NOT NULL DEFAULT '', - `val` TEXT NOT NULL , - `description` TEXT NOT NULL , - `year` INT( 11 ) NOT NULL DEFAULT '0', - UNIQUE KEY `var` ( `var` , `year` ) -) TYPE = MYISAM ; - - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategoriesdivisions_link` --- - -CREATE TABLE `projectcategoriesdivisions_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - - --- Now insert everything - -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairname', '', 'Name of the fair', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('default_language', 'en', 'The default language if no language has yet been specified', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minstudentsperproject', '1', 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxstudentsperproject', '2', 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('mingrade', '7', 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxgrade', '12', 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minage', '10', 'The minimum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxage', '21', 'The maximum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxmentorsperproject', '5', 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minmentorsperproject', '0', 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('usedivisionselector', 'yes', 'Specify whether to use the division selector flowchart questions to help decide on the division (yes/no)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minjudgeage', '21', 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxjudgeage', '100', 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('participant_student_foodreq', 'yes', 'Ask for students special food requirements (yes/no). Should be yes if you plan on providing lunch', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee', '', 'Registration Fee', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee_per', 'student', 'Registration fee is per student, or per project? (student/project)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('project_num_format', 'CDN', 'C=Category, D=Division, N=2 digit Number', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_publiclayout', '', 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. If "date" is used, it must be configured under "Important Dates" section. If you do not wish to allow students to self-nominate for special awards, set to "none" (none|date|registration)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_type', 'open', 'The type of Participant Registration to use: open | singlepassword | schoolpassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'judge_registration_type', 'open', 'The type of Judge Registration to use: open | singlepassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_singlepassword', '', 'The single password to use for participant registration if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration','-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'judge_registration_singlepassword', '', 'The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registraiton', '-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'participant_student_tshirt', 'no', 'Ask for students their T-Shirt size (yes/no).', '-1'); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_project_summary_wordmax', '100', 'The maximum number of words acceptable in the project summary', '-1'); -INSERT INTO `config` VALUES ('filterdivisionbycategory', 'no', 'Allows for setup of divisions on a categorical basis. Students can then only choose divisions that apply to their category. Only use if you want to offer a different set of divisions to each age category (no, yes).', -1); - -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregclose', 'Special Awards self-nomination closes', -1); - -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('fr', 'Français', 'Y'); - -INSERT INTO `provinces` (`code`, `province`) VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('QC', 'Québec'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('YK', 'Yukon Territory'); - -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, -1); -INSERT INTO `award_types` VALUES (2, 'Special', 2, -1); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, -1); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, -1); -INSERT INTO `award_types` VALUES (5, 'Other', 4, -1); - -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('register_participants_main_instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', -1); -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('index', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, generate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', -1); - -INSERT INTO `emails` VALUES ('', 'register_participants_resend_regnum', 'Participant Registration - Resend Registration Number', 'Resend the password to the participant if they submit a ''forgot regnum'' request', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'We have received a request for the retrieval of your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_participant', 'New Participant', 'Email that new participants receive when they are added to the system', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_judge_invite', 'New Judge Invitation', 'This is sent to a new judge when they are invited using the invite judges administration section, only available when judge_registraiton_type=invite', 'registration@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\r\n\r\nEmail Address: [EMAIL]\r\nPassword: [PASSWORD]\r\n\r\nYou can change your password once you login.', 'system'); -INSERT INTO `emails` VALUES ('', 'register_judges_resend_password', 'Judges Registration - Resend Password', 'Resend the password to the judge if they submit a ''forgot password'' request', 'website@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'We have received a request for the retrieval of your password from this email address. Please find your existing password below Judge Email Address: [EMAIL] Judge Registration Password: [PASSWORD] ', 'system'); - - -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_times_judged', '3', 'The number of times that each project must be judged (by different judging teams)', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_timeslots', '20', 'The number of timeslots available during the judging period', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_projects_per_team', '5', 'The maximum number of projects that a team can judge', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'min_judges_per_team', '2', 'The minimum number of judges that should be on a judging team', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_judges_per_team', '4', 'The maximum number of judges that should be on a judging team', '-1'); - -INSERT INTO `config` (`var`,`val`,`year`) VALUES ('DBVERSION','12','0'); - diff --git a/db/db.full.148.sql b/db/db.full.148.sql deleted file mode 100644 index 3912f7e1..00000000 --- a/db/db.full.148.sql +++ /dev/null @@ -1,3001 +0,0 @@ --- phpMyAdmin SQL Dump --- version 3.2.0 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: Oct 22, 2009 at 12:56 PM --- Server version: 5.0.75 --- PHP Version: 5.2.6-3ubuntu4.2 - -SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; - --- --- Database: `sfiab` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE IF NOT EXISTS `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `description` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - `cwsfaward` tinyint(1) NOT NULL default '0', - `self_nominate` enum('yes','no') NOT NULL default 'yes', - `schedule_judges` enum('yes','no') NOT NULL default 'yes', - `external_identifier` varchar(32) default NULL, - `external_postback` varchar(128) default NULL, - `external_additional_materials` tinyint(1) NOT NULL, - `external_register_winners` tinyint(1) NOT NULL, - `award_source_fairs_id` int(10) unsigned default NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `award_awards` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE IF NOT EXISTS `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `award_awards_projectcategories` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE IF NOT EXISTS `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `award_awards_projectdivisions` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE IF NOT EXISTS `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `value` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - `trophystudentkeeper` tinyint(1) NOT NULL default '0', - `trophystudentreturn` tinyint(1) NOT NULL default '0', - `trophyschoolkeeper` tinyint(1) NOT NULL default '0', - `trophyschoolreturn` tinyint(1) NOT NULL default '0', - `external_identifier` varchar(32) default NULL, - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `award_prizes` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `award_sources` --- - -CREATE TABLE IF NOT EXISTS `award_sources` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL, - `url` varchar(255) NOT NULL, - `website` varchar(255) NOT NULL, - `username` varchar(32) NOT NULL, - `password` varchar(32) NOT NULL, - `enabled` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; - --- --- Dumping data for table `award_sources` --- - -INSERT INTO `award_sources` (`id`, `name`, `url`, `website`, `username`, `password`, `enabled`) VALUES -(1, 'Sci-Tech Ontario', 'http://www.scitechontario.org/awarddownloader/index.php', 'http://www.scitechontario.org/awarddownloader/help.php', '', '', 'no'), -(2, 'Youth Science Foundation', 'https://secure.ysf-fsj.ca/awarddownloader/index.php', 'http://apps.ysf-fsj.ca/awarddownloader/help.php', '', '', 'no'); - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE IF NOT EXISTS `award_types` ( - `id` int(10) unsigned NOT NULL default '0', - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - UNIQUE KEY `id` (`id`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `award_types` --- - -INSERT INTO `award_types` (`id`, `type`, `order`, `year`) VALUES -(1, 'Divisional', 1, -1), -(2, 'Special', 2, -1), -(3, 'Interdisciplinary', 3, -1), -(4, 'Grand', 5, -1), -(5, 'Other', 4, -1); - --- -------------------------------------------------------- - --- --- Table structure for table `cms` --- - -CREATE TABLE IF NOT EXISTS `cms` ( - `id` int(11) NOT NULL auto_increment, - `filename` varchar(128) NOT NULL, - `dt` datetime NOT NULL, - `lang` varchar(2) NOT NULL, - `title` varchar(128) NOT NULL, - `text` text NOT NULL, - `showlogo` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; - --- --- Dumping data for table `cms` --- - -INSERT INTO `cms` (`id`, `filename`, `dt`, `lang`, `title`, `text`, `showlogo`) VALUES -(1, 'index.html', '0000-00-00 00:00:00', 'en', '', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, generate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', 1); - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE IF NOT EXISTS `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `committees` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE IF NOT EXISTS `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `users_uid` int(11) NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `committees_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE IF NOT EXISTS `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `category` varchar(64) NOT NULL default '', - `type` enum('','yesno','number','text','enum','multisel','language') NOT NULL, - `type_values` tinytext NOT NULL, - `ord` int(11) NOT NULL default '0', - `description` text NOT NULL, - `year` int(11) NOT NULL default '0', - UNIQUE KEY `var` (`var`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `config` --- - -INSERT INTO `config` (`var`, `val`, `category`, `type`, `type_values`, `ord`, `description`, `year`) VALUES -('fairname', '', 'Global', '', '', 100, 'Name of the fair', -1), -('default_language', 'en', 'Global', 'language', '', 200, 'The default language if no language has yet been specified', -1), -('minstudentsperproject', '1', 'Participant Registration', 'number', '', 1200, 'The minimum number of students that can work on a project (usually 1)', -1), -('maxstudentsperproject', '2', 'Participant Registration', 'number', '', 1300, 'The maximum number of students that can work on a project (Usually 2)', -1), -('mingrade', '7', 'Participant Registration', 'number', '', 800, 'The minimum school grade that can enter a project', -1), -('maxgrade', '12', 'Participant Registration', 'number', '', 900, 'The maximum school grade that can enter a project', -1), -('minage', '10', 'Participant Registration', 'number', '', 600, 'The minimum age of the students', -1), -('maxage', '21', 'Participant Registration', 'number', '', 700, 'The maximum age of the students', -1), -('maxmentorsperproject', '5', 'Participant Registration', 'number', '', 1100, 'The maximum number of mentors that can help with a project', -1), -('minmentorsperproject', '0', 'Participant Registration', 'number', '', 1000, 'The minimum number of mentors that can help with a project (usually 0)', -1), -('usedivisionselector', 'yes', 'Participant Registration', 'yesno', '', 3000, 'Specify whether to use the division selector flowchart questions to help decide on the division', -1), -('minjudgeage', '21', 'Judge Registration', '', '', 400, 'The minimum age that a person must be in order to be a judge.', -1), -('maxjudgeage', '100', 'Judge Registration', '', '', 500, 'The maximum age that a person can be in order to be a judge', -1), -('participant_student_foodreq', 'yes', 'Participant Registration', 'yesno', '', 2500, 'Ask for students special food requirements. Should be ''Yes'' if you plan on providing food to the students.', -1), -('regfee', '', 'Participant Registration', 'number', '', 300, 'Registration Fee', -1), -('regfee_per', 'student', 'Participant Registration', 'enum', 'student=Student|project=Project', 400, 'Registration fee is per student, or per project?', -1), -('project_num_format', 'CDN', 'Global', '', '', 600, 'Project Numbering Format: C=Category ID, c=Category shortform, D=Division ID, d=Division shortform, N, N1, N2, ..., N9=intra division digit sequence number, zero padded to 1-9 digits, or 2 digits if just N is used. X, X1, X2, ..., N9=global sequence number, zero padded to 1-9 digits, or 3 digits if just X is used.', -1), -('committee_publiclayout', '', 'Global', '', '', 500, 'The layout (html table row) used to display the committee members on the public committee page', -1), -('judges_password_expiry_days', '365', 'Judge Registration', '', '', 300, 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1), -('maxspecialawardsperproject', '7', 'Participant Registration', 'number', '', 1400, 'The maximum number of self-nominated special awards a project can sign-up for', -1), -('specialawardnomination', 'date', 'Participant Registration', 'enum', 'none=None|date=By Date|registration=With Registration', 2900, 'Select when students may self nominate for special awards.
    • None - Students may not self-nominate for special awards.
    • By Date - Between specific dates, specified in the "Important Dates" section.
    • With Registration - During the same time as registration is open.
    ', -1), -('fairmanageremail', '', 'Global', '', '', 300, 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1), -('participant_registration_type', 'open', 'Participant Registration', 'enum', 'open=Open|singlepassword=Single Password|schoolpassword=School Password|invite=Invite|openorinvite=Open or Invite', 100, 'The type of Participant Registration to use', -1), -('judge_registration_type', 'open', 'Judge Registration', 'enum', 'open=Open|singlepassword=Single Password|invite=Invite', 100, 'The type of Judge Registration to use', -1), -('participant_registration_singlepassword', '', 'Participant Registration', '', '', 200, 'The single password to use for participant registration if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration', -1), -('judge_registration_singlepassword', '', 'Judge Registration', '', '', 200, 'The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registration', -1), -('participant_student_tshirt', 'no', 'Participant Registration', 'yesno', '', 2600, 'Ask for students their T-Shirt size', -1), -('participant_project_summary_wordmax', '100', 'Participant Registration', 'number', '', 1800, 'The maximum number of words acceptable in the project summary', -1), -('filterdivisionbycategory', 'no', 'Global', 'yesno', '', 400, 'Allows for the setup of different divisions for each category', -1), -('participant_student_personal', 'yes', 'Participant Registration', 'yesno', '', 1500, 'Collect personal information about the students, such as phone number, address, gender, etc.', -1), -('max_projects_per_team', '7', 'Judge Scheduler', '', '', 400, 'The maximum number of projects that a judging team can judge.', -1), -('times_judged', '1', 'Judge Scheduler', '', '', 500, 'The number of times each project must be judged by different judging teams.', -1), -('min_judges_per_team', '3', 'Judge Scheduler', '', '', 200, 'The minimum number of judges that can be on a judging team.', -1), -('max_judges_per_team', '3', 'Judge Scheduler', '', '', 300, 'The maximum number of judges that can be on a judging team.', -1), -('effort', '10000', 'Judge Scheduler', 'enum', '100=Low|1000=Medium|10000=High', 100, 'This controls how long and hard the judge scheduler will look for a scheduling solution. Low effort will finish almost instantly but give a very poor result. High effort can take several tens of minutes to run, but it gives a very good solution.', -1), -('project_status', 'payment_pending', 'Judge Scheduler', 'enum', 'open=Open|payment_pending=Payment Pending|complete=Complete', 600, 'The status a project must have to be considered eligible for judge scheduling. ', -1), -('DBVERSION', '148', 'Special', '', '', 0, '', 0), -('fiscal_yearend', '', 'Fundraising', 'text', '', 200, 'Your organization''s fiscal year end. Specified in format MM-DD. Must be set in order for the Fundraising Module to function.', -1), -('participant_mentor', 'yes', 'Participant Registration', 'yesno', '', 1700, 'Ask for mentorship information', -1), -('participant_project_title_charmax', '100', 'Participant Registration', 'number', '', 2000, 'The maximum number of characters acceptable in the project title (Max 255)', -1), -('participant_project_table', 'yes', 'Participant Registration', 'yesno', '', 2300, 'Ask if the project requires a table', -1), -('participant_project_electricity', 'yes', 'Participant Registration', 'yesno', '', 2400, 'Ask if the project requires electricity', -1), -('tours_enable', 'no', 'Tours', 'yesno', '', 0, 'Enable the "tours" module. Set to "yes" to allow participants to select tours', -1), -('tours_choices_min', '1', 'Tours', '', '', 100, 'Minimum number of tours a participant must select', -1), -('tours_choices_max', '3', 'Tours', '', '', 200, 'Maximum number of tours a participant may select', -1), -('scheduler_enable_sa_scheduling', 'no', 'Judge Scheduler', 'yesno', '', 900, 'Allow the scheduler to automatically create a judging team for each special award, and assigned unused divisional judges to special awards.', -1), -('participant_student_tshirt_cost', '0.00', 'Participant Registration', 'number', '', 2700, 'The cost of each T-Shirt. If this is non-zero, a "None" option is added to the T-Shirt size selection box, and a note is added indicating the cost of each T-Shirt', -1), -('regfee_show_info', 'no', 'Participant Registration', 'yesno', '', 500, 'Show a breakdown of the total Registration Fee calculation on the main student registration page', -1), -('specialawardnomination_aftersignatures', 'yes', 'Participant Registration', 'yesno', '', 2800, 'Does the signature page need to be received BEFORE students are allowed to self nominate for special awards?', -1), -('judges_specialaward_enable', 'no', 'Judge Registration', 'yesno', '', 1000, 'Allow judges to specify their special award judging preferences (in addition to the divisional judging preferences)', -1), -('judges_specialaward_only_enable', 'no', 'Judge Registration', 'yesno', '', 1100, 'Allow judges to specify that they are a judge for a specific special award. If a judge selects this, it disables their divisional preference selection entirely', -1), -('judges_specialaward_min', '1', 'Judge Registration', 'number', '', 1200, 'Minimum number of special awards a judge must select when specifying special award preferences', -1), -('judges_specialaward_max', '6', 'Judge Registration', 'number', '', 1300, 'Maximum number of special awards a judge must select when specifying special award preferences', -1), -('participant_student_pronunciation', 'no', 'Participant Registration', 'yesno', '', 1600, 'Ask the student for a pronunciation key for their name (for award ceremonies)', -1), -('projects_per_special_award_judge', '20', 'Judge Scheduler', 'number', '', 1000, 'The maximum number of projects that each special awards judge can judge.', -1), -('volunteer_password_expiry_days', '365', 'Volunteer Registration', 'number', '', 300, 'Volunteer passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1), -('volunteer_enable', 'no', 'Volunteer Registration', 'yesno', '', 100, 'Allow Volunteers to create accounts and sign up for volunteer positions (positions are configurable in the admin section)', -1), -('volunteer_personal_fields', 'phonehome,phonecell,org', 'Volunteer Registration', 'multisel', 'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province|firstaid=First Aid and CPR', 500, 'Personal Information to ask for on the Volunteer personal information page (in addition to Name and Email)', -1), -('volunteer_personal_required', '', 'Volunteer Registration', 'multisel', 'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province|firstaid=First Aid and CPR', 600, 'Required Personal Information on the Volunteer personal information page (Name and Email is always required)', -1), -('committee_personal_fields', 'phonehome,phonecell,phonework,fax,org', 'Committee Members', 'multisel', 'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province|firstaid=First Aid and CPR', 500, 'Personal Information to ask for on the Committee Member profile page (in addition to Name and Email)', -1), -('committee_personal_required', '', 'Committee Members', 'multisel', 'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province|firstaid=First Aid and CPR', 600, 'Required Personal Information on the Committee Member profile page (Name and Email is always required)', -1), -('volunteer_registration_type', 'open', 'Volunteer Registration', 'enum', 'open=Open|singlepassword=Single Password|invite=Invite', 150, 'The type of Volunteer Registration to use', -1), -('volunteer_registration_singlepassword', '', 'Volunteer Registration', 'text', '', 160, 'The single password to use if using Single Password Volunteer Registration (the option above this one). Ignored if not using Single Password volunteer registration.', -1), -('reports_show_unawarded_awards', 'yes', 'Reports', 'yesno', '', 100, 'Display awards that were not awarded in the Award Ceremony script.', -1), -('reports_show_unawarded_prizes', 'yes', 'Reports', 'yesno', '', 200, 'Display prizes that were not awarded in the Award Ceremony script.', -1), -('participant_project_summary_wordmin', '0', 'Participant Registration', 'number', '', 1900, 'The minimum number of words acceptable in the project summary', -1), -('tours_assigner_activity', 'Done', 'Tour Assigner', '', '', 99999, '', 0), -('tours_assigner_percent', '-1', 'Tour Assigner', '', '', 99999, '', 0), -('tours_assigner_effort', '10000', 'Tour Assigner', 'enum', '100=Low|1000=Medium|10000=High', 99999, 'This controls how long and hard the tour assigner will look for a quality solution. Low effort will finish almost instantly but give a very poor result. High effort can take several minutes to run, but it gives a very good solution. ', -1), -('project_sort_format', '', 'Global', 'text', '', 610, 'Project Sorting Format. This format will be used to sort the projects on lists and in reports. Use the same letters as the Project Number Format (C, D, N, etc.). If left blank, the project number format will also be used to sort the projects.', -1), -('winners_show_prize_amounts', 'yes', 'Global', 'yesno', '', 700, 'Show the dollar amounts of the cash/scholarship prizes on the publicly viewable winners page.', -1), -('participant_short_title_charmax', '50', 'Participant Registration', 'number', '', 2200, 'The maximum number of characters acceptable in the short project title (Max 255)', -1), -('participant_short_title_enable', 'no', 'Participant Registration', 'yesno', '', 2100, 'Ask the participants for a short project title as well as their full title.', -1), -('participant_regfee_items_enable', 'no', 'Participant Registration', 'yesno', '', 2750, 'Ask the participants for registration fee item options. Enabling this item also enables a Registration Fee Item Manager in the Administration section. Use this manager to add optional registration items (that have a fee) for a student to select.', -1), -('judge_scheduler_percent', '-1', 'Judge Scheduler', '', '', 99999, '', 0), -('judge_scheduler_activity', 'Done', 'Judge Scheduler', '', '', 99999, '', 0), -('provincestate', 'Province', 'Localization', 'enum', 'Province=Province|State=State', 100, 'Use Province or State?', -1), -('postalzip', 'Postal Code', 'Localization', 'enum', 'Postal Code=Postal Code|Zip Code=Zip Code', 110, 'Use Postal Code or Zip Code?', -1), -('theme', 'default', 'Global', 'text', '', 850, 'Theme for colours/icons', -1), -('dateformat', 'Y-m-d', 'Localization', 'text', '', 200, 'Date format (formatting options)', -1), -('timeformat', 'H:i:s', 'Localization', 'text', '', 210, 'Time format (formatting options)', -1), -('country', 'CA', 'Localization', 'text', '', 90, 'Country code (look up 2 letter code)', -1), -('sponsor_personal_fields', 'phonecell,phonework,fax,org', 'Sponsors', 'multisel', 'salutation=Salutation|sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province', 500, 'Personal Information to ask for on the Sponsor Contact profile page (in addition to Name and Email)', -1), -('sponsor_personal_required', '', 'Sponsors', 'multisel', 'salutation=Salutation|sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province', 600, 'Required Personal Information on the Sponsor Contact profile page (Name and Email is always required)', -1), -('judges_availability_enable', 'no', 'Judge Registration', 'yesno', '', 950, 'Allow judges to specify their time availability on the fair day based on the defined judging rounds/timeslots. The scheduler will then use this judge availability data when assigning judges to teams and projects.', -1), -('fair_stats_participation', 'yes', 'Science Fairs', 'yesno', '', 100, 'Gather Stats: Student and School Participation (students, gender, and projects) by age group.', -1), -('fair_stats_schools_ext', 'yes', 'Science Fairs', 'yesno', '', 200, 'Gather Stats: Extended school participation data.
      \r\n
    • Number of at-risk schools and students
    • Number of public schools and students
    • Number of private/independent schools and students
    ', -1), -('fair_stats_minorities', 'firstnations', 'Science Fairs', 'multisel', 'firstnations=Number of First Nation students|disabled=Number of Disabled students', 300, 'Gather Stats: Participant minority demographics (must be filled in manually by the fair)', -1), -('fair_stats_guests', 'yes', 'Science Fairs', 'yesno', '', 400, 'Gather Stats: Number of student and public guests (must be filled in manually by the fair)', -1), -('fair_stats_sffbc_misc', 'yes', 'Science Fairs', 'yesno', '', 500, 'Gather Stats: Misc. SFFBC Data
    • Supporting teachers
    • Students with increased interest in sci and tech
    • Students considering a career in science
    ', -1), -('fair_stats_info', 'yes', 'Science Fairs', 'yesno', '', 600, 'Gather Stats: Information about the fair (date, location, budget, charity info).', -1), -('fair_stats_next_chair', 'yes', 'Science Fairs', 'yesno', '', 700, 'Gather Stats: Chairperson name and contact info for the next year', -1), -('fair_stats_scholarships', 'yes', 'Science Fairs', 'yesno', '', 800, 'Gather Stats: Scholarships given out by the fair', -1), -('fair_stats_delegates', 'yes', 'Science Fairs', 'yesno', '', 900, 'Gather Stats: CWSF Delegate names/email/jacket size', -1), -('FISCALYEAR', '2010', 'Special', '', '', 0, 'The current fiscal year that the fundraising module is using', 0), -('registered_charity', 'no', 'Fundraising', 'yesno', '', 100, 'Is your organization a registered charity?', -1), -('charity_number', '', 'Fundraising', 'text', '', 200, 'Charity Registration Number', -1); - --- -------------------------------------------------------- - --- --- Table structure for table `countries` --- - -CREATE TABLE IF NOT EXISTS `countries` ( - `code` varchar(2) NOT NULL, - `country` varchar(64) NOT NULL, - UNIQUE KEY `code` (`code`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `countries` --- - -INSERT INTO `countries` (`code`, `country`) VALUES -('AF', 'AFGHANISTAN'), -('AX', 'ÅLAND ISLANDS'), -('AL', 'ALBANIA'), -('DZ', 'ALGERIA'), -('AS', 'AMERICAN SAMOA'), -('AD', 'ANDORRA'), -('AO', 'ANGOLA'), -('AI', 'ANGUILLA'), -('AQ', 'ANTARCTICA'), -('AG', 'ANTIGUA AND BARBUDA'), -('AR', 'ARGENTINA'), -('AM', 'ARMENIA'), -('AW', 'ARUBA'), -('AU', 'AUSTRALIA'), -('AT', 'AUSTRIA'), -('AZ', 'AZERBAIJAN'), -('BS', 'BAHAMAS'), -('BH', 'BAHRAIN'), -('BD', 'BANGLADESH'), -('BB', 'BARBADOS'), -('BY', 'BELARUS'), -('BE', 'BELGIUM'), -('BZ', 'BELIZE'), -('BJ', 'BENIN'), -('BM', 'BERMUDA'), -('BT', 'BHUTAN'), -('BO', 'BOLIVIA'), -('BA', 'BOSNIA AND HERZEGOVINA'), -('BW', 'BOTSWANA'), -('BV', 'BOUVET ISLAND'), -('BR', 'BRAZIL'), -('IO', 'BRITISH INDIAN OCEAN TERRITORY'), -('BN', 'BRUNEI DARUSSALAM'), -('BG', 'BULGARIA'), -('BF', 'BURKINA FASO'), -('BI', 'BURUNDI'), -('KH', 'CAMBODIA'), -('CM', 'CAMEROON'), -('CA', 'CANADA'), -('CV', 'CAPE VERDE'), -('KY', 'CAYMAN ISLANDS'), -('CF', 'CENTRAL AFRICAN REPUBLIC'), -('TD', 'CHAD'), -('CL', 'CHILE'), -('CN', 'CHINA'), -('CX', 'CHRISTMAS ISLAND'), -('CC', 'COCOS (KEELING) ISLANDS'), -('CO', 'COLOMBIA'), -('KM', 'COMOROS'), -('CG', 'CONGO'), -('CD', 'CONGO, THE DEMOCRATIC REPUBLIC OF THE'), -('CK', 'COOK ISLANDS'), -('CR', 'COSTA RICA'), -('CI', 'CÔTE D''IVOIRE'), -('HR', 'CROATIA'), -('CU', 'CUBA'), -('CY', 'CYPRUS'), -('CZ', 'CZECH REPUBLIC'), -('DK', 'DENMARK'), -('DJ', 'DJIBOUTI'), -('DM', 'DOMINICA'), -('DO', 'DOMINICAN REPUBLIC'), -('EC', 'ECUADOR'), -('EG', 'EGYPT'), -('SV', 'EL SALVADOR'), -('GQ', 'EQUATORIAL GUINEA'), -('ER', 'ERITREA'), -('EE', 'ESTONIA'), -('ET', 'ETHIOPIA'), -('FK', 'FALKLAND ISLANDS (MALVINAS)'), -('FO', 'FAROE ISLANDS'), -('FJ', 'FIJI'), -('FI', 'FINLAND'), -('FR', 'FRANCE'), -('GF', 'FRENCH GUIANA'), -('PF', 'FRENCH POLYNESIA'), -('TF', 'FRENCH SOUTHERN TERRITORIES'), -('GA', 'GABON'), -('GM', 'GAMBIA'), -('GE', 'GEORGIA'), -('DE', 'GERMANY'), -('GH', 'GHANA'), -('GI', 'GIBRALTAR'), -('GR', 'GREECE'), -('GL', 'GREENLAND'), -('GD', 'GRENADA'), -('GP', 'GUADELOUPE'), -('GU', 'GUAM'), -('GT', 'GUATEMALA'), -('GG', 'GUERNSEY'), -('GN', 'GUINEA'), -('GW', 'GUINEA-BISSAU'), -('GY', 'GUYANA'), -('HT', 'HAITI'), -('HM', 'HEARD ISLAND AND MCDONALD ISLANDS'), -('VA', 'HOLY SEE (VATICAN CITY STATE)'), -('HN', 'HONDURAS'), -('HK', 'HONG KONG'), -('HU', 'HUNGARY'), -('IS', 'ICELAND'), -('IN', 'INDIA'), -('ID', 'INDONESIA'), -('IR', 'IRAN, ISLAMIC REPUBLIC OF'), -('IQ', 'IRAQ'), -('IE', 'IRELAND'), -('IM', 'ISLE OF MAN'), -('IL', 'ISRAEL'), -('IT', 'ITALY'), -('JM', 'JAMAICA'), -('JP', 'JAPAN'), -('JE', 'JERSEY'), -('JO', 'JORDAN'), -('KZ', 'KAZAKHSTAN'), -('KE', 'KENYA'), -('KI', 'KIRIBATI'), -('KP', 'KOREA, DEMOCRATIC PEOPLE''S REPUBLIC OF'), -('KR', 'KOREA, REPUBLIC OF'), -('KW', 'KUWAIT'), -('KG', 'KYRGYZSTAN'), -('LA', 'LAO PEOPLE''S DEMOCRATIC REPUBLIC'), -('LV', 'LATVIA'), -('LB', 'LEBANON'), -('LS', 'LESOTHO'), -('LR', 'LIBERIA'), -('LY', 'LIBYAN ARAB JAMAHIRIYA'), -('LI', 'LIECHTENSTEIN'), -('LT', 'LITHUANIA'), -('LU', 'LUXEMBOURG'), -('MO', 'MACAO'), -('MK', 'MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF'), -('MG', 'MADAGASCAR'), -('MW', 'MALAWI'), -('MY', 'MALAYSIA'), -('MV', 'MALDIVES'), -('ML', 'MALI'), -('MT', 'MALTA'), -('MH', 'MARSHALL ISLANDS'), -('MQ', 'MARTINIQUE'), -('MR', 'MAURITANIA'), -('MU', 'MAURITIUS'), -('YT', 'MAYOTTE'), -('MX', 'MEXICO'), -('FM', 'MICRONESIA, FEDERATED STATES OF'), -('MD', 'MOLDOVA, REPUBLIC OF'), -('MC', 'MONACO'), -('MN', 'MONGOLIA'), -('ME', 'MONTENEGRO'), -('MS', 'MONTSERRAT'), -('MA', 'MOROCCO'), -('MZ', 'MOZAMBIQUE'), -('MM', 'MYANMAR'), -('NA', 'NAMIBIA'), -('NR', 'NAURU'), -('NP', 'NEPAL'), -('NL', 'NETHERLANDS'), -('AN', 'NETHERLANDS ANTILLES'), -('NC', 'NEW CALEDONIA'), -('NZ', 'NEW ZEALAND'), -('NI', 'NICARAGUA'), -('NE', 'NIGER'), -('NG', 'NIGERIA'), -('NU', 'NIUE'), -('NF', 'NORFOLK ISLAND'), -('MP', 'NORTHERN MARIANA ISLANDS'), -('NO', 'NORWAY'), -('OM', 'OMAN'), -('PK', 'PAKISTAN'), -('PW', 'PALAU'), -('PS', 'PALESTINIAN TERRITORY, OCCUPIED'), -('PA', 'PANAMA'), -('PG', 'PAPUA NEW GUINEA'), -('PY', 'PARAGUAY'), -('PE', 'PERU'), -('PH', 'PHILIPPINES'), -('PN', 'PITCAIRN'), -('PL', 'POLAND'), -('PT', 'PORTUGAL'), -('PR', 'PUERTO RICO'), -('QA', 'QATAR'), -('RE', 'REUNION'), -('RO', 'ROMANIA'), -('RU', 'RUSSIAN FEDERATION'), -('RW', 'RWANDA'), -('BL', 'SAINT BARTHÉLEMY'), -('SH', 'SAINT HELENA'), -('KN', 'SAINT KITTS AND NEVIS'), -('LC', 'SAINT LUCIA'), -('MF', 'SAINT MARTIN'), -('PM', 'SAINT PIERRE AND MIQUELON'), -('VC', 'SAINT VINCENT AND THE GRENADINES'), -('WS', 'SAMOA'), -('SM', 'SAN MARINO'), -('ST', 'SAO TOME AND PRINCIPE'), -('SA', 'SAUDI ARABIA'), -('SN', 'SENEGAL'), -('RS', 'SERBIA'), -('SC', 'SEYCHELLES'), -('SL', 'SIERRA LEONE'), -('SG', 'SINGAPORE'), -('SK', 'SLOVAKIA'), -('SI', 'SLOVENIA'), -('SB', 'SOLOMON ISLANDS'), -('SO', 'SOMALIA'), -('ZA', 'SOUTH AFRICA'), -('GS', 'SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS'), -('ES', 'SPAIN'), -('LK', 'SRI LANKA'), -('SD', 'SUDAN'), -('SR', 'SURINAME'), -('SJ', 'SVALBARD AND JAN MAYEN'), -('SZ', 'SWAZILAND'), -('SE', 'SWEDEN'), -('CH', 'SWITZERLAND'), -('SY', 'SYRIAN ARAB REPUBLIC'), -('TW', 'TAIWAN, PROVINCE OF CHINA'), -('TJ', 'TAJIKISTAN'), -('TZ', 'TANZANIA, UNITED REPUBLIC OF'), -('TH', 'THAILAND'), -('TL', 'TIMOR-LESTE'), -('TG', 'TOGO'), -('TK', 'TOKELAU'), -('TO', 'TONGA'), -('TT', 'TRINIDAD AND TOBAGO'), -('TN', 'TUNISIA'), -('TR', 'TURKEY'), -('TM', 'TURKMENISTAN'), -('TC', 'TURKS AND CAICOS ISLANDS'), -('TV', 'TUVALU'), -('UG', 'UGANDA'), -('UA', 'UKRAINE'), -('AE', 'UNITED ARAB EMIRATES'), -('GB', 'UNITED KINGDOM'), -('US', 'UNITED STATES'), -('UM', 'UNITED STATES MINOR OUTLYING ISLANDS'), -('UY', 'URUGUAY'), -('UZ', 'UZBEKISTAN'), -('VU', 'VANUATU'), -('VE', 'VENEZUELA'), -('VN', 'VIET NAM'), -('VG', 'VIRGIN ISLANDS, BRITISH'), -('VI', 'VIRGIN ISLANDS, U.S.'), -('WF', 'WALLIS AND FUTUNA'), -('EH', 'WESTERN SAHARA'), -('YE', 'YEMEN'), -('ZM', 'ZAMBIA'), -('ZW', 'ZIMBABWE'); - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE IF NOT EXISTS `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; - --- --- Dumping data for table `dates` --- - -INSERT INTO `dates` (`id`, `date`, `name`, `description`, `year`) VALUES -(1, '0000-00-00 00:00:00', 'fairdate', 'Date of the fair', -1), -(2, '0000-00-00 00:00:00', 'regopen', 'Registration system opens', -1), -(3, '0000-00-00 00:00:00', 'regclose', 'Registration system closes', -1), -(4, '0000-00-00 00:00:00', 'postparticipants', 'Registered participants are posted on the website', -1), -(5, '0000-00-00 00:00:00', 'postwinners', 'Winners are posted on the website', -1), -(6, '0000-00-00 00:00:00', 'judgeregopen', 'Judges registration opens', -1), -(7, '0000-00-00 00:00:00', 'judgeregclose', 'Judges registration closes', -1), -(8, '0000-00-00 00:00:00', 'specawardregopen', 'Special Awards self-nomination opens', -1), -(9, '0000-00-00 00:00:00', 'specawardregclose', 'Special Awards self-nomination closes', -1); - --- -------------------------------------------------------- - --- --- Table structure for table `documents` --- - -CREATE TABLE IF NOT EXISTS `documents` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL, - `title` varchar(128) NOT NULL, - `sel_category` varchar(128) NOT NULL, - `filename` varchar(128) default NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `documents` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE IF NOT EXISTS `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `bodyhtml` text, - `type` enum('system','user','fundraising') NOT NULL default 'system', - `fundraising_campaigns_id` int(10) unsigned default NULL, - `lastsent` datetime default NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ; - --- --- Dumping data for table `emails` --- - -INSERT INTO `emails` (`id`, `val`, `name`, `description`, `from`, `subject`, `body`, `bodyhtml`, `type`, `fundraising_campaigns_id`, `lastsent`) VALUES -(1, 'register_participants_resend_regnum', 'Participant Registration - Resend Registration Number', 'Resend the password to the participant if they submit a ''forgot regnum'' request', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'We have received a request for the retrieval of your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n', NULL, 'system', NULL, NULL), -(2, 'new_participant', 'New Participant', 'Email that new participants receive when they are added to the system', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nEmail Address: [EMAIL]\r\nRegistration Number: [REGNUM]\r\n', NULL, 'system', NULL, NULL), -(5, 'register_participants_received', 'Participant Registration - Form Received', 'Sent to the participant when the admin flags their signature form as received', '', 'Registration for [FAIRNAME] Complete', 'Dear [FIRSTNAME],\r\nYour registration for the [FAIRNAME] is now complete.\r\nYour project number is [PROJECTNUMBER]. Please write down your project number and bring it with you to the fair in order to expedite the check-in process.\r\n\r\nSincerely,\r\n [FAIRNAME]', NULL, 'system', NULL, NULL), -(6, 'register_participants_paymentpending', 'Participant Registration - Payment Pending', 'Sent to the participant when the admin flags their signature form as received but payment pending', '', 'Registration for [FAIRNAME] Not Complete - Payment Pending', 'Dear [FIRSTNAME],\r\nYour registration for the [FAIRNAME] is not yet complete. We received your registration form however it was missing the required registration fee. Please send the required registration fee in aso soon as possible in order to complete your registration.\r\n\r\nYour project number is [PROJECTNUMBER]. Please write down your project number and bring it with you to the fair in order to expedite the check-in process.\r\n\r\nSincerely,\r\n [FAIRNAME]', NULL, 'system', NULL, NULL), -(7, 'volunteer_welcome', 'Volunteer Registration - Welcome', 'Welcome email sent to a volunteer after they have registered for the first time. This email includes their temporary password.', '', 'Volunteer Registration for [FAIRNAME]', 'Thank you for registering as a volunteer at our fair. Please find your temporary password below. After logging in for the first time you will be prompted to change your password.\n\nVolunteer Email Address: [EMAIL]\nVolunteer Password: [PASSWORD]', NULL, 'system', NULL, NULL), -(8, 'volunteer_recover_password', 'Volunteer Registration - Recover Password', 'Recover the password for a volunteer if they submit a ''forgot password'' request', '', 'Volunteer Registration for [FAIRNAME]', 'We have received a request for the recovery of your password from this email address. Please find your new password below:\n\nVolunteer Email Address: [EMAIL]\nVolunteer Password: [PASSWORD] ', NULL, 'system', NULL, NULL), -(9, 'committee_recover_password', 'Committee Members - Recover Password', 'Recover the password for a committee member if they submit a ''forgot password'' request', '', 'Committee Member for [FAIRNAME]', 'We have received a request for the recovery of your password from this email address. Please find your new password below:\n\nCommittee Member Email Address: [EMAIL]\nCommittee Member Password: [PASSWORD] ', NULL, 'system', NULL, NULL), -(10, 'volunteer_new_invite', 'Volunteers - New Volunteer Invitation', 'This is sent to a new volunteer when they are invited using the invite volunteers administration section, only available when the Volunteer Registration Type is set to Invite', '', 'Volunteer Registration for [FAIRNAME]', 'You have been invited to be a volunteer for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the volunteer registration site with:\n\nEmail Address: [EMAIL]\nPassword: [PASSWORD]\n\nYou can change your password once you login.', NULL, 'system', NULL, NULL), -(11, 'volunteer_add_invite', 'Volunteers - Add Volunteer Invitation', 'This is sent to existing users when they are invited using the invite volunteers administration section, only available when the Volunteer Registration Type is set to Invite', '', 'Volunteer Registration for [FAIRNAME]', 'The role of volunteer for the [FAIRNAME] has been added to your account by a committee member. When you login again, there will be a [Switch Roles] link in the upper right hand area of the page. Clicking on [Switch Roles] will let you switch between being a Volunteer and your other roles without needing to logout.\n', NULL, 'system', NULL, NULL), -(12, 'judge_recover_password', 'Judges - Recover Password', 'Recover the password for a judge if they submit a ''forgot password'' request', '', 'Password Recovery for [FAIRNAME]', 'We have received a request for the recovery of your password from this email address. Please find your new password below:\n\nJudge Email Address: [EMAIL]\nJudge Password: [PASSWORD] ', NULL, 'system', NULL, NULL), -(13, 'judge_welcome', 'Judges - Welcome', 'Welcome email sent to a judge after they have registered for the first time. This email includes their temporary password.', '', 'Judge Registration for [FAIRNAME]', 'Thank you for registering as a judge at our fair. Please find your temporary password below. After logging in for the first time you will be prompted to change your password.\n\nJudge Email Address: [EMAIL]\nJudge Password: [PASSWORD]', NULL, 'system', NULL, NULL), -(14, 'judge_new_invite', 'Judges - New Judge Invitation', 'This is sent to a new judge when they are invited using the invite users administration option.', '', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\n\nEmail Address: [EMAIL]\nPassword: [PASSWORD]\nYou can change your password once you login.', NULL, 'system', NULL, NULL), -(15, 'judge_add_invite', 'Judges - Add Judge Invitation', 'This is sent to existing users when they are invited using the invite users administration option.', '', 'Judge Registration for [FAIRNAME]', 'The role of judge for the [FAIRNAME] has been added to your account by a committee member. When you login again, there will be a [Switch Roles] link in the upper right hand area of the page. Clicking on [Switch Roles] will let you switch between being a Judge and your other roles without needing to logout.\n', NULL, 'system', NULL, NULL), -(16, 'judge_activate_reminder', 'Judges - Activation Reminder', 'This is sent to existing judges who have not yet activated their account for the current fair year.', '', 'Judge Registration for [FAIRNAME]', 'This message is to let you know that Judge registration for the [FAIRNAME] is now open. If you would like to participate in the fair this year please log in to the registration site using your email address ([EMAIL]) an\n', NULL, 'system', NULL, NULL), -(17, 'volunteer_activate_reminder', 'Volunteer Registration - Activation Reminder', 'This is sent to existing volunteers who have not yet activated their account for the current fair year.', '', 'Volunteer Registration for [FAIRNAME]', 'This message is to let you know that Volunteer registration for the [FAIRNAME] is now open. If you would like to participate in the fair this year please log in to the registration site using your email address ([EMAIL]).\n', NULL, 'system', NULL, NULL); - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE IF NOT EXISTS `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `emergencycontact` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `fairs` --- - -CREATE TABLE IF NOT EXISTS `fairs` ( - `id` int(11) NOT NULL auto_increment, - `name` tinytext NOT NULL, - `abbrv` varchar(16) NOT NULL, - `type` enum('feeder','sfiab','ysc') NOT NULL, - `url` tinytext NOT NULL, - `website` tinytext NOT NULL, - `username` varchar(32) NOT NULL, - `password` varchar(32) NOT NULL, - `enable_stats` enum('no','yes') NOT NULL, - `enable_awards` enum('no','yes') NOT NULL, - `enable_winners` enum('no','yes') NOT NULL, - `gather_stats` set('participation','schools_ext','minorities','guests','sffbc_misc','info','next_chair','scholarships','delegates') NOT NULL, - `catmap` tinytext NOT NULL, - `divmap` tinytext NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; - --- --- Dumping data for table `fairs` --- - -INSERT INTO `fairs` (`id`, `name`, `abbrv`, `type`, `url`, `website`, `username`, `password`, `enable_stats`, `enable_awards`, `enable_winners`, `gather_stats`, `catmap`, `divmap`) VALUES -(1, 'Sci-Tech Ontario', 'STO', 'ysc', 'http://www.scitechontario.org/awarddownloader/index.php', 'http://www.scitechontario.org/awarddownloader/help.php', '', '', 'yes', 'yes', 'yes', '', '', ''), -(2, 'Youth Science Canada', 'YSC', 'ysc', 'https://secure.ysf-fsj.ca/awarddownloader/index.php', 'http://apps.ysf-fsj.ca/awarddownloader/help.php', '', '', 'yes', 'yes', 'yes', '', '', ''); - --- -------------------------------------------------------- - --- --- Table structure for table `fairs_awards_link` --- - -CREATE TABLE IF NOT EXISTS `fairs_awards_link` ( - `id` int(11) NOT NULL auto_increment, - `fairs_id` int(11) NOT NULL, - `award_awards_id` int(11) NOT NULL, - `download_award` enum('no','yes') NOT NULL, - `upload_winners` enum('no','yes') NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `fairs_awards_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `fairs_stats` --- - -CREATE TABLE IF NOT EXISTS `fairs_stats` ( - `id` int(11) NOT NULL auto_increment, - `fairs_id` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `start_date` date NOT NULL default '0000-00-00', - `end_date` date NOT NULL default '0000-00-00', - `address` text NOT NULL, - `budget` float NOT NULL default '0', - `ysf_affiliation_complete` enum('Y','N') NOT NULL default 'Y', - `charity` tinytext NOT NULL, - `male_1` int(11) NOT NULL default '0', - `male_4` int(11) NOT NULL default '0', - `male_7` int(11) NOT NULL default '0', - `male_9` int(11) NOT NULL default '0', - `male_11` int(11) NOT NULL default '0', - `female_1` int(11) NOT NULL default '0', - `female_4` int(11) NOT NULL default '0', - `female_7` int(11) NOT NULL default '0', - `female_9` int(11) NOT NULL default '0', - `female_11` int(11) NOT NULL default '0', - `projects_1` int(11) NOT NULL default '0', - `projects_4` int(11) NOT NULL default '0', - `projects_7` int(11) NOT NULL default '0', - `projects_9` int(11) NOT NULL default '0', - `projects_11` int(11) NOT NULL default '0', - `students_total` int(11) NOT NULL, - `schools_total` int(11) NOT NULL, - `schools_active` int(11) NOT NULL, - `students_public` int(11) NOT NULL, - `schools_public` int(11) NOT NULL default '0', - `students_private` int(11) NOT NULL, - `schools_private` int(11) NOT NULL default '0', - `schools_districts` int(11) NOT NULL default '0', - `studentsvisiting` int(11) NOT NULL default '0', - `publicvisiting` int(11) NOT NULL default '0', - `firstnations` int(11) NOT NULL default '0', - `students_atrisk` int(11) NOT NULL default '0', - `schools_atrisk` int(11) NOT NULL, - `teacherssupporting` int(11) NOT NULL default '0', - `increasedinterest` int(11) NOT NULL default '0', - `consideringcareer` int(11) NOT NULL default '0', - `committee_members` int(11) NOT NULL, - `judges` int(11) NOT NULL, - `next_chair_name` varchar(128) NOT NULL default '', - `next_chair_email` varchar(64) NOT NULL, - `next_chair_hphone` varchar(32) NOT NULL default '', - `next_chair_bphone` varchar(32) NOT NULL default '', - `next_chair_fax` varchar(32) NOT NULL default '', - `scholarships` text NOT NULL, - `delegate1` varchar(64) NOT NULL default '', - `delegate2` varchar(64) NOT NULL default '', - `delegate3` varchar(64) NOT NULL default '', - `delegate4` varchar(64) NOT NULL default '', - `delegate1_email` tinytext NOT NULL, - `delegate2_email` tinytext NOT NULL, - `delegate3_email` tinytext NOT NULL, - `delegate4_email` tinytext NOT NULL, - `delegate1_size` enum('small','medium','large','xlarge') NOT NULL default 'small', - `delegate2_size` enum('small','medium','large','xlarge') NOT NULL default 'small', - `delegate3_size` enum('small','medium','large','xlarge') NOT NULL default 'small', - `delegate4_size` enum('small','medium','large','xlarge') NOT NULL default 'small', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `fairs_stats` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `fundraising_campaigns` --- - -CREATE TABLE IF NOT EXISTS `fundraising_campaigns` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL, - `type` varchar(64) NOT NULL, - `startdate` date NOT NULL, - `enddate` date NOT NULL, - `followupdate` date default NULL, - `active` enum('no','yes') NOT NULL, - `target` int(11) NOT NULL, - `fundraising_goal` varchar(32) NOT NULL, - `filterparameters` varchar(255) default NULL, - `fiscalyear` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `fundraising_campaigns` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `fundraising_campaigns_users_link` --- - -CREATE TABLE IF NOT EXISTS `fundraising_campaigns_users_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `fundraising_campaigns_id` int(10) unsigned NOT NULL, - `users_uid` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `fundraising_campaigns_users_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `fundraising_donations` --- - -CREATE TABLE IF NOT EXISTS `fundraising_donations` ( - `id` int(11) NOT NULL auto_increment, - `sponsors_id` int(11) default NULL, - `fundraising_goal` varchar(32) NOT NULL, - `fundraising_campaigns_id` int(11) NOT NULL, - `value` int(11) NOT NULL, - `status` enum('pending','confirmed','received') NOT NULL, - `probability` int(11) NOT NULL, - `fiscalyear` int(11) NOT NULL default '0', - `thanked` enum('no','yes') NOT NULL default 'no', - `receiptrequired` enum('no','yes') NOT NULL, - `receiptsent` enum('no','yes') NOT NULL, - `datereceived` date default NULL, - `supporttype` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `fundraising_donations` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `fundraising_donor_levels` --- - -CREATE TABLE IF NOT EXISTS `fundraising_donor_levels` ( - `id` int(11) NOT NULL auto_increment, - `level` varchar(64) NOT NULL, - `min` int(11) NOT NULL, - `max` int(11) NOT NULL, - `description` text NOT NULL, - `fiscalyear` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; - --- --- Dumping data for table `fundraising_donor_levels` --- - -INSERT INTO `fundraising_donor_levels` (`id`, `level`, `min`, `max`, `description`, `fiscalyear`) VALUES -(1, 'Bronze', 100, 499, '', -1), -(2, 'Silver', 500, 999, '', -1), -(3, 'Gold', 1000, 10000, '', -1); - --- -------------------------------------------------------- - --- --- Table structure for table `fundraising_donor_logs` --- - -CREATE TABLE IF NOT EXISTS `fundraising_donor_logs` ( - `id` int(11) NOT NULL auto_increment, - `sponsors_id` int(11) NOT NULL, - `dt` datetime NOT NULL, - `users_id` int(11) NOT NULL, - `log` text NOT NULL, - `type` varchar(32) NOT NULL, - `fundraising_campaigns_id` int(10) unsigned default NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `fundraising_donor_logs` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `fundraising_goals` --- - -CREATE TABLE IF NOT EXISTS `fundraising_goals` ( - `id` int(10) unsigned NOT NULL auto_increment, - `goal` varchar(32) NOT NULL, - `name` varchar(128) NOT NULL, - `description` text, - `system` enum('no','yes') NOT NULL default 'no', - `budget` int(10) unsigned NOT NULL default '0', - `fiscalyear` int(11) NOT NULL default '0', - `deadline` date NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `type` (`goal`,`fiscalyear`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; - --- --- Dumping data for table `fundraising_goals` --- - -INSERT INTO `fundraising_goals` (`id`, `goal`, `name`, `description`, `system`, `budget`, `fiscalyear`, `deadline`) VALUES -(1, 'sfgeneral', 'Science Fair - General Funds', 'General funds donated to the science fair may be allocated as the science fair organizers see fit.', 'yes', 0, -1, '0000-00-00'), -(2, 'sfawards', 'Science Fair - Awards', 'Award Sponsorships are provided to allow an sponsor/donor to give a specific award.', 'yes', 0, -1, '0000-00-00'); - --- -------------------------------------------------------- - --- --- Table structure for table `judges_availability` --- - -CREATE TABLE IF NOT EXISTS `judges_availability` ( - `id` int(11) NOT NULL auto_increment, - `users_id` int(11) NOT NULL, - `date` date NOT NULL, - `start` time NOT NULL, - `end` time NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_availability` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_jdiv` --- - -CREATE TABLE IF NOT EXISTS `judges_jdiv` ( - `id` int(10) unsigned NOT NULL auto_increment, - `jdiv_id` int(11) NOT NULL default '0', - `projectdivisions_id` int(11) NOT NULL default '0', - `projectcategories_id` int(11) NOT NULL default '0', - `lang` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_jdiv` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_schedulerconfig` --- - -CREATE TABLE IF NOT EXISTS `judges_schedulerconfig` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0', - UNIQUE KEY `var` (`var`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `judges_schedulerconfig` --- - -INSERT INTO `judges_schedulerconfig` (`var`, `val`, `description`, `year`) VALUES -('num_times_judged', '3', 'The number of times that each project must be judged (by different judging teams)', -1), -('num_timeslots', '20', 'The number of timeslots available during the judging period', -1), -('max_projects_per_team', '5', 'The maximum number of projects that a team can judge', -1), -('min_judges_per_team', '2', 'The minimum number of judges that should be on a judging team', -1), -('max_judges_per_team', '4', 'The maximum number of judges that should be on a judging team', -1); - --- -------------------------------------------------------- - --- --- Table structure for table `judges_specialaward_sel` --- - -CREATE TABLE IF NOT EXISTS `judges_specialaward_sel` ( - `id` int(11) NOT NULL auto_increment, - `users_id` int(11) NOT NULL default '0', - `award_awards_id` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_specialaward_sel` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE IF NOT EXISTS `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `autocreate_type_id` int(11) default NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_teams` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE IF NOT EXISTS `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_teams_awards_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE IF NOT EXISTS `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `users_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_teams_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE IF NOT EXISTS `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_teams_timeslots_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE IF NOT EXISTS `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_teams_timeslots_projects_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE IF NOT EXISTS `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `round_id` int(11) NOT NULL, - `type` enum('timeslot','divisional1','divisional2','grand','special') NOT NULL, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `name` tinytext NOT NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_timeslots` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE IF NOT EXISTS `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `languages` --- - -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES -('en', 'English', 'Y'), -('fr', 'Français', 'Y'); - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE IF NOT EXISTS `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `mentors` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE IF NOT EXISTS `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `textdescription` varchar(255) NOT NULL, - `text` text NOT NULL, - `lastupdate` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `lang` varchar(2) NOT NULL default 'en', - PRIMARY KEY (`id`), - UNIQUE KEY `textname` (`textname`,`year`,`lang`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; - --- --- Dumping data for table `pagetext` --- - -INSERT INTO `pagetext` (`id`, `textname`, `textdescription`, `text`, `lastupdate`, `year`, `lang`) VALUES -(1, 'register_participants_main_instructions', 'Participant registration main page instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', '0000-00-00 00:00:00', -1, 'en'), -(3, 'register_judges_invite', 'Judge registration instructions for Invite-Only mode', 'Thank you for volunteering as a judge for the fair. Judge registration is by invitation only. To get started, please contact the chief judge. We will then send you an email with instructions on how to complete your registration. This extra step is only required for first time judges. We are confident that you will find the experience sufficiently enriching that you will continue to serve as a judge in future years. Thanks again for your willingness to participate.', '2009-10-22 12:56:05', -1, 'en'), -(4, 'register_volunteer_invite', 'Volunteer registration instructions for Invite-Only mode', 'Thank you for volunteering for the fair. Volunteer registration is by invitation only.

    Please contact the fair and request to be invited as a volunteer. We will then send you an email with instructions on how to complete your volunteer registration.

    If you have been invited already, you need to login using the same email address that you were invited with.', '0000-00-00 00:00:00', -1, 'en'), -(5, 'schoolaccess', 'School access login page', 'Welcome to the School Access Page. This page allows your school to provide several key pieces of information for the fair, as well as feedback about the schools experience with/at the fair.', '0000-00-00 00:00:00', -1, 'en'); - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE IF NOT EXISTS `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `category_shortform` char(3) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `projectcategories` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategoriesdivisions_link` --- - -CREATE TABLE IF NOT EXISTS `projectcategoriesdivisions_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `projectcategoriesdivisions_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE IF NOT EXISTS `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `cwsfdivisionid` int(11) default NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `projectdivisions` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE IF NOT EXISTS `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `projectdivisionsselector` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE IF NOT EXISTS `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectsort` varchar(16) default NULL, - `projectnumber_seq` int(11) NOT NULL, - `projectsort_seq` int(11) NOT NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `cwsfdivisionid` int(11) default NULL, - `title` varchar(255) NOT NULL default '', - `shorttitle` varchar(255) NOT NULL, - `summarycountok` tinyint(1) NOT NULL default '1', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - `fairs_id` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `projects` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE IF NOT EXISTS `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `projectsubdivisions` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE IF NOT EXISTS `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `project_specialawards_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE IF NOT EXISTS `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `countries_code` varchar(2) NOT NULL, - UNIQUE KEY `countries_code` (`countries_code`,`code`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `provinces` --- - -INSERT INTO `provinces` (`code`, `province`, `countries_code`) VALUES -('AB', 'Alberta', 'CA'), -('BC', 'British Columbia', 'CA'), -('MB', 'Manitoba', 'CA'), -('NB', 'New Brunswick', 'CA'), -('NF', 'Newfoundland and Labrador', 'CA'), -('NT', 'Northwest Territories', 'CA'), -('NS', 'Nova Scotia', 'CA'), -('NU', 'Nunavut', 'CA'), -('ON', 'Ontario', 'CA'), -('PE', 'Prince Edward Island', 'CA'), -('QC', 'Québec', 'CA'), -('SK', 'Saskatchewan', 'CA'), -('YK', 'Yukon Territory', 'CA'), -('AL', 'Alabama', 'US'), -('AK', 'Alaska', 'US'), -('AS', 'American Samoa', 'US'), -('AZ', 'Arizona', 'US'), -('AR', 'Arkansas', 'US'), -('CA', 'California', 'US'), -('CO', 'Colorado', 'US'), -('CT', 'Connecticut', 'US'), -('DE', 'Delaware', 'US'), -('DC', 'District of Columbia', 'US'), -('FM', 'Federated States of Micronesia', 'US'), -('FL', 'Florida', 'US'), -('GA', 'Georgia', 'US'), -('GU', 'Guam', 'US'), -('HI', 'Hawaii', 'US'), -('ID', 'Idaho', 'US'), -('IL', 'Illinois', 'US'), -('IN', 'Indiana', 'US'), -('IA', 'Iowa', 'US'), -('KS', 'Kansas', 'US'), -('KY', 'Kentucky', 'US'), -('LA', 'Louisiana', 'US'), -('ME', 'Maine', 'US'), -('MH', 'Marshall Islands', 'US'), -('MD', 'Maryland', 'US'), -('MA', 'Massachusetts', 'US'), -('MI', 'Michigan', 'US'), -('MN', 'Minnesota', 'US'), -('MS', 'Mississippi', 'US'), -('MO', 'Missouri', 'US'), -('MT', 'Montana', 'US'), -('NE', 'Nebraska', 'US'), -('NV', 'Nevada', 'US'), -('NH', 'New Hampshire', 'US'), -('NJ', 'New Jersey', 'US'), -('NM', 'New Mexico', 'US'), -('NY', 'New York', 'US'), -('NC', 'North Carolina', 'US'), -('ND', 'North Dakota', 'US'), -('MP', 'Northern Mariana Islands', 'US'), -('OH', 'Ohio', 'US'), -('OK', 'Oklahoma', 'US'), -('OR', 'Oregon', 'US'), -('PW', 'Palau', 'US'), -('PA', 'Pennsylvania', 'US'), -('PR', 'Puerto Rico', 'US'), -('RI', 'Rhode Island', 'US'), -('SC', 'South Carolina', 'US'), -('SD', 'South Dakota', 'US'), -('TN', 'Tennessee', 'US'), -('TX', 'Texas', 'US'), -('UT', 'Utah', 'US'), -('VT', 'Vermont', 'US'), -('VI', 'Virgin Islands', 'US'), -('VA', 'Virginia', 'US'), -('WA', 'Washington', 'US'), -('WV', 'West Virginia', 'US'), -('WI', 'Wisconsin', 'US'), -('WY', 'Wyoming', 'US'); - --- -------------------------------------------------------- - --- --- Table structure for table `questions` --- - -CREATE TABLE IF NOT EXISTS `questions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(11) NOT NULL default '0', - `section` varchar(32) NOT NULL default '', - `db_heading` varchar(64) NOT NULL default '', - `question` text NOT NULL, - `type` enum('check','yesno','int','text') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ; - --- --- Dumping data for table `questions` --- - -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES -(14, -1, 'judgereg', 'Attending Lunch', 'Will you be attending the Judge''s Lunch?', 'yesno', 'yes', 4); - --- -------------------------------------------------------- - --- --- Table structure for table `question_answers` --- - -CREATE TABLE IF NOT EXISTS `question_answers` ( - `id` int(10) unsigned NOT NULL auto_increment, - `users_id` int(10) unsigned NOT NULL default '0', - `questions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `question_answers` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `regfee_items` --- - -CREATE TABLE IF NOT EXISTS `regfee_items` ( - `id` int(11) NOT NULL auto_increment, - `year` int(11) NOT NULL, - `name` varchar(64) NOT NULL, - `description` text NOT NULL, - `cost` float NOT NULL, - `per` enum('student','project') NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `regfee_items` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `regfee_items_link` --- - -CREATE TABLE IF NOT EXISTS `regfee_items_link` ( - `id` int(11) NOT NULL auto_increment, - `students_id` int(11) NOT NULL, - `regfee_items_id` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `regfee_items_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE IF NOT EXISTS `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `emailcontact` varchar(64) default NULL, - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - `schools_id` int(10) unsigned default NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `registrations` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `reports` --- - -CREATE TABLE IF NOT EXISTS `reports` ( - `id` int(11) NOT NULL auto_increment, - `system_report_id` int(11) NOT NULL, - `name` varchar(128) NOT NULL default '', - `desc` tinytext NOT NULL, - `creator` varchar(128) NOT NULL default '', - `type` enum('student','judge','award','committee','school','volunteer','tour','fair','fundraising') character set utf8 NOT NULL default 'student', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=48 ; - --- --- Dumping data for table `reports` --- - -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES -(1, 1, 'Student+Project -- Sorted by Last Name', 'Student Name, Project Number and Title, Category, Division short form sorted by Last Name', 'The Grant Brothers', 'student'), -(2, 2, 'Student+Project -- Sorted by Project Number', 'Student Name, Project Number and Title, Category sorted by Project Number', 'The Grant Brothers', 'student'), -(3, 3, 'Student+Project -- Grouped by Category', 'Student Name, Project Number and Title sorted by Last Name, grouped by Category', 'The Grant Brothers', 'student'), -(4, 4, 'Student+Project -- School Names sorted by Last Name', 'Student Name, Project Num, School Name sorted by Last Name', 'The Grant Brothers', 'student'), -(5, 5, 'Student+Project -- Grouped by School sorted by Last Name', 'Student Name, Project Number and Name sorted by Last Name, grouped by School Name', 'The Grant Brothers', 'student'), -(6, 6, 'Teacher -- Name and School Info sorted by Teacher Name', 'Teacher, School Info sorted by Teacher Name', 'The Grant Brothers', 'student'), -(7, 7, 'Teacher -- Names and Contact for each Student by School', 'Student Name, Teacher Name, Teacher Email, School Phone and Fax grouped by School Name with Addresses', 'The Grant Brothers', 'student'), -(8, 8, 'Awards -- Special Awards Nominations Data', 'listing of special award nominations for each project, lots of data for excel so you can slice and dice (and check additional requirements)', 'Ceddy', 'student'), -(9, 9, 'Check-in Lists', 'List of students and partners, project number and name, division, registration fees, tshirt size, sorted by project number, grouped by age category', 'The Grant Brothers', 'student'), -(10, 10, 'Student+Project -- Student (and Partner) grouped by School', 'Student Pairs, Project Name/Num Grouped by School', 'The Grant Brothers', 'student'), -(11, 11, 'Student+Project -- Grouped by School sorted by Project Number', 'Individual Students, Project Name/Num Grouped by School', 'The Grant Brothers', 'student'), -(12, 12, 'Student -- T-Shirt List by School', 'Individual Students, Project Num, TShirt, Grouped by School', 'The Grant Brothers', 'student'), -(13, 13, 'Media -- Program Guide', 'Project Number, Both student names, and Project Title, grouped by School', 'The Grant Brothers', 'student'), -(14, 14, 'Projects -- Titles and Grades from each School', 'Project Name/Num, Grade Grouped by School', 'The Grant Brothers', 'student'), -(15, 15, 'Media -- Award Winners List', 'Project Number, Student Name and Contact info, by each Award', 'The Grant Brothers', 'student'), -(16, 16, 'Projects -- Logistical Display Requirements', 'Project Number, Students, Electricity, Table, and special needs', 'The Grant Brothers', 'student'), -(17, 17, 'Emergency Contact Information', 'Emergency Contact Names, Relationship, and Phone Numbers for each student.', 'The Grant Brothers', 'student'), -(18, 18, 'Student -- Grouped by Grade and Gender (YSF Stats)', 'A list of students grouped by Grade and Gender. A quick way to total up the info for the YSF regional stats page.', 'The Grant Brothers', 'student'), -(19, 19, 'Student+Project -- Grouped by School, 1 per page', 'Both students names grouped by school, each school list begins on a new page.', 'The Grant Brothers', 'student'), -(20, 20, 'Judges -- Sorted by Last Name', 'A list of judge contact info, sorted by last name', 'The Grant Brothers', 'judge'), -(21, 21, 'Judges -- Judging Teams', 'A list of all the judges, sorted by team number.', 'The Grant Brothers', 'judge'), -(22, 22, 'Awards -- Grouped by Judging Team', 'List of each judging team, and the awards they are judging', 'The Grant Brothers', 'award'), -(23, 23, 'Awards -- Judging Teams grouped by Award', 'A list of each award, and the judging teams that will assign it', 'The Grant Brothers', 'award'), -(24, 24, 'Labels -- School Mailing Addresses', 'School Mailing Addresses ONLY for schools attached to registered students (NOT ALL SCHOOLS) with a blank spot for the teacher''s name, since each student apparently spells their teacher''s name differently.', 'The Grant Brothers', 'student'), -(25, 25, 'Labels -- Student Name and Project Number', 'Just the students names and project name/number on a label.', 'The Grant Brothers', 'student'), -(26, 26, 'Name Tags -- Students', 'Name Tags for Students', 'The Grant Brothers', 'student'), -(27, 27, 'Name Tags -- Judges', 'Name Tags for Judges', 'The Grant Brothers', 'judge'), -(28, 28, 'Name Tags -- Committee Members', 'Name Tags for Committee Members', 'The Grant Brothers', 'committee'), -(29, 29, 'Labels -- Project Identification (for judging sheets)', 'Project identification labels for judging sheets', 'The Grant Brothers', 'student'), -(30, 30, 'Labels -- Table Labels', 'Labels to go on each table, fullpage landscape version', 'The Grant Brothers', 'student'), -(31, 31, 'Awards -- Special Awards Nominations', 'Special award nominations for each project, grouped by special award, one award per page.', 'The Grant Brothers', 'student'), -(32, 32, 'Student+Project -- Grouped by School Board ID', 'Student Name, Project Number and Name sorted by Last Name, grouped by School Board ID', 'The Grant Brothers', 'student'), -(33, 33, 'Certificates -- Participation Certificates', 'A certificate template for each student with name, project name, fair name, and project number at the bottom', 'The Grant Brothers', 'student'), -(34, 34, 'Labels -- Table Labels (small)', 'Labels to go on each table', 'The Grant Brothers', 'student'), -(35, 35, 'School -- All Schools', 'List of all schools in the database. Name, address, principal and phone.', 'The Grant Brothers', 'school'), -(36, 36, 'School -- Access Codes', 'List of access codes and registration passwords for all schools in the database.', 'The Grant Brothers', 'school'), -(37, 37, 'Awards -- Award Sponsor Information', 'Sponsor information for each award with the primary contact. This is a large report so the default format is CSV.', 'The Grant Brothers', 'award'), -(38, 38, 'Tours -- All Tour Information', 'A listing of just the tours and all related info, no student assignments or anything.', 'The Grant Brothers', 'tour'), -(39, 39, 'Tours -- Available Tours', 'A list of just the tour names and numbers for fair day', 'The Grant Brothers', 'tour'), -(40, 40, 'Tours -- Student Emergency Contact Information', 'Emergency contact information for each tour, each tour starting on a new page.', 'The Grant Brothers', 'student'), -(41, 41, 'Tours -- Student Tour Assignments', 'Participant and Tour Assignments, grouped by age category, sorted by project number', 'The Grant Brothers', 'student'), -(42, 42, 'Winners -- Award Ceremony Presentation Data', 'A CSV dump of all the winners and their prizes. Useful for importing into an award ceremony presentation, or a document.', 'The Grant Brothers', 'student'), -(43, 43, 'T-Shirt Size Count', 'A list of tshirt sizes (the blank entry is those students who have selected "none"), and the number of tshirts of each size.', 'The Grant Brothers', 'student'), -(44, 44, 'Labels -- Table Labels (with special award nominations)', 'Labels for each project. This report includes the first 5 projects the students have self-nominated for. There are boxes for judges to initial too. We realize that each fair may have a different number of projects. This reports serves as an example of', 'The Grant Brothers', 'student'), -(45, 45, 'School -- All school information for SFIAB CSV import', 'Generates a CSV file that can be used by another SFIAB to import the school list', 'The Grant Brothers', 'school'), -(46, 46, 'Feeder Fairs -- All Stats', 'All feeder fair statistics in CSV', 'The Grant Brothers', 'fair'), -(47, 47, 'Labels -- Fundraising Campaign Mailing Labels', 'Mailing labels for all the contacts attached to a fundraising campaign', 'The Grant Brothers', 'fundraising'); - --- -------------------------------------------------------- - --- --- Table structure for table `reports_committee` --- - -CREATE TABLE IF NOT EXISTS `reports_committee` ( - `id` int(11) NOT NULL auto_increment, - `users_id` int(11) NOT NULL, - `reports_id` int(11) NOT NULL, - `category` varchar(128) NOT NULL, - `comment` text NOT NULL, - `format` varchar(64) NOT NULL, - `stock` varchar(64) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `reports_committee` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `reports_items` --- - -CREATE TABLE IF NOT EXISTS `reports_items` ( - `id` int(11) NOT NULL auto_increment, - `reports_id` int(11) NOT NULL default '0', - `type` enum('col','sort','group','distinct','option','filter') NOT NULL default 'col', - `ord` int(11) NOT NULL default '0', - `field` varchar(64) NOT NULL default '', - `value` varchar(64) NOT NULL default '', - `x` float NOT NULL default '0', - `y` float NOT NULL default '0', - `w` float NOT NULL default '0', - `h` float NOT NULL default '0', - `lines` float NOT NULL default '0', - `face` enum('','bold') NOT NULL default '', - `align` varchar(64) NOT NULL default 'vtop center', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=660 ; - --- --- Dumping data for table `reports_items` --- - -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES -(1, 1, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'), -(2, 1, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'), -(3, 1, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'), -(4, 2, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'), -(5, 2, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(6, 2, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(7, 3, 'col', 3, 'div', '', 0, 0, 0, 0, 0, '', 'center'), -(8, 4, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(9, 3, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'), -(10, 3, 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', 'center'), -(11, 4, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', 'center'), -(12, 4, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(13, 4, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(14, 4, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'), -(15, 5, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'), -(16, 5, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'), -(17, 5, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'), -(18, 5, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'), -(19, 6, 'col', 2, 'school_phone', '', 0, 0, 0, 0, 0, '', 'center'), -(20, 6, 'col', 1, 'school', '', 0, 0, 0, 0, 0, '', 'center'), -(21, 6, 'col', 0, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'), -(22, 6, 'sort', 0, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'), -(23, 6, 'distinct', 0, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'), -(24, 11, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(25, 11, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(26, 11, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(27, 7, 'col', 5, 'school_fax', '', 0, 0, 0, 0, 0, '', 'center'), -(28, 7, 'col', 4, 'school_phone', '', 0, 0, 0, 0, 0, '', 'center'), -(29, 7, 'col', 3, 'teacheremail', '', 0, 0, 0, 0, 0, '', 'center'), -(30, 7, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(31, 9, 'col', 6, 'div', '', 0, 0, 0, 0, 0, '', 'center'), -(32, 9, 'col', 5, 'tshirt', '', 0, 0, 0, 0, 0, '', 'center'), -(33, 9, 'col', 3, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(34, 9, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(35, 9, 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', 'center'), -(36, 9, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(37, 10, 'col', 2, 'partner', '', 0, 0, 0, 0, 0, '', 'center'), -(38, 10, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(39, 10, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(40, 10, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(41, 10, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'), -(42, 10, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(43, 2, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'), -(44, 11, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'), -(45, 11, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'), -(46, 11, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(47, 11, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'), -(48, 12, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(49, 12, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(50, 12, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(51, 12, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'), -(52, 13, 'col', 1, 'bothnames', '', 0, 0, 0, 0, 0, '', 'center'), -(53, 13, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(54, 13, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(55, 13, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'), -(56, 13, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(57, 14, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(58, 14, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(59, 14, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'), -(60, 14, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(61, 15, 'col', 5, 'postal', '', 0, 0, 0, 0, 0, '', 'center'), -(62, 15, 'col', 4, 'province', '', 0, 0, 0, 0, 0, '', 'center'), -(63, 15, 'col', 3, 'city', '', 0, 0, 0, 0, 0, '', 'center'), -(64, 15, 'col', 2, 'address', '', 0, 0, 0, 0, 0, '', 'center'), -(65, 15, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(66, 15, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(67, 15, 'group', 0, 'awards', '', 0, 0, 0, 0, 0, '', 'center'), -(68, 1, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', 'center'), -(69, 1, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(70, 1, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(71, 1, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'), -(72, 1, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'), -(73, 3, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(74, 3, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(75, 3, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(76, 9, 'col', 4, 'partner', '', 0, 0, 0, 0, 0, '', 'center'), -(77, 9, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'), -(78, 9, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(79, 9, 'col', 1, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(80, 9, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', 'center'), -(81, 5, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'), -(82, 5, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(83, 5, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(84, 3, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'), -(85, 4, 'col', 2, 'school', '', 0, 0, 0, 0, 0, '', 'center'), -(86, 7, 'col', 2, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'), -(87, 7, 'group', 1, 'schooladdr', '', 0, 0, 0, 0, 0, '', 'center'), -(88, 7, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(89, 11, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'), -(90, 2, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(91, 2, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(92, 2, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(93, 12, 'col', 2, 'tshirt', '', 0, 0, 0, 0, 0, '', 'center'), -(94, 12, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(95, 7, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(96, 12, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(97, 12, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(98, 7, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(99, 7, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(100, 7, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'), -(101, 15, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(102, 15, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(103, 15, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(104, 15, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(105, 13, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'), -(106, 13, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(107, 13, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(108, 13, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(109, 14, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', 'center'), -(110, 14, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(111, 14, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(112, 14, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(113, 16, 'col', 3, 'req_table', '', 0, 0, 0, 0, 0, '', ''), -(114, 16, 'col', 2, 'req_elec', '', 0, 0, 0, 0, 0, '', ''), -(115, 16, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', ''), -(116, 16, 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', ''), -(117, 16, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(118, 16, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(119, 16, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(120, 16, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(121, 16, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), -(122, 17, 'col', 4, 'emerg_phone', '', 0, 0, 0, 0, 0, '', ''), -(123, 17, 'col', 3, 'emerg_relation', '', 0, 0, 0, 0, 0, '', ''), -(124, 17, 'col', 2, 'emerg_name', '', 0, 0, 0, 0, 0, '', ''), -(125, 17, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', ''), -(126, 7, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(127, 14, 'col', 2, 'grade', '', 0, 0, 0, 0, 0, '', 'center'), -(128, 17, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(129, 6, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(130, 6, 'col', 3, 'school_fax', '', 0, 0, 0, 0, 0, '', 'center'), -(131, 17, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), -(132, 17, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', ''), -(133, 6, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(134, 6, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(135, 9, 'col', 0, 'paid', '', 0, 0, 0, 0, 0, '', 'center'), -(136, 1, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(137, 2, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(138, 3, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(139, 3, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(140, 4, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(141, 4, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(142, 10, 'col', 3, 'title', '', 0, 0, 0, 0, 0, '', 'center'), -(143, 10, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(144, 10, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(145, 10, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(146, 5, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'), -(147, 5, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(148, 5, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(149, 5, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(150, 11, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'), -(151, 11, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(152, 11, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(153, 18, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(154, 18, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(155, 18, 'col', 2, 'school', '', 0, 0, 0, 0, 0, '', 'center'), -(156, 18, 'group', 0, 'grade_str', '', 0, 0, 0, 0, 0, '', 'center'), -(157, 18, 'group', 1, 'gender', '', 0, 0, 0, 0, 0, '', 'center'), -(158, 18, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(159, 18, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(160, 18, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(161, 18, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(162, 3, 'col', 4, 'grade', '', 0, 0, 0, 0, 0, '', 'center'), -(163, 1, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(164, 2, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'), -(165, 2, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'), -(166, 19, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(167, 19, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', 'center'), -(168, 19, 'col', 2, 'bothnames', '', 0, 0, 0, 0, 0, '', 'center'), -(169, 19, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'), -(170, 19, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'), -(171, 19, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(172, 19, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', 'center'), -(173, 19, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(174, 21, 'sort', 1, 'namefl', '', 0, 0, 0, 0, 0, '', 'center'), -(175, 21, 'col', 1, 'team', '', 0, 0, 0, 0, 0, '', 'center'), -(176, 21, 'col', 2, 'captain', '', 0, 0, 0, 0, 0, '', 'center'), -(177, 21, 'col', 3, 'namefl', '', 0, 0, 0, 0, 0, '', 'center'), -(178, 21, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(179, 20, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(180, 20, 'col', 4, 'complete', '', 0, 0, 0, 0, 0, '', 'center'), -(181, 20, 'col', 0, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(182, 20, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(183, 20, 'sort', 0, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(184, 20, 'col', 1, 'email', '', 0, 0, 0, 0, 0, '', 'center'), -(185, 20, 'col', 2, 'phone_home', '', 0, 0, 0, 0, 0, '', 'center'), -(186, 20, 'col', 3, 'phone_work', '', 0, 0, 0, 0, 0, '', 'center'), -(187, 20, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(188, 21, 'sort', 0, 'teamnum', '', 0, 0, 0, 0, 0, '', 'center'), -(189, 21, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(190, 21, 'col', 0, 'teamnum', '', 0, 0, 0, 0, 0, '', 'center'), -(191, 21, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'), -(192, 22, 'col', 1, 'type', '', 0, 0, 0, 0, 0, '', 'center'), -(193, 22, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', 'center'), -(194, 22, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(195, 22, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(196, 22, 'group', 0, 'judgeteamnum', '', 0, 0, 0, 0, 0, '', 'center'), -(197, 22, 'col', 0, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(198, 22, 'group', 1, 'judgeteamname', '', 0, 0, 0, 0, 0, '', 'center'), -(199, 23, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'), -(200, 23, 'col', 1, 'judgeteamname', '', 0, 0, 0, 0, 0, '', 'center'), -(201, 23, 'group', 0, 'type', '', 0, 0, 0, 0, 0, '', 'center'), -(202, 23, 'sort', 0, 'judgeteamnum', '', 0, 0, 0, 0, 0, '', 'center'), -(203, 23, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', 'center'), -(204, 23, 'group', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'), -(205, 23, 'col', 0, 'judgeteamnum', '', 0, 0, 0, 0, 0, '', 'center'), -(206, 23, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'), -(207, 16, 'col', 4, 'req_special', '', 0, 0, 0, 0, 0, '', ''), -(208, 16, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''), -(209, 16, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(210, 16, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(211, 16, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(212, 16, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(213, 17, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(214, 25, 'option', 6, 'stock', '5164', 0, 0, 0, 0, 0, '', ''), -(215, 25, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''), -(216, 24, 'col', 2, 'school_city_prov', '', 5, 50, 95, 8, 1, '', 'left'), -(217, 24, 'col', 1, 'school_address', '', 5, 40, 95, 16, 2, '', 'left'), -(218, 24, 'col', 0, 'school', '', 5, 5, 95, 16, 2, '', 'left'), -(219, 24, 'option', 6, 'stock', '5164', 0, 0, 0, 0, 0, '', ''), -(220, 24, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(221, 24, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(222, 24, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''), -(223, 24, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(224, 24, 'sort', 0, 'school', '', 0, 0, 0, 0, 0, '', ''), -(225, 25, 'col', 4, 'school', '', 1, 90, 98, 5, 1, '', 'center'), -(226, 24, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(227, 24, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -(228, 25, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''), -(229, 25, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''), -(230, 25, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(231, 25, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(232, 25, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -(233, 25, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(234, 8, 'col', 7, 'nom_awards', '', 0, 0, 0, 0, 0, '', ''), -(235, 25, 'col', 3, 'categorydivision', '', 1, 80, 98, 12, 2, '', 'center'), -(236, 25, 'col', 2, 'pn', '', 1, 68, 98, 8, 1, '', 'center'), -(237, 27, 'sort', 0, 'namefl', '', 0, 0, 0, 0, 0, '', ''), -(238, 25, 'col', 1, 'title', '', 1, 35, 98, 27, 3, '', 'center'), -(239, 25, 'col', 0, 'namefl', '', 5, 5, 90, 28, 2, '', 'center'), -(240, 26, 'col', 2, 'categorydivision', '', 1, 70, 98, 14, 2, '', 'center'), -(241, 26, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(242, 26, 'option', 6, 'stock', 'nametag', 0, 0, 0, 0, 0, '', ''), -(243, 26, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''), -(244, 26, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''), -(245, 26, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''), -(246, 26, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(247, 26, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(248, 26, 'col', 1, 'title', '', 1, 35, 98, 27, 3, '', 'center'), -(249, 26, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -(250, 26, 'col', 0, 'namefl', '', 5, 5, 90, 28, 2, 'bold', 'center'), -(251, 27, 'col', 1, 'static_text', 'Judge', 1, 40, 98, 10, 1, '', 'center'), -(252, 27, 'col', 0, 'namefl', '', 1, 15, 98, 24, 2, 'bold', 'center'), -(253, 27, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''), -(254, 27, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''), -(255, 27, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(256, 27, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(257, 27, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -(258, 28, 'col', 1, 'static_text', 'Committee', 1, 40, 98, 10, 1, '', 'center'), -(259, 28, 'col', 0, 'name', '', 1, 15, 98, 24, 2, 'bold', 'center'), -(260, 28, 'sort', 0, 'name', '', 0, 0, 0, 0, 0, '', ''), -(261, 28, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''), -(262, 28, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''), -(263, 28, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(264, 28, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(265, 28, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -(266, 30, 'option', 6, 'stock', 'fullpage_landscape', 0, 0, 0, 0, 0, '', ''), -(267, 29, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(268, 29, 'col', 1, 'categorydivision', '', 1, 30, 98, 18, 1, '', 'left'), -(269, 8, 'col', 6, 'school_city', '', 0, 0, 0, 0, 0, '', ''), -(270, 29, 'col', 0, 'pn', '', 1, 5, 98, 20, 1, '', 'left'), -(271, 29, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(272, 29, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(273, 29, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''), -(274, 29, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(275, 29, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(276, 29, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -(277, 30, 'col', 3, 'categorydivision', '', 1, 85, 98, 5, 1, '', 'center'), -(278, 30, 'col', 2, 'pn', '', 1, 20, 98, 35, 1, '', 'center'), -(279, 30, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(280, 30, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''), -(281, 30, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(282, 30, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(283, 30, 'col', 1, 'title', '', 1, 5, 98, 15, 3, '', 'center'), -(284, 30, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(285, 31, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(286, 8, 'col', 5, 'birthdate', '', 0, 0, 0, 0, 0, '', ''), -(287, 8, 'col', 4, 'gender', '', 0, 0, 0, 0, 0, '', ''), -(288, 31, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(289, 31, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(290, 31, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(291, 31, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(292, 31, 'col', 5, 'age', '', 0, 0, 0, 0, 0, '', ''), -(293, 31, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(294, 17, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''), -(295, 31, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', ''), -(296, 31, 'col', 4, 'gender', '', 0, 0, 0, 0, 0, '', ''), -(297, 31, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), -(298, 31, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', ''), -(299, 31, 'group', 0, 'nom_awards', '', 0, 0, 0, 0, 0, '', ''), -(300, 32, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(301, 32, 'col', 4, 'school', '', 0, 0, 0, 0, 0, '', ''), -(302, 32, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', ''), -(303, 32, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', ''), -(304, 32, 'group', 0, 'school_board', '', 0, 0, 0, 0, 0, '', ''), -(305, 32, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(306, 32, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(307, 32, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(308, 32, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(309, 32, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', ''), -(310, 32, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', ''), -(311, 32, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(312, 32, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(313, 32, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), -(314, 17, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(315, 17, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(316, 17, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(317, 17, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(318, 31, 'col', 2, 'namefl', '', 0, 0, 0, 0, 0, '', ''), -(319, 31, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', ''), -(320, 31, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(321, 33, 'col', 5, 'static_text', 'Chair', 5, 85, 30, 2, 1, '', 'center'), -(322, 33, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(323, 8, 'col', 2, 'namefl', '', 0, 0, 0, 0, 0, '', ''), -(324, 8, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(325, 33, 'col', 6, 'static_text', 'Chief Judge', 60, 85, 30, 2, 1, '', 'center'), -(326, 33, 'col', 4, 'fair_year', '', 5, 25, 30, 6, 1, '', 'center'), -(327, 33, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(328, 33, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(329, 33, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(330, 33, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''), -(331, 33, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(332, 33, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(333, 33, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -(334, 33, 'col', 3, 'pn', '', 3, 97, 94, 1, 1, '', 'right'), -(335, 33, 'col', 0, 'fair_name', '', 1, 36, 98, 4, 1, '', 'center'), -(336, 33, 'col', 1, 'namefl', '', 1, 56, 98, 8, 2, '', 'center'), -(337, 33, 'col', 2, 'title', '', 1, 65, 98, 12, 3, '', 'center'), -(338, 24, 'col', 3, 'school_postal', '', 5, 60, 95, 8, 1, '', 'left'), -(339, 30, 'col', 0, 'bothnames', '', 1, 70, 98, 10, 2, '', 'center'), -(340, 30, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -(341, 26, 'col', 3, 'pn', '', 1, 85, 98, 8, 1, '', 'center'), -(342, 27, 'col', 2, 'organization', '', 1, 70, 98, 16, 2, '', 'center'), -(343, 27, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''), -(344, 27, 'option', 6, 'stock', 'nametag', 0, 0, 0, 0, 0, '', ''), -(345, 27, 'filter', 0, 'complete', 'yes', 0, 0, 0, 0, 0, '', ''), -(346, 28, 'col', 2, 'organization', '', 1, 70, 98, 16, 2, '', 'center'), -(347, 28, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''), -(348, 28, 'option', 6, 'stock', 'nametag', 0, 0, 0, 0, 0, '', ''), -(349, 29, 'col', 2, 'title', '', 1, 55, 98, 40, 2, '', 'left'), -(350, 29, 'option', 6, 'stock', '5161', 0, 0, 0, 0, 0, '', ''), -(351, 30, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''), -(352, 30, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(353, 8, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(354, 8, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(355, 8, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(356, 8, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(357, 8, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', ''), -(358, 8, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', ''), -(359, 8, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(360, 8, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(361, 8, 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''), -(362, 8, 'sort', 0, 'nom_awards', '', 0, 0, 0, 0, 0, '', ''), -(363, 8, 'sort', 1, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(364, 34, 'col', 3, 'categorydivision', '', 1, 85, 98, 7, 1, '', 'center'), -(365, 34, 'col', 2, 'pn', '', 1, 20, 98, 35, 1, '', 'center'), -(366, 34, 'col', 1, 'title', '', 1, 5, 98, 24, 3, '', 'center'), -(367, 34, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(368, 34, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''), -(369, 34, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''), -(370, 34, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(371, 34, 'col', 0, 'bothnames', '', 1, 70, 98, 14, 2, '', 'center'), -(372, 34, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(373, 34, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''), -(374, 34, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(375, 34, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -(376, 34, 'option', 6, 'stock', '5164', 0, 0, 0, 0, 0, '', ''), -(377, 35, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), -(378, 35, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(379, 35, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''), -(380, 35, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(381, 35, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(382, 35, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(383, 35, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(384, 35, 'col', 0, 'school', '', 0, 0, 0, 0, 0, '', ''), -(385, 35, 'col', 1, 'schooladdr', '', 0, 0, 0, 0, 0, '', ''), -(386, 35, 'col', 2, 'school_principal', '', 0, 0, 0, 0, 0, '', ''), -(387, 35, 'col', 3, 'school_phone', '', 0, 0, 0, 0, 0, '', ''), -(388, 35, 'sort', 0, 'school', '', 0, 0, 0, 0, 0, '', ''), -(389, 36, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), -(390, 36, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(391, 36, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''), -(392, 36, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(393, 36, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(394, 36, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(395, 36, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(396, 36, 'col', 0, 'school', '', 0, 0, 0, 0, 0, '', ''), -(397, 36, 'col', 1, 'school_city', '', 0, 0, 0, 0, 0, '', ''), -(398, 36, 'col', 2, 'school_accesscode', '', 0, 0, 0, 0, 0, '', ''), -(399, 36, 'col', 3, 'school_registration_password', '', 0, 0, 0, 0, 0, '', ''), -(400, 36, 'col', 4, 'school_board', '', 0, 0, 0, 0, 0, '', ''), -(401, 36, 'sort', 0, 'school', '', 0, 0, 0, 0, 0, '', ''), -(402, 37, 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''), -(403, 37, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(404, 37, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(405, 37, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(406, 37, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(407, 37, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(408, 37, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(409, 37, 'col', 0, 'name', '', 0, 0, 0, 0, 0, '', ''), -(410, 37, 'col', 1, 'sponsor_organization', '', 0, 0, 0, 0, 0, '', ''), -(411, 37, 'col', 2, 'sponsor_phone', '', 0, 0, 0, 0, 0, '', ''), -(412, 37, 'col', 3, 'sponsor_fax', '', 0, 0, 0, 0, 0, '', ''), -(413, 37, 'col', 4, 'sponsor_address', '', 0, 0, 0, 0, 0, '', ''), -(414, 37, 'col', 5, 'sponsor_city', '', 0, 0, 0, 0, 0, '', ''), -(415, 37, 'col', 6, 'sponsor_province', '', 0, 0, 0, 0, 0, '', ''), -(416, 37, 'col', 7, 'sponsor_postal', '', 0, 0, 0, 0, 0, '', ''), -(417, 37, 'col', 8, 'sponsor_notes', '', 0, 0, 0, 0, 0, '', ''), -(419, 37, 'col', 10, 'pcontact_salutation', '', 0, 0, 0, 0, 0, '', ''), -(420, 37, 'col', 11, 'pcontact_namefl', '', 0, 0, 0, 0, 0, '', ''), -(421, 37, 'col', 12, 'pcontact_position', '', 0, 0, 0, 0, 0, '', ''), -(422, 37, 'col', 13, 'pcontact_email', '', 0, 0, 0, 0, 0, '', ''), -(423, 37, 'col', 14, 'pcontact_hphone', '', 0, 0, 0, 0, 0, '', ''), -(424, 37, 'col', 15, 'pcontact_wphone', '', 0, 0, 0, 0, 0, '', ''), -(425, 37, 'col', 16, 'pcontact_cphone', '', 0, 0, 0, 0, 0, '', ''), -(426, 37, 'col', 17, 'pcontact_fax', '', 0, 0, 0, 0, 0, '', ''), -(427, 37, 'col', 18, 'pcontact_notes', '', 0, 0, 0, 0, 0, '', ''), -(428, 37, 'sort', 0, 'name', '', 0, 0, 0, 0, 0, '', ''), -(429, 38, 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''), -(430, 38, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(431, 38, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(432, 38, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(433, 38, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(434, 38, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(435, 38, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(436, 38, 'col', 0, 'tour_num', '', 0, 0, 0, 0, 0, '', ''), -(437, 38, 'col', 1, 'tour_name', '', 0, 0, 0, 0, 0, '', ''), -(438, 38, 'col', 2, 'tour_capacity', '', 0, 0, 0, 0, 0, '', ''), -(439, 38, 'col', 3, 'tour_mingrade', '', 0, 0, 0, 0, 0, '', ''), -(440, 38, 'col', 4, 'tour_maxgrade', '', 0, 0, 0, 0, 0, '', ''), -(441, 38, 'col', 5, 'tour_desc', '', 0, 0, 0, 0, 0, '', ''), -(442, 38, 'col', 6, 'tour_location', '', 0, 0, 0, 0, 0, '', ''), -(443, 38, 'col', 7, 'tour_contact', '', 0, 0, 0, 0, 0, '', ''), -(444, 38, 'sort', 0, 'tour_name', '', 0, 0, 0, 0, 0, '', ''), -(445, 39, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), -(446, 39, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(447, 39, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''), -(448, 39, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(449, 39, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(450, 39, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(451, 39, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(452, 39, 'col', 0, 'tour_num', '', 0, 0, 0, 0, 0, '', ''), -(453, 39, 'col', 1, 'tour_name', '', 0, 0, 0, 0, 0, '', ''), -(454, 39, 'sort', 0, 'tour_id', '', 0, 0, 0, 0, 0, '', ''), -(455, 40, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), -(456, 40, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', ''), -(457, 40, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''), -(458, 40, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(459, 40, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(460, 40, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(461, 40, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(462, 40, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(463, 40, 'col', 1, 'namefl', '', 0, 0, 0, 0, 0, '', ''), -(464, 40, 'col', 2, 'emerg_name', '', 0, 0, 0, 0, 0, '', ''), -(465, 40, 'col', 3, 'emerg_relation', '', 0, 0, 0, 0, 0, '', ''), -(466, 40, 'col', 4, 'emerg_phone', '', 0, 0, 0, 0, 0, '', ''), -(467, 40, 'group', 0, 'tour_assign_numname', '', 0, 0, 0, 0, 0, '', ''), -(468, 40, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', ''), -(469, 41, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), -(470, 41, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(471, 41, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(472, 41, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(473, 41, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(474, 41, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(475, 41, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(476, 41, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(477, 41, 'col', 1, 'namefl', '', 0, 0, 0, 0, 0, '', ''), -(478, 41, 'col', 2, 'tour_assign_numname', '', 0, 0, 0, 0, 0, '', ''), -(479, 41, 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', ''), -(480, 41, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(481, 19, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -(482, 42, 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''), -(483, 42, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(484, 42, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(485, 42, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(486, 42, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(487, 42, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(488, 42, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(489, 42, 'col', 0, 'division', '', 0, 0, 0, 0, 1, '', ''), -(490, 42, 'col', 1, 'fr_division', '', 0, 0, 0, 0, 1, '', ''), -(491, 42, 'col', 2, 'category', '', 0, 0, 0, 0, 1, '', ''), -(492, 42, 'col', 3, 'fr_category', '', 0, 0, 0, 0, 1, '', ''), -(493, 42, 'col', 4, 'award_name', '', 0, 0, 0, 0, 1, '', ''), -(494, 42, 'col', 5, 'award_prize_name', '', 0, 0, 0, 0, 1, '', ''), -(495, 42, 'col', 6, 'award_prize_cash', '', 0, 0, 0, 0, 1, '', ''), -(496, 42, 'col', 7, 'award_prize_scholarship', '', 0, 0, 0, 0, 1, '', ''), -(497, 42, 'col', 8, 'award_prize_value', '', 0, 0, 0, 0, 1, '', ''), -(498, 42, 'col', 9, 'pn', '', 0, 0, 0, 0, 1, '', ''), -(499, 42, 'col', 10, 'title', '', 0, 0, 0, 0, 1, '', ''), -(500, 42, 'col', 11, 'namefl', '', 0, 0, 0, 0, 1, '', ''), -(501, 42, 'col', 12, 'partnerfl', '', 0, 0, 0, 0, 1, '', ''), -(502, 42, 'col', 13, 'school', '', 0, 0, 0, 0, 1, '', ''), -(503, 42, 'col', 14, 'school_city', '', 0, 0, 0, 0, 1, '', ''), -(504, 42, 'col', 15, 'school_province', '', 0, 0, 0, 0, 1, '', ''), -(505, 42, 'col', 16, 'school_board', '', 0, 0, 0, 0, 1, '', ''), -(506, 42, 'col', 17, 'school_postal', '', 0, 0, 0, 0, 1, '', ''), -(507, 42, 'sort', 0, 'order', '', 0, 0, 0, 0, 1, '', ''), -(508, 42, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 1, '', ''), -(509, 42, 'filter', 0, 'award_excludefromac', 'no', 0, 0, 0, 0, 1, '', ''), -(510, 43, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), -(511, 43, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(512, 43, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(513, 43, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(514, 43, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(515, 43, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(516, 43, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(517, 43, 'col', 0, 'tshirt', '', 0, 0, 0, 0, 1, '', ''), -(518, 43, 'col', 1, 'special_tshirt_count', '', 0, 0, 0, 0, 1, '', ''), -(519, 43, 'sort', 0, 'tshirt', '', 0, 0, 0, 0, 1, '', ''), -(520, 43, 'filter', 0, 'tshirt', 'none', 5, 0, 0, 0, 1, '', ''), -(521, 44, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -(522, 44, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(523, 44, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(524, 44, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(525, 44, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(526, 44, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(527, 44, 'option', 6, 'stock', 'letter_4up', 0, 0, 0, 0, 0, '', ''), -(528, 44, 'col', 0, 'pn', '', 5, 5, 30, 5, 1, '', ''), -(529, 44, 'col', 1, 'nom_awards_name_1', '', 5, 45, 50, 10, 3, '', ''), -(530, 44, 'col', 2, 'nom_awards_name_2', '', 5, 56, 50, 10, 3, '', ''), -(531, 44, 'col', 3, 'nom_awards_name_3', '', 5, 67, 50, 10, 3, '', ''), -(532, 44, 'col', 4, 'nom_awards_name_4', '', 5, 78, 50, 10, 3, '', ''), -(533, 44, 'col', 5, 'nom_awards_name_5', '', 5, 89, 50, 10, 3, '', ''), -(534, 44, 'col', 6, 'static_text', 'Judge 1', 5, 22, 30, 4, 1, '', ''), -(535, 44, 'col', 7, 'static_text', 'Judge 2', 5, 34, 30, 4, 1, '', ''), -(536, 44, 'col', 8, 'static_text', 'Safety Check', 42, 6, 12, 6, 2, '', ''), -(537, 44, 'col', 9, 'static_text', 'Judges: Please initial box when judging of project is complete', 70, 23, 28, 12, 4, '', ''), -(538, 44, 'col', 10, 'static_box', '', 0, 0, 100, 100, 1, '', ''), -(539, 44, 'col', 11, 'static_box', '', 55, 5, 40, 8, 1, '', ''), -(540, 44, 'col', 12, 'static_box', '', 22, 20, 40, 8, 1, '', ''), -(541, 44, 'col', 13, 'static_box', '', 22, 32, 40, 8, 1, '', ''), -(542, 44, 'col', 14, 'static_box', '', 55, 46, 40, 8, 1, '', ''), -(543, 44, 'col', 15, 'static_box', '', 55, 57, 40, 8, 1, '', ''), -(544, 44, 'col', 16, 'static_box', '', 55, 68, 40, 8, 1, '', ''), -(545, 44, 'col', 17, 'static_box', '', 55, 79, 40, 8, 1, '', ''), -(546, 44, 'col', 18, 'static_box', '', 55, 90, 40, 8, 1, '', ''), -(547, 44, 'col', 19, 'static_box', '', 0, 15, 100, 27, 1, '', ''), -(548, 44, 'sort', 0, 'pn', '', 0, 0, 0, 0, 1, '', ''), -(549, 44, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 1, '', ''), -(550, 45, 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''), -(551, 45, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(552, 45, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(553, 45, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(554, 45, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(555, 45, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(556, 45, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(557, 45, 'col', 0, 'school', '', 0, 0, 0, 0, 1, '', ''), -(558, 45, 'col', 1, 'school_lang', '', 0, 0, 0, 0, 1, '', ''), -(559, 45, 'col', 2, 'school_level', '', 0, 0, 0, 0, 1, '', ''), -(560, 45, 'col', 3, 'school_board', '', 0, 0, 0, 0, 1, '', ''), -(561, 45, 'col', 4, 'school_district', '', 0, 0, 0, 0, 1, '', ''), -(562, 45, 'col', 5, 'school_phone', '', 0, 0, 0, 0, 1, '', ''), -(563, 45, 'col', 6, 'school_fax', '', 0, 0, 0, 0, 1, '', ''), -(564, 45, 'col', 7, 'school_address', '', 0, 0, 0, 0, 1, '', ''), -(565, 45, 'col', 8, 'school_city', '', 0, 0, 0, 0, 1, '', ''), -(566, 45, 'col', 9, 'school_province', '', 0, 0, 0, 0, 1, '', ''), -(567, 45, 'col', 10, 'school_postal', '', 0, 0, 0, 0, 1, '', ''), -(568, 45, 'col', 11, 'school_principal', '', 0, 0, 0, 0, 1, '', ''), -(569, 45, 'col', 12, 'school_email', '', 0, 0, 0, 0, 1, '', ''), -(570, 45, 'col', 13, 'school_sh', '', 0, 0, 0, 0, 1, '', ''), -(571, 45, 'col', 14, 'school_shemail', '', 0, 0, 0, 0, 1, '', ''), -(572, 45, 'col', 15, 'school_shphone', '', 0, 0, 0, 0, 1, '', ''), -(573, 45, 'col', 16, 'school_accesscode', '', 0, 0, 0, 0, 1, '', ''), -(574, 45, 'col', 17, 'school_registration_password', '', 0, 0, 0, 0, 1, '', ''), -(575, 45, 'col', 18, 'school_project_limit', '', 0, 0, 0, 0, 1, '', ''), -(576, 45, 'col', 19, 'school_project_limit_per', '', 0, 0, 0, 0, 1, '', ''), -(577, 46, 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''), -(578, 46, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(579, 46, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(580, 46, 'option', 3, 'fit_columns', 'no', 0, 0, 0, 0, 0, '', ''), -(581, 46, 'option', 4, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), -(582, 46, 'option', 5, 'field_box', 'no', 0, 0, 0, 0, 0, '', ''), -(583, 46, 'option', 6, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(584, 46, 'option', 7, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(585, 46, 'option', 8, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), -(586, 46, 'col', 0, 'fair_name', '', 0, 0, 0, 0, 1, '', ' '), -(587, 46, 'col', 1, 'fairstats_year', '', 0, 0, 0, 0, 1, '', ' '), -(588, 46, 'col', 2, 'fairstats_start_date', '', 0, 0, 0, 0, 1, '', ' '), -(589, 46, 'col', 3, 'fairstats_end_date', '', 0, 0, 0, 0, 1, '', ' '), -(590, 46, 'col', 4, 'fairstats_budget', '', 0, 0, 0, 0, 1, '', ' '), -(591, 46, 'col', 5, 'fairstats_address', '', 0, 0, 0, 0, 1, '', ' '), -(592, 46, 'col', 6, 'fairstats_ysf_affiliation_complete', '', 0, 0, 0, 0, 1, '', ' '), -(593, 46, 'col', 7, 'fairstats_charity', '', 0, 0, 0, 0, 1, '', ' '), -(594, 46, 'col', 8, 'fairstats_scholarships', '', 0, 0, 0, 0, 1, '', ' '), -(595, 46, 'col', 9, 'fairstats_male_1', '', 0, 0, 0, 0, 1, '', ' '), -(596, 46, 'col', 10, 'fairstats_male_4', '', 0, 0, 0, 0, 1, '', ' '), -(597, 46, 'col', 11, 'fairstats_male_7', '', 0, 0, 0, 0, 1, '', ' '), -(598, 46, 'col', 12, 'fairstats_male_9', '', 0, 0, 0, 0, 1, '', ' '), -(599, 46, 'col', 13, 'fairstats_male_11', '', 0, 0, 0, 0, 1, '', ' '), -(600, 46, 'col', 14, 'fairstats_female_1', '', 0, 0, 0, 0, 1, '', ' '), -(601, 46, 'col', 15, 'fairstats_female_4', '', 0, 0, 0, 0, 1, '', ' '), -(602, 46, 'col', 16, 'fairstats_female_7', '', 0, 0, 0, 0, 1, '', ' '), -(603, 46, 'col', 17, 'fairstats_female_9', '', 0, 0, 0, 0, 1, '', ' '), -(604, 46, 'col', 18, 'fairstats_female_11', '', 0, 0, 0, 0, 1, '', ' '), -(605, 46, 'col', 19, 'fairstats_projects_1', '', 0, 0, 0, 0, 1, '', ' '), -(606, 46, 'col', 20, 'fairstats_projects_4', '', 0, 0, 0, 0, 1, '', ' '), -(607, 46, 'col', 21, 'fairstats_projects_7', '', 0, 0, 0, 0, 1, '', ' '), -(608, 46, 'col', 22, 'fairstats_projects_9', '', 0, 0, 0, 0, 1, '', ' '), -(609, 46, 'col', 23, 'fairstats_projects_11', '', 0, 0, 0, 0, 1, '', ' '), -(610, 46, 'col', 24, 'fairstats_firstnations', '', 0, 0, 0, 0, 1, '', ' '), -(611, 46, 'col', 25, 'fairstats_students_atrisk', '', 0, 0, 0, 0, 1, '', ' '), -(612, 46, 'col', 26, 'fairstats_schools_atrisk', '', 0, 0, 0, 0, 1, '', ' '), -(613, 46, 'col', 27, 'fairstats_students_total', '', 0, 0, 0, 0, 1, '', ' '), -(614, 46, 'col', 28, 'fairstats_schools_total', '', 0, 0, 0, 0, 1, '', ' '), -(615, 46, 'col', 29, 'fairstats_schools_active', '', 0, 0, 0, 0, 1, '', ' '), -(616, 46, 'col', 30, 'fairstats_students_public', '', 0, 0, 0, 0, 1, '', ' '), -(617, 46, 'col', 31, 'fairstats_schools_public', '', 0, 0, 0, 0, 1, '', ' '), -(618, 46, 'col', 32, 'fairstats_students_private', '', 0, 0, 0, 0, 1, '', ' '), -(619, 46, 'col', 33, 'fairstats_schools_private', '', 0, 0, 0, 0, 1, '', ' '), -(620, 46, 'col', 34, 'fairstats_schools_districts', '', 0, 0, 0, 0, 1, '', ' '), -(621, 46, 'col', 35, 'fairstats_studentsvisiting', '', 0, 0, 0, 0, 1, '', ' '), -(622, 46, 'col', 36, 'fairstats_publicvisiting', '', 0, 0, 0, 0, 1, '', ' '), -(623, 46, 'col', 37, 'fairstats_teacherssupporting', '', 0, 0, 0, 0, 1, '', ' '), -(624, 46, 'col', 38, 'fairstats_increasedinterest', '', 0, 0, 0, 0, 1, '', ' '), -(625, 46, 'col', 39, 'fairstats_consideringcareer', '', 0, 0, 0, 0, 1, '', ' '), -(626, 46, 'col', 40, 'fairstats_committee_members', '', 0, 0, 0, 0, 1, '', ' '), -(627, 46, 'col', 41, 'fairstats_judges', '', 0, 0, 0, 0, 1, '', ' '), -(628, 46, 'col', 42, 'fairstats_next_chair_name', '', 0, 0, 0, 0, 1, '', ' '), -(629, 46, 'col', 43, 'fairstats_next_chair_email', '', 0, 0, 0, 0, 1, '', ' '), -(630, 46, 'col', 44, 'fairstats_next_chair_hphone', '', 0, 0, 0, 0, 1, '', ' '), -(631, 46, 'col', 45, 'fairstats_next_chair_bphone', '', 0, 0, 0, 0, 1, '', ' '), -(632, 46, 'col', 46, 'fairstats_next_chair_fax', '', 0, 0, 0, 0, 1, '', ' '), -(633, 46, 'col', 47, 'fairstats_delegate1', '', 0, 0, 0, 0, 1, '', ' '), -(634, 46, 'col', 48, 'fairstats_delegate1_email', '', 0, 0, 0, 0, 1, '', ' '), -(635, 46, 'col', 49, 'fairstats_delegate1_size', '', 0, 0, 0, 0, 1, '', ' '), -(636, 46, 'col', 50, 'fairstats_delegate2', '', 0, 0, 0, 0, 1, '', ' '), -(637, 46, 'col', 51, 'fairstats_delegate2_email', '', 0, 0, 0, 0, 1, '', ' '), -(638, 46, 'col', 52, 'fairstats_delegate2_size', '', 0, 0, 0, 0, 1, '', ' '), -(639, 46, 'col', 53, 'fairstats_delegate3', '', 0, 0, 0, 0, 1, '', ' '), -(640, 46, 'col', 54, 'fairstats_delegate3_email', '', 0, 0, 0, 0, 1, '', ' '), -(641, 46, 'col', 55, 'fairstats_delegate3_size', '', 0, 0, 0, 0, 1, '', ' '), -(642, 46, 'col', 56, 'fairstats_delegate4', '', 0, 0, 0, 0, 1, '', ' '), -(643, 46, 'col', 57, 'fairstats_delegate4_email', '', 0, 0, 0, 0, 1, '', ' '), -(644, 46, 'col', 58, 'fairstats_delegate4_size', '', 0, 0, 0, 0, 1, '', ' '), -(645, 46, 'sort', 0, 'fair_name', '', 0, 0, 0, 0, 1, '', ' '), -(646, 47, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -(647, 47, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -(648, 47, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -(649, 47, 'option', 3, 'fit_columns', 'no', 0, 0, 0, 0, 0, '', ''), -(650, 47, 'option', 4, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''), -(651, 47, 'option', 5, 'field_box', 'no', 0, 0, 0, 0, 0, '', ''), -(652, 47, 'option', 6, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), -(653, 47, 'option', 7, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), -(654, 47, 'option', 8, 'stock', '5163', 0, 0, 0, 0, 0, '', ''), -(655, 47, 'col', 0, 'namefl', '', 5, 5, 95, 12, 1, '', 'left vcenter'), -(656, 47, 'col', 1, 'address', '', 5, 30, 95, 24, 2, '', 'left vcenter'), -(657, 47, 'col', 2, 'city_prov', '', 5, 60, 95, 12, 1, '', 'left vcenter'), -(658, 47, 'col', 3, 'postal', '', 5, 80, 95, 12, 1, '', 'left vcenter'), -(659, 47, 'col', 4, 'user_filter', '', 99, 99, 1, 1, 1, '', 'center vcenter'); - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE IF NOT EXISTS `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `safety` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE IF NOT EXISTS `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `safetyquestions` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE IF NOT EXISTS `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `schoollang` char(2) NOT NULL default '', - `schoollevel` varchar(32) NOT NULL default '', - `board` varchar(64) NOT NULL default '', - `district` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `designate` enum('','public','independent','home') character set utf8 NOT NULL, - `principal` varchar(64) NOT NULL default '', - `principal_uid` int(11) default NULL, - `sciencehead_uid` int(11) default NULL, - `schoolemail` varchar(128) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime default NULL, - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - `registration_password` varchar(32) NOT NULL default '', - `projectlimit` int(10) NOT NULL default '0', - `projectlimitper` enum('total','agecategory') NOT NULL default 'total', - `atrisk` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `schools` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `signaturepage` --- - -CREATE TABLE IF NOT EXISTS `signaturepage` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(32) NOT NULL default '', - `use` tinyint(4) NOT NULL default '1', - `text` text NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; - --- --- Dumping data for table `signaturepage` --- - -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES -(1, 'exhibitordeclaration', 1, 'The following section is to be read and signed by the exhibitor(s).\r\n\r\nI/We certify that:\r\n - The preparation of this project is mainly my/our own work.\r\n - I/We have read the rules and regulations and agree to abide by them.\r\n - I/We agree agree that the decision of the judges will be final.'), -(2, 'parentdeclaration', 1, 'The following is to be read and signed by the exhibitor(s) parent(s)/guardian(s).\r\nAs a parent/guardian I certify to the best of my knowledge and believe the information contained in this application is correct, and the project is the work of the student. I also understand that the material used in the project is the responsibility of the student and that neither the school, the teacher, nor the regional fair can be held responsible for loss, damage, or theft, however caused. I further understand that all exhibits entered must be left on display until the end of the Fair. If my son/daughter does not remove the exhibit at the end of the Fair, the fair organizers or the owner of the exhibition hall cannot be responsible for the disposal of the exhibit.\r\n\r\nIf my son/daughter is awarded the honour of having his/her exhibit chosen for presentation at the Canada-Wide Science Fair, I consent to having him/her journey to the Fair, and will not hold the Fair responsible for any accident or mishap to the student or the exhibit.'), -(3, 'teacherdeclaration', 0, 'The following section is to be read and signed by the teacher.\r\n\r\nI certify that:\r\n - The preparation of this project is mainly the student(s)'' own work.\r\n - The student(s) have read the rules and regulations and agree to abide by them.\r\n - I agree that the decision of the judges will be final.'), -(4, 'postamble', 0, 'Please send the signed signature form and any required payment to: \n\n[Insert Address Here]'), -(5, 'regfee', 0, ''); - --- -------------------------------------------------------- - --- --- Table structure for table `sponsors` --- - -CREATE TABLE IF NOT EXISTS `sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `tollfree` varchar(32) NOT NULL, - `fax` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `website` varchar(128) NOT NULL, - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `address2` varchar(128) NOT NULL, - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `donationpolicyurl` varchar(255) NOT NULL, - `fundingselectiondate` date default NULL, - `logo` varchar(128) default NULL, - `waiveraccepted` enum('no','yes') NOT NULL default 'no', - `donortype` enum('organization','individual') NOT NULL default 'organization', - `proposalsubmissiondate` date NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `sponsors` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE IF NOT EXISTS `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `pronunciation` varchar(64) NOT NULL default '', - `sex` enum('male','female') default NULL, - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `fairs_id` int(11) NOT NULL, - `tshirt` varchar(32) NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - `webfirst` enum('no','yes') NOT NULL default 'yes', - `weblast` enum('no','yes') NOT NULL default 'yes', - `webphoto` enum('no','yes') NOT NULL default 'yes', - `namecheck_complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `students` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `tours` --- - -CREATE TABLE IF NOT EXISTS `tours` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `name` tinytext NOT NULL, - `num` varchar(16) NOT NULL, - `description` text NOT NULL, - `capacity` int(11) NOT NULL default '0', - `grade_min` int(11) NOT NULL default '7', - `grade_max` int(11) NOT NULL default '12', - `contact` tinytext NOT NULL, - `location` tinytext NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `tours` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `tours_choice` --- - -CREATE TABLE IF NOT EXISTS `tours_choice` ( - `id` int(10) unsigned NOT NULL auto_increment, - `students_id` int(10) unsigned NOT NULL default '0', - `registrations_id` int(10) unsigned NOT NULL default '0', - `tour_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `rank` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `tours_choice` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE IF NOT EXISTS `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - `argsdesc` text, - PRIMARY KEY (`strmd5`), - UNIQUE KEY `lang` (`lang`,`strmd5`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `translations` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `users` --- - -CREATE TABLE IF NOT EXISTS `users` ( - `id` int(10) unsigned NOT NULL auto_increment, - `uid` int(11) NOT NULL, - `types` set('student','judge','committee','volunteer','fair','sponsor','principal','teacher','parent','mentor','alumni') NOT NULL, - `salutation` varchar(8) NOT NULL, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `sex` enum('male','female') default NULL, - `username` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordset` date default NULL, - `oldpassword` varchar(32) NOT NULL, - `email` varchar(128) NOT NULL default '', - `year` int(11) NOT NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `birthdate` date NOT NULL, - `lang` varchar(2) NOT NULL, - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `firstaid` enum('no','yes') NOT NULL default 'no', - `cpr` enum('no','yes') NOT NULL default 'no', - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `username` (`username`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; - --- --- Dumping data for table `users` --- - -INSERT INTO `users` (`id`, `uid`, `types`, `salutation`, `firstname`, `lastname`, `sex`, `username`, `password`, `passwordset`, `oldpassword`, `email`, `year`, `phonehome`, `phonework`, `phonecell`, `fax`, `organization`, `birthdate`, `lang`, `created`, `lastlogin`, `address`, `address2`, `city`, `province`, `postalcode`, `firstaid`, `cpr`, `deleted`, `deleteddatetime`) VALUES -(1, 1, 'fair', '', '', '', NULL, 'kvGbxRTM', '5kyYcbBAmf4Y', '0000-00-00', '', '', 0, '', '', '', '', '', '0000-00-00', '', '2009-10-22 12:56:09', '0000-00-00 00:00:00', '', '', '', '', '', 'no', 'no', 'no', NULL), -(2, 2, 'fair', '', '', '', NULL, 'k5HPLPGm', 'EUuqF2J5HbGD', '0000-00-00', '', '', 0, '', '', '', '', '', '0000-00-00', '', '2009-10-22 12:56:09', '0000-00-00 00:00:00', '', '', '', '', '', 'no', 'no', 'no', NULL); - --- -------------------------------------------------------- - --- --- Table structure for table `users_alumni` --- - -CREATE TABLE IF NOT EXISTS `users_alumni` ( - `users_id` int(11) NOT NULL, - `alumni_active` enum('no','yes') NOT NULL, - `alumni_complete` enum('no','yes') NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users_alumni` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `users_committee` --- - -CREATE TABLE IF NOT EXISTS `users_committee` ( - `users_id` int(11) NOT NULL, - `committee_active` enum('no','yes') NOT NULL default 'no', - `committee_complete` enum('no','yes') NOT NULL default 'no', - `emailprivate` varchar(128) NOT NULL, - `ord` int(11) NOT NULL, - `displayemail` enum('no','yes') NOT NULL default 'no', - `access_admin` enum('no','yes') NOT NULL default 'no', - `access_config` enum('no','yes') NOT NULL default 'no', - `access_super` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`users_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users_committee` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `users_fair` --- - -CREATE TABLE IF NOT EXISTS `users_fair` ( - `users_id` int(11) NOT NULL default '0', - `fair_active` enum('no','yes') NOT NULL default 'no', - `fair_complete` enum('no','yes') NOT NULL default 'no', - `fairs_id` int(11) NOT NULL, - PRIMARY KEY (`users_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users_fair` --- - -INSERT INTO `users_fair` (`users_id`, `fair_active`, `fair_complete`, `fairs_id`) VALUES -(1, 'yes', 'no', 1), -(2, 'yes', 'no', 2); - --- -------------------------------------------------------- - --- --- Table structure for table `users_judge` --- - -CREATE TABLE IF NOT EXISTS `users_judge` ( - `users_id` int(11) NOT NULL, - `judge_active` enum('no','yes') NOT NULL default 'no', - `judge_complete` enum('no','yes') NOT NULL default 'no', - `years_school` tinyint(4) NOT NULL, - `years_regional` tinyint(4) NOT NULL, - `years_national` tinyint(4) NOT NULL, - `willing_chair` enum('yes','no') NOT NULL default 'no', - `special_award_only` enum('yes','no') NOT NULL default 'no', - `cat_prefs` tinytext NOT NULL, - `div_prefs` tinytext NOT NULL, - `divsub_prefs` tinytext NOT NULL, - `languages` tinytext NOT NULL, - `highest_psd` tinytext NOT NULL, - `expertise_other` tinytext NOT NULL, - PRIMARY KEY (`users_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users_judge` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `users_mentor` --- - -CREATE TABLE IF NOT EXISTS `users_mentor` ( - `users_id` int(11) NOT NULL, - `mentor_active` enum('no','yes') NOT NULL, - `mentor_complete` enum('no','yes') NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users_mentor` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `users_parent` --- - -CREATE TABLE IF NOT EXISTS `users_parent` ( - `users_id` int(11) NOT NULL, - `parent_active` enum('no','yes') NOT NULL, - `parent_complete` enum('no','yes') NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users_parent` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `users_principal` --- - -CREATE TABLE IF NOT EXISTS `users_principal` ( - `users_id` int(11) NOT NULL, - `principal_active` enum('no','yes') NOT NULL, - `principal_complete` enum('no','yes') NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users_principal` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `users_sponsor` --- - -CREATE TABLE IF NOT EXISTS `users_sponsor` ( - `users_id` int(11) NOT NULL default '0', - `sponsors_id` int(11) NOT NULL default '0', - `sponsor_complete` enum('no','yes') NOT NULL default 'no', - `sponsor_active` enum('no','yes') NOT NULL default 'no', - `primary` enum('no','yes') NOT NULL default 'no', - `position` varchar(64) NOT NULL default '', - `notes` text NOT NULL, - PRIMARY KEY (`users_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users_sponsor` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `users_teacher` --- - -CREATE TABLE IF NOT EXISTS `users_teacher` ( - `users_id` int(11) NOT NULL, - `teacher_active` enum('no','yes') NOT NULL, - `teacher_complete` enum('no','yes') NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users_teacher` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `users_volunteer` --- - -CREATE TABLE IF NOT EXISTS `users_volunteer` ( - `users_id` int(11) NOT NULL, - `volunteer_active` enum('no','yes') NOT NULL default 'no', - `volunteer_complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`users_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users_volunteer` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `volunteer_positions` --- - -CREATE TABLE IF NOT EXISTS `volunteer_positions` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(128) NOT NULL, - `desc` text NOT NULL, - `meet_place` text NOT NULL, - `start` datetime NOT NULL, - `end` datetime NOT NULL, - `year` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `volunteer_positions` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `volunteer_positions_signup` --- - -CREATE TABLE IF NOT EXISTS `volunteer_positions_signup` ( - `id` int(11) NOT NULL auto_increment, - `users_id` int(11) NOT NULL, - `volunteer_positions_id` int(11) NOT NULL, - `year` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `volunteer_positions_signup` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE IF NOT EXISTS `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `fairs_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `winners` --- - diff --git a/db/db.full.16.sql b/db/db.full.16.sql deleted file mode 100644 index 22dc065e..00000000 --- a/db/db.full.16.sql +++ /dev/null @@ -1,892 +0,0 @@ --- phpMyAdmin SQL Dump --- version 2.6.0-rc2 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 26, 2005 at 04:29 PM --- Server version: 4.0.24 --- PHP Version: 4.3.11 --- --- Database: `sfiab` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL, - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - UNIQUE (id,year) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0' -) TYPE=MyISAM; -ALTER TABLE `config` ADD UNIQUE (`var`,`year`); - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `autocreate_type_id` int(11) default NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `allowdivisional` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `lastupdate` DATETIME NOT NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY (`textname`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `summarycountok` tinyint(1) NOT NULL default '1', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - `schools_id` int(10) unsigned default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `board` varchar(64) NOT NULL default '', - `district` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - `registration_password` varchar(32) NOT NULL default '', - `projectlimit` int(10) NOT NULL default '0', - `projectlimitper` ENUM('total','agecategory') NOT NULL default 'total', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `sex` enum('male','female') NOT NULL default 'male', - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` enum('small','medium','large','xlarge') NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - `argsdesc` text default NULL, - PRIMARY KEY (`strmd5`), - KEY `strmd5` (`strmd5`), - KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_catpref` --- - -CREATE TABLE `judges_catpref` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `judges_id` INT NOT NULL , - `projectcategories_id` INT NOT NULL , - `rank` INT NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_schedulerconfig` --- - -CREATE TABLE `judges_schedulerconfig` ( - `var` VARCHAR( 64 ) NOT NULL DEFAULT '', - `val` TEXT NOT NULL , - `description` TEXT NOT NULL , - `year` INT( 11 ) NOT NULL DEFAULT '0', - UNIQUE KEY `var` ( `var` , `year` ) -) TYPE = MYISAM ; - - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategoriesdivisions_link` --- - -CREATE TABLE `projectcategoriesdivisions_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - - --- -------------------------------------------------------- - --- --- Table structure for table `signaturepage` --- - -CREATE TABLE `signaturepage` ( - `id` int(10) unsigned NOT NULL auto_increment , - `name` VARCHAR( 32 ) NOT NULL , - `use` TINYINT DEFAULT '1' NOT NULL , - `text` TEXT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MyISAM; - - --- Now insert everything - -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairname', '', 'Name of the fair', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('default_language', 'en', 'The default language if no language has yet been specified', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minstudentsperproject', '1', 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxstudentsperproject', '2', 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('mingrade', '7', 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxgrade', '12', 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minage', '10', 'The minimum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxage', '21', 'The maximum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxmentorsperproject', '5', 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minmentorsperproject', '0', 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('usedivisionselector', 'yes', 'Specify whether to use the division selector flowchart questions to help decide on the division (yes/no)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minjudgeage', '21', 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxjudgeage', '100', 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('participant_student_foodreq', 'yes', 'Ask for students special food requirements (yes/no). Should be yes if you plan on providing lunch', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee', '', 'Registration Fee', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee_per', 'student', 'Registration fee is per student, or per project? (student/project)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('project_num_format', 'CDN', 'C=Category, D=Division, N=2 digit Number', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_publiclayout', '', 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. If "date" is used, it must be configured under "Important Dates" section. If you do not wish to allow students to self-nominate for special awards, set to "none" (none|date|registration)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_type', 'open', 'The type of Participant Registration to use: open | singlepassword | schoolpassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'judge_registration_type', 'open', 'The type of Judge Registration to use: open | singlepassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_singlepassword', '', 'The single password to use for participant registration if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration','-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'judge_registration_singlepassword', '', 'The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registration', '-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'participant_student_tshirt', 'no', 'Ask for students their T-Shirt size (yes/no).', '-1'); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_project_summary_wordmax', '100', 'The maximum number of words acceptable in the project summary', '-1'); -INSERT INTO `config` VALUES ('filterdivisionbycategory', 'no', 'Allows for setup of divisions on a categorical basis. Students can then only choose divisions that apply to their category. Only use if you want to offer a different set of divisions to each age category (no, yes).', -1); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_student_personal', 'yes', 'Collect personal information about the students, such as phone number, address, gender, etc.', '-1'); - -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregclose', 'Special Awards self-nomination closes', -1); - -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('fr', 'Français', 'Y'); - -INSERT INTO `provinces` (`code`, `province`) VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('QC', 'Québec'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('YK', 'Yukon Territory'); - -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, -1); -INSERT INTO `award_types` VALUES (2, 'Special', 2, -1); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, -1); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, -1); -INSERT INTO `award_types` VALUES (5, 'Other', 4, -1); - -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('register_participants_main_instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', -1); -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('index', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, generate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', -1); - -INSERT INTO `emails` VALUES ('', 'register_participants_resend_regnum', 'Participant Registration - Resend Registration Number', 'Resend the password to the participant if they submit a ''forgot regnum'' request', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'We have received a request for the retrieval of your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_participant', 'New Participant', 'Email that new participants receive when they are added to the system', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_judge_invite', 'New Judge Invitation', 'This is sent to a new judge when they are invited using the invite judges administration section, only available when judge_registration_type=invite', 'registration@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\r\n\r\nEmail Address: [EMAIL]\r\nPassword: [PASSWORD]\r\n\r\nYou can change your password once you login.', 'system'); -INSERT INTO `emails` VALUES ('', 'register_judges_resend_password', 'Judges Registration - Resend Password', 'Resend the password to the judge if they submit a ''forgot password'' request', 'website@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'We have received a request for the retrieval of your password from this email address. Please find your existing password below Judge Email Address: [EMAIL] Judge Registration Password: [PASSWORD] ', 'system'); - - -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_times_judged', '3', 'The number of times that each project must be judged (by different judging teams)', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_timeslots', '20', 'The number of timeslots available during the judging period', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_projects_per_team', '5', 'The maximum number of projects that a team can judge', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'min_judges_per_team', '2', 'The minimum number of judges that should be on a judging team', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_judges_per_team', '4', 'The maximum number of judges that should be on a judging team', '-1'); - -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (1, 'exhibitordeclaration', 1, 'The following section is to be read and signed by the exhibitor(s).\r\n\r\nI/We certify that:\r\n - The preparation of this project is mainly my/our own work.\r\n - I/We have read the rules and regulations and agree to abide by them.\r\n - I/We agree agree that the decision of the judges will be final.'); -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (2, 'parentdeclaration', 1, 'The following is to be read and signed by the exhibitor(s) parent(s)/guardian(s).\r\nAs a parent/guardian I certify to the best of my knowledge and believe the information contained in this application is correct, and the project is the work of the student. I also understand that the material used in the project is the responsibility of the student and that neither the school, the teacher, nor the regional fair can be held responsible for loss, damage, or theft, however caused. I further understand that all exhibits entered must be left on display until the end of the Fair. If my son/daughter does not remove the exhibit at the end of the Fair, the fair organizers or the owner of the exhibition hall cannot be responsible for the disposal of the exhibit.\r\n\r\nIf my son/daughter is awarded the honour of having his/her exhibit chosen for presentation at the Canada-Wide Science Fair, I consent to having him/her journey to the Fair, and will not hold the Fair responsible for any accident or mishap to the student or the exhibit.'); - -INSERT INTO `config` (`var`,`val`,`year`) VALUES ('DBVERSION','16','0'); diff --git a/db/db.full.17.sql b/db/db.full.17.sql deleted file mode 100644 index 7ae7d8b3..00000000 --- a/db/db.full.17.sql +++ /dev/null @@ -1,892 +0,0 @@ --- phpMyAdmin SQL Dump --- version 2.6.0-rc2 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 26, 2005 at 04:29 PM --- Server version: 4.0.24 --- PHP Version: 4.3.11 --- --- Database: `sfiab` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL, - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - UNIQUE (id,year) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0' -) TYPE=MyISAM; -ALTER TABLE `config` ADD UNIQUE (`var`,`year`); - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `autocreate_type_id` int(11) default NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `allowdivisional` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `lastupdate` DATETIME NOT NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY (`textname`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `summarycountok` tinyint(1) NOT NULL default '1', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - `schools_id` int(10) unsigned default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `board` varchar(64) NOT NULL default '', - `district` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - `registration_password` varchar(32) NOT NULL default '', - `projectlimit` int(10) NOT NULL default '0', - `projectlimitper` ENUM('total','agecategory') NOT NULL default 'total', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `sex` enum('male','female') NOT NULL default 'male', - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` enum('small','medium','large','xlarge') NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - `argsdesc` text default NULL, - PRIMARY KEY (`strmd5`), - KEY `strmd5` (`strmd5`), - KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_catpref` --- - -CREATE TABLE `judges_catpref` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `judges_id` INT NOT NULL , - `projectcategories_id` INT NOT NULL , - `rank` INT NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_schedulerconfig` --- - -CREATE TABLE `judges_schedulerconfig` ( - `var` VARCHAR( 64 ) NOT NULL DEFAULT '', - `val` TEXT NOT NULL , - `description` TEXT NOT NULL , - `year` INT( 11 ) NOT NULL DEFAULT '0', - UNIQUE KEY `var` ( `var` , `year` ) -) TYPE = MYISAM ; - - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategoriesdivisions_link` --- - -CREATE TABLE `projectcategoriesdivisions_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - - --- -------------------------------------------------------- - --- --- Table structure for table `signaturepage` --- - -CREATE TABLE `signaturepage` ( - `id` int(10) unsigned NOT NULL auto_increment , - `name` VARCHAR( 32 ) NOT NULL , - `use` TINYINT DEFAULT '1' NOT NULL , - `text` TEXT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MyISAM; - - --- Now insert everything - -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairname', '', 'Name of the fair', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('default_language', 'en', 'The default language if no language has yet been specified', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minstudentsperproject', '1', 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxstudentsperproject', '2', 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('mingrade', '7', 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxgrade', '12', 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minage', '10', 'The minimum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxage', '21', 'The maximum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxmentorsperproject', '5', 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minmentorsperproject', '0', 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('usedivisionselector', 'yes', 'Specify whether to use the division selector flowchart questions to help decide on the division (yes/no)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minjudgeage', '21', 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxjudgeage', '100', 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('participant_student_foodreq', 'yes', 'Ask for students special food requirements (yes/no). Should be yes if you plan on providing lunch', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee', '', 'Registration Fee', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee_per', 'student', 'Registration fee is per student, or per project? (student/project)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('project_num_format', 'CDN', 'C=Category, D=Division, N=2 digit Number', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_publiclayout', '', 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. If "date" is used, it must be configured under "Important Dates" section. If you do not wish to allow students to self-nominate for special awards, set to "none" (none|date|registration)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_type', 'open', 'The type of Participant Registration to use: open | singlepassword | schoolpassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'judge_registration_type', 'open', 'The type of Judge Registration to use: open | singlepassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_singlepassword', '', 'The single password to use for participant registration if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration','-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'judge_registration_singlepassword', '', 'The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registration', '-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'participant_student_tshirt', 'no', 'Ask for students their T-Shirt size (yes/no).', '-1'); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_project_summary_wordmax', '100', 'The maximum number of words acceptable in the project summary', '-1'); -INSERT INTO `config` VALUES ('filterdivisionbycategory', 'no', 'Allows for setup of divisions on a categorical basis. Students can then only choose divisions that apply to their category. Only use if you want to offer a different set of divisions to each age category (no, yes).', -1); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_student_personal', 'yes', 'Collect personal information about the students, such as phone number, address, gender, etc.', '-1'); - -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregclose', 'Special Awards self-nomination closes', -1); - -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('fr', 'Français', 'Y'); - -INSERT INTO `provinces` (`code`, `province`) VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('QC', 'Québec'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('YK', 'Yukon Territory'); - -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, -1); -INSERT INTO `award_types` VALUES (2, 'Special', 2, -1); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, -1); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, -1); -INSERT INTO `award_types` VALUES (5, 'Other', 4, -1); - -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('register_participants_main_instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', -1); -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('index', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, generate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', -1); - -INSERT INTO `emails` VALUES ('', 'register_participants_resend_regnum', 'Participant Registration - Resend Registration Number', 'Resend the password to the participant if they submit a ''forgot regnum'' request', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'We have received a request for the retrieval of your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_participant', 'New Participant', 'Email that new participants receive when they are added to the system', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_judge_invite', 'New Judge Invitation', 'This is sent to a new judge when they are invited using the invite judges administration section, only available when judge_registration_type=invite', 'registration@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\r\n\r\nEmail Address: [EMAIL]\r\nPassword: [PASSWORD]\r\n\r\nYou can change your password once you login.', 'system'); -INSERT INTO `emails` VALUES ('', 'register_judges_resend_password', 'Judges Registration - Resend Password', 'Resend the password to the judge if they submit a ''forgot password'' request', 'website@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'We have received a request for the retrieval of your password from this email address. Please find your existing password below Judge Email Address: [EMAIL] Judge Registration Password: [PASSWORD] ', 'system'); - - -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_times_judged', '3', 'The number of times that each project must be judged (by different judging teams)', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_timeslots', '20', 'The number of timeslots available during the judging period', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_projects_per_team', '5', 'The maximum number of projects that a team can judge', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'min_judges_per_team', '2', 'The minimum number of judges that should be on a judging team', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_judges_per_team', '4', 'The maximum number of judges that should be on a judging team', '-1'); - -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (1, 'exhibitordeclaration', 1, 'The following section is to be read and signed by the exhibitor(s).\r\n\r\nI/We certify that:\r\n - The preparation of this project is mainly my/our own work.\r\n - I/We have read the rules and regulations and agree to abide by them.\r\n - I/We agree agree that the decision of the judges will be final.'); -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (2, 'parentdeclaration', 1, 'The following is to be read and signed by the exhibitor(s) parent(s)/guardian(s).\r\nAs a parent/guardian I certify to the best of my knowledge and believe the information contained in this application is correct, and the project is the work of the student. I also understand that the material used in the project is the responsibility of the student and that neither the school, the teacher, nor the regional fair can be held responsible for loss, damage, or theft, however caused. I further understand that all exhibits entered must be left on display until the end of the Fair. If my son/daughter does not remove the exhibit at the end of the Fair, the fair organizers or the owner of the exhibition hall cannot be responsible for the disposal of the exhibit.\r\n\r\nIf my son/daughter is awarded the honour of having his/her exhibit chosen for presentation at the Canada-Wide Science Fair, I consent to having him/her journey to the Fair, and will not hold the Fair responsible for any accident or mishap to the student or the exhibit.'); - -INSERT INTO `config` (`var`,`val`,`year`) VALUES ('DBVERSION','17','0'); diff --git a/db/db.full.18.sql b/db/db.full.18.sql deleted file mode 100644 index 898f8d93..00000000 --- a/db/db.full.18.sql +++ /dev/null @@ -1,937 +0,0 @@ --- phpMyAdmin SQL Dump --- version 2.6.0-rc2 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 26, 2005 at 04:29 PM --- Server version: 4.0.24 --- PHP Version: 4.3.11 --- --- Database: `sfiab` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL, - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - UNIQUE (id,year) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0' -) TYPE=MyISAM; -ALTER TABLE `config` ADD UNIQUE (`var`,`year`); - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `autocreate_type_id` int(11) default NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `allowdivisional` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `lastupdate` DATETIME NOT NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY (`textname`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `summarycountok` tinyint(1) NOT NULL default '1', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - `schools_id` int(10) unsigned default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `board` varchar(64) NOT NULL default '', - `district` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - `registration_password` varchar(32) NOT NULL default '', - `projectlimit` int(10) NOT NULL default '0', - `projectlimitper` ENUM('total','agecategory') NOT NULL default 'total', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `sex` enum('male','female') NOT NULL default 'male', - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` enum('small','medium','large','xlarge') NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - `argsdesc` text default NULL, - PRIMARY KEY (`strmd5`), - KEY `strmd5` (`strmd5`), - KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_catpref` --- - -CREATE TABLE `judges_catpref` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `judges_id` INT NOT NULL , - `projectcategories_id` INT NOT NULL , - `rank` INT NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_schedulerconfig` --- - -CREATE TABLE `judges_schedulerconfig` ( - `var` VARCHAR( 64 ) NOT NULL DEFAULT '', - `val` TEXT NOT NULL , - `description` TEXT NOT NULL , - `year` INT( 11 ) NOT NULL DEFAULT '0', - UNIQUE KEY `var` ( `var` , `year` ) -) TYPE = MYISAM ; - - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategoriesdivisions_link` --- - -CREATE TABLE `projectcategoriesdivisions_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - - --- -------------------------------------------------------- - --- --- Table structure for table `signaturepage` --- - -CREATE TABLE `signaturepage` ( - `id` int(10) unsigned NOT NULL auto_increment , - `name` VARCHAR( 32 ) NOT NULL , - `use` TINYINT DEFAULT '1' NOT NULL , - `text` TEXT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `questions` --- - -CREATE TABLE `questions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(11) NOT NULL default '0', - `section` varchar(32) NOT NULL, - `db_heading` varchar(64) NOT NULL, - `question` text NOT NULL, - `type` enum('check','yesno','int','text') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE = MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `question_answers` --- - -CREATE TABLE `question_answers` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `questions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE = MyISAM; - --- Now insert everything - -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairname', '', 'Name of the fair', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('default_language', 'en', 'The default language if no language has yet been specified', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minstudentsperproject', '1', 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxstudentsperproject', '2', 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('mingrade', '7', 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxgrade', '12', 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minage', '10', 'The minimum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxage', '21', 'The maximum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxmentorsperproject', '5', 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minmentorsperproject', '0', 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('usedivisionselector', 'yes', 'Specify whether to use the division selector flowchart questions to help decide on the division (yes/no)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minjudgeage', '21', 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxjudgeage', '100', 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('participant_student_foodreq', 'yes', 'Ask for students special food requirements (yes/no). Should be yes if you plan on providing lunch', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee', '', 'Registration Fee', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee_per', 'student', 'Registration fee is per student, or per project? (student/project)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('project_num_format', 'CDN', 'C=Category, D=Division, N=2 digit Number', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_publiclayout', '', 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. If "date" is used, it must be configured under "Important Dates" section. If you do not wish to allow students to self-nominate for special awards, set to "none" (none|date|registration)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_type', 'open', 'The type of Participant Registration to use: open | singlepassword | schoolpassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'judge_registration_type', 'open', 'The type of Judge Registration to use: open | singlepassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_singlepassword', '', 'The single password to use for participant registration if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration','-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'judge_registration_singlepassword', '', 'The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registration', '-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'participant_student_tshirt', 'no', 'Ask for students their T-Shirt size (yes/no).', '-1'); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_project_summary_wordmax', '100', 'The maximum number of words acceptable in the project summary', '-1'); -INSERT INTO `config` VALUES ('filterdivisionbycategory', 'no', 'Allows for setup of divisions on a categorical basis. Students can then only choose divisions that apply to their category. Only use if you want to offer a different set of divisions to each age category (no, yes).', -1); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_student_personal', 'yes', 'Collect personal information about the students, such as phone number, address, gender, etc.', '-1'); - -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregclose', 'Special Awards self-nomination closes', -1); - -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('fr', 'Français', 'Y'); - -INSERT INTO `provinces` (`code`, `province`) VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('QC', 'Québec'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('YK', 'Yukon Territory'); - -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, -1); -INSERT INTO `award_types` VALUES (2, 'Special', 2, -1); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, -1); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, -1); -INSERT INTO `award_types` VALUES (5, 'Other', 4, -1); - -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('register_participants_main_instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', -1); -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('index', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, generate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', -1); - -INSERT INTO `emails` VALUES ('', 'register_participants_resend_regnum', 'Participant Registration - Resend Registration Number', 'Resend the password to the participant if they submit a ''forgot regnum'' request', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'We have received a request for the retrieval of your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_participant', 'New Participant', 'Email that new participants receive when they are added to the system', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_judge_invite', 'New Judge Invitation', 'This is sent to a new judge when they are invited using the invite judges administration section, only available when judge_registration_type=invite', 'registration@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\r\n\r\nEmail Address: [EMAIL]\r\nPassword: [PASSWORD]\r\n\r\nYou can change your password once you login.', 'system'); -INSERT INTO `emails` VALUES ('', 'register_judges_resend_password', 'Judges Registration - Resend Password', 'Resend the password to the judge if they submit a ''forgot password'' request', 'website@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'We have received a request for the retrieval of your password from this email address. Please find your existing password below Judge Email Address: [EMAIL] Judge Registration Password: [PASSWORD] ', 'system'); - -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Attending Lunch', 'Will you be attending the Judge''s Dinner on Thursday April 6th, at 4:30?', 'yesno', 'yes', 1); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Willing Chair', 'Are you willing to be the lead for your judging team?', 'yesno', 'yes', 2); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years School', 'Years of judging experience at a School level?', 'int', 'yes', 3); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years Regional', 'Years of judging experience at a Regional level?', 'int', 'yes', 4); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years National', 'Years of judging experience at a National (CWSF) level?', 'int', 'yes', 5); - - -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_times_judged', '3', 'The number of times that each project must be judged (by different judging teams)', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_timeslots', '20', 'The number of timeslots available during the judging period', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_projects_per_team', '5', 'The maximum number of projects that a team can judge', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'min_judges_per_team', '2', 'The minimum number of judges that should be on a judging team', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_judges_per_team', '4', 'The maximum number of judges that should be on a judging team', '-1'); - -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (1, 'exhibitordeclaration', 1, 'The following section is to be read and signed by the exhibitor(s).\r\n\r\nI/We certify that:\r\n - The preparation of this project is mainly my/our own work.\r\n - I/We have read the rules and regulations and agree to abide by them.\r\n - I/We agree agree that the decision of the judges will be final.'); -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (2, 'parentdeclaration', 1, 'The following is to be read and signed by the exhibitor(s) parent(s)/guardian(s).\r\nAs a parent/guardian I certify to the best of my knowledge and believe the information contained in this application is correct, and the project is the work of the student. I also understand that the material used in the project is the responsibility of the student and that neither the school, the teacher, nor the regional fair can be held responsible for loss, damage, or theft, however caused. I further understand that all exhibits entered must be left on display until the end of the Fair. If my son/daughter does not remove the exhibit at the end of the Fair, the fair organizers or the owner of the exhibition hall cannot be responsible for the disposal of the exhibit.\r\n\r\nIf my son/daughter is awarded the honour of having his/her exhibit chosen for presentation at the Canada-Wide Science Fair, I consent to having him/her journey to the Fair, and will not hold the Fair responsible for any accident or mishap to the student or the exhibit.'); - -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years School', 'Years of judging experience at a School level:', 'int', 'yes', 1); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years Regional', 'Years of judging experience at a Regional level:', 'int', 'yes', 2); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years National', 'Years of judging experience at a National (CWSF) level:', 'int', 'yes', 3); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Attending Lunch', 'Will you be attending the Judge''s Lunch?', 'yesno', 'yes', 4); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Willing Chair', 'Are you willing to be the lead for your judging team?', 'yesno', 'yes', 5); - -INSERT INTO `config` (`var`,`val`,`year`) VALUES ('DBVERSION','18','0'); - diff --git a/db/db.full.22.sql b/db/db.full.22.sql deleted file mode 100644 index 374db5c7..00000000 --- a/db/db.full.22.sql +++ /dev/null @@ -1,954 +0,0 @@ --- Last Updated: Sep 4, 2005 at 11:24 AM --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL, - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - UNIQUE (id,year) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `category` varchar(64) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `description` text NOT NULL, - `year` int(11) NOT NULL default '0' -) TYPE=MyISAM; -ALTER TABLE `config` ADD UNIQUE (`var`,`year`); - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `autocreate_type_id` int(11) default NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `allowdivisional` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `lastupdate` DATETIME NOT NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY (`textname`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `summarycountok` tinyint(1) NOT NULL default '1', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - `schools_id` int(10) unsigned default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `board` varchar(64) NOT NULL default '', - `district` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime NULL default NULL, - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - `registration_password` varchar(32) NOT NULL default '', - `projectlimit` int(10) NOT NULL default '0', - `projectlimitper` ENUM('total','agecategory') NOT NULL default 'total', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `sex` enum('male','female') NOT NULL default 'male', - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` enum('small','medium','large','xlarge') NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - `argsdesc` text default NULL, - PRIMARY KEY (`strmd5`), - KEY `strmd5` (`strmd5`), - KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_catpref` --- - -CREATE TABLE `judges_catpref` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `judges_id` INT NOT NULL , - `projectcategories_id` INT NOT NULL , - `rank` INT NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_schedulerconfig` --- - -CREATE TABLE `judges_schedulerconfig` ( - `var` VARCHAR( 64 ) NOT NULL DEFAULT '', - `val` TEXT NOT NULL , - `description` TEXT NOT NULL , - `year` INT( 11 ) NOT NULL DEFAULT '0', - UNIQUE KEY `var` ( `var` , `year` ) -) TYPE = MYISAM ; - - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategoriesdivisions_link` --- - -CREATE TABLE `projectcategoriesdivisions_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - - --- -------------------------------------------------------- - --- --- Table structure for table `signaturepage` --- - -CREATE TABLE `signaturepage` ( - `id` int(10) unsigned NOT NULL auto_increment , - `name` VARCHAR( 32 ) NOT NULL , - `use` TINYINT DEFAULT '1' NOT NULL , - `text` TEXT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `questions` --- - -CREATE TABLE `questions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(11) NOT NULL default '0', - `section` varchar(32) NOT NULL, - `db_heading` varchar(64) NOT NULL, - `question` text NOT NULL, - `type` enum('check','yesno','int','text') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE = MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `question_answers` --- - -CREATE TABLE `question_answers` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `questions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE = MyISAM; - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_jdiv` --- - -CREATE TABLE `judges_jdiv` ( - `id` int(10) unsigned NOT NULL auto_increment, - `jdiv_id` int(11) NOT NULL default '0', - `projectdivisions_id` int(11) NOT NULL default '0', - `projectcategories_id` int(11) NOT NULL default '0', - `lang` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - - - - --- Now insert everything - -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregclose', 'Special Awards self-nomination closes', -1); - -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('fr', 'Français', 'Y'); - -INSERT INTO `provinces` (`code`, `province`) VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('QC', 'Québec'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('YK', 'Yukon Territory'); - -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, -1); -INSERT INTO `award_types` VALUES (2, 'Special', 2, -1); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, -1); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, -1); -INSERT INTO `award_types` VALUES (5, 'Other', 4, -1); - -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('register_participants_main_instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', -1); -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('index', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, generate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', -1); - -INSERT INTO `emails` VALUES ('', 'register_participants_resend_regnum', 'Participant Registration - Resend Registration Number', 'Resend the password to the participant if they submit a ''forgot regnum'' request', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'We have received a request for the retrieval of your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_participant', 'New Participant', 'Email that new participants receive when they are added to the system', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_judge_invite', 'New Judge Invitation', 'This is sent to a new judge when they are invited using the invite judges administration section, only available when judge_registration_type=invite', 'registration@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\r\n\r\nEmail Address: [EMAIL]\r\nPassword: [PASSWORD]\r\n\r\nYou can change your password once you login.', 'system'); -INSERT INTO `emails` VALUES ('', 'register_judges_resend_password', 'Judges Registration - Resend Password', 'Resend the password to the judge if they submit a ''forgot password'' request', 'website@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'We have received a request for the retrieval of your password from this email address. Please find your existing password below Judge Email Address: [EMAIL] Judge Registration Password: [PASSWORD] ', 'system'); - -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Attending Lunch', 'Will you be attending the Judge''s Dinner on Thursday April 6th, at 4:30?', 'yesno', 'yes', 1); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Willing Chair', 'Are you willing to be the lead for your judging team?', 'yesno', 'yes', 2); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years School', 'Years of judging experience at a School level?', 'int', 'yes', 3); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years Regional', 'Years of judging experience at a Regional level?', 'int', 'yes', 4); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years National', 'Years of judging experience at a National (CWSF) level?', 'int', 'yes', 5); - - -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_times_judged', '3', 'The number of times that each project must be judged (by different judging teams)', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_timeslots', '20', 'The number of timeslots available during the judging period', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_projects_per_team', '5', 'The maximum number of projects that a team can judge', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'min_judges_per_team', '2', 'The minimum number of judges that should be on a judging team', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_judges_per_team', '4', 'The maximum number of judges that should be on a judging team', '-1'); - -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (1, 'exhibitordeclaration', 1, 'The following section is to be read and signed by the exhibitor(s).\r\n\r\nI/We certify that:\r\n - The preparation of this project is mainly my/our own work.\r\n - I/We have read the rules and regulations and agree to abide by them.\r\n - I/We agree agree that the decision of the judges will be final.'); -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (2, 'parentdeclaration', 1, 'The following is to be read and signed by the exhibitor(s) parent(s)/guardian(s).\r\nAs a parent/guardian I certify to the best of my knowledge and believe the information contained in this application is correct, and the project is the work of the student. I also understand that the material used in the project is the responsibility of the student and that neither the school, the teacher, nor the regional fair can be held responsible for loss, damage, or theft, however caused. I further understand that all exhibits entered must be left on display until the end of the Fair. If my son/daughter does not remove the exhibit at the end of the Fair, the fair organizers or the owner of the exhibition hall cannot be responsible for the disposal of the exhibit.\r\n\r\nIf my son/daughter is awarded the honour of having his/her exhibit chosen for presentation at the Canada-Wide Science Fair, I consent to having him/her journey to the Fair, and will not hold the Fair responsible for any accident or mishap to the student or the exhibit.'); - -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years School', 'Years of judging experience at a School level:', 'int', 'yes', 1); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years Regional', 'Years of judging experience at a Regional level:', 'int', 'yes', 2); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years National', 'Years of judging experience at a National (CWSF) level:', 'int', 'yes', 3); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Attending Lunch', 'Will you be attending the Judge''s Lunch?', 'yesno', 'yes', 4); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Willing Chair', 'Are you willing to be the lead for your judging team?', 'yesno', 'yes', 5); - - -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('fairname', '', 'Global', 100, 'Name of the fair', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('default_language', 'en', 'Global', 200, 'The default language if no language has yet been specified', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('minstudentsperproject', '1', 'Participant Registration', 800, 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('maxstudentsperproject', '2', 'Participant Registration', 801, 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('mingrade', '7', 'Participant Registration', 600, 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('maxgrade', '12', 'Participant Registration', 601, 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('minage', '10', 'Participant Registration', 500, 'The minimum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('maxage', '21', 'Participant Registration', 501, 'The maximum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('maxmentorsperproject', '5', 'Participant Registration', 701, 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('minmentorsperproject', '0', 'Participant Registration', 700, 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('usedivisionselector', 'yes', 'Participant Registration', 1500, 'Specify whether to use the division selector flowchart questions to help decide on the division (yes/no)', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('minjudgeage', '21', 'Judge Registration', 400, 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('maxjudgeage', '100', 'Judge Registration', 500, 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('participant_student_foodreq', 'yes', 'Participant Registration', 1200, 'Ask for students special food requirements (yes/no). Should be yes if you plan on providing lunch', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('regfee', '', 'Participant Registration', 300, 'Registration Fee', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('regfee_per', 'student', 'Participant Registration', 400, 'Registration fee is per student, or per project? (student/project)', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('project_num_format', 'CDN', 'Global', 600, 'C=Category, D=Division, N=2 digit Number', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('committee_publiclayout', '', 'Global', 500, 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judge Registration', 300, 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'Participant Registration', 900, 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Participant Registration', 1400, 'Self nominations for special awards are due either with registration or on a specific date. If "date" is used, it must be configured under "Important Dates" section. If you do not wish to allow students to self-nominate for special awards, set to "none" (none|date|registration)', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('fairmanageremail', '', 'Global', 300, 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('participant_registration_type', 'open', 'Participant Registration', 100, 'The type of Participant Registration to use: open | singlepassword | schoolpassword | invite', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('judge_registration_type', 'open', 'Judge Registration', 100, 'The type of Judge Registration to use: open | singlepassword | invite', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('participant_registration_singlepassword', '', 'Participant Registration', 200, 'The single password to use for participant registration if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('judge_registration_singlepassword', '', 'Judge Registration', 200, 'The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registration', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('participant_student_tshirt', 'no', 'Participant Registration', 1300, 'Ask for students their T-Shirt size (yes/no).', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('participant_project_summary_wordmax', '100', 'Participant Registration', 1100, 'The maximum number of words acceptable in the project summary', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('filterdivisionbycategory', 'no', 'Global', 400, 'Allows for setup of divisions on a categorical basis. Students can then only choose divisions that apply to their category. Only use if you want to offer a different set of divisions to each age category (no, yes).', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('participant_student_personal', 'yes', 'Participant Registration', 1000, 'Collect personal information about the students, such as phone number, address, gender, etc.', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('max_projects_per_team', '7', 'Judge Scheduler', 400, 'The maximum number of projects that a judging team can judge.', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('times_judged', '1', 'Judge Scheduler', 500, 'The number of times each project must be judged by different judging teams.', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('min_judges_per_team', '3', 'Judge Scheduler', 200, 'The minimum number of judges that can be on a judging team.', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('max_judges_per_team', '3', 'Judge Scheduler', 300, 'The maximum number of judges that can be on a judging team.', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('effort', '10000', 'Judge Scheduler', 100, 'This number controls how long and hard the judge scheduler will look for a scheduling solution. Smaller numbers are lower effort. 100 is practically no effort, 1000 is moderate effort, 10000 is high effort. It can take several tens of minutes to run the scheduler with high effort, but it gives a very good solution.', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('project_status', 'payment_pending', 'Judge Scheduler', 600, 'The status a project must have have to be considered eligible for judge scheduling. Must be one of "open", "payment_pending" or "complete".', -1); - -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('DBVERSION', '22', 'Special', 0, '', 0); - diff --git a/db/db.full.52.sql b/db/db.full.52.sql deleted file mode 100644 index e71bf374..00000000 --- a/db/db.full.52.sql +++ /dev/null @@ -1,1737 +0,0 @@ --- phpMyAdmin SQL Dump --- version 2.6.4-rc1 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: Oct 09, 2007 at 03:21 PM --- Server version: 4.0.24 --- PHP Version: 5.2.4 --- --- Database: `sfiab_temp` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - `cwsfaward` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `award_awards` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `award_awards_projectcategories` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `award_awards_projectdivisions` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `salutation` varchar(8) NOT NULL default '', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `position` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `award_contacts` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `value` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `excludefromac` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `award_prizes` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `award_sponsors` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL default '0', - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - UNIQUE KEY `id` (`id`,`year`) -) TYPE=MyISAM; - --- --- Dumping data for table `award_types` --- - -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, -1); -INSERT INTO `award_types` VALUES (2, 'Special', 2, -1); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, -1); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, -1); -INSERT INTO `award_types` VALUES (5, 'Other', 4, -1); - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `committees` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- --- Dumping data for table `committees_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `committees_members` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `category` varchar(64) NOT NULL default '', - `type` enum('','yesno','number','text','enum') NOT NULL default '', - `type_values` tinytext NOT NULL, - `ord` int(11) NOT NULL default '0', - `description` text NOT NULL, - `year` int(11) NOT NULL default '0', - UNIQUE KEY `var` (`var`,`year`) -) TYPE=MyISAM; - --- --- Dumping data for table `config` --- - -INSERT INTO `config` VALUES ('fairname', '', 'Global', '', '', 100, 'Name of the fair', -1); -INSERT INTO `config` VALUES ('default_language', 'en', 'Global', '', '', 200, 'The default language if no language has yet been specified', -1); -INSERT INTO `config` VALUES ('minstudentsperproject', '1', 'Participant Registration', '', '', 800, 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` VALUES ('maxstudentsperproject', '2', 'Participant Registration', '', '', 801, 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` VALUES ('mingrade', '7', 'Participant Registration', '', '', 600, 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` VALUES ('maxgrade', '12', 'Participant Registration', '', '', 601, 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` VALUES ('minage', '10', 'Participant Registration', '', '', 500, 'The minimum age of the students', -1); -INSERT INTO `config` VALUES ('maxage', '21', 'Participant Registration', '', '', 501, 'The maximum age of the students', -1); -INSERT INTO `config` VALUES ('maxmentorsperproject', '5', 'Participant Registration', '', '', 701, 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` VALUES ('minmentorsperproject', '0', 'Participant Registration', '', '', 700, 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` VALUES ('usedivisionselector', 'yes', 'Participant Registration', 'yesno', '', 1500, 'Specify whether to use the division selector flowchart questions to help decide on the division', -1); -INSERT INTO `config` VALUES ('minjudgeage', '21', 'Judge Registration', '', '', 400, 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` VALUES ('maxjudgeage', '100', 'Judge Registration', '', '', 500, 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` VALUES ('participant_student_foodreq', 'yes', 'Participant Registration', 'yesno', '', 1200, 'Ask for students special food requirements. Should be ''Yes'' if you plan on providing food to the students.', -1); -INSERT INTO `config` VALUES ('regfee', '', 'Participant Registration', '', '', 300, 'Registration Fee', -1); -INSERT INTO `config` VALUES ('regfee_per', 'student', 'Participant Registration', 'enum', 'student=Student|project=Project', 400, 'Registration fee is per student, or per project?', -1); -INSERT INTO `config` VALUES ('project_num_format', 'CDN', 'Global', '', '', 600, 'C=Category ID, c=Category Shortform, D=Division ID, d=Division Shortform, N=2 digit Number', -1); -INSERT INTO `config` VALUES ('committee_publiclayout', '', 'Global', '', '', 500, 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` VALUES ('judges_password_expiry_days', '365', 'Judge Registration', '', '', 300, 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` VALUES ('maxspecialawardsperproject', '7', 'Participant Registration', '', '', 900, 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` VALUES ('specialawardnomination', 'date', 'Participant Registration', 'enum', 'none=None|date=By Date|registration=With Registration', 1400, 'Select when students may self nominate for special awards.
    • None - Students may not self-nominate for special awards.
    • By Date - Between specific dates, specified in the "Important Dates" section.
    • With Registration - During the same time as registration is open.
    ', -1); -INSERT INTO `config` VALUES ('fairmanageremail', '', 'Global', '', '', 300, 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `config` VALUES ('participant_registration_type', 'open', 'Participant Registration', 'enum', 'open=Open|singlepassword=Single Password|schoolpassword=School Password|invite=Invite|openorinvite=Open or Invite', 100, 'The type of Participant Registration to use', -1); -INSERT INTO `config` VALUES ('judge_registration_type', 'open', 'Judge Registration', 'enum', 'open=Open|singlepassword=Single Password|invite=Invite', 100, 'The type of Judge Registration to use', -1); -INSERT INTO `config` VALUES ('participant_registration_singlepassword', '', 'Participant Registration', '', '', 200, 'The single password to use for participant registration if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration', -1); -INSERT INTO `config` VALUES ('judge_registration_singlepassword', '', 'Judge Registration', '', '', 200, 'The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registration', -1); -INSERT INTO `config` VALUES ('participant_student_tshirt', 'no', 'Participant Registration', 'yesno', '', 1300, 'Ask for students their T-Shirt size', -1); -INSERT INTO `config` VALUES ('participant_project_summary_wordmax', '100', 'Participant Registration', '', '', 1100, 'The maximum number of words acceptable in the project summary', -1); -INSERT INTO `config` VALUES ('filterdivisionbycategory', 'no', 'Global', 'yesno', '', 400, 'Allows for the setup of different divisions for each category', -1); -INSERT INTO `config` VALUES ('participant_student_personal', 'yes', 'Participant Registration', 'yesno', '', 1000, 'Collect personal information about the students, such as phone number, address, gender, etc.', -1); -INSERT INTO `config` VALUES ('max_projects_per_team', '7', 'Judge Scheduler', '', '', 400, 'The maximum number of projects that a judging team can judge.', -1); -INSERT INTO `config` VALUES ('times_judged', '1', 'Judge Scheduler', '', '', 500, 'The number of times each project must be judged by different judging teams.', -1); -INSERT INTO `config` VALUES ('min_judges_per_team', '3', 'Judge Scheduler', '', '', 200, 'The minimum number of judges that can be on a judging team.', -1); -INSERT INTO `config` VALUES ('max_judges_per_team', '3', 'Judge Scheduler', '', '', 300, 'The maximum number of judges that can be on a judging team.', -1); -INSERT INTO `config` VALUES ('effort', '10000', 'Judge Scheduler', '', '', 100, 'This number controls how long and hard the judge scheduler will look for a scheduling solution. Smaller numbers are lower effort. 100 is practically no effort, 1000 is moderate effort, 10000 is high effort. It can take several tens of minutes to run the scheduler with high effort, but it gives a very good solution.', -1); -INSERT INTO `config` VALUES ('project_status', 'payment_pending', 'Judge Scheduler', 'enum', 'open=Open|payment_pending=Payment Pending|complete=Complete', 600, 'The status a project must have to be considered eligible for judge scheduling. ', -1); -INSERT INTO `config` VALUES ('DBVERSION', '52', 'Special', '', '', 0, '', 0); -INSERT INTO `config` VALUES ('ysf_region_id', '', 'CWSF Registration', '', '', 100, 'Your YSF Assigned Region Identifier', -1); -INSERT INTO `config` VALUES ('ysf_region_password', '', 'CWSF Registration', '', '', 200, 'Your YSF Assigned Region Password', -1); -INSERT INTO `config` VALUES ('participant_mentor', 'yes', 'Participant Registration', 'yesno', '', 1050, 'Ask for mentorship information', -1); -INSERT INTO `config` VALUES ('participant_project_title_charmax', '100', 'Participant Registration', '', '', 1150, 'The maximum number of characters acceptable in the project title (Max 255)', -1); -INSERT INTO `config` VALUES ('participant_project_table', 'yes', 'Participant Registration', 'yesno', '', 1160, 'Ask if the project requires a table', -1); -INSERT INTO `config` VALUES ('participant_project_electricity', 'yes', 'Participant Registration', 'yesno', '', 1170, 'Ask if the project requires electricity', -1); -INSERT INTO `config` VALUES ('tours_enable', 'no', 'Tours', 'yesno', '', 0, 'Enable the "tours" module. Set to "yes" to allow participants to select tours', -1); -INSERT INTO `config` VALUES ('tours_choices_min', '1', 'Tours', '', '', 100, 'Minimum number of tours a participant must select', -1); -INSERT INTO `config` VALUES ('tours_choices_max', '3', 'Tours', '', '', 200, 'Maximum number of tours a participant may select', -1); -INSERT INTO `config` VALUES ('scheduler_enable_sa_scheduling', 'no', 'Judge Scheduler', 'yesno', '', 900, 'Allow the scheduler to automatically create a judging team for each special award, and assigned unused divisional judges to special awards.', -1); -INSERT INTO `config` VALUES ('participant_student_tshirt_cost', '0.00', 'Participant Registration', 'number', '', 1310, 'The cost of each T-Shirt. If this is non-zero, a "None" option is added to the T-Shirt size selection box, and a note is added indicating the cost of each T-Shirt', -1); -INSERT INTO `config` VALUES ('regfee_show_info', 'no', 'Participant Registration', 'yesno', '', 410, 'Show a breakdown of the total Registration Fee calculation on the main student registration page', -1); -INSERT INTO `config` VALUES ('specialawardnomination_aftersignatures', 'yes', 'Participant Registration', 'yesno', '', 1390, 'Does the signature page need to be received BEFORE students are allowed to self nominate for special awards?', -1); -INSERT INTO `config` VALUES ('judges_specialaward_enable', 'no', 'Judge Registration', 'yesno', '', 1000, 'Allow judges to specify their special award judging preferences (in addition to the divisional judging preferences)', -1); -INSERT INTO `config` VALUES ('judges_specialaward_only_enable', 'no', 'Judge Registration', 'yesno', '', 1100, 'Allow judges to specify that they are a judge for a specific special award. If a judge selects this, it disables their divisional preference selection entirely', -1); -INSERT INTO `config` VALUES ('judges_specialaward_min', '1', 'Judge Registration', 'number', '', 1200, 'Minimum number of special awards a judge must select when specifying special award preferences', -1); -INSERT INTO `config` VALUES ('judges_specialaward_max', '6', 'Judge Registration', 'number', '', 1300, 'Maximum number of special awards a judge must select when specifying special award preferences', -1); -INSERT INTO `config` VALUES ('participant_student_pronunciation', 'no', 'Participant Registration', 'yesno', '', 1020, 'Ask the student for a pronunciation key for their name (for award ceremonies)', -1); -INSERT INTO `config` VALUES ('projects_per_special_award_judge', '20', 'Judge Scheduler', 'number', '', 1000, 'The maximum number of projects that each special awards judge can judge.', -1); - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=10 ; - --- --- Dumping data for table `dates` --- - -INSERT INTO `dates` VALUES (1, '0000-00-00 00:00:00', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` VALUES (2, '0000-00-00 00:00:00', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` VALUES (3, '0000-00-00 00:00:00', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` VALUES (4, '0000-00-00 00:00:00', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` VALUES (5, '0000-00-00 00:00:00', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` VALUES (6, '0000-00-00 00:00:00', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` VALUES (7, '0000-00-00 00:00:00', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` VALUES (8, '0000-00-00 00:00:00', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` VALUES (9, '0000-00-00 00:00:00', 'specawardregclose', 'Special Awards self-nomination closes', -1); - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM AUTO_INCREMENT=5 ; - --- --- Dumping data for table `emails` --- - -INSERT INTO `emails` VALUES (1, 'register_participants_resend_regnum', 'Participant Registration - Resend Registration Number', 'Resend the password to the participant if they submit a ''forgot regnum'' request', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'We have received a request for the retrieval of your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES (2, 'new_participant', 'New Participant', 'Email that new participants receive when they are added to the system', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES (3, 'new_judge_invite', 'New Judge Invitation', 'This is sent to a new judge when they are invited using the invite judges administration section, only available when judge_registration_type=invite', 'registration@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\r\n\r\nEmail Address: [EMAIL]\r\nPassword: [PASSWORD]\r\n\r\nYou can change your password once you login.', 'system'); -INSERT INTO `emails` VALUES (4, 'register_judges_resend_password', 'Judges Registration - Resend Password', 'Resend the password to the judge if they submit a ''forgot password'' request', 'website@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'We have received a request for the retrieval of your password from this email address. Please find your existing password below Judge Email Address: [EMAIL] Judge Registration Password: [PASSWORD] ', 'system'); - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `emergencycontact` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - `typepref` varchar(8) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_catpref` --- - -CREATE TABLE `judges_catpref` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `projectcategories_id` int(11) NOT NULL default '0', - `rank` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_catpref` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_expertise` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_jdiv` --- - -CREATE TABLE `judges_jdiv` ( - `id` int(10) unsigned NOT NULL auto_increment, - `jdiv_id` int(11) NOT NULL default '0', - `projectdivisions_id` int(11) NOT NULL default '0', - `projectcategories_id` int(11) NOT NULL default '0', - `lang` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_jdiv` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- --- Dumping data for table `judges_languages` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_schedulerconfig` --- - -CREATE TABLE `judges_schedulerconfig` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0', - UNIQUE KEY `var` (`var`,`year`) -) TYPE=MyISAM; - --- --- Dumping data for table `judges_schedulerconfig` --- - -INSERT INTO `judges_schedulerconfig` VALUES ('num_times_judged', '3', 'The number of times that each project must be judged (by different judging teams)', -1); -INSERT INTO `judges_schedulerconfig` VALUES ('num_timeslots', '20', 'The number of timeslots available during the judging period', -1); -INSERT INTO `judges_schedulerconfig` VALUES ('max_projects_per_team', '5', 'The maximum number of projects that a team can judge', -1); -INSERT INTO `judges_schedulerconfig` VALUES ('min_judges_per_team', '2', 'The minimum number of judges that should be on a judging team', -1); -INSERT INTO `judges_schedulerconfig` VALUES ('max_judges_per_team', '4', 'The maximum number of judges that should be on a judging team', -1); - --- -------------------------------------------------------- - --- --- Table structure for table `judges_specialaward_sel` --- - -CREATE TABLE `judges_specialaward_sel` ( - `id` int(11) NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `award_awards_id` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_specialaward_sel` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `autocreate_type_id` int(11) default NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_teams` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_teams_awards_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_teams_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_teams_timeslots_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_teams_timeslots_projects_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `allowdivisional` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `judges_timeslots` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- --- Dumping data for table `judges_years` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- --- Dumping data for table `languages` --- - -INSERT INTO `languages` VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` VALUES ('fr', 'Français', 'Y'); - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `mentors` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `lastupdate` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `textname` (`textname`,`year`) -) TYPE=MyISAM AUTO_INCREMENT=3 ; - --- --- Dumping data for table `pagetext` --- - -INSERT INTO `pagetext` VALUES (1, 'register_participants_main_instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', '0000-00-00 00:00:00', -1); -INSERT INTO `pagetext` VALUES (2, 'index', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, generate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', '0000-00-00 00:00:00', -1); - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `project_specialawards_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `category_shortform` char(3) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- --- Dumping data for table `projectcategories` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategoriesdivisions_link` --- - -CREATE TABLE `projectcategoriesdivisions_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `projectcategoriesdivisions_link` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `cwsfdivisionid` int(11) default NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- --- Dumping data for table `projectdivisions` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `projectdivisionsselector` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `cwsfdivisionid` int(11) default NULL, - `title` varchar(255) NOT NULL default '', - `summarycountok` tinyint(1) NOT NULL default '1', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `projects` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- --- Dumping data for table `projectsubdivisions` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- --- Dumping data for table `provinces` --- - -INSERT INTO `provinces` VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` VALUES ('QC', 'Québec'); -INSERT INTO `provinces` VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` VALUES ('YK', 'Yukon Territory'); - --- -------------------------------------------------------- - --- --- Table structure for table `question_answers` --- - -CREATE TABLE `question_answers` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `questions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `question_answers` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `questions` --- - -CREATE TABLE `questions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(11) NOT NULL default '0', - `section` varchar(32) NOT NULL default '', - `db_heading` varchar(64) NOT NULL default '', - `question` text NOT NULL, - `type` enum('check','yesno','int','text') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=16 ; - --- --- Dumping data for table `questions` --- - -INSERT INTO `questions` VALUES (15, -1, 'judgereg', 'Willing Chair', 'Are you willing to be the lead for your judging team?', 'yesno', 'yes', 5); -INSERT INTO `questions` VALUES (14, -1, 'judgereg', 'Attending Lunch', 'Will you be attending the Judge''s Lunch?', 'yesno', 'yes', 4); -INSERT INTO `questions` VALUES (13, -1, 'judgereg', 'Years National', 'Years of judging experience at a National (CWSF) level:', 'int', 'yes', 3); -INSERT INTO `questions` VALUES (12, -1, 'judgereg', 'Years Regional', 'Years of judging experience at a Regional level:', 'int', 'yes', 2); -INSERT INTO `questions` VALUES (11, -1, 'judgereg', 'Years School', 'Years of judging experience at a School level:', 'int', 'yes', 1); - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - `schools_id` int(10) unsigned default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `registrations` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `reports` --- - -CREATE TABLE `reports` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `desc` tinytext NOT NULL, - `creator` varchar(128) NOT NULL default '', - `type` enum('student','judge','award','committee','school') NOT NULL default 'student', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=35 ; - --- --- Dumping data for table `reports` --- - -INSERT INTO `reports` VALUES (1, 'Student+Project -- Sorted by Last Name', 'Student Name, Project Number and Title, Category, Division short form sorted by Last Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (2, 'Student+Project -- Sorted by Project Number', 'Student Name, Project Number and Title, Category sorted by Project Number', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (3, 'Student+Project -- Grouped by Category', 'Student Name, Project Number and Title sorted by Last Name, grouped by Category', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (4, 'Student+Project -- School Names sorted by Last Name', 'Student Name, Project Num, School Name sorted by Last Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (5, 'Student+Project -- Grouped by School sorted by Last Name', 'Student Name, Project Number and Name sorted by Last Name, grouped by School Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (6, 'Teacher -- Name and School Info sorted by Teacher Name', 'Teacher, School Info sorted by Teacher Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (7, 'Teacher -- Names and Contact for each Student by School', 'Student Name, Teacher Name, Teacher Email, School Phone and Fax grouped by School Name with Addresses', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (8, 'Awards -- Special Awards Nominations Data', 'listing of special award nominations for each project, lots of data for excel so you can slice and dice (and check additional requirements)', 'Ceddy', 'student'); -INSERT INTO `reports` VALUES (9, 'Check-in Lists', 'List of students and partners, project number and name, division, registration fees, tshirt size, sorted by project number, grouped by age category', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (10, 'Student+Project -- Student (and Partner) grouped by School', 'Student Pairs, Project Name/Num Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (11, 'Student+Project -- Grouped by School sorted by Project Number', 'Individual Students, Project Name/Num Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (12, 'Student -- T-Shirt List by School', 'Individual Students, Project Num, TShirt, Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (13, 'Media -- Program Guide', 'Project Number, Both student names, and Project Title, grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (14, 'Projects -- Titles and Grades from each School', 'Project Name/Num, Grade Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (15, 'Media -- Award Winners List', 'Project Number, Student Name and Contact info, by each Award', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (16, 'Projects -- Logistical Display Requirements', 'Project Number, Students, Electricity, Table, and special needs', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (17, 'Emergency Contact Information', 'Emergency Contact Names, Relationship, and Phone Numbers for each student.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (18, 'Student -- Grouped by Grade and Gender (YSF Stats)', 'A list of students grouped by Grade and Gender. A quick way to total up the info for the YSF regional stats page.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (19, 'Student+Project -- Grouped by School, 1 per page', 'Both students names grouped by school, each school list begins on a new page.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (20, 'Judges -- Sorted by Last Name', 'A list of judge contact info, sorted by last name', 'The Grant Brothers', 'judge'); -INSERT INTO `reports` VALUES (21, 'Judges -- Judging Teams', 'A list of all the judges, sorted by team number.', 'The Grant Brothers', 'judge'); -INSERT INTO `reports` VALUES (22, 'Awards -- Grouped by Judging Team', 'List of each judging team, and the awards they are judging', 'The Grant Brothers', 'award'); -INSERT INTO `reports` VALUES (23, 'Awards -- Judging Teams grouped by Award', 'A list of each award, and the judging teams that will assign it', 'The Grant Brothers', 'award'); -INSERT INTO `reports` VALUES (24, 'Labels -- School Mailing Addresses', 'School Mailing Addresses with a blank spot for the teacher''s name, since each student apparently spells their teacher''s name differently.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (25, 'Labels -- Student Name and Project Number', 'Just the students names and project name/number on a label.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (26, 'Name Tags -- Students', 'Name Tags for Students', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (27, 'Name Tags -- Judges', 'Name Tags for Judges', 'The Grant Brothers', 'judge'); -INSERT INTO `reports` VALUES (28, 'Name Tags -- Committee Members', 'Name Tags for Committee Members', 'The Grant Brothers', 'committee'); -INSERT INTO `reports` VALUES (29, 'Labels -- Project Identification (for judging sheets)', 'Project identification labels for judging sheets', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (30, 'Labels -- Table Labels', 'Labels to go on each table, fullpage landscape version', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (31, 'Awards -- Special Awards Nominations', 'Special award nominations for each project, grouped by special award, one award per page.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (32, 'Student+Project -- Grouped by School Board ID', 'Student Name, Project Number and Name sorted by Last Name, grouped by School Board ID', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (33, 'Certificates -- Participation Certificates', 'A certificate template for each student with name, project name, fair name, and project number at the bottom', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (34, 'Labels -- Table Labels (small)', 'Labels to go on each table', 'The Grant Brothers', 'student'); - --- -------------------------------------------------------- - --- --- Table structure for table `reports_items` --- - -CREATE TABLE `reports_items` ( - `id` int(11) NOT NULL auto_increment, - `reports_id` int(11) NOT NULL default '0', - `type` enum('col','sort','group','distinct','option','filter') NOT NULL default 'col', - `ord` int(11) NOT NULL default '0', - `field` varchar(64) NOT NULL default '', - `value` varchar(64) NOT NULL default '', - `x` float NOT NULL default '0', - `y` float NOT NULL default '0', - `w` float NOT NULL default '0', - `h` float NOT NULL default '0', - `lines` float NOT NULL default '0', - `face` enum('','bold') NOT NULL default '', - `align` enum('center','left','right') NOT NULL default 'center', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=377 ; - --- --- Dumping data for table `reports_items` --- - -INSERT INTO `reports_items` VALUES (1, 1, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (2, 1, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (3, 1, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (4, 2, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (5, 2, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (6, 2, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (7, 3, 'col', 3, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (8, 4, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (9, 3, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (10, 3, 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (11, 4, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (12, 4, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (13, 4, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (14, 4, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (15, 5, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (16, 5, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (17, 5, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (18, 5, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (19, 6, 'col', 2, 'school_phone', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (20, 6, 'col', 1, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (21, 6, 'col', 0, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (22, 6, 'sort', 0, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (23, 6, 'distinct', 0, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (24, 11, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (25, 11, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (26, 11, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (27, 7, 'col', 5, 'school_fax', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (28, 7, 'col', 4, 'school_phone', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (29, 7, 'col', 3, 'teacheremail', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (30, 7, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (31, 9, 'col', 6, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (32, 9, 'col', 5, 'tshirt', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (33, 9, 'col', 3, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (34, 9, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (35, 9, 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (36, 9, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (37, 10, 'col', 2, 'partner', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (38, 10, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (39, 10, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (40, 10, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (41, 10, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (42, 10, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (43, 2, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (44, 11, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (45, 11, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (46, 11, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (47, 11, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (48, 12, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (49, 12, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (50, 12, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (51, 12, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (52, 13, 'col', 1, 'bothnames', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (53, 13, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (54, 13, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (55, 13, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (56, 13, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (57, 14, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (58, 14, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (59, 14, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (60, 14, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (61, 15, 'col', 5, 'postal', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (62, 15, 'col', 4, 'province', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (63, 15, 'col', 3, 'city', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (64, 15, 'col', 2, 'address', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (65, 15, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (66, 15, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (67, 15, 'group', 0, 'awards', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (68, 1, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (69, 1, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (70, 1, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (71, 1, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (72, 1, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (73, 3, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (74, 3, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (75, 3, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (76, 9, 'col', 4, 'partner', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (77, 9, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (78, 9, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (79, 9, 'col', 1, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (80, 9, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (81, 5, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (82, 5, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (83, 5, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (84, 3, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (85, 4, 'col', 2, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (86, 7, 'col', 2, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (87, 7, 'group', 1, 'schooladdr', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (88, 7, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (89, 11, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (90, 2, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (91, 2, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (92, 2, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (93, 12, 'col', 2, 'tshirt', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (94, 12, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (95, 7, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (96, 12, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (97, 12, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (98, 7, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (99, 7, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (100, 7, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (101, 15, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (102, 15, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (103, 15, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (104, 15, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (105, 13, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (106, 13, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (107, 13, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (108, 13, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (109, 14, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (110, 14, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (111, 14, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (112, 14, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (113, 16, 'col', 3, 'req_table', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (114, 16, 'col', 2, 'req_elec', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (115, 16, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (116, 16, 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (117, 16, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (118, 16, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (119, 16, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (120, 16, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (121, 16, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (122, 17, 'col', 4, 'emerg_phone', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (123, 17, 'col', 3, 'emerg_relation', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (124, 17, 'col', 2, 'emerg_name', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (125, 17, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (126, 7, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (127, 14, 'col', 2, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (128, 17, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (129, 6, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (130, 6, 'col', 3, 'school_fax', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (131, 17, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (132, 17, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (133, 6, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (134, 6, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (135, 9, 'col', 0, 'paid', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (136, 1, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (137, 2, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (138, 3, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (139, 3, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (140, 4, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (141, 4, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (142, 10, 'col', 3, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (143, 10, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (144, 10, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (145, 10, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (146, 5, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (147, 5, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (148, 5, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (149, 5, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (150, 11, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (151, 11, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (152, 11, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (153, 18, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (154, 18, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (155, 18, 'col', 2, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (156, 18, 'group', 0, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (157, 18, 'group', 1, 'gender', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (158, 18, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (159, 18, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (160, 18, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (161, 18, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (162, 3, 'col', 4, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (163, 1, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (164, 2, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (165, 2, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (166, 19, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (167, 19, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (168, 19, 'col', 2, 'bothnames', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (169, 19, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (170, 19, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (171, 19, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (172, 19, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (173, 19, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (174, 21, 'sort', 1, 'namefl', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (175, 21, 'col', 1, 'team', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (176, 21, 'col', 2, 'captain', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (177, 21, 'col', 3, 'namefl', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (178, 21, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (179, 20, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (180, 20, 'col', 4, 'complete', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (181, 20, 'col', 0, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (182, 20, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (183, 20, 'sort', 0, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (184, 20, 'col', 1, 'email', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (185, 20, 'col', 2, 'phone_home', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (186, 20, 'col', 3, 'phone_work', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (187, 20, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (188, 21, 'sort', 0, 'teamnum', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (189, 21, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (190, 21, 'col', 0, 'teamnum', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (191, 21, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (192, 22, 'col', 1, 'type', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (193, 22, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (194, 22, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (195, 22, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (196, 22, 'group', 0, 'judgeteamnum', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (197, 22, 'col', 0, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (198, 22, 'group', 1, 'judgeteamname', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (199, 23, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (200, 23, 'col', 1, 'judgeteamname', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (201, 23, 'group', 0, 'type', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (202, 23, 'sort', 0, 'judgeteamnum', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (203, 23, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (204, 23, 'group', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (205, 23, 'col', 0, 'judgeteamnum', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (206, 23, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES (207, 16, 'col', 4, 'req_special', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (208, 16, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (209, 16, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (210, 16, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (211, 16, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (212, 16, 'option', 6, 'stock', 'letter', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (213, 17, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (214, 25, 'option', 6, 'stock', '5964', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (215, 25, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (216, 24, 'col', 2, 'school_city_prov', '', 5, 50, 95, 8, 1, '', 'left'); -INSERT INTO `reports_items` VALUES (217, 24, 'col', 1, 'school_address', '', 5, 40, 95, 16, 2, '', 'left'); -INSERT INTO `reports_items` VALUES (218, 24, 'col', 0, 'school', '', 5, 5, 95, 16, 2, '', 'left'); -INSERT INTO `reports_items` VALUES (219, 24, 'option', 6, 'stock', '5964', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (220, 24, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (221, 24, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (222, 24, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (223, 24, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (224, 24, 'sort', 0, 'school', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (225, 25, 'col', 4, 'school', '', 1, 90, 98, 5, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (226, 24, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (227, 24, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (228, 25, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (229, 25, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (230, 25, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (231, 25, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (232, 25, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (233, 25, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (234, 8, 'col', 7, 'nom_awards', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (235, 25, 'col', 3, 'categorydivision', '', 1, 80, 98, 12, 2, '', 'center'); -INSERT INTO `reports_items` VALUES (236, 25, 'col', 2, 'pn', '', 1, 68, 98, 8, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (237, 27, 'sort', 0, 'namefl', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (238, 25, 'col', 1, 'title', '', 1, 35, 98, 27, 3, '', 'center'); -INSERT INTO `reports_items` VALUES (239, 25, 'col', 0, 'namefl', '', 5, 5, 90, 28, 2, '', 'center'); -INSERT INTO `reports_items` VALUES (240, 26, 'col', 2, 'categorydivision', '', 1, 70, 98, 14, 2, '', 'center'); -INSERT INTO `reports_items` VALUES (241, 26, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (242, 26, 'option', 6, 'stock', 'nametag', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (243, 26, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (244, 26, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (245, 26, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (246, 26, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (247, 26, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (248, 26, 'col', 1, 'title', '', 1, 35, 98, 27, 3, '', 'center'); -INSERT INTO `reports_items` VALUES (249, 26, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (250, 26, 'col', 0, 'namefl', '', 5, 5, 90, 28, 2, 'bold', 'center'); -INSERT INTO `reports_items` VALUES (251, 27, 'col', 1, 'static_text', 'Judge', 1, 40, 98, 10, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (252, 27, 'col', 0, 'namefl', '', 1, 15, 98, 24, 2, 'bold', 'center'); -INSERT INTO `reports_items` VALUES (253, 27, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (254, 27, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (255, 27, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (256, 27, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (257, 27, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (258, 28, 'col', 1, 'static_text', 'Committee', 1, 40, 98, 10, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (259, 28, 'col', 0, 'name', '', 1, 15, 98, 24, 2, 'bold', 'center'); -INSERT INTO `reports_items` VALUES (260, 28, 'sort', 0, 'name', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (261, 28, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (262, 28, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (263, 28, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (264, 28, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (265, 28, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (266, 30, 'option', 6, 'stock', 'fullpage_landscape', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (267, 29, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (268, 29, 'col', 1, 'categorydivision', '', 1, 30, 98, 18, 1, '', 'left'); -INSERT INTO `reports_items` VALUES (269, 8, 'col', 6, 'school_city', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (270, 29, 'col', 0, 'pn', '', 1, 5, 98, 20, 1, '', 'left'); -INSERT INTO `reports_items` VALUES (271, 29, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (272, 29, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (273, 29, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (274, 29, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (275, 29, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (276, 29, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (277, 30, 'col', 3, 'categorydivision', '', 1, 85, 98, 5, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (278, 30, 'col', 2, 'pn', '', 1, 20, 98, 35, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (279, 30, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (280, 30, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (281, 30, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (282, 30, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (283, 30, 'col', 1, 'title', '', 1, 5, 98, 15, 3, '', 'center'); -INSERT INTO `reports_items` VALUES (284, 30, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (285, 31, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (286, 8, 'col', 5, 'birthdate', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (287, 8, 'col', 4, 'gender', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (288, 31, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (289, 31, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (290, 31, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (291, 31, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (292, 31, 'col', 5, 'age', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (293, 31, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (294, 17, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (295, 31, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (296, 31, 'col', 4, 'gender', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (297, 31, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (298, 31, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (299, 31, 'group', 0, 'nom_awards', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (300, 32, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (301, 32, 'col', 4, 'school', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (302, 32, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (303, 32, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (304, 32, 'group', 0, 'school_board', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (305, 32, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (306, 32, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (307, 32, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (308, 32, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (309, 32, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (310, 32, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (311, 32, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (312, 32, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (313, 32, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (314, 17, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (315, 17, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (316, 17, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (317, 17, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (318, 31, 'col', 2, 'namefl', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (319, 31, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (320, 31, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (321, 33, 'col', 5, 'static_text', 'Chair', 5, 85, 30, 2, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (322, 33, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (323, 8, 'col', 2, 'namefl', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (324, 8, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (325, 33, 'col', 6, 'static_text', 'Chief Judge', 60, 85, 30, 2, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (326, 33, 'col', 4, 'fair_year', '', 5, 25, 30, 6, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (327, 33, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (328, 33, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (329, 33, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (330, 33, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (331, 33, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (332, 33, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (333, 33, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (334, 33, 'col', 3, 'pn', '', 3, 97, 94, 1, 1, '', 'right'); -INSERT INTO `reports_items` VALUES (335, 33, 'col', 0, 'fair_name', '', 1, 36, 98, 4, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (336, 33, 'col', 1, 'namefl', '', 1, 56, 98, 8, 2, '', 'center'); -INSERT INTO `reports_items` VALUES (337, 33, 'col', 2, 'title', '', 1, 65, 98, 12, 3, '', 'center'); -INSERT INTO `reports_items` VALUES (338, 24, 'col', 3, 'school_postal', '', 5, 60, 95, 8, 1, '', 'left'); -INSERT INTO `reports_items` VALUES (339, 30, 'col', 0, 'bothnames', '', 1, 70, 98, 10, 2, '', 'center'); -INSERT INTO `reports_items` VALUES (340, 30, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (341, 26, 'col', 3, 'pn', '', 1, 85, 98, 8, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (342, 27, 'col', 2, 'organization', '', 1, 70, 98, 16, 2, '', 'center'); -INSERT INTO `reports_items` VALUES (343, 27, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (344, 27, 'option', 6, 'stock', 'nametag', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (345, 27, 'filter', 0, 'complete', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (346, 28, 'col', 2, 'organization', '', 1, 70, 98, 16, 2, '', 'center'); -INSERT INTO `reports_items` VALUES (347, 28, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (348, 28, 'option', 6, 'stock', 'nametag', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (349, 29, 'col', 2, 'title', '', 1, 55, 98, 40, 2, '', 'left'); -INSERT INTO `reports_items` VALUES (350, 29, 'option', 6, 'stock', '5961', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (351, 30, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (352, 30, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (353, 8, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (354, 8, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (355, 8, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (356, 8, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (357, 8, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (358, 8, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (359, 8, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (360, 8, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (361, 8, 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (362, 8, 'sort', 0, 'nom_awards', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (363, 8, 'sort', 1, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (364, 34, 'col', 3, 'categorydivision', '', 1, 85, 98, 7, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (365, 34, 'col', 2, 'pn', '', 1, 20, 98, 35, 1, '', 'center'); -INSERT INTO `reports_items` VALUES (366, 34, 'col', 1, 'title', '', 1, 5, 98, 24, 3, '', 'center'); -INSERT INTO `reports_items` VALUES (367, 34, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (368, 34, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (369, 34, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (370, 34, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (371, 34, 'col', 0, 'bothnames', '', 1, 70, 98, 14, 2, '', 'center'); -INSERT INTO `reports_items` VALUES (372, 34, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (373, 34, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (374, 34, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (375, 34, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES (376, 34, 'option', 6, 'stock', '5964', 0, 0, 0, 0, 0, '', ''); - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `safety` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `safetyquestions` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `schoollang` char(2) NOT NULL default '', - `schoollevel` varchar(32) NOT NULL default '', - `board` varchar(64) NOT NULL default '', - `district` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `principal` varchar(64) NOT NULL default '', - `schoolemail` varchar(128) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime default NULL, - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - `registration_password` varchar(32) NOT NULL default '', - `projectlimit` int(10) NOT NULL default '0', - `projectlimitper` enum('total','agecategory') NOT NULL default 'total', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `schools` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `signaturepage` --- - -CREATE TABLE `signaturepage` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(32) NOT NULL default '', - `use` tinyint(4) NOT NULL default '1', - `text` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=5 ; - --- --- Dumping data for table `signaturepage` --- - -INSERT INTO `signaturepage` VALUES (1, 'exhibitordeclaration', 1, 'The following section is to be read and signed by the exhibitor(s).\r\n\r\nI/We certify that:\r\n - The preparation of this project is mainly my/our own work.\r\n - I/We have read the rules and regulations and agree to abide by them.\r\n - I/We agree agree that the decision of the judges will be final.'); -INSERT INTO `signaturepage` VALUES (2, 'parentdeclaration', 1, 'The following is to be read and signed by the exhibitor(s) parent(s)/guardian(s).\r\nAs a parent/guardian I certify to the best of my knowledge and believe the information contained in this application is correct, and the project is the work of the student. I also understand that the material used in the project is the responsibility of the student and that neither the school, the teacher, nor the regional fair can be held responsible for loss, damage, or theft, however caused. I further understand that all exhibits entered must be left on display until the end of the Fair. If my son/daughter does not remove the exhibit at the end of the Fair, the fair organizers or the owner of the exhibition hall cannot be responsible for the disposal of the exhibit.\r\n\r\nIf my son/daughter is awarded the honour of having his/her exhibit chosen for presentation at the Canada-Wide Science Fair, I consent to having him/her journey to the Fair, and will not hold the Fair responsible for any accident or mishap to the student or the exhibit.'); -INSERT INTO `signaturepage` VALUES (3, 'teacherdeclaration', 0, 'The following section is to be read and signed by the teacher.\r\n\r\nI certify that:\r\n - The preparation of this project is mainly the student(s)'' own work.\r\n - The student(s) have read the rules and regulations and agree to abide by them.\r\n - I agree that the decision of the judges will be final.'); -INSERT INTO `signaturepage` VALUES (4, 'postamble', 0, 'Please send the signed signature form and any required payment to: \n\n[Insert Address Here]'); - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `pronunciation` varchar(64) NOT NULL default '', - `sex` enum('male','female') default NULL, - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` varchar(32) NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - `webfirst` enum('no','yes') NOT NULL default 'yes', - `weblast` enum('no','yes') NOT NULL default 'yes', - `webphoto` enum('no','yes') NOT NULL default 'yes', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `students` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `tours` --- - -CREATE TABLE `tours` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `name` tinytext NOT NULL, - `description` text NOT NULL, - `capacity` int(11) NOT NULL default '0', - `grade_min` int(11) NOT NULL default '7', - `grade_max` int(11) NOT NULL default '12', - `contact` tinytext NOT NULL, - `location` tinytext NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `tours` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `tours_choice` --- - -CREATE TABLE `tours_choice` ( - `id` int(10) unsigned NOT NULL auto_increment, - `students_id` int(10) unsigned NOT NULL default '0', - `registrations_id` int(10) unsigned NOT NULL default '0', - `tour_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `rank` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `tours_choice` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - `argsdesc` text, - PRIMARY KEY (`strmd5`), - UNIQUE KEY `lang` (`lang`,`strmd5`) -) TYPE=MyISAM; - --- --- Dumping data for table `translations` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - --- --- Dumping data for table `winners` --- - diff --git a/db/db.full.6.sql b/db/db.full.6.sql deleted file mode 100644 index 1bf21b7c..00000000 --- a/db/db.full.6.sql +++ /dev/null @@ -1,734 +0,0 @@ --- phpMyAdmin SQL Dump --- version 2.6.0-rc2 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 26, 2005 at 04:29 PM --- Server version: 4.0.24 --- PHP Version: 4.3.11 --- --- Database: `sfiab` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL auto_increment, - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `catpref` int(10) unsigned default NULL, - `divpref` int(10) unsigned default NULL, - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `textname` (`textname`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `sex` enum('male','female') NOT NULL default 'male', - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` enum('small','medium','large','xlarge') NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - PRIMARY KEY (`strmd5`), - KEY `strmd5` (`strmd5`), - KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM; diff --git a/db/db.full.7.sql b/db/db.full.7.sql deleted file mode 100644 index 2ca2eddc..00000000 --- a/db/db.full.7.sql +++ /dev/null @@ -1,785 +0,0 @@ --- phpMyAdmin SQL Dump --- version 2.6.0-rc2 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 26, 2005 at 04:29 PM --- Server version: 4.0.24 --- PHP Version: 4.3.11 --- --- Database: `sfiab` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL auto_increment, - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `catpref` int(10) unsigned default NULL, - `divpref` int(10) unsigned default NULL, - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `textname` (`textname`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `sex` enum('male','female') NOT NULL default 'male', - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` enum('small','medium','large','xlarge') NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - PRIMARY KEY (`strmd5`), - KEY `strmd5` (`strmd5`), - KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM; - -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairname', '', 'Name of the fair', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('default_language', 'en', 'The default language if no language has yet been specified', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minstudentsperproject', '1', 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxstudentsperproject', '2', 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('mingrade', '7', 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxgrade', '12', 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minage', '10', 'The minimum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxage', '21', 'The maximum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxmentorsperproject', '5', 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minmentorsperproject', '0', 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('usedivisionselector', 'yes', 'Specify whether to use the division selector flowchart questions to help decide on the division (yes/no)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minjudgeage', '21', 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxjudgeage', '100', 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('participant_student_foodreq', 'yes', 'Ask for students special food requirements (yes/no). Should be yes if you plan on providing lunch', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee', '', 'Registration Fee', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee_per', 'student', 'Registration fee is per student, or per project? (student/project)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('project_num_format', 'CDN', 'C=Category, D=Divison, N=2 digit Number', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_publiclayout', '', 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. (date|registration). If "date" is used, it must be configured under "Important Dates" section.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the fair manager. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregclose', 'Special Awards self-nomination closes', -1); - -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('fr', 'Français', 'Y'); - -INSERT INTO `provinces` (`code`, `province`) VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('QC', 'Québec'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('YK', 'Yukon Territory'); - -INSERT INTO `config` (`var`,`val`,`year`) VALUES ('DBVERSION','7','0'); diff --git a/db/db.full.8.sql b/db/db.full.8.sql deleted file mode 100644 index 9bd99475..00000000 --- a/db/db.full.8.sql +++ /dev/null @@ -1,796 +0,0 @@ --- phpMyAdmin SQL Dump --- version 2.6.0-rc2 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 26, 2005 at 04:29 PM --- Server version: 4.0.24 --- PHP Version: 4.3.11 --- --- Database: `sfiab` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL, - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - UNIQUE (id,year) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `catpref` int(10) unsigned default NULL, - `divpref` int(10) unsigned default NULL, - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `lastupdate` DATETIME NOT NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY (`textname`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `sex` enum('male','female') NOT NULL default 'male', - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` enum('small','medium','large','xlarge') NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - PRIMARY KEY (`strmd5`), - KEY `strmd5` (`strmd5`), - KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM; - -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairname', '', 'Name of the fair', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('default_language', 'en', 'The default language if no language has yet been specified', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minstudentsperproject', '1', 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxstudentsperproject', '2', 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('mingrade', '7', 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxgrade', '12', 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minage', '10', 'The minimum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxage', '21', 'The maximum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxmentorsperproject', '5', 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minmentorsperproject', '0', 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('usedivisionselector', 'yes', 'Specify whether to use the division selector flowchart questions to help decide on the division (yes/no)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minjudgeage', '21', 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxjudgeage', '100', 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('participant_student_foodreq', 'yes', 'Ask for students special food requirements (yes/no). Should be yes if you plan on providing lunch', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee', '', 'Registration Fee', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee_per', 'student', 'Registration fee is per student, or per project? (student/project)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('project_num_format', 'CDN', 'C=Category, D=Divison, N=2 digit Number', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_publiclayout', '', 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. (date|registration). If "date" is used, it must be configured under "Important Dates" section.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregclose', 'Special Awards self-nomination closes', -1); - -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('fr', 'Français', 'Y'); - -INSERT INTO `provinces` (`code`, `province`) VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('QC', 'Québec'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('YK', 'Yukon Territory'); - -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, -1); -INSERT INTO `award_types` VALUES (2, 'Special', 2, -1); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, -1); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, -1); -INSERT INTO `award_types` VALUES (5, 'Other', 4, -1); - -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('register_participants_main_instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', -1); -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('index', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, renerate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', -1); - -INSERT INTO `config` (`var`,`val`,`year`) VALUES ('DBVERSION','8','0'); - diff --git a/db/db.full.9.sql b/db/db.full.9.sql deleted file mode 100644 index 001f864c..00000000 --- a/db/db.full.9.sql +++ /dev/null @@ -1,807 +0,0 @@ --- phpMyAdmin SQL Dump --- version 2.6.0-rc2 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 26, 2005 at 04:29 PM --- Server version: 4.0.24 --- PHP Version: 4.3.11 --- --- Database: `sfiab` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL, - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - UNIQUE (id,year) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0' -) TYPE=MyISAM; -ALTER TABLE `config` ADD UNIQUE (`var`,`year`); - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `catpref` int(10) unsigned default NULL, - `divpref` int(10) unsigned default NULL, - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `lastupdate` DATETIME NOT NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY (`textname`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - `registration_password` varchar(32) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `sex` enum('male','female') NOT NULL default 'male', - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` enum('small','medium','large','xlarge') NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - PRIMARY KEY (`strmd5`), - KEY `strmd5` (`strmd5`), - KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- Now insert everything - -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairname', '', 'Name of the fair', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('default_language', 'en', 'The default language if no language has yet been specified', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minstudentsperproject', '1', 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxstudentsperproject', '2', 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('mingrade', '7', 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxgrade', '12', 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minage', '10', 'The minimum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxage', '21', 'The maximum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxmentorsperproject', '5', 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minmentorsperproject', '0', 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('usedivisionselector', 'yes', 'Specify whether to use the division selector flowchart questions to help decide on the division (yes/no)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minjudgeage', '21', 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxjudgeage', '100', 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('participant_student_foodreq', 'yes', 'Ask for students special food requirements (yes/no). Should be yes if you plan on providing lunch', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee', '', 'Registration Fee', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee_per', 'student', 'Registration fee is per student, or per project? (student/project)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('project_num_format', 'CDN', 'C=Category, D=Divison, N=2 digit Number', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_publiclayout', '', 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. (date|registration). If "date" is used, it must be configured under "Important Dates" section.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_type', 'open', 'The type of Participant Registration to use: open | singlepassword | schoolpassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'judge_registration_type', 'open', 'The type of Judge Registration to use: open | singlepassword | invite', '-1'); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ( 'participant_registration_singlepassword', '', 'The single password to use for participant registraiton if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration','-1'); -INSERT INTO `config` (`var`, `val` , `description` , `year` ) VALUES ( 'judge_registration_singlepassword', '', 'The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registraiton', '-1'); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregclose', 'Special Awards self-nomination closes', -1); - -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('fr', 'Français', 'Y'); - -INSERT INTO `provinces` (`code`, `province`) VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('QC', 'Québec'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('YK', 'Yukon Territory'); - -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, -1); -INSERT INTO `award_types` VALUES (2, 'Special', 2, -1); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, -1); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, -1); -INSERT INTO `award_types` VALUES (5, 'Other', 4, -1); - -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('register_participants_main_instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', -1); -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('index', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, renerate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', -1); - -INSERT INTO `emails` VALUES ('', 'register_participants_resend_regnum', 'Participant Registration - Resend Registration Number', 'Resend the password to the participant if they submit a ''forgot regnum'' request', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'We have received a request for the retrieval if your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_participant', 'New Participant', 'Email that new participants receive when they are added to the system', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'A new registration account has been created for you. To access your registration account, please enter enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_judge_invite', 'New Judge Invitation', 'This is sent to a new judge when they are invited using the invite judges administration section, only available when judge_registraiton_type=invite', 'registration@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\r\n\r\nEmail Address: [EMAIL]\r\nPassword: [PASSWORD]\r\n\r\nYou can change your password once you login.', 'system'); - -INSERT INTO `config` (`var`,`val`,`year`) VALUES ('DBVERSION','9','0'); diff --git a/db/db.update.1.sql b/db/db.update.1.sql deleted file mode 100644 index e69de29b..00000000 diff --git a/db/db.update.10.sql b/db/db.update.10.sql deleted file mode 100644 index 990598d1..00000000 --- a/db/db.update.10.sql +++ /dev/null @@ -1,4 +0,0 @@ -UPDATE `pagetext` SET `text`='Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, generate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n' WHERE `textname`='index' AND `year`='-1'; -UPDATE `emails` SET `body`='A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n' WHERE `val`='new_participant'; -UPDATE `emails` SET `body`='We have received a request for the retrieval of your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n' WHERE `val`='register_participants_resend_regnum'; -UPDATE `config` SET `description`='The single password to use for participant registration if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration' WHERE `var`='participant_registration_singlepassword' AND `year`='-1'; diff --git a/db/db.update.100.sql b/db/db.update.100.sql deleted file mode 100644 index cf454398..00000000 --- a/db/db.update.100.sql +++ /dev/null @@ -1,30 +0,0 @@ -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '45', 'School -- All school information for SFIAB CSV import', 'Generates a CSV file that can be used by another SFIAB to import the school list', 'The Grant Brothers', 'school'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'school', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 1, 'school_lang', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 2, 'school_level', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 3, 'school_board', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 4, 'school_district', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 5, 'school_phone', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 6, 'school_fax', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 7, 'school_address', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 8, 'school_city', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 9, 'school_province', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 10, 'school_postal', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 11, 'school_principal', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 12, 'school_email', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 13, 'school_sh', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 14, 'school_shemail', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 15, 'school_shphone', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 16, 'school_accesscode', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 17, 'school_registration_password', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 18, 'school_project_limit', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 19, 'school_project_limit_per', '', 0, 0, 0, 0, 1, '', ' '); diff --git a/db/db.update.101.sql b/db/db.update.101.sql deleted file mode 100644 index 60d088dc..00000000 --- a/db/db.update.101.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `award_awards` ADD `self_nominate` ENUM('yes', 'no') NOT NULL DEFAULT 'yes' AFTER `cwsfaward` ; -ALTER TABLE `award_awards` ADD `schedule_judges` ENUM('yes', 'no') NOT NULL DEFAULT 'yes' AFTER `self_nominate` ; - -UPDATE award_awards SET self_nominate='yes' WHERE 1; -UPDATE award_awards SET schedule_judges='yes' WHERE 1; - diff --git a/db/db.update.102.sql b/db/db.update.102.sql deleted file mode 100644 index 57a4f914..00000000 --- a/db/db.update.102.sql +++ /dev/null @@ -1,4 +0,0 @@ -SELECT @id:=id FROM reports WHERE system_report_id='44'; -UPDATE reports_items SET `value`='letter_4up' WHERE `field`='stock' AND `reports_id`=@id; - - diff --git a/db/db.update.103.sql b/db/db.update.103.sql deleted file mode 100644 index b1f0bea3..00000000 --- a/db/db.update.103.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `config` SET `type` = 'number' WHERE `var` = 'regfee'; diff --git a/db/db.update.104.sql b/db/db.update.104.sql deleted file mode 100644 index b9e551e7..00000000 --- a/db/db.update.104.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `users` ADD `firstaid` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no' AFTER `postalcode` ; -ALTER TABLE `users` ADD `cpr` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no' AFTER `firstaid` ; - -UPDATE `config` SET `type_values` = 'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province|firstaid=First Aid and CPR' WHERE `var` = 'committee_personal_fields' ; -UPDATE `config` SET `type_values` = 'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province|firstaid=First Aid and CPR' WHERE `var` = 'committee_personal_required' ; - -UPDATE `config` SET `type_values` = 'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province|firstaid=First Aid and CPR' WHERE `var` = 'volunteer_personal_fields' ; -UPDATE `config` SET `type_values` = 'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province|firstaid=First Aid and CPR' WHERE `var` = 'volunteer_personal_required' ; - diff --git a/db/db.update.105.sql b/db/db.update.105.sql deleted file mode 100644 index fba5af9c..00000000 --- a/db/db.update.105.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT IGNORE INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'judge_scheduler_percent', '-1', 'Judge Scheduler', '', '', '99999', '', '0'); -INSERT IGNORE INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'judge_scheduler_activity', 'Done', 'Judge Scheduler', '', '', '99999', '', '0'); diff --git a/db/db.update.106.sql b/db/db.update.106.sql deleted file mode 100644 index 75f02326..00000000 --- a/db/db.update.106.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `reports_items` CHANGE `align` `align` VARCHAR( 64 ) NOT NULL DEFAULT 'vtop center' diff --git a/db/db.update.107.sql b/db/db.update.107.sql deleted file mode 100644 index d048ab8d..00000000 --- a/db/db.update.107.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'provincestate', 'Province', 'Global', 'enum', 'Province=Province|State=State', '800', 'Use Province or State?', '-1'); -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'postalzip', 'Postal Code', 'Global', 'enum', 'Postal Code=Postal Code|Zip Code=Zip Code', '810', 'Use Postal Code or Zip Code?', '-1'); - diff --git a/db/db.update.108.sql b/db/db.update.108.sql deleted file mode 100644 index 7cf77438..00000000 --- a/db/db.update.108.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'theme', 'default', 'Global', 'text', '', '850', 'Theme for colours/icons', '-1'); diff --git a/db/db.update.109.sql b/db/db.update.109.sql deleted file mode 100644 index 373f1adf..00000000 --- a/db/db.update.109.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `pagetext` ADD `lang` VARCHAR( 2 ) DEFAULT 'en' NOT NULL ; -ALTER TABLE `pagetext` DROP INDEX `textname`; -ALTER TABLE pagetext ADD UNIQUE(`textname`,`year`,`lang`); diff --git a/db/db.update.11.sql b/db/db.update.11.sql deleted file mode 100644 index bde8282e..00000000 --- a/db/db.update.11.sql +++ /dev/null @@ -1,24 +0,0 @@ -CREATE TABLE `judges_catpref` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `judges_id` INT NOT NULL , - `projectcategories_id` INT NOT NULL , - `rank` INT NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; -CREATE TABLE `judges_schedulerconfig` ( - `var` VARCHAR( 64 ) NOT NULL DEFAULT '', - `val` TEXT NOT NULL , - `description` TEXT NOT NULL , - `year` INT( 11 ) NOT NULL DEFAULT '0', - UNIQUE KEY `var` ( `var` , `year` ) -) TYPE = MYISAM ; -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'timeslot_length', '12', 'The length of time (in minutes) that a judging timeslot should be', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'timeslot_break', '3', 'The length of time (in minutes) between timeslots to allow judges to move between projects', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_times_judged', '3', 'The number of times that each project must be judged (by different judging teams)', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'num_timeslots', '20', 'The number of timeslots available during the judging period', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_projects_per_team', '5', 'The maximum number of projects that a team can judge', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'min_judges_per_team', '2', 'The minimum number of judges that should be on a judging team', '-1'); -INSERT INTO `judges_schedulerconfig` ( `var` , `val` , `description` , `year` ) VALUES ( 'max_judges_per_team', '4', 'The maximum number of judges that should be on a judging team', '-1'); -ALTER TABLE `judges_teams` ADD `autocreate_type_id` INT DEFAULT NULL ; -INSERT INTO `emails` ( `id` , `val` , `name` , `description` , `from` , `subject` , `body` , `type` ) VALUES ('', 'register_judges_resend_password', 'Judges Registration - Resend Password', 'Resend the password to the judge if they submit a ''forgot password'' request', 'website@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'We have received a request for the retrieval of your password from this email address. Please find your existing password below Judge Email Address: [EMAIL] Judge Registration Password: [PASSWORD] ', 'system'); diff --git a/db/db.update.110.sql b/db/db.update.110.sql deleted file mode 100644 index a9f4aff5..00000000 --- a/db/db.update.110.sql +++ /dev/null @@ -1,7 +0,0 @@ -UPDATE `config` SET category='Localization', ord='100' WHERE var='provincestate'; -UPDATE `config` SET category='Localization', ord='110' WHERE var='postalzip'; -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'dateformat', 'Y-m-d', 'Localization', 'text', '', '200', 'Date format (formatting options)', '-1'); -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'timeformat', 'H:i:s', 'Localization', 'text', '', '210', 'Time format (formatting options)', '-1'); - diff --git a/db/db.update.111.php b/db/db.update.111.php deleted file mode 100644 index 1c88a363..00000000 --- a/db/db.update.111.php +++ /dev/null @@ -1,21 +0,0 @@ -prepare("SELECT * FROM pagetext WHERE textname='index' AND year=?"); - $q->execute([$config['FAIRYEAR']]); - if (!$q->rowCount()) { - $q = $pdo->prepare("SELECT * FROM pagetext WHERE textname='index' AND year='-1'"); - $q->execute(); - } - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - // insert it into the CMS under index.html - $stmt = $pdo->prepare("INSERT INTO cms (filename,dt,lang,text,showlogo) VALUES ('index.html',?,?,?,'1')"); - $stmt->execute([$r->lastupdate,$r->lang,$r->text]); - } - // and remove it from the pagetext - $stmt = $pdo->prepare("DELETE FROM pagetext WHERE textname='index'"); - $stmt->execute(); -} -?> diff --git a/db/db.update.111.sql b/db/db.update.111.sql deleted file mode 100644 index 74b65542..00000000 --- a/db/db.update.111.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `cms` ( - `id` INT NOT NULL AUTO_INCREMENT , - `filename` VARCHAR( 128 ) NOT NULL , - `dt` DATETIME NOT NULL , - `lang` VARCHAR( 2 ) NOT NULL , - `title` VARCHAR( 128 ) NOT NULL , - `text` TEXT NOT NULL , - `showlogo` BOOL DEFAULT '0' NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; diff --git a/db/db.update.112.sql b/db/db.update.112.sql deleted file mode 100644 index 6cea2f91..00000000 --- a/db/db.update.112.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `pagetext` ADD `textdescription` VARCHAR( 255 ) NOT NULL AFTER `textname` ; -UPDATE `pagetext` SET `textdescription`='Participant registration main page instructions' WHERE textname='register_participants_main_instructions'; -UPDATE `pagetext` SET `textdescription`='Judge registration instructions for Invite-Only mode' WHERE textname='register_judges_invite'; -UPDATE `pagetext` SET `textdescription`='Volunteer registration instructions for Invite-Only mode' WHERE textname='register_volunteer_invite'; -UPDATE `pagetext` SET `textdescription`='School access login page' WHERE textname='schoolaccess'; diff --git a/db/db.update.113.sql b/db/db.update.113.sql deleted file mode 100644 index 61a8f2c8..00000000 --- a/db/db.update.113.sql +++ /dev/null @@ -1,329 +0,0 @@ -CREATE TABLE `countries` ( - `code` VARCHAR( 2 ) NOT NULL, - `country` VARCHAR( 64 ) NOT NULL, - UNIQUE (`code`) -) TYPE = MYISAM; -INSERT INTO `countries` (country,code) VALUES ('AFGHANISTAN','AF'); -INSERT INTO `countries` (country,code) VALUES ('ÅLAND ISLANDS','AX'); -INSERT INTO `countries` (country,code) VALUES ('ALBANIA','AL'); -INSERT INTO `countries` (country,code) VALUES ('ALGERIA','DZ'); -INSERT INTO `countries` (country,code) VALUES ('AMERICAN SAMOA','AS'); -INSERT INTO `countries` (country,code) VALUES ('ANDORRA','AD'); -INSERT INTO `countries` (country,code) VALUES ('ANGOLA','AO'); -INSERT INTO `countries` (country,code) VALUES ('ANGUILLA','AI'); -INSERT INTO `countries` (country,code) VALUES ('ANTARCTICA','AQ'); -INSERT INTO `countries` (country,code) VALUES ('ANTIGUA AND BARBUDA','AG'); -INSERT INTO `countries` (country,code) VALUES ('ARGENTINA','AR'); -INSERT INTO `countries` (country,code) VALUES ('ARMENIA','AM'); -INSERT INTO `countries` (country,code) VALUES ('ARUBA','AW'); -INSERT INTO `countries` (country,code) VALUES ('AUSTRALIA','AU'); -INSERT INTO `countries` (country,code) VALUES ('AUSTRIA','AT'); -INSERT INTO `countries` (country,code) VALUES ('AZERBAIJAN','AZ'); -INSERT INTO `countries` (country,code) VALUES ('BAHAMAS','BS'); -INSERT INTO `countries` (country,code) VALUES ('BAHRAIN','BH'); -INSERT INTO `countries` (country,code) VALUES ('BANGLADESH','BD'); -INSERT INTO `countries` (country,code) VALUES ('BARBADOS','BB'); -INSERT INTO `countries` (country,code) VALUES ('BELARUS','BY'); -INSERT INTO `countries` (country,code) VALUES ('BELGIUM','BE'); -INSERT INTO `countries` (country,code) VALUES ('BELIZE','BZ'); -INSERT INTO `countries` (country,code) VALUES ('BENIN','BJ'); -INSERT INTO `countries` (country,code) VALUES ('BERMUDA','BM'); -INSERT INTO `countries` (country,code) VALUES ('BHUTAN','BT'); -INSERT INTO `countries` (country,code) VALUES ('BOLIVIA','BO'); -INSERT INTO `countries` (country,code) VALUES ('BOSNIA AND HERZEGOVINA','BA'); -INSERT INTO `countries` (country,code) VALUES ('BOTSWANA','BW'); -INSERT INTO `countries` (country,code) VALUES ('BOUVET ISLAND','BV'); -INSERT INTO `countries` (country,code) VALUES ('BRAZIL','BR'); -INSERT INTO `countries` (country,code) VALUES ('BRITISH INDIAN OCEAN TERRITORY','IO'); -INSERT INTO `countries` (country,code) VALUES ('BRUNEI DARUSSALAM','BN'); -INSERT INTO `countries` (country,code) VALUES ('BULGARIA','BG'); -INSERT INTO `countries` (country,code) VALUES ('BURKINA FASO','BF'); -INSERT INTO `countries` (country,code) VALUES ('BURUNDI','BI'); -INSERT INTO `countries` (country,code) VALUES ('CAMBODIA','KH'); -INSERT INTO `countries` (country,code) VALUES ('CAMEROON','CM'); -INSERT INTO `countries` (country,code) VALUES ('CANADA','CA'); -INSERT INTO `countries` (country,code) VALUES ('CAPE VERDE','CV'); -INSERT INTO `countries` (country,code) VALUES ('CAYMAN ISLANDS','KY'); -INSERT INTO `countries` (country,code) VALUES ('CENTRAL AFRICAN REPUBLIC','CF'); -INSERT INTO `countries` (country,code) VALUES ('CHAD','TD'); -INSERT INTO `countries` (country,code) VALUES ('CHILE','CL'); -INSERT INTO `countries` (country,code) VALUES ('CHINA','CN'); -INSERT INTO `countries` (country,code) VALUES ('CHRISTMAS ISLAND','CX'); -INSERT INTO `countries` (country,code) VALUES ('COCOS (KEELING) ISLANDS','CC'); -INSERT INTO `countries` (country,code) VALUES ('COLOMBIA','CO'); -INSERT INTO `countries` (country,code) VALUES ('COMOROS','KM'); -INSERT INTO `countries` (country,code) VALUES ('CONGO','CG'); -INSERT INTO `countries` (country,code) VALUES ('CONGO, THE DEMOCRATIC REPUBLIC OF THE','CD'); -INSERT INTO `countries` (country,code) VALUES ('COOK ISLANDS','CK'); -INSERT INTO `countries` (country,code) VALUES ('COSTA RICA','CR'); -INSERT INTO `countries` (country,code) VALUES ('CÔTE D\'IVOIRE','CI'); -INSERT INTO `countries` (country,code) VALUES ('CROATIA','HR'); -INSERT INTO `countries` (country,code) VALUES ('CUBA','CU'); -INSERT INTO `countries` (country,code) VALUES ('CYPRUS','CY'); -INSERT INTO `countries` (country,code) VALUES ('CZECH REPUBLIC','CZ'); -INSERT INTO `countries` (country,code) VALUES ('DENMARK','DK'); -INSERT INTO `countries` (country,code) VALUES ('DJIBOUTI','DJ'); -INSERT INTO `countries` (country,code) VALUES ('DOMINICA','DM'); -INSERT INTO `countries` (country,code) VALUES ('DOMINICAN REPUBLIC','DO'); -INSERT INTO `countries` (country,code) VALUES ('ECUADOR','EC'); -INSERT INTO `countries` (country,code) VALUES ('EGYPT','EG'); -INSERT INTO `countries` (country,code) VALUES ('EL SALVADOR','SV'); -INSERT INTO `countries` (country,code) VALUES ('EQUATORIAL GUINEA','GQ'); -INSERT INTO `countries` (country,code) VALUES ('ERITREA','ER'); -INSERT INTO `countries` (country,code) VALUES ('ESTONIA','EE'); -INSERT INTO `countries` (country,code) VALUES ('ETHIOPIA','ET'); -INSERT INTO `countries` (country,code) VALUES ('FALKLAND ISLANDS (MALVINAS)','FK'); -INSERT INTO `countries` (country,code) VALUES ('FAROE ISLANDS','FO'); -INSERT INTO `countries` (country,code) VALUES ('FIJI','FJ'); -INSERT INTO `countries` (country,code) VALUES ('FINLAND','FI'); -INSERT INTO `countries` (country,code) VALUES ('FRANCE','FR'); -INSERT INTO `countries` (country,code) VALUES ('FRENCH GUIANA','GF'); -INSERT INTO `countries` (country,code) VALUES ('FRENCH POLYNESIA','PF'); -INSERT INTO `countries` (country,code) VALUES ('FRENCH SOUTHERN TERRITORIES','TF'); -INSERT INTO `countries` (country,code) VALUES ('GABON','GA'); -INSERT INTO `countries` (country,code) VALUES ('GAMBIA','GM'); -INSERT INTO `countries` (country,code) VALUES ('GEORGIA','GE'); -INSERT INTO `countries` (country,code) VALUES ('GERMANY','DE'); -INSERT INTO `countries` (country,code) VALUES ('GHANA','GH'); -INSERT INTO `countries` (country,code) VALUES ('GIBRALTAR','GI'); -INSERT INTO `countries` (country,code) VALUES ('GREECE','GR'); -INSERT INTO `countries` (country,code) VALUES ('GREENLAND','GL'); -INSERT INTO `countries` (country,code) VALUES ('GRENADA','GD'); -INSERT INTO `countries` (country,code) VALUES ('GUADELOUPE','GP'); -INSERT INTO `countries` (country,code) VALUES ('GUAM','GU'); -INSERT INTO `countries` (country,code) VALUES ('GUATEMALA','GT'); -INSERT INTO `countries` (country,code) VALUES ('GUERNSEY','GG'); -INSERT INTO `countries` (country,code) VALUES ('GUINEA','GN'); -INSERT INTO `countries` (country,code) VALUES ('GUINEA-BISSAU','GW'); -INSERT INTO `countries` (country,code) VALUES ('GUYANA','GY'); -INSERT INTO `countries` (country,code) VALUES ('HAITI','HT'); -INSERT INTO `countries` (country,code) VALUES ('HEARD ISLAND AND MCDONALD ISLANDS','HM'); -INSERT INTO `countries` (country,code) VALUES ('HOLY SEE (VATICAN CITY STATE)','VA'); -INSERT INTO `countries` (country,code) VALUES ('HONDURAS','HN'); -INSERT INTO `countries` (country,code) VALUES ('HONG KONG','HK'); -INSERT INTO `countries` (country,code) VALUES ('HUNGARY','HU'); -INSERT INTO `countries` (country,code) VALUES ('ICELAND','IS'); -INSERT INTO `countries` (country,code) VALUES ('INDIA','IN'); -INSERT INTO `countries` (country,code) VALUES ('INDONESIA','ID'); -INSERT INTO `countries` (country,code) VALUES ('IRAN, ISLAMIC REPUBLIC OF','IR'); -INSERT INTO `countries` (country,code) VALUES ('IRAQ','IQ'); -INSERT INTO `countries` (country,code) VALUES ('IRELAND','IE'); -INSERT INTO `countries` (country,code) VALUES ('ISLE OF MAN','IM'); -INSERT INTO `countries` (country,code) VALUES ('ISRAEL','IL'); -INSERT INTO `countries` (country,code) VALUES ('ITALY','IT'); -INSERT INTO `countries` (country,code) VALUES ('JAMAICA','JM'); -INSERT INTO `countries` (country,code) VALUES ('JAPAN','JP'); -INSERT INTO `countries` (country,code) VALUES ('JERSEY','JE'); -INSERT INTO `countries` (country,code) VALUES ('JORDAN','JO'); -INSERT INTO `countries` (country,code) VALUES ('KAZAKHSTAN','KZ'); -INSERT INTO `countries` (country,code) VALUES ('KENYA','KE'); -INSERT INTO `countries` (country,code) VALUES ('KIRIBATI','KI'); -INSERT INTO `countries` (country,code) VALUES ('KOREA, DEMOCRATIC PEOPLE\'S REPUBLIC OF','KP'); -INSERT INTO `countries` (country,code) VALUES ('KOREA, REPUBLIC OF','KR'); -INSERT INTO `countries` (country,code) VALUES ('KUWAIT','KW'); -INSERT INTO `countries` (country,code) VALUES ('KYRGYZSTAN','KG'); -INSERT INTO `countries` (country,code) VALUES ('LAO PEOPLE\'S DEMOCRATIC REPUBLIC','LA'); -INSERT INTO `countries` (country,code) VALUES ('LATVIA','LV'); -INSERT INTO `countries` (country,code) VALUES ('LEBANON','LB'); -INSERT INTO `countries` (country,code) VALUES ('LESOTHO','LS'); -INSERT INTO `countries` (country,code) VALUES ('LIBERIA','LR'); -INSERT INTO `countries` (country,code) VALUES ('LIBYAN ARAB JAMAHIRIYA','LY'); -INSERT INTO `countries` (country,code) VALUES ('LIECHTENSTEIN','LI'); -INSERT INTO `countries` (country,code) VALUES ('LITHUANIA','LT'); -INSERT INTO `countries` (country,code) VALUES ('LUXEMBOURG','LU'); -INSERT INTO `countries` (country,code) VALUES ('MACAO','MO'); -INSERT INTO `countries` (country,code) VALUES ('MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF','MK'); -INSERT INTO `countries` (country,code) VALUES ('MADAGASCAR','MG'); -INSERT INTO `countries` (country,code) VALUES ('MALAWI','MW'); -INSERT INTO `countries` (country,code) VALUES ('MALAYSIA','MY'); -INSERT INTO `countries` (country,code) VALUES ('MALDIVES','MV'); -INSERT INTO `countries` (country,code) VALUES ('MALI','ML'); -INSERT INTO `countries` (country,code) VALUES ('MALTA','MT'); -INSERT INTO `countries` (country,code) VALUES ('MARSHALL ISLANDS','MH'); -INSERT INTO `countries` (country,code) VALUES ('MARTINIQUE','MQ'); -INSERT INTO `countries` (country,code) VALUES ('MAURITANIA','MR'); -INSERT INTO `countries` (country,code) VALUES ('MAURITIUS','MU'); -INSERT INTO `countries` (country,code) VALUES ('MAYOTTE','YT'); -INSERT INTO `countries` (country,code) VALUES ('MEXICO','MX'); -INSERT INTO `countries` (country,code) VALUES ('MICRONESIA, FEDERATED STATES OF','FM'); -INSERT INTO `countries` (country,code) VALUES ('MOLDOVA, REPUBLIC OF','MD'); -INSERT INTO `countries` (country,code) VALUES ('MONACO','MC'); -INSERT INTO `countries` (country,code) VALUES ('MONGOLIA','MN'); -INSERT INTO `countries` (country,code) VALUES ('MONTENEGRO','ME'); -INSERT INTO `countries` (country,code) VALUES ('MONTSERRAT','MS'); -INSERT INTO `countries` (country,code) VALUES ('MOROCCO','MA'); -INSERT INTO `countries` (country,code) VALUES ('MOZAMBIQUE','MZ'); -INSERT INTO `countries` (country,code) VALUES ('MYANMAR','MM'); -INSERT INTO `countries` (country,code) VALUES ('NAMIBIA','NA'); -INSERT INTO `countries` (country,code) VALUES ('NAURU','NR'); -INSERT INTO `countries` (country,code) VALUES ('NEPAL','NP'); -INSERT INTO `countries` (country,code) VALUES ('NETHERLANDS','NL'); -INSERT INTO `countries` (country,code) VALUES ('NETHERLANDS ANTILLES','AN'); -INSERT INTO `countries` (country,code) VALUES ('NEW CALEDONIA','NC'); -INSERT INTO `countries` (country,code) VALUES ('NEW ZEALAND','NZ'); -INSERT INTO `countries` (country,code) VALUES ('NICARAGUA','NI'); -INSERT INTO `countries` (country,code) VALUES ('NIGER','NE'); -INSERT INTO `countries` (country,code) VALUES ('NIGERIA','NG'); -INSERT INTO `countries` (country,code) VALUES ('NIUE','NU'); -INSERT INTO `countries` (country,code) VALUES ('NORFOLK ISLAND','NF'); -INSERT INTO `countries` (country,code) VALUES ('NORTHERN MARIANA ISLANDS','MP'); -INSERT INTO `countries` (country,code) VALUES ('NORWAY','NO'); -INSERT INTO `countries` (country,code) VALUES ('OMAN','OM'); -INSERT INTO `countries` (country,code) VALUES ('PAKISTAN','PK'); -INSERT INTO `countries` (country,code) VALUES ('PALAU','PW'); -INSERT INTO `countries` (country,code) VALUES ('PALESTINIAN TERRITORY, OCCUPIED','PS'); -INSERT INTO `countries` (country,code) VALUES ('PANAMA','PA'); -INSERT INTO `countries` (country,code) VALUES ('PAPUA NEW GUINEA','PG'); -INSERT INTO `countries` (country,code) VALUES ('PARAGUAY','PY'); -INSERT INTO `countries` (country,code) VALUES ('PERU','PE'); -INSERT INTO `countries` (country,code) VALUES ('PHILIPPINES','PH'); -INSERT INTO `countries` (country,code) VALUES ('PITCAIRN','PN'); -INSERT INTO `countries` (country,code) VALUES ('POLAND','PL'); -INSERT INTO `countries` (country,code) VALUES ('PORTUGAL','PT'); -INSERT INTO `countries` (country,code) VALUES ('PUERTO RICO','PR'); -INSERT INTO `countries` (country,code) VALUES ('QATAR','QA'); -INSERT INTO `countries` (country,code) VALUES ('REUNION','RE'); -INSERT INTO `countries` (country,code) VALUES ('ROMANIA','RO'); -INSERT INTO `countries` (country,code) VALUES ('RUSSIAN FEDERATION','RU'); -INSERT INTO `countries` (country,code) VALUES ('RWANDA','RW'); -INSERT INTO `countries` (country,code) VALUES ('SAINT BARTHÉLEMY','BL'); -INSERT INTO `countries` (country,code) VALUES ('SAINT HELENA','SH'); -INSERT INTO `countries` (country,code) VALUES ('SAINT KITTS AND NEVIS','KN'); -INSERT INTO `countries` (country,code) VALUES ('SAINT LUCIA','LC'); -INSERT INTO `countries` (country,code) VALUES ('SAINT MARTIN','MF'); -INSERT INTO `countries` (country,code) VALUES ('SAINT PIERRE AND MIQUELON','PM'); -INSERT INTO `countries` (country,code) VALUES ('SAINT VINCENT AND THE GRENADINES','VC'); -INSERT INTO `countries` (country,code) VALUES ('SAMOA','WS'); -INSERT INTO `countries` (country,code) VALUES ('SAN MARINO','SM'); -INSERT INTO `countries` (country,code) VALUES ('SAO TOME AND PRINCIPE','ST'); -INSERT INTO `countries` (country,code) VALUES ('SAUDI ARABIA','SA'); -INSERT INTO `countries` (country,code) VALUES ('SENEGAL','SN'); -INSERT INTO `countries` (country,code) VALUES ('SERBIA','RS'); -INSERT INTO `countries` (country,code) VALUES ('SEYCHELLES','SC'); -INSERT INTO `countries` (country,code) VALUES ('SIERRA LEONE','SL'); -INSERT INTO `countries` (country,code) VALUES ('SINGAPORE','SG'); -INSERT INTO `countries` (country,code) VALUES ('SLOVAKIA','SK'); -INSERT INTO `countries` (country,code) VALUES ('SLOVENIA','SI'); -INSERT INTO `countries` (country,code) VALUES ('SOLOMON ISLANDS','SB'); -INSERT INTO `countries` (country,code) VALUES ('SOMALIA','SO'); -INSERT INTO `countries` (country,code) VALUES ('SOUTH AFRICA','ZA'); -INSERT INTO `countries` (country,code) VALUES ('SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS','GS'); -INSERT INTO `countries` (country,code) VALUES ('SPAIN','ES'); -INSERT INTO `countries` (country,code) VALUES ('SRI LANKA','LK'); -INSERT INTO `countries` (country,code) VALUES ('SUDAN','SD'); -INSERT INTO `countries` (country,code) VALUES ('SURINAME','SR'); -INSERT INTO `countries` (country,code) VALUES ('SVALBARD AND JAN MAYEN','SJ'); -INSERT INTO `countries` (country,code) VALUES ('SWAZILAND','SZ'); -INSERT INTO `countries` (country,code) VALUES ('SWEDEN','SE'); -INSERT INTO `countries` (country,code) VALUES ('SWITZERLAND','CH'); -INSERT INTO `countries` (country,code) VALUES ('SYRIAN ARAB REPUBLIC','SY'); -INSERT INTO `countries` (country,code) VALUES ('TAIWAN, PROVINCE OF CHINA','TW'); -INSERT INTO `countries` (country,code) VALUES ('TAJIKISTAN','TJ'); -INSERT INTO `countries` (country,code) VALUES ('TANZANIA, UNITED REPUBLIC OF','TZ'); -INSERT INTO `countries` (country,code) VALUES ('THAILAND','TH'); -INSERT INTO `countries` (country,code) VALUES ('TIMOR-LESTE','TL'); -INSERT INTO `countries` (country,code) VALUES ('TOGO','TG'); -INSERT INTO `countries` (country,code) VALUES ('TOKELAU','TK'); -INSERT INTO `countries` (country,code) VALUES ('TONGA','TO'); -INSERT INTO `countries` (country,code) VALUES ('TRINIDAD AND TOBAGO','TT'); -INSERT INTO `countries` (country,code) VALUES ('TUNISIA','TN'); -INSERT INTO `countries` (country,code) VALUES ('TURKEY','TR'); -INSERT INTO `countries` (country,code) VALUES ('TURKMENISTAN','TM'); -INSERT INTO `countries` (country,code) VALUES ('TURKS AND CAICOS ISLANDS','TC'); -INSERT INTO `countries` (country,code) VALUES ('TUVALU','TV'); -INSERT INTO `countries` (country,code) VALUES ('UGANDA','UG'); -INSERT INTO `countries` (country,code) VALUES ('UKRAINE','UA'); -INSERT INTO `countries` (country,code) VALUES ('UNITED ARAB EMIRATES','AE'); -INSERT INTO `countries` (country,code) VALUES ('UNITED KINGDOM','GB'); -INSERT INTO `countries` (country,code) VALUES ('UNITED STATES','US'); -INSERT INTO `countries` (country,code) VALUES ('UNITED STATES MINOR OUTLYING ISLANDS','UM'); -INSERT INTO `countries` (country,code) VALUES ('URUGUAY','UY'); -INSERT INTO `countries` (country,code) VALUES ('UZBEKISTAN','UZ'); -INSERT INTO `countries` (country,code) VALUES ('VANUATU','VU'); -INSERT INTO `countries` (country,code) VALUES ('VENEZUELA','VE'); -INSERT INTO `countries` (country,code) VALUES ('VIET NAM','VN'); -INSERT INTO `countries` (country,code) VALUES ('VIRGIN ISLANDS, BRITISH','VG'); -INSERT INTO `countries` (country,code) VALUES ('VIRGIN ISLANDS, U.S.','VI'); -INSERT INTO `countries` (country,code) VALUES ('WALLIS AND FUTUNA','WF'); -INSERT INTO `countries` (country,code) VALUES ('WESTERN SAHARA','EH'); -INSERT INTO `countries` (country,code) VALUES ('YEMEN','YE'); -INSERT INTO `countries` (country,code) VALUES ('ZAMBIA','ZM'); -INSERT INTO `countries` (country,code) VALUES ('ZIMBABWE','ZW'); -ALTER TABLE `provinces` DROP INDEX `code`; -ALTER TABLE `provinces` ADD `countries_code` VARCHAR( 2 ) NOT NULL ; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='ON' AND `province`='Ontario'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='NF' AND `province`='Newfoundland and Labrador'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='PE' AND `province`='Prince Edward Island'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='NS' AND `province`='Nova Scotia'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='NB' AND `province`='New Brunswick'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='QC' AND `province`='Quebec'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='MB' AND `province`='Manitoba'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='SK' AND `province`='Saskatchewan'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='AB' AND `province`='Alberta'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='BC' AND `province`='British Columbia'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='YK' AND `province`='Yukon Territory'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='NT' AND `province`='Northwest Territories'; -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='NU' AND `province`='Nunavut'; -ALTER TABLE `provinces` ADD UNIQUE (`countries_code`,`code`); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Alabama','AL','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Alaska','AK','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('American Samoa','AS','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Arizona','AZ','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Arkansas','AR','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('California','CA','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Colorado','CO','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Connecticut','CT','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Delaware','DE','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('District of Columbia','DC','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Federated States of Micronesia','FM','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Florida','FL','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Georgia','GA','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Guam','GU','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Hawaii','HI','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Idaho','ID','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Illinois','IL','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Indiana','IN','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Iowa','IA','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Kansas','KS','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Kentucky','KY','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Louisiana','LA','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Maine','ME','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Marshall Islands','MH','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Maryland','MD','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Massachusetts','MA','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Michigan','MI','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Minnesota','MN','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Mississippi','MS','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Missouri','MO','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Montana','MT','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Nebraska','NE','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Nevada','NV','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('New Hampshire','NH','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('New Jersey','NJ','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('New Mexico','NM','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('New York','NY','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('North Carolina','NC','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('North Dakota','ND','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Northern Mariana Islands','MP','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Ohio','OH','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Oklahoma','OK','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Oregon','OR','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Palau','PW','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Pennsylvania','PA','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Puerto Rico','PR','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Rhode Island','RI','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('South Carolina','SC','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('South Dakota','SD','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Tennessee','TN','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Texas','TX','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Utah','UT','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Vermont','VT','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Virgin Islands','VI','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Virginia','VA','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Washington','WA','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('West Virginia','WV','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Wisconsin','WI','US'); -INSERT INTO `provinces` (province,code,countries_code) VALUES ('Wyoming','WY','US'); -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'country', 'CA', 'Localization', 'text', '', '90', 'Country code (look up 2 letter code)', '-1'); - diff --git a/db/db.update.114.sql b/db/db.update.114.sql deleted file mode 100644 index 3c123980..00000000 --- a/db/db.update.114.sql +++ /dev/null @@ -1,24 +0,0 @@ -CREATE TABLE `users_years` ( - `id` INT NOT NULL AUTO_INCREMENT , - `users_id` INT NOT NULL , - `type` ENUM( 'student', 'judge', 'committee', 'volunteer', 'fair' ) NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) , - INDEX ( `users_id` ) -) ENGINE = MYISAM ; - -ALTER TABLE `users_committee` ADD `active` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `users_id` ; -ALTER TABLE `users_fair` ADD `active` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `users_id` ; -ALTER TABLE `users_volunteer` ADD `active` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' AFTER `users_id` ; - -CREATE TABLE `users_judge` ( - `users_id` INT NOT NULL , - `active` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no', - `years_school` TINYINT NOT NULL , - `years_regional` TINYINT NOT NULL , - `years_national` TINYINT NOT NULL , - `willing_chair` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no', - `special_award_only` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no', - PRIMARY KEY ( `users_id` ) -) ENGINE = MYISAM ; - diff --git a/db/db.update.115.sql b/db/db.update.115.sql deleted file mode 100644 index deeb0c11..00000000 --- a/db/db.update.115.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `provinces` SET `countries_code` = 'CA' WHERE `code`='QC' AND `province`='Québec'; diff --git a/db/db.update.116.php b/db/db.update.116.php deleted file mode 100644 index ebab6a87..00000000 --- a/db/db.update.116.php +++ /dev/null @@ -1,375 +0,0 @@ -prepare("UPDATE `users` SET year=? WHERE year=0"); - $q->execute([$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - - /* Fix users without a username */ - $stmt = $pdo->prepare("UPDATE `users` SET `username`=`email` WHERE `username`=''"); - $stmt->execute(); - - /* randomize usernames for any user that doesnt have a username at this point */ - $q = $pdo->prepare("SELECT id FROM `users` WHERE username=''"); - $q->execute(); - - // this is ripped from user.inc.php's generate passsword function. - // yes there's a chance of collisions, but i think highly unlikely enough that we - // dont need to worry about it. - $available = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz23456789'; - $len = strlen($available) - 1; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $username = ''; - for ($x = 0; $x < 16; $x++) - $username .= $available[rand(0, $len)]; - $stmt = $pdo->prepare("UPDATE users SET username=? WHERE id=?"); - $stmt->execute([$username,$r->id]); - } - - // okay now finally, there's a chance of duplicates from - // committee/volunteer that were in here before, so we need to merge - // them - $q = $pdo->prepare("SELECT * FROM `users` WHERE types LIKE '%committee%'"); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $orig_r = $r; - $qq = $pdo->prepare("SELECT * FROM `users` WHERE - (`username`=? OR `email`=?) - AND `id`!=?"); - $qq->execute([$r['username'],$r['email'],$r['id']]); - if ($qq->rowCount() == 0) - continue; - - echo "User id {$r['id']} ({$r['username']} {$r['email']}) has multiple users, merging...\n"; - - /* - * Now, there should only be two types, because the system is - * only supposed to let committee members and volunteers be - * created, and it has only been in use for one year without - * year stamps., but we'll handle any number - */ - - /* - * However, we will make the committee the record that sticks - */ - $delete_ids = array(); - $delete_userids = array(); - while ($rr = $qq->fetch(PDO::FETCH_ASSOC)) { - $delete_ids[] = "`id`={$rr['id']}"; - $delete_userids[] = "`users_id`={$rr['id']}"; - $keys = array_keys($rr); - foreach ($keys as $k) { - switch ($k) { - case 'id': - /* Skip */ - break; - case 'types': - /* Merge types */ - if (strstr($r['types'], $rr['types']) == false) { - $r['types'] = $r['types'] . ',' . $rr['types']; - echo " New type: {$r['types']}\n"; - } - break; - default: - /* Save data */ - if (trim($r[$k]) == '' && trim($rr[$k]) != '') { - $r[$k] = $rr[$k]; - } - break; - } - } - } - - /* Construct SQL for a SET clause */ - $set = array(); - $keys = array_keys($r); - foreach ($keys as $k) { - if ($r[$k] != $orig_r[$k]) { - $set[] = "`$k`='{$r[$k]}'"; - } - } - if (count($set)) { - $query = join(',', $set); - $stmt = $pdo->prepare("UPDATE `users` SET ? WHERE id=?"); - $stmt->execute([$query,$r['id']]); - echo "Update query: UPDATE `users` SET $query WHERE id={$r['id']}\n"; - } - - /* Join together the WHERE commands */ - $where_id = 'WHERE ' . join(' OR ', $delete_ids); - $where_users_id = 'WHERE ' . join(' OR ', $delete_userids); - - echo "Merged... Deleting duplicate and adjusting volunteer tables...\n"; - /* Delete the dupe */ - $stmt = $pdo->prepare("DELETE FROM `users` ?"); - $stmt->execute([$where_id]); - /* Update volunteer linkage */ - $stmt = $pdo->prepare("UPDATE `users_volunteer` SET `users_id`=? ?"); - $stmt->execute([$r['id'],$where_users_id]); - $stmt = $pdo->prepare("UPDATE `volunteer_positions_signup` SET `users_id`=? ?"); - $stmt->execute([$r['id'],$where_users_id]); - - echo "done with this user.\n"; - } - - /* Create volunteer database entries for any that don't exist */ - $q = $pdo->prepare("SELECT * FROM users WHERE types LIKE '%volunteer%'"); - $q->execute(); - while ($i = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO users_volunteer(`users_id`,`volunteer_active`,`volunteer_complete`) - VALUES (?,'yes',?)"); - - $stmt->execute([$i->id,$i->complete]); - } - - /* Update any remaining volunteer entries */ - $q = $pdo->prepare("SELECT * FROM users WHERE types LIKE '%volunteer%'"); - $q->execute(); - while ($i = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("UPDATE users_volunteer - SET volunteer_complete=? - WHERE users_id=?"); - $stmt->execute([$i->complete,$i->id]); - show_pdo_errors_if_any($pdo); - } - - /* Every committee member role should be activated */ - $q = $pdo->prepare("SELECT * FROM users WHERE types LIKE '%committee%'"); - $q->execute(); - while ($i = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("UPDATE users_committee - SET committee_active='yes' - WHERE users_id=?"); - $stmt->execute([$i->id]); - show_pdo_errors_if_any($pdo); - } - - /* Convert Judges */ - $map = array(); - $jtl = array(); - $jsal = array(); - - /* Select all judges, duplicate rows for each year */ - $jq = $pdo->prepare('SELECT * FROM judges - LEFT JOIN judges_years ON judges_years.judges_id=judges.id - ORDER BY year'); - $jq->execute(); - - while ($j = $jq->fetch(PDO::FETCH_OBJ)) { - if (!is_array($map[$j->id])) { - $map[$j->id] = array('uid' => ''); - } - - $u = array('id' => '', - 'uid' => $map[$j->id]['uid'], - 'types' => 'judge', - 'firstname' => $j->firstname, - 'lastname' => $j->lastname, - 'username' => $j->email, - 'email' => $j->email, - 'sex' => '', - 'password' => $j->password, - 'passwordset' => $j->lastlogin, - 'oldpassword' => '', - 'year' => $j->year, - 'phonehome' => $j->phonehome, - 'phonework' => $j->phonework . ($j->phoneworkext == '') ? '' : " x{$j->phoneworkext}", - 'phonecell' => $j->phonecell, - 'fax' => '', - 'organization' => $j->organization, - 'lang' => '', /* FIXME, or unused for judges?, this is preferred communication language, not judging languages */ - 'created' => $j->created, - 'lastlogin' => $j->lastlogin, - 'address' => $j->address, - 'address2' => $j->address2, - 'city' => $j->city, - 'province' => $j->province, - 'postalcode' => $j->postalcode, - 'firstaid' => 'no', - 'cpr' => 'no', - 'deleted' => $j->deleted, - 'deleteddatetime' => $j->deleteddatetime); - - $updateexclude = array('id', 'uid', 'types', 'username', 'password', 'passwordset', 'oldpassword', 'year', 'created', 'lastlogin', 'firstaid', 'cpr', 'deleted', 'deleteddatetime'); - - // check if a user already exists with this username - $uq = $pdo->prepare("SELECT * FROM users WHERE (username? OR email=?) AND year=?"); - $uq->execute([$j->email,$j->email,$j->year]); - if ($j->email && $ur = $uq->fetch(PDO::FETCH_OBJ)) { - $id = $ur->id; - echo "Using existing users.id=$id for judges.id=$j->id because email address/year ($j->email/$j->year) matches\n"; - - $sqlset = ''; - foreach ($u AS $f => $v) { - if (!$ur->$f && $j->$f && !in_array($f, $updateexclude)) { - $sqlset .= "`$f`='" . $j->$f . "', "; - } - } - $sql = "UPDATE users SET ? `types`=?,judge',`username`=? WHERE id=?"; - $stmt = $pdo->prepare($sql); - $stmt->execute([$sqlset,$ur->types,$j->email,$id]); - show_pdo_errors_if_any($pdo); - echo " Updated user record with judge info, but only merged:\n"; - echo " ($sqlset)\n"; - } else { - /* Insert the judge */ - $fields = '`' . join('`,`', array_keys($u)) . '`'; - $vals = "'" . join("','", array_values($u)) . "'"; - $q = $pdo->prepare("INSERT INTO users (?) VALUES (?)"); - $q->execute([$fields,$vals]); - $id = $pdo->lastInsertId(); - - if ($map[$j->id]['uid'] == '') { - $map[$j->id]['uid'] = $id; - $q = $pdo->prepare("UPDATE users SET `uid`=? WHERE id=?"); - $q->execute([$id,$id]); - } - } - - $uj = array( - 'users_id' => "$id", - 'judge_active' => 'yes', - 'highest_psd' => $j->highest_psd, - 'special_award_only' => ($j->typepref == 'speconly') ? 'yes' : 'no', - 'expertise_other' => (($j->professional_quals != '') ? ($j->professional_quals . "\n") : '') - . $j->expertise_other, - /* These need to get pulled from the questions */ - 'years_school' => $j->years_school, - 'years_regional' => $j->years_regional, - 'years_national' => $j->years_national, - 'willing_chair' => $j->willing_chair, - 'judge_complete' => $j->complete, - ); - // $j->attending_lunch, - - /* catprefs */ - $q = $pdo->prepare("SELECT * FROM judges_catpref WHERE judges_id=? AND year=?"); - $q->execute([$j->id,$j->year]); - $catpref = array(); - while ($i = $q->fetch(PDO::FETCH_OBJ)) { - $catpref[$i->projectcategories_id] = $i->rank; - } - - $uj['cat_prefs'] = serialize($catpref); - - /* divprefs and subdivision prefs */ - $q = $pdo->prepare("SELECT * FROM judges_expertise WHERE judges_id=? AND year=?"); - $q->execute([$j->id,$j->year]); - $divpref = array(); - $divsubpref = array(); - while ($i = $q->fetch(PDO::FETCH_OBJ)) { - if ($i->projectdivisions_id) - $divpref[$i->projectdivisions_id] = $i->val; - else if ($i->projectsubdivisions_id) - $divsubpref[$i->projectsubdivisions_id] = $i->val; - } - $uj['div_prefs'] = serialize($divpref); - $uj['divsub_prefs'] = serialize($divsubpref); - - /* languages */ - $q = $pdo->prepare("SELECT * FROM judges_languages WHERE judges_id=?"); - $q->execute([$j->id]); - $langs = array(); - - while ($i = $q->fetch(PDO::FETCH_OBJ)) { - $langs[] = $i->languages_lang; - } - - $uj['languages'] = serialize($langs); - - /* - * Map judges questions back to the profile. We're going to keep questions we need for - * judge scheduling as hard-coded questions so users can't erase them. - * "Years School" "Years Regional" "Years National" "Willing Chair" - */ - $qmap = array('years_school' => 'Years School', - 'years_regional' => 'Years Regional', - 'years_national' => 'Years National', - 'willing_chair' => 'Willing Chair'); - foreach ($qmap as $field => $head) { - /* Find the question ID */ - $q = $pdo->prepare("SELECT id FROM questions WHERE year=? AND db_heading=?"); - $q->execute([$j->year,$head]); - if ($q->rowCount() == 0) { - echo "Warning: Question '$head' for judge {$j->id} doesn't exist in year '{$j->year}', cannot copy answer.\n"; - continue; - } - - $i = $q->fetch(PDO::FETCH_OBJ); - - /* Now find the answer */ - $q = $pdo->prepare("SELECT * FROM question_answers WHERE - year=? AND - registrations_id=? AND - questions_id=?"); - $q->execute([$j->year,$j->id,$i->id]); - show_pdo_errors_if_any($pdo); - if ($q->rowCount() == 0) { - echo "Warning: Judge {$j->id} did not answer question '$head' in year '{$j->year}', cannot copy answer.\n"; - continue; - } - $i = $q->fetch(PDO::FETCH_ASSOC); - $uj[$field] = $i['answer']; - } - - // print_r($uj); - - $fields = '`' . join('`,`', array_keys($uj)) . '`'; - $vals = "'" . join("','", array_values($uj)) . "'"; - $q = $pdo->prepare("INSERT INTO users_judge (?) VALUES (?)"); - $q->execute([$fields,$vals]); - show_pdo_errors_if_any($pdo); - - /* - * FIXUP all the judging tables (but don't write back yet, we don't want to - * accidentally create a duplicate judges_id and overwrite it later) - */ - - /* judges_teams_link */ - $q = $pdo->prepare("SELECT * FROM judges_teams_link WHERE judges_id=? AND year=?"); - - $q->execute([$j->id,$j->year]); - while ($i = $q->fetch(PDO::FETCH_OBJ)) - $jtl[$i->id] = $id; - - /* judges_specialawards_sel */ - $q = $pdo->prepare("SELECT * FROM judges_specialaward_sel WHERE judges_id=? AND year=?"); - - $q->execute([$j->id,$j->year]); - show_pdo_errors_if_any($pdo); - while ($i = $q->fetch(PDO::FETCH_OBJ)) - $jsal[$i->id] = $id; - - /* question_answers */ - $q = $pdo->prepare("SELECT * FROM question_answers WHERE registrations_id=? AND year=?"); - - $q->execute([$j->id,$j->year]); - show_pdo_errors_if_any($pdo); - while ($i = $q->fetch(PDO::FETCH_OBJ)) - $qa[$i->id] = $id; - } - - /* Now write back the judge ids */ - if (count($jtl)) { - foreach ($jtl as $id => $new_id) - $q = $pdo->prepare("UPDATE judges_teams_link SET judges_id=? WHERE id=? "); - - $q->execute([$new_id,$id]); - } - if (count($jsal)) { - foreach ($jsal as $id => $new_id) - $q = $pdo->prepare("UPDATE judges_specialaward_sel SET judges_id=? WHERE id=? "); - - $q->execute([$new_id,$id]); - } - if (count($qa)) { - foreach ($qa as $id => $new_id) - $q = $pdo->prepare("UPDATE question_answers SET registrations_id=? WHERE id=? "); - - $q->execute([$new_id,$id]); - } -} -?> diff --git a/db/db.update.116.sql b/db/db.update.116.sql deleted file mode 100644 index f87e1a91..00000000 --- a/db/db.update.116.sql +++ /dev/null @@ -1,40 +0,0 @@ - -ALTER TABLE `users` ADD `uid` INT NOT NULL AFTER `id` ; -ALTER TABLE `users` CHANGE `sex` `sex` ENUM( 'male', 'female' ) NULL DEFAULT NULL ; - -ALTER TABLE `users_committee` CHANGE `active` `committee_active` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no'; -ALTER TABLE `users_committee` ADD `committee_complete` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no' AFTER `committee_active` ; - -ALTER TABLE `users_fair` CHANGE `active` `fair_active` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no'; -ALTER TABLE `users_fair` ADD `fair_complete` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no' AFTER `fair_active` ; - -ALTER TABLE `users_judge` CHANGE `active` `judge_active` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no'; -ALTER TABLE `users_judge` ADD `judge_complete` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no' AFTER `judge_active` ; -ALTER TABLE `users_judge` ADD `cat_prefs` TINYTEXT NOT NULL AFTER `special_award_only` ; -ALTER TABLE `users_judge` ADD `div_prefs` TINYTEXT NOT NULL AFTER `cat_prefs` ; -ALTER TABLE `users_judge` ADD `divsub_prefs` TINYTEXT NOT NULL AFTER `div_prefs` ; -ALTER TABLE `users_judge` ADD `languages` TINYTEXT NOT NULL AFTER `divsub_prefs` ; -ALTER TABLE `users_judge` ADD `highest_psd` TINYTEXT NOT NULL AFTER `languages` ; -ALTER TABLE `users_judge` ADD `expertise_other` TINYTEXT NOT NULL AFTER `highest_psd` ; - -ALTER TABLE `users_volunteer` CHANGE `active` `volunteer_active` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no'; -ALTER TABLE `users_volunteer` ADD `volunteer_complete` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no' AFTER `volunteer_active` ; -ALTER TABLE `users_volunteer` DROP `tmp`; - -DROP TABLE users_years; - --- Add new judge emails, delete old -INSERT INTO `emails` ( `id` , `val` , `name` , `description` , `from` , `subject` , `body` , `type` ) VALUES - ('', 'judge_recover_password', 'Judges - Recover Password', 'Recover the password for a judge if they submit a ''forgot password'' request', '', 'Password Recovery for [FAIRNAME]', 'We have received a request for the recovery of your password from this email address. Please find your new password below:\n\nJudge Email Address: [EMAIL]\nJudge Password: [PASSWORD] ', 'system'), - ('', 'judge_welcome', 'Judges - Welcome', 'Welcome email sent to a judge after they have registered for the first time. This email includes their temporary password.', '', 'Judge Registration for [FAIRNAME]', 'Thank you for registering as a judge at our fair. Please find your temporary password below. After logging in for the first time you will be prompted to change your password.\n\nJudge Email Address: [EMAIL]\nJudge Password: [PASSWORD]', 'system'), - ('', 'judge_new_invite', 'Judges - New Judge Invitation', 'This is sent to a new judge when they are invited using the invite users administration option.', '', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\n\nEmail Address: [EMAIL]\nPassword: [PASSWORD]\nYou can change your password once you login.', 'system'), - ('', 'judge_add_invite', 'Judges - Add Judge Invitation', 'This is sent to existing users when they are invited using the invite users administration option.', '', 'Judge Registration for [FAIRNAME]', 'The role of judge for the [FAIRNAME] has been added to your account by a committee member. When you login again, there will be a [Switch Roles] link in the upper right hand area of the page. Clicking on [Switch Roles] will let you switch between being a Judge and your other roles without needing to logout.\n', 'system'), - ('', 'judge_activate_reminder', 'Judges - Activation Reminder', 'This is sent to existing judges who have not yet activated their account for the current fair year.', '', 'Judge Registration for [FAIRNAME]', 'This message is to let you know that Judge registration for the [FAIRNAME] is now open. If you would like to participate in the fair this year please log in to the registration site using your email address ([EMAIL]) an\n', 'system'), - ('', 'volunteer_activate_reminder', 'Volunteer Registration - Activation Reminder', 'This is sent to existing volunteers who have not yet activated their account for the current fair year.', '', 'Volunteer Registration for [FAIRNAME]', 'This message is to let you know that Volunteer registration for the [FAIRNAME] is now open. If you would like to participate in the fair this year please log in to the registration site using your email address ([EMAIL]).\n', 'system'); - -DELETE FROM `emails` WHERE `val`='new_judge_invite'; -DELETE FROM `emails` WHERE `val`='register_judges_resend_password'; - --- Fix the names of these emails -UPDATE `emails` SET `name` = 'Volunteers - New Volunteer Invitation' WHERE `val`='volunteer_new_invite'; -UPDATE `emails` SET `name` = 'Volunteers - Add Volunteer Invitation' WHERE `val`='volunteer_add_invite'; diff --git a/db/db.update.117.php b/db/db.update.117.php deleted file mode 100644 index 805c9dd8..00000000 --- a/db/db.update.117.php +++ /dev/null @@ -1,28 +0,0 @@ - 'Years School', - 'years_regional' => 'Years Regional', - 'years_national' => 'Years National', - 'willing_chair' => 'Willing Chair'); - - foreach ($qmap as $field => $head) { - $q = $pdo->prepare("SELECT id FROM questions WHERE db_heading=?"); - $q->execute([$head]); - while ($i = $q->fetch(PDO::FETCH_OBJ)) { - $id = $i->id; - - /* Drop all answers for this question */ - $stmt = $pdo->prepare("DELETE FROM question_answers - WHERE questions_id=?"); - $stmt->execute([$id]); - } - - /* Now dump the question itself */ - $stmt = $pdo->prepare("DELETE FROM questions - WHERE id=?"); - $stmt->execute([$id]); - } -} diff --git a/db/db.update.117.sql b/db/db.update.117.sql deleted file mode 100644 index 10681791..00000000 --- a/db/db.update.117.sql +++ /dev/null @@ -1,21 +0,0 @@ --- complete has been moved inside each users_* table -ALTER TABLE `users` DROP `complete`; - --- drop the old judge tables, all this info is now in the new user system (converted in the 116 update) -DROP TABLE `judges`,`judges_catpref`,`judges_expertise`,`judges_languages`,`judges_years` ; - --- questions table should use users_id now (which is what was being saved in the registrations_id) -ALTER TABLE `question_answers` CHANGE `registrations_id` `users_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'; - --- The answer has been linked to a users_id that is unique per-year, so we don't need to duplicate the year storage -ALTER TABLE `question_answers` DROP `year`; - --- Use users_id instead of judges_id now, the judges_id was converted to the proper users_id in the 116 update -ALTER TABLE `judges_specialaward_sel` CHANGE `judges_id` `users_id` INT( 11 ) NOT NULL DEFAULT '0'; -ALTER TABLE `judges_teams_link` CHANGE `judges_id` `users_id` INT( 11 ) NOT NULL DEFAULT '0' ; - --- The users_id is linked with the year, don't need to store it here too -ALTER TABLE `judges_specialaward_sel` DROP `year`; - -ALTER TABLE users ADD UNIQUE (username,year); - diff --git a/db/db.update.118.php b/db/db.update.118.php deleted file mode 100644 index 66c616bf..00000000 --- a/db/db.update.118.php +++ /dev/null @@ -1,92 +0,0 @@ -prepare('SELECT * FROM award_contacts'); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - // if its older than the current year, then set them to complete/active because if they were in the - // system then, then they must have beenc omplete and active - // set anyone for the current fair year to complete=no, active = yes, because its not too late to get them - // to login and make sure that all the info is complete - if ($r->year < $config['FAIRYEAR']) { - $complete = 'yes'; - $active = 'yes'; - } else { - $complete = 'no'; - $active = 'yes'; - } - // see if a user exists with this email - $uq = $pdo->prepare("SELECT * FROM users WHERE (username=? OR email=?) ORDER BY year DESC LIMIT 1"); // AND year='$r->year'"); - $uq->execute([ $r->email,$r->email]); - if ($r->email && $ur = $uq->fetch(PDO::FETCH_OBJ)) { - $user_id = $ur->id; - echo "Using existing users.id=$user_id for award_contacts.id=$r->id because email address ($r->email) matches\n"; - - // update any info we have thats missing - $sqlset = ''; - foreach ($userfields AS $f) { - // if its NOT in their USER record, but it IS in their AWARD_CONTACTS record, then bring it over, else, assume the users record has priority - if (!$ur->$f && $r->$f) { - $sqlset .= "`$f`='" . $r->$f . "', "; - } - } - $sql = "UPDATE users SET ? `types`=?,sponsor' WHERE id=?"; - $stmt = $pdo->prepare($sql); - $stmt->execute([$sqlset,$ur->types,$user_id]); - show_pdo_errors_if_any($pdo); - echo " Updated user record\n"; - } else { - // we need a username, if htere's no email, then we need to gerneate one to use. - if ($r->email) { - $username = $r->email; - } else { - $username = ''; - for ($x = 0; $x < 16; $x++) - $username .= $available[rand(0, $availlen)]; - } - - // and create them a password - $password = ''; - for ($x = 0; $x < 8; $x++) - $password .= $available[rand(0, $availlen)]; - - // set passwordset to 0000-00-00 to force it to expire on next login - $sql = 'INSERT INTO users (`types`,`username`,`created`,`password`,`passwordset`,`' . implode('`,`,?') . '`,`year`) VALUES ('; - $sql .= "'sponsor',?,NOW(),?,'0000-00-00'"; - foreach ($userfields AS $f) { - $sql .= ",'" . $r->$f . "'"; - } - $sql .= ",'" . $r->year . "')"; - $stmt = $pdo->prepare($sql); - $stmt->execute([$userfields,$username,$password]); - show_pdo_errors_if_any($pdo); - - $user_id = $pdo->lastInsertId(); - // and link it to themselves as a starting record - $stmt = $pdo->prepare("UPDATE users SET uid=? WHERE id=?"); - $stmt->execute([$user_id,$user_id]); - echo "Creating new users.id=$user_id for award_contacts.id=$r->id\n"; - } - - echo " Linking $user_id to users_sponsor record\n"; - $stmt = $pdo->prepare("INSERT INTO users_sponsor (`users_id`,`sponsors_id`,`sponsor_complete`,`sponsor_active`,`primary`,`position`,`notes`) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?, - ?)"); - $stmt->execute([$user_id,$r->award_sponsors_id,$complete,$active,$r->primary,$r->position,$r->notes]); - show_pdo_errors_if_any($pdo); - } -} - -?> diff --git a/db/db.update.118.sql b/db/db.update.118.sql deleted file mode 100644 index d310509a..00000000 --- a/db/db.update.118.sql +++ /dev/null @@ -1,29 +0,0 @@ -CREATE TABLE `users_sponsor` ( - `users_id` int(11) NOT NULL default '0', - `sponsors_id` int(11) NOT NULL default '0', - `sponsor_complete` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no', - `sponsor_active` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no', - `primary` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no', - `position` VARCHAR(64) NOT NULL default '', - `notes` text NOT NULL, - PRIMARY KEY (`users_id`) -) TYPE=MyISAM; - -ALTER TABLE `users` CHANGE `types` `types` SET( 'student', 'judge', 'committee', 'volunteer', 'fair', 'sponsor' ) NOT NULL ; -ALTER TABLE `users` ADD `salutation` VARCHAR( 8 ) NOT NULL AFTER `types` ; - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) -VALUES ( -'sponsor_personal_fields', 'phonecell,phonework,fax,org', -'Sponsors', 'multisel', -'salutation=Salutation|sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province', -'500', 'Personal Information to ask for on the Sponsor Contact profile page (in addition to Name and Email)', '-1'); - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) -VALUES ( -'sponsor_personal_required', '', -'Sponsors', 'multisel', -'salutation=Salutation|sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province', -'600', 'Required Personal Information on the Sponsor Contact profile page (Name and Email is always required)', '-1'); - - diff --git a/db/db.update.119.sql b/db/db.update.119.sql deleted file mode 100644 index d280f99a..00000000 --- a/db/db.update.119.sql +++ /dev/null @@ -1,65 +0,0 @@ -DROP TABLE award_contacts; - -CREATE TABLE `fundraising` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `type` VARCHAR( 32 ) NOT NULL , - `name` VARCHAR( 128 ) NOT NULL , - `description` TEXT NULL DEFAULT NULL , - `system` ENUM( 'no', 'yes' ) DEFAULT 'no' NOT NULL , - `goal` INT UNSIGNED NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - -ALTER TABLE `fundraising` ADD UNIQUE (type,year); -INSERT INTO `fundraising` ( `id` , `type` , `name` , `description`, `system` , `goal` , `year` ) VALUES ( '', 'general', 'General Funds', 'General funds donated to the fair may be allocated as the fair organizers see fit','yes', '0', '-1'); -INSERT INTO `fundraising` ( `id` , `type` , `name` , `description`, `system` , `goal` , `year` ) VALUES ( '', 'awards', 'Award Sponsorships', 'Award Sponsorships are provided to allow an organization to sponsor a specific award that is given out at the fair', 'yes', '0', '-1'); - -ALTER TABLE `award_sponsors` RENAME `sponsors` ; -ALTER TABLE `sponsors` DROP `confirmed`; -ALTER TABLE `sponsors` ADD `tollfree` VARCHAR( 32 ) NOT NULL AFTER `phone` ; -ALTER TABLE `sponsors` ADD `website` VARCHAR( 128 ) NOT NULL AFTER `email` ; -ALTER TABLE `sponsors` ADD `donationpolicyurl` VARCHAR( 255 ) NOT NULL AFTER `notes` ; -ALTER TABLE `sponsors` ADD `fundingselectiondate` DATE NULL DEFAULT NULL AFTER `donationpolicyurl` ; -ALTER TABLE `sponsors` ADD `logo` VARCHAR (128 ) NULL DEFAULT NULL AFTER `fundingselectiondate` ; -ALTER TABLE `sponsors` ADD `waiveraccepted` ENUM ( 'no' , 'yes' ) DEFAULT 'no' NOT NULL AFTER `logo`; -ALTER TABLE `sponsors` ADD `taxreceiptrequired` ENUM ( 'no' , 'yes' ) DEFAULT 'no' NOT NULL AFTER `waiveraccepted`; - -ALTER TABLE `award_awards` CHANGE `award_sponsors_id` `sponsors_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'; - -CREATE TABLE `sponsors_logs` ( - `id` INT NOT NULL AUTO_INCREMENT , - `sponsors_id` INT NOT NULL , - `dt` DATETIME NOT NULL , - `users_id` INT NOT NULL , - `log` TEXT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - - -CREATE TABLE `sponsorships` ( - `id` INT NOT NULL AUTO_INCREMENT , - `sponsors_id` INT NOT NULL , - `fundraising_type` VARCHAR( 32 ) NOT NULL , - `value` INT NOT NULL , - `status` ENUM( 'pending', 'confirmed', 'received' ) NOT NULL , - `probability` INT NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - -CREATE TABLE `sponsorships_levels` ( - `id` INT NOT NULL AUTO_INCREMENT , - `level` VARCHAR( 64 ) NOT NULL , - `min` INT NOT NULL , - `max` INT NOT NULL , - `description` TEXT NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - -INSERT INTO sponsorships_levels (`level`,`min`,`max`,`year`) VALUES ('Bronze','100','499',-1); -INSERT INTO sponsorships_levels (`level`,`min`,`max`,`year`) VALUES ('Silver','500','999',-1); -INSERT INTO sponsorships_levels (`level`,`min`,`max`,`year`) VALUES ('Gold','1000','10000',-1); - - diff --git a/db/db.update.12.sql b/db/db.update.12.sql deleted file mode 100644 index b6cbd09e..00000000 --- a/db/db.update.12.sql +++ /dev/null @@ -1,4 +0,0 @@ -UPDATE `config` SET `description` = 'Self nominations for special awards are due either with registration or on a specific date. If "date" is used, it must be configured under "Important Dates" section. If you do not wish to allow students to self-nominate for special awards, set to "none" (none|date|registration)' WHERE `var` = 'specialawardnomination'; -ALTER TABLE `schools` ADD `projectlimit` INT NOT NULL , ADD `projectlimitper` ENUM( 'total', 'agecategory' ) NOT NULL ; -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_student_tshirt', 'yes', 'Ask for students their T-Shirt size (yes/no).', '-1'); -ALTER TABLE `translations` ADD `argsdesc` TEXT DEFAULT NULL ; diff --git a/db/db.update.120.sql b/db/db.update.120.sql deleted file mode 100644 index e8f3ddaf..00000000 --- a/db/db.update.120.sql +++ /dev/null @@ -1,3 +0,0 @@ --- This wasn't done in the 116 update -UPDATE users SET `uid`=`id` WHERE `uid`=0; - diff --git a/db/db.update.121.sql b/db/db.update.121.sql deleted file mode 100644 index a2925353..00000000 --- a/db/db.update.121.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `committees_link` CHANGE `users_id` `users_uid` INT( 11 ) NOT NULL DEFAULT '0' ; - diff --git a/db/db.update.122.php b/db/db.update.122.php deleted file mode 100644 index b693f010..00000000 --- a/db/db.update.122.php +++ /dev/null @@ -1,48 +0,0 @@ -prepare("SELECT * FROM judges_timeslots WHERE year=?"); - $q->execute([$year]); - $round = array(); - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $type = $r['type']; - - if (!array_key_exists($type, $round)) { - $round[$type]['starttime'] = $r['starttime']; - $round[$type]['endtime'] = $r['endtime']; - $round[$type]['date'] = $r['date']; - } - - if ($r['starttime'] < $round[$type]['starttime']) { - $round[$type]['starttime'] = $r['starttime']; - } - - if ($r['endtime'] > $round[$type]['endtime']) { - $round[$type]['endtime'] = $r['endtime']; - } - } - - foreach ($round as $type => $d) { - $stmt = $pdo->prepare("INSERT INTO judges_timeslots (round_id,type,date,starttime,endtime,year) - VALUES ('0',?,?,?,?,?)"); - $stmt->execute([$type,$d['date'],$d['starttime'],$d['endtime'],$year]); - $round_id = $pdo->lastInsertId(); - - $stmt = $pdo->prepare("UPDATE judges_timeslots SET - round_id=?, type='timeslot' - - WHERE type=? AND year=?"); - $stmt->execute([$round_id,$type,$year]); - /* Undo the set we just did to the round we just inserted */ - $stmt = $pdo->prepare("UPDATE judges_timeslots SET - round_id='0',type=? - - WHERE id=?"); - $stmt->execute([$type,$round_id]); - } -} - -?> diff --git a/db/db.update.122.sql b/db/db.update.122.sql deleted file mode 100644 index e90733b2..00000000 --- a/db/db.update.122.sql +++ /dev/null @@ -1,10 +0,0 @@ -ALTER TABLE `judges_timeslots` ADD `round_id` INT NOT NULL AFTER `id` ; -ALTER TABLE `judges_timeslots` ADD `name` TINYTEXT NOT NULL AFTER `endtime` ; -ALTER TABLE `judges_timeslots` ADD `type` ENUM( 'timeslot','divisional1', 'divisional2', 'grand', 'special' ) NOT NULL AFTER `round_id` ; - -UPDATE `judges_timeslots` SET `type`='divisional1' WHERE allowdivisional='yes'; -UPDATE `judges_timeslots` SET `type`='special' WHERE allowdivisional='no'; - -ALTER TABLE `judges_timeslots` DROP `allowdivisional` ; - - diff --git a/db/db.update.123.sql b/db/db.update.123.sql deleted file mode 100644 index 8f042ef0..00000000 --- a/db/db.update.123.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `config` CHANGE `type` `type` ENUM( '', 'yesno', 'number', 'text', 'enum', 'multisel', 'language' ) NOT NULL ; - -UPDATE config SET `type`='language' WHERE `var`='default_language'; diff --git a/db/db.update.124.sql b/db/db.update.124.sql deleted file mode 100644 index 9cb76c07..00000000 --- a/db/db.update.124.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE `judges_availability` ( - `id` INT NOT NULL AUTO_INCREMENT , - `users_id` INT NOT NULL , - `date` DATE NOT NULL , - `start` TIME NOT NULL , - `end` TIME NOT NULL , - PRIMARY KEY ( `id` ) -) ENGINE = MYISAM ; - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) -VALUES ( 'judges_availability_enable', 'no', 'Judge Registration', 'yesno', '', '950', 'Allow judges to specify their time availability on the fair day based on the defined judging rounds/timeslots. The scheduler will then use this judge availability data when assigning judges to teams and projects.', '-1'); diff --git a/db/db.update.125.sql b/db/db.update.125.sql deleted file mode 100644 index dfe84744..00000000 --- a/db/db.update.125.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE `fairs`; -ALTER TABLE `users_fair` CHANGE `fairs_id` `fair_name` TINYTEXT NOT NULL; -ALTER TABLE `users_fair` ADD `fair_abbrv` VARCHAR( 16 ) NOT NULL AFTER `fair_name` ; - - - diff --git a/db/db.update.126.sql b/db/db.update.126.sql deleted file mode 100644 index 2dfffa2c..00000000 --- a/db/db.update.126.sql +++ /dev/null @@ -1,71 +0,0 @@ -CREATE TABLE `fairs_stats` ( - `id` int(11) NOT NULL auto_increment, - `users_uid` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `start_date` date NOT NULL default '0000-00-00', - `end_date` date NOT NULL default '0000-00-00', - `address` text NOT NULL, - `budget` float NOT NULL default '0', - `ysf_affiliation_complete` enum('Y','N') NOT NULL default 'Y', - `charity` tinytext NOT NULL, - `male_1` int(11) NOT NULL default '0', - `male_4` int(11) NOT NULL default '0', - `male_7` int(11) NOT NULL default '0', - `male_9` int(11) NOT NULL default '0', - `male_11` int(11) NOT NULL default '0', - `female_1` int(11) NOT NULL default '0', - `female_4` int(11) NOT NULL default '0', - `female_7` int(11) NOT NULL default '0', - `female_9` int(11) NOT NULL default '0', - `female_11` int(11) NOT NULL default '0', - `projects_1` int(11) NOT NULL default '0', - `projects_4` int(11) NOT NULL default '0', - `projects_7` int(11) NOT NULL default '0', - `projects_9` int(11) NOT NULL default '0', - `projects_11` int(11) NOT NULL default '0', - `publicschools` int(11) NOT NULL default '0', - `privateschools` int(11) NOT NULL default '0', - `schooldistricts` int(11) NOT NULL default '0', - `studentsvisiting` int(11) NOT NULL default '0', - `publicvisiting` int(11) NOT NULL default '0', - `firstnations` int(11) NOT NULL default '0', - `innercity` int(11) NOT NULL default '0', - `teacherssupporting` int(11) NOT NULL default '0', - `increasedinterest` int(11) NOT NULL default '0', - `consideringcareer` int(11) NOT NULL default '0', - `next_chair_name` varchar(128) NOT NULL default '', - `next_chairemail` varchar(64) NOT NULL default '', - `next_chair_hphone` varchar(32) NOT NULL default '', - `next_chair_bphone` varchar(32) NOT NULL default '', - `next_chair_fax` varchar(32) NOT NULL default '', - `scholarships` text NOT NULL, - `delegate1` varchar(64) NOT NULL default '', - `delegate2` varchar(64) NOT NULL default '', - `delegate3` varchar(64) NOT NULL default '', - `delegate4` varchar(64) NOT NULL default '', - `delegate1_email` tinytext NOT NULL, - `delegate2_email` tinytext NOT NULL, - `delegate3_email` tinytext NOT NULL, - `delegate4_email` tinytext NOT NULL, - `delegate1_size` enum('small','medium','large','xlarge') NOT NULL default 'small', - `delegate2_size` enum('small','medium','large','xlarge') NOT NULL default 'small', - `delegate3_size` enum('small','medium','large','xlarge') NOT NULL default 'small', - `delegate4_size` enum('small','medium','large','xlarge') NOT NULL default 'small', - PRIMARY KEY (`id`) -) TYPE=MyISAM ; - -ALTER TABLE `schools` ADD `atrisk` ENUM( 'no', 'yes' ) NOT NULL default 'no'; - --- Update the designate into '', public, indpendent, and home, more useful for --- SFIAB. This pre-conversions are for everyone in BC who imported the science --- world school list -UPDATE schools SET designate='public' WHERE designate='Standard'; -UPDATE schools SET designate='independent' WHERE designate='Independent'; -UPDATE schools SET designate='public' WHERE designate='Alternate'; -UPDATE schools SET designate='public' WHERE designate='PRP'; -UPDATE schools SET designate='public' WHERE designate='Continuing Education'; -UPDATE schools SET designate='public' WHERE designate='Youth Containment Ctr'; -UPDATE schools SET designate='home' WHERE designate='Distributed Learning'; -UPDATE schools SET designate='independent' WHERE designate='Offshore'; -ALTER TABLE `schools` CHANGE `designate` `designate` ENUM( '', 'public', 'independent', 'home' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ; - diff --git a/db/db.update.127.sql b/db/db.update.127.sql deleted file mode 100644 index 23b562f8..00000000 --- a/db/db.update.127.sql +++ /dev/null @@ -1,36 +0,0 @@ -INSERT INTO `config` (`var`, `val`, `category`, `type`, `type_values`, `ord`, `description`, `year`) VALUES -('fair_stats_participation', 'yes', 'Science Fairs', 'yesno', '', 100, 'Gather Stats: Student and School Participation (students, gender, and projects) by age group.', -1), -('fair_stats_schools_ext', 'yes', 'Science Fairs', 'yesno', '', 200, 'Gather Stats: Extended school participation data.
      \r\n
    • Number of at-risk schools and students
    • Number of public schools and students
    • Number of private/independent schools and students
    ', -1), -('fair_stats_minorities', 'firstnations', 'Science Fairs', 'multisel', 'firstnations=Number of First Nation students|disabled=Number of Disabled students', 300, 'Gather Stats: Participant minority demographics (must be filled in manually by the fair)', -1), -('fair_stats_guests', 'yes', 'Science Fairs', 'yesno', '', 400, 'Gather Stats: Number of student and public guests (must be filled in manually by the fair)', -1), -('fair_stats_sffbc_misc', 'yes', 'Science Fairs', 'yesno', '', '500', 'Gather Stats: Misc. SFFBC Data
    • Supporting teachers
    • Students with increased interest in sci and tech
    • Students considering a career in science
    ', '-1'); - -ALTER TABLE `fairs_stats` CHANGE `publicschools` `schools_public` INT( 11 ) NOT NULL DEFAULT '0', - CHANGE `privateschools` `schools_private` INT( 11 ) NOT NULL DEFAULT '0'; -ALTER TABLE `fairs_stats` ADD `students_public` INT NOT NULL AFTER `projects_11` ; -ALTER TABLE `fairs_stats` ADD `students_private` INT NOT NULL AFTER `schools_public` ; -ALTER TABLE `fairs_stats` CHANGE `users_uid` `fairs_id` INT( 11 ) NOT NULL DEFAULT '0'; -ALTER TABLE `fairs_stats` ADD `students_total` INT NOT NULL AFTER `projects_11` , - ADD `schools_total` INT NOT NULL AFTER `students_total` ; -ALTER TABLE `fairs_stats` CHANGE `innercity` `students_atrisk` INT( 11 ) NOT NULL DEFAULT '0'; -ALTER TABLE `fairs_stats` ADD `schools_atrisk` INT NOT NULL AFTER `students_atrisk` ; -ALTER TABLE `fairs_stats` ADD `schools_active` INT NOT NULL AFTER `schools_total` ; -ALTER TABLE `fairs_stats` ADD `committee_members` INT NOT NULL AFTER `consideringcareer` , - ADD `judges` INT NOT NULL AFTER `committee_members` ; -ALTER TABLE `fairs_stats` CHANGE `schooldistricts` `schools_districts` INT( 11 ) NOT NULL DEFAULT '0'; - -CREATE TABLE `fairs` ( - `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , - `name` TINYTEXT NOT NULL , - `abbrv` VARCHAR( 16 ) NOT NULL , - `type` ENUM( 'feeder', 'sfiab', 'ysf' ) NOT NULL , - `url` TINYTEXT NOT NULL , - `username` varchar( 32 ) NOT NULL , - `password` varchar( 32 ) NOT NULL -) ENGINE = MYISAM ; - -ALTER TABLE `users_fair` CHANGE `fair_name` `fairs_id` INT NOT NULL; -ALTER TABLE `users_fair` DROP `fair_abbrv` ; - - - diff --git a/db/db.update.128.sql b/db/db.update.128.sql deleted file mode 100644 index a641b1ed..00000000 --- a/db/db.update.128.sql +++ /dev/null @@ -1,12 +0,0 @@ -INSERT INTO `config` (`var`, `val`, `category`, `type`, `type_values`, `ord`, `description`, `year`) VALUES -('fair_stats_info', 'yes', 'Science Fairs', 'yesno', '', 600, 'Gather Stats: Information about the fair (date, location, budget, charity info).', -1), -('fair_stats_next_chair', 'yes', 'Science Fairs', 'yesno', '', 700, 'Gather Stats: Chairperson name and contact info for the next year', -1), -('fair_stats_scholarships', 'yes', 'Science Fairs', 'yesno', '', 800, 'Gather Stats: Scholarships given out by the fair', -1), -('fair_stats_delegates', 'yes', 'Science Fairs', 'yesno', '', '900', 'Gather Stats: CWSF Delegate names/email/jacket size', '-1'); - - -ALTER TABLE `fairs` ADD `website` TINYTEXT NOT NULL AFTER `url` ; - -ALTER TABLE `fairs` ADD `enable_stats` ENUM( 'no', 'yes' ) NOT NULL , - ADD `enable_awards` ENUM( 'no', 'yes' ) NOT NULL , - ADD `enable_winners` ENUM( 'no', 'yes' ) NOT NULL ; diff --git a/db/db.update.129.php b/db/db.update.129.php deleted file mode 100644 index ac3dbe32..00000000 --- a/db/db.update.129.php +++ /dev/null @@ -1,57 +0,0 @@ -prepare('SELECT * FROM award_sources'); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - /* - * Make a user, use the password generator to get - * a random username - */ - $u = db129_user_create('fair', db129_user_generate_password()); - - /* Add a Fair Entry */ - $name = $r['name']; - $url = $r['url']; - $website = $r['website']; - $username = $r['username']; - $password = $r['password']; - $en = ($r['enabled'] == 'no') ? 'no' : 'yes'; - - $stmt = $pdo->prepare("INSERT INTO fairs (`id`,`name`,`abbrv`,`type`, - `url`,`website`,`username`,`password`,`enable_stats`, - `enable_awards`,`enable_winners`) VALUES ( - '',?, '', 'ysf',?,?, - ?,?,'no',?,?)"); - $stmt->execute([$name,$url,$web,$username,$password,$en,$en]); - - /* Link the fair to the user */ - $u['fairs_id'] = $pdo->lastInsertId(); - - /* Record the old sources_id to new sources_id mapping */ - $source_map[$r['id']] = $u['fairs_id']; - - db129_user_save($u); - } - - /* Map all awards to their new source IDs */ - $q = $pdo->prepare('SELECT * FROM award_awards'); - $q->execute(); - $keys = array_keys($source_map); - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $old_id = $r['award_sources_id']; - if (!in_array($old_id, $keys)) - continue; - - $qq = $pdo->prepare("UPDATE award_awards SET award_sources_id=? - WHERE id=?"); - $qq->execute([$source_map[$old_id],$r['id']]); - } -} - -?> diff --git a/db/db.update.129.sql b/db/db.update.129.sql deleted file mode 100644 index e69de29b..00000000 diff --git a/db/db.update.129.user.inc.php b/db/db.update.129.user.inc.php deleted file mode 100644 index a3d51270..00000000 --- a/db/db.update.129.user.inc.php +++ /dev/null @@ -1,880 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'Participant', 'judge' => 'Judge', - 'committee' => 'Committee Member', 'volunteer' => 'Volunteer', - 'fair' => 'Science Fair', 'sponsor' => 'Sponsor Contact'); - -function db129_user_valid_type($type) -{ - global $user_types; - if (is_array($type)) { - foreach ($type as $t) { - if (!in_array($t, $user_types)) - return false; - } - } else { - if (!in_array($type, $user_types)) - return false; - } - return true; -} - -/* - * Duplicate of common.inc.php:generatePassword, which will be deleted - * eventually when ALL users are handled through this file - */ -function db129_user_generate_password($pwlen = 8) -{ - // these are good characters that are not easily confused with other characters :) - $available = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz23456789'; - $len = strlen($available) - 1; - - $key = ''; - for ($x = 0; $x < $pwlen; $x++) - $key .= $available[rand(0, $len)]; - return $key; -} - -/* - * Separate user_load_type functions, these could make additional database - * calls if required - */ -function db129_user_load_fair(&$u) -{ - $u['fair_active'] = ($u['fair_active'] == 'yes') ? 'yes' : 'no'; - $u['fair_complete'] = ($u['fair_complete'] == 'yes') ? 'yes' : 'no'; - // $u['fair_name'] = $u['fair_name']; - // $u['fair_abbrv'] = $u['fair_abbrv']; - return true; -} - -function db129_user_load_student(&$u) -{ - // $u['student_active'] = ($u['student_active'] == 'yes') ? 'yes' : 'no'; - // $u['student_complete'] = ($u['student_complete'] == 'yes') ? 'yes' : 'no'; - return false; -} - -function db129_user_load_judge(&$u) -{ - $u['judge_active'] = ($u['judge_active'] == 'yes') ? 'yes' : 'no'; - $u['judge_complete'] = ($u['judge_complete'] == 'yes') ? 'yes' : 'no'; - $u['years_school'] = intval($u['years_school']); - $u['years_regional'] = intval($u['years_regional']); - $u['years_national'] = intval($u['years_national']); - $u['willing_chair'] = ($u['willing_chair'] == 'yes') ? 'yes' : 'no'; - $u['special_award_only'] = ($u['special_award_only'] == 'yes') ? 'yes' : 'no'; - $u['cat_prefs'] = unserialize($u['cat_prefs']); - $u['div_prefs'] = unserialize($u['div_prefs']); - $u['divsub_prefs'] = unserialize($u['divsub_prefs']); - // $u['expertise_other'] = $u['expertise_other']; - $u['languages'] = unserialize($u['languages']); - // $u['highest_psd'] = $u['highest_psd']; - - /* Sanity check the arrays, make sure they are arrays */ - $should_be_arrays = array('cat_prefs', 'div_prefs', - 'divsub_prefs', 'languages'); - foreach ($should_be_arrays as $k) { - if (!is_array($u[$k])) - $u[$k] = array(); - } - - return true; -} - -function db129_user_load_committee(&$u) -{ - $u['committee_active'] = $u['committee_active']; - $u['emailprivate'] = $u['emailprivate']; - $u['ord'] = intval($u['ord']); - $u['displayemail'] = ($u['displayemail'] == 'yes') ? 'yes' : 'no'; - $u['access_admin'] = ($u['access_admin'] == 'yes') ? 'yes' : 'no'; - $u['access_config'] = ($u['access_config'] == 'yes') ? 'yes' : 'no'; - $u['access_super'] = ($u['access_super'] == 'yes') ? 'yes' : 'no'; - return true; -} - -function db129_user_load_volunteer(&$u) -{ - $u['volunteer_active'] = ($u['volunteer_active'] == 'yes') ? 'yes' : 'no'; - $u['volunteer_complete'] = ($u['volunteer_complete'] == 'yes') ? 'yes' : 'no'; - return true; -} - -function db129_user_load_sponsor($u) -{ - $u['sponsors_id'] = intval($u['sponsors_id']); - $u['sponsor_complete'] = ($u['sponsor_complete'] == 'yes') ? 'yes' : 'no'; - $u['sponsor_active'] = ($u['sponsor_active'] == 'yes') ? 'yes' : 'no'; - return true; -} - -function db129_user_load($user, $uid = false) -{ - /* - * So, it turns out that doing one big load is faster than loading just - * from the users table then loading only the specific types the user - * has.. go figure. - */ - $query = 'SELECT * FROM `users` - LEFT JOIN `users_committee` ON `users_committee`.`users_id`=`users`.`id` - LEFT JOIN `users_judge` ON `users_judge`.`users_id`=`users`.`id` - LEFT JOIN `users_volunteer` ON `users_volunteer`.`users_id`=`users`.`id` - LEFT JOIN `users_fair` ON `users_fair`.`users_id`=`users`.`id` - LEFT JOIN `users_sponsor` ON `users_sponsor`.`users_id`=`users`.`id` - WHERE '; - if ($uid != false) { - $uid = intval($uid); - $query .= "`users`.`uid`='$uid' ORDER BY `users`.`year` DESC LIMIT 1"; - } else { - $id = intval($user); - $query .= " `users`.`id`='$id'"; - } - $q = $pdo->prepare($query); - $q->execute(); - - if ($q->rowCount() != 1) { - echo "Query [$query] returned " . $q->rowCount() . " rows\n"; - // echo "
    ";
    -		//		print_r(debug_backtrace());
    -		return false;
    -	}
    -
    -	$ret = $q->fetch(PDO::FETCH_ASSOC);
    -
    -	/*
    -	 * Make sure they're not deleted, we don't want to do this in the query, because loading by $uid would
    -	 * simply return the previous year (where deleted=no)
    -	 */
    -	if ($ret['deleted'] != 'no') {
    -		/* User is deleted */
    -		return false;
    -	}
    -
    -	/* Do we need to do number conversions? */
    -	$ret['id'] = intval($ret['id']);
    -	$ret['uid'] = intval($ret['uid']);
    -	$ret['year'] = intval($ret['year']);
    -
    -	/* Turn the type into an array, because there could be more than one */
    -	$ts = explode(',', $ret['types']);
    -	$ret['types'] = $ts;  /* Now we can use in_array('judge', $ret['types']) ; */
    -
    -	/* Convenience */
    -	$ret['name'] = $ret['firstname'] . ' ' . $ret['lastname'];
    -
    -	foreach ($ret['types'] as $t) {
    -		/*
    -		 * These all pass $ret by reference, and can modify
    -		 * $ret
    -		 */
    -		$r = call_user_func("db129_user_load_$t", $ret);
    -		if ($r != true) {
    -			echo "db129_user_load_$t returned false!\n";
    -			return false;
    -		}
    -
    -		/* It is important that each type database doesn't
    -		have conflicting column names */
    -
    -		/*
    -		 * foreach($r as $k=>$v) {
    -		 * 			if(array_key_exists($k, $ret)) {
    -		 * 				echo "DATABASE DESIGN ERROR, duplicate user key $k";
    -		 * 				exit;
    -		 * 			}
    -		 * 		}
    -		 * 		$ret = array_merge($ret, $r);
    -		 */
    -	}
    -
    -	/* Do this assignment without recursion :) */
    -	unset($ret['orig']);
    -	$orig = $ret;
    -	$ret['orig'] = $orig;
    -
    -	/*
    -	 * echo "
    User load returning: \n";
    -	 * 	print_r($ret);
    -	 * 	echo "
    "; - */ - return $ret; -} - -function db129_user_load_by_uid($uid) -{ - return db129_user_load(0, $uid); -} - -function db129_user_set_password($id, $password = NULL) -{ - /* pass $u by reference so we can update it */ - $save_old = false; - if ($password == NULL) { - $q = $pdo->prepare("SELECT passwordset FROM users WHERE id=?"); - $q->execute([$id]); - $u = $q->fetch(PDO::FETCH_ASSOC); - /* Generate a new password */ - $password = db129_user_generate_password(12); - /* save the old password only if it's not an auto-generated one */ - if ($u['passwordset'] != '0000-00-00') - $save_old = true; - /* Expire the password */ - $save_set = "'0000-00-00'"; - } else { - /* Set the password, no expiry, save the old */ - $save_old = true; - $save_set = 'NOW()'; - } - - $p = $password; - $set = ($save_old == true) ? 'oldpassword=password, ' : ''; - $set .= "password='$p', passwordset=$save_set "; - - $query = "UPDATE users SET ? WHERE id=?"; - $stmt = $pdo->prepare($query); - $stmt->execute([$set,$id]); - show_pdo_errors_if_any($pdo); - - return $password; -} - -function db129_user_save_type_list($u, $db, $fields) -{ - // echo "
    ";
    -	//	print_r($u);
    -	//	echo "
    "; - $set = ''; - - foreach ($fields as $f) { - /* == even works on arrays in PHP */ - if ($u[$f] == $u['orig'][$f]) - continue; - - if ($set != '') - $set .= ','; - - if ($u[$f] == NULL) { - $set .= "$f=NULL"; - continue; - } - - if (is_array($u[$f])) - $data = serialize($u[$f]); - else - $data = stripslashes($u[$f]); - - $set .= "`$f`='$data'"; - } - if ($set != '') { - $query = "UPDATE ? SET ? WHERE users_id=?"; - $stmt = $pdo->prepare($query); - $stmt->execute([$db,$set,$u['id']]); - if ($pdo->errorInfo()) { - show_pdo_errors_if_any($pdo); - echo error("Full query: $query"); - } - } -} - -function db129_user_save_volunteer($u) -{ - $fields = array('volunteer_active', 'volunteer_complete'); - db129_user_save_type_list($u, 'users_volunteer', $fields); -} - -function db129_user_save_committee($u) -{ - $fields = array('committee_active', 'emailprivate', 'ord', 'displayemail', 'access_admin', - 'access_config', 'access_super'); - db129_user_save_type_list($u, 'users_committee', $fields); -} - -function db129_user_save_judge($u) -{ - $fields = array('judge_active', 'judge_complete', 'years_school', 'years_regional', 'years_national', - 'willing_chair', 'special_award_only', - 'cat_prefs', 'div_prefs', 'divsub_prefs', - 'expertise_other', 'languages', 'highest_psd'); - db129_user_save_type_list($u, 'users_judge', $fields); -} - -function db129_user_save_student($u) -{ - // $fields = array('student_active','student_complete'); - // user_save_type_list($u, 'users_student', $fields); -} - -function db129_user_save_fair($u) -{ - $fields = array('fair_active', 'fairs_id'); - db129_user_save_type_list($u, 'users_fair', $fields); -} - -function db129_user_save_sponsor($u) -{ - $fields = array('sponsors_id', 'sponsor_active', 'sponsor_complete', 'primary', 'position', 'notes'); - db129_user_save_type_list($u, 'users_sponsor', $fields); -} - -function db129_user_save($u) -{ - $fields = array('salutation', 'firstname', 'lastname', 'username', - 'email', - 'phonehome', 'phonework', 'phonecell', 'fax', 'organization', - 'address', 'address2', 'city', 'province', 'postalcode', 'sex', - 'firstaid', 'cpr'); - - $set = ''; - foreach ($fields as $f) { - if ($u[$f] == $u['orig'][$f]) - continue; - - if ($set != '') - $set .= ','; - - // if($f == 'types') - // $set .= "$f='".implode(',', $u[$f])."'"; - - $data = stripslashes($u[$f]); - $set .= "$f='$data'"; - } - // echo "
    ";
    -	// print_r($u);
    -	// echo "
    "; - if ($set != '') { - $query = "UPDATE users SET ? WHERE id=?"; - $stmt = $pdo->prepare($query); - $stmt->execute([$set,$u['id']]); - // echo "query=[$query]"; - show_pdo_errors_if_any($pdo); - } - - /* Save the password if it changed */ - if ($u['password'] != $u['orig']['password']) - db129_user_set_password($u['id'], $u['password']); - - foreach ($u['types'] as $t) { - call_user_func("db129_user_save_$t", $u); - } -} - -/* - * Delete functions. These mark a user as deleted, and delete references to other - * tables - */ - -function db129_user_delete_committee($u) -{ - $stmt = $pdo->prepare("DELETE FROM committees_link WHERE users_uid=?"); - $stmt->execute([$u['uid']]); -} - -function db129_user_delete_volunteer($u) {} - -function db129_user_delete_judge($u) -{ - global $config; - $id = $u['id']; - $stmt = $pdo->prepare("DELETE FROM judges_teams_link WHERE users_id=?"); - $stmt->execute([$id]); - $stmt = $pdo->prepare("DELETE FROM judges_specialawards_sel WHERE users_id=?"); - $stmt->execute([$id]); -} - -function db129_user_delete_fair($u) {} - -function db129_user_delete_student($u) {} - -function db129_user_delete_sponsor($u) {} - -function db129_user_delete($u, $type = false) -{ - $finish_delete = false; - - if (!is_array($u)) { - $u = db129_user_load($u); - } - if ($type != false) { - if (!in_array($type, $u['types'])) { - /* - * Hum, type specified, but the user is not this type, - * so, i guess we're done. - */ - return; - } - if (count($u['types']) > 1) { - /* Don't delete the whole user */ - $types = ''; - foreach ($u['types'] as $t) { - if ($t == $type) - continue; - if ($types != '') - $types .= ','; - $types .= $t; - } - $stmt = $pdo->prepare("UPDATE users SET types=? WHERE id=?"); - $stmt->execute([$types,$u['id']]); - } else { - $finish_delete = true; - } - call_user_func("db129_user_delete_$type", $u); - } else { - /* Delete the whole user */ - foreach ($u['types'] as $t) - call_user_func("db129_user_delete_$t", $u); - $finish_delete = true; - } - if ($finish_delete == true) { - $stmt = $pdo->prepare("UPDATE users SET deleted='yes', deleteddatetime=NOW() WHERE id=?"); - $stmt->execute([$u['id']]); - } -} - -/* - * Purge functions. These completely eliminate all traces of a user from the - * database. This action cannot be undone. We prefer the committee to use the - * "delete" functions, which simply mark the account as "deleted". - */ - -function db129_user_purge($u, $type = false) -{ - $finish_purge = false; - - if (!is_array($u)) { - $u = db129_user_load($u); - } - if ($type != false) { - if (!in_array($type, $u['types'])) { - /* - * Hum, type specified, but the user is not this type, - * so, i guess we're done. - */ - return; - } - if (count($u['types']) > 1) { - /* Don't delete the whole user */ - $types = ''; - foreach ($u['types'] as $t) { - if ($t == $type) - continue; - if ($types != '') - $types .= ','; - $types .= $t; - } - $stmt = $pdo->prepare("UPDATE users SET types=? WHERE id=?"); - $stmt->execute([$types,$u['id']]); - } else { - $finish_purge = true; - } - - /* - * Call the delete func to deal with table linking, then completely wipe - * out the entry - */ - call_user_func("db129_user_delete_$type", $u); - // call_user_func("user_purge_$type", $u); - $stmt = $pdo->prepare("DELETE FROM users_? WHERE users_id=?"); - $stmt->execute([$type,$u['id']]); - } else { - /* Delete the whole user */ - foreach ($u['types'] as $t) { - call_user_func("db129_user_delete_$t", $u); - // call_user_func("user_purge_$t", $u); - $stmt = $pdo->prepare("DELETE FROM users_? WHERE users_id=?"); - $stmt->execute([$t,$u['id']]); - } - $finish_purge = true; - } - if ($finish_purge == true) { - $stmt = $pdo->prepare("DELETE FROM users WHERE id=?"); - $stmt->execute([$u['id']]); - } -} - -/* Duplicate a row in the users table, or any one of the users_* tables. */ -function db129_user_dupe_row($db, $key, $val, $newval) -{ - global $config; - $nullfields = array('deleteddatetime'); /* Fields that can be null */ - $q = $pdo->prepare("SELECT * FROM ? WHERE ?=?"); - $q->execute([$db,$key,$val]); - if ($q->rowCount() != 1) { - echo "ERROR duplicating row in $db: $key=$val NOT FOUND.\n"; - exit; - } - $i = $q->fetch(PDO::FETCH_ASSOC); - $i[$key] = $newval; - - foreach ($i as $k => $v) { - if ($v == NULL && in_array($k, $nullfields)) - $i[$k] = 'NULL'; - else if ($k == 'year') - $i[$k] = $config['FAIRYEAR']; - else - $i[$k] = "'" . $v . "'"; - } - - $keys = '`' . join('`,`', array_keys($i)) . '`'; - $vals = join(',', array_values($i)); - - $q = "INSERT INTO ? (?) VALUES (?)"; - // echo "Dupe Query: [$q]"; - $r = $pdo->prepare($q); - $r->execute([$db,$keys,$vals]); - show_pdo_errors_if_any($pdo); - - $id = $pdo->lastInsertId(); - return $id; -} - -/* Used by the login scripts to copy one user from one year to another */ -function db129_user_dupe($u, $new_year) -{ - /* - * Dupe a user if: - * - They don't exist in the current year - * (users->year != the target year (passed in so we can use it in the rollover script) ) - * - They have a previous year entry - * (users->year DESC LIMIT 1 == 1 row) - * - That previous entry has deleted=no - */ - - /* Find the last entry */ - $q = $pdo->prepare("SELECT id,uid,year,deleted FROM users WHERE uid=? - ORDER BY year DESC LIMIT 1"); - $q->execute([$u['uid']]); - $r = $q->fetch(PDO::FETCH_OBJ); - if ($r->deleted == 'yes') { - echo "Cannot duplicate user ID {$u['id']}, they are deleted. Undelete them first.\n"; - exit; - } - if ($r->year == $new_year) { - echo "Cannot duplicate user ID {$u['id']}, they already exist in year $new_year\n"; - exit; - } - - $id = db129_user_dupe_row('users', 'id', $u['id'], NULL); - $q = $pdo->prepare("UPDATE users SET year=? WHERE id=?"); - $q->execute([$new_year,$id]); - - /* Load the new user */ - $u2 = db129_user_load($id); - - foreach ($u2['types'] as $t) { - db129_user_dupe_row("users_$t", 'users_id', $u['id'], $id); - } - /* Return the ID of the new user */ - return $id; -} - -/* - * Returns true if loaded user ($u) is allowed to add role type $type to their - * profile. THis is intended as a last-stop mechanism, preventing, for example - * a student from co-existing with any other account type. - */ -function db129_user_add_role_allowed($type, $u) -{ - /* - * For example, a committee member can add a volunteer or judge role to - * their account. - */ - $allowed = array( - 'committee' => array('volunteer', 'judge'), - 'volunteer' => array('judge', 'committee'), - 'judge' => array('volunteer', 'committee'), - 'student' => array(), - 'fair' => array(), - 'sponsor' => array('volunteer', 'judge') - ); - - foreach ($u['types'] as $ut) { - $allowed_array = $allowed[$ut]; - if (in_array($type, $allowed[$ut])) - return true; - } - return false; -} - -function db129_user_create($type, $username, $u = NULL) -{ - global $config; - if (!is_array($u)) { - $stmt = $pdo->prepare("INSERT INTO users (`types`,`username`,`passwordset`,`created`,`year`) - VALUES (?,?,'0000-00-00', NOW(),?)"); - $stmt->execute([$type,$username,$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - $uid = $pdo->lastInsertId(); - $stmt = $pdo->prepare("UPDATE users SET uid=? WHERE id=?"); - $stmt->execute([$uid,$uid]); - db129_user_set_password($uid, NULL); - } else { - /* - * The user has been specified and already exists, - * just add a role - */ - $uid = $u['id']; - if (!db129_user_add_role_allowed($type, $u)) { - /* If we get in here, someone is hand crafting URLs */ - echo 'HALT: invalid role add specified for operation.'; - exit; - } - $new_types = implode(',', $u['types']) . ',' . $type; - $stmt = $pdo->prepare("UPDATE users SET types=? WHERE id=?"); - $stmt->execute([$new_types,$uid]); - } - - switch ($type) { - case 'volunteer': - $stmt = $pdo->prepare("INSERT INTO users_volunteer(`users_id`, `volunteer_active`) VALUES (?, 'yes')"); - $stmt->execute([$uid]); - break; - case 'student': - $stmt = $pdo->prepare("INSERT INTO users_student(`users_id`, `student_active`) VALUES (?, 'yes')"); - $stmt->execute([$uid]); - break; - case 'judge': - $stmt = $pdo->prepare("INSERT INTO users_judge(`users_id`, `judge_active`) VALUES (?, 'yes')"); - $stmt->execute([$uid]); - break; - case 'fair': - $stmt = $pdo->prepare("INSERT INTO users_fair(`users_id`, `fair_active`) VALUES (?, 'yes')"); - $stmt->execute([$uid]); - break; - case 'committee': - $stmt = $pdo->prepare("INSERT INTO users_committee(`users_id`, `committee_active`) VALUES (?, 'yes')"); - $stmt->execute([$uid]); - break; - case 'sponsor': - $stmt = $pdo->prepare("INSERT INTO users_sponsor(`users_id`) VALUES (?)"); - $stmt->execute([$uid]); - break; - } - return db129_user_load($uid); -} - -function db129_user_valid_user($user) -{ - /* - * Find any character that doesn't match the valid username characters - * (^ inverts the matching remember - */ - $x = preg_match('[^a-zA-Z0-9@.-_]', $user); - - /* If x==1, a match was found, and the input is bad */ - return ($x == 1) ? false : true; -} - -function db129_user_valid_password($pass) -{ - /* Same as user, but allow more characters */ - $x = preg_match('[^a-zA-Z0-9 ~!@#$%^&*()-_=+|;:,<.>/?]', $pass); - - /* If x==1, a match was found, and the input is bad */ - if ($x == 1) - return false; - - if (strlen($pass) < 6) - return false; - - return true; -} - -/* A more strict version of isEmailAddress() */ -function db129_user_valid_email($str) -{ - if (eregi('^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})$', $str)) - return true; - return false; -} - -/* - * Perform some checks. Make sure the person is logged in, and that their - * password hasn't expired (the password_expired var is set in the login page) - */ -function db129_user_auth_required($type, $access = '') -{ - global $config; - if (!isset($_SESSION['users_type'])) { - message_push(error(i18n('You must login to view that page'))); - header("location: {$config['SFIABDIRECTORY']}/user_login.php?type=$type"); - exit; - } - - if ($_SESSION['users_type'] != $type) { - message_push(error(i18n('You must login to view that page'))); - header("location: {$config['SFIABDIRECTORY']}/user_login.php?type=$type"); - exit; - } - - if ($_SESSION['password_expired'] == true) { - header("location: {$config['SFIABDIRECTORY']}/user_password.php"); - exit; - } - - if ($access != '') { - if ($type != 'committee') { - echo 'CRITICAL ERROR, cannot check access in user_auth_required without specifying type=committee'; - exit; - } - - if (committee_auth_has_access($access) == false) { - message_push(error(i18n('You do not have permission to view that page'))); - header("Location: {$config['SFIABDIRECTORY']}/committee_main.php"); - exit; - } - } - return true; -} - -function db129_user_volunteer_registration_status() -{ - global $config; - // $now = date('Y-m-d H:i:s'); - // if($now < $config['dates']['judgeregopen']) return "notopenyet"; - // if($now > $config['dates']['judgeregclose']) return "closed"; - return 'open'; -} - -function db129_user_judge_registration_status() -{ - global $config; - $now = date('Y-m-d H:i:s'); - if ($now < $config['dates']['judgeregopen']) - return 'notopenyet'; - if ($now > $config['dates']['judgeregclose']) - return 'closed'; - return 'open'; -} - -$user_personal_fields_map = array( - 'salutation' => array('salutation'), - 'name' => array('firstname', 'lastname'), - 'email' => array('email'), - 'sex' => array('sex'), - 'phonehome' => array('phonehome'), - 'phonework' => array('phonework'), - 'phonecell' => array('phonecell'), - 'fax' => array('fax'), - 'org' => array('organization'), - 'birthdate' => array('birthdate'), - 'lang' => array('lang'), - 'address' => array('address', 'address2', 'postalcode'), - 'city' => array('city'), - 'province' => array('province'), - 'firstaid' => array('firstaid', 'cpr') -); - -function db129_user_personal_fields($type) -{ - global $config, $user_personal_fields_map; - $ret = array('firstname', 'lastname', 'email'); - $fields = $config["{$type}_personal_fields"]; - if ($fields != '') { - $fields = split(',', $fields); - foreach ($fields as $f) { - $ret = array_merge($ret, $user_personal_fields_map[$f]); - } - } - return $ret; -} - -function db129_user_personal_required_fields($type) -{ - global $config, $user_personal_fields_map; - $ret = array('firstname', 'lastname', 'email'); - $required = $config["{$type}_personal_required"]; - if ($required != '') { - $fields = split(',', $required); - foreach ($fields as $f) { - $ret = array_merge($ret, $user_personal_fields_map[$f]); - } - } - - /* - * Filter some elements that are never required. - * - address2 - */ - $ret = array_diff($ret, array('address2')); - return $ret; -} - -function db129_user_personal_info_status(&$u) -{ - $required = array(); - foreach ($u['types'] as $t) { - $required = array_merge($required, - db129_user_personal_required_fields($t)); - } - foreach ($required as $r) { - $val = trim($u[$r]); - - if (strlen($val) > 0) { - /* Ok */ - } else { - return 'incomplete'; - } - } - - /* - * FIXME: somehow call the $type _status_update() function db129_to update - * the individual $type _complete entry? - */ - return 'complete'; -} - -/* user_{$type}_login() is called with a full $u loaded */ -function db129_user_committee_login($u) -{ - /* Double check, make sure the user is of this type */ - if (!in_array('committee', $u['types'])) { - echo "ERROR: attempted to login committee on a non-committee user\n"; - exit; - } - - $_SESSION['access_admin'] = $u['access_admin']; // == 'yes') ? true : false; - $_SESSION['access_config'] = $u['access_config']; // == 'yes') ? true : false; - $_SESSION['access_super'] = $u['access_super']; // == 'yes') ? true : false; -} - -function db129_user_fair_login($u) -{ - /* Double check, make sure the user is of this type */ - if (!in_array('fair', $u['types'])) { - echo "ERROR: attempted to login fair on a non-fair user\n"; - exit; - } - - $_SESSION['fairs_id'] = $u['fairs_id']; // == 'yes') ? true : false; -} - -?> diff --git a/db/db.update.13.sql b/db/db.update.13.sql deleted file mode 100644 index 4f08ee6d..00000000 --- a/db/db.update.13.sql +++ /dev/null @@ -1,20 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_project_summary_wordmax', '100', 'The maximum number of words acceptable in the project summary', '-1'); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_project_summary_wordmax', '100', 'The maximum number of words acceptable in the project summary', '2006'); -ALTER TABLE `projects` ADD `summarycountok` TINYINT( 1 ) DEFAULT '1' NOT NULL AFTER `summary` ; -ALTER TABLE `judges_timeslots` ADD `allowdivisional` ENUM( 'no', 'yes' ) DEFAULT 'no' NOT NULL AFTER `endtime` ; -ALTER TABLE `schools` ADD `board` VARCHAR( 64 ) NOT NULL AFTER `school`; -ALTER TABLE `schools` ADD `district` VARCHAR( 64 ) NOT NULL AFTER `board`; -DELETE FROM `judges_schedulerconfig` WHERE var='timeslot_length'; -DELETE FROM `judges_schedulerconfig` WHERE var='timeslot_break'; -ALTER TABLE `award_awards` ADD `excludefromac` TINYINT( 1 ) DEFAULT '0' NOT NULL; -ALTER TABLE `award_prizes` ADD `excludefromac` TINYINT( 1 ) DEFAULT '0' NOT NULL; -UPDATE `config` SET `description`='C=Category, D=Division, N=2 digit Number' WHERE `var`='project_num_format'; -INSERT INTO `config` VALUES ('filterdivisionbycategory', 'no', 'Allows for setup of divisions on a categorical basis. Students can then only choose divisions that apply to their category. Only use if you want to offer a different set of divisions to each age category (no, yes).', -1); -CREATE TABLE `projectcategoriesdivisions_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `categories_id` (`projectcategories_id`) -) TYPE=MyISAM; diff --git a/db/db.update.130.sql b/db/db.update.130.sql deleted file mode 100644 index 54617f5e..00000000 --- a/db/db.update.130.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `award_awards` CHANGE `award_sources_id` `award_source_fairs_id` INT( 10 ) UNSIGNED NULL DEFAULT NULL; - -ALTER TABLE `fairs` ADD `award_awards_ids` TEXT NOT NULL; - diff --git a/db/db.update.131.php b/db/db.update.131.php deleted file mode 100644 index fed88c41..00000000 --- a/db/db.update.131.php +++ /dev/null @@ -1,41 +0,0 @@ -prepare('SELECT * FROM sponsors'); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $total = 0; - $awardq = $pdo->prepare("SELECT * FROM award_awards WHERE sponsors_id=? AND year=?"); - $awardq->execute([$r->id,$year]); - while ($awardr = $awardq->fetch(PDO::FETCH_OBJ)) { - $prizeq = $pdo->prepare("SELECT cash,scholarship,value,number FROM award_prizes WHERE award_awards_id=?"); - $prizeq->execute([$awardr->id]); - while ($prizer = $prizeq->fetch(PDO::FETCH_OBJ)) { - // some people never set the value for some reason, i dunno why.. - $realvalue = max($prizer->cash + $prizer->scholarship, $prizer->value); - $totalvalue = $realvalue * $prizer->number; - $total += $totalvalue; - } - } - echo "Creating sponsorship for ID: $r->id value: $total\n"; - $pdo->prepare("INSERT INTO sponsorships (sponsors_id,fundraising_type,value,status,probability,year) VALUES ( - ?, - 'sfawards', - ?, - 'pending', - '25', - ?)"); - $pdo->execute([$r->id,$total,$year]); - $stmt = $pdo->prepare("INSERT INTO sponsors_logs (sponsors_id,dt,users_id,log) VALUES (?,NOW(),0,'Automatically created sponsorship from existing sponsor. type=award, value=\$?, status=pending, probability=25%')"); - $stmt->execute([$r->id,$total]); - } -} - -?> diff --git a/db/db.update.131.sql b/db/db.update.131.sql deleted file mode 100644 index e69de29b..00000000 diff --git a/db/db.update.132.sql b/db/db.update.132.sql deleted file mode 100644 index 7d96912d..00000000 --- a/db/db.update.132.sql +++ /dev/null @@ -1,10 +0,0 @@ -ALTER TABLE `fairs` DROP `award_awards_ids` ; - -CREATE TABLE `fairs_awards_link` ( - `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , - `fairs_id` INT NOT NULL , - `award_awards_id` INT NOT NULL , - `download_award` ENUM( 'no', 'yes' ) NOT NULL , - `upload_winners` ENUM( 'no', 'yes' ) NOT NULL -) ENGINE = MYISAM ; - diff --git a/db/db.update.133.sql b/db/db.update.133.sql deleted file mode 100644 index 4c5b39aa..00000000 --- a/db/db.update.133.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `fairs` ADD `gather_stats` SET( 'participation', 'schools_ext', 'minorities', 'guests', 'sffbc_misc', 'info', 'next_chair', 'scholarships', 'delegates' ) NOT NULL ; diff --git a/db/db.update.134.sql b/db/db.update.134.sql deleted file mode 100644 index 7517c108..00000000 --- a/db/db.update.134.sql +++ /dev/null @@ -1,75 +0,0 @@ -ALTER TABLE `reports` CHANGE `type` `type` ENUM( 'student', 'judge', 'award', 'committee', 'school', 'volunteer', 'tour', 'fair' ) NOT NULL DEFAULT 'student'; - -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '46', 'Feeder Fairs -- All Stats', 'All feeder fair statistics in CSV', 'The Grant Brothers', 'fair'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'fit_columns', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'field_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 7, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 8, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'fair_name', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 1, 'fairstats_year', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 2, 'fairstats_start_date', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 3, 'fairstats_end_date', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 4, 'fairstats_budget', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 5, 'fairstats_address', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 6, 'fairstats_ysf_affiliation_complete', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 7, 'fairstats_charity', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 8, 'fairstats_scholarships', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 9, 'fairstats_male_1', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 10, 'fairstats_male_4', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 11, 'fairstats_male_7', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 12, 'fairstats_male_9', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 13, 'fairstats_male_11', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 14, 'fairstats_female_1', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 15, 'fairstats_female_4', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 16, 'fairstats_female_7', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 17, 'fairstats_female_9', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 18, 'fairstats_female_11', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 19, 'fairstats_projects_1', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 20, 'fairstats_projects_4', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 21, 'fairstats_projects_7', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 22, 'fairstats_projects_9', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 23, 'fairstats_projects_11', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 24, 'fairstats_firstnations', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 25, 'fairstats_students_atrisk', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 26, 'fairstats_schools_atrisk', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 27, 'fairstats_students_total', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 28, 'fairstats_schools_total', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 29, 'fairstats_schools_active', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 30, 'fairstats_students_public', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 31, 'fairstats_schools_public', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 32, 'fairstats_students_private', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 33, 'fairstats_schools_private', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 34, 'fairstats_schools_districts', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 35, 'fairstats_studentsvisiting', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 36, 'fairstats_publicvisiting', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 37, 'fairstats_teacherssupporting', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 38, 'fairstats_increasedinterest', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 39, 'fairstats_consideringcareer', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 40, 'fairstats_committee_members', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 41, 'fairstats_judges', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 42, 'fairstats_next_chair_name', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 43, 'fairstats_next_chairemail', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 44, 'fairstats_next_chair_hphone', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 45, 'fairstats_next_chair_bphone', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 46, 'fairstats_next_chair_fax', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 47, 'fairstats_delegate1', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 48, 'fairstats_delegate1_email', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 49, 'fairstats_delegate1_size', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 50, 'fairstats_delegate2', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 51, 'fairstats_delegate2_email', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 52, 'fairstats_delegate2_size', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 53, 'fairstats_delegate3', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 54, 'fairstats_delegate3_email', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 55, 'fairstats_delegate3_size', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 56, 'fairstats_delegate4', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 57, 'fairstats_delegate4_email', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 58, 'fairstats_delegate4_size', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'sort', 0, 'fair_name', '', 0, 0, 0, 0, 1, '', ' '); - diff --git a/db/db.update.135.sql b/db/db.update.135.sql deleted file mode 100644 index 4c2130ff..00000000 --- a/db/db.update.135.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `sponsorships` ADD `users_uid` INT NULL DEFAULT NULL AFTER `sponsors_id` ; -ALTER TABLE `sponsorships` CHANGE `sponsors_id` `sponsors_id` INT( 11 ) NULL DEFAULT NULL diff --git a/db/db.update.136.php b/db/db.update.136.php deleted file mode 100644 index 9b51e3ba..00000000 --- a/db/db.update.136.php +++ /dev/null @@ -1,31 +0,0 @@ -prepare("UPDATE fairs SET `name` = 'Youth Science Canada', - `abbrv` = 'YSC', - `website` = 'http://apps.ysf-fsj.ca/awarddownloader/help.php', - `enable_stats` = 'yes', - `enable_awards` = 'yes', - `enable_winners` = 'yes', - `username` =?, - `password` =? - - WHERE - `url`='https://secure.ysf-fsj.ca/awarddownloader/index.php'"); - $stmt->execute([$config['ysf_region_id'],$config['ysf_region_password']]); - - $stmt = $pdo->prepare("UPDATE fairs SET `abbrv` = 'STO', - `website` = 'http://www.scitechontario.org/awarddownloader/help.php', - `enable_stats` = 'yes', - `enable_awards` = 'yes', - `enable_winners` = 'yes' - WHERE - `url`='http://www.scitechontario.org/awarddownloader/index.php'"); - $stmt->execute(); -} - -function db_update_136_post() {} - -?> diff --git a/db/db.update.136.sql b/db/db.update.136.sql deleted file mode 100644 index 82a6ec6c..00000000 --- a/db/db.update.136.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `fairs` CHANGE `type` `type` ENUM( 'feeder', 'sfiab', 'ysc' ) NOT NULL ; - -UPDATE fairs SET `type`='ysc' WHERE `type`=''; - -DELETE FROM config WHERE var='ysf_region_id'; -DELETE FROM config WHERE var='ysf_region_password'; diff --git a/db/db.update.137.sql b/db/db.update.137.sql deleted file mode 100644 index 8d72b423..00000000 --- a/db/db.update.137.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `winners` ADD `fairs_id` INT NOT NULL; -ALTER TABLE `projects` ADD `fairs_id` INT NOT NULL; -ALTER TABLE `students` ADD `fairs_id` INT NOT NULL AFTER `schools_id` ; diff --git a/db/db.update.138.sql b/db/db.update.138.sql deleted file mode 100644 index 4ca61dc4..00000000 --- a/db/db.update.138.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `fairs` ADD `catmap` TINYTEXT NOT NULL , - ADD `divmap` TINYTEXT NOT NULL ; diff --git a/db/db.update.139.sql b/db/db.update.139.sql deleted file mode 100644 index 1610a2c0..00000000 --- a/db/db.update.139.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `award_awards` ADD `external_additional_materials` BOOL NOT NULL AFTER `external_postback`; -ALTER TABLE `award_awards` ADD `external_register_winners` BOOL NOT NULL AFTER `external_additional_materials` ; diff --git a/db/db.update.14.sql b/db/db.update.14.sql deleted file mode 100644 index b3506f3c..00000000 --- a/db/db.update.14.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_student_personal', 'yes', 'Collect personal information about the students, such as phone number, address, gender, etc.', '-1'); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_student_personal', 'yes', 'Collect personal information about the students, such as phone number, address, gender, etc.', '2006'); diff --git a/db/db.update.140.sql b/db/db.update.140.sql deleted file mode 100644 index 45dc69d2..00000000 --- a/db/db.update.140.sql +++ /dev/null @@ -1,5 +0,0 @@ -DELETE FROM reports_items WHERE field = 'sponsor_confirmed'; - -ALTER TABLE `fairs_stats` CHANGE `next_chairemail` `next_chair_email` VARCHAR( 64 ) NOT NULL ; -UPDATE `reports_items` SET field = 'fairstats_next_chair_email' WHERE field = 'fairstats_next_chairemail'; - diff --git a/db/db.update.141.sql b/db/db.update.141.sql deleted file mode 100644 index d52b1ab5..00000000 --- a/db/db.update.141.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( 'fiscal_yearend', '', 'Global', 'text', '', '200', 'Your organization''s fiscal year end. Specified in format MM-DD. Must be set in order for the Fundraising Module to function.', '-1'); -ALTER TABLE `sponsors` ADD `donortype` ENUM( 'organization', 'individual' ) NOT NULL DEFAULT 'organization'; -ALTER TABLE `sponsors` ADD `address2` VARCHAR( 128 ) NOT NULL AFTER `address` ; diff --git a/db/db.update.142.php b/db/db.update.142.php deleted file mode 100644 index b356b6ec..00000000 --- a/db/db.update.142.php +++ /dev/null @@ -1,23 +0,0 @@ -prepare("SELECT * FROM config WHERE var='FISCALYEAR'"); - $q->execute(); - if ($q->rowCount()) { - // great its there, do nothing, it must have been inserted by the installer when doing a fresh install - } else { - // its not there.. this must be an update to an existing system, so lets insert it - // try to guess a fiscal that makes sense - $month = date('m'); - if ($month > 6) - $fiscalyearsuggest = date('Y') + 1; - else - $fiscalyearsuggest = date('Y'); - $stmt = $pdo->prepare("INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( 'FISCALYEAR',?, 'Special', '', '', '0', 'The current fiscal year that the fundraising module is using', '0')"); - $stmt->execute([$fiscalyearsuggest]); - } -} - -?> diff --git a/db/db.update.142.sql b/db/db.update.142.sql deleted file mode 100644 index f27f11a6..00000000 --- a/db/db.update.142.sql +++ /dev/null @@ -1,30 +0,0 @@ -CREATE TABLE `fundraising_campaigns` ( -`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , -`name` VARCHAR( 128 ) NOT NULL , -`type` VARCHAR( 64 ) NOT NULL , -`startdate` DATE NOT NULL, -`enddate` DATE NOT NULL, -`active` ENUM( 'no', 'yes' ) NOT NULL , -`target` INT NOT NULL, -`fundraising_goals_id` INT UNSIGNED NOT NULL, -`fiscalyear` INT NOT NULL -) ENGINE = MYISAM ; - -CREATE TABLE `fundraising_campaigns_segments` ( -`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , -`fundraising_campaigns_id` INT UNSIGNED NOT NULL , -`segment` VARCHAR( 128 ) NOT NULL -) ENGINE = MYISAM ; - -RENAME TABLE `sponsorships_levels` TO `fundraising_donor_levels`; -ALTER TABLE `fundraising_donor_levels` CHANGE `year` `fiscalyear` INT( 11 ) NOT NULL DEFAULT '0'; -RENAME TABLE `fundraising` TO `fundraising_goals`; -ALTER TABLE `fundraising_goals` CHANGE `year` `fiscalyear` INT( 11 ) NOT NULL DEFAULT '0'; -RENAME TABLE `sponsors_logs` TO `fundraising_donor_logs`; -RENAME TABLE `sponsorships` TO `fundraising_donations`; -ALTER TABLE `fundraising_donations` CHANGE `year` `fiscalyear` INT( 11 ) NOT NULL DEFAULT '0'; -ALTER TABLE `fundraising_goals` CHANGE `goal` `budget` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `fundraising_goals` CHANGE `type` `goal` VARCHAR( 32 ) NOT NULL; -ALTER TABLE `fundraising_donations` CHANGE `fundraising_type` `fundraising_goal` VARCHAR( 32 ) NOT NULL; -ALTER TABLE `fundraising_goals` ADD `deadline` DATE NOT NULL; -ALTER TABLE `fundraising_donations` ADD `fundraising_campaigns_id` INT NOT NULL AFTER `fundraising_goal`; diff --git a/db/db.update.143.sql b/db/db.update.143.sql deleted file mode 100644 index f9b2b560..00000000 --- a/db/db.update.143.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `fundraising_goals` SET `goal` = 'sfgeneral', `name` = 'Science Fair - General Funds', `description` = 'General funds donated to the science fair may be allocated as the science fair organizers see fit.' WHERE `goal`='general' AND fiscalyear='-1'; -UPDATE `fundraising_goals` SET `goal` = 'sfawards', `name` = 'Science Fair - Awards', `description` = 'Award Sponsorships are provided to allow an sponsor/donor to give a specific award.' WHERE `goal`='awards' AND fiscalyear='-1'; diff --git a/db/db.update.144.sql b/db/db.update.144.sql deleted file mode 100644 index a5d4363d..00000000 --- a/db/db.update.144.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `fundraising_campaigns` CHANGE `fundraising_goals_id` `fundraising_goal` VARCHAR( 32 ) NOT NULL; diff --git a/db/db.update.145.sql b/db/db.update.145.sql deleted file mode 100644 index dc1e0155..00000000 --- a/db/db.update.145.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `fundraising_donor_logs` ADD `type` VARCHAR( 32 ) NOT NULL; -ALTER TABLE `fundraising_donor_logs` ADD `fundraising_campaigns_id` INT UNSIGNED NULL; -ALTER TABLE `fundraising_donations` ADD `thanked` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no'; -ALTER TABLE `fundraising_donations` ADD `datereceived` DATE NULL DEFAULT NULL; -ALTER TABLE `fundraising_campaigns` ADD `followupdate` DATE NULL DEFAULT NULL AFTER `enddate`; -UPDATE `config` SET category='Fundraising' WHERE var='fiscal_yearend'; -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( 'registered_charity', 'no', 'Fundraising', 'yesno', '', '100', 'Is your organization a registered charity?', '-1'); -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( 'charity_number', '', 'Fundraising', 'text', '', '200', 'Charity Registration Number', '-1'); - diff --git a/db/db.update.146.php b/db/db.update.146.php deleted file mode 100644 index ec62406d..00000000 --- a/db/db.update.146.php +++ /dev/null @@ -1,70 +0,0 @@ -prepare("SELECT * FROM schools WHERE year=?"); - $q->execute([$config['FAIRYEAR']]); - while ($s = $q->fetch(PDO::FETCH_ASSOC)) { - /* Science head */ - if (trim($s['sciencehead']) != '') { - $u = db_update_146_handle($s['sciencehead'], - $s['scienceheademail'], - $s['scienceheadphone'], - 'teacher'); - if ($u != false) { - $stmt = $pdo->prepare("UPDATE schools SET sciencehead_uid=? WHERE id=?"); - $stmt->execute([$u['uid'],$s['id']]); - } - } - - /* Now the principal */ - if (trim($s['principal']) != '') { - $u = db_update_146_handle($s['principal'], - $s['schoolemail'], - $s['phone'], - 'principal'); - if ($u != false) { - $stmt = $pdo->prepare("UPDATE schools SET principal_uid=? WHERE id=?"); - $stmt->execute([$u['uid'],$s['id']]); - } - } - } -} -?> - diff --git a/db/db.update.146.sql b/db/db.update.146.sql deleted file mode 100644 index 5ad70191..00000000 --- a/db/db.update.146.sql +++ /dev/null @@ -1,64 +0,0 @@ -ALTER TABLE `users` CHANGE `types` `types` SET( 'student', 'judge', 'committee', 'volunteer', 'fair', 'sponsor', 'principal', 'teacher', 'parent', 'mentor', 'alumni' ) NOT NULL; - -CREATE TABLE `users_principal` ( - `users_id` INT NOT NULL , - `principal_active` ENUM( 'no', 'yes' ) NOT NULL , - `principal_complete` ENUM( 'no', 'yes' ) NOT NULL -) ENGINE = MYISAM ; - -CREATE TABLE `users_teacher` ( - `users_id` INT NOT NULL , - `teacher_active` ENUM( 'no', 'yes' ) NOT NULL , - `teacher_complete` ENUM( 'no', 'yes' ) NOT NULL -) ENGINE = MYISAM ; - -CREATE TABLE `users_parent` ( - `users_id` INT NOT NULL , - `parent_active` ENUM( 'no', 'yes' ) NOT NULL , - `parent_complete` ENUM( 'no', 'yes' ) NOT NULL -) ENGINE = MYISAM ; - -CREATE TABLE `users_mentor` ( - `users_id` INT NOT NULL , - `mentor_active` ENUM( 'no', 'yes' ) NOT NULL , - `mentor_complete` ENUM( 'no', 'yes' ) NOT NULL -) ENGINE = MYISAM ; - -CREATE TABLE `users_alumni` ( - `users_id` INT NOT NULL , - `alumni_active` ENUM( 'no', 'yes' ) NOT NULL , - `alumni_complete` ENUM( 'no', 'yes' ) NOT NULL -) ENGINE = MYISAM ; - -ALTER TABLE `sponsors` DROP `taxreceiptrequired`; -ALTER TABLE `sponsors` ADD `proposalsubmissiondate` DATE NOT NULL; - -ALTER TABLE `schools` ADD `principal_uid` INT NULL AFTER `principal` , - ADD `sciencehead_uid` INT NULL AFTER `principal_uid` ; - -UPDATE `schools` SET `principal_uid`=NULL WHERE 1; -UPDATE `schools` SET `sciencehead_uid`=NULL WHERE 1; - -DROP TABLE `fundraising_campaigns_segments`; - -CREATE TABLE `fundraising_campaigns_users_link` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `fundraising_campaigns_id` INT UNSIGNED NOT NULL , - `users_uid` INT UNSIGNED NOT NULL -) ENGINE = MYISAM ; - -ALTER TABLE `fundraising_campaigns` ADD `filterparameters` VARCHAR(255) NULL DEFAULT NULL AFTER `fundraising_goal`; - -UPDATE `reports_items` SET field = 'school_principal' WHERE field = 'school_contact'; -UPDATE `reports_items` SET field = 'school_phone' WHERE field = 'school_contactphone'; -UPDATE `reports_items` SET field = 'school_email' WHERE field = 'school_contactemail'; - -UPDATE `reports` SET `desc` = 'List of all schools in the database. Name, address, principal and phone.' WHERE `reports`.`system_report_id` =35; - -ALTER TABLE `fundraising_donations` ADD `supporttype` VARCHAR( 255 ) NOT NULL; - -ALTER TABLE `emails` CHANGE `type` `type` ENUM( 'system', 'user', 'fundraising' ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'system'; -ALTER TABLE `emails` ADD `fundraising_campaigns_id` INT UNSIGNED NULL DEFAULT NULL , -ADD `lastsent` DATETIME NULL DEFAULT NULL; -ALTER TABLE `emails` ADD `bodyhtml` TEXT NULL DEFAULT NULL AFTER `body`; -ALTER TABLE `emails` DROP INDEX `val`; diff --git a/db/db.update.146.user.inc.php b/db/db.update.146.user.inc.php deleted file mode 100644 index d38bac6d..00000000 --- a/db/db.update.146.user.inc.php +++ /dev/null @@ -1,985 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'Participant', 'judge' => 'Judge', - 'committee' => 'Committee Member', 'volunteer' => 'Volunteer', - 'fair' => 'Science Fair', 'sponsor' => 'Sponsor Contact', - 'principal' => 'Principal', - 'teacher' => 'Teacher', - 'parent' => 'Parent', - 'alumni' => 'Alumni', - 'mentor' => 'Mentor'); -$user_types = array_keys($user_what); - -function db146_user_valid_type($type) -{ - global $user_types; - if (is_array($type)) { - foreach ($type as $t) { - if (!in_array($t, $user_types)) - return false; - } - } else { - if (!in_array($type, $user_types)) - return false; - } - return true; -} - -/* - * Duplicate of common.inc.php:generatePassword, which will be deleted - * eventually when ALL users are handled through this file - */ -function db146_user_generate_password($pwlen = 8) -{ - // these are good characters that are not easily confused with other characters :) - $available = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz23456789'; - $len = strlen($available) - 1; - - $key = ''; - for ($x = 0; $x < $pwlen; $x++) - $key .= $available[rand(0, $len)]; - return $key; -} - -/* - * Separate user_load_type functions, these could make additional database - * calls if required - */ -function db146_user_load_fair(&$u) -{ - $u['fair_active'] = ($u['fair_active'] == 'yes') ? 'yes' : 'no'; - $u['fair_complete'] = ($u['fair_complete'] == 'yes') ? 'yes' : 'no'; - // $u['fair_name'] = $u['fair_name']; - // $u['fair_abbrv'] = $u['fair_abbrv']; - return true; -} - -function db146_user_load_student(&$u) -{ - // $u['student_active'] = ($u['student_active'] == 'yes') ? 'yes' : 'no'; - // $u['student_complete'] = ($u['student_complete'] == 'yes') ? 'yes' : 'no'; - return false; -} - -function db146_user_load_judge(&$u) -{ - $u['judge_active'] = ($u['judge_active'] == 'yes') ? 'yes' : 'no'; - $u['judge_complete'] = ($u['judge_complete'] == 'yes') ? 'yes' : 'no'; - $u['years_school'] = intval($u['years_school']); - $u['years_regional'] = intval($u['years_regional']); - $u['years_national'] = intval($u['years_national']); - $u['willing_chair'] = ($u['willing_chair'] == 'yes') ? 'yes' : 'no'; - $u['special_award_only'] = ($u['special_award_only'] == 'yes') ? 'yes' : 'no'; - $u['cat_prefs'] = unserialize($u['cat_prefs']); - $u['div_prefs'] = unserialize($u['div_prefs']); - $u['divsub_prefs'] = unserialize($u['divsub_prefs']); - // $u['expertise_other'] = $u['expertise_other']; - $u['languages'] = unserialize($u['languages']); - // $u['highest_psd'] = $u['highest_psd']; - - /* Sanity check the arrays, make sure they are arrays */ - $should_be_arrays = array('cat_prefs', 'div_prefs', - 'divsub_prefs', 'languages'); - foreach ($should_be_arrays as $k) { - if (!is_array($u[$k])) - $u[$k] = array(); - } - - return true; -} - -function db146_user_load_committee(&$u) -{ - $u['committee_active'] = $u['committee_active']; - $u['emailprivate'] = $u['emailprivate']; - $u['ord'] = intval($u['ord']); - $u['displayemail'] = ($u['displayemail'] == 'yes') ? 'yes' : 'no'; - $u['access_admin'] = ($u['access_admin'] == 'yes') ? 'yes' : 'no'; - $u['access_config'] = ($u['access_config'] == 'yes') ? 'yes' : 'no'; - $u['access_super'] = ($u['access_super'] == 'yes') ? 'yes' : 'no'; - return true; -} - -function db146_user_load_volunteer(&$u) -{ - $u['volunteer_active'] = ($u['volunteer_active'] == 'yes') ? 'yes' : 'no'; - $u['volunteer_complete'] = ($u['volunteer_complete'] == 'yes') ? 'yes' : 'no'; - return true; -} - -function db146_user_load_sponsor(&$u) -{ - $u['sponsors_id'] = intval($u['sponsors_id']); - $u['sponsor_complete'] = ($u['sponsor_complete'] == 'yes') ? 'yes' : 'no'; - $u['sponsor_active'] = ($u['sponsor_active'] == 'yes') ? 'yes' : 'no'; - if ($u['sponsors_id']) { - $q = $pdo->prepare("SELECT * FROM sponsors WHERE id=?"); - $q->execute([0,$u['sponsors_id']]); - $u['sponsor'] = $q->fetch(PDO::FETCH_ASSOC); - } - return true; -} - -function db146_user_load_principal(&$u) -{ - return true; -} - -function db146_user_load_teacher(&$u) -{ - return true; -} - -function db146_user_load_mentor(&$u) -{ - return true; -} - -function db146_user_load_parent(&$u) -{ - return true; -} - -function db146_user_load_alumni(&$u) -{ - return true; -} - -function db146_user_load($user, $uid = false) -{ - /* - * So, it turns out that doing one big load is faster than loading just - * from the users table then loading only the specific types the user - * has.. go figure. - */ - $query = 'SELECT * FROM `users` - LEFT JOIN `users_committee` ON `users_committee`.`users_id`=`users`.`id` - LEFT JOIN `users_judge` ON `users_judge`.`users_id`=`users`.`id` - LEFT JOIN `users_volunteer` ON `users_volunteer`.`users_id`=`users`.`id` - LEFT JOIN `users_fair` ON `users_fair`.`users_id`=`users`.`id` - LEFT JOIN `users_sponsor` ON `users_sponsor`.`users_id`=`users`.`id` - LEFT JOIN `users_principal` ON `users_principal`.`users_id`=`users`.`id` - LEFT JOIN `users_teacher` ON `users_teacher`.`users_id`=`users`.`id` - LEFT JOIN `users_parent` ON `users_parent`.`users_id`=`users`.`id` - LEFT JOIN `users_mentor` ON `users_mentor`.`users_id`=`users`.`id` - LEFT JOIN `users_alumni` ON `users_alumni`.`users_id`=`users`.`id` - WHERE '; - if ($uid != false) { - $uid = intval($uid); - $query .= "`users`.`uid`='$uid' ORDER BY `users`.`year` DESC LIMIT 1"; - } else { - $id = intval($user); - $query .= " `users`.`id`='$id'"; - } - $q = $pdo->prepare($query); - $q->execute(); - - if ($q->rowCount() != 1) { - // echo "Query [$query] returned ".$q->rowCount()." rows\n"; - // echo "
    ";
    -		//		print_r(debug_backtrace());
    -		return false;
    -	}
    -
    -	$ret = $q->fetch(PDO::FETCH_ASSOC);
    -
    -	/*
    -	 * Make sure they're not deleted, we don't want to do this in the query, because loading by $uid would
    -	 * simply return the previous year (where deleted=no)
    -	 */
    -	if ($ret['deleted'] != 'no') {
    -		/* User is deleted */
    -		return false;
    -	}
    -
    -	/* Do we need to do number conversions? */
    -	$ret['id'] = intval($ret['id']);
    -	$ret['uid'] = intval($ret['uid']);
    -	$ret['year'] = intval($ret['year']);
    -
    -	/* Turn the type into an array, because there could be more than one */
    -	$ts = explode(',', $ret['types']);
    -	$ret['types'] = $ts;  /* Now we can use in_array('judge', $ret['types']) ; */
    -
    -	/* Convenience */
    -	$ret['name'] = $ret['firstname'] . ' ' . $ret['lastname'];
    -
    -	foreach ($ret['types'] as $t) {
    -		/*
    -		 * These all pass $ret by reference, and can modify
    -		 * $ret
    -		 */
    -		$r = call_user_func("db146_user_load_$t", $ret);
    -		if ($r != true) {
    -			echo "db146_user_load_$t returned false!\n";
    -			return false;
    -		}
    -
    -		/* It is important that each type database doesn't
    -		have conflicting column names */
    -
    -		/*
    -		 * foreach($r as $k=>$v) {
    -		 * 			if(array_key_exists($k, $ret)) {
    -		 * 				echo "DATABASE DESIGN ERROR, duplicate user key $k";
    -		 * 				exit;
    -		 * 			}
    -		 * 		}
    -		 * 		$ret = array_merge($ret, $r);
    -		 */
    -	}
    -
    -	/* Do this assignment without recursion :) */
    -	unset($ret['orig']);
    -	$orig = $ret;
    -	$ret['orig'] = $orig;
    -
    -	/*
    -	 * echo "
    User load returning: \n";
    -	 * 	print_r($ret);
    -	 * 	echo "
    "; - */ - return $ret; -} - -function db146_user_load_by_uid($uid) -{ - return db146_user_load(0, $uid); -} - -function db146_user_load_by_email($email) -{ - /* Find the most recent uid for the email, regardless of deleted status */ - $e = $email; - $q = $pdo->prepare("SELECT uid FROM users WHERE email=? OR username=? ORDER BY year DESC LIMIT 1"); - $q->execute([$e,$e]); - - if ($q->rowCount() == 1) { - $i = $q->fetch(PDO::FETCH_ASSOC); - return db146_user_load_by_uid($i['uid']); - } - return false; -} - -function db146_user_load_by_uid_year($uid, $year) -{ - $q = $pdo->prepare("SELECT id FROM users WHERE uid=? AND year <=?"); - $q->execute([$uid,$year]); - if (!$q->rowCount()) - return false; - $i = $q->fetch(PDO::FETCH_ASSOC); - return db146_user_load($i['id']); -} - -function db146_user_set_password($id, $password = NULL) -{ - /* pass $u by reference so we can update it */ - $save_old = false; - if ($password == NULL) { - $q = $pdo->prepare("SELECT passwordset FROM users WHERE id=?"); - $q->execute([$id]); - $u = $q->fetch(PDO::FETCH_ASSOC); - /* Generate a new password */ - $password = db146_user_generate_password(12); - /* save the old password only if it's not an auto-generated one */ - if ($u['passwordset'] != '0000-00-00') - $save_old = true; - /* Expire the password */ - $save_set = "'0000-00-00'"; - } else { - /* Set the password, no expiry, save the old */ - $save_old = true; - $save_set = 'NOW()'; - } - - $p = $password; - $set = ($save_old == true) ? 'oldpassword=password, ' : ''; - $set .= "password='$p', passwordset=$save_set "; - - $query = "UPDATE users SET ? WHERE id=?"; - $stmt = $pdo->prepare($query); - $stmt->execute([$set,$id]); - show_pdo_errors_if_any($pdo); - - return $password; -} - -function db146_user_save_type_list($u, $db, $fields) -{ - /* echo "
     save type list $db";
    -		print_r($u);
    -		echo "
    ";*/ - $set = ''; - - foreach ($fields as $f) { - /* == even works on arrays in PHP */ - if ($u[$f] == $u['orig'][$f]) - continue; - - if ($set != '') - $set .= ','; - - if ($u[$f] == NULL) { - $set .= "$f=NULL"; - continue; - } - - if (is_array($u[$f])) - $data = serialize($u[$f]); - else - $data = stripslashes($u[$f]); - - $set .= "`$f`='$data'"; - } - if ($set != '') { - $query = "UPDATE ? SET ? WHERE users_id=?"; - $stmt = $pdo->prepare($query); - $stmt->execute([$db,$set,$u['id']]); - if ($pdo->errorInfo()) { - show_pdo_errors_if_any($pdo); - echo error("Full query: $query"); - } - } -} - -function db146_user_save_volunteer($u) -{ - $fields = array('volunteer_active', 'volunteer_complete'); - db146_user_save_type_list($u, 'users_volunteer', $fields); -} - -function db146_user_save_committee($u) -{ - $fields = array('committee_active', 'emailprivate', 'ord', 'displayemail', 'access_admin', - 'access_config', 'access_super'); - db146_user_save_type_list($u, 'users_committee', $fields); -} - -function db146_user_save_judge($u) -{ - $fields = array('judge_active', 'judge_complete', 'years_school', 'years_regional', 'years_national', - 'willing_chair', 'special_award_only', - 'cat_prefs', 'div_prefs', 'divsub_prefs', - 'expertise_other', 'languages', 'highest_psd'); - db146_user_save_type_list($u, 'users_judge', $fields); -} - -function db146_user_save_student($u) -{ - // $fields = array('student_active','student_complete'); - // user_save_type_list($u, 'users_student', $fields); -} - -function db146_user_save_fair($u) -{ - $fields = array('fair_active', 'fairs_id'); - db146_user_save_type_list($u, 'users_fair', $fields); -} - -function db146_user_save_sponsor($u) -{ - $fields = array('sponsors_id', 'sponsor_active', 'sponsor_complete', 'primary', 'position', 'notes'); - db146_user_save_type_list($u, 'users_sponsor', $fields); -} - -function db146_user_save_teacher($u) {} - -function db146_user_save_principal($u) {} - -function db146_user_save_mentor($u) {} - -function db146_user_save_alumni($u) {} - -function db146_user_save_parent($u) {} - -function db146_user_save(&$u) -{ - /* Add any new types */ - $added = array_diff($u['types'], $u['orig']['types']); - foreach ($added as $t) { - if (!db146_user_add_role_allowed($t, $u)) { - echo "HALT: user can't add this type"; - exit; - } - // give em a record, the primary key on the table takes care of uniqueness - $q = $pdo->prepare("INSERT INTO users_? (users_id) VALUES (?)"); - $q->execute([$t,$u['id']]); - } - - $fields = array('salutation', 'firstname', 'lastname', 'username', - 'email', - 'phonehome', 'phonework', 'phonecell', 'fax', 'organization', - 'address', 'address2', 'city', 'province', 'postalcode', 'sex', - 'firstaid', 'cpr', 'types'); - - $set = ''; - foreach ($fields as $f) { - if ($u[$f] == $u['orig'][$f]) - continue; - - if ($set != '') - $set .= ','; - - if ($f == 'types') - $set .= "$f='" . implode(',', $u[$f]) . "'"; - else { - $data = stripslashes($u[$f]); - $set .= "$f='$data'"; - } - } - // echo "
    ";
    -	//	print_r($u);
    -	//	echo "
    "; - if ($set != '') { - $query = "UPDATE users SET ? WHERE id=?"; - $stmt = $pdo->prepare($query); - $stmt->execute([$set,$u['id']]); - // echo "query=[$query]"; - show_pdo_errors_if_any($pdo); - } - - /* Save the password if it changed */ - if ($u['password'] != $u['orig']['password']) - db146_user_set_password($u['id'], $u['password']); - - /* Save types */ - foreach ($u['types'] as $t) { - call_user_func("db146_user_save_$t", $u); - } - - /* Should we do this? */ - /* Record all the data in orig that we saved */ - unset($u['orig']); - $orig = $u; - $u['orig'] = $orig; - - // print_r($u); -} - -/* - * Delete functions. These mark a user as deleted, and delete references to other - * tables - */ - -function db146_user_delete_committee($u) -{ - $stmt = $pdo->prepare("DELETE FROM committees_link WHERE users_uid=?"); - $stmt->execute([$u['uid']]); -} - -function db146_user_delete_volunteer($u) {} - -function db146_user_delete_judge($u) -{ - global $config; - $id = $u['id']; - $stmt = $pdo->prepare("DELETE FROM judges_teams_link WHERE users_id=?"); - $stmt->execute([$id]); - $stmt = $pdo->prepare("DELETE FROM judges_specialawards_sel WHERE users_id=?"); - $stmt->execute([$id]); -} - -function db146_user_delete_fair($u) {} - -function db146_user_delete_student($u) {} - -function db146_user_delete_sponsor($u) {} - -function db146_user_delete_principal($u) {} - -function db146_user_delete_teacher($u) {} - -function db146_user_delete_parent($u) {} - -function db146_user_delete_mentor($u) {} - -function db146_user_delete_alumni($u) {} - -function db146_user_delete($u, $type = false) -{ - $finish_delete = false; - - if (!is_array($u)) { - $u = db146_user_load($u); - } - if ($type != false) { - if (!in_array($type, $u['types'])) { - /* - * Hum, type specified, but the user is not this type, - * so, i guess we're done. - */ - return; - } - if (count($u['types']) > 1) { - /* Don't delete the whole user */ - $types = ''; - foreach ($u['types'] as $t) { - if ($t == $type) - continue; - if ($types != '') - $types .= ','; - $types .= $t; - } - $stmt = $pdo->prepare("UPDATE users SET types=? WHERE id=?"); - $stmt->execute([$types,$u['id']]); - } else { - $finish_delete = true; - } - call_user_func("db146_user_delete_$type", $u); - } else { - /* Delete the whole user */ - if (is_array($u['types'])) { - foreach ($u['types'] as $t) - call_user_func("db146_user_delete_$t", $u); - } - $finish_delete = true; - } - if ($finish_delete == true) { - $stmt = $pdo->prepare("UPDATE users SET deleted='yes', deleteddatetime=NOW() WHERE id=?"); - $stmt->execute([$u['id']]); - } -} - -/* - * Purge functions. These completely eliminate all traces of a user from the - * database. This action cannot be undone. We prefer the committee to use the - * "delete" functions, which simply mark the account as "deleted". - */ - -function db146_user_purge($u, $type = false) -{ - $finish_purge = false; - - if (!is_array($u)) { - $u = db146_user_load($u); - } - if ($type != false) { - if (!in_array($type, $u['types'])) { - /* - * Hum, type specified, but the user is not this type, - * so, i guess we're done. - */ - return; - } - if (count($u['types']) > 1) { - /* Don't delete the whole user */ - $types = ''; - foreach ($u['types'] as $t) { - if ($t == $type) - continue; - if ($types != '') - $types .= ','; - $types .= $t; - } - $stmt = $pdo->prepare("UPDATE users SET types=? WHERE id=?"); - $stmt->execute([$types,$u['id']]); - } else { - $finish_purge = true; - } - - /* - * Call the delete func to deal with table linking, then completely wipe - * out the entry - */ - call_user_func("db146_user_delete_$type", $u); - // call_user_func("user_purge_$type", $u); - $stmt = $pdo->prepare("DELETE FROM users_? WHERE users_id=?"); - $stmt->execute([$type,$u['id']]); - } else { - /* Delete the whole user */ - foreach ($u['types'] as $t) { - call_user_func("db146_user_delete_$t", $u); - // call_user_func("user_purge_$t", $u); - $stmt = $pdo->prepare("DELETE FROM users_? WHERE users_id=?"); - $stmt->execute([$t,$u['id']]); - } - $finish_purge = true; - } - if ($finish_purge == true) { - $stmt = $pdo->prepare("DELETE FROM users WHERE id=?"); - $stmt->execute([$u['id']]); - } -} - -/* Duplicate a row in the users table, or any one of the users_* tables. */ -function db146_user_dupe_row($db, $key, $val, $newval) -{ - global $config; - $nullfields = array('deleteddatetime'); /* Fields that can be null */ - $q = $pdo->prepare("SELECT * FROM ? WHERE ?=?"); - $q->execute([$db,$key,$val]); - if ($q->rowCount() != 1) { - echo "ERROR duplicating row in $db: $key=$val NOT FOUND.\n"; - exit; - } - $i = $q->fetch(PDO::FETCH_ASSOC); - $i[$key] = $newval; - - foreach ($i as $k => $v) { - if ($v == NULL && in_array($k, $nullfields)) - $i[$k] = 'NULL'; - else if ($k == 'year') - $i[$k] = $config['FAIRYEAR']; - else - $i[$k] = "'" . $v . "'"; - } - - $keys = '`' . join('`,`', array_keys($i)) . '`'; - $vals = join(',', array_values($i)); - - $q = "INSERT INTO ? (?) VALUES (?)"; - // echo "Dupe Query: [$q]"; - $r = $pdo->prepare($q); - $r->execute([$db,$keys,$vals]); - show_pdo_errors_if_any($pdo); - - $id = $pdo->lastInsertId(); - return $id; -} - -/* Used by the login scripts to copy one user from one year to another */ -function db146_user_dupe($u, $new_year) -{ - /* - * Dupe a user if: - * - They don't exist in the current year - * (users->year != the target year (passed in so we can use it in the rollover script) ) - * - They have a previous year entry - * (users->year DESC LIMIT 1 == 1 row) - * - That previous entry has deleted=no - */ - - /* Find the last entry */ - $q = $pdo->prepare("SELECT id,uid,year,deleted FROM users WHERE uid=? - ORDER BY year DESC LIMIT 1"); - $q->execute([$u['uid']]); - $r = $q->fetch(PDO::FETCH_OBJ); - if ($r->deleted == 'yes') { - echo "Cannot duplicate user ID {$u['id']}, they are deleted. Undelete them first.\n"; - exit; - } - if ($r->year == $new_year) { - echo "Cannot duplicate user ID {$u['id']}, they already exist in year $new_year\n"; - exit; - } - - $id = db146_user_dupe_row('users', 'id', $u['id'], NULL); - $q = $pdo->prepare("UPDATE users SET year=? WHERE id=?"); - - $q->execute([$new_year,$id]); - /* Load the new user */ - $u2 = db146_user_load($id); - - foreach ($u2['types'] as $t) { - db146_user_dupe_row("users_$t", 'users_id', $u['id'], $id); - } - /* Return the ID of the new user */ - return $id; -} - -/* - * Returns true if loaded user ($u) is allowed to add role type $type to their - * profile. THis is intended as a last-stop mechanism, preventing, for example - * a student from co-existing with any other account type. - */ -function db146_user_add_role_allowed($type, $u) -{ - /* - * For example, a committee member can add a volunteer or judge role to - * their account. - */ - $allowed = array( - 'committee' => array('volunteer', 'judge', 'sponsor', 'principal', 'teacher', 'parent', 'mentor', 'alumni'), - 'volunteer' => array('judge', 'committee', 'sponsor', 'principal', 'teacher', 'parent', 'mentor', 'alumni'), - 'judge' => array('volunteer', 'committee', 'sponsor', 'principal', 'teacher', 'parent', 'mentor', 'alumni'), - 'student' => array(), - 'fair' => array(), - 'sponsor' => array('volunteer', 'judge', 'sponsor', 'principal', 'teacher', 'parent', 'mentor', 'alumni'), - 'principal' => array('volunteer', 'judge', 'sponsor', 'committee', 'teacher', 'parent', 'mentor', 'alumni'), - 'teacher' => array('volunteer', 'judge', 'sponsor', 'principal', 'committee', 'parent', 'mentor', 'alumni'), - 'parent' => array('volunteer', 'judge', 'sponsor', 'principal', 'teacher', 'committee', 'mentor', 'alumni'), - 'mentor' => array('volunteer', 'judge', 'sponsor', 'principal', 'teacher', 'parent', 'committee', 'alumni'), - 'alumni' => array('volunteer', 'judge', 'sponsor', 'principal', 'teacher', 'parent', 'mentor', 'committee'), - ); - - foreach ($u['types'] as $ut) { - $allowed_array = $allowed[$ut]; - if (in_array($type, $allowed[$ut])) - return true; - } - return false; -} - -function db146_user_create($type, $username, $u = NULL) -{ - global $config; - if (!is_array($u)) { - $stmt = $pdo->prepare("INSERT INTO users (`types`,`username`,`passwordset`,`created`,`year`) - VALUES (?,?,'0000-00-00', NOW(),?)"); - $stmt->execute([$type,$username,$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - $uid = $pdo->lastInsertId(); - if (db146_user_valid_email($username)) { - $stmt = $pdo->prepare("UPDATE users SET email=? WHERE id=?"); - $stmt->execute([$username,$uid]); - } - - $stmt = $pdo->prepare("UPDATE users SET uid=? WHERE id=?"); - $stmt->execute([$uid,$uid]); - show_pdo_errors_if_any($pdo); - db146_user_set_password($uid, NULL); - - /* - * Since the user already has a type, user_save won't create this - * entry for us, so do it here - */ - $stmt = $pdo->prepare("INSERT INTO users_? (users_id) VALUES(?)"); - $stmt->execute([$type,$uid]); - show_pdo_errors_if_any($pdo); - /* Load the complete user */ - $u = db146_user_load($uid); - } else { - /* - * The user has been specified and already exists, - * just add a role - */ - $uid = $u['uid']; - if (!db146_user_add_role_allowed($type, $u)) { - /* If we get in here, someone is hand crafting URLs */ - echo 'HALT: invalid role add specified for operation.'; - exit; - } - /* Ensure we have a full user, and add the type to the existing user */ - $u = db146_user_load_by_uid($uid); - $u['types'][] = $type; - } - /* Activate the new type, and save, then return the user */ - $u["{$type}_active"] = 'yes'; - db146_user_save($u); - return $u; -} - -function db146_user_valid_user($user) -{ - /* - * Find any character that doesn't match the valid username characters - * (^ inverts the matching remember - */ - $x = preg_match('[^a-zA-Z0-9@.-_]', $user); - - /* If x==1, a match was found, and the input is bad */ - return ($x == 1) ? false : true; -} - -function db146_user_valid_password($pass) -{ - /* Same as user, but allow more characters */ - $x = preg_match('[^a-zA-Z0-9 ~!@#$%^&*()-_=+|;:,<.>/?]', $pass); - - /* If x==1, a match was found, and the input is bad */ - if ($x == 1) - return false; - - if (strlen($pass) < 6) - return false; - - return true; -} - -/* A more strict version of isEmailAddress() */ -function db146_user_valid_email($str) -{ - if (eregi('^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})$', $str)) - return true; - return false; -} - -/* - * Perform some checks. Make sure the person is logged in, and that their - * password hasn't expired (the password_expired var is set in the login page) - */ -function db146_user_auth_required($type, $access = '') -{ - global $config; - if (!isset($_SESSION['users_type'])) { - message_push(error(i18n('You must login to view that page'))); - header("location: {$config['SFIABDIRECTORY']}/user_login.php?type=$type"); - exit; - } - - if ($_SESSION['users_type'] != $type) { - message_push(error(i18n('You must login to view that page'))); - header("location: {$config['SFIABDIRECTORY']}/user_login.php?type=$type"); - exit; - } - - if ($_SESSION['password_expired'] == true) { - header("location: {$config['SFIABDIRECTORY']}/user_password.php"); - exit; - } - - if ($access != '') { - if ($type != 'committee') { - echo 'CRITICAL ERROR, cannot check access in user_auth_required without specifying type=committee'; - exit; - } - - if (committee_auth_has_access($access) == false) { - message_push(error(i18n('You do not have permission to view that page'))); - header("Location: {$config['SFIABDIRECTORY']}/committee_main.php"); - exit; - } - } - return true; -} - -function db146_user_volunteer_registration_status() -{ - global $config; - // $now = date('Y-m-d H:i:s'); - // if($now < $config['dates']['judgeregopen']) return "notopenyet"; - // if($now > $config['dates']['judgeregclose']) return "closed"; - return 'open'; -} - -function db146_user_judge_registration_status() -{ - global $config; - $now = date('Y-m-d H:i:s'); - if ($now < $config['dates']['judgeregopen']) - return 'notopenyet'; - if ($now > $config['dates']['judgeregclose']) - return 'closed'; - return 'open'; -} - -$user_personal_fields_map = array( - 'salutation' => array('salutation'), - 'name' => array('firstname', 'lastname'), - 'email' => array('email'), - 'sex' => array('sex'), - 'phonehome' => array('phonehome'), - 'phonework' => array('phonework'), - 'phonecell' => array('phonecell'), - 'fax' => array('fax'), - 'org' => array('organization'), - 'birthdate' => array('birthdate'), - 'lang' => array('lang'), - 'address' => array('address', 'address2', 'postalcode'), - 'city' => array('city'), - 'province' => array('province'), - 'firstaid' => array('firstaid', 'cpr') -); - -function db146_user_personal_fields($type) -{ - global $config, $user_personal_fields_map; - $ret = array('firstname', 'lastname', 'email'); - $fields = $config["{$type}_personal_fields"]; - if ($fields != '') { - $fields = split(',', $fields); - foreach ($fields as $f) { - $ret = array_merge($ret, $user_personal_fields_map[$f]); - } - } - return $ret; -} - -function db146_user_personal_required_fields($type) -{ - global $config, $user_personal_fields_map; - $ret = array('firstname', 'lastname', 'email'); - $required = $config["{$type}_personal_required"]; - if ($required != '') { - $fields = split(',', $required); - foreach ($fields as $f) { - $ret = array_merge($ret, $user_personal_fields_map[$f]); - } - } - - /* - * Filter some elements that are never required. - * - address2 - */ - $ret = array_diff($ret, array('address2')); - return $ret; -} - -function db146_user_personal_info_status(&$u) -{ - $required = array(); - foreach ($u['types'] as $t) { - $required = array_merge($required, - db146_user_personal_required_fields($t)); - } - foreach ($required as $r) { - $val = trim($u[$r]); - - if (strlen($val) > 0) { - /* Ok */ - } else { - return 'incomplete'; - } - } - - /* - * FIXME: somehow call the $type _status_update() function db146_to update - * the individual $type _complete entry? - */ - return 'complete'; -} - -/* user_{$type}_login() is called with a full $u loaded */ -function db146_user_committee_login($u) -{ - /* Double check, make sure the user is of this type */ - if (!in_array('committee', $u['types'])) { - echo "ERROR: attempted to login committee on a non-committee user\n"; - exit; - } - - $_SESSION['access_admin'] = $u['access_admin']; // == 'yes') ? true : false; - $_SESSION['access_config'] = $u['access_config']; // == 'yes') ? true : false; - $_SESSION['access_super'] = $u['access_super']; // == 'yes') ? true : false; -} - -function db146_user_fair_login($u) -{ - /* Double check, make sure the user is of this type */ - if (!in_array('fair', $u['types'])) { - echo "ERROR: attempted to login fair on a non-fair user\n"; - exit; - } - - $_SESSION['fairs_id'] = $u['fairs_id']; // == 'yes') ? true : false; -} - -?> diff --git a/db/db.update.147.sql b/db/db.update.147.sql deleted file mode 100644 index 0fcc1873..00000000 --- a/db/db.update.147.sql +++ /dev/null @@ -1,21 +0,0 @@ -ALTER TABLE `reports` CHANGE `type` `type` ENUM( 'student', 'judge', 'award', 'committee', 'school', 'volunteer', 'tour', 'fair', 'fundraising' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'student'; - -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '47', 'Labels -- Fundraising Campaign Mailing Labels', 'Mailing labels for all the contacts attached to a fundraising campaign', 'The Grant Brothers', 'fundraising'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'fit_columns', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'field_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 7, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 8, 'stock', '5163', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'namefl', '', 5, 5, 95, 12, 1, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 1, 'address', '', 5, 30, 95, 24, 2, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 2, 'city_prov', '', 5, 60, 95, 12, 1, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 3, 'postal', '', 5, 80, 95, 12, 1, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 4, 'user_filter', '', 99, 99, 1, 1, 1, '', 'center vcenter'); - - diff --git a/db/db.update.148.sql b/db/db.update.148.sql deleted file mode 100644 index 620c40fe..00000000 --- a/db/db.update.148.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `fundraising_donations` DROP `users_uid` ; -ALTER TABLE `fundraising_donations` ADD `receiptrequired` ENUM( 'no', 'yes' ) NOT NULL AFTER `thanked` ; -ALTER TABLE `fundraising_donations` ADD `receiptsent` ENUM( 'no', 'yes' ) NOT NULL AFTER `receiptrequired` ; - diff --git a/db/db.update.149.php b/db/db.update.149.php deleted file mode 100644 index d8fde077..00000000 --- a/db/db.update.149.php +++ /dev/null @@ -1,50 +0,0 @@ -prepare('SELECT * FROM emergencycontact'); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $relation = strtolower(trim($r->relation)); - if (levenshtein('parent', $relation) < 2 || - levenshtein('mother', $relation) < 3 || - levenshtein('father', $relation) < 3 || - levenshtein('mom', $relation) < 2 || - levenshtein('mere', $relation) < 3 || - levenshtein('dad', $relation) < 2 || - levenshtein('pere', $relation) < 3 || - strstr($relation, 'dad') || - strstr($relation, 'mom') || - (strstr($relation, 'mother') && !strstr($relation, 'grand')) || - (strstr($relation, 'father') && !strstr($relation, 'grand'))) { - echo "YES: $r->firstname $r->lastname with relation '$r->relation' looks like a parent\n"; - if ($r->email) { - echo " Have email, creating record - $r->email\n"; - if ($u = db149_user_load_by_email($r->email)) { - echo " This user already exists, linking parent record to their account!\n"; - if (!in_array('parent', $u['types'])) - db149_user_create('parent', $r->email, $u); - else - echo " - Already a parent, no need to re-add!\n"; - } else { - echo "Creating new parent record\n"; - $u = db149_user_create('parent', $r->email); - $u['firstname'] = $r->firstname; - $u['lastname'] = $r->lastname; - $u['phonehome'] = $r->phone1; - $u['phonework'] = $r->phone2; - db149_user_save($u); - } - } else { - echo " No email address, skipping\n"; - } - } else { - echo "NO: $r->firstname $r->lastname with relation '$r->relation' is NOT a parent\n"; - } - } -} -?> diff --git a/db/db.update.149.sql b/db/db.update.149.sql deleted file mode 100644 index e69de29b..00000000 diff --git a/db/db.update.149.user.inc.php b/db/db.update.149.user.inc.php deleted file mode 100644 index bf35bdde..00000000 --- a/db/db.update.149.user.inc.php +++ /dev/null @@ -1,988 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2024 AlgoLibre Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'Participant', 'judge' => 'Judge', - 'committee' => 'Committee Member', 'volunteer' => 'Volunteer', - 'fair' => 'Science Fair', 'sponsor' => 'Sponsor Contact', - 'principal' => 'Principal', - 'teacher' => 'Teacher', - 'parent' => 'Parent', - 'alumni' => 'Alumni', - 'mentor' => 'Mentor'); -$user_types = array_keys($user_what); - -function db149_user_valid_type($type) -{ - global $user_types; - if (is_array($type)) { - foreach ($type as $t) { - if (!in_array($t, $user_types)) - return false; - } - } else { - if (!in_array($type, $user_types)) - return false; - } - return true; -} - -/* - * Duplicate of common.inc.php:generatePassword, which will be deleted - * eventually when ALL users are handled through this file - */ -function db149_user_generate_password($pwlen = 8) -{ - // these are good characters that are not easily confused with other characters :) - $available = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz23456789'; - $len = strlen($available) - 1; - - $key = ''; - for ($x = 0; $x < $pwlen; $x++) - $key .= $available[rand(0, $len)]; - return $key; -} - -/* - * Separate user_load_type functions, these could make additional database - * calls if required - */ -function db149_user_load_fair(&$u) -{ - $u['fair_active'] = ($u['fair_active'] == 'yes') ? 'yes' : 'no'; - $u['fair_complete'] = ($u['fair_complete'] == 'yes') ? 'yes' : 'no'; - // $u['fair_name'] = $u['fair_name']; - // $u['fair_abbrv'] = $u['fair_abbrv']; - return true; -} - -function db149_user_load_student(&$u) -{ - // $u['student_active'] = ($u['student_active'] == 'yes') ? 'yes' : 'no'; - // $u['student_complete'] = ($u['student_complete'] == 'yes') ? 'yes' : 'no'; - return false; -} - -function db149_user_load_judge(&$u) -{ - $u['judge_active'] = ($u['judge_active'] == 'yes') ? 'yes' : 'no'; - $u['judge_complete'] = ($u['judge_complete'] == 'yes') ? 'yes' : 'no'; - $u['years_school'] = intval($u['years_school']); - $u['years_regional'] = intval($u['years_regional']); - $u['years_national'] = intval($u['years_national']); - $u['willing_chair'] = ($u['willing_chair'] == 'yes') ? 'yes' : 'no'; - $u['special_award_only'] = ($u['special_award_only'] == 'yes') ? 'yes' : 'no'; - $u['cat_prefs'] = unserialize($u['cat_prefs']); - $u['div_prefs'] = unserialize($u['div_prefs']); - $u['divsub_prefs'] = unserialize($u['divsub_prefs']); - // $u['expertise_other'] = $u['expertise_other']; - $u['languages'] = unserialize($u['languages']); - // $u['highest_psd'] = $u['highest_psd']; - - /* Sanity check the arrays, make sure they are arrays */ - $should_be_arrays = array('cat_prefs', 'div_prefs', - 'divsub_prefs', 'languages'); - foreach ($should_be_arrays as $k) { - if (!is_array($u[$k])) - $u[$k] = array(); - } - - return true; -} - -function db149_user_load_committee(&$u) -{ - $u['committee_active'] = $u['committee_active']; - $u['emailprivate'] = $u['emailprivate']; - $u['ord'] = intval($u['ord']); - $u['displayemail'] = ($u['displayemail'] == 'yes') ? 'yes' : 'no'; - $u['access_admin'] = ($u['access_admin'] == 'yes') ? 'yes' : 'no'; - $u['access_config'] = ($u['access_config'] == 'yes') ? 'yes' : 'no'; - $u['access_super'] = ($u['access_super'] == 'yes') ? 'yes' : 'no'; - return true; -} - -function db149_user_load_volunteer(&$u) -{ - $u['volunteer_active'] = ($u['volunteer_active'] == 'yes') ? 'yes' : 'no'; - $u['volunteer_complete'] = ($u['volunteer_complete'] == 'yes') ? 'yes' : 'no'; - return true; -} - -function db149_user_load_sponsor(&$u) -{ - $u['sponsors_id'] = intval($u['sponsors_id']); - $u['sponsor_complete'] = ($u['sponsor_complete'] == 'yes') ? 'yes' : 'no'; - $u['sponsor_active'] = ($u['sponsor_active'] == 'yes') ? 'yes' : 'no'; - if ($u['sponsors_id']) { - $q = $pdo->prepare("SELECT * FROM sponsors WHERE id=?"); - $q->execute([$u['sponsors_id']]); - $u['sponsor'] = $q->fetch(PDO::FETCH_ASSOC); - } - return true; -} - -function db149_user_load_principal(&$u) -{ - return true; -} - -function db149_user_load_teacher(&$u) -{ - return true; -} - -function db149_user_load_mentor(&$u) -{ - return true; -} - -function db149_user_load_parent(&$u) -{ - return true; -} - -function db149_user_load_alumni(&$u) -{ - return true; -} - -function db149_user_load($user, $uid = false) -{ - /* - * So, it turns out that doing one big load is faster than loading just - * from the users table then loading only the specific types the user - * has.. go figure. - */ - $query = 'SELECT * FROM `users` - LEFT JOIN `users_committee` ON `users_committee`.`users_id`=`users`.`id` - LEFT JOIN `users_judge` ON `users_judge`.`users_id`=`users`.`id` - LEFT JOIN `users_volunteer` ON `users_volunteer`.`users_id`=`users`.`id` - LEFT JOIN `users_fair` ON `users_fair`.`users_id`=`users`.`id` - LEFT JOIN `users_sponsor` ON `users_sponsor`.`users_id`=`users`.`id` - LEFT JOIN `users_principal` ON `users_principal`.`users_id`=`users`.`id` - LEFT JOIN `users_teacher` ON `users_teacher`.`users_id`=`users`.`id` - LEFT JOIN `users_parent` ON `users_parent`.`users_id`=`users`.`id` - LEFT JOIN `users_mentor` ON `users_mentor`.`users_id`=`users`.`id` - LEFT JOIN `users_alumni` ON `users_alumni`.`users_id`=`users`.`id` - WHERE '; - if ($uid != false) { - $uid = intval($uid); - $query .= "`users`.`uid`=? ORDER BY `users`.`year` DESC LIMIT 1"; - } else { - $id = intval($user); - $query .= " `users`.`id`=?"; - } - $q = $pdo->prepare($query); - $q->execute([$uid,$id]); - if ($q->rowCount() != 1) { - // echo "Query [$query] returned ".$q->rowCount()." rows\n"; - // echo "
    ";
    -		//		print_r(debug_backtrace());
    -		return false;
    -	}
    -
    -	$ret = $q->fetch(PDO::FETCH_ASSOC);
    -
    -	/*
    -	 * Make sure they're not deleted, we don't want to do this in the query, because loading by $uid would
    -	 * simply return the previous year (where deleted=no)
    -	 */
    -	if ($ret['deleted'] != 'no') {
    -		/* User is deleted */
    -		return false;
    -	}
    -
    -	/* Do we need to do number conversions? */
    -	$ret['id'] = intval($ret['id']);
    -	$ret['uid'] = intval($ret['uid']);
    -	$ret['year'] = intval($ret['year']);
    -
    -	/* Turn the type into an array, because there could be more than one */
    -	$ts = explode(',', $ret['types']);
    -	$ret['types'] = $ts;  /* Now we can use in_array('judge', $ret['types']) ; */
    -
    -	/* Convenience */
    -	$ret['name'] = $ret['firstname'] . ' ' . $ret['lastname'];
    -
    -	foreach ($ret['types'] as $t) {
    -		/*
    -		 * These all pass $ret by reference, and can modify
    -		 * $ret
    -		 */
    -		$r = call_user_func("db149_user_load_$t", $ret);
    -		if ($r != true) {
    -			echo "db149_user_load_$t returned false!\n";
    -			return false;
    -		}
    -
    -		/* It is important that each type database doesn't
    -		have conflicting column names */
    -
    -		/*
    -		 * foreach($r as $k=>$v) {
    -		 * 			if(array_key_exists($k, $ret)) {
    -		 * 				echo "DATABASE DESIGN ERROR, duplicate user key $k";
    -		 * 				exit;
    -		 * 			}
    -		 * 		}
    -		 * 		$ret = array_merge($ret, $r);
    -		 */
    -	}
    -
    -	/* Do this assignment without recursion :) */
    -	unset($ret['orig']);
    -	$orig = $ret;
    -	$ret['orig'] = $orig;
    -
    -	/*
    -	 * echo "
    User load returning: \n";
    -	 * 	print_r($ret);
    -	 * 	echo "
    "; - */ - return $ret; -} - -function db149_user_load_by_uid($uid) -{ - return db149_user_load(0, $uid); -} - -function db149_user_load_by_email($email) -{ - /* Find the most recent uid for the email, regardless of deleted status */ - $e = $email; - $q = $pdo->prepare("SELECT uid FROM users WHERE email=? OR username=? ORDER BY year DESC LIMIT 1"); - $q->execute([$e,$e]); - - if ($q->rowCount() == 1) { - $i = $q->fetch(PDO::FETCH_ASSOC); - return db149_user_load_by_uid($i['uid']); - } - return false; -} - -function db149_user_load_by_uid_year($uid, $year) -{ - $q = $pdo->prepare("SELECT id FROM users WHERE uid=? AND year <=?"); - $q->execute([$uid,$year]); - if (!$q->rowCount()) - return false; - $i = $q->fetch(PDO::FETCH_ASSOC); - return db149_user_load($i['id']); -} - -function db149_user_set_password($id, $password = NULL) -{ - /* pass $u by reference so we can update it */ - $save_old = false; - if ($password == NULL) { - $q = $pdo->prepare("SELECT passwordset FROM users WHERE id=?"); - $q->execute([$id]); - $u = $q->fetch(PDO::FETCH_ASSOC); - /* Generate a new password */ - $password = db149_user_generate_password(12); - /* save the old password only if it's not an auto-generated one */ - if ($u['passwordset'] != '0000-00-00') - $save_old = true; - /* Expire the password */ - $save_set = "'0000-00-00'"; - } else { - /* Set the password, no expiry, save the old */ - $save_old = true; - $save_set = 'NOW()'; - } - - $p = $password; - $set = ($save_old == true) ? 'oldpassword=password, ' : ''; - $set .= "password='$p', passwordset=$save_set "; - - $query = "UPDATE users SET ? WHERE id=?"; - $stmt = $pdo->prepare($query); - $stmt->execute([$set,$id]); - show_pdo_errors_if_any($pdo); - - return $password; -} - -function db149_user_save_type_list($u, $db, $fields) -{ - /* echo "
     save type list $db";
    -		print_r($u);
    -		echo "
    ";*/ - $set = ''; - - foreach ($fields as $f) { - /* == even works on arrays in PHP */ - if ($u[$f] == $u['orig'][$f]) - continue; - - if ($set != '') - $set .= ','; - - if ($u[$f] == NULL) { - $set .= "$f=NULL"; - continue; - } - - if (is_array($u[$f])) - $data = serialize($u[$f]); - else - $data = stripslashes($u[$f]); - - $set .= "`$f`='$data'"; - } - if ($set != '') { - $query = "UPDATE ? SET ? WHERE users_id=?"; - $stmt = $pdo->prepare($query); - $stmt->execute([$db,$set,$u['id']]); - if ($pdo->errorInfo()) { - show_pdo_errors_if_any($pdo); - echo error("Full query: $query"); - } - } -} - -function db149_user_save_volunteer($u) -{ - $fields = array('volunteer_active', 'volunteer_complete'); - db149_user_save_type_list($u, 'users_volunteer', $fields); -} - -function db149_user_save_committee($u) -{ - $fields = array('committee_active', 'emailprivate', 'ord', 'displayemail', 'access_admin', - 'access_config', 'access_super'); - db149_user_save_type_list($u, 'users_committee', $fields); -} - -function db149_user_save_judge($u) -{ - $fields = array('judge_active', 'judge_complete', 'years_school', 'years_regional', 'years_national', - 'willing_chair', 'special_award_only', - 'cat_prefs', 'div_prefs', 'divsub_prefs', - 'expertise_other', 'languages', 'highest_psd'); - db149_user_save_type_list($u, 'users_judge', $fields); -} - -function db149_user_save_student($u) -{ - // $fields = array('student_active','student_complete'); - // user_save_type_list($u, 'users_student', $fields); -} - -function db149_user_save_fair($u) -{ - $fields = array('fair_active', 'fairs_id'); - db149_user_save_type_list($u, 'users_fair', $fields); -} - -function db149_user_save_sponsor($u) -{ - $fields = array('sponsors_id', 'sponsor_active', 'sponsor_complete', 'primary', 'position', 'notes'); - db149_user_save_type_list($u, 'users_sponsor', $fields); -} - -function db149_user_save_teacher($u) {} - -function db149_user_save_principal($u) {} - -function db149_user_save_mentor($u) {} - -function db149_user_save_alumni($u) {} - -function db149_user_save_parent($u) {} - -function db149_user_save(&$u) -{ - /* Add any new types */ - $added = array_diff($u['types'], $u['orig']['types']); - foreach ($added as $t) { - if (!db149_user_add_role_allowed($t, $u)) { - echo "HALT: user can't add this type"; - exit; - } - // give em a record, the primary key on the table takes care of uniqueness - $q = $pdo->prepare("INSERT INTO users_? (users_id) VALUES (?)"); - $q->execute([$t,$u['id']]); - } - - $fields = array('salutation', 'firstname', 'lastname', 'username', - 'email', - 'phonehome', 'phonework', 'phonecell', 'fax', 'organization', - 'address', 'address2', 'city', 'province', 'postalcode', 'sex', - 'firstaid', 'cpr', 'types'); - - $set = ''; - foreach ($fields as $f) { - if ($u[$f] == $u['orig'][$f]) - continue; - - if ($set != '') - $set .= ','; - - if ($f == 'types') - $set .= "$f='" . implode(',', $u[$f]) . "'"; - else { - $data = stripslashes($u[$f]); - $set .= "$f='$data'"; - } - } - // echo "
    ";
    -	//	print_r($u);
    -	//	echo "
    "; - if ($set != '') { - $query = "UPDATE users SET ? WHERE id=?"; - $stmt = $pdo->prepare($query); - $stmt->execute([$set,$u['id']]); - // echo "query=[$query]"; - show_pdo_errors_if_any($pdo); - } - - /* Save the password if it changed */ - if ($u['password'] != $u['orig']['password']) - db149_user_set_password($u['id'], $u['password']); - - /* Save types */ - foreach ($u['types'] as $t) { - call_user_func("db149_user_save_$t", $u); - } - - /* Should we do this? */ - /* Record all the data in orig that we saved */ - unset($u['orig']); - $orig = $u; - $u['orig'] = $orig; - - // print_r($u); -} - -/* - * Delete functions. These mark a user as deleted, and delete references to other - * tables - */ - -function db149_user_delete_committee($u) -{ - $stmt = $pdo->prepare("DELETE FROM committees_link WHERE users_uid=?"); - $stmt->execute([$u['uid']]); -} - -function db149_user_delete_volunteer($u) {} - -function db149_user_delete_judge($u) -{ - global $config; - $id = $u['id']; - $stmt = $pdo->prepare("DELETE FROM judges_teams_link WHERE users_id=?"); - $stmt->execute([$id]); - $stmt = $pdo->prepare("DELETE FROM judges_specialawards_sel WHERE users_id=?"); - $stmt->execute([$id]); -} - -function db149_user_delete_fair($u) {} - -function db149_user_delete_student($u) {} - -function db149_user_delete_sponsor($u) {} - -function db149_user_delete_principal($u) {} - -function db149_user_delete_teacher($u) {} - -function db149_user_delete_parent($u) {} - -function db149_user_delete_mentor($u) {} - -function db149_user_delete_alumni($u) {} - -function db149_user_delete($u, $type = false) -{ - $finish_delete = false; - - if (!is_array($u)) { - $u = db149_user_load($u); - } - if ($type != false) { - if (!in_array($type, $u['types'])) { - /* - * Hum, type specified, but the user is not this type, - * so, i guess we're done. - */ - return; - } - if (count($u['types']) > 1) { - /* Don't delete the whole user */ - $types = ''; - foreach ($u['types'] as $t) { - if ($t == $type) - continue; - if ($types != '') - $types .= ','; - $types .= $t; - } - $stmt = $pdo->prepare("UPDATE users SET types=? WHERE id=?"); - $stmt->execute([$types,$u['id']]); - } else { - $finish_delete = true; - } - call_user_func("db149_user_delete_$type", $u); - } else { - /* Delete the whole user */ - if (is_array($u['types'])) { - foreach ($u['types'] as $t) - call_user_func("db149_user_delete_$t", $u); - } - $finish_delete = true; - } - if ($finish_delete == true) { - $stmt = $pdo->prepare("UPDATE users SET deleted='yes', deleteddatetime=NOW() WHERE id=?"); - $stmt->execute([$u['id']]); - } -} - -/* - * Purge functions. These completely eliminate all traces of a user from the - * database. This action cannot be undone. We prefer the committee to use the - * "delete" functions, which simply mark the account as "deleted". - */ - -function db149_user_purge($u, $type = false) -{ - $finish_purge = false; - - if (!is_array($u)) { - $u = db149_user_load($u); - } - if ($type != false) { - if (!in_array($type, $u['types'])) { - /* - * Hum, type specified, but the user is not this type, - * so, i guess we're done. - */ - return; - } - if (count($u['types']) > 1) { - /* Don't delete the whole user */ - $types = ''; - foreach ($u['types'] as $t) { - if ($t == $type) - continue; - if ($types != '') - $types .= ','; - $types .= $t; - } - $stmt = $pdo->prepare("UPDATE users SET types=? WHERE id=?"); - $stmt->execute([$types,$u['id']]); - } else { - $finish_purge = true; - } - - /* - * Call the delete func to deal with table linking, then completely wipe - * out the entry - */ - call_user_func("db149_user_delete_$type", $u); - // call_user_func("user_purge_$type", $u); - $stmt = $pdo->prepare("DELETE FROM users_? WHERE users_id=?"); - $stmt->execute([$type,$u['id']]); - } else { - /* Delete the whole user */ - foreach ($u['types'] as $t) { - call_user_func("db149_user_delete_$t", $u); - // call_user_func("user_purge_$t", $u); - $stmt = $pdo->prepare("DELETE FROM users_? WHERE users_id=?"); - $stmt->execute([$t,$u['id']]); - } - $finish_purge = true; - } - if ($finish_purge == true) { - $stmt = $pdo->prepare("DELETE FROM users WHERE id=?"); - $stmt->execute([$u['id']]); - } -} - -/* Duplicate a row in the users table, or any one of the users_* tables. */ -function db149_user_dupe_row($db, $key, $val, $newval) -{ - global $config; - $nullfields = array('deleteddatetime'); /* Fields that can be null */ - $q = $pdo->prepare("SELECT * FROM ? WHERE ?=?"); - $q->exectue([$db,$key,$val]); - if ($q->rowCount() != 1) { - echo "ERROR duplicating row in $db: $key=$val NOT FOUND.\n"; - exit; - } - $i = $q->fetch(PDO::FETCH_ASSOC); - $i[$key] = $newval; - - foreach ($i as $k => $v) { - if ($v == NULL && in_array($k, $nullfields)) - $i[$k] = 'NULL'; - else if ($k == 'year') - $i[$k] = $config['FAIRYEAR']; - else - $i[$k] = "'" . $v . "'"; - } - - $keys = '`' . join('`,`', array_keys($i)) . '`'; - $vals = join(',', array_values($i)); - - $q = "INSERT INTO ? (?) VALUES (?)"; - // echo "Dupe Query: [$q]"; - $r = $pdo->prepare($q); - $r->execute([0,$db,$keys,$vals]); - show_pdo_errors_if_any($pdo); - - $id = $pdo->lastInsertId(); - return $id; -} - -/* Used by the login scripts to copy one user from one year to another */ -function db149_user_dupe($u, $new_year) -{ - /* - * Dupe a user if: - * - They don't exist in the current year - * (users->year != the target year (passed in so we can use it in the rollover script) ) - * - They have a previous year entry - * (users->year DESC LIMIT 1 == 1 row) - * - That previous entry has deleted=no - */ - - /* Find the last entry */ - $q = $pdo->prepare("SELECT id,uid,year,deleted FROM users WHERE uid=? - ORDER BY year DESC LIMIT 1"); - $q->execute([$u['uid']]); - $r = $q->fetch(PDO::FETCH_OBJ); - if ($r->deleted == 'yes') { - echo "Cannot duplicate user ID {$u['id']}, they are deleted. Undelete them first.\n"; - exit; - } - if ($r->year == $new_year) { - echo "Cannot duplicate user ID {$u['id']}, they already exist in year $new_year\n"; - exit; - } - - $id = db149_user_dupe_row('users', 'id', $u['id'], NULL); - $q = $pdo->prepare("UPDATE users SET year=? WHERE id=?"); - $q->execute([$new_year,$id]); - /* Load the new user */ - $u2 = db149_user_load($id); - - foreach ($u2['types'] as $t) { - db149_user_dupe_row("users_$t", 'users_id', $u['id'], $id); - } - /* Return the ID of the new user */ - return $id; -} - -/* - * Returns true if loaded user ($u) is allowed to add role type $type to their - * profile. THis is intended as a last-stop mechanism, preventing, for example - * a student from co-existing with any other account type. - */ -function db149_user_add_role_allowed($type, $u) -{ - /* - * For example, a committee member can add a volunteer or judge role to - * their account. - */ - $allowed = array( - 'committee' => array('volunteer', 'judge', 'sponsor', 'principal', 'teacher', 'parent', 'mentor', 'alumni'), - 'volunteer' => array('judge', 'committee', 'sponsor', 'principal', 'teacher', 'parent', 'mentor', 'alumni'), - 'judge' => array('volunteer', 'committee', 'sponsor', 'principal', 'teacher', 'parent', 'mentor', 'alumni'), - 'student' => array(), - 'fair' => array(), - 'sponsor' => array('volunteer', 'judge', 'sponsor', 'principal', 'teacher', 'parent', 'mentor', 'alumni'), - 'principal' => array('volunteer', 'judge', 'sponsor', 'committee', 'teacher', 'parent', 'mentor', 'alumni'), - 'teacher' => array('volunteer', 'judge', 'sponsor', 'principal', 'committee', 'parent', 'mentor', 'alumni'), - 'parent' => array('volunteer', 'judge', 'sponsor', 'principal', 'teacher', 'committee', 'mentor', 'alumni'), - 'mentor' => array('volunteer', 'judge', 'sponsor', 'principal', 'teacher', 'parent', 'committee', 'alumni'), - 'alumni' => array('volunteer', 'judge', 'sponsor', 'principal', 'teacher', 'parent', 'mentor', 'committee'), - ); - - foreach ($u['types'] as $ut) { - $allowed_array = $allowed[$ut]; - if (in_array($type, $allowed[$ut])) - return true; - } - return false; -} - -function db149_user_create($type, $username, $u = NULL) -{ - global $config; - if (!is_array($u)) { - $stmt = $pdo->prepare("INSERT INTO users (`types`,`username`,`passwordset`,`created`,`year`) - - - VALUES (?,?,'0000-00-00', NOW(),?)"); - $stmt->execute([$type,$username,$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - $uid = $pdo->lastInsertId(); - if (db149_user_valid_email($username)) { - $stmt = $pdo->prepare("UPDATE users SET email=? WHERE id=?"); - } - - $stmt = $pdo->prepare("UPDATE users SET uid=? WHERE id=?"); - $stmt->execute([$username,$uid,$uid,$uid]); - - show_pdo_errors_if_any($pdo); - - db149_user_set_password($uid, NULL); - - /* - * Since the user already has a type, user_save won't create this - * entry for us, so do it here - */ - $stmt = $pdo->prepare("INSERT INTO users_? (users_id) VALUES(?)"); - $stmt->execute([$type,$uid]); - - show_pdo_errors_if_any($pdo); - - /* Load the complete user */ - $u = db149_user_load($uid); - } else { - /* - * The user has been specified and already exists, - * just add a role - */ - $uid = $u['uid']; - if (!db149_user_add_role_allowed($type, $u)) { - /* If we get in here, someone is hand crafting URLs */ - echo 'HALT: invalid role add specified for operation.'; - exit; - } - /* Ensure we have a full user, and add the type to the existing user */ - $u = db149_user_load_by_uid($uid); - $u['types'][] = $type; - } - /* Activate the new type, and save, then return the user */ - $u["{$type}_active"] = 'yes'; - db149_user_save($u); - return $u; -} - -function db149_user_valid_user($user) -{ - /* - * Find any character that doesn't match the valid username characters - * (^ inverts the matching remember - */ - $x = preg_match('[^a-zA-Z0-9@.-_]', $user); - - /* If x==1, a match was found, and the input is bad */ - return ($x == 1) ? false : true; -} - -function db149_user_valid_password($pass) -{ - /* Same as user, but allow more characters */ - $x = preg_match('[^a-zA-Z0-9 ~!@#$%^&*()-_=+|;:,<.>/?]', $pass); - - /* If x==1, a match was found, and the input is bad */ - if ($x == 1) - return false; - - if (strlen($pass) < 6) - return false; - - return true; -} - -/* A more strict version of isEmailAddress() */ -function db149_user_valid_email($str) -{ - if (preg('^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})$', $str)) - return true; - return false; -} - -/* - * Perform some checks. Make sure the person is logged in, and that their - * password hasn't expired (the password_expired var is set in the login page) - */ -function db149_user_auth_required($type, $access = '') -{ - global $config; - if (!isset($_SESSION['users_type'])) { - message_push(error(i18n('You must login to view that page'))); - header("location: {$config['SFIABDIRECTORY']}/user_login.php?type=$type"); - exit; - } - - if ($_SESSION['users_type'] != $type) { - message_push(error(i18n('You must login to view that page'))); - header("location: {$config['SFIABDIRECTORY']}/user_login.php?type=$type"); - exit; - } - - if ($_SESSION['password_expired'] == true) { - header("location: {$config['SFIABDIRECTORY']}/user_password.php"); - exit; - } - - if ($access != '') { - if ($type != 'committee') { - echo 'CRITICAL ERROR, cannot check access in user_auth_required without specifying type=committee'; - exit; - } - - if (committee_auth_has_access($access) == false) { - message_push(error(i18n('You do not have permission to view that page'))); - header("Location: {$config['SFIABDIRECTORY']}/committee_main.php"); - exit; - } - } - return true; -} - -function db149_user_volunteer_registration_status() -{ - global $config; - // $now = date('Y-m-d H:i:s'); - // if($now < $config['dates']['judgeregopen']) return "notopenyet"; - // if($now > $config['dates']['judgeregclose']) return "closed"; - return 'open'; -} - -function db149_user_judge_registration_status() -{ - global $config; - $now = date('Y-m-d H:i:s'); - if ($now < $config['dates']['judgeregopen']) - return 'notopenyet'; - if ($now > $config['dates']['judgeregclose']) - return 'closed'; - return 'open'; -} - -$user_personal_fields_map = array( - 'salutation' => array('salutation'), - 'name' => array('firstname', 'lastname'), - 'email' => array('email'), - 'sex' => array('sex'), - 'phonehome' => array('phonehome'), - 'phonework' => array('phonework'), - 'phonecell' => array('phonecell'), - 'fax' => array('fax'), - 'org' => array('organization'), - 'birthdate' => array('birthdate'), - 'lang' => array('lang'), - 'address' => array('address', 'address2', 'postalcode'), - 'city' => array('city'), - 'province' => array('province'), - 'firstaid' => array('firstaid', 'cpr') -); - -function db149_user_personal_fields($type) -{ - global $config, $user_personal_fields_map; - $ret = array('firstname', 'lastname', 'email'); - $fields = $config["{$type}_personal_fields"]; - if ($fields != '') { - $fields = split(',', $fields); - foreach ($fields as $f) { - $ret = array_merge($ret, $user_personal_fields_map[$f]); - } - } - return $ret; -} - -function db149_user_personal_required_fields($type) -{ - global $config, $user_personal_fields_map; - $ret = array('firstname', 'lastname', 'email'); - $required = $config["{$type}_personal_required"]; - if ($required != '') { - $fields = split(',', $required); - foreach ($fields as $f) { - $ret = array_merge($ret, $user_personal_fields_map[$f]); - } - } - - /* - * Filter some elements that are never required. - * - address2 - */ - $ret = array_diff($ret, array('address2')); - return $ret; -} - -function db149_user_personal_info_status(&$u) -{ - $required = array(); - foreach ($u['types'] as $t) { - $required = array_merge($required, - db149_user_personal_required_fields($t)); - } - foreach ($required as $r) { - $val = trim($u[$r]); - - if (strlen($val) > 0) { - /* Ok */ - } else { - return 'incomplete'; - } - } - - /* - * FIXME: somehow call the $type _status_update() function db149_to update - * the individual $type _complete entry? - */ - return 'complete'; -} - -/* user_{$type}_login() is called with a full $u loaded */ -function db149_user_committee_login($u) -{ - /* Double check, make sure the user is of this type */ - if (!in_array('committee', $u['types'])) { - echo "ERROR: attempted to login committee on a non-committee user\n"; - exit; - } - - $_SESSION['access_admin'] = $u['access_admin']; // == 'yes') ? true : false; - $_SESSION['access_config'] = $u['access_config']; // == 'yes') ? true : false; - $_SESSION['access_super'] = $u['access_super']; // == 'yes') ? true : false; -} - -function db149_user_fair_login($u) -{ - /* Double check, make sure the user is of this type */ - if (!in_array('fair', $u['types'])) { - echo "ERROR: attempted to login fair on a non-fair user\n"; - exit; - } - - $_SESSION['fairs_id'] = $u['fairs_id']; // == 'yes') ? true : false; -} - -?> diff --git a/db/db.update.15.sql b/db/db.update.15.sql deleted file mode 100644 index 9d3ea544..00000000 --- a/db/db.update.15.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `judges` DROP `catpref`, DROP `divpref`; - diff --git a/db/db.update.150.sql b/db/db.update.150.sql deleted file mode 100644 index 469cb55e..00000000 --- a/db/db.update.150.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM config WHERE var LIKE 'fair_stats%' - diff --git a/db/db.update.151.sql b/db/db.update.151.sql deleted file mode 100644 index 0e722d90..00000000 --- a/db/db.update.151.sql +++ /dev/null @@ -1,13 +0,0 @@ -ALTER TABLE `config` CHANGE `type` `type` ENUM( '', 'yesno', 'number', 'text', 'enum', 'multisel', 'language', 'theme' ) NOT NULL; - -UPDATE `config` SET `type` = 'theme', `type_values` = 'theme', `description` = 'Theme for colours' WHERE `config`.`var` = 'theme'; - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) - VALUES ( 'theme_icons', 'icons_default', 'Global', 'theme', 'icons', '860', 'Icon set', '-1'); - - -INSERT INTO `config` (`var`, `val`, `category`, `type`, `type_values`, `ord`, `description`, `year`) VALUES -('fairs_allow_login', 'no', 'Science Fairs', 'yesno', '', 200, 'Allow feeder fairs to login an enter stats and winners. If set to ''no'', they will only be able to download and upload awards using the SFIAB award download/upload mechanism.', -1), -('fairs_name', 'Science', 'Feeder Fairs', 'text', '', 300, 'What level the feeder fairs are. For example, ''School'' , ''Regional'', or just ''Science'' for a generic ''Science Fair''', -1), -('fairs_enable', 'no', 'Science Fairs', 'yesno', '', 100, 'Enable the Science Fair. Science Fairs can download awards tagged as ''downloadable'', and can upload winners of those awards directly into this system (optionally creating accounts for all students). There are also options to collect stats from these fairs.', -1); - diff --git a/db/db.update.152.sql b/db/db.update.152.sql deleted file mode 100644 index 53eecc11..00000000 --- a/db/db.update.152.sql +++ /dev/null @@ -1,16 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) -VALUES ( -'judge_personal_fields', 'phonehome,phonecell,phonework,org,address,city,province,lang', -'Judge Registration', 'multisel', -'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province', -'500', 'Personal Information to ask for on the Judge personal information page (in addition to Name and Email)', '-1'); - - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) -VALUES ( -'judge_personal_required', 'phonehome,address,city,province', -'Judge Registration', 'multisel', -'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province', -'600', 'Required Personal Information on the Judge personal information page (Name and Email is always required)', '-1'); - - diff --git a/db/db.update.153.sql b/db/db.update.153.sql deleted file mode 100644 index a0039099..00000000 --- a/db/db.update.153.sql +++ /dev/null @@ -1,27 +0,0 @@ -CREATE TABLE `emailqueue` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `val` VARCHAR( 64 ) NOT NULL , - `name` VARCHAR( 128 ) NOT NULL , - `users_uid` INT NOT NULL , - `from` VARCHAR( 128 ) NOT NULL , - `subject` VARCHAR( 128 ) NOT NULL , - `body` TEXT NOT NULL , - `bodyhtml` TEXT NOT NULL , - `type` ENUM( 'system', 'user', 'fundraising' ) NOT NULL , - `fundraising_campaigns_id` INT NULL , - `started` DATETIME NOT NULL , - `finished` DATETIME NULL , - `numtotal` INT NOT NULL , - `numsent` INT NOT NULL -) ENGINE = MYISAM ; - -CREATE TABLE `emailqueue_recipients` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `emailqueue_id` INT UNSIGNED NOT NULL , - `toemail` VARCHAR( 128 ) NOT NULL , - `toname` VARCHAR( 128 ) NOT NULL , - `replacements` TEXT NOT NULL , - `sent` DATETIME NULL -) ENGINE = MYISAM ; - -INSERT INTO `config` (`var`, `val`, `category`, `type`, `type_values`, `ord`, `description`, `year`) VALUES ('emailqueue_lock', '', 'Special', '', '', '', 'The current lock datetime of the email sending queue, or empty if not locked', '0'); diff --git a/db/db.update.154.sql b/db/db.update.154.sql deleted file mode 100644 index 866566c3..00000000 --- a/db/db.update.154.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `emails` (`val`, `name`, `description`, `from`, `subject`, `body`, `bodyhtml`, `type`, `fundraising_campaigns_id`, `lastsent`) VALUES ('fundraising_thankyou_template', 'Fundraising Thank You Template', 'Fundraising thank you template to be used to send thank you emails to individual sponsor/donors once a donation is received', '', 'Thank You for your Contribution', 'Dear [FIRSTNAME],\r\n\r\nThank you for your contribution to the [FAIRNAME]\r\n\r\nSincerely,\r\n [FAIRNAME] Committee\r\n', NULL, 'system', NULL, NULL); diff --git a/db/db.update.155.php b/db/db.update.155.php deleted file mode 100644 index fd71acdd..00000000 --- a/db/db.update.155.php +++ /dev/null @@ -1,20 +0,0 @@ -prepare('SELECT * FROM emails'); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo "Updating email id $r->id\n"; - $stmt = $pdo->prepare("UPDATE emails SET - body=?, - bodyhtml=?, - subject=? - WHERE id='$r->id'"); - $stmt->execute([iconv('ISO-8859-1', 'UTF-8//TRANSLIT', $r->body),iconv('ISO-8859-1', 'UTF-8//TRANSLIT', $r->bodyhtml),iconv('ISO-8859-1', 'UTF-8//TRANSLIT', $r->subject)]); - } -} - -?> diff --git a/db/db.update.155.sql b/db/db.update.155.sql deleted file mode 100644 index 6c8e8abc..00000000 --- a/db/db.update.155.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE `emails` CHANGE `body` `body` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -ALTER TABLE `emails` CHANGE `bodyhtml` `bodyhtml` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -ALTER TABLE `emails` CHANGE `subject` `subject` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -ALTER TABLE `emailqueue` CHANGE `body` `body` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -ALTER TABLE `emailqueue` CHANGE `bodyhtml` `bodyhtml` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -ALTER TABLE `emailqueue` CHANGE `subject` `subject` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -ALTER TABLE `emailqueue_recipients` CHANGE `replacements` `replacements` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; diff --git a/db/db.update.156.sql b/db/db.update.156.sql deleted file mode 100644 index ae5826a6..00000000 --- a/db/db.update.156.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `projects` CHANGE `projectcategories_id` `projectcategories_id` INT UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `projects` CHANGE `projectdivisions_id` `projectdivisions_id` INT UNSIGNED NOT NULL DEFAULT '0'; diff --git a/db/db.update.157.sql b/db/db.update.157.sql deleted file mode 100644 index 9d7aa7a9..00000000 --- a/db/db.update.157.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `award_awards` ADD `per_fair` ENUM( 'no', 'yes' ) NOT NULL ; - - diff --git a/db/db.update.158.sql b/db/db.update.158.sql deleted file mode 100644 index 4886987e..00000000 --- a/db/db.update.158.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `reports_items` SET `field`='special_award_only' WHERE `field`='typepref'; - diff --git a/db/db.update.159.sql b/db/db.update.159.sql deleted file mode 100644 index b749262c..00000000 --- a/db/db.update.159.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE pagetext SET textname='register_judge_invite' WHERE textname='register_judges_invite'; diff --git a/db/db.update.16.sql b/db/db.update.16.sql deleted file mode 100644 index e16b42dd..00000000 --- a/db/db.update.16.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `registrations` ADD `schools_id` INT UNSIGNED DEFAULT NULL ; -CREATE TABLE `signaturepage` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `name` VARCHAR( 32 ) NOT NULL , `use` TINYINT DEFAULT '1' NOT NULL , `text` TEXT NOT NULL , PRIMARY KEY ( `id` )) TYPE = MYISAM ; -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (1, 'exhibitordeclaration', 1, 'The following section is to be read and signed by the exhibitor(s).\r\n\r\nI/We certify that:\r\n - The preparation of this project is mainly my/our own work.\r\n - I/We have read the rules and regulations and agree to abide by them.\r\n - I/We agree agree that the decision of the judges will be final.'); -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (2, 'parentdeclaration', 1, 'The following is to be read and signed by the exhibitor(s) parent(s)/guardian(s).\r\nAs a parent/guardian I certify to the best of my knowledge and believe the information contained in this application is correct, and the project is the work of the student. I also understand that the material used in the project is the responsibility of the student and that neither the school, the teacher, nor the regional fair can be held responsible for loss, damage, or theft, however caused. I further understand that all exhibits entered must be left on display until the end of the Fair. If my son/daughter does not remove the exhibit at the end of the Fair, the fair organizers or the owner of the exhibition hall cannot be responsible for the disposal of the exhibit.\r\n\r\nIf my son/daughter is awarded the honour of having his/her exhibit chosen for presentation at the Canada-Wide Science Fair, I consent to having him/her journey to the Fair, and will not hold the Fair responsible for any accident or mishap to the student or the exhibit.'); diff --git a/db/db.update.160.sql b/db/db.update.160.sql deleted file mode 100644 index a92e58ab..00000000 --- a/db/db.update.160.sql +++ /dev/null @@ -1,5 +0,0 @@ -UPDATE `reports_items` SET `field`='cats_at_pref_H' WHERE `field`='cat_prefs_highest'; -UPDATE `reports_items` SET `field`='cats_at_pref_H_long' WHERE `field`='cat_prefs_highest_long'; -UPDATE `reports_items` SET `field`='divs_at_exp_5' WHERE `field`='div_prefs_5'; -UPDATE `reports_items` SET `field`='divs_at_exp_5_long' WHERE `field`='div_prefs_5_long'; - diff --git a/db/db.update.161.sql b/db/db.update.161.sql deleted file mode 100644 index c543aa25..00000000 --- a/db/db.update.161.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `emailqueue` ADD `numfailed` INT NOT NULL DEFAULT '0'; -ALTER TABLE `emailqueue` ADD `numbounced` INT NOT NULL DEFAULT '0'; -ALTER TABLE `emailqueue_recipients` ADD `result` ENUM( 'ok', 'failed' ) NULL DEFAULT NULL; diff --git a/db/db.update.162.sql b/db/db.update.162.sql deleted file mode 100644 index c047d0a8..00000000 --- a/db/db.update.162.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `emailqueue_recipients` CHANGE `result` `result` ENUM( 'ok', 'failed', 'cancelled', 'bounced' ) NULL DEFAULT NULL; diff --git a/db/db.update.163.sql b/db/db.update.163.sql deleted file mode 100644 index f84862b5..00000000 --- a/db/db.update.163.sql +++ /dev/null @@ -1,4 +0,0 @@ -DROP TABLE `award_sources`; -UPDATE fairs SET name='Youth Science Ontario', abbrv='YSO' WHERE abbrv='STO'; -UPDATE fairs SET name='Youth Science Canada' WHERE abbrv='YSC'; - diff --git a/db/db.update.164.sql b/db/db.update.164.sql deleted file mode 100644 index 952038ce..00000000 --- a/db/db.update.164.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `emails` SET `from`='' WHERE `from`='website@sfiab.ca'; diff --git a/db/db.update.165.sql b/db/db.update.165.sql deleted file mode 100644 index 97a9744e..00000000 --- a/db/db.update.165.sql +++ /dev/null @@ -1,17 +0,0 @@ -ALTER TABLE `projects` ADD `floornumber` INT NOT NULL AFTER `projectsort_seq` ; - -CREATE TABLE `exhibithall` ( - `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , - `name` VARCHAR( 32 ) NOT NULL , - `type` ENUM( 'wall', 'exhibithall', 'project' ) NOT NULL , - `x` FLOAT NOT NULL , - `y` FLOAT NOT NULL , - `w` FLOAT NOT NULL , - `h` FLOAT NOT NULL , - `orientation` INT NOT NULL , - `exhibithall_id` INT NOT NULL , - `floornumber` INT NOT NULL , - `divs` TINYTEXT NOT NULL , - `cats` TINYTEXT NOT NULL , - `has_electricity` ENUM( 'no', 'yes' ) NOT NULL -) ENGINE = MYISAM ; diff --git a/db/db.update.166.sql b/db/db.update.166.sql deleted file mode 100644 index 57ce1ad0..00000000 --- a/db/db.update.166.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE award_awards SET award_source_fairs_id=NULL WHERE award_source_fairs_id=0; - diff --git a/db/db.update.167.sql b/db/db.update.167.sql deleted file mode 100644 index 704d1179..00000000 --- a/db/db.update.167.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `emails` SET `from`='' WHERE `from`='webmaster@sfiab.ca'; diff --git a/db/db.update.168.sql b/db/db.update.168.sql deleted file mode 100644 index 443f086a..00000000 --- a/db/db.update.168.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `ord` , `description` , `year`) - VALUES ( 'reports_show_criteria', 'no', 'Reports', 'yesno', 300, 'Display criteria for each award in the Award Ceremony script.', -1); diff --git a/db/db.update.169.sql b/db/db.update.169.sql deleted file mode 100644 index a1c43350..00000000 --- a/db/db.update.169.sql +++ /dev/null @@ -1,8 +0,0 @@ -ALTER TABLE `reports_items` ADD `fontname` VARCHAR( 32 ) NOT NULL AFTER `face` , - ADD `fontstyle` SET( 'bold', 'italic', 'underline', 'strikethrough') NOT NULL AFTER `fontname` , - ADD `fontsize` FLOAT NOT NULL AFTER `fontstyle` ; - -ALTER TABLE `reports_items` ADD `valign` ENUM( 'top', 'middle', 'bottom' ) NOT NULL; - -ALTER TABLE `reports_items` ADD `on_overflow` ENUM( 'truncate', '...', 'scale' ) NOT NULL; - diff --git a/db/db.update.17.sql b/db/db.update.17.sql deleted file mode 100644 index 704a70ee..00000000 --- a/db/db.update.17.sql +++ /dev/null @@ -1,4 +0,0 @@ -UPDATE `config` SET `description`='The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registration' WHERE `var`='judge_registration_singlepassword'; -UPDATE `emails` SET `description`='This is sent to a new judge when they are invited using the invite judges administration section, only available when judge_registration_type=invite' WHERE `val`='new_judge_invite'; -UPDATE `config` SET `description`='Allows for the setup of different divisions for each category (yes|no)' WHERE `var`='filterdivisionbycategory'; - diff --git a/db/db.update.170.sql b/db/db.update.170.sql deleted file mode 100644 index 5d2a17ab..00000000 --- a/db/db.update.170.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE fairs SET enable_stats='no' WHERE abbrv='YSO'; diff --git a/db/db.update.171.sql b/db/db.update.171.sql deleted file mode 100644 index ad03dde8..00000000 --- a/db/db.update.171.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `dates` (`id`, `date`, `name`, `description`, `year`) VALUES (NULL, '0000-00-00 00:00:00', 'judgescheduleavailable', 'Judge assignments and schedule are available to judges', '-1'); diff --git a/db/db.update.172.sql b/db/db.update.172.sql deleted file mode 100644 index 04ad425e..00000000 --- a/db/db.update.172.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `users_judge` CHANGE `div_prefs` `div_prefs` TEXT NOT NULL ; diff --git a/db/db.update.173.sql b/db/db.update.173.sql deleted file mode 100644 index abfdee72..00000000 --- a/db/db.update.173.sql +++ /dev/null @@ -1,24 +0,0 @@ -DELETE FROM reports_items WHERE reports_id=30; - -INSERT INTO `reports_items` (`reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `fontname`, `fontstyle`, `fontsize`, `align`, `valign`, `on_overflow`) VALUES -(30, 'col', 7, 'fair_logo', '', 1, 1, 33, 33, 1, '', '', '', 0, 'center middle', 'middle', ''), -(30, 'col', 6, 'projectbarcode', '', 10, 145, 22, 22, 1, '', '', '', 14, 'center middle', 'middle', ''), -(30, 'col', 5, 'static_text', 'Safety Check:', 180, 153, 30, 5, 1, '', '', '', 10, 'right middle', 'middle', ''), -(30, 'sort', 0, 'pn', '', 0, 0, 0, 0, 1, '', '', '', 0, ' ', '', ''), -(30, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 1, '', '', '', 0, ' ', '', ''), -(30, 'option', 9, 'stock', 'fullpage_landscape', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(30, 'option', 8, 'default_font_size', '10', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(30, 'option', 7, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(30, 'option', 6, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(30, 'option', 4, 'label_box', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(30, 'option', 5, 'field_box', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(30, 'col', 4, 'static_box', '', 215, 150, 14, 14, 1, '', '', '', 10, 'center middle', 'middle', ''), -(30, 'option', 3, 'fit_columns', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(30, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(30, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(30, 'option', 0, 'type', 'tcpdf_label', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(30, 'col', 3, 'categorydivision', '', 1, 125, 235, 14, 1, '', '', '', 22, 'center middle', 'middle', ''), -(30, 'col', 1, 'title', '', 35, 5, 200, 25, 1, '', '', '', 28, 'center middle', 'middle', 'scale'), -(30, 'col', 2, 'pn', '', 1, 36, 235, 50, 1, '', '', '', 128, 'center middle', 'middle', ''), -(30, 'col', 0, 'bothnames', '', 1, 105, 235, 12, 1, '', '', '', 18, 'center middle', 'middle', ''); - diff --git a/db/db.update.174.php b/db/db.update.174.php deleted file mode 100644 index 4da744b2..00000000 --- a/db/db.update.174.php +++ /dev/null @@ -1,14 +0,0 @@ -prepare("SELECT * FROM users WHERE deleted = 'yes'"); - while ($row = $q->fetch(PDO::FETCH_ASSOC)) { - echo 'Flagging user records prior to ? for user ? as deleted - '; - $stmt = $pdo->prepare("UPDATE users SET deleted = 'yes' WHERE uid = ? AND year < ?"); - $stmt->execute([$row['year'],$row['uid'],$row['uid'],$row['year']]); - echo $pdo->rowCount() . " rows affected.\n"; - } -} -?> diff --git a/db/db.update.175.sql b/db/db.update.175.sql deleted file mode 100644 index 22ff82d5..00000000 --- a/db/db.update.175.sql +++ /dev/null @@ -1,39 +0,0 @@ -INSERT INTO `config` (`var`, `val`, `category`, `type`, `type_values`, `ord`, `description`, `year`) VALUES -('cheque_date_format', 'DDMMYYYY', 'Localization', 'enum', 'YYYYMMDD=YYYYMMDD|DDMMYYYY=DDMMYYYY|MMDDYYYY=MMDDYYYY', '220', 'Format for dates on printed cheques', '-1'), -('cheque_date_format', 'DDMMYYYY', 'Localization', 'enum', 'YYYYMMDD=YYYYMMDD|DDMMYYYY=DDMMYYYY|MMDDYYYY=MMDDYYYY', '220', 'Format for dates on printed cheques', '2012'); - - -INSERT INTO `reports` (`system_report_id`, `name`, `desc`, `creator`, `type`) VALUES -(48, 'Cheques Divisional Award Winners', 'Cheques for Divisional Award Winners', 'Lightbox Technologies', 'student'); - -INSERT INTO `reports_items` (`reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `fontname`, `fontstyle`, `fontsize`, `align`, `valign`, `on_overflow`) VALUES -(LAST_INSERT_ID(), 'col', 0, 'namefl', '', 10, 12, 80, 2, 1, '', '', '', 0, 'left vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 1, 'award_prize_cash_cheque', '', 80, 7, 20, 2, 1, '', '', '', 0, 'right vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 2, 'award_name', '', 4, 35, 67, 2, 1, '', '', '', 0, 'left vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 3, 'award_prize_name', '', 8, 40, 70, 2, 1, '', '', '', 0, 'left vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 4, 'award_prize_cash_cheque', '', 80, 40, 19, 2, 1, '', '', '', 0, 'right vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 5, 'current_date_for_cheques', '', 82, 0.3, 18, 2, 1, '', '', '', 0, 'center vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 6, 'award_name', '', 4, 72, 67, 2, 1, '', '', '', 0, 'left vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 7, 'award_prize_name', '', 8, 77, 70, 2, 1, '', '', '', 0, 'left vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 8, 'award_prize_cash_cheque', '', 80, 77, 19, 2, 1, '', '', '', 0, 'right vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 9, 'allnames', '', 8, 45, 70, 2, 1, '', '', '', 0, 'left vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 10, 'allnames', '', 8, 82, 70, 2, 1, '', '', '', 0, 'left vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 11, 'award_prize_cash_words', '', 10, 7, 69, 2, 1, '', '', '', 0, 'left vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 12, 'current_date_for_cheques', '', 78, 35, 21, 2, 1, '', '', '', 0, 'right vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 13, 'current_date_for_cheques', '', 78, 72, 21, 2, 1, '', '', '', 0, 'right vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 14, 'static_text', 'DATE', 74, 0.5, 8, 1.5, 1, '', '', '', 0, 'right vcenter', '', ''), -(LAST_INSERT_ID(), 'col', 15, 'current_date_format_for_cheques', '', 82, 2.9, 18, 1.1, 1, '', '', '', 0, 'center vcenter', '', ''), -(LAST_INSERT_ID(), 'distinct', 0, 'registrations_num', '', 0, 0, 0, 0, 1, '', '', '', 0, ' ', '', ''), -(LAST_INSERT_ID(), 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(LAST_INSERT_ID(), 'option', 3, 'fit_columns', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(LAST_INSERT_ID(), 'option', 4, 'label_box', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(LAST_INSERT_ID(), 'option', 5, 'field_box', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(LAST_INSERT_ID(), 'option', 6, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(LAST_INSERT_ID(), 'option', 7, 'label_logo', 'no', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(LAST_INSERT_ID(), 'option', 8, 'default_font_size', '10', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(LAST_INSERT_ID(), 'option', 9, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', '', '', 0, '', '', 'truncate'), -(LAST_INSERT_ID(), 'filter', 0, 'award_type', 'divisional', 0, 0, 0, 0, 1, '', '', '', 0, ' ', '', ''), -(LAST_INSERT_ID(), 'filter', 1, 'award_prize_cash', '0', 4, 0, 0, 0, 1, '', '', '', 0, ' ', '', ''); - diff --git a/db/db.update.176.sql b/db/db.update.176.sql deleted file mode 100644 index 53413ba4..00000000 --- a/db/db.update.176.sql +++ /dev/null @@ -1,32 +0,0 @@ -/* This file was modified Jan of 2014 by Richard Sin */ -/* below are the updated tables, alterations, and inserts*/ - -CREATE TABLE `projecttypes` - (id int(10), - type varchar(64) COLLATE latin1_swedish_ci); - -INSERT INTO `projecttypes` (`id`,`type`) VALUES -(1,'Experiment'), -(2,'Innovation'), -(3,'Study'); - -INSERT INTO `config` (`var`,`val`,`category`, `type`, `type_values`, `ord`, `description`, `year`) VALUES -('project_type','no','Participant Registration', 'yesno','','3100','Allows the ability to categorize projects into Experiments, Studies, or Innovations.','-1'); - -ALTER TABLE `projects` ADD - (projecttype varchar(64) COLLATE latin1_swedish_ci, - feedback text COLLATE latin1_swedish_ci, - flagged tinyint(1)); - -UPDATE `reports_items` SET `field`= 'allnames' -WHERE `id` = 9099; - -INSERT INTO `translations` (lang, strmd5, str, val, argsdesc) VALUES -('fr','245fe794333c2b0d5c513129b346b93f','Project Type','',''), -('fr','22413e12cc28e98272e112ec778b8807','Select a project','',''), -('fr','05aeba473f4906b85c7627ba045e890a','Experiment','',''), -('fr','0a3dac2314e66e15240f019afcbd6b0f','Study','',''), -('fr','32f28a2c732e178e43a0ceeffa08ab08','Innovation','',''), -('fr','bea4c2c8eb82d05891ddd71584881b56','Feedback','',''), -('fr','72d68acd07c783e657e2d2a9c50f16df','Flagged','',''), -('fr','d47429e01c5a1c8768a0e293fe9b9ce5','Not flagged','',''); diff --git a/db/db.update.177.sql b/db/db.update.177.sql deleted file mode 100644 index db5864e1..00000000 --- a/db/db.update.177.sql +++ /dev/null @@ -1,14 +0,0 @@ -ALTER TABLE `students` ADD `county` VARCHAR( 64 ) NULL DEFAULT NULL AFTER `city`; -INSERT INTO `config` ( - `var` , - `val` , - `category` , - `type` , - `type_values` , - `ord` , - `description` , - `year` -) -VALUES ( - 'participant_address_include_county', 'no', 'Participant Registration', 'yesno', '', '2100', 'Require that participants includes their county in their address.', '-1' -); diff --git a/db/db.update.178.sql b/db/db.update.178.sql deleted file mode 100644 index 6d441b00..00000000 --- a/db/db.update.178.sql +++ /dev/null @@ -1,23 +0,0 @@ -/* This file was modified Feb of 2015 by Sebastian Ruan */ -/* below is the updated table users_judge*/ - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'signaturepage_or_permissionform', 'signaturepage', 'Participant Registration', 'enum', 'signaturepage = Signature Page|permissionform = Permission Form', -'2775', 'Change the name of the form that must be signed in order to participate in this fair to:
    • Signature Page
    • Permission Form
    ', '-1'); - -UPDATE `config` SET `description`='Does the signature page/permission form need to be received BEFORE students are allowed to self nominate for special awards?' WHERE `var`='specialawardnomination_aftersignatures'; - -ALTER TABLE `users_judge` ADD - (private_info text COLLATE latin1_swedish_ci, - flagged_judge tinyint(1)); - -INSERT INTO `translations` (lang, strmd5, str, val, argsdesc) VALUES -('fr','0a05f902716d6694a01443967d100221','Private Information','',''), -('fr','370695d562057f1a0cf254e513d115e5','Flagged Judge','',''); - - - - - - - diff --git a/db/db.update.179.sql b/db/db.update.179.sql deleted file mode 100644 index 380ef8bf..00000000 --- a/db/db.update.179.sql +++ /dev/null @@ -1,13 +0,0 @@ -/* This file was created March of 2015 by Sebastian Ruan - below is the updated table, projects*/ - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'ethics_questions', 'yes', 'Participant Registration', 'yesno', '', '2550', 'Ask if the project requires human and/or animal participants.', '-1'); - -ALTER TABLE `projects` ADD - (human_participants ENUM( 'no', 'yes' ) COLLATE latin1_swedish_ci, - animal_participants ENUM( 'no', 'yes' ) COLLATE latin1_swedish_ci); - -INSERT INTO `translations` (lang, strmd5, str, val, argsdesc) VALUES -('fr','fa7eac4f388ce0bb76f280026f10d181','My project involves human participants','',''), -('fr','0b6e87dd18d0cb0df5a63ea74bee6989','My project involves animals','',''); \ No newline at end of file diff --git a/db/db.update.18.sql b/db/db.update.18.sql deleted file mode 100644 index 9468b66a..00000000 --- a/db/db.update.18.sql +++ /dev/null @@ -1,40 +0,0 @@ --- -------------------------------------------------------- - --- --- Table structure for table `questions` --- - -CREATE TABLE `questions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(11) NOT NULL default '0', - `section` varchar(32) NOT NULL, - `db_heading` varchar(64) NOT NULL, - `question` text NOT NULL, - `type` enum('check','yesno','int','text') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE = MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `question_answers` --- - -CREATE TABLE `question_answers` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `questions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE = MyISAM; - --- Now insert everything -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years School', 'Years of judging experience at a School level:', 'int', 'yes', 1); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years Regional', 'Years of judging experience at a Regional level:', 'int', 'yes', 2); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years National', 'Years of judging experience at a National (CWSF) level:', 'int', 'yes', 3); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Attending Lunch', 'Will you be attending the Judge''s Lunch?', 'yesno', 'yes', 4); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Willing Chair', 'Are you willing to be the lead for your judging team?', 'yesno', 'yes', 5); - diff --git a/db/db.update.19.sql b/db/db.update.19.sql deleted file mode 100644 index 03887a3e..00000000 --- a/db/db.update.19.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `schools` CHANGE `lastlogin` `lastlogin` DATETIME NULL; diff --git a/db/db.update.2.sql b/db/db.update.2.sql deleted file mode 100644 index ef78ff0e..00000000 --- a/db/db.update.2.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `judges` ADD `complete` ENUM( 'no', 'yes' ) DEFAULT 'no' NOT NULL; diff --git a/db/db.update.20.sql b/db/db.update.20.sql deleted file mode 100644 index 07af0fd8..00000000 --- a/db/db.update.20.sql +++ /dev/null @@ -1,27 +0,0 @@ --- -------------------------------------------------------- - --- --- Table structure for table `judges_jdiv` --- - -CREATE TABLE `judges_jdiv` ( - `id` int(10) unsigned NOT NULL auto_increment, - `jdiv_id` int(11) NOT NULL default '0', - `projectdivisions_id` int(11) NOT NULL default '0', - `projectcategories_id` int(11) NOT NULL default '0', - `lang` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - - --- --- Dumping data for table `config` --- - -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES -('JSCHEDULER_max_projects_per_team', '7', 'The maximum number of projects that a judging team can judge.', -1), -('JSCHEDULER_times_judged', '1', 'The number of times each project must be judged by different judging teams.', -1), -('JSCHEDULER_min_judges_per_team', '3', 'The minimum number of judges that can be on a judging team.', -1), -('JSCHEDULER_max_judges_per_team', '3', 'The maximum number of judges that can be on a judging team.', -1), -('JSCHEDULER_effort', '10000', 'This number controls how long and hard the judge scheduler will look for a scheduling solution. Smaller numbers are lower effort. 100 is practically no effort, 1000 is moderate effort, 10000 is high effort. It can take several tens of minutes to run the scheduler with high effort, but it gives a very good solution.', -1); - diff --git a/db/db.update.21.sql b/db/db.update.21.sql deleted file mode 100644 index 257683eb..00000000 --- a/db/db.update.21.sql +++ /dev/null @@ -1,44 +0,0 @@ -ALTER TABLE `config` ADD `category` VARCHAR( 32 ) NOT NULL AFTER `val` , ADD `ord` INT NOT NULL AFTER `category` ; -UPDATE `config` SET `category` = 'Special', ord='0' WHERE `year`=0; -UPDATE `config` SET `category` = 'Global', ord='100' WHERE var='fairname'; -UPDATE `config` SET `category` = 'Global', ord='200' WHERE var='default_language'; -UPDATE `config` SET `category` = 'Global', ord='300' WHERE var='fairmanageremail'; -UPDATE `config` SET `category` = 'Global', ord='400' WHERE var='filterdivisionbycategory'; -UPDATE `config` SET `category` = 'Global', ord='500' WHERE var='committee_publiclayout'; -UPDATE `config` SET `category` = 'Global', ord='600' WHERE var='project_num_format'; -UPDATE `config` SET `category` = 'Judge Scheduler', ord='100' WHERE var='JSCHEDULER_effort'; -UPDATE `config` SET `category` = 'Judge Scheduler', ord='200' WHERE var='JSCHEDULER_min_judges_per_team'; -UPDATE `config` SET `category` = 'Judge Scheduler', ord='300' WHERE var='JSCHEDULER_max_judges_per_team'; -UPDATE `config` SET `category` = 'Judge Scheduler', ord='400' WHERE var='JSCHEDULER_max_projects_per_team'; -UPDATE `config` SET `category` = 'Judge Scheduler', ord='500' WHERE var='JSCHEDULER_times_judged'; -UPDATE `config` SET `category` = 'Judge Registration', ord='100' WHERE var='judge_registration_type'; -UPDATE `config` SET `category` = 'Judge Registration', ord='200' WHERE var='judge_registration_singlepassword'; -UPDATE `config` SET `category` = 'Judge Registration', ord='300' WHERE var='judges_password_expiry_days'; -UPDATE `config` SET `category` = 'Judge Registration', ord='400' WHERE var='minjudgeage'; -UPDATE `config` SET `category` = 'Judge Registration', ord='500' WHERE var='maxjudgeage'; -UPDATE `config` SET `category` = 'Participant Registration', ord='100' WHERE var='participant_registration_type'; -UPDATE `config` SET `category` = 'Participant Registration', ord='200' WHERE var='participant_registration_singlepassword'; -UPDATE `config` SET `category` = 'Participant Registration', ord='300' WHERE var='regfee'; -UPDATE `config` SET `category` = 'Participant Registration', ord='400' WHERE var='regfee_per'; -UPDATE `config` SET `category` = 'Participant Registration', ord='500' WHERE var='minage'; -UPDATE `config` SET `category` = 'Participant Registration', ord='501' WHERE var='maxage'; -UPDATE `config` SET `category` = 'Participant Registration', ord='600' WHERE var='mingrade'; -UPDATE `config` SET `category` = 'Participant Registration', ord='601' WHERE var='maxgrade'; -UPDATE `config` SET `category` = 'Participant Registration', ord='700' WHERE var='minmentorsperproject'; -UPDATE `config` SET `category` = 'Participant Registration', ord='701' WHERE var='maxmentorsperproject'; -UPDATE `config` SET `category` = 'Participant Registration', ord='800' WHERE var='minstudentsperproject'; -UPDATE `config` SET `category` = 'Participant Registration', ord='801' WHERE var='maxstudentsperproject'; -UPDATE `config` SET `category` = 'Participant Registration', ord='900' WHERE var='maxspecialawardsperproject'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1000' WHERE var='participant_student_personal'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1100' WHERE var='participant_project_summary_wordmax'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1200' WHERE var='participant_student_foodreq'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1300' WHERE var='participant_student_tshirt'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1400' WHERE var='specialawardnomination'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1500' WHERE var='usedivisionselector'; - -UPDATE `config` SET var='effort' WHERE var='JSCHEDULER_effort'; -UPDATE `config` SET var='min_judges_per_team' WHERE var='JSCHEDULER_min_judges_per_team'; -UPDATE `config` SET var='max_judges_per_team' WHERE var='JSCHEDULER_max_judges_per_team'; -UPDATE `config` SET var='max_projects_per_team' WHERE var='JSCHEDULER_max_projects_per_team'; -UPDATE `config` SET var='times_judged' WHERE var='JSCHEDULER_times_judged'; - diff --git a/db/db.update.22.sql b/db/db.update.22.sql deleted file mode 100644 index 1129d3ab..00000000 --- a/db/db.update.22.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `config` (`var`, `val`, `description`, `category`, `year`, `ord`) VALUES -('project_status', 'payment_pending', 'The status a project must have have to be considered eligible for judge scheduling. Must be one of "open", "payment_pending" or "complete".', 'Judge Scheduler', -1, 600); diff --git a/db/db.update.23.sql b/db/db.update.23.sql deleted file mode 100644 index fcf062eb..00000000 --- a/db/db.update.23.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `students` CHANGE `sex` `sex` ENUM( 'male', 'female' ) NULL DEFAULT NULL; diff --git a/db/db.update.24.sql b/db/db.update.24.sql deleted file mode 100644 index d9530c9c..00000000 --- a/db/db.update.24.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `signaturepage` (`id`, `name`, `use`, `text`) VALUES (3, 'teacherdeclaration', 0, 'The following section is to be read and signed by the teacher.\r\n\r\nI certify that:\r\n - The preparation of this project is mainly the student(s)\' own work.\r\n - The student(s) have read the rules and regulations and agree to abide by them.\r\n - I agree that the decision of the judges will be final.'); - diff --git a/db/db.update.25.sql b/db/db.update.25.sql deleted file mode 100644 index 1cb4e8eb..00000000 --- a/db/db.update.25.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `award_contacts` ADD `position` VARCHAR( 64 ) NOT NULL AFTER `lastname` ; -ALTER TABLE `award_prizes` ADD `value` INT NOT NULL AFTER `scholarship` ; -UPDATE `award_prizes` SET `value` = `cash` + `scholarship`; diff --git a/db/db.update.26.sql b/db/db.update.26.sql deleted file mode 100644 index 4f95f998..00000000 --- a/db/db.update.26.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `schools` ADD `principal` VARCHAR( 64 ) NOT NULL AFTER `postalcode` ; -ALTER TABLE `schools` ADD `schoolemail` VARCHAR( 128 ) NOT NULL AFTER `principal` ; -ALTER TABLE `schools` ADD `schoollang` VARCHAR( 2 ) NOT NULL AFTER `school` ; -ALTER TABLE `schools` ADD `schoollevel` VARCHAR( 32 ) NOT NULL AFTER `schoollang` ; diff --git a/db/db.update.27.sql b/db/db.update.27.sql deleted file mode 100644 index ea1f8abe..00000000 --- a/db/db.update.27.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `award_sponsors` CHANGE `email` `email` VARCHAR( 128 ) NOT NULL; diff --git a/db/db.update.28.sql b/db/db.update.28.sql deleted file mode 100644 index 9a00ac36..00000000 --- a/db/db.update.28.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `award_contacts` ADD `salutation` VARCHAR( 8 ) NOT NULL AFTER `award_sponsors_id` ; diff --git a/db/db.update.29.sql b/db/db.update.29.sql deleted file mode 100644 index 41c3dd53..00000000 --- a/db/db.update.29.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `award_awards` ADD `cwsfaward` BOOL DEFAULT '0' NOT NULL AFTER `excludefromac` ; -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('ysf_region_id', '', 'CWSF Registration', 100, 'Your YSF Assigned Region Identifier', -1); -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES ('ysf_region_password', '', 'CWSF Registration', 200, 'Your YSF Assigned Region Password', -1); -ALTER TABLE `projectdivisions` ADD `cwsfdivisionid` INT DEFAULT NULL AFTER `division_shortform` ; -ALTER TABLE `projects` ADD `cwsfdivisionid` INT DEFAULT NULL AFTER `projectdivisions_id` ; diff --git a/db/db.update.3.sql b/db/db.update.3.sql deleted file mode 100644 index 5a6fa733..00000000 --- a/db/db.update.3.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `dates` CHANGE `date` `date` DATETIME DEFAULT '0000-00-00' NOT NULL; -INSERT INTO `dates` ( `id` , `date` , `name` , `description` , `year` ) VALUES ( '', '2005-01-01 00:00:00', 'judgeregopen', 'Judges registration opens', '2005'); -INSERT INTO `dates` ( `id` , `date` , `name` , `description` , `year` ) VALUES ( '', '2005-03-31 00:00:00', 'judgeregclose', 'Judges registration closes', '2005'); -ALTER TABLE `judges_teams` ADD `name` VARCHAR( 64 ) NOT NULL AFTER `num` ; -ALTER TABLE `judges_teams` ADD UNIQUE ( `name` , `year` ); diff --git a/db/db.update.30.sql b/db/db.update.30.sql deleted file mode 100644 index 5985f2e1..00000000 --- a/db/db.update.30.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `translations` DROP INDEX `strmd5`; -ALTER TABLE `translations` DROP INDEX `lang`; -ALTER TABLE `translations` ADD UNIQUE KEY ( `lang`, `strmd5` ); - diff --git a/db/db.update.31.sql b/db/db.update.31.sql deleted file mode 100644 index dd11cb0b..00000000 --- a/db/db.update.31.sql +++ /dev/null @@ -1,36 +0,0 @@ -UPDATE `config` SET `category` = 'Special', ord='0' WHERE `year`=0; -UPDATE `config` SET `category` = 'Global', ord='100' WHERE var='fairname'; -UPDATE `config` SET `category` = 'Global', ord='200' WHERE var='default_language'; -UPDATE `config` SET `category` = 'Global', ord='300' WHERE var='fairmanageremail'; -UPDATE `config` SET `category` = 'Global', ord='400' WHERE var='filterdivisionbycategory'; -UPDATE `config` SET `category` = 'Global', ord='500' WHERE var='committee_publiclayout'; -UPDATE `config` SET `category` = 'Global', ord='600' WHERE var='project_num_format'; -UPDATE `config` SET `category` = 'Judge Scheduler', ord='100' WHERE var='JSCHEDULER_effort'; -UPDATE `config` SET `category` = 'Judge Scheduler', ord='200' WHERE var='JSCHEDULER_min_judges_per_team'; -UPDATE `config` SET `category` = 'Judge Scheduler', ord='300' WHERE var='JSCHEDULER_max_judges_per_team'; -UPDATE `config` SET `category` = 'Judge Scheduler', ord='400' WHERE var='JSCHEDULER_max_projects_per_team'; -UPDATE `config` SET `category` = 'Judge Scheduler', ord='500' WHERE var='JSCHEDULER_times_judged'; -UPDATE `config` SET `category` = 'Judge Registration', ord='100' WHERE var='judge_registration_type'; -UPDATE `config` SET `category` = 'Judge Registration', ord='200' WHERE var='judge_registration_singlepassword'; -UPDATE `config` SET `category` = 'Judge Registration', ord='300' WHERE var='judges_password_expiry_days'; -UPDATE `config` SET `category` = 'Judge Registration', ord='400' WHERE var='minjudgeage'; -UPDATE `config` SET `category` = 'Judge Registration', ord='500' WHERE var='maxjudgeage'; -UPDATE `config` SET `category` = 'Participant Registration', ord='100' WHERE var='participant_registration_type'; -UPDATE `config` SET `category` = 'Participant Registration', ord='200' WHERE var='participant_registration_singlepassword'; -UPDATE `config` SET `category` = 'Participant Registration', ord='300' WHERE var='regfee'; -UPDATE `config` SET `category` = 'Participant Registration', ord='400' WHERE var='regfee_per'; -UPDATE `config` SET `category` = 'Participant Registration', ord='500' WHERE var='minage'; -UPDATE `config` SET `category` = 'Participant Registration', ord='501' WHERE var='maxage'; -UPDATE `config` SET `category` = 'Participant Registration', ord='600' WHERE var='mingrade'; -UPDATE `config` SET `category` = 'Participant Registration', ord='601' WHERE var='maxgrade'; -UPDATE `config` SET `category` = 'Participant Registration', ord='700' WHERE var='minmentorsperproject'; -UPDATE `config` SET `category` = 'Participant Registration', ord='701' WHERE var='maxmentorsperproject'; -UPDATE `config` SET `category` = 'Participant Registration', ord='800' WHERE var='minstudentsperproject'; -UPDATE `config` SET `category` = 'Participant Registration', ord='801' WHERE var='maxstudentsperproject'; -UPDATE `config` SET `category` = 'Participant Registration', ord='900' WHERE var='maxspecialawardsperproject'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1000' WHERE var='participant_student_personal'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1100' WHERE var='participant_project_summary_wordmax'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1200' WHERE var='participant_student_foodreq'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1300' WHERE var='participant_student_tshirt'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1400' WHERE var='specialawardnomination'; -UPDATE `config` SET `category` = 'Participant Registration', ord='1500' WHERE var='usedivisionselector'; diff --git a/db/db.update.32.sql b/db/db.update.32.sql deleted file mode 100644 index 4e080822..00000000 --- a/db/db.update.32.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO `config` (category,ord,var,val,description,year) VALUES ('Participant Registration','1050','participant_mentor','yes','Ask for mentorship information (yes/no)',-1); -ALTER TABLE `projectcategories` ADD `category_shortform` VARCHAR( 3 ) NOT NULL AFTER `category` ; -UPDATE `config` SET `description` = 'C=Category ID, c=Category Shortform, D=Division ID, d=Division Shortform, N=2 digit Number' WHERE `var` = 'project_num_format'; -INSERT INTO `config` (category,ord,var,val,description,year) VALUES ('Participant Registration','1150','participant_project_title_charmax','100','The maximum number of characters acceptable in the project title (Max 255)',-1); - diff --git a/db/db.update.33.sql b/db/db.update.33.sql deleted file mode 100644 index 109405d8..00000000 --- a/db/db.update.33.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `config` (category,ord,var,val,description,year) VALUES ('Participant Registration','1160','participant_project_table','yes','Ask if the project requires a table (yes/no)',-1); -INSERT INTO `config` (category,ord,var,val,description,year) VALUES ('Participant Registration','1170','participant_project_electricity','yes','Ask if the project requires electricity (yes/no)',-1); -UPDATE `config` SET description = 'The type of Participant Registration to use: open | singlepassword | schoolpassword | invite | openorinvite' WHERE `var` = 'participant_registration_type' diff --git a/db/db.update.34.sql b/db/db.update.34.sql deleted file mode 100644 index 79377cd4..00000000 --- a/db/db.update.34.sql +++ /dev/null @@ -1,41 +0,0 @@ --- -------------------------------------------------------- - --- --- Table structure for table `tours` and `tours_choice` --- - -CREATE TABLE `tours` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `name` tinytext NOT NULL, - `description` text NOT NULL, - `capacity` int(11) NOT NULL default '0', - `grade_min` int(11) NOT NULL default '7', - `grade_max` int(11) NOT NULL default '12', - PRIMARY KEY (`id`) -) ENGINE=MyISAM; - - -CREATE TABLE `tours_choice` ( - `id` int(10) unsigned NOT NULL auto_increment, - `students_id` int(10) unsigned NOT NULL default '0', - `registrations_id` int(10) unsigned NOT NULL default '0', - `tour_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - `rank` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM; - - --- --- Dumping data for table `config` --- - -INSERT INTO `config` (`var`, `val`, `category`, `ord`, `description`, `year`) VALUES - -('tours_enable', 'no', 'Tours', 0, 'Enable the "tours" module. Set to "yes" to allow participants to select tours', -1), -('tours_choices_min', '1', 'Tours', 100, 'Minimum number of tours a participant must select', -1), -('tours_choices_max', '3', 'Tours', 200, 'Maximum number of tours a participant may select', -1); - - - diff --git a/db/db.update.35.sql b/db/db.update.35.sql deleted file mode 100644 index be1fa538..00000000 --- a/db/db.update.35.sql +++ /dev/null @@ -1,10 +0,0 @@ --- Clean up the multiple default questions.. And insert the 5 proper questions. -DELETE FROM `questions` WHERE year='-1'; - - -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years School', 'Years of judging experience at a School level:', 'int', 'yes', 1); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years Regional', 'Years of judging experience at a Regional level:', 'int', 'yes', 2); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Years National', 'Years of judging experience at a National (CWSF) level:', 'int', 'yes', 3); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Attending Lunch', 'Will you be attending the Judge''s Lunch?', 'yesno', 'yes', 4); -INSERT INTO `questions` (`id`, `year`, `section`, `db_heading`, `question`, `type`, `required`, `ord`) VALUES ('', -1, 'judgereg', 'Willing Chair', 'Are you willing to be the lead for your judging team?', 'yesno', 'yes', 5); - diff --git a/db/db.update.36.sql b/db/db.update.36.sql deleted file mode 100644 index 5504985d..00000000 --- a/db/db.update.36.sql +++ /dev/null @@ -1,5 +0,0 @@ --- Add 2 fields to tours -ALTER TABLE `tours` ADD `contact` TINYTEXT NOT NULL , -ADD `location` TINYTEXT NOT NULL ; - - diff --git a/db/db.update.37.sql b/db/db.update.37.sql deleted file mode 100644 index d62a0a27..00000000 --- a/db/db.update.37.sql +++ /dev/null @@ -1,29 +0,0 @@ --- Add type and type_values fields to the config editor. -ALTER TABLE `config` ADD `type` ENUM( '', 'yesno', 'number', 'text', 'enum' ) NOT NULL AFTER `category` , -ADD `type_values` TINYTEXT NOT NULL AFTER `type` ; - -UPDATE `config` SET `type` = 'yesno', -`description` = 'Ask for students special food requirements. Should be ''Yes'' if you plan on providing food to the students.' WHERE `var`='participant_student_foodreq'; - -UPDATE `config` set `type` = 'yesno', `description` = 'Specify whether to use the division selector flowchart questions to help decide on the division' WHERE `var`='usedivisionselector'; -UPDATE `config` set `type` = 'yesno' WHERE `var`='participant_student_personal'; -UPDATE `config` set `type` = 'yesno', `description` = 'Ask for students their T-Shirt size' WHERE `var`='participant_student_tshirt'; -UPDATE `config` set `type` = 'yesno', `description` = 'Ask for mentorship information' WHERE `var`='participant_mentor'; -UPDATE `config` set `type` = 'yesno', `description` = 'Ask if the project requires a table' WHERE `var`='participant_project_table'; -UPDATE `config` set `type` = 'yesno', `description` = 'Ask if the project requires electricity' WHERE `var`='participant_project_electricity'; -UPDATE `config` set `type` = 'yesno' WHERE `var`='tours_enable'; -UPDATE `config` set `type` = 'yesno', `description` = 'Allows for the setup of different divisions for each category' WHERE `var`='filterdivisionbycategory'; - -UPDATE `config` SET `type` = 'enum', `type_values` = 'student=Student|project=Project', `description` = 'Registration fee is per student, or per project?' WHERE `var` = 'regfee_per'; - -UPDATE `config` SET `type` = 'enum', `type_values` = 'open=Open|singlepassword=Single Password|schoolpassword=School Password|invite=Invite|openorinvite=Open or Invite', `description`='The type of Participant Registration to use' WHERE `var` = 'participant_registration_type'; - -UPDATE `config` SET `type` = 'enum', `type_values` = 'open=Open|singlepassword=Single Password|invite=Invite', `description` = 'The type of Judge Registration to use' WHERE `var` = 'judge_registration_type'; - -UPDATE `config` SET `type` = 'enum', `type_values` = 'open=Open|payment_pending=Payment Pending|complete=Complete', `description` = 'The status a project must have have to be considered eligible for judge scheduling. ' WHERE `var` = 'project_status' ; - -UPDATE `config` SET `type` = 'enum', `type_values` = 'none=None|date=By Date|registration=With Registration', `description` = 'Self nominations for special awards are due either with registration ("With Registration"), or on a specific date. If "By Date" is used, it must be configured under "Important Dates" section. If you do not wish to allow students to self-nominate for special awards, set to "None"' WHERE `var` = 'specialawardnomination'; - - - - diff --git a/db/db.update.38.sql b/db/db.update.38.sql deleted file mode 100644 index 62b4ce7f..00000000 --- a/db/db.update.38.sql +++ /dev/null @@ -1,6 +0,0 @@ - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'participant_student_tshirt_cost', '0.00', 'Participant Registration', 'number', '', '1310', 'The cost of each T-Shirt. If this is non-zero, a "None" option is added to the T-Shirt size selection box, and a note is added indicating the cost of each T-Shirt', '-1'); - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'regfee_show_info', 'no', 'Participant Registration', 'yesno', '', '410', 'Show a breakdown of the total Registration Fee calculation on the main student registration page', '-1'); - -ALTER TABLE `students` CHANGE `tshirt` `tshirt` VARCHAR( 32 ) NOT NULL DEFAULT 'medium'; diff --git a/db/db.update.39.sql b/db/db.update.39.sql deleted file mode 100644 index 72831cef..00000000 --- a/db/db.update.39.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'specialawardnomination_aftersignatures', 'yes', 'Participant Registration', 'yesno', '', '1390', 'Does the signature page need to be received BEFORE students are allowed to self nominate for special awards?', '-1'); - -UPDATE `config` SET `type_values` = 'none=None|date=By Date|registration=With Registration', `description` = 'Select when students may self nominate for special awards.
    • None - Students may not self-nominate for special awards.
    • By Date - Between specific dates, specified in the "Important Dates" section.
    • With Registration - During the same time as registration is open.
    ' WHERE `var` = 'specialawardnomination'; diff --git a/db/db.update.4.sql b/db/db.update.4.sql deleted file mode 100644 index 280ddf74..00000000 --- a/db/db.update.4.sql +++ /dev/null @@ -1,27 +0,0 @@ -ALTER TABLE `judges_teams_link` ADD `captain` ENUM( 'no', 'yes' ) NOT NULL AFTER `judges_teams_id` ; -CREATE TABLE `judges_timeslots` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `date` DATE NOT NULL , - `starttime` TIME NOT NULL , - `endtime` TIME NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -); -CREATE TABLE `judges_teams_timeslots_link` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `judges_teams_id` INT UNSIGNED NOT NULL , - `judges_timeslots_id` INT UNSIGNED NOT NULL , - `year` INT UNSIGNED NOT NULL , - PRIMARY KEY ( `id` ) -); -ALTER TABLE judges_teams_timeslots_link ADD UNIQUE (judges_teams_id,judges_timeslots_id,year); -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `judges_teams_id` INT UNSIGNED NOT NULL , - `judges_timeslots_id` INT UNSIGNED NOT NULL , - `projects_id` INT UNSIGNED NOT NULL , - `year` INT UNSIGNED NOT NULL , - PRIMARY KEY ( `id` ) -); -ALTER TABLE `judges_teams_timeslots_projects_link` ADD UNIQUE (judges_teams_id,judges_timeslots_id,projects_id,year); -ALTER TABLE `projects` CHANGE `projectnumber` `projectnumber` VARCHAR( 16 ) DEFAULT NULL; diff --git a/db/db.update.40.sql b/db/db.update.40.sql deleted file mode 100644 index 15e2ce9e..00000000 --- a/db/db.update.40.sql +++ /dev/null @@ -1,16 +0,0 @@ -ALTER TABLE `judges` ADD `typepref` VARCHAR( 8 ) NOT NULL ; - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'judges_specialaward_enable', 'no', 'Judge Registration', 'yesno', '', '1000', 'Allow judges to specify their special award judging preferences (in addition to the divisional judging preferences)', '-1'); -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'judges_specialaward_only_enable', 'no', 'Judge Registration', 'yesno', '', '1100', 'Allow judges to specify that they are a judge for a specific special award. If a judge selects this, it disables their divisional preference selection entirely', '-1'); -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'judges_specialaward_min', '1', 'Judge Registration', 'number', '', '1200', 'Minimum number of special awards a judge must select when specifying special award preferences', '-1'); -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'judges_specialaward_max', '6', 'Judge Registration', 'number', '', '1300', 'Maximum number of special awards a judge must select when specifying special award preferences', '-1'); - -CREATE TABLE `judges_specialaward_sel` ( -`id` INT NOT NULL AUTO_INCREMENT, -`judges_id` INT NOT NULL , -`award_awards_id` INT NOT NULL , -`year` INT NOT NULL, -PRIMARY KEY (`id`) -) ENGINE = MyISAM ; - - diff --git a/db/db.update.41.sql b/db/db.update.41.sql deleted file mode 100644 index ceaa8d79..00000000 --- a/db/db.update.41.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `signaturepage` ( `id` , `name` , `use` , `text` ) VALUES ( '', 'postamble', '0', 'Please send the signed signature form and any required payment to: - -[Insert Address Here]'); diff --git a/db/db.update.42.sql b/db/db.update.42.sql deleted file mode 100644 index 4128c290..00000000 --- a/db/db.update.42.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `students` ADD `pronunciation` VARCHAR( 64 ) NOT NULL AFTER `lastname`; - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'participant_student_pronunciation', 'no', 'Participant Registration', 'yesno', '', '1020', 'Ask the student for a pronunciation key for their name (for award ceremonies)', '-1'); - diff --git a/db/db.update.43.sql b/db/db.update.43.sql deleted file mode 100644 index 6ad3375c..00000000 --- a/db/db.update.43.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `config` SET `description` = 'The status a project must have to be considered eligible for judge scheduling. ' WHERE `var` = 'project_status' ; diff --git a/db/db.update.44.sql b/db/db.update.44.sql deleted file mode 100644 index bc119024..00000000 --- a/db/db.update.44.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `project_specialawards_link` CHANGE `award_awards_id` `award_awards_id` INT( 10 ) UNSIGNED NULL DEFAULT '0' diff --git a/db/db.update.45.sql b/db/db.update.45.sql deleted file mode 100644 index d4052103..00000000 --- a/db/db.update.45.sql +++ /dev/null @@ -1,221 +0,0 @@ --- -------------------------------------------------------- - --- --- Table structure for table `reports` --- - -CREATE TABLE `reports` ( `id` int(11) NOT NULL auto_increment, `name` varchar(128) NOT NULL default '', `desc` tinytext NOT NULL, `creator` varchar(128) NOT NULL default '', `type` enum('student','judge') NOT NULL default 'student', PRIMARY KEY (`id`)) TYPE=MyISAM; - --- --- Dumping data for table `reports` --- - -INSERT INTO `reports` VALUES (1, 'Student+Project -- Sorted by Last Name', 'Student Name, Project Number and Title, Category, Division short form sorted by Last Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (2, 'Student+Project -- Sorted by Project Number', 'Student Name, Project Number and Title, Category sorted by Project Number', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (3, 'Student+Project -- Grouped by Category', 'Student Name, Project Number and Title sorted by Last Name, grouped by Category', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (4, 'Student+Project -- School Names sorted by Last Name', 'Student Name, Project Num, School Name sorted by Last Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (5, 'Student+Project -- Grouped by School sorted by Last Name', 'Student Name, Project Number and Name sorted by Last Name, grouped by School Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (6, 'Teacher -- Name and School Info sorted by Teacher Name', 'Teacher, School Info sorted by Teacher Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (8, 'Teacher -- Names and Contact for each Student by School', 'Student Name, Teacher Name, Teacher Email, School Phone and Fax grouped by School Name with Addresses', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (9, 'Check-in Lists', 'List of students and partners, project number and name, division, registration fees, tshirt size, sorted by project number, grouped by age category', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (10, 'Student+Project -- Student (and Partner) grouped by School', 'Student Pairs, Project Name/Num Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (11, 'Student+Project -- Grouped by School sorted by Project Number', 'Individual Students, Project Name/Num Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (12, 'Student -- T-Shirt List by School', 'Individual Students, Project Num, TShirt, Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (13, 'Media -- Program Guide', 'Project Number, Both student names, and Project Title, grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (14, 'Projects -- Titles and Grades from each School', 'Project Name/Num, Grade Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (15, 'Media -- Award Winners List', 'Project Number, Student Name and Contact info, by each Award', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (16, 'Projects -- Logistical Display Requirements', 'Project Number, Students, Electricity, Table, and special needs', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (17, 'Emergency Contact Information', 'Emergency Contact Names, Relationship, and Phone Numbers for each student.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (18, 'Student -- Grouped by Grade and Gender (YSF Stats)', 'A list of students grouped by Grade and Gender. A quick way to total up the info for the YSF regional stats page.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (19, 'Student+Project -- Grouped by School, 1 per page', 'Both students names grouped by school, each school list begins on a new page.', 'The Grant Brothers', 'student'); - --- -------------------------------------------------------- - --- --- Table structure for table `reports_items` --- - -CREATE TABLE `reports_items` ( `id` int(11) NOT NULL auto_increment, `reports_id` int(11) NOT NULL default '0', `field` varchar(64) NOT NULL default '', `type` enum('col','sort','group','distinct','option') NOT NULL default 'col', `value` varchar(64) NOT NULL default '', `order` int(11) NOT NULL default '0', PRIMARY KEY (`id`)) TYPE=MyISAM ; - --- --- Dumping data for table `reports_items` --- - -INSERT INTO `reports_items` VALUES ('', 1, 'grade', 'col', '', 5); -INSERT INTO `reports_items` VALUES ('', 1, 'div', 'col', '', 4); -INSERT INTO `reports_items` VALUES ('', 1, 'last_name', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 2, 'category', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 2, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 2, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 3, 'div', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 4, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 3, 'last_name', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 3, 'category', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 4, 'grade', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 4, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 4, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 4, 'last_name', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 5, 'category', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 5, 'div', 'col', '', 4); -INSERT INTO `reports_items` VALUES ('', 5, 'last_name', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 5, 'school', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 6, 'school_phone', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 6, 'school', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 6, 'teacher', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 6, 'teacher', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 6, 'teacher', 'distinct', '', 0); -INSERT INTO `reports_items` VALUES ('', 11, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 11, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 11, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 8, 'school_fax', 'col', '', 5); -INSERT INTO `reports_items` VALUES ('', 8, 'school_phone', 'col', '', 4); -INSERT INTO `reports_items` VALUES ('', 8, 'teacheremail', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 8, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 9, 'div', 'col', '', 6); -INSERT INTO `reports_items` VALUES ('', 9, 'tshirt', 'col', '', 5); -INSERT INTO `reports_items` VALUES ('', 9, 'name', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 9, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 9, 'category', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 9, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 10, 'partner', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 10, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 10, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 10, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 10, 'school', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 10, 'pn', 'distinct', '', 0); -INSERT INTO `reports_items` VALUES ('', 2, 'title', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 11, 'div', 'col', '', 4); -INSERT INTO `reports_items` VALUES ('', 11, 'category', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 11, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 11, 'school', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 12, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 12, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 12, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 12, 'school', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 13, 'bothnames', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 13, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 13, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 13, 'school', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 13, 'pn', 'distinct', '', 0); -INSERT INTO `reports_items` VALUES ('', 14, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 14, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 14, 'school', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 14, 'pn', 'distinct', '', 0); -INSERT INTO `reports_items` VALUES ('', 15, 'postal', 'col', '', 5); -INSERT INTO `reports_items` VALUES ('', 15, 'province', 'col', '', 4); -INSERT INTO `reports_items` VALUES ('', 15, 'city', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 15, 'address', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 15, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 15, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 15, 'awards', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 1, 'allow_multiline', 'option', 'yes', 2); -INSERT INTO `reports_items` VALUES ('', 1, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 1, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 1, 'category', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 1, 'title', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 3, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 3, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 3, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 9, 'partner', 'col', '', 4); -INSERT INTO `reports_items` VALUES ('', 9, 'title', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 9, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 9, 'pn', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 9, 'group_new_page', 'option', 'yes', 1); -INSERT INTO `reports_items` VALUES ('', 5, 'grade', 'col', '', 5); -INSERT INTO `reports_items` VALUES ('', 5, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 5, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 3, 'title', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 4, 'school', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 8, 'teacher', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 8, 'schooladdr', 'group', '', 1); -INSERT INTO `reports_items` VALUES ('', 8, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 11, 'grade', 'col', '', 5); -INSERT INTO `reports_items` VALUES ('', 2, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 2, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 2, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 12, 'tshirt', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 12, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 8, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 12, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 12, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 8, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 8, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 8, 'school', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 15, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 15, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 15, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 15, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 13, 'title', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 13, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 13, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 13, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 14, 'title', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 14, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 14, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 14, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 16, 'req_special', 'col', '', 4); -INSERT INTO `reports_items` VALUES ('', 16, 'req_table', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 16, 'req_elec', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 16, 'title', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 16, 'category', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 16, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 16, 'pn', 'distinct', '', 0); -INSERT INTO `reports_items` VALUES ('', 16, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 16, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 16, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 16, 'allow_multiline', 'option', 'yes', 2); -INSERT INTO `reports_items` VALUES ('', 17, 'emerg_phone', 'col', '', 4); -INSERT INTO `reports_items` VALUES ('', 17, 'emerg_relation', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 17, 'emerg_name', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 17, 'last_name', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 8, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 14, 'grade', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 17, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 17, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 6, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 6, 'school_fax', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 17, 'allow_multiline', 'option', 'yes', 2); -INSERT INTO `reports_items` VALUES ('', 17, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 17, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 6, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 6, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 9, 'paid', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 1, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 2, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 3, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 3, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 4, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 4, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 10, 'title', 'col', '', 3); -INSERT INTO `reports_items` VALUES ('', 10, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 10, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 10, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 5, 'title', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 5, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 5, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 5, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 11, 'title', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 11, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 11, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 18, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 18, 'name', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 18, 'school', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 18, 'grade', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 18, 'gender', 'group', '', 1); -INSERT INTO `reports_items` VALUES ('', 18, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 18, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 18, 'group_new_page', 'option', 'no', 1); -INSERT INTO `reports_items` VALUES ('', 18, 'allow_multiline', 'option', 'no', 2); -INSERT INTO `reports_items` VALUES ('', 3, 'grade', 'col', '', 4); -INSERT INTO `reports_items` VALUES ('', 1, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 2, 'div', 'col', '', 4); -INSERT INTO `reports_items` VALUES ('', 2, 'grade', 'col', '', 5); -INSERT INTO `reports_items` VALUES ('', 19, 'pn', 'col', '', 0); -INSERT INTO `reports_items` VALUES ('', 19, 'title', 'col', '', 1); -INSERT INTO `reports_items` VALUES ('', 19, 'bothnames', 'col', '', 2); -INSERT INTO `reports_items` VALUES ('', 19, 'school', 'group', '', 0); -INSERT INTO `reports_items` VALUES ('', 19, 'pn', 'sort', '', 0); -INSERT INTO `reports_items` VALUES ('', 19, 'type', 'option', 'pdf', 0); -INSERT INTO `reports_items` VALUES ('', 19, 'group_new_page', 'option', 'yes', 1); -INSERT INTO `reports_items` VALUES ('', 19, 'allow_multiline', 'option', 'no', 2); - diff --git a/db/db.update.46.sql b/db/db.update.46.sql deleted file mode 100644 index a3034b17..00000000 --- a/db/db.update.46.sql +++ /dev/null @@ -1,43 +0,0 @@ -ALTER TABLE `reports` CHANGE `type` `type` ENUM( 'student', 'judge', 'award' ) NOT NULL DEFAULT 'student'; - -INSERT INTO `reports` (`id`, `name`, `desc`, `creator`, `type`) VALUES - (20, 'Judges -- Sorted by Last Name', 'A list of judge contact info, sorted by last name', 'The Grant Brothers', 'judge'), - (21, 'Judges -- Judging Teams', 'A list of all the judges, sorted by team number.', 'The Grant Brothers', 'judge'), - (22, 'Awards -- Grouped by Judging Team', 'List of each judging team, and the awards they are judging', 'The Grant Brothers', 'award'), - (23, 'Awards -- Judging Teams grouped by Award', 'A list of each award, and the judging teams that will assign it', 'The Grant Brothers', 'award'); - -INSERT INTO `reports_items` (`id`, `reports_id`, `field`, `type`, `value`, `order`) VALUES - ('', 20, 'type', 'option', 'pdf', 0), - ('', 20, 'phone_work', 'col', '', 3), - ('', 20, 'phone_home', 'col', '', 2), - ('', 20, 'email', 'col', '', 1), - ('', 20, 'name', 'sort', '', 0), - ('', 20, 'group_new_page', 'option', 'no', 1), - ('', 20, 'name', 'col', '', 0), - ('', 20, 'complete', 'col', '', 4), - ('', 20, 'allow_multiline', 'option', 'no', 2), - ('', 21, 'type', 'option', 'pdf', 0), - ('', 21, 'namefl', 'col', '', 3), - ('', 21, 'captain', 'col', '', 2), - ('', 21, 'team', 'col', '', 1), - ('', 21, 'namefl', 'sort', '', 1), - ('', 21, 'teamnum', 'sort', '', 0), - ('', 21, 'group_new_page', 'option', 'no', 1), - ('', 21, 'teamnum', 'col', '', 0), - ('', 21, 'allow_multiline', 'option', 'no', 2), - ('', 22, 'type', 'col', '', 1), - ('', 22, 'allow_multiline', 'option', 'yes', 2), - ('', 22, 'group_new_page', 'option', 'no', 1), - ('', 22, 'type', 'option', 'pdf', 0), - ('', 22, 'judgeteamnum', 'group', '', 0), - ('', 22, 'name', 'col', '', 0), - ('', 22, 'judgeteamname', 'group', '', 1), - ('', 23, 'group_new_page', 'option', 'no', 1), - ('', 23, 'judgeteamname', 'col', '', 1), - ('', 23, 'type', 'group', '', 0), - ('', 23, 'judgeteamnum', 'sort', '', 0), - ('', 23, 'allow_multiline', 'option', 'yes', 2), - ('', 23, 'name', 'group', '', 1), - ('', 23, 'judgeteamnum', 'col', '', 0), - ('', 23, 'type', 'option', 'pdf', 0); - diff --git a/db/db.update.47.sql b/db/db.update.47.sql deleted file mode 100644 index b9b64a17..00000000 --- a/db/db.update.47.sql +++ /dev/null @@ -1,433 +0,0 @@ - -DROP TABLE `reports`; - -CREATE TABLE `reports` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `desc` tinytext NOT NULL, - `creator` varchar(128) NOT NULL default '', - `type` enum('student','judge','award','committee') NOT NULL default 'student', - PRIMARY KEY (`id`) -) ENGINE=MyISAM; - - -INSERT INTO `reports` VALUES (1, 'Student+Project -- Sorted by Last Name', 'Student Name, Project Number and Title, Category, Division short form sorted by Last Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (2, 'Student+Project -- Sorted by Project Number', 'Student Name, Project Number and Title, Category sorted by Project Number', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (3, 'Student+Project -- Grouped by Category', 'Student Name, Project Number and Title sorted by Last Name, grouped by Category', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (4, 'Student+Project -- School Names sorted by Last Name', 'Student Name, Project Num, School Name sorted by Last Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (5, 'Student+Project -- Grouped by School sorted by Last Name', 'Student Name, Project Number and Name sorted by Last Name, grouped by School Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (6, 'Teacher -- Name and School Info sorted by Teacher Name', 'Teacher, School Info sorted by Teacher Name', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (7, 'Teacher -- Names and Contact for each Student by School', 'Student Name, Teacher Name, Teacher Email, School Phone and Fax grouped by School Name with Addresses', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (8, 'Awards -- Special Awards Nominations Data', 'listing of special award nominations for each project, lots of data for excel so you can slice and dice (and check additional requirements)', 'Ceddy', 'student'); -INSERT INTO `reports` VALUES (9, 'Check-in Lists', 'List of students and partners, project number and name, division, registration fees, tshirt size, sorted by project number, grouped by age category', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (10, 'Student+Project -- Student (and Partner) grouped by School', 'Student Pairs, Project Name/Num Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (11, 'Student+Project -- Grouped by School sorted by Project Number', 'Individual Students, Project Name/Num Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (12, 'Student -- T-Shirt List by School', 'Individual Students, Project Num, TShirt, Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (13, 'Media -- Program Guide', 'Project Number, Both student names, and Project Title, grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (14, 'Projects -- Titles and Grades from each School', 'Project Name/Num, Grade Grouped by School', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (15, 'Media -- Award Winners List', 'Project Number, Student Name and Contact info, by each Award', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (16, 'Projects -- Logistical Display Requirements', 'Project Number, Students, Electricity, Table, and special needs', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (17, 'Emergency Contact Information', 'Emergency Contact Names, Relationship, and Phone Numbers for each student.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (18, 'Student -- Grouped by Grade and Gender (YSF Stats)', 'A list of students grouped by Grade and Gender. A quick way to total up the info for the YSF regional stats page.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (19, 'Student+Project -- Grouped by School, 1 per page', 'Both students names grouped by school, each school list begins on a new page.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (20, 'Judges -- Sorted by Last Name', 'A list of judge contact info, sorted by last name', 'The Grant Brothers', 'judge'); -INSERT INTO `reports` VALUES (21, 'Judges -- Judging Teams', 'A list of all the judges, sorted by team number.', 'The Grant Brothers', 'judge'); -INSERT INTO `reports` VALUES (22, 'Awards -- Grouped by Judging Team', 'List of each judging team, and the awards they are judging', 'The Grant Brothers', 'award'); -INSERT INTO `reports` VALUES (23, 'Awards -- Judging Teams grouped by Award', 'A list of each award, and the judging teams that will assign it', 'The Grant Brothers', 'award'); -INSERT INTO `reports` VALUES (24, 'Labels -- School Mailing Addresses', 'School Mailing Addresses with a blank spot for the teacher''s name, since each student apparently spells their teacher''s name differently.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (25, 'Labels -- Student Name and Project Number', 'Just the students names and project name/number on a label.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (26, 'Name Tags -- Students', 'Name Tags for Students', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (27, 'Name Tags -- Judges', 'Name Tags for Judges', 'The Grant Brothers', 'judge'); -INSERT INTO `reports` VALUES (28, 'Name Tags -- Committee Members', 'Name Tags for Committee Members', 'The Grant Brothers', 'committee'); -INSERT INTO `reports` VALUES (29, 'Labels -- Project Identification (for judging sheets)', 'Project identification labels for judging sheets', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (30, 'Labels -- Table Labels', 'Labels to go on each table, fullpage landscape version', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (31, 'Awards -- Special Awards Nominations', 'Special award nominations for each project, grouped by special award, one award per page.', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (32, 'Student+Project -- Grouped by School Board ID', 'Student Name, Project Number and Name sorted by Last Name, grouped by School Board ID', 'The Grant Brothers', 'student'); -INSERT INTO `reports` VALUES (33, 'Certificates -- Participation Certificates', 'A certificate template for each student with name, project name, fair name, and project number at the bottom', 'The Grant Brothers', 'student'); - -DROP TABLE `reports_items`; - -CREATE TABLE `reports_items` ( - `id` int(11) NOT NULL auto_increment, - `reports_id` int(11) NOT NULL default '0', - `type` enum('col','sort','group','distinct','option','filter') NOT NULL default 'col', - `ord` int(11) NOT NULL, - `field` varchar(64) NOT NULL, - `value` varchar(64) NOT NULL default '', - `x` float NOT NULL default '0', - `y` float NOT NULL default '0', - `w` float NOT NULL default '0', - `h` float NOT NULL default '0', - `lines` float NOT NULL default '0', - `face` enum('','bold') NOT NULL default '', - `align` enum('center','left','right') NOT NULL default 'center', - PRIMARY KEY (`id`) -) ENGINE=MyISAM; - - -INSERT INTO `reports_items` VALUES ('', 1, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 1, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 1, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 2, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 2, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 2, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 3, 'col', 3, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 4, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 3, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 3, 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 4, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 4, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 4, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 4, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 5, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 5, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 5, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 5, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 6, 'col', 2, 'school_phone', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 6, 'col', 1, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 6, 'col', 0, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 6, 'sort', 0, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 6, 'distinct', 0, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 11, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 11, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 11, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 7, 'col', 5, 'school_fax', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 7, 'col', 4, 'school_phone', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 7, 'col', 3, 'teacheremail', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 7, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'col', 6, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'col', 5, 'tshirt', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'col', 3, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 10, 'col', 2, 'partner', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 10, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 10, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 10, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 10, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 10, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 2, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 11, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 11, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 11, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 11, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 12, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 12, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 12, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 12, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 13, 'col', 1, 'bothnames', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 13, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 13, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 13, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 13, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 14, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 14, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 14, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 14, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 15, 'col', 5, 'postal', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 15, 'col', 4, 'province', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 15, 'col', 3, 'city', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 15, 'col', 2, 'address', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 15, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 15, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 15, 'group', 0, 'awards', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 1, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 1, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 1, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 1, 'col', 3, 'category', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 1, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 3, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 3, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 3, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'col', 4, 'partner', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'col', 1, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 5, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 5, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 5, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 3, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 4, 'col', 2, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 7, 'col', 2, 'teacher', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 7, 'group', 1, 'schooladdr', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 7, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 11, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 2, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 2, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 2, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 12, 'col', 2, 'tshirt', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 12, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 7, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 12, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 12, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 7, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 7, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 7, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 15, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 15, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 15, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 15, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 13, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 13, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 13, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 13, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 14, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 14, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 14, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 14, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 16, 'col', 3, 'req_table', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'col', 2, 'req_elec', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 17, 'col', 4, 'emerg_phone', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 17, 'col', 3, 'emerg_relation', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 17, 'col', 2, 'emerg_name', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 17, 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 7, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 14, 'col', 2, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 17, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 6, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 6, 'col', 3, 'school_fax', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 17, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 17, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 6, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 6, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 9, 'col', 0, 'paid', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 1, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 2, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 3, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 3, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 4, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 4, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 10, 'col', 3, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 10, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 10, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 10, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 5, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 5, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 5, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 5, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 11, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 11, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 11, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 18, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 18, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 18, 'col', 2, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 18, 'group', 0, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 18, 'group', 1, 'gender', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 18, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 18, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 18, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 18, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 3, 'col', 4, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 1, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 2, 'col', 4, 'div', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 2, 'col', 5, 'grade', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 19, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 19, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 19, 'col', 2, 'bothnames', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 19, 'group', 0, 'school', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 19, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 19, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 19, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 19, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 21, 'sort', 1, 'namefl', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 21, 'col', 1, 'team', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 21, 'col', 2, 'captain', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 21, 'col', 3, 'namefl', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 21, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 20, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 20, 'col', 4, 'complete', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 20, 'col', 0, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 20, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 20, 'sort', 0, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 20, 'col', 1, 'email', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 20, 'col', 2, 'phone_home', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 20, 'col', 3, 'phone_work', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 20, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 21, 'sort', 0, 'teamnum', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 21, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 21, 'col', 0, 'teamnum', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 21, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 22, 'col', 1, 'type', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 22, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 22, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 22, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 22, 'group', 0, 'judgeteamnum', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 22, 'col', 0, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 22, 'group', 1, 'judgeteamname', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 23, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 23, 'col', 1, 'judgeteamname', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 23, 'group', 0, 'type', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 23, 'sort', 0, 'judgeteamnum', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 23, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 23, 'group', 1, 'name', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 23, 'col', 0, 'judgeteamnum', '', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 23, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 16, 'col', 4, 'req_special', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 16, 'option', 6, 'stock', 'letter', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 17, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 25, 'option', 6, 'stock', '5964', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 25, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 24, 'col', 2, 'school_city_prov', '', 5, 50, 95, 8, 1, '', 'left'); -INSERT INTO `reports_items` VALUES ('', 24, 'col', 1, 'school_address', '', 5, 40, 95, 16, 2, '', 'left'); -INSERT INTO `reports_items` VALUES ('', 24, 'col', 0, 'school', '', 5, 5, 95, 16, 2, '', 'left'); -INSERT INTO `reports_items` VALUES ('', 24, 'option', 6, 'stock', '5964', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 24, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 24, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 24, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 24, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 24, 'sort', 0, 'school', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 25, 'col', 4, 'school', '', 1, 90, 98, 5, 1, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 24, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 24, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 25, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 25, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 25, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 25, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 25, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 25, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'col', 7, 'nom_awards', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 25, 'col', 3, 'categorydivision', '', 1, 80, 98, 12, 2, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 25, 'col', 2, 'pn', '', 1, 68, 98, 8, 1, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 27, 'sort', 0, 'namefl', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 25, 'col', 1, 'title', '', 1, 35, 98, 27, 3, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 25, 'col', 0, 'namefl', '', 5, 5, 90, 28, 2, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 26, 'col', 2, 'categorydivision', '', 1, 70, 98, 14, 2, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 26, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 26, 'option', 6, 'stock', 'nametag', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 26, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 26, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 26, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 26, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 26, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 26, 'col', 1, 'title', '', 1, 35, 98, 27, 3, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 26, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 26, 'col', 0, 'namefl', '', 5, 5, 90, 28, 2, 'bold', 'center'); -INSERT INTO `reports_items` VALUES ('', 27, 'col', 1, 'static_text', 'Judge', 1, 40, 98, 10, 1, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 27, 'col', 0, 'namefl', '', 1, 15, 98, 24, 2, 'bold', 'center'); -INSERT INTO `reports_items` VALUES ('', 27, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 27, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 27, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 27, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 27, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 28, 'col', 1, 'static_text', 'Committee', 1, 40, 98, 10, 1, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 28, 'col', 0, 'name', '', 1, 15, 98, 24, 2, 'bold', 'center'); -INSERT INTO `reports_items` VALUES ('', 28, 'sort', 0, 'name', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 28, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 28, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 28, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 28, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 28, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 30, 'option', 6, 'stock', 'fullpage_landscape', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 29, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 29, 'col', 1, 'categorydivision', '', 1, 30, 98, 18, 1, '', 'left'); -INSERT INTO `reports_items` VALUES ('', 8, 'col', 6, 'school_city', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 29, 'col', 0, 'pn', '', 1, 5, 98, 20, 1, '', 'left'); -INSERT INTO `reports_items` VALUES ('', 29, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 29, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 29, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 29, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 29, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 29, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 30, 'col', 3, 'categorydivision', '', 1, 85, 98, 5, 1, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 30, 'col', 2, 'pn', '', 1, 20, 98, 35, 1, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 30, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 30, 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 30, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 30, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 30, 'col', 1, 'title', '', 1, 5, 98, 15, 3, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 30, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'col', 5, 'birthdate', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'col', 4, 'gender', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'col', 5, 'age', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 17, 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'col', 4, 'gender', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'group', 0, 'nom_awards', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'col', 4, 'school', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'col', 2, 'title', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'group', 0, 'school_board', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'col', 1, 'name', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 32, 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 17, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 17, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 17, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 17, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'col', 2, 'namefl', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 31, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 33, 'col', 5, 'static_text', 'Chair', 5, 85, 30, 2, 1, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 33, 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'col', 2, 'namefl', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 33, 'col', 6, 'static_text', 'Chief Judge', 60, 85, 30, 2, 1, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 33, 'col', 4, 'fair_year', '', 5, 25, 30, 6, 1, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 33, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 33, 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 33, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 33, 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 33, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 33, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 33, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 33, 'col', 3, 'pn', '', 3, 97, 94, 1, 1, '', 'right'); -INSERT INTO `reports_items` VALUES ('', 33, 'col', 0, 'fair_name', '', 1, 36, 98, 4, 1, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 33, 'col', 1, 'namefl', '', 1, 56, 98, 8, 2, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 33, 'col', 2, 'title', '', 1, 65, 98, 12, 3, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 24, 'col', 3, 'school_postal', '', 5, 60, 95, 8, 1, '', 'left'); -INSERT INTO `reports_items` VALUES ('', 30, 'col', 0, 'bothnames', '', 1, 70, 98, 10, 2, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 30, 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 26, 'col', 3, 'pn', '', 1, 85, 98, 8, 1, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 27, 'col', 2, 'organization', '', 1, 70, 98, 16, 2, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 27, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 27, 'option', 6, 'stock', 'nametag', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 27, 'filter', 0, 'complete', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 28, 'col', 2, 'organization', '', 1, 70, 98, 16, 2, '', 'center'); -INSERT INTO `reports_items` VALUES ('', 28, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 28, 'option', 6, 'stock', 'nametag', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 29, 'col', 2, 'title', '', 1, 55, 98, 40, 2, '', 'left'); -INSERT INTO `reports_items` VALUES ('', 29, 'option', 6, 'stock', '5961', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 30, 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 30, 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'col', 3, 'grade', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'col', 1, 'title', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'sort', 0, 'nom_awards', '', 0, 0, 0, 0, 0, '', ''); -INSERT INTO `reports_items` VALUES ('', 8, 'sort', 1, 'pn', '', 0, 0, 0, 0, 0, '', ''); - - - diff --git a/db/db.update.48.sql b/db/db.update.48.sql deleted file mode 100644 index d512fdb9..00000000 --- a/db/db.update.48.sql +++ /dev/null @@ -1,22 +0,0 @@ --- Example how to add a new report to the system, without knowing the --- report ID. This adds report #34 to the system, if applied directly --- after the last SQL update - -INSERT INTO `reports` (`id`, `name`, `desc`, `creator`, `type`) VALUES -('', 'Labels -- Table Labels (small)', 'Labels to go on each table', 'The Grant Brothers', 'student'); - -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES -('', LAST_INSERT_ID(), 'col', 3, 'categorydivision', '', 1, 85, 98, 7, 1, '', 'center'), -('', LAST_INSERT_ID(), 'col', 2, 'pn', '', 1, 20, 98, 35, 1, '', 'center'), -('', LAST_INSERT_ID(), 'col', 1, 'title', '', 1, 5, 98, 24, 3, '', 'center'), -('', LAST_INSERT_ID(), 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'yes', 0, 0, 0, 0, 0, '', ''), -('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'yes', 0, 0, 0, 0, 0, '', ''), -('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), -('', LAST_INSERT_ID(), 'col', 0, 'bothnames', '', 1, 70, 98, 14, 2, '', 'center'), -('', LAST_INSERT_ID(), 'distinct', 0, 'pn', '', 0, 0, 0, 0, 0, '', ''), -('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'yes', 0, 0, 0, 0, 0, '', ''), -('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), -('', LAST_INSERT_ID(), 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), -('', LAST_INSERT_ID(), 'option', 6, 'stock', '5964', 0, 0, 0, 0, 0, '', ''); - diff --git a/db/db.update.49.sql b/db/db.update.49.sql deleted file mode 100644 index 18b11ba3..00000000 --- a/db/db.update.49.sql +++ /dev/null @@ -1,4 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'scheduler_enable_sa_scheduling', 'no', 'Judge Scheduler', 'yesno', '', '900', 'Allow the scheduler to automatically create a judging team for each special award, and assigned unused divisional judges to special awards.', '-1'); - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) VALUES ( 'projects_per_special_award_judge', '20', 'Judge Scheduler', 'number', '', '1000', 'The maximum number of projects that each special awards judge can judge.', '-1'); - diff --git a/db/db.update.5.sql b/db/db.update.5.sql deleted file mode 100644 index 9fbba5f6..00000000 --- a/db/db.update.5.sql +++ /dev/null @@ -1,13 +0,0 @@ -ALTER TABLE `award_awards` ADD `presenter` VARCHAR( 128 ) NOT NULL AFTER `criteria` ; -CREATE TABLE `winners` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `awards_prizes_id` INT UNSIGNED NOT NULL , - `projects_id` INT UNSIGNED NOT NULL , - `year` INT UNSIGNED NOT NULL , - PRIMARY KEY ( `id` ) -); -ALTER TABLE winners ADD UNIQUE ( - awards_prizes_id, - projects_id, - year -); diff --git a/db/db.update.50.sql b/db/db.update.50.sql deleted file mode 100644 index 05892037..00000000 --- a/db/db.update.50.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `students` ADD `webfirst` ENUM( 'no', 'yes' ) DEFAULT 'yes' NOT NULL , -ADD `weblast` ENUM( 'no', 'yes' ) DEFAULT 'yes' NOT NULL , -ADD `webphoto` ENUM( 'no', 'yes' ) DEFAULT 'yes' NOT NULL ; diff --git a/db/db.update.51.sql b/db/db.update.51.sql deleted file mode 100644 index 2ab1ee38..00000000 --- a/db/db.update.51.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `reports` CHANGE `type` `type` ENUM( 'student', 'judge', 'award', 'committee', 'school' ) NOT NULL DEFAULT 'student' diff --git a/db/db.update.52.sql b/db/db.update.52.sql deleted file mode 100644 index 79b278de..00000000 --- a/db/db.update.52.sql +++ /dev/null @@ -1,24 +0,0 @@ -UPDATE `config` SET `type`='enum', `type_values`='student=Student|project=Project' WHERE `var`='regfee_per' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='participant_student_foodreq' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='usedivisionselector' AND `year`!='-1'; -UPDATE `config` SET `type`='enum', `type_values`='none=None|date=By Date|registration=With Registration' WHERE `var`='specialawardnomination' AND `year`!='-1'; -UPDATE `config` SET `type`='enum', `type_values`='open=Open|singlepassword=Single Password|schoolpassword=School Password|invite=Invite|openorinvite=Open or Invite' WHERE `var`='participant_registration_type' AND `year`!='-1'; -UPDATE `config` SET `type`='enum', `type_values`='open=Open|singlepassword=Single Password|invite=Invite' WHERE `var`='judge_registration_type' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='participant_student_tshirt' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='filterdivisionbycategory' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='participant_student_personal' AND `year`!='-1'; -UPDATE `config` SET `type`='enum', `type_values`='open=Open|payment_pending=Payment Pending|complete=Complete' WHERE `var`='project_status' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='participant_project_table' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='participant_mentor' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='participant_project_electricity' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='tours_enable' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='scheduler_enable_sa_scheduling' AND `year`!='-1'; -UPDATE `config` SET `type`='number', `type_values`='' WHERE `var`='participant_student_tshirt_cost' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='regfee_show_info' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='specialawardnomination_aftersignatures' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='judges_specialaward_enable' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='judges_specialaward_only_enable' AND `year`!='-1'; -UPDATE `config` SET `type`='number', `type_values`='' WHERE `var`='judges_specialaward_min' AND `year`!='-1'; -UPDATE `config` SET `type`='number', `type_values`='' WHERE `var`='judges_specialaward_max' AND `year`!='-1'; -UPDATE `config` SET `type`='yesno', `type_values`='' WHERE `var`='participant_student_pronunciation' AND `year`!='-1'; -UPDATE `config` SET `type`='number', `type_values`='' WHERE `var`='projects_per_special_award_judge' AND `year`!='-1'; diff --git a/db/db.update.53.sql b/db/db.update.53.sql deleted file mode 100644 index db897823..00000000 --- a/db/db.update.53.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `emails` (`val`, `name`, `description`, `from`, `subject`, `body`, `type`) VALUES ('register_participants_received', 'Participant Registration - Form Received', 'Sent to the participant when the admin flags their signature form as received', '', 'Registration for [FAIRNAME] Complete', 'Dear [FIRSTNAME],\r\nYour registration for the [FAIRNAME] is now complete.\r\nYour project number is [PROJECTNUMBER]. Please write down your project number and bring it with you to the fair in order to expedite the check-in process.\r\n\r\nSincerely,\r\n [FAIRNAME]', 'system'); -INSERT INTO `emails` (`val`, `name`, `description`, `from`, `subject`, `body`, `type`) VALUES ('register_participants_paymentpending', 'Participant Registration - Payment Pending', 'Sent to the participant when the admin flags their signature form as received but payment pending', '', 'Registration for [FAIRNAME] Not Complete - Payment Pending', 'Dear [FIRSTNAME],\r\nYour registration for the [FAIRNAME] is not yet complete. We received your registration form however it was missing the required registration fee. Please send the required registration fee in aso soon as possible in order to complete your registration.\r\n\r\nYour project number is [PROJECTNUMBER]. Please write down your project number and bring it with you to the fair in order to expedite the check-in process.\r\n\r\nSincerely,\r\n [FAIRNAME]', 'system'); -UPDATE `emails` SET `from`='' WHERE `from`='info@sfiab.ca'; diff --git a/db/db.update.54.sql b/db/db.update.54.sql deleted file mode 100644 index df212dc0..00000000 --- a/db/db.update.54.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE `documents` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `date` DATE NOT NULL , - `title` VARCHAR( 128 ) NOT NULL , - `sel_category` VARCHAR( 128 ) NOT NULL , - `filename` VARCHAR( 128 ) DEFAULT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; diff --git a/db/db.update.55.sql b/db/db.update.55.sql deleted file mode 100644 index bb249e1b..00000000 --- a/db/db.update.55.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `pagetext` ( `textname` , `text` , `year` , `lastupdate` ) VALUES ('register_judges_invite', 'Thank you for volunteering as a judge for the fair. Judge registration is by invitation only. To get started, please contact the chief judge. We will then send you an email with instructions on how to complete your registration. This extra step is only required for first time judges. We are confident that you will find the experience sufficiently enriching that you will continue to serve as a judge in future years. Thanks again for your willingness to participate.', '-1', NOW() ); diff --git a/db/db.update.56.sql b/db/db.update.56.sql deleted file mode 100644 index d47ee1e4..00000000 --- a/db/db.update.56.sql +++ /dev/null @@ -1,58 +0,0 @@ -CREATE TABLE `users` ( -`id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT , -`types` set( 'student', 'judge', 'committee', 'volunteer', 'region' ) NOT NULL, -`firstname` varchar( 32 ) NOT NULL default '', -`lastname` varchar( 32 ) NOT NULL default '', -`username` varchar( 128 ) NOT NULL default '', -`password` varchar( 32 ) NOT NULL default '', -`passwordexpiry` date default NULL , -`email` varchar( 128 ) NOT NULL default '', -`phonehome` varchar( 32 ) NOT NULL default '', -`phonework` varchar( 32 ) NOT NULL default '', -`phonecell` varchar( 32 ) NOT NULL default '', -`fax` varchar( 32 ) NOT NULL default '', -`organization` varchar( 64 ) NOT NULL default '', -`created` datetime NOT NULL default '0000-00-00 00:00:00', -`lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', -`address` varchar( 64 ) NOT NULL default '', -`address2` varchar( 64 ) NOT NULL default '', -`city` varchar( 64 ) NOT NULL default '', -`province` varchar( 32 ) NOT NULL default '', -`postalcode` varchar( 8 ) NOT NULL default '', -`deleted` enum( 'no', 'yes' ) NOT NULL default 'no', -`deleteddatetime` datetime default NULL , -`complete` enum( 'no', 'yes' ) NOT NULL default 'no', -PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - -CREATE TABLE `users_volunteer` ( -`users_id` INT NOT NULL , -`tmp` INT NOT NULL , -PRIMARY KEY ( `users_id` ) -) TYPE = MYISAM ; - -CREATE TABLE `users_committee` ( -`users_id` INT NOT NULL , -`emailprivate` VARCHAR( 128 ) NOT NULL , -`ord` INT NOT NULL , -`displayemail` ENUM( 'N', 'Y' ) NOT NULL , -`access_admin` ENUM( 'N', 'Y' ) NOT NULL , -`access_config` ENUM( 'N', 'Y' ) NOT NULL , -`access_super` ENUM( 'N', 'Y' ) NOT NULL , -PRIMARY KEY ( `users_id` ) -) TYPE = MYISAM ; - -INSERT INTO `emails` ( `id` , `val` , `name` , `description` , `from` , `subject` , `body` , `type` ) -VALUES ( -'', 'volunteer_welcome', 'Volunteer Registration - Welcome', 'Welcome email sent to a volunteer after they have registered for the first time. This email includes their temporary password.', '', 'Volunteer Registration for [FAIRNAME]', 'Thank you for registering as a volunteer at our fair. Please find your temporary password below. After logging in for the first time you will be prompted to change your password.\n\nVolunteer Email Address: [EMAIL]\nVolunteer Password: [PASSWORD]', 'system' -); - -INSERT INTO `emails` ( `id` , `val` , `name` , `description` , `from` , `subject` , `body` , `type` ) -VALUES ( -'', 'volunteer_recover_password', 'Volunteer Registration - Recover Password', 'Recover the password for a volunteer if they submit a ''forgot password'' request', '', 'Volunteer Registration for [FAIRNAME]', 'We have received a request for the recovery of your password from this email address. Please find your new password below:\n\nVolunteer Email Address: [EMAIL]\nVolunteer Password: [PASSWORD] ', 'system' -); - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) -VALUES ( -'volunteer_password_expiry_days', '365', 'Volunteer Registration', 'number', '', '300', 'Volunteer passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', '-1' -); diff --git a/db/db.update.57.sql b/db/db.update.57.sql deleted file mode 100644 index 48ef76d5..00000000 --- a/db/db.update.57.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `config` SET `description`='Project Numbering Format: C=Category ID, c=Category shortform, D=Division ID, d=Division shortform, N=2 digit sequence number' WHERE `var`='project_num_format'; diff --git a/db/db.update.58.sql b/db/db.update.58.sql deleted file mode 100644 index cfbe560f..00000000 --- a/db/db.update.58.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE languages SET `langname`='Français' WHERE `lang`='fr'; diff --git a/db/db.update.59.sql b/db/db.update.59.sql deleted file mode 100644 index cfbe560f..00000000 --- a/db/db.update.59.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE languages SET `langname`='Français' WHERE `lang`='fr'; diff --git a/db/db.update.6.sql b/db/db.update.6.sql deleted file mode 100644 index 63f2984c..00000000 --- a/db/db.update.6.sql +++ /dev/null @@ -1,17 +0,0 @@ -CREATE TABLE `judges_teams_awards_link` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `award_awards_id` INT UNSIGNED NOT NULL , - `judges_teams_id` INT UNSIGNED NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -); -ALTER TABLE judges_teams_awards_link ADD UNIQUE (award_awards_id,judges_teams_id,year); -ALTER TABLE `judges_teams` CHANGE `name` `name` VARCHAR( 255 ) NOT NULL; -CREATE TABLE `project_specialawards_link` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `award_awards_id` INT UNSIGNED NOT NULL , - `projects_id` INT UNSIGNED NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -); -ALTER TABLE `schools` CHANGE `province` `province_code` VARCHAR( 2 ) NOT NULL; diff --git a/db/db.update.60.sql b/db/db.update.60.sql deleted file mode 100644 index 7222991a..00000000 --- a/db/db.update.60.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `registrations` ADD `emailcontact` VARCHAR( 64 ) DEFAULT NULL AFTER `email` ; diff --git a/db/db.update.61.sql b/db/db.update.61.sql deleted file mode 100644 index 884b8dc2..00000000 --- a/db/db.update.61.sql +++ /dev/null @@ -1,25 +0,0 @@ -CREATE TABLE `volunteer_positions` ( -`id` INT NOT NULL AUTO_INCREMENT , -`name` VARCHAR( 128 ) NOT NULL , -`desc` TINYTEXT NOT NULL , -`meet_place` TINYTEXT NOT NULL , -`start` DATETIME NOT NULL , -`end` DATETIME NOT NULL , -`year` INT NOT NULL , -PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - -CREATE TABLE `volunteer_positions_signup` ( -`id` INT NOT NULL AUTO_INCREMENT , -`users_id` INT NOT NULL , -`volunteer_positions_id` INT NOT NULL , -`year` INT NOT NULL , -PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - -ALTER TABLE `reports` CHANGE `type` `type` ENUM( 'student', 'judge', 'award', 'committee', 'school', 'volunteer' ) NOT NULL DEFAULT 'student'; - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) -VALUES ( -'volunteer_enable', 'no', 'Volunteer Registration', 'yesno', '', '100', 'Allow Volunteers to create accounts and sign up for volunteer positions (positions are configurable in the admin section)', '-1'); - diff --git a/db/db.update.62.php b/db/db.update.62.php deleted file mode 100644 index 8aac3a31..00000000 --- a/db/db.update.62.php +++ /dev/null @@ -1,94 +0,0 @@ -prepare('SELECT * FROM committees_members'); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $update_62_committee[] = $r; - } -} - -function db_update_62_post() -{ - global $update_62_committee; - global $config; - - foreach ($update_62_committee as $c) { - list($fn, $ln) = split(' ', $c['name'], 2); - $username = $c['email']; - - if ($config['committee_password_expiry_days'] > 0) { - $passwordexpiry = "DATE_ADD(CURDATE(), - INTERVAL {$config['committee_password_expiry_days']} DAY)"; - } else { - $passwordexpiry = 'NULL'; - } - - $deleted = ($c['deleted'] == 'Y') ? 'yes' : 'no'; - $q = "INSERT INTO users - (`types`,`firstname`,`lastname`,`username`,`password`,`passwordexpiry`, - `email`,`phonehome`,`phonework`,`phonecell`,`fax`,`organization`, - `created`,`deleted`) - VALUES ('committee',?,?,?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - ?, - NOW(), - ?)"; - $stmt = $pdo->prepare($q); - $stmt->execute([$fn,$ln,$username,$c['password'],$passwordexpiry,$c['email'],$c['phonehome'],$c['phonework'],$c['phonecell'],$c['fax'],$c['organization'],$deleted]); - echo "$q\n"; - $id = $pdo->lastInsertId(); - - $access_admin = ($c['access_admin'] == 'Y') ? 'yes' : 'no'; - $access_config = ($c['access_config'] == 'Y') ? 'yes' : 'no'; - $access_super = ($c['access_super'] == 'Y') ? 'yes' : 'no'; - $displayemail = ($c['displayemail'] == 'Y') ? 'yes' : 'no'; - $q = "INSERT INTO users_committee(`users_id`,`emailprivate`, - `ord`,`displayemail`,`access_admin`,`access_config`, - `access_super`) VALUES ( - ?,?, - ?, - ?, - ?, - ?, - ?)"; - $stmt = $pdo->prepare($q); - $stmt->execute([$id,$c['emailprivate'],$c['ord'],$displayemail,$access_admin,$access_config,$access_super]); - echo "$q\n"; - show_pdo_errors_if_any($pdo); - - /* Update committee links */ - $q = "UPDATE committees_link SET users_id=? - WHERE committees_members_id=?"; - $stmt = $pdo->prepare($q); - $stmt->execute([$id,$c['id']]); - echo "$q\n"; - } -} - -?> diff --git a/db/db.update.62.sql b/db/db.update.62.sql deleted file mode 100644 index 3fe65046..00000000 --- a/db/db.update.62.sql +++ /dev/null @@ -1,12 +0,0 @@ -ALTER TABLE `users_committee` CHANGE `displayemail` `displayemail` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no', -CHANGE `access_admin` `access_admin` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no', -CHANGE `access_config` `access_config` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no', -CHANGE `access_super` `access_super` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no'; - -ALTER TABLE `committees_link` ADD `users_id` INT NOT NULL AFTER `committees_members_id` ; - -INSERT INTO `emails` ( `id` , `val` , `name` , `description` , `from` , `subject` , `body` , `type` ) -VALUES ( -'', 'committee_recover_password', 'Committee Members - Recover Password', 'Recover the password for a committee member if they submit a ''forgot password'' request', '', 'Committee Member for [FAIRNAME]', 'We have received a request for the recovery of your password from this email address. Please find your new password below:\n\nCommittee Member Email Address: [EMAIL]\nCommittee Member Password: [PASSWORD] ', 'system' -); - diff --git a/db/db.update.63.sql b/db/db.update.63.sql deleted file mode 100644 index 6e95273e..00000000 --- a/db/db.update.63.sql +++ /dev/null @@ -1,12 +0,0 @@ -ALTER TABLE `committees_link` DROP `committees_members_id` ; - -DROP TABLE `committees_members` ; - -ALTER TABLE `users` ADD `oldpassword` VARCHAR( 32 ) NOT NULL AFTER `passwordexpiry` ; - - - - - - - diff --git a/db/db.update.64.sql b/db/db.update.64.sql deleted file mode 100644 index 62810bf8..00000000 --- a/db/db.update.64.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `reports` ADD `system_report_id` INT NOT NULL AFTER `id` ; - -UPDATE reports SET system_report_id = id WHERE id <=34; - - diff --git a/db/db.update.65.sql b/db/db.update.65.sql deleted file mode 100644 index 25a783a0..00000000 --- a/db/db.update.65.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `award_prizes` - ADD `trophystudentkeeper` BOOL DEFAULT '0' NOT NULL , - ADD `trophystudentreturn` BOOL DEFAULT '0' NOT NULL , - ADD `trophyschoolkeeper` BOOL DEFAULT '0' NOT NULL , - ADD `trophyschoolreturn` BOOL DEFAULT '0' NOT NULL ; -ALTER TABLE `award_awards` ADD `description` TEXT NOT NULL AFTER `criteria` ; diff --git a/db/db.update.66.sql b/db/db.update.66.sql deleted file mode 100644 index 00069818..00000000 --- a/db/db.update.66.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE `award_sources` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `name` VARCHAR( 128 ) NOT NULL , - `url` VARCHAR( 255 ) NOT NULL , - `username` VARCHAR( 32 ) NOT NULL , - `password` VARCHAR( 32 ) NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; diff --git a/db/db.update.67.sql b/db/db.update.67.sql deleted file mode 100644 index 7acf635d..00000000 --- a/db/db.update.67.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `config` CHANGE `type` `type` ENUM( '', 'yesno', 'number', 'text', 'enum', 'multisel' ) NOT NULL; - - diff --git a/db/db.update.68.sql b/db/db.update.68.sql deleted file mode 100644 index 70455125..00000000 --- a/db/db.update.68.sql +++ /dev/null @@ -1,35 +0,0 @@ -ALTER TABLE `users` ADD `birthdate` DATE NOT NULL AFTER `organization` ; -ALTER TABLE `users` ADD `lang` VARCHAR( 2 ) NOT NULL AFTER `birthdate` ; -ALTER TABLE `users` ADD `sex` ENUM( 'male', 'female' ) NOT NULL AFTER `lastname` ; - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) -VALUES ( -'volunteer_personal_fields', 'phonehome,phonecell,org', -'Volunteer Registration', 'multisel', -'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province', -'500', 'Personal Information to ask for on the Volunteer personal information page (in addition to Name and Email)', '-1'); - - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) -VALUES ( -'volunteer_personal_required', '', -'Volunteer Registration', 'multisel', -'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province', -'600', 'Required Personal Information on the Volunteer personal information page (Name and Email is always required)', '-1'); - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) -VALUES ( -'committee_personal_fields', 'phonehome,phonecell,phonework,fax,org', -'Committee Members', 'multisel', -'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province', -'500', 'Personal Information to ask for on the Committee Member profile page (in addition to Name and Email)', '-1'); - - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year` ) -VALUES ( -'committee_personal_required', '', -'Committee Members', 'multisel', -'sex=Gender|phonehome=Home Phone|phonework=Work Phone|phonecell=Cell Phone|fax=Fax|org=Organization|birthdate=Birthdate|lang=Preferred Language|address=Address and PostalCode|city=City|province=Province', -'600', 'Required Personal Information on the Committee Member profile page (Name and Email is always required)', '-1'); - - diff --git a/db/db.update.69.sql b/db/db.update.69.sql deleted file mode 100644 index 6ed0edfe..00000000 --- a/db/db.update.69.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `award_awards` ADD `external_identifier` VARCHAR( 32 ) DEFAULT NULL , - ADD `external_postback` VARCHAR( 128 ) DEFAULT NULL ; -ALTER TABLE `award_prizes` ADD `external_identifier` VARCHAR( 32 ) DEFAULT NULL ; diff --git a/db/db.update.7.sql b/db/db.update.7.sql deleted file mode 100644 index 251e6b19..00000000 --- a/db/db.update.7.sql +++ /dev/null @@ -1,48 +0,0 @@ -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairname', '', 'Name of the fair', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('default_language', 'en', 'The default language if no language has yet been specified', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minstudentsperproject', '1', 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxstudentsperproject', '2', 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('mingrade', '7', 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxgrade', '12', 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minage', '10', 'The minimum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxage', '21', 'The maximum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxmentorsperproject', '5', 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minmentorsperproject', '0', 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('usedivisionselector', 'yes', 'Specify whether to use the division selector flowchart questions to help decide on the division (yes/no)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minjudgeage', '21', 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxjudgeage', '100', 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('participant_student_foodreq', 'yes', 'Ask for students special food requirements (yes/no). Should be yes if you plan on providing lunch', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee', '', 'Registration Fee', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee_per', 'student', 'Registration fee is per student, or per project? (student/project)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('project_num_format', 'CDN', 'C=Category, D=Divison, N=2 digit Number', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_publiclayout', '
    ', 'The layout (html table row) used to display the committee members on the public committee page', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. (date|registration). If "date" is used, it must be configured under "Important Dates" section.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the fair manager. Any important emails etc generated by the system will be sent here', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postparticipants', 'Registered participants are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'postwinners', 'Winners are posted on the website', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregopen', 'Judges registration opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'judgeregclose', 'Judges registration closes', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregopen', 'Special Awards self-nomination opens', -1); -INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'specawardregclose', 'Special Awards self-nomination closes', -1); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('en', 'English', 'Y'); -INSERT INTO `languages` (`lang`, `langname`, `active`) VALUES ('fr', 'Français', 'Y'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('AB', 'Alberta'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('BC', 'British Columbia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('MB', 'Manitoba'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NB', 'New Brunswick'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NF', 'Newfoundland and Labrador'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NT', 'Northwest Territories'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NS', 'Nova Scotia'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('NU', 'Nunavut'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('ON', 'Ontario'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('PE', 'Prince Edward Island'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('QC', 'Québec'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('SK', 'Saskatchewan'); -INSERT INTO `provinces` (`code`, `province`) VALUES ('YK', 'Yukon Territory'); -INSERT INTO `config` (`var`,`val`,`year`) VALUES ('DBVERSION','7','0'); - diff --git a/db/db.update.70.sql b/db/db.update.70.sql deleted file mode 100644 index 4191b386..00000000 --- a/db/db.update.70.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `award_awards` ADD `award_sources_id` INT UNSIGNED DEFAULT NULL ; diff --git a/db/db.update.71.sql b/db/db.update.71.sql deleted file mode 100644 index 2db55973..00000000 --- a/db/db.update.71.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `award_sources` ADD `enabled` ENUM( 'no', 'yes' ) DEFAULT 'no' NOT NULL ; -ALTER TABLE `award_sources` ADD `website` VARCHAR( 255 ) NOT NULL AFTER `url` ; -INSERT INTO `award_sources` VALUES ('', 'Sci-Tech Ontario', 'http://www.scitechontario.org/awarddownloader/index.php', 'http://www.scitechontario.org/awarddownloader/help.php', '', '', 'no'); -INSERT INTO `award_sources` VALUES ('', 'Youth Science Foundation', 'https://secure.ysf-fsj.ca/awarddownloader/index.php', 'http://apps.ysf-fsj.ca/awarddownloader/help.php', '', '', 'no'); diff --git a/db/db.update.72.sql b/db/db.update.72.sql deleted file mode 100644 index b7212299..00000000 --- a/db/db.update.72.sql +++ /dev/null @@ -1,18 +0,0 @@ -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '35', 'School -- All Schools', 'List of all schools in the database. Name, address, contact person (Principal or Science Head) and a contact phone (school phone or science head phone)', 'The Grant Brothers', 'school'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'school', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 1, 'schooladdr', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 2, 'school_contact', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 3, 'school_contactphone', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'sort', 0, 'school', '', 0, 0, 0, 0, 0, '', ' '); - -UPDATE `reports` SET `desc` = 'School Mailing Addresses ONLY for schools attached to registered students (NOT ALL SCHOOLS) with a blank spot for the teacher''s name, since each student apparently spells their teacher''s name differently.' WHERE `system_report_id` =24; - diff --git a/db/db.update.73.sql b/db/db.update.73.sql deleted file mode 100644 index cfb01d18..00000000 --- a/db/db.update.73.sql +++ /dev/null @@ -1,16 +0,0 @@ -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '36', 'School -- Access Codes', 'List of access codes and registration passwords for all schools in the database.', 'The Grant Brothers', 'school'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'school', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 1, 'school_city', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 2, 'school_accesscode', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 3, 'school_registration_password', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 4, 'school_board', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'sort', 0, 'school', '', 0, 0, 0, 0, 0, '', ' '); diff --git a/db/db.update.74.sql b/db/db.update.74.sql deleted file mode 100644 index 07534d52..00000000 --- a/db/db.update.74.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `emails` SET body='A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nEmail Address: [EMAIL]\r\nRegistration Number: [REGNUM]\r\n' WHERE val='new_participant' AND body='A new registration account has been created for you. To access your registration account, please enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n'; diff --git a/db/db.update.75.php b/db/db.update.75.php deleted file mode 100644 index 7cb5ae20..00000000 --- a/db/db.update.75.php +++ /dev/null @@ -1,62 +0,0 @@ -prepare("SELECT id FROM users WHERE types LIKE '%committee%'"); - $q->execute(); - - $x = 0; - while ($i = $q->fetch(PDO::FETCH_OBJ)) { - $uid = $i->id; - - $sid = array(9, 36, -1, -2, 17, 19, 16, 30, 26, 27, - 28, -3, 21, 22, -4, -6, 29, -8, -9); - foreach ($sid as $s) { - if ($s > 0) { - $qq = $pdo->prepare("SELECT id FROM reports WHERE - system_report_id=?"); - $qq->execute([$s]); - $ii = $qq->fetch(PDO::FETCH_OBJ); - $rid[$x] = $ii->id; - } else { - $rid[$x] = $s; - } - $x++; - } - - /* Find all committee members */ - $qq = "INSERT INTO `reports_committee` (`id`, `users_id`, `reports_id`, `category`, `comment`, `format`, `stock`) VALUES - (NULL, ?, ?, '1. Fair Day', 'Checkin Lists for the Front Desk', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'School Access Codes and Passwords', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'Mailing Label Generator', '', ''), - (NULL, ?, ?, '2. Old Custom Reports', 'Project Summary Details', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'Student emergency contact names and numbers', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'Students/Projects From Each School', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'Project Logistical Requirements (tables, electricity)', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'Project Table Labels', 'label', 'fullpage_landscape'), - (NULL, ?, ?, '2. Old Custom Reports', 'Student Nametags', 'label', 'nametag'), - (NULL, ?, ?, '2. Old Custom Reports', 'Judge Nametags', 'label', 'nametag'), - (NULL, ?, ?, '2. Old Custom Reports', 'Committee Member Nametags', 'label', 'nametag'), - (NULL, ?, ?, '2. Old Custom Reports', 'Judges List', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'Judging Teams', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'Awards each Judging Team will judge for', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'Judging Teams Project Assignments', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'Projects Judging Team Assignments', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'Project Identification Labels (for judging sheets)', 'label', '5961'), - (NULL, ?, ?, '2. Old Custom Reports', 'Award List for Award Ceremony Program', 'pdf', 'fullpage'), - (NULL, ?, ?, '2. Old Custom Reports', 'Winners for each award', 'pdf', 'fullpage');"; - - echo $qq; - echo "\n\n"; - - $stmt = $pdo->prepare($qq); - $stmt->execute([$uid,$rid[0],$uid,$rid[1],$uid,$rid[2],$uid,$rid[3],$uid,$rid[4],$uid,$rid[5],$uid,$rid[6],$uid,$rid[7],$uid,$rid[8],$uid,$rid[9],$uid,$rid[10],$uid,$rid[11],$uid,$rid[12],$uid,$rid[13],$uid,$rid[14],$uid,$rid[15],$uid,$rid[16],$uid,$rid[17],$uid,$rid[18]]); - - } -} - -?> diff --git a/db/db.update.75.sql b/db/db.update.75.sql deleted file mode 100644 index 52643994..00000000 --- a/db/db.update.75.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `reports_committee` ( - `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , - `users_id` INT NOT NULL , - `reports_id` INT NOT NULL , - `category` VARCHAR( 128 ) NOT NULL , - `comment` TEXT NOT NULL , - `format` VARCHAR( 64 ) NOT NULL , - `stock` VARCHAR( 64 ) NOT NULL -) ENGINE = MYISAM - diff --git a/db/db.update.76.php b/db/db.update.76.php deleted file mode 100644 index 93a35849..00000000 --- a/db/db.update.76.php +++ /dev/null @@ -1,87 +0,0 @@ -prepare('SELECT DISTINCT username FROM users WHERE 1'); - $q->execute(); - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $user = $r['username']; - if ($user == '') - continue; - - $qq = $pdo->prepare("SELECT * FROM users WHERE username=?"); - $qq->execute([$user]); - if ($qq->rowCount() <= 1) - continue; - - /* Fix $user */ - - /* Load all their data */ - while ($rr = $qq->fetch(PDO::FETCH_ASSOC)) { - $types = explode(',', $rr['types']); - foreach ($types as $t) { - $u[$t] = $rr; - } - } - - /* Make sure we have what we think we have */ - $cid = intval($u['committee']['id']); - $vid = intval($u['volunteer']['id']); - - if ($cid == 0 || $vid == 0) { - echo "\n\n\nDATABASE ERROR: User $user exists multiple - times, but I was unable to fix it. Please visit - www.sfiab.ca and send us an email so we can help sort - out your database. It is likely that user $user will - experience problems logging in - - -"; - continue; - } - - /* Copy everything into the committee entry */ - $fields = array('firstname', 'lastname', 'username', 'password', - 'email', - 'phonehome', 'phonework', 'phonecell', 'fax', 'organization', - 'address', 'address2', 'city', 'province', 'postalcode'); - - $query = "`types`='committee,volunteer'"; - foreach ($fields as $f) { - if ($u['committee'][$f] == '' && $u['volunteer'][$f] != '') { - $v = $u['volunteer'][$f]; - $query .= ",`$f`='$v'"; - } - } - - $query = "UPDATE users SET ? WHERE id=?"; - echo "$query\n"; - $stmt = $pdo->prepare($query); - $stmt->execute([$query,$cid]); - - /* Now fix the volunteers links */ - $query = "UPDATE volunteer_positions_signup SET users_id=? WHERE users_id=?"; - echo "$query\n"; - $stmt = $pdo->prepare($query); - $stmt->execute([$cid,$vid]); - - /* - * The user_volunteer table is empty, we should just delete it, - * no need to update it - */ - - /* Delete the old user */ - $query = "DELETE FROM users WHERE id=?"; - echo "$query\n"; - $stmt = $pdo->prepare($query); - $stmt->execute([$vid]); - } -} - -?> diff --git a/db/db.update.77.sql b/db/db.update.77.sql deleted file mode 100644 index 549eb5d6..00000000 --- a/db/db.update.77.sql +++ /dev/null @@ -1,14 +0,0 @@ -CREATE TABLE `fairs` ( - `id` int(11) NOT NULL default '0', - `fairname` varchar(64) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - -CREATE TABLE `users_fair` ( - `users_id` int(11) NOT NULL default '0', - `fairs_id` int(11) NOT NULL default '0', - PRIMARY KEY (`users_id`) -) TYPE=MyISAM; - -ALTER TABLE `users` CHANGE `types` `types` SET( 'student', 'judge', 'committee', 'volunteer', 'fair' ) NOT NULL ; - diff --git a/db/db.update.78.sql b/db/db.update.78.sql deleted file mode 100644 index 7e26292f..00000000 --- a/db/db.update.78.sql +++ /dev/null @@ -1,4 +0,0 @@ -UPDATE `reports_items` SET value='5161' WHERE `type`='options' AND `field`='stock' AND `value`='5961'; -UPDATE `reports_items` SET value='5164' WHERE `type`='options' AND `field`='stock' AND `value`='5964'; -UPDATE `reports_committee` SET `stock`='5161' WHERE `stock`='5961'; -UPDATE `reports_committee` SET `stock`='5164' WHERE `stock`='5964'; diff --git a/db/db.update.79.sql b/db/db.update.79.sql deleted file mode 100644 index 18263842..00000000 --- a/db/db.update.79.sql +++ /dev/null @@ -1,19 +0,0 @@ -ALTER TABLE `users` ADD `year` INT NOT NULL AFTER `email` ; -ALTER TABLE `schools` ADD `designate` VARCHAR( 32 ) NOT NULL AFTER `postalcode` ; - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'volunteer_registration_type', 'open', 'Volunteer Registration', 'enum', 'open=Open|singlepassword=Single Password|invite=Invite', '150', 'The type of Volunteer Registration to use', '-1'); - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( - 'volunteer_registration_singlepassword', '', 'Volunteer Registration', 'text', '', '160', 'The single password to use if using Single Password Volunteer Registration (the option above this one). Ignored if not using Single Password volunteer registration.', '-1'); - -INSERT INTO `emails` ( `id` , `val` , `name` , `description` , `from` , `subject` , `body` , `type` ) -VALUES ( -'', 'volunteer_new_invite', 'Volunteers - New Volunteeer Invitation', 'This is sent to a new volunteer when they are invited using the invite volunteers administration section, only available when the Volunteer Registration Type is set to Invite', '', 'Volunteer Registration for [FAIRNAME]', 'You have been invited to be a volunteer for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the volunteer registration site with:\n\nEmail Address: [EMAIL]\nPassword: [PASSWORD]\n -You can change your password once you login.', 'system' -); - -INSERT INTO `emails` ( `id` , `val` , `name` , `description` , `from` , `subject` , `body` , `type` ) -VALUES ( -'', 'volunteer_add_invite', 'Volunteers - New Volunteeer Invitation', 'This is sent to existing users when they are invited using the invite volunteers administration section, only available when the Volunteer Registration Type is set to Invite', '', 'Volunteer Registration for [FAIRNAME]', 'The role of volunteer for the [FAIRNAME] has been added to your account by a committee member. When you login again, there will be a [Switch Roles] link in the upper right hand area of the page. Clicking on [Switch Roles] will let you switch between being a Volunteer and your other roles without needing to logout.\n', 'system'); - diff --git a/db/db.update.8.sql b/db/db.update.8.sql deleted file mode 100644 index bc4b4600..00000000 --- a/db/db.update.8.sql +++ /dev/null @@ -1,19 +0,0 @@ -ALTER TABLE `award_types` CHANGE `id` `id` INT( 10 ) UNSIGNED NOT NULL; -ALTER TABLE `award_types` DROP PRIMARY KEY; -ALTER TABLE `award_types` ADD UNIQUE ( id, year ); -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, -1); -INSERT INTO `award_types` VALUES (2, 'Special', 2, -1); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, -1); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, -1); -INSERT INTO `award_types` VALUES (5, 'Other', 4, -1); -INSERT INTO `award_types` VALUES (1, 'Divisional', 1, 2006); -INSERT INTO `award_types` VALUES (2, 'Special', 2, 2006); -INSERT INTO `award_types` VALUES (3, 'Interdisciplinary', 3, 2006); -INSERT INTO `award_types` VALUES (4, 'Grand', 5, 2006); -INSERT INTO `award_types` VALUES (5, 'Other', 4, 2006); -ALTER TABLE `pagetext` DROP INDEX `textname`; -ALTER TABLE `pagetext` ADD UNIQUE(textname,year); -ALTER TABLE `pagetext` CHANGE `year` `year` INT NOT NULL DEFAULT '0'; -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('register_participants_main_instructions', 'Once all sections are complete, please print the signature page, obtain the required signatures, and mail the signature form, along with any required registration fees to:\r\nInsert address here\r\n\r\nYour forms must be received, post marked by insert date here. Late entries will not be accepted', -1); -INSERT INTO `pagetext` (`textname`,`text`,`year`) VALUES ('index', 'Welcome to the online registration and management system for the fair. Using the links on the left the public can register as a participant or register as a judge. \r\n\r\nThe committee can use the Fair Administration link to manage the fair, see who''s registered, renerate reports, etc. \r\n\r\nThe SFIAB configuration link is for the committee webmaster to manage the configuration of the Science Fair In A Box for the fair.\r\n', -1); -ALTER TABLE `pagetext` ADD `lastupdate` DATETIME NOT NULL ; diff --git a/db/db.update.80.sql b/db/db.update.80.sql deleted file mode 100644 index cf122dd5..00000000 --- a/db/db.update.80.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `pagetext` ( `id` , `textname` , `text` , `year` , `lastupdate` ) VALUES ( '', 'register_volunteer_invite', 'Thank you for volunteering for the fair. Volunteer registration is by invitation only.

    Please contact the fair and request to be invited as a volunteer. We will then send you an email with instructions on how to complete your volunteer registration.

    If you have been invited already, you need to login using the same email address that you were invited with.', '-1', ''); - diff --git a/db/db.update.81.php b/db/db.update.81.php deleted file mode 100644 index d6f11851..00000000 --- a/db/db.update.81.php +++ /dev/null @@ -1,13 +0,0 @@ -prepare('SELECT DISTINCT award_sponsors_id FROM award_contacts'); - $q->execute(); - while ($i = $q->fetch(PDO::FETCH_OBJ)) { - $asid = $i->award_sponsors_id; - $stmt = $pdo->prepare("UPDATE award_contacts SET `primary`='yes' WHERE award_sponsors_id=? LIMIT 1"); - $stmt->execute([$asid]); - } -} -?> - diff --git a/db/db.update.81.sql b/db/db.update.81.sql deleted file mode 100644 index 3b7f5c4b..00000000 --- a/db/db.update.81.sql +++ /dev/null @@ -1,33 +0,0 @@ -ALTER TABLE `award_contacts` ADD `primary` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no' AFTER `notes` ; - -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '37', 'Awards -- Award Sponsor Information', 'Sponsor information for each award with the primary contact. This is a large report so the default format is CSV.', 'The Grant Brothers', 'award'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'name', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 1, 'sponsor_organization', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 2, 'sponsor_phone', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 3, 'sponsor_fax', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 4, 'sponsor_address', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 5, 'sponsor_city', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 6, 'sponsor_province', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 7, 'sponsor_postal', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 8, 'sponsor_notes', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 9, 'sponsor_confirmed', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 10, 'pcontact_salutation', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 11, 'pcontact_namefl', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 12, 'pcontact_position', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 13, 'pcontact_email', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 14, 'pcontact_hphone', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 15, 'pcontact_wphone', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 16, 'pcontact_cphone', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 17, 'pcontact_fax', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 18, 'pcontact_notes', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'sort', 0, 'name', '', 0, 0, 0, 0, 0, '', ' '); - diff --git a/db/db.update.82.sql b/db/db.update.82.sql deleted file mode 100644 index 7ab33314..00000000 --- a/db/db.update.82.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `ord` , `description` , `year`) VALUES ( 'reports_show_unawarded_awards', 'yes', 'Reports', 'yesno', 100, 'Display awards that were not awarded in the Award Ceremony script.', -1), ('reports_show_unawarded_prizes', 'yes', 'Reports', 'yesno', 200, 'Display prizes that were not awarded in the Award Ceremony script.', -1); diff --git a/db/db.update.83.sql b/db/db.update.83.sql deleted file mode 100644 index b3efe613..00000000 --- a/db/db.update.83.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category`, `ord` , `description` , `year`) VALUES ('participant_project_summary_wordmin', 0, 'Participant Registration', 1110, 'The minimum number of words acceptable in the project summary', -1); diff --git a/db/db.update.84.sql b/db/db.update.84.sql deleted file mode 100644 index bfed1023..00000000 --- a/db/db.update.84.sql +++ /dev/null @@ -1,7 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) - VALUES - ( 'tours_assigner_activity', 'Done', 'Tour Assigner', '', '', '99999', '', '0'), - ( 'tours_assigner_percent', '-1', 'Tour Assigner', '', '', '99999', '', '0'), - ( 'tours_assigner_effort', '10000', 'Tour Assigner', '', '', '99999', 'This number controls how long and hard the tour assigner will look for a quality solution. Smaller numbers are lower effort. 100 is practically no effort, 1000 is moderate effort, 10000 is high effort. It can take several tens of minutes to run the assigner with high effort, but it gives a very good solution.', '-1'); - -ALTER TABLE `reports` CHANGE `type` `type` ENUM( 'student', 'judge', 'award', 'committee', 'school', 'volunteer', 'tour' ) NOT NULL DEFAULT 'student' ; diff --git a/db/db.update.85.sql b/db/db.update.85.sql deleted file mode 100644 index 3cb037a1..00000000 --- a/db/db.update.85.sql +++ /dev/null @@ -1,70 +0,0 @@ -ALTER TABLE `tours` ADD `num` VARCHAR( 16 ) NOT NULL AFTER `name` ; - -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '38', 'Tours -- All Tour Information', 'A listing of just the tours and all related info, no student assignments or anything.', 'The Grant Brothers', 'tour'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'tour_num', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 1, 'tour_name', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 2, 'tour_capacity', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 3, 'tour_mingrade', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 4, 'tour_maxgrade', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 5, 'tour_desc', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 6, 'tour_location', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 7, 'tour_contact', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'sort', 0, 'tour_name', '', 0, 0, 0, 0, 0, '', ' '); - -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '39', 'Tours -- Available Tours', 'A list of just the tour names and numbers for fair day', 'The Grant Brothers', 'tour'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'tour_num', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 1, 'tour_name', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'sort', 0, 'tour_id', '', 0, 0, 0, 0, 0, '', ' '); - -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '40', 'Tours -- Student Emergency Contact Information', 'Emergency contact information for each tour, each tour starting on a new page.', 'The Grant Brothers', 'student'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'yes', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'yes', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 1, 'namefl', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 2, 'emerg_name', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 3, 'emerg_relation', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 4, 'emerg_phone', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'group', 0, 'tour_assign_numname', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'sort', 0, 'last_name', '', 0, 0, 0, 0, 0, '', ' '); - -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '41', 'Tours -- Student Tour Assignments', 'Participant and Tour Assignments, grouped by age category, sorted by project number', 'The Grant Brothers', 'student'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'pn', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 1, 'namefl', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'col', 2, 'tour_assign_numname', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'group', 0, 'category', '', 0, 0, 0, 0, 0, '', ' '), - ('', LAST_INSERT_ID(), 'sort', 0, 'pn', '', 0, 0, 0, 0, 0, '', ' '); - diff --git a/db/db.update.86.sql b/db/db.update.86.sql deleted file mode 100644 index 72c2352d..00000000 --- a/db/db.update.86.sql +++ /dev/null @@ -1,8 +0,0 @@ -SELECT @id:=id FROM reports WHERE system_report_id='19'; -INSERT INTO `reports_items` ( `id` , `reports_id` , `type` , `ord` , `field` , `value` , `x` , `y` , `w` , `h` , `lines` , `face` , `align`) VALUES - ( NULL , @id, 'distinct', '0', 'pn', '', '0', '0', '0', '0', '0', '', ''); - -UPDATE reports_items SET value='fullpage' WHERE field='stock' AND value='letter'; -UPDATE reports_items SET value='5164' WHERE field='stock' AND value='5964'; -UPDATE reports_items SET value='5161' WHERE field='stock' AND value='5961'; - diff --git a/db/db.update.87.php b/db/db.update.87.php deleted file mode 100644 index 2174834f..00000000 --- a/db/db.update.87.php +++ /dev/null @@ -1,50 +0,0 @@ -prepare('SELECT id,types,passwordset FROM users'); - while ($i = $q->fetch(PDO::FETCH_OBJ)) { - $id = $i->id; - $types = explode(',', $i->types); - $expiry = $i->passwordset; - - if ($expiry == NULL) { - $newval = 'created'; - } else if ($expiry == '0000-00-00') { - $newval = false; - } else { - /* Find the expiry based on the type */ - $longest_expiry = 0; - foreach ($types as $t) { - $e = $config["{$t}_password_expiry_days"]; - if ($e == 0) { - /* Catch a never expire case. */ - $longest_expiry = 0; - break; - } else if ($e > $longest_expiry) { - $longest_expiry = $e; - } - } - if ($longest_expiry == 0) { - /* - * Password never expires, set the password - * set time to the creation time - */ - $newval = 'created'; - } else { - /* Compute when the password was set */ - $newval = date('Y-m-d', - strtotime("$expiry -$longest_expiry days")); - $newval = "'$newval'"; - } - } - if ($newval != false) { - $query = "UPDATE users SET passwordset=? WHERE id=?"; - echo "$query\n"; - $stmt = $pdo->prepare($query); - $stmt->execute([$newval,$id]); - } - } -} -?> diff --git a/db/db.update.87.sql b/db/db.update.87.sql deleted file mode 100644 index 4fd8a206..00000000 --- a/db/db.update.87.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `users` CHANGE `passwordexpiry` `passwordset` DATE NULL DEFAULT NULL ; - diff --git a/db/db.update.88.sql b/db/db.update.88.sql deleted file mode 100644 index 11b6d73e..00000000 --- a/db/db.update.88.sql +++ /dev/null @@ -1,10 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'winners_show_prize_amounts', 'yes', 'Global', 'yesno', '', '700', 'Show the dollar amounts of the cash/scholarship prizes on the publicly viewable winners page.', '-1'); - -UPDATE `config` SET `type` = 'enum', `type_values` = '100=Low|1000=Medium|10000=High', -`description` = 'This controls how long and hard the judge scheduler will look for a scheduling solution. Low effort will finish almost instantly but give a very poor result. High effort can take several tens of minutes to run, but it gives a very good solution.' WHERE `var` = 'effort' ; - -UPDATE `config` SET `type` = 'enum', `type_values` = '100=Low|1000=Medium|10000=High', -`description` = 'This controls how long and hard the tour assigner will look for a quality solution. Low effort will finish almost instantly but give a very poor result. High effort can take several minutes to run, but it gives a very good solution. ' WHERE `var` = 'tours_assigner_effort' ; - - diff --git a/db/db.update.89.sql b/db/db.update.89.sql deleted file mode 100644 index a2c51967..00000000 --- a/db/db.update.89.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `students` ADD `namecheck_complete` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no'; diff --git a/db/db.update.9.sql b/db/db.update.9.sql deleted file mode 100644 index 55d82d61..00000000 --- a/db/db.update.9.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `config` ADD UNIQUE (`var`,`year`); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_registration_type', 'open', 'The type of Participant Registration to use: open | singlepassword | schoolpassword | invite', '-1'); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'judge_registration_type', 'open', 'The type of Judge Registration to use: open | singlepassword | invite', '-1'); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_registration_singlepassword', '', 'The single password to use for participant registraiton if participant_registration_type is singlepassword. Leave blank if not using singlepassword participant registration','-1'); -INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'judge_registration_singlepassword', '', 'The single password to use for judge registration if judge_registration_type is singlepassword. Leave blank if not using singlepassword judge registraiton', '-1'); -ALTER TABLE `schools` ADD `registration_password` VARCHAR( 32 ) NOT NULL; -INSERT INTO `emails` VALUES ('', 'register_participants_resend_regnum', 'Participant Registration - Resend Registration Number', 'Resend the password to the participant if they submit a ''forgot regnum'' request', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'We have received a request for the retrieval if your registration number from this email address. Please find your existing registration number below\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_participant', 'New Participant', 'Email that new participants receive when they are added to the system', 'website@sfiab.ca', 'Registration for [FAIRNAME]', 'A new registration account has been created for you. To access your registration account, please enter enter the following registration number into the registration website:\r\n\r\nRegistration Number: [REGNUM]\r\n', 'system'); -INSERT INTO `emails` VALUES ('', 'new_judge_invite', 'New Judge Invitation', 'This is sent to a new judge when they are invited using the invite judges administration section, only available when judge_registraiton_type=invite', 'registration@sfiab.ca', 'Judge Registration for [FAIRNAME]', 'You have been invited to be a judge for the [FAIRNAME]. An account has been created for you to login with and complete your information. You can login to the judge registration site with:\r\n\r\nEmail Address: [EMAIL]\r\nPassword: [PASSWORD]\r\n\r\nYou can change your password once you login.', 'system'); diff --git a/db/db.update.90.sql b/db/db.update.90.sql deleted file mode 100644 index 52b02ee0..00000000 --- a/db/db.update.90.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `signaturepage` ( `id` , `name` , `use` , `text`) VALUES ( NULL , 'regfee', '0', ''); - diff --git a/db/db.update.91.sql b/db/db.update.91.sql deleted file mode 100644 index e93cc5e4..00000000 --- a/db/db.update.91.sql +++ /dev/null @@ -1,35 +0,0 @@ -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '42', 'Winners -- Award Ceremony Presentation Data', 'A CSV dump of all the winners and their prizes. Useful for importing into an award ceremony presentation, or a document.', 'The Grant Brothers', 'student'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'csv', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'division', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 1, 'fr_division', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 2, 'category', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 3, 'fr_category', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 4, 'award_name', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 5, 'award_prize_name', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 6, 'award_prize_cash', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 7, 'award_prize_scholarship', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 8, 'award_prize_value', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 9, 'pn', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 10, 'title', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 11, 'namefl', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 12, 'partnerfl', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 13, 'school', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 14, 'school_city', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 15, 'school_province', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 16, 'school_board', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 17, 'school_postal', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'sort', 0, 'order', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'distinct', 0, 'pn', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'filter', 0, 'award_excludefromac', 'no', 0, 0, 0, 0, 1, '', ' '); - -SELECT @id:=id FROM reports WHERE system_report_id='42'; -UPDATE reports_committee SET reports_id=@id WHERE reports_id='-9'; - diff --git a/db/db.update.92.sql b/db/db.update.92.sql deleted file mode 100644 index a0373a1f..00000000 --- a/db/db.update.92.sql +++ /dev/null @@ -1,13 +0,0 @@ -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES -( 'project_sort_format', '', 'Global', 'text', '', '610', 'Project Sorting Format. This format will be used to sort the projects on lists and in reports. Use the same letters as the Project Number Format (C, D, N, etc.). If left blank, the project number format will also be used to sort the projects.', '-1'); - -UPDATE `config` SET `description` = 'Project Numbering Format: C=Category ID, c=Category shortform, D=Division ID, d=Division shortform, N, N1, N2, ..., N9=intra division digit sequence number, zero padded to 1-9 digits, or 2 digits if just N is used. X, X1, X2, ..., N9=global sequence number, zero padded to 1-9 digits, or 3 digits if just X is used.' WHERE `var`='project_num_format' ; - -ALTER TABLE `projects` ADD `projectsort` VARCHAR( 16 ) NULL AFTER `projectnumber` ; -ALTER TABLE `projects` ADD `projectnumber_seq` INT NOT NULL AFTER `projectsort` ; -ALTER TABLE `projects` ADD `projectsort_seq` INT NOT NULL AFTER `projectnumber_seq` ; - -UPDATE projects SET projectsort=projectnumber; - -UPDATE reports_items SET field='pn' WHERE field='gvrsf_tn'; - diff --git a/db/db.update.93.sql b/db/db.update.93.sql deleted file mode 100644 index b19c3f9a..00000000 --- a/db/db.update.93.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `volunteer_positions` CHANGE `desc` `desc` TEXT NOT NULL ; -ALTER TABLE `volunteer_positions` CHANGE `meet_place` `meet_place` TEXT NOT NULL ; diff --git a/db/db.update.94.sql b/db/db.update.94.sql deleted file mode 100644 index afcf51c0..00000000 --- a/db/db.update.94.sql +++ /dev/null @@ -1,4 +0,0 @@ -SELECT @id:=id FROM reports WHERE system_report_id='18'; -UPDATE `reports_items` SET `field`='grade_str' WHERE `field`='grade' AND `reports_id`=@id; - - diff --git a/db/db.update.95.sql b/db/db.update.95.sql deleted file mode 100644 index 0d0e490e..00000000 --- a/db/db.update.95.sql +++ /dev/null @@ -1,15 +0,0 @@ -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '43', 'T-Shirt Size Count', 'A list of tshirt sizes (the blank entry is those students who have selected \"none\"), and the number of tshirts of each size.', 'The Grant Brothers', 'student'); - -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'pdf', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'stock', 'fullpage', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'tshirt', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'col', 1, 'special_tshirt_count', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'sort', 0, 'tshirt', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'filter', 0, 'tshirt', 'none', 5, 0, 0, 0, 1, '', ' '); diff --git a/db/db.update.96.sql b/db/db.update.96.sql deleted file mode 100644 index e3e778f9..00000000 --- a/db/db.update.96.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `pagetext` ( `id` , `textname` , `text` , `year` , `lastupdate` ) VALUES ( '', 'schoolaccess', 'Welcome to the School Access Page. This page allows your school to provide several key pieces of information for the fair, as well as feedback about the schools experience with/at the fair.', '-1', ''); diff --git a/db/db.update.97.sql b/db/db.update.97.sql deleted file mode 100644 index bba01c9b..00000000 --- a/db/db.update.97.sql +++ /dev/null @@ -1,31 +0,0 @@ -ALTER TABLE `projects` ADD `shorttitle` VARCHAR( 255 ) NOT NULL AFTER `title` ; - -UPDATE `config` SET `ord`='500' WHERE `var`='regfee_show_info'; -UPDATE `config` SET `ord`='600',`type`='number' WHERE `var`='minage'; -UPDATE `config` SET `ord`='700',`type`='number' WHERE `var`='maxage'; -UPDATE `config` SET `ord`='800',`type`='number' WHERE `var`='mingrade'; -UPDATE `config` SET `ord`='900',`type`='number' WHERE `var`='maxgrade'; -UPDATE `config` SET `ord`='1000',`type`='number' WHERE `var`='minmentorsperproject'; -UPDATE `config` SET `ord`='1100',`type`='number' WHERE `var`='maxmentorsperproject'; -UPDATE `config` SET `ord`='1200',`type`='number' WHERE `var`='minstudentsperproject'; -UPDATE `config` SET `ord`='1300',`type`='number' WHERE `var`='maxstudentsperproject'; -UPDATE `config` SET `ord`='1400',`type`='number' WHERE `var`='maxspecialawardsperproject'; -UPDATE `config` SET `ord`='1500' WHERE `var`='participant_student_personal'; -UPDATE `config` SET `ord`='1600' WHERE `var`='participant_student_pronunciation'; -UPDATE `config` SET `ord`='1700' WHERE `var`='participant_mentor'; -UPDATE `config` SET `ord`='1800',`type`='number' WHERE `var`='participant_project_summary_wordmax'; -UPDATE `config` SET `ord`='1900',`type`='number' WHERE `var`='participant_project_summary_wordmin'; -UPDATE `config` SET `ord`='2000',`type`='number' WHERE `var`='participant_project_title_charmax'; -UPDATE `config` SET `ord`='2300' WHERE `var`='participant_project_table'; -UPDATE `config` SET `ord`='2400' WHERE `var`='participant_project_electricity'; -UPDATE `config` SET `ord`='2500' WHERE `var`='participant_student_foodreq'; -UPDATE `config` SET `ord`='2600' WHERE `var`='participant_student_tshirt'; -UPDATE `config` SET `ord`='2700' WHERE `var`='participant_student_tshirt_cost'; -UPDATE `config` SET `ord`='2800' WHERE `var`='specialawardnomination_aftersignatures'; -UPDATE `config` SET `ord`='2900' WHERE `var`='specialawardnomination'; -UPDATE `config` SET `ord`='3000' WHERE `var`='usedivisionselector'; - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'participant_short_title_charmax', '50', 'Participant Registration', 'number', '', '2200', 'The maximum number of characters acceptable in the short project title (Max 255)', '-1'); -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'participant_short_title_enable', 'no', 'Participant Registration', 'yesno', '', '2100', 'Ask the participants for a short project title as well as their full title.', '-1'); diff --git a/db/db.update.98.sql b/db/db.update.98.sql deleted file mode 100644 index 7ab0760b..00000000 --- a/db/db.update.98.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TABLE `regfee_items` ( - `id` INT NOT NULL AUTO_INCREMENT , - `year` INT NOT NULL , - `name` VARCHAR( 64 ) NOT NULL , - `description` TEXT NOT NULL , - `cost` FLOAT NOT NULL , - `per` ENUM( 'student', 'project') NOT NULL , - PRIMARY KEY ( `id` ) - ) ENGINE = MYISAM ; - -CREATE TABLE `regfee_items_link` ( - `id` INT NOT NULL AUTO_INCREMENT , - `students_id` INT NOT NULL , - `regfee_items_id` INT NOT NULL , - PRIMARY KEY ( `id` ) - ) ENGINE = MYISAM ; - -INSERT INTO `config` ( `var` , `val` , `category` , `type` , `type_values` , `ord` , `description` , `year`) VALUES ( -'participant_regfee_items_enable', 'no', 'Participant Registration', 'yesno', '', '2750', 'Ask the participants for registration fee item options. Enabling this item also enables a Registration Fee Item Manager in the Administration section. Use this manager to add optional registration items (that have a fee) for a student to select.', '-1'); diff --git a/db/db.update.99.sql b/db/db.update.99.sql deleted file mode 100644 index 30d8506e..00000000 --- a/db/db.update.99.sql +++ /dev/null @@ -1,32 +0,0 @@ -INSERT INTO `reports` (`id`, `system_report_id`, `name`, `desc`, `creator`, `type`) VALUES - ('', '44', 'Labels -- Table Labels (with special award nominations)', 'Labels for each project. This report includes the first 5 projects the students have self-nominated for. There are boxes for judges to initial too. We realize that each fair may have a different number of projects. This reports serves as an example of how to create a report with boxes.', 'The Grant Brothers', 'student'); -INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value`, `x`, `y`, `w`, `h`, `lines`, `face`, `align`) VALUES - ('', LAST_INSERT_ID(), 'option', 0, 'type', 'label', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 1, 'group_new_page', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 2, 'allow_multiline', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 3, 'label_box', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 4, 'label_fairname', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 5, 'label_logo', 'no', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'option', 6, 'stock', 'nametag', 0, 0, 0, 0, 0, '', ''), - ('', LAST_INSERT_ID(), 'col', 0, 'pn', '', 5, 5, 30, 5, 1, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 1, 'nom_awards_name_1', '', 5, 45, 50, 10, 3, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 2, 'nom_awards_name_2', '', 5, 56, 50, 10, 3, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 3, 'nom_awards_name_3', '', 5, 67, 50, 10, 3, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 4, 'nom_awards_name_4', '', 5, 78, 50, 10, 3, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 5, 'nom_awards_name_5', '', 5, 89, 50, 10, 3, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 6, 'static_text', 'Judge 1', 5, 22, 30, 4, 1, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 7, 'static_text', 'Judge 2', 5, 34, 30, 4, 1, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 8, 'static_text', 'Safety Check', 42, 6, 12, 6, 2, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 9, 'static_text', 'Judges: Please initial box when judging of project is complete', 70, 23, 28, 12, 4, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 10, 'static_box', '', 0, 0, 100, 100, 1, '', 'center vcenter'), - ('', LAST_INSERT_ID(), 'col', 11, 'static_box', '', 55, 5, 40, 8, 1, '', 'center vcenter'), - ('', LAST_INSERT_ID(), 'col', 12, 'static_box', '', 22, 20, 40, 8, 1, '', 'center vcenter'), - ('', LAST_INSERT_ID(), 'col', 13, 'static_box', '', 22, 32, 40, 8, 1, '', 'center vcenter'), - ('', LAST_INSERT_ID(), 'col', 14, 'static_box', '', 55, 46, 40, 8, 1, '', 'center vcenter'), - ('', LAST_INSERT_ID(), 'col', 15, 'static_box', '', 55, 57, 40, 8, 1, '', 'center vcenter'), - ('', LAST_INSERT_ID(), 'col', 16, 'static_box', '', 55, 68, 40, 8, 1, '', 'center vcenter'), - ('', LAST_INSERT_ID(), 'col', 17, 'static_box', '', 55, 79, 40, 8, 1, '', 'center vcenter'), - ('', LAST_INSERT_ID(), 'col', 18, 'static_box', '', 55, 90, 40, 8, 1, '', 'center vcenter'), - ('', LAST_INSERT_ID(), 'col', 19, 'static_box', '', 0, 15, 100, 27, 1, '', 'center vcenter'), - ('', LAST_INSERT_ID(), 'sort', 0, 'pn', '', 0, 0, 0, 0, 1, '', ' '), - ('', LAST_INSERT_ID(), 'distinct', 0, 'pn', '', 0, 0, 0, 0, 1, '', ' '); diff --git a/db/db.update.999.sql b/db/db.update.999.sql deleted file mode 100644 index cfe3d800..00000000 --- a/db/db.update.999.sql +++ /dev/null @@ -1,32 +0,0 @@ -CREATE TABLE `isefforms` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL, - `required` enum('N','Y') NOT NULL, - `description` text NOT NULL, - `url` varchar(128) default NULL, - `formper` ENUM('student','project') NOT NULL DEFAULT project, - `year` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM ; - -CREATE TABLE `isefforms_registrations_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL, - `isefforms_id` int(10) unsigned NOT NULL, - `filename` varchar(128) NOT NULL - PRIMARY KEY (`id`) -) ENGINE=MyISAM; - -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(1) Checklist for Adult Sponsor', 'Y', 'This completed form is required for ALL projects and must be completed before experimentation.', 'http://www.societyforscience.org/isef/document/chklst09.pdf', 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(1A) Student Checklist', 'Y', 'This form is required for ALL projects.', 'http://www.societyforscience.org/isef/document/respln09.pdf', 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(1A2) Research Plan', 'Y', 'REQUIRED for ALL Projects Before Experimentation. A complete research hplan must accompany Checklist for Student (1A).', 'http://www.societyforscience.org/isef/document/respln09.pdf' , 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `formper`, `year`) VALUES ('(1B) Approval Form', 'Y', 'A completed form is required for each student, including all team members.', 'http://www.societyforscience.org/isef/document/1bappr09.pdf', 'student', 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(1C) Regulated Research Institutional/Industrial Setting Form', 'N', 'This form must be completed after experimentation by the adult supervising the student research conducted in a regulated research institution, industrial setting or an work site other than home, school or field.', 'http://www.societyforscience.org/isef/document/1cinst09.pdf', 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(2) Qualified Scientist Form', 'N', 'May be required for researc involving human subjects, vertebrate animals, potentially hazardous biological agents, and DEA-controlled substances. Must be completed and signed before the start of student experimentation.', 'http://www.societyforscience.org/isef/document/qualsc09.pdf', 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(3) Risk Assessment Form', 'N', 'Required for projects using hazardous chemicals, activities or devices. Must be completed before experimentation.', 'http://www.societyforscience.org/isef/document/rskass09.pdf', 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(4) Human Subjects Form', 'N', 'Required for all research involving human subjects. IRB approval required before experimentation.', 'http://www.societyforscience.org/isef/document/hmsubj09.pdf', 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(5A) Vertebrate Animal Form', 'N', 'Required for all research involving vertebrate animals that is conducted in a Non-Regulated Research Site. (SRC approval required before experimentation.)', 'http://www.societyforscience.org/isef/document/vertan09.pdf', 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(5B) Vertebrate Animal Form', 'N', 'Required for all research involving vertebrate animals that is conducated at a Regulated Research Institution. (IACUC approval required before experimentation.)', 'http://www.societyforscience.org/isef/document/vertan09.pdf', 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(6A) Potentially Hazardous Biological Agents Risk Assessment Form', 'N', 'Required for research involving microorganisms, rDNA, fresh/frozen tissue, blood and body fluids. SRC/IACUC/IBC approval required before experimentation.', 'http://www.societyforscience.org/isef/document/biohaz09.pdf', 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(6B) Human and Vertebrate Animal Tissue Form', 'N', 'Required for projects using fresh/frozen tissue, primary cell cultures, blood, blood products and body fluids. If the research involves living organisms, please ensure that the proper human or animal forms are completed. All projets using any tissue listed above, must also complete Form 6A', 'http://www.societyforscience.org/isef/document/tissue09.pdf', 2009); -INSERT INTO `isefforms` (`name`, `required`, `description`, `url`, `year`) VALUES ('(7A) Continuation Projects Form', 'N', 'Required for projects that are a continuation in the same field of study as a previous project. This form must be accompanied by the previous year\'s abstract, Form (1A) and Research Plan', 'http://www.societyforscience.org/isef/document/contin09.pdf', 2009); diff --git a/db/db_update.php b/db/db_update.php deleted file mode 100644 index 11848978..00000000 --- a/db/db_update.php +++ /dev/null @@ -1,141 +0,0 @@ -\n"; -if (file_exists('db.code.version.txt')) { - $dbcodeversion_file = file('db.code.version.txt'); - $dbcodeversion = trim($dbcodeversion_file[0]); -} else { - echo "Couldnt load current db.code.version.txt\n"; - exit; -} - -// same fix here for mysql 5.1 not truncating the 16 char usernames -$DBUSER = substr($DBUSER, 0, 16); - -$stmt = $pdo->prepare('SET NAMES latin1'); -$stmt->execute(); -$q = $pdo->prepare("SELECT val FROM config WHERE var='DBVERSION' AND year='0'"); -$q->execute(); -$r = $q->fetch(PDO::FETCH_OBJ); -$dbdbversion = $r->val; -if (!$dbdbversion) { - echo "Couldnt get current db version. Is SFIAB properly installed?\n"; - exit; -} - -/* Get the fair year */ -$q = $pdo->prepare("SELECT val FROM config WHERE var='FAIRYEAR' AND year='0'"); -$q->execute(); -$r = $q->fetch(PDO::FETCH_OBJ); -$config = array('FAIRYEAR' => $r->val); - -/* Load config just in case there's a PHP script that wants it */ -$q = $pdo->prepare("SELECT * FROM config WHERE year=?"); -$q->execute([$config['FAIRYEAR']]); -while ($r = $q->fetch(PDO::FETCH_OBJ)) - $config[$r->var] = $r->val; - -require_once ('../config_editor.inc.php'); // For config_update_variables() - -if ($dbcodeversion && $dbdbversion) { - // lets see if they match - if ($dbcodeversion == $dbdbversion) { - echo "DB and CODE are all up-to-date. Version: $dbdbversion\n"; - exit; - } else if ($dbcodeversion < $dbdbversion) { - echo "ERROR: dbcodeversion $dbdbversion) { - echo "DB update requirements detected\n"; - echo "Current DB Version: $dbdbversion\n"; - echo "Current CODE Version: $dbcodeversion\n"; - - echo "Updating database from $dbdbversion to $dbcodeversion\n"; - - for ($ver = $dbdbversion + 1; $ver <= $dbcodeversion; $ver++) { - if (file_exists("db.update.$ver.php")) { - include ("db.update.$ver.php"); - } - if (is_callable("db_update_{$ver}_pre")) { - echo "db.update.$ver.php::db_update_{$ver}_pre() exists - running...\n"; - call_user_func("db_update_{$ver}_pre"); - echo "db.update.$ver.php::db_update_{$ver}_pre() done.\n"; - } - if (file_exists("db.update.$ver.sql")) { - echo "db.update.$ver.sql detected - running...\n"; - readfile("db.update.$ver.sql"); - echo "\n"; - // Dennis If 'system' and 'mysql' do not exist use each section of the sql files not system("sql" - // i.e. for windows ISP servers that do not provide system and sql.exe executable - exec('mysql -q --help', $outputnotused, $exec_sqlstatus); - if (function_exists('system') and $exec_sqlstatus == 0) { - // echo "
    ** db_update USING system('mysql ..) on this server!
    "; - system("mysql --default-character-set=latin1 -h$DBHOST -u$DBUSER -p$DBPASS $DBNAME query($templine)) { - echo ('
    Error performing query!
    ' . $templine . '
    mysqlerror: ' . $pdo->errorInfo() . '

    '); - $error_count += 1; - $exit_code = -1; // do we bail out here or keep going? keep going for now, get all errors - } - // Reset temp variable to empty - $templine = ''; - } - } - echo '
    '; - } - if ($exit_code != 0) { - /* mysql failed!, what now? */ - $error_count += 1; - echo '
    ERROR in db_update: Failed to execute query(s) without error!
    '; - echo "Update scripts bad or system('mysql' .. ) call failed!


    "; - } - } else { - echo "Version $ver SQL update file not found - skipping over\n"; - } - if (is_callable("db_update_{$ver}_post")) { - echo "db.update.$ver.php::db_update_{$ver}_post() exists - running...\n"; - call_user_func("db_update_{$ver}_post"); - echo "db.update.$ver.php::db_update_{$ver}_post() done.\n"; - } - } - if ($db_update_skip_variables != true) { - echo "\nUpdating Configuration Variables...\n"; - config_update_variables($config['FAIRYEAR']); - } - - echo "\nAll done - updating new DB version to $dbcodeversion\n"; - $stmt = $pdo->prepare("UPDATE config SET val=? WHERE var='DBVERSION' AND year='0'"); - $stmt->execute([$dbcodeversion]); - } -} else { - echo "ERROR: dbcodeversion and dbdbversion are not defined\n"; -} - -echo "\n"; - -?> diff --git a/debug.inc.php b/debug.inc.php new file mode 100644 index 00000000..2c3cef57 --- /dev/null +++ b/debug.inc.php @@ -0,0 +1,22 @@ + diff --git a/email.inc.php b/email.inc.php new file mode 100644 index 00000000..87854968 --- /dev/null +++ b/email.inc.php @@ -0,0 +1,218 @@ +real_escape_string($email_name); + $q = $mysqli->query("SELECT * FROM emails WHERE name='$n'"); + $e = $q->fetch_assoc(); + } else if($eid > 0) { + $q = $mysqli->query("SELECT * FROM emails WHERE id='$eid'"); + $e = $q->fetch_assoc(); + } else { + $e = $data; + } + + unset($e['original']); + $original = $e; + $e['original'] = $original; + return $e; +} + +function email_save($mysqli, &$e) +{ + generic_save($mysqli, $e, 'emails', 'id'); +} + +function email_create($mysqli) +{ + global $config; + $r = $mysqli->real_query("INSERT INTO emails(`section`) VALUES('Uncategorized')"); + $eid = $mysqli->insert_id; + return $eid; +} + +function email_id($mysqli, $email_name) +{ + /* Lookup the ID of this email */ + $q = $mysqli->query("SELECT `id` FROM `emails` WHERE `name`='$email_name'"); + if($q->num_rows != 1) { + /* Not found */ + $uid = 0; + sfiab_log($mysqli, "email_not_found", $uid, 0, $email_name, "Email \"$email_name\" not found."); + return false; + } + $r = $q->fetch_assoc(); + $db_id = $r['id']; + return $db_id; + +} + + +/* Send to an array of users, no indexing just users = [ $u, $u, $u, etc. ] */ +function email_send_to_list($mysqli, $email_name, &$users, $additional_replace = array()) +{ + global $config; + + $db_id = email_id($mysqli, $email_name); + if($db_id == false) { + return false; + } + + /* Fill in additional replace vars that the email send script can't + * calculate from the command line, like the fair URL */ + $additional_replace['fair_url'] = $config['fair_url']; + $ad = $mysqli->real_escape_string(serialize($additional_replace)); + + $query_str = ''; + $c = 0; + + foreach($users as &$user) { + if(!$user['enabled']) { + debug("email_send: user {$user['uid']} is not enabled\n"); + continue; + } + + $n = $mysqli->real_escape_string($user['name']); + $em = $mysqli->real_escape_string($user['email']); + $uid = (int)$user['uid']; + + /* Build up 10 queries before sending running the mysql insert */ + if($query_str == '') { + $query_str = 'INSERT INTO queue(`command`,`emails_id`,`to_uid`,`to_email`,`to_name`,`additional_replace`,`result`) VALUES '; + } else { + $query_str .= ','; + } + $query_str .= "('email','$db_id','$uid','$em','$n','$ad','queued')"; + + if($c == 10) { + $mysqli->real_query($query_str); + if($mysqli->error != '') { + debug("email_send: query failed: $query_str\n"); + debug("email_send: {$mysqli->error}\n"); + } + $query_str = ''; + $c = 0; + } + + $c += 1; + + debug("email_send: queued email $db_id, uid=$uid, em=$em, name=$n, replace=$ad\n"); + } + + /* $query_str probably has stuff in it for the last query we were building. Every incremental + * step is a valid query, so just send it */ + if($query_str != '') { + $mysqli->real_query($query_str); + if($mysqli->error != '') { + debug("email_send: query failed: $query_str\n"); + debug("email_send: {$mysqli->error}\n"); + } + } + + queue_start($mysqli); +} + +/* Send a single email to a single user. Can specify uid or $u if it's already loaded. Just turns the user into a list and calls + * email_send_to_list */ + function email_send($mysqli, $email_name, &$uid_or_u, $additional_replace = array()) +{ + if(is_array($uid_or_u) && array_key_exists('uid', $uid_or_u) ) { + $users = array($uid_or_u); + } else { + /* Lookup the user */ + $u = user_load($mysqli, $uid_or_u); + if($u == NULL) { + debug("email_send: user is null\n"); + return false; + } + $users = array($u); + } + + email_send_to_list($mysqli, $email_name, $users, $additional_replace); + return true; +} + +function email_send_to_non_user($mysqli, $email_name, $to_name, $to_email, $additional_replace = array()) +{ + /* Create a fake user */ + $u = array(); + $u['uid'] = 0; + $u['enabled'] = 1; + $u['email'] = filter_var($to_email, FILTER_VALIDATE_EMAIL); + $u['name'] = $to_name; + + if($u['email'] == false) { + debug("email is invalid"); + return false; + } + + $users = array($u); + email_send_to_list($mysqli, $email_name, $users, $additional_replace); + return true; +} + + +function queue_stopped($mysqli) +{ + $qstop = $mysqli->query("SELECT val FROM config WHERE var='queue_stop'"); + $vstop = $qstop->fetch_assoc(); + if((int)$vstop['val'] == 1) { + return true; + } + return false; +} + +function queue_stop($mysqli) +{ + $mysqli->query("UPDATE config SET val='1' WHERE var='queue_stop'"); +} + +function queue_start($mysqli) +{ + $mysqli->query("UPDATE config SET val='0' WHERE var='queue_stop'"); + exec("php -q scripts/sfiab_queue_runner.php 1>/dev/null 2>&1 &"); +} + + +function find_users_needing_registration_email($mysqli) +{ + global $config; + + $email_id = email_id($mysqli, "New Registration"); + + /* Select all successful welcome emails, index by user id */ + $welcome_emails = array(); + $q = $mysqli->query("SELECT `uid` FROM `log` WHERE `type`='email_send' AND `email_id`='$email_id' AND `result`='1' AND `year`='{$config['year']}'"); + print($mysqli->error); + while($r = $q->fetch_row()) { + $uid = (int)$r[0]; + $welcome_emails[$uid] = 1; + } + + $new_users = array(); + /* Find all new users, and for each, check if there is a welcome email in the queue that was successfully sent */ + $q = $mysqli->query("SELECT * FROM users WHERE `fair_id`>0 AND FIND_IN_SET('student',`roles`)>0 AND `password_expired`='1' AND `year`='{$config['year']}'"); + while($r = $q->fetch_assoc()) { + $uid = (int)$r['uid']; + if(!array_key_exists($uid, $welcome_emails)) { + /* New user, but no welcome email has been sent */ + $new_users[$uid] = user_load_from_data($mysqli, $r); + } + } + return $new_users; + +} + +/* Scramble the user's password and send a welcome email */ +function email_send_welcome_email($mysqli, &$user) +{ + user_scramble_and_expire_password($mysqli, $user); + $result = email_send($mysqli, "New Registration", $user, array('password'=>$user['scrambled_password']) ); + return $result; +} + +?> diff --git a/fair.inc.php b/fair.inc.php deleted file mode 100644 index c8bb28fd..00000000 --- a/fair.inc.php +++ /dev/null @@ -1,51 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2007 David Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - diff --git a/fair_additional_materials.inc.php b/fair_additional_materials.inc.php deleted file mode 100644 index e52c37b0..00000000 --- a/fair_additional_materials.inc.php +++ /dev/null @@ -1,180 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT * FROM award_prizes - LEFT JOIN winners ON winners.awards_prizes_id=award_prizes.id - WHERE winners.year=? - AND winners.fairs_id=?"); - $q->execute([$year, $fair['id']]); - while ($r = $q->fetch()) { - $pid = $r['projects_id']; - $rep->newPage('', '', 1); - $rep->setFontSize(12); - - /* Left margin width */ - $x = 1; - - $rep->setFontSize(14); - $rep->addText("{$award['name']}", 'center'); - $rep->setFontSize(12); - $rep->addText("{$r['prize']}", 'center'); - $rep->nextLine(); - $rep->hr(); - $rep->nextLine(); - - $rep->addTextX('Name of Regional Fair: ___________________________________________________', $x); - $rep->addTextX("{$fair['name']}", $x + 1.75); - - $rep->nextLine(); - - $rep->addTextX('Authorized By: __________________________________________________________', $x); - $rep->nextLine(); - $rep->addTextX('Position: _______________________________________________________________', $x); - $rep->nextLine(); - - $rep->addTextX('Date: ________________________________________', $x); - $rep->addTextX(date('l F dS, Y'), $x + 0.5); - $rep->nextLine(); - $rep->nextLine(); - - $p = project_load($pid); - // print_r($p); - - $rep->addTextX('Project Title: ____________________________________________________________', $x); - $rep->prevLine(); - $rep->addText("{$p['title']}", 'left', $x + 1); - $rep->nextLine(); - $rep->nextLine(); - $rep->nextLine(); - - foreach ($p['student'] as $s) { - $rep->addTextX('Name of Student: ________________________________________________________', $x); - $rep->addTextX("{$s['firstname']} {$s['lastname']}", $x + 1.25); - $rep->nextLine(); - $rep->addTextX('Grade: _____________ Date of birth: _____________', $x); - $rep->addTextX("{$s['grade']}", $x + 0.75); - list($y, $m, $d) = explode('-', $s['dateofbirth']); - $dob = date('M j, Y', mktime(0, 0, 0, $m, $d, $y)); - $rep->addTextX("$dob", $x + 3); - $rep->nextLine(); - $rep->addTextX('School: ________________________________________________________________', $x); - $rep->addTextX("{$s['school']}", $x + 0.75); - $rep->nextLine(); - $rep->addTextX('Home Address: __________________________________________________________', $x); - $rep->prevLine(); - $rep->addText("{$s['address']} {$s['city']}, {$s['province']} {$s['postalcode']}", 'left', $x + 1.25); - $rep->nextLine(); - $rep->nextLine(); - $rep->nextLine(); - } - - $rep->hr(); - - $rep->setFontBold(); - $rep->addText("To be considered for this award the following materials need to be included with this form:\n"); - $rep->setFontNormal(); - $rep->nextLine(); - - $rep->addText('1.'); - $rep->prevLine(); - $rep->addText("Project Summary/Discussion Paper (Please include a copy of the summary sheet and any documentation that accompanied the display, including charts and diagrams, that will improve the understanding and comprehension of the science fair project.\n", 'left', 0.9); - $rep->addText('2. Copy of Judges Report and Comments.'); - $rep->addText('3. Colour photograph(s) of the exhibitor(s) and the exhibit.'); - $rep->addText('4. Completed Declaration of Exhibitor form (next page) '); - - $rep->nextLine(); - - $rep->newPage(); - - $rep->nextLine(); - $rep->setFontBold(); - $rep->addText('DECLARATION OF EXHIBITOR', 'center'); - $rep->nextLine(); - $rep->setFontNormal(); - $rep->nextLine(); - $rep->nextLine(); - $i = ($p['num_students'] == 1) ? 'I' : 'We'; - $my = ($p['num_students'] == 1) ? 'my' : 'our'; - $rep->addText("1. $i certify this exhibit and report is $my own work."); - $rep->nextLine(); - $fn = strtoupper($config['fairname']); - $rep->addText('2.'); - $rep->prevLine(); - $rep->addText("$i hereby give permission to $fn the AWARDING ORGANIZATION to publicize $my award and reprint $my project summary.", 'left', 0.9); - - $rep->nextLine(); - $rep->nextLine(); - $rep->nextLine(); - - foreach ($p['student'] as $s) { - $rep->addText('______________________________________ _____________________', 'center'); - $rep->nextLine(); - $rep->addTextX("SIGNATURE ({$s['firstname']} {$s['lastname']})", 1.5); - $rep->addTextX('Date', 6.25); - $rep->nextLine(); - $rep->nextLine(); - $rep->nextLine(); - } - - $rep->addText('Certified by:'); - $rep->nextLine(); - $rep->nextLine(); - $rep->nextLine(); - - $rep->addText('______________________________________ _____________________', 'center'); - $rep->nextLine(); - $rep->addTextX('POSITION', 2.5); - $rep->addTextX('Date', 6.25); - $rep->nextLine(); - - $rep->nextLine(); - $rep->nextLine(); - - $rep->addText('_________________________________________________', 'center'); - $rep->nextLine(); - $rep->addText('(Regional Chairperson, Awards Chairperson, or Chief Judge)', 'center'); - } - - return $rep->outputArray(); -} - -?> diff --git a/fair_info.php b/fair_info.php deleted file mode 100644 index 90284a63..00000000 --- a/fair_info.php +++ /dev/null @@ -1,240 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2007 David Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'Feeder Fair', 'sfiab' => 'SFIAB Upstream', 'ysc' => 'YSC/CWSF Upstream'); - -/* Sort out who we're editting */ -if (get_value_from_array($_POST, 'users_id')) - $eid = intval($_POST['users_id']); /* From a save form */ -else if (array_key_exists('embed_edit_id', $_SESSION)) - $eid = $_SESSION['embed_edit_id']; /* From the embedded editor */ -else - $eid = get_value_from_array($_SESSION, 'users_id'); /* Regular entry */ - -if ($eid != get_value_from_array($_SESSION, 'users_id')) { - /* - * Not editing ourself, we had better be - * a committee member - */ - user_auth_required('committee', 'admin'); -} - -$u = user_load($eid); - -switch (get_value_from_array($_GET, 'action')) { - case 'save': - $fairs_id = intval($u['fairs_id']); - if ($fairs_id == 0) { - $stmt = $pdo->prepare("INSERT INTO fairs ('id', 'name') VALUES('', 'new entry')"); - $stmt->execute(); - $id = $pdo->lastInsertId(); - } else { - $id = intval($fairs_id); - } - - $name = $pdo->quote(stripslashes($_POST['name'])); - $abbrv = $pdo->quote(stripslashes($_POST['abbrv'])); - $url = $pdo->quote($_POST['url']); - $website = $pdo->quote($_POST['website']); - - $type = array_key_exists($_POST['type'], $fair_type) ? $_POST['type'] : ''; - $username = $pdo->quote(stripslashes($_POST['username'])); - $password = $pdo->quote(stripslashes(password_hash($_POST['password'], PASSWORD_BCRYPT))); - - $enable_stats = ($_POST['enable_stats'] == 'yes') ? 'yes' : 'no'; - $enable_awards = ($_POST['enable_awards'] == 'yes') ? 'yes' : 'no'; - $enable_winners = ($_POST['enable_winners'] == 'yes') ? 'yes' : 'no'; - - $q = $pdo->prepare("UPDATE contacts SET name =?, abbrv =?, url =?, website=?, - type=? , username=?, - password=?, - enable_stats=?, - enable_awards=?, - enable_winners=? WHERE id =?"); - $q->execute([$name, $abbrv, $url, $website, $type, $username, $password, $enable_stats, $enable_awards, $enable_winners, $age, $email, $id]); - - $u['fairs_id'] = $id; - user_save($u); - happy_('Fair Informaiton successfully updated'); - exit; -} - -function yesno($name, $val) -{ - echo "'; -} - -/* update overall status */ -fair_status_update($u); - -if (get_value_from_array($_SESSION, 'embed') != true) { - // output the current status - $newstatus = fair_status_info($u); - if ($newstatus != 'complete') - message_push(error(i18n('Fair Information Incomplete'))); - else - message_push(happy(i18n('Fair Information Complete'))); -} - -if (get_value_from_array($_SESSION, 'embed') == true) { - echo '
    '; - display_messages(); - echo '

    ' . i18n('Fair Information') . '

    '; - echo '
    '; -} else { - // send the header - send_header('Fair Information', - array('Science Fair Main' => 'fair_main.php')); -} - -?> - - -prepare('SELECT * FROM fairs WHERE id=?'); -$q->execute([$u['fairs_id']]); - -if ($q->rowCount() != 0) { - $f = $q->fetch(); -} else { - $f = array(); -} - -echo "
    \n"; -echo "\n"; -echo "
    '; - echo "
    \n"; - echo "\n"; - echo '\n"; - echo '
    '; - echo '
    '; - - echo "
    \n"; - echo "\n"; - echo '\n"; - echo '
    '; - - send_footer(); -} - -?> diff --git a/config/categories.php b/config/categories.php deleted file mode 100644 index 23df2b87..00000000 --- a/config/categories.php +++ /dev/null @@ -1,161 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php', - 'Age Categories' => 'config/categories.php'), 'project_age_categories'); -} else { - send_header('Age Categories', - array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), 'project_age_categories'); -} - -if (get_value_from_array($_POST, 'action') == 'edit') { - // ues isset($_POST['mingrade']) instead of just $_POST['mingrade'] to allow entering 0 for kindergarden - if (get_value_from_array($_POST, 'id') && get_value_from_array($_POST, 'category') && isset($_POST['mingrade']) && $_POST['maxgrade']) { - $q = $pdo->prepare("SELECT id FROM projectcategories WHERE id=? AND year=?"); - $q->execute([$_POST['id'],$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - if ($q->rowCount() && $_POST['saveid'] != $_POST['id']) { - echo error(i18n('Category ID %1 already exists', array($_POST['id']), array('category ID'))); - } else { - $stmt = $pdo->prepare('UPDATE projectcategories SET ' - . "id=?, " - . "category=?, " - . "category_shortform=?, " - . "mingrade=?, " - . "maxgrade=?" - . "WHERE id=?"); - echo happy(i18n('Category successfully saved')); - $stmt->execute([$_POST['id'],stripslashes($_POST['category']),stripslashes($_POST['category_shortform']),$_POST['mingrade'],$_POST['maxgrade'],$_POST['saveid']]); - } - } else { - echo error(i18n('All fields are required')); - } -} - -if (get_value_from_array($_POST, 'action') == 'new') { - // ues isset($_POST['mingrade']) instead of just $_POST['mingrade'] to allow entering 0 for kindergarden - if (get_value_from_array($_POST, 'id') && $_POST['category'] && isset($_POST['mingrade']) && $_POST['maxgrade']) { - $q = $pdo->prepare("SELECT id FROM projectcategories WHERE id=? AND year=?"); - $q->execute([$_POST['id'],$config['FAIRYEAR']]); - if ($q->rowCount()) { - echo error(i18n('Category ID %1 already exists', array($_POST['id']), array('category ID'))); - } else { - $stmt = $pdo->prepare('INSERT INTO projectcategories (id,category,category_shortform,mingrade,maxgrade,year) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?)'); - $stmt->execute([$_POST['id'],stripslashes($_POST['category']),stripslashes($_POST['category_shortform']), - $_POST['mingrade'],$_POST['maxgrade'],$config['FAIRYEAR']]); - echo happy(i18n('Category successfully added')); - } - } else { - echo error(i18n('All fields are required')); - } -} - -if (get_value_from_array($_GET, 'action') == 'remove' && get_value_from_array($_GET, 'remove')) { - // ###### Feature Specific - filtering divisions by category - not conditional, cause even if they have the filtering turned off..if any links - // for this division exist they should be deleted - $stmt = $pdo->prepare("DELETE FROM projectcategoriesdivisions_link where projectcategories_id=? AND year=?"); - $stmt->execute([$_GET['remove'],$config['FAIRYEAR']]); - // #### - $stmt = $pdo->prepare("DELETE FROM projectcategories WHERE id=? AND year=?"); - $stmt->execute([$_GET['remove'],$config['FAIRYEAR']]); - echo happy(i18n('Category successfully removed')); -} - -echo '
    '; - -if (!get_value_from_array($_GET, 'action') == 'edit' || get_value_from_array($_GET, 'action') == 'new') - echo '' . i18n('Add new age category') . "\n"; - -echo ''; -echo ''; -echo '\n"; -echo '\n"; -echo '\n"; -echo '\n"; -echo '\n"; -echo '\n"; -echo ''; - -$categoryr = null; - -if (get_value_from_array($_GET, 'action') == 'edit' || get_value_from_array($_GET, 'action') == 'new') { - echo '\n"; - if (get_value_from_array($_GET, 'action') == 'edit') { - echo '\n"; - $q = $pdo->prepare("SELECT * FROM projectcategories WHERE id=? AND year=?"); - $q->execute([get_value_from_array($_GET, 'edit'),$config['FAIRYEAR']]); - $categoryr = $q->fetch(PDO::FETCH_OBJ); - $buttontext = 'Save'; - } else if (get_value_from_array($_GET, 'action') == 'new') { - $buttontext = 'Add'; - } - - echo ''; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ''; -} else { - $q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY mingrade"); - $q->execute([$config['FAIRYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo " "; - echo ' '; - echo ' '; - echo " "; - echo " "; - echo ' '; - echo ''; - } -} -echo '
    ' . i18n('Category ID') . "' . i18n('Category Name') . "' . i18n('Shortform') . "' . i18n('Minimum Grade') . "' . i18n('Maximum Grade') . "' . i18n('Actions') . "
    $r->id' . i18n($r->category) . '' . i18n($r->category_shortform) . '$r->mingrade$r->maxgrade'; - echo 'id\">'; - echo '   '; - echo 'id\">'; - echo '
    '; -echo '
    '; -echo i18n("You should assign the 'Category ID's in numerical order, starting with 1. This Category ID is used to generate the project number"); - -send_footer(); -?> diff --git a/config/dates.php b/config/dates.php deleted file mode 100644 index 58f1c740..00000000 --- a/config/dates.php +++ /dev/null @@ -1,160 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'important_dates'); - -$q = $pdo->prepare("SELECT * FROM dates WHERE year='-1'"); -$q->execute(); - -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $defaultdates[$r->name] = $r; -} - -?> - - $val) { - // put the date and time back together - $d = stripslashes($val); - $t = stripslashes($_POST['savetimes'][$key]); - $v = "$d $t"; - $stmt = $pdo->prepare("UPDATE dates SET date=? WHERE year=? AND id=?"); - $stmt->execute([$v,$config['FAIRYEAR'],$key]); - } - } - echo happy(i18n('Dates successfully saved')); -} - -echo '
    '; -echo "\n"; -echo ''; -echo ''; - -/* List the dates in the order we would like them to appear */ -$dates = array('fairdate' => array(), - 'regopen' => array(), - 'regclose' => array(), - 'postparticipants' => array(), - 'postwinners' => array(), - 'judgeregopen' => array(), - 'judgeregclose' => array(), - 'judgescheduleavailable' => array(), - 'specawardregopen' => array(), - 'specawardregclose' => array()); - -/* Now copy the SQL data into the above array */ - -$q = $pdo->prepare("SELECT * FROM dates WHERE year=? ORDER BY date"); -$q->execute([$config['FAIRYEAR']]); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $dates[$r->name]['description'] = $r->description; - $dates[$r->name]['id'] = $r->id; - $dates[$r->name]['date'] = $r->date; - - $v = $r->date; - /* See if $v is something resembling a valid date */ - if (!preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/', $v, $d)) { - $error_ids[$r->id] = i18n('Invalid date format'); - } else if ($d[3] == 0 || $d[2] == 0 || $d[1] == 0) { - $error_ids[$r->id] = i18n('Invalid date'); - } -} - -function chkafter($d1, $d2) -{ - global $dates; - global $error_ids; - - $id2 = $dates[$d2]['id']; - - /* Parse both dates 1, 2, 3, 4, 5, 6 */ - preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})/', $dates[$d1]['date'], $p1); - preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})/', $dates[$d2]['date'], $p2); - - // int mktime ( [int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] ) - $u1 = mktime($p1[4], $p1[5], $p1[6], $p1[2], $p1[3], $p1[1]); - $u2 = mktime($p2[4], $p2[5], $p2[6], $p2[2], $p2[3], $p2[1]); - - if ($u1 > $u2) { - /* Insert an error for $u2 */ - $error_ids[$id2] = i18n('Must come after "%1"', array($dates[$d1]['description'])); - } -} - -chkafter('regopen', 'regclose'); -chkafter('judgeregopen', 'judgeregclose'); -chkafter('specawardregopen', 'specawardregclose'); -chkafter('fairdate', 'postwinners'); - -/* And print the table with all the info in the correct order */ -foreach ($dates as $dn => $d) { - if (!$d['id']) { - $def = $defaultdates[$dn]; - // hmm if we dont have a record for this date this year, INSERT the sql from the default - $stmt = $pdo->prepare("INSERT INTO dates (date,name,description,year) VALUES ( - ?, - ?, - ?, - ? - )"); - $stmt->execute([$def->date,$dn,$def->description,$config['FAIRYEAR']]); - $d['id'] = $pdo->lastInsertId(); - $d['description'] = $def->description; - $d['date'] = $def->date; - } - $e = ''; - if (get_value_from_array($error_ids, $d['id'])) { - $e = '* ' . $error_ids[$d['id']] . ''; - } - list($_d, $_t) = explode(' ', $d['date']); - - echo ''; - echo ""; -} -echo '

    ' . i18n('Dates for fair year %1', array($config['FAIRYEAR']), array('fair year')) . '

    ' . i18n($d['description']) . '"; - echo ""; - echo "{$e}
    '; -echo '\n"; -echo '
    '; - -send_footer(); -?> \ No newline at end of file diff --git a/config/divisions.php b/config/divisions.php deleted file mode 100644 index 51f71511..00000000 --- a/config/divisions.php +++ /dev/null @@ -1,211 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php', - 'Project Divisions' => 'config/divisions.php'), - 'project_divisions'); -} else { - send_header('Project Divisions', - array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'project_divisions'); -} - -if (get_value_from_array($_POST, 'action') == 'edit') { - if (get_value_from_array($_POST, 'id') && get_value_from_array($_POST, 'division')) { - $q = $pdo->prepare("SELECT id FROM projectdivisions WHERE id=? AND year=?"); - $q->execute([$_POST['id'],$config['FAIRYEAR']]); - if ($q->rowCount() && $_POST['saveid'] != $_POST['id']) { - echo error(i18n('Division ID %1 already exists', array($_POST['id']), array('division ID'))); - } else { - $stmt = $pdo->prepare('UPDATE projectdivisions SET ' - . "id=?, " - . "division=?, " - . "division_shortform=?" - . "WHERE id=? AND year=?"); - $stmt->execute([$_POST['id'],stripslashes($_POST['division']),stripslashes($_POST['division_shortform']),$_POST['saveid'],$config['FAIRYEAR']]); - - // ###### Feature Specific - filtering divisions by category - if ($config['filterdivisionbycategory'] == 'yes') { - $stmt = $pdo->prepare("DELETE FROM projectcategoriesdivisions_link WHERE projectdivisions_id=? AND year=?"); - $stmt->execute([ $_POST['saveid'],$config['FAIRYEAR']]); - if (is_array($_POST['divcat'])) { - foreach ($_POST['divcat'] as $tempcat) { - $stmt = $pdo->prepare('INSERT INTO projectcategoriesdivisions_link (projectdivisions_id,projectcategories_id,year) VALUES (?,?,?)'); - $stmt->execute([$_POST['id'],$tempcat,$config['FAIRYEAR']]); - } - } - } - // ########### - - echo happy(i18n('Division successfully saved')); - } - } else { - echo error(i18n('All fields are required')); - } -} - -if (get_value_from_array($_POST, 'action') == 'new') { - if (get_value_from_array($_POST, 'id') && get_value_from_array($_POST, 'division')) { - $q = $pdo->prepare("SELECT id FROM projectdivisions WHERE id=? AND year=?"); - $q->execute([$_POST['id'],$config['FAIRYEAR']]); - if ($q->rowCount()) { - echo error(i18n('Division ID %1 already exists', array($_POST['id']), array('division ID'))); - } else { - $stmt = $pdo->prepare('INSERT INTO projectdivisions (id,division,division_shortform,year) VALUES (?,?,?,?)'); - $stmt->execute([$_POST['id'],stripslashes($_POST['division']),stripslashes($_POST['division_shortform']),$config['FAIRYEAR']]); - - // ###### Feature Specific - filtering divisions by category - if ($config['filterdivisionbycategory'] == 'yes') { - foreach ($_POST['divcat'] as $tempcat) { - $stmt = $pdo->prepare('INSERT INTO projectcategoriesdivisions_link (projectdivisions_id,projectcategories_id,year) VALUES (?,?)'); - $stmt->execute([$tempcat,$conference['id']]); - } - } - // ####### - echo happy(i18n('Division successfully added')); - } - } else { - echo error(i18n('All fields are required')); - } -} - -if (get_value_from_array($_GET, 'action') == 'remove' && get_value_from_array($_GET, 'remove')) { - // ###### Feature Specific - filtering divisions by category - not conditional, cause even if they have the filtering turned off..if any links - // for this division exist they should be deleted - $stmt = $pdo->prepare("DELETE FROM projectcategoriesdivisions_link where projectdivisions_id=? AND year=?"); - $stmt->execute([$_GET['remove'], $config['FAIRYEAR']]); - $stmt = $pdo->prepare("DELETE FROM projectdivisions WHERE id=? AND year=?"); - $stmt->execute([$_GET['remove'],$config['FAIRYEAR']]); - echo happy(i18n('Division successfully removed')); -} - -echo '
    '; - -if (!get_value_from_array($_GET, 'action') == 'edit' || get_value_from_array($_GET, 'action') == 'new') - echo '' . i18n('Add new division') . "\n"; - -echo ''; -echo ''; -echo '\n"; -echo '\n"; -echo '\n"; -// ###### Feature Specific - filtering divisions by category -if ($config['filterdivisionbycategory'] == 'yes') - echo '\n"; -// ##### -echo '\n"; -echo ''; - -if (get_value_from_array($_GET, 'action') == 'edit' || get_value_from_array($_GET, 'action') == 'new') { - echo '\n"; - if (get_value_from_array($_GET, 'action') == 'edit') { - echo '\n"; - $q = $pdo->prepare("SELECT * FROM projectdivisions WHERE id=? AND year=?"); - $q->execute([get_value_from_array($_GET, 'edit'),$config['FAIRYEAR']]); - $divisionr = $q->fetch(PDO::FETCH_OBJ); - - $buttontext = 'Save'; - } else if (get_value_from_array($_GET, 'action') == 'new') { - $buttontext = 'Add'; - } - echo ''; - echo ' '; - echo ' '; - echo ' '; - - // ###### Feature Specific - filtering divisions by category - if ($config['filterdivisionbycategory'] == 'yes') { - echo ' '; - } - - echo ' '; - echo ''; -} else { - $q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); - $q->execute([$config['FAIRYEAR']]); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo " "; - echo ' '; - echo " "; - // ###### Feature Specific - filtering divisions by category - if ($config['filterdivisionbycategory'] == 'yes') { - $c = $pdo->prepare("SELECT category FROM projectcategoriesdivisions_link, projectcategories - WHERE projectcategoriesdivisions_link.projectcategories_id = projectcategories.id - AND projectdivisions_id=? - AND projectcategoriesdivisions_link.year=? - AND projectcategories.year=? - ORDER BY projectcategories.mingrade"); - $c->execute([$r->id,$config['FAIRYEAR'],$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - if (!$c) { - $tempcat = ' '; - } else { - $tempcat = ''; - while ($categoryr = $c->fetch(PDO::FETCH_OBJ)) { - $tempcat .= ',' . $categoryr->category; - } - $tempcat = substr($tempcat, 1); - } - echo ""; - } - // ############ - echo ' '; - echo ''; - } -} -echo '
    ' . i18n('Division ID') . "' . i18n('Division Name') . "' . i18n('Short Form') . "' . i18n('Categories') . "' . i18n('Actions') . "
    '; - $q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=? ORDER BY mingrade"); - $q->execute([$config['FAIRYEAR']]); - while ($categoryr = $q->fetch(PDO::FETCH_OBJ)) { - $query = 'SELECT * FROM projectcategoriesdivisions_link WHERE projectdivisions_id=? AND projectcategories_id=? AND year=?'; - $t = $pdo->prepare($query); - $t->execute([$divisionr->id,$categoryr->id,$config['FAIRYEAR']]); - if ($t && $t->rowCount() > 0) - echo "id\" checked=\"checked\" /> $categoryr->category
    "; - else - echo "id\" /> $categoryr->category
    "; - } - echo '
    $r->id' . i18n($r->division) . '$r->division_shortform {$tempcat} '; - echo 'id\">'; - echo '   '; - echo 'id\">'; - echo '
    '; -echo '
    '; -echo i18n("You should assign the 'Division ID's in numerical order, starting with 1. This Division ID is used to generate the project number"); - -send_footer(); -?> diff --git a/config/divisions_cwsf.php b/config/divisions_cwsf.php deleted file mode 100644 index cc68b9c3..00000000 --- a/config/divisions_cwsf.php +++ /dev/null @@ -1,82 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'cwsf_project_divisions'); - -// //// FIX ME!!!!! -if (count(get_value_from_array($_POST, 'cwsfdivision', []))) { - foreach ($_POST['cwsfdivision'] AS $k => $v) { - $stmt = $pdo->prepare("UPDATE projectdivisions SET cwsfdivisionid=? WHERE id=? AND year=?"); - $stmt->execute([$v,$k,$config['FAIRYEAR']]); - } - echo happy(i18n('Corresponding CWSF divisions saved')); -} - -echo '
    '; - -echo i18n("For each of your divisions, please select a corresponding CWSF division if applicable. If no corresponding CWSF division is chosen then you will need to manually select the CWSF division for each project that you register for the CWSF. You can select the 'most likely' division to use as a default which can then be changed on a per-project basis when you perform the automatic CWSF registration"); - -echo '
    '; -echo '
    '; -echo ''; -echo ''; -echo '\n"; -echo '\n"; -echo ''; - -$q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=? ORDER BY id"); -$q->execute([$config['FAIRYEAR']]); -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo ' '; - echo ' '; - echo ''; -} -echo ''; -echo '
    ' . i18n('Your Division') . "' . i18n('Corresponding CWSF Division') . "
    ' . i18n($r->division) . ''; - echo "\n"; - echo '
    '; -echo ''; -echo '
    '; -echo '
    '; - -send_footer(); -?> diff --git a/config/images.php b/config/images.php deleted file mode 100644 index aff59c6b..00000000 --- a/config/images.php +++ /dev/null @@ -1,164 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'images'); - -if (get_value_from_array($_POST, 'action') == 'addimage') { - if ($_FILES['image']['error'] == UPLOAD_ERR_OK) { - // make sure its a JPEG - $imagesize = getimagesize($_FILES['image']['tmp_name']); - if (get_value_from_array($imagesize, 2) == 1 || get_value_from_array($imagesize, 2) == 2 || get_value_from_array($imagesize, 2) == 3) // GIF or JPG or PNG - { - /* Here's how to do it with GD, if GD didn't absolutely suck at - * resizing an image (thought I'd try it again, Mar30, 2010, still sucks). - $image_data = file_get_contents($_FILES['image']['tmp_name']); - $image = imagecreatefromstring($image_data); - - $w = imagesx($image); - $h = imagesy($image); - - $ratio = $h / $w; - $image100 = imagecreate(100, $ratio * 100); - imagecopyresampled($image100, $image, 0, 0, 0, 0, 100, $ratio * 100, $w, $h); - imagejpeg($image100, "../data/logo-100.jpg");*/ - - echo notice(i18n('Creating sized logo files:
     logo-100.gif
     logo-200.gif
     logo-500.gif
     logo.gif')); - // Make the gif's - system('convert -resize 100 "' . $_FILES['image']['tmp_name'] . '" ../data/logo-100.gif'); - system('convert -resize 200 "' . $_FILES['image']['tmp_name'] . '" ../data/logo-200.gif'); - system('convert -resize 500 "' . $_FILES['image']['tmp_name'] . '" ../data/logo-500.gif'); - system('convert "' . $_FILES['image']['tmp_name'] . '" ../data/logo.gif'); - - if (file_exists('../data/logo-100.gif') && file_exists('../data/logo-200.gif') && file_exists('../data/logo-500.gif') && file_exists('../data/logo.gif')) - echo happy(i18n('GIF Images successfully created')); - else - echo error(i18n("Error creating GIF Image files. Make sure 'convert' binary is in your path, and that 'system' function can be used")); - - echo notice(i18n('Creating sized logo files:
     logo-100.png
     logo-200.png
     logo-500.png
     logo.png')); - // make some PNG's as well - system('convert -resize 100 "' . $_FILES['image']['tmp_name'] . '" ../data/logo-100.png'); - system('convert -resize 200 "' . $_FILES['image']['tmp_name'] . '" ../data/logo-200.png'); - system('convert -resize 500 "' . $_FILES['image']['tmp_name'] . '" ../data/logo-500.png'); - system('convert "' . $_FILES['image']['tmp_name'] . '" ../data/logo.png'); - - if (file_exists('../data/logo-100.png') && file_exists('../data/logo-200.png') && file_exists('../data/logo-500.png') && file_exists('../data/logo.png')) - echo happy(i18n('PNG Images successfully created')); - else - echo error(i18n("Error creating PNG Image files. Make sure 'convert' binary is in your path, and that 'system' function can be used")); - - echo notice(i18n('Creating sized logo files:
     logo-100.jpg
     logo-200.jpg
     logo-500.jpg
     logo.jpg')); - // make some PNG's as well - system('convert -resize 100 "' . $_FILES['image']['tmp_name'] . '" ../data/logo-100.jpg'); - system('convert -resize 200 "' . $_FILES['image']['tmp_name'] . '" ../data/logo-200.jpg'); - system('convert -resize 500 "' . $_FILES['image']['tmp_name'] . '" ../data/logo-500.jpg'); - system('convert "' . $_FILES['image']['tmp_name'] . '" ../data/logo.jpg'); - - if (file_exists('../data/logo-100.jpg') && file_exists('../data/logo-200.jpg') && file_exists('../data/logo-500.jpg') && file_exists('../data/logo.jpg')) - echo happy(i18n('JPG Images successfully created')); - else - echo error(i18n("Error creating JPG Image files. Make sure 'convert' binary is in your path, and that 'system' function can be used")); - } else { - echo error(i18n('Logo Image must be JPG, GIF or PNG')); - } - } else - echo error(i18n('Error uploading Logo Image') . ': ' . $_FILES['image']['error']); -} - -if (get_value_from_array($_POST, 'action') == 'delimage') { - @unlink('../data/logo.gif'); - @unlink('../data/logo-100.gif'); - @unlink('../data/logo-200.gif'); - @unlink('../data/logo-500.gif'); - @unlink('../data/logo.png'); - @unlink('../data/logo-100.png'); - @unlink('../data/logo-200.png'); - @unlink('../data/logo-500.png'); - @unlink('../data/logo.jpg'); - @unlink('../data/logo-100.jpg'); - @unlink('../data/logo-200.jpg'); - @unlink('../data/logo-500.jpg'); - - echo happy(i18n('Deleted any existing logo files')); -} - -echo '
    '; -echo "\n"; -echo ''; -if (file_exists('../data/logo.gif')) { - echo ''; - echo ''; -} -if (file_exists('../data/logo.png')) { - echo ''; - echo ''; -} -if (file_exists('../data/logo.jpg')) { - echo ''; - echo ''; -} -echo ''; -echo '
    ' . i18n('GIF Images') . '
    '; - echo ''; - echo ''; - echo '', i18n('Original size') . '
    '; - echo '' . i18n('100 Pixel width') . '
    '; - echo '' . i18n('200 Pixel width') . '
    '; - echo '500 Pixel width
    '; - echo '
    ' . i18n('PNG Images') . '
    '; - echo ''; - echo ''; - echo '', i18n('Original size') . '
    '; - echo '' . i18n('100 Pixel width') . '
    '; - echo '' . i18n('200 Pixel width') . '
    '; - echo '500 Pixel width
    '; - echo '
    ' . i18n('JPG Images') . '
    '; - echo ''; - echo ''; - echo '', i18n('Original size') . '
    '; - echo '' . i18n('100 Pixel width') . '
    '; - echo '' . i18n('200 Pixel width') . '
    '; - echo '500 Pixel width
    '; - echo '
    '; -echo ''; -echo '\n"; -echo '
    '; -echo '
    '; - -if (file_exists('../data/logo.gif') || file_exists('../data/logo.png') || file_exists('../data/logo.jpg')) { - echo '
    '; - echo '
    '; - echo "\n"; - echo '\n"; - echo '
    '; -} - -send_footer(); -?> diff --git a/config/index.php b/config/index.php deleted file mode 100644 index b72f8f6c..00000000 --- a/config/index.php +++ /dev/null @@ -1,79 +0,0 @@ - - * Copyright (C) 2005-2008 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php'), - 'configuration'); - -echo ''; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo "
    "; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo " \n"; -echo "
    "; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo " \n"; -echo "
    ' . theme_icon('configuration_variables') . '
    ' . i18n('Configuration Variables') . '
    ' . theme_icon('important_dates') . '
    ' . i18n('Important Dates') . '
    ' . theme_icon('project_age_categories') . '
    ' . i18n('Project Age Categories') . '
    ' . theme_icon('project_divisions') . '
    ' . i18n('Project Divisions') . '
    ' . theme_icon('cwsf_project_divisions') . '
    ' . i18n('CWSF Project Divisions') . '
    ' . theme_icon('project_sub_divisions') . '
    ' . i18n('Project Sub-Divisions') . '
    ' . theme_icon('page_texts') . '
    ' . i18n('Page Texts') . '
    ' . theme_icon('exhibitor_signature_page') . '
    ' . i18n("Exhibitor $participationform") . '
    ' . theme_icon('judge_registration_questions') . '
    ' . i18n('Judge Registration Questions') . '
    ' . theme_icon('project_safety_questions') . '
    ' . i18n('Project Safety Questions') . '
    ' . theme_icon('images') . '
    ' . i18n('Images (Fair Logo)') . '
    \n"; -echo '
    '; -/* echo ''; -echo ' '; -echo ' '; -echo ' '; -echo " \n"; -echo " \n"; -echo ' '; -echo "
    ' . theme_icon('language_pack_installer') . '
    ' . i18n('Language Pack Installer') . '
    ' . theme_icon('new_version_checker') . '
    ' . i18n('New Version Checker') . '
    \n"; -echo '
    '; */ -echo ''; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo " \n"; - -echo ' '; -echo "
    ' . theme_icon('rollover_fair_year') . '
    ' . i18n('Rollover Fair Year') . '
    ' . theme_icon('rollover_fiscal_year') . '
    ' . i18n('Rollover Fiscal Year') . '
    ' . theme_icon('backup_restore') . '
    ' . i18n('Database Backup/Restore') . '
    \n"; - -send_footer(); -?> diff --git a/config/judges_questions.php b/config/judges_questions.php deleted file mode 100644 index 8454ea87..00000000 --- a/config/judges_questions.php +++ /dev/null @@ -1,39 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'judge_registration_questions'); - -questions_editor('judgereg', $config['FAIRYEAR'], 'question', - $_SERVER['PHP_SELF']); - -send_footer(); -?> diff --git a/config/languagepacks.php b/config/languagepacks.php deleted file mode 100644 index e85b1f0e..00000000 --- a/config/languagepacks.php +++ /dev/null @@ -1,120 +0,0 @@ - - * Copyright (C) 2006 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'language_pack_installer'); - -echo i18n("Checking for language packs will access a remote server, if you wish to continue click the 'Check for available language packs' link below"); -echo '
    '; -echo '
    '; -echo '' . i18n('Check for available language packs') . '
    '; - -function loadLanguagePacks() -{ - $ret = array(); - // // FIXME Replace! - // if($packs=file("http://www.sfiab.ca/languages/langpacklist.txt")) - if (false) { - $num = count($packs); - // format of each line is: - // lang:filename:lastupdate - if (count($packs)) { - foreach ($packs AS $p) { - list($langpack, $filename, $lastupdate) = explode("\t", trim($p)); - $ret[$langpack] = array('lang' => $langpack, 'filename' => $filename, 'lastupdate' => $lastupdate); - } - } - } else { - echo error(i18n('There was an error connecting to the language pack server')); - } - return $ret; -} - -if (get_value_from_array($_GET, 'action') == 'check') { - $packs = loadLanguagePacks(); - - $num = count($packs); - echo '
    '; - echo i18n('Found %1 available language pack(s)', array($num)); - // format of each line is: - // lang:filename:lastupdate - if (count($packs)) { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - foreach ($packs AS $p) { - echo ""; - echo ''; - echo ''; - } - echo '
    ' . i18n('Language') . '' . i18n('Filename') . '' . i18n('Last Update') . '' . i18n('Install') . '
    {$p['lang']}{$p['filename']}{$p['lastupdate']}'; - echo "" . i18n('Install') . ''; - echo '
    '; - } -} - -if (get_value_from_array($_GET, 'action') == 'install' && get_value_from_array($_GET, 'install')) { - $packs = loadLanguagePacks(); - $loaded = 0; - if ($packs[$_GET['install']]) { - $lines = file("http://www.sfiab.ca/languages/?"); - $totallines = count($lines); - $numtranslations = round($totallines / 2); - echo i18n('There are %1 translations in this language pack... processing...', array($numtranslations)); - if (count($lines)) { - foreach ($lines AS $line) { - $line = trim($line); - - if (substr($line, 0, 6) == 'UPDATE' || substr($line, 0, 6) == 'INSERT') { - $stmt = $pdo->prepare($line); - $stmt->execute([$packs[$_GET['install']]['filename']]); - $a = $pdo->rowwCount(); - $loaded += $a; - } else - echo notice('Ignoring invalid language pack line: %1', array($l)); - } - if ($loaded == 0) - echo notice(i18n('You already have all of the translations in this language pack')); - else - echo happy(i18n('Successfully loaded %1 new translations', array($loaded))); - } else { - echo error(i18n('Error downloading language pack')); - } - } else { - echo error(i18n('Invalid language pack to install')); - } -} - -send_footer(); -?> diff --git a/config/pagetexts.php b/config/pagetexts.php deleted file mode 100644 index 62946565..00000000 --- a/config/pagetexts.php +++ /dev/null @@ -1,161 +0,0 @@ - - Copyright (C) 2008 James Grant - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation, version 2. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php') - ,"page_texts" - ); - - $q = $pdo->prepare("SELECT * FROM pagetext WHERE year='-1' ORDER BY textname"); - $q->execute(); - - while($r=$q->fetch(PDO::FETCH_OBJ)) - { - foreach($config['languages'] AS $lang=>$langname) { - $q_current = $pdo->prepare("SELECT * FROM pagetext WHERE year=? and textname=?"); - $q_current->execute([$pdo->quote($config['FAIRYEAR']),$pdo->quote($r->textname)]); - - if ($q_current->rowCount() == 0) { - $q1 = $pdo->prepare("INSERT INTO pagetext (`textname`,`textdescription`,`text`,`year`,`lang`) VALUES ( - ?, - ?, - ?, - ?, - ?)"); - - $q1->execute([$pdo->quote($r->textname),$pdo->quote($r->textdescription),$pdo->quote($r->text), - $pdo->quote($config['FAIRYEAR']),$pdo->quote($lang)]); - } - } - } - - - if(get_value_from_array($_POST, 'action')=="save") - { - foreach($config['languages'] AS $lang=>$langname) { - $textvar="text_$lang"; - $text=$pdo->quote(stripslashes($_POST[$textvar])); - - $stmt = $pdo->prepare("UPDATE pagetext - SET - lastupdate=NOW(), - text=? - WHERE - textname=? - AND year=? - AND lang=?"); - $stmt->execute([$text,$pdo->quote($_POST['textname']),$config['FAIRYEAR'],$lang]); - } - echo happy(i18n("Page texts successfully saved")); - - } - - if(get_value_from_array($_GET, 'textname')) - { - $q=$pdo->prepare("SELECT * FROM pagetext WHERE textname=? AND year=?"); - $q->execute([$_GET['textname'],$config['FAIRYEAR']]); - //needs to be at least one entry in any languages - if($r=$q->fetch(PDO::FETCH_OBJ)) - { - echo "
    "; - echo "\n"; - echo "textname\">\n"; - - - foreach($config['languages'] AS $lang=>$langname) { - $q=$pdo->prepare("SELECT * FROM pagetext WHERE textname=? AND year=? AND lang=?"); - $q->execute([$_GET['textname'],$config['FAIRYEAR'],$lang]); - $r=$q->fetch(PDO::FETCH_OBJ); - - if(!$r) - { - $stmt = $pdo->prepare("INSERT INTO pagetext (textname,year,lang) VALUES (?,?,?)"); - $stmt->execute([$pdo->quote($_GET['textname']),$config['FAIRYEAR'],$lang]); - show_pdo_errors_if_any($pdo); - } - - if($r->lastupdate=="0000-00-00 00:00:00" || !$r->lastupdate) $lastupdate="Never"; - else $lastupdate=$r->lastupdate; - echo "".htmlspecialchars($_GET['textname'])." - $langname    ".i18n("Last updated").": $lastupdate
    "; - require_once("../fckeditor/fckeditor.php"); - - $oFCKeditor = new FCKeditor("text_$lang") ; - $oFCKeditor->BasePath = "../fckeditor/"; - $oFCKeditor->Value = $r->text; - $oFCKeditor->Width="100%"; - $oFCKeditor->Height=300; - $oFCKeditor->Create() ; - - echo "
    "; - } - - echo "
    "; - echo "\n"; - echo ""; - echo ""; - echo "
    "; - echo "\n"; - echo "
    \n"; - echo "
    \n"; - - } - else - { - echo error(i18n("Invalid text name")); - } - } - else - { - echo "
    "; - echo i18n("Choose a page text to edit"); - echo ""; - - $q=$pdo->prepare("SELECT * FROM pagetext WHERE year=? AND lang=? ORDER BY textname"); - $q->execute([$config['FAIRYEAR'],$config['default_language']]); - echo ""; - while($r=$q->fetch(PDO::FETCH_OBJ)) - { - echo ""; - if($r->lastupdate=="0000-00-00 00:00:00") $lastupdate="Never"; - else $lastupdate=$r->lastupdate; - echo ""; - echo ""; - - - } - echo "
    ".i18n("Page Text Description")."".i18n("Last Update")."
    textname\">$r->textdescription$lastupdate
    "; - } - - send_footer(); -?> diff --git a/config/rollover.php b/config/rollover.php deleted file mode 100644 index a61fe54c..00000000 --- a/config/rollover.php +++ /dev/null @@ -1,363 +0,0 @@ - - * Copyright (C) 2005-2009 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'rollover_fair_year'); -?> - - - prepare("SHOW COLUMNS IN $table"); - $q->execute(); - show_pdo_errors_if_any($pdo); - while (($c = $q->fetch(PDO::FETCH_ASSOC))) { - $col[$c['Field']] = $c; - } - - /* Record fields we care about */ - $fields = array(); - $keys = array_keys($col); - foreach ($keys as $k) { - /* Skip id field */ - if ($col[$k]['Extra'] == 'auto_increment') - continue; - /* Skip year field */ - if ($k == 'year') - continue; - - $fields[] = $k; - } - - if ($where == '') - $where = '1'; - - /* Get data */ - $q = $pdo->prepare("SELECT * FROM $table WHERE year=? AND $where"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - $names = '`' . join('`,`', $fields) . '`'; - - /* Process data */ - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $vals = ''; - foreach ($fields as $f) { - if (array_key_exists($f, $replace)) - $vals .= ',' . $pdo->quote($replace[$f]); - else if ($col[$f]['Null'] == 'YES' && $r[$f] == NULL) - $vals .= ',NULL'; - else - $vals .= ',' . $pdo->quote($r[$f]); - } - - $stmt = $pdo->prepare("INSERT INTO `$table` (`year`,?) VALUES (?,?)"); - $stmt->execute([$names,$newfairyear,$vals]); - show_pdo_errors_if_any($pdo); - } -} - -if (get_value_from_array($_POST, 'action') == 'rollover' && get_value_from_array($_POST, 'nextfairyear')) { - $newfairyear = intval(get_value_from_array($_POST, 'nextfairyear')); - $currentfairyear = intval($config['FAIRYEAR']); - - $cy = $currentfairyear; - $ny = $newfairyear; - - if ($newfairyear < $currentfairyear) - echo error(i18n('You cannot roll backwards in years!')); - else if ($newfairyear == $currentfairyear) - echo error(i18n('You cannot roll to the same year!')); - else { - // okay here we go! this is going to get to be a pretty big script me thinks! - - // first, lets do all of the configuration variables - echo i18n('Rolling configuration variables') . '
    '; - config_update_variables($newfairyear, $currentfairyear); - - // now the dates - echo i18n('Rolling dates') . '
    '; - $q = $pdo->prepare("SELECT DATE_ADD(date,INTERVAL 365 DAY) AS newdate,name,description FROM dates WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO dates (date,name,description,year) VALUES ( - ?, - ?, - ?, - ?)"); - $stmt->execute([$r->newdate,$r->name,$r->description,$newfairyear]); - show_pdo_errors_if_any($pdo); - } - - // page text - echo i18n('Rolling page texts') . '
    '; - $q = $pdo->prepare("SELECT * FROM pagetext WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO pagetext (textname,textdescription,text,lastupdate,year,lang) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?)"); - $stmt->execute([$r->textname,$r->textdescription,$r->text,$r->lastupdate,$newfairyear,$r->lang]); - show_pdo_errors_if_any($pdo); - } - - echo i18n('Rolling project categories') . '
    '; - // project categories - $q = $pdo->prepare("SELECT * FROM projectcategories WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO projectcategories (id,category,category_shortform,mingrade,maxgrade,year) VALUES ( - ?, - ?, - ?, - ?, - ?, - ?)"); - $stmt->execute([$r->id,$r->category,$r->category_shortform,$r->mingrade,$r->maxgrade,$newfairyear]); - show_pdo_errors_if_any($pdo); - } - - echo i18n('Rolling project divisions') . '
    '; - // project divisions - $q = $pdo->prepare("SELECT * FROM projectdivisions WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO projectdivisions (id,division,division_shortform,cwsfdivisionid,year) VALUES ( - ?, - ?, - ?, - ?, - ?)"); - $stmt->execute([$r->id,$r->division,$r->division_shortform,$r->cwsfdivisionid,$newfairyear]); - show_pdo_errors_if_any($pdo); - } - - echo i18n('Rolling project category-division links') . '
    '; - // project categories divisions links - $q = $pdo->prepare("SELECT * FROM projectcategoriesdivisions_link WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO projectcategoriesdivisions_link (projectdivisions_id,projectcategories_id,year) VALUES ( - ?, - ?, - ?)"); - $stmt->execute([$r->projectdivisions_id,$r->projectcategories_id ,$newfairyear]); - show_pdo_errors_if_any($pdo); - } - - echo i18n('Rolling project sub-divisions') . '
    '; - // project subdivisions - $q = $pdo->prepare("SELECT * FROM projectsubdivisions WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO projectsubdivisions (id,projectdivisions_id,subdivision,year) VALUES ( - ?, - ?, - ?, - ?)"); - $stmt->execute([$r->id,$r->projectsubdivisions_id,$r->subdivision,$newfairyear]); - show_pdo_errors_if_any($pdo); - } - - echo i18n('Rolling safety questions') . '
    '; - // safety questions - $q = $pdo->prepare("SELECT * FROM safetyquestions WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO safetyquestions (question,type,required,ord,year) VALUES ( - ?, - ?, - ?, - ?, - ?"); - $stmt->execute([$r->question,$r->type,$r->required ,$r->ord,$newfairyear]); - show_pdo_errors_if_any($pdo); - } - - echo i18n('Rolling awards') . '
    '; - // awards - - $q = $pdo->prepare("SELECT * FROM award_awards WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - /* Roll the one award */ - roll($cy, $ny, 'award_awards', "id='{$r->id}'"); - $award_awards_id = $pdo->lastInsertId(); - - roll($cy, $ny, 'award_awards_projectcategories', "award_awards_id='{$r->id}'", - array('award_awards_id' => $award_awards_id)); - - roll($cy, $ny, 'award_awards_projectdivisions', "award_awards_id='{$r->id}'", - array('award_awards_id' => $award_awards_id)); - echo i18n('  Rolling award prizes') . '
    '; - roll($cy, $ny, 'award_prizes', "award_awards_id='{$r->id}'", - array('award_awards_id' => $award_awards_id)); - } - - echo i18n('Rolling award types') . '
    '; - // award types - $q = $pdo->prepare("SELECT * FROM award_types WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO award_types (id,type,`order`,year) VALUES ( - ?, - ?, - ?, - ?)"); - $stmt->execute([$r->id,$r->type,$r->order,$newfairyear]); - show_pdo_errors_if_any($pdo); - } - - echo i18n('Rolling schools') . '
    '; - // award types - $q = $pdo->prepare("SELECT * FROM schools WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $puid = ($r->principal_uid == null) ? 'NULL' : ("'" . intval($r->principal_uid) . "'"); - $shuid = ($r->sciencehead_uid == null) ? 'NULL' : ("'" . intval($r->sciencehead_uid) . "'"); - - $stmt = $pdo->prepare('INSERT INTO schools (school, schoollang, schoollevel, board, district, phone, fax, address, city, province_code, postalcode, principal_uid, schoolemail, sciencehead_uid, accesscode, lastlogin, junior, intermediate, senior, registration_password, projectlimit, projectlimitper, year) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, ?, ?, ?, ?, ?, ?, ?)'); - $stmt->execute([$r->school, $r->schoollang, $r->schoollevel, $r->board, $r->district, $r->phone, $r->fax, $r->address, $r->city, $r->province_code, $r->postalcode, $puid, $r->schoolemail, $shuid, $r->accesscode, $r->junior, $r->intermediate, $r->senior, $r->registration_password, $r->projectlimit, $r->projectlimitper, $newfairyear]); - - show_pdo_errors_if_any($pdo); - } - - echo i18n('Rolling questions') . '
    '; - $q = $pdo->prepare("SELECT * FROM questions WHERE year=?"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $stmt = $pdo->prepare("INSERT INTO questions (id, year, section, db_heading, question, type, required, ord) VALUES ('', ?, ?, ?, ?, ?, ?, ?)"); - $stmt->execute([$newfairyear, $r->section, $r->db_heading, $r->question, $r->type, $r->required, $r->ord]); - - show_pdo_errors_if_any($pdo); - } - - // regfee items - echo i18n('Rolling registration fee items') . '
    '; - roll($cy, $ny, 'regfee_items'); - - // volunteer positions - echo i18n('Rolling volunteer positions') . '
    '; - roll($cy, $ny, 'volunteer_positions'); - - // timeslots and rounds - echo i18n('Rolling judging timeslots and rounds') . '
    '; - $q = $pdo->prepare("SELECT * FROM judges_timeslots WHERE year=? AND round_id='0'"); - $q->execute([$currentfairyear]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $d = $newfairyear - $currentfairyear; - $stmt = $pdo->prepare("INSERT INTO judges_timeslots (`year`,`round_id`,`type`,`date`,`starttime`,`endtime`,`name`) - VALUES (?,'0',?,DATE_ADD(?, INTERVAL ? YEAR), - ?,?,?)"); - $stmt->execute([$newfairyear,$r['type'],$r['date'],$d,$r['starttime'],$r['endtime'],$r['name']]); - show_pdo_errors_if_any($pdo); - $round_id = $pdo->lastInsertId(); - $qq = $pdo->prepare("SELECT * FROM judges_timeslots WHERE round_id=?"); - $qq->execute([$r['id']]); - show_pdo_errors_if_any($pdo); - while ($rr = $qq->fetch(PDO::FETCH_ASSOC)) { - $stmt = $pdo->prepare("INSERT INTO judges_timeslots (`year`,`round_id`,`type`,`date`,`starttime`,`endtime`) - VALUES (?,?,'timeslot',DATE_ADD(?, INTERVAL ? YEAR), - ?,?)"); - $stmt->execute([$newfairyear,$round_id,$rr['date'],$d,$rr['starttime'],$rr['endtime']]); - show_pdo_errors_if_any($pdo); - } - } - - echo '

    '; - $stmt = $pdo->prepare("UPDATE config SET val=? WHERE var='FAIRYEAR' AND year=0"); - $stmt->execute([$newfairyear]); - show_pdo_errors_if_any($pdo); - echo happy(i18n('Fair year has been rolled over from %1 to %2', array($currentfairyear, $newfairyear))); - send_footer(); - exit; - } -} - -echo '
    '; -echo '' . i18n('You should consider making a database backup before rolling over, just in case!') . "
    \n"; -echo '
    '; -echo '
    '; -echo ''; -echo i18n('Current Fair Year') . ': ' . $config['FAIRYEAR'] . '
    '; -$nextfairyear = $config['FAIRYEAR'] + 1; -echo i18n('Next Fair Year') . ": "; -echo '
    '; -echo ''; -echo '
    '; - -send_footer(); -?> diff --git a/config/rolloverfiscal.php b/config/rolloverfiscal.php deleted file mode 100644 index 8d5401e6..00000000 --- a/config/rolloverfiscal.php +++ /dev/null @@ -1,162 +0,0 @@ - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'rollover_fiscal_year'); -draw_body(); -send_footer(); -exit; - -function draw_body() -{ - global $config; - ?> - - -'; - echo '' . i18n('You should consider making a database backup before rolling over, just in case!') . "
    \n"; - echo '
    '; - echo '
    '; - echo i18n('Current Fiscal Year') . ': ' . $config['FISCALYEAR'] . '
    '; - $nextfiscalyear = $config['FISCALYEAR'] + 1; - echo i18n('Next Fiscal Year') . ": "; - echo '
    '; - echo ''; - echo '
    '; - echo '
    '; -} - -function rolloverfiscalyear($newYear) -{ - global $config, $pdo; - $oldYear = $config['FISCALYEAR']; - $yearDiff = $newYear - $oldYear; - - // first we'll roll over fundraising_campaigns: - $fields = '`name`,`type`,`startdate`,`enddate`,`followupdate`,`active`,`target`,`fundraising_goal`,`filterparameters`'; - $q = $pdo->prepare("SELECT $fields FROM fundraising_campaigns WHERE fiscalyear =?"); - $q->execute([$oldYear]); - - while ($pdo->errorInfo()[0] == 0 && $r = $q->fetch(PDO::FETCH_ASSOC)) { - foreach (array('startdate', 'enddate', 'followupdate') as $dateField) { - $dateval = $r[$dateField]; - $parts = explode('-', $dateval); - if ($parts[0] != '0000') - $parts[0] += $yearDiff; - $r[$dateField] = implode('-', $parts); - } - $r['fiscalyear'] = $newYear; - - $fields = array_keys($r); - $values = array_values($r); - foreach ($values as $idx => $val) { - $values[$idx] = $val; - } - $query = 'INSERT INTO fundraising_campaigns (`' . implode('`,`', $fields) . "`) VALUES(?)"; - $stmt = $pdo->prepare($query); - $stmt->execute([implode("','", $values)]); - } - - // next we'll hit findraising_donor_levels - $fields = '`level`,`min`,`max`,`description`'; - if ($pdo->errorInfo()[0] == 0) - $q = $pdo->prepare("SELECT $fields FROM fundraising_donor_levels WHERE fiscalyear =?"); - $q->execute([$oldYear]); - while ($pdo->errorInfo()[0] == 0 && $r = $q->fetch(PDO::FETCH_ASSOC)) { - $r['fiscalyear'] = $newYear; - $fields = array_keys($r); - $values = array_values($r); - foreach ($values as $idx => $val) { - $values[$idx] = $val; - } - $query = 'INSERT INTO fundraising_donor_levels (`' . implode('`,`', $fields) . "`) VALUES(?)"; - $stmt = $pdo->prepare($query); - $stmt->execute([implode("','", $values)]); - } - - // and now we'll do findraising_goals - $fields = '`goal`,`name`,`description`,`system`,`budget`,`deadline`'; - if ($pdo->errorInfo()[0] == 0) { - $q = $pdo->prepare("SELECT ? FROM fundraising_goals WHERE fiscalyear =?"); - $q->execute([$fields,$oldYear]); - } - while ($pdo->errorInfo()[0] == 0 && $r = $q->fetch(PDO::FETCH_ASSOC)) { - $dateval = $r['deadline']; - $parts = explode('-', $dateval); - if ($parts[0] != '0000') - $parts[0] += $yearDiff; - $r['deadline'] = implode('-', $parts); - - $r['fiscalyear'] = $newYear; - - $fields = array_keys($r); - $values = array_values($r); - foreach ($values as $idx => $val) { - $values[$idx] = $val; - } - $query = 'INSERT INTO fundraising_goals (`' . implode('`,`', $fields) . "`) VALUES(?)"; - $stmt = $pdo->prepare($query); - $stmt->execute([implode("','", $values)]); - } - - // finally, let's update the fiscal year itself: - if ($pdo->errorInfo()[0] == 0) { - $stmt = $pdo->prepare("UPDATE config SET val=? WHERE var='FISCALYEAR'"); - $stmt->execute([$newYear]); - } - - if ($pdo->errorInfo()[0] == 0) { - $config['FISCALYEAR'] = $newYear; - echo happy(i18n('Fiscal year has been rolled over from %1 to %2', array($oldYear, $newYear))); - } else { - echo error($pdo->errorInfo()[0]); - } -} diff --git a/config/safetyquestions.php b/config/safetyquestions.php deleted file mode 100644 index 05ca0acb..00000000 --- a/config/safetyquestions.php +++ /dev/null @@ -1,176 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'project_safety_questions'); -if (get_value_from_array($_POST, 'action') == 'save' && get_value_from_array($_POST, 'save')) { - if ($_POST['question']) { - if (!preg_match('/^[0-9]*$/', $_POST['ord'])) - echo notice(i18n('Defaulting non-numeric order value %1 to 0', array($_POST['ord']))); - - $stmt = $pdo->prepare("UPDATE safetyquestions SET - question=?, - `type`=?, - `required`=?, - ord=? - WHERE id=? AND year=?"); - $stmt->execute([stripslashes($_POST['question']),stripslashes($_POST['type']),stripslashes($_POST['required']), - stripslashes($_POST['ord']),$_POST['save'],$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - - echo happy(i18n('Safety question successfully saved')); - } else - echo error(i18n('Question is required')); -} - -if (get_value_from_array($_POST, 'action') == 'new') { - - if ($_POST['ord'] == ''){ - $_POST['ord'] = 0; - } - - if ($_POST['question']) { - $stmt = $pdo->prepare("INSERT INTO safetyquestions (question,type,required,ord,year) VALUES ( - ?, - ?, - ?, - ?, - ? - )"); - $stmt->execute([stripslashes($_POST['question']),stripslashes($_POST['type']),stripslashes($_POST['required']), - stripslashes($_POST['ord']),$config['FAIRYEAR'] ]); - show_pdo_errors_if_any($pdo); - - echo happy(i18n('Safety question successfully added')); - } else - echo error(i18n('Question is required')); -} - -if (get_value_from_array($_GET, 'action') == 'remove' && get_value_from_array($_GET, 'remove')) { - $stmt = $pdo->prepare("DELETE FROM safetyquestions WHERE id=? AND year=?"); - $stmt->execute([$_GET['remove'],$config['FAIRYEAR']]); - echo happy(i18n('Safety question successfully removed')); -} - -if ((get_value_from_array($_GET, 'action') == 'edit' && get_value_from_array($_GET, 'edit')) || get_value_from_array($_GET, 'action') == 'new') { - $showform = true; - echo '
    '; - if ($_GET['action'] == 'new') { - $buttontext = 'Add safety question'; - echo "\n"; - $r = null; - } else if ($_GET['action'] == 'edit') { - $buttontext = 'Save safety question'; - echo "\n"; - $q = $pdo->prepare("SELECT * FROM safetyquestions WHERE id=? AND year=?"); - $q->execute([$_GET['edit'],$config['FAIRYEAR'] ]); - echo '\n"; - if (!$r = $q->fetch(PDO::FETCH_OBJ)) { - $showform = false; - echo error(i18n('Invalid safety question')); - } - - } - - if ($showform) { - - - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo '
    ' . i18n('Question') . ''; - echo '\n"; - echo '
    ' . i18n('Type') . ''; - echo ''; - echo '
    ' . i18n('Required?') . ''; - echo ''; - echo '
    ' . i18n('Display Order') . ''; - echo '\n"; - echo '
    '; - echo '\n"; - echo '
    '; - echo '
    '; - echo '
    '; - echo '
    '; - } else { - } -} - -echo '
    '; -echo '' . i18n('Add new safety question') . ''; - -echo ''; -$q = $pdo->prepare("SELECT * FROM safetyquestions WHERE year=? ORDER BY ord"); -$q->execute([$config['FAIRYEAR']]); -echo ''; -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo ""; - echo ""; - echo ""; - echo ""; - echo ''; - echo ''; -} -echo '
    ' . i18n('Ord') . '' . i18n('Question') . '' . i18n('Type') . '' . i18n('Required') . '' . i18n('Actions') . '
    $r->ord$r->question$r->type$r->required'; - echo 'id\">'; - echo '   '; - echo 'id\">'; - - echo '
    '; - -send_footer(); -?> diff --git a/config/signaturepage.php b/config/signaturepage.php deleted file mode 100644 index 575d6162..00000000 --- a/config/signaturepage.php +++ /dev/null @@ -1,153 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'exhibitor_signature_page'); - -if (get_value_from_array($_POST, 'action') == 'save') { - if (get_value_from_array($_POST, 'useexhibitordeclaration')) - $useex = '1'; - else - $useex = '0'; - if (get_value_from_array($_POST, 'useparentdeclaration')) - $usepg = '1'; - else - $usepg = '0'; - if (get_value_from_array($_POST, 'useteacherdeclaration')) - $usete = '1'; - else - $usete = '0'; - if (get_value_from_array($_POST, 'usepostamble')) - $usepa = '1'; - else - $usepa = '0'; - if (get_value_from_array($_POST, 'useregfee')) - $userf = '1'; - else - $userf = '0'; - - $val = get_value_from_array($_POST, 'exhibitordeclaration'); - $stmt = $pdo->prepare("UPDATE signaturepage SET `use` = :useex, `text` = :text WHERE name = 'exhibitordeclaration'"); - $stmt->bindParam(':useex', $useex); - $stmt->bindParam(':text', $val); - $stmt->execute(); - - $val = get_value_from_array($_POST, 'exhibitordeclaration'); - $stmt = $pdo->prepare("UPDATE signaturepage SET `use` = :usepg, `text` = :text WHERE name = 'parentdeclaration'"); - $stmt->bindParam(':usepg', $usepg); - $stmt->bindParam(':text', $val); - $stmt->execute(); - - $stmt = $pdo->prepare("UPDATE signaturepage SET `use`=?, `text`=? WHERE name='postamble'"); - $stmt->execute([$usepa, get_value_from_array($_POST, 'postamble')]); - - $stmt = $pdo->prepare("UPDATE signaturepage SET `use`=?, `text`=? WHERE name='useteacherdeclaration'"); - $stmt->execute([$usete, get_value_from_array($_POST, 'useteacherdeclaration')]); - - $stmt = $pdo->prepare("UPDATE signaturepage SET `use`=?, `text`='' WHERE name='regfee'"); - $stmt->execute([$userf]); - echo happy(i18n("$sentence_begin_participationform text successfully saved")); -} - -echo 'Preview your signature form as a PDF (as a student would see it)
    '; -$q = $pdo->prepare("SELECT * FROM signaturepage WHERE name='exhibitordeclaration'"); -$q->execute(); -$r = $q->fetch(PDO::FETCH_OBJ); -echo '
    '; -echo "\n"; -if ($r->use) - $ch = 'checked="checked"'; -else - $ch = ''; -echo "" . i18n('Use the exhibitor declaration and obtain exhibitor signatures'); -echo '
    '; -echo ''; -echo '
    '; -echo '
    '; - -$q = $pdo->prepare("SELECT * FROM signaturepage WHERE name='parentdeclaration'"); -$q->execute(); -$r = $q->fetch(PDO::FETCH_OBJ); -if ($r->use) - $ch = 'checked="checked"'; -else - $ch = ''; -echo "" . i18n('Use the parent/guardian declaration and obtain parent/guardian signatures'); -echo '
    '; -echo ''; -echo '
    '; -echo '
    '; - -$q = $pdo->prepare("SELECT * FROM signaturepage WHERE name='teacherdeclaration'"); -$q->execute(); -$r = $q->fetch(PDO::FETCH_OBJ); - -if ($r->use) - $ch = 'checked="checked"'; -else - $ch = ''; -echo "" . i18n("Use the teacher declaration and obtain teacher's signature"); -echo '
    '; -echo ''; -echo '
    '; -echo '
    '; - -$q = $pdo->prepare("SELECT * FROM signaturepage WHERE name='regfee'"); -$q->execute(); -$r = $q->fetch(PDO::FETCH_OBJ); - -if ($r->use) - $ch = 'checked="checked"'; -else - $ch = ''; -echo "" . i18n("Include registration fee information on the $non_capital_participationform"); -echo '
    '; -echo '
    '; - -$q = $pdo->prepare("SELECT * FROM signaturepage WHERE name='postamble'"); -$q->execute(); -$r = $q->fetch(PDO::FETCH_OBJ); - -if ($r->use) - $ch = 'checked="checked"'; -else - $ch = ''; -echo "" . i18n('Place Additional Information after all the required signatures'); -echo '
    '; -echo ''; -echo '
    '; -echo '
    '; - -echo ''; -echo '
    '; - -send_footer(); -?> diff --git a/config/signaturepage_or_permissionform.php b/config/signaturepage_or_permissionform.php deleted file mode 100644 index 89e6b6fa..00000000 --- a/config/signaturepage_or_permissionform.php +++ /dev/null @@ -1,27 +0,0 @@ - \ No newline at end of file diff --git a/config/subdivisions.php b/config/subdivisions.php deleted file mode 100644 index c59f3f14..00000000 --- a/config/subdivisions.php +++ /dev/null @@ -1,171 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php', - 'Project Sub-Divisions' => 'config/subdivisions.php'), - 'project_sub_divisions'); -} else { - send_header('Project Sub-Divisions', - array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'project_sub_divisions'); -} - -if (get_value_from_array($_POST, 'action') == 'edit') { - if (get_value_from_array($_POST, 'id') && get_value_from_array($_POST, 'projectdivisions_id') && get_value_from_array($_POST, 'subdivision')) { - $q = $pdo->prepare("SELECT id FROM projectsubdivisions WHERE id=? AND year=?"); - $q->execute([$_POST['id'],$config['FAIRYEAR']]); - if ($q->rowCount() && $_POST['saveid'] != $_POST['id']) { - echo error(i18n('Sub-Division ID %1 already exists', array($_POST['id']))); - } else { - $stmt = $pdo->prepare('UPDATE projectsubdivisions SET ' - . "id=?, " - . "projectdivisions_id=?, " - . "subdivision=?" - . "WHERE id=?"); - $stmt->execute([$_POST['id'],$_POST['projectdivisions_id'],stripslashes($_POST['subdivision']),$_POST['saveid']]); - echo happy(i18n('Sub-Division successfully saved')); - } - } else { - echo error(i18n('All fields are required')); - } -} - -if (get_value_from_array($_POST, 'action') == 'new') { - if (get_value_from_array($_POST, 'projectdivisions_id') && get_value_from_array($_POST, 'subdivision')) { - if (!$_POST['id']) { - $idq = $pdo->prepare('SELECT MAX(id) AS id FROM projectsubdivisions'); - $idq->execute(); - $idr = $idq->fetch(PDO::FETCH_OBJ); - $newid = $idr->id + 1; - } else - $newid = $_POST['id']; - - $q = $pdo->prepare("SELECT id FROM projectsubdivisions WHERE id=? AND year=?"); - $q->execute([$newid,$config['FAIRYEAR']]); - if ($q->rowCount()) { - echo error(i18n('Sub-Division ID %1 already exists', array($newid))); - } else { - $stmt = $pdo->prepare('INSERT INTO projectsubdivisions (id,projectdivisions_id,subdivision,year) VALUES (?,?,?,?) '); - $stmt->execute([$newid,$_POST['projectdivisions_id'],stripslashes($_POST['subdivision']),$config['FAIRYEAR']]); - echo happy(i18n('Sub-Division successfully added')); - } - } else { - echo error(i18n('All fields except ID are required')); - } -} - -if (get_value_from_array($_GET, 'action') == 'remove' && get_value_from_array($_GET, 'remove')) { - $stmt = $pdo->prepare("DELETE FROM projectsubdivisions WHERE id=?"); - $stmt->execute([$_GET['remove']]); - echo happy(i18n('Sub-Division successfully removed')); -} - -echo '
    '; - -if (!(get_value_from_array($_GET, 'action') == 'edit' || get_value_from_array($_GET, 'action') == 'new')) - echo '' . i18n('Add new sub-division') . "\n"; - -echo ''; -echo ''; -echo '\n"; -echo '\n"; -echo '\n"; -echo '\n"; -echo ''; - -if (get_value_from_array($_GET, 'action') == 'edit' || get_value_from_array($_GET, 'action') == 'new') { - echo '\n"; - $divisionr = array(); - if (get_value_from_array($_GET, 'action') == 'edit') { - echo '\n"; - $q = $pdo->prepare("SELECT * FROM projectsubdivisions WHERE id=? AND year=?"); - $q->execute([get_value_from_array($_GET, 'edit'),$config['FAIRYEAR']]); - $divisionr = $q->fetch(PDO::FETCH_OBJ); - $buttontext = 'Save'; - } else if ($_GET['action'] == 'new') { - $buttontext = 'Add'; - } - echo ''; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - $dq->execute(); - echo ''; -} else { - $q = $pdo->prepare("SELECT projectsubdivisions.id, -\t \t\t\tprojectsubdivisions.projectdivisions_id, - projectsubdivisions.subdivision, - projectdivisions.division - FROM - projectsubdivisions, - projectdivisions - WHERE - projectsubdivisions.year=? - AND projectdivisions.year=? - AND projectsubdivisions.projectdivisions_id=projectdivisions.id - ORDER BY - division,subdivision"); - $q->execute([$config['FAIRYEAR'],$config['FAIRYEAR']]); - show_pdo_errors_if_any($pdo); - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - echo ''; - echo " "; - echo " "; - echo " "; - echo ' '; - echo ''; - } -} -echo '
    ' . i18n('Parent Division') . "' . i18n('ID') . "' . i18n('Sub-Division') . "' . i18n('Actions') . "
    '; - echo ''; - echo '
    $r->division$r->id$r->subdivision'; - echo 'id\">'; - echo '   '; - echo 'id\">'; - echo '
    '; -if (get_value_from_array($_GET, 'action') == 'new') - echo '         ' . i18n('Leave ID field blank to auto-assign next available ID'); -echo '
    '; - -send_footer(); -?> diff --git a/config/variables.php b/config/variables.php deleted file mode 100644 index 533a642b..00000000 --- a/config/variables.php +++ /dev/null @@ -1,127 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT * FROM config WHERE year='-1'"); -$q->execute(); - -/* FIXME Re-incorporate -while ($r = $q->fetch(PDO::FETCH_OBJ)) { - $q = $pdo->prepare('INSERT INTO config (var,val,category,`type`,type_values,ord,`description`,`year`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)'); - //$q->execute([$r->var, $r->val, $r->category, $r->type, $r->type_values, $r->ord, $r->description, $config['FAIRYEAR']]); -}*/ - -// for the Special category -if (get_value_from_array($_POST, 'action') == 'save') { - if (get_value_from_array($_POST, 'specialconfig')) { - foreach ($_POST['specialconfig'] as $key => $val) { - $stmt = $pdo->prepare("UPDATE config SET val=? WHERE year='0' AND var=?"); - $stmt->execute([stripslashes($val), $key]); - } - } - message_push(happy(i18n('Configuration successfully saved'))); -} - -// get the category, and if nothing is chosen, default to Global -if (get_value_from_array($_GET, 'category')) - $category = $_GET['category']; -else if (get_value_from_array($_POST, 'category')) - $category = $_POST['category']; -else - $category = 'Global'; - -$action = config_editor_handle_actions($category, $config['FAIRYEAR'], 'var'); -if ($action == 'update') { - header("Location: variables.php?category=$category"); - exit; -} - -send_header('Configuration Variables', - array('Committee Main' => 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'configuration_variables'); - -$q = $pdo->prepare('SELECT DISTINCT(category) AS cat FROM config ORDER BY cat'); -$q->execute(); -echo "\n"; - -echo '
    '; -echo ''; -$trclass = 'odd'; -while ($r = $q->fetch(PDO::FETCH_ASSOC)) { - $trclass = ($trclass == 'odd') ? 'even' : 'odd'; - echo ""; - echo ''; - echo "\n"; -} -echo '
    '; - if ($r['cat'] == $category) - echo '' . i18n($r['cat']) . ''; - else - echo '' . i18n($r['cat']) . ''; - echo '
    '; - -echo '
    '; - -if ($category) { - if ($category == 'Special') { - echo '

    ' . i18n('Special Configuration Settings') . '

    '; - echo '
    '; - echo "\n"; - echo "\n"; - echo ''; - $q = $pdo->prepare('SELECT * FROM config WHERE year=0 ORDER BY var'); - $q->execute(); - echo ''; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($r->var == 'FAIRYEAR' || $r->var == 'DBVERSION' || $r->var == 'FISCALYEAR') { - echo ""; - } else { - echo ""; - } - } - echo '
    '; - echo i18n('Warning, modifying values on this configuration variables page could cause your SFIAB to stop working. Only change anything on this page if you really know what you are doing'); - echo '
    $r->var - " . i18n($r->description) . "$r->val
    $r->var - " . i18n($r->description) . "var]\" value=\"$r->val\" />
    '; - echo '\n"; - echo '
    '; - } else { - // echo "

    ".i18n("Configuration settings ftegory']or fair year %1",array($config['FAIRYEAR']),array("fair year"))."

    "; - echo '

    ' . i18n($category) . " ({$config['FAIRYEAR']})

    "; - - config_editor($category, $config['FAIRYEAR'], 'var', $_SERVER['PHP_SELF']); - } -} else { - echo i18n('Please choose a configuration category'); -} - -echo '
    '; - -send_footer(); -?> diff --git a/config/versionchecker.php b/config/versionchecker.php deleted file mode 100644 index f4030aaf..00000000 --- a/config/versionchecker.php +++ /dev/null @@ -1,72 +0,0 @@ - - * Copyright (C) 2006 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - 'committee_main.php', - 'SFIAB Configuration' => 'config/index.php'), - 'new_version_checker'); - -echo i18n("Checking for new versions will access a remote server, if you wish to continue click the 'Check for new versions' link below"); -echo '
    '; -echo '
    '; -echo i18n('Your currently installed version: %1', array($config['version'])); -echo '
    '; - -function loadVersions() -{ - $ret = array(); - // FIXME Replace - // if($v=file("http://www.sfiab.ca/version.txt")) - if (false) { - list($version, $date) = explode("\t", trim($v[0])); - $ret['version'] = $version; - $ret['date'] = $date; - } else - echo error(i18n('There was an error connecting to the version checker server')); - return $ret; -} - -if (get_value_from_array($_GET, 'action') == 'check') { - $v = loadVersions(); - echo i18n('Newest version available: %1 (%2)', array(get_value_from_array($v, 'version'), get_value_from_array($v, 'date'))); - echo '
    '; - echo '
    '; - $val = version_compare(get_value_from_array($config, 'version', ''), get_value_from_array($v, 'version', ' ')); - if ($val == 0) { - echo happy(i18n('Your current version (%1) is up-to-date', array($config['version']))); - } else if ($val < 0) { - echo error(i18n('There is a new version available!
    Newest version: %1 Released on %2', array($v['version'], $v['date']))); - echo i18n('The newest version can be downloaded from http://www.sfiab.ca/download.php'); - } else if ($val > 0) { - echo happy(i18n('You are running a newer (probably a development) version (%1) that is newer than the most recent release (%2)', array(get_value_from_array($config, 'version'), get_value_from_array($v, 'version')))); - } -} else - echo '' . i18n('Check for new versions') . '
    '; - -send_footer(); -?> diff --git a/config_editor.inc.php b/config_editor.inc.php deleted file mode 100644 index acd8ebed..00000000 --- a/config_editor.inc.php +++ /dev/null @@ -1,393 +0,0 @@ - - * Copyright (C) 2005 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare($query); - $q->execute([$year, $category]); - // print_r($pdo->errorInfo()); - - $var = array(); - while ($r = $q->fetch()) { - $var[$r['var']]['val'] = $r['val']; - $var[$r['var']]['desc'] = $r['description']; - $var[$r['var']]['category'] = $r['category']; - $var[$r['var']]['ord'] = $r['ord']; - $var[$r['var']]['type'] = $r['type']; - $var[$r['var']]['type_values'] = $r['type_values']; - } - return $var; -} - -function config_editor_parse_from_http_headers($array_name) -{ - $ans = array(); - if (!is_array(get_value_from_array($_POST, $array_name))) - return $ans; - - $keys = array_keys($_POST[$array_name]); - foreach ($keys as $id) { - if (is_array($_POST[$array_name][$id])) { - $ans[$id] = array(); - foreach ($_POST[$array_name][$id] as $k => $v) { - if ($v != '') { - $ans[$id][$k] = stripslashes($v); - } - } - } else { - $ans[$id] = stripslashes($_POST[$array_name][$id]); - } - } - return $ans; -} - -/* - * Ensure the fairyear has all variables that are in -1. This is called: - * - From the database update script (which could add new variables to - * the -1 year, and we want them automatically copied to the current year - * - From the rollover script to copy all last year variables to - * the new year - * - After an install to copy all the variables to the current year - */ -function config_update_variables($fairyear = NULL, $lastfairyear = NULL) -{ - global $config; - global $pdo; - - /* if fairyear isn't specified... */ - if ($fairyear == NULL) - $fairyear = $config['FAIRYEAR']; - if ($lastfairyear == NULL) - $lastfairyear = $fairyear - 1; - - /* - * The master list of variables is the year=-1, grab - * ALL config variables that exist for -1 but - * do NOT exist for $fairyear - */ - $q = $pdo->prepare("SELECT config.var FROM `config` - LEFT JOIN `config` AS C2 ON(config.var=C2.var - AND C2.year=?) - WHERE config.year=-1 AND C2.year IS NULL"); - - $q->execute([$fairyear]); - show_pdo_errors_if_any($pdo); - - while ($i = $q->fetch(PDO::FETCH_ASSOC)) { - $var = $i['var']; - - /* - * See if this var exists for last year or - * the -1 year, prefer last year's value - */ - $r2 = $pdo->prepare("SELECT * FROM `config` - WHERE config.var=? - AND (config.year=? - OR config.year='-1') - ORDER BY config.year DESC"); - $r2->execute([$var, $lastfairyear]); - show_pdo_errors_if_any($pdo); - - if ($r2->rowCount() < 1) { - /* Uhoh, this shouldn't happen */ - echo "ERROR, Variable '$var' doesn't exist"; - exit; - } - - $v = $r2->fetch(PDO::FETCH_ASSOC); - - $r3 = $pdo->prepare('INSERT INTO config (var,val,category,type,type_values,ord,description,year) VALUES (?,?,?,?,?,?,?,?)'); - $r3->execute([$pdo->quote($v['var']),$pdo->quote($v['val']),$pdo->quote($v['category']),$pdo->quote($v['type']),$pdo->quote($v['type_values']),$pdo->quote($v['ord']),$pdo->quote($v['description']),$fairyear]); - show_pdo_errors_if_any($pdo); - } -} - -$config_editor_actions_done = false; -$config_editor_updated = false; - -function config_editor_handle_actions($category, $year, $array_name) -{ - global $config; - global $config_editor_actions_done; - global $pdo; - - $config_vars = config_editor_load($category, $year); - - $config_editor_actions_done = true; - $updated = false; - if (get_value_from_array($_POST, 'action') == 'update') { - $var = config_editor_parse_from_http_headers($array_name); - $varkeys = array_keys($var); - foreach ($varkeys as $k) { - if (is_array($var[$k])) - $val = implode(',', $var[$k]); - else - $val = $var[$k]; - - /* - * If it hasn't changed, don't update it (do a string - * compare so numbers aren't interpreted.. php thinks - * "1.0" == "1") - */ - if (strcmp($config[$k], $val) == 0) - continue; - - switch ($config_vars[$k]['type']) { - case 'number': - if (preg_match('/[0-9]+(\.[0-9]+)?/', $val, $regs)) { - $val = $regs[0]; - } else { - $val = 0; - } - break; - } - - /* Prep for MySQL update */ - $stmt = $pdo->prepare('UPDATE config SET val = ? WHERE var = ? AND year = ?'); - $stmt->execute([$val, $k, $year]); - show_pdo_errors_if_any($pdo); - // echo "Saving {$v} = $val
    "; - $config_editor_updated = true; - $updated = true; - } - if ($updated == true) { - message_push(happy(i18n('Configuration Updated')));; - } - return 'update'; - } -} - -/* - * A complete question editor. Just call it with the - * section you want to edit, a year, the array_name to use for - * POSTing and GETting the questions (so you can put more than one - * edtior on a single page), and give it $_SERVER['PHP_SELF'], because - * php_self inside this function is this file. - * FUTURE WORK: it would be nice to hide the order, and just implement - * a bunch of up/down arrows, and dynamically compute the order for - * all elements - */ -function config_editor($category, $year, $array_name, $self) -{ - global $config; - global $config_editor_actions_done, $config_editor_updated; - global $updated; - - if ($config_editor_actions_done == false) { - config_editor_handle_actions($category, $year, $array_name); - } - - /* - * Load questions, then handle up and down, because with up and down we - * have to modify 2 questions to maintain the order - */ - $var = config_editor_load($category, $year); - - if (($category == 'Tours' or $category == 'Volunteer Registration') and ($config['tours_enable'] !== 'yes' or $config['participant_regfee_items_enable'] !== 'yes')) - echo "
    "; - - echo ""; - - echo ''; - - $varkeys = array_keys($var); - // compute the optimal input size to use - $biggest = 0; - foreach ($varkeys as $k) { - if (strlen($var[$k]['val']) > $biggest) - $biggest = strlen($var[$k]['val']); - } - if ($biggest > 30) - $size = 30; - else - $size = $biggest + 1; - - // make sure size is at minimum 8, this way if all fields are empty you dont end up with 1 character long text boxes - if ($size < 8) - $size = 8; - - $line = 1; - foreach ($varkeys as $k) { - $trclass = ($line % 2 == 0) ? 'even' : 'odd'; - $line++; - - print (""); - print (''); - print (''; - } - print ('
    ' . i18n($var[$k]['desc']) . ''); - - $val = htmlspecialchars($var[$k]['val']); - $name = "{$array_name}[$k]"; - - switch ($var[$k]['type']) { - case 'yesno': - print ("'); - break; - case 'enum': - $val = explode(',', $val); - $values = $var[$k]['type_values']; - /* Split values */ - /* The PERL regex here matches any string of the form - * key=val| , where the = and 'val' and '|' are - * optional. val is allowed to contain spaces. Using - * preg_match_all runs this regex multiple times, and - * creates arrays for each subpattern that matches. - * For example, "aa=Aye|bb=Bee Bee|cc|dd=Dee" - * Would construct the following Array of Arrays: - * Array ( [0] => Array ( [0] => "aa=Aye|", - [1] => "bb=Bee Bee|", - [2] => "cc|", - [3] => "dd=Dee" ), - [1] => Array ( [0] => "aa", - [1] => "bb", - [2] => "cc", - [3] => "dd" ), - [2] => Array ( [0] => "Aye", - [1] => "Bee Bee", - [2] => "", - [3] => "Dee" ) ) - * neat eh? :) We use [1] and [2] to form the keys and - * values that we show the user */ - - preg_match_all('/([^\|=]+)(?:=([^\|]+))?\|?/', $values, $regs); - // print_r($regs); - print ("'); - break; - case 'multisel': - /* same PERL parse statements as above */ - $val = explode(',', $val); - $values = $var[$k]['type_values']; - preg_match_all('/([^\|=]+)(?:=([^\|]+))?\|?/', $values, $regs); - /* Decide which way to show this list */ - $c = count($regs[1]); - $rows = 0; - if ($c > 5) { - $rows = intval(($c + 2) / 3); - print ("
    "); - print ('
     '); - } else { - $rows = $c; - } - - for ($x = 0; $x < $c; $x++) { - if (($x % $rows) == 0 && $rows > 0 && $c > 5) { - print (''); - } - - $e_key = trim($regs[1][$x]); - $e_val = trim($regs[2][$x]); - if ($e_val == '') - $e_val = $e_key; - - $ch = (in_array($e_key, $val)) ? 'checked="checked"' : ''; - print (""); - print (i18n($e_val) . '
    '); - } - if ($c > 5) - print ('
    '); - - break; - case 'language': - print ("'); - break; - - case 'theme': - print ("'); - break; - - default: - print ("\n"); - break; - } - echo '
    '); - print ("\n"); - print ("\n"); - print ('\n"); - - echo '
    '; - - /* Returns TRUE if config variables were updated */ - return $updated; -} - -?> diff --git a/confirmed_participants.php b/confirmed_participants.php deleted file mode 100644 index 92de88b0..00000000 --- a/confirmed_participants.php +++ /dev/null @@ -1,178 +0,0 @@ - - * Copyright (C) 2007 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare("SELECT (NOW()>?) AS test"); -$q->execute([$config['dates']['postparticipants']]); -$r = $q->fetch(PDO::FETCH_OBJ); -if ($r->test != 1) { - list($d, $t) = explode(' ', $config['dates']['postparticipants']); - echo i18n("Confirmed participants (that $signatureformpermissionform have been received for) will be posted here on %1 at %2. Please do not contact the fair to inquire about receipt of your $signatureformpermissionform until after this date (and only if you are not listed here after this date).", array($d, $t)); -} else { - $q = $pdo->prepare("SELECT registrations.id AS reg_id, - registrations.status, - registrations.email, - projects.title, - projects.projectnumber, - projects.projectcategories_id, - projects.projectdivisions_id, - projectcategories.category, - projectdivisions.division - - FROM - registrations - LEFT JOIN projects on projects.registrations_id=registrations.id - LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id - LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id - WHERE - 1 - AND registrations.year=? - AND projectcategories.year=? - AND projectdivisions.year=? - AND (status='complete' OR status='paymentpending') - ORDER BY - projectcategories.id, - projectdivisions.id, - projects.projectnumber - "); - $q->execute([$config['FAIRYEAR'], $config['FAIRYEAR'], $config['FAIRYEAR']]); - - // Check for errors after the query execution - $errorInfo = $pdo->errorInfo(); - if ($errorInfo[0] != '00000') { - // If there's an error (the SQLSTATE isn't '00000', which means no error) - echo 'Error: ' . $errorInfo[2]; // The third element contains the error message - } - - $lastcat = 'something_that_does_not_exist'; - $lastdiv = 'something_that_does_not_exist'; - echo i18n("The following is a list of all confirmed participants that the $signatureformpermissionform has been received for. If you think you registered but you are not on this list, you should contact the %1 immediately.", array($config['fairname'])) . '
    '; - if ($config['regfee'] > 0) { - echo '
    '; - echo '*' . i18n(" indicates payment was not received with the $signatureformpermissionform."); - echo '
    '; - echo '
    '; - } - echo ''; - while ($r = $q->fetch(PDO::FETCH_OBJ)) { - if ($r->category != $lastcat) { - echo ''; - $lastcat = $r->category; - - // anytime the age category changes, we want to re-force it to display the division again - $lastdiv = 'something_that_does_not_exist'; - } - if ($r->division != $lastdiv) { - echo ''; - $lastdiv = $r->division; - } - - // no need to output the status if we dont have a reg fee, becuase status is either 'complete' or 'payment pending' but if we dont have a regfee it can never be payment pending, so thus, it must be complete! - $statusstar = ''; - if ($config['regfee'] > 0) { - if ($r->status == 'paymentpending') - $statusstar = '*'; - - // $status_text=i18n("Complete"); - } else - $status_text = ''; - - echo ''; - echo "'; - echo ""; - echo ""; - - $sq = $pdo->prepare("SELECT students.firstname, - students.lastname, - students.id, - students.webfirst, - students.weblast, - schools.school - FROM - students,schools - WHERE - students.registrations_id=? - AND - students.schools_id=schools.id - "); - $sq->execute([$r->reg_id]); - - // Check for errors after the query execution - $errorInfo = $pdo->errorInfo(); - if ($errorInfo[0] != '00000') { - // If there's an error (the SQLSTATE isn't '00000', which means no error) - echo 'Error: ' . $errorInfo[2]; // The third element contains the error message - } - - $studnum = 1; - $schools = ''; - $students = ''; - $sameschools = true; - $lastschool = ''; - while ($studentinfo = $sq->fetch(PDO::FETCH_OBJ)) { - if ($studentinfo->webfirst == 'yes') - $students .= "$studentinfo->firstname "; - if ($studentinfo->weblast == 'yes') - $students .= "$studentinfo->lastname "; - if ($studentinfo->webfirst == 'yes' || $studentinfo->weblast == 'yes') - $students .= '
    '; - - $schools .= "$studentinfo->school
    "; - if ($lastschool) { - if ($lastschool != $studentinfo->school) - $sameschools = false; - } - $lastschool = $studentinfo->school; - $stats_totalstudents++; - } - if ($sameschools) - $schools = $lastschool; - echo ""; - echo ""; - echo ''; - } - echo "
    '; - if ($lastcat != 'something_that_does_not_exist') - echo '

    '; - echo "

    $r->category

    "; - echo '
    '; - if ($lastdiv != 'something_that_does_not_exist') - echo '
    '; - echo "

    $r->division

    "; - echo '
    $status_text" . $statusstar . '$r->projectnumber$r->title$schools$students
    \n"; - echo '
    '; -} - -send_footer(); - -?> diff --git a/contact.php b/contact.php deleted file mode 100644 index 8d0fc340..00000000 --- a/contact.php +++ /dev/null @@ -1,141 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -prepare('SELECT * FROM users WHERE uid=? ORDER BY year DESC LIMIT 1'); - $q->execute([$id]); - // if a valid selection is made from the list, then this will always match. - if ($md5email == md5($r->email)) { - $from = cleanify($_POST['from']) . ' <' . cleanify($_POST['fromemail']) . '>'; - $extra = "Return-Path: $from\r\nFrom: $from\r\nReply-To: $from\r\n"; - - // make sure they dont do anything funky with the subject header - $subject = cleanify($_POST['subject']); - - // and strip the slashes from the message - $message = stripslashes($_POST['message']); - - mail("$r->firstname $r->lastname <$r->email>", $subject, $message, $extra); - echo happy(i18n('Contact email successfully sent')); - } else { - // this should never happen unless a spammer us auto-submitting stuff and it doesnt match. - echo error(i18n('Invalid email address')); - } - } else - echo error(i18n('Please enter a valid email address')); - } else - echo error(i18n('All fields are required')); -} - -?> - -'; -echo '
    '; -echo "
    \n"; -echo "\n"; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo '
    ' . i18n('To') . ':
    ' . i18n('Your Name') . ':
    ' . i18n('Your Email Address') . ':
    ' . i18n('Subject') . ':
    ' . i18n('Message') . ':
    '; -echo '
    '; - -send_footer(); -?> diff --git a/csv.inc.php b/csv.inc.php new file mode 100644 index 00000000..377e7d44 --- /dev/null +++ b/csv.inc.php @@ -0,0 +1,137 @@ + + Copyright (C) 2005 James Grant + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +class csv +{ + var $csvdata; + var $str_separator; + var $str_newline; + var $page_subheader; + + function __construct($subheader,$sep=",",$nl="\r\n") + { + $this->page_subheader=$subheader; + $this->str_separator = $sep; + $this->str_newline = $nl; + } + + function newline() + { + return $this->str_newline; + } + + function add_table($table) + { + $table_cols = count($table['fields']); + $first = true; + foreach($table['fields'] as $f) { + if(!$first) $this->csvdata.=$this->str_separator; + $this->csvdata .= '"'.$table['header'][$f].'"'; + $first = false; + } + $this->csvdata .= $this->newline(); + + foreach($table['data'] as $row) { + $first = true; + foreach($table['fields'] as $f) { + $d = addslashes($row[$f]); + + if(!$first) $this->csvdata.=$this->str_separator; + $first = false; + + $this->csvdata .= '"'.$d.'"'; + } + $this->csvdata .= $this->newline(); + } + } + + function heading($str) + { + //we need to put it in quotes incase it contains a comma we dont want it going to the next 'cell' + $this->csvdata.="\"".$str."\""; + $this->csvdata.=$this->newline(); + } + + function addText($str,$align="") + { + //we need to put it in quotes incase it contains a comma we dont want it going to the next 'cell' + $this->csvdata.="\"".$str."\""; + $this->csvdata.=$this->newline(); + } + + function addTextX($str,$align="") + { + //we need to put it in quotes incase it contains a comma we dont want it going to the next 'cell' + $this->csvdata.="\"".$str."\","; + } + + function setFontBold() + { + } + + function setFontNormal() + { + } + + function nextline() + { + $this->csvdata.=$this->newline(); + + } + + function newPage() + { + //well we cant really go to a new page, so in teh absense of a new page, lets put a few blank lines in? + $this->csvdata.=$this->newline(); + $this->csvdata.=$this->newline(); + $this->csvdata.=$this->newline(); + } + + function hr() + { + // what are we supposed to do.. nothing I guess? blank line? + } + + function vspace() + { + // do nothing + } + + + function output() + { + if($this->csvdata) + { + $filename=strtolower($this->page_subheader); + $filename=preg_replace("/[^a-z0-9]/","_",$filename); + //header("Content-type: application/csv"); + header("Content-type: text/x-csv"); + header("Content-disposition: inline; filename=sfiab_".$filename.".csv"); + header("Content-length: ".strlen($this->csvdata)); + header("Pragma: public"); + echo $this->csvdata; + } + } + +} +?> diff --git a/csvimport.inc.php b/csvimport.inc.php deleted file mode 100644 index d6fd7eef..00000000 --- a/csvimport.inc.php +++ /dev/null @@ -1,82 +0,0 @@ - - * Copyright (C) 2006 James Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -delimiter = ','; - $this->enclosure = '"'; - $this->data = array(); - } - - function parseFile($filename) - { - $content = file_get_contents($filename); - $content = str_replace("\r\n", "\n", $content); - $content = str_replace("\r", "\n", $content); - if ($content[strlen($content) - 1] != "\n") // Make sure it always end with a newline - $content .= "\n"; - - // Parse the content character by character - $row = array(''); - $idx = 0; - $quoted = false; - for ($i = 0; $i < strlen($content); $i++) { - $ch = $content[$i]; - if ($ch == $this->enclosure) - $quoted = !$quoted; - - // End of line - if ($ch == "\n" && !$quoted) { - // Remove enclosure delimiters - for ($k = 0; $k < count($row); $k++) { - if ($row[$k] != '' && $row[$k][0] == $this->enclosure) { - $row[$k] = substr($row[$k], 1, strlen($row[$k]) - 2); - } - $row[$k] = str_replace(str_repeat($this->enclosure, 2), $this->enclosure, $row[$k]); - } - - // Append row into table - $this->data[] = $row; - $row = array(''); - $idx = 0; - } - // End of field - else if ($ch == $this->delimiter && !$quoted) - $row[++$idx] = ''; - // Inside the field - else - $row[$idx] .= $ch; - } - return true; - } -} - -?> diff --git a/curl.inc.php b/curl.inc.php new file mode 100644 index 00000000..0be952b0 --- /dev/null +++ b/curl.inc.php @@ -0,0 +1,162 @@ + + Copyright (C) 2009 David Grant + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +?> +";print_r($array);echo ""; + $keys = array_keys($array); + foreach($keys as $k) { + if(!is_array($array[$k])) { + echo "Not array at key $k"; + exit; + } + + /* Special cases, leave these as arrays of entries */ + if($k == 'award' || $k == 'prize') { + foreach($array[$k] as &$a) { + xml_dearray($a); + } + continue; + } + + if(count($array[$k]) != 1) { + echo "Unexpected multielement array, stop."; + exit; + }; + $array[$k] = $array[$k][0]; + + if(is_array($array[$k])) { + xml_dearray($array[$k]); + } + } + } + + + + function curl_query($fair, $data, $ysc_url='') + { + global $output; + global $config; + + switch($fair['type']) { + case 'sfiab_feeder': + case 'sfiab_upstream': + $url = $fair['url'].'/remote.php'; + $text = json_encode($data); + $encrypted_cmd = remote_encrypt($fair, $text); + $post_fields = "cmd=".urlencode($encrypted_cmd)."&password=".urlencode($data['password']); + break; + case 'ysc': + if($ysc_url == '') + $url = $fair['url']; + else + $url = $ysc_url; + $output=""; + xmlCreateRecurse($data); + $post_fields = "xml=".urlencode($output); + break; + default: + echo "Unknown fair type {$fair['type']}"; + break; + } + +// print("Curl Send: (type:{$fair['type']}=>$url ysc_url=>$ysc_url) [$str]\n"); + + $ch = curl_init(); /// initialize a cURL session + curl_setopt ($ch, CURLOPT_URL, $url); + curl_setopt ($ch, CURLOPT_HEADER, 0); /// Header control + curl_setopt ($ch, CURLOPT_POST, 1); /// tell it to make a POST, not a GET + curl_setopt ($ch, CURLOPT_POSTFIELDS, $post_fields); /// put the query string here starting with "?" + curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); /// This allows the output to be set into a variable $datastream + curl_setopt ($ch, CURLOPT_TIMEOUT, 10); + curl_setopt ($ch, CURLOPT_SSLVERSION, 3); + curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false); + $datastream = curl_exec ($ch); /// execute the curl session and return the output to a variable $datastream + $c_errno = curl_errno($ch); + $c_error = curl_error($ch); + curl_close ($ch); /// close the curl session + +// print("\n===== Server Returned: \n"); + debug("curl error: [$c_errno] $c_error\n"); +// print("===============\n"); + if($c_errno > 0) { + return(array('error'=>1)); + } + + switch($fair['type']) { + case 'sfiab_feeder': + case 'sfiab_upstream': + /* Decode with our private key, then their public key */ + $de2 = remote_decrypt($fair, $datastream); + $ret=json_decode($de2, true); + debug("urldecode stream: ".print_r($ret, true)."\n"); + break; + case 'ysc': + $datastream = str_replace(" standalone=\"yes\"","",$datastream); + /* Return is XML, make a return array */ + $response=xml_parsexml($datastream); + + if(!is_array($response)) { + $ret['message']=$datastream; + $ret['error']=0; + return $ret; + } + /* De-array everything */ + xml_dearray($response); + $key = array_keys($response); + +// echo "
    ";print_r($response);echo "
    "; + + switch($key[0]) { + case 'awardresponse': + /* Full response */ + $ret = $response['awardresponse']; + + /* Undo variable to array */ + $ret['awards'] = $ret['awards']['award']; + foreach($ret['awards'] as &$a) + $a['prizes'] = $a['prizes']['prize']; + + $ret['error'] = 0; + $ret['message'] = ''; + break; + case 'awardwinnersresponse': + /* Parse return */ + $ret['error'] = ($response['awardwinnersresponse']['status'] == 'failed') ? 1 : 0; + $ret['message'] = $response['awardwinnersresponse']['statusmessage']; + break; + + } + break; + } +//n debug_("Returning: ".print_r($ret, true)); + return $ret; + } +?> diff --git a/data/.htaccess b/data/.htaccess new file mode 100644 index 00000000..2ff16417 --- /dev/null +++ b/data/.htaccess @@ -0,0 +1,2 @@ +Require all denied +Options -Indexes diff --git a/db.inc.php b/db.inc.php new file mode 100644 index 00000000..da8ff2c8 --- /dev/null +++ b/db.inc.php @@ -0,0 +1,195 @@ +real_query($sql); +// print("$sql\n"); + if($mysqli->error != '') { + print("SQL command failed. SQL: $sql\n"); + print("Error: {$mysqli->error}\n"); + } + $sql = ''; + } + } +} + + + +/* Returns $map[old_id] = new_id */ +function db_roll_table($mysqli, $current_year, $new_year, $table, $where='', $replace=array()) +{ + /* Field Type Null Key Default Extra + * id int(10) unsigned NO PRI NULL auto_increment + * sponsors_id int(10) unsigned NO MUL 0 + * award_source_fairs_id int(10) unsigned YES NULL + */ + $map = array(); + $id_field = NULL; + + /* Get field list for this table */ + $col = array(); + $q = $mysqli->query("SHOW COLUMNS IN `$table`"); + while(($c = $q->fetch_assoc())) { + $col[$c['Field']] = $c; + } + + /* Record fields we care about */ + $fields = array(); + $keys = array_keys($col); + $has_year = false; + foreach($keys as $k) { + /* Skip id field */ + if($col[$k]['Extra'] == 'auto_increment') { + $id_field = $k; + continue; + } + + /* Skip year field */ + if($k == 'year') { + $has_year = true; + continue; + } + + $fields[] = $k; + } + + if($where == '') { + if($has_year == false) { + print("No where and no year for table $table"); + exit(); + } + $where='1'; + } + + if($has_year) { + $where = "year='$current_year' AND $where"; + } + + /* Get data */ + $q=$mysqli->query("SELECT * FROM $table WHERE $where"); +// print("SELECT * FROM $table WHERE $where\n"); + if($mysqli->error != '') { + print("Failed Query: SELECT * FROM $table WHERE $where"); + print($mysqli->error); + } + $names = '`'.join('`,`', $fields).'`'; + + /* Process data */ + while($r=$q->fetch_assoc()) { + + $v = array(); + foreach($fields as $f) { + $val = $r[$f]; + if(array_key_exists($f, $replace)) { + if(!array_key_exists($val, $replace[$f])) { + print("   Warning: key $val doesn't exist in column $f. Left blank.
    "); + $val = ''; + } else { + $val = $replace[$f][$val]; + } + $v[] = "'".$mysqli->real_escape_string($val)."'"; + } else if($col[$f]['Null'] == 'YES' && $val == NULL) + $v[] = 'NULL'; + else + $v[] = "'".$mysqli->real_escape_string($val)."'"; + } + $vals = join(',',$v); + if($has_year) { + $mysqli->query("INSERT INTO `$table`(`year`,$names) VALUES ('$new_year',$vals)"); +// print("INSERT INTO `$table`(`year`,$names) VALUES ('$new_year',$vals)\n"); + } else { + $mysqli->query("INSERT INTO `$table`($names) VALUES ($vals)"); +// print("INSERT INTO `$table`($names) VALUES ($vals)\n"); + } + print($mysqli->error); + + if($id_field !== NULL) { + $map[$r[$id_field]] = $mysqli->insert_id; + } + } + print(" {$q->num_rows} entires copied into $new_year\n"); + return $map; +} + +function db_roll($mysqli, $new_year) +{ + global $config; + $current_year = $config['year']; + $delta_years = $new_year - $current_year; + + if($new_year <= $current_year) exit(); + + print("
    \n");
    +	print("Rolling Categories...\n");
    +	db_roll_table($mysqli, $current_year, $new_year, "categories");
    +	print("Rolling Challenges...\n");
    +	db_roll_table($mysqli, $current_year, $new_year, "challenges");
    +	print("Rolling Schools...\n");
    +	db_roll_table($mysqli, $current_year, $new_year, "schools");
    +	print("Rolling Timeslots...\n");
    +	db_roll_table($mysqli, $current_year, $new_year, "timeslots");
    +	print("Rolling Tours...\n");
    +	db_roll_table($mysqli, $current_year, $new_year, "tours");
    +
    +
    +	$weeks = 52 * $delta_years;
    +	print("Adjusting Configuration dates +$weeks weeks...\n");
    +	/* Fair dates need to be adjusted.  Add +52 weeks to keep them on the same
    +	 * day of the week */
    +
    +	foreach(array('date_judge_registration_closes', 'date_judge_registration_opens',
    +			'date_student_registration_closes','date_student_registration_opens',
    +			'date_fair_begins','date_fair_ends',
    +			) as $f) {
    +		if($current_year > 0) {
    +			$mysqli->query("UPDATE config SET `val`=DATE_ADD(`val`,INTERVAL $weeks WEEK) WHERE `var`='$f'");
    +		} else {
    +			/* Hack for install script startign at year 0, just go right to the year */
    +			$mysqli->query("UPDATE config SET `val`=DATE_ADD(`val`,INTERVAL $new_year YEAR) WHERE `var`='$f'");
    +		}
    +		$q = $mysqli->query("SELECT * FROM config WHERE `var`='$f'");
    +		$r = $q->fetch_assoc();
    +		print("   {$r['description']}: {$r['val']}\n");
    +	}
    +
    +	/* Timeslots are relative to the date_fair_begins, so don't need further adjustment */
    +
    +	/* Awards need some ID rewrites */
    +	print("Rolling Sponsors...\n");
    +	$sponsor_map = db_roll_table($mysqli, $current_year, $new_year, "users",  "FIND_IN_SET('sponsor',`roles`)>0");
    +	print("Rolling Awards...\n");
    +	$award_map = db_roll_table($mysqli, $current_year, $new_year, "awards", '', array('sponsor_uid' => $sponsor_map ));
    +
    +	/* Make a comma separated list of all the old award ids, and roll prizes that match one of the
    +	 * award ids, replacing the award_id with the new one */
    +	print("Rolling Prizes...\n");
    +	$ids = join(',', array_keys($award_map));
    +	db_roll_table($mysqli, $current_year, $new_year, "award_prizes", "FIND_IN_SET(`award_id`,'$ids')>0", array('award_id'=>$award_map ));
    +
    +	/* Last thing, update the year */
    +	print("Setting new fair year to $new_year...\n");
    +	$mysqli->query("UPDATE config SET val='$new_year' WHERE var='year'");
    +
    +	print("Done.
    \n"); +} + + +?> diff --git a/db/FILES b/db/FILES deleted file mode 100644 index df19b6b2..00000000 --- a/db/FILES +++ /dev/null @@ -1,7 +0,0 @@ -db.code.version.txt - contains the version number of the database that the code requires -db_update.php - will update the db to the newest version (db.code=db.db) - -db.update.1.sql - the SQL commands required to update - to upgrade across multiple versions -db.update.2.sql - each file should be executed in sequence from the current version up. -db.update.3.sql - etc - diff --git a/db/db.code.version.txt b/db/db.code.version.txt deleted file mode 100644 index a14f8d53..00000000 --- a/db/db.code.version.txt +++ /dev/null @@ -1 +0,0 @@ -179 diff --git a/db/db.full.11.sql b/db/db.full.11.sql deleted file mode 100644 index fa65f535..00000000 --- a/db/db.full.11.sql +++ /dev/null @@ -1,849 +0,0 @@ --- phpMyAdmin SQL Dump --- version 2.6.0-rc2 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 26, 2005 at 04:29 PM --- Server version: 4.0.24 --- PHP Version: 4.3.11 --- --- Database: `sfiab` --- - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards` --- - -CREATE TABLE `award_awards` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `award_types_id` int(10) unsigned NOT NULL default '0', - `name` varchar(128) NOT NULL default '', - `criteria` text NOT NULL, - `presenter` varchar(128) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `award_types_id` (`award_types_id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectcategories` --- - -CREATE TABLE `award_awards_projectcategories` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectcategories_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `year` (`year`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectcategories_id` (`projectcategories_id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_awards_projectdivisions` --- - -CREATE TABLE `award_awards_projectdivisions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `projectdivisions_id` (`projectdivisions_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_contacts` --- - -CREATE TABLE `award_contacts` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_sponsors_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `notes` text NOT NULL, - PRIMARY KEY (`id`), - KEY `award_sponsors_id` (`award_sponsors_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_prizes` --- - -CREATE TABLE `award_prizes` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `cash` int(11) NOT NULL default '0', - `scholarship` int(11) NOT NULL default '0', - `prize` varchar(128) NOT NULL default '', - `number` int(11) NOT NULL default '0', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `award_awards_id` (`award_awards_id`), - KEY `year` (`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_sponsors` --- - -CREATE TABLE `award_sponsors` ( - `id` int(11) NOT NULL auto_increment, - `organization` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `email` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `address` varchar(128) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `notes` text NOT NULL, - `confirmed` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`), - KEY `id` (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `award_types` --- - -CREATE TABLE `award_types` ( - `id` int(10) unsigned NOT NULL, - `type` varchar(64) NOT NULL default '', - `order` int(11) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - UNIQUE (id,year) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees` --- - -CREATE TABLE `committees` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_link` --- - -CREATE TABLE `committees_link` ( - `committees_id` int(10) unsigned NOT NULL default '0', - `committees_members_id` int(10) unsigned NOT NULL default '0', - `title` varchar(128) NOT NULL default '', - `ord` tinyint(3) unsigned NOT NULL default '0' -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `committees_members` --- - -CREATE TABLE `committees_members` ( - `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(128) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `emailprivate` varchar(128) NOT NULL default '', - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `fax` varchar(32) NOT NULL default '', - `ord` int(11) NOT NULL default '0', - `displayemail` enum('N','Y') NOT NULL default 'N', - `access_admin` enum('N','Y') NOT NULL default 'Y', - `access_config` enum('N','Y') NOT NULL default 'N', - `access_super` enum('N','Y') NOT NULL default 'N', - `deleted` enum('N','Y') NOT NULL default 'N', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `config` --- - -CREATE TABLE `config` ( - `var` varchar(64) NOT NULL default '', - `val` text NOT NULL, - `description` text NOT NULL, - `year` int(11) NOT NULL default '0' -) TYPE=MyISAM; -ALTER TABLE `config` ADD UNIQUE (`var`,`year`); - --- -------------------------------------------------------- - --- --- Table structure for table `dates` --- - -CREATE TABLE `dates` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` datetime NOT NULL default '0000-00-00 00:00:00', - `name` varchar(32) NOT NULL default '', - `description` varchar(64) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emails` --- - -CREATE TABLE `emails` ( - `id` int(10) unsigned NOT NULL auto_increment, - `val` varchar(64) NOT NULL default '', - `name` varchar(128) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `from` varchar(128) NOT NULL default '', - `subject` varchar(128) NOT NULL default '', - `body` text NOT NULL, - `type` enum('system','user') NOT NULL default 'system', - PRIMARY KEY (`id`), - UNIQUE KEY `val` (`val`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `emergencycontact` --- - -CREATE TABLE `emergencycontact` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `students_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `relation` varchar(64) NOT NULL default '', - `phone1` varchar(32) NOT NULL default '', - `phone2` varchar(32) NOT NULL default '', - `phone3` varchar(32) NOT NULL default '', - `phone4` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges` --- - -CREATE TABLE `judges` ( - `id` int(10) unsigned NOT NULL auto_increment, - `firstname` varchar(32) NOT NULL default '', - `lastname` varchar(32) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `password` varchar(32) NOT NULL default '', - `passwordexpiry` date default NULL, - `phonehome` varchar(32) NOT NULL default '', - `phonework` varchar(32) NOT NULL default '', - `phoneworkext` varchar(16) NOT NULL default '', - `phonecell` varchar(32) NOT NULL default '', - `organization` varchar(64) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `address` varchar(64) NOT NULL default '', - `address2` varchar(64) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `catpref` int(10) unsigned default NULL, - `divpref` int(10) unsigned default NULL, - `highest_psd` varchar(128) NOT NULL default '', - `professional_quals` varchar(128) NOT NULL default '', - `years_school` tinyint(3) unsigned NOT NULL default '0', - `years_regional` tinyint(3) unsigned NOT NULL default '0', - `years_national` tinyint(3) unsigned NOT NULL default '0', - `willing_chair` enum('no','yes') NOT NULL default 'no', - `attending_lunch` enum('no','yes') NOT NULL default 'yes', - `expertise_other` text, - `deleted` enum('no','yes') NOT NULL default 'no', - `deleteddatetime` datetime default NULL, - `complete` enum('no','yes') NOT NULL default 'no', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_expertise` --- - -CREATE TABLE `judges_expertise` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(10) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned default NULL, - `projectsubdivisions_id` int(10) unsigned default NULL, - `val` tinyint(3) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_languages` --- - -CREATE TABLE `judges_languages` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `languages_lang` char(2) NOT NULL default '', - PRIMARY KEY (`judges_id`,`languages_lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams` --- - -CREATE TABLE `judges_teams` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` int(10) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `autocreate_type_id` int(11) default NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `num` (`num`,`year`), - UNIQUE KEY `name` (`name`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_awards_link` --- - -CREATE TABLE `judges_teams_awards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `award_awards_id` (`award_awards_id`,`judges_teams_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_link` --- - -CREATE TABLE `judges_teams_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_id` int(11) NOT NULL default '0', - `judges_teams_id` int(11) NOT NULL default '0', - `captain` enum('no','yes') NOT NULL default 'no', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_link` --- - -CREATE TABLE `judges_teams_timeslots_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_teams_timeslots_projects_link` --- - -CREATE TABLE `judges_teams_timeslots_projects_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `judges_teams_id` int(10) unsigned NOT NULL default '0', - `judges_timeslots_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `judges_teams_id` (`judges_teams_id`,`judges_timeslots_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_timeslots` --- - -CREATE TABLE `judges_timeslots` ( - `id` int(10) unsigned NOT NULL auto_increment, - `date` date NOT NULL default '0000-00-00', - `starttime` time NOT NULL default '00:00:00', - `endtime` time NOT NULL default '00:00:00', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_years` --- - -CREATE TABLE `judges_years` ( - `judges_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`judges_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `languages` --- - -CREATE TABLE `languages` ( - `lang` char(2) NOT NULL default '', - `langname` varchar(32) NOT NULL default '', - `active` enum('N','Y') NOT NULL default 'N', - UNIQUE KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `mentors` --- - -CREATE TABLE `mentors` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `phone` varchar(32) NOT NULL default '', - `organization` varchar(128) NOT NULL default '', - `position` varchar(128) NOT NULL default '', - `description` text NOT NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `pagetext` --- - -CREATE TABLE `pagetext` ( - `id` int(10) unsigned NOT NULL auto_increment, - `textname` varchar(64) NOT NULL default '', - `text` text NOT NULL, - `lastupdate` DATETIME NOT NULL, - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY (`textname`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `project_specialawards_link` --- - -CREATE TABLE `project_specialawards_link` ( - `id` int(10) unsigned NOT NULL auto_increment, - `award_awards_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectcategories` --- - -CREATE TABLE `projectcategories` ( - `id` int(10) unsigned NOT NULL default '0', - `category` varchar(64) NOT NULL default '', - `mingrade` tinyint(4) NOT NULL default '0', - `maxgrade` tinyint(4) NOT NULL default '0', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisions` --- - -CREATE TABLE `projectdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `division` varchar(64) NOT NULL default '', - `division_shortform` char(3) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectdivisionsselector` --- - -CREATE TABLE `projectdivisionsselector` ( - `id` int(10) unsigned NOT NULL auto_increment, - `question` varchar(255) NOT NULL default '', - `yes` int(10) unsigned NOT NULL default '0', - `yes_type` enum('question','division') NOT NULL default 'question', - `no` int(10) unsigned NOT NULL default '0', - `no_type` enum('question','division') NOT NULL default 'question', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projects` --- - -CREATE TABLE `projects` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `projectnumber` varchar(16) default NULL, - `projectcategories_id` tinyint(4) NOT NULL default '0', - `projectdivisions_id` tinyint(4) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `summary` text NOT NULL, - `year` int(11) NOT NULL default '0', - `req_electricity` enum('no','yes') NOT NULL default 'no', - `req_table` enum('no','yes') NOT NULL default 'yes', - `req_special` varchar(128) NOT NULL default '', - `language` char(2) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `projectsubdivisions` --- - -CREATE TABLE `projectsubdivisions` ( - `id` int(10) unsigned NOT NULL default '0', - `year` int(11) unsigned NOT NULL default '0', - `projectdivisions_id` int(10) unsigned NOT NULL default '0', - `subdivision` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `provinces` --- - -CREATE TABLE `provinces` ( - `code` char(2) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - UNIQUE KEY `code` (`code`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `registrations` --- - -CREATE TABLE `registrations` ( - `id` int(10) unsigned NOT NULL auto_increment, - `num` varchar(8) NOT NULL default '', - `email` varchar(64) NOT NULL default '', - `start` datetime NOT NULL default '0000-00-00 00:00:00', - `status` enum('new','open','paymentpending','complete') NOT NULL default 'new', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `year` int(11) NOT NULL default '0', - `nummentors` tinyint(4) default NULL, - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safety` --- - -CREATE TABLE `safety` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `safetyquestions_id` int(10) unsigned NOT NULL default '0', - `answer` varchar(32) NOT NULL default '', - `year` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `safetyquestions` --- - -CREATE TABLE `safetyquestions` ( - `id` int(10) unsigned NOT NULL auto_increment, - `year` int(10) unsigned NOT NULL default '0', - `question` text NOT NULL, - `type` enum('check','yesno') NOT NULL default 'check', - `required` enum('no','yes') NOT NULL default 'yes', - `ord` int(11) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `schools` --- - -CREATE TABLE `schools` ( - `id` int(10) unsigned NOT NULL auto_increment, - `school` varchar(64) NOT NULL default '', - `phone` varchar(16) NOT NULL default '', - `fax` varchar(16) NOT NULL default '', - `address` varchar(64) NOT NULL default '', - `city` varchar(32) NOT NULL default '', - `province_code` char(2) NOT NULL default '', - `postalcode` varchar(7) NOT NULL default '', - `sciencehead` varchar(64) NOT NULL default '', - `scienceheademail` varchar(128) NOT NULL default '', - `scienceheadphone` varchar(32) NOT NULL default '', - `accesscode` varchar(32) NOT NULL default '', - `year` int(10) unsigned NOT NULL default '0', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `junior` tinyint(4) NOT NULL default '0', - `intermediate` tinyint(4) NOT NULL default '0', - `senior` tinyint(4) NOT NULL default '0', - `registration_password` varchar(32) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `students` --- - -CREATE TABLE `students` ( - `id` int(10) unsigned NOT NULL auto_increment, - `registrations_id` int(10) unsigned NOT NULL default '0', - `firstname` varchar(64) NOT NULL default '', - `lastname` varchar(64) NOT NULL default '', - `sex` enum('male','female') NOT NULL default 'male', - `address` varchar(255) NOT NULL default '', - `city` varchar(64) NOT NULL default '', - `province` varchar(32) NOT NULL default '', - `postalcode` varchar(8) NOT NULL default '', - `phone` varchar(64) NOT NULL default '', - `email` varchar(128) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `dateofbirth` date NOT NULL default '0000-00-00', - `age` tinyint(3) unsigned NOT NULL default '0', - `lang` char(2) NOT NULL default '', - `year` int(11) NOT NULL default '0', - `schools_id` int(10) unsigned NOT NULL default '0', - `tshirt` enum('small','medium','large','xlarge') NOT NULL default 'medium', - `medicalalert` varchar(255) NOT NULL default '', - `foodreq` varchar(255) NOT NULL default '', - `teachername` varchar(64) NOT NULL default '', - `teacheremail` varchar(128) NOT NULL default '', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `translations` --- - -CREATE TABLE `translations` ( - `lang` char(2) NOT NULL default '', - `strmd5` varchar(32) NOT NULL default '', - `str` text NOT NULL, - `val` text NOT NULL, - PRIMARY KEY (`strmd5`), - KEY `strmd5` (`strmd5`), - KEY `lang` (`lang`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `winners` --- - -CREATE TABLE `winners` ( - `id` int(10) unsigned NOT NULL auto_increment, - `awards_prizes_id` int(10) unsigned NOT NULL default '0', - `projects_id` int(10) unsigned NOT NULL default '0', - `year` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `awards_prizes_id` (`awards_prizes_id`,`projects_id`,`year`) -) TYPE=MyISAM; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_catpref` --- - -CREATE TABLE `judges_catpref` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , - `judges_id` INT NOT NULL , - `projectcategories_id` INT NOT NULL , - `rank` INT NOT NULL , - `year` INT NOT NULL , - PRIMARY KEY ( `id` ) -) TYPE = MYISAM ; - --- -------------------------------------------------------- - --- --- Table structure for table `judges_schedulerconfig` --- - -CREATE TABLE `judges_schedulerconfig` ( - `var` VARCHAR( 64 ) NOT NULL DEFAULT '', - `val` TEXT NOT NULL , - `description` TEXT NOT NULL , - `year` INT( 11 ) NOT NULL DEFAULT '0', - UNIQUE KEY `var` ( `var` , `year` ) -) TYPE = MYISAM ; - - --- Now insert everything - -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairname', '', 'Name of the fair', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('default_language', 'en', 'The default language if no language has yet been specified', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minstudentsperproject', '1', 'The minimum number of students that can work on a project (usually 1)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxstudentsperproject', '2', 'The maximum number of students that can work on a project (Usually 2)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('mingrade', '7', 'The minimum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxgrade', '12', 'The maximum school grade that can enter a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minage', '10', 'The minimum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxage', '21', 'The maximum age of the students', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxmentorsperproject', '5', 'The maximum number of mentors that can help with a project', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minmentorsperproject', '0', 'The minimum number of mentors that can help with a project (usually 0)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('usedivisionselector', 'yes', 'Specify whether to use the division selector flowchart questions to help decide on the division (yes/no)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('minjudgeage', '21', 'The minimum age that a person must be in order to be a judge.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxjudgeage', '100', 'The maximum age that a person can be in order to be a judge', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('participant_student_foodreq', 'yes', 'Ask for students special food requirements (yes/no). Should be yes if you plan on providing lunch', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee', '', 'Registration Fee', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('regfee_per', 'student', 'Registration fee is per student, or per project? (student/project)', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('project_num_format', 'CDN', 'C=Category, D=Divison, N=2 digit Number', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_publiclayout', '
    nametitleemail
    nametitleemail
    nametitleemail
    nametitleemail
    nametitleemail
    nametitleemail
    nametitleemail
    nametitleemail
    nametitleemail
    nametitleemail
    nametitleemail
    nametitleemail
    nametitleemail
    \n"; -echo ''; -echo ''; -echo '
    ' . i18n('Fair Type') . ':'; -echo '
    ' . i18n('Fair Name') . ':'; -echo ""; -echo '
    ' . i18n('Fair Abbreviation') . ':'; -echo ""; -echo '
    ' . i18n('Fair Website') . ':'; -if ($f['website'] == '') - $f['website'] = 'http://'; -echo ""; -echo '
    '; - -/* All upstream stuff */ -echo '
    '; -echo "\n"; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -/* End upstream stuff */ -echo '
    ' . i18n('Upstream URL') . ':'; -if ($f['url'] == '') - $f['url'] = 'http://'; -echo ""; -echo '
    '; -echo i18n(($f['type'] == 'ysc') ? 'YSC Region ID' : 'Upstream Username'); -echo ':'; -echo ""; -echo '
    '; -echo i18n(($f['type'] == 'ysc') ? 'YSC Region Password' : 'Upstream Password'); -echo ':'; -echo ""; -echo '
    ' . i18n('Enable stats upload') . ':'; -yesno('enable_stats', $f['enable_stats']); -echo '
    ' . i18n('Enable awards download') . ':'; -yesno('enable_awards', $f['enable_awards']); -echo '
    ' . i18n('Enable winners upload') . ':'; -yesno('enable_winners', $f['enable_winners']); -echo '
    '; - -echo i18n("* Use the 'Personal' tab to specify contact information for someone at this fair."); -echo '
    '; -echo '
    '; -echo i18n("* The feeder fair must login to this SFIAB to download award lists - and upload statistics and winners. Use the 'Personal' tab to specify an - email and password for the feeder fair, use the email address of a contact at - the feeder fair. Then give the email/password to that person so they can configure - their own SFIAB to upload data to this SFIAB."); -echo '
    '; - -echo '
    '; -echo '\n"; -echo ''; - -echo '
    '; - -if (get_value_from_array($_SESSION, 'embed') != true) - send_footer(); - -?> - - diff --git a/fair_main.php b/fair_main.php deleted file mode 100644 index 1a4c885d..00000000 --- a/fair_main.php +++ /dev/null @@ -1,67 +0,0 @@ - - * Copyright (C) 2005 James Grant - * Copyright (C) 2007 David Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> -Activate Role
    ' button in the Volunteer section below",array($config['FAIRYEAR'],$config['fairname'])))); - * header('Location: user_activate.php'); - * exit; - * } - */ -send_header('Science Fair Main', array()); - -// only display the named greeting if we have their name -echo i18n('Hello %1', array($_SESSION['name'])); -echo '
    '; -echo '
    '; - -echo ''; -echo ' '; -echo ' '; -echo ' '; -echo ' '; -echo " \n"; -echo "
    ' . theme_icon('fair_stats') . '
    ' . i18n('Fair Information and Statistics') . '
    ' . theme_icon('participant_registration') . '
    ' . i18n('Student/Project Management') . '
    ' . theme_icon('enter_winning_projects') . '
    ' . i18n('Enter Winning Projects') . '
    \n"; -echo '
    '; -echo ''; -echo " \n"; -echo ' '; -echo ' '; -echo ' '; -echo " \n"; -echo "
    ' . theme_icon('edit_profile') . '
    ' . i18n('Edit My Profile') . '
    ' . theme_icon('change_password') . '
    ' . i18n('Change My Password') . '
    ' . theme_icon('manage_roles') . '
    ' . i18n('Manage My Roles') . '
    \n"; - -send_footer(); -?> diff --git a/fair_stats.php b/fair_stats.php deleted file mode 100644 index 0dc44d76..00000000 --- a/fair_stats.php +++ /dev/null @@ -1,369 +0,0 @@ - - * Copyright (C) 2009 David Grant - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -?> - $v) { - $stats[$k] = $stats[$k]; - } - - // $str = join(',',$stats); - $keys = '`fairs_id`,`year`,`' . join('`,`', array_keys($stats)) . '`'; - $vals = "'{$u['fairs_id']}','$year','" . join("','", array_values($stats)) . "'"; - $stmt = $pdo->prepare('DELETE FROM fairs_stats WHERE fairs_id = :fairs_id AND year = :year'); - $stmt->execute([ - ':fairs_id' => $u['fairs_id'], - ':year' => $year - ]); - $stmt = $pdo->prepare("INSERT INTO fairs_stats (`id`,?) VALUES ('',?)"); - $stmt->execute([$keys,$vals]); - - happy_('Fair Information Saved.'); - exit; -} - -if (get_value_from_array($_SESSION, 'embed') == true) { - echo '
    '; - display_messages(); - echo '

    ' . i18n('Fair Information and Statistics') . '

    '; - echo '
    '; -} else { - send_header('Fair Information and Statistics', - array('Fair Main' => 'fair_main.php'), - 'fair_stats'); -} - -?> - - -prepare('SELECT * FROM fairs WHERE id = :fairs_id'); - -$q->execute([ - ':fairs_id' => $u['fairs_id'] -]); - - -$fair = $q->fetch(PDO::FETCH_ASSOC); - -$s = explode(',', $fair['gather_stats']); -foreach ($s as $k) { - if (trim($k) == '') - continue; - $server_config[$k] = true; - $server_any_stats = true; -} - -/* - * $s = ($_SESSION['embed'] == true) ? $_SESSION['embed_submit_url'] : 'fair_stats.php'; - * echo "
    "; - * echo i18n('Select Year').": "; - * $q = mysql_query("SELECT DISTINCT year FROM config WHERE year>1000 ORDER BY year DESC"); - * echo ""; - * echo "
    "; - */ -echo '
    '; - -/* Load stats */ -$q = $pdo->prepare('SELECT * FROM fairs_stats WHERE fairs_id = :fairs_id AND year = :year'); - -$q->execute([ - ':fairs_id' => $u['fairs_id'], - ':year' => $year -]); - -$stats = $q->fetch(PDO::FETCH_ASSOC); - -/* Print stats */ - -/* Print all blocks the server requests */ - -echo '
    '; -echo ""; - -if ($server_config['info']) { - echo '

    ' . i18n('%1 Fair information', array($year)) . '

    '; - echo ''; - echo ''; - echo ""; - echo ''; - echo ""; - echo ''; - echo ''; - echo ''; - echo ""; - echo ''; - echo ''; - echo ''; - echo ""; - echo '
    ' . i18n('Fair Start Date') . ':(YYYY-MM-DD)
    ' . i18n('Fair End Date') . ':(YYYY-MM-DD)
    ' . i18n('Fair Location/Address') . ':
    ' . i18n('Fair Budget') . ':\$
    ' . i18n('Youth Science Canada Affiliation Complete') . '?
    ' . i18n('Charity Number or Information') . '?
    '; - echo '
    '; - echo '
    '; -} - -if ($server_config['next_chair']) { - echo '

    ' . i18n('%1 - %2 Chairperson (if known)', array($year, $year + 1)) . '

    '; - echo ''; - echo ''; - echo ""; - echo ''; - echo ""; - echo ''; - echo ""; - echo ''; - echo ""; - echo ''; - echo ""; - echo ''; - - echo '
    ' . i18n('Name') . ': ' . i18n('Email') . ':
    ' . i18n('Tel. Bus') . ': ' . i18n('Tel. Home') . ':
    ' . i18n('Fax') . ':
    '; - echo '

    '; -} - -if ($server_config['delegates']) { - echo '

    ' . i18n('%1 CWSF Delegates and Alternatives', array($year)) . '

    '; - echo ''; - echo ''; - for ($x = 1; $x <= 3; $x++) { - $sizes = array('small' => 'Small', 'medium' => 'Medium', 'large' => 'Large', 'xlarge' => 'X-Large'); - echo ""; - echo ""; - echo "'; - } - echo '
    ' . i18n('Delegate Name(s)') . '' . i18n('Email') . '' . i18n('Jacket Size') . '
    '; - echo i18n('Remember, the jackets fit smaller than normal sizes.'); - echo '

    '; -} - -if ($server_config['scholarships']) { - echo '

    ' . i18n('%1 Scholarships', array($year)) . '

    '; - echo 'How many university/college scholarships are available at your fair? (use a format like:
    6 - University of British Columbia - Entrance Scholarships
    '; - echo ''; - echo '

    '; -} - -if ($server_config['participation']) { - $rangemap = array(1 => '1-3', 4 => '4-6', 7 => '7-8', 9 => '9-10', 11 => '11-12'); - echo '

    ' . i18n('%1 Fair participation', array($year)) . '

    '; - echo '
    '; - echo i18n('Number of students') . ': '; - echo ""; - echo ''; - echo ''; - foreach ($rangemap as $k => $v) - echo ""; - echo ''; - echo ''; - foreach ($rangemap as $k => $v) - echo ""; - echo ''; - echo ''; - foreach ($rangemap as $k => $v) - echo ""; - echo ''; - echo ''; - foreach ($rangemap as $k => $v) - echo ""; - echo ''; - echo '
    ' . i18n('Grade') . '
    $v
    ' . i18n('Male') . '
    ' . i18n('Female') . '
    ' . i18n('Projects') . '
    '; - echo '
    '; - echo i18n('Number of schools') . ": "; - echo '
    '; - echo i18n('Number of active schools') . ": "; - echo '
    '; - echo '
    '; - echo i18n('Number of committee members') . ": "; - echo '
    '; - echo i18n('Number of judges') . ": "; - echo '
    '; - echo '
    '; - echo '
    '; -} - -if ($server_config['schools_ext']) { - echo '

    ' . i18n('%1 Extended School/Participant data', array($year)) . '

    '; - echo '
    '; - ?> - - - - - - - - - - - - - - - - - - - -
    ::
    ::
    ::
    :
    -


    - ' . i18n('%1 Data on minority groups', array($year)) . ''; - echo '
    '; - echo ''; - echo ''; - echo '
    ' . i18n('Number of First Nations students'); - echo ": "; - echo '
    '; - echo '
    '; - echo '
    '; -} -if ($server_config['guests']) { - echo '

    ' . i18n('%1 Guests visiting the fair', array($year)) . '

    '; - echo '
    '; - echo ''; - echo ''; - echo ''; - echo '
    ' . i18n('Number of Students that visited the fair (tours, etc.)'); - echo ": "; - echo '
    ' . i18n('Number of Public Guests that visited the fair'); - echo ": "; - echo '
    '; - echo '
    '; - echo '
    '; -} - -if ($server_config['sffbc_misc']) { - echo '

    ' . i18n('%1 Misc. SFFBC Questions', array($year)) . '

    '; - echo '
    '; - echo ''; - echo ''; - echo ''; - echo ''; - echo '
    ' . i18n('Number of Teachers supporting student projects'); - echo ": "; - echo '
    ' . i18n('Number of Students indicating increased interest in science & technology'); - echo ": "; - echo '
    ' . i18n('Number of Students considering careers in science & technology'); - echo ": "; - echo '
    '; - echo '
    '; - echo '
    '; -} - -if ($server_any_stats == false) { - /* Every condition below will fail, tell the user something */ - echo i18n('No stats to gather. Contact the admins if you believe this is an error.'); -} else { - echo ''; -} - -echo '
    '; -echo '
    '; -echo '
    '; - -/* - * echo "
    ";
    - * print_r($fair);
    - * print_r($server_config);
    - * print_r($stats);
    - * echo "
    "; - */ -if (get_value_from_array($_SESSION, 'embed') != true) { - send_footer(); -} - -?> diff --git a/fairs.inc.php b/fairs.inc.php new file mode 100644 index 00000000..46a916cc --- /dev/null +++ b/fairs.inc.php @@ -0,0 +1,107 @@ + "Feeder Fair", + 'sfiab_upstream' => 'Upstream Fair', + 'ysc' => 'Youth Science Canada (Upstream)', + 'old_sfiab2_feeder' => 'Old SFIAB2.0 Feeder Fair'); + +function fair_load($mysqli, $fair_id, $username=NULL, $data=NULL, $hash=NULL) +{ + $r = NULL; + if($fair_id > 0) { + $fair_id = (int)$fair_id; + $r = $mysqli->query("SELECT * FROM fairs WHERE id='$fair_id'"); + } else if($username !== NULL) { + $username = $mysqli->real_escape_string($username); + $r = $mysqli->query("SELECT * FROM fairs WHERE username='$username' LIMIT 1"); + } else if($hash !== NULL) { + $hash = $mysqli->real_escape_string($hash); + $r = $mysqli->query("SELECT * FROM fairs WHERE password='$hash' LIMIT 1"); + } + + /* fetch the fair data from sql, or from $data if specified */ + if($data === NULL) { + if($r === NULL) { + debug_print_backtrace(); + + } + print($mysqli->error); + + if($r->num_rows == 0) { + return NULL; + } + $f = $r->fetch_assoc(); + + } else { + $f = $data; + } + + /* Store an original copy so save() can figure out what (if anything) needs updating */ + unset($f['original']); + $original = $f; + $f['original'] = $original; + + return $f; +} + +function fair_load_all($mysqli) +{ + global $config; + $q = $mysqli->query("SELECT * FROM fairs ORDER BY name"); + $fairs = array(); + while($f = $q->fetch_assoc()) { + $fairs[(int)$f['id']] = fair_load($mysqli, 0, NULL, $f); + } + return $fairs; +} + +function fair_load_all_feeder($mysqli) +{ + global $config; + $q = $mysqli->query("SELECT * FROM fairs WHERE `type`='sfiab_feeder' ORDER BY name"); + $fairs = array(); + while($f = $q->fetch_assoc()) { + $fairs[(int)$f['id']] = fair_load($mysqli, 0, NULL, $f); + } + return $fairs; +} + +function fair_load_all_upstream($mysqli) +{ + global $config; + $q = $mysqli->query("SELECT * FROM fairs WHERE `type`='sfiab_upstream' ORDER BY name"); + $fairs = array(); + while($f = $q->fetch_assoc()) { + $fairs[(int)$f['id']] = fair_load($mysqli, 0, NULL, $f); + } + return $fairs; +} + + +function fair_load_by_username($mysqli, $username) +{ + return fair_load($mysqli, 0, $username); +} + +function fair_load_by_hash($mysqli, $hash) +{ + return fair_load($mysqli, 0, NULL, NULL, $hash); +} + +function fair_save($mysqli, &$f) +{ + generic_save($mysqli, $f, "fairs", "id"); +} + +function fair_create($mysqli) +{ + /* 128 char password in base64 so no mysql funniness is necessary */ + $p = base64_encode(mcrypt_create_iv(96, MCRYPT_DEV_URANDOM)); + $mysqli->query("INSERT INTO fairs (`password`) VALUES ('$p')"); + $fair_id = $mysqli->insert_id; + return $fair_id; +} + +?> diff --git a/fckeditor/_documentation.html b/fckeditor/_documentation.html deleted file mode 100644 index 2bfcc251..00000000 --- a/fckeditor/_documentation.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - FCKeditor - Documentation - - - - -

    - FCKeditor Documentation

    -

    - You can find the official documentation for FCKeditor online, at - http://docs.fckeditor.net/.

    - - diff --git a/fckeditor/_upgrade.html b/fckeditor/_upgrade.html deleted file mode 100644 index d38e3a9d..00000000 --- a/fckeditor/_upgrade.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - FCKeditor - Upgrade - - - - -

    - FCKeditor Upgrade

    -

    - Please check the following URL for notes regarding upgrade:
    - - http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Installation/Upgrading

    - - diff --git a/fckeditor/_whatsnew.html b/fckeditor/_whatsnew.html deleted file mode 100644 index a34e704b..00000000 --- a/fckeditor/_whatsnew.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - FCKeditor ChangeLog - What's New? - - - - -

    - FCKeditor ChangeLog - What's New?

    -

    - Version 2.6.3

    -

    - Fixed Bugs:

    -
      -
    • [#2412] FCK.InsertHtml() - is now properly removing selected contents after content insertion in Firefox.
    • -
    • [#2420] Spelling - mistake corrections made by the spell checking dialog are now undoable.
    • -
    • [#2411] Insert - anchor was not working for non-empty selections.
    • -
    • [#2426] It was - impossible to switch between editor areas with a single click.
    • -
    • Language file updates for the following languages: -
        -
      • Canadian French
      • -
      • [#2402] Catalan -
      • -
      • [#2400] Chinese - (Simplified and Traditional)
      • -
      • [#2401] Croatian
      • -
      • [#2422] Czech
      • -
      • [#2417] Dutch
      • -
      • [#2428] French
      • -
      • German
      • -
      • [#2427] Hebrew
      • -
      • [#2410] Hindi
      • -
      • [#2405] Japanese
      • -
      • [#2409] Norwegian - and Norwegian BokmÃ¥l
      • -
      • [#2429] Spanish
      • -
      • [#2406] Vietnamese
      • -
      -
    • -
    -

    - This version has been sponsored by Data Illusion - survey software solutions.

    -

    - Version 2.6.3 Beta

    -

    - New Features and Improvements:

    -
      -
    • [#439] Added a - new context menu option for opening links in the editor.
    • -
    • [#2220] - Email links from the Link dialog are now encoded by default - to prevent being harvested by spammers. (Kudos to asuter for proposing the patch) -
    • -
    • [#2234] Added - the ability to create, modify and remove DIV containers.
    • -
    • [#2247] The - SHIFT+SPACE keystroke will now produce a &nbsp; character. -
    • -
    • [#2252] It's - now possible to enable the browsers default menu using the configuration file (FCKConfig.BrowserContextMenu - option).
    • -
    • [#2032] Added - HTML samples for legacy HTML and Flash HTML.
    • -
    • [#234] Introduced - the "PreventSubmitHandler" setting, which makes it possible to instruct the editor - to not handle the hidden field update on form submit events.
    • -
    -

    - Fixed Bugs:

    -
      -
    • [#2319] On Opera - and Firefox 3, the entire page was scrolling on SHIFT+ENTER, or when EnterMode='br'.
    • -
    • [#2321] On Firefox - 3, the entire page was scrolling when inserting block elements with the FCK.InsertElement - function, used by the Table and Horizontal Rule buttons..
    • -
    • [#692] Added some - hints in editor/css/fck_editorarea.css on how to handle style items that would break - the style combo.
    • -
    • [#2263] Fixed - a JavaScript error in IE which occurs when there are placeholder elements in the - document and the user has pressed the Source button.
    • -
    • [#2314] Corrected - mixed up Chinese translations for the blockquote command.
    • -
    • [#2323] Fixed - the issue where the show blocks command loses the current selection from the view - area when editing a long document.
    • -
    • [#2322] Fixed - the issue where the fit window command loses the current selection and scroll position - in the editing area.
    • -
    • [#1917] Fixed - the issue where the merge down command for tables cells does not work in IE for - more than two cells.
    • -
    • [#2320] Fixed - the issue where the Find/Replace dialog scrolls the entire page.
    • -
    • [#1645] Added - warning message about Firefox 3's strict origin policy.
    • -
    • [#2272] Improved - the garbage filter in Paste from Word dialog.
    • -
    • [#2327] Fixed - invalid HTML in the Paste dialog.
    • -
    • [#1907] Fixed - sporadic "FCKeditorAPI is not defined" errors in Firefox 3.
    • -
    • [#2356] Fixed - access denied error in IE7 when FCKeditor is launched from local filesystem.
    • -
    • [#1150] Fixed - the type="_moz" attribute that sometimes appear in <br> tags in non-IE browsers.
    • -
    • [#1229] Converting - multiple contiguous paragraphs to Formatted will now be merged into a single <PRE> - block.
    • -
    • [#2363] There - were some sporadic "Permission Denied" errors with IE on some situations.
    • -
    • [#2135] Fixed - a data loss bug in IE when there are @import statements in the editor's CSS files, - and IE's cache is set to "Check for newer versions on every visit".
    • -
    • [#2376] FCK.InsertHtml() - will now insert to the last selected position after the user has selected things - outside of FCKeditor, in IE.
    • -
    • [#2368] Fixed - broken protect source logic for comments in IE.
    • -
    • [#2387] Fixed - JavaScript error with list commands when the editable document is selected with - Ctrl-A.
    • -
    • [#2390] Fixed - the issue where indent styles in JavaScript-generated <p> blocks are erased - in IE.
    • -
    • [#2394] Fixed - JavaScript error with the "split vertically" command in IE when attempting to split - cells in the last row of a table.
    • -
    • [#2316] The sample - posted data page has now the table fixed at 100% width.
    • -
    • [#2396] SpellerPages - was causing a "Permission Denied" error in some situations.
    • -
    -

    - See previous versions history

    - - diff --git a/fckeditor/_whatsnew_history.html b/fckeditor/_whatsnew_history.html deleted file mode 100644 index 30e1ada1..00000000 --- a/fckeditor/_whatsnew_history.html +++ /dev/null @@ -1,3787 +0,0 @@ - - - - - FCKeditor ChangeLog - What's New? - - - - -

    - FCKeditor ChangeLog - What's New?

    -

    - Version 2.6.2

    -

    - New Features and Improvements:

    -
      -
    • [#2043] The debug - script is not any more part of the compressed files. If FCKeditor native debugging - features (FCKDebug) are required, the _source folder must be present in your installation.
    • -
    -

    - Fixed Bugs:

    -
      -
    • [#2248] Calling - FCK.InsertHtml( 'nbsp;') was inserting a plain space instead of a non breaking space - character.
    • -
    • [#2273] The dragresizetable - plugin now works in Firefox 3 as well.
    • -
    • [#2254] Minor - fix in FCKSelection for nodeTagName object.
    • -
    • [#1614] Unified - FCKConfig.FullBasePath with FCKConfig.BasePath.
    • -
    • [#2127] Changed - floating dialogs to use fixed positioning so that they are no longer affected by - scrolling.
    • -
    • [#2018] Reversed - the fix for #183 - which broke FCKeditorAPI's cleanup logic. A new configuration directive MsWebBrowserControlCompat - has been added for those who wish to force the #183 fix to be enabled.
    • -
    • [#2276] [#2279] On Opera - and Firefox 3, the entire page was scrolling on ENTER.
    • -
    • [#2149] CSS urls - with querystring parameters were not being accepted for CSS values in the configuration - file (like EditorAreaCSS).
    • -
    • [#2287] On some - specific cases, with Firefox 2, some extra spacing was appearing in the final HTML - on posting, if inserting two successive tables.
    • -
    • [#2287] Block - elements (like tables or horizontal rules) will be inserted correctly now when the - cursor is at the start or the end of blocks. No extra paragraphs will be included - in this operation.
    • -
    • [#2197] The TAB - key will now have the default browser behavior if TabSpaces=0. It will move the - focus out of the editor (expect on Safari).
    • -
    • [#2296] Fixed - permission denied error on clicking on files in the file browser.
    • -
    -

    - Version 2.6.1

    -

    - New Features and Improvements:

    -
      -
    • [#2150] The searching - speed of the Find/Replace dialog has been vastly improved.
    • -
    • New language file for Gujarati (by Nilam Doctor).
    • -
    • A new TabIndex property has been added to the JavaScript integration files.
    • -
    • [#2215] Following - the above new feature, the ReplaceTextarea method will now copy the textarea.tabIndex - value if available.
    • -
    • [#2163] If the - FCKConfig.DocType setting points to a HTML DocType then the output won't generate - self-closing tags (it will output <img > instead of <img />).
    • -
    • [#2173] A throbber - will be shown in the Quick Uploads.
    • -
    • [#2142] HTML - samples will now use sampleposteddata.php in action parameter inside a form.
    • -
    -

    - Fixed Bugs:

    -
      -
    • [#768] It is no - longer possible for an image to have its width and height defined with both HTML - attributes and inline CSS styles in IE.
    • -
    • [#1426] Fixed - the error loading fckstyles.xml in servers which cannot return the correct content - type header for .xml files.
    • -
    • [#2102] Fixed - FCKConfig.DocType which stopped working in FCKeditor 2.6.
    • -
    • [#2039] Fixed - the locking up issue in the Find/Replace dialog.
    • -
    • [#2124] PHP File - Browser: fixed issue with resolving paths on Windows servers with PHP 5.2.4/5.2.5.
    • -
    • [#2059] Fixed - the error in the toolbar name in fckeditor.py.
    • -
    • [#2065] Floating - dialogs will now block the user from re-selecting the editing area by pressing Tab.
    • -
    • [#2114] Added - a workaround for an IE6 bug which causes floating dialogs to appear blank after - opening it for the first time.
    • -
    • [#2136] Fixed - JavaScript error in IE when opening the bullet list properties dialog.
    • -
    • [#1633] External - styles should no longer interfere with the appearance of the editor and floating - panels now.
    • -
    • [#2113] Fixed - unneeded <span class="Apple-style-span"> created after inserting - special characters.
    • -
    • [#2170] Fixed - Ctrl-Insert hotkey for copying.
    • -
    • [#2125] Fixed - the issue that FCK.InsertHtml() doesn't insert contents at the caret position when - dialogs are opened in IE.
    • -
    • [#1764] FCKeditor - will no longer catch focus in IE on load when StartupFocus is false and the initial - content is empty.
    • -
    • [#2126] Opening - and closing floating dialogs will no longer cause toolbar button states to become - frozen.
    • -
    • [#2159] Selection - are now correctly restored when undoing changes made by the Replace dialog.
    • -
    • [#2160] "Match - whole word" in the Find and Replace dialog will now find words next to punctuation - marks as well.
    • -
    • [#2162] If the - configuration is set to work including the <head> (FullPage), references to - stylesheets added by Firefox extensions won't be added to the output.
    • -
    • [#2168] Comments - won't generate new paragraphs in the output.
    • -
    • [#2184] Fixed - several validation errors in the File Browser.
    • -
    • [#1383] Fixed - an IE issue where pressing backspace may merge a hyperlink on the previous line - with the text on the current line.
    • -
    • [#1691] Creation - of links in Safari failed if there was no selection.
    • -
    • [#2188] PreserveSessionOnFileBrowser - is now removed as it was made obsolete with 2.6.
    • -
    • [#898] The styles - for the editing area are applied in the image preview dialog.
    • -
    • [#2056] Fixed - several validation errors in the dialogs.
    • -
    • [#2063] Fixed - some problems in asp related to the use of network paths for the location of the - uploaded files.
    • -
    • [#1593] The "Sample - Posted Data" page will now properly wrap the text.
    • -
    • [#2239] The PHP - code in sampleposteddata.php has been changed from "<?=" to "<? echo".
    • -
    • [#2241] Fixed - 404 error in floating panels when FCKeditor is installed to a different domain.
    • -
    • [#2066] Added - a workaround for a Mac Safari 3.1 browser bug which caused the Fit Window button - to give a blank screen.
    • -
    • [#2218] Improved - Gecko based browser detection to accept Epiphany/Gecko as well.
    • -
    • [#2193] Fixed - the issue where the caret cannot reach the last character of a paragraph in Opera - 9.50.
    • -
    • [#2264] Fixed - empty spaces that appear at the top of the editor in Opera 9.50.
    • -
    • [#2238] The <object> - placeholder was not being properly displayed in the compressed distribution version - and nightly builds.
    • -
    • [#2115] Fixed - JavaScript (permission denied) error in Firefox when file has been uploaded.
    • -
    -

    - Version 2.6

    -

    - No changes. The stabilization of the 2.6 RC was completed successfully, as expected.

    -

    - Version 2.6 RC

    -

    - New Features and Improvements:

    -
      -
    • [#2017] The FCKeditorAPI.Instances - object can now be used to access all FCKeditor instances available in the page.
    • -
    • [#1980] Attention: By default, the editor now produces <strong> - and <em> instead of <b> and <i>.
    • -
    -

    - Fixed Bugs:

    -
      -
    • [#1924] The dialog - close button is now correctly positioned in IE in RTL languages.
    • -
    • [#1933] Placeholder - dialog will now display the placeholder value correctly in IE.
    • -
    • [#957] Pressing - Enter or typing after a placeholder with the placeholder plugin will no longer generate - colored text.
    • -
    • [#1952] Fixed - an issue in FCKTools.FixCssUrls that, other than wrong, was breaking Opera.
    • -
    • [#1695] Removed - Ctrl-Tab hotkey for Source mode and allowed Ctrl-T to work in Firefox.
    • -
    • [#1666] Fixed - permission denied errors during opening popup menus in IE6 under domain relaxation - mode.
    • -
    • [#1934] Fixed - JavaScript errors when calling Selection.EnsureSelection() in dialogs.
    • -
    • [#1920] Fixed - SSL warning message when opening image and flash dialogs under HTTPS in IE6.
    • -
    • [#1955] [#1981] [#1985] [#1989] - Fixed XHTML source formatting errors in non-IE browsers.
    • -
    • [#2000] The # - character is now properly encoded in file names returned by the File Browser.
    • -
    • [#1945] New folders - and file names are now properly sanitized against control characters.
    • -
    • [#1944] Backslash - character is now disallowed in current folder path.
    • -
    • [#1055] Added - logic to override JavaScript errors occurring inside the editing frame due to user - added JavaScript code.
    • -
    • [#1647] Hitting - ENTER on list items containing block elements will now create new list item elements, - instead of adding further blocks to the same list item.
    • -
    • [#1411] Label - only combos now get properly grayed out when moving to source view.
    • -
    • [#2009] Fixed - an important bug regarding styles removal on styled text boundaries, introduced - with the 2.6 Beta 1.
    • -
    • [#2011] Internal - CSS <style> tags where being outputted when FullPage=true.
    • -
    • [#2016] The Link - dialog now properly selects the first field when opening it to modify mailto or - anchor links. This problem was also throwing an error in IE.
    • -
    • [#2021] The caret - will no longer remain behind in the editing area when the placeholder dialog is - opened.
    • -
    • [#2024] Fixed - JavaScript error in IE when the user tries to open dialogs in Source mode.
    • -
    • [#1853] Setting - ShiftEnterMode to p or div now works correctly when EnterMode is br.
    • -
    • [#1838] Fixed - the issue where context menus sometimes don't disappear after selecting an option. -
    • -
    • [#2028] Fixed - JavaScript error when EnterMode=br and user tries to insert a page break.
    • -
    • [#2002] Fixed - the issue where the maximize editor button does not vertically expand the editing - area in Firefox.
    • -
    • [#1842] PHP integration: - fixed filename encoding problems in file browser.
    • -
    • [#1832] Calling - FCK.InsertHtml() in non-IE browsers would now activate the document processor as - expected.
    • -
    • [#1998] The native - XMLHttpRequest class is now used in IE, whenever it is available.
    • -
    • [#1792] In IE, - the browser was able to enter in an infinite loop when working with multiple editors - in the same page.
    • -
    • [#1948] Some - CSS rules are reset to dialog elements to avoid conflict with the page CSS.
    • -
    • [#1965] IE was - having problems with SpellerPages, causing some errors to be thrown when completing - the spell checking in some situations.
    • -
    • [#2042] The FitWindow - command was throwing an error if executed in an editor where its relative button - is not present in the toolbar.
    • -
    • [#922] Implemented - a generic document processor for <OBJECT> and <EMBED> tags.
    • -
    • [#1831] Fixed - the issue where the placeholder icon for <EMBED> tags does not always show - up in IE7.
    • -
    • [#2049] Fixed - a deleted cursor CSS attribute in the minified CSS inside fck_dialog_common.js.
    • -
    • [#1806] In IE, - the caret will not any more move to the previous line when selecting a Format style - inside an empty paragraph.
    • -
    • [#1990] In IE, - dialogs using API calls which deals with the selection, like InsertHtml now can - be sure the selection will be placed in the correct position.
    • -
    • [#1997] With - IE, the first character of table captions where being lost on table creation.
    • -
    • The selection and cursor position was not being properly handled when creating some - elements like forms and tables.
    • -
    • [#662] In the - Perl sample files, the GetServerPath function will now calculate the path properly.
    • -
    • [#2208] Added - missing translations in Italian language file.
    • -
    • [#2096] Added - the codepage to basexml file. Filenames with special chars should now display properly.
    • -
    -

    - Version 2.6 Beta 1

    -

    - New Features and Improvements:

    -
      -
    • [#35] New - (and cool!) floating dialog system, avoiding problems with popup blockers - and enhancing the editor usability.
    • -
    • [#1886] - Adobe AIR compatibility.
    • -
    • [#123] Full support - for document.domain with automatic domain detection.
    • -
    • [#1622] New - inline CSS cache feature, making it possible to avoid downloading the CSS - files for the editing area and skins. For that, it is enough to set the EditorAreaCSS, - SkinEditorCSS and SkinDialogCSS to string values in the format "/absolute/path/for/urls/|<minified - CSS styles". All internal CSS links are already using this feature.
    • -
    • New language file for Canadian French.
    • -
    -

    - Fixed Bugs:

    -
      -
    • [#1643] Resolved - several "strict warning" messages in Firefox when running FCKeditor.
    • -
    • [#1522] The ENTER - key will now work properly in IE with the cursor at the start of a formatted block.
    • -
    • [#1503] It's - possible to define in the Styles that a Style (with an empty class) must be shown - selected only when no class is present in the current element, and selecting that - item will clear the current class (it does apply to any attribute, not only classes).
    • -
    • [#191] The scrollbars - are now being properly shown in Firefox Mac when placing FCKeditor inside a hidden - div.
    • -
    • [#503] Orphaned - <li> elements now get properly enclosed in a <ul> on output.
    • -
    • [#309] The ENTER - key will not any more break <button> elements at the beginning of paragraphs.
    • -
    • [#1654] The editor - was not loading on a specific unknown situation. The breaking point has been removed.
    • -
    • [#1707] The editor - no longer hangs when operating on documents imported from Microsoft Word.
    • -
    • [#1514] Floating - panels attached to a shared toolbar among multiple FCKeditor instances are no longer - misplaced when the editing areas are absolutely or relatively positioned.
    • -
    • [#1715] The ShowDropDialog - is now enforced only when ForcePasteAsPlainText = true.
    • -
    • [#1336] Sometimes - the autogrow plugin didn't work properly in Firefox.
    • -
    • [#1728] External - toolbars are now properly sized in Opera.
    • -
    • [#1782] Clicking - on radio buttons or checkboxes in the editor in IE will no longer cause lockups - in IE.
    • -
    • [#805] The FCKConfig.Keystrokes - commands where executed even if the command itself was disabled.
    • -
    • [#982] The button - to empty the box in the "Paste from Word" has been removed as it leads to confusion - for some users.
    • -
    • [#1682] Editing - control elements in Firefox, Opera and Safari now works properly.
    • -
    • [#1613] The editor - was surrounded by a <div> element that wasn't really needed.
    • -
    • [#676] If a form - control was moved in IE after creating it, then it did lose its name.
    • -
    • [#738] It wasn't - possible to change the type of an existing button.
    • -
    • [#1854] Indentation - now works inside table cells.
    • -
    • [#1717] The editor - was entering on looping on some specific cases when dealing with invalid source - markup.
    • -
    • [#1530] Pasting - text into the "Find what" fields in the Find and Replace dialog would now activate - the find and replace buttons.
    • -
    • [#1828] The Find/Replace - dialog will no longer display wrong starting positions for the match when there - are multiple and identical characters preceding the character at the real starting - point of the match.
    • -
    • [#1878] Fixed - a JavaScript error which occurs in the Find/Replace dialog when the user presses - "Find" or "Replace" after the "No match found" message has appeared.
    • -
    • [#1355] Line - breaks and spaces are now conserved when converting to and from the "Formatted" - format.
    • -
    • [#1670] Improved - the background color behind smiley icons and special characters in their corresponding - dialogs.
    • -
    • [#1693] Custom - error messages are now properly displayed in the file browser.
    • -
    • [#970] The text - and value fields in the selection box dialog will no longer extend beyond the dialog - limits when the user inputs a very long text or value for one of the selection options.
    • -
    • [#479] Fixed the - issue where pressing Enter in an <o:p> tag in IE does not generate line breaks.
    • -
    • [#481] Fixed the - issue where the image preview in image dialog sometimes doesn't display after selecting - the image from server browser.
    • -
    • [#1488] PHP integration: - the FCKeditor class is now more PHP5/6 friendly ("public" keyword is used instead - of depreciated "var").
    • -
    • [#1815] PHP integration: - removed closing tag: "?>", so no additional whitespace added when files are included.
    • -
    • [#1906] PHP file - browser: fixed problems with DetectHtml() function when open_basedir was set.
    • -
    • [#1871] PHP file - browser: permissions applied with the chmod command are now configurable.
    • -
    • [#1872] Perl - file browser: permissions applied with the chmod command are now configurable.
    • -
    • [#1873] Python - file browser: permissions applied with the chmod command are now configurable.
    • -
    • [#1572] ColdFusion - integration: fixed issues with setting the editor height.
    • -
    • [#1692] ColdFusion - file browser: it is possible now to define TempDirectory to avoid issues with GetTempdirectory() - returning an empty string.
    • -
    • [#1379] ColdFusion - file browser: resolved issues with OnRequestEnd.cfm breaking the file browser.
    • -
    • [#1509] InsertHtml() - in IE will no longer turn the preceding normal whitespace into &nbsp;.
    • -
    • [#958] The AddItem - method now has an additional fifth parameter "customData" that will be sent to the - Execute method of the command for that menu item, allowing a single command to be - used for different menu items..
    • -
    • [#1502] The RemoveFormat - command now also removes the attributes from the cleaned text. The list of attributes - is configurable with FCKConfig.RemoveAttributes.
    • -
    • [#1596] On Safari, - dialogs have now right-to-left layout when it runs a RTL language, like Arabic.
    • -
    • [#1344] Added - warning message on Copy and Cut operation failure on IE due to paste permission - settings.
    • -
    • [#1868] Links - to file browser has been changed to avoid requests containing double dots.
    • -
    • [#1229] Converting - multiple contiguous paragraphs to Formatted will now be merged into a single <PRE> - block.
    • -
    • [#1627] Samples - failed to load from local filesystem in IE7.
    • -
    -

    - Version 2.5.1

    -

    - New Features and Improvements:

    -
      -
    • FCKeditor.Net 2.5 compatibility.
    • -
    • JavaScript integration file: -
        -
      • The new "FCKeditor.ReplaceAllTextareas" function is being introduced, - making it possible to replace many (or unknown) <textarea> elements in a single - call. The replacement can be also filtered by CSS class name, or by a custom function - evaluator.
      • -
      • It is now possible to set the default BasePath for all editor instances by setting - FCKeditor.BasePath. This is extremely useful when working with - the ReplaceAllTextareas function.
      • -
      -
    • -
    -

    - Fixed Bugs:

    -
      -
    • [#339] [#681] The SpellerPages - spell checker will now completely ignore the presence of HTML tags in the text. -
    • -
    • [#1643] Resolved - several "strict warning" messages in Firefox when running FCKeditor.
    • -
    • [#1603] Certain - specific markup was making FCKeditor entering in a loop, blocking its execution. -
    • -
    • [#1664] The ENTER - key will not any more swap the order of the tags when hit at the end of paragraphs. -
    • -
    -

    - Version 2.5

    -

    - New Features and Improvements:

    -
      -
    • The heading options have been moved to the top, in the default settings for the - Format combo.
    • -
    -

    - Fixed Bugs:

    -
      -
    • The focus is now correctly set when working on Safari.
    • -
    • [#1436] Nested - context menu panels are now correctly closed on Safari.
    • -
    • Empty anchors are now properly created on Safari.
    • -
    • [#1359] FCKeditor - will no longer produce the strange visual effect of creating a selected space and - then deleting it in Internet Explorer.
    • -
    • [#1399] Removed - the empty entry in the language selection box of sample03.html.
    • -
    • [#1400] Fixed - the issue where the style selection box in sample14.html is not context sensitive.
    • -
    • [#1401] Completed - Hebrew translation of the user interface.
    • -
    • [#1409] Completed - Finnish translation of the user interface.
    • -
    • [#1414] Fixed - the issue where entity code words written inside a <pre> block in Source mode - are not converted to the corresponding characters after switching back to editor - mode.
    • -
    • [#1418] Fixed - the issue where a detached toolbar would flicker when FCKeditor is being loaded.
    • -
    • [#1419] Fixed - the issue where pressing Delete in the middle of two lists would incorrectly move - contents after the lists to the character position.
    • -
    • [#1420] Fixed - the issue where empty list items can become collapsed and uneditable when it has - one of more indented list items directly under it.
    • -
    • [#1431] Fixed - the issue where pressing Enter in a <pre> block in Internet Explorer would - move the caret one space forward instead of sending it to the next line.
    • -
    • [#1472] Completed - Arabic translation of the user interface.
    • -
    • [#1474] Fixed - the issue where reloading a page containing FCKeditor may provoke JavaScript errors - in Internet Explorer.
    • -
    • [#1478] Fixed - the issue where parsing fckstyles.xml fails if the file contains no <style> - nodes.
    • -
    • [#1491] Fixed - the issue where FCKeditor causes the selection to include an "end of line" character - in list items even though the list item is empty.
    • -
    • [#1496] Fixed - the issue where attributes under <area> and <map> nodes are destroyed - or left unprotected when switching to and from Source mode.
    • -
    • [#1500] Fixed - the issue where the function _FCK_PaddingNodeListener() is called excessively which - negatively affects performance.
    • -
    • [#1514] Fixed - the issue where floating menus are incorrectly positioned when the toolbar or the - editor frame are not static positioned.
    • -
    • [#1518] Fixed - the issue where excessive <BR> nodes are not removed after a paragraph is - split when creating lists.
    • -
    • [#1521] Fixed - JavaScript error and erratic behavior of the Replace dialog.
    • -
    • [#1524] Fixed - the issue where the caret jumps to the beginning or end of a list block and when - user is trying to select the end of a list item.
    • -
    • Completed Simplified Chinese translation of the user interface.
    • -
    • Completed Estonian translation of the user interface.
    • -
    • [#1406] Editor - was always "dirty" if flash is available in the contents.
    • -
    • [#1561] Non standard - elements are now properly applied if defined in the styles XML file.
    • -
    • [#1412] The _QuickUploadLanguage - value is now work properly for Perl.
    • -
    • Several compatibility fixes for Firefox 3 (Beta 1): -
        -
      • [#1558] Nested - context menu close properly when one of their options is selected.
      • -
      • [#1556] Dialogs - contents are now showing completely, without scrollbar.
      • -
      • [#1559] It is - not possible to have more than one panel opened at the same time.
      • -
      • [#1554] Links - now get underlined.
      • -
      • [#1557] The "Automatic" - and "More colors..." buttons were improperly styled in the color selector panels - (Opera too).
      • -
      • [#1462] The enter - key will not any more scroll the main window.
      • -
      -
    • -
    • [#1562] Fixed - the issue where empty paragraphs are added around page breaks each time the user - switches to Source mode.
    • -
    • [#1578] The editor - will now scroll correctly when hitting enter in front of a paragraph.
    • -
    • [#1579] Fixed - the issue where the create table and table properties dialogs are too narrow for - certain translations.
    • -
    • [#1580] Completed - Polish translation of the user interface.
    • -
    • [#1591] Fixed - JavaScript error when using the blockquote command in an empty document in IE.
    • -
    • [#1592] Fixed - the issue where attempting to remove a blockquote with an empty paragraph would - leave behind an empty blockquote IE.
    • -
    • [#1594] Undo/Redo - will now work properly for the color selectors.
    • -
    • [#1597] The color - boxes are now properly rendered in the color selector panels on sample14.html.
    • -
    -

    - Version 2.5 Beta

    -

    - New Features and Improvements:

    -
      -
    • [#624] [#634] [#1300] [#1301] - Official compatibility support with Opera 9.50 and Safari 3 - (WebKit based browsers actually). These browsers are still in Beta, but we are confident - that we'll have amazing results as soon as they get stable. We are continuously - collaborating with Opera Software and Apple to bring a wonderful FCKeditor experience - over their browser platforms.
    • -
    • [#494] Introduced - the new Style System. We are not anymore relaying on browser features - to apply and remove styles, which guarantees that the editor will behave in - the same way in all browsers. It is an incredibly flexible system, - which aims to fit all developer's needs, from Flash content or HTML4 to XHTML 1.0 - Strict or XHTML 1.1: -
        -
      • All basic formatting features, like Bold and Italic, can be precisely controlled - by using the configuration file (CoreStyles setting). It means that now, - the Bold button, for example, can produce <b>, <strong>, <span class...>, - <span style...> or anything the developer prefers.
      • -
      • Again with the CoreStyles setting, each block format, font, size, and even - the color pickers can precisely reflect end developer's needs.
      • -
      • Because of the above changes, font sizes are much more flexible. Any kind of - font unit can be used, including a mix of units.
      • -
      • All styles, including toolbar bottom styles, are precisely controlled when being - applied to the document. FCKeditor uses an element table derived from the W3C XHTML - DTDs to precisely create the elements, guarantee standards compliant code.
      • -
      • No more <font> tags... well... actually, the system is so flexible - that it is up to you to use them or not.
      • -
      • It is possible to configure FCKeditor to produce a truly semantic aware and - XHTML 1.1 compliant code. Check out sample14.html.
      • -
      • It's also possible to precisely control which inline elements must be removed with - the "Remove All" button, by using the "RemoveFormatTags" - setting.
      • -
      • [#1231] [#160] Paragraph indentation - and justification now uses style attributes and don't create unnecessary - elements, and <blockquote> is not anymore used for it. Now, even CSS classes - can be used to indent or align text.
      • -
      • All paragraph formatting features work well when EnterMode=br.
      • -
      • [#172] All paragraph - formatting features work well when list items too.
      • -
      -
    • -
    • [#1197] [#132] The toolbar - now presents a new button for Blockquote. The indentation button - will not anymore be used for that.
    • -
    • [#125] Table's - columns size can now be changed by dragging on cell borders, with - the "dragresizetable" plugin.
    • -
    • The EditorAreaCSS config option can now also be set to a string of paths separated - by commas.
    • -
    • [#212] New "Show - Blocks" command button in toolbar to show block details in the editing - area.
    • -
    • [#915] The - undo/redo system has been revamped to work the same across Internet Explorer - and Gecko-based browsers (e.g. Firefox). A number of critical bugs in the undo/redo - system are also fixed.
    • -
    • [#194] The editor - now uses the Data Processor technology, which makes it possible - to handle different input formats. A sample of it may be found at "editor/plugins/bbcode/_sample", - that shows some simple BBCode support.
    • -
    • [#145] The "htaccess.txt" - file has been renamed to ".htaccess" as it doesn't bring security concerns, being - active out of the box.
    • -
    • File Browser and Quick Upload changes: -
        -
      • [#163] Attention: The default connector - in fckconfig.js has been changed from ASP to PHP. If you are using ASP remember - to change the _FileBrowserLanguage and _QuickUploadLanguage settings in your fckconfig.js. - [#454] The file - browser and upload connectors have been unified so they can reuse the same configuration - settings.
      • -
      • [#865] The ASP - and PHP connectors have been improved so it's easy to select the location of the - destination folder for each file type, and it's no longer necessary to use the "file", - "image", "flash" subfolders
        - Attention: The location of - all the connectors have been changed in the fckconfig.js file. Please check your - settings to match the current ones. Also review carefully the config file for your - server language.
      • -
      • [#688] Now the - Perl quick upload is available.
      • -
      • [#575] The Python - connector has been rewritten as a WSGI app to be fully compatible with the latest - python frameworks and servers. The QuickUpload feature has been added as well as - all the features available in the PHP connector. Thanks to Mariano Reingart.
      • -
      • [#561] The ASP - connector provides an AbsolutePath setting so it's possible to set the url to a - full domain or a relative path and specify that way the physical folder where the - files are stored..
      • -
      • [#333] The Quick - Upload now can use the same ServerPath parameter as the full connector.
      • -
      • [#199] The AllowedCommands - configuration setting is available in the asp and php connectors so it's possible - to disallow the upload of files (although the "select file" button will still be - available in the file browser).
      • -
      -
    • -
    • [#100] A new configuration - directive "FCKConfig.EditorAreaStyles" has been implemented to allow setting editing - area styles from JavaScript.
    • -
    • [#102] HTML code - generated by the "Paste As Plain Text" feature now obeys the EnterMode setting.
    • -
    • [#1266] Introducing - the HtmlEncodeOutput setting to instruct the editor to HTML-encode some characters - (&, < and >) in the posted data.
    • -
    • [#357] Added a - "Remove Anchor" option in the context menu for anchors.
    • -
    • [#1060] Compatibility - checks with Firefox 3.0 Alpha.
    • -
    • [#817] [#1077] New "Merge - Down/Right" commands for merging tables cells in non-Gecko browsers.
    • -
    • [#1288] The "More - Colors..." button in color selector popup has been made optional and configurable - by the EnableMoreFontColors option.
    • -
    • [#356] The - Find and Replace dialogs are now unified into a single dialog with tabs.
    • -
    • [#549] Added a - 'None' option to the FCKConfig.ToolbarLocation option to allow for hidden toolbars. -
    • -
    • [#1313] An XHTML - 1.1 target editor sample has been created as sample14.html.
    • -
    • The ASP, ColdFusion and PHP integration have been aligned to our standards.
    • -
    -

    - Fixed Bugs:

    -
      -
    • [#71] [#243] [#267] - The editor now takes care to not create invalid nested block elements, like creating - <form> or <hr> inside <p>.  
    • -
    • [SF - Patch 1511298] The CF Component failed on CFMX 6.0
    • -
    • [#639] If the - FCKConfig.DefaultLinkTarget setting was missing in fckconfig.js the links has target="undefined".
    • -
    • [#497] Fixed EMBED - attributes handling in IE.
    • -
    • [SF - Patch 1315722] Avoid getting a cached version of the folder contents after uploading - a file
    • -
    • [SF - Patch 1386086] The php connector has been protected so mkdir doesn't fail if - there are double slashes.
    • -
    • [#943] The PHP - connector now specifies that the included files are relative to the current path.
    • -
    • [#560] The PHP - connector will work better if the connector or the userfiles folder is a symlink.
    • -
    • [#784] Fixed a - non initialized $php_errormsg in the PHP connector.
    • -
    • [#802] The replace - dialog will now advance its searching position correctly and is able to search for - strings spanning across multiple inline tags.
    • -
    • [#944] The _samples - didn't work directly from the Mac filesystem.
    • -
    • [#946] Toolbar - images didn't show in non-IE browsers if the path contained a space.
    • -
    • [#291] [#395] [#932] Clicking outside the editor - it was possible to paste or apply formatting to the rest of the page in IE.
    • -
    • [#137] Fixed FCKConfig.TabSpaces - being ignored, and weird behaviors when pressing tab in edit source mode.
    • -
    • [#268] Fixed special - XHTML characters present in event attribute values being converted inappropriately - when switching to source view.
    • -
    • [#272] The toolbar - was cut sometimes in IE to just one row if there are multiple instances of the editor.
    • -
    • [#515] Tables - in Firefox didn't inherit font styles properly in Standards mode.
    • -
    • [#321] If FCKeditor - is initially hidden in Firefox it will no longer be necessary to call the oEditor.MakeEditable() - function.
    • -
    • [#299] The 'Browse - Server' button in the Image and Flash dialogs was a little too high.
    • -
    • [#931] The BodyId - and BodyClass configuration settings weren't applied in the preview window.
    • -
    • [#583] The "noWrap" - attribute for table cells was getting an empty value in Firefox. Thanks to geirhelge.
    • -
    • [#141] Fixed incorrect - startup focus in Internet Explorer after page reloads.
    • -
    • [#143] Fixed browser - lockup when the user writes <!--{PS..x}> into the editor in source mode.
    • -
    • [#174] Fixed incorrect - positioning of FCKeditor in full screen mode.
    • -
    • [#978] Fixed a - SpellerPages error with ColdFusion when no suggestions where available for a word.
    • -
    • [#977] The "shape" - attribute of <area> had its value changed to uppercase in IE.
    • -
    • [#996] "OnPaste" - event listeners will now get executed only once.
    • -
    • [#289] Removed - debugging popups from page load regarding JavaScript and CSS loading errors.
    • -
    • [#328] [#346] [#404] Fixed a number of problems - regarding <pre> blocks: -
        -
      1. Leading whitespaces and line breaks in <pre> blocks are trimmed when the user - switches between editor mode and source mode;
      2. -
      3. Pressing Enter inside a <pre> block would split the block into two, but the - expected behavior is simply inserting a line break;
      4. -
      5. Simple line breaks inside <pre> blocks entered in source mode are being turned - into <br> tags when the user switches to editor mode and back.
      6. -
      -
    • -
    • [#581] Fixed the - issue where the "Maximize the editor size" toolbar button stops working if any of - the following occurs: -
        -
      1. There exists a form input whose name or id is "style" in FCKeditor's host form;
      2. -
      3. There exists a form input whose name or id is "className" in FCKeditor's host form;
      4. -
      5. There exists a form and a form input whose name of id is "style" in the editing - frame.
      6. -
      -
    • -
    • [#183] Fixed the - issue when FCKeditor is being executed in a custom application with the WebBrowser - ActiveX control, hiding the WebBrowser control would incorrectly invoke FCKeditor's - cleanup routines, causing FCKeditor to stop working.
    • -
    • [#539] Fixed the - issue where right clicking on a table inside the editing frame in Firefox would - cause the editor the scroll to the top of the document.
    • -
    • [#523] Fixed the - issue where, under certain circumstances, FCKeditor would obtain focus at startup - even though FCKConfig.StartupFocus is set to false.
    • -
    • [#393] Fixed the - issue where if an inline tag is at the end of the document, the user would have - no way of escaping from the inline tag if he continues typing at the end of the - document. FCKeditor's behaviors regarding inline tags has been made to be more like - MS Word's: -
        -
      1. If the caret is moved to the end of a hyperlink by the keyboard, then hyperlink - mode is disabled.
      2. -
      3. If the caret is moved to the end of other styled inline tags by any key other than - the End key (like bold text or italic text), the original bold/italic/... modes - would continue to be effective.
      4. -
      5. If the caret is moved to the end of other styled inline tags by the End key, all - style tag modes (e.g. bold, italic, underline, etc.) would be canceled. This is - not consistent with MS Word, but provides a convenient way for the user to escape - the inline tag at the end of a line.
      6. -
      -
    • -
    • [#338] Fixed the - issue where the configuration directive FCKConfig.ForcePasteAsPlainText is ignored - when new contents are pasted into the editor via drag-and drop from outside of the - editor.
    • -
    • [#1026] Fixed - the issue where the cursor or selection positions are not restored with undo/redo - commands correctly in IE, under some circumstances.
    • -
    • [#1160] [#1184] Home, End - and Tab keys are working properly for numeric fields in dialogs.
    • -
    • [#68] The style - system now properly handles Format styles when EnterMode=br.
    • -
    • [#525] The union - of successive DIVs will work properly now if EnterMode!=div.
    • -
    • [#1227] The color - commands used an unnecessary temporary variable. Thanks to Matthias Miller
    • -
    • [#67] [#277] [#427] - [#428] [#965] [#1178] - [#1267] The list - insertion/removal/indent/outdent logic in FCKeditor has been rewritten, such that: -
        -
      1. Text separated by <br> will always be treated as separate items during list - insertion regardless of browser;
      2. -
      3. List removal will now always obey the FCKConfig.EnterMode setting;
      4. -
      5. List indentation will be XHTML 1.1 compliant - all child elements under an <ol> - or <ul> must be <li> nodes;
      6. -
      7. IE editor hacks like <ul type="1"> will no longer appear;
      8. -
      9. Excessive <div> nodes are no longer inserted into list items due to alignment - changes.
      10. -
      -
    • -
    • [#205] Fixed the - issue where visible <br> tags at the end of paragraphs are incorrectly removed - after switching to and from source mode.
    • -
    • [#1050] Fixed - a minor PHP/XML incompatibility bug in editor/dialog/fck_docprops.html.
    • -
    • [#462] Fixed an - algorithm bug in switching from source mode to WYSIWYG mode which causes the browser - to spin up and freeze for broken HTML code inputs.
    • -
    • [#1019] Table - command buttons are now disabled when the current selection is not inside a table.
    • -
    • [#135] Fixed the - issue where context menus are misplaced in FCKeditor when FCKeditor is created inside - a <div> node with scrolling.
    • -
    • [#1067] Fixed - the issue where context menus are misplaced in Safari when FCKeditor is scrolled - down.
    • -
    • [#1081] Fixed - the issue where undoing table deletion in IE7 would cause JavaScript errors.
    • -
    • [#1061] Fixed - the issue where backspace and delete cannot delete special characters in Firefox - under some circumstances.
    • -
    • [#403] Fixed the - issue where switching to and from source mode in full page mode under IE would add - excessive line breaks to <style> blocks.
    • -
    • [#121] Fixed the - issue where maximizing FCKeditor inside a frameset would resize FCKeditor to the - whole window's size instead of just the container frame's size.
    • -
    • [#1093] Fixed - the issue where pressing Enter inside an inline tag would not create a new paragraph - correctly.
    • -
    • [#1089] Fixed - the issue where pressing Enter inside a <pre> block do not generate visible - line breaks in IE.
    • -
    • [#332] Hitting - Enter when the caret is at the end of a hyperlink will no longer continue the link - at the new paragraph.
    • -
    • [#1121] Hitting - Enter with FCKConfig.EnterMode=br will now scroll the document correctly when the - new lines have exceeded the lower boundary of the editor frame.
    • -
    • [#1063] [#1084] [#1092] Fixed a few Norwegian - language translation errors.
    • -
    • [#1148] Fixed - the issue where the "Automatic" and "More Colors..." buttons - in the color selection panel are not centered in Safari.
    • -
    • [#1187] Fixed - the issue where the "Paste as plain text" command cannot be undone in - non-IE browsers.
    • -
    • [#1222] Ctrl-Backspace - operations will now save undo snapshots in all browsers.
    • -
    • [#1223] Fixed - the issue where the insert link dialog would save multiple undo snapshots for a - single operation.
    • -
    • [#247] Fixed the - issue where deleting everything in the document in IE would create an empty <p> - block in the document regardless of EnterMode setting.
    • -
    • [#1280] Fixed - the issue where opening a combo box will cause the editor frames to lose focus when - there are multiple editors in the same document.
    • -
    • [#363] Fixed the - issue where the Find dialog does not work under Opera.
    • -
    • [#50] Fixed the - issue where the Paste button is always disabled in Safari.
    • -
    • [#389] Pasting - text with comments from Word won't generate errors in IE, thanks to the idea from - Swift.
    • -
    • The pasting area in the Paste from Word dialog is focused on initial load
    • -
    • Some fixes related to html comment handling in the Word clean up routine
    • -
    • [#1303] <col> - is correctly treated as an empty element.
    • -
    • [#969] Removed - unused files (fcknumericfield.htc and moz-bindings.xml).
    • -
    • [#1166] Fixed - the issue where <meta> tags are incorrectly outputted with closing tags in - full page mode.
    • -
    • [#1200] Fixed - the issue where context menus sometimes disappear prematurely before the user can - click on any items in Opera.
    • -
    • [#1315] Fixed - the issue where the source view text area in Safari is displayed with an excessive - blue border.
    • -
    • [#1201] Fixed - the issue where hitting Backspace or Delete inside a table cell deletes the table - cell instead of its contents in Opera.
    • -
    • [#1311] Fixed - the issue where undoing and redoing a special character insertion would send the - caret to incorrect positions. (e.g. the beginning of document)
    • -
    • [#923] Font colors - are now properly applied on links.
    • -
    • [#1316] Fixed - the issue where the image dialog expands to a size too big in Safari.
    • -
    • [#1306] [#894] The undo system - can now undo text formatting steps like setting fonts to bold and italic.
    • -
    • [#95] Fixed the - issue where FCKeditor breaks <meta> tags in full page mode in some circumstances.
    • -
    • [#175] Fixed the - issue where entering an email address with a '%' sign in the insert link dialog - would cause JavaScript error.
    • -
    • [#180] Improved - backward compatibility with older PHP versions. FCKeditor can now work with PHP - versions down to 4.0.
    • -
    • [#192] Document - modifying actions from the FCKeditor JavaScript API will now save undo steps.
    • -
    • [#246] Using text - formatting commands in EnterMode=div will no longer cause tags to randomly disappear.
    • -
    • [#327] It is no - longer possible for the browser's back action to misfire when a user presses backspace - while an image is being selected in FCKeditor.
    • -
    • [#362] Ctrl-Backspace - now works in FCKeditor.
    • -
    • [#390] Text alignment - and justification commands now respects EnterMode=br paragraph rules.
    • -
    • [#534] Pressing - Ctrl-End while the document contains a list towards the end will no longer make - the cursor disappear.
    • -
    • [#906] It is now - possible to have XHTML 1.0 Strict compliant output from a document pasted from Word.
    • -
    • [#929] Pressing - the Enter key will now produce an undo step.
    • -
    • [#934] Fixed the - "Cannot execute code from a freed script" error in IE from editor dialogs.
    • -
    • [#942] Server - based spell checking with ColdFusion integration no longer breaks fir non en_US - languages.
    • -
    • [#1056] Deleting - everything in the editor document and moving the cursor around will no longer leave - the cursor hanging beyond the top of the editor document.
    • -
    -

    - # This version has been partially sponsored - by the Council of Europe. -

    -

    - Version 2.4.3

    -

    - New Features and Improvements:

    -
      -
    • It is now possible to set the default target when creating links, with the new "DefaultLinkTarget" - setting.
    • -
    • [#436] The new - "FirefoxSpellChecker" setting is available, to enable/disable the - Firefox built-in spellchecker while typing. Even if word suggestions will not appear - in the FCKeditor context menu, this feature is useful to quickly identify misspelled - words.
    • -
    • [#311] The new - "BrowserContextMenuOnCtrl" setting is being introduced, to enable/disable - the ability of displaying the default browser's context menu when right-clicking - with the CTRL key pressed.
    • -
    -

    - Fixed Bugs:

    -
      -
    • [#300] The fck_internal.css - file was not validating with the W3C CSS Validation Service.
    • -
    • [#336] Ordered - list didn't keep the Type attribute properly (it was converted to lowercase when - the properties dialog was opened again).
    • -
    • [#318] Multiple - linked images are merged in a single link in IE.
    • -
    • [#350] The <marquee> - element will no longer append unwanted <p>&nbsp;</p> to the code.
    • -
    • [#351] The content - was being lost for images or comments only HTML inserted directly in the editor - source or loaded in the editor.
    • -
    • [#388] Creating - links in lines separated by <br> in IE can lead to a merge of the links.
    • -
    • [#325] Calling - the GetXHTML can distort visually the rendering in Firefox.
    • -
    • [#391] When ToolbarLocation=Out, - a "Security Warning" alert was being shown in IE if under https. Thanks to reister.
    • -
    • [#360] Form "name" - was being set to "[object]" if it contained an element with id="name".
    • -
    • Fixed a type that was breaking the ColdFusion SpellerPages integration file when - no spelling errors were found.
    • -
    • The ColdFusion SpellerPages integration was not working it Aspell was installed - in a directory with spaces in the name.
    • -
    • Added option to SpellerPages to ignore "alt" attributes.
    • -
    • [#451] Classes - for images in IE didn't take effect immediately.
    • -
    • [#430] Links with - a class did generate a span in Firefox when removing them.
    • -
    • [#274] The PHP - quick upload still tried to use the uppercased types instead of the lowercased ones. -
    • -
    • [#416] The PHP - quick upload didn't check for the existence of the folder before saving.
    • -
    • [#467] If InsertHtml - was called in IE with a comment (or any protected source at the beginning) it was - lost.
    • -
    • [SF - BUG-1518766] Mozilla 1.7.13 wasn't recognized properly as an old Gecko engine.
    • -
    • [#324] Improperly - nested tags could lead to a crash in IE.
    • -
    • [#455] Files and - folders with non-ANSI names were returned with a double UTF-8 encoding in the PHP - File Manager.
    • -
    • [#273] The extensions - "sh", "shtml", "shtm" and "phtm" have been added to the list of denied extensions - on upload.
    • -
    • [#453] No more - errors when hitting del inside an empty table cell.
    • -
    • The perl connector cgi file has been changed to Unix line endings.
    • -
    • [#202] Regression: - The HR tag will not anymore break the contents loaded in the editor.
    • -
    • [#508] The HR - command had a typo.
    • -
    • [#505] Regression: - IE crashed if a table caption was deleted.
    • -
    • [#82] [#359] <object> and <embed> - tags are not anymore lost in IE.
    • -
    • [#493] If the - containing form had a button named "submit" the "Save" command didn't work in Firefox.
    • -
    • [#414] If tracing - was globally enabled in Asp.Net 2.0 then the Asp.Net connector did fail.
    • -
    • [#520] The "Select - Field" properties dialog was not correctly handling select options with &, < - and >.
    • -
    • [#258] The Asp - integration didn't pass boolean values in English, using instead the locale of the - server and failing.
    • -
    • [#487] If an image - with dimensions set as styles was opened with the image manager and then the dialog - was canceled the dimensions in the style were lost.
    • -
    • [#220] The creation - of links or anchors in a selection that results on more than a single link created - will not anymore leave temporary links in the source. All links will be defined - as expected.
    • -
    • [#182] [#261] [#511] Special characters, like - percent signs or accented chars, and spaces are now correctly returned by the File - Browser.
    • -
    • [#281] Custom - toolbar buttons now render correctly in all skins.
    • -
    • [#527] If the - configuration for a toolbar isn't fully valid, try to keep on parsing it.
    • -
    • [#187] [#435] [SF - BUG-1612978] [SF - BUG-1163511] Updated the configuration options in the ColdFusion integration - files.
    • -
    • [SF - Patch-1726781] Updated the upload class for asp to handle large files and other - data in the forms. Thanks to NetRube.
    • -
    • [#225] With ColdFusion, - the target directory is now being automatically created if needed when "quick uploading". - Thanks to sirmeili.
    • -
    • [#295] [#510] Corrected some - path resolution issues with the File Browser connector for ColdFusion.
    • -
    • [#239] The <xml> - tag will not anymore cause troubles.
    • -
    • [SF - BUG-1721787] If the editor is run from a virtual dir, the PHP connector will - detect that and avoid generating a wrong folder.
    • -
    • [#431] PHP: The - File Browser now displays an error message when it is not able to create the configured - target directory for files (instead of sending broken XML responses).
    • -
    -

    - Version 2.4.2

    -

    - Fixed Bugs:

    -
      -
    • [#279] The UTF-8 - BOM was being included in the wrong files, affecting mainly PHP installations.
    • -
    -

    - Version 2.4.1

    -

    - New Features and Improvements:

    -
      -
    • [#118] The SelectAll - command now is available in Source Mode.
    • -
    • The new open source FCKpackager sub-project is now available. It replaces the FCKeditor.Packager - software to compact the editor source.
    • -
    • With Firefox, if a paste execution is blocked by the browser security settings, - the new "Paste" popup is shown to the user to complete the pasting operation.
    • -
    -

    - Fixed Bugs:

    -
      -
    • Various fixes to the ColdFusion File Browser connector.
    • -
    • We are now pointing the download of ieSpell to their pages, instead to a direct - file download from one of their mirrors. This disables the ability of "click and - go" (which can still be achieved by pointing the download to a file in your server), - but removes any troubles with mirrors link changes (and they change it frequently).
    • -
    • The Word cleanup has been changed to remove "display:none" tags that may come from - Word.
    • -
    • [SF - BUG-1659613] The 2.4 version introduced a bug in the flash handling code that - generated out of memory errors in IE7.
    • -
    • [SF - BUG-1660456] The icons in context menus were draggable.
    • -
    • [SF - BUG-1653009] If the server is configured to process html files as asp then it - generated ASP error 0138.
    • -
    • [SF - BUG-1288609] The content of iframes is now preserved.
    • -
    • [SF - BUG-1245504] [SF - BUG-1652240] Flash files without the .swf extension weren't recognized upon - reload.
    • -
    • [SF - PATCH-1649753] Node selection for text didn't work in IE. Thanks to yurik dot - m.
    • -
    • [SF - BUG-1573191] The Html code inserted with FCK.InsertHtml didn't have the same - protection for special tags.
    • -
    • [#110] The OK - button in dialogs had its width set as an inline style.
    • -
    • [#113] [#94] [SF - BUG-1659270] ForcePasteAsPlainText didn't work in Firefox.
    • -
    • [#114] The correct - entity is now used to fill empty blocks when ProcessHTMLEntities is disabled.
    • -
    • [#90] The editor - was wrongly removing some <br> tags from the code.
    • -
    • [#139] The CTRL+F - and CTRL+S keystroke default behaviors are now preserved.
    • -
    • [#138] We are - not providing a CTRL + ALT combination in the default configuration file because - it may be incompatible with some keyboard layouts. So, the CTRL + ALT + S combination - has been changed to CTRL + SHIFT + S.
    • -
    • [#129] In IE, - it was not possible to paste if "Allow paste operation via script" was disabled - in the browser security settings.
    • -
    • [#112] The enter - key now behaves correctly on lists with Firefox, when the EnterMode is set to 'br'.
    • -
    • [#152] Invalid - self-closing tags are now being fixed before loading.
    • -
    • A few tags were being ignored to the check for required contents (not getting stripped - out, as expected). Fixed.
    • -
    • [#202] The HR - tag will not anymore break the contents loaded in the editor.
    • -
    • [#211] Some invalid - inputs, like "<p>" where making the caret disappear in Firefox.
    • -
    • [#99] The <div> - element is now considered a block container if EnterMode=p|br. It acts like a simple - block only if EnterMode=div.
    • -
    • Hidden fields will now show up as an icon in IE, instead of a normal text field. - They are also selectable and draggable, in all browsers.
    • -
    • [#213] Styles - are now preserved when hitting enter at the end of a paragraph.
    • -
    • [#77] If ShiftEnterMode - is set to a block tag (p or div), the desired block creation in now enforced, instead - of copying the current block (which is still the behavior of the simple enter).
    • -
    • [#209] Links and - images URLs will now be correctly preserved with Netscape 7.1.
    • -
    • [#165] The enter - key now honors the EnterMode settings when outdenting a list item.
    • -
    • [#190] Toolbars - may be wrongly positioned. Fixed.
    • -
    • [#254] The IgnoreEmptyParagraphValue - setting is now correctly handled in Firefox.
    • -
    • [#248] The behavior - of the backspace key has been fixed on some very specific cases.
    • -
    -

    - Version 2.4

    -

    - New Features and Improvements:

    -
      -
    • [SF - Feature-1329273] [SF - Feature-1456005] [SF - BUG-1315002] [SF - BUG-1350180] [SF - BUG-1450689] [SF - BUG-1461033] [SF - BUG-1510111] [SF - BUG-1203560] [SF - BUG-1564838] The advance Enter Key Handler - is now being introduced. It gives you complete freedom to configure the editor to - generate <p>, <div> or <br> when the user uses - both the [Enter] and [Shift]+[Enter] keys. The new "EnterMode" and "ShiftEnterMode" - settings can be use to control its behavior. It also guarantees that all browsers - will generate the same output.
    • -
    • The new and powerful Keyboard Accelerator System is being introduced. - You can now precisely control the commands to execute when some key combinations - are activated by the user. It guarantees that all browsers will have the same behavior - regarding the shortcuts.
      - It also makes it possible to remove buttons from the toolbar and still invoke their - features by using the keyboard instead. -
      - It also blocks all default "CTRL based shortcuts" imposed by the browsers, so if - you don't want users to underline text, just remove the CTRL+U combination from - the keystrokes table. Take a look at the FCKConfig.Keystrokes setting in the fckconfig.js - file.
    • -
    • The new "ProtectedTags" configuration option is being introduced. - It will accept a list of tags (separated by a pipe "|"), which will have no effect - during editing, but will still be part of the document DOM. This can be used mainly - for non HTML standard, custom tags.
    • -
    • Dialog box commands can now open resizable dialogs (by setting oCommand.Resizable - = true).
    • -
    • Updated support for AFP. Thanks to Soenke Freitag.
    • -
    • New language file:
        -
      • Afrikaans (by Willem Petrus Botha).
      • -
      -
    • -
    • [SF - Patch-1456343] New sample file showing how to dynamically exchange a textarea - and an instance of FCKeditor. Thanks to Finn Hakansson
    • -
    • [SF - Patch-1496115] [SF - BUG-1588578] [SF - BUG-1376534] [SF - BUG-1343506] [SF - Feature-1211065] [SF - Feature-949144] The content of anchors are shown and preserved - on creation. *
    • -
    • [SF - Feature-1587175] Local links to an anchor are readjusted if the anchor changes.
    • -
    • [SF - Patch-1500040] New configuration values to specify the Id and Class for the - body element.
    • -
    • [SF - Patch-1577202] The links created with the popup option now are accessible even - if the user has JavaScript disabled.
    • -
    • [SF - Patch-1443472] [SF - BUG-1576488] [SF - BUG-1334305] [SF - BUG-1578312] The Paste from Word clean up function can be configured - with FCKConfig.CleanWordKeepsStructure to preserve the markup as much as possible. - Thanks Jean-Charles ROGEZ.
    • -
    • [SF - Patch-1472654] The server side script location for SpellerPages can now be set - in the configuration file, by using the SpellerPagesServerScript setting.
    • -
    • Attention: All connectors are now pointing by - default to the "/userfiles/" folder instead of "/UserFiles/" (case change). Also, - the inner folders for each type (file, image, flash and media) are all lower-cased - too.
    • -
    • Attention: The UseBROnCarriageReturn configuration - is not anymore valid. The EnterMode setting can now be used to precisely set the - enter key behavior.
    • -
    -

    - Fixed Bugs:

    -
      -
    • [SF - BUG-1444937] [SF - BUG-1274364] Shortcut keys are now undoable correctly.
    • -
    • [SF - BUG-1015230] Toolbar buttons now update their state on shortcut keys activation.
    • -
    • [SF - BUG-1485621] It is now possible to precisely control which shortcut keys can - be used.
    • -
    • [SF - BUG-1573714] [SF - BUG-1593323] Paste was not working in IE if both AutoDetectPasteFromWord - and ForcePasteAsPlainText settings were set to "false".
    • -
    • [SF - BUG-1578306] The context menu was wrongly positioned if the editing document - was set to render in strict mode. Thanks to Alfonso Martinez.
    • -
    • [SF - BUG-1567060] [SF - BUG-1565902] [SF - BUG-1440631] IE was getting locked on some specific cases. Fixed.
    • -
    • [SF - BUG-1582859] [SF - Patch-1579507] Firefox' spellchecker is now disabled during editing mode. - Thanks to Alfonso Martinez.
    • -
    • Fixed Safari and Opera detection system (for development purposes only).
    • -
    • Paste from Notepad was including font information in IE. Fixed.
    • -
    • [SF - BUG-1584092] When replacing text area, names with spaces are now accepted.
    • -
    • Depending on the implementation of toolbar combos (mainly for custom plugins) the - editor area was loosing the focus when clicking in the combo label. Fixed.
    • -
    • [SF - BUG-1596937] InsertHtml() was inserting the HTML outside the editor area on - some very specific cases.
    • -
    • [SF - BUG-1585548] On very specific, rare and strange cases, the XHTML processor was - not working properly in IE. Fixed.
    • -
    • [SF - BUG-1584951] [SF - BUG-1380598] [SF - BUG-1198139] [SF - BUG-1437318] In Firefox, the style selector will not anymore delete - the contents when removing styles on specific cases.
    • -
    • [SF - BUG-1515441] [SF - BUG-1451071] The "Insert/Edit Link" and "Select All" buttons are now working - properly when the editor is running on a IE Modal dialog.
    • -
    • On some very rare cases, IE was throwing a memory error when hiding the context - menus. Fixed.
    • -
    • [SF - BUG-1526154] [SF - BUG-1509208] With Firefox, <style> tags defined in the source are - now preserved.
    • -
    • [SF - BUG-1535946] The IE dialog system has been changed to better work with custom - dialogs.
    • -
    • [SF - BUG-1599520] The table dialog was producing empty tags when leaving some of - its fields empty.
    • -
    • [SF - BUG-1599545] HTML entities are now processed on attribute values too.
    • -
    • [SF - BUG-1598517] Meta tags are now protected from execution during editing (avoiding - the "redirect" meta to be activated).
    • -
    • [SF - BUG-1415601] Firefox internals: styleWithCSS is used instead of the deprecated - useCSS whenever possible.
    • -
    • All JavaScript Core extension function have been renamed to "PascalCase" (some were - in "camelCase"). This may have impact on plugins that use any of those functions.
    • -
    • [SF - BUG-1592311] Operations in the caption of tables are now working correctly in - both browsers.
    • -
    • Small interface fixes to the about box.
    • -
    • [SF - PATCH-1604576] [SF - BUG-1604301] Link creation failed in Firefox 3 alpha. Thanks to Arpad Borsos
    • -
    • [SF - BUG-1577247] Unneeded call to captureEvents and releaseEvents.
    • -
    • [SF - BUG-1610790] On some specific situations, the call to form.submit(), in form - were FCKeditor has been unloaded by code, was throwing the "Can't execute code from - a freed script" error.
    • -
    • [SF - BUG-1613167] If the configuration was missing the FCKConfig.AdditionalNumericEntities - entry an error appeared.
    • -
    • [SF - BUG-1590848] [SF - BUG-1626360] Cleaning of JavaScript strict warnings in the source code.
    • -
    • [SF - BUG-1559466] The ol/ul list property window always searched first for a UL element.
    • -
    • [SF - BUG-1516008] Class attribute in IE wasn't loaded in the image dialog.
    • -
    • The "OnAfterSetHTML" event is now fired when being/switching to Source View.
    • -
    • [SF - BUG-1631807] Elements' style properties are now forced to lowercase in IE.
    • -
    • The extensions "html", "htm" and "asis" have been added to the list of denied extensions - on upload.
    • -
    • Empty inline elements (like span and strong) will not be generated any more.
    • -
    • Some elements attributes (like hspace) where not being retrieved when set to "0".
    • -
    • [SF - BUG-1508341] Fix for the ColdFusion script file of SpellerPages.
    • -
    -

    - * This version has been partially sponsored by Medical - Media Lab.

    -

    - Version 2.3.3

    -

    - New Features and Improvements:

    -
      -
    • The project has been relicensed under the terms of the - GPL / LGPL / MPL licenses. This change will remove many licensing compatibility - issues with other open source licenses, making the editor even more "open" than - before.
    • -
    • Attention: The default directory in the distribution - package is now named "fckeditor" (in lowercase) instead of "FCKeditor".  This - change may impact installations on case sensitive OSs, like Linux.
    • -
    • Attention: The "Universal Keyboard" has been removed - from the package. The license of those files was unclear so they can't be included - alongside the rest of FCKeditor.
    • -
    -

    - Version 2.3.2

    -

    - New Features and Improvements:

    -
      -
    • Users can now decide if the template dialog will replace the entire contents of - the editor or simply place the template in the cursor position. This feature can - be controlled by the "TemplateReplaceAll" and "TemplateReplaceCheckbox" configuration - options.
    • -
    • [SF - Patch-1237693] A new configuration option (ProcessNumericEntities) - is now available to tell the editor to convert non ASCII chars to their relative - numeric entity references. It is disabled by default.
    • -
    • The new "AdditionalNumericEntities" setting makes it possible to - define a set of characters to be transformed to their relative numeric entities. - This is useful when you don't want the code to have simple quotes ('), for example.
    • -
    • The Norwegian language file (no.js) has been duplicated to include the Norwegian - Bokmal (nb.js) in the supported interface languages. Thanks to Martin Kronstad. -
    • -
    • Two new patterns have been added to the Universal Keyboard: -
        -
      • Persian. Thanks to Pooyan Mahdavi
      • -
      • Portuguese. Thanks to Bo Brandt.
      • -
      -
    • -
    • [SF - Patch-1517322] It is now possible to define the start number on numbered lists. - Thanks to Marcel Bennett.
    • -
    • The Font Format combo will now reflect the EditorAreaCSS styles.
    • -
    • [SF - Patch-1461539] The File Browser connector can now optionally return a "url" - attribute for the files. Thanks to Pent.
    • -
    • [SF - BUG-1090851] The new "ToolbarComboPreviewCSS" configuration option has been - created, so it is possible to point the Style and Format toolbar combos to a different - CSS, avoiding conflicts with the editor area CSS.
    • -
    • [SF - Feature-1421309] [SF - BUG-1489402] It is now possible to configure the Quick Uploder target path - to consider the file type (ex: Image or File) in the target path for uploads.
    • -
    • The JavaScript integration file has two new things: -
        -
      • The "CreateHtml()" function in the FCKeditor object, used to retrieve the HTML of - an editor instance, instead of writing it directly to the page (as done by "Create()").
      • -
      • The global "FCKeditor_IsCompatibleBrowser()" function, which tells if the executing - browser is compatible with FCKeditor. This makes it possible to do any necessary - processing depending on the compatibility, without having to create and editor instance.
      • -
      -
    • -
    -

    - Fixed Bugs:

    -
      -
    • [SF - BUG-1525242] [SF - BUG-1500050] All event attributes (like onclick or onmouseover) are now - being protected before loading the editor. In this way, we avoid firing those events - during editing (IE issue) and they don't interfere in other specific processors - in the editor.
    • -
    • Small security fixes to the File Browser connectors.
    • -
    • [SF - BUG-1546226] Small fix to the ColdFusion CFC integration file.
    • -
    • [SF - Patch-1407500] The Word Cleanup function was breaking the HTML on pasting, on - very specific cases. Fixed, thanks to Frode E. Moe.
    • -
    • [SF - Patch-1551979] [SF - BUG-1418066] [SF - BUG-1439621] [SF - BUG-1501698] Make FCKeditor work with application/xhtml+xml. Thanks - to Arpad Borsos.
    • -
    • [SF - Patch-1547738] [SF - BUG-1550595] [SF - BUG-1540807] [SF - BUG-1510685] Fixed problem with panels wrongly positioned when the - editor is placed on absolute or relative positioned elements. Thanks to Filipe Martins.
    • -
    • [SF - Patch-1511294] Small fix for the File Browser compatibility with IE 5.5.
    • -
    • [SF - Patch-1503178] Small improvement to stop IE from loading smiley images when - one smiley is quickly selected from a huge list of smileys. Thanks to stuckhere.
    • -
    • [SF - BUG-1549112] The Replace dialog window now escapes regular expression specific - characters in the find and replace fields.
    • -
    • [SF - BUG-1548788] Updated the ieSpell download URL.
    • -
    • In FF, the editor was throwing an error when closing the window. Fixed.
    • -
    • [SF - BUG-1538509] The "type" attribute for text fields will always be set now.
    • -
    • [SF - BUG-1551734] The SetHTML function will now update the editing area height no - matter which editing mode is active.
    • -
    • [SF - BUG-1554141] [SF - BUG-1565562] [SF - BUG-1451056] [SF - BUG-1478408] [SF - BUG-1489322] [SF - BUG-1513667] [SF - BUG-1562134] The protection of URLs has been enhanced - and now it will not break URLs on very specific cases.
    • -
    • [SF - BUG-1545732] [SF - BUG-1490919] No security errors will be thrown when loading FCKeditor in - page inside a FRAME defined in a different domain.
    • -
    • [SF - BUG-1512817] [SF - BUG-1571345] Fixed the "undefined" addition to the content when ShowBorders - = false and FullPage = true in Firefox. Thanks to Brett.
    • -
    • [SF - BUG-1512798] BaseHref will now work well on FullPage, even if no <head> - is available.
    • -
    • [SF - BUG-1509923] The DocumentProcessor is now called when using InserHtml().
    • -
    • [SF - BUG-1505964] The DOCTYPE declaration is now preserved when working in FullPage.
    • -
    • [SF - BUG-1553727] The editor was throwing an error when inserting complex templates. - Fixed.
    • -
    • [SF - Patch-1564930] [SF - BUG-1562828] In IE, anchors where incorrectly copied when using the Paste - from Word button. Fixed, thanks to geirhelge.
    • -
    • [SF - BUG-1557709] [SF - BUG-1421810] The link dialog now validates Popup Window names.
    • -
    • [SF - BUG-1556878] Firefox was creating empty tags when deleting the selection in - some special cases.
    • -
    • The context menu for links is now correctly shown when right-clicking on floating - divs.
    • -
    • [SF - BUG-1084404] The XHTML processor now ignores empty span tags.
    • -
    • [SF - BUG-1221728] [SF - BUG-1174503] The <abbr> tag is not anymore getting broken by IE.
    • -
    • [SF - BUG-1182906] IE is not anymore messing up mailto links.
    • -
    • [SF - BUG-1386094] Fixed an issue when setting configuration options to empty ('') - by code.
    • -
    • [SF - BUG-1389435] Fixed an issue in some dialog boxes when handling numeric inputs.
    • -
    • [SF - BUG-1398829] Some links may got broken on very specific cases. Fixed.
    • -
    • [SF - BUG-1409969] <noscript> tags now remain untouched by the editor.
    • -
    • [SF - BUG-1433457] [SF - BUG-1513631] Empty "href" attributes in <a> or empty "src" in <img> - will now be correctly preserved.
    • -
    • [SF - BUG-1435195] Scrollbars are now visible in the File Browser (for custom implementations).
    • -
    • [SF - BUG-1438296] The "ForceSimpleAmpersand" setting is now being honored in all - tags.
    • -
    • If a popup blocker blocks context menu operations, the correct alert message is - displayed now, instead of a ugly JavaScript error.
    • -
    • [SF - BUG-1454116] The GetXHTML() function will not change the IsDirty() value of - the editor.
    • -
    • The spell check may not work correctly when using SpellerPages with ColdFusion. - Fixed.
    • -
    • [SF - BUG-1481861] HTML comments are now removed by the Word Cleanup System.
    • -
    • [SF - BUG-1489390] A few missing hard coded combo options used in some dialogs are - now localizable.
    • -
    • [SF - BUG-1505448] The Form dialog now retrieves the value of the "action" attribute - exactly as defined in the source.
    • -
    • [SF - Patch-1517322] Solved an issue when the toolbar has buttons with simple icons - (usually used by plugins) mixed with icons coming from a strip (the default toolbar - buttons).
    • -
    • [SF - Patch-1575261] Some fields in the Table and Cell Properties dialogs were being - cut. Fixed.
    • -
    • Fixed a startup compatibility issue with Firefox 1.0.4.
    • -
    -

    - Version 2.3.1

    -

    - Fixed Bugs:

    -
      -
    • [SF - BUG-1506126] Fixed the Catalan language file, which had been published with - problems in accented letters.
    • -
    • More performance improvements in the default File Browser.
    • -
    • [SF - BUG-1506701] Fixed compatibility issues with IE 5.5.
    • -
    • [SF - BUG-1509073] Fixed the "Image Properties" dialog window, which was making invalid - calls to the "editor/dialog/" directory, generating error 400 entries in the web - server log.
    • -
    • [SF - BUG-1507294] [SF - BUG-1507953] The editing area was getting a fixed size when using the "SetHTML" - API command or even when switching back from the source view. Fixed.
    • -
    • [SF - BUG-1507755] Fixed a conflict between the "DisableObjectResizing" and "ShowBorders" - configuration options over IE.
    • -
    • Opera 9 tries to "mimic" Gecko in the browser detection system of FCKeditor. As - this browser is not "yet" supported, the editor was broken on it. It has been fixed, - and now a textarea is displayed, as in any other unsupported browser. Support for - Opera is still experimental and can be activated by setting the property "EnableOpera" - to true when creating an instance of the editor with the JavaScript integration - files.
    • -
    • With Opera 9, the toolbar was jumping on buttons rollover.
    • -
    • [SF - BUG-1509479] The iframes used in Firefox for all editor panels (dropdown combos, - context menu, etc...) are now being placed right before the main iframe that holds - the editor. In this way, if the editor container element is removed from the DOM - (by DHTML) they are removed together with it.
    • -
    • [SF - BUG-1271070] [SF - BUG-1411430] The editor API now works well on DHTML pages that create and - remove instances of FCKeditor dynamically.
    • -
    • A second call to a page with the editor was not working correctly with Firefox 1.0.x. - Fixed.
    • -
    • [SF - BUG-1511460] Small correction to the <script> protected source regex. - Thanks to Randall Severy.
    • -
    • [SF - BUG-1521754] Small fix to the paths of the internal CSS files used by FCKeditor. - Thanks to johnw_ceb.
    • -
    • [SF - BUG-1511442] The <base> tag is now correctly handled in IE, no matter - its position in the source code.
    • -
    • [SF - BUG-1507773] The "Lock" and "Reset" buttons in the Image Properties dialog window - are not anymore jumping with Firefox 1.5.
    • -
    -

    - Version 2.3

    -

    - New Features and Improvements:

    -
      -
    • The Toolbar Sharing system has been completed. See sample10.html - and sample11.html.*
    • -
    • [SF - Patch-1407500] Small enhancement to the Find and Replace dialog windows.
    • -
    -

    - Fixed Bugs:

    -
      -
    • Small security fixes.
    • -
    • The context menu system has been optimized. Nested menus now open "onmouseover". -
    • -
    • An error in the image preloader system was making the toolbar strip being downloaded - once for each button on slow connections. Some enhancements have also been made - so now the smaple05.html is loading fast for all skins.
    • -
    • Fixed many memory leak issues with IE.
    • -
    • [SF - BUG-1489768] The panels (context menus, toolbar combos and color selectors), - where being displayed in the wrong position if the contents of the editor, or its - containing window were scrolled down.
    • -
    • [SF - BUG-1493176] Using ASP, the connector was not working on servers with buffer - disable by default.
    • -
    • [SF - BUG-1491784] Language files have been updated to not include html entities.
    • -
    • [SF - BUG-1490259] No more security warning on IE over HTTPS.
    • -
    • [SF - BUG-1493173] [SF - BUG-1499708] We now assume that, if a user is in source editing, he/she - wants to control the HTML, so the editor doesn't make changes to it when posting - the form being in source view or when calling the GetXHTML function in the API. -
    • -
    • [SF - BUG-1490610] The FitWindow is now working on elements set with relative position.
    • -
    • [SF - BUG-1493438] The "Word Wrap" combo in the cell properties dialog now accepts - only Yes/No (no more <Not Set> value).
    • -
    • The context menu is now being hidden when a nested menu option is selected.
    • -
    • Table cell context menu operations are now working correctly.
    • -
    • [SF - BUG-1494549] The code formatter was having problems with dollar signs inside - <pre> tags.
    • -
    • [SF - Patch-1459740] The "src" element of images can now be set by styles definitions. - Thanks to joelwreed.
    • -
    • [SF - Patch-1437052] [SF - Patch-1436166] [SF - Patch-1352385] Small fix to the FCK.InsertHtml, FCKTools.AppendStyleSheet - and FCKSelection.SelectNode functions over IE. Thanks to Alfonso Martinez.
    • -
    • [SF - Patch-1349765] Small fix to the FCKSelection.GetType over Firefox. Thanks to - Alfonso Martinez.
    • -
    • [SF - Patch-1495422] The editor now creates link based on the URL when no selection - is available. Thanks to Dominik Pesch.
    • -
    • [SF - Patch-1478859] On some circumstances, the Yahoo popup blocker was blocking the - File Browser window, giving no feedback to the user. Now an alert message is displayed.
    • -
    • When using the editor in a RTL localized interface, like Arabic, the toolbar combos - were not showing completely in the first click. Fixed.
    • -
    • [SF - BUG-1500212] All "_samples/html" samples are now working when loading directly - from the Windows Explorer. Thanks to Alfonso Martinez.
    • -
    • The "FitWindow" feature was breaking the editor under Firefox 1.0.x.
    • -
    • [SF - Patch-1500032] In Firefox, the caret position now follows the user clicks when - clicking in the white area bellow the editor contents. Thanks to Alfonso Martinez.
    • -
    • [SF - BUG-1499522] In Firefox, the link dialog window was loosing the focus (and quickly - reacquiring it) when opening. This behavior was blocking the dialog in some Linux - installations.
    • -
    • Drastically improved the loading performance of the file list in the default File - Browser.
    • -
    • [SF - BUG-1503059] The default "BasePath" for FCKeditor in all integration files has - been now unified to "/fckeditor/" (lower-case). This is the usual casing system - in case sensitive OSs like Linux.
    • -
    • The "DisableFFTableHandles" setting is now honored when switching the full screen - mode with FitWindow.
    • -
    • Some fixes has been applied to the cell merging in Firefox.
    • -
    -

    - * This version has been partially sponsored by Footsteps - and Kentico.

    -

    - Version 2.3 Beta

    -

    - New Features and Improvements:

    -
      -
    • Extremely Fast Loading! The editor now loads more than 3 - times faster than before, with no impact on its advanced features.
    • -
    • New toolbar system: -
        -
      • [SF - Feature-1454850] The toolbar will now load much faster. All - images have being merged in a single image file using a unique system available - only with FCKeditor.
      • -
      • The "Text Color" and "Background Color" commands buttons have - enhancements on the interface.
      • -
      • Attention: As a completely - new system has being developed. Skins created for versions prior this one will not - work. Skin styles definitions have being merged, added and removed. All skins have - been a little bit reviewed.
      • -
      • It is possible to detach the toolbar from an editor instance and - share it with other instances. In this way you may have only one toolbar (in the - top of the window, for example, that can be used by many editors (see - sample10.html). This feature is still under development (issues with IE - focus still to be solved).*
      • -
      -
    • -
    • New context menu system: -
        -
      • It uses the same (fast) loading system as the toolbar.
      • -
      • Sub-Menus are now available to group features (try the context menu over a table - cell).
      • -
      • It is now possible to create your own context menu entries by creating plugins. -
      • -
      -
    • -
    • New "FitWindow" toolbar button, based on the - plugin published by Paul Moers. Thanks Paul!
    • -
    • "Auto Grow" Plugin: automatically resizes the editor - until a maximum height, based on its contents size.**
    • -
    • [SF - Feature-1444943] Multiple CSS files can now be used in the - editing area. Just define FCKConfig.EditorAreaCSS as an array of strings (each one - is a path to a different css file). It works also as a simple string, as on prior - versions.
    • -
    • New language files:
        -
      • Bengali / Bangla (by Richard Walledge).
      • -
      • English (Canadian) (by Kevin Bennett).
      • -
      • Khmer (by Sengtha Chay).
      • -
      -
    • -
    • The source view is now available in the editing area on Gecko browsers. Previously - a popup was used for it (due to a Firefox bug).
    • -
    • As some people may prefer the popup way for source editing, a new configuration - option (SourcePopup) has being introduced.
    • -
    • The IEForceVScroll configuration option has been removed. The editor now automatically - shows the vertical scrollbar when needed (for XHTML doctypes).
    • -
    • The configuration file doesn't define a default DOCTYPE to be used now.
    • -
    • It is now possible to easily change the toolbar using the JavaScript API by just - calling <EditorInstance>.ToolbarSet.Load( '<ToolbarName>' ). See _testcases/010.html - for a sample.
    • -
    • The "OnBlur" and "OnFocus" JavaScript API events are now compatible - with all supported browsers.
    • -
    • Some few updates in the Lasso connector and uploader.
    • -
    • The GeckoUseSPAN setting is now set to "false" by default. In this way, the code - produced by the bold, italic and underline commands are the same on all browsers.
    • -
    -

    - Fixed Bugs:

    -
      -
    • Important security fixes have been applied to the File Manager, Uploader - and Connectors. Upgrade is highly recommended. Thanks to Alberto Moro, - Baudouin Lamourere and James Bercegay.
    • -
    • [SF - BUG-1399966] [SF - BUG-1249853] The "BaseHref" configuration is now working with - Firefox in both normal and full page modes.
    • -
    • [SF - BUG-1405263] A typo in the configuration file was impacting the Quick Upload - feature.
    • -
    • Nested <ul> and <ol> tags are now generating valid html.
    • -
    • The "wmode" and "quality" attributes are now preserved for Flash - embed tags, in case they are entered manually in the source view. Also, empty attributes - are removed from that tag.
    • -
    • Tables where not being created correctly on Opera.
    • -
    • The XHTML processor will ignore invalid tags with names ending with ":", - like http:.
    • -
    • On Firefox, the scrollbar is not anymore displayed on toolbar dropdown commands - when not needed.
    • -
    • Some small fixes have being done to the dropdown commands rendering for FF. -
    • -
    • The table dialog window has been a little bit enlarged to avoid contents being cropped - on some languages, like Russian.
    • -
    • [SF - BUG-1465203] The ieSpell download URL has been updated. The problem is that - they don't have a fixed URL for it, so let's hope the mirror will be up for it. -
    • -
    • [SF - BUG-1456332] Small fix in the Spanish language file.
    • -
    • [SF - BUG-1457078] The File Manager was generating 404 calls in the server.
    • -
    • [SF - BUG-1459846] Fixed a problem with the config file if PHP is set to parse .js - files.
    • -
    • [SF - BUG-1432120] The "UserFilesAbsolutePath" setting is not correctly - used in the PHP uploader.
    • -
    • [SF - BUG-1408869] The collapse handler is now rendering correctly in Firefox 1.5. -
    • -
    • [SF - BUG-1410082] [SF - BUG-1424240] The "moz-bindings.xml" file is now well formed.
    • -
    • [SF - BUG-1413980] All frameborder "yes/no" values have been changes to - "1/0".
    • -
    • [SF - BUG-1414101] The fake table borders are now showing correctly when running under - the "file://" protocol.
    • -
    • [SF - BUG-1414155] Small typo in the cell properties dialog window.
    • -
    • Fixed a problem in the File Manager. It was not working well with folder or file - names with apostrophes ('). Thanks to René de Jong.
    • -
    • Small "lenght" type corrected in the select dialog window. Thanks to Bernd Nussbaumer.
    • -
    • The about box is now showing correctly in Firefox 1.5.
    • -
    • [SF - Patch-1464020] [SF - BUG-1155793] The "Unlink" command is now working correctly under Firefox - if you don't have a complete link selection. Thanks to Johnny Egeland.
    • -
    • In the File Manager, it was not possible to upload files to folders with ampersands - in the name. Thanks to Mike Pone.
    • -
    • [SF - BUG-1178359] Elements from the toolbar are not anymore draggable in the editing - area.
    • -
    • [SF - BUG-1487544] Fixed a small issue in the code formatter for <br /> and - <hr /> tags.
    • -
    • The "Background Color" command now works correctly when the GeckoUseSPAN setting - is disabled (default).
    • -
    • Links are now rendered in blue with Firefox (they were black before). Actually, - an entry for it has been added to the editing area CSS, so you can customize with - the color you prefer.
    • -
    -

    - * This version has been partially sponsored by Footsteps - and Kentico. -
    - ** This version has been partially sponsored by Nextide.

    -

    - Version 2.2

    -

    - New Features and Improvements:

    -
      -
    • Let's welcome Wim Lemmens (didgiman). He's our new responsible for the ColdFusion - integration. In this version we are introducing his new files with the following - changes: -
        -
      • The "Uploader", used for quick uploads, is now available - natively for ColdFusion.
      • -
      • Small bugs have been corrected in the File Browser connector.
      • -
      • The samples now work as is, even if you don't install the editor in the "/FCKeditor" - directory.
      • -
      -
    • -
    • And a big welcome also to "Andrew Liu", our responsible for the - Python integration. This version is bringing native support for Python - , including the File Browser connector and Quick Upload.
    • -
    • The "IsDirty()" and "ResetIsDirty()" - functions have been added to the JavaScript API to check if the editor - content has been changed.*
    • -
    • New language files: -
        -
      • Hindi (by Utkarshraj Atmaram)
      • -
      • Latvian (by Janis Klavinš)
      • -
      -
    • -
    • For the interface, now we have complete RTL support also for - the drop-down toolbar commands, color selectors and context menu.
    • -
    • [SF - BUG-1325113] [SF - BUG-1277661] The new "Delete Table" command is available in the - Context Menu when right-clicking inside a table.
    • -
    • The "FCKConfig.DisableTableHandles" configuration option is now working - on Firefox 1.5.
    • -
    • The new "OnBlur" and "OnFocus" - events have been added to the JavaScript API (IE only). See "_samples/html/sample09.html" * -
    • -
    • Attention: The "GetHTML" - function has been deprecated. It now returns the same value as "GetXHTML". - The same is valid for the "EnableXHTML" and "EnableSourceXHTML" - that have no effects now. The editor now works with XHTML output only.
    • -
    • Attention: A new "PreserveSessionOnFileBrowser" - configuration option has been introduced. It makes it possible to set whenever is - needed to maintain the user session in the File Browser. It is disabled by default, - as it has very specific usage and may cause the File Browser to be blocked by popup - blockers. If you have custom File Browsers that depends on session information, - remember to activate it.
    • -
    • Attention: The "fun" - smileys set has been removed from the package. If you are using it, you must manually - copy it to newer installations and upgrades.
    • -
    • Attention: The "mcpuk" - file browser has been removed from the package. We have no ways to support it. There - were also some licensing issues with it. Its web site can still be found at - http://mcpuk.net/fbxp/.
    • -
    • It is now possible to set different CSS styles for the chars in the Special Chars - dialog window by adding the "SpecialCharsOut" and "SpecialCharsOver" - in the "fck_dialog.css" skin file.*
    • -
    • [SF - Patch-1268726] Added table "summary" support in the table dialog. - Thanks to Sebastien-Mahe.
    • -
    • [SF - Patch-1284380] It is now possible to define the icon of a FCKToolbarPanelButton - object without being tied to the skin path (just like FCKToolbarButton). Thanks - to Ian Sullivan.
    • -
    • [SF - Patch-1338610] [SF - Patch-1263009] New characters have been added to the "Special Characters" - dialog window. Thanks to Deian.
    • -
    • You can set the QueryString value "fckdebug=true" to activate "debug - mode" in the editor (showing the debug window), overriding the configurations. - The "AllowQueryStringDebug" configuration option is also available so - you can disable this feature.
    • -
    -

    - Fixed Bugs:

    -
      -
    • [SF - BUG-1363548] [SF - BUG-1364425] [SF - BUG-1335045] [SF - BUG-1289661] [SF - BUG-1225370] [SF - BUG-1156291] [SF - BUG-1165914] [SF - BUG-1111877] [SF - BUG-1092373] [SF - BUG-1101596] [SF - BUG-1246952] The URLs for links and - images are now correctly preserved as entered, no matter if you are using relative - or absolute paths.
    • -
    • [SF - BUG-1162809] [SF - BUG-1205638] The "Image" and "Flash" dialog windows - now loads the preview correctly if the "BaseHref" configuration option - is set.
    • -
    • [SF - BUG-1329807] The alert boxes are now showing correctly when doing cut/copy/paste - operations on Firefox installations when it is not possible to execute that operations - due to security settings.
    • -
    • A new "Panel" system (used in the drop-dowm toolbar commands, color selectors - and context menu) has been developed. The following bugs have been fixed with it: -
        -
      • [SF - BUG-1186927] On IE, sometimes the context menu was being partially hidden.* -
      • -
      • On Firefox, the context menu was flashing in the wrong position before showing. -
      • -
      • On Firefox 1.5, the Color Selector was not working.
      • -
      • On Firefox 1.5, the fonts in the panels were too big.
      • -
      • [SF - BUG-1076435] [SF - BUG-1200631] On Firefox, sometimes the context menu was being shown in the - wrong position.
      • -
      -
    • -
    • [SF - BUG-1364094] Font families were - not being rendered correctly on Firefox .
    • -
    • [SF - BUG-1315954] No error is thrown when pasting some case specific code from editor - to editor.
    • -
    • [SF - BUG-1341553] A small fix for a security alert in the File Browser has been - applied.
    • -
    • [SF - BUG-1370953] [SF - BUG-1339898] [SF - BUG-1323319] A message will be shown to the user (instead of a JS error) if - a "popup blocker" blocks the "Browser Server" button. Thanks - to Erwin Verdonk.
    • -
    • [SF - BUG-1370355] Anchor links that points to a single character anchor, like "#A", - are now correctly detected in the Link dialog window. Thanks to Ricky Casey.
    • -
    • [SF - BUG-1368998] Custom error processing has been added to the file upload on the - File Browser.
    • -
    • [SF - BUG-1367802] [SF - BUG-1207740] A message is shown to the user if a dialog box is blocked by - a popup blocker in Firefox.
    • -
    • [SF - BUG-1358891] [SF - BUG-1340960] The editor not works locally (without a web server) on directories - where the path contains spaces.
    • -
    • [SF - BUG-1357247] The editor now intercepts SHIFT + INS keystrokes when needed.
    • -
    • [SF - BUG-1328488] Attention: The Page - Break command now produces different tags to avoid XHTML compatibility - issues. Any Page Break previously applied to content produced with previous versions - of FCKeditor will not me rendered now, even if they will still be working correctly. -
    • -
    • It is now possible to allow cut/copy/past operations on Firefox using the user.js file.
    • -
    • [SF - BUG-1336792] A fix has been applied to the XHTML processor to allow tag names - with the "minus" char (-).
    • -
    • [SF - BUG-1339560] The editor now correctly removes the "selected" option - for checkboxes and radio buttons.
    • -
    • The Table dialog box now selects the table correctly when right-clicking on objects - (like images) placed inside the table.
    • -
    • Attention: A few changes have been - made in the skins. If you have a custom skin, it is recommended you to make a diff - of the fck_contextmenu.css file of the default skin with your implementation.
    • -
    • Mouse select (marking things in blue, like selecting text) has been disabled - on panels (drop-down menu commands, color selector and context menu) and toolbar, - for both IE and Firefox.
    • -
    • On Gecko, fake borders will not be applied to tables with the border attribute set - to more than 0, but placed inside tables with border set to 0.
    • -
    • [SF - BUG-1360717] A wrapping issue in the "Silver" skin has been corrected. - Thanks to Ricky Casey.
    • -
    • [SF - BUG-1251145] In IE, the focus is now maintained in the text when clicking in - the empty area following it.
    • -
    • [SF - BUG-1181386] [SF - BUG-1237791] The "Stylesheet Classes" field in the Link dialog - window in now applied correctly on IE. Thanks to Andrew Crowe.
    • -
    • The "Past from Word" dialog windows is now showing correctly on Firefox - on some languages.
    • -
    • [SF - BUG-1315008] [SF - BUG-1241992] IE, when selecting objects (like images) and hitting the "Backspace" - button, the browser's "back" will not get executed anymore and the object - will be correctly deleted.
    • -
    • The "AutoDetectPasteFromWord" is now working correctly in IE. Thanks to - Juan Ant. Gómez.
    • -
    • A small enhancement has been made in the Word pasting detection. Thanks to Juan - Ant. Gómez.
    • -
    • [SF - BUG-1090686] No more conflict with Firefox "Type-Ahead Find" feature. -
    • -
    • [SF - BUG-942653] [SF - BUG-1155856] The "width" and "height" of images sized - using the inline handlers are now correctly loaded in the image dialog box.
    • -
    • [SF - BUG-1209093] When "Full Page Editing" is active, in the "Document - Properties" dialog, the "Browse Server" button for the page background - is now correctly hidden if "ImageBrowser" is set to "false" - in the configurations file. Thanks to Richard.
    • -
    • [SF - BUG-1120266] [SF - BUG-1186196] The editor now retains the focus when selecting commands in - the toolbar.
    • -
    • [SF - BUG-1244480] The editor now will look first to linked fields "ids" - and second to "names".
    • -
    • [SF - BUG-1252905] The "InsertHtml" function now preserves URLs as entered. -
    • -
    • [SF - BUG-1266317] Toolbar commands are not anymore executed outside the editor.
    • -
    • [SF - BUG-1365664] The "wrap=virtual" attribute has been removed from the - integration files for validation purposes. No big impact.
    • -
    • [SF - BUG-972193] Now just one click is needed to active the cursor inside the editor. -
    • -
    • The hidden fields used by the editor are now protected from changes using the "Web - Developer Add-On > Forms > Display Forms Details" extension. Thanks to - Jean-Marie Griess.
    • -
    • On IE, the "Format" toolbar dropdown now reflects the current paragraph - type on IE. Because of a bug in the browser, it is quite dependent on the browser - language and the editor interface language (both must be the same). Also, as the - "Normal (DIV)" type is seen by IE as "Normal", to avoid confusion, - both types are ignored by this fix.
    • -
    • On some very rare cases, IE was loosing the "align" attribute for DIV - tags. Fixed.
    • -
    • [SF - BUG-1388799] The code formatter was removing spaces on the beginning of lines - inside PRE tags. Fixed.
    • -
    • [SF - BUG-1387135] No more "NaN" values in the image dialog, when changing - the sizes in some situations.
    • -
    • Corrected a small type in the table handler.
    • -
    • You can now set the "z-index" for floating panels (toolbar dropdowns, - color selectors, context menu) in Firefox, avoiding having them hidden under another - objects. By default it is set to 10,000. Use the FloatingPanelsZIndex configuration - option to change this value.
    • -
    -

    - Special thanks to - Alfonso Martinez, who have provided many patches and suggestions for the - following features / fixes present in this version. I encourage all you to - donate to Alfonso, as a way to say thanks for his nice open source approach. - Thanks Alfonso!. Check out his contributions:

    -
      -
    • [SF - BUG-1352539] [SF - BUG-1208348] With Firefox, no more "fake" selections are appearing - when inserting images, tables, special chars or when using the "insertHtml" - function.
    • -
    • [SF - Patch-1382588] The "FCKConfig.DisableImageHandles" configuration option - is not working on Firefox 1.5.
    • -
    • [SF - Patch-1368586] Some fixes have been applied to the Flash dialog box and the - Flash pre-processor.
    • -
    • [SF - Patch-1360253] [SF - BUG-1378782] [SF - BUG-1305899] [SF - BUG-1344738] [SF - BUG-1347808] On dialogs, some fields became impossible - to select or change when using Firefox. It has been fixed.
    • -
    • [SF - Patch-1357445] Add support for DIV in the Format drop-down combo for Firefox. -
    • -
    • [SF - BUG-1350465] [SF - BUG-1376175] The "Cell Properties" dialog now works correctly - when right-clicking in an object (image, for example) placed inside the cell itself. -
    • -
    • [SF - Patch-1349166] On IE, there is now support for namespaces on tags names.
    • -
    • [SF - Patch-1350552] Fix the display issue when applying styles on tables.
    • -
    • [SF - Patch-1352320 ] Fixed a wrong usage of the "parentElement" - property on Gecko.
    • -
    • [SF - Patch-1355007] The new "FCKDebug.OutputObject" function is available - to dump all object information in the debug window.
    • -
    • [SF - Patch-1329500] It is now possible to delete table columns when clicking on a - TH cell of the column.
    • -
    • [SF - Patch-1315351] It is now possible to pass the image width and height to the - "SetUrl" function of the Flash dialog box.
    • -
    • [SF - Patch-1327384] TH tags are now correctly handled by the source code formatter - and the "FillEmptyBlocks" configuration option.
    • -
    • [SF - Patch-1327406] Fake borders are now displayed for TH elements on tables with - border set to 0. Also, on Firefox, it will now work even if the border attribute - is not defined and the borders are not dotted.
    • -
    • Hidden fields now get rendered on Firefox.
    • -
    • The BasePath is now included in the debugger URL to avoid problems when calling - it from plugins.
    • -
    -

    - * This version has been partially sponsored by - Alkacon Software.

    -

    - Version 2.1.1

    -

    - New Features and Improvements:

    -
      -
    • The new "Insert Page Break" command (for printing) has - been introduced.*
    • -
    • The editor package now has a root directory called "FCKeditor".
    • -
    -

    - Fixed Bugs:

    -
      -
    • [SF - BUG-1326285] [SF - BUG-1316430] [SF - BUG-1323662] [SF - BUG-1326223] We are doing a little step back with this version. - The ENTER and BACKSPACE behavior changes for Firefox have been remove. It is a nice - feature, but we need much more testing on it. It introduced some bugs and so - its preferable to not have that feature, avoiding problems (even if that feature - was intended to solve some issues).
    • -
    • [SF - BUG-1275714] Comments in the beginning of the source are now preserved when - using the "undo" and "redo" commands.
    • -
    • The "undo" and "redo" commands now work for the Style command. -
    • -
    • An error in the execution of the pasting commands on Firefox has been fixed.
    • -
    • [SF - BUG-1326184] No strange (invalid) entities are created when using Firefox. Also, - the &nbsp; used by the FillEmptyBlocks setting is maintained even if you disable - the ProcessHTMLEntities setting.
    • -
    -

    - * This version has been partially sponsored by - Acctive Software S.A..

    -

    - Version 2.1

    -

    - New Features and Improvements:

    -
      -
    • [SF - BUG-1200328] The editor now offers a way to "protect" part of the - source to remain untouched while editing or changing views. Just use the "FCKConfig.ProtectedSource" - object to configure it and customize to your needs. It is based on regular expressions. - See fckconfig.js for some samples.
    • -
    • The editor now offers native support for Lasso. Thanks and welcome to - our new developer Jason Huck.
    • -
    • New language files are available: -
        -
      • Faraose (by Símin Lassaberg and Helgi Arnthorsson) -
      • -
      • Malay (by Fairul Izham Mohd Mokhlas)
      • -
      • Mongolian (by Lkamtseren Odonbaatar)
      • -
      • Vietnamese (by Phan Binh Giang)
      • -
      -
    • -
    • A new configurable ColdFusion connector is available. Thanks to Mark Woods. - Many enhancements has been introduced with it.
    • -
    • The PHP connector for the default File Browser now sorts the folders and files names. -
    • -
    • [SF - BUG-1289372] [SF - BUG-1282758] In the PHP connector it is now possible to set the absolute - (server) path to the User Files directory, avoiding problems with Virtual Directories, - Symbolic Links or Aliases. Take a look at the config.php file.
    • -
    • The ASP.Net uploader (for Quick Uploads) has been added to the package.
    • -
    • A new way to define simple "combo" toolbar items , like - Style and Font, has been introduced. Thanks to Steve Lineberry. See - sample06.html and the "simplecommands" plugin to fully understand - it.
    • -
    • A new test case has been added that shows how to set the editor background dynamically - without using a CSS.
    • -
    • [SF - BUG-1155906] [SF - BUG-1110116] [SF - BUG-1216332] The "AutoDetectPasteFromWord" configuration option - is back (IE only feature).
    • -
    • The new "OnAfterLinkedFieldUpdate" event has been introduced. If - is fired when the editor updates its hidden associated field.
    • -
    • Attention: The color of the right border of the toolbar (left on RTL interfaces) - has been moved from code to the CSS (TB_SideBorder class). Update your custom skins. -
    • -
    • A sample "htaccess.txt" file has been added to the editor's package - to show how to configure some Linux sites that could present problems on Firefox - with "Illegal characters" errors. Respectively the "" - chars.
    • -
    • With the JavaScript, ASP and PHP integration files, you can set the QueryString - value "fcksource=true" to load the editor using the source files (located - in the _source directory) instead of the compressed ones. Thanks to Kae Verens for - the suggestion.
    • -
    • [SF - Feature-1246623] The new configuration option "ForceStrongEm" has - been introduced so you can force the editor to convert all <B> and <I> - tags to <STRONG> and <EM> respectively.
    • -
    • A nice contribution has been done by Goss Interactive Ltd: -
        -
      • [SF - BUG-1246949] Implemented ENTER key and BACKSPACE key handlers for Gecko so that - P tags (or an appropriate block element) get inserted instead of BR tags when not - in the UseBROnCarriageReturn config mode. -
        - The ENTER key handling has been written to function much the same as the ENTER key - handling on IE : as soon as the ENTER key is pressed, existing content will be wrapped - with a suitable block element (P tag) as appropriate and a new block element (P - tag) will be started. -
        - The ENTER key handler also caters for pressing ENTER within empty list items - ENTER - in an empty item at the top of a list will remove that list item and start a new - P tag above the list; ENTER in an empty item at the bottom of a list will remove - that list item and start a new P tag below the list; ENTER in an empty item in the - middle of a list will remove that list item, split the list into two, and start - a new P tag between the two lists.
      • -
      • Any tables that are found to be incorrectly nested within a block element (P tag) - will be moved out of the block element when loaded into the editor. This is required - for the new ENTER/BACKSPACE key handlers and it also avoids non-compliant HTML.  -
      • -
      • The InsertOrderedList and InsertUnorderedList commands have been overridden on Gecko - to ensure that block elements (P tags) are placed around a list item's content when - it is moved out of the list due to clicking on the editor's list toolbar buttons - (when not in the UseBROnCarriageReturn config mode).
      • -
      -
    • -
    -

    - Fixed Bugs:

    -
      -
    • [SF - BUG-1253255] [SF - BUG-1265520] Due to changes on version 2.0, the anchor list was not anymore - visible in the link dialog window. It has been fixed.
    • -
    • [SF - BUG-1242979] [SF - BUG-1251354] [SF - BUG-1256178] [SF - BUG-1274841] [SF - BUG-1303949] Due to a bug on Firefox, some keys stopped working - on startup over Firefox. It has been fixed.
    • -
    • [SF - BUG-1251373 ] The above fix also has corrected some strange behaviors on - Firefox.
    • -
    • [SF - BUG-1144258] [SF - BUG-1092081] The File Browsers now run on the same server session used - in the page where the editor is placed in (IE issue). Thanks to Simone Chiaretta. -
    • -
    • [SF - BUG-1305619 ] No more repeated login dialogs when running the editor with Windows - Integrated Security with IIS.
    • -
    • [SF - Patch-1245304] The Test Case 004 is now working correctly. It has been changed - to set the editor hidden at startup.
    • -
    • [SF - BUG-1290610 ] Over HTTPS, there were some warnings when loading the Images, - Flash and Link dialogs. Fixed.
    • -
    • Due to Gecko bugs, two errors were thrown when loading the editor in a hidden div. - Workarounds have been introduced. In any case, the testcase 004 hack is needed when - showing the editor (as in a tabbed interface).
    • -
    • An invalid path in the dialogs CSS file has been corrected.
    • -
    • On IE, the Undo/Redo can now be controlled using the Ctrl+Z and Ctrl+Y shortcut - keys.
    • -
    • [SF - BUG-1295538 ] A few Undo/Redo fixes for IE have been done.
    • -
    • [SF - BUG-1247070] On Gecko, it is now possible to use the shortcut keys for Bold - (CTRL+B), Italic (CTRL+I) and Underline (CTRL+U), like in IE.
    • -
    • [SF - BUG-1274303] The "Insert Column" command is now working correctly - on TH cells. It also copies any attribute applied to the source cells.
    • -
    • [SF - Patch-1287070 ] In the Universal Keyboard, the Arabic keystrokes translator - is now working with Firefox. Thanks again to Abdul-Aziz Al-Oraij.
    • -
    • The editor now handles AJAX requests with HTTP status 304.
    • -
    • [SF - BUG-1157780] [SF - BUG-1229077] Weird comments are now handled correctly (ignored on some cases). -
    • -
    • [SF - BUG-1155774] A spelling error in the Bulleted List Properties dialog has been - corrected.
    • -
    • [SF - BUG-1272018] The ampersand character can now be added from the Special Chars - dialog.
    • -
    • [SF - BUG-1263161] A small fix has been applied to the sampleposteddata.php file. - Thanks to Mike Wallace.
    • -
    • [SF - BUG-1241504] The editor now looks also for the ID of the hidden linked field. -
    • -
    • The caption property on tables is now working on Gecko. Thanks to Helen Somers (Goss - Interactive Ltd).
    • -
    • [SF - BUG-1297431] With IE, the editor now works locally when its files are placed - in a directory path that contains spaces.
    • -
    • [SF - BUG-1279551] [SF - BUG-1242105] On IE, some features are dependant of ActiveX components (secure... - distributed with IE itself). Some security setting could avoid the usage of - those components and the editor would stop working. Now a message is shown, indicating - the use the minimum necessary settings need by the editor to run.
    • -
    • [SF - BUG-1298880] Firefox can't handle the STRONG and EM tags. Those tags are now - converted to B and I so it works accordingly.
    • -
    • [SF - BUG-1271723] On IE, it is now possible to select the text and work correctly - in the contents of absolute positioned/dimensioned divs.
    • -
    • On IE, there is no need to click twice in the editor to activate the cursor - in the editing area.
    • -
    • [SF - BUG-1221621] Many "warnings" in the Firefox console are not thrown - anymore.
    • -
    • [SF - BUG-1295526] While editing on "FullPage" mode the basehref is - now active for CSS "link" tags.
    • -
    • [SF - Patch-1222584] A small fix to the PHP connector has been applied.
    • -
    • [SF - Patch-1281313] A few small changes to avoid problems with Plone. Thanks to Jean-mat. -
    • -
    • [SF - BUG-1275911] A check for double dots sequences on directory names on creation - has been introduced to the PHP and ASP connectors.
    • -
    -

    - Version 2.0

    -

    - New Features and Improvements:

    -
      -
    • The new "Flash" command is available. Now you can - easily handle Flash content, over IE and Gecko, including server browser integration - and context menu support. Due to limitations of the browsers, it is not possible - to see the preview of the movie while editing, so a nice "placeholder" - is used instead. *
    • -
    • A "Quick Upload " option is now available in the - link, image and flash dialog windows, so the user don't need to go (or have) the - File Browser for this operations. The ASP and PHP uploader are included. Take - a look at the configuration file.***
    • -
    • Added support for Active FoxPro Pages . Thanks to our new developer, - Sönke Freitag.
    • -
    • It is now possible to disable the size handles for images and tables - (IE only feature). Take a look at the DisableImageHandles and DisableTableHandles - configuration options.
    • -
    • The handles on form fields (small squares around them) and the inline editing - of its contents have been disabled. This makes it easier to users to use - the controls.
    • -
    • A much better support for Word pasting operations has been introduced. Now it uses - a dialog box, in this way we have better results and more control.**
    • -
    • [SF - Patch-1225372] A small change has been done to the PHP integration file. The - generic __construct constructor has been added for better PHP 5 sub-classing compatibility - (backward compatible). Thanks to Marcus Bointon.
    • -
    -

    - Fixed Bugs:

    -
      -
    • ATTENTION: Some security changes have been made to the connectors. Now you must - explicitly enable the connector you want to use. Please test your application before - deploying this update.
    • -
    • [SF - BUG-1211591] [SF - BUG-1204273] The connectors have been changed so it is not possible to use - ".." on directory names.
    • -
    • [SF - Patch-1219734] [SF - BUG-1219728] [SF - BUG-1208654] [SF - BUG-1205442] There was an error in the page unload on some cases - that has been fixed.
    • -
    • [SF - BUG-1209708] [SF - BUG-1214125] The undo on IE is now working correctly when the user starts - typing.
    • -
    • The preview now loads "Full Page" editing correctly. It also uses the - same XHTML code produced by the final output.
    • -
    • The "Templates" dialog was not working on some very specific (and strange) - occasions over IE.
    • -
    • [SF - BUG-1199631] [SF - BUG-1171944] A new option is available to avoid a bad IE behavior that shows - the horizontal scrollbar even when not needed. You can now force the vertical scrollbar - to be always visible. Just set the "IEForceVScroll" configuration option - to "true". Thanks to Grant Bartlett.
    • -
    • [SF - Patch-1212026] [SF - BUG-1228860] [SF - BUG-1211775] [SF - BUG-1199824] An error in the Packager has been corrected.
    • -
    • [SF - BUG-1163669] The XHTML processor now adds a space before the closing slash of - tags that don't have a closing tag, like <br />.
    • -
    • [SF - BUG-1213733] [SF - BUG-1216866] [SF - BUG-1209673] [SF - BUG-1155454] [SF - BUG-1187936 ] Now, on Gecko, the source is opened in a - dialog window to avoid fatal errors (Gecko bugs).
    • -
    • Some pages have been changed to avoid importing errors on Plone. Thanks to Arthur - Kalmenson.
    • -
    • [SF - BUG-1171606] There is a bug on IE that makes the editor to not work if - the instance name matches a meta tag name. Fixed.
    • -
    • On Firefox, the source code is now opened in a dialog box, to avoid error on pages - with more than one editor.
    • -
    • [SF - Patch-1225703] [SF - BUG-1214941] The "ForcePasteAsPlainText" configuration option - is now working correctly on Gecko browsers. Thanks to Manuel Polo.
    • -
    • [SF - BUG-1228836] The "Show Table Borders" feature is now working on Gecko - browsers.
    • -
    • [SF - Patch-1212529] [SF - BUG-1212517] The default File Browser now accepts connectors with querystring - parameters (with "?"). Thanks to Tomas Jucius.
    • -
    • [SF - BUG-1233318] A JavaScript error thrown when using the Print command has been - fixed.
    • -
    • [SF - BUG-1229696] A regular expression has been escaped to avoid problems when opening - the code in some editors. It has been moved to a dialog window.
    • -
    • [SF - BUG-1231978] [SF - BUG-1228939] The Preview window is now using the Content Type and Base href. -
    • -
    • [SF - BUG-1232056] The anchor icon is now working correctly on IE.
    • -
    • [SF - BUG-1202468] The anchor icon is now available on Gecko too.
    • -
    • [SF - BUG-1236279] A security warning has been corrected when using the File Browser - over HTTPS.
    • -
    • The ASP implementation now avoid errors when setting the editor value to null values. -
    • -
    • [SF - BUG-1237359] The trailing <BR> added by Gecko at the end of the source - is now removed.
    • -
    • [SF - BUG-1170828] No more &nbsp; is added to the source when using the "New - Page" button.
    • -
    • [SF - BUG-1165264] A new configuration option has been included to force the - editor to ignore empty paragraph values (<p>&nbsp;</p>), returning - empty ("").
    • -
    • No more &nbsp; is added when creating a table or adding columns, rows or cells. -
    • -
    • The <TD> tags are now included in the FillEmptyBlocks configuration handling. -
    • -
    • [SF - BUG-1224829] A small bug in the "Find" dialog has been fixed.
    • -
    • [SF - BUG-1221307] A small bug in the "Image" dialog has been fixed.
    • -
    • [SF - BUG-1219981] [SF - BUG-1155726] [SF - BUG-1178473] It is handling the <FORM>, <TEXTAREA> and <SELECT> - tags "name" attribute correctly. Thanks to thc33.
    • -
    • [SF - BUG-1205403] The checkbox and radio button values are now handled correctly - in their dialog windows. Thanks to thc33.
    • -
    • [SF - BUG-1236626] The toolbar now doesn't need to collapse when unloading the page - (IE only).
    • -
    • [SF - BUG-1212559] [SF - BUG-1017231] The "Save" button now calls the "onsubmit" - event before posting the form. The submit can be cancelled if the onsubmit returns - "false".
    • -
    • [SF - BUG-1215823] The editor now works correctly on Firefox if it values is set to - "<p></p>".
    • -
    • [SF - BUG-1217546] No error is thrown when "pasting as plain text" and no - text is available for pasting (as an image for example).
    • -
    • [SF - BUG-1207031] [SF - BUG-1223978] The context menu is now available in the source view.
    • -
    • [SF - BUG-1213871] Undo has been added to table creation and table operation commands. -
    • -
    • [SF - BUG-1205211] [SF - BUG-1229941] Small bug in the mcpuk file browser have been corrected.
    • -
    -

    - * This version has been partially sponsored by - Infineon Technologies AG.
    - ** This version has been partially sponsored by - Visualsoft Web Solutions.
    - *** This version has been partially sponsored by - Web Crossing, Inc.

    -

    - Version 2.0 FC (Final Candidate)

    -

    - New Features and Improvements:

    -
      -
    • A new tab called "Link" is available in the Image - Dialog window. In this way you can insert or modify the image link directly - from that dialog.*
    • -
    • The new "Templates" command is now available. Now the - user can select from a list of pre-build HTML and fill the editor with it. Take - a look at the "_docs" for more info.**
    • -
    • The mcpuk's File Browser for - PHP has been included in the package. He became the official developer of the File - Manager for FCKeditor, so we can expect good news in the future.
    • -
    • New configuration options are available to hide tabs from the - Image Dialog and Link Dialog windows: LinkDlgHideTarget, - LinkDlgHideAdvanced, ImageDlgHideLink and ImageDlgHideAdvanced.
    • -
    • [SF - BUG-1189442] [SF - BUG-1187164] [SF - BUG-1185905] It is now possible to configure the editor to not convert Greek - or special Latin letters to ther specific HTML entities. You - can also configure it to not convert any character at all. Take a look at the "ProcessHTMLEntities", - "IncludeLatinEntities" and "IncludeGreekEntities" configuration - options.
    • -
    • New language files are available: -
        -
      • Basque (by Ibon Igartua)
      • -
      • English (Australia / United Kingdom) (by Christopher Dawes)
      • -
      • Ukrainian (by Alexander Pervak)
      • -
      -
    • -
    • The version and date information have been removed from the files headers to avoid - unecessary diffs in source control systems when new versions are released (from - now on).
    • -
    • [SF - Patch-1159854] Ther HTML output rendered by the server side integration files - are now XHTML compatible.
    • -
    • [SF - BUG-1181823] It is now possible to set the desired DOCTYPE to use when edit - HTML fragments (not in Full Page mode).
    • -
    • There is now an optional way to implement different "mouse over" effects - to the buttons when they are "on" of "off".
    • -
    -

    - Fixed Bugs:

    - -

    - * This version has been partially sponsored by the - Hamilton College.
    - ** This version has been partially sponsored by - Infineon Technologies AG.

    -

    - Version 2.0 RC3 (Release Candidate 3)

    -

    - New Features and Improvements:

    -
      -
    • The editor now offers native Perl integration! Thanks and welcome - to Takashi Yamaguchi, our official Perl developer.
    • -
    • [SF - Feature-1026584] [SF - Feature-1112692] Formatting has been introduced to the - Source View. The output HTML can also be formatted. You can choose - to use spaces or tab for indentation. See the configuration file.
    • -
    • [SF - Feature-1031492] [SF - Feature-1004293] [SF - Feature-784281] It is now possible to edit full HTML pages - with the editor. Use the "FullPage" configuration setting to activate - it.
    • -
    • The new toolbar command, "Document Properties" is - available to edit document header info, title, colors, background, etc... Full page - editing must be enabled.
    • -
    • [SF - Feature-1151448] Spell Check is now available. You can use - ieSpell or Speller Pages right from FCKeditor. - More info about configuration can be found in the _docs folder.
    • -
    • [SF - Feature-1041686] [SF - Feature-1086386] [SF - Feature-1124602] New "Insert Anchor" command - has been introduced. (The anchor icon is visible only over IE for now).
    • -
    • [SF - Feature-1123816] It is now possible to configure the editor to show "fake" - table borders when the border size is set to zero. (It is working only - on IE for now).
    • -
    • Numbered and Bulleted lists can now be - configured . Just right click on then.
    • -
    • [SF - Feature-1088608] [SF - Feature-1144047] [SF - Feature-1149808] A new configuration setting is available, "BaseHref - ", to set the URL used to resolve relative links.
    • -
    • It is now possible to set the content language direction . - See the "FCKConfig.ContentLangDirection" configurations setting.
    • -
    • All Field Commands available on version 1.6 have been upgraded - and included in this version: form, checkbox, - radio button, text field, text area, - select field, button, image button - and hidden field .
    • -
    • Context menu options (right-click) has been added for: - anchors, select field, textarea, - checkbox, radio button, text field, - hidden field, textarea, button, - image button, form, bulleted list - and numbered list .
    • -
    • The "Universal Keyboard" has been converted from version - 1.6 to this one and it's now available.
    • -
    • It is now possible to configure the items to be shown in the - context menu . Just use the FCKConfig.ContextMenu option at fckconfig.js. -
    • -
    • A new configuration (FillEmptyBlocks) is available to force the editor to - automatically insert a &nbsp; on empty block elements (p, div, pre, - h1, etc...) to avoid differences from the editing and the final result. (Actually, - the editor automatically "grows" empty elements to make the user able - to enter text on it). Attention: the extra &nbsp; will be added when switching - from WYSIWYG to Source View, so the user may see an additional space on empty blocks. - (XHTML support must be enabled).
    • -
    • It is now possible to configure the toolbar to "break - " between two toolbar strips. Just insert a "/" between then. Take - a look at fckconfig.js for a sample.
    • -
    • New Language files are available: -
        -
      • Brazilian Portuguese (by Carlos Alberto Tomatis Loth)
      • -
      • Bulgarian (by Miroslav Ivanov)
      • -
      • Esperanto (by Tim Morley)
      • -
      • Galician (by Fernando Riveiro Lopez)
      • -
      • Japanese ( by Takashi Yamaguchi)
      • -
      • Persian (by Hamed Taj-Abadi)
      • -
      • Romanian (by Adrian Nicoara)
      • -
      • Slovak (by Gabriel Kiss)
      • -
      • Thai (by Audy Charin Arsakit)
      • -
      • Turkish (by Reha Biçer)
      • -
      • The Chinese Traditional has been set as the default (zn) instead of zn-tw.
      • -
      -
    • -
    • Warning: All toolbar image images have been changed. The "button." prefix - has been removed. If you have your custom skin, please rename your files.
    • -
    • A new plugin is available in the package: "Placeholders". - In this way you can insert non editable tags in your document to be processed on - server side (very specific usage).
    • -
    • The ASPX files are no longer available in this package. They have been moved to - the FCKeditor.Net package. In this way the ASP.Net integration is much better organized. -
    • -
    • The FCKeditor.Packager program is now part of the main package. It is not anymore distributed - separately.
    • -
    • The PHP connector now sets the uploaded file permissions (chmod) to 0777.
    • -
    • [SF - Patch-1090215] It's now possible to give back more info from your custom image - browser calling the SetUrl( url [, width] [, height] [, alt] ). Thanks to Ben Noblet. -
    • -
    • The package files now maintain their original "Last Modified" date, so - incremental FTP uploads can be used to update to new versions of the editor - (from now on).
    • -
    • The "Source" view now forces its contents to be written in "Left - to Right" direction even when the editor interface language is running a RTL - language (like Arabic, Hebrew or Persian).
    • -
    -

    - Fixed Bugs:

    -
      -
    • [SF - BUG-1124220] [SF - BUG-1119894] [SF - BUG-1090986] [SF - BUG-1100408] The editor now works correctly when starting with an - empty value and switching to the Source mode.
    • -
    • [SF - BUG-1119380] [SF - BUG-1115750] [SF - BUG-1101808] The problem with the scrollbar and the toolbar combos (Style, - Font, etc...) over Mac has been fixed.
    • -
    • [SF - BUG-1098460] [SF - BUG-1076544] [SF - BUG-1077845] [SF - BUG-1092395] A new upload class has been included for the ASP File - Manager Connector. It uses the "ADODB.Stream" object. Many thanks to "NetRube". -
    • -
    • I small correction has been made to the ColdFusion integration files. Thanks to - Hendrik Kramer.
    • -
    • There was a very specific problem when the editor was running over a FRAME executed - on another domain.
    • -
    • The performance problem on Gecko while typing quickly has been solved.
    • -
    • The <br type= "_moz">is not anymore shown on XHTML source.
    • -
    • It has been introduced a mechanism to avoid automatic contents duplication on very - specific occasions (bad formatted HTML).
    • -
    • [SF - BUG-1146407] [SF - BUG-1145800] [SF - BUG-1118803 ] Other issues in the XHTML processor have been solved. -
    • -
    • [SF - BUG-1143969] The editor now accepts the "accept-charset" attribute - in the FORM tag (IE specific bug).
    • -
    • [SF - BUG-1122742] [SF - BUG-1089548 ] Now, the contents of the SCRIPT and STYLE tags remain untouched. -
    • -
    • [SF - BUG-1114748] The PHP File Manager Connector now sets the new folders permissions - (chmod) to 0777 correctly.
    • -
    • The PHP File Manager Connector now has a configuration file (editor/filemanager/browser/default/connectors/php/config.php) - to set some security preferences.
    • -
    • The ASP File Manager Connector now has a configuration file (editor/filemanager/browser/default/connectors/asp/config.asp) - to set some security preferences.
    • -
    • A small bug in the toolbar rendering (strips auto position) has been corrected. -
    • -
    • [SF - BUG-1093732] [SF - BUG-1091377] [SF - BUG-1083044] [SF - BUG-1096307] The configurations are now encoded so a user can use - values that has special chars (&=/).
    • -
    • [SF - BUG-1103688] [SF - BUG-1092331] [SF - BUG-1088220] PHP samples now use PHP_SELF to automatically discover - the editor's base path.
    • -
    • Some small wrapping problems with some labels in the Image and Table dialog windows - have been fixed.
    • -
    • All .js files are now encoded in UTF-8 format with the BOM (byte order mask) to - avoid some errors on specific Linux installations.
    • -
    • [SF - BUG-1114449] The editor packager program has been modified so now it is possible - to use the source files to run the editor as described in the documentation. The - new packager must be downloaded.
    • -
    • A small problem with the editor focus while in source mode has been corrected. - Thanks to Eric (ric1607).
    • -
    • [SF - BUG-1108167] [SF - BUG-1085149] [SF - BUG-1151296] [SF - BUG-1082433] No more IFRAMEs without src attribute. Now it points - to a blank page located in the editor's package. In this way we avoid security warnings - when using the editor over HTTPS. Thanks to Guillermo Bozovich.
    • -
    • [SF - BUG-1117779] The editor now works well if you have more than one element named - "submit" on its form (even if it is not correct to have this situation). -
    • -
    • The XHTML processor was duplicating the text on some specific situation. It has - been fixed.
    • -
    • [SF - Patch-1090213] [SF - Patch-1098929] With ASP, the editor now works correctly on pages using "Option - Explicit". Thanks to Ben Noblet.
    • -
    • [SF - BUG-1100759] [SF - BUG-1029125] [SF - BUG-966130] The editor was not working with old IE 5.5 browsers. There - was a problem with the XML parser. It has been fixed.
    • -
    • The localization engine is now working correctly over IE 5.5 browsers.
    • -
    • Some commands where not working well over IE 5.5 (emoticons, image,...). It has - been fixed.
    • -
    • [SF - BUG-1146441] [SF - BUG-1149777] The editor now uses the TEXTAREA id in the ReplaceTextarea - function. If the id is now found, it uses the "name". The docs have been - updated.
    • -
    • [SF - BUG-1144297] Some corrections have been made to the Dutch language file. Thanks - to Erwin Dondorp.
    • -
    • [SF - BUG-1121365] [SF - BUG-1090102] [SF - BUG-1152171] [SF - BUG-1102907] There is no problem now to start the editor with values - like "<div></div>" or "<p></p>".
    • -
    • [SF - BUG-1114059] [SF - BUG-1041861] The click on the disabled options in the Context Menu has no - effects now.
    • -
    • [SF - BUG-1152617] [SF - BUG-1102441] [SF - BUG-1095312] Some problems when setting the editor source to very specific - values has been fixed.
    • -
    • [SF - BUG-1093514] [SF - BUG-1089204] [SF - BUG-1077609] The editor now runs correctly if called directly (locally) without - a server installation (just opening the HTML sample files).
    • -
    • [SF - BUG-1088248] The editor now uses a different method to load its contents. In - this way the URLs remain untouched.
    • -
    • The PHP integration file now detects Internet Explorer 5.5 correctly.
    • -
    -

    - Version 2.0 RC2 (Release Candidate 2)

    -
      -
    • [SF - Feature-1042034] [SF - Feature-1075961] [SF - Feature-1083200] A new dialog window for the table cell properties - is now available (right-click).
    • -
    • [SF - Feature-1042034] The new "Split Cell ", to split - a table cell in two columns, has been introduced (right-click).
    • -
    • [SF - Feature-1042034] The new "Merge Cells", to merge - table cells (in the same row), has been introduced (right-click).
    • -
    • The "fake" TAB key support (available by default over - Gecko browsers is now available over IE too. You can set the number of spaces to - add setting the FCKConfig.TabSpaces configuration setting. Set it to 0 (zero) to - disable this feature (IE).
    • -
    • It now possible to tell IE to send a <BR> when the user presses - the Enter key. Take a look at the FCKConfig.UseBROnCarriageReturn - configuration setting.
    • -
    • [SF - Feature-1085422] ColdFusion: The File Manager connector - is now available! (Thanks to Hendrik Kramer).
    • -
    • The editor is now available in 29 languages! The new language files - available are:  -
        -
      • [SF - Feature-1067775] Chinese Simplified and Traditional (Taiwan - and Hong Kong) (by NetRube).
      • -
      • Czech (by David Horák).
      • -
      • Danish (by Jesper Michelsen).
      • -
      • Dutch (by Bram Crins).
      • -
      • German (by Maik Unruh).
      • -
      • Portuguese (Portugal) (by Francisco Pereira).
      • -
      • Russian (by Andrey Grebnev).
      • -
      • Slovenian (by Boris Volaric).
      • -
      -
    • -
    • Updates to the French language files (by Hubert Garrido).
    • -
    • [SF - BUG-1085816] [SF - BUG-1083743] [SF - BUG-1078783] [SF - BUG-1077861] [SF - BUG-1037404] Many small bugs in the XHTML processor - has been corrected (workarounds to browser specific bugs). These are some things - to consider regarding the changes: -
        -
      • [SF - BUG-1083744] On Gecko browsers, any element attribute that the name starts with - "_moz" will be ignored.
      • -
      • [SF - BUG-1060073] The <STYLE> and <SCRIPT> elements contents will be - handled as is, without CDATA tag surrounding. This may break XHTML validation. In - any case the use of external files for scripts and styles is recommended (W3C recommendation).
      • -
      -
    • -
    • [SF - BUG-1088310] [SF - BUG-1078837] [SF - BUG-999792] URLs now remain untouched when initializing the editor or - switching from WYSYWYG to Source and vice versa.
    • -
    • [SF - BUG-1082323] The problem in the ASP and PHP connectors when handling non - "strange" chars in file names has been corrected.
    • -
    • [SF - BUG-1085034] [SF - BUG-1076796] Some bugs in the PHP connector have been corrected.
    • -
    • A problem with the "Format" command on IE browsers on languages different - of English has been solved. The negative side of this correction is that due to - a IE bad design it is not possible to update the "Format" combo while - moving throw the text (context sensitive).
    • -
    • On Gecko browsers, when selecting an image and executing the "New Page" - command, the image handles still appear, even if the image is not available anymore - (this is a Gecko bug). When clicking in a "phanton" randle, the browser - crashes. It doesn't happen (the crash) anymore.
    • -
    • [SF - BUG-1082197] On ASP, the bug in the browser detection system for Gecko browsers - has been corrected. Thanks to Alex Varga.
    • -
    • Again on ASP, the browser detection for IE had some problems on servers that use - comma for decimal separators on numbers. It has been corrected. Thanks to Agrotic. -
    • -
    • No error is thrown now when non existing language is configured in the - editor. The English language file is loaded in that case.
    • -
    • [SF - BUG-1077747] The missing images on the Office2003 and Silver skins are now included - in the package.
    • -
    • On some Gecko browsers, the dialog window was not loading correctly. I couldn't - reproduce the problem, but a fix has been applied based on users tests.
    • -
    • [SF - BUG-1004078] ColdFusion: The "config" structure/hash table with keys - and values is in ColdFusion not(!) case sensitive. All keys returned by ColdFusion - are in upper case format. Because the FCKeditor configuration keys must be case - sensitive, we had to match all structure/hash keys with a list of the correct configuration - names in mixed case. This has been added to the fckeditor.cfc and fckeditor.cfm. -
    • -
    • [SF - BUG-1075166] ColdFusion: The "fallback" variant of the texteditor - (<textarea>) has a bug in the fckeditor.cfm. This has been fixed.
    • -
    • A typo in the Polish language file has been corrected. Thanks to Pawel Tomicki. -
    • -
    • [SF - BUG-1086370] A small coding type in the Link dialog window has been corrected. -
    • -
    -

    - Version 2.0 RC1 (Release Candidate 1)

    -
      -
    • ASP support is now available (including the File Manager connector). -
    • -
    • PHP support is now available (including the File Manager connector). -
    • -
    • [SF - Feature-1063217] The new advanced Style command is available - in the toolbar: full preview, context sensitive, style definitions are loaded from - a XML file (see documentation for more instructions).
    • -
    • The Font Format, Font Name and Font Size - toolbar command now show a preview of the available options.
    • -
    • The new Find and Replace features has been introduced. -
    • -
    • A new Plug-in system has been developed. Now it is quite easy to - customize the editor to your needs. (Take a look at the html/sample06.html file). -
    • -
    • The editor now handles HTML entities in the right way (XHTML support - must be set to "true"). It handles all entities defined in the W3C XHTML - DTD file.
    • -
    • A new "_docs" folder has been introduced for the documentation. - It is not yet complete, but I hope the community will help us to fill it better. -
    • -
    • It is now possible (even if it is not recommended by the W3C) to force the use of - simple ampersands (&) on attributes (like the links href) instead of its entity - &amp;. Just set FCKConfig.ForceSimpleAmpersand = true in the configuration - file.
    • -
    • [SF - Feature-1026866] The "EditorAreaCSS" configuration - option has been introduced. In this way you can set the CSS to use in the editor - (editable area).
    • -
    • The editing area is not anymore clipped if the toolbar is too large and exceeds - the window width.
    • -
    • [SF - BUG-1064902] [SF - BUG-1033933] The editor interface is now completely localizable. - The version ships with 19 languages including: Arabic, Bosnian, Catalan, - English, Spanish, Estonian, Finnish, French, - Greek, Hebrew, Croatian, Italian, Korean, Lithuanian, - Norwegian, Polish, Serbian (Cyrillic), - Serbian (Latin) and Swedish.
    • -
    • [SF - BUG-1027858] Firefox 1.0 PR introduced a bug that made the editor - stop working on it. A workaround has been developed to fix the problem.
    • -
    • There was a positioning problem over IE with the color panel. It has been corrected. -
    • -
    • [SF - BUG-1049842] [SF - BUG-1033832] [SF - BUG-1028623] [SF - BUG-1026610] [SF - BUG-1064498] The combo commands in the toolbar were not opening - in the right way. It has been fixed.
    • -
    • [SF - BUG-1053399] [SF - BUG-965318] [SF - BUG-1018296] The toolbar buttons icons were not showing on some IE and - Firefox/Mac installations. It has been fixed.
    • -
    • [SF - BUG-1054621] Color pickers are now working with the "office2003" and - "silver" skins.
    • -
    • [SF - BUG-1054108] IE doesn’t recognize the "&apos;" entity for - apostrophes, so a workaround has been developed to replace it with "&#39;" - (its numeric entity representation).
    • -
    • [SF - BUG-983434] [SF - BUG-983398] [SF - BUG-1028103] [SF - BUG-1072496] The problem with elements with name "submit" - inside the editor's form has been solved.
    • -
    • [SF - BUG-1018743] The problem with Gecko when collapsing the toolbar while in source - mode has been fixed.
    • -
    • [SF - BUG-1065268] [SF - BUG-1034354] The XHTML processor now doesn’t use the minimized tag - syntax (like <br/>) for empty elements that are not marked as EMPTY in the - W3C XHTML DTD specifications.
    • -
    • [SF - BUG-1029654] [SF - BUG-1046500] Due to a bug on Gecko there was a problem when creating links. - It has been fixed.
    • -
    • [SF - BUG-1065973] [SF - BUG-999792] The editor now handles relative URLs in IE. In effect IE transform - all relative URLs to absolute links, pointing to the site the editor is running. - So now the editor removes the protocol and host part of the link if it matches the - running server.
    • -
    • [SF - BUG-1071824] The color dialog box bug has been fixed.
    • -
    • [SF - BUG-1052856] [SF - BUG-1046493] [SF - BUG-1023530] [SF - BUG-1025978] The editor now doesn’t throw an error if no selection - was made and the create link command is used.
    • -
    • [SF - BUG-1036756] The XHTML processor has been reviewed.
    • -
    • [SF - BUG-1029101] The Paste from Word feature is working correctly.
    • -
    • [SF - BUG-1034623] There is an IE bug when setting the editor value to "<p><hr></p>". - A workaround has been developed.
    • -
    • [SF - BUG-1052695] There are some rendering differences between Netscape and Mozilla. - (Actually that is a bug on both browsers). A workaround has been developed to solve - it.
    • -
    • [SF - BUG-1073053] [SF - BUG-1050394] The editor doesn’t throw errors when hidden.
    • -
    • [SF - BUG-1066321] Scrollbars should not appear on dialog boxes (at least for the - Image and Link ones).
    • -
    • [SF - BUG-1046490] Dialogs now are forced to show on foreground over Mac.
    • -
    • [SF - BUG-1073955] A small bug in the image dialog window has been corrected.
    • -
    • [SF - BUG-1049534] The Resources Browser window is now working well over Gecko browsers. -
    • -
    • [SF - BUG-1036675] The Resources Browser window now displays the server error on bad - installations.
    • -
    -

    - Version 2.0 Beta 2

    -
      -
    • There is a new configuration - "GeckoUseSPAN" - that - can be used to tell Gecko browsers to use <SPAN style...> or <B>, <I> - and <U> for the bold, italic and underline commands.
    • -
    • [SF - Feature-1002622] New Text Color and Background Color -  commands have been added to the editor.
    • -
    • On Gecko browsers, a message is shown when, because of security settings, the - user is not able to cut, copy or paste data from the clipboard using the - toolbar buttons or the context menu.
    • -
    • The new "Paste as Plain Text " command has been introduced. -
    • -
    • The new "Paste from Word " command has been introduced. -
    • -
    • A new configuration named "StartupFocus" can be used to tell the - editor to get the focus when the page is loaded.
    • -
    • All Java integration files has been moved to a new separated package. -
    • -
    • [SF - BUG-1016781] Table operations are now working when right click - inside a table. The following commands has been introduced: Insert Row, - Delete Row, Insert Column, Delete Column, - Insert Cell and Delete Cells .
    • -
    • [SF - BUG-965067] [SF - BUG-1010379] [SF - BUG-977713] XHTML support was not working with FireFox, blocking the - editor when submitting data. It has been fixed.
    • -
    • [SF - BUG-1007547 ] [SF - BUG-974595 ] The "FCKLang not defined" error when loading - has been fixed.
    • -
    • [SF - BUG-1021028] If the editor doesn't have the focus, some commands were been executed - outside the editor in the place where the focus is. It has been fixed.
    • -
    • [SF - BUG-981191] We are now using <!--- ---> for ColdFusion comments.
    • -
    -

    - Version 2.0 Beta 1

    -

    - This is the first beta of the 2.x series. It brings a lot of new and important things. - Beta versions will be released until all features available on version 1.x will - be introduced in the 2.0.
    -
    - Note: As it is a beta, it is not yet completely developed. Future - versions can bring new features that can break backward compatibility with this - version. -

    -
      -
    • Gecko browsers (Mozilla and Netscape) support. -
    • -
    • Quick startup response times.
    • -
    • Complete XHTML 1.0 support.
    • -
    • Advanced link dialog box: -
        -
      • Target selection.
      • -
      • Popup configurator.
      • -
      • E-Mail link.
      • -
      • Anchor selector.
      • -
      -
    • -
    • New File Manager.
    • -
    • New dialog box system, with tabbed dialogs support.
    • -
    • New context menus with icons.
    • -
    • New toolbar with "expand/collapse" feature.
    • -
    • Skins support.
    • -
    • Right to left languages support.
    • -
    -

    - Version 1.6.1

    -
      -
    • [SF - BUG-862364] [SF - BUG-812733] There was a problem when the user tried to delete the last row, - collumn or cell in a table. It has been corrected.*
    • -
    • New Estonian language file. Thanks to Kristjan Kivikangur
    • -
    • New Croatian language file. Thanks to Alex Varga.
    • -
    • Updated language file for Czech. Thanks to Plachow.
    • -
    • Updated language file for Chineze (zh-cn). Thanks to Yanglin.
    • -
    • Updated language file for Catalan. Thanks to Jordi Cerdan.
    • -
    -

    - * This version has been partially sponsored by Genuitec, - LLC.

    -

    - Version 1.6

    -
      -
    • Context Menu support for form elements.*
    • -
    • New "Selection Field" command with advanced dialog box - for options definitions.*
    • -
    • New "Image Button" command is available.*
    • -
    • [SF - Feature-936196] Many form elements bugs has been fixed and - many improvements has been done.*
    • -
    • New Java Integration Module. There is a complete Java API and Tag - Library implementations. Take a look at the _jsp directory. Thanks to Simone Chiaretta - and Hao Jiang.
    • -
    • The Word Spell Checker can be used. To be able to run it, your - browser security configuration "Initialize and script ActiveX controls not - marked as safe" must be set to "Enable" or "Prompt". And - easier and more secure way to do that is to add your site in the list of trusted - sites. IeSpell can still be used. Take a look at the fck_config.js file for some - configuration options. Thanks to EdwardRF.
    • -
    • [SF - Feature-748807] [SF - Feature-801030] [SF - Feature-880684] New "Anchor" command, including - context menu support. Thanks to G.Meijer.
    • -
    • Special characters are replaced with their decimal HTML entities when the XHMTL - support is enabled (only over IE5.5+).
    • -
    • New Office 2003 Style toolbar icons are available. Just uncomment - the config.ToolbarImagesPath key in the fck_config.js file. Thanks to Abdul-Aziz - A. Al-Oraij. Attention: the default toolbar items have been moved - to the "images/toolbar/default" directory.
    • -
    • [SF - Patch-934566] Double click support for Images, Tables, Links, - Anchors and all Form elements. Thanks to Top Man.
    • -
    • New "New Page" command to start a typing from scratch. - Thanks to Abdul-Aziz A. Al-Oraij.
    • -
    • New "Replace" command. Thanks to Abdul-Aziz A. Al-Oraij. -
    • -
    • New "Advanced Font Style" command. Thanks to Abdul-Aziz - A. Al-Oraij.
    • -
    • [SF - Feature-738193] New "Save" command. It can be used - to simulate a save action, but in fact it just submits the form where the editor - is placed in. Thanks to Abdul-Aziz A. Al-Oraij.
    • -
    • New "Universal Keyboard" command. This 22 charsets are - available: Arabic, Belarusian, Bulgarian, Croatian, Czech, Danish, Finnish, French, - Greek, Hebrew, Hungarian, Diacritical, Macedonian, Norwegian, Polish, Russian, Serbian - (Cyrillic), Serbian (Latin), Slovak, Spanish, Ukrainian and Vietnamese. Includes - a keystroke listener to type Arabic on none Arabic OS or machine. Thanks to Abdul-Aziz - A. Al-Oraij.
    • -
    • [SF - Patch-935358] New "Preview" command. Context menu - option is included and can be deactivated throw the config.ShowPreviewContextMenu - configuration. Thanks to Ben Ramsey.
    • -
    • New "Table Auto Format" context menu command. Hack a - little the fck_config.js and the fck_editorarea.css files. Thanks to Alexandros - Lezos.
    • -
    • New "Bulleted List Properties " context menu to define - its type and class. Thanks to Alexandros Lezos.
    • -
    • The image dialog box has been a redesigned . Thanks - to Mark Fierling.
    • -
    • Images now always have the "alt" attribute set, even - when it's value is empty. Thanks to Andreas Barnet.
    • -
    • [SF - Patch-942250] You can set on fck_config.js to automatically clean Word - pasting operations without a user confirmation.
    • -
    • Forms element dialogs and other localization pending labels has been updated.
    • -
    • A new Lithuanian language file is available. Thanks to Tauras Paliulis. -
    • -
    • A new Hebrew language file is available. Thanks to Ophir Radnitz. -
    • -
    • A new Serbian language file is available. Thanks to Zoran Subic. -
    • -
    • Danish language file updates. Thanks to Flemming Jensen.
    • -
    • Catalan language file updates. Thanks to Jordi Cerdan.
    • -
    • [SF - Patch-936514] [SF - BUG-918716] [SF - BUG-931037] [SF - BUG-865864] [SF - BUG-915410] [SF - BUG-918716] Some languages files were not - saved on UTF-8 format causing some javascript errors on loading - the editor or making "undefined" to show on editor labels. This problem - was solved.
    • -
    • Updates on the testsubmit.php file. Thanks to Geat and Gabriel Schillaci
    • -
    • [SF - BUG-924620] There was a problem when setting a name to an editor instance when - the name is used by another tag. For example when using "description" - as the name in a page with the <META name="description"> tag.
    • -
    • [SF - BUG-935018] The "buletted" typo has been corrected.
    • -
    • [SF - BUG-902122] Wrong css and js file references have been corrected.
    • -
    • [SF - BUG-918942] All dialog boxes now accept Enter and Escape keys as Ok and Cancel - buttons.
    • -
    -

    - * This version has been partially sponsored by Genuitec, - LLC.

    -

    - Version 1.5

    -
      -
    • [SF - Feature-913777] New Form Commands are now available! Special - thanks to G.Meijer.
    • -
    • [SF - Feature-861149] Print Command is now available!
    • -
    • [SF - BUG-743546] The XHTML content duplication problem has been - solved . Thanks to Paul Hutchison.
    • -
    • [SF - BUG-875853] The image dialog box now gives precedence for width - and height values set as styles. In this way a user can change the size of the image - directly inside the editor and the changes will be reflected in the dialog box. -
    • -
    • [SF - Feature-788368] The sample file upload manager for ASPX now - uses guids for the file name generation. In this way a support - XML file is not needed anymore.
    • -
    • It's possible now to programmatically change the Base Path of the - editor if it's installed in a directory different of "/FCKeditor/". Something - like this:
      - oFCKeditor.BasePath = '/FCKeditor/' ;
      - Take a look at the _test directory for samples.
    • -
    • There was a little bug in the TAB feature that moved the insertion point if there - were any object (images, tables) in the content. It has been fixed.
    • -
    • The problem with accented and international characters on the PHP - test page was solved.
    • -
    • A new Chinese (Taiwan) language file is available. Thanks to Nil. -
    • -
    • A new Slovenian language file is available. Thanks to Pavel Rotar. -
    • -
    • A new Catalan language file is available. Thanks to Jordi Cerdan. -
    • -
    • A new Arabic language file is available. Thanks to Abdul-Aziz A. - Al-Oraij.
    • -
    • Small corrections on the Norwegian language file.
    • -
    • A Java version for the test results (testsubmit.jsp) is now available. Thanks to - Pritpal Dhaliwal.
    • -
    • When using JavaScript to create a editor instance it's possible now to easily get - the editor's value calling oFCKeditor.GetValue() (eg.). Better JavaScript API interfaces - will be available on version 2.0.
    • -
    • If XHTML is enabled the editor cleans the HTML before showing it - on the Source View, so the exact result can be viewed by the user. This option can - be activated setting config.EnableSourceXHTML = true in the fck_config.js file. -
    • -
    • The JS integration object now escapes all configuration settings, - in this way a user can use reserved chars on it. For example: -
      - oFCKeditor.Config["ImageBrowserURL"] = '/imgs/browse.asp?filter=abc*.jpg&userid=1'; -
    • -
    • A minimal browse server sample is now available in ASP. Thanks to Andreas Barnet. -
    • -
    -

    - Version 1.4

    -
      -
    • ATTENTION: For PHP users: The editor was changed and now uses - htmlspecialchars instead of htmlentities when handling - the initial value. It should works well, but please make some tests before upgrading - definitively. If there is any problem just uncomment the line in the fckeditor.php - file (and send me a message!).
    • -
    • The editor is now integrated with ieSpell (http://www.iespell.com) - for Spell Checking. You can configure the download URL in then - fck_config.js file. Thanks to Sanjay Sharma. (ieSpell is free for personal use but - must be paid for commercial use)
    • -
    • Table and table cell dialogs has been changed. - Now you can select the class you want to be applied. Thanks to - Alexander Lezos.
    • -
    • [SF - Feature-865378]A new upload support is available for ASP. It - uses the /UserImages/ folder in the root of the web site as the files container - and a counter controlled by the upload.cnt file. Both must have write permissions - set to the IUSR_xxx user. Thanks to Trax and Juanjo.
    • -
    • [SF - Patch-798128] The user (programmer) can now define a custom separator - for the list items of a combo in the toolbar. Thanks to Wulff D. Heiss.
    • -
    • [SF - Feature-741963][SF - Feature-878941][SF - Patch-869389] A minimal support for a “fake” TAB is now available, - even if HTML has no support for TAB. Now when the user presses the TAB key a configurable - number of spaces (&nbsp;) is added. Take a look at config.TabSpaces on the fck_config.js - file. No action is performed if it is set to zero. The default value is 4. Thanks - to Phil Hassey.
    • -
    • [SF - BUG-782779][SF - BUG-790939] The problem with big images has been corrected. Thanks to Raver. -
    • -
    • [SF - BUG-862975] Now the editor does nothing if no image is selected in the image - dialog box and the OK button is hit.
    • -
    • [SF - BUG-851609] The problem with ASP and null values has been solved.
    • -
    • Norwegean language pack. Thanks to Martin Kronstad.
    • -
    • Hungarian language pack. Thanks to Balázs Szabó. -
    • -
    • Bosnian language pack. Thanks to Trax.
    • -
    • Japanese language pack. Thanks to Kato Yuichiro.
    • -
    • Updates on the Polish language pack. Thanks to Norbert Neubauer. -
    • -
    • The Chinese (Taiwan) (zh-tw) has been removed from the package - because it's corrupt. I'm sorry. I hope someone could send me a good version soon. -
    • -
    -

    - Version 1.3.1

    -
      -
    • It's now possible to configure the editor the insert a <BR> tag instead - of <P> when the user presses the <Enter> key. - Take a look at the fck_config.js configuration file for the "UseBROnCarriageReturn" - key. This option is disabled by default.
    • -
    • Icelandic language pack. Thanks to Andri Óskarsson.
    • -
    • [SF - BUG-853374] On IE 5.0 there was a little error introduced with version 1.3 on - initialization. It was corrected.
    • -
    • [SF - BUG-853372] On IE 5.0 there was a little error introduced with version 1.3 when - setting the focus in the editor. It was corrected.
    • -
    • Minor errors on the language file for english has been corrected. - Thanks to Anders Madsen.
    • -
    • Minor errors on the language file for danish has been corrected. - Thanks to Martin Johansen.
    • -
    -

    - Version 1.3

    -
      -
    • Language support for Danish, Polish, Simple Chinese, Slovak, Swedish and - Turkish.
    • -
    • Language updates for Romanian.
    • -
    • It's now possible to override any of the editor's configurations - (for now it's implemented just for JavaScript, ASPX and HTC modules). See _test/test.html - for a sample. I'm now waiting for the Community for the ASP, CFM and PHP versions. -
    • -
    • A new method is available for PHP users. It's called ReturnFCKeditor. - It works exactly like CreateFCKeditor, but it returns a string with the HTML - for the editor instead of output it (echo). This feature is useful for people who - are working with Smarty Templates or something like that. Thanks to Timothy J. Finucane. -
    • -
    • Many people have had problems with international characters over - PHP. I had also the same problem. PHP have strange problems with - character encoding. The code hasn't been changed but just saved again with Western - European encoding. Now it works well in my system.
      - Take a look also at the "default_charset" configuration option at the - php.ini file. It doesn't seem to be an editor's problem but a PHP issue.
    • -
    • The "testsubmit.php" file now strips the "Magic - Quotes " that are automatically added by PHP on form posts.
    • -
    • A new language integration module is available for ASP/Jscript. - Thanks to Dimiter Naydenov.
    • -
    • New configuration options are available to customize the - Target combo box in the Insert/Modify Link dialog box. - Now you can hide it, or set which options are available in the combo box. Take a - look at the fck_config.js file.
    • -
    • The Text as Plain Text toolbar icon has been changed - to avoid confusion with the Normal Paste or. Thanks to Kaupo Kalda. -
    • -
    • The file dhtmled.cab has been removed from the package. It's not - needed to the editor to work and caused some confusion for a few users.
    • -
    • The editor's content now doesn't loose the focus - when the user clicks with the mouse in a toolbar button.
    • -
    • On drag-and-drop operations the data to be inserted in the editor - is now converted to plain text when the "ForcePasteAsPlainText" - configuration is set to true.
    • -
    • The image browser sample in PHP now sorts the files - by name. Thanks to Sergey Lupashko.
    • -
    • Two new configuration options are available to turn on/off - by default the "Show Borders" and "Show - Details" commands.
    • -
    • Some characters have been removed from the "Insert - Special Chars" dialog box because they were causing encoding problems - in some languages. Thanks to Abomb Hua.
    • -
    • JSP versions of the image and file upload and browsing - features. Thanks to Simone Chiaretta.
    • -
    -

    - Version 1.2.4

    -
      -
    • Language support for Spanish, Finnish, Romanian and Korean.
    • -
    • Language updates for German.
    • -
    • New Zoom toolbar option. (Thanks - to "mtn_roadie")
    • -
    -

    - Version 1.2.2

    -
      -
    • Language support for French.
    • -
    • [SF - BUG-782779] Version 1.2 introduced a bug on the image dialog window: when changing - the image, no update was done. This bug is now fixed.
    • -
    -

    - Version 1.2

    -
      -
    • Enhancements to the Word cleaning feature (Thanks to Karl von Randow). -
    • -
    • The Table dialog box now handles the Style width and height set - in the table (Thanks to Roberto Arruda). There where many problems on prior version - when people changed manually the table's size, dragging the size handles, and then - it was not possible to set a new size using the table dialog box.
    • -
    • For the Image dialog box: -
        -
      • No image is shown in the preview pane if no image has been set.
      • -
      • If no HSpace is set in the image a "-1" value was shown in the dialog - box. Now, nothing is shown if the value is negative.
      • -
      -
    • -
    • [SF - BUG-739630] Image with link lost the link when changing its properties. The - problem is solved.
    • -
    • Due to some problems in the XHTML cleaning (content duplication when the source - HTML is dirty and malformed), the XHTML support is turned off by default - from this version. You can still change this behavior and turn it on in the configuration - file.
    • -
    • Some little updates on the English language file.
    • -
    • A few addition of missing entries on all languages files (translations for these - changes are pending).
    • -
    • Language files has been added for the following languages: -
        -
      • Brazilian Portuguese (pt-br)
      • -
      • Czech (cz)
      • -
      • Dutch (nl)
      • -
      • Russian (ru)
      • -
      • Chinese (Taiwan) (zh-tw)
      • -
      • Greek (gr)
      • -
      • German (de)
      • -
      -
    • -
    -

    - Version 1.1

    -
      -
    • The "Multi Language" system is now available. This version - ships with English and Italian versions completed. Other languages will be available - soon. The editor automatically detects the client language and sets all labels, - tooltips and dialog boxes to it, if available. The auto detection and the default - language can be set in the fck_config.file.
    • -
    • Two files can now be created to isolate customizations code from the original source - code of the editor: fckeditor.config.js and fckeditor.custom.js. - Create these files in the root folder of your web site, if needed. The first one - can be used to add or override configurations set on fck_config.js. The second one - is used for custom actions and behaviors.
    • -
    • A problem with relative links and images like "/test/test.doc" has been - solved. In prior versions, only with XHTML support enabled, the URL was changed - to something like "http://www.mysite.xxx/test/test.doc" (The domain was - automatically added). Now the XHTML cleaning procedure gets the URLs exactly how - they are defined in the editor’s HTML.
    • -
    • [SF - BUG-742168] Mouse drag and drop from toolbar buttons has been disabled.
    • -
    • [SF - BUG-768210] HTML entities, like &lt;, were not load correctly. - The problem is solved.
    • -
    • [SF - BUG-748812] The link dialog window doesn't open when the link button is grayed. -
    • -
    -

    - Version 1.0

    -
      -
    • Three new options are available in the configuration file to set what file types - are allowed / denied to be uploaded from the "Insert Link" and "Insert - Image" dialog boxes.
    • -
    • Upload options, for links and images, are automatically hidden on IE 5.0 browsers - (it's not compatible).
    • -
    • [SF BUG-734894] Fixed a problem on XHTML cleaning: the value on INPUT fields were - lost.
    • -
    • [SF BUG-713797] Fixed some image dialog errors when trying to set image properties - when no image is available.
    • -
    • [SF BUG-736414] Developed a workaround for a DHTML control bug when loading in the - editor some HTML started with <p><hr></p>.
    • -
    • [SF BUG-737143] Paste from Word cleaning changed to solve some IE 5.0 errors. This - feature is still not available over IE 5.0.
    • -
    • [SF BUG-737233] CSS mappings are now OK on the PHP image browser module.
    • -
    • [SF BUG-737495] The image preview in the image dialog box is now working correctly. -
    • -
    • [SF BUG-737532] The editor automatically switches to WYSIWYG mode when the form - is posted.
    • -
    • [SF BUG-739571] The editor is now working well over Opera (as for Netscape, a TEXTAREA - is shown).
    • -
    -

    - Version 1.0 Final Candidate

    -
      -
    • A new dialog box for the "Link" command is available. Now you can upload - and browse the server exactly like the image dialog box. It's also possible to define - the link title and target window (_blank, _self, _parent and _top). As with the - image dialog box, a sample (and simple) file server browser is available.
    • -
    • A new configuration option is available to force every paste action to be handled - as plain text. See "config.ForcePasteAsPlainText" in fck_config.js.
    • -
    • A new Toolbar button is available: "Paste from Word". It automatically - cleans the clipboard content before pasting (removesWord styles, classes, xml stuff, - etc...). This command is available for IE 5.5 and more. For IE 5.0 users, a message - is displayed advising that the text will not be cleaned before pasting.
    • -
    • The editor automatically detects Word clipboard data on pasting operations and asks - the user to clean it before pasting. This option is turned on by default but it - can be configured. See "config.AutoDetectPasteFromWord" in fck_config.js. -
    • -
    • Table properties are now available in cells' right click context menu.
    • -
    • It's now possible to edit cells advanced properties from it's right click context - menu.
    • -
    -

    - Version 1.0 Release Candidate 1 (RC1)

    -
      -
    • Some performance improvements.
    • -
    • The file dhtmled.cab has been added to the package for clients ho needs to install - the Microsoft DHTML Editor component.
    • -
    • [SF BUG-713952] The format command options are localized, so it depends on the IE - language to work. Until version 0.9.5 it was working only over English IE browsers. - Now the options are load dynamically on the client using the client's language. -
    • -
    • [SF BUG-712103] The style command is localized, so it depends on the IE language - to work. Until version 0.9.5 it was working only over English IE browsers. Now it - configures itself using the client's language.
    • -
    • [SF BUG-726137] On version 0.9.5, some commands (special chars, image, emoticons, - ...) remove the next available character before inserting the required content even - if no selection was made in the editor. Now the editor replaces only the selected - content (if available).
    • -
    -

    - Version 0.9.5 beta

    -
      -
    • XHTML support is now available! It can be enabled/disabled in the fck_config.js - file.
    • -
    • "Show Table Borders" option: show borders for tables with borders size - set to zero.
    • -
    • "Show Details" option: show hidden elements (comments, scripts, paragraphs, - line breaks)
    • -
    • IE behavior integration module. Thanks to Daniel Shryock.
    • -
    • "Find" option: to find text in the document.
    • -
    • More performance enhancements.
    • -
    • New testsubmit.php file. Thansk to Jim Michaels.
    • -
    • Two initial PHP upload manager implementations (not working yet). Thanks to Frederic - Tyndiuk and Christian Liljedahl.
    • -
    • Initial PHP image browser implementation (not working yet). Thanks to Frederic Tyndiuk. -
    • -
    • Initial CFM upload manager implementation. Thanks to John Watson.
    • -
    -

    - Version 0.9.4 beta

    -
      -
    • ColdFusion module integration is now available! Thanks to John Watson.
    • -
    • "Insert Smiley" toolbar option! Thanks to Fredox. Take a look at fck_config.js - for configuration options.
    • -
    • "Paste as plain text" toolbar option!
    • -
    • Right click support for links (edit / remove).
    • -
    • Buttons now are shown in gray when disabled.
    • -
    • Buttons are shown just when the image is downloaded (no more "red x" while - waiting for it).
    • -
    • The toolbar background color can be set with a CSS style (see fck_editor.css).
    • -
    • Toolbar images have been reviewed: -
        -
      • Now they are transparent.
      • -
      • No more over...gif for every button (so the editor loads quicker).
      • -
      • Buttons states are controlled with CSS styles. (see fck_editor.css).
      • -
      -
    • -
    • Internet Explorer 5.0 compatibility, except for the image uploading popup.
    • -
    • Optimizations when loading the editor.
    • -
    • [SF BUG-709544] - Toolbar buttons wait for the images to be downloaded to start - watching and responding the user actions (turn buttons on/off when the user changes - position inside the editor).
    • -
    • JavaScript integration is now Object Oriented. CreateFCKeditor function is not available - anymore. Take a look in test.html.
    • -
    • Two new configuration options, ImageBrowser and ImageUpload, are available to turn - on and off the image upload and image browsing options in the Image dialog box. - This options can be hidden for a specific editor instance throw specific URL parameter - in the editor’s IFRAME (upload=true/false&browse=true/false). All specific - language integration modules handle this option. For sample see the _test directory. -
    • -
    - - diff --git a/fckeditor/editor/_source/classes/fckcontextmenu.js b/fckeditor/editor/_source/classes/fckcontextmenu.js deleted file mode 100644 index 1575c49f..00000000 --- a/fckeditor/editor/_source/classes/fckcontextmenu.js +++ /dev/null @@ -1,223 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * FCKContextMenu Class: renders an control a context menu. - */ - -var FCKContextMenu = function( parentWindow, langDir ) -{ - this.CtrlDisable = false ; - - var oPanel = this._Panel = new FCKPanel( parentWindow ) ; - oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; - oPanel.IsContextMenu = true ; - - // The FCKTools.DisableSelection doesn't seems to work to avoid dragging of the icons in Mozilla - // so we stop the start of the dragging - if ( FCKBrowserInfo.IsGecko ) - oPanel.Document.addEventListener( 'draggesture', function(e) {e.preventDefault(); return false;}, true ) ; - - var oMenuBlock = this._MenuBlock = new FCKMenuBlock() ; - oMenuBlock.Panel = oPanel ; - oMenuBlock.OnClick = FCKTools.CreateEventListener( FCKContextMenu_MenuBlock_OnClick, this ) ; - - this._Redraw = true ; -} - - -FCKContextMenu.prototype.SetMouseClickWindow = function( mouseClickWindow ) -{ - if ( !FCKBrowserInfo.IsIE ) - { - this._Document = mouseClickWindow.document ; - if ( FCKBrowserInfo.IsOpera && !( 'oncontextmenu' in document.createElement('foo') ) ) - { - this._Document.addEventListener( 'mousedown', FCKContextMenu_Document_OnMouseDown, false ) ; - this._Document.addEventListener( 'mouseup', FCKContextMenu_Document_OnMouseUp, false ) ; - } - this._Document.addEventListener( 'contextmenu', FCKContextMenu_Document_OnContextMenu, false ) ; - } -} - -/** - The customData parameter is just a value that will be send to the command that is executed, - so it's possible to reuse the same command for several items just by assigning different data for each one. -*/ -FCKContextMenu.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) -{ - var oItem = this._MenuBlock.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ; - this._Redraw = true ; - return oItem ; -} - -FCKContextMenu.prototype.AddSeparator = function() -{ - this._MenuBlock.AddSeparator() ; - this._Redraw = true ; -} - -FCKContextMenu.prototype.RemoveAllItems = function() -{ - this._MenuBlock.RemoveAllItems() ; - this._Redraw = true ; -} - -FCKContextMenu.prototype.AttachToElement = function( element ) -{ - if ( FCKBrowserInfo.IsIE ) - FCKTools.AddEventListenerEx( element, 'contextmenu', FCKContextMenu_AttachedElement_OnContextMenu, this ) ; - else - element._FCKContextMenu = this ; -} - -function FCKContextMenu_Document_OnContextMenu( e ) -{ - if ( FCKConfig.BrowserContextMenu ) - return true ; - - var el = e.target ; - - while ( el ) - { - if ( el._FCKContextMenu ) - { - if ( el._FCKContextMenu.CtrlDisable && ( e.ctrlKey || e.metaKey ) ) - return true ; - - FCKTools.CancelEvent( e ) ; - FCKContextMenu_AttachedElement_OnContextMenu( e, el._FCKContextMenu, el ) ; - return false ; - } - el = el.parentNode ; - } - return true ; -} - -var FCKContextMenu_OverrideButton ; - -function FCKContextMenu_Document_OnMouseDown( e ) -{ - if( !e || e.button != 2 ) - return false ; - - if ( FCKConfig.BrowserContextMenu ) - return true ; - - var el = e.target ; - - while ( el ) - { - if ( el._FCKContextMenu ) - { - if ( el._FCKContextMenu.CtrlDisable && ( e.ctrlKey || e.metaKey ) ) - return true ; - - var overrideButton = FCKContextMenu_OverrideButton ; - if( !overrideButton ) - { - var doc = FCKTools.GetElementDocument( e.target ) ; - overrideButton = FCKContextMenu_OverrideButton = doc.createElement('input') ; - overrideButton.type = 'button' ; - var buttonHolder = doc.createElement('p') ; - doc.body.appendChild( buttonHolder ) ; - buttonHolder.appendChild( overrideButton ) ; - } - - overrideButton.style.cssText = 'position:absolute;top:' + ( e.clientY - 2 ) + - 'px;left:' + ( e.clientX - 2 ) + - 'px;width:5px;height:5px;opacity:0.01' ; - } - el = el.parentNode ; - } - return false ; -} - -function FCKContextMenu_Document_OnMouseUp( e ) -{ - if ( FCKConfig.BrowserContextMenu ) - return true ; - - var overrideButton = FCKContextMenu_OverrideButton ; - - if ( overrideButton ) - { - var parent = overrideButton.parentNode ; - parent.parentNode.removeChild( parent ) ; - FCKContextMenu_OverrideButton = undefined ; - - if( e && e.button == 2 ) - { - FCKContextMenu_Document_OnContextMenu( e ) ; - return false ; - } - } - return true ; -} - -function FCKContextMenu_AttachedElement_OnContextMenu( ev, fckContextMenu, el ) -{ - if ( ( fckContextMenu.CtrlDisable && ( ev.ctrlKey || ev.metaKey ) ) || FCKConfig.BrowserContextMenu ) - return true ; - - var eTarget = el || this ; - - if ( fckContextMenu.OnBeforeOpen ) - fckContextMenu.OnBeforeOpen.call( fckContextMenu, eTarget ) ; - - if ( fckContextMenu._MenuBlock.Count() == 0 ) - return false ; - - if ( fckContextMenu._Redraw ) - { - fckContextMenu._MenuBlock.Create( fckContextMenu._Panel.MainNode ) ; - fckContextMenu._Redraw = false ; - } - - // This will avoid that the content of the context menu can be dragged in IE - // as the content of the panel is recreated we need to do it every time - FCKTools.DisableSelection( fckContextMenu._Panel.Document.body ) ; - - var x = 0 ; - var y = 0 ; - if ( FCKBrowserInfo.IsIE ) - { - x = ev.screenX ; - y = ev.screenY ; - } - else if ( FCKBrowserInfo.IsSafari ) - { - x = ev.clientX ; - y = ev.clientY ; - } - else - { - x = ev.pageX ; - y = ev.pageY ; - } - fckContextMenu._Panel.Show( x, y, ev.currentTarget || null ) ; - - return false ; -} - -function FCKContextMenu_MenuBlock_OnClick( menuItem, contextMenu ) -{ - contextMenu._Panel.Hide() ; - FCKTools.RunFunction( contextMenu.OnItemClick, contextMenu, menuItem ) ; -} diff --git a/fckeditor/editor/_source/classes/fckdataprocessor.js b/fckeditor/editor/_source/classes/fckdataprocessor.js deleted file mode 100644 index c8726c57..00000000 --- a/fckeditor/editor/_source/classes/fckdataprocessor.js +++ /dev/null @@ -1,119 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * The Data Processor is responsible for transforming the input and output data - * in the editor. For more info: - * http://dev.fckeditor.net/wiki/Components/DataProcessor - * - * The default implementation offers the base XHTML compatibility features of - * FCKeditor. Further Data Processors may be implemented for other purposes. - * - */ - -var FCKDataProcessor = function() -{} - -FCKDataProcessor.prototype = -{ - /* - * Returns a string representing the HTML format of "data". The returned - * value will be loaded in the editor. - * The HTML must be from to , including , and - * eventually the DOCTYPE. - * Note: HTML comments may already be part of the data because of the - * pre-processing made with ProtectedSource. - * @param {String} data The data to be converted in the - * DataProcessor specific format. - */ - ConvertToHtml : function( data ) - { - // The default data processor must handle two different cases depending - // on the FullPage setting. Custom Data Processors will not be - // compatible with FullPage, much probably. - if ( FCKConfig.FullPage ) - { - // Save the DOCTYPE. - FCK.DocTypeDeclaration = data.match( FCKRegexLib.DocTypeTag ) ; - - // Check if the tag is available. - if ( !FCKRegexLib.HasBodyTag.test( data ) ) - data = '' + data + '' ; - - // Check if the tag is available. - if ( !FCKRegexLib.HtmlOpener.test( data ) ) - data = '' + data + '' ; - - // Check if the tag is available. - if ( !FCKRegexLib.HeadOpener.test( data ) ) - data = data.replace( FCKRegexLib.HtmlOpener, '$&' ) ; - - return data ; - } - else - { - var html = - FCKConfig.DocType + - ' 0 && !FCKRegexLib.Html4DocType.test( FCKConfig.DocType ) ) - html += ' style="overflow-y: scroll"' ; - - html += '>' + - '' + - data + - '' ; - - return html ; - } - }, - - /* - * Converts a DOM (sub-)tree to a string in the data format. - * @param {Object} rootNode The node that contains the DOM tree to be - * converted to the data format. - * @param {Boolean} excludeRoot Indicates that the root node must not - * be included in the conversion, only its children. - * @param {Boolean} format Indicates that the data must be formatted - * for human reading. Not all Data Processors may provide it. - */ - ConvertToDataFormat : function( rootNode, excludeRoot, ignoreIfEmptyParagraph, format ) - { - var data = FCKXHtml.GetXHTML( rootNode, !excludeRoot, format ) ; - - if ( ignoreIfEmptyParagraph && FCKRegexLib.EmptyOutParagraph.test( data ) ) - return '' ; - - return data ; - }, - - /* - * Makes any necessary changes to a piece of HTML for insertion in the - * editor selection position. - * @param {String} html The HTML to be fixed. - */ - FixHtml : function( html ) - { - return html ; - } -} ; diff --git a/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js b/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js deleted file mode 100644 index 992ec386..00000000 --- a/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This is a generic Document Fragment object. It is not intended to provide - * the W3C implementation, but is a way to fix the missing of a real Document - * Fragment in IE (where document.createDocumentFragment() returns a normal - * document instead), giving a standard interface for it. - * (IE Implementation) - */ - -var FCKDocumentFragment = function( parentDocument, baseDocFrag ) -{ - this.RootNode = baseDocFrag || parentDocument.createDocumentFragment() ; -} - -FCKDocumentFragment.prototype = -{ - - // Append the contents of this Document Fragment to another element. - AppendTo : function( targetNode ) - { - targetNode.appendChild( this.RootNode ) ; - }, - - AppendHtml : function( html ) - { - var eTmpDiv = this.RootNode.ownerDocument.createElement( 'div' ) ; - eTmpDiv.innerHTML = html ; - FCKDomTools.MoveChildren( eTmpDiv, this.RootNode ) ; - }, - - InsertAfterNode : function( existingNode ) - { - FCKDomTools.InsertAfterNode( existingNode, this.RootNode ) ; - } -} diff --git a/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js b/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js deleted file mode 100644 index 4a50cf44..00000000 --- a/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This is a generic Document Fragment object. It is not intended to provide - * the W3C implementation, but is a way to fix the missing of a real Document - * Fragment in IE (where document.createDocumentFragment() returns a normal - * document instead), giving a standard interface for it. - * (IE Implementation) - */ - -var FCKDocumentFragment = function( parentDocument ) -{ - this._Document = parentDocument ; - this.RootNode = parentDocument.createElement( 'div' ) ; -} - -// Append the contents of this Document Fragment to another node. -FCKDocumentFragment.prototype = -{ - - AppendTo : function( targetNode ) - { - FCKDomTools.MoveChildren( this.RootNode, targetNode ) ; - }, - - AppendHtml : function( html ) - { - var eTmpDiv = this._Document.createElement( 'div' ) ; - eTmpDiv.innerHTML = html ; - FCKDomTools.MoveChildren( eTmpDiv, this.RootNode ) ; - }, - - InsertAfterNode : function( existingNode ) - { - var eRoot = this.RootNode ; - var eLast ; - - while( ( eLast = eRoot.lastChild ) ) - FCKDomTools.InsertAfterNode( existingNode, eRoot.removeChild( eLast ) ) ; - } -} ; diff --git a/fckeditor/editor/_source/classes/fckdomrange.js b/fckeditor/editor/_source/classes/fckdomrange.js deleted file mode 100644 index 7e032da4..00000000 --- a/fckeditor/editor/_source/classes/fckdomrange.js +++ /dev/null @@ -1,935 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Class for working with a selection range, much like the W3C DOM Range, but - * it is not intended to be an implementation of the W3C interface. - */ - -var FCKDomRange = function( sourceWindow ) -{ - this.Window = sourceWindow ; - this._Cache = {} ; -} - -FCKDomRange.prototype = -{ - - _UpdateElementInfo : function() - { - var innerRange = this._Range ; - - if ( !innerRange ) - this.Release( true ) ; - else - { - // For text nodes, the node itself is the StartNode. - var eStart = innerRange.startContainer ; - - var oElementPath = new FCKElementPath( eStart ) ; - this.StartNode = eStart.nodeType == 3 ? eStart : eStart.childNodes[ innerRange.startOffset ] ; - this.StartContainer = eStart ; - this.StartBlock = oElementPath.Block ; - this.StartBlockLimit = oElementPath.BlockLimit ; - - if ( innerRange.collapsed ) - { - this.EndNode = this.StartNode ; - this.EndContainer = this.StartContainer ; - this.EndBlock = this.StartBlock ; - this.EndBlockLimit = this.StartBlockLimit ; - } - else - { - var eEnd = innerRange.endContainer ; - - if ( eStart != eEnd ) - oElementPath = new FCKElementPath( eEnd ) ; - - // The innerRange.endContainer[ innerRange.endOffset ] is not - // usually part of the range, but the marker for the range end. So, - // let's get the previous available node as the real end. - var eEndNode = eEnd ; - if ( innerRange.endOffset == 0 ) - { - while ( eEndNode && !eEndNode.previousSibling ) - eEndNode = eEndNode.parentNode ; - - if ( eEndNode ) - eEndNode = eEndNode.previousSibling ; - } - else if ( eEndNode.nodeType == 1 ) - eEndNode = eEndNode.childNodes[ innerRange.endOffset - 1 ] ; - - this.EndNode = eEndNode ; - this.EndContainer = eEnd ; - this.EndBlock = oElementPath.Block ; - this.EndBlockLimit = oElementPath.BlockLimit ; - } - } - - this._Cache = {} ; - }, - - CreateRange : function() - { - return new FCKW3CRange( this.Window.document ) ; - }, - - DeleteContents : function() - { - if ( this._Range ) - { - this._Range.deleteContents() ; - this._UpdateElementInfo() ; - } - }, - - ExtractContents : function() - { - if ( this._Range ) - { - var docFrag = this._Range.extractContents() ; - this._UpdateElementInfo() ; - return docFrag ; - } - return null ; - }, - - CheckIsCollapsed : function() - { - if ( this._Range ) - return this._Range.collapsed ; - - return false ; - }, - - Collapse : function( toStart ) - { - if ( this._Range ) - this._Range.collapse( toStart ) ; - - this._UpdateElementInfo() ; - }, - - Clone : function() - { - var oClone = FCKTools.CloneObject( this ) ; - - if ( this._Range ) - oClone._Range = this._Range.cloneRange() ; - - return oClone ; - }, - - MoveToNodeContents : function( targetNode ) - { - if ( !this._Range ) - this._Range = this.CreateRange() ; - - this._Range.selectNodeContents( targetNode ) ; - - this._UpdateElementInfo() ; - }, - - MoveToElementStart : function( targetElement ) - { - this.SetStart(targetElement,1) ; - this.SetEnd(targetElement,1) ; - }, - - // Moves to the first editing point inside a element. For example, in a - // element tree like "

    Text

    ", the start editing point - // is "

    ^ Text

    " (inside ). - MoveToElementEditStart : function( targetElement ) - { - var editableElement ; - - while ( targetElement && targetElement.nodeType == 1 ) - { - if ( FCKDomTools.CheckIsEditable( targetElement ) ) - editableElement = targetElement ; - else if ( editableElement ) - break ; // If we already found an editable element, stop the loop. - - targetElement = targetElement.firstChild ; - } - - if ( editableElement ) - this.MoveToElementStart( editableElement ) ; - }, - - InsertNode : function( node ) - { - if ( this._Range ) - this._Range.insertNode( node ) ; - }, - - CheckIsEmpty : function() - { - if ( this.CheckIsCollapsed() ) - return true ; - - // Inserts the contents of the range in a div tag. - var eToolDiv = this.Window.document.createElement( 'div' ) ; - this._Range.cloneContents().AppendTo( eToolDiv ) ; - - FCKDomTools.TrimNode( eToolDiv ) ; - - return ( eToolDiv.innerHTML.length == 0 ) ; - }, - - /** - * Checks if the start boundary of the current range is "visually" (like a - * selection caret) at the beginning of the block. It means that some - * things could be brefore the range, like spaces or empty inline elements, - * but it would still be considered at the beginning of the block. - */ - CheckStartOfBlock : function() - { - var cache = this._Cache ; - var bIsStartOfBlock = cache.IsStartOfBlock ; - - if ( bIsStartOfBlock != undefined ) - return bIsStartOfBlock ; - - // Take the block reference. - var block = this.StartBlock || this.StartBlockLimit ; - - var container = this._Range.startContainer ; - var offset = this._Range.startOffset ; - var currentNode ; - - if ( offset > 0 ) - { - // First, check the start container. If it is a text node, get the - // substring of the node value before the range offset. - if ( container.nodeType == 3 ) - { - var textValue = container.nodeValue.substr( 0, offset ).Trim() ; - - // If we have some text left in the container, we are not at - // the end for the block. - if ( textValue.length != 0 ) - return cache.IsStartOfBlock = false ; - } - else - currentNode = container.childNodes[ offset - 1 ] ; - } - - // We'll not have a currentNode if the container was a text node, or - // the offset is zero. - if ( !currentNode ) - currentNode = FCKDomTools.GetPreviousSourceNode( container, true, null, block ) ; - - while ( currentNode ) - { - switch ( currentNode.nodeType ) - { - case 1 : - // It's not an inline element. - if ( !FCKListsLib.InlineChildReqElements[ currentNode.nodeName.toLowerCase() ] ) - return cache.IsStartOfBlock = false ; - - break ; - - case 3 : - // It's a text node with real text. - if ( currentNode.nodeValue.Trim().length > 0 ) - return cache.IsStartOfBlock = false ; - } - - currentNode = FCKDomTools.GetPreviousSourceNode( currentNode, false, null, block ) ; - } - - return cache.IsStartOfBlock = true ; - }, - - /** - * Checks if the end boundary of the current range is "visually" (like a - * selection caret) at the end of the block. It means that some things - * could be after the range, like spaces, empty inline elements, or a - * single
    , but it would still be considered at the end of the block. - */ - CheckEndOfBlock : function( refreshSelection ) - { - var isEndOfBlock = this._Cache.IsEndOfBlock ; - - if ( isEndOfBlock != undefined ) - return isEndOfBlock ; - - // Take the block reference. - var block = this.EndBlock || this.EndBlockLimit ; - - var container = this._Range.endContainer ; - var offset = this._Range.endOffset ; - var currentNode ; - - // First, check the end container. If it is a text node, get the - // substring of the node value after the range offset. - if ( container.nodeType == 3 ) - { - var textValue = container.nodeValue ; - if ( offset < textValue.length ) - { - textValue = textValue.substr( offset ) ; - - // If we have some text left in the container, we are not at - // the end for the block. - if ( textValue.Trim().length != 0 ) - return this._Cache.IsEndOfBlock = false ; - } - } - else - currentNode = container.childNodes[ offset ] ; - - // We'll not have a currentNode if the container was a text node, of - // the offset is out the container children limits (after it probably). - if ( !currentNode ) - currentNode = FCKDomTools.GetNextSourceNode( container, true, null, block ) ; - - var hadBr = false ; - - while ( currentNode ) - { - switch ( currentNode.nodeType ) - { - case 1 : - var nodeName = currentNode.nodeName.toLowerCase() ; - - // It's an inline element. - if ( FCKListsLib.InlineChildReqElements[ nodeName ] ) - break ; - - // It is the first
    found. - if ( nodeName == 'br' && !hadBr ) - { - hadBr = true ; - break ; - } - - return this._Cache.IsEndOfBlock = false ; - - case 3 : - // It's a text node with real text. - if ( currentNode.nodeValue.Trim().length > 0 ) - return this._Cache.IsEndOfBlock = false ; - } - - currentNode = FCKDomTools.GetNextSourceNode( currentNode, false, null, block ) ; - } - - if ( refreshSelection ) - this.Select() ; - - return this._Cache.IsEndOfBlock = true ; - }, - - // This is an "intrusive" way to create a bookmark. It includes tags - // in the range boundaries. The advantage of it is that it is possible to - // handle DOM mutations when moving back to the bookmark. - // Attention: the inclusion of nodes in the DOM is a design choice and - // should not be changed as there are other points in the code that may be - // using those nodes to perform operations. See GetBookmarkNode. - // For performance, includeNodes=true if intended to SelectBookmark. - CreateBookmark : function( includeNodes ) - { - // Create the bookmark info (random IDs). - var oBookmark = - { - StartId : (new Date()).valueOf() + Math.floor(Math.random()*1000) + 'S', - EndId : (new Date()).valueOf() + Math.floor(Math.random()*1000) + 'E' - } ; - - var oDoc = this.Window.document ; - var eStartSpan ; - var eEndSpan ; - var oClone ; - - // For collapsed ranges, add just the start marker. - if ( !this.CheckIsCollapsed() ) - { - eEndSpan = oDoc.createElement( 'span' ) ; - eEndSpan.style.display = 'none' ; - eEndSpan.id = oBookmark.EndId ; - eEndSpan.setAttribute( '_fck_bookmark', true ) ; - - // For IE, it must have something inside, otherwise it may be - // removed during DOM operations. -// if ( FCKBrowserInfo.IsIE ) - eEndSpan.innerHTML = ' ' ; - - oClone = this.Clone() ; - oClone.Collapse( false ) ; - oClone.InsertNode( eEndSpan ) ; - } - - eStartSpan = oDoc.createElement( 'span' ) ; - eStartSpan.style.display = 'none' ; - eStartSpan.id = oBookmark.StartId ; - eStartSpan.setAttribute( '_fck_bookmark', true ) ; - - // For IE, it must have something inside, otherwise it may be removed - // during DOM operations. -// if ( FCKBrowserInfo.IsIE ) - eStartSpan.innerHTML = ' ' ; - - oClone = this.Clone() ; - oClone.Collapse( true ) ; - oClone.InsertNode( eStartSpan ) ; - - if ( includeNodes ) - { - oBookmark.StartNode = eStartSpan ; - oBookmark.EndNode = eEndSpan ; - } - - // Update the range position. - if ( eEndSpan ) - { - this.SetStart( eStartSpan, 4 ) ; - this.SetEnd( eEndSpan, 3 ) ; - } - else - this.MoveToPosition( eStartSpan, 4 ) ; - - return oBookmark ; - }, - - // This one should be a part of a hypothetic "bookmark" object. - GetBookmarkNode : function( bookmark, start ) - { - var doc = this.Window.document ; - - if ( start ) - return bookmark.StartNode || doc.getElementById( bookmark.StartId ) ; - else - return bookmark.EndNode || doc.getElementById( bookmark.EndId ) ; - }, - - MoveToBookmark : function( bookmark, preserveBookmark ) - { - var eStartSpan = this.GetBookmarkNode( bookmark, true ) ; - var eEndSpan = this.GetBookmarkNode( bookmark, false ) ; - - this.SetStart( eStartSpan, 3 ) ; - - if ( !preserveBookmark ) - FCKDomTools.RemoveNode( eStartSpan ) ; - - // If collapsed, the end span will not be available. - if ( eEndSpan ) - { - this.SetEnd( eEndSpan, 3 ) ; - - if ( !preserveBookmark ) - FCKDomTools.RemoveNode( eEndSpan ) ; - } - else - this.Collapse( true ) ; - - this._UpdateElementInfo() ; - }, - - // Non-intrusive bookmark algorithm - CreateBookmark2 : function() - { - // If there is no range then get out of here. - // It happens on initial load in Safari #962 and if the editor it's hidden also in Firefox - if ( ! this._Range ) - return { "Start" : 0, "End" : 0 } ; - - // First, we record down the offset values - var bookmark = - { - "Start" : [ this._Range.startOffset ], - "End" : [ this._Range.endOffset ] - } ; - // Since we're treating the document tree as normalized, we need to backtrack the text lengths - // of previous text nodes into the offset value. - var curStart = this._Range.startContainer.previousSibling ; - var curEnd = this._Range.endContainer.previousSibling ; - - // Also note that the node that we use for "address base" would change during backtracking. - var addrStart = this._Range.startContainer ; - var addrEnd = this._Range.endContainer ; - while ( curStart && addrStart.nodeType == 3 ) - { - bookmark.Start[0] += curStart.length ; - addrStart = curStart ; - curStart = curStart.previousSibling ; - } - while ( curEnd && addrEnd.nodeType == 3 ) - { - bookmark.End[0] += curEnd.length ; - addrEnd = curEnd ; - curEnd = curEnd.previousSibling ; - } - - // If the object pointed to by the startOffset and endOffset are text nodes, we need - // to backtrack and add in the text offset to the bookmark addresses. - if ( addrStart.nodeType == 1 && addrStart.childNodes[bookmark.Start[0]] && addrStart.childNodes[bookmark.Start[0]].nodeType == 3 ) - { - var curNode = addrStart.childNodes[bookmark.Start[0]] ; - var offset = 0 ; - while ( curNode.previousSibling && curNode.previousSibling.nodeType == 3 ) - { - curNode = curNode.previousSibling ; - offset += curNode.length ; - } - addrStart = curNode ; - bookmark.Start[0] = offset ; - } - if ( addrEnd.nodeType == 1 && addrEnd.childNodes[bookmark.End[0]] && addrEnd.childNodes[bookmark.End[0]].nodeType == 3 ) - { - var curNode = addrEnd.childNodes[bookmark.End[0]] ; - var offset = 0 ; - while ( curNode.previousSibling && curNode.previousSibling.nodeType == 3 ) - { - curNode = curNode.previousSibling ; - offset += curNode.length ; - } - addrEnd = curNode ; - bookmark.End[0] = offset ; - } - - // Then, we record down the precise position of the container nodes - // by walking up the DOM tree and counting their childNode index - bookmark.Start = FCKDomTools.GetNodeAddress( addrStart, true ).concat( bookmark.Start ) ; - bookmark.End = FCKDomTools.GetNodeAddress( addrEnd, true ).concat( bookmark.End ) ; - return bookmark; - }, - - MoveToBookmark2 : function( bookmark ) - { - // Reverse the childNode counting algorithm in CreateBookmark2() - var curStart = FCKDomTools.GetNodeFromAddress( this.Window.document, bookmark.Start.slice( 0, -1 ), true ) ; - var curEnd = FCKDomTools.GetNodeFromAddress( this.Window.document, bookmark.End.slice( 0, -1 ), true ) ; - - // Generate the W3C Range object and update relevant data - this.Release( true ) ; - this._Range = new FCKW3CRange( this.Window.document ) ; - var startOffset = bookmark.Start[ bookmark.Start.length - 1 ] ; - var endOffset = bookmark.End[ bookmark.End.length - 1 ] ; - while ( curStart.nodeType == 3 && startOffset > curStart.length ) - { - if ( ! curStart.nextSibling || curStart.nextSibling.nodeType != 3 ) - break ; - startOffset -= curStart.length ; - curStart = curStart.nextSibling ; - } - while ( curEnd.nodeType == 3 && endOffset > curEnd.length ) - { - if ( ! curEnd.nextSibling || curEnd.nextSibling.nodeType != 3 ) - break ; - endOffset -= curEnd.length ; - curEnd = curEnd.nextSibling ; - } - this._Range.setStart( curStart, startOffset ) ; - this._Range.setEnd( curEnd, endOffset ) ; - this._UpdateElementInfo() ; - }, - - MoveToPosition : function( targetElement, position ) - { - this.SetStart( targetElement, position ) ; - this.Collapse( true ) ; - }, - - /* - * Moves the position of the start boundary of the range to a specific position - * relatively to a element. - * @position: - * 1 = After Start ^contents - * 2 = Before End contents^ - * 3 = Before Start ^contents - * 4 = After End contents^ - */ - SetStart : function( targetElement, position, noInfoUpdate ) - { - var oRange = this._Range ; - if ( !oRange ) - oRange = this._Range = this.CreateRange() ; - - switch( position ) - { - case 1 : // After Start ^contents - oRange.setStart( targetElement, 0 ) ; - break ; - - case 2 : // Before End contents^ - oRange.setStart( targetElement, targetElement.childNodes.length ) ; - break ; - - case 3 : // Before Start ^contents - oRange.setStartBefore( targetElement ) ; - break ; - - case 4 : // After End contents^ - oRange.setStartAfter( targetElement ) ; - } - - if ( !noInfoUpdate ) - this._UpdateElementInfo() ; - }, - - /* - * Moves the position of the start boundary of the range to a specific position - * relatively to a element. - * @position: - * 1 = After Start ^contents - * 2 = Before End contents^ - * 3 = Before Start ^contents - * 4 = After End contents^ - */ - SetEnd : function( targetElement, position, noInfoUpdate ) - { - var oRange = this._Range ; - if ( !oRange ) - oRange = this._Range = this.CreateRange() ; - - switch( position ) - { - case 1 : // After Start ^contents - oRange.setEnd( targetElement, 0 ) ; - break ; - - case 2 : // Before End contents^ - oRange.setEnd( targetElement, targetElement.childNodes.length ) ; - break ; - - case 3 : // Before Start ^contents - oRange.setEndBefore( targetElement ) ; - break ; - - case 4 : // After End contents^ - oRange.setEndAfter( targetElement ) ; - } - - if ( !noInfoUpdate ) - this._UpdateElementInfo() ; - }, - - Expand : function( unit ) - { - var oNode, oSibling ; - - switch ( unit ) - { - // Expand the range to include all inline parent elements if we are - // are in their boundary limits. - // For example (where [ ] are the range limits): - // Before => Some [Some sample text]. - // After => Some [Some sample text]. - case 'inline_elements' : - // Expand the start boundary. - if ( this._Range.startOffset == 0 ) - { - oNode = this._Range.startContainer ; - - if ( oNode.nodeType != 1 ) - oNode = oNode.previousSibling ? null : oNode.parentNode ; - - if ( oNode ) - { - while ( FCKListsLib.InlineNonEmptyElements[ oNode.nodeName.toLowerCase() ] ) - { - this._Range.setStartBefore( oNode ) ; - - if ( oNode != oNode.parentNode.firstChild ) - break ; - - oNode = oNode.parentNode ; - } - } - } - - // Expand the end boundary. - oNode = this._Range.endContainer ; - var offset = this._Range.endOffset ; - - if ( ( oNode.nodeType == 3 && offset >= oNode.nodeValue.length ) || ( oNode.nodeType == 1 && offset >= oNode.childNodes.length ) || ( oNode.nodeType != 1 && oNode.nodeType != 3 ) ) - { - if ( oNode.nodeType != 1 ) - oNode = oNode.nextSibling ? null : oNode.parentNode ; - - if ( oNode ) - { - while ( FCKListsLib.InlineNonEmptyElements[ oNode.nodeName.toLowerCase() ] ) - { - this._Range.setEndAfter( oNode ) ; - - if ( oNode != oNode.parentNode.lastChild ) - break ; - - oNode = oNode.parentNode ; - } - } - } - - break ; - - case 'block_contents' : - case 'list_contents' : - var boundarySet = FCKListsLib.BlockBoundaries ; - if ( unit == 'list_contents' || FCKConfig.EnterMode == 'br' ) - boundarySet = FCKListsLib.ListBoundaries ; - - if ( this.StartBlock && FCKConfig.EnterMode != 'br' && unit == 'block_contents' ) - this.SetStart( this.StartBlock, 1 ) ; - else - { - // Get the start node for the current range. - oNode = this._Range.startContainer ; - - // If it is an element, get the node right before of it (in source order). - if ( oNode.nodeType == 1 ) - { - var lastNode = oNode.childNodes[ this._Range.startOffset ] ; - if ( lastNode ) - oNode = FCKDomTools.GetPreviousSourceNode( lastNode, true ) ; - else - oNode = oNode.lastChild || oNode ; - } - - // We must look for the left boundary, relative to the range - // start, which is limited by a block element. - while ( oNode - && ( oNode.nodeType != 1 - || ( oNode != this.StartBlockLimit - && !boundarySet[ oNode.nodeName.toLowerCase() ] ) ) ) - { - this._Range.setStartBefore( oNode ) ; - oNode = oNode.previousSibling || oNode.parentNode ; - } - } - - if ( this.EndBlock && FCKConfig.EnterMode != 'br' && unit == 'block_contents' && this.EndBlock.nodeName.toLowerCase() != 'li' ) - this.SetEnd( this.EndBlock, 2 ) ; - else - { - oNode = this._Range.endContainer ; - if ( oNode.nodeType == 1 ) - oNode = oNode.childNodes[ this._Range.endOffset ] || oNode.lastChild ; - - // We must look for the right boundary, relative to the range - // end, which is limited by a block element. - while ( oNode - && ( oNode.nodeType != 1 - || ( oNode != this.StartBlockLimit - && !boundarySet[ oNode.nodeName.toLowerCase() ] ) ) ) - { - this._Range.setEndAfter( oNode ) ; - oNode = oNode.nextSibling || oNode.parentNode ; - } - - // In EnterMode='br', the end
    boundary element must - // be included in the expanded range. - if ( oNode && oNode.nodeName.toLowerCase() == 'br' ) - this._Range.setEndAfter( oNode ) ; - } - - this._UpdateElementInfo() ; - } - }, - - /** - * Split the block element for the current range. It deletes the contents - * of the range and splits the block in the collapsed position, resulting - * in two sucessive blocks. The range is then positioned in the middle of - * them. - * - * It returns and object with the following properties: - * - PreviousBlock : a reference to the block element that preceeds - * the range after the split. - * - NextBlock : a reference to the block element that follows the - * range after the split. - * - WasStartOfBlock : a boolean indicating that the range was - * originaly at the start of the block. - * - WasEndOfBlock : a boolean indicating that the range was originaly - * at the end of the block. - * - * If the range was originaly at the start of the block, no split will happen - * and the PreviousBlock value will be null. The same is valid for the - * NextBlock value if the range was at the end of the block. - */ - SplitBlock : function( forceBlockTag ) - { - var blockTag = forceBlockTag || FCKConfig.EnterMode ; - - if ( !this._Range ) - this.MoveToSelection() ; - - // The range boundaries must be in the same "block limit" element. - if ( this.StartBlockLimit == this.EndBlockLimit ) - { - // Get the current blocks. - var eStartBlock = this.StartBlock ; - var eEndBlock = this.EndBlock ; - var oElementPath = null ; - - if ( blockTag != 'br' ) - { - if ( !eStartBlock ) - { - eStartBlock = this.FixBlock( true, blockTag ) ; - eEndBlock = this.EndBlock ; // FixBlock may have fixed the EndBlock too. - } - - if ( !eEndBlock ) - eEndBlock = this.FixBlock( false, blockTag ) ; - } - - // Get the range position. - var bIsStartOfBlock = ( eStartBlock != null && this.CheckStartOfBlock() ) ; - var bIsEndOfBlock = ( eEndBlock != null && this.CheckEndOfBlock() ) ; - - // Delete the current contents. - if ( !this.CheckIsEmpty() ) - this.DeleteContents() ; - - if ( eStartBlock && eEndBlock && eStartBlock == eEndBlock ) - { - if ( bIsEndOfBlock ) - { - oElementPath = new FCKElementPath( this.StartContainer ) ; - this.MoveToPosition( eEndBlock, 4 ) ; - eEndBlock = null ; - } - else if ( bIsStartOfBlock ) - { - oElementPath = new FCKElementPath( this.StartContainer ) ; - this.MoveToPosition( eStartBlock, 3 ) ; - eStartBlock = null ; - } - else - { - // Extract the contents of the block from the selection point to the end of its contents. - this.SetEnd( eStartBlock, 2 ) ; - var eDocFrag = this.ExtractContents() ; - - // Duplicate the block element after it. - eEndBlock = eStartBlock.cloneNode( false ) ; - eEndBlock.removeAttribute( 'id', false ) ; - - // Place the extracted contents in the duplicated block. - eDocFrag.AppendTo( eEndBlock ) ; - - FCKDomTools.InsertAfterNode( eStartBlock, eEndBlock ) ; - - this.MoveToPosition( eStartBlock, 4 ) ; - - // In Gecko, the last child node must be a bogus
    . - // Note: bogus
    added under
      or
        would cause lists to be incorrectly rendered. - if ( FCKBrowserInfo.IsGecko && - ! eStartBlock.nodeName.IEquals( ['ul', 'ol'] ) ) - FCKTools.AppendBogusBr( eStartBlock ) ; - } - } - - return { - PreviousBlock : eStartBlock, - NextBlock : eEndBlock, - WasStartOfBlock : bIsStartOfBlock, - WasEndOfBlock : bIsEndOfBlock, - ElementPath : oElementPath - } ; - } - - return null ; - }, - - // Transform a block without a block tag in a valid block (orphan text in the body or td, usually). - FixBlock : function( isStart, blockTag ) - { - // Bookmark the range so we can restore it later. - var oBookmark = this.CreateBookmark() ; - - // Collapse the range to the requested ending boundary. - this.Collapse( isStart ) ; - - // Expands it to the block contents. - this.Expand( 'block_contents' ) ; - - // Create the fixed block. - var oFixedBlock = this.Window.document.createElement( blockTag ) ; - - // Move the contents of the temporary range to the fixed block. - this.ExtractContents().AppendTo( oFixedBlock ) ; - FCKDomTools.TrimNode( oFixedBlock ) ; - - // If the fixed block is empty (not counting bookmark nodes) - // Add a
        inside to expand it. - if ( FCKDomTools.CheckIsEmptyElement(oFixedBlock, function( element ) { return element.getAttribute('_fck_bookmark') != 'true' ; } ) - && FCKBrowserInfo.IsGeckoLike ) - FCKTools.AppendBogusBr( oFixedBlock ) ; - - // Insert the fixed block into the DOM. - this.InsertNode( oFixedBlock ) ; - - // Move the range back to the bookmarked place. - this.MoveToBookmark( oBookmark ) ; - - return oFixedBlock ; - }, - - Release : function( preserveWindow ) - { - if ( !preserveWindow ) - this.Window = null ; - - this.StartNode = null ; - this.StartContainer = null ; - this.StartBlock = null ; - this.StartBlockLimit = null ; - this.EndNode = null ; - this.EndContainer = null ; - this.EndBlock = null ; - this.EndBlockLimit = null ; - this._Range = null ; - this._Cache = null ; - }, - - CheckHasRange : function() - { - return !!this._Range ; - }, - - GetTouchedStartNode : function() - { - var range = this._Range ; - var container = range.startContainer ; - - if ( range.collapsed || container.nodeType != 1 ) - return container ; - - return container.childNodes[ range.startOffset ] || container ; - }, - - GetTouchedEndNode : function() - { - var range = this._Range ; - var container = range.endContainer ; - - if ( range.collapsed || container.nodeType != 1 ) - return container ; - - return container.childNodes[ range.endOffset - 1 ] || container ; - } -} ; diff --git a/fckeditor/editor/_source/classes/fckdomrange_gecko.js b/fckeditor/editor/_source/classes/fckdomrange_gecko.js deleted file mode 100644 index ddffb130..00000000 --- a/fckeditor/editor/_source/classes/fckdomrange_gecko.js +++ /dev/null @@ -1,104 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Class for working with a selection range, much like the W3C DOM Range, but - * it is not intended to be an implementation of the W3C interface. - * (Gecko Implementation) - */ - -FCKDomRange.prototype.MoveToSelection = function() -{ - this.Release( true ) ; - - var oSel = this.Window.getSelection() ; - - if ( oSel && oSel.rangeCount > 0 ) - { - this._Range = FCKW3CRange.CreateFromRange( this.Window.document, oSel.getRangeAt(0) ) ; - this._UpdateElementInfo() ; - } - else - if ( this.Window.document ) - this.MoveToElementStart( this.Window.document.body ) ; -} - -FCKDomRange.prototype.Select = function() -{ - var oRange = this._Range ; - if ( oRange ) - { - var startContainer = oRange.startContainer ; - - // If we have a collapsed range, inside an empty element, we must add - // something to it, otherwise the caret will not be visible. - if ( oRange.collapsed && startContainer.nodeType == 1 && startContainer.childNodes.length == 0 ) - startContainer.appendChild( oRange._Document.createTextNode('') ) ; - - var oDocRange = this.Window.document.createRange() ; - oDocRange.setStart( startContainer, oRange.startOffset ) ; - - try - { - oDocRange.setEnd( oRange.endContainer, oRange.endOffset ) ; - } - catch ( e ) - { - // There is a bug in Firefox implementation (it would be too easy - // otherwise). The new start can't be after the end (W3C says it can). - // So, let's create a new range and collapse it to the desired point. - if ( e.toString().Contains( 'NS_ERROR_ILLEGAL_VALUE' ) ) - { - oRange.collapse( true ) ; - oDocRange.setEnd( oRange.endContainer, oRange.endOffset ) ; - } - else - throw( e ) ; - } - - var oSel = this.Window.getSelection() ; - oSel.removeAllRanges() ; - - // We must add a clone otherwise Firefox will have rendering issues. - oSel.addRange( oDocRange ) ; - } -} - -// Not compatible with bookmark created with CreateBookmark2. -// The bookmark nodes will be deleted from the document. -FCKDomRange.prototype.SelectBookmark = function( bookmark ) -{ - var domRange = this.Window.document.createRange() ; - - var startNode = this.GetBookmarkNode( bookmark, true ) ; - var endNode = this.GetBookmarkNode( bookmark, false ) ; - - domRange.setStart( startNode.parentNode, FCKDomTools.GetIndexOf( startNode ) ) ; - FCKDomTools.RemoveNode( startNode ) ; - - if ( endNode ) - { - domRange.setEnd( endNode.parentNode, FCKDomTools.GetIndexOf( endNode ) ) ; - FCKDomTools.RemoveNode( endNode ) ; - } - - var selection = this.Window.getSelection() ; - selection.removeAllRanges() ; - selection.addRange( domRange ) ; -} diff --git a/fckeditor/editor/_source/classes/fckdomrange_ie.js b/fckeditor/editor/_source/classes/fckdomrange_ie.js deleted file mode 100644 index 3ebe2b9a..00000000 --- a/fckeditor/editor/_source/classes/fckdomrange_ie.js +++ /dev/null @@ -1,199 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Class for working with a selection range, much like the W3C DOM Range, but - * it is not intended to be an implementation of the W3C interface. - * (IE Implementation) - */ - -FCKDomRange.prototype.MoveToSelection = function() -{ - this.Release( true ) ; - - this._Range = new FCKW3CRange( this.Window.document ) ; - - var oSel = this.Window.document.selection ; - - if ( oSel.type != 'Control' ) - { - var eMarkerStart = this._GetSelectionMarkerTag( true ) ; - var eMarkerEnd = this._GetSelectionMarkerTag( false ) ; - - if ( !eMarkerStart && !eMarkerEnd ) - { - this._Range.setStart( this.Window.document.body, 0 ) ; - this._UpdateElementInfo() ; - return ; - } - - // Set the start boundary. - this._Range.setStart( eMarkerStart.parentNode, FCKDomTools.GetIndexOf( eMarkerStart ) ) ; - eMarkerStart.parentNode.removeChild( eMarkerStart ) ; - - // Set the end boundary. - this._Range.setEnd( eMarkerEnd.parentNode, FCKDomTools.GetIndexOf( eMarkerEnd ) ) ; - eMarkerEnd.parentNode.removeChild( eMarkerEnd ) ; - - this._UpdateElementInfo() ; - } - else - { - var oControl = oSel.createRange().item(0) ; - - if ( oControl ) - { - this._Range.setStartBefore( oControl ) ; - this._Range.setEndAfter( oControl ) ; - this._UpdateElementInfo() ; - } - } -} - -FCKDomRange.prototype.Select = function( forceExpand ) -{ - if ( this._Range ) - this.SelectBookmark( this.CreateBookmark( true ), forceExpand ) ; -} - -// Not compatible with bookmark created with CreateBookmark2. -// The bookmark nodes will be deleted from the document. -FCKDomRange.prototype.SelectBookmark = function( bookmark, forceExpand ) -{ - var bIsCollapsed = this.CheckIsCollapsed() ; - var bIsStartMakerAlone ; - var dummySpan ; - - // Create marker tags for the start and end boundaries. - var eStartMarker = this.GetBookmarkNode( bookmark, true ) ; - - if ( !eStartMarker ) - return ; - - var eEndMarker ; - if ( !bIsCollapsed ) - eEndMarker = this.GetBookmarkNode( bookmark, false ) ; - - // Create the main range which will be used for the selection. - var oIERange = this.Window.document.body.createTextRange() ; - - // Position the range at the start boundary. - oIERange.moveToElementText( eStartMarker ) ; - oIERange.moveStart( 'character', 1 ) ; - - if ( eEndMarker ) - { - // Create a tool range for the end. - var oIERangeEnd = this.Window.document.body.createTextRange() ; - - // Position the tool range at the end. - oIERangeEnd.moveToElementText( eEndMarker ) ; - - // Move the end boundary of the main range to match the tool range. - oIERange.setEndPoint( 'EndToEnd', oIERangeEnd ) ; - oIERange.moveEnd( 'character', -1 ) ; - } - else - { - bIsStartMakerAlone = ( forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ; - - // Append a temporary  before the selection. - // This is needed to avoid IE destroying selections inside empty - // inline elements, like (#253). - // It is also needed when placing the selection right after an inline - // element to avoid the selection moving inside of it. - dummySpan = this.Window.document.createElement( 'span' ) ; - dummySpan.innerHTML = '' ; // Zero Width No-Break Space (U+FEFF). See #1359. - eStartMarker.parentNode.insertBefore( dummySpan, eStartMarker ) ; - - if ( bIsStartMakerAlone ) - { - // To expand empty blocks or line spaces after
        , we need - // instead to have any char, which will be later deleted using the - // selection. - // \ufeff = Zero Width No-Break Space (U+FEFF). See #1359. - eStartMarker.parentNode.insertBefore( this.Window.document.createTextNode( '\ufeff' ), eStartMarker ) ; - } - } - - if ( !this._Range ) - this._Range = this.CreateRange() ; - - // Remove the markers (reset the position, because of the changes in the DOM tree). - this._Range.setStartBefore( eStartMarker ) ; - eStartMarker.parentNode.removeChild( eStartMarker ) ; - - if ( bIsCollapsed ) - { - if ( bIsStartMakerAlone ) - { - // Move the selection start to include the temporary . - oIERange.moveStart( 'character', -1 ) ; - - oIERange.select() ; - - // Remove our temporary stuff. - this.Window.document.selection.clear() ; - } - else - oIERange.select() ; - - FCKDomTools.RemoveNode( dummySpan ) ; - } - else - { - this._Range.setEndBefore( eEndMarker ) ; - eEndMarker.parentNode.removeChild( eEndMarker ) ; - oIERange.select() ; - } -} - -FCKDomRange.prototype._GetSelectionMarkerTag = function( toStart ) -{ - var doc = this.Window.document ; - var selection = doc.selection ; - - // Get a range for the start boundary. - var oRange ; - - // IE may throw an "unspecified error" on some cases (it happened when - // loading _samples/default.html), so try/catch. - try - { - oRange = selection.createRange() ; - } - catch (e) - { - return null ; - } - - // IE might take the range object to the main window instead of inside the editor iframe window. - // This is known to happen when the editor window has not been selected before (See #933). - // We need to avoid that. - if ( oRange.parentElement().document != doc ) - return null ; - - oRange.collapse( toStart === true ) ; - - // Paste a marker element at the collapsed range and get it from the DOM. - var sMarkerId = 'fck_dom_range_temp_' + (new Date()).valueOf() + '_' + Math.floor(Math.random()*1000) ; - oRange.pasteHTML( '' ) ; - - return doc.getElementById( sMarkerId ) ; -} diff --git a/fckeditor/editor/_source/classes/fckdomrangeiterator.js b/fckeditor/editor/_source/classes/fckdomrangeiterator.js deleted file mode 100644 index 8aa668b0..00000000 --- a/fckeditor/editor/_source/classes/fckdomrangeiterator.js +++ /dev/null @@ -1,327 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This class can be used to interate through nodes inside a range. - * - * During interation, the provided range can become invalid, due to document - * mutations, so CreateBookmark() used to restore it after processing, if - * needed. - */ - -var FCKDomRangeIterator = function( range ) -{ - /** - * The FCKDomRange object that marks the interation boundaries. - */ - this.Range = range ; - - /** - * Indicates that
        elements must be used as paragraph boundaries. - */ - this.ForceBrBreak = false ; - - /** - * Guarantees that the iterator will always return "real" block elements. - * If "false", elements like
      1. , and are returned. If "true", a - * dedicated block element block element will be created inside those - * elements to hold the selected content. - */ - this.EnforceRealBlocks = false ; -} - -FCKDomRangeIterator.CreateFromSelection = function( targetWindow ) -{ - var range = new FCKDomRange( targetWindow ) ; - range.MoveToSelection() ; - return new FCKDomRangeIterator( range ) ; -} - -FCKDomRangeIterator.prototype = -{ - /** - * Get the next paragraph element. It automatically breaks the document - * when necessary to generate block elements for the paragraphs. - */ - GetNextParagraph : function() - { - // The block element to be returned. - var block ; - - // The range object used to identify the paragraph contents. - var range ; - - // Indicated that the current element in the loop is the last one. - var isLast ; - - // Instructs to cleanup remaining BRs. - var removePreviousBr ; - var removeLastBr ; - - var boundarySet = this.ForceBrBreak ? FCKListsLib.ListBoundaries : FCKListsLib.BlockBoundaries ; - - // This is the first iteration. Let's initialize it. - if ( !this._LastNode ) - { - var range = this.Range.Clone() ; - range.Expand( this.ForceBrBreak ? 'list_contents' : 'block_contents' ) ; - - this._NextNode = range.GetTouchedStartNode() ; - this._LastNode = range.GetTouchedEndNode() ; - - // Let's reuse this variable. - range = null ; - } - - var currentNode = this._NextNode ; - var lastNode = this._LastNode ; - - this._NextNode = null ; - - while ( currentNode ) - { - // closeRange indicates that a paragraph boundary has been found, - // so the range can be closed. - var closeRange = false ; - - // includeNode indicates that the current node is good to be part - // of the range. By default, any non-element node is ok for it. - var includeNode = ( currentNode.nodeType != 1 ) ; - - var continueFromSibling = false ; - - // If it is an element node, let's check if it can be part of the - // range. - if ( !includeNode ) - { - var nodeName = currentNode.nodeName.toLowerCase() ; - - if ( boundarySet[ nodeName ] && ( !FCKBrowserInfo.IsIE || currentNode.scopeName == 'HTML' ) ) - { - //
        boundaries must be part of the range. It will - // happen only if ForceBrBreak. - if ( nodeName == 'br' ) - includeNode = true ; - else if ( !range && currentNode.childNodes.length == 0 && nodeName != 'hr' ) - { - // If we have found an empty block, and haven't started - // the range yet, it means we must return this block. - block = currentNode ; - isLast = currentNode == lastNode ; - break ; - } - - // The range must finish right before the boundary, - // including possibly skipped empty spaces. (#1603) - if ( range ) - { - range.SetEnd( currentNode, 3, true ) ; - - // The found boundary must be set as the next one at this - // point. (#1717) - if ( nodeName != 'br' ) - this._NextNode = FCKDomTools.GetNextSourceNode( currentNode, true, null, lastNode ) ; - } - - closeRange = true ; - } - else - { - // If we have child nodes, let's check them. - if ( currentNode.firstChild ) - { - // If we don't have a range yet, let's start it. - if ( !range ) - { - range = new FCKDomRange( this.Range.Window ) ; - range.SetStart( currentNode, 3, true ) ; - } - - currentNode = currentNode.firstChild ; - continue ; - } - includeNode = true ; - } - } - else if ( currentNode.nodeType == 3 ) - { - // Ignore normal whitespaces (i.e. not including   or - // other unicode whitespaces) before/after a block node. - if ( /^[\r\n\t ]+$/.test( currentNode.nodeValue ) ) - includeNode = false ; - } - - // The current node is good to be part of the range and we are - // starting a new range, initialize it first. - if ( includeNode && !range ) - { - range = new FCKDomRange( this.Range.Window ) ; - range.SetStart( currentNode, 3, true ) ; - } - - // The last node has been found. - isLast = ( ( !closeRange || includeNode ) && currentNode == lastNode ) ; -// isLast = ( currentNode == lastNode && ( currentNode.nodeType != 1 || currentNode.childNodes.length == 0 ) ) ; - - // If we are in an element boundary, let's check if it is time - // to close the range, otherwise we include the parent within it. - if ( range && !closeRange ) - { - while ( !currentNode.nextSibling && !isLast ) - { - var parentNode = currentNode.parentNode ; - - if ( boundarySet[ parentNode.nodeName.toLowerCase() ] ) - { - closeRange = true ; - isLast = isLast || ( parentNode == lastNode ) ; - break ; - } - - currentNode = parentNode ; - includeNode = true ; - isLast = ( currentNode == lastNode ) ; - continueFromSibling = true ; - } - } - - // Now finally include the node. - if ( includeNode ) - range.SetEnd( currentNode, 4, true ) ; - - // We have found a block boundary. Let's close the range and move out of the - // loop. - if ( ( closeRange || isLast ) && range ) - { - range._UpdateElementInfo() ; - - if ( range.StartNode == range.EndNode - && range.StartNode.parentNode == range.StartBlockLimit - && range.StartNode.getAttribute && range.StartNode.getAttribute( '_fck_bookmark' ) ) - range = null ; - else - break ; - } - - if ( isLast ) - break ; - - currentNode = FCKDomTools.GetNextSourceNode( currentNode, continueFromSibling, null, lastNode ) ; - } - - // Now, based on the processed range, look for (or create) the block to be returned. - if ( !block ) - { - // If no range has been found, this is the end. - if ( !range ) - { - this._NextNode = null ; - return null ; - } - - block = range.StartBlock ; - - if ( !block - && !this.EnforceRealBlocks - && range.StartBlockLimit.nodeName.IEquals( 'DIV', 'TH', 'TD' ) - && range.CheckStartOfBlock() - && range.CheckEndOfBlock() ) - { - block = range.StartBlockLimit ; - } - else if ( !block || ( this.EnforceRealBlocks && block.nodeName.toLowerCase() == 'li' ) ) - { - // Create the fixed block. - block = this.Range.Window.document.createElement( FCKConfig.EnterMode == 'p' ? 'p' : 'div' ) ; - - // Move the contents of the temporary range to the fixed block. - range.ExtractContents().AppendTo( block ) ; - FCKDomTools.TrimNode( block ) ; - - // Insert the fixed block into the DOM. - range.InsertNode( block ) ; - - removePreviousBr = true ; - removeLastBr = true ; - } - else if ( block.nodeName.toLowerCase() != 'li' ) - { - // If the range doesn't includes the entire contents of the - // block, we must split it, isolating the range in a dedicated - // block. - if ( !range.CheckStartOfBlock() || !range.CheckEndOfBlock() ) - { - // The resulting block will be a clone of the current one. - block = block.cloneNode( false ) ; - - // Extract the range contents, moving it to the new block. - range.ExtractContents().AppendTo( block ) ; - FCKDomTools.TrimNode( block ) ; - - // Split the block. At this point, the range will be in the - // right position for our intents. - var splitInfo = range.SplitBlock() ; - - removePreviousBr = !splitInfo.WasStartOfBlock ; - removeLastBr = !splitInfo.WasEndOfBlock ; - - // Insert the new block into the DOM. - range.InsertNode( block ) ; - } - } - else if ( !isLast ) - { - // LIs are returned as is, with all their children (due to the - // nested lists). But, the next node is the node right after - // the current range, which could be an
      2. child (nested - // lists) or the next sibling
      3. . - - this._NextNode = block == lastNode ? null : FCKDomTools.GetNextSourceNode( range.EndNode, true, null, lastNode ) ; - return block ; - } - } - - if ( removePreviousBr ) - { - var previousSibling = block.previousSibling ; - if ( previousSibling && previousSibling.nodeType == 1 ) - { - if ( previousSibling.nodeName.toLowerCase() == 'br' ) - previousSibling.parentNode.removeChild( previousSibling ) ; - else if ( previousSibling.lastChild && previousSibling.lastChild.nodeName.IEquals( 'br' ) ) - previousSibling.removeChild( previousSibling.lastChild ) ; - } - } - - if ( removeLastBr ) - { - var lastChild = block.lastChild ; - if ( lastChild && lastChild.nodeType == 1 && lastChild.nodeName.toLowerCase() == 'br' ) - block.removeChild( lastChild ) ; - } - - // Get a reference for the next element. This is important because the - // above block can be removed or changed, so we can rely on it for the - // next interation. - if ( !this._NextNode ) - this._NextNode = ( isLast || block == lastNode ) ? null : FCKDomTools.GetNextSourceNode( block, true, null, lastNode ) ; - - return block ; - } -} ; diff --git a/fckeditor/editor/_source/classes/fckeditingarea.js b/fckeditor/editor/_source/classes/fckeditingarea.js deleted file mode 100644 index 66d93e12..00000000 --- a/fckeditor/editor/_source/classes/fckeditingarea.js +++ /dev/null @@ -1,368 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * FCKEditingArea Class: renders an editable area. - */ - -/** - * @constructor - * @param {String} targetElement The element that will hold the editing area. Any child element present in the target will be deleted. - */ -var FCKEditingArea = function( targetElement ) -{ - this.TargetElement = targetElement ; - this.Mode = FCK_EDITMODE_WYSIWYG ; - - if ( FCK.IECleanup ) - FCK.IECleanup.AddItem( this, FCKEditingArea_Cleanup ) ; -} - - -/** - * @param {String} html The complete HTML for the page, including DOCTYPE and the tag. - */ -FCKEditingArea.prototype.Start = function( html, secondCall ) -{ - var eTargetElement = this.TargetElement ; - var oTargetDocument = FCKTools.GetElementDocument( eTargetElement ) ; - - // Remove all child nodes from the target. - while( eTargetElement.firstChild ) - eTargetElement.removeChild( eTargetElement.firstChild ) ; - - if ( this.Mode == FCK_EDITMODE_WYSIWYG ) - { - // For FF, document.domain must be set only when different, otherwhise - // we'll strangely have "Permission denied" issues. - if ( FCK_IS_CUSTOM_DOMAIN ) - html = '' + html ; - - // IE has a bug with the tag... it must have a closer, - // otherwise the all successive tags will be set as children nodes of the . - if ( FCKBrowserInfo.IsIE ) - html = html.replace( /(]*?)\s*\/?>(?!\s*<\/base>)/gi, '$1>' ) ; - else if ( !secondCall ) - { - // Gecko moves some tags out of the body to the head, so we must use - // innerHTML to set the body contents (SF BUG 1526154). - - // Extract the BODY contents from the html. - var oMatchBefore = html.match( FCKRegexLib.BeforeBody ) ; - var oMatchAfter = html.match( FCKRegexLib.AfterBody ) ; - - if ( oMatchBefore && oMatchAfter ) - { - var sBody = html.substr( oMatchBefore[1].length, - html.length - oMatchBefore[1].length - oMatchAfter[1].length ) ; // This is the BODY tag contents. - - html = - oMatchBefore[1] + // This is the HTML until the tag, inclusive. - ' ' + - oMatchAfter[1] ; // This is the HTML from the tag, inclusive. - - // If nothing in the body, place a BOGUS tag so the cursor will appear. - if ( FCKBrowserInfo.IsGecko && ( sBody.length == 0 || FCKRegexLib.EmptyParagraph.test( sBody ) ) ) - sBody = '
        ' ; - - this._BodyHTML = sBody ; - - } - else - this._BodyHTML = html ; // Invalid HTML input. - } - - // Create the editing area IFRAME. - var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ; - - // IE: Avoid JavaScript errors thrown by the editing are source (like tags events). - // See #1055. - var sOverrideError = '' ; - - oIFrame.frameBorder = 0 ; - oIFrame.style.width = oIFrame.style.height = '100%' ; - - if ( FCK_IS_CUSTOM_DOMAIN && FCKBrowserInfo.IsIE ) - { - window._FCKHtmlToLoad = html.replace( //i, '' + sOverrideError ) ; - oIFrame.src = 'javascript:void( (function(){' + - 'document.open() ;' + - 'document.domain="' + document.domain + '" ;' + - 'document.write( window.parent._FCKHtmlToLoad );' + - 'document.close() ;' + - 'window.parent._FCKHtmlToLoad = null ;' + - '})() )' ; - } - else if ( !FCKBrowserInfo.IsGecko ) - { - // Firefox will render the tables inside the body in Quirks mode if the - // source of the iframe is set to javascript. see #515 - oIFrame.src = 'javascript:void(0)' ; - } - - // Append the new IFRAME to the target. For IE, it must be done after - // setting the "src", to avoid the "secure/unsecure" message under HTTPS. - eTargetElement.appendChild( oIFrame ) ; - - // Get the window and document objects used to interact with the newly created IFRAME. - this.Window = oIFrame.contentWindow ; - - // IE: Avoid JavaScript errors thrown by the editing are source (like tags events). - // TODO: This error handler is not being fired. - // this.Window.onerror = function() { alert( 'Error!' ) ; return true ; } - - if ( !FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE ) - { - var oDoc = this.Window.document ; - - oDoc.open() ; - oDoc.write( html.replace( //i, '' + sOverrideError ) ) ; - oDoc.close() ; - } - - if ( FCKBrowserInfo.IsAIR ) - FCKAdobeAIR.EditingArea_Start( oDoc, html ) ; - - // Firefox 1.0.x is buggy... ohh yes... so let's do it two times and it - // will magically work. - if ( FCKBrowserInfo.IsGecko10 && !secondCall ) - { - this.Start( html, true ) ; - return ; - } - - if ( oIFrame.readyState && oIFrame.readyState != 'completed' ) - { - var editArea = this ; - - // Using a IE alternative for DOMContentLoaded, similar to the - // solution proposed at http://javascript.nwbox.com/IEContentLoaded/ - setTimeout( function() - { - try - { - editArea.Window.document.documentElement.doScroll("left") ; - } - catch(e) - { - setTimeout( arguments.callee, 0 ) ; - return ; - } - editArea.Window._FCKEditingArea = editArea ; - FCKEditingArea_CompleteStart.call( editArea.Window ) ; - }, 0 ) ; - } - else - { - this.Window._FCKEditingArea = this ; - - // FF 1.0.x is buggy... we must wait a lot to enable editing because - // sometimes the content simply disappears, for example when pasting - // "bla1!!bla2" in the source and then switching - // back to design. - if ( FCKBrowserInfo.IsGecko10 ) - this.Window.setTimeout( FCKEditingArea_CompleteStart, 500 ) ; - else - FCKEditingArea_CompleteStart.call( this.Window ) ; - } - } - else - { - var eTextarea = this.Textarea = oTargetDocument.createElement( 'textarea' ) ; - eTextarea.className = 'SourceField' ; - eTextarea.dir = 'ltr' ; - FCKDomTools.SetElementStyles( eTextarea, - { - width : '100%', - height : '100%', - border : 'none', - resize : 'none', - outline : 'none' - } ) ; - eTargetElement.appendChild( eTextarea ) ; - - eTextarea.value = html ; - - // Fire the "OnLoad" event. - FCKTools.RunFunction( this.OnLoad ) ; - } -} - -// "this" here is FCKEditingArea.Window -function FCKEditingArea_CompleteStart() -{ - // On Firefox, the DOM takes a little to become available. So we must wait for it in a loop. - if ( !this.document.body ) - { - this.setTimeout( FCKEditingArea_CompleteStart, 50 ) ; - return ; - } - - var oEditorArea = this._FCKEditingArea ; - - // Save this reference to be re-used later. - oEditorArea.Document = oEditorArea.Window.document ; - - oEditorArea.MakeEditable() ; - - // Fire the "OnLoad" event. - FCKTools.RunFunction( oEditorArea.OnLoad ) ; -} - -FCKEditingArea.prototype.MakeEditable = function() -{ - var oDoc = this.Document ; - - if ( FCKBrowserInfo.IsIE ) - { - // Kludge for #141 and #523 - oDoc.body.disabled = true ; - oDoc.body.contentEditable = true ; - oDoc.body.removeAttribute( "disabled" ) ; - - /* The following commands don't throw errors, but have no effect. - oDoc.execCommand( 'AutoDetect', false, false ) ; - oDoc.execCommand( 'KeepSelection', false, true ) ; - */ - } - else - { - try - { - // Disable Firefox 2 Spell Checker. - oDoc.body.spellcheck = ( this.FFSpellChecker !== false ) ; - - if ( this._BodyHTML ) - { - oDoc.body.innerHTML = this._BodyHTML ; - oDoc.body.offsetLeft ; // Don't remove, this is a hack to fix Opera 9.50, see #2264. - this._BodyHTML = null ; - } - - oDoc.designMode = 'on' ; - - // Tell Gecko (Firefox 1.5+) to enable or not live resizing of objects (by Alfonso Martinez) - oDoc.execCommand( 'enableObjectResizing', false, !FCKConfig.DisableObjectResizing ) ; - - // Disable the standard table editing features of Firefox. - oDoc.execCommand( 'enableInlineTableEditing', false, !FCKConfig.DisableFFTableHandles ) ; - } - catch (e) - { - // In Firefox if the iframe is initially hidden it can't be set to designMode and it raises an exception - // So we set up a DOM Mutation event Listener on the HTML, as it will raise several events when the document is visible again - FCKTools.AddEventListener( this.Window.frameElement, 'DOMAttrModified', FCKEditingArea_Document_AttributeNodeModified ) ; - } - - } -} - -// This function processes the notifications of the DOM Mutation event on the document -// We use it to know that the document will be ready to be editable again (or we hope so) -function FCKEditingArea_Document_AttributeNodeModified( evt ) -{ - var editingArea = evt.currentTarget.contentWindow._FCKEditingArea ; - - // We want to run our function after the events no longer fire, so we can know that it's a stable situation - if ( editingArea._timer ) - window.clearTimeout( editingArea._timer ) ; - - editingArea._timer = FCKTools.SetTimeout( FCKEditingArea_MakeEditableByMutation, 1000, editingArea ) ; -} - -// This function ideally should be called after the document is visible, it does clean up of the -// mutation tracking and tries again to make the area editable. -function FCKEditingArea_MakeEditableByMutation() -{ - // Clean up - delete this._timer ; - // Now we don't want to keep on getting this event - FCKTools.RemoveEventListener( this.Window.frameElement, 'DOMAttrModified', FCKEditingArea_Document_AttributeNodeModified ) ; - // Let's try now to set the editing area editable - // If it fails it will set up the Mutation Listener again automatically - this.MakeEditable() ; -} - -FCKEditingArea.prototype.Focus = function() -{ - try - { - if ( this.Mode == FCK_EDITMODE_WYSIWYG ) - { - if ( FCKBrowserInfo.IsIE ) - this._FocusIE() ; - else - this.Window.focus() ; - } - else - { - var oDoc = FCKTools.GetElementDocument( this.Textarea ) ; - if ( (!oDoc.hasFocus || oDoc.hasFocus() ) && oDoc.activeElement == this.Textarea ) - return ; - - this.Textarea.focus() ; - } - } - catch(e) {} -} - -FCKEditingArea.prototype._FocusIE = function() -{ - // In IE it can happen that the document is in theory focused but the - // active element is outside of it. - this.Document.body.setActive() ; - - this.Window.focus() ; - - // Kludge for #141... yet more code to workaround IE bugs - var range = this.Document.selection.createRange() ; - - var parentNode = range.parentElement() ; - var parentTag = parentNode.nodeName.toLowerCase() ; - - // Only apply the fix when in a block, and the block is empty. - if ( parentNode.childNodes.length > 0 || - !( FCKListsLib.BlockElements[parentTag] || - FCKListsLib.NonEmptyBlockElements[parentTag] ) ) - { - return ; - } - - // Force the selection to happen, in this way we guarantee the focus will - // be there. - range = new FCKDomRange( this.Window ) ; - range.MoveToElementEditStart( parentNode ) ; - range.Select() ; -} - -function FCKEditingArea_Cleanup() -{ - if ( this.Document ) - this.Document.body.innerHTML = "" ; - this.TargetElement = null ; - this.IFrame = null ; - this.Document = null ; - this.Textarea = null ; - - if ( this.Window ) - { - this.Window._FCKEditingArea = null ; - this.Window = null ; - } -} diff --git a/fckeditor/editor/_source/classes/fckelementpath.js b/fckeditor/editor/_source/classes/fckelementpath.js deleted file mode 100644 index 2bf4eb3e..00000000 --- a/fckeditor/editor/_source/classes/fckelementpath.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Manages the DOM ascensors element list of a specific DOM node - * (limited to body, inclusive). - */ - -var FCKElementPath = function( lastNode ) -{ - var eBlock = null ; - var eBlockLimit = null ; - - var aElements = new Array() ; - - var e = lastNode ; - while ( e ) - { - if ( e.nodeType == 1 ) - { - if ( !this.LastElement ) - this.LastElement = e ; - - var sElementName = e.nodeName.toLowerCase() ; - if ( FCKBrowserInfo.IsIE && e.scopeName != 'HTML' ) - sElementName = e.scopeName.toLowerCase() + ':' + sElementName ; - - if ( !eBlockLimit ) - { - if ( !eBlock && FCKListsLib.PathBlockElements[ sElementName ] != null ) - eBlock = e ; - - if ( FCKListsLib.PathBlockLimitElements[ sElementName ] != null ) - { - // DIV is considered the Block, if no block is available (#525) - // and if it doesn't contain other blocks. - if ( !eBlock && sElementName == 'div' && !FCKElementPath._CheckHasBlock( e ) ) - eBlock = e ; - else - eBlockLimit = e ; - } - } - - aElements.push( e ) ; - - if ( sElementName == 'body' ) - break ; - } - e = e.parentNode ; - } - - this.Block = eBlock ; - this.BlockLimit = eBlockLimit ; - this.Elements = aElements ; -} - -/** - * Check if an element contains any block element. - */ -FCKElementPath._CheckHasBlock = function( element ) -{ - var childNodes = element.childNodes ; - - for ( var i = 0, count = childNodes.length ; i < count ; i++ ) - { - var child = childNodes[i] ; - - if ( child.nodeType == 1 && FCKListsLib.BlockElements[ child.nodeName.toLowerCase() ] ) - return true ; - } - - return false ; -} diff --git a/fckeditor/editor/_source/classes/fckenterkey.js b/fckeditor/editor/_source/classes/fckenterkey.js deleted file mode 100644 index 49f64bea..00000000 --- a/fckeditor/editor/_source/classes/fckenterkey.js +++ /dev/null @@ -1,688 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Controls the [Enter] keystroke behavior in a document. - */ - -/* - * Constructor. - * @targetDocument : the target document. - * @enterMode : the behavior for the keystroke. - * May be "p", "div", "br". Default is "p". - * @shiftEnterMode : the behavior for the + keystroke. - * May be "p", "div", "br". Defaults to "br". - */ -var FCKEnterKey = function( targetWindow, enterMode, shiftEnterMode, tabSpaces ) -{ - this.Window = targetWindow ; - this.EnterMode = enterMode || 'p' ; - this.ShiftEnterMode = shiftEnterMode || 'br' ; - - // Setup the Keystroke Handler. - var oKeystrokeHandler = new FCKKeystrokeHandler( false ) ; - oKeystrokeHandler._EnterKey = this ; - oKeystrokeHandler.OnKeystroke = FCKEnterKey_OnKeystroke ; - - oKeystrokeHandler.SetKeystrokes( [ - [ 13 , 'Enter' ], - [ SHIFT + 13, 'ShiftEnter' ], - [ 8 , 'Backspace' ], - [ CTRL + 8 , 'CtrlBackspace' ], - [ 46 , 'Delete' ] - ] ) ; - - this.TabText = '' ; - - // Safari by default inserts 4 spaces on TAB, while others make the editor - // loose focus. So, we need to handle it here to not include those spaces. - if ( tabSpaces > 0 || FCKBrowserInfo.IsSafari ) - { - while ( tabSpaces-- ) - this.TabText += '\xa0' ; - - oKeystrokeHandler.SetKeystrokes( [ 9, 'Tab' ] ); - } - - oKeystrokeHandler.AttachToElement( targetWindow.document ) ; -} - - -function FCKEnterKey_OnKeystroke( keyCombination, keystrokeValue ) -{ - var oEnterKey = this._EnterKey ; - - try - { - switch ( keystrokeValue ) - { - case 'Enter' : - return oEnterKey.DoEnter() ; - break ; - case 'ShiftEnter' : - return oEnterKey.DoShiftEnter() ; - break ; - case 'Backspace' : - return oEnterKey.DoBackspace() ; - break ; - case 'Delete' : - return oEnterKey.DoDelete() ; - break ; - case 'Tab' : - return oEnterKey.DoTab() ; - break ; - case 'CtrlBackspace' : - return oEnterKey.DoCtrlBackspace() ; - break ; - } - } - catch (e) - { - // If for any reason we are not able to handle it, go - // ahead with the browser default behavior. - } - - return false ; -} - -/* - * Executes the key behavior. - */ -FCKEnterKey.prototype.DoEnter = function( mode, hasShift ) -{ - // Save an undo snapshot before doing anything - FCKUndo.SaveUndoStep() ; - - this._HasShift = ( hasShift === true ) ; - - var parentElement = FCKSelection.GetParentElement() ; - var parentPath = new FCKElementPath( parentElement ) ; - var sMode = mode || this.EnterMode ; - - if ( sMode == 'br' || parentPath.Block && parentPath.Block.tagName.toLowerCase() == 'pre' ) - return this._ExecuteEnterBr() ; - else - return this._ExecuteEnterBlock( sMode ) ; -} - -/* - * Executes the + key behavior. - */ -FCKEnterKey.prototype.DoShiftEnter = function() -{ - return this.DoEnter( this.ShiftEnterMode, true ) ; -} - -/* - * Executes the key behavior. - */ -FCKEnterKey.prototype.DoBackspace = function() -{ - var bCustom = false ; - - // Get the current selection. - var oRange = new FCKDomRange( this.Window ) ; - oRange.MoveToSelection() ; - - // Kludge for #247 - if ( FCKBrowserInfo.IsIE && this._CheckIsAllContentsIncluded( oRange, this.Window.document.body ) ) - { - this._FixIESelectAllBug( oRange ) ; - return true ; - } - - var isCollapsed = oRange.CheckIsCollapsed() ; - - if ( !isCollapsed ) - { - // Bug #327, Backspace with an img selection would activate the default action in IE. - // Let's override that with our logic here. - if ( FCKBrowserInfo.IsIE && this.Window.document.selection.type.toLowerCase() == "control" ) - { - var controls = this.Window.document.selection.createRange() ; - for ( var i = controls.length - 1 ; i >= 0 ; i-- ) - { - var el = controls.item( i ) ; - el.parentNode.removeChild( el ) ; - } - return true ; - } - - return false ; - } - - // On IE, it is better for us handle the deletion if the caret is preceeded - // by a
        (#1383). - if ( FCKBrowserInfo.IsIE ) - { - var previousElement = FCKDomTools.GetPreviousSourceElement( oRange.StartNode, true ) ; - - if ( previousElement && previousElement.nodeName.toLowerCase() == 'br' ) - { - // Create a range that starts after the
        and ends at the - // current range position. - var testRange = oRange.Clone() ; - testRange.SetStart( previousElement, 4 ) ; - - // If that range is empty, we can proceed cleaning that
        manually. - if ( testRange.CheckIsEmpty() ) - { - previousElement.parentNode.removeChild( previousElement ) ; - return true ; - } - } - } - - var oStartBlock = oRange.StartBlock ; - var oEndBlock = oRange.EndBlock ; - - // The selection boundaries must be in the same "block limit" element - if ( oRange.StartBlockLimit == oRange.EndBlockLimit && oStartBlock && oEndBlock ) - { - if ( !isCollapsed ) - { - var bEndOfBlock = oRange.CheckEndOfBlock() ; - - oRange.DeleteContents() ; - - if ( oStartBlock != oEndBlock ) - { - oRange.SetStart(oEndBlock,1) ; - oRange.SetEnd(oEndBlock,1) ; - -// if ( bEndOfBlock ) -// oEndBlock.parentNode.removeChild( oEndBlock ) ; - } - - oRange.Select() ; - - bCustom = ( oStartBlock == oEndBlock ) ; - } - - if ( oRange.CheckStartOfBlock() ) - { - var oCurrentBlock = oRange.StartBlock ; - - var ePrevious = FCKDomTools.GetPreviousSourceElement( oCurrentBlock, true, [ 'BODY', oRange.StartBlockLimit.nodeName ], ['UL','OL'] ) ; - - bCustom = this._ExecuteBackspace( oRange, ePrevious, oCurrentBlock ) ; - } - else if ( FCKBrowserInfo.IsGeckoLike ) - { - // Firefox and Opera (#1095) loose the selection when executing - // CheckStartOfBlock, so we must reselect. - oRange.Select() ; - } - } - - oRange.Release() ; - return bCustom ; -} - -FCKEnterKey.prototype.DoCtrlBackspace = function() -{ - FCKUndo.SaveUndoStep() ; - var oRange = new FCKDomRange( this.Window ) ; - oRange.MoveToSelection() ; - if ( FCKBrowserInfo.IsIE && this._CheckIsAllContentsIncluded( oRange, this.Window.document.body ) ) - { - this._FixIESelectAllBug( oRange ) ; - return true ; - } - return false ; -} - -FCKEnterKey.prototype._ExecuteBackspace = function( range, previous, currentBlock ) -{ - var bCustom = false ; - - // We could be in a nested LI. - if ( !previous && currentBlock && currentBlock.nodeName.IEquals( 'LI' ) && currentBlock.parentNode.parentNode.nodeName.IEquals( 'LI' ) ) - { - this._OutdentWithSelection( currentBlock, range ) ; - return true ; - } - - if ( previous && previous.nodeName.IEquals( 'LI' ) ) - { - var oNestedList = FCKDomTools.GetLastChild( previous, ['UL','OL'] ) ; - - while ( oNestedList ) - { - previous = FCKDomTools.GetLastChild( oNestedList, 'LI' ) ; - oNestedList = FCKDomTools.GetLastChild( previous, ['UL','OL'] ) ; - } - } - - if ( previous && currentBlock ) - { - // If we are in a LI, and the previous block is not an LI, we must outdent it. - if ( currentBlock.nodeName.IEquals( 'LI' ) && !previous.nodeName.IEquals( 'LI' ) ) - { - this._OutdentWithSelection( currentBlock, range ) ; - return true ; - } - - // Take a reference to the parent for post processing cleanup. - var oCurrentParent = currentBlock.parentNode ; - - var sPreviousName = previous.nodeName.toLowerCase() ; - if ( FCKListsLib.EmptyElements[ sPreviousName ] != null || sPreviousName == 'table' ) - { - FCKDomTools.RemoveNode( previous ) ; - bCustom = true ; - } - else - { - // Remove the current block. - FCKDomTools.RemoveNode( currentBlock ) ; - - // Remove any empty tag left by the block removal. - while ( oCurrentParent.innerHTML.Trim().length == 0 ) - { - var oParent = oCurrentParent.parentNode ; - oParent.removeChild( oCurrentParent ) ; - oCurrentParent = oParent ; - } - - // Cleanup the previous and the current elements. - FCKDomTools.LTrimNode( currentBlock ) ; - FCKDomTools.RTrimNode( previous ) ; - - // Append a space to the previous. - // Maybe it is not always desirable... - // previous.appendChild( this.Window.document.createTextNode( ' ' ) ) ; - - // Set the range to the end of the previous element and bookmark it. - range.SetStart( previous, 2, true ) ; - range.Collapse( true ) ; - var oBookmark = range.CreateBookmark( true ) ; - - // Move the contents of the block to the previous element and delete it. - // But for some block types (e.g. table), moving the children to the previous block makes no sense. - // So a check is needed. (See #1081) - if ( ! currentBlock.tagName.IEquals( [ 'TABLE' ] ) ) - FCKDomTools.MoveChildren( currentBlock, previous ) ; - - // Place the selection at the bookmark. - range.SelectBookmark( oBookmark ) ; - - bCustom = true ; - } - } - - return bCustom ; -} - -/* - * Executes the key behavior. - */ -FCKEnterKey.prototype.DoDelete = function() -{ - // Save an undo snapshot before doing anything - // This is to conform with the behavior seen in MS Word - FCKUndo.SaveUndoStep() ; - - // The has the same effect as the , so we have the same - // results if we just move to the next block and apply the same logic. - - var bCustom = false ; - - // Get the current selection. - var oRange = new FCKDomRange( this.Window ) ; - oRange.MoveToSelection() ; - - // Kludge for #247 - if ( FCKBrowserInfo.IsIE && this._CheckIsAllContentsIncluded( oRange, this.Window.document.body ) ) - { - this._FixIESelectAllBug( oRange ) ; - return true ; - } - - // There is just one special case for collapsed selections at the end of a block. - if ( oRange.CheckIsCollapsed() && oRange.CheckEndOfBlock( FCKBrowserInfo.IsGeckoLike ) ) - { - var oCurrentBlock = oRange.StartBlock ; - var eCurrentCell = FCKTools.GetElementAscensor( oCurrentBlock, 'td' ); - - var eNext = FCKDomTools.GetNextSourceElement( oCurrentBlock, true, [ oRange.StartBlockLimit.nodeName ], - ['UL','OL','TR'], true ) ; - - // Bug #1323 : if we're in a table cell, and the next node belongs to a different cell, then don't - // delete anything. - if ( eCurrentCell ) - { - var eNextCell = FCKTools.GetElementAscensor( eNext, 'td' ); - if ( eNextCell != eCurrentCell ) - return true ; - } - - bCustom = this._ExecuteBackspace( oRange, oCurrentBlock, eNext ) ; - } - - oRange.Release() ; - return bCustom ; -} - -/* - * Executes the key behavior. - */ -FCKEnterKey.prototype.DoTab = function() -{ - var oRange = new FCKDomRange( this.Window ); - oRange.MoveToSelection() ; - - // If the user pressed inside a table, we should give him the default behavior ( moving between cells ) - // instead of giving him more non-breaking spaces. (Bug #973) - var node = oRange._Range.startContainer ; - while ( node ) - { - if ( node.nodeType == 1 ) - { - var tagName = node.tagName.toLowerCase() ; - if ( tagName == "tr" || tagName == "td" || tagName == "th" || tagName == "tbody" || tagName == "table" ) - return false ; - else - break ; - } - node = node.parentNode ; - } - - if ( this.TabText ) - { - oRange.DeleteContents() ; - oRange.InsertNode( this.Window.document.createTextNode( this.TabText ) ) ; - oRange.Collapse( false ) ; - oRange.Select() ; - } - return true ; -} - -FCKEnterKey.prototype._ExecuteEnterBlock = function( blockTag, range ) -{ - // Get the current selection. - var oRange = range || new FCKDomRange( this.Window ) ; - - var oSplitInfo = oRange.SplitBlock( blockTag ) ; - - if ( oSplitInfo ) - { - // Get the current blocks. - var ePreviousBlock = oSplitInfo.PreviousBlock ; - var eNextBlock = oSplitInfo.NextBlock ; - - var bIsStartOfBlock = oSplitInfo.WasStartOfBlock ; - var bIsEndOfBlock = oSplitInfo.WasEndOfBlock ; - - // If there is one block under a list item, modify the split so that the list item gets split as well. (Bug #1647) - if ( eNextBlock ) - { - if ( eNextBlock.parentNode.nodeName.IEquals( 'li' ) ) - { - FCKDomTools.BreakParent( eNextBlock, eNextBlock.parentNode ) ; - FCKDomTools.MoveNode( eNextBlock, eNextBlock.nextSibling, true ) ; - } - } - else if ( ePreviousBlock && ePreviousBlock.parentNode.nodeName.IEquals( 'li' ) ) - { - FCKDomTools.BreakParent( ePreviousBlock, ePreviousBlock.parentNode ) ; - oRange.MoveToElementEditStart( ePreviousBlock.nextSibling ); - FCKDomTools.MoveNode( ePreviousBlock, ePreviousBlock.previousSibling ) ; - } - - // If we have both the previous and next blocks, it means that the - // boundaries were on separated blocks, or none of them where on the - // block limits (start/end). - if ( !bIsStartOfBlock && !bIsEndOfBlock ) - { - // If the next block is an
      4. with another list tree as the first child - // We'll need to append a placeholder or the list item wouldn't be editable. (Bug #1420) - if ( eNextBlock.nodeName.IEquals( 'li' ) && eNextBlock.firstChild - && eNextBlock.firstChild.nodeName.IEquals( ['ul', 'ol'] ) ) - eNextBlock.insertBefore( FCKTools.GetElementDocument( eNextBlock ).createTextNode( '\xa0' ), eNextBlock.firstChild ) ; - // Move the selection to the end block. - if ( eNextBlock ) - oRange.MoveToElementEditStart( eNextBlock ) ; - } - else - { - if ( bIsStartOfBlock && bIsEndOfBlock && ePreviousBlock.tagName.toUpperCase() == 'LI' ) - { - oRange.MoveToElementStart( ePreviousBlock ) ; - this._OutdentWithSelection( ePreviousBlock, oRange ) ; - oRange.Release() ; - return true ; - } - - var eNewBlock ; - - if ( ePreviousBlock ) - { - var sPreviousBlockTag = ePreviousBlock.tagName.toUpperCase() ; - - // If is a header tag, or we are in a Shift+Enter (#77), - // create a new block element (later in the code). - if ( !this._HasShift && !(/^H[1-6]$/).test( sPreviousBlockTag ) ) - { - // Otherwise, duplicate the previous block. - eNewBlock = FCKDomTools.CloneElement( ePreviousBlock ) ; - } - } - else if ( eNextBlock ) - eNewBlock = FCKDomTools.CloneElement( eNextBlock ) ; - - if ( !eNewBlock ) - eNewBlock = this.Window.document.createElement( blockTag ) ; - - // Recreate the inline elements tree, which was available - // before the hitting enter, so the same styles will be - // available in the new block. - var elementPath = oSplitInfo.ElementPath ; - if ( elementPath ) - { - for ( var i = 0, len = elementPath.Elements.length ; i < len ; i++ ) - { - var element = elementPath.Elements[i] ; - - if ( element == elementPath.Block || element == elementPath.BlockLimit ) - break ; - - if ( FCKListsLib.InlineChildReqElements[ element.nodeName.toLowerCase() ] ) - { - element = FCKDomTools.CloneElement( element ) ; - FCKDomTools.MoveChildren( eNewBlock, element ) ; - eNewBlock.appendChild( element ) ; - } - } - } - - if ( FCKBrowserInfo.IsGeckoLike ) - FCKTools.AppendBogusBr( eNewBlock ) ; - - oRange.InsertNode( eNewBlock ) ; - - // This is tricky, but to make the new block visible correctly - // we must select it. - if ( FCKBrowserInfo.IsIE ) - { - // Move the selection to the new block. - oRange.MoveToElementEditStart( eNewBlock ) ; - oRange.Select() ; - } - - // Move the selection to the new block. - oRange.MoveToElementEditStart( bIsStartOfBlock && !bIsEndOfBlock ? eNextBlock : eNewBlock ) ; - } - - if ( FCKBrowserInfo.IsGeckoLike ) - FCKDomTools.ScrollIntoView( eNextBlock || eNewBlock, false ) ; - - oRange.Select() ; - } - - // Release the resources used by the range. - oRange.Release() ; - - return true ; -} - -FCKEnterKey.prototype._ExecuteEnterBr = function( blockTag ) -{ - // Get the current selection. - var oRange = new FCKDomRange( this.Window ) ; - oRange.MoveToSelection() ; - - // The selection boundaries must be in the same "block limit" element. - if ( oRange.StartBlockLimit == oRange.EndBlockLimit ) - { - oRange.DeleteContents() ; - - // Get the new selection (it is collapsed at this point). - oRange.MoveToSelection() ; - - var bIsStartOfBlock = oRange.CheckStartOfBlock() ; - var bIsEndOfBlock = oRange.CheckEndOfBlock() ; - - var sStartBlockTag = oRange.StartBlock ? oRange.StartBlock.tagName.toUpperCase() : '' ; - - var bHasShift = this._HasShift ; - var bIsPre = false ; - - if ( !bHasShift && sStartBlockTag == 'LI' ) - return this._ExecuteEnterBlock( null, oRange ) ; - - // If we are at the end of a header block. - if ( !bHasShift && bIsEndOfBlock && (/^H[1-6]$/).test( sStartBlockTag ) ) - { - // Insert a BR after the current paragraph. - FCKDomTools.InsertAfterNode( oRange.StartBlock, this.Window.document.createElement( 'br' ) ) ; - - // The space is required by Gecko only to make the cursor blink. - if ( FCKBrowserInfo.IsGecko ) - FCKDomTools.InsertAfterNode( oRange.StartBlock, this.Window.document.createTextNode( '' ) ) ; - - // IE and Gecko have different behaviors regarding the position. - oRange.SetStart( oRange.StartBlock.nextSibling, FCKBrowserInfo.IsIE ? 3 : 1 ) ; - } - else - { - var eLineBreak ; - bIsPre = sStartBlockTag.IEquals( 'pre' ) ; - if ( bIsPre ) - eLineBreak = this.Window.document.createTextNode( FCKBrowserInfo.IsIE ? '\r' : '\n' ) ; - else - eLineBreak = this.Window.document.createElement( 'br' ) ; - - oRange.InsertNode( eLineBreak ) ; - - // The space is required by Gecko only to make the cursor blink. - if ( FCKBrowserInfo.IsGecko ) - FCKDomTools.InsertAfterNode( eLineBreak, this.Window.document.createTextNode( '' ) ) ; - - // If we are at the end of a block, we must be sure the bogus node is available in that block. - if ( bIsEndOfBlock && FCKBrowserInfo.IsGeckoLike ) - FCKTools.AppendBogusBr( eLineBreak.parentNode ) ; - - if ( FCKBrowserInfo.IsIE ) - oRange.SetStart( eLineBreak, 4 ) ; - else - oRange.SetStart( eLineBreak.nextSibling, 1 ) ; - - if ( ! FCKBrowserInfo.IsIE ) - { - var dummy = null ; - if ( FCKBrowserInfo.IsOpera ) - dummy = this.Window.document.createElement( 'span' ) ; - else - dummy = this.Window.document.createElement( 'br' ) ; - - eLineBreak.parentNode.insertBefore( dummy, eLineBreak.nextSibling ) ; - - FCKDomTools.ScrollIntoView( dummy, false ) ; - - dummy.parentNode.removeChild( dummy ) ; - } - } - - // This collapse guarantees the cursor will be blinking. - oRange.Collapse( true ) ; - - oRange.Select( bIsPre ) ; - } - - // Release the resources used by the range. - oRange.Release() ; - - return true ; -} - -// Outdents a LI, maintaining the selection defined on a range. -FCKEnterKey.prototype._OutdentWithSelection = function( li, range ) -{ - var oBookmark = range.CreateBookmark() ; - - FCKListHandler.OutdentListItem( li ) ; - - range.MoveToBookmark( oBookmark ) ; - range.Select() ; -} - -// Is all the contents under a node included by a range? -FCKEnterKey.prototype._CheckIsAllContentsIncluded = function( range, node ) -{ - var startOk = false ; - var endOk = false ; - - /* - FCKDebug.Output( 'sc='+range.StartContainer.nodeName+ - ',so='+range._Range.startOffset+ - ',ec='+range.EndContainer.nodeName+ - ',eo='+range._Range.endOffset ) ; - */ - if ( range.StartContainer == node || range.StartContainer == node.firstChild ) - startOk = ( range._Range.startOffset == 0 ) ; - - if ( range.EndContainer == node || range.EndContainer == node.lastChild ) - { - var nodeLength = range.EndContainer.nodeType == 3 ? range.EndContainer.length : range.EndContainer.childNodes.length ; - endOk = ( range._Range.endOffset == nodeLength ) ; - } - - return startOk && endOk ; -} - -// Kludge for #247 -FCKEnterKey.prototype._FixIESelectAllBug = function( range ) -{ - var doc = this.Window.document ; - doc.body.innerHTML = '' ; - var editBlock ; - if ( FCKConfig.EnterMode.IEquals( ['div', 'p'] ) ) - { - editBlock = doc.createElement( FCKConfig.EnterMode ) ; - doc.body.appendChild( editBlock ) ; - } - else - editBlock = doc.body ; - - range.MoveToNodeContents( editBlock ) ; - range.Collapse( true ) ; - range.Select() ; - range.Release() ; -} diff --git a/fckeditor/editor/_source/classes/fckevents.js b/fckeditor/editor/_source/classes/fckevents.js deleted file mode 100644 index ef2e10f6..00000000 --- a/fckeditor/editor/_source/classes/fckevents.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * FCKEvents Class: used to handle events is a advanced way. - */ - -var FCKEvents = function( eventsOwner ) -{ - this.Owner = eventsOwner ; - this._RegisteredEvents = new Object() ; -} - -FCKEvents.prototype.AttachEvent = function( eventName, functionPointer ) -{ - var aTargets ; - - if ( !( aTargets = this._RegisteredEvents[ eventName ] ) ) - this._RegisteredEvents[ eventName ] = [ functionPointer ] ; - else - { - // Check that the event handler isn't already registered with the same listener - // It doesn't detect function pointers belonging to an object (at least in Gecko) - if ( aTargets.IndexOf( functionPointer ) == -1 ) - aTargets.push( functionPointer ) ; - } -} - -FCKEvents.prototype.FireEvent = function( eventName, params ) -{ - var bReturnValue = true ; - - var oCalls = this._RegisteredEvents[ eventName ] ; - - if ( oCalls ) - { - for ( var i = 0 ; i < oCalls.length ; i++ ) - { - try - { - bReturnValue = ( oCalls[ i ]( this.Owner, params ) && bReturnValue ) ; - } - catch(e) - { - // Ignore the following error. It may happen if pointing to a - // script not anymore available (#934): - // -2146823277 = Can't execute code from a freed script - if ( e.number != -2146823277 ) - throw e ; - } - } - } - - return bReturnValue ; -} diff --git a/fckeditor/editor/_source/classes/fckhtmliterator.js b/fckeditor/editor/_source/classes/fckhtmliterator.js deleted file mode 100644 index 9f184b7c..00000000 --- a/fckeditor/editor/_source/classes/fckhtmliterator.js +++ /dev/null @@ -1,142 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This class can be used to interate through nodes inside a range. - * - * During interation, the provided range can become invalid, due to document - * mutations, so CreateBookmark() used to restore it after processing, if - * needed. - */ - -var FCKHtmlIterator = function( source ) -{ - this._sourceHtml = source ; -} -FCKHtmlIterator.prototype = -{ - Next : function() - { - var sourceHtml = this._sourceHtml ; - if ( sourceHtml == null ) - return null ; - - var match = FCKRegexLib.HtmlTag.exec( sourceHtml ) ; - var isTag = false ; - var value = "" ; - if ( match ) - { - if ( match.index > 0 ) - { - value = sourceHtml.substr( 0, match.index ) ; - this._sourceHtml = sourceHtml.substr( match.index ) ; - } - else - { - isTag = true ; - value = match[0] ; - this._sourceHtml = sourceHtml.substr( match[0].length ) ; - } - } - else - { - value = sourceHtml ; - this._sourceHtml = null ; - } - return { 'isTag' : isTag, 'value' : value } ; - }, - - Each : function( func ) - { - var chunk ; - while ( ( chunk = this.Next() ) ) - func( chunk.isTag, chunk.value ) ; - } -} ; -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This class can be used to interate through nodes inside a range. - * - * During interation, the provided range can become invalid, due to document - * mutations, so CreateBookmark() used to restore it after processing, if - * needed. - */ - -var FCKHtmlIterator = function( source ) -{ - this._sourceHtml = source ; -} -FCKHtmlIterator.prototype = -{ - Next : function() - { - var sourceHtml = this._sourceHtml ; - if ( sourceHtml == null ) - return null ; - - var match = FCKRegexLib.HtmlTag.exec( sourceHtml ) ; - var isTag = false ; - var value = "" ; - if ( match ) - { - if ( match.index > 0 ) - { - value = sourceHtml.substr( 0, match.index ) ; - this._sourceHtml = sourceHtml.substr( match.index ) ; - } - else - { - isTag = true ; - value = match[0] ; - this._sourceHtml = sourceHtml.substr( match[0].length ) ; - } - } - else - { - value = sourceHtml ; - this._sourceHtml = null ; - } - return { 'isTag' : isTag, 'value' : value } ; - }, - - Each : function( func ) - { - var chunk ; - while ( ( chunk = this.Next() ) ) - func( chunk.isTag, chunk.value ) ; - } -} ; diff --git a/fckeditor/editor/_source/classes/fckicon.js b/fckeditor/editor/_source/classes/fckicon.js deleted file mode 100644 index 89719f6e..00000000 --- a/fckeditor/editor/_source/classes/fckicon.js +++ /dev/null @@ -1,103 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * FCKIcon Class: renders an icon from a single image, a strip or even a - * spacer. - */ - -var FCKIcon = function( iconPathOrStripInfoArray ) -{ - var sTypeOf = iconPathOrStripInfoArray ? typeof( iconPathOrStripInfoArray ) : 'undefined' ; - switch ( sTypeOf ) - { - case 'number' : - this.Path = FCKConfig.SkinPath + 'fck_strip.gif' ; - this.Size = 16 ; - this.Position = iconPathOrStripInfoArray ; - break ; - - case 'undefined' : - this.Path = FCK_SPACER_PATH ; - break ; - - case 'string' : - this.Path = iconPathOrStripInfoArray ; - break ; - - default : - // It is an array in the format [ StripFilePath, IconSize, IconPosition ] - this.Path = iconPathOrStripInfoArray[0] ; - this.Size = iconPathOrStripInfoArray[1] ; - this.Position = iconPathOrStripInfoArray[2] ; - } -} - -FCKIcon.prototype.CreateIconElement = function( document ) -{ - var eIcon, eIconImage ; - - if ( this.Position ) // It is using an icons strip image. - { - var sPos = '-' + ( ( this.Position - 1 ) * this.Size ) + 'px' ; - - if ( FCKBrowserInfo.IsIE ) - { - //
        - - eIcon = document.createElement( 'DIV' ) ; - - eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ; - eIconImage.src = this.Path ; - eIconImage.style.top = sPos ; - } - else - { - // - - eIcon = document.createElement( 'IMG' ) ; - eIcon.src = FCK_SPACER_PATH ; - eIcon.style.backgroundPosition = '0px ' + sPos ; - eIcon.style.backgroundImage = 'url("' + this.Path + '")' ; - } - } - else // It is using a single icon image. - { - if ( FCKBrowserInfo.IsIE ) - { - // IE makes the button 1px higher if using the directly, so we - // are changing to the
        system to clip the image correctly. - eIcon = document.createElement( 'DIV' ) ; - - eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ; - eIconImage.src = this.Path ? this.Path : FCK_SPACER_PATH ; - } - else - { - // This is not working well with IE. See notes above. - // - eIcon = document.createElement( 'IMG' ) ; - eIcon.src = this.Path ? this.Path : FCK_SPACER_PATH ; - } - } - - eIcon.className = 'TB_Button_Image' ; - - return eIcon ; -} diff --git a/fckeditor/editor/_source/classes/fckiecleanup.js b/fckeditor/editor/_source/classes/fckiecleanup.js deleted file mode 100644 index 9a090054..00000000 --- a/fckeditor/editor/_source/classes/fckiecleanup.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * FCKIECleanup Class: a generic class used as a tool to remove IE leaks. - */ - -var FCKIECleanup = function( attachWindow ) -{ - // If the attachWindow already have a cleanup object, just use that one. - if ( attachWindow._FCKCleanupObj ) - this.Items = attachWindow._FCKCleanupObj.Items ; - else - { - this.Items = new Array() ; - - attachWindow._FCKCleanupObj = this ; - FCKTools.AddEventListenerEx( attachWindow, 'unload', FCKIECleanup_Cleanup ) ; -// attachWindow.attachEvent( 'onunload', FCKIECleanup_Cleanup ) ; - } -} - -FCKIECleanup.prototype.AddItem = function( dirtyItem, cleanupFunction ) -{ - this.Items.push( [ dirtyItem, cleanupFunction ] ) ; -} - -function FCKIECleanup_Cleanup() -{ - if ( !this._FCKCleanupObj || ( FCKConfig.MsWebBrowserControlCompat && !window.FCKUnloadFlag ) ) - return ; - - var aItems = this._FCKCleanupObj.Items ; - - while ( aItems.length > 0 ) - { - - // It is important to remove from the end to the beginning (pop()), - // because of the order things get created in the editor. In the code, - // elements in deeper position in the DOM are placed at the end of the - // cleanup function, so we must cleanup then first, otherwise IE could - // throw some crazy memory errors (IE bug). - var oItem = aItems.pop() ; - if ( oItem ) - oItem[1].call( oItem[0] ) ; - } - - this._FCKCleanupObj = null ; - - if ( CollectGarbage ) - CollectGarbage() ; -} diff --git a/fckeditor/editor/_source/classes/fckimagepreloader.js b/fckeditor/editor/_source/classes/fckimagepreloader.js deleted file mode 100644 index 92fd305e..00000000 --- a/fckeditor/editor/_source/classes/fckimagepreloader.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Preload a list of images, firing an event when complete. - */ - -var FCKImagePreloader = function() -{ - this._Images = new Array() ; -} - -FCKImagePreloader.prototype = -{ - AddImages : function( images ) - { - if ( typeof( images ) == 'string' ) - images = images.split( ';' ) ; - - this._Images = this._Images.concat( images ) ; - }, - - Start : function() - { - var aImages = this._Images ; - this._PreloadCount = aImages.length ; - - for ( var i = 0 ; i < aImages.length ; i++ ) - { - var eImg = document.createElement( 'img' ) ; - FCKTools.AddEventListenerEx( eImg, 'load', _FCKImagePreloader_OnImage, this ) ; - FCKTools.AddEventListenerEx( eImg, 'error', _FCKImagePreloader_OnImage, this ) ; - eImg.src = aImages[i] ; - - _FCKImagePreloader_ImageCache.push( eImg ) ; - } - } -}; - -// All preloaded images must be placed in a global array, otherwise the preload -// magic will not happen. -var _FCKImagePreloader_ImageCache = new Array() ; - -function _FCKImagePreloader_OnImage( ev, imagePreloader ) -{ - if ( (--imagePreloader._PreloadCount) == 0 && imagePreloader.OnComplete ) - imagePreloader.OnComplete() ; -} diff --git a/fckeditor/editor/_source/classes/fckkeystrokehandler.js b/fckeditor/editor/_source/classes/fckkeystrokehandler.js deleted file mode 100644 index 31c341ba..00000000 --- a/fckeditor/editor/_source/classes/fckkeystrokehandler.js +++ /dev/null @@ -1,141 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Control keyboard keystroke combinations. - */ - -var FCKKeystrokeHandler = function( cancelCtrlDefaults ) -{ - this.Keystrokes = new Object() ; - this.CancelCtrlDefaults = ( cancelCtrlDefaults !== false ) ; -} - -/* - * Listen to keystroke events in an element or DOM document object. - * @target: The element or document to listen to keystroke events. - */ -FCKKeystrokeHandler.prototype.AttachToElement = function( target ) -{ - // For newer browsers, it is enough to listen to the keydown event only. - // Some browsers instead, don't cancel key events in the keydown, but in the - // keypress. So we must do a longer trip in those cases. - FCKTools.AddEventListenerEx( target, 'keydown', _FCKKeystrokeHandler_OnKeyDown, this ) ; - if ( FCKBrowserInfo.IsGecko10 || FCKBrowserInfo.IsOpera || ( FCKBrowserInfo.IsGecko && FCKBrowserInfo.IsMac ) ) - FCKTools.AddEventListenerEx( target, 'keypress', _FCKKeystrokeHandler_OnKeyPress, this ) ; -} - -/* - * Sets a list of keystrokes. It can receive either a single array or "n" - * arguments, each one being an array of 1 or 2 elemenst. The first element - * is the keystroke combination, and the second is the value to assign to it. - * If the second element is missing, the keystroke definition is removed. - */ -FCKKeystrokeHandler.prototype.SetKeystrokes = function() -{ - // Look through the arguments. - for ( var i = 0 ; i < arguments.length ; i++ ) - { - var keyDef = arguments[i] ; - - // If the configuration for the keystrokes is missing some element or has any extra comma - // this item won't be valid, so skip it and keep on processing. - if ( !keyDef ) - continue ; - - if ( typeof( keyDef[0] ) == 'object' ) // It is an array with arrays defining the keystrokes. - this.SetKeystrokes.apply( this, keyDef ) ; - else - { - if ( keyDef.length == 1 ) // If it has only one element, remove the keystroke. - delete this.Keystrokes[ keyDef[0] ] ; - else // Otherwise add it. - this.Keystrokes[ keyDef[0] ] = keyDef[1] === true ? true : keyDef ; - } - } -} - -function _FCKKeystrokeHandler_OnKeyDown( ev, keystrokeHandler ) -{ - // Get the key code. - var keystroke = ev.keyCode || ev.which ; - - // Combine it with the CTRL, SHIFT and ALT states. - var keyModifiers = 0 ; - - if ( ev.ctrlKey || ev.metaKey ) - keyModifiers += CTRL ; - - if ( ev.shiftKey ) - keyModifiers += SHIFT ; - - if ( ev.altKey ) - keyModifiers += ALT ; - - var keyCombination = keystroke + keyModifiers ; - - var cancelIt = keystrokeHandler._CancelIt = false ; - - // Look for its definition availability. - var keystrokeValue = keystrokeHandler.Keystrokes[ keyCombination ] ; - -// FCKDebug.Output( 'KeyDown: ' + keyCombination + ' - Value: ' + keystrokeValue ) ; - - // If the keystroke is defined - if ( keystrokeValue ) - { - // If the keystroke has been explicitly set to "true" OR calling the - // "OnKeystroke" event, it doesn't return "true", the default behavior - // must be preserved. - if ( keystrokeValue === true || !( keystrokeHandler.OnKeystroke && keystrokeHandler.OnKeystroke.apply( keystrokeHandler, keystrokeValue ) ) ) - return true ; - - cancelIt = true ; - } - - // By default, it will cancel all combinations with the CTRL key only (except positioning keys). - if ( cancelIt || ( keystrokeHandler.CancelCtrlDefaults && keyModifiers == CTRL && ( keystroke < 33 || keystroke > 40 ) ) ) - { - keystrokeHandler._CancelIt = true ; - - if ( ev.preventDefault ) - return ev.preventDefault() ; - - ev.returnValue = false ; - ev.cancelBubble = true ; - return false ; - } - - return true ; -} - -function _FCKKeystrokeHandler_OnKeyPress( ev, keystrokeHandler ) -{ - if ( keystrokeHandler._CancelIt ) - { -// FCKDebug.Output( 'KeyPress Cancel', 'Red') ; - - if ( ev.preventDefault ) - return ev.preventDefault() ; - - return false ; - } - - return true ; -} diff --git a/fckeditor/editor/_source/classes/fckmenublock.js b/fckeditor/editor/_source/classes/fckmenublock.js deleted file mode 100644 index 1cd710dc..00000000 --- a/fckeditor/editor/_source/classes/fckmenublock.js +++ /dev/null @@ -1,153 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Renders a list of menu items. - */ - -var FCKMenuBlock = function() -{ - this._Items = new Array() ; -} - - -FCKMenuBlock.prototype.Count = function() -{ - return this._Items.length ; -} - -FCKMenuBlock.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) -{ - var oItem = new FCKMenuItem( this, name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ; - - oItem.OnClick = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnClick, this ) ; - oItem.OnActivate = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnActivate, this ) ; - - this._Items.push( oItem ) ; - - return oItem ; -} - -FCKMenuBlock.prototype.AddSeparator = function() -{ - this._Items.push( new FCKMenuSeparator() ) ; -} - -FCKMenuBlock.prototype.RemoveAllItems = function() -{ - this._Items = new Array() ; - - var eItemsTable = this._ItemsTable ; - if ( eItemsTable ) - { - while ( eItemsTable.rows.length > 0 ) - eItemsTable.deleteRow( 0 ) ; - } -} - -FCKMenuBlock.prototype.Create = function( parentElement ) -{ - if ( !this._ItemsTable ) - { - if ( FCK.IECleanup ) - FCK.IECleanup.AddItem( this, FCKMenuBlock_Cleanup ) ; - - this._Window = FCKTools.GetElementWindow( parentElement ) ; - - var oDoc = FCKTools.GetElementDocument( parentElement ) ; - - var eTable = parentElement.appendChild( oDoc.createElement( 'table' ) ) ; - eTable.cellPadding = 0 ; - eTable.cellSpacing = 0 ; - - FCKTools.DisableSelection( eTable ) ; - - var oMainElement = eTable.insertRow(-1).insertCell(-1) ; - oMainElement.className = 'MN_Menu' ; - - var eItemsTable = this._ItemsTable = oMainElement.appendChild( oDoc.createElement( 'table' ) ) ; - eItemsTable.cellPadding = 0 ; - eItemsTable.cellSpacing = 0 ; - } - - for ( var i = 0 ; i < this._Items.length ; i++ ) - this._Items[i].Create( this._ItemsTable ) ; -} - -/* Events */ - -function FCKMenuBlock_Item_OnClick( clickedItem, menuBlock ) -{ - if ( menuBlock.Hide ) - menuBlock.Hide() ; - - FCKTools.RunFunction( menuBlock.OnClick, menuBlock, [ clickedItem ] ) ; -} - -function FCKMenuBlock_Item_OnActivate( menuBlock ) -{ - var oActiveItem = menuBlock._ActiveItem ; - - if ( oActiveItem && oActiveItem != this ) - { - // Set the focus to this menu block window (to fire OnBlur on opened panels). - if ( !FCKBrowserInfo.IsIE && oActiveItem.HasSubMenu && !this.HasSubMenu ) - { - menuBlock._Window.focus() ; - - // Due to the event model provided by Opera, we need to set - // HasFocus here as the above focus() call will not fire the focus - // event in the panel immediately (#1200). - menuBlock.Panel.HasFocus = true ; - } - - oActiveItem.Deactivate() ; - } - - menuBlock._ActiveItem = this ; -} - -function FCKMenuBlock_Cleanup() -{ - this._Window = null ; - this._ItemsTable = null ; -} - -// ################# // - -var FCKMenuSeparator = function() -{} - -FCKMenuSeparator.prototype.Create = function( parentTable ) -{ - var oDoc = FCKTools.GetElementDocument( parentTable ) ; - - var r = parentTable.insertRow(-1) ; - - var eCell = r.insertCell(-1) ; - eCell.className = 'MN_Separator MN_Icon' ; - - eCell = r.insertCell(-1) ; - eCell.className = 'MN_Separator' ; - eCell.appendChild( oDoc.createElement( 'DIV' ) ).className = 'MN_Separator_Line' ; - - eCell = r.insertCell(-1) ; - eCell.className = 'MN_Separator' ; - eCell.appendChild( oDoc.createElement( 'DIV' ) ).className = 'MN_Separator_Line' ; -} diff --git a/fckeditor/editor/_source/classes/fckmenublockpanel.js b/fckeditor/editor/_source/classes/fckmenublockpanel.js deleted file mode 100644 index 9dbc4803..00000000 --- a/fckeditor/editor/_source/classes/fckmenublockpanel.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This class is a menu block that behaves like a panel. It's a mix of the - * FCKMenuBlock and FCKPanel classes. - */ - -var FCKMenuBlockPanel = function() -{ - // Call the "base" constructor. - FCKMenuBlock.call( this ) ; -} - -FCKMenuBlockPanel.prototype = new FCKMenuBlock() ; - - -// Override the create method. -FCKMenuBlockPanel.prototype.Create = function() -{ - var oPanel = this.Panel = ( this.Parent && this.Parent.Panel ? this.Parent.Panel.CreateChildPanel() : new FCKPanel() ) ; - oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; - - // Call the "base" implementation. - FCKMenuBlock.prototype.Create.call( this, oPanel.MainNode ) ; -} - -FCKMenuBlockPanel.prototype.Show = function( x, y, relElement ) -{ - if ( !this.Panel.CheckIsOpened() ) - this.Panel.Show( x, y, relElement ) ; -} - -FCKMenuBlockPanel.prototype.Hide = function() -{ - if ( this.Panel.CheckIsOpened() ) - this.Panel.Hide() ; -} diff --git a/fckeditor/editor/_source/classes/fckmenuitem.js b/fckeditor/editor/_source/classes/fckmenuitem.js deleted file mode 100644 index 038146d2..00000000 --- a/fckeditor/editor/_source/classes/fckmenuitem.js +++ /dev/null @@ -1,161 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Defines and renders a menu items in a menu block. - */ - -var FCKMenuItem = function( parentMenuBlock, name, label, iconPathOrStripInfoArray, isDisabled, customData ) -{ - this.Name = name ; - this.Label = label || name ; - this.IsDisabled = isDisabled ; - - this.Icon = new FCKIcon( iconPathOrStripInfoArray ) ; - - this.SubMenu = new FCKMenuBlockPanel() ; - this.SubMenu.Parent = parentMenuBlock ; - this.SubMenu.OnClick = FCKTools.CreateEventListener( FCKMenuItem_SubMenu_OnClick, this ) ; - this.CustomData = customData ; - - if ( FCK.IECleanup ) - FCK.IECleanup.AddItem( this, FCKMenuItem_Cleanup ) ; -} - - -FCKMenuItem.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) -{ - this.HasSubMenu = true ; - return this.SubMenu.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ; -} - -FCKMenuItem.prototype.AddSeparator = function() -{ - this.SubMenu.AddSeparator() ; -} - -FCKMenuItem.prototype.Create = function( parentTable ) -{ - var bHasSubMenu = this.HasSubMenu ; - - var oDoc = FCKTools.GetElementDocument( parentTable ) ; - - // Add a row in the table to hold the menu item. - var r = this.MainElement = parentTable.insertRow(-1) ; - r.className = this.IsDisabled ? 'MN_Item_Disabled' : 'MN_Item' ; - - // Set the row behavior. - if ( !this.IsDisabled ) - { - FCKTools.AddEventListenerEx( r, 'mouseover', FCKMenuItem_OnMouseOver, [ this ] ) ; - FCKTools.AddEventListenerEx( r, 'click', FCKMenuItem_OnClick, [ this ] ) ; - - if ( !bHasSubMenu ) - FCKTools.AddEventListenerEx( r, 'mouseout', FCKMenuItem_OnMouseOut, [ this ] ) ; - } - - // Create the icon cell. - var eCell = r.insertCell(-1) ; - eCell.className = 'MN_Icon' ; - eCell.appendChild( this.Icon.CreateIconElement( oDoc ) ) ; - - // Create the label cell. - eCell = r.insertCell(-1) ; - eCell.className = 'MN_Label' ; - eCell.noWrap = true ; - eCell.appendChild( oDoc.createTextNode( this.Label ) ) ; - - // Create the arrow cell and setup the sub menu panel (if needed). - eCell = r.insertCell(-1) ; - if ( bHasSubMenu ) - { - eCell.className = 'MN_Arrow' ; - - // The arrow is a fixed size image. - var eArrowImg = eCell.appendChild( oDoc.createElement( 'IMG' ) ) ; - eArrowImg.src = FCK_IMAGES_PATH + 'arrow_' + FCKLang.Dir + '.gif' ; - eArrowImg.width = 4 ; - eArrowImg.height = 7 ; - - this.SubMenu.Create() ; - this.SubMenu.Panel.OnHide = FCKTools.CreateEventListener( FCKMenuItem_SubMenu_OnHide, this ) ; - } -} - -FCKMenuItem.prototype.Activate = function() -{ - this.MainElement.className = 'MN_Item_Over' ; - - if ( this.HasSubMenu ) - { - // Show the child menu block. The ( +2, -2 ) correction is done because - // of the padding in the skin. It is not a good solution because one - // could change the skin and so the final result would not be accurate. - // For now it is ok because we are controlling the skin. - this.SubMenu.Show( this.MainElement.offsetWidth + 2, -2, this.MainElement ) ; - } - - FCKTools.RunFunction( this.OnActivate, this ) ; -} - -FCKMenuItem.prototype.Deactivate = function() -{ - this.MainElement.className = 'MN_Item' ; - - if ( this.HasSubMenu ) - this.SubMenu.Hide() ; -} - -/* Events */ - -function FCKMenuItem_SubMenu_OnClick( clickedItem, listeningItem ) -{ - FCKTools.RunFunction( listeningItem.OnClick, listeningItem, [ clickedItem ] ) ; -} - -function FCKMenuItem_SubMenu_OnHide( menuItem ) -{ - menuItem.Deactivate() ; -} - -function FCKMenuItem_OnClick( ev, menuItem ) -{ - if ( menuItem.HasSubMenu ) - menuItem.Activate() ; - else - { - menuItem.Deactivate() ; - FCKTools.RunFunction( menuItem.OnClick, menuItem, [ menuItem ] ) ; - } -} - -function FCKMenuItem_OnMouseOver( ev, menuItem ) -{ - menuItem.Activate() ; -} - -function FCKMenuItem_OnMouseOut( ev, menuItem ) -{ - menuItem.Deactivate() ; -} - -function FCKMenuItem_Cleanup() -{ - this.MainElement = null ; -} diff --git a/fckeditor/editor/_source/classes/fckpanel.js b/fckeditor/editor/_source/classes/fckpanel.js deleted file mode 100644 index f041339a..00000000 --- a/fckeditor/editor/_source/classes/fckpanel.js +++ /dev/null @@ -1,386 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Component that creates floating panels. It is used by many - * other components, like the toolbar items, context menu, etc... - */ - -var FCKPanel = function( parentWindow ) -{ - this.IsRTL = ( FCKLang.Dir == 'rtl' ) ; - this.IsContextMenu = false ; - this._LockCounter = 0 ; - - this._Window = parentWindow || window ; - - var oDocument ; - - if ( FCKBrowserInfo.IsIE ) - { - // Create the Popup that will hold the panel. - // The popup has to be created before playing with domain hacks, see #1666. - this._Popup = this._Window.createPopup() ; - - // this._Window cannot be accessed while playing with domain hacks, but local variable is ok. - // See #1666. - var pDoc = this._Window.document ; - - // This is a trick to IE6 (not IE7). The original domain must be set - // before creating the popup, so we are able to take a refence to the - // document inside of it, and the set the proper domain for it. (#123) - if ( FCK_IS_CUSTOM_DOMAIN && !FCKBrowserInfo.IsIE7 ) - { - pDoc.domain = FCK_ORIGINAL_DOMAIN ; - document.domain = FCK_ORIGINAL_DOMAIN ; - } - - oDocument = this.Document = this._Popup.document ; - - // Set the proper domain inside the popup. - if ( FCK_IS_CUSTOM_DOMAIN ) - { - oDocument.domain = FCK_RUNTIME_DOMAIN ; - pDoc.domain = FCK_RUNTIME_DOMAIN ; - document.domain = FCK_RUNTIME_DOMAIN ; - } - - FCK.IECleanup.AddItem( this, FCKPanel_Cleanup ) ; - } - else - { - var oIFrame = this._IFrame = this._Window.document.createElement('iframe') ; - FCKTools.ResetStyles( oIFrame ); - oIFrame.src = 'javascript:void(0)' ; - oIFrame.allowTransparency = true ; - oIFrame.frameBorder = '0' ; - oIFrame.scrolling = 'no' ; - oIFrame.style.width = oIFrame.style.height = '0px' ; - FCKDomTools.SetElementStyles( oIFrame, - { - position : 'absolute', - zIndex : FCKConfig.FloatingPanelsZIndex - } ) ; - - this._Window.document.body.appendChild( oIFrame ) ; - - var oIFrameWindow = oIFrame.contentWindow ; - - oDocument = this.Document = oIFrameWindow.document ; - - // Workaround for Safari 12256. Ticket #63 - var sBase = '' ; - if ( FCKBrowserInfo.IsSafari ) - sBase = '' ; - - // Initialize the IFRAME document body. - oDocument.open() ; - oDocument.write( '' + sBase + '<\/head><\/body><\/html>' ) ; - oDocument.close() ; - - if( FCKBrowserInfo.IsAIR ) - FCKAdobeAIR.Panel_Contructor( oDocument, window.document.location ) ; - - FCKTools.AddEventListenerEx( oIFrameWindow, 'focus', FCKPanel_Window_OnFocus, this ) ; - FCKTools.AddEventListenerEx( oIFrameWindow, 'blur', FCKPanel_Window_OnBlur, this ) ; - } - - oDocument.dir = FCKLang.Dir ; - - FCKTools.AddEventListener( oDocument, 'contextmenu', FCKTools.CancelEvent ) ; - - - // Create the main DIV that is used as the panel base. - this.MainNode = oDocument.body.appendChild( oDocument.createElement('DIV') ) ; - - // The "float" property must be set so Firefox calculates the size correctly. - this.MainNode.style.cssFloat = this.IsRTL ? 'right' : 'left' ; -} - - -FCKPanel.prototype.AppendStyleSheet = function( styleSheet ) -{ - FCKTools.AppendStyleSheet( this.Document, styleSheet ) ; -} - -FCKPanel.prototype.Preload = function( x, y, relElement ) -{ - // The offsetWidth and offsetHeight properties are not available if the - // element is not visible. So we must "show" the popup with no size to - // be able to use that values in the second call (IE only). - if ( this._Popup ) - this._Popup.show( x, y, 0, 0, relElement ) ; -} - -FCKPanel.prototype.Show = function( x, y, relElement, width, height ) -{ - var iMainWidth ; - var eMainNode = this.MainNode ; - - if ( this._Popup ) - { - // The offsetWidth and offsetHeight properties are not available if the - // element is not visible. So we must "show" the popup with no size to - // be able to use that values in the second call. - this._Popup.show( x, y, 0, 0, relElement ) ; - - // The following lines must be place after the above "show", otherwise it - // doesn't has the desired effect. - FCKDomTools.SetElementStyles( eMainNode, - { - width : width ? width + 'px' : '', - height : height ? height + 'px' : '' - } ) ; - - iMainWidth = eMainNode.offsetWidth ; - - if ( this.IsRTL ) - { - if ( this.IsContextMenu ) - x = x - iMainWidth + 1 ; - else if ( relElement ) - x = ( x * -1 ) + relElement.offsetWidth - iMainWidth ; - } - - // Second call: Show the Popup at the specified location, with the correct size. - this._Popup.show( x, y, iMainWidth, eMainNode.offsetHeight, relElement ) ; - - if ( this.OnHide ) - { - if ( this._Timer ) - CheckPopupOnHide.call( this, true ) ; - - this._Timer = FCKTools.SetInterval( CheckPopupOnHide, 100, this ) ; - } - } - else - { - // Do not fire OnBlur while the panel is opened. - if ( typeof( FCK.ToolbarSet.CurrentInstance.FocusManager ) != 'undefined' ) - FCK.ToolbarSet.CurrentInstance.FocusManager.Lock() ; - - if ( this.ParentPanel ) - { - this.ParentPanel.Lock() ; - - // Due to a bug on FF3, we must ensure that the parent panel will - // blur (#1584). - FCKPanel_Window_OnBlur( null, this.ParentPanel ) ; - } - - // Toggle the iframe scrolling attribute to prevent the panel - // scrollbars from disappearing in FF Mac. (#191) - if ( FCKBrowserInfo.IsGecko && FCKBrowserInfo.IsMac ) - { - this._IFrame.scrolling = '' ; - FCKTools.RunFunction( function(){ this._IFrame.scrolling = 'no'; }, this ) ; - } - - // Be sure we'll not have more than one Panel opened at the same time. - // Do not unlock focus manager here because we're displaying another floating panel - // instead of returning the editor to a "no panel" state (Bug #1514). - if ( FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel && - FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel != this ) - FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel.Hide( false, true ) ; - - FCKDomTools.SetElementStyles( eMainNode, - { - width : width ? width + 'px' : '', - height : height ? height + 'px' : '' - } ) ; - - iMainWidth = eMainNode.offsetWidth ; - - if ( !width ) this._IFrame.width = 1 ; - if ( !height ) this._IFrame.height = 1 ; - - // This is weird... but with Firefox, we must get the offsetWidth before - // setting the _IFrame size (which returns "0"), and then after that, - // to return the correct width. Remove the first step and it will not - // work when the editor is in RTL. - // - // The "|| eMainNode.firstChild.offsetWidth" part has been added - // for Opera compatibility (see #570). - iMainWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ; - - // Base the popup coordinates upon the coordinates of relElement. - var oPos = FCKTools.GetDocumentPosition( this._Window, - relElement.nodeType == 9 ? - ( FCKTools.IsStrictMode( relElement ) ? relElement.documentElement : relElement.body ) : - relElement ) ; - - // Minus the offsets provided by any positioned parent element of the panel iframe. - var positionedAncestor = FCKDomTools.GetPositionedAncestor( this._IFrame.parentNode ) ; - if ( positionedAncestor ) - { - var nPos = FCKTools.GetDocumentPosition( FCKTools.GetElementWindow( positionedAncestor ), positionedAncestor ) ; - oPos.x -= nPos.x ; - oPos.y -= nPos.y ; - } - - if ( this.IsRTL && !this.IsContextMenu ) - x = ( x * -1 ) ; - - x += oPos.x ; - y += oPos.y ; - - if ( this.IsRTL ) - { - if ( this.IsContextMenu ) - x = x - iMainWidth + 1 ; - else if ( relElement ) - x = x + relElement.offsetWidth - iMainWidth ; - } - else - { - var oViewPaneSize = FCKTools.GetViewPaneSize( this._Window ) ; - var oScrollPosition = FCKTools.GetScrollPosition( this._Window ) ; - - var iViewPaneHeight = oViewPaneSize.Height + oScrollPosition.Y ; - var iViewPaneWidth = oViewPaneSize.Width + oScrollPosition.X ; - - if ( ( x + iMainWidth ) > iViewPaneWidth ) - x -= x + iMainWidth - iViewPaneWidth ; - - if ( ( y + eMainNode.offsetHeight ) > iViewPaneHeight ) - y -= y + eMainNode.offsetHeight - iViewPaneHeight ; - } - - // Set the context menu DIV in the specified location. - FCKDomTools.SetElementStyles( this._IFrame, - { - left : x + 'px', - top : y + 'px' - } ) ; - - // Move the focus to the IFRAME so we catch the "onblur". - this._IFrame.contentWindow.focus() ; - this._IsOpened = true ; - - var me = this ; - this._resizeTimer = setTimeout( function() - { - var iWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ; - var iHeight = eMainNode.offsetHeight ; - me._IFrame.style.width = iWidth + 'px' ; - me._IFrame.style.height = iHeight + 'px' ; - - }, 0 ) ; - - FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel = this ; - } - - FCKTools.RunFunction( this.OnShow, this ) ; -} - -FCKPanel.prototype.Hide = function( ignoreOnHide, ignoreFocusManagerUnlock ) -{ - if ( this._Popup ) - this._Popup.hide() ; - else - { - if ( !this._IsOpened || this._LockCounter > 0 ) - return ; - - // Enable the editor to fire the "OnBlur". - if ( typeof( FCKFocusManager ) != 'undefined' && !ignoreFocusManagerUnlock ) - FCKFocusManager.Unlock() ; - - // It is better to set the sizes to 0, otherwise Firefox would have - // rendering problems. - this._IFrame.style.width = this._IFrame.style.height = '0px' ; - - this._IsOpened = false ; - - if ( this._resizeTimer ) - { - clearTimeout( this._resizeTimer ) ; - this._resizeTimer = null ; - } - - if ( this.ParentPanel ) - this.ParentPanel.Unlock() ; - - if ( !ignoreOnHide ) - FCKTools.RunFunction( this.OnHide, this ) ; - } -} - -FCKPanel.prototype.CheckIsOpened = function() -{ - if ( this._Popup ) - return this._Popup.isOpen ; - else - return this._IsOpened ; -} - -FCKPanel.prototype.CreateChildPanel = function() -{ - var oWindow = this._Popup ? FCKTools.GetDocumentWindow( this.Document ) : this._Window ; - - var oChildPanel = new FCKPanel( oWindow ) ; - oChildPanel.ParentPanel = this ; - - return oChildPanel ; -} - -FCKPanel.prototype.Lock = function() -{ - this._LockCounter++ ; -} - -FCKPanel.prototype.Unlock = function() -{ - if ( --this._LockCounter == 0 && !this.HasFocus ) - this.Hide() ; -} - -/* Events */ - -function FCKPanel_Window_OnFocus( e, panel ) -{ - panel.HasFocus = true ; -} - -function FCKPanel_Window_OnBlur( e, panel ) -{ - panel.HasFocus = false ; - - if ( panel._LockCounter == 0 ) - FCKTools.RunFunction( panel.Hide, panel ) ; -} - -function CheckPopupOnHide( forceHide ) -{ - if ( forceHide || !this._Popup.isOpen ) - { - window.clearInterval( this._Timer ) ; - this._Timer = null ; - - FCKTools.RunFunction( this.OnHide, this ) ; - } -} - -function FCKPanel_Cleanup() -{ - this._Popup = null ; - this._Window = null ; - this.Document = null ; - this.MainNode = null ; -} diff --git a/fckeditor/editor/_source/classes/fckplugin.js b/fckeditor/editor/_source/classes/fckplugin.js deleted file mode 100644 index 16300d13..00000000 --- a/fckeditor/editor/_source/classes/fckplugin.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * FCKPlugin Class: Represents a single plugin. - */ - -var FCKPlugin = function( name, availableLangs, basePath ) -{ - this.Name = name ; - this.BasePath = basePath ? basePath : FCKConfig.PluginsPath ; - this.Path = this.BasePath + name + '/' ; - - if ( !availableLangs || availableLangs.length == 0 ) - this.AvailableLangs = new Array() ; - else - this.AvailableLangs = availableLangs.split(',') ; -} - -FCKPlugin.prototype.Load = function() -{ - // Load the language file, if defined. - if ( this.AvailableLangs.length > 0 ) - { - var sLang ; - - // Check if the plugin has the language file for the active language. - if ( this.AvailableLangs.IndexOf( FCKLanguageManager.ActiveLanguage.Code ) >= 0 ) - sLang = FCKLanguageManager.ActiveLanguage.Code ; - else - // Load the default language file (first one) if the current one is not available. - sLang = this.AvailableLangs[0] ; - - // Add the main plugin script. - LoadScript( this.Path + 'lang/' + sLang + '.js' ) ; - } - - // Add the main plugin script. - LoadScript( this.Path + 'fckplugin.js' ) ; -} diff --git a/fckeditor/editor/_source/classes/fckspecialcombo.js b/fckeditor/editor/_source/classes/fckspecialcombo.js deleted file mode 100644 index 72263895..00000000 --- a/fckeditor/editor/_source/classes/fckspecialcombo.js +++ /dev/null @@ -1,376 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * FCKSpecialCombo Class: represents a special combo. - */ - -var FCKSpecialCombo = function( caption, fieldWidth, panelWidth, panelMaxHeight, parentWindow ) -{ - // Default properties values. - this.FieldWidth = fieldWidth || 100 ; - this.PanelWidth = panelWidth || 150 ; - this.PanelMaxHeight = panelMaxHeight || 150 ; - this.Label = ' ' ; - this.Caption = caption ; - this.Tooltip = caption ; - this.Style = FCK_TOOLBARITEM_ICONTEXT ; - - this.Enabled = true ; - - this.Items = new Object() ; - - this._Panel = new FCKPanel( parentWindow || window ) ; - this._Panel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; - this._PanelBox = this._Panel.MainNode.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ; - this._PanelBox.className = 'SC_Panel' ; - this._PanelBox.style.width = this.PanelWidth + 'px' ; - - this._PanelBox.innerHTML = '
        ' ; - - this._ItemsHolderEl = this._PanelBox.getElementsByTagName('TD')[0] ; - - if ( FCK.IECleanup ) - FCK.IECleanup.AddItem( this, FCKSpecialCombo_Cleanup ) ; - -// this._Panel.StyleSheet = FCKConfig.SkinPath + 'fck_contextmenu.css' ; -// this._Panel.Create() ; -// this._Panel.PanelDiv.className += ' SC_Panel' ; -// this._Panel.PanelDiv.innerHTML = '
        ' ; -// this._ItemsHolderEl = this._Panel.PanelDiv.getElementsByTagName('TD')[0] ; -} - -function FCKSpecialCombo_ItemOnMouseOver() -{ - this.className += ' SC_ItemOver' ; -} - -function FCKSpecialCombo_ItemOnMouseOut() -{ - this.className = this.originalClass ; -} - -function FCKSpecialCombo_ItemOnClick( ev, specialCombo, itemId ) -{ - this.className = this.originalClass ; - - specialCombo._Panel.Hide() ; - - specialCombo.SetLabel( this.FCKItemLabel ) ; - - if ( typeof( specialCombo.OnSelect ) == 'function' ) - specialCombo.OnSelect( itemId, this ) ; -} - -FCKSpecialCombo.prototype.ClearItems = function () -{ - if ( this.Items ) - this.Items = {} ; - - var itemsholder = this._ItemsHolderEl ; - while ( itemsholder.firstChild ) - itemsholder.removeChild( itemsholder.firstChild ) ; -} - -FCKSpecialCombo.prototype.AddItem = function( id, html, label, bgColor ) -{ - //
        Bold 1
        - var oDiv = this._ItemsHolderEl.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ; - oDiv.className = oDiv.originalClass = 'SC_Item' ; - oDiv.innerHTML = html ; - oDiv.FCKItemLabel = label || id ; - oDiv.Selected = false ; - - // In IE, the width must be set so the borders are shown correctly when the content overflows. - if ( FCKBrowserInfo.IsIE ) - oDiv.style.width = '100%' ; - - if ( bgColor ) - oDiv.style.backgroundColor = bgColor ; - - FCKTools.AddEventListenerEx( oDiv, 'mouseover', FCKSpecialCombo_ItemOnMouseOver ) ; - FCKTools.AddEventListenerEx( oDiv, 'mouseout', FCKSpecialCombo_ItemOnMouseOut ) ; - FCKTools.AddEventListenerEx( oDiv, 'click', FCKSpecialCombo_ItemOnClick, [ this, id ] ) ; - - this.Items[ id.toString().toLowerCase() ] = oDiv ; - - return oDiv ; -} - -FCKSpecialCombo.prototype.SelectItem = function( item ) -{ - if ( typeof item == 'string' ) - item = this.Items[ item.toString().toLowerCase() ] ; - - if ( item ) - { - item.className = item.originalClass = 'SC_ItemSelected' ; - item.Selected = true ; - } -} - -FCKSpecialCombo.prototype.SelectItemByLabel = function( itemLabel, setLabel ) -{ - for ( var id in this.Items ) - { - var oDiv = this.Items[id] ; - - if ( oDiv.FCKItemLabel == itemLabel ) - { - oDiv.className = oDiv.originalClass = 'SC_ItemSelected' ; - oDiv.Selected = true ; - - if ( setLabel ) - this.SetLabel( itemLabel ) ; - } - } -} - -FCKSpecialCombo.prototype.DeselectAll = function( clearLabel ) -{ - for ( var i in this.Items ) - { - if ( !this.Items[i] ) continue; - this.Items[i].className = this.Items[i].originalClass = 'SC_Item' ; - this.Items[i].Selected = false ; - } - - if ( clearLabel ) - this.SetLabel( '' ) ; -} - -FCKSpecialCombo.prototype.SetLabelById = function( id ) -{ - id = id ? id.toString().toLowerCase() : '' ; - - var oDiv = this.Items[ id ] ; - this.SetLabel( oDiv ? oDiv.FCKItemLabel : '' ) ; -} - -FCKSpecialCombo.prototype.SetLabel = function( text ) -{ - text = ( !text || text.length == 0 ) ? ' ' : text ; - - if ( text == this.Label ) - return ; - - this.Label = text ; - - var labelEl = this._LabelEl ; - if ( labelEl ) - { - labelEl.innerHTML = text ; - - // It may happen that the label is some HTML, including tags. This - // would be a problem because when the user click on those tags, the - // combo will get the selection from the editing area. So we must - // disable any kind of selection here. - FCKTools.DisableSelection( labelEl ) ; - } -} - -FCKSpecialCombo.prototype.SetEnabled = function( isEnabled ) -{ - this.Enabled = isEnabled ; - - // In IE it can happen when the page is reloaded that _OuterTable is null, so check its existence - if ( this._OuterTable ) - this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ; -} - -FCKSpecialCombo.prototype.Create = function( targetElement ) -{ - var oDoc = FCKTools.GetElementDocument( targetElement ) ; - var eOuterTable = this._OuterTable = targetElement.appendChild( oDoc.createElement( 'TABLE' ) ) ; - eOuterTable.cellPadding = 0 ; - eOuterTable.cellSpacing = 0 ; - - eOuterTable.insertRow(-1) ; - - var sClass ; - var bShowLabel ; - - switch ( this.Style ) - { - case FCK_TOOLBARITEM_ONLYICON : - sClass = 'TB_ButtonType_Icon' ; - bShowLabel = false; - break ; - case FCK_TOOLBARITEM_ONLYTEXT : - sClass = 'TB_ButtonType_Text' ; - bShowLabel = false; - break ; - case FCK_TOOLBARITEM_ICONTEXT : - bShowLabel = true; - break ; - } - - if ( this.Caption && this.Caption.length > 0 && bShowLabel ) - { - var oCaptionCell = eOuterTable.rows[0].insertCell(-1) ; - oCaptionCell.innerHTML = this.Caption ; - oCaptionCell.className = 'SC_FieldCaption' ; - } - - // Create the main DIV element. - var oField = FCKTools.AppendElement( eOuterTable.rows[0].insertCell(-1), 'div' ) ; - if ( bShowLabel ) - { - oField.className = 'SC_Field' ; - oField.style.width = this.FieldWidth + 'px' ; - oField.innerHTML = '
         
        ' ; - - this._LabelEl = oField.getElementsByTagName('label')[0] ; // Memory Leak - this._LabelEl.innerHTML = this.Label ; - } - else - { - oField.className = 'TB_Button_Off' ; - //oField.innerHTML = '' + this.Caption + '
         
        ' ; - //oField.innerHTML = '
         
        ' ; - - // Gets the correct CSS class to use for the specified style (param). - oField.innerHTML = '' + - '' + - //'' + - '' + - '' + - '' + - '' + - '' + - '' + - '
        ' + this.Caption + '
        ' ; - } - - - // Events Handlers - - FCKTools.AddEventListenerEx( oField, 'mouseover', FCKSpecialCombo_OnMouseOver, this ) ; - FCKTools.AddEventListenerEx( oField, 'mouseout', FCKSpecialCombo_OnMouseOut, this ) ; - FCKTools.AddEventListenerEx( oField, 'click', FCKSpecialCombo_OnClick, this ) ; - - FCKTools.DisableSelection( this._Panel.Document.body ) ; -} - -function FCKSpecialCombo_Cleanup() -{ - this._LabelEl = null ; - this._OuterTable = null ; - this._ItemsHolderEl = null ; - this._PanelBox = null ; - - if ( this.Items ) - { - for ( var key in this.Items ) - this.Items[key] = null ; - } -} - -function FCKSpecialCombo_OnMouseOver( ev, specialCombo ) -{ - if ( specialCombo.Enabled ) - { - switch ( specialCombo.Style ) - { - case FCK_TOOLBARITEM_ONLYICON : - this.className = 'TB_Button_On_Over'; - break ; - case FCK_TOOLBARITEM_ONLYTEXT : - this.className = 'TB_Button_On_Over'; - break ; - case FCK_TOOLBARITEM_ICONTEXT : - this.className = 'SC_Field SC_FieldOver' ; - break ; - } - } -} - -function FCKSpecialCombo_OnMouseOut( ev, specialCombo ) -{ - switch ( specialCombo.Style ) - { - case FCK_TOOLBARITEM_ONLYICON : - this.className = 'TB_Button_Off'; - break ; - case FCK_TOOLBARITEM_ONLYTEXT : - this.className = 'TB_Button_Off'; - break ; - case FCK_TOOLBARITEM_ICONTEXT : - this.className='SC_Field' ; - break ; - } -} - -function FCKSpecialCombo_OnClick( e, specialCombo ) -{ - // For Mozilla we must stop the event propagation to avoid it hiding - // the panel because of a click outside of it. -// if ( e ) -// { -// e.stopPropagation() ; -// FCKPanelEventHandlers.OnDocumentClick( e ) ; -// } - - if ( specialCombo.Enabled ) - { - var oPanel = specialCombo._Panel ; - var oPanelBox = specialCombo._PanelBox ; - var oItemsHolder = specialCombo._ItemsHolderEl ; - var iMaxHeight = specialCombo.PanelMaxHeight ; - - if ( specialCombo.OnBeforeClick ) - specialCombo.OnBeforeClick( specialCombo ) ; - - // This is a tricky thing. We must call the "Load" function, otherwise - // it will not be possible to retrieve "oItemsHolder.offsetHeight" (IE only). - if ( FCKBrowserInfo.IsIE ) - oPanel.Preload( 0, this.offsetHeight, this ) ; - - if ( oItemsHolder.offsetHeight > iMaxHeight ) -// { - oPanelBox.style.height = iMaxHeight + 'px' ; - -// if ( FCKBrowserInfo.IsGecko ) -// oPanelBox.style.overflow = '-moz-scrollbars-vertical' ; -// } - else - oPanelBox.style.height = '' ; - -// oPanel.PanelDiv.style.width = specialCombo.PanelWidth + 'px' ; - - oPanel.Show( 0, this.offsetHeight, this ) ; - } - -// return false ; -} - -/* -Sample Combo Field HTML output: - -
        - - - - - - - -
         
        -
        -*/ diff --git a/fckeditor/editor/_source/classes/fckstyle.js b/fckeditor/editor/_source/classes/fckstyle.js deleted file mode 100644 index 756fd678..00000000 --- a/fckeditor/editor/_source/classes/fckstyle.js +++ /dev/null @@ -1,1500 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * FCKStyle Class: contains a style definition, and all methods to work with - * the style in a document. - */ - -/** - * @param {Object} styleDesc A "style descriptor" object, containing the raw - * style definition in the following format: - * '' ; - FCK._BehaviorsStyle = sStyle ; - } - - return FCK._BehaviorsStyle ; -} - -function Doc_OnMouseUp() -{ - if ( FCK.EditorWindow.event.srcElement.tagName == 'HTML' ) - { - FCK.Focus() ; - FCK.EditorWindow.event.cancelBubble = true ; - FCK.EditorWindow.event.returnValue = false ; - } -} - -function Doc_OnPaste() -{ - var body = FCK.EditorDocument.body ; - - body.detachEvent( 'onpaste', Doc_OnPaste ) ; - - var ret = FCK.Paste( !FCKConfig.ForcePasteAsPlainText && !FCKConfig.AutoDetectPasteFromWord ) ; - - body.attachEvent( 'onpaste', Doc_OnPaste ) ; - - return ret ; -} - -function Doc_OnDblClick() -{ - FCK.OnDoubleClick( FCK.EditorWindow.event.srcElement ) ; - FCK.EditorWindow.event.cancelBubble = true ; -} - -function Doc_OnSelectionChange() -{ - // Don't fire the event if no document is loaded. - if ( !FCK.IsSelectionChangeLocked && FCK.EditorDocument ) - FCK.Events.FireEvent( "OnSelectionChange" ) ; -} - -function Doc_OnDrop() -{ - if ( FCK.MouseDownFlag ) - { - FCK.MouseDownFlag = false ; - return ; - } - - if ( FCKConfig.ForcePasteAsPlainText ) - { - var evt = FCK.EditorWindow.event ; - - if ( FCK._CheckIsPastingEnabled() || FCKConfig.ShowDropDialog ) - FCK.PasteAsPlainText( evt.dataTransfer.getData( 'Text' ) ) ; - - evt.returnValue = false ; - evt.cancelBubble = true ; - } -} - -FCK.InitializeBehaviors = function( dontReturn ) -{ - // Set the focus to the editable area when clicking in the document area. - // TODO: The cursor must be positioned at the end. - this.EditorDocument.attachEvent( 'onmouseup', Doc_OnMouseUp ) ; - - // Intercept pasting operations - this.EditorDocument.body.attachEvent( 'onpaste', Doc_OnPaste ) ; - - // Intercept drop operations - this.EditorDocument.body.attachEvent( 'ondrop', Doc_OnDrop ) ; - - // Reset the context menu. - FCK.ContextMenu._InnerContextMenu.AttachToElement( FCK.EditorDocument.body ) ; - - this.EditorDocument.attachEvent("onkeydown", FCK._KeyDownListener ) ; - - this.EditorDocument.attachEvent("ondblclick", Doc_OnDblClick ) ; - - this.EditorDocument.attachEvent("onbeforedeactivate", function(){ FCKSelection.Save( true ) ; } ) ; - - // Catch cursor selection changes. - this.EditorDocument.attachEvent("onselectionchange", Doc_OnSelectionChange ) ; - - FCKTools.AddEventListener( FCK.EditorDocument, 'mousedown', Doc_OnMouseDown ) ; -} - -FCK.InsertHtml = function( html ) -{ - html = FCKConfig.ProtectedSource.Protect( html ) ; - html = FCK.ProtectEvents( html ) ; - html = FCK.ProtectUrls( html ) ; - html = FCK.ProtectTags( html ) ; - -// FCK.Focus() ; - FCKSelection.Restore() ; - FCK.EditorWindow.focus() ; - - FCKUndo.SaveUndoStep() ; - - // Gets the actual selection. - var oSel = FCKSelection.GetSelection() ; - - // Deletes the actual selection contents. - if ( oSel.type.toLowerCase() == 'control' ) - oSel.clear() ; - - // Using the following trick, any comment in the beginning of the HTML will - // be preserved. - html = '' + html ; - - // Insert the HTML. - oSel.createRange().pasteHTML( html ) ; - - // Remove the fake node - FCK.EditorDocument.getElementById('__fakeFCKRemove__').removeNode( true ) ; - - FCKDocumentProcessor.Process( FCK.EditorDocument ) ; - - // For some strange reason the SaveUndoStep() call doesn't activate the undo button at the first InsertHtml() call. - this.Events.FireEvent( "OnSelectionChange" ) ; -} - -FCK.SetInnerHtml = function( html ) // IE Only -{ - var oDoc = FCK.EditorDocument ; - // Using the following trick, any comment in the beginning of the HTML will - // be preserved. - oDoc.body.innerHTML = '
         
        ' + html ; - oDoc.getElementById('__fakeFCKRemove__').removeNode( true ) ; -} - -function FCK_PreloadImages() -{ - var oPreloader = new FCKImagePreloader() ; - - // Add the configured images. - oPreloader.AddImages( FCKConfig.PreloadImages ) ; - - // Add the skin icons strip. - oPreloader.AddImages( FCKConfig.SkinPath + 'fck_strip.gif' ) ; - - oPreloader.OnComplete = LoadToolbarSetup ; - oPreloader.Start() ; -} - -// Disable the context menu in the editor (outside the editing area). -function Document_OnContextMenu() -{ - return ( event.srcElement._FCKShowContextMenu == true ) ; -} -document.oncontextmenu = Document_OnContextMenu ; - -function FCK_Cleanup() -{ - this.LinkedField = null ; - this.EditorWindow = null ; - this.EditorDocument = null ; -} - -FCK._ExecPaste = function() -{ - // As we call ExecuteNamedCommand('Paste'), it would enter in a loop. So, let's use a semaphore. - if ( FCK._PasteIsRunning ) - return true ; - - if ( FCKConfig.ForcePasteAsPlainText ) - { - FCK.PasteAsPlainText() ; - return false ; - } - - var sHTML = FCK._CheckIsPastingEnabled( true ) ; - - if ( sHTML === false ) - FCKTools.RunFunction( FCKDialog.OpenDialog, FCKDialog, ['FCKDialog_Paste', FCKLang.Paste, 'dialog/fck_paste.html', 400, 330, 'Security'] ) ; - else - { - if ( FCKConfig.AutoDetectPasteFromWord && sHTML.length > 0 ) - { - var re = /<\w[^>]*(( class="?MsoNormal"?)|(="mso-))/gi ; - if ( re.test( sHTML ) ) - { - if ( confirm( FCKLang.PasteWordConfirm ) ) - { - FCK.PasteFromWord() ; - return false ; - } - } - } - - // Instead of inserting the retrieved HTML, let's leave the OS work for us, - // by calling FCK.ExecuteNamedCommand( 'Paste' ). It could give better results. - - // Enable the semaphore to avoid a loop. - FCK._PasteIsRunning = true ; - - FCK.ExecuteNamedCommand( 'Paste' ) ; - - // Removes the semaphore. - delete FCK._PasteIsRunning ; - } - - // Let's always make a custom implementation (return false), otherwise - // the new Keyboard Handler may conflict with this code, and the CTRL+V code - // could result in a simple "V" being pasted. - return false ; -} - -FCK.PasteAsPlainText = function( forceText ) -{ - if ( !FCK._CheckIsPastingEnabled() ) - { - FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.PasteAsText, 'dialog/fck_paste.html', 400, 330, 'PlainText' ) ; - return ; - } - - // Get the data available in the clipboard in text format. - var sText = null ; - if ( ! forceText ) - sText = clipboardData.getData("Text") ; - else - sText = forceText ; - - if ( sText && sText.length > 0 ) - { - // Replace the carriage returns with
        - sText = FCKTools.HTMLEncode( sText ) ; - sText = FCKTools.ProcessLineBreaks( window, FCKConfig, sText ) ; - - var closeTagIndex = sText.search( '

        ' ) ; - var startTagIndex = sText.search( '

        ' ) ; - - if ( ( closeTagIndex != -1 && startTagIndex != -1 && closeTagIndex < startTagIndex ) - || ( closeTagIndex != -1 && startTagIndex == -1 ) ) - { - var prefix = sText.substr( 0, closeTagIndex ) ; - sText = sText.substr( closeTagIndex + 4 ) ; - this.InsertHtml( prefix ) ; - } - - // Insert the resulting data in the editor. - FCKUndo.SaveLocked = true ; - this.InsertHtml( sText ) ; - FCKUndo.SaveLocked = false ; - } -} - -FCK._CheckIsPastingEnabled = function( returnContents ) -{ - // The following seams to be the only reliable way to check is script - // pasting operations are enabled in the security settings of IE6 and IE7. - // It adds a little bit of overhead to the check, but so far that's the - // only way, mainly because of IE7. - - FCK._PasteIsEnabled = false ; - - document.body.attachEvent( 'onpaste', FCK_CheckPasting_Listener ) ; - - // The execCommand in GetClipboardHTML will fire the "onpaste", only if the - // security settings are enabled. - var oReturn = FCK.GetClipboardHTML() ; - - document.body.detachEvent( 'onpaste', FCK_CheckPasting_Listener ) ; - - if ( FCK._PasteIsEnabled ) - { - if ( !returnContents ) - oReturn = true ; - } - else - oReturn = false ; - - delete FCK._PasteIsEnabled ; - - return oReturn ; -} - -function FCK_CheckPasting_Listener() -{ - FCK._PasteIsEnabled = true ; -} - -FCK.GetClipboardHTML = function() -{ - var oDiv = document.getElementById( '___FCKHiddenDiv' ) ; - - if ( !oDiv ) - { - oDiv = document.createElement( 'DIV' ) ; - oDiv.id = '___FCKHiddenDiv' ; - - var oDivStyle = oDiv.style ; - oDivStyle.position = 'absolute' ; - oDivStyle.visibility = oDivStyle.overflow = 'hidden' ; - oDivStyle.width = oDivStyle.height = 1 ; - - document.body.appendChild( oDiv ) ; - } - - oDiv.innerHTML = '' ; - - var oTextRange = document.body.createTextRange() ; - oTextRange.moveToElementText( oDiv ) ; - oTextRange.execCommand( 'Paste' ) ; - - var sData = oDiv.innerHTML ; - oDiv.innerHTML = '' ; - - return sData ; -} - -FCK.CreateLink = function( url, noUndo ) -{ - // Creates the array that will be returned. It contains one or more created links (see #220). - var aCreatedLinks = new Array() ; - - // Remove any existing link in the selection. - FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ; - - if ( url.length > 0 ) - { - // If there are several images, and you try to link each one, all the images get inside the link: - // -> -> due to the call to 'CreateLink' (bug in IE) - if (FCKSelection.GetType() == 'Control') - { - // Create a link - var oLink = this.EditorDocument.createElement( 'A' ) ; - oLink.href = url ; - - // Get the selected object - var oControl = FCKSelection.GetSelectedElement() ; - // Put the link just before the object - oControl.parentNode.insertBefore(oLink, oControl) ; - // Move the object inside the link - oControl.parentNode.removeChild( oControl ) ; - oLink.appendChild( oControl ) ; - - return [ oLink ] ; - } - - // Generate a temporary name for the link. - var sTempUrl = 'javascript:void(0);/*' + ( new Date().getTime() ) + '*/' ; - - // Use the internal "CreateLink" command to create the link. - FCK.ExecuteNamedCommand( 'CreateLink', sTempUrl, false, !!noUndo ) ; - - // Look for the just create link. - var oLinks = this.EditorDocument.links ; - - for ( i = 0 ; i < oLinks.length ; i++ ) - { - var oLink = oLinks[i] ; - - // Check it this a newly created link. - // getAttribute must be used. oLink.url may cause problems with IE7 (#555). - if ( oLink.getAttribute( 'href', 2 ) == sTempUrl ) - { - var sInnerHtml = oLink.innerHTML ; // Save the innerHTML (IE changes it if it is like an URL). - oLink.href = url ; - oLink.innerHTML = sInnerHtml ; // Restore the innerHTML. - - // If the last child is a
        move it outside the link or it - // will be too easy to select this link again #388. - var oLastChild = oLink.lastChild ; - if ( oLastChild && oLastChild.nodeName == 'BR' ) - { - // Move the BR after the link. - FCKDomTools.InsertAfterNode( oLink, oLink.removeChild( oLastChild ) ) ; - } - - aCreatedLinks.push( oLink ) ; - } - } - } - - return aCreatedLinks ; -} - -function _FCK_RemoveDisabledAtt() -{ - this.removeAttribute( 'disabled' ) ; -} - -function Doc_OnMouseDown( evt ) -{ - var e = evt.srcElement ; - - // Radio buttons and checkboxes should not be allowed to be triggered in IE - // in editable mode. Otherwise the whole browser window may be locked by - // the buttons. (#1782) - if ( e.nodeName.IEquals( 'input' ) && e.type.IEquals( ['radio', 'checkbox'] ) && !e.disabled ) - { - e.disabled = true ; - FCKTools.SetTimeout( _FCK_RemoveDisabledAtt, 1, e ) ; - } -} diff --git a/fckeditor/editor/_source/internals/fckbrowserinfo.js b/fckeditor/editor/_source/internals/fckbrowserinfo.js deleted file mode 100644 index d600ced9..00000000 --- a/fckeditor/editor/_source/internals/fckbrowserinfo.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Contains browser detection information. - */ - -var s = navigator.userAgent.toLowerCase() ; - -var FCKBrowserInfo = -{ - IsIE : /*@cc_on!@*/false, - IsIE7 : /*@cc_on!@*/false && ( parseInt( s.match( /msie (\d+)/ )[1], 10 ) >= 7 ), - IsIE6 : /*@cc_on!@*/false && ( parseInt( s.match( /msie (\d+)/ )[1], 10 ) >= 6 ), - IsSafari : s.Contains(' applewebkit/'), // Read "IsWebKit" - IsOpera : !!window.opera, - IsAIR : s.Contains(' adobeair/'), - IsMac : s.Contains('macintosh') -} ; - -// Completes the browser info with further Gecko information. -(function( browserInfo ) -{ - browserInfo.IsGecko = ( navigator.product == 'Gecko' ) && !browserInfo.IsSafari && !browserInfo.IsOpera ; - browserInfo.IsGeckoLike = ( browserInfo.IsGecko || browserInfo.IsSafari || browserInfo.IsOpera ) ; - - if ( browserInfo.IsGecko ) - { - var geckoMatch = s.match( /rv:(\d+\.\d+)/ ) ; - var geckoVersion = geckoMatch && parseFloat( geckoMatch[1] ) ; - - // Actually "10" refers to Gecko versions before Firefox 1.5, when - // Gecko 1.8 (build 20051111) has been released. - - // Some browser (like Mozilla 1.7.13) may have a Gecko build greater - // than 20051111, so we must also check for the revision number not to - // be 1.7 (we are assuming that rv < 1.7 will not have build > 20051111). - - if ( geckoVersion ) - { - browserInfo.IsGecko10 = ( geckoVersion < 1.8 ) ; - browserInfo.IsGecko19 = ( geckoVersion > 1.8 ) ; - } - } -})(FCKBrowserInfo) ; diff --git a/fckeditor/editor/_source/internals/fckcodeformatter.js b/fckeditor/editor/_source/internals/fckcodeformatter.js deleted file mode 100644 index 8a7f1526..00000000 --- a/fckeditor/editor/_source/internals/fckcodeformatter.js +++ /dev/null @@ -1,100 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Format the HTML. - */ - -var FCKCodeFormatter = new Object() ; - -FCKCodeFormatter.Init = function() -{ - var oRegex = this.Regex = new Object() ; - - // Regex for line breaks. - oRegex.BlocksOpener = /\<(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi ; - oRegex.BlocksCloser = /\<\/(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi ; - - oRegex.NewLineTags = /\<(BR|HR)[^\>]*\>/gi ; - - oRegex.MainTags = /\<\/?(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR)[^\>]*\>/gi ; - - oRegex.LineSplitter = /\s*\n+\s*/g ; - - // Regex for indentation. - oRegex.IncreaseIndent = /^\<(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \/\>]/i ; - oRegex.DecreaseIndent = /^\<\/(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \>]/i ; - oRegex.FormatIndentatorRemove = new RegExp( '^' + FCKConfig.FormatIndentator ) ; - - oRegex.ProtectedTags = /(]*>)([\s\S]*?)(<\/PRE>)/gi ; -} - -FCKCodeFormatter._ProtectData = function( outer, opener, data, closer ) -{ - return opener + '___FCKpd___' + FCKCodeFormatter.ProtectedData.AddItem( data ) + closer ; -} - -FCKCodeFormatter.Format = function( html ) -{ - if ( !this.Regex ) - this.Init() ; - - // Protected content that remain untouched during the - // process go in the following array. - FCKCodeFormatter.ProtectedData = new Array() ; - - var sFormatted = html.replace( this.Regex.ProtectedTags, FCKCodeFormatter._ProtectData ) ; - - // Line breaks. - sFormatted = sFormatted.replace( this.Regex.BlocksOpener, '\n$&' ) ; - sFormatted = sFormatted.replace( this.Regex.BlocksCloser, '$&\n' ) ; - sFormatted = sFormatted.replace( this.Regex.NewLineTags, '$&\n' ) ; - sFormatted = sFormatted.replace( this.Regex.MainTags, '\n$&\n' ) ; - - // Indentation. - var sIndentation = '' ; - - var asLines = sFormatted.split( this.Regex.LineSplitter ) ; - sFormatted = '' ; - - for ( var i = 0 ; i < asLines.length ; i++ ) - { - var sLine = asLines[i] ; - - if ( sLine.length == 0 ) - continue ; - - if ( this.Regex.DecreaseIndent.test( sLine ) ) - sIndentation = sIndentation.replace( this.Regex.FormatIndentatorRemove, '' ) ; - - sFormatted += sIndentation + sLine + '\n' ; - - if ( this.Regex.IncreaseIndent.test( sLine ) ) - sIndentation += FCKConfig.FormatIndentator ; - } - - // Now we put back the protected data. - for ( var j = 0 ; j < FCKCodeFormatter.ProtectedData.length ; j++ ) - { - var oRegex = new RegExp( '___FCKpd___' + j ) ; - sFormatted = sFormatted.replace( oRegex, FCKCodeFormatter.ProtectedData[j].replace( /\$/g, '$$$$' ) ) ; - } - - return sFormatted.Trim() ; -} diff --git a/fckeditor/editor/_source/internals/fckcommands.js b/fckeditor/editor/_source/internals/fckcommands.js deleted file mode 100644 index aca20374..00000000 --- a/fckeditor/editor/_source/internals/fckcommands.js +++ /dev/null @@ -1,172 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Define all commands available in the editor. - */ - -var FCKCommands = FCK.Commands = new Object() ; -FCKCommands.LoadedCommands = new Object() ; - -FCKCommands.RegisterCommand = function( commandName, command ) -{ - this.LoadedCommands[ commandName ] = command ; -} - -FCKCommands.GetCommand = function( commandName ) -{ - var oCommand = FCKCommands.LoadedCommands[ commandName ] ; - - if ( oCommand ) - return oCommand ; - - switch ( commandName ) - { - case 'Bold' : - case 'Italic' : - case 'Underline' : - case 'StrikeThrough': - case 'Subscript' : - case 'Superscript' : oCommand = new FCKCoreStyleCommand( commandName ) ; break ; - - case 'RemoveFormat' : oCommand = new FCKRemoveFormatCommand() ; break ; - - case 'DocProps' : oCommand = new FCKDialogCommand( 'DocProps' , FCKLang.DocProps , 'dialog/fck_docprops.html' , 400, 380, FCKCommands.GetFullPageState ) ; break ; - case 'Templates' : oCommand = new FCKDialogCommand( 'Templates' , FCKLang.DlgTemplatesTitle , 'dialog/fck_template.html' , 380, 450 ) ; break ; - case 'Link' : oCommand = new FCKDialogCommand( 'Link' , FCKLang.DlgLnkWindowTitle , 'dialog/fck_link.html' , 400, 300 ) ; break ; - case 'Unlink' : oCommand = new FCKUnlinkCommand() ; break ; - case 'VisitLink' : oCommand = new FCKVisitLinkCommand() ; break ; - case 'Anchor' : oCommand = new FCKDialogCommand( 'Anchor' , FCKLang.DlgAnchorTitle , 'dialog/fck_anchor.html' , 370, 160 ) ; break ; - case 'AnchorDelete' : oCommand = new FCKAnchorDeleteCommand() ; break ; - case 'BulletedList' : oCommand = new FCKDialogCommand( 'BulletedList', FCKLang.BulletedListProp , 'dialog/fck_listprop.html?UL' , 370, 160 ) ; break ; - case 'NumberedList' : oCommand = new FCKDialogCommand( 'NumberedList', FCKLang.NumberedListProp , 'dialog/fck_listprop.html?OL' , 370, 160 ) ; break ; - case 'About' : oCommand = new FCKDialogCommand( 'About' , FCKLang.About , 'dialog/fck_about.html' , 420, 330, function(){ return FCK_TRISTATE_OFF ; } ) ; break ; - case 'Find' : oCommand = new FCKDialogCommand( 'Find' , FCKLang.DlgFindAndReplaceTitle, 'dialog/fck_replace.html' , 340, 230, null, null, 'Find' ) ; break ; - case 'Replace' : oCommand = new FCKDialogCommand( 'Replace' , FCKLang.DlgFindAndReplaceTitle, 'dialog/fck_replace.html' , 340, 230, null, null, 'Replace' ) ; break ; - - case 'Image' : oCommand = new FCKDialogCommand( 'Image' , FCKLang.DlgImgTitle , 'dialog/fck_image.html' , 450, 390 ) ; break ; - case 'Flash' : oCommand = new FCKDialogCommand( 'Flash' , FCKLang.DlgFlashTitle , 'dialog/fck_flash.html' , 450, 390 ) ; break ; - case 'SpecialChar' : oCommand = new FCKDialogCommand( 'SpecialChar', FCKLang.DlgSpecialCharTitle , 'dialog/fck_specialchar.html' , 400, 290 ) ; break ; - case 'Smiley' : oCommand = new FCKDialogCommand( 'Smiley' , FCKLang.DlgSmileyTitle , 'dialog/fck_smiley.html' , FCKConfig.SmileyWindowWidth, FCKConfig.SmileyWindowHeight ) ; break ; - case 'Table' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html' , 480, 250 ) ; break ; - case 'TableProp' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html?Parent', 480, 250 ) ; break ; - case 'TableCellProp': oCommand = new FCKDialogCommand( 'TableCell' , FCKLang.DlgCellTitle , 'dialog/fck_tablecell.html' , 550, 240 ) ; break ; - - case 'Style' : oCommand = new FCKStyleCommand() ; break ; - - case 'FontName' : oCommand = new FCKFontNameCommand() ; break ; - case 'FontSize' : oCommand = new FCKFontSizeCommand() ; break ; - case 'FontFormat' : oCommand = new FCKFormatBlockCommand() ; break ; - - case 'Source' : oCommand = new FCKSourceCommand() ; break ; - case 'Preview' : oCommand = new FCKPreviewCommand() ; break ; - case 'Save' : oCommand = new FCKSaveCommand() ; break ; - case 'NewPage' : oCommand = new FCKNewPageCommand() ; break ; - case 'PageBreak' : oCommand = new FCKPageBreakCommand() ; break ; - case 'Rule' : oCommand = new FCKRuleCommand() ; break ; - case 'Nbsp' : oCommand = new FCKNbsp() ; break ; - - case 'TextColor' : oCommand = new FCKTextColorCommand('ForeColor') ; break ; - case 'BGColor' : oCommand = new FCKTextColorCommand('BackColor') ; break ; - - case 'Paste' : oCommand = new FCKPasteCommand() ; break ; - case 'PasteText' : oCommand = new FCKPastePlainTextCommand() ; break ; - case 'PasteWord' : oCommand = new FCKPasteWordCommand() ; break ; - - case 'JustifyLeft' : oCommand = new FCKJustifyCommand( 'left' ) ; break ; - case 'JustifyCenter' : oCommand = new FCKJustifyCommand( 'center' ) ; break ; - case 'JustifyRight' : oCommand = new FCKJustifyCommand( 'right' ) ; break ; - case 'JustifyFull' : oCommand = new FCKJustifyCommand( 'justify' ) ; break ; - case 'Indent' : oCommand = new FCKIndentCommand( 'indent', FCKConfig.IndentLength ) ; break ; - case 'Outdent' : oCommand = new FCKIndentCommand( 'outdent', FCKConfig.IndentLength * -1 ) ; break ; - case 'Blockquote' : oCommand = new FCKBlockQuoteCommand() ; break ; - case 'CreateDiv' : oCommand = new FCKDialogCommand( 'CreateDiv', FCKLang.CreateDiv, 'dialog/fck_div.html', 380, 210, null, null, true ) ; break ; - case 'EditDiv' : oCommand = new FCKDialogCommand( 'EditDiv', FCKLang.EditDiv, 'dialog/fck_div.html', 380, 210, null, null, false ) ; break ; - case 'DeleteDiv' : oCommand = new FCKDeleteDivCommand() ; break ; - - case 'TableInsertRowAfter' : oCommand = new FCKTableCommand('TableInsertRowAfter') ; break ; - case 'TableInsertRowBefore' : oCommand = new FCKTableCommand('TableInsertRowBefore') ; break ; - case 'TableDeleteRows' : oCommand = new FCKTableCommand('TableDeleteRows') ; break ; - case 'TableInsertColumnAfter' : oCommand = new FCKTableCommand('TableInsertColumnAfter') ; break ; - case 'TableInsertColumnBefore' : oCommand = new FCKTableCommand('TableInsertColumnBefore') ; break ; - case 'TableDeleteColumns' : oCommand = new FCKTableCommand('TableDeleteColumns') ; break ; - case 'TableInsertCellAfter' : oCommand = new FCKTableCommand('TableInsertCellAfter') ; break ; - case 'TableInsertCellBefore' : oCommand = new FCKTableCommand('TableInsertCellBefore') ; break ; - case 'TableDeleteCells' : oCommand = new FCKTableCommand('TableDeleteCells') ; break ; - case 'TableMergeCells' : oCommand = new FCKTableCommand('TableMergeCells') ; break ; - case 'TableMergeRight' : oCommand = new FCKTableCommand('TableMergeRight') ; break ; - case 'TableMergeDown' : oCommand = new FCKTableCommand('TableMergeDown') ; break ; - case 'TableHorizontalSplitCell' : oCommand = new FCKTableCommand('TableHorizontalSplitCell') ; break ; - case 'TableVerticalSplitCell' : oCommand = new FCKTableCommand('TableVerticalSplitCell') ; break ; - case 'TableDelete' : oCommand = new FCKTableCommand('TableDelete') ; break ; - - case 'Form' : oCommand = new FCKDialogCommand( 'Form' , FCKLang.Form , 'dialog/fck_form.html' , 380, 210 ) ; break ; - case 'Checkbox' : oCommand = new FCKDialogCommand( 'Checkbox' , FCKLang.Checkbox , 'dialog/fck_checkbox.html' , 380, 200 ) ; break ; - case 'Radio' : oCommand = new FCKDialogCommand( 'Radio' , FCKLang.RadioButton , 'dialog/fck_radiobutton.html' , 380, 200 ) ; break ; - case 'TextField' : oCommand = new FCKDialogCommand( 'TextField' , FCKLang.TextField , 'dialog/fck_textfield.html' , 380, 210 ) ; break ; - case 'Textarea' : oCommand = new FCKDialogCommand( 'Textarea' , FCKLang.Textarea , 'dialog/fck_textarea.html' , 380, 210 ) ; break ; - case 'HiddenField' : oCommand = new FCKDialogCommand( 'HiddenField', FCKLang.HiddenField , 'dialog/fck_hiddenfield.html' , 380, 190 ) ; break ; - case 'Button' : oCommand = new FCKDialogCommand( 'Button' , FCKLang.Button , 'dialog/fck_button.html' , 380, 210 ) ; break ; - case 'Select' : oCommand = new FCKDialogCommand( 'Select' , FCKLang.SelectionField, 'dialog/fck_select.html' , 400, 340 ) ; break ; - case 'ImageButton' : oCommand = new FCKDialogCommand( 'ImageButton', FCKLang.ImageButton , 'dialog/fck_image.html?ImageButton', 450, 390 ) ; break ; - - case 'SpellCheck' : oCommand = new FCKSpellCheckCommand() ; break ; - case 'FitWindow' : oCommand = new FCKFitWindow() ; break ; - - case 'Undo' : oCommand = new FCKUndoCommand() ; break ; - case 'Redo' : oCommand = new FCKRedoCommand() ; break ; - case 'Copy' : oCommand = new FCKCutCopyCommand( false ) ; break ; - case 'Cut' : oCommand = new FCKCutCopyCommand( true ) ; break ; - - case 'SelectAll' : oCommand = new FCKSelectAllCommand() ; break ; - case 'InsertOrderedList' : oCommand = new FCKListCommand( 'insertorderedlist', 'ol' ) ; break ; - case 'InsertUnorderedList' : oCommand = new FCKListCommand( 'insertunorderedlist', 'ul' ) ; break ; - case 'ShowBlocks' : oCommand = new FCKShowBlockCommand( 'ShowBlocks', FCKConfig.StartupShowBlocks ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ) ; break ; - - // Generic Undefined command (usually used when a command is under development). - case 'Undefined' : oCommand = new FCKUndefinedCommand() ; break ; - - // By default we assume that it is a named command. - default: - if ( FCKRegexLib.NamedCommands.test( commandName ) ) - oCommand = new FCKNamedCommand( commandName ) ; - else - { - alert( FCKLang.UnknownCommand.replace( /%1/g, commandName ) ) ; - return null ; - } - } - - FCKCommands.LoadedCommands[ commandName ] = oCommand ; - - return oCommand ; -} - -// Gets the state of the "Document Properties" button. It must be enabled only -// when "Full Page" editing is available. -FCKCommands.GetFullPageState = function() -{ - return FCKConfig.FullPage ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; -} - - -FCKCommands.GetBooleanState = function( isDisabled ) -{ - return isDisabled ? FCK_TRISTATE_DISABLED : FCK_TRISTATE_OFF ; -} diff --git a/fckeditor/editor/_source/internals/fckconfig.js b/fckeditor/editor/_source/internals/fckconfig.js deleted file mode 100644 index adcbacb5..00000000 --- a/fckeditor/editor/_source/internals/fckconfig.js +++ /dev/null @@ -1,237 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Creates and initializes the FCKConfig object. - */ - -var FCKConfig = FCK.Config = new Object() ; - -/* - For the next major version (probably 3.0) we should move all this stuff to - another dedicated object and leave FCKConfig as a holder object for settings only). -*/ - -// Editor Base Path -if ( document.location.protocol == 'file:' ) -{ - FCKConfig.BasePath = decodeURIComponent( document.location.pathname.substr(1) ) ; - FCKConfig.BasePath = FCKConfig.BasePath.replace( /\\/gi, '/' ) ; - - // The way to address local files is different according to the OS. - // In Windows it is file:// but in MacOs it is file:/// so let's get it automatically - var sFullProtocol = document.location.href.match( /^(file\:\/{2,3})/ )[1] ; - // #945 Opera does strange things with files loaded from the disk, and it fails in Mac to load xml files - if ( FCKBrowserInfo.IsOpera ) - sFullProtocol += 'localhost/' ; - - FCKConfig.BasePath = sFullProtocol + FCKConfig.BasePath.substring( 0, FCKConfig.BasePath.lastIndexOf( '/' ) + 1) ; -} -else - FCKConfig.BasePath = document.location.protocol + '//' + document.location.host + - document.location.pathname.substring( 0, document.location.pathname.lastIndexOf( '/' ) + 1) ; - -FCKConfig.FullBasePath = FCKConfig.BasePath ; - -FCKConfig.EditorPath = FCKConfig.BasePath.replace( /editor\/$/, '' ) ; - -// There is a bug in Gecko. If the editor is hidden on startup, an error is -// thrown when trying to get the screen dimensions. -try -{ - FCKConfig.ScreenWidth = screen.width ; - FCKConfig.ScreenHeight = screen.height ; -} -catch (e) -{ - FCKConfig.ScreenWidth = 800 ; - FCKConfig.ScreenHeight = 600 ; -} - -// Override the actual configuration values with the values passed throw the -// hidden field "___Config". -FCKConfig.ProcessHiddenField = function() -{ - this.PageConfig = new Object() ; - - // Get the hidden field. - var oConfigField = window.parent.document.getElementById( FCK.Name + '___Config' ) ; - - // Do nothing if the config field was not defined. - if ( ! oConfigField ) return ; - - var aCouples = oConfigField.value.split('&') ; - - for ( var i = 0 ; i < aCouples.length ; i++ ) - { - if ( aCouples[i].length == 0 ) - continue ; - - var aConfig = aCouples[i].split( '=' ) ; - var sKey = decodeURIComponent( aConfig[0] ) ; - var sVal = decodeURIComponent( aConfig[1] ) ; - - if ( sKey == 'CustomConfigurationsPath' ) // The Custom Config File path must be loaded immediately. - FCKConfig[ sKey ] = sVal ; - - else if ( sVal.toLowerCase() == "true" ) // If it is a boolean TRUE. - this.PageConfig[ sKey ] = true ; - - else if ( sVal.toLowerCase() == "false" ) // If it is a boolean FALSE. - this.PageConfig[ sKey ] = false ; - - else if ( sVal.length > 0 && !isNaN( sVal ) ) // If it is a number. - this.PageConfig[ sKey ] = parseInt( sVal, 10 ) ; - - else // In any other case it is a string. - this.PageConfig[ sKey ] = sVal ; - } -} - -function FCKConfig_LoadPageConfig() -{ - var oPageConfig = FCKConfig.PageConfig ; - for ( var sKey in oPageConfig ) - FCKConfig[ sKey ] = oPageConfig[ sKey ] ; -} - -function FCKConfig_PreProcess() -{ - var oConfig = FCKConfig ; - - // Force debug mode if fckdebug=true in the QueryString (main page). - if ( oConfig.AllowQueryStringDebug ) - { - try - { - if ( (/fckdebug=true/i).test( window.top.location.search ) ) - oConfig.Debug = true ; - } - catch (e) { /* Ignore it. Much probably we are inside a FRAME where the "top" is in another domain (security error). */ } - } - - // Certifies that the "PluginsPath" configuration ends with a slash. - if ( !oConfig.PluginsPath.EndsWith('/') ) - oConfig.PluginsPath += '/' ; - - // If no ToolbarComboPreviewCSS, point it to EditorAreaCSS. - var sComboPreviewCSS = oConfig.ToolbarComboPreviewCSS ; - if ( !sComboPreviewCSS || sComboPreviewCSS.length == 0 ) - oConfig.ToolbarComboPreviewCSS = oConfig.EditorAreaCSS ; - - // Turn the attributes that will be removed in the RemoveFormat from a string to an array - oConfig.RemoveAttributesArray = (oConfig.RemoveAttributes || '').split( ',' ); - - if ( !FCKConfig.SkinEditorCSS || FCKConfig.SkinEditorCSS.length == 0 ) - FCKConfig.SkinEditorCSS = FCKConfig.SkinPath + 'fck_editor.css' ; - - if ( !FCKConfig.SkinDialogCSS || FCKConfig.SkinDialogCSS.length == 0 ) - FCKConfig.SkinDialogCSS = FCKConfig.SkinPath + 'fck_dialog.css' ; -} - -// Define toolbar sets collection. -FCKConfig.ToolbarSets = new Object() ; - -// Defines the plugins collection. -FCKConfig.Plugins = new Object() ; -FCKConfig.Plugins.Items = new Array() ; - -FCKConfig.Plugins.Add = function( name, langs, path ) -{ - FCKConfig.Plugins.Items.AddItem( [name, langs, path] ) ; -} - -// FCKConfig.ProtectedSource: object that holds a collection of Regular -// Expressions that defined parts of the raw HTML that must remain untouched -// like custom tags, scripts, server side code, etc... -FCKConfig.ProtectedSource = new Object() ; - -// Generates a string used to identify and locate the Protected Tags comments. -FCKConfig.ProtectedSource._CodeTag = (new Date()).valueOf() ; - -// Initialize the regex array with the default ones. -FCKConfig.ProtectedSource.RegexEntries = [ - // First of any other protection, we must protect all comments to avoid - // loosing them (of course, IE related). - //g , - - // Script tags will also be forced to be protected, otherwise IE will execute them. - //gi, - - //

        - - - - - Preview
        - - - - - - diff --git a/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html b/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html deleted file mode 100644 index 0ac5acc1..00000000 --- a/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - Document Properties - Preview - - - - - - - - - - - - - - -
        - Normal Text -
        - Visited Link - - Active Link -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        - - diff --git a/fckeditor/editor/dialog/fck_flash.html b/fckeditor/editor/dialog/fck_flash.html deleted file mode 100644 index 1569175a..00000000 --- a/fckeditor/editor/dialog/fck_flash.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - Flash Properties - - - - - - - -
        - - - - - - - - - - -
        - - - - - - - - -
        URL -
        -
        -
        - - - - - - -
        - Width
        - -
          - Height
        - -
        -
        - - - - -
        - - - - - - - -
        Preview
        -
        -
        -
        - - - - diff --git a/fckeditor/editor/dialog/fck_flash/fck_flash.js b/fckeditor/editor/dialog/fck_flash/fck_flash.js deleted file mode 100644 index 993ba8c3..00000000 --- a/fckeditor/editor/dialog/fck_flash/fck_flash.js +++ /dev/null @@ -1,300 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Scripts related to the Flash dialog window (see fck_flash.html). - */ - -var dialog = window.parent ; -var oEditor = dialog.InnerDialogLoaded() ; -var FCK = oEditor.FCK ; -var FCKLang = oEditor.FCKLang ; -var FCKConfig = oEditor.FCKConfig ; -var FCKTools = oEditor.FCKTools ; - -//#### Dialog Tabs - -// Set the dialog tabs. -dialog.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ; - -if ( FCKConfig.FlashUpload ) - dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; - -if ( !FCKConfig.FlashDlgHideAdvanced ) - dialog.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ; - -// Function called when a dialog tag is selected. -function OnDialogTabChange( tabCode ) -{ - ShowE('divInfo' , ( tabCode == 'Info' ) ) ; - ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; - ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ; -} - -// Get the selected flash embed (if available). -var oFakeImage = dialog.Selection.GetSelectedElement() ; -var oEmbed ; - -if ( oFakeImage ) -{ - if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckflash') ) - oEmbed = FCK.GetRealElement( oFakeImage ) ; - else - oFakeImage = null ; -} - -window.onload = function() -{ - // Translate the dialog box texts. - oEditor.FCKLanguageManager.TranslatePage(document) ; - - // Load the selected element information (if any). - LoadSelection() ; - - // Show/Hide the "Browse Server" button. - GetE('tdBrowse').style.display = FCKConfig.FlashBrowser ? '' : 'none' ; - - // Set the actual uploader URL. - if ( FCKConfig.FlashUpload ) - GetE('frmUpload').action = FCKConfig.FlashUploadURL ; - - dialog.SetAutoSize( true ) ; - - // Activate the "OK" button. - dialog.SetOkButton( true ) ; - - SelectField( 'txtUrl' ) ; -} - -function LoadSelection() -{ - if ( ! oEmbed ) return ; - - GetE('txtUrl').value = GetAttribute( oEmbed, 'src', '' ) ; - GetE('txtWidth').value = GetAttribute( oEmbed, 'width', '' ) ; - GetE('txtHeight').value = GetAttribute( oEmbed, 'height', '' ) ; - - // Get Advances Attributes - GetE('txtAttId').value = oEmbed.id ; - GetE('chkAutoPlay').checked = GetAttribute( oEmbed, 'play', 'true' ) == 'true' ; - GetE('chkLoop').checked = GetAttribute( oEmbed, 'loop', 'true' ) == 'true' ; - GetE('chkMenu').checked = GetAttribute( oEmbed, 'menu', 'true' ) == 'true' ; - GetE('cmbScale').value = GetAttribute( oEmbed, 'scale', '' ).toLowerCase() ; - - GetE('txtAttTitle').value = oEmbed.title ; - - if ( oEditor.FCKBrowserInfo.IsIE ) - { - GetE('txtAttClasses').value = oEmbed.getAttribute('className') || '' ; - GetE('txtAttStyle').value = oEmbed.style.cssText ; - } - else - { - GetE('txtAttClasses').value = oEmbed.getAttribute('class',2) || '' ; - GetE('txtAttStyle').value = oEmbed.getAttribute('style',2) || '' ; - } - - UpdatePreview() ; -} - -//#### The OK button was hit. -function Ok() -{ - if ( GetE('txtUrl').value.length == 0 ) - { - dialog.SetSelectedTab( 'Info' ) ; - GetE('txtUrl').focus() ; - - alert( oEditor.FCKLang.DlgAlertUrl ) ; - - return false ; - } - - oEditor.FCKUndo.SaveUndoStep() ; - if ( !oEmbed ) - { - oEmbed = FCK.EditorDocument.createElement( 'EMBED' ) ; - oFakeImage = null ; - } - UpdateEmbed( oEmbed ) ; - - if ( !oFakeImage ) - { - oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Flash', oEmbed ) ; - oFakeImage.setAttribute( '_fckflash', 'true', 0 ) ; - oFakeImage = FCK.InsertElement( oFakeImage ) ; - } - - oEditor.FCKEmbedAndObjectProcessor.RefreshView( oFakeImage, oEmbed ) ; - - return true ; -} - -function UpdateEmbed( e ) -{ - SetAttribute( e, 'type' , 'application/x-shockwave-flash' ) ; - SetAttribute( e, 'pluginspage' , 'http://www.macromedia.com/go/getflashplayer' ) ; - - SetAttribute( e, 'src', GetE('txtUrl').value ) ; - SetAttribute( e, "width" , GetE('txtWidth').value ) ; - SetAttribute( e, "height", GetE('txtHeight').value ) ; - - // Advances Attributes - - SetAttribute( e, 'id' , GetE('txtAttId').value ) ; - SetAttribute( e, 'scale', GetE('cmbScale').value ) ; - - SetAttribute( e, 'play', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ; - SetAttribute( e, 'loop', GetE('chkLoop').checked ? 'true' : 'false' ) ; - SetAttribute( e, 'menu', GetE('chkMenu').checked ? 'true' : 'false' ) ; - - SetAttribute( e, 'title' , GetE('txtAttTitle').value ) ; - - if ( oEditor.FCKBrowserInfo.IsIE ) - { - SetAttribute( e, 'className', GetE('txtAttClasses').value ) ; - e.style.cssText = GetE('txtAttStyle').value ; - } - else - { - SetAttribute( e, 'class', GetE('txtAttClasses').value ) ; - SetAttribute( e, 'style', GetE('txtAttStyle').value ) ; - } -} - -var ePreview ; - -function SetPreviewElement( previewEl ) -{ - ePreview = previewEl ; - - if ( GetE('txtUrl').value.length > 0 ) - UpdatePreview() ; -} - -function UpdatePreview() -{ - if ( !ePreview ) - return ; - - while ( ePreview.firstChild ) - ePreview.removeChild( ePreview.firstChild ) ; - - if ( GetE('txtUrl').value.length == 0 ) - ePreview.innerHTML = ' ' ; - else - { - var oDoc = ePreview.ownerDocument || ePreview.document ; - var e = oDoc.createElement( 'EMBED' ) ; - - SetAttribute( e, 'src', GetE('txtUrl').value ) ; - SetAttribute( e, 'type', 'application/x-shockwave-flash' ) ; - SetAttribute( e, 'width', '100%' ) ; - SetAttribute( e, 'height', '100%' ) ; - - ePreview.appendChild( e ) ; - } -} - -// - -function BrowseServer() -{ - OpenFileBrowser( FCKConfig.FlashBrowserURL, FCKConfig.FlashBrowserWindowWidth, FCKConfig.FlashBrowserWindowHeight ) ; -} - -function SetUrl( url, width, height ) -{ - GetE('txtUrl').value = url ; - - if ( width ) - GetE('txtWidth').value = width ; - - if ( height ) - GetE('txtHeight').value = height ; - - UpdatePreview() ; - - dialog.SetSelectedTab( 'Info' ) ; -} - -function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) -{ - // Remove animation - window.parent.Throbber.Hide() ; - GetE( 'divUpload' ).style.display = '' ; - - switch ( errorNumber ) - { - case 0 : // No errors - alert( 'Your file has been successfully uploaded' ) ; - break ; - case 1 : // Custom error - alert( customMsg ) ; - return ; - case 101 : // Custom warning - alert( customMsg ) ; - break ; - case 201 : - alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; - break ; - case 202 : - alert( 'Invalid file type' ) ; - return ; - case 203 : - alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; - return ; - case 500 : - alert( 'The connector is disabled' ) ; - break ; - default : - alert( 'Error on file upload. Error number: ' + errorNumber ) ; - return ; - } - - SetUrl( fileUrl ) ; - GetE('frmUpload').reset() ; -} - -var oUploadAllowedExtRegex = new RegExp( FCKConfig.FlashUploadAllowedExtensions, 'i' ) ; -var oUploadDeniedExtRegex = new RegExp( FCKConfig.FlashUploadDeniedExtensions, 'i' ) ; - -function CheckUpload() -{ - var sFile = GetE('txtUploadFile').value ; - - if ( sFile.length == 0 ) - { - alert( 'Please select a file to upload' ) ; - return false ; - } - - if ( ( FCKConfig.FlashUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || - ( FCKConfig.FlashUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) - { - OnUploadCompleted( 202 ) ; - return false ; - } - - // Show animation - window.parent.Throbber.Show( 100 ) ; - GetE( 'divUpload' ).style.display = 'none' ; - - return true ; -} diff --git a/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html b/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html deleted file mode 100644 index 4817c1d1..00000000 --- a/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - diff --git a/fckeditor/editor/dialog/fck_form.html b/fckeditor/editor/dialog/fck_form.html deleted file mode 100644 index 71edf494..00000000 --- a/fckeditor/editor/dialog/fck_form.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - -
        - - - - - - - - - - -
        - Name
        - -
        - Action
        - -
        - Method
        - -
        -
        - - diff --git a/fckeditor/editor/dialog/fck_hiddenfield.html b/fckeditor/editor/dialog/fck_hiddenfield.html deleted file mode 100644 index 3ee162f6..00000000 --- a/fckeditor/editor/dialog/fck_hiddenfield.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Hidden Field Properties - - - - - - - - - - -
        - - - - - - - -
        - Name
        - -
        - Value
        - -
        -
        - - diff --git a/fckeditor/editor/dialog/fck_image.html b/fckeditor/editor/dialog/fck_image.html deleted file mode 100644 index 5ce5ecb6..00000000 --- a/fckeditor/editor/dialog/fck_image.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - Image Properties - - - - - - - -
        - - - - - - - - - - -
        - - - - - - - - -
        - URL -
        - -
        -
        - Short Description
        -
        -
        - - - - - - -
        -
        - - - - - - - - - - - -
        - Width  - -
        -
        -
        -
        -
        -
        - Height  -
        -
        - - - - - - - - - - - - - - - - - -
        - Border  -
        - HSpace  -
        - VSpace  -
        - Align  - -
        -
        -     - - - - - - - -
        - Preview
        - -
        -
        -
        -
        - - - - - diff --git a/fckeditor/editor/dialog/fck_image/fck_image.js b/fckeditor/editor/dialog/fck_image/fck_image.js deleted file mode 100644 index 7498e07d..00000000 --- a/fckeditor/editor/dialog/fck_image/fck_image.js +++ /dev/null @@ -1,512 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Scripts related to the Image dialog window (see fck_image.html). - */ - -var dialog = window.parent ; -var oEditor = dialog.InnerDialogLoaded() ; -var FCK = oEditor.FCK ; -var FCKLang = oEditor.FCKLang ; -var FCKConfig = oEditor.FCKConfig ; -var FCKDebug = oEditor.FCKDebug ; -var FCKTools = oEditor.FCKTools ; - -var bImageButton = ( document.location.search.length > 0 && document.location.search.substr(1) == 'ImageButton' ) ; - -//#### Dialog Tabs - -// Set the dialog tabs. -dialog.AddTab( 'Info', FCKLang.DlgImgInfoTab ) ; - -if ( !bImageButton && !FCKConfig.ImageDlgHideLink ) - dialog.AddTab( 'Link', FCKLang.DlgImgLinkTab ) ; - -if ( FCKConfig.ImageUpload ) - dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; - -if ( !FCKConfig.ImageDlgHideAdvanced ) - dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; - -// Function called when a dialog tag is selected. -function OnDialogTabChange( tabCode ) -{ - ShowE('divInfo' , ( tabCode == 'Info' ) ) ; - ShowE('divLink' , ( tabCode == 'Link' ) ) ; - ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; - ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ; -} - -// Get the selected image (if available). -var oImage = dialog.Selection.GetSelectedElement() ; - -if ( oImage && oImage.tagName != 'IMG' && !( oImage.tagName == 'INPUT' && oImage.type == 'image' ) ) - oImage = null ; - -// Get the active link. -var oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ; - -var oImageOriginal ; - -function UpdateOriginal( resetSize ) -{ - if ( !eImgPreview ) - return ; - - if ( GetE('txtUrl').value.length == 0 ) - { - oImageOriginal = null ; - return ; - } - - oImageOriginal = document.createElement( 'IMG' ) ; // new Image() ; - - if ( resetSize ) - { - oImageOriginal.onload = function() - { - this.onload = null ; - ResetSizes() ; - } - } - - oImageOriginal.src = eImgPreview.src ; -} - -var bPreviewInitialized ; - -window.onload = function() -{ - // Translate the dialog box texts. - oEditor.FCKLanguageManager.TranslatePage(document) ; - - GetE('btnLockSizes').title = FCKLang.DlgImgLockRatio ; - GetE('btnResetSize').title = FCKLang.DlgBtnResetSize ; - - // Load the selected element information (if any). - LoadSelection() ; - - // Show/Hide the "Browse Server" button. - GetE('tdBrowse').style.display = FCKConfig.ImageBrowser ? '' : 'none' ; - GetE('divLnkBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ; - - UpdateOriginal() ; - - // Set the actual uploader URL. - if ( FCKConfig.ImageUpload ) - GetE('frmUpload').action = FCKConfig.ImageUploadURL ; - - dialog.SetAutoSize( true ) ; - - // Activate the "OK" button. - dialog.SetOkButton( true ) ; - - SelectField( 'txtUrl' ) ; -} - -function LoadSelection() -{ - if ( ! oImage ) return ; - - var sUrl = oImage.getAttribute( '_fcksavedurl' ) ; - if ( sUrl == null ) - sUrl = GetAttribute( oImage, 'src', '' ) ; - - GetE('txtUrl').value = sUrl ; - GetE('txtAlt').value = GetAttribute( oImage, 'alt', '' ) ; - GetE('txtVSpace').value = GetAttribute( oImage, 'vspace', '' ) ; - GetE('txtHSpace').value = GetAttribute( oImage, 'hspace', '' ) ; - GetE('txtBorder').value = GetAttribute( oImage, 'border', '' ) ; - GetE('cmbAlign').value = GetAttribute( oImage, 'align', '' ) ; - - var iWidth, iHeight ; - - var regexSize = /^\s*(\d+)px\s*$/i ; - - if ( oImage.style.width ) - { - var aMatchW = oImage.style.width.match( regexSize ) ; - if ( aMatchW ) - { - iWidth = aMatchW[1] ; - oImage.style.width = '' ; - SetAttribute( oImage, 'width' , iWidth ) ; - } - } - - if ( oImage.style.height ) - { - var aMatchH = oImage.style.height.match( regexSize ) ; - if ( aMatchH ) - { - iHeight = aMatchH[1] ; - oImage.style.height = '' ; - SetAttribute( oImage, 'height', iHeight ) ; - } - } - - GetE('txtWidth').value = iWidth ? iWidth : GetAttribute( oImage, "width", '' ) ; - GetE('txtHeight').value = iHeight ? iHeight : GetAttribute( oImage, "height", '' ) ; - - // Get Advances Attributes - GetE('txtAttId').value = oImage.id ; - GetE('cmbAttLangDir').value = oImage.dir ; - GetE('txtAttLangCode').value = oImage.lang ; - GetE('txtAttTitle').value = oImage.title ; - GetE('txtLongDesc').value = oImage.longDesc ; - - if ( oEditor.FCKBrowserInfo.IsIE ) - { - GetE('txtAttClasses').value = oImage.className || '' ; - GetE('txtAttStyle').value = oImage.style.cssText ; - } - else - { - GetE('txtAttClasses').value = oImage.getAttribute('class',2) || '' ; - GetE('txtAttStyle').value = oImage.getAttribute('style',2) ; - } - - if ( oLink ) - { - var sLinkUrl = oLink.getAttribute( '_fcksavedurl' ) ; - if ( sLinkUrl == null ) - sLinkUrl = oLink.getAttribute('href',2) ; - - GetE('txtLnkUrl').value = sLinkUrl ; - GetE('cmbLnkTarget').value = oLink.target ; - } - - UpdatePreview() ; -} - -//#### The OK button was hit. -function Ok() -{ - if ( GetE('txtUrl').value.length == 0 ) - { - dialog.SetSelectedTab( 'Info' ) ; - GetE('txtUrl').focus() ; - - alert( FCKLang.DlgImgAlertUrl ) ; - - return false ; - } - - var bHasImage = ( oImage != null ) ; - - if ( bHasImage && bImageButton && oImage.tagName == 'IMG' ) - { - if ( confirm( 'Do you want to transform the selected image on a image button?' ) ) - oImage = null ; - } - else if ( bHasImage && !bImageButton && oImage.tagName == 'INPUT' ) - { - if ( confirm( 'Do you want to transform the selected image button on a simple image?' ) ) - oImage = null ; - } - - oEditor.FCKUndo.SaveUndoStep() ; - if ( !bHasImage ) - { - if ( bImageButton ) - { - oImage = FCK.EditorDocument.createElement( 'input' ) ; - oImage.type = 'image' ; - oImage = FCK.InsertElement( oImage ) ; - } - else - oImage = FCK.InsertElement( 'img' ) ; - } - - UpdateImage( oImage ) ; - - var sLnkUrl = GetE('txtLnkUrl').value.Trim() ; - - if ( sLnkUrl.length == 0 ) - { - if ( oLink ) - FCK.ExecuteNamedCommand( 'Unlink' ) ; - } - else - { - if ( oLink ) // Modifying an existent link. - oLink.href = sLnkUrl ; - else // Creating a new link. - { - if ( !bHasImage ) - oEditor.FCKSelection.SelectNode( oImage ) ; - - oLink = oEditor.FCK.CreateLink( sLnkUrl )[0] ; - - if ( !bHasImage ) - { - oEditor.FCKSelection.SelectNode( oLink ) ; - oEditor.FCKSelection.Collapse( false ) ; - } - } - - SetAttribute( oLink, '_fcksavedurl', sLnkUrl ) ; - SetAttribute( oLink, 'target', GetE('cmbLnkTarget').value ) ; - } - - return true ; -} - -function UpdateImage( e, skipId ) -{ - e.src = GetE('txtUrl').value ; - SetAttribute( e, "_fcksavedurl", GetE('txtUrl').value ) ; - SetAttribute( e, "alt" , GetE('txtAlt').value ) ; - SetAttribute( e, "width" , GetE('txtWidth').value ) ; - SetAttribute( e, "height", GetE('txtHeight').value ) ; - SetAttribute( e, "vspace", GetE('txtVSpace').value ) ; - SetAttribute( e, "hspace", GetE('txtHSpace').value ) ; - SetAttribute( e, "border", GetE('txtBorder').value ) ; - SetAttribute( e, "align" , GetE('cmbAlign').value ) ; - - // Advances Attributes - - if ( ! skipId ) - SetAttribute( e, 'id', GetE('txtAttId').value ) ; - - SetAttribute( e, 'dir' , GetE('cmbAttLangDir').value ) ; - SetAttribute( e, 'lang' , GetE('txtAttLangCode').value ) ; - SetAttribute( e, 'title' , GetE('txtAttTitle').value ) ; - SetAttribute( e, 'longDesc' , GetE('txtLongDesc').value ) ; - - if ( oEditor.FCKBrowserInfo.IsIE ) - { - e.className = GetE('txtAttClasses').value ; - e.style.cssText = GetE('txtAttStyle').value ; - } - else - { - SetAttribute( e, 'class' , GetE('txtAttClasses').value ) ; - SetAttribute( e, 'style', GetE('txtAttStyle').value ) ; - } -} - -var eImgPreview ; -var eImgPreviewLink ; - -function SetPreviewElements( imageElement, linkElement ) -{ - eImgPreview = imageElement ; - eImgPreviewLink = linkElement ; - - UpdatePreview() ; - UpdateOriginal() ; - - bPreviewInitialized = true ; -} - -function UpdatePreview() -{ - if ( !eImgPreview || !eImgPreviewLink ) - return ; - - if ( GetE('txtUrl').value.length == 0 ) - eImgPreviewLink.style.display = 'none' ; - else - { - UpdateImage( eImgPreview, true ) ; - - if ( GetE('txtLnkUrl').value.Trim().length > 0 ) - eImgPreviewLink.href = 'javascript:void(null);' ; - else - SetAttribute( eImgPreviewLink, 'href', '' ) ; - - eImgPreviewLink.style.display = '' ; - } -} - -var bLockRatio = true ; - -function SwitchLock( lockButton ) -{ - bLockRatio = !bLockRatio ; - lockButton.className = bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ; - lockButton.title = bLockRatio ? 'Lock sizes' : 'Unlock sizes' ; - - if ( bLockRatio ) - { - if ( GetE('txtWidth').value.length > 0 ) - OnSizeChanged( 'Width', GetE('txtWidth').value ) ; - else - OnSizeChanged( 'Height', GetE('txtHeight').value ) ; - } -} - -// Fired when the width or height input texts change -function OnSizeChanged( dimension, value ) -{ - // Verifies if the aspect ration has to be maintained - if ( oImageOriginal && bLockRatio ) - { - var e = dimension == 'Width' ? GetE('txtHeight') : GetE('txtWidth') ; - - if ( value.length == 0 || isNaN( value ) ) - { - e.value = '' ; - return ; - } - - if ( dimension == 'Width' ) - value = value == 0 ? 0 : Math.round( oImageOriginal.height * ( value / oImageOriginal.width ) ) ; - else - value = value == 0 ? 0 : Math.round( oImageOriginal.width * ( value / oImageOriginal.height ) ) ; - - if ( !isNaN( value ) ) - e.value = value ; - } - - UpdatePreview() ; -} - -// Fired when the Reset Size button is clicked -function ResetSizes() -{ - if ( ! oImageOriginal ) return ; - if ( oEditor.FCKBrowserInfo.IsGecko && !oImageOriginal.complete ) - { - setTimeout( ResetSizes, 50 ) ; - return ; - } - - GetE('txtWidth').value = oImageOriginal.width ; - GetE('txtHeight').value = oImageOriginal.height ; - - UpdatePreview() ; -} - -function BrowseServer() -{ - OpenServerBrowser( - 'Image', - FCKConfig.ImageBrowserURL, - FCKConfig.ImageBrowserWindowWidth, - FCKConfig.ImageBrowserWindowHeight ) ; -} - -function LnkBrowseServer() -{ - OpenServerBrowser( - 'Link', - FCKConfig.LinkBrowserURL, - FCKConfig.LinkBrowserWindowWidth, - FCKConfig.LinkBrowserWindowHeight ) ; -} - -function OpenServerBrowser( type, url, width, height ) -{ - sActualBrowser = type ; - OpenFileBrowser( url, width, height ) ; -} - -var sActualBrowser ; - -function SetUrl( url, width, height, alt ) -{ - if ( sActualBrowser == 'Link' ) - { - GetE('txtLnkUrl').value = url ; - UpdatePreview() ; - } - else - { - GetE('txtUrl').value = url ; - GetE('txtWidth').value = width ? width : '' ; - GetE('txtHeight').value = height ? height : '' ; - - if ( alt ) - GetE('txtAlt').value = alt; - - UpdatePreview() ; - UpdateOriginal( true ) ; - } - - dialog.SetSelectedTab( 'Info' ) ; -} - -function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) -{ - // Remove animation - window.parent.Throbber.Hide() ; - GetE( 'divUpload' ).style.display = '' ; - - switch ( errorNumber ) - { - case 0 : // No errors - alert( 'Your file has been successfully uploaded' ) ; - break ; - case 1 : // Custom error - alert( customMsg ) ; - return ; - case 101 : // Custom warning - alert( customMsg ) ; - break ; - case 201 : - alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; - break ; - case 202 : - alert( 'Invalid file type' ) ; - return ; - case 203 : - alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; - return ; - case 500 : - alert( 'The connector is disabled' ) ; - break ; - default : - alert( 'Error on file upload. Error number: ' + errorNumber ) ; - return ; - } - - sActualBrowser = '' ; - SetUrl( fileUrl ) ; - GetE('frmUpload').reset() ; -} - -var oUploadAllowedExtRegex = new RegExp( FCKConfig.ImageUploadAllowedExtensions, 'i' ) ; -var oUploadDeniedExtRegex = new RegExp( FCKConfig.ImageUploadDeniedExtensions, 'i' ) ; - -function CheckUpload() -{ - var sFile = GetE('txtUploadFile').value ; - - if ( sFile.length == 0 ) - { - alert( 'Please select a file to upload' ) ; - return false ; - } - - if ( ( FCKConfig.ImageUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || - ( FCKConfig.ImageUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) - { - OnUploadCompleted( 202 ) ; - return false ; - } - - // Show animation - window.parent.Throbber.Show( 100 ) ; - GetE( 'divUpload' ).style.display = 'none' ; - - return true ; -} diff --git a/fckeditor/editor/dialog/fck_image/fck_image_preview.html b/fckeditor/editor/dialog/fck_image/fck_image_preview.html deleted file mode 100644 index 81f44e8d..00000000 --- a/fckeditor/editor/dialog/fck_image/fck_image_preview.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - -
        - - Lorem ipsum dolor sit amet, consectetuer adipiscing - elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus - a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, - nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed - velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper - nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices - a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus - faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget - tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, - tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis - id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, - eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur - ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris. -
        - - diff --git a/fckeditor/editor/dialog/fck_link.html b/fckeditor/editor/dialog/fck_link.html deleted file mode 100644 index 6d69e6e2..00000000 --- a/fckeditor/editor/dialog/fck_link.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - Link Properties - - - - - - - - - - - - diff --git a/fckeditor/editor/dialog/fck_link/fck_link.js b/fckeditor/editor/dialog/fck_link/fck_link.js deleted file mode 100644 index 817b3e1f..00000000 --- a/fckeditor/editor/dialog/fck_link/fck_link.js +++ /dev/null @@ -1,893 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Scripts related to the Link dialog window (see fck_link.html). - */ - -var dialog = window.parent ; -var oEditor = dialog.InnerDialogLoaded() ; - -var FCK = oEditor.FCK ; -var FCKLang = oEditor.FCKLang ; -var FCKConfig = oEditor.FCKConfig ; -var FCKRegexLib = oEditor.FCKRegexLib ; -var FCKTools = oEditor.FCKTools ; - -//#### Dialog Tabs - -// Set the dialog tabs. -dialog.AddTab( 'Info', FCKLang.DlgLnkInfoTab ) ; - -if ( !FCKConfig.LinkDlgHideTarget ) - dialog.AddTab( 'Target', FCKLang.DlgLnkTargetTab, true ) ; - -if ( FCKConfig.LinkUpload ) - dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload, true ) ; - -if ( !FCKConfig.LinkDlgHideAdvanced ) - dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; - -// Function called when a dialog tag is selected. -function OnDialogTabChange( tabCode ) -{ - ShowE('divInfo' , ( tabCode == 'Info' ) ) ; - ShowE('divTarget' , ( tabCode == 'Target' ) ) ; - ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; - ShowE('divAttribs' , ( tabCode == 'Advanced' ) ) ; - - dialog.SetAutoSize( true ) ; -} - -//#### Regular Expressions library. -var oRegex = new Object() ; - -oRegex.UriProtocol = /^(((http|https|ftp|news):\/\/)|mailto:)/gi ; - -oRegex.UrlOnChangeProtocol = /^(http|https|ftp|news):\/\/(?=.)/gi ; - -oRegex.UrlOnChangeTestOther = /^((javascript:)|[#\/\.])/gi ; - -oRegex.ReserveTarget = /^_(blank|self|top|parent)$/i ; - -oRegex.PopupUri = /^javascript:void\(\s*window.open\(\s*'([^']+)'\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*\)\s*$/ ; - -// Accessible popups -oRegex.OnClickPopup = /^\s*on[cC]lick="\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*"$/ ; - -oRegex.PopupFeatures = /(?:^|,)([^=]+)=(\d+|yes|no)/gi ; - -//#### Parser Functions - -var oParser = new Object() ; - -// This method simply returns the two inputs in numerical order. You can even -// provide strings, as the method would parseInt() the values. -oParser.SortNumerical = function(a, b) -{ - return parseInt( a, 10 ) - parseInt( b, 10 ) ; -} - -oParser.ParseEMailParams = function(sParams) -{ - // Initialize the oEMailParams object. - var oEMailParams = new Object() ; - oEMailParams.Subject = '' ; - oEMailParams.Body = '' ; - - var aMatch = sParams.match( /(^|^\?|&)subject=([^&]+)/i ) ; - if ( aMatch ) oEMailParams.Subject = decodeURIComponent( aMatch[2] ) ; - - aMatch = sParams.match( /(^|^\?|&)body=([^&]+)/i ) ; - if ( aMatch ) oEMailParams.Body = decodeURIComponent( aMatch[2] ) ; - - return oEMailParams ; -} - -// This method returns either an object containing the email info, or FALSE -// if the parameter is not an email link. -oParser.ParseEMailUri = function( sUrl ) -{ - // Initializes the EMailInfo object. - var oEMailInfo = new Object() ; - oEMailInfo.Address = '' ; - oEMailInfo.Subject = '' ; - oEMailInfo.Body = '' ; - - var aLinkInfo = sUrl.match( /^(\w+):(.*)$/ ) ; - if ( aLinkInfo && aLinkInfo[1] == 'mailto' ) - { - // This seems to be an unprotected email link. - var aParts = aLinkInfo[2].match( /^([^\?]+)\??(.+)?/ ) ; - if ( aParts ) - { - // Set the e-mail address. - oEMailInfo.Address = aParts[1] ; - - // Look for the optional e-mail parameters. - if ( aParts[2] ) - { - var oEMailParams = oParser.ParseEMailParams( aParts[2] ) ; - oEMailInfo.Subject = oEMailParams.Subject ; - oEMailInfo.Body = oEMailParams.Body ; - } - } - return oEMailInfo ; - } - else if ( aLinkInfo && aLinkInfo[1] == 'javascript' ) - { - // This may be a protected email. - - // Try to match the url against the EMailProtectionFunction. - var func = FCKConfig.EMailProtectionFunction ; - if ( func != null ) - { - try - { - // Escape special chars. - func = func.replace( /([\/^$*+.?()\[\]])/g, '\\$1' ) ; - - // Define the possible keys. - var keys = new Array('NAME', 'DOMAIN', 'SUBJECT', 'BODY') ; - - // Get the order of the keys (hold them in the array ) and - // the function replaced by regular expression patterns. - var sFunc = func ; - var pos = new Array() ; - for ( var i = 0 ; i < keys.length ; i ++ ) - { - var rexp = new RegExp( keys[i] ) ; - var p = func.search( rexp ) ; - if ( p >= 0 ) - { - sFunc = sFunc.replace( rexp, '\'([^\']*)\'' ) ; - pos[pos.length] = p + ':' + keys[i] ; - } - } - - // Sort the available keys. - pos.sort( oParser.SortNumerical ) ; - - // Replace the excaped single quotes in the url, such they do - // not affect the regexp afterwards. - aLinkInfo[2] = aLinkInfo[2].replace( /\\'/g, '###SINGLE_QUOTE###' ) ; - - // Create the regexp and execute it. - var rFunc = new RegExp( '^' + sFunc + '$' ) ; - var aMatch = rFunc.exec( aLinkInfo[2] ) ; - if ( aMatch ) - { - var aInfo = new Array(); - for ( var i = 1 ; i < aMatch.length ; i ++ ) - { - var k = pos[i-1].match(/^\d+:(.+)$/) ; - aInfo[k[1]] = aMatch[i].replace(/###SINGLE_QUOTE###/g, '\'') ; - } - - // Fill the EMailInfo object that will be returned - oEMailInfo.Address = aInfo['NAME'] + '@' + aInfo['DOMAIN'] ; - oEMailInfo.Subject = decodeURIComponent( aInfo['SUBJECT'] ) ; - oEMailInfo.Body = decodeURIComponent( aInfo['BODY'] ) ; - - return oEMailInfo ; - } - } - catch (e) - { - } - } - - // Try to match the email against the encode protection. - var aMatch = aLinkInfo[2].match( /^location\.href='mailto:'\+(String\.fromCharCode\([\d,]+\))\+'(.*)'$/ ) ; - if ( aMatch ) - { - // The link is encoded - oEMailInfo.Address = eval( aMatch[1] ) ; - if ( aMatch[2] ) - { - var oEMailParams = oParser.ParseEMailParams( aMatch[2] ) ; - oEMailInfo.Subject = oEMailParams.Subject ; - oEMailInfo.Body = oEMailParams.Body ; - } - return oEMailInfo ; - } - } - return false; -} - -oParser.CreateEMailUri = function( address, subject, body ) -{ - // Switch for the EMailProtection setting. - switch ( FCKConfig.EMailProtection ) - { - case 'function' : - var func = FCKConfig.EMailProtectionFunction ; - if ( func == null ) - { - if ( FCKConfig.Debug ) - { - alert('EMailProtection alert!\nNo function defined. Please set "FCKConfig.EMailProtectionFunction"') ; - } - return ''; - } - - // Split the email address into name and domain parts. - var aAddressParts = address.split( '@', 2 ) ; - if ( aAddressParts[1] == undefined ) - { - aAddressParts[1] = '' ; - } - - // Replace the keys by their values (embedded in single quotes). - func = func.replace(/NAME/g, "'" + aAddressParts[0].replace(/'/g, '\\\'') + "'") ; - func = func.replace(/DOMAIN/g, "'" + aAddressParts[1].replace(/'/g, '\\\'') + "'") ; - func = func.replace(/SUBJECT/g, "'" + encodeURIComponent( subject ).replace(/'/g, '\\\'') + "'") ; - func = func.replace(/BODY/g, "'" + encodeURIComponent( body ).replace(/'/g, '\\\'') + "'") ; - - return 'javascript:' + func ; - - case 'encode' : - var aParams = [] ; - var aAddressCode = [] ; - - if ( subject.length > 0 ) - aParams.push( 'subject='+ encodeURIComponent( subject ) ) ; - if ( body.length > 0 ) - aParams.push( 'body=' + encodeURIComponent( body ) ) ; - for ( var i = 0 ; i < address.length ; i++ ) - aAddressCode.push( address.charCodeAt( i ) ) ; - - return 'javascript:location.href=\'mailto:\'+String.fromCharCode(' + aAddressCode.join( ',' ) + ')+\'?' + aParams.join( '&' ) + '\'' ; - } - - // EMailProtection 'none' - - var sBaseUri = 'mailto:' + address ; - - var sParams = '' ; - - if ( subject.length > 0 ) - sParams = '?subject=' + encodeURIComponent( subject ) ; - - if ( body.length > 0 ) - { - sParams += ( sParams.length == 0 ? '?' : '&' ) ; - sParams += 'body=' + encodeURIComponent( body ) ; - } - - return sBaseUri + sParams ; -} - -//#### Initialization Code - -// oLink: The actual selected link in the editor. -var oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ; -if ( oLink ) - FCK.Selection.SelectNode( oLink ) ; - -window.onload = function() -{ - // Translate the dialog box texts. - oEditor.FCKLanguageManager.TranslatePage(document) ; - - // Fill the Anchor Names and Ids combos. - LoadAnchorNamesAndIds() ; - - // Load the selected link information (if any). - LoadSelection() ; - - // Update the dialog box. - SetLinkType( GetE('cmbLinkType').value ) ; - - // Show/Hide the "Browse Server" button. - GetE('divBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ; - - // Show the initial dialog content. - GetE('divInfo').style.display = '' ; - - // Set the actual uploader URL. - if ( FCKConfig.LinkUpload ) - GetE('frmUpload').action = FCKConfig.LinkUploadURL ; - - // Set the default target (from configuration). - SetDefaultTarget() ; - - // Activate the "OK" button. - dialog.SetOkButton( true ) ; - - // Select the first field. - switch( GetE('cmbLinkType').value ) - { - case 'url' : - SelectField( 'txtUrl' ) ; - break ; - case 'email' : - SelectField( 'txtEMailAddress' ) ; - break ; - case 'anchor' : - if ( GetE('divSelAnchor').style.display != 'none' ) - SelectField( 'cmbAnchorName' ) ; - else - SelectField( 'cmbLinkType' ) ; - } -} - -var bHasAnchors ; - -function LoadAnchorNamesAndIds() -{ - // Since version 2.0, the anchors are replaced in the DOM by IMGs so the user see the icon - // to edit them. So, we must look for that images now. - var aAnchors = new Array() ; - var i ; - var oImages = oEditor.FCK.EditorDocument.getElementsByTagName( 'IMG' ) ; - for( i = 0 ; i < oImages.length ; i++ ) - { - if ( oImages[i].getAttribute('_fckanchor') ) - aAnchors[ aAnchors.length ] = oEditor.FCK.GetRealElement( oImages[i] ) ; - } - - // Add also real anchors - var oLinks = oEditor.FCK.EditorDocument.getElementsByTagName( 'A' ) ; - for( i = 0 ; i < oLinks.length ; i++ ) - { - if ( oLinks[i].name && ( oLinks[i].name.length > 0 ) ) - aAnchors[ aAnchors.length ] = oLinks[i] ; - } - - var aIds = FCKTools.GetAllChildrenIds( oEditor.FCK.EditorDocument.body ) ; - - bHasAnchors = ( aAnchors.length > 0 || aIds.length > 0 ) ; - - for ( i = 0 ; i < aAnchors.length ; i++ ) - { - var sName = aAnchors[i].name ; - if ( sName && sName.length > 0 ) - FCKTools.AddSelectOption( GetE('cmbAnchorName'), sName, sName ) ; - } - - for ( i = 0 ; i < aIds.length ; i++ ) - { - FCKTools.AddSelectOption( GetE('cmbAnchorId'), aIds[i], aIds[i] ) ; - } - - ShowE( 'divSelAnchor' , bHasAnchors ) ; - ShowE( 'divNoAnchor' , !bHasAnchors ) ; -} - -function LoadSelection() -{ - if ( !oLink ) return ; - - var sType = 'url' ; - - // Get the actual Link href. - var sHRef = oLink.getAttribute( '_fcksavedurl' ) ; - if ( sHRef == null ) - sHRef = oLink.getAttribute( 'href' , 2 ) || '' ; - - // Look for a popup javascript link. - var oPopupMatch = oRegex.PopupUri.exec( sHRef ) ; - if( oPopupMatch ) - { - GetE('cmbTarget').value = 'popup' ; - sHRef = oPopupMatch[1] ; - FillPopupFields( oPopupMatch[2], oPopupMatch[3] ) ; - SetTarget( 'popup' ) ; - } - - // Accessible popups, the popup data is in the onclick attribute - if ( !oPopupMatch ) - { - var onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; - if ( onclick ) - { - // Decode the protected string - onclick = decodeURIComponent( onclick ) ; - - oPopupMatch = oRegex.OnClickPopup.exec( onclick ) ; - if( oPopupMatch ) - { - GetE( 'cmbTarget' ).value = 'popup' ; - FillPopupFields( oPopupMatch[1], oPopupMatch[2] ) ; - SetTarget( 'popup' ) ; - } - } - } - - // Search for the protocol. - var sProtocol = oRegex.UriProtocol.exec( sHRef ) ; - - // Search for a protected email link. - var oEMailInfo = oParser.ParseEMailUri( sHRef ); - - if ( oEMailInfo ) - { - sType = 'email' ; - - GetE('txtEMailAddress').value = oEMailInfo.Address ; - GetE('txtEMailSubject').value = oEMailInfo.Subject ; - GetE('txtEMailBody').value = oEMailInfo.Body ; - } - else if ( sProtocol ) - { - sProtocol = sProtocol[0].toLowerCase() ; - GetE('cmbLinkProtocol').value = sProtocol ; - - // Remove the protocol and get the remaining URL. - var sUrl = sHRef.replace( oRegex.UriProtocol, '' ) ; - sType = 'url' ; - GetE('txtUrl').value = sUrl ; - } - else if ( sHRef.substr(0,1) == '#' && sHRef.length > 1 ) // It is an anchor link. - { - sType = 'anchor' ; - GetE('cmbAnchorName').value = GetE('cmbAnchorId').value = sHRef.substr(1) ; - } - else // It is another type of link. - { - sType = 'url' ; - - GetE('cmbLinkProtocol').value = '' ; - GetE('txtUrl').value = sHRef ; - } - - if ( !oPopupMatch ) - { - // Get the target. - var sTarget = oLink.target ; - - if ( sTarget && sTarget.length > 0 ) - { - if ( oRegex.ReserveTarget.test( sTarget ) ) - { - sTarget = sTarget.toLowerCase() ; - GetE('cmbTarget').value = sTarget ; - } - else - GetE('cmbTarget').value = 'frame' ; - GetE('txtTargetFrame').value = sTarget ; - } - } - - // Get Advances Attributes - GetE('txtAttId').value = oLink.id ; - GetE('txtAttName').value = oLink.name ; - GetE('cmbAttLangDir').value = oLink.dir ; - GetE('txtAttLangCode').value = oLink.lang ; - GetE('txtAttAccessKey').value = oLink.accessKey ; - GetE('txtAttTabIndex').value = oLink.tabIndex <= 0 ? '' : oLink.tabIndex ; - GetE('txtAttTitle').value = oLink.title ; - GetE('txtAttContentType').value = oLink.type ; - GetE('txtAttCharSet').value = oLink.charset ; - - var sClass ; - if ( oEditor.FCKBrowserInfo.IsIE ) - { - sClass = oLink.getAttribute('className',2) || '' ; - // Clean up temporary classes for internal use: - sClass = sClass.replace( FCKRegexLib.FCK_Class, '' ) ; - - GetE('txtAttStyle').value = oLink.style.cssText ; - } - else - { - sClass = oLink.getAttribute('class',2) || '' ; - GetE('txtAttStyle').value = oLink.getAttribute('style',2) || '' ; - } - GetE('txtAttClasses').value = sClass ; - - // Update the Link type combo. - GetE('cmbLinkType').value = sType ; -} - -//#### Link type selection. -function SetLinkType( linkType ) -{ - ShowE('divLinkTypeUrl' , (linkType == 'url') ) ; - ShowE('divLinkTypeAnchor' , (linkType == 'anchor') ) ; - ShowE('divLinkTypeEMail' , (linkType == 'email') ) ; - - if ( !FCKConfig.LinkDlgHideTarget ) - dialog.SetTabVisibility( 'Target' , (linkType == 'url') ) ; - - if ( FCKConfig.LinkUpload ) - dialog.SetTabVisibility( 'Upload' , (linkType == 'url') ) ; - - if ( !FCKConfig.LinkDlgHideAdvanced ) - dialog.SetTabVisibility( 'Advanced' , (linkType != 'anchor' || bHasAnchors) ) ; - - if ( linkType == 'email' ) - dialog.SetAutoSize( true ) ; -} - -//#### Target type selection. -function SetTarget( targetType ) -{ - GetE('tdTargetFrame').style.display = ( targetType == 'popup' ? 'none' : '' ) ; - GetE('tdPopupName').style.display = - GetE('tablePopupFeatures').style.display = ( targetType == 'popup' ? '' : 'none' ) ; - - switch ( targetType ) - { - case "_blank" : - case "_self" : - case "_parent" : - case "_top" : - GetE('txtTargetFrame').value = targetType ; - break ; - case "" : - GetE('txtTargetFrame').value = '' ; - break ; - } - - if ( targetType == 'popup' ) - dialog.SetAutoSize( true ) ; -} - -//#### Called while the user types the URL. -function OnUrlChange() -{ - var sUrl = GetE('txtUrl').value ; - var sProtocol = oRegex.UrlOnChangeProtocol.exec( sUrl ) ; - - if ( sProtocol ) - { - sUrl = sUrl.substr( sProtocol[0].length ) ; - GetE('txtUrl').value = sUrl ; - GetE('cmbLinkProtocol').value = sProtocol[0].toLowerCase() ; - } - else if ( oRegex.UrlOnChangeTestOther.test( sUrl ) ) - { - GetE('cmbLinkProtocol').value = '' ; - } -} - -//#### Called while the user types the target name. -function OnTargetNameChange() -{ - var sFrame = GetE('txtTargetFrame').value ; - - if ( sFrame.length == 0 ) - GetE('cmbTarget').value = '' ; - else if ( oRegex.ReserveTarget.test( sFrame ) ) - GetE('cmbTarget').value = sFrame.toLowerCase() ; - else - GetE('cmbTarget').value = 'frame' ; -} - -// Accessible popups -function BuildOnClickPopup() -{ - var sWindowName = "'" + GetE('txtPopupName').value.replace(/\W/gi, "") + "'" ; - - var sFeatures = '' ; - var aChkFeatures = document.getElementsByName( 'chkFeature' ) ; - for ( var i = 0 ; i < aChkFeatures.length ; i++ ) - { - if ( i > 0 ) sFeatures += ',' ; - sFeatures += aChkFeatures[i].value + '=' + ( aChkFeatures[i].checked ? 'yes' : 'no' ) ; - } - - if ( GetE('txtPopupWidth').value.length > 0 ) sFeatures += ',width=' + GetE('txtPopupWidth').value ; - if ( GetE('txtPopupHeight').value.length > 0 ) sFeatures += ',height=' + GetE('txtPopupHeight').value ; - if ( GetE('txtPopupLeft').value.length > 0 ) sFeatures += ',left=' + GetE('txtPopupLeft').value ; - if ( GetE('txtPopupTop').value.length > 0 ) sFeatures += ',top=' + GetE('txtPopupTop').value ; - - if ( sFeatures != '' ) - sFeatures = sFeatures + ",status" ; - - return ( "window.open(this.href," + sWindowName + ",'" + sFeatures + "'); return false" ) ; -} - -//#### Fills all Popup related fields. -function FillPopupFields( windowName, features ) -{ - if ( windowName ) - GetE('txtPopupName').value = windowName ; - - var oFeatures = new Object() ; - var oFeaturesMatch ; - while( ( oFeaturesMatch = oRegex.PopupFeatures.exec( features ) ) != null ) - { - var sValue = oFeaturesMatch[2] ; - if ( sValue == ( 'yes' || '1' ) ) - oFeatures[ oFeaturesMatch[1] ] = true ; - else if ( ! isNaN( sValue ) && sValue != 0 ) - oFeatures[ oFeaturesMatch[1] ] = sValue ; - } - - // Update all features check boxes. - var aChkFeatures = document.getElementsByName('chkFeature') ; - for ( var i = 0 ; i < aChkFeatures.length ; i++ ) - { - if ( oFeatures[ aChkFeatures[i].value ] ) - aChkFeatures[i].checked = true ; - } - - // Update position and size text boxes. - if ( oFeatures['width'] ) GetE('txtPopupWidth').value = oFeatures['width'] ; - if ( oFeatures['height'] ) GetE('txtPopupHeight').value = oFeatures['height'] ; - if ( oFeatures['left'] ) GetE('txtPopupLeft').value = oFeatures['left'] ; - if ( oFeatures['top'] ) GetE('txtPopupTop').value = oFeatures['top'] ; -} - -//#### The OK button was hit. -function Ok() -{ - var sUri, sInnerHtml ; - oEditor.FCKUndo.SaveUndoStep() ; - - switch ( GetE('cmbLinkType').value ) - { - case 'url' : - sUri = GetE('txtUrl').value ; - - if ( sUri.length == 0 ) - { - alert( FCKLang.DlnLnkMsgNoUrl ) ; - return false ; - } - - sUri = GetE('cmbLinkProtocol').value + sUri ; - - break ; - - case 'email' : - sUri = GetE('txtEMailAddress').value ; - - if ( sUri.length == 0 ) - { - alert( FCKLang.DlnLnkMsgNoEMail ) ; - return false ; - } - - sUri = oParser.CreateEMailUri( - sUri, - GetE('txtEMailSubject').value, - GetE('txtEMailBody').value ) ; - break ; - - case 'anchor' : - var sAnchor = GetE('cmbAnchorName').value ; - if ( sAnchor.length == 0 ) sAnchor = GetE('cmbAnchorId').value ; - - if ( sAnchor.length == 0 ) - { - alert( FCKLang.DlnLnkMsgNoAnchor ) ; - return false ; - } - - sUri = '#' + sAnchor ; - break ; - } - - // If no link is selected, create a new one (it may result in more than one link creation - #220). - var aLinks = oLink ? [ oLink ] : oEditor.FCK.CreateLink( sUri, true ) ; - - // If no selection, no links are created, so use the uri as the link text (by dom, 2006-05-26) - var aHasSelection = ( aLinks.length > 0 ) ; - if ( !aHasSelection ) - { - sInnerHtml = sUri; - - // Built a better text for empty links. - switch ( GetE('cmbLinkType').value ) - { - // anchor: use old behavior --> return true - case 'anchor': - sInnerHtml = sInnerHtml.replace( /^#/, '' ) ; - break ; - - // url: try to get path - case 'url': - var oLinkPathRegEx = new RegExp("//?([^?\"']+)([?].*)?$") ; - var asLinkPath = oLinkPathRegEx.exec( sUri ) ; - if (asLinkPath != null) - sInnerHtml = asLinkPath[1]; // use matched path - break ; - - // mailto: try to get email address - case 'email': - sInnerHtml = GetE('txtEMailAddress').value ; - break ; - } - - // Create a new (empty) anchor. - aLinks = [ oEditor.FCK.InsertElement( 'a' ) ] ; - } - - for ( var i = 0 ; i < aLinks.length ; i++ ) - { - oLink = aLinks[i] ; - - if ( aHasSelection ) - sInnerHtml = oLink.innerHTML ; // Save the innerHTML (IE changes it if it is like an URL). - - oLink.href = sUri ; - SetAttribute( oLink, '_fcksavedurl', sUri ) ; - - var onclick; - // Accessible popups - if( GetE('cmbTarget').value == 'popup' ) - { - onclick = BuildOnClickPopup() ; - // Encode the attribute - onclick = encodeURIComponent( " onclick=\"" + onclick + "\"" ) ; - SetAttribute( oLink, 'onclick_fckprotectedatt', onclick ) ; - } - else - { - // Check if the previous onclick was for a popup: - // In that case remove the onclick handler. - onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; - if ( onclick ) - { - // Decode the protected string - onclick = decodeURIComponent( onclick ) ; - - if( oRegex.OnClickPopup.test( onclick ) ) - SetAttribute( oLink, 'onclick_fckprotectedatt', '' ) ; - } - } - - oLink.innerHTML = sInnerHtml ; // Set (or restore) the innerHTML - - // Target - if( GetE('cmbTarget').value != 'popup' ) - SetAttribute( oLink, 'target', GetE('txtTargetFrame').value ) ; - else - SetAttribute( oLink, 'target', null ) ; - - // Let's set the "id" only for the first link to avoid duplication. - if ( i == 0 ) - SetAttribute( oLink, 'id', GetE('txtAttId').value ) ; - - // Advances Attributes - SetAttribute( oLink, 'name' , GetE('txtAttName').value ) ; - SetAttribute( oLink, 'dir' , GetE('cmbAttLangDir').value ) ; - SetAttribute( oLink, 'lang' , GetE('txtAttLangCode').value ) ; - SetAttribute( oLink, 'accesskey', GetE('txtAttAccessKey').value ) ; - SetAttribute( oLink, 'tabindex' , ( GetE('txtAttTabIndex').value > 0 ? GetE('txtAttTabIndex').value : null ) ) ; - SetAttribute( oLink, 'title' , GetE('txtAttTitle').value ) ; - SetAttribute( oLink, 'type' , GetE('txtAttContentType').value ) ; - SetAttribute( oLink, 'charset' , GetE('txtAttCharSet').value ) ; - - if ( oEditor.FCKBrowserInfo.IsIE ) - { - var sClass = GetE('txtAttClasses').value ; - // If it's also an anchor add an internal class - if ( GetE('txtAttName').value.length != 0 ) - sClass += ' FCK__AnchorC' ; - SetAttribute( oLink, 'className', sClass ) ; - - oLink.style.cssText = GetE('txtAttStyle').value ; - } - else - { - SetAttribute( oLink, 'class', GetE('txtAttClasses').value ) ; - SetAttribute( oLink, 'style', GetE('txtAttStyle').value ) ; - } - } - - // Select the (first) link. - oEditor.FCKSelection.SelectNode( aLinks[0] ); - - return true ; -} - -function BrowseServer() -{ - OpenFileBrowser( FCKConfig.LinkBrowserURL, FCKConfig.LinkBrowserWindowWidth, FCKConfig.LinkBrowserWindowHeight ) ; -} - -function SetUrl( url ) -{ - GetE('txtUrl').value = url ; - OnUrlChange() ; - dialog.SetSelectedTab( 'Info' ) ; -} - -function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) -{ - // Remove animation - window.parent.Throbber.Hide() ; - GetE( 'divUpload' ).style.display = '' ; - - switch ( errorNumber ) - { - case 0 : // No errors - alert( 'Your file has been successfully uploaded' ) ; - break ; - case 1 : // Custom error - alert( customMsg ) ; - return ; - case 101 : // Custom warning - alert( customMsg ) ; - break ; - case 201 : - alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; - break ; - case 202 : - alert( 'Invalid file type' ) ; - return ; - case 203 : - alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; - return ; - case 500 : - alert( 'The connector is disabled' ) ; - break ; - default : - alert( 'Error on file upload. Error number: ' + errorNumber ) ; - return ; - } - - SetUrl( fileUrl ) ; - GetE('frmUpload').reset() ; -} - -var oUploadAllowedExtRegex = new RegExp( FCKConfig.LinkUploadAllowedExtensions, 'i' ) ; -var oUploadDeniedExtRegex = new RegExp( FCKConfig.LinkUploadDeniedExtensions, 'i' ) ; - -function CheckUpload() -{ - var sFile = GetE('txtUploadFile').value ; - - if ( sFile.length == 0 ) - { - alert( 'Please select a file to upload' ) ; - return false ; - } - - if ( ( FCKConfig.LinkUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || - ( FCKConfig.LinkUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) - { - OnUploadCompleted( 202 ) ; - return false ; - } - - // Show animation - window.parent.Throbber.Show( 100 ) ; - GetE( 'divUpload' ).style.display = 'none' ; - - return true ; -} - -function SetDefaultTarget() -{ - var target = FCKConfig.DefaultLinkTarget || '' ; - - if ( oLink || target.length == 0 ) - return ; - - switch ( target ) - { - case '_blank' : - case '_self' : - case '_parent' : - case '_top' : - GetE('cmbTarget').value = target ; - break ; - default : - GetE('cmbTarget').value = 'frame' ; - break ; - } - - GetE('txtTargetFrame').value = target ; -} diff --git a/fckeditor/editor/dialog/fck_listprop.html b/fckeditor/editor/dialog/fck_listprop.html deleted file mode 100644 index ef30a94b..00000000 --- a/fckeditor/editor/dialog/fck_listprop.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - -
        - - - - - -
        - List Type
        - - -   -
        -
        - - diff --git a/fckeditor/editor/dialog/fck_paste.html b/fckeditor/editor/dialog/fck_paste.html deleted file mode 100644 index 40cc6f56..00000000 --- a/fckeditor/editor/dialog/fck_paste.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
        - -
        - Please paste inside the following box using the keyboard - (Ctrl+V) and hit OK.
        -   -
        -
        - -
        - - - -
        - - - -
        - - diff --git a/fckeditor/editor/dialog/fck_radiobutton.html b/fckeditor/editor/dialog/fck_radiobutton.html deleted file mode 100644 index eb9aa5d1..00000000 --- a/fckeditor/editor/dialog/fck_radiobutton.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - Radio Button Properties - - - - - - - - - - -
        - - - - - - - - - - -
        - Name
        - -
        - Value
        - -
        -
        - - diff --git a/fckeditor/editor/dialog/fck_replace.html b/fckeditor/editor/dialog/fck_replace.html deleted file mode 100644 index f334d7f0..00000000 --- a/fckeditor/editor/dialog/fck_replace.html +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/fckeditor/editor/dialog/fck_select.html b/fckeditor/editor/dialog/fck_select.html deleted file mode 100644 index a1735a12..00000000 --- a/fckeditor/editor/dialog/fck_select.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - Select Properties - - - - - - - - - - - -
        - - - - - - - - - - - - - - -
        Name 
        Value 
        Size  lines
        -
        -
        -  Available - Options  - - - - - - - - - - - - - - - - - - -
        Text
        - -
        Value
        - -
        - - -
        -
        - -
           -
        -
        - - diff --git a/fckeditor/editor/dialog/fck_select/fck_select.js b/fckeditor/editor/dialog/fck_select/fck_select.js deleted file mode 100644 index 167e24d6..00000000 --- a/fckeditor/editor/dialog/fck_select/fck_select.js +++ /dev/null @@ -1,194 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Scripts for the fck_select.html page. - */ - -function Select( combo ) -{ - var iIndex = combo.selectedIndex ; - - oListText.selectedIndex = iIndex ; - oListValue.selectedIndex = iIndex ; - - var oTxtText = document.getElementById( "txtText" ) ; - var oTxtValue = document.getElementById( "txtValue" ) ; - - oTxtText.value = oListText.value ; - oTxtValue.value = oListValue.value ; -} - -function Add() -{ - var oTxtText = document.getElementById( "txtText" ) ; - var oTxtValue = document.getElementById( "txtValue" ) ; - - AddComboOption( oListText, oTxtText.value, oTxtText.value ) ; - AddComboOption( oListValue, oTxtValue.value, oTxtValue.value ) ; - - oListText.selectedIndex = oListText.options.length - 1 ; - oListValue.selectedIndex = oListValue.options.length - 1 ; - - oTxtText.value = '' ; - oTxtValue.value = '' ; - - oTxtText.focus() ; -} - -function Modify() -{ - var iIndex = oListText.selectedIndex ; - - if ( iIndex < 0 ) return ; - - var oTxtText = document.getElementById( "txtText" ) ; - var oTxtValue = document.getElementById( "txtValue" ) ; - - oListText.options[ iIndex ].innerHTML = HTMLEncode( oTxtText.value ) ; - oListText.options[ iIndex ].value = oTxtText.value ; - - oListValue.options[ iIndex ].innerHTML = HTMLEncode( oTxtValue.value ) ; - oListValue.options[ iIndex ].value = oTxtValue.value ; - - oTxtText.value = '' ; - oTxtValue.value = '' ; - - oTxtText.focus() ; -} - -function Move( steps ) -{ - ChangeOptionPosition( oListText, steps ) ; - ChangeOptionPosition( oListValue, steps ) ; -} - -function Delete() -{ - RemoveSelectedOptions( oListText ) ; - RemoveSelectedOptions( oListValue ) ; -} - -function SetSelectedValue() -{ - var iIndex = oListValue.selectedIndex ; - if ( iIndex < 0 ) return ; - - var oTxtValue = document.getElementById( "txtSelValue" ) ; - - oTxtValue.value = oListValue.options[ iIndex ].value ; -} - -// Moves the selected option by a number of steps (also negative) -function ChangeOptionPosition( combo, steps ) -{ - var iActualIndex = combo.selectedIndex ; - - if ( iActualIndex < 0 ) - return ; - - var iFinalIndex = iActualIndex + steps ; - - if ( iFinalIndex < 0 ) - iFinalIndex = 0 ; - - if ( iFinalIndex > ( combo.options.length - 1 ) ) - iFinalIndex = combo.options.length - 1 ; - - if ( iActualIndex == iFinalIndex ) - return ; - - var oOption = combo.options[ iActualIndex ] ; - var sText = HTMLDecode( oOption.innerHTML ) ; - var sValue = oOption.value ; - - combo.remove( iActualIndex ) ; - - oOption = AddComboOption( combo, sText, sValue, null, iFinalIndex ) ; - - oOption.selected = true ; -} - -// Remove all selected options from a SELECT object -function RemoveSelectedOptions(combo) -{ - // Save the selected index - var iSelectedIndex = combo.selectedIndex ; - - var oOptions = combo.options ; - - // Remove all selected options - for ( var i = oOptions.length - 1 ; i >= 0 ; i-- ) - { - if (oOptions[i].selected) combo.remove(i) ; - } - - // Reset the selection based on the original selected index - if ( combo.options.length > 0 ) - { - if ( iSelectedIndex >= combo.options.length ) iSelectedIndex = combo.options.length - 1 ; - combo.selectedIndex = iSelectedIndex ; - } -} - -// Add a new option to a SELECT object (combo or list) -function AddComboOption( combo, optionText, optionValue, documentObject, index ) -{ - var oOption ; - - if ( documentObject ) - oOption = documentObject.createElement("OPTION") ; - else - oOption = document.createElement("OPTION") ; - - if ( index != null ) - combo.options.add( oOption, index ) ; - else - combo.options.add( oOption ) ; - - oOption.innerHTML = optionText.length > 0 ? HTMLEncode( optionText ) : ' ' ; - oOption.value = optionValue ; - - return oOption ; -} - -function HTMLEncode( text ) -{ - if ( !text ) - return '' ; - - text = text.replace( /&/g, '&' ) ; - text = text.replace( //g, '>' ) ; - - return text ; -} - - -function HTMLDecode( text ) -{ - if ( !text ) - return '' ; - - text = text.replace( />/g, '>' ) ; - text = text.replace( /</g, '<' ) ; - text = text.replace( /&/g, '&' ) ; - - return text ; -} diff --git a/fckeditor/editor/dialog/fck_smiley.html b/fckeditor/editor/dialog/fck_smiley.html deleted file mode 100644 index 0d6f63fd..00000000 --- a/fckeditor/editor/dialog/fck_smiley.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - -
        - - diff --git a/fckeditor/editor/dialog/fck_source.html b/fckeditor/editor/dialog/fck_source.html deleted file mode 100644 index d66c2811..00000000 --- a/fckeditor/editor/dialog/fck_source.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Source - - - - - - - - - - -
        - - diff --git a/fckeditor/editor/dialog/fck_specialchar.html b/fckeditor/editor/dialog/fck_specialchar.html deleted file mode 100644 index d7fda32d..00000000 --- a/fckeditor/editor/dialog/fck_specialchar.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - -
        - - -
        -
             - - - - -
         
        -
        - - diff --git a/fckeditor/editor/dialog/fck_spellerpages.html b/fckeditor/editor/dialog/fck_spellerpages.html deleted file mode 100644 index 87cf2c47..00000000 --- a/fckeditor/editor/dialog/fck_spellerpages.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - Spell Check - - - - - - - - - - - diff --git a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html b/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.html deleted file mode 100644 index e69de29b..00000000 diff --git a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js b/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js deleted file mode 100644 index 80af8499..00000000 --- a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.js +++ /dev/null @@ -1,87 +0,0 @@ -//////////////////////////////////////////////////// -// controlWindow object -//////////////////////////////////////////////////// -function controlWindow( controlForm ) { - // private properties - this._form = controlForm; - - // public properties - this.windowType = "controlWindow"; -// this.noSuggestionSelection = "- No suggestions -"; // by FredCK - this.noSuggestionSelection = FCKLang.DlgSpellNoSuggestions ; - // set up the properties for elements of the given control form - this.suggestionList = this._form.sugg; - this.evaluatedText = this._form.misword; - this.replacementText = this._form.txtsugg; - this.undoButton = this._form.btnUndo; - - // public methods - this.addSuggestion = addSuggestion; - this.clearSuggestions = clearSuggestions; - this.selectDefaultSuggestion = selectDefaultSuggestion; - this.resetForm = resetForm; - this.setSuggestedText = setSuggestedText; - this.enableUndo = enableUndo; - this.disableUndo = disableUndo; -} - -function resetForm() { - if( this._form ) { - this._form.reset(); - } -} - -function setSuggestedText() { - var slct = this.suggestionList; - var txt = this.replacementText; - var str = ""; - if( (slct.options[0].text) && slct.options[0].text != this.noSuggestionSelection ) { - str = slct.options[slct.selectedIndex].text; - } - txt.value = str; -} - -function selectDefaultSuggestion() { - var slct = this.suggestionList; - var txt = this.replacementText; - if( slct.options.length == 0 ) { - this.addSuggestion( this.noSuggestionSelection ); - } else { - slct.options[0].selected = true; - } - this.setSuggestedText(); -} - -function addSuggestion( sugg_text ) { - var slct = this.suggestionList; - if( sugg_text ) { - var i = slct.options.length; - var newOption = new Option( sugg_text, 'sugg_text'+i ); - slct.options[i] = newOption; - } -} - -function clearSuggestions() { - var slct = this.suggestionList; - for( var j = slct.length - 1; j > -1; j-- ) { - if( slct.options[j] ) { - slct.options[j] = null; - } - } -} - -function enableUndo() { - if( this.undoButton ) { - if( this.undoButton.disabled == true ) { - this.undoButton.disabled = false; - } - } -} - -function disableUndo() { - if( this.undoButton ) { - if( this.undoButton.disabled == false ) { - this.undoButton.disabled = true; - } - } -} diff --git a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html b/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html deleted file mode 100644 index d91bcce2..00000000 --- a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - -
        - - - - - - - - - - - - - - - - - - -
        Not in dictionary:
        Change to:
        - - - - - - - -
        - -
        - -
        -
           - - - - - - - - - - - - - - - - - - - - - - -
        - -    - -
        - -    - -
        - -    - -
        -
        -
        - - diff --git a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm b/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm deleted file mode 100644 index 27e368e8..00000000 --- a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]+>", " ", "all")> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php b/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php deleted file mode 100644 index 9c747c91..00000000 --- a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +++ /dev/null @@ -1,199 +0,0 @@ -$val ) { - # $val = str_replace( "'", "%27", $val ); - echo "textinputs[$key] = decodeURIComponent(\"" . $val . "\");\n"; - } -} - -# make declarations for the text input index -function print_textindex_decl( $text_input_idx ) { - echo "words[$text_input_idx] = [];\n"; - echo "suggs[$text_input_idx] = [];\n"; -} - -# set an element of the JavaScript 'words' array to a misspelled word -function print_words_elem( $word, $index, $text_input_idx ) { - echo "words[$text_input_idx][$index] = '" . escape_quote( $word ) . "';\n"; -} - - -# set an element of the JavaScript 'suggs' array to a list of suggestions -function print_suggs_elem( $suggs, $index, $text_input_idx ) { - echo "suggs[$text_input_idx][$index] = ["; - foreach( $suggs as $key=>$val ) { - if( $val ) { - echo "'" . escape_quote( $val ) . "'"; - if ( $key+1 < count( $suggs )) { - echo ", "; - } - } - } - echo "];\n"; -} - -# escape single quote -function escape_quote( $str ) { - return preg_replace ( "/'/", "\\'", $str ); -} - - -# handle a server-side error. -function error_handler( $err ) { - echo "error = '" . preg_replace( "/['\\\\]/", "\\\\$0", $err ) . "';\n"; -} - -## get the list of misspelled words. Put the results in the javascript words array -## for each misspelled word, get suggestions and put in the javascript suggs array -function print_checker_results() { - - global $aspell_prog; - global $aspell_opts; - global $tempfiledir; - global $textinputs; - global $input_separator; - $aspell_err = ""; - # create temp file - $tempfile = tempnam( $tempfiledir, 'aspell_data_' ); - - # open temp file, add the submitted text. - if( $fh = fopen( $tempfile, 'w' )) { - for( $i = 0; $i < count( $textinputs ); $i++ ) { - $text = urldecode( $textinputs[$i] ); - - // Strip all tags for the text. (by FredCK - #339 / #681) - $text = preg_replace( "/<[^>]+>/", " ", $text ) ; - - $lines = explode( "\n", $text ); - fwrite ( $fh, "%\n" ); # exit terse mode - fwrite ( $fh, "^$input_separator\n" ); - fwrite ( $fh, "!\n" ); # enter terse mode - foreach( $lines as $key=>$value ) { - # use carat on each line to escape possible aspell commands - fwrite( $fh, "^$value\n" ); - } - } - fclose( $fh ); - - # exec aspell command - redirect STDERR to STDOUT - $cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1"; - if( $aspellret = shell_exec( $cmd )) { - $linesout = explode( "\n", $aspellret ); - $index = 0; - $text_input_index = -1; - # parse each line of aspell return - foreach( $linesout as $key=>$val ) { - $chardesc = substr( $val, 0, 1 ); - # if '&', then not in dictionary but has suggestions - # if '#', then not in dictionary and no suggestions - # if '*', then it is a delimiter between text inputs - # if '@' then version info - if( $chardesc == '&' || $chardesc == '#' ) { - $line = explode( " ", $val, 5 ); - print_words_elem( $line[1], $index, $text_input_index ); - if( isset( $line[4] )) { - $suggs = explode( ", ", $line[4] ); - } else { - $suggs = array(); - } - print_suggs_elem( $suggs, $index, $text_input_index ); - $index++; - } elseif( $chardesc == '*' ) { - $text_input_index++; - print_textindex_decl( $text_input_index ); - $index = 0; - } elseif( $chardesc != '@' && $chardesc != "" ) { - # assume this is error output - $aspell_err .= $val; - } - } - if( $aspell_err ) { - $aspell_err = "Error executing `$cmd`\\n$aspell_err"; - error_handler( $aspell_err ); - } - } else { - error_handler( "System error: Aspell program execution failed (`$cmd`)" ); - } - } else { - error_handler( "System error: Could not open file '$tempfile' for writing" ); - } - - # close temp file, delete file - unlink( $tempfile ); -} - - -?> - - - - - - - - - - - - - - - diff --git a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl b/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl deleted file mode 100644 index fae010d9..00000000 --- a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +++ /dev/null @@ -1,181 +0,0 @@ -#!/usr/bin/perl - -use CGI qw/ :standard /; -use File::Temp qw/ tempfile tempdir /; - -# my $spellercss = '/speller/spellerStyle.css'; # by FredCK -my $spellercss = '../spellerStyle.css'; # by FredCK -# my $wordWindowSrc = '/speller/wordWindow.js'; # by FredCK -my $wordWindowSrc = '../wordWindow.js'; # by FredCK -my @textinputs = param( 'textinputs[]' ); # array -# my $aspell_cmd = 'aspell'; # by FredCK (for Linux) -my $aspell_cmd = '"C:\Program Files\Aspell\bin\aspell.exe"'; # by FredCK (for Windows) -my $lang = 'en_US'; -# my $aspell_opts = "-a --lang=$lang --encoding=utf-8"; # by FredCK -my $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H --rem-sgml-check=alt"; # by FredCK -my $input_separator = "A"; - -# set the 'wordtext' JavaScript variable to the submitted text. -sub printTextVar { - for( my $i = 0; $i <= $#textinputs; $i++ ) { - print "textinputs[$i] = decodeURIComponent('" . escapeQuote( $textinputs[$i] ) . "')\n"; - } -} - -sub printTextIdxDecl { - my $idx = shift; - print "words[$idx] = [];\n"; - print "suggs[$idx] = [];\n"; -} - -sub printWordsElem { - my( $textIdx, $wordIdx, $word ) = @_; - print "words[$textIdx][$wordIdx] = '" . escapeQuote( $word ) . "';\n"; -} - -sub printSuggsElem { - my( $textIdx, $wordIdx, @suggs ) = @_; - print "suggs[$textIdx][$wordIdx] = ["; - for my $i ( 0..$#suggs ) { - print "'" . escapeQuote( $suggs[$i] ) . "'"; - if( $i < $#suggs ) { - print ", "; - } - } - print "];\n"; -} - -sub printCheckerResults { - my $textInputIdx = -1; - my $wordIdx = 0; - my $unhandledText; - # create temp file - my $dir = tempdir( CLEANUP => 1 ); - my( $fh, $tmpfilename ) = tempfile( DIR => $dir ); - - # temp file was created properly? - - # open temp file, add the submitted text. - for( my $i = 0; $i <= $#textinputs; $i++ ) { - $text = url_decode( $textinputs[$i] ); - # Strip all tags for the text. (by FredCK - #339 / #681) - $text =~ s/<[^>]+>/ /g; - @lines = split( /\n/, $text ); - print $fh "\%\n"; # exit terse mode - print $fh "^$input_separator\n"; - print $fh "!\n"; # enter terse mode - for my $line ( @lines ) { - # use carat on each line to escape possible aspell commands - print $fh "^$line\n"; - } - - } - # exec aspell command - my $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1"; - open ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\n$!" ) and return; - # parse each line of aspell return - for my $ret ( ) { - chomp( $ret ); - # if '&', then not in dictionary but has suggestions - # if '#', then not in dictionary and no suggestions - # if '*', then it is a delimiter between text inputs - if( $ret =~ /^\*/ ) { - $textInputIdx++; - printTextIdxDecl( $textInputIdx ); - $wordIdx = 0; - - } elsif( $ret =~ /^(&|#)/ ) { - my @tokens = split( " ", $ret, 5 ); - printWordsElem( $textInputIdx, $wordIdx, $tokens[1] ); - my @suggs = (); - if( $tokens[4] ) { - @suggs = split( ", ", $tokens[4] ); - } - printSuggsElem( $textInputIdx, $wordIdx, @suggs ); - $wordIdx++; - } else { - $unhandledText .= $ret; - } - } - close ASPELL or handleError( "Error executing `$cmd`\\n$unhandledText" ) and return; -} - -sub escapeQuote { - my $str = shift; - $str =~ s/'/\\'/g; - return $str; -} - -sub handleError { - my $err = shift; - print "error = '" . escapeQuote( $err ) . "';\n"; -} - -sub url_decode { - local $_ = @_ ? shift : $_; - defined or return; - # change + signs to spaces - tr/+/ /; - # change hex escapes to the proper characters - s/%([a-fA-F0-9]{2})/pack "H2", $1/eg; - return $_; -} - -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# Display HTML -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -print < - - - - - - - - - - - - - -EOF diff --git a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js b/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js deleted file mode 100644 index c85be9ab..00000000 --- a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +++ /dev/null @@ -1,461 +0,0 @@ -//////////////////////////////////////////////////// -// spellChecker.js -// -// spellChecker object -// -// This file is sourced on web pages that have a textarea object to evaluate -// for spelling. It includes the implementation for the spellCheckObject. -// -//////////////////////////////////////////////////// - - -// constructor -function spellChecker( textObject ) { - - // public properties - configurable -// this.popUpUrl = '/speller/spellchecker.html'; // by FredCK - this.popUpUrl = 'fck_spellerpages/spellerpages/spellchecker.html'; // by FredCK - this.popUpName = 'spellchecker'; -// this.popUpProps = "menu=no,width=440,height=350,top=70,left=120,resizable=yes,status=yes"; // by FredCK - this.popUpProps = null ; // by FredCK -// this.spellCheckScript = '/speller/server-scripts/spellchecker.php'; // by FredCK - //this.spellCheckScript = '/cgi-bin/spellchecker.pl'; - - // values used to keep track of what happened to a word - this.replWordFlag = "R"; // single replace - this.ignrWordFlag = "I"; // single ignore - this.replAllFlag = "RA"; // replace all occurances - this.ignrAllFlag = "IA"; // ignore all occurances - this.fromReplAll = "~RA"; // an occurance of a "replace all" word - this.fromIgnrAll = "~IA"; // an occurance of a "ignore all" word - // properties set at run time - this.wordFlags = new Array(); - this.currentTextIndex = 0; - this.currentWordIndex = 0; - this.spellCheckerWin = null; - this.controlWin = null; - this.wordWin = null; - this.textArea = textObject; // deprecated - this.textInputs = arguments; - - // private methods - this._spellcheck = _spellcheck; - this._getSuggestions = _getSuggestions; - this._setAsIgnored = _setAsIgnored; - this._getTotalReplaced = _getTotalReplaced; - this._setWordText = _setWordText; - this._getFormInputs = _getFormInputs; - - // public methods - this.openChecker = openChecker; - this.startCheck = startCheck; - this.checkTextBoxes = checkTextBoxes; - this.checkTextAreas = checkTextAreas; - this.spellCheckAll = spellCheckAll; - this.ignoreWord = ignoreWord; - this.ignoreAll = ignoreAll; - this.replaceWord = replaceWord; - this.replaceAll = replaceAll; - this.terminateSpell = terminateSpell; - this.undo = undo; - - // set the current window's "speller" property to the instance of this class. - // this object can now be referenced by child windows/frames. - window.speller = this; -} - -// call this method to check all text boxes (and only text boxes) in the HTML document -function checkTextBoxes() { - this.textInputs = this._getFormInputs( "^text$" ); - this.openChecker(); -} - -// call this method to check all textareas (and only textareas ) in the HTML document -function checkTextAreas() { - this.textInputs = this._getFormInputs( "^textarea$" ); - this.openChecker(); -} - -// call this method to check all text boxes and textareas in the HTML document -function spellCheckAll() { - this.textInputs = this._getFormInputs( "^text(area)?$" ); - this.openChecker(); -} - -// call this method to check text boxe(s) and/or textarea(s) that were passed in to the -// object's constructor or to the textInputs property -function openChecker() { - this.spellCheckerWin = window.open( this.popUpUrl, this.popUpName, this.popUpProps ); - if( !this.spellCheckerWin.opener ) { - this.spellCheckerWin.opener = window; - } -} - -function startCheck( wordWindowObj, controlWindowObj ) { - - // set properties from args - this.wordWin = wordWindowObj; - this.controlWin = controlWindowObj; - - // reset properties - this.wordWin.resetForm(); - this.controlWin.resetForm(); - this.currentTextIndex = 0; - this.currentWordIndex = 0; - // initialize the flags to an array - one element for each text input - this.wordFlags = new Array( this.wordWin.textInputs.length ); - // each element will be an array that keeps track of each word in the text - for( var i=0; i wi ) || i > ti ) { - // future word: set as "from ignore all" if - // 1) do not already have a flag and - // 2) have the same value as current word - if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl ) - && ( !this.wordFlags[i][j] )) { - this._setAsIgnored( i, j, this.fromIgnrAll ); - } - } - } - } - - // finally, move on - this.currentWordIndex++; - this._spellcheck(); - return true; -} - -function replaceWord() { - var wi = this.currentWordIndex; - var ti = this.currentTextIndex; - if( !this.wordWin ) { - alert( 'Error: Word frame not available.' ); - return false; - } - if( !this.wordWin.getTextVal( ti, wi )) { - alert( 'Error: "Not in dictionary" text is missing' ); - return false; - } - if( !this.controlWin.replacementText ) { - return false ; - } - var txt = this.controlWin.replacementText; - if( txt.value ) { - var newspell = new String( txt.value ); - if( this._setWordText( ti, wi, newspell, this.replWordFlag )) { - this.currentWordIndex++; - this._spellcheck(); - } - } - return true; -} - -function replaceAll() { - var ti = this.currentTextIndex; - var wi = this.currentWordIndex; - if( !this.wordWin ) { - alert( 'Error: Word frame not available.' ); - return false; - } - var s_word_to_repl = this.wordWin.getTextVal( ti, wi ); - if( !s_word_to_repl ) { - alert( 'Error: "Not in dictionary" text is missing' ); - return false; - } - var txt = this.controlWin.replacementText; - if( !txt.value ) return false; - var newspell = new String( txt.value ); - - // set this word as a "replace all" word. - this._setWordText( ti, wi, newspell, this.replAllFlag ); - - // loop through all the words after this word - for( var i = ti; i < this.wordWin.textInputs.length; i++ ) { - for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) { - if(( i == ti && j > wi ) || i > ti ) { - // future word: set word text to s_word_to_repl if - // 1) do not already have a flag and - // 2) have the same value as s_word_to_repl - if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl ) - && ( !this.wordFlags[i][j] )) { - this._setWordText( i, j, newspell, this.fromReplAll ); - } - } - } - } - - // finally, move on - this.currentWordIndex++; - this._spellcheck(); - return true; -} - -function terminateSpell() { - // called when we have reached the end of the spell checking. - var msg = ""; // by FredCK - var numrepl = this._getTotalReplaced(); - if( numrepl == 0 ) { - // see if there were no misspellings to begin with - if( !this.wordWin ) { - msg = ""; - } else { - if( this.wordWin.totalMisspellings() ) { -// msg += "No words changed."; // by FredCK - msg += FCKLang.DlgSpellNoChanges ; // by FredCK - } else { -// msg += "No misspellings found."; // by FredCK - msg += FCKLang.DlgSpellNoMispell ; // by FredCK - } - } - } else if( numrepl == 1 ) { -// msg += "One word changed."; // by FredCK - msg += FCKLang.DlgSpellOneChange ; // by FredCK - } else { -// msg += numrepl + " words changed."; // by FredCK - msg += FCKLang.DlgSpellManyChanges.replace( /%1/g, numrepl ) ; - } - if( msg ) { -// msg += "\n"; // by FredCK - alert( msg ); - } - - if( numrepl > 0 ) { - // update the text field(s) on the opener window - for( var i = 0; i < this.textInputs.length; i++ ) { - // this.textArea.value = this.wordWin.text; - if( this.wordWin ) { - if( this.wordWin.textInputs[i] ) { - this.textInputs[i].value = this.wordWin.textInputs[i]; - } - } - } - } - - // return back to the calling window -// this.spellCheckerWin.close(); // by FredCK - if ( typeof( this.OnFinished ) == 'function' ) // by FredCK - this.OnFinished(numrepl) ; // by FredCK - - return true; -} - -function undo() { - // skip if this is the first word! - var ti = this.currentTextIndex; - var wi = this.currentWordIndex; - - if( this.wordWin.totalPreviousWords( ti, wi ) > 0 ) { - this.wordWin.removeFocus( ti, wi ); - - // go back to the last word index that was acted upon - do { - // if the current word index is zero then reset the seed - if( this.currentWordIndex == 0 && this.currentTextIndex > 0 ) { - this.currentTextIndex--; - this.currentWordIndex = this.wordWin.totalWords( this.currentTextIndex )-1; - if( this.currentWordIndex < 0 ) this.currentWordIndex = 0; - } else { - if( this.currentWordIndex > 0 ) { - this.currentWordIndex--; - } - } - } while ( - this.wordWin.totalWords( this.currentTextIndex ) == 0 - || this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromIgnrAll - || this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromReplAll - ); - - var text_idx = this.currentTextIndex; - var idx = this.currentWordIndex; - var preReplSpell = this.wordWin.originalSpellings[text_idx][idx]; - - // if we got back to the first word then set the Undo button back to disabled - if( this.wordWin.totalPreviousWords( text_idx, idx ) == 0 ) { - this.controlWin.disableUndo(); - } - - var i, j, origSpell ; - // examine what happened to this current word. - switch( this.wordFlags[text_idx][idx] ) { - // replace all: go through this and all the future occurances of the word - // and revert them all to the original spelling and clear their flags - case this.replAllFlag : - for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) { - for( j = 0; j < this.wordWin.totalWords( i ); j++ ) { - if(( i == text_idx && j >= idx ) || i > text_idx ) { - origSpell = this.wordWin.originalSpellings[i][j]; - if( origSpell == preReplSpell ) { - this._setWordText ( i, j, origSpell, undefined ); - } - } - } - } - break; - - // ignore all: go through all the future occurances of the word - // and clear their flags - case this.ignrAllFlag : - for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) { - for( j = 0; j < this.wordWin.totalWords( i ); j++ ) { - if(( i == text_idx && j >= idx ) || i > text_idx ) { - origSpell = this.wordWin.originalSpellings[i][j]; - if( origSpell == preReplSpell ) { - this.wordFlags[i][j] = undefined; - } - } - } - } - break; - - // replace: revert the word to its original spelling - case this.replWordFlag : - this._setWordText ( text_idx, idx, preReplSpell, undefined ); - break; - } - - // For all four cases, clear the wordFlag of this word. re-start the process - this.wordFlags[text_idx][idx] = undefined; - this._spellcheck(); - } -} - -function _spellcheck() { - var ww = this.wordWin; - - // check if this is the last word in the current text element - if( this.currentWordIndex == ww.totalWords( this.currentTextIndex) ) { - this.currentTextIndex++; - this.currentWordIndex = 0; - // keep going if we're not yet past the last text element - if( this.currentTextIndex < this.wordWin.textInputs.length ) { - this._spellcheck(); - return; - } else { - this.terminateSpell(); - return; - } - } - - // if this is after the first one make sure the Undo button is enabled - if( this.currentWordIndex > 0 ) { - this.controlWin.enableUndo(); - } - - // skip the current word if it has already been worked on - if( this.wordFlags[this.currentTextIndex][this.currentWordIndex] ) { - // increment the global current word index and move on. - this.currentWordIndex++; - this._spellcheck(); - } else { - var evalText = ww.getTextVal( this.currentTextIndex, this.currentWordIndex ); - if( evalText ) { - this.controlWin.evaluatedText.value = evalText; - ww.setFocus( this.currentTextIndex, this.currentWordIndex ); - this._getSuggestions( this.currentTextIndex, this.currentWordIndex ); - } - } -} - -function _getSuggestions( text_num, word_num ) { - this.controlWin.clearSuggestions(); - // add suggestion in list for each suggested word. - // get the array of suggested words out of the - // three-dimensional array containing all suggestions. - var a_suggests = this.wordWin.suggestions[text_num][word_num]; - if( a_suggests ) { - // got an array of suggestions. - for( var ii = 0; ii < a_suggests.length; ii++ ) { - this.controlWin.addSuggestion( a_suggests[ii] ); - } - } - this.controlWin.selectDefaultSuggestion(); -} - -function _setAsIgnored( text_num, word_num, flag ) { - // set the UI - this.wordWin.removeFocus( text_num, word_num ); - // do the bookkeeping - this.wordFlags[text_num][word_num] = flag; - return true; -} - -function _getTotalReplaced() { - var i_replaced = 0; - for( var i = 0; i < this.wordFlags.length; i++ ) { - for( var j = 0; j < this.wordFlags[i].length; j++ ) { - if(( this.wordFlags[i][j] == this.replWordFlag ) - || ( this.wordFlags[i][j] == this.replAllFlag ) - || ( this.wordFlags[i][j] == this.fromReplAll )) { - i_replaced++; - } - } - } - return i_replaced; -} - -function _setWordText( text_num, word_num, newText, flag ) { - // set the UI and form inputs - this.wordWin.setText( text_num, word_num, newText ); - // keep track of what happened to this word: - this.wordFlags[text_num][word_num] = flag; - return true; -} - -function _getFormInputs( inputPattern ) { - var inputs = new Array(); - for( var i = 0; i < document.forms.length; i++ ) { - for( var j = 0; j < document.forms[i].elements.length; j++ ) { - if( document.forms[i].elements[j].type.match( inputPattern )) { - inputs[inputs.length] = document.forms[i].elements[j]; - } - } - } - return inputs; -} diff --git a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html b/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html deleted file mode 100644 index cbcd7db7..00000000 --- a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - -Speller Pages - - - - - - diff --git a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css b/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css deleted file mode 100644 index 9928086e..00000000 --- a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +++ /dev/null @@ -1,49 +0,0 @@ -.blend { - font-family: courier new; - font-size: 10pt; - border: 0; - margin-bottom:-1; -} -.normalLabel { - font-size:8pt; -} -.normalText { - font-family:arial, helvetica, sans-serif; - font-size:10pt; - color:000000; - background-color:FFFFFF; -} -.plainText { - font-family: courier new, courier, monospace; - font-size: 10pt; - color:000000; - background-color:FFFFFF; -} -.controlWindowBody { - font-family:arial, helvetica, sans-serif; - font-size:8pt; - padding: 7px ; /* by FredCK */ - margin: 0px ; /* by FredCK */ - /* color:000000; by FredCK */ - /* background-color:DADADA; by FredCK */ -} -.readonlyInput { - background-color:DADADA; - color:000000; - font-size:8pt; - width:392px; -} -.textDefault { - font-size:8pt; - width: 200px; -} -.buttonDefault { - width:90px; - height:22px; - font-size:8pt; -} -.suggSlct { - width:200px; - margin-top:2; - font-size:8pt; -} diff --git a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js b/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js deleted file mode 100644 index 7990296a..00000000 --- a/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js +++ /dev/null @@ -1,272 +0,0 @@ -//////////////////////////////////////////////////// -// wordWindow object -//////////////////////////////////////////////////// -function wordWindow() { - // private properties - this._forms = []; - - // private methods - this._getWordObject = _getWordObject; - //this._getSpellerObject = _getSpellerObject; - this._wordInputStr = _wordInputStr; - this._adjustIndexes = _adjustIndexes; - this._isWordChar = _isWordChar; - this._lastPos = _lastPos; - - // public properties - this.wordChar = /[a-zA-Z]/; - this.windowType = "wordWindow"; - this.originalSpellings = new Array(); - this.suggestions = new Array(); - this.checkWordBgColor = "pink"; - this.normWordBgColor = "white"; - this.text = ""; - this.textInputs = new Array(); - this.indexes = new Array(); - //this.speller = this._getSpellerObject(); - - // public methods - this.resetForm = resetForm; - this.totalMisspellings = totalMisspellings; - this.totalWords = totalWords; - this.totalPreviousWords = totalPreviousWords; - //this.getTextObjectArray = getTextObjectArray; - this.getTextVal = getTextVal; - this.setFocus = setFocus; - this.removeFocus = removeFocus; - this.setText = setText; - //this.getTotalWords = getTotalWords; - this.writeBody = writeBody; - this.printForHtml = printForHtml; -} - -function resetForm() { - if( this._forms ) { - for( var i = 0; i < this._forms.length; i++ ) { - this._forms[i].reset(); - } - } - return true; -} - -function totalMisspellings() { - var total_words = 0; - for( var i = 0; i < this.textInputs.length; i++ ) { - total_words += this.totalWords( i ); - } - return total_words; -} - -function totalWords( textIndex ) { - return this.originalSpellings[textIndex].length; -} - -function totalPreviousWords( textIndex, wordIndex ) { - var total_words = 0; - for( var i = 0; i <= textIndex; i++ ) { - for( var j = 0; j < this.totalWords( i ); j++ ) { - if( i == textIndex && j == wordIndex ) { - break; - } else { - total_words++; - } - } - } - return total_words; -} - -//function getTextObjectArray() { -// return this._form.elements; -//} - -function getTextVal( textIndex, wordIndex ) { - var word = this._getWordObject( textIndex, wordIndex ); - if( word ) { - return word.value; - } -} - -function setFocus( textIndex, wordIndex ) { - var word = this._getWordObject( textIndex, wordIndex ); - if( word ) { - if( word.type == "text" ) { - word.focus(); - word.style.backgroundColor = this.checkWordBgColor; - } - } -} - -function removeFocus( textIndex, wordIndex ) { - var word = this._getWordObject( textIndex, wordIndex ); - if( word ) { - if( word.type == "text" ) { - word.blur(); - word.style.backgroundColor = this.normWordBgColor; - } - } -} - -function setText( textIndex, wordIndex, newText ) { - var word = this._getWordObject( textIndex, wordIndex ); - var beginStr; - var endStr; - if( word ) { - var pos = this.indexes[textIndex][wordIndex]; - var oldText = word.value; - // update the text given the index of the string - beginStr = this.textInputs[textIndex].substring( 0, pos ); - endStr = this.textInputs[textIndex].substring( - pos + oldText.length, - this.textInputs[textIndex].length - ); - this.textInputs[textIndex] = beginStr + newText + endStr; - - // adjust the indexes on the stack given the differences in - // length between the new word and old word. - var lengthDiff = newText.length - oldText.length; - this._adjustIndexes( textIndex, wordIndex, lengthDiff ); - - word.size = newText.length; - word.value = newText; - this.removeFocus( textIndex, wordIndex ); - } -} - - -function writeBody() { - var d = window.document; - var is_html = false; - - d.open(); - - // iterate through each text input. - for( var txtid = 0; txtid < this.textInputs.length; txtid++ ) { - var end_idx = 0; - var begin_idx = 0; - d.writeln( '
        ' ); - var wordtxt = this.textInputs[txtid]; - this.indexes[txtid] = []; - - if( wordtxt ) { - var orig = this.originalSpellings[txtid]; - if( !orig ) break; - - //!!! plain text, or HTML mode? - d.writeln( '
        ' ); - // iterate through each occurrence of a misspelled word. - for( var i = 0; i < orig.length; i++ ) { - // find the position of the current misspelled word, - // starting at the last misspelled word. - // and keep looking if it's a substring of another word - do { - begin_idx = wordtxt.indexOf( orig[i], end_idx ); - end_idx = begin_idx + orig[i].length; - // word not found? messed up! - if( begin_idx == -1 ) break; - // look at the characters immediately before and after - // the word. If they are word characters we'll keep looking. - var before_char = wordtxt.charAt( begin_idx - 1 ); - var after_char = wordtxt.charAt( end_idx ); - } while ( - this._isWordChar( before_char ) - || this._isWordChar( after_char ) - ); - - // keep track of its position in the original text. - this.indexes[txtid][i] = begin_idx; - - // write out the characters before the current misspelled word - for( var j = this._lastPos( txtid, i ); j < begin_idx; j++ ) { - // !!! html mode? make it html compatible - d.write( this.printForHtml( wordtxt.charAt( j ))); - } - - // write out the misspelled word. - d.write( this._wordInputStr( orig[i] )); - - // if it's the last word, write out the rest of the text - if( i == orig.length-1 ){ - d.write( printForHtml( wordtxt.substr( end_idx ))); - } - } - - d.writeln( '
        ' ); - - } - d.writeln( '
        ' ); - } - //for ( var j = 0; j < d.forms.length; j++ ) { - // alert( d.forms[j].name ); - // for( var k = 0; k < d.forms[j].elements.length; k++ ) { - // alert( d.forms[j].elements[k].name + ": " + d.forms[j].elements[k].value ); - // } - //} - - // set the _forms property - this._forms = d.forms; - d.close(); -} - -// return the character index in the full text after the last word we evaluated -function _lastPos( txtid, idx ) { - if( idx > 0 ) - return this.indexes[txtid][idx-1] + this.originalSpellings[txtid][idx-1].length; - else - return 0; -} - -function printForHtml( n ) { - return n ; // by FredCK -/* - var htmlstr = n; - if( htmlstr.length == 1 ) { - // do simple case statement if it's just one character - switch ( n ) { - case "\n": - htmlstr = '
        '; - break; - case "<": - htmlstr = '<'; - break; - case ">": - htmlstr = '>'; - break; - } - return htmlstr; - } else { - htmlstr = htmlstr.replace( //g, '>' ); - htmlstr = htmlstr.replace( /\n/g, '
        ' ); - return htmlstr; - } -*/ -} - -function _isWordChar( letter ) { - if( letter.search( this.wordChar ) == -1 ) { - return false; - } else { - return true; - } -} - -function _getWordObject( textIndex, wordIndex ) { - if( this._forms[textIndex] ) { - if( this._forms[textIndex].elements[wordIndex] ) { - return this._forms[textIndex].elements[wordIndex]; - } - } - return null; -} - -function _wordInputStr( word ) { - var str = ''; - return str; -} - -function _adjustIndexes( textIndex, wordIndex, lengthDiff ) { - for( var i = wordIndex + 1; i < this.originalSpellings[textIndex].length; i++ ) { - this.indexes[textIndex][i] = this.indexes[textIndex][i] + lengthDiff; - } -} diff --git a/fckeditor/editor/dialog/fck_table.html b/fckeditor/editor/dialog/fck_table.html deleted file mode 100644 index e3792d74..00000000 --- a/fckeditor/editor/dialog/fck_table.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - Table Properties - - - - - - - - - - -
        - - - - - - -
        - - - - - - - - - - - - - - - - - - - - - -
        - Rows: -  
        - Columns: -  
        -   -  
        - Border size: -  
        - Alignment: -  
        -
        -     - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - Width: -   -  
        - Height: -   -  pixels
        -   -   -  
        - Cell spacing: -   -  
        - Cell padding: -   -  
        -
        - - - - - - - - - - - -
        - Caption -   -
        - Summary -   -
        -
        - - diff --git a/fckeditor/editor/dialog/fck_tablecell.html b/fckeditor/editor/dialog/fck_tablecell.html deleted file mode 100644 index 3d742962..00000000 --- a/fckeditor/editor/dialog/fck_tablecell.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - Table Cell Properties - - - - - - - - - - -
        - - - - - - -
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - Width: -   
        - Height: -   pixels
        -   -  
        - Word Wrap: -  
        -   -  
        - Horizontal Alignment: -  
        - Vertical Alignment: -  
        -
        -     - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - Rows Span: -   - -
        - Columns Span: -   - -
        -   -   -  
        - Background Color: -   -   -
        - Border Color: -   -   -
        -
        -
        - - diff --git a/fckeditor/editor/dialog/fck_template.html b/fckeditor/editor/dialog/fck_template.html deleted file mode 100644 index 4f3629ba..00000000 --- a/fckeditor/editor/dialog/fck_template.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
        - Please select the template to open in the editor
        - (the actual contents will be lost):
        -
        -
        - - -
        -
        - - diff --git a/fckeditor/editor/dialog/fck_template/images/template1.gif b/fckeditor/editor/dialog/fck_template/images/template1.gif deleted file mode 100644 index efdabbebd4503ceb55c948fa73b9b83cbd373e57..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 375 zcmV--0f_!bNk%w1VPpVC0FeLyva+%O00960{{R30A^8LV00000EC2ui0Av7000092 zgpaAq?GK}zwAu@W-n{z{hT=$;9b%^H%BpA!$8!13_AS@=&Xal%3~GMDB95pDD3{Ep z^T{;k4xj+g%7JRP+$IPq!1Bb&uKB$DQa@x|8x8NO4b`hO25#TOnRw~9=3yE0xyeE4CQ8$(2)Mz>8udZCXX=BRr7DZbW_#-a zYZEHlJM(KAEc4dditDMnJ4(CC+&uK06fIp0D*Z|wX5EYpGb{?;a*WKVoEoWp!Y!`y zeo4*}FFC(bZf@duda#%D-q zaHzPUxA@lRm;@PFNk%w1VPpVC0FeLyva+%O00960{{R30A^8LV00000EC2ui0Av7000092 zgpaAq?GK}zwAu@W-n{z{hT=$;9b%^H%BpA!$8!13_AS@=&Xal%3~GMDB93TG#*l%g z^9hYgr_`$T`us4l+^+W<)gC_JviY3#AeC&_xD98m<8-m1jvsB&<_@0q~XXRsCap^IRqK$(K#c!N9pBf82AawVH$?WN){q&IjedXiz+EX zOS+od%WDgp+d909toAG5`lTy-9D18rOxWx+T}>D*o&1Qa9n5V^96nACtqfi*?*05t zZSMX~zfpQ^<%jRPUfiDEO8=eEuB)DKv}S_cJW8uTxqL`=(AMXYB~Aenu4SM=e_ zrj6M`kqsZ_xrlC}y^5evW>krApudqWP2zFM5Fo{b%sA$2wGU)SI5vkKVQCad(WEn$ zGF`IFr&KONpB8ayRSwduHn4I{;q@zxs8h=VDkqjl*t8(;n#c+zd*_U=jy QeEa(S3plV~2n7HDJNoX*`2YX_ diff --git a/fckeditor/editor/dialog/fck_textarea.html b/fckeditor/editor/dialog/fck_textarea.html deleted file mode 100644 index 3a1c56dc..00000000 --- a/fckeditor/editor/dialog/fck_textarea.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - Text Area Properties - - - - - - - - - - -
        - - - - -
        - Name
        - - Collumns
        - -
        - Rows
        - -
        -
        - - diff --git a/fckeditor/editor/dialog/fck_textfield.html b/fckeditor/editor/dialog/fck_textfield.html deleted file mode 100644 index cf3ce03d..00000000 --- a/fckeditor/editor/dialog/fck_textfield.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - -
        - - - - - - - - - - - - - - - - -
        - Name
        - -
        - - Value
        - -
        - Character Width
        - -
        - - Maximum Characters
        - -
        - Type
        - -
        -   -
        -
        - - diff --git a/fckeditor/editor/dtd/fck_dtd_test.html b/fckeditor/editor/dtd/fck_dtd_test.html deleted file mode 100644 index c149d15c..00000000 --- a/fckeditor/editor/dtd/fck_dtd_test.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - DTD Test Page - - - - - -

        - DTD Contents -

        - - -
        - - diff --git a/fckeditor/editor/dtd/fck_xhtml10strict.js b/fckeditor/editor/dtd/fck_xhtml10strict.js deleted file mode 100644 index 0849b528..00000000 --- a/fckeditor/editor/dtd/fck_xhtml10strict.js +++ /dev/null @@ -1,116 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Contains the DTD mapping for XHTML 1.0 Strict. - * This file was automatically generated from the file: xhtml10-strict.dtd - */ -FCK.DTD = (function() -{ - var X = FCKTools.Merge ; - - var H,I,J,K,C,L,M,A,B,D,E,G,N,F ; - A = {ins:1, del:1, script:1} ; - B = {hr:1, ul:1, div:1, blockquote:1, noscript:1, table:1, address:1, pre:1, p:1, h5:1, dl:1, h4:1, ol:1, h6:1, h1:1, h3:1, h2:1} ; - C = X({fieldset:1}, B) ; - D = X({sub:1, bdo:1, 'var':1, sup:1, br:1, kbd:1, map:1, samp:1, b:1, acronym:1, '#':1, abbr:1, code:1, i:1, cite:1, tt:1, strong:1, q:1, em:1, big:1, small:1, span:1, dfn:1}, A) ; - E = X({img:1, object:1}, D) ; - F = {input:1, button:1, textarea:1, select:1, label:1} ; - G = X({a:1}, F) ; - H = {img:1, noscript:1, br:1, kbd:1, button:1, h5:1, h4:1, samp:1, h6:1, ol:1, h1:1, h3:1, h2:1, form:1, select:1, '#':1, ins:1, abbr:1, label:1, code:1, table:1, script:1, cite:1, input:1, strong:1, textarea:1, big:1, small:1, span:1, hr:1, sub:1, bdo:1, 'var':1, div:1, object:1, sup:1, map:1, dl:1, del:1, fieldset:1, ul:1, b:1, acronym:1, a:1, blockquote:1, i:1, address:1, tt:1, q:1, pre:1, p:1, em:1, dfn:1} ; - - I = X({form:1, fieldset:1}, B, E, G) ; - J = {tr:1} ; - K = {'#':1} ; - L = X(E, G) ; - M = {li:1} ; - N = X({form:1}, A, C) ; - - return { - col: {}, - tr: {td:1, th:1}, - img: {}, - colgroup: {col:1}, - noscript: N, - td: I, - br: {}, - th: I, - kbd: L, - button: X(B, E), - h5: L, - h4: L, - samp: L, - h6: L, - ol: M, - h1: L, - h3: L, - option: K, - h2: L, - form: X(A, C), - select: {optgroup:1, option:1}, - ins: I, - abbr: L, - label: L, - code: L, - table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1}, - script: K, - tfoot: J, - cite: L, - li: I, - input: {}, - strong: L, - textarea: K, - big: L, - small: L, - span: L, - dt: L, - hr: {}, - sub: L, - optgroup: {option:1}, - bdo: L, - param: {}, - 'var': L, - div: I, - object: X({param:1}, H), - sup: L, - dd: I, - area: {}, - map: X({form:1, area:1}, A, C), - dl: {dt:1, dd:1}, - del: I, - fieldset: X({legend:1}, H), - thead: J, - ul: M, - acronym: L, - b: L, - a: X({img:1, object:1}, D, F), - blockquote: N, - caption: L, - i: L, - tbody: J, - address: L, - tt: L, - legend: L, - q: L, - pre: X({a:1}, D, F), - p: L, - em: L, - dfn: L - } ; -})() ; diff --git a/fckeditor/editor/dtd/fck_xhtml10transitional.js b/fckeditor/editor/dtd/fck_xhtml10transitional.js deleted file mode 100644 index 5857ea9f..00000000 --- a/fckeditor/editor/dtd/fck_xhtml10transitional.js +++ /dev/null @@ -1,140 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Contains the DTD mapping for XHTML 1.0 Transitional. - * This file was automatically generated from the file: xhtml10-transitional.dtd - */ -FCK.DTD = (function() -{ - var X = FCKTools.Merge ; - - var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I ; - A = {isindex:1, fieldset:1} ; - B = {input:1, button:1, select:1, textarea:1, label:1} ; - C = X({a:1}, B) ; - D = X({iframe:1}, C) ; - E = {hr:1, ul:1, menu:1, div:1, blockquote:1, noscript:1, table:1, center:1, address:1, dir:1, pre:1, h5:1, dl:1, h4:1, noframes:1, h6:1, ol:1, h1:1, h3:1, h2:1} ; - F = {ins:1, del:1, script:1} ; - G = X({b:1, acronym:1, bdo:1, 'var':1, '#':1, abbr:1, code:1, br:1, i:1, cite:1, kbd:1, u:1, strike:1, s:1, tt:1, strong:1, q:1, samp:1, em:1, dfn:1, span:1}, F) ; - H = X({sub:1, img:1, object:1, sup:1, basefont:1, map:1, applet:1, font:1, big:1, small:1}, G) ; - I = X({p:1}, H) ; - J = X({iframe:1}, H, B) ; - K = {img:1, noscript:1, br:1, kbd:1, center:1, button:1, basefont:1, h5:1, h4:1, samp:1, h6:1, ol:1, h1:1, h3:1, h2:1, form:1, font:1, '#':1, select:1, menu:1, ins:1, abbr:1, label:1, code:1, table:1, script:1, cite:1, input:1, iframe:1, strong:1, textarea:1, noframes:1, big:1, small:1, span:1, hr:1, sub:1, bdo:1, 'var':1, div:1, object:1, sup:1, strike:1, dir:1, map:1, dl:1, applet:1, del:1, isindex:1, fieldset:1, ul:1, b:1, acronym:1, a:1, blockquote:1, i:1, u:1, s:1, tt:1, address:1, q:1, pre:1, p:1, em:1, dfn:1} ; - - L = X({a:1}, J) ; - M = {tr:1} ; - N = {'#':1} ; - O = X({param:1}, K) ; - P = X({form:1}, A, D, E, I) ; - Q = {li:1} ; - - return { - col: {}, - tr: {td:1, th:1}, - img: {}, - colgroup: {col:1}, - noscript: P, - td: P, - br: {}, - th: P, - center: P, - kbd: L, - button: X(I, E), - basefont: {}, - h5: L, - h4: L, - samp: L, - h6: L, - ol: Q, - h1: L, - h3: L, - option: N, - h2: L, - form: X(A, D, E, I), - select: {optgroup:1, option:1}, - font: J, // Changed from L to J (see (1)) - ins: P, - menu: Q, - abbr: L, - label: L, - table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1}, - code: L, - script: N, - tfoot: M, - cite: L, - li: P, - input: {}, - iframe: P, - strong: J, // Changed from L to J (see (1)) - textarea: N, - noframes: P, - big: J, // Changed from L to J (see (1)) - small: J, // Changed from L to J (see (1)) - span: J, // Changed from L to J (see (1)) - hr: {}, - dt: L, - sub: J, // Changed from L to J (see (1)) - optgroup: {option:1}, - param: {}, - bdo: L, - 'var': J, // Changed from L to J (see (1)) - div: P, - object: O, - sup: J, // Changed from L to J (see (1)) - dd: P, - strike: J, // Changed from L to J (see (1)) - area: {}, - dir: Q, - map: X({area:1, form:1, p:1}, A, F, E), - applet: O, - dl: {dt:1, dd:1}, - del: P, - isindex: {}, - fieldset: X({legend:1}, K), - thead: M, - ul: Q, - acronym: L, - b: J, // Changed from L to J (see (1)) - a: J, - blockquote: P, - caption: L, - i: J, // Changed from L to J (see (1)) - u: J, // Changed from L to J (see (1)) - tbody: M, - s: L, - address: X(D, I), - tt: J, // Changed from L to J (see (1)) - legend: L, - q: L, - pre: X(G, C), - p: L, - em: J, // Changed from L to J (see (1)) - dfn: L - } ; -})() ; - -/* - Notes: - (1) According to the DTD, many elements, like accept elements - inside of them. But, to produce better output results, we have manually - changed the map to avoid breaking the links on pieces, having - "this is a link test", instead of - "this is a link test". -*/ diff --git a/fckeditor/editor/fckdebug.html b/fckeditor/editor/fckdebug.html deleted file mode 100644 index ddb62240..00000000 --- a/fckeditor/editor/fckdebug.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - FCKeditor Debug Window - - - - - - - - - - - -
        - - - - - -
        - FCKeditor Debug Window -
        -
        - -
        - - diff --git a/fckeditor/editor/fckdialog.html b/fckeditor/editor/fckdialog.html deleted file mode 100644 index 4bbc3698..00000000 --- a/fckeditor/editor/fckdialog.html +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - - - - - -
        - -
        -
        - - - - - -
          - -   - -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        - - - - - diff --git a/fckeditor/editor/fckeditor.html b/fckeditor/editor/fckeditor.html deleted file mode 100644 index aba4c483..00000000 --- a/fckeditor/editor/fckeditor.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - FCKeditor - - - - - - - - - - - - - - - - - - - -
        - - diff --git a/fckeditor/editor/fckeditor.original.html b/fckeditor/editor/fckeditor.original.html deleted file mode 100644 index 52914861..00000000 --- a/fckeditor/editor/fckeditor.original.html +++ /dev/null @@ -1,424 +0,0 @@ - - - - - FCKeditor - - - - - - - - - - - - - - - - - - - -
        - - diff --git a/fckeditor/editor/filemanager/browser/default/browser.css b/fckeditor/editor/filemanager/browser/default/browser.css deleted file mode 100644 index 94833088..00000000 --- a/fckeditor/editor/filemanager/browser/default/browser.css +++ /dev/null @@ -1,87 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * CSS styles used by all pages that compose the File Browser. - */ - -body -{ - background-color: #f1f1e3; - margin-top:0; - margin-bottom:0; -} - -form -{ - margin: 0; - padding: 0; -} - -.Frame -{ - background-color: #f1f1e3; - border: thin inset #f1f1e3; -} - -body.FileArea -{ - background-color: #ffffff; - margin: 10px; -} - -body, td, input, select -{ - font-size: 11px; - font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; -} - -.ActualFolder -{ - font-weight: bold; - font-size: 14px; -} - -.PopupButtons -{ - border-top: #d5d59d 1px solid; - background-color: #e3e3c7; - padding: 7px 10px 7px 10px; -} - -.Button, button -{ - color: #3b3b1f; - border: #737357 1px solid; - background-color: #c7c78f; -} - -.FolderListCurrentFolder img -{ - background-image: url(images/FolderOpened.gif); -} - -.FolderListFolder img -{ - background-image: url(images/Folder.gif); -} - -.fullHeight { - height: 100%; -} diff --git a/fckeditor/editor/filemanager/browser/default/browser.html b/fckeditor/editor/filemanager/browser/default/browser.html deleted file mode 100644 index 7a7e9204..00000000 --- a/fckeditor/editor/filemanager/browser/default/browser.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - FCKeditor - Resources Browser - - - - - - - - - - - - - - - - - - - - - diff --git a/fckeditor/editor/filemanager/browser/default/frmactualfolder.html b/fckeditor/editor/filemanager/browser/default/frmactualfolder.html deleted file mode 100644 index 1b70fa9c..00000000 --- a/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - Folder path - - - - - - - - - -
        - -
        - - diff --git a/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html b/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html deleted file mode 100644 index 01ca1357..00000000 --- a/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - Create Folder - - - - - - - - - - -
        - -
        - - diff --git a/fckeditor/editor/filemanager/browser/default/frmfolders.html b/fckeditor/editor/filemanager/browser/default/frmfolders.html deleted file mode 100644 index 58a3c616..00000000 --- a/fckeditor/editor/filemanager/browser/default/frmfolders.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - Folders - - - - - - - - - - - -
        - - diff --git a/fckeditor/editor/filemanager/browser/default/frmresourceslist.html b/fckeditor/editor/filemanager/browser/default/frmresourceslist.html deleted file mode 100644 index e7d0e8e3..00000000 --- a/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - Resources - - - - - - - - diff --git a/fckeditor/editor/filemanager/browser/default/frmresourcetype.html b/fckeditor/editor/filemanager/browser/default/frmresourcetype.html deleted file mode 100644 index 4e873122..00000000 --- a/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - Available types - - - - - - - - - - -
        - Resource Type
        - -
        - - diff --git a/fckeditor/editor/filemanager/browser/default/frmupload.html b/fckeditor/editor/filemanager/browser/default/frmupload.html deleted file mode 100644 index e8068320..00000000 --- a/fckeditor/editor/filemanager/browser/default/frmupload.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - File Upload - - - - - - -
        - - - - -
        - Upload a new file in this folder
        - - - - - -
         
        -
        -
        - - diff --git a/fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gif b/fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gif deleted file mode 100644 index a355e5a449014d40f6e686aec027356b9e72c626..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 138 zcmZ?wbhEHb?doRyP?sz1@R%qk?NW&|^ p|eTtnS=Y)v`XcZE0Wm%(S+{n>TgunLDTH*uh2T&!5`4%$c3C%y;hIyZ_+f R9g8PVpFMx^^0^>`H30UMeqjIr diff --git a/fckeditor/editor/filemanager/browser/default/images/FolderOpened.gif b/fckeditor/editor/filemanager/browser/default/images/FolderOpened.gif deleted file mode 100644 index 0c5dd413efe52ef8df245c62d38abd3fb5531faf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 132 zcmZ?wbhEHb6krfwSj5I~?p*T!b93g*Vfg=l&j0`a85n>J5UKc+g^_`QjX?*<2C5Wb zU|{yl*mXxoV3&KA=w%M0D)qo6IdPeS4hsuYt(PRqFy=dMJ1DS(;Y^uj?AqnKDvKH$ h4uqvBmU_;}`s(90J$U9C1Ji>22?c3Bc`6JH)&Op|Ft`8! diff --git a/fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gif b/fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gif deleted file mode 100644 index 3e3fcf56cc471cb8f44c5edb5f23407f120b75a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 264 zcmV+j0r&n#Nk%w1VITk?0HOx~fPet_`1s7sW&i*HnVA6p%$fiHng9R)A^8LW000L7 zEC2ui03ZM$000Bcc)HyFFv{78y_ZT7y6*y^J)B{lXE-t?>Kf|WzJ*zbST3@`>l>e7 zXTYP`jx|Fqxg-!3v!5%8G&mPg=26MzE|piEc$^ay3Qmr2&HfAsp|@13xD0Kw@Z;yk4lxJy}TbYwv1&v{IeS%6~q)(8cfvHH9 z1FWAXijuHrXtPjLUZ*y?s=NoSsJ^hlX9AX3p}@()!dFnYxLu3VoKMAM-ecScv*YCD O=I1Nv>g((j2>?5Tf_QiU diff --git a/fckeditor/editor/filemanager/browser/default/images/FolderUp.gif b/fckeditor/editor/filemanager/browser/default/images/FolderUp.gif deleted file mode 100644 index ad5bc202670bfa12195e767c28050b236089e940..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 132 zcmV-~0DJ#ONk%w1VGsZi0HOx~_xJbz|IYu;oSd8h&dy{1|C|5-0RR90A^8LW000L7 zEC2ui01yBW0009?c)Hv>5E}PD2&Iha2KgWnMapoU=v5GtnPtYC3GCs*Ml2M2edj

        h0KmVcuWJD*FM9~M9v0;0gPtyf2D4lb<@_VjwB*Bz)~b>#zfjC@IsD5w|Oidff-V#g8}2kNqXb| z3*=vg3;-`U_%`_V2~bM`Zz#+RT^Sx39b;sQ1LKpSLm`J&E4zlMTrP)fis|!OD8)8jZh1;Bx0l-= z|5olUpD))!On*&71F@oVS4HgTQTv+9Iq!CAXG00xRC*#ce9p0;gBC#?#*V6(fm&gZ6(iJ-?<*$cbd*Pk~-cu8ti%)$w~m zF}hZExT5MvJfM2lQ43BrJ}jtiY)z1z1`ujO>Tf(rd_j!es+s?@v3Z@+H#wzy1)VN~ z@>^29db%?9H2l8(hXn%^4iv!}88EbHo(0)mmo&(%=?eP|btA=e;a;G2Q0DP z{-2wtWFHm{1TQkUDOA}p5{MVR_NXWH$j~Q!`r_`FL9mV*0)_R8X_@LhsNeFX+sNR+ zSfg*(_dLbjNJHJs(*8ZS&&0=-PQx#BQM^m*xk9gs-%qS znBFlNEK&BnY6)r2oZVd1)G6?=(lHPMAXN*g^vz7X7pY-0Z6&Aw2(%UNZ;9`9D~)47 zrrC(Kl^)sZ>YQrb0&SZ5`MJ2}gUe;0&|w@Y2TdTqQnY+2%QP)b0SNt_6c z?vCNb#g{jS zqzS1F7Yi`j+&oF3vk@0`c_AlBY-{D z_{yQ;#4A33CbnP$uv<4j5!vO4<#7+FSQ$k_Zp>IRAV4-*NE~_OF;=T}DqVd0X!Bwp wStD5{bcIq>&_CW_%>cTRhtqE{M<8rT)nil z!>wDl1_cGpIX9=cxY)_bDS6JhrAwC@0;zN7lIJ9Qd3jyCc5Tj_ImyXD;@rJ^_ma;g z8yY5`d;cG#;{UlRQ>F+A2pqe249Ed0F-%To`2XJ!Xvn$mii(QIjvZ@hX<_)!zyK8e z52b({B7x#h7DfgJLk1m?dXS$O*!~}wQ6SMQ*?%Hs(g~SEVHZ}EoNC$|w?XZ5<=d*g ztFz3tLuQ?K`?%vx*6#ZsEPVF1?cDu#wReB{`LnL&mDMf!E$w>6I^8|>%FP4+RFsZbl(HUW2zRj7*mpIc#(i7%CXAa&G$1 zb$HJi?&sBSc@@$XSXf!41ycM4mR3*HJEyr}!-dTZEo^K(lB@3>s9p2_-O+~A4J>>T HEDY8FY?%te diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/cs.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/cs.gif deleted file mode 100644 index b62bd026061c32a9c6e5e0b7bb0f63f29e2b3dff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 224 zcmZ?wbhEHbRA5kGSj5J_(8AEt(sJzBF^2yPK=2<7fDFZ-EQ|~cYz#UeQIJ{&=A{`~ z7yn&Y>lvzH@j8}i<%6w^G1qDysAQ$w*7Cw zb)JWJSY*qv{Jo}@*85%ep#_^mxz@^Ek!v|my$+pkc#iYHgR|<)Hv*145}Xzy*?#uy zW+72u^}VkibX`f?;iJ!XMxcLs>SwXJYbV{lxV?&3^z_y8;(O=jz293O)tFaX(OQ+m V(AC}3+t;1pIBD{fscM`I)&R&*NlyR( diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gif deleted file mode 100644 index 9b54964576b86bdff354807f15bf8d7b45c26a87..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 258 zcmZ?wbhEHbRA5kGSj5KA(!y};*s+$DmjC}5fZ#tE02zuuSr{1@*cfy`q9C;l%*Qjd z?)>vVsp-1YB3p;!?=`iwp6{W_Q5=rtdap9Js!4P!*0z~@{&9%b7hSQiZSf+3>%l=4 zbC?{xRHYJ^JbD!_YN>wVRmm#fINl3>={^y&r(Zh2+A*{0{Dp5OF3+;}xtHpSu`tBg zGna`sL=;C?F*CGG>|*W7kZQMY%L(e5o+#PMJTG{P!~)G$mL+Rfuc**k!@v;4&?&i6 zd2`3?whaZ+?fYX6_}i99@A5dc@yywS=ck>!bS&ZO&I-occkbT1e<$7H@sp>|OgR~> E0d_=epa1{> diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gif deleted file mode 100644 index b557568b3d1ca19f9520b38a4c74de4e4abe0301..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 260 zcmZ?wbhEHbRA5kGSj5WE($aG5*f9o%{|rD320#W7DE?$&WME)r&;fBkY8jYMM(kq! zXJF^1sbKNi_rQt=M|)>{Hf)}-F6;CphX;mvXV)1h&Uf|7+UJv?arlkMs(3X`m9CP_ zv)3+@oW^!z&6Ep|?ycG7>(EguSdif;%5!b$-mI&xN9DLr?#s-QF^TF-@eHzvD|N|b zOf4v2R;u;NYnoIoQPMuWEU$95PkPn_w-&EyGa42)SIuA0xw3g_dy3)$ug*<%>t}2f z_1`SBb+_-1>AS@Cs_Z|y`tZVS$C7M#_MAI&;Bx2%Zo@;jPiRElfABCu;mOly&tE8T HGFSruuDNnD diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gif deleted file mode 100644 index 758499394afc5814b9da3e02d6b2996623ea3ece..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 170 zcmZ?wbhEHbRA5kGSj5V3?AWoEmKKKp{}~v71PA~bK%n@Og^_`Ql|cu@0jXtR&X3r2 z=bynT&((V^Uh}fgcb2F-r!c4K#l%&et8O!#Y3N#3U@Bnaczx0Bu1&8c>vg>^p7?UH zZNaiF>{E4?pUHaCwNz`jZ!Y_szmxXvGM=^K87~uK*>B$dd{+jey?NVLeM+n`tOzMk R;r49r>h9_76XRsC1^{%DM?C-l diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gif deleted file mode 100644 index 923079fc6bbc36b0f3cef03c381d42fb9962c753..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 946 zcmdUs-ET{A9EZO<+S9YC?Wob8m!v&2wj#5`EE?U~b1XJhOV`LE=R#U_A%>LBTk4|S zDr>A5I=U%J+YM1$%pthhOzORHK?$-Hd%=a%c}WpTjsL=P_1t})AeVLSTYuigUXan3z0}9Eu?9h z4g>-bhr_|LX#{*U>a$wohya=sD6q38WU|M2-pz4VO66u*f^)O9+M!lQeLk<%>M)rS z@wg8m9uWb%T~Db3Za0TeOoiOEDnX+NMMe>+W=#Q_8XFq2BNU$qP77YIcVbf*696Fd zj|ur7p?-?809aV`H~#M@Ajvq{CbpuYvZaL}@K*dVj_I0@`ubTVq)>xVDrh4rms5^3Spr$J-t`?u;zkBE4#^Dz7jki4oSKP`v#fm9opMHCnZ;} zz1GBI{`)<+KP-zs;Tg$M-Djcl;f+t)SC6%Q2YyxP#?LXbXR8Ot7T)hy{Qg~6P_(9= zkQdf^l{=`riw%{(Tm{ue)-_qW)%G&WtZSVquZKD9wz*vvb@{U-2|A~ACfIDf%*e$P z?cUS3lIChBh={$LNy`98ZaqW`&r0BuD z4e~{vlsT1)@1B+?J7{TnC0!%;?@hifwn#f%#%SZ*H~5S4*^M6Md&ZgN-V?5w@~~=t z{vj(Nr0)EH;qJQ9o~mu@T=}_;Ri6HWl}~Q2nBysSj+e}{F=hLUxurkNGZZr8)2@BH zc*QJFQiqE)DV<5`2@a_I-->GXJTEl6a!_e0hA-#`rlP|j&e=bb4-A%VXakYh*qgmk zvHe)KIKK@GwKB_#Mav3D*S`~KYRv;jX8bUE+RCqgjUTO z!>wDl1_cGpIX9=cxY)_bDS6JhrAwC@0;zN7lIJ9Qd3jyCc5Tj_ImyXD;@rJ^_ma;g z8yY5`d;cG#;{UlRQ>F+A2pqe249Ed0F-%To`2XJ!Xvn$mii(QIjvZ@hX<=w#VE7Ld z{?7oU!6cAD3{d>Z!pOj2$e;sK4Du5L+y4VI3M85(`%k1yIw5l??81tYQ%!s0HmH5B zd|S15b(Xny$gJ~jA9viz+I|0nh0or$qwC-1oqj!Uc6Wh(V`Y&}TYG3|b5l!oMQw0E zU2}DBPkvau_T>@iN3<4dSxx*7gJJ}yHGHWubb-ZC< zSlGlWA{rr3aE6m1Db7hm;O9fu#z~Ku=EN*`;OKotHpw{YmFPBEF7n0SPh z-5{fcDcGTDk%p2-0>i<1jU3uMQ*0^|Rtd8?vkEi_C^|6;eq&3yu%Yol*KBr%M_EkF zYZ-VLm6m7(GRQOXifBkk9A$F2w>LUu!BPQ*!<<6eDjpXepmF>6I+p(?v&mbqn H!e9*mGolF; diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gif deleted file mode 100644 index a9bdf0030869bb72b8115ce01f776f080576c7b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1527 zcmeH`{ZA8j0LH)9QYgijQL3Xb9mPUCP}fsqdcG`2MWB@s=vZ*wTcIvP>jLr2GVQVz zsSK7QR(9EZxjA2Q#At5f;%#Q}wifXeUv8S=#l7Ts(Rs#Su5P-onwal!f5HBMJwHBq zl24u|d20PNUb3|WlmN&99U=pwfS}>5j&nK@pj8723W`QKf);~}MALjMAw)PO5@89> zfDlR=jIbgv>yZR6s4zGkQcx(w_#%l=h$UFV6_Z3+4X7x_Nt}U14Kac$Du@;|R?-E< zAbCjekWmes*9A!-SuGF~d@_uPT2MlafpEc4bSMZYz$$`@=!8fLkQ5DEG>Bjf=M9!u zI8hT-gI1AYKr$gSoETIg&gi~S3>TrSL!8wTyv$9bRTzk}E>>5kP0nB?m5`u|(}PjQ zCm=$EQAP;S3`z451-Tf-6`%!(SRLUZhLsTw5wD|!ti?D1XXJ#ABt;Jh22S%n5rqU@ z)*vAwLO_~ss5(+LgA}LfhO8TSLc;|_G71Y3!DzB-Xb{C@o#b?y;YbNZbi`|hD;RSz z8mk$>U_w?kQi34`iPHnh2u~ZYig>O`E6zO$w${GbK~PbwtSb3mHwSqnssSQ)8U-}b8HPg_%>_x zBa>>fIL03gpPN^)w#SV+8-Q)r+?LX&lOIh!p)e}g2`O;-;CQ9i`y!RwzimCp_U?@R zlK+k0JpW9xx(Ev`)qt4;Yv-<6Zk>qV#E1Iqx%Vj0TvCxq^}Y)BV9x9fUX$tOyoD*( z(hLKd)h=*;7*6e`zP{NubIIL9!;aS-hi(tlS3FLaeE~M5utm1heOY8( z`kbR-(VrGJ+_T+Zwk)wJRhHvT{o3{M2G=dn?FM&d=Z@jkGu=rKR@^o?xzDeuOf1vXFIQ&Z5CaSncE@`o)s?@Yvp&Gd|+sxQr}rC5+;yoa`Jb8YWvo}>;o{{qmZ0^wKHN~U0k<{~VI7%+gT2)wO zaTc7dJbCs(+l4fU-X67DTIw=gBc=6?>2%H~$ysb; za64Ysd4;-jJbz>Gud6HcvxI+!XDIbkUigo=xhPC+yI$Ddc-pcn+_I;jLr2GVQVz zsSK7QR(9EZxjA2Q#At5f;%#Q}wifXeUv8S=#l7Ts(Rs#Su5P-onwal!f5HBMJwHBq zl24u|d20PNUb3|WlmN&99U=pwfS}>5j&nK@pj8723W`QKf);~}MALjMAw)PO5@89> zfDlR=jIbgv>yZR6s4zGkQcx(w_#%l=h$UFV6_Z3+4X7x_Nt}U14Kac$Du@;|R?-E< zAbCjekWmes*9A!-SuGF~d@_uPT2MlafpEc4bSMZYz$$`@=!8fLkQ5DEG>Bjf=M9!u zI8hT-gI1AYKr$gSoETIg&gi~S3>TrSL!8wTyv$9bRTzk}E>>5kP0nB?m5`u|(}PjQ zCm=$EQAP;S3`z451-Tf-6`%!(SRLUZhLsTw5wD|!ti?D1XXJ#ABt;Jh22S%n5rqU@ z)*vAwLO_~ss5(+LgA}LfhO8TSLc;|_G71Y3!DzB-Xb{C@o#b?y;YbNZbi`|hD;RSz z8mk$>U_w?kQi34`iPHnh2u~ZYig>O`E6zO$w${GbK~PbwtSb3mHwSqnssSQ)8U-}b8HPg_%>_x zBa>>fIL03gpPN^)w#SV+8-Q)r+?LX&lOIh!p)e}g2`O;-;CQ9i`y!RwzimCp_U?@R zlK+k0JpW9xx(Ev`)qt4;Yv-<6Zk>qV#E1Iqx%Vj0TvCxq^}Y)BV9x9fUX$tOyoD*( z(hLKd)h=*;7*6e`zP{NubIIL9!;aS-hi(tlS3FLaeE~M5utm1heOY8( z`kbR-(VrGJ+_T+Zwk)wJRhHvT{o3{M2G=dn?FM&d=Z@jkGu=rKR@^o?xzDeuOf1vXFIQ&Z5CaSncE@`o)s?@Yvp&Gd|+sxQr}rC5+;yoa`Jb8YWvo}>;o{{qmZ0^wKHN~U0k<{~VI7%+gT2)wO zaTc7dJbCs(+l4fU-X67DTIw=gBc=6?>2%H~$ysb; za64Ysd4;-jJbz>Gud6HcvxI+!XDIbkUigo=xhPC+yI$Ddc-pcn+_I;Rw% zgoK0u0RI60|Nj600RR90A^8LW000jFEC2ui03ZM$000F4@X7g{y*Over%PZcj*8PX zPRD&`>$*wVrjlmgmOR%>@BhG{L$`DMT#J_P^c&hL!A4J-tOAFMtkxNwGON_yXO!SB ztzop!^eUH*;dC<1hM9wS;j7`s`7wKLDp*>DhI@QNg9!o+0tN&L0099CjEIQ}9w`}xc~qK1}B2eunLhO1qbA^(8kG)-OZLR3gZX7ufVg|lgu6kyp9dh2Lp`={0ea3 zRk2Bt6j2zmPk^)m0|*c>7hphwdAIZ_Tu9)AfCB}5AQpJ`>%gY~7hP4_$kEY6ivuWr zG7x}|0$2f9dO*-I!MFjSBu46|fSW;`HDGmoXF$NCPz@$-^C$~x1)sz&7Wm{;z|D>@ zT50Ow!0F9suh7Qo*i~JLu`3*bN(-%0)23ZRSgqsKfC6c-Vo@4Qc<-OXa5)%S%y@AG F06XGF$;AKw diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/js.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/js.gif deleted file mode 100644 index fe0c98e975c3e36eb30275c584f5cfdaf2bb0b52..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 274 zcmV+t0qy=rNk%w1VITk?0HOu}goFUb#>Rw%g#Z5l00030|NsC0{{R30A^8LW000I6 zEC2ui03ZM$000BmXe!+PP|3N9y*Oh*C>2_$F`ZY5XdwigX@IE+vgH@c7VW_sE=S8CAk;96zye@OEi4J7%yYsMBs14lfQi{kx>D-2z!ZXXBlpHGLXfU%%aXw0F>cMSa3P;YN@~85 zXs1wZZWz^I$sBYt#31HnOf{Juf_6(VW^93iSL5Ui2-3o>8d&O_<;{7#7K;Vu(OKI1 z;;nFSdR=&TNjQdbgFbA98Gu(;7;}G#8%mLqI%r`kjz?`jI+KK=hk>Yqn`^8sag(rR zlwho{Z*H_0P?(bV5^7Hid_8W(lfGF~=&@ij1P5SHA!N?yuXeKm(zYURrXvvm z02f3pqh`0;IW=%{9SIi~0s#OTdVEQ2Ol&zEl$9KW28V}scnlMdOpzUuf|p+%1)7?P z01XV0D}SVKrgN#Pn~IA~O|XEpgtw{zx&ywUzrd%Nxy1wo$jCSwwH=v>x)%i*2akTq zHq?X(tPK|nG~C`lOry0C7kB42j-ocmf3*q&0}5#WYDWEvmd}fogI6N`T1e}k!-tOq z(ohn}-H8`1Wc?9D>*5=M-@a9>NX;Y2kQ+xsakOZHqDGMu1u7}oQqW64yn5l}LW1JS wh3#O{lo3win^+%9nY4LhR#Tomen<@mRfIy6Sg}_1V5zIuua$U+O%VbBJG0Wu*8l(j diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/pdf.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/pdf.gif deleted file mode 100644 index 4950ec87c13f9918009b13ae2db6732e07317cd0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 567 zcmZ?wbhEHbRA5kGxT?c&?%cWOmX-nn0?EnA&*#k9yLa!kYuBE81--YlJa+8Z+O=z= zqN28L-TFKz$jQm+d3Ls!m)G;X$DT(;JvTIbuW9(arRBM$;q&V1=Rr|Zrc8OBocum0 z>iOQi_cS%Lv$N*_4RmsP@8tEoXUg-Qp6A)c?~98qEiH?Si~j=w0|?x^cMrw{^GPHW zf3h$#Fz5gw5P@~~Qom*ewqZhw7 zKBurJtN!*1^O!YOYu9|)YB8_t^WW6ca;6rh2(6sF+WgwC%rb5DN$RB?)j2&i$xXpi zXH<91Dwz;8FKv0soTXD@*19hVEcJDrymhOr!sL)mzWyOW976j8_W0~Otj(@`;%MZF z07c$2>YI-rW@Nm4^}HZEi}c~Me&>Z*v_(|+KXSSjEdDG&n311fNae_ty(exka&YjA z3b14-FdgnHb#0U7V94icWRT)}X6&|fc5Aw}g~uJWRtM%biI0UgiAk;v%sgIhj0-kh zc1hP(n4!^dprL6J+ky=&8(u%P2${xg#2}GysD*KoI+sXnLPBFRqx9EWgM|t!Ij4C= zs_n>1(muUHq|?e^qLB9WHL>g!0Swn9Z;EDi%b6A`9lXKl>+6tVt+!-b+&ZS;DoLw1 LBt|rC3S diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/png.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/png.gif deleted file mode 100644 index 0a79ebfdf5f97176aa1605e4cc4d779d6c49487c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 464 zcmV;>0WbbXNk%w1VITk?0J9GO($&>MW1Lc_&Z()eL9#*Z@$WY`I#66uAt52g#>Rw% zgn$450RI60|Nj600RR90A^8LW000jFEC2ui03ZM$000F4@X7g{y*Over%PZcj*8PX zPRD&`>$*wVrjlmgmOR%>@BhG{L$`DMTD?Xxsq_tPmE*FhZ2pFdtoC_4F&9}#IfTeiWdb` z1O?!L8wIfrwDf?$V*+vlLQRz9PeHeXJ8Q)92oFF3NTM20D zmu}o7y+v%V%zmD2V?;>*==MW7XXv~x5)aMfBoK?F zW6zSoF1YE1%;Xl!+`|~*F%!825>LA^kD=kxDLIWMmuhA@4aseU*nlRFhyRAJe17_T zednEgTH2cH8+u%Xi^xwCx~}JPxqLn^%Q8ZU<2Y8uilPXDpsK1M$f77FRLmRXFfhr&_Mo^w%1SiCjqEi$FfC3CdWW#Vx#+XI9hG0Y#wXle3m_taUP(G1Bk%%bi zd5%*7FENslF#v987>gJtA&5B&>WZQ=Fb5Pp9HGJyIv5N>H3vAAW!Z2z40t7sbU{*C zNskB`r|3|WSp{pFM$*GP~H>s_TyfBt%-F5T8;J#~8H?0~s+ zXXB9PW>r(KZ`8W`gfA8$e1fNO%=5#NJh;x~k4ES33@n~zf1OYA*v&hGHzSS4?YPRQ&w4x)AxOBAXi6+*mu{KIuGh-r|Wzv*e+FR&JZ$xH1zUYu>cG z&uzI9Yq2%M2+ZunHb+$N1&swYAuDxyBGP!IrSI*qb3{MTMZ?x0V6mWcE z|9I}gv+Zq5){pLIssew!b1CU`96NN@Lmgc;S&v>{nR6wN1qU|2T6&+L3hhaM(Mw%* z=Cbw&*_@SYooKank`p0e+U}nkcSN&;J5R;>2P@wHG7vNmO}g(4+wR?39xu;~%vQg< zR5uH^PL`HTjZgH3$5R)tj|9pq+DGQe#QhXwJ1IW#TFzKpt=1433zr-oN$pzWPW3N) z3vDY`$G2a5h9EB2ESek@@obZ&?AYo9?}a@b{_0IaO93CVWK6}Ix*b7F+;uhM-Q5?z=G__V3lY5wu~{Q`c_Bd p$!sXy?YxvMau4r&IQrbrt}oV%E%z;d_m?(Y)4DIetHV#c_%B&pUbg@M diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gif deleted file mode 100644 index 5df7de574966c8f4738c337d97c97b362cfb9f91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 725 zcmZ?wbhEHbRA5kGxN5}U<>i%K-E;5x^Y7o^pSyOC!7ym=-o5X?f6va&j*5y}yLRol zbJrLYoz9&**D__!lqqwfidzf~4XbDFV}EmQU$yT;&^-7{zD+O2zova1E6 zTHe3^Uft3o5mY>7=~@QOpgC*zdL>sU7gulHdoH_rN_NlEDRY)aRZoe^Zn<~w`L%1; zdU|@^e}7+HUH$&~dj&K6yl zojL~V+xsHH@c`o|9UhyC1r82J zxwvJ|?KtsmX#fwSz>CD02Ob=1WztX6Yq-Gqe2S+w&#yg)7Bt*sVo!_W*x)34c}@Y7 zfW?X=#ttTpbtl%GzNUM0S(}W`jNJ=z7`bH9q-4uKzYW*nGST5k*x}Susnz8aaN);% zk-6GdPqd>OoiEPR_xjSi@ycd_dkEKgTed$ sRj~fxwYl+MVLG=`U+uM14J=|F5Athe7Cva=(YhfkFW{!(D!^b300g%yMgRZ+ diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gif deleted file mode 100644 index 7807c075c4082d561fd2f08c9a20ab4844d8cee4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 724 zcmZ?wbhEHbRA5kGxN5}U<>i%K-E;5x^Y7o^pSyOC!7ym=-o5X?f6va&j*5y}yLRol zbJrLYoz9&**D__!lqqwfidzf~4XbDFV}EmQU$yT;&^-7{zD+O2zova1E6 zTHe3^Uft3o5mY>7=~@QOpgC*zdL>sU7gulHdoH_rN_NlEDRY)aRZoe^Zn<~w`L%1; zdU|@^e}7+HUH$&~dj6nnc&>9RAQ*ojz&Z49h@M%{gzUy7xRu}X=tXv8QUvk`Ss)JT|f=Hm=e z*-sPK9%x)~MqKsBv4C5Z9>La?bkD@4;205_cZ-x olY3FW;k4_-V{to`9yGAAE9cT`#-ccAhw4`jpjrZ$Po=+>rS<-e!jPxbB|+;eoCFoy*4?8no+b9O@c7 znu6TZTic2fJ10d?=r%vv9_HjDCz zuLzsz8*EthN5gskqy(RPrt4~5-RICX$;@Huv^eHaHuZ)ITCWCd#;pH0iBv~AT` zy{2TX>>jQNx6%cN_>V4GmXLeO{Gvrq>3P1>XKIxXvqqdd(YocrnJ3qzF1@(?>e;q6 V@7}Mula%u1>$flJKLt4%tN|w0c+CI+ diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/xls.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/xls.gif deleted file mode 100644 index afe724a3d06a51d2810f8d956f9a2042f4127e39..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 271 zcmV+q0r37uNk%w1VITk?0HOr|0E7U9goMV%#sB~S|NsC0|Nj6000000A^8LW000F5 zEC2ui03ZM$000BjSh^MdFg`|UAUNwy!l>ZIjhOQ>0g$e0%aVcMF>cMSLY`-rd^P}* zCI!Rz6e@y?mrRaCgd_3RX;pPt-(bsaDsRo0Mlj9@21Mm|c`cjG1E-q(&D!Bg(+7An)+;^79}G06U9=e5U{a diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/xml.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/xml.gif deleted file mode 100644 index 4fae35662f0ff048d4004fdc74cda6b63f16d119..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 408 zcmZ?wbhEHbRA5kGI3mViIETS7`9A~09EN0urRTmg%=vGa%wTx#zu`GU28RFV-v2*# z?AW>g=g$5AZ}|T|Lkq*XbLR|`=d`r6eEY<3j9Dk`OoZE`nWr*xa<<-Z+HtMSBJn{^u;`V&6mSzrNEt?LH`~3Ax?=4JrY*0GX#-Qk=qQTsLv|qx~^^Qg0 iVuwC~AkkGZCpV>f)n+A~n&Y{-{p@Uu;&~j54AuZc3Y?7q diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gif b/fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gif deleted file mode 100644 index 7157f72ad82ea877fcb6995070a6563f56ef67d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 368 zcmZ?wbhEHbRA5kGI3mt)ZwdoL@|2!y|Nno#_WxKm!<2grhC%{EB};slLq*~Wvao7t(4YcThC6;%`Yr24Zi4PaOV6eOA}Gnc(I#ahItQPFz&i!!1#jo#hY7? xFH}7HYVuU?=dbU7{-(T977Tb`-^99F#>8mh!o%$X%5o`g8JrTL0dyds<4RV^aVB z|57BDbA&H|IUoo#=W(zoP=va&U;d8QcCBXbFE`S zIUx{AF)?dGF|DPoy|um8l$26hT61GsrId``*3Q<>#_!(N_xJC;lzX*=bN97#y`_w; zoRr4a-o4J&oRpmJ@Ar&zW5%telzVgk@2%FQQj}6cwR2kk-jp#pIT#oib8~zD|Nj60 z00000A^8LW002DzEC2ui01yBW000KCz@CstEEa{x;b0IOxF9c{E~y-RE*p%ErCXs53AutGm1iI;a&9 x77a8B0W|>v8K@@^5iJcNH3tSG6{sd9*aZa#2L%MDNFqA#5;_tRJN5NJ06RZNq>TUo diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/avi.gif b/fckeditor/editor/filemanager/browser/default/images/icons/avi.gif deleted file mode 100644 index 6f3bac9bf1593da0934d7ce02064ef74e484c1a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 249 zcmZ?wbhEHb6krfwI3mMvZjPa$VRCZvIm6^RbLO1;{{8!$ImuhMZvFrNTynDExpT=; zQBh7#PUq$Tr48R-J9cgk!?|-n9>bhupf;f9IseZw{GY?n($aG5*f9nMhW}syWI%x8 zPZmZ71{nq&5Eo=818bRrdQwVemqvT;n`v8Ts6~~;GQZY}p1#>*LidNJlNo(daVY@{ zWwUaL(+k*J$tlM*YK{1NYI`ZnW)mW{>#=ysy0hLX0`cg&BbkJ4}^gUQzaPeB<)#Q2S7Oc~`%`->q#0Q%_#rF={k17wA&Fi)#cna}i9!sV4Aub8Vl3$Z diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/cs.gif b/fckeditor/editor/filemanager/browser/default/images/icons/cs.gif deleted file mode 100644 index 4d927230b980dbbdca5b06f12a98449647ca0fe7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmZ?wbhEHb6krfwSj5V}(8AEt(sJzBF$M;P|6l-Q0DA+ z&boq$o(!ph*Rni6Ts&TSB!TY&dxW+s#|ou&Pgs`UaTDBbb9LQ}wC%4m<4%bCYbdc5 Z?pbo_Mu}eVr8OUpyyY@Z@L*!F1^}CaF8}}l diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/default.icon.gif b/fckeditor/editor/filemanager/browser/default/images/icons/default.icon.gif deleted file mode 100644 index 6ce26a4dc516f5962623445396862c753a875900..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 113 zcmZ?wbhEHb6krfwSj56`?AWoEmKFvEhW}syWI%x8PZmZ71{MY#5ErDDf!WMMz)wYHuMVva8^OvzO GSOWls#w7~? diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/dll.gif b/fckeditor/editor/filemanager/browser/default/images/icons/dll.gif deleted file mode 100644 index 48d445acd2feab875c2d42c246e9010814314bb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 132 zcmZ?wbhEHb6krfwSj5KA(!%inKf|$O$6A0a1|S;*fDFZ-EQ|~cYz#U;Hc+Ji0|T>X z#^yWU3Z{52m-ukf%k`k3yP%3-*W8u93=RcNt9)D@gcWkI9QhQriC6L4&!=I+p7|fF f&bcuq9o#ATcbQ|zt0ha__CHv$#zk+n5Q8-UbUQQ< diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/doc.gif b/fckeditor/editor/filemanager/browser/default/images/icons/doc.gif deleted file mode 100644 index 6535b4c0e72aa2cded728e28ee6440c1fe0a954c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 140 zcmZ?wbhEHb6krfwSj5WE($aG5*f9o%{|rD320#W7DE?$&WME)r&;fBkY8jXVBe?FY z+rZ$Y&Fb8_(OO=7Vq=(Ufb*})xCcUxyE@a|Sq$%KqPl7^Ro&=#&h4hzE(^L jR*hU`(7bxhmuZnxV$QBxlGW+R@Sr5BCvfLoP6lfLw_`LY diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/exe.gif b/fckeditor/editor/filemanager/browser/default/images/icons/exe.gif deleted file mode 100644 index 315817f5d93a2a6fa5db3ca5e1c9d9e72297c1b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 109 zcmZ?wbhEHb6krfwSj5V3?AWoEmKKKpAi%%?qJbn3DE?$&WME)r&;fBkY8jY~B6i*R zXJF>^RLSWASNXZw&O8U&G9N8irFy(4+h@r~EB~#sJ|Y3ajSDg!Grv<&><*gAz+epk D58Wo= diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/fla.gif b/fckeditor/editor/filemanager/browser/default/images/icons/fla.gif deleted file mode 100644 index 8f91a98ecb196dbcf5424e266ca58d216cd4a9eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 382 zcmZ?wbhEHb6krfwxT?XhR8hdo%PTuO`&>{EgJIPFI}I;|Dp zc%Pgc6&3aV`}^-fUeCQOdwP0~X-ZUASHFM${{R2~3=9kq63CzsDE?$&WMI%>&;gkP z@)HBwYzL7p7om#2#si)wL?(F!2%98Cm<2ZVZ~3Ch>UA|+?3QVy&oYC{!ISECotivn zi=MmpqCcH_Dg71<%DDkb)jrCNqP!hVYOOUI?7WH`68uu^LH$n3d{a32xdr%?``R=Z z6crRi1i6?MXU<-+T7iX|hf_g(S&gzHs}Re21x4km3ChAO(z2|q%0r28usf7#SE?8FWBAkXi<2r--O4 z|FS1KXsZVL9;`07c&+ei^1O2k*6G|{AtTej{=zM0yDLAt%B`L9e?;#s+CMY!M%Jo; V3vL<)Qnkyb>9`50G6*qP0|1+DE=>Rc diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/htm.gif b/fckeditor/editor/filemanager/browser/default/images/icons/htm.gif deleted file mode 100644 index 0b5d6ba1fc35ab7dccc0f27ef14f2bdbefe75859..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 621 zcmd6k&ui0A0Dxb+VB4{+?YgxUTV^K{qg5LnvM_(lIJz`RQF6>pa?C||-g?<)1gmc# znuA~%2n(Jb2oms;!(;>zd@zI@a}ZpP&%@y1>FN9{{7&ETgKuNdUy&bHKm{BPf$bAQ zctp74_-+tm!XZvY7?`FD-7q4V=#n7LI(|kO*D!S=`qxAh%U-Hr9ul5XK60@Xu`r=B zBBGZmgli+L*e=OYPhmpijCBxUoJ%MbLzXcv!BBQQ+xAQo#TmCOWTHs45W)$B zkpBbxmvnv$IRJ*Bds27u1Qfn*4!1S;sax6}KQYjbQ3B6j7}Xo@=~BM;N(1VyYBVSI z8e>(xbhXt4Mx}Z?-_VC5xY?bZoxa#MW@hqN!goSp%D6mNTdCj8Pw4U5t#bL!;#_;O zeyAHlYkKhW=-%Y@`E^~83TFlv`p5l+YYX!m-)p~?m8p91_~pKu6ZFTu!$)iDJFV5T zZ$4EQ5B8T%6}v|Mhfpk^(}do$596)Zxh8s0**y3H8nw1;?w$YkcG+37K7V|Fe|HOj F)j#Az*75)V diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/html.gif b/fckeditor/editor/filemanager/browser/default/images/icons/html.gif deleted file mode 100644 index 0b5d6ba1fc35ab7dccc0f27ef14f2bdbefe75859..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 621 zcmd6k&ui0A0Dxb+VB4{+?YgxUTV^K{qg5LnvM_(lIJz`RQF6>pa?C||-g?<)1gmc# znuA~%2n(Jb2oms;!(;>zd@zI@a}ZpP&%@y1>FN9{{7&ETgKuNdUy&bHKm{BPf$bAQ zctp74_-+tm!XZvY7?`FD-7q4V=#n7LI(|kO*D!S=`qxAh%U-Hr9ul5XK60@Xu`r=B zBBGZmgli+L*e=OYPhmpijCBxUoJ%MbLzXcv!BBQQ+xAQo#TmCOWTHs45W)$B zkpBbxmvnv$IRJ*Bds27u1Qfn*4!1S;sax6}KQYjbQ3B6j7}Xo@=~BM;N(1VyYBVSI z8e>(xbhXt4Mx}Z?-_VC5xY?bZoxa#MW@hqN!goSp%D6mNTdCj8Pw4U5t#bL!;#_;O zeyAHlYkKhW=-%Y@`E^~83TFlv`p5l+YYX!m-)p~?m8p91_~pKu6ZFTu!$)iDJFV5T zZ$4EQ5B8T%6}v|Mhfpk^(}do$596)Zxh8s0**y3H8nw1;?w$YkcG+37K7V|Fe|HOj F)j#Az*75)V diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/jpg.gif b/fckeditor/editor/filemanager/browser/default/images/icons/jpg.gif deleted file mode 100644 index 634b386139ac697806757c8d34bed36b5a2e5b45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 125 zcmZ?wbhEHb6krfwSj5WE($aG5*s=fr|F^U-00EEzq8Jzyf3h$#Ft9S{fH)wv49rdu zQCI$DPjt{$4fH)&U2ySQ;nn1M=N7Efxy>W1vu4h(L$B8CcA0nH;sGzmk%w`nkI!Gr Xww$>lL&HF-cG)x?H=$exAqHyz+f*-Z diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/js.gif b/fckeditor/editor/filemanager/browser/default/images/icons/js.gif deleted file mode 100644 index 4ea17d452edaf63a5f599042879cc05a3b05905d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 139 zcmZ?wbhEHb6krfwSj524(!y};*s=frfs7Ug28RDY78of0WC7DUAQGgOfjPip*Bukp zV`_&dr*>@0-Etv>LB&I4!HI?a)6OrXSt1KqtHVsZE6pPt-9GvFF^A}XUv*^C r;ak22hG!S;yY$xUOU2HaM|C{I+Ek;sd6_hJPfqX2@(WjGV6X-NZuBx8 diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/mp3.gif b/fckeditor/editor/filemanager/browser/default/images/icons/mp3.gif deleted file mode 100644 index 6f3bac9bf1593da0934d7ce02064ef74e484c1a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 249 zcmZ?wbhEHb6krfwI3mMvZjPa$VRCZvIm6^RbLO1;{{8!$ImuhMZvFrNTynDExpT=; zQBh7#PUq$Tr48R-J9cgk!?|-n9>bhupf;f9IseZw{GY?n($aG5*f9nMhW}syWI%x8 zPZmZ71{nq&5Eo=818bRrdQwVemqvT;n`v8Ts6~~;GQZY}p1#>*LidNJlNo(daVY@{ zWwUaL(+k*J$tlM*YK{1NYI`ZnW)mW{>#=ysy0hLX0`cgv>ev^SyhYS64r8X?YK12So`82>fRNfqVDv z{r?YPGARCJVPs&CWzYdhfb3*oO-@kHONmUIxgsy-^|qPQW|^Ek`f1r)oAdK_#q~cu zbtPl{l^0V5_T;S=Z~hQc)}ed!aA|{HGz;^B2|Yz@;*5(PawLd_EmCDzp}@k>p>l2} b%e-`vLRL<;1{wB3!FE?Ijs6J}6d9}meKBOp diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/png.gif b/fckeditor/editor/filemanager/browser/default/images/icons/png.gif deleted file mode 100644 index b6d1b32011afe305d35026c66cf3a0564e6cfbe8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 125 zcmZ?wbhEHb6krfwSj5WE($aG5*s=fr|2Hsz0FVKu85DoAFfuT(GU$M~Ahit4P7zU8 z{$)>e&{hrfJy>0E@mk^4!zWU*s{&Jd<`>yWH_^+2I#AA{J%s7G|&p0BKw|IsgCw diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/rdp.gif b/fckeditor/editor/filemanager/browser/default/images/icons/rdp.gif deleted file mode 100644 index 916cd7e639de75276e3fac7d4a4466479285fbc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 606 zcmchU&ubGw6vrpo{HP7Ji>awd!Ny-jsS1MH`U@LtlcrQ_s3zIwU|DauxyQX|x?q%1 zq|BkhKtPz|fCvMEEP~*e(;VkGD5!f}3&P@Qocc%jk8i|G!%@<`A|b55u$#WP!&Un9G3XLps}Wj7D9Eqf$#fJ8H5p*G7e=-si0JO zNL85WQFn?71c9mX?Aw@`|sb+UAvcE-BaB&M=_}Q+_`f-OSf)4 zb}qYTDT7yb%al3Su3fu#?|E`@wO3T}oV9xy6rIkUyY~J2djY3pLqo%$?CQP8u1N$H zzyJQ;%gbx&)?@dcKL={->FM!Gt_Fhl&)@(5|DS<@0YU;9lmo?|EQ|~c>I^y{qdwUe4Gl+*;-lwkB+sYUz^1v;|)#6j^vpu37T# zmUD%0Y=v2e3tNhqVwDfO5R;r7Q-i8ZOSQU^94jjq2ZyAL>I5eRE_r!5X$}Qpc9pr4 zSQql}D#)`c&1sz^&mzyuz#u2Ed6fdUDiZ^b6pNe!-zs$lh21Qw^6W*$K1?FwqAc7B ROoA@15eoGR5k8I#)&SOyb=v>{ diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/swt.gif b/fckeditor/editor/filemanager/browser/default/images/icons/swt.gif deleted file mode 100644 index 314469da14a51a3079a95b10deff5e4af2f14dd3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 388 zcmZ?wbhEHb6krfwxT?;;U>Fn?71c9mX?Aw@`|sb+UAvcE-BaB&M=_}Q+_`f-OSf)4 zb}qYTDT7yb%al3Su3fu#?|E`@wO3T}oV9xy6rIkUyY~J2djY3pLqo%$?CQP8u1N$H zzyJQ;%gbx&)?@dcKL={->FM!Gt_Fhl&)@(5|DS<@0YU;9lmo?|EQ|~c>I^y{qdwUe4Gl+*;-lwkB+sYUz^1v;|)#6j^vpu37T# zmUD%0Y=v2e3tNhqVwDfO5R;r7Q-i8ZOSQU^94jjq2ZyAL>I5eRE_r!5X$}Qpc9pr4 zSQql}D#)`c&1sz^&mzyuz#u2Ed6fdUDiZ^b6pNe!-zs$lh21Qw^6W*$K1?FwqAc7B ROoA@15eoGR5k8I#)&SOyb=v>{ diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/txt.gif b/fckeditor/editor/filemanager/browser/default/images/icons/txt.gif deleted file mode 100644 index 1511ba3e9fa53d21b23d74e5430199f52107b8c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 122 zcmZ?wbhEHb6krfwSj586($aG5*f9nMhW}syWI%x8PZmZ71{MY#5ErDDf!W?edQV`N^25{1 dUq#HdJfRXbF>~kLGf7@*-Ks0MSTQnK0|4?|F*N`H diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/xls.gif b/fckeditor/editor/filemanager/browser/default/images/icons/xls.gif deleted file mode 100644 index f57715d6a0cf03d3d392fb78d1477fcb1756edc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 138 zcmZ?wbhEHb6krfwSj5V}(86%+*f9nm-O}BIae?UME_83{kohvOm*4@L8Aw=661Zc_WCg}SOWmuf-oWg diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/xml.gif b/fckeditor/editor/filemanager/browser/default/images/icons/xml.gif deleted file mode 100644 index 455992877e103d01bd247e45d96e33412ae706d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 231 zcmZ?wbhEHb6krfwI3mEn(9&}3*fGQ8|AuoI4Cnke{QuwZ+HPD{sTJjBd9|(eHjSNmO^r^D{SzDo6d9}m>N8Dk diff --git a/fckeditor/editor/filemanager/browser/default/images/icons/zip.gif b/fckeditor/editor/filemanager/browser/default/images/icons/zip.gif deleted file mode 100644 index b1e24921e56f8b71282f953c690d152dd986f6ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 235 zcmZ?wbhEHb6krfwI3mLE|M^yid-wjYW%$3>>;GEC|Np;dAN!x(^Z)< mytest.example.com => example.com ... - d = d.replace( /.*?(?:\.|$)/, '' ) ; - - if ( d.length == 0 ) - break ; // It was not able to detect the domain. - - try - { - document.domain = d ; - } - catch (e) - { - break ; - } - } -})() ; - -function AddSelectOption( selectElement, optionText, optionValue ) -{ - var oOption = document.createElement("OPTION") ; - - oOption.text = optionText ; - oOption.value = optionValue ; - - selectElement.options.add(oOption) ; - - return oOption ; -} - -var oConnector = window.parent.oConnector ; -var oIcons = window.parent.oIcons ; - - -function StringBuilder( value ) -{ - this._Strings = new Array( value || '' ) ; -} - -StringBuilder.prototype.Append = function( value ) -{ - if ( value ) - this._Strings.push( value ) ; -} - -StringBuilder.prototype.ToString = function() -{ - return this._Strings.join( '' ) ; -} diff --git a/fckeditor/editor/filemanager/browser/default/js/fckxml.js b/fckeditor/editor/filemanager/browser/default/js/fckxml.js deleted file mode 100644 index 82d1cbb5..00000000 --- a/fckeditor/editor/filemanager/browser/default/js/fckxml.js +++ /dev/null @@ -1,147 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Defines the FCKXml object that is used for XML data calls - * and XML processing. - * - * This script is shared by almost all pages that compose the - * File Browser frameset. - */ - -var FCKXml = function() -{} - -FCKXml.prototype.GetHttpRequest = function() -{ - // Gecko / IE7 - try { return new XMLHttpRequest(); } - catch(e) {} - - // IE6 - try { return new ActiveXObject( 'Msxml2.XMLHTTP' ) ; } - catch(e) {} - - // IE5 - try { return new ActiveXObject( 'Microsoft.XMLHTTP' ) ; } - catch(e) {} - - return null ; -} - -FCKXml.prototype.LoadUrl = function( urlToCall, asyncFunctionPointer ) -{ - var oFCKXml = this ; - - var bAsync = ( typeof(asyncFunctionPointer) == 'function' ) ; - - var oXmlHttp = this.GetHttpRequest() ; - - oXmlHttp.open( "GET", urlToCall, bAsync ) ; - - if ( bAsync ) - { - oXmlHttp.onreadystatechange = function() - { - if ( oXmlHttp.readyState == 4 ) - { - var oXml ; - try - { - // this is the same test for an FF2 bug as in fckxml_gecko.js - // but we've moved the responseXML assignment into the try{} - // so we don't even have to check the return status codes. - var test = oXmlHttp.responseXML.firstChild ; - oXml = oXmlHttp.responseXML ; - } - catch ( e ) - { - try - { - oXml = (new DOMParser()).parseFromString( oXmlHttp.responseText, 'text/xml' ) ; - } - catch ( e ) {} - } - - if ( !oXml || !oXml.firstChild || oXml.firstChild.nodeName == 'parsererror' ) - { - alert( 'The server didn\'t send back a proper XML response. Please contact your system administrator.\n\n' + - 'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')\n\n' + - 'Requested URL:\n' + urlToCall + '\n\n' + - 'Response text:\n' + oXmlHttp.responseText ) ; - return ; - } - - oFCKXml.DOMDocument = oXml ; - asyncFunctionPointer( oFCKXml ) ; - } - } - } - - oXmlHttp.send( null ) ; - - if ( ! bAsync ) - { - if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 ) - this.DOMDocument = oXmlHttp.responseXML ; - else - { - alert( 'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')' ) ; - } - } -} - -FCKXml.prototype.SelectNodes = function( xpath ) -{ - if ( navigator.userAgent.indexOf('MSIE') >= 0 ) // IE - return this.DOMDocument.selectNodes( xpath ) ; - else // Gecko - { - var aNodeArray = new Array(); - - var xPathResult = this.DOMDocument.evaluate( xpath, this.DOMDocument, - this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), XPathResult.ORDERED_NODE_ITERATOR_TYPE, null) ; - if ( xPathResult ) - { - var oNode = xPathResult.iterateNext() ; - while( oNode ) - { - aNodeArray[aNodeArray.length] = oNode ; - oNode = xPathResult.iterateNext(); - } - } - return aNodeArray ; - } -} - -FCKXml.prototype.SelectSingleNode = function( xpath ) -{ - if ( navigator.userAgent.indexOf('MSIE') >= 0 ) // IE - return this.DOMDocument.selectSingleNode( xpath ) ; - else // Gecko - { - var xPathResult = this.DOMDocument.evaluate( xpath, this.DOMDocument, - this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), 9, null); - - if ( xPathResult && xPathResult.singleNodeValue ) - return xPathResult.singleNodeValue ; - else - return null ; - } -} diff --git a/fckeditor/editor/filemanager/connectors/asp/basexml.asp b/fckeditor/editor/filemanager/connectors/asp/basexml.asp deleted file mode 100644 index a0152046..00000000 --- a/fckeditor/editor/filemanager/connectors/asp/basexml.asp +++ /dev/null @@ -1,63 +0,0 @@ -<% - ' FCKeditor - The text editor for Internet - http://www.fckeditor.net - ' Copyright (C) 2003-2008 Frederico Caldeira Knabben - ' - ' == BEGIN LICENSE == - ' - ' Licensed under the terms of any of the following licenses at your - ' choice: - ' - ' - GNU General Public License Version 2 or later (the "GPL") - ' http://www.gnu.org/licenses/gpl.html - ' - ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - ' http://www.gnu.org/licenses/lgpl.html - ' - ' - Mozilla Public License Version 1.1 or later (the "MPL") - ' http://www.mozilla.org/MPL/MPL-1.1.html - ' - ' == END LICENSE == - ' - ' This file include the functions that create the base XML output. -%> -<% - -Sub SetXmlHeaders() - ' Cleans the response buffer. - Response.Clear() - - ' Prevent the browser from caching the result. - Response.CacheControl = "no-cache" - - ' Set the response format. - Response.CodePage = 65001 - Response.CharSet = "UTF-8" - Response.ContentType = "text/xml" -End Sub - -Sub CreateXmlHeader( command, resourceType, currentFolder, url ) - ' Create the XML document header. - Response.Write "" - - ' Create the main "Connector" node. - Response.Write "" - - ' Add the current folder node. - Response.Write "" -End Sub - -Sub CreateXmlFooter() - Response.Write "" -End Sub - -Sub SendError( number, text ) - SetXmlHeaders - - ' Create the XML document header. - Response.Write "" - - Response.Write "" - - Response.End -End Sub -%> diff --git a/fckeditor/editor/filemanager/connectors/asp/class_upload.asp b/fckeditor/editor/filemanager/connectors/asp/class_upload.asp deleted file mode 100644 index 91c00886..00000000 --- a/fckeditor/editor/filemanager/connectors/asp/class_upload.asp +++ /dev/null @@ -1,353 +0,0 @@ -<% - ' FCKeditor - The text editor for Internet - http://www.fckeditor.net - ' Copyright (C) 2003-2008 Frederico Caldeira Knabben - ' - ' == BEGIN LICENSE == - ' - ' Licensed under the terms of any of the following licenses at your - ' choice: - ' - ' - GNU General Public License Version 2 or later (the "GPL") - ' http://www.gnu.org/licenses/gpl.html - ' - ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - ' http://www.gnu.org/licenses/lgpl.html - ' - ' - Mozilla Public License Version 1.1 or later (the "MPL") - ' http://www.mozilla.org/MPL/MPL-1.1.html - ' - ' == END LICENSE == - ' - ' These are the classes used to handle ASP upload without using third - ' part components (OCX/DLL). -%> -<% -'********************************************** -' File: NetRube_Upload.asp -' Version: NetRube Upload Class Version 2.3 Build 20070528 -' Author: NetRube -' Email: NetRube@126.com -' Date: 05/28/2007 -' Comments: The code for the Upload. -' This can free usage, but please -' not to delete this copyright information. -' If you have a modification version, -' Please send out a duplicate to me. -'********************************************** -' 文件å: NetRube_Upload.asp -' 版本: NetRube Upload Class Version 2.3 Build 20070528 -' 作者: NetRube(网络乡巴佬) -' 电å­é‚®ä»¶: NetRube@126.com -' 日期: 2007å¹´05月28æ—¥ -' 声明: 文件上传类 -' 本上传类å¯ä»¥è‡ªç”±ä½¿ç”¨ï¼Œä½†è¯·ä¿ç•™æ­¤ç‰ˆæƒå£°æ˜Žä¿¡æ¯ -' 如果您对本上传类进行修改增强, -' 请å‘é€ä¸€ä»½ç»™ä¿ºã€‚ -'********************************************** - -Class NetRube_Upload - - Public File, Form - Private oSourceData - Private nMaxSize, nErr, sAllowed, sDenied, sHtmlExtensions - - Private Sub Class_Initialize - nErr = 0 - nMaxSize = 1048576 - - Set File = Server.CreateObject("Scripting.Dictionary") - File.CompareMode = 1 - Set Form = Server.CreateObject("Scripting.Dictionary") - Form.CompareMode = 1 - - Set oSourceData = Server.CreateObject("ADODB.Stream") - oSourceData.Type = 1 - oSourceData.Mode = 3 - oSourceData.Open - End Sub - - Private Sub Class_Terminate - Form.RemoveAll - Set Form = Nothing - File.RemoveAll - Set File = Nothing - - oSourceData.Close - Set oSourceData = Nothing - End Sub - - Public Property Get Version - Version = "NetRube Upload Class Version 2.3 Build 20070528" - End Property - - Public Property Get ErrNum - ErrNum = nErr - End Property - - Public Property Let MaxSize(nSize) - nMaxSize = nSize - End Property - - Public Property Let Allowed(sExt) - sAllowed = sExt - End Property - - Public Property Let Denied(sExt) - sDenied = sExt - End Property - - Public Property Let HtmlExtensions(sExt) - sHtmlExtensions = sExt - End Property - - Public Sub GetData - Dim aCType - aCType = Split(Request.ServerVariables("HTTP_CONTENT_TYPE"), ";") - if ( uBound(aCType) < 0 ) then - nErr = 1 - Exit Sub - end if - If aCType(0) <> "multipart/form-data" Then - nErr = 1 - Exit Sub - End If - - Dim nTotalSize - nTotalSize = Request.TotalBytes - If nTotalSize < 1 Then - nErr = 2 - Exit Sub - End If - If nMaxSize > 0 And nTotalSize > nMaxSize Then - nErr = 3 - Exit Sub - End If - - 'Thankful long(yrl031715@163.com) - 'Fix upload large file. - '********************************************** - ' 修正作者:long - ' è”系邮件: yrl031715@163.com - ' 修正时间:2007å¹´5月6æ—¥ - ' 修正说明:由于iis6çš„Content-Length 头信æ¯ä¸­åŒ…å«çš„请求长度超过了 AspMaxRequestEntityAllowed 的值(默认200K), IIS 将返回一个 403 错误信æ¯. - ' 直接导致在iis6下调试FCKeditor上传功能时,一旦文件超过200K,上传文件时文件管ç†å™¨å¤±åŽ»å“åº”ï¼Œå—æ­¤å½±å“,文件的快速上传功能也存在在缺陷。 - ' 在å‚考 å®çމ çš„ Aspæ— ç»„ä»¶ä¸Šä¼ å¸¦è¿›åº¦æ¡ æ¼”ç¤ºç¨‹åºåŽä½œå‡ºå¦‚下修改,以修正在iis6下的错误。 - - Dim nTotalBytes, nPartBytes, ReadBytes - ReadBytes = 0 - nTotalBytes = Request.TotalBytes - '循环分å—è¯»å– - Do While ReadBytes < nTotalBytes - '分å—è¯»å– - nPartBytes = 64 * 1024 'åˆ†æˆæ¯å—64k - If nPartBytes + ReadBytes > nTotalBytes Then - nPartBytes = nTotalBytes - ReadBytes - End If - oSourceData.Write Request.BinaryRead(nPartBytes) - ReadBytes = ReadBytes + nPartBytes - Loop - '********************************************** - oSourceData.Position = 0 - - Dim oTotalData, oFormStream, sFormHeader, sFormName, bCrLf, nBoundLen, nFormStart, nFormEnd, nPosStart, nPosEnd, sBoundary - - oTotalData = oSourceData.Read - bCrLf = ChrB(13) & ChrB(10) - sBoundary = MidB(oTotalData, 1, InStrB(1, oTotalData, bCrLf) - 1) - nBoundLen = LenB(sBoundary) + 2 - nFormStart = nBoundLen - - Set oFormStream = Server.CreateObject("ADODB.Stream") - - Do While (nFormStart + 2) < nTotalSize - nFormEnd = InStrB(nFormStart, oTotalData, bCrLf & bCrLf) + 3 - - With oFormStream - .Type = 1 - .Mode = 3 - .Open - oSourceData.Position = nFormStart - oSourceData.CopyTo oFormStream, nFormEnd - nFormStart - .Position = 0 - .Type = 2 - .CharSet = "UTF-8" - sFormHeader = .ReadText - .Close - End With - - nFormStart = InStrB(nFormEnd, oTotalData, sBoundary) - 1 - nPosStart = InStr(22, sFormHeader, " name=", 1) + 7 - nPosEnd = InStr(nPosStart, sFormHeader, """") - sFormName = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart) - - If InStr(45, sFormHeader, " filename=", 1) > 0 Then - Set File(sFormName) = New NetRube_FileInfo - File(sFormName).FormName = sFormName - File(sFormName).Start = nFormEnd - File(sFormName).Size = nFormStart - nFormEnd - 2 - nPosStart = InStr(nPosEnd, sFormHeader, " filename=", 1) + 11 - nPosEnd = InStr(nPosStart, sFormHeader, """") - File(sFormName).ClientPath = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart) - File(sFormName).Name = Mid(File(sFormName).ClientPath, InStrRev(File(sFormName).ClientPath, "\") + 1) - File(sFormName).Ext = LCase(Mid(File(sFormName).Name, InStrRev(File(sFormName).Name, ".") + 1)) - nPosStart = InStr(nPosEnd, sFormHeader, "Content-Type: ", 1) + 14 - nPosEnd = InStr(nPosStart, sFormHeader, vbCr) - File(sFormName).MIME = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart) - Else - With oFormStream - .Type = 1 - .Mode = 3 - .Open - oSourceData.Position = nFormEnd - oSourceData.CopyTo oFormStream, nFormStart - nFormEnd - 2 - .Position = 0 - .Type = 2 - .CharSet = "UTF-8" - Form(sFormName) = .ReadText - .Close - End With - End If - - nFormStart = nFormStart + nBoundLen - Loop - - oTotalData = "" - Set oFormStream = Nothing - End Sub - - Public Sub SaveAs(sItem, sFileName) - If File(sItem).Size < 1 Then - nErr = 2 - Exit Sub - End If - - If Not IsAllowed(File(sItem).Ext) Then - nErr = 4 - Exit Sub - End If - - If InStr( LCase( sFileName ), "::$data" ) > 0 Then - nErr = 4 - Exit Sub - End If - - Dim sFileExt, iFileSize - sFileExt = File(sItem).Ext - iFileSize = File(sItem).Size - - ' Check XSS. - If Not IsHtmlExtension( sFileExt ) Then - ' Calculate the size of data to load (max 1Kb). - Dim iXSSSize - iXSSSize = iFileSize - - If iXSSSize > 1024 Then - iXSSSize = 1024 - End If - - ' Read the data. - Dim sData - oSourceData.Position = File(sItem).Start - sData = oSourceData.Read( iXSSSize ) ' Byte Array - sData = ByteArray2Text( sData ) ' String - - ' Sniff HTML data. - If SniffHtml( sData ) Then - nErr = 4 - Exit Sub - End If - End If - - Dim oFileStream - Set oFileStream = Server.CreateObject("ADODB.Stream") - With oFileStream - .Type = 1 - .Mode = 3 - .Open - oSourceData.Position = File(sItem).Start - oSourceData.CopyTo oFileStream, File(sItem).Size - .Position = 0 - .SaveToFile sFileName, 2 - .Close - End With - Set oFileStream = Nothing - End Sub - - Private Function IsAllowed(sExt) - Dim oRE - Set oRE = New RegExp - oRE.IgnoreCase = True - oRE.Global = True - - If sDenied = "" Then - oRE.Pattern = sAllowed - IsAllowed = (sAllowed = "") Or oRE.Test(sExt) - Else - oRE.Pattern = sDenied - IsAllowed = Not oRE.Test(sExt) - End If - - Set oRE = Nothing - End Function - - Private Function IsHtmlExtension( sExt ) - If sHtmlExtensions = "" Then - Exit Function - End If - - Dim oRE - Set oRE = New RegExp - oRE.IgnoreCase = True - oRE.Global = True - oRE.Pattern = sHtmlExtensions - - IsHtmlExtension = oRE.Test(sExt) - - Set oRE = Nothing - End Function - - Private Function SniffHtml( sData ) - - Dim oRE - Set oRE = New RegExp - oRE.IgnoreCase = True - oRE.Global = True - - Dim aPatterns - aPatterns = Array( " diff --git a/fckeditor/editor/filemanager/connectors/asp/commands.asp b/fckeditor/editor/filemanager/connectors/asp/commands.asp deleted file mode 100644 index 25767cc2..00000000 --- a/fckeditor/editor/filemanager/connectors/asp/commands.asp +++ /dev/null @@ -1,198 +0,0 @@ -<% - ' FCKeditor - The text editor for Internet - http://www.fckeditor.net - ' Copyright (C) 2003-2008 Frederico Caldeira Knabben - ' - ' == BEGIN LICENSE == - ' - ' Licensed under the terms of any of the following licenses at your - ' choice: - ' - ' - GNU General Public License Version 2 or later (the "GPL") - ' http://www.gnu.org/licenses/gpl.html - ' - ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - ' http://www.gnu.org/licenses/lgpl.html - ' - ' - Mozilla Public License Version 1.1 or later (the "MPL") - ' http://www.mozilla.org/MPL/MPL-1.1.html - ' - ' == END LICENSE == - ' - ' This file include the functions that handle the Command requests - ' in the ASP Connector. -%> -<% -Sub GetFolders( resourceType, currentFolder ) - ' Map the virtual path to the local server path. - Dim sServerDir - sServerDir = ServerMapFolder( resourceType, currentFolder, "GetFolders" ) - - ' Open the "Folders" node. - Response.Write "" - - Dim oFSO, oCurrentFolder, oFolders, oFolder - Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" ) - if not (oFSO.FolderExists( sServerDir ) ) then - Set oFSO = Nothing - SendError 102, currentFolder - end if - - Set oCurrentFolder = oFSO.GetFolder( sServerDir ) - Set oFolders = oCurrentFolder.SubFolders - - For Each oFolder in oFolders - Response.Write "" - Next - - Set oFSO = Nothing - - ' Close the "Folders" node. - Response.Write "" -End Sub - -Sub GetFoldersAndFiles( resourceType, currentFolder ) - ' Map the virtual path to the local server path. - Dim sServerDir - sServerDir = ServerMapFolder( resourceType, currentFolder, "GetFoldersAndFiles" ) - - Dim oFSO, oCurrentFolder, oFolders, oFolder, oFiles, oFile - Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" ) - if not (oFSO.FolderExists( sServerDir ) ) then - Set oFSO = Nothing - SendError 102, currentFolder - end if - - Set oCurrentFolder = oFSO.GetFolder( sServerDir ) - Set oFolders = oCurrentFolder.SubFolders - Set oFiles = oCurrentFolder.Files - - ' Open the "Folders" node. - Response.Write "" - - For Each oFolder in oFolders - Response.Write "" - Next - - ' Close the "Folders" node. - Response.Write "" - - ' Open the "Files" node. - Response.Write "" - - For Each oFile in oFiles - Dim iFileSize - iFileSize = Round( oFile.size / 1024 ) - If ( iFileSize < 1 AND oFile.size <> 0 ) Then iFileSize = 1 - - Response.Write "" - Next - - ' Close the "Files" node. - Response.Write "" -End Sub - -Sub CreateFolder( resourceType, currentFolder ) - Dim sErrorNumber - - Dim sNewFolderName - sNewFolderName = Request.QueryString( "NewFolderName" ) - sNewFolderName = SanitizeFolderName( sNewFolderName ) - - If ( sNewFolderName = "" OR InStr( 1, sNewFolderName, ".." ) > 0 ) Then - sErrorNumber = "102" - Else - ' Map the virtual path to the local server path of the current folder. - Dim sServerDir - sServerDir = ServerMapFolder( resourceType, CombineLocalPaths(currentFolder, sNewFolderName), "CreateFolder" ) - - On Error Resume Next - - CreateServerFolder sServerDir - - Dim iErrNumber, sErrDescription - iErrNumber = err.number - sErrDescription = err.Description - - On Error Goto 0 - - Select Case iErrNumber - Case 0 - sErrorNumber = "0" - Case 52 - sErrorNumber = "102" ' Invalid Folder Name. - Case 70 - sErrorNumber = "103" ' Security Error. - Case 76 - sErrorNumber = "102" ' Path too long. - Case Else - sErrorNumber = "110" - End Select - End If - - ' Create the "Error" node. - Response.Write "" -End Sub - -Sub FileUpload( resourceType, currentFolder, sCommand ) - Dim oUploader - Set oUploader = New NetRube_Upload - oUploader.MaxSize = 0 - oUploader.Allowed = ConfigAllowedExtensions.Item( resourceType ) - oUploader.Denied = ConfigDeniedExtensions.Item( resourceType ) - oUploader.HtmlExtensions = ConfigHtmlExtensions - oUploader.GetData - - Dim sErrorNumber - sErrorNumber = "0" - - Dim sFileName, sOriginalFileName, sExtension - sFileName = "" - - If oUploader.ErrNum > 0 Then - sErrorNumber = "202" - Else - ' Map the virtual path to the local server path. - Dim sServerDir - sServerDir = ServerMapFolder( resourceType, currentFolder, sCommand ) - - Dim oFSO - Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" ) - if not (oFSO.FolderExists( sServerDir ) ) then - sErrorNumber = "102" - else - ' Get the uploaded file name. - sFileName = oUploader.File( "NewFile" ).Name - sExtension = oUploader.File( "NewFile" ).Ext - sFileName = SanitizeFileName( sFileName ) - sOriginalFileName = sFileName - - Dim iCounter - iCounter = 0 - - Do While ( True ) - Dim sFilePath - sFilePath = CombineLocalPaths(sServerDir, sFileName) - - If ( oFSO.FileExists( sFilePath ) ) Then - iCounter = iCounter + 1 - sFileName = RemoveExtension( sOriginalFileName ) & "(" & iCounter & ")." & sExtension - sErrorNumber = "201" - Else - oUploader.SaveAs "NewFile", sFilePath - If oUploader.ErrNum > 0 Then sErrorNumber = "202" - Exit Do - End If - Loop - end if - End If - - Set oUploader = Nothing - - dim sFileUrl - sFileUrl = CombinePaths( GetResourceTypePath( resourceType, sCommand ) , currentFolder ) - sFileUrl = CombinePaths( sFileUrl, sFileName ) - - SendUploadResults sErrorNumber, sFileUrl, sFileName, "" -End Sub - -%> diff --git a/fckeditor/editor/filemanager/connectors/asp/config.asp b/fckeditor/editor/filemanager/connectors/asp/config.asp deleted file mode 100644 index abc574a5..00000000 --- a/fckeditor/editor/filemanager/connectors/asp/config.asp +++ /dev/null @@ -1,128 +0,0 @@ -<% - ' FCKeditor - The text editor for Internet - http://www.fckeditor.net - ' Copyright (C) 2003-2008 Frederico Caldeira Knabben - ' - ' == BEGIN LICENSE == - ' - ' Licensed under the terms of any of the following licenses at your - ' choice: - ' - ' - GNU General Public License Version 2 or later (the "GPL") - ' http://www.gnu.org/licenses/gpl.html - ' - ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - ' http://www.gnu.org/licenses/lgpl.html - ' - ' - Mozilla Public License Version 1.1 or later (the "MPL") - ' http://www.mozilla.org/MPL/MPL-1.1.html - ' - ' == END LICENSE == - ' - ' Configuration file for the File Manager Connector for ASP. -%> -<% - -' SECURITY: You must explicitly enable this "connector" (set it to "True"). -' WARNING: don't just set "ConfigIsEnabled = true", you must be sure that only -' authenticated users can access this file or use some kind of session checking. -Dim ConfigIsEnabled -ConfigIsEnabled = False - -' Path to user files relative to the document root. -' This setting is preserved only for backward compatibility. -' You should look at the settings for each resource type to get the full potential -Dim ConfigUserFilesPath -ConfigUserFilesPath = "/userfiles/" - -' Due to security issues with Apache modules, it is recommended to leave the -' following setting enabled. -Dim ConfigForceSingleExtension -ConfigForceSingleExtension = true - -' What the user can do with this connector -Dim ConfigAllowedCommands -ConfigAllowedCommands = "QuickUpload|FileUpload|GetFolders|GetFoldersAndFiles|CreateFolder" - -' Allowed Resource Types -Dim ConfigAllowedTypes -ConfigAllowedTypes = "File|Image|Flash|Media" - -' For security, HTML is allowed in the first Kb of data for files having the -' following extensions only. -Dim ConfigHtmlExtensions -ConfigHtmlExtensions = "html|htm|xml|xsd|txt|js" -' -' Configuration settings for each Resource Type -' -' - AllowedExtensions: the possible extensions that can be allowed. -' If it is empty then any file type can be uploaded. -' -' - DeniedExtensions: The extensions that won't be allowed. -' If it is empty then no restrictions are done here. -' -' For a file to be uploaded it has to fulfill both the AllowedExtensions -' and DeniedExtensions (that's it: not being denied) conditions. -' -' - FileTypesPath: the virtual folder relative to the document root where -' these resources will be located. -' Attention: It must start and end with a slash: '/' -' -' - FileTypesAbsolutePath: the physical path to the above folder. It must be -' an absolute path. -' If it's an empty string then it will be autocalculated. -' Useful if you are using a virtual directory, symbolic link or alias. -' Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -' Attention: The above 'FileTypesPath' must point to the same directory. -' Attention: It must end with a slash: '/' -' -' - QuickUploadPath: the virtual folder relative to the document root where -' these resources will be uploaded using the Upload tab in the resources -' dialogs. -' Attention: It must start and end with a slash: '/' -' -' - QuickUploadAbsolutePath: the physical path to the above folder. It must be -' an absolute path. -' If it's an empty string then it will be autocalculated. -' Useful if you are using a virtual directory, symbolic link or alias. -' Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -' Attention: The above 'QuickUploadPath' must point to the same directory. -' Attention: It must end with a slash: '/' -' - -Dim ConfigAllowedExtensions, ConfigDeniedExtensions, ConfigFileTypesPath, ConfigFileTypesAbsolutePath, ConfigQuickUploadPath, ConfigQuickUploadAbsolutePath -Set ConfigAllowedExtensions = CreateObject( "Scripting.Dictionary" ) -Set ConfigDeniedExtensions = CreateObject( "Scripting.Dictionary" ) -Set ConfigFileTypesPath = CreateObject( "Scripting.Dictionary" ) -Set ConfigFileTypesAbsolutePath = CreateObject( "Scripting.Dictionary" ) -Set ConfigQuickUploadPath = CreateObject( "Scripting.Dictionary" ) -Set ConfigQuickUploadAbsolutePath = CreateObject( "Scripting.Dictionary" ) - -ConfigAllowedExtensions.Add "File", "7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip" -ConfigDeniedExtensions.Add "File", "" -ConfigFileTypesPath.Add "File", ConfigUserFilesPath & "file/" -ConfigFileTypesAbsolutePath.Add "File", "" -ConfigQuickUploadPath.Add "File", ConfigUserFilesPath -ConfigQuickUploadAbsolutePath.Add "File", "" - -ConfigAllowedExtensions.Add "Image", "bmp|gif|jpeg|jpg|png" -ConfigDeniedExtensions.Add "Image", "" -ConfigFileTypesPath.Add "Image", ConfigUserFilesPath & "image/" -ConfigFileTypesAbsolutePath.Add "Image", "" -ConfigQuickUploadPath.Add "Image", ConfigUserFilesPath -ConfigQuickUploadAbsolutePath.Add "Image", "" - -ConfigAllowedExtensions.Add "Flash", "swf|flv" -ConfigDeniedExtensions.Add "Flash", "" -ConfigFileTypesPath.Add "Flash", ConfigUserFilesPath & "flash/" -ConfigFileTypesAbsolutePath.Add "Flash", "" -ConfigQuickUploadPath.Add "Flash", ConfigUserFilesPath -ConfigQuickUploadAbsolutePath.Add "Flash", "" - -ConfigAllowedExtensions.Add "Media", "aiff|asf|avi|bmp|fla|flv|gif|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|png|qt|ram|rm|rmi|rmvb|swf|tif|tiff|wav|wma|wmv" -ConfigDeniedExtensions.Add "Media", "" -ConfigFileTypesPath.Add "Media", ConfigUserFilesPath & "media/" -ConfigFileTypesAbsolutePath.Add "Media", "" -ConfigQuickUploadPath.Add "Media", ConfigUserFilesPath -ConfigQuickUploadAbsolutePath.Add "Media", "" - -%> diff --git a/fckeditor/editor/filemanager/connectors/asp/connector.asp b/fckeditor/editor/filemanager/connectors/asp/connector.asp deleted file mode 100644 index dc113a90..00000000 --- a/fckeditor/editor/filemanager/connectors/asp/connector.asp +++ /dev/null @@ -1,88 +0,0 @@ -<%@ CodePage=65001 Language="VBScript"%> -<% -Option Explicit -Response.Buffer = True -%> -<% - ' FCKeditor - The text editor for Internet - http://www.fckeditor.net - ' Copyright (C) 2003-2008 Frederico Caldeira Knabben - ' - ' == BEGIN LICENSE == - ' - ' Licensed under the terms of any of the following licenses at your - ' choice: - ' - ' - GNU General Public License Version 2 or later (the "GPL") - ' http://www.gnu.org/licenses/gpl.html - ' - ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - ' http://www.gnu.org/licenses/lgpl.html - ' - ' - Mozilla Public License Version 1.1 or later (the "MPL") - ' http://www.mozilla.org/MPL/MPL-1.1.html - ' - ' == END LICENSE == - ' - ' This is the File Manager Connector for ASP. -%> - - - - - - -<% - -If ( ConfigIsEnabled = False ) Then - SendError 1, "This connector is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file" -End If - -DoResponse - -Sub DoResponse() - Dim sCommand, sResourceType, sCurrentFolder - - ' Get the main request information. - sCommand = Request.QueryString("Command") - - sResourceType = Request.QueryString("Type") - If ( sResourceType = "" ) Then sResourceType = "File" - - sCurrentFolder = GetCurrentFolder() - - ' Check if it is an allowed command - if ( Not IsAllowedCommand( sCommand ) ) then - SendError 1, "The """ & sCommand & """ command isn't allowed" - end if - - ' Check if it is an allowed resource type. - if ( Not IsAllowedType( sResourceType ) ) Then - SendError 1, "The """ & sResourceType & """ resource type isn't allowed" - end if - - ' File Upload doesn't have to Return XML, so it must be intercepted before anything. - If ( sCommand = "FileUpload" ) Then - FileUpload sResourceType, sCurrentFolder, sCommand - Exit Sub - End If - - SetXmlHeaders - - CreateXmlHeader sCommand, sResourceType, sCurrentFolder, GetUrlFromPath( sResourceType, sCurrentFolder, sCommand) - - ' Execute the required command. - Select Case sCommand - Case "GetFolders" - GetFolders sResourceType, sCurrentFolder - Case "GetFoldersAndFiles" - GetFoldersAndFiles sResourceType, sCurrentFolder - Case "CreateFolder" - CreateFolder sResourceType, sCurrentFolder - End Select - - CreateXmlFooter - - Response.End -End Sub - -%> diff --git a/fckeditor/editor/filemanager/connectors/asp/io.asp b/fckeditor/editor/filemanager/connectors/asp/io.asp deleted file mode 100644 index ba6315fe..00000000 --- a/fckeditor/editor/filemanager/connectors/asp/io.asp +++ /dev/null @@ -1,236 +0,0 @@ -<% - ' FCKeditor - The text editor for Internet - http://www.fckeditor.net - ' Copyright (C) 2003-2008 Frederico Caldeira Knabben - ' - ' == BEGIN LICENSE == - ' - ' Licensed under the terms of any of the following licenses at your - ' choice: - ' - ' - GNU General Public License Version 2 or later (the "GPL") - ' http://www.gnu.org/licenses/gpl.html - ' - ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - ' http://www.gnu.org/licenses/lgpl.html - ' - ' - Mozilla Public License Version 1.1 or later (the "MPL") - ' http://www.mozilla.org/MPL/MPL-1.1.html - ' - ' == END LICENSE == - ' - ' This file include IO specific functions used by the ASP Connector. -%> -<% -function CombinePaths( sBasePath, sFolder) - CombinePaths = RemoveFromEnd( sBasePath, "/" ) & "/" & RemoveFromStart( sFolder, "/" ) -end function - -function CombineLocalPaths( sBasePath, sFolder) - sFolder = replace(sFolder, "/", "\") - ' The RemoveFrom* functions use RegExp, so we must escape the \ - CombineLocalPaths = RemoveFromEnd( sBasePath, "\\" ) & "\" & RemoveFromStart( sFolder, "\\" ) -end function - -Function GetResourceTypePath( resourceType, sCommand ) - if ( sCommand = "QuickUpload") then - GetResourceTypePath = ConfigQuickUploadPath.Item( resourceType ) - else - GetResourceTypePath = ConfigFileTypesPath.Item( resourceType ) - end if -end Function - -Function GetResourceTypeDirectory( resourceType, sCommand ) - if ( sCommand = "QuickUpload") then - - if ( ConfigQuickUploadAbsolutePath.Item( resourceType ) <> "" ) then - GetResourceTypeDirectory = ConfigQuickUploadAbsolutePath.Item( resourceType ) - else - ' Map the "UserFiles" path to a local directory. - GetResourceTypeDirectory = Server.MapPath( ConfigQuickUploadPath.Item( resourceType ) ) - end if - else - if ( ConfigFileTypesAbsolutePath.Item( resourceType ) <> "" ) then - GetResourceTypeDirectory = ConfigFileTypesAbsolutePath.Item( resourceType ) - else - ' Map the "UserFiles" path to a local directory. - GetResourceTypeDirectory = Server.MapPath( ConfigFileTypesPath.Item( resourceType ) ) - end if - end if -end Function - -Function GetUrlFromPath( resourceType, folderPath, sCommand ) - GetUrlFromPath = CombinePaths( GetResourceTypePath( resourceType, sCommand ), folderPath ) -End Function - -Function RemoveExtension( fileName ) - RemoveExtension = Left( fileName, InStrRev( fileName, "." ) - 1 ) -End Function - -Function ServerMapFolder( resourceType, folderPath, sCommand ) - Dim sResourceTypePath - ' Get the resource type directory. - sResourceTypePath = GetResourceTypeDirectory( resourceType, sCommand ) - - ' Ensure that the directory exists. - CreateServerFolder sResourceTypePath - - ' Return the resource type directory combined with the required path. - ServerMapFolder = CombineLocalPaths( sResourceTypePath, folderPath ) -End Function - -Sub CreateServerFolder( folderPath ) - Dim oFSO - Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" ) - - Dim sParent - sParent = oFSO.GetParentFolderName( folderPath ) - - ' If folderPath is a network path (\\server\folder\) then sParent is an empty string. - ' Get out. - if (sParent = "") then exit sub - - ' Check if the parent exists, or create it. - If ( NOT oFSO.FolderExists( sParent ) ) Then CreateServerFolder( sParent ) - - If ( oFSO.FolderExists( folderPath ) = False ) Then - On Error resume next - oFSO.CreateFolder( folderPath ) - - if err.number<>0 then - dim sErrorNumber - Dim iErrNumber, sErrDescription - iErrNumber = err.number - sErrDescription = err.Description - - On Error Goto 0 - - Select Case iErrNumber - Case 52 - sErrorNumber = "102" ' Invalid Folder Name. - Case 70 - sErrorNumber = "103" ' Security Error. - Case 76 - sErrorNumber = "102" ' Path too long. - Case Else - sErrorNumber = "110" - End Select - - SendError sErrorNumber, "CreateServerFolder(" & folderPath & ") : " & sErrDescription - end if - - End If - - Set oFSO = Nothing -End Sub - -Function IsAllowedExt( extension, resourceType ) - Dim oRE - Set oRE = New RegExp - oRE.IgnoreCase = True - oRE.Global = True - - Dim sAllowed, sDenied - sAllowed = ConfigAllowedExtensions.Item( resourceType ) - sDenied = ConfigDeniedExtensions.Item( resourceType ) - - IsAllowedExt = True - - If sDenied <> "" Then - oRE.Pattern = sDenied - IsAllowedExt = Not oRE.Test( extension ) - End If - - If IsAllowedExt And sAllowed <> "" Then - oRE.Pattern = sAllowed - IsAllowedExt = oRE.Test( extension ) - End If - - Set oRE = Nothing -End Function - -Function IsAllowedType( resourceType ) - Dim oRE - Set oRE = New RegExp - oRE.IgnoreCase = True - oRE.Global = True - oRE.Pattern = "^(" & ConfigAllowedTypes & ")$" - - IsAllowedType = oRE.Test( resourceType ) - - Set oRE = Nothing -End Function - -Function IsAllowedCommand( sCommand ) - Dim oRE - Set oRE = New RegExp - oRE.IgnoreCase = True - oRE.Global = True - oRE.Pattern = "^(" & ConfigAllowedCommands & ")$" - - IsAllowedCommand = oRE.Test( sCommand ) - - Set oRE = Nothing -End Function - -function GetCurrentFolder() - dim sCurrentFolder - sCurrentFolder = Request.QueryString("CurrentFolder") - If ( sCurrentFolder = "" ) Then sCurrentFolder = "/" - - ' Check the current folder syntax (must begin and start with a slash). - If ( Right( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = sCurrentFolder & "/" - If ( Left( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = "/" & sCurrentFolder - - ' Check for invalid folder paths (..) - If ( InStr( 1, sCurrentFolder, ".." ) <> 0 OR InStr( 1, sCurrentFolder, "\" ) <> 0) Then - SendError 102, "" - End If - - GetCurrentFolder = sCurrentFolder -end function - -' Do a cleanup of the folder name to avoid possible problems -function SanitizeFolderName( sNewFolderName ) - Dim oRegex - Set oRegex = New RegExp - oRegex.Global = True - -' remove . \ / | : ? * " < > and control characters - oRegex.Pattern = "(\.|\\|\/|\||:|\?|\*|""|\<|\>|[\u0000-\u001F]|\u007F)" - SanitizeFolderName = oRegex.Replace( sNewFolderName, "_" ) - - Set oRegex = Nothing -end function - -' Do a cleanup of the file name to avoid possible problems -function SanitizeFileName( sNewFileName ) - Dim oRegex - Set oRegex = New RegExp - oRegex.Global = True - - if ( ConfigForceSingleExtension = True ) then - oRegex.Pattern = "\.(?![^.]*$)" - sNewFileName = oRegex.Replace( sNewFileName, "_" ) - end if - -' remove \ / | : ? * " < > and control characters - oRegex.Pattern = "(\\|\/|\||:|\?|\*|""|\<|\>|[\u0000-\u001F]|\u007F)" - SanitizeFileName = oRegex.Replace( sNewFileName, "_" ) - - Set oRegex = Nothing -end function - -' This is the function that sends the results of the uploading process. -Sub SendUploadResults( errorNumber, fileUrl, fileName, customMsg ) - Response.Clear - Response.Write "" - Response.End -End Sub - -%> diff --git a/fckeditor/editor/filemanager/connectors/asp/upload.asp b/fckeditor/editor/filemanager/connectors/asp/upload.asp deleted file mode 100644 index 8fa11c2c..00000000 --- a/fckeditor/editor/filemanager/connectors/asp/upload.asp +++ /dev/null @@ -1,65 +0,0 @@ -<%@ CodePage=65001 Language="VBScript"%> -<% -Option Explicit -Response.Buffer = True -%> -<% - ' FCKeditor - The text editor for Internet - http://www.fckeditor.net - ' Copyright (C) 2003-2008 Frederico Caldeira Knabben - ' - ' == BEGIN LICENSE == - ' - ' Licensed under the terms of any of the following licenses at your - ' choice: - ' - ' - GNU General Public License Version 2 or later (the "GPL") - ' http://www.gnu.org/licenses/gpl.html - ' - ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - ' http://www.gnu.org/licenses/lgpl.html - ' - ' - Mozilla Public License Version 1.1 or later (the "MPL") - ' http://www.mozilla.org/MPL/MPL-1.1.html - ' - ' == END LICENSE == - ' - ' This is the "File Uploader" for ASP. -%> - - - - - -<% - -Sub SendError( number, text ) - SendUploadResults number, "", "", text -End Sub - -' Check if this uploader has been enabled. -If ( ConfigIsEnabled = False ) Then - SendUploadResults "1", "", "", "This file uploader is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file" -End If - - Dim sCommand, sResourceType, sCurrentFolder - - sCommand = "QuickUpload" - - sResourceType = Request.QueryString("Type") - If ( sResourceType = "" ) Then sResourceType = "File" - - sCurrentFolder = GetCurrentFolder() - - ' Is Upload enabled? - if ( Not IsAllowedCommand( sCommand ) ) then - SendUploadResults "1", "", "", "The """ & sCommand & """ command isn't allowed" - end if - - ' Check if it is an allowed resource type. - if ( Not IsAllowedType( sResourceType ) ) Then - SendUploadResults "1", "", "", "The " & sResourceType & " resource type isn't allowed" - end if - - FileUpload sResourceType, sCurrentFolder, sCommand - -%> diff --git a/fckeditor/editor/filemanager/connectors/asp/util.asp b/fckeditor/editor/filemanager/connectors/asp/util.asp deleted file mode 100644 index ba414f59..00000000 --- a/fckeditor/editor/filemanager/connectors/asp/util.asp +++ /dev/null @@ -1,55 +0,0 @@ -<% - ' FCKeditor - The text editor for Internet - http://www.fckeditor.net - ' Copyright (C) 2003-2008 Frederico Caldeira Knabben - ' - ' == BEGIN LICENSE == - ' - ' Licensed under the terms of any of the following licenses at your - ' choice: - ' - ' - GNU General Public License Version 2 or later (the "GPL") - ' http://www.gnu.org/licenses/gpl.html - ' - ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - ' http://www.gnu.org/licenses/lgpl.html - ' - ' - Mozilla Public License Version 1.1 or later (the "MPL") - ' http://www.mozilla.org/MPL/MPL-1.1.html - ' - ' == END LICENSE == - ' - ' This file include generic functions used by the ASP Connector. -%> -<% -Function RemoveFromStart( sourceString, charToRemove ) - Dim oRegex - Set oRegex = New RegExp - oRegex.Pattern = "^" & charToRemove & "+" - - RemoveFromStart = oRegex.Replace( sourceString, "" ) -End Function - -Function RemoveFromEnd( sourceString, charToRemove ) - Dim oRegex - Set oRegex = New RegExp - oRegex.Pattern = charToRemove & "+$" - - RemoveFromEnd = oRegex.Replace( sourceString, "" ) -End Function - -Function ConvertToXmlAttribute( value ) - ConvertToXmlAttribute = Replace( value, "&", "&" ) -End Function - -Function InArray( value, sourceArray ) - Dim i - For i = 0 to UBound( sourceArray ) - If sourceArray(i) = value Then - InArray = True - Exit Function - End If - Next - InArray = False -End Function - -%> diff --git a/fckeditor/editor/filemanager/connectors/aspx/config.ascx b/fckeditor/editor/filemanager/connectors/aspx/config.ascx deleted file mode 100644 index fafd7d70..00000000 --- a/fckeditor/editor/filemanager/connectors/aspx/config.ascx +++ /dev/null @@ -1,98 +0,0 @@ -<%@ Control Language="C#" EnableViewState="false" AutoEventWireup="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Config" %> -<%-- - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Configuration file for the File Browser Connector for ASP.NET. ---%> - diff --git a/fckeditor/editor/filemanager/connectors/aspx/connector.aspx b/fckeditor/editor/filemanager/connectors/aspx/connector.aspx deleted file mode 100644 index 8f27ade7..00000000 --- a/fckeditor/editor/filemanager/connectors/aspx/connector.aspx +++ /dev/null @@ -1,32 +0,0 @@ -<%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Connector" AutoEventWireup="false" %> -<%@ Register Src="config.ascx" TagName="Config" TagPrefix="FCKeditor" %> -<%-- - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This is the File Browser Connector for ASP.NET. - * - * The code of this page if included in the FCKeditor.Net package, - * in the FredCK.FCKeditorV2.dll assembly file. So to use it you must - * include that DLL in your "bin" directory. - * - * To download the FCKeditor.Net package, go to our official web site: - * http://www.fckeditor.net ---%> - diff --git a/fckeditor/editor/filemanager/connectors/aspx/upload.aspx b/fckeditor/editor/filemanager/connectors/aspx/upload.aspx deleted file mode 100644 index 4c295cdc..00000000 --- a/fckeditor/editor/filemanager/connectors/aspx/upload.aspx +++ /dev/null @@ -1,32 +0,0 @@ -<%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Uploader" AutoEventWireup="false" %> -<%@ Register Src="config.ascx" TagName="Config" TagPrefix="FCKeditor" %> -<%-- - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This is the Uploader for ASP.NET. - * - * The code of this page if included in the FCKeditor.Net package, - * in the FredCK.FCKeditorV2.dll assemblyfile. So to use it you must - * include that DLL in your "bin" directory. - * - * To download the FCKeditor.Net package, go to our official web site: - * http://www.fckeditor.net ---%> - diff --git a/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc b/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc deleted file mode 100644 index b9b919c7..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm b/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm deleted file mode 100644 index ce21a3ad..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - - - - - - - userFilesPath = config.userFilesPath; - - if ( userFilesPath eq "" ) - { - userFilesPath = "/userfiles/"; - } - - // make sure the user files path is correctly formatted - userFilesPath = replace(userFilesPath, "\", "/", "ALL"); - userFilesPath = replace(userFilesPath, '//', '/', 'ALL'); - if ( right(userFilesPath,1) NEQ "/" ) - { - userFilesPath = userFilesPath & "/"; - } - if ( left(userFilesPath,1) NEQ "/" ) - { - userFilesPath = "/" & userFilesPath; - } - - // make sure the current folder is correctly formatted - url.currentFolder = replace(url.currentFolder, "\", "/", "ALL"); - url.currentFolder = replace(url.currentFolder, '//', '/', 'ALL'); - if ( right(url.currentFolder,1) neq "/" ) - { - url.currentFolder = url.currentFolder & "/"; - } - if ( left(url.currentFolder,1) neq "/" ) - { - url.currentFolder = "/" & url.currentFolder; - } - - if ( find("/",getBaseTemplatePath()) neq 0 ) - { - fs = "/"; - } - else - { - fs = "\"; - } - - // Get the base physical path to the web root for this application. The code to determine the path automatically assumes that - // the "FCKeditor" directory in the http request path is directly off the web root for the application and that it's not a - // virtual directory or a symbolic link / junction. Use the serverPath config setting to force a physical path if necessary. - if ( len(config.serverPath) ) - { - serverPath = config.serverPath; - - if ( right(serverPath,1) neq fs ) - { - serverPath = serverPath & fs; - } - } - else - { - serverPath = replaceNoCase(getBaseTemplatePath(),replace(cgi.script_name,"/",fs,"all"),"") & replace(userFilesPath,"/",fs,"all"); - } - - rootPath = left( serverPath, Len(serverPath) - Len(userFilesPath) ) ; - xmlContent = ""; // append to this string to build content - - - - - - - - - - - - - - - - - - - - - - - - "> - - - - "> - - - - '> - - - - '> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - i=1; - folders = ""; - while( i lte qDir.recordCount ) { - if( not compareNoCase( qDir.type[i], "FILE" )) - break; - if( not listFind(".,..", qDir.name[i]) ) - folders = folders & ''; - i=i+1; - } - - xmlContent = xmlContent & '' & folders & ''; - - - - - - - - - - - - i=1; - folders = ""; - files = ""; - while( i lte qDir.recordCount ) { - if( not compareNoCase( qDir.type[i], "DIR" ) and not listFind(".,..", qDir.name[i]) ) { - folders = folders & ''; - } else if( not compareNoCase( qDir.type[i], "FILE" ) ) { - fileSizeKB = round(qDir.size[i] / 1024); - files = files & ''; - } - i=i+1; - } - - xmlContent = xmlContent & '' & folders & ''; - xmlContent = xmlContent & '' & files & ''; - - - - - - - - - - - newFolderName = url.newFolderName; - if( reFind("[^A-Za-z0-9_\-\.]", newFolderName) ) { - // Munge folder name same way as we do the filename - // This means folder names are always US-ASCII so we don't have to worry about CF5 and UTF-8 - newFolderName = reReplace(newFolderName, "[^A-Za-z0-9\-\.]", "_", "all"); - newFolderName = reReplace(newFolderName, "_{2,}", "_", "all"); - newFolderName = reReplace(newFolderName, "([^_]+)_+$", "\1", "all"); - newFolderName = reReplace(newFolderName, "$_([^_]+)$", "\1", "all"); - } - - - - - - - - - - - - - - - - - - - - - '> - - - - - - - - - - - - xmlHeader = ''; - xmlHeader = xmlHeader & ''; - xmlFooter = ''; - - - - - - -#xmlHeader##xmlContent##xmlFooter# diff --git a/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm b/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm deleted file mode 100644 index daebaf0d..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - function SendUploadResults(errorNumber, fileUrl, fileName, customMsg) - { - WriteOutput(''); - } - - - - - - - - - - - - - - - - - - - - - - - - userFilesPath = config.userFilesPath; - - if ( userFilesPath eq "" ) { - userFilesPath = "/userfiles/"; - } - - // make sure the user files path is correctly formatted - userFilesPath = replace(userFilesPath, "\", "/", "ALL"); - userFilesPath = replace(userFilesPath, '//', '/', 'ALL'); - if ( right(userFilesPath,1) NEQ "/" ) { - userFilesPath = userFilesPath & "/"; - } - if ( left(userFilesPath,1) NEQ "/" ) { - userFilesPath = "/" & userFilesPath; - } - - // make sure the current folder is correctly formatted - url.currentFolder = replace(url.currentFolder, "\", "/", "ALL"); - url.currentFolder = replace(url.currentFolder, '//', '/', 'ALL'); - if ( right(url.currentFolder,1) neq "/" ) { - url.currentFolder = url.currentFolder & "/"; - } - if ( left(url.currentFolder,1) neq "/" ) { - url.currentFolder = "/" & url.currentFolder; - } - - if (find("/",getBaseTemplatePath())) { - fs = "/"; - } else { - fs = "\"; - } - - // Get the base physical path to the web root for this application. The code to determine the path automatically assumes that - // the "FCKeditor" directory in the http request path is directly off the web root for the application and that it's not a - // virtual directory or a symbolic link / junction. Use the serverPath config setting to force a physical path if necessary. - if ( len(config.serverPath) ) { - serverPath = config.serverPath; - - if ( right(serverPath,1) neq fs ) { - serverPath = serverPath & fs; - } - } else { - serverPath = replaceNoCase(getBaseTemplatePath(),replace(cgi.script_name,"/",fs,"all"),"") & replace(userFilesPath,"/",fs,"all"); - } - - rootPath = left( serverPath, Len(serverPath) - Len(userFilesPath) ) ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - errorNumber = 0; - fileName = cffile.ClientFileName ; - fileExt = cffile.ServerFileExt ; - fileExisted = false ; - - // munge filename for html download. Only a-z, 0-9, _, - and . are allowed - if( reFind("[^A-Za-z0-9_\-\.]", fileName) ) { - fileName = reReplace(fileName, "[^A-Za-z0-9\-\.]", "_", "ALL"); - fileName = reReplace(fileName, "_{2,}", "_", "ALL"); - fileName = reReplace(fileName, "([^_]+)_+$", "\1", "ALL"); - fileName = reReplace(fileName, "$_([^_]+)$", "\1", "ALL"); - } - - // remove additional dots from file name - if( isDefined("Config.ForceSingleExtension") and Config.ForceSingleExtension ) - fileName = replace( fileName, '.', "_", "all" ) ; - - // When the original filename already exists, add numbers (0), (1), (2), ... at the end of the filename. - if( compare( cffile.ServerFileName, fileName ) ) { - counter = 0; - tmpFileName = fileName; - while( fileExists("#currentFolderPath##fileName#.#fileExt#") ) { - fileExisted = true ; - counter = counter + 1 ; - fileName = tmpFileName & '(#counter#)' ; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm b/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm deleted file mode 100644 index 61a784cc..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm b/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm deleted file mode 100644 index 2a900ce1..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sFileExt = GetExtension( sFileName ) ; - sFilePart = RemoveExtension( sFileName ); - while( fileExists( sServerDir & sFileName ) ) - { - counter = counter + 1; - sFileName = sFilePart & '(#counter#).' & CFFILE.ClientFileExt; - errorNumber = 201; - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - while( i lte qDir.recordCount ) - { - if( compareNoCase( qDir.type[i], "FILE" ) and not listFind( ".,..", qDir.name[i] ) ) - { - folders = folders & '' ; - } - i = i + 1; - } - - #folders# - - - - - - - - - - - - - - - - while( i lte qDir.recordCount ) - { - if( not compareNoCase( qDir.type[i], "DIR" ) and not listFind( ".,..", qDir.name[i] ) ) - { - folders = folders & '' ; - } - else if( not compareNoCase( qDir.type[i], "FILE" ) ) - { - fileSizeKB = round(qDir.size[i] / 1024) ; - files = files & '' ; - } - i = i + 1 ; - } - - #folders# - #files# - - - - - - - - - - - - - - - - sNewFolderName = SanitizeFolderName( sNewFolderName ) ; - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm b/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm deleted file mode 100644 index 8bd1e755..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm b/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm deleted file mode 100644 index e07e4dfb..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +|[[:cntrl:]]+', "_", "all" )> - - - - - - - - - - var chunk = ""; - var fileReaderClass = ""; - var fileReader = ""; - var file = ""; - var done = false; - var counter = 0; - var byteArray = ""; - - if( not fileExists( ARGUMENTS.fileName ) ) - { - return "" ; - } - - if (REQUEST.CFVersion gte 8) - { - file = FileOpen( ARGUMENTS.fileName, "readbinary" ) ; - byteArray = FileRead( file, 1024 ) ; - chunk = toString( toBinary( toBase64( byteArray ) ) ) ; - FileClose( file ) ; - } - else - { - fileReaderClass = createObject("java", "java.io.FileInputStream"); - fileReader = fileReaderClass.init(fileName); - - while(not done) - { - char = fileReader.read(); - counter = counter + 1; - if ( char eq -1 or counter eq ARGUMENTS.bytes) - { - done = true; - } - else - { - chunk = chunk & chr(char) ; - } - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - +|[[:cntrl:]]+', "_", "all" )> - - - diff --git a/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm b/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm deleted file mode 100644 index 9bef3c40..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm b/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm deleted file mode 100644 index 3b8b9b11..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - diff --git a/fckeditor/editor/filemanager/connectors/cfm/config.cfm b/fckeditor/editor/filemanager/connectors/cfm/config.cfm deleted file mode 100644 index f4b90861..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/config.cfm +++ /dev/null @@ -1,189 +0,0 @@ - - - - - Config = StructNew() ; - - // SECURITY: You must explicitly enable this "connector". (Set enabled to "true") - Config.Enabled = false ; - - - // Path to uploaded files relative to the document root. - Config.UserFilesPath = "/userfiles/" ; - - // Use this to force the server path if FCKeditor is not running directly off - // the root of the application or the FCKeditor directory in the URL is a virtual directory - // or a symbolic link / junction - // Example: C:\inetpub\wwwroot\myDocs\ - Config.ServerPath = "" ; - - // Due to security issues with Apache modules, it is recommended to leave the - // following setting enabled. - Config.ForceSingleExtension = true ; - - // Perform additional checks for image files - if set to true, validate image size - // (This feature works in MX 6.0 and above) - Config.SecureImageUploads = true; - - // What the user can do with this connector - Config.ConfigAllowedCommands = "QuickUpload,FileUpload,GetFolders,GetFoldersAndFiles,CreateFolder" ; - - //Allowed Resource Types - Config.ConfigAllowedTypes = "File,Image,Flash,Media" ; - - // For security, HTML is allowed in the first Kb of data for files having the - // following extensions only. - // (This feature works in MX 6.0 and above)) - Config.HtmlExtensions = "html,htm,xml,xsd,txt,js" ; - - //Due to known issues with GetTempDirectory function, it is - //recommended to set this vairiable to a valid directory - //instead of using the GetTempDirectory function - //(used by MX 6.0 and above) - Config.TempDirectory = GetTempDirectory(); - -// Configuration settings for each Resource Type -// -// - AllowedExtensions: the possible extensions that can be allowed. -// If it is empty then any file type can be uploaded. -// - DeniedExtensions: The extensions that won't be allowed. -// If it is empty then no restrictions are done here. -// -// For a file to be uploaded it has to fulfill both the AllowedExtensions -// and DeniedExtensions (that's it: not being denied) conditions. -// -// - FileTypesPath: the virtual folder relative to the document root where -// these resources will be located. -// Attention: It must start and end with a slash: '/' -// -// - FileTypesAbsolutePath: the physical path to the above folder. It must be -// an absolute path. -// If it's an empty string then it will be autocalculated. -// Usefull if you are using a virtual directory, symbolic link or alias. -// Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -// Attention: The above 'FileTypesPath' must point to the same directory. -// Attention: It must end with a slash: '/' -// -// -// - QuickUploadPath: the virtual folder relative to the document root where -// these resources will be uploaded using the Upload tab in the resources -// dialogs. -// Attention: It must start and end with a slash: '/' -// -// - QuickUploadAbsolutePath: the physical path to the above folder. It must be -// an absolute path. -// If it's an empty string then it will be autocalculated. -// Usefull if you are using a virtual directory, symbolic link or alias. -// Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -// Attention: The above 'QuickUploadPath' must point to the same directory. -// Attention: It must end with a slash: '/' - - Config.AllowedExtensions = StructNew() ; - Config.DeniedExtensions = StructNew() ; - Config.FileTypesPath = StructNew() ; - Config.FileTypesAbsolutePath = StructNew() ; - Config.QuickUploadPath = StructNew() ; - Config.QuickUploadAbsolutePath = StructNew() ; - - Config.AllowedExtensions["File"] = "7z,aiff,asf,avi,bmp,csv,doc,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xml,zip" ; - Config.DeniedExtensions["File"] = "" ; - Config.FileTypesPath["File"] = Config.UserFilesPath & 'file/' ; - Config.FileTypesAbsolutePath["File"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'file/') ) ; - Config.QuickUploadPath["File"] = Config.FileTypesPath["File"] ; - Config.QuickUploadAbsolutePath["File"] = Config.FileTypesAbsolutePath["File"] ; - - Config.AllowedExtensions["Image"] = "bmp,gif,jpeg,jpg,png" ; - Config.DeniedExtensions["Image"] = "" ; - Config.FileTypesPath["Image"] = Config.UserFilesPath & 'image/' ; - Config.FileTypesAbsolutePath["Image"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'image/') ) ; - Config.QuickUploadPath["Image"] = Config.FileTypesPath["Image"] ; - Config.QuickUploadAbsolutePath["Image"] = Config.FileTypesAbsolutePath["Image"] ; - - Config.AllowedExtensions["Flash"] = "swf,flv" ; - Config.DeniedExtensions["Flash"] = "" ; - Config.FileTypesPath["Flash"] = Config.UserFilesPath & 'flash/' ; - Config.FileTypesAbsolutePath["Flash"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'flash/') ) ; - Config.QuickUploadPath["Flash"] = Config.FileTypesPath["Flash"] ; - Config.QuickUploadAbsolutePath["Flash"] = Config.FileTypesAbsolutePath["Flash"] ; - - Config.AllowedExtensions["Media"] = "aiff,asf,avi,bmp,fla,flv,gif,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,png,qt,ram,rm,rmi,rmvb,swf,tif,tiff,wav,wma,wmv" ; - Config.DeniedExtensions["Media"] = "" ; - Config.FileTypesPath["Media"] = Config.UserFilesPath & 'media/' ; - Config.FileTypesAbsolutePath["Media"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'media/') ) ; - Config.QuickUploadPath["Media"] = Config.FileTypesPath["Media"] ; - Config.QuickUploadAbsolutePath["Media"] = Config.FileTypesAbsolutePath["Media"] ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - function structCopyKeys(stFrom, stTo) { - for ( key in stFrom ) { - if ( isStruct(stFrom[key]) ) { - structCopyKeys(stFrom[key],stTo[key]); - } else { - stTo[key] = stFrom[key]; - } - } - } - structCopyKeys(FCKeditor, config); - - - diff --git a/fckeditor/editor/filemanager/connectors/cfm/connector.cfm b/fckeditor/editor/filemanager/connectors/cfm/connector.cfm deleted file mode 100644 index 342e449c..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/connector.cfm +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - diff --git a/fckeditor/editor/filemanager/connectors/cfm/image.cfc b/fckeditor/editor/filemanager/connectors/cfm/image.cfc deleted file mode 100644 index 378c4b4b..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/image.cfc +++ /dev/null @@ -1,1324 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - paths = arrayNew(1); - paths[1] = expandPath("metadata-extractor-2.3.1.jar"); - loader = createObject("component", "javaloader.JavaLoader").init(paths); - - //at this stage we only have access to the class, but we don't have an instance - JpegMetadataReader = loader.create("com.drew.imaging.jpeg.JpegMetadataReader"); - - myMetaData = JpegMetadataReader.readMetadata(inFile); - directories = myMetaData.getDirectoryIterator(); - while (directories.hasNext()) { - currentDirectory = directories.next(); - tags = currentDirectory.getTagIterator(); - while (tags.hasNext()) { - currentTag = tags.next(); - if (currentTag.getTagName() DOES NOT CONTAIN "Unknown") { //leave out the junk data - queryAddRow(retQry); - querySetCell(retQry,"dirName",replace(currentTag.getDirectoryName(),' ','_','ALL')); - tagName = replace(currentTag.getTagName(),' ','','ALL'); - tagName = replace(tagName,'/','','ALL'); - querySetCell(retQry,"tagName",tagName); - querySetCell(retQry,"tagValue",currentTag.getDescription()); - } - } - } - return retQry; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - resizedImage = CreateObject("java", "java.awt.image.BufferedImage"); - at = CreateObject("java", "java.awt.geom.AffineTransform"); - op = CreateObject("java", "java.awt.image.AffineTransformOp"); - - w = img.getWidth(); - h = img.getHeight(); - - if (preserveAspect and cropToExact and newHeight gt 0 and newWidth gt 0) - { - if (w / h gt newWidth / newHeight){ - newWidth = 0; - } else if (w / h lt newWidth / newHeight){ - newHeight = 0; - } - } else if (preserveAspect and newHeight gt 0 and newWidth gt 0) { - if (w / h gt newWidth / newHeight){ - newHeight = 0; - } else if (w / h lt newWidth / newHeight){ - newWidth = 0; - } - } - if (newWidth gt 0 and newHeight eq 0) { - scale = newWidth / w; - w = newWidth; - h = round(h*scale); - } else if (newHeight gt 0 and newWidth eq 0) { - scale = newHeight / h; - h = newHeight; - w = round(w*scale); - } else if (newHeight gt 0 and newWidth gt 0) { - w = newWidth; - h = newHeight; - } else { - retVal = throw( retVal.errorMessage); - return retVal; - } - resizedImage.init(javacast("int",w),javacast("int",h),img.getType()); - - w = w / img.getWidth(); - h = h / img.getHeight(); - - - - op.init(at.getScaleInstance(javacast("double",w),javacast("double",h)), rh); - // resizedImage = op.createCompatibleDestImage(img, img.getColorModel()); - op.filter(img, resizedImage); - - imgInfo = getimageinfo(resizedImage, ""); - if (imgInfo.errorCode gt 0) - { - return imgInfo; - } - - cropOffsetX = max( Int( (imgInfo.width/2) - (newWidth/2) ), 0 ); - cropOffsetY = max( Int( (imgInfo.height/2) - (newHeight/2) ), 0 ); - // There is a chance that the image is exactly the correct - // width and height and don't need to be cropped - if - ( - preserveAspect and cropToExact - and - (imgInfo.width IS NOT specifiedWidth OR imgInfo.height IS NOT specifiedHeight) - ) - { - // Get the correct offset to get the center of the image - cropOffsetX = max( Int( (imgInfo.width/2) - (specifiedWidth/2) ), 0 ); - cropOffsetY = max( Int( (imgInfo.height/2) - (specifiedHeight/2) ), 0 ); - - cropImageResult = crop( resizedImage, "", "", cropOffsetX, cropOffsetY, specifiedWidth, specifiedHeight ); - if ( cropImageResult.errorCode GT 0) - { - return cropImageResult; - } else { - resizedImage = cropImageResult.img; - } - } - if (outputFile eq "") - { - retVal.img = resizedImage; - return retVal; - } else { - saveImage = writeImage(outputFile, resizedImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (fromX + newWidth gt img.getWidth() - OR - fromY + newHeight gt img.getHeight() - ) - { - retval = throw( "The cropped image dimensions go beyond the original image dimensions."); - return retVal; - } - croppedImage = img.getSubimage(javaCast("int", fromX), javaCast("int", fromY), javaCast("int", newWidth), javaCast("int", newHeight) ); - if (outputFile eq "") - { - retVal.img = croppedImage; - return retVal; - } else { - saveImage = writeImage(outputFile, croppedImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rotatedImage = CreateObject("java", "java.awt.image.BufferedImage"); - at = CreateObject("java", "java.awt.geom.AffineTransform"); - op = CreateObject("java", "java.awt.image.AffineTransformOp"); - - iw = img.getWidth(); h = iw; - ih = img.getHeight(); w = ih; - - if(arguments.degrees eq 180) { w = iw; h = ih; } - - x = (w/2)-(iw/2); - y = (h/2)-(ih/2); - - rotatedImage.init(javacast("int",w),javacast("int",h),img.getType()); - - at.rotate(arguments.degrees * 0.0174532925,w/2,h/2); - at.translate(x,y); - op.init(at, rh); - - op.filter(img, rotatedImage); - - if (outputFile eq "") - { - retVal.img = rotatedImage; - return retVal; - } else { - saveImage = writeImage(outputFile, rotatedImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (outputFile eq "") - { - retVal = throw( "The convert method requires a valid output filename."); - return retVal; - } else { - saveImage = writeImage(outputFile, img, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /* - JPEG output method handles compression - */ - out = createObject("java", "java.io.BufferedOutputStream"); - fos = createObject("java", "java.io.FileOutputStream"); - fos.init(tempOutputFile); - out.init(fos); - JPEGCodec = createObject("java", "com.sun.image.codec.jpeg.JPEGCodec"); - encoder = JPEGCodec.createJPEGEncoder(out); - param = encoder.getDefaultJPEGEncodeParam(img); - param.setQuality(quality, false); - encoder.setJPEGEncodeParam(param); - encoder.encode(img); - out.close(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - flippedImage = CreateObject("java", "java.awt.image.BufferedImage"); - at = CreateObject("java", "java.awt.geom.AffineTransform"); - op = CreateObject("java", "java.awt.image.AffineTransformOp"); - - flippedImage.init(img.getWidth(), img.getHeight(), img.getType()); - - if (direction eq "horizontal") { - at = at.getScaleInstance(-1, 1); - at.translate(-img.getWidth(), 0); - } else { - at = at.getScaleInstance(1,-1); - at.translate(0, -img.getHeight()); - } - op.init(at, rh); - op.filter(img, flippedImage); - - if (outputFile eq "") - { - retVal.img = flippedImage; - return retVal; - } else { - saveImage = writeImage(outputFile, flippedImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // initialize the blur filter - variables.blurFilter.init(arguments.blurAmount); - // move the source image into the destination image - // so we can repeatedly blur it. - destImage = srcImage; - - for (i=1; i lte iterations; i=i+1) - { - // do the blur i times - destImage = variables.blurFilter.filter(destImage); - } - - - if (outputFile eq "") - { - // return the image object - retVal.img = destImage; - return retVal; - } else { - // write the image object to the specified file. - saveImage = writeImage(outputFile, destImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // initialize the sharpen filter - variables.sharpenFilter.init(); - - destImage = variables.sharpenFilter.filter(srcImage); - - - if (outputFile eq "") - { - // return the image object - retVal.img = destImage; - return retVal; - } else { - // write the image object to the specified file. - saveImage = writeImage(outputFile, destImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // initialize the posterize filter - variables.posterizeFilter.init(arguments.amount); - - destImage = variables.posterizeFilter.filter(srcImage); - - - if (outputFile eq "") - { - // return the image object - retVal.img = destImage; - return retVal; - } else { - // write the image object to the specified file. - saveImage = writeImage(outputFile, destImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // load objects - bgImage = CreateObject("java", "java.awt.image.BufferedImage"); - fontImage = CreateObject("java", "java.awt.image.BufferedImage"); - overlayImage = CreateObject("java", "java.awt.image.BufferedImage"); - Color = CreateObject("java","java.awt.Color"); - font = createObject("java","java.awt.Font"); - font_stream = createObject("java","java.io.FileInputStream"); - ac = CreateObject("Java", "java.awt.AlphaComposite"); - - // set up basic needs - fontColor = Color.init(javacast("int", rgb.red), javacast("int", rgb.green), javacast("int", rgb.blue)); - - if (fontDetails.fontFile neq "") - { - font_stream.init(arguments.fontDetails.fontFile); - font = font.createFont(font.TRUETYPE_FONT, font_stream); - font = font.deriveFont(javacast("float",arguments.fontDetails.size)); - } else { - font.init(fontDetails.fontName, evaluate(fontDetails.style), fontDetails.size); - } - // get font metrics using a 1x1 bufferedImage - fontImage.init(1,1,img.getType()); - g2 = fontImage.createGraphics(); - g2.setRenderingHints(getRenderingHints()); - fc = g2.getFontRenderContext(); - bounds = font.getStringBounds(content,fc); - - g2 = img.createGraphics(); - g2.setRenderingHints(getRenderingHints()); - g2.setFont(font); - g2.setColor(fontColor); - // in case you want to change the alpha - // g2.setComposite(ac.getInstance(ac.SRC_OVER, 0.50)); - - // the location (arguments.fontDetails.size+y) doesn't really work - // the way I want it to. - g2.drawString(content,javacast("int",x),javacast("int",arguments.fontDetails.size+y)); - - if (outputFile eq "") - { - retVal.img = img; - return retVal; - } else { - saveImage = writeImage(outputFile, img, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - at = CreateObject("java", "java.awt.geom.AffineTransform"); - op = CreateObject("java", "java.awt.image.AffineTransformOp"); - ac = CreateObject("Java", "java.awt.AlphaComposite"); - gfx = originalImage.getGraphics(); - gfx.setComposite(ac.getInstance(ac.SRC_OVER, alpha)); - - at.init(); - // op.init(at,op.TYPE_BILINEAR); - op.init(at, rh); - - gfx.drawImage(wmImage, op, javaCast("int",arguments.placeAtX), javacast("int", arguments.placeAtY)); - - gfx.dispose(); - - if (outputFile eq "") - { - retVal.img = originalImage; - return retVal; - } else { - saveImage = writeImage(outputFile, originalImage, jpegCompression); - if (saveImage.errorCode gt 0) - { - return saveImage; - } else { - return retVal; - } - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // convert the image to a specified BufferedImage type and return it - - var width = bImage.getWidth(); - var height = bImage.getHeight(); - var newImage = createObject("java","java.awt.image.BufferedImage").init(javacast("int",width), javacast("int",height), javacast("int",type)); - // int[] rgbArray = new int[width*height]; - var rgbArray = variables.arrObj.newInstance(variables.intClass, javacast("int",width*height)); - - bImage.getRGB( - javacast("int",0), - javacast("int",0), - javacast("int",width), - javacast("int",height), - rgbArray, - javacast("int",0), - javacast("int",width) - ); - newImage.setRGB( - javacast("int",0), - javacast("int",0), - javacast("int",width), - javacast("int",height), - rgbArray, - javacast("int",0), - javacast("int",width) - ); - return newImage; - - - - - diff --git a/fckeditor/editor/filemanager/connectors/cfm/upload.cfm b/fckeditor/editor/filemanager/connectors/cfm/upload.cfm deleted file mode 100644 index 0da40ae7..00000000 --- a/fckeditor/editor/filemanager/connectors/cfm/upload.cfm +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - diff --git a/fckeditor/editor/filemanager/connectors/lasso/config.lasso b/fckeditor/editor/filemanager/connectors/lasso/config.lasso deleted file mode 100644 index da683cbe..00000000 --- a/fckeditor/editor/filemanager/connectors/lasso/config.lasso +++ /dev/null @@ -1,65 +0,0 @@ -[//lasso -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Configuration file for the File Manager Connector for Lasso. - */ - - /*..................................................................... - The connector uses the file tags, which require authentication. Enter a - valid username and password from Lasso admin for a group with file tags - permissions for uploads and the path you define in UserFilesPath below. - */ - - var('connection') = array( - -username='xxxxxxxx', - -password='xxxxxxxx' - ); - - - /*..................................................................... - Set the base path for files that users can upload and browse (relative - to server root). - - Set which file extensions are allowed and/or denied for each file type. - */ - var('config') = map( - 'Enabled' = false, - 'UserFilesPath' = '/userfiles/', - 'Subdirectories' = map( - 'File' = 'File/', - 'Image' = 'Image/', - 'Flash' = 'Flash/', - 'Media' = 'Media/' - ), - 'AllowedExtensions' = map( - 'File' = array('7z','aiff','asf','avi','bmp','csv','doc','fla','flv','gif','gz','gzip','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','ods','odt','pdf','png','ppt','pxd','qt','ram','rar','rm','rmi','rmvb','rtf','sdc','sitd','swf','sxc','sxw','tar','tgz','tif','tiff','txt','vsd','wav','wma','wmv','xls','xml','zip'), - 'Image' = array('bmp','gif','jpeg','jpg','png'), - 'Flash' = array('swf','flv'), - 'Media' = array('aiff','asf','avi','bmp','fla','flv','gif','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','png','qt','ram','rm','rmi','rmvb','swf','tif','tiff','wav','wma','wmv') - ), - 'DeniedExtensions' = map( - 'File' = array(), - 'Image' = array(), - 'Flash' = array(), - 'Media' = array() - ) - ); -] diff --git a/fckeditor/editor/filemanager/connectors/lasso/connector.lasso b/fckeditor/editor/filemanager/connectors/lasso/connector.lasso deleted file mode 100644 index 96d0db0b..00000000 --- a/fckeditor/editor/filemanager/connectors/lasso/connector.lasso +++ /dev/null @@ -1,322 +0,0 @@ -[//lasso -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This is the File Manager Connector for Lasso. - */ - - /*..................................................................... - Include global configuration. See config.lasso for details. - */ - include('config.lasso'); - - - /*..................................................................... - Translate current date/time to GMT for custom header. - */ - var('headerDate') = date_localtogmt(date)->format('%a, %d %b %Y %T GMT'); - - - /*..................................................................... - Convert query string parameters to variables and initialize output. - */ - var( - 'Command' = action_param('Command'), - 'Type' = action_param('Type'), - 'CurrentFolder' = action_param('CurrentFolder'), - 'ServerPath' = action_param('ServerPath'), - 'NewFolderName' = action_param('NewFolderName'), - 'NewFile' = null, - 'NewFileName' = string, - 'OrigFilePath' = string, - 'NewFilePath' = string, - 'commandData' = string, - 'folders' = '\t\n', - 'files' = '\t\n', - 'errorNumber' = integer, - 'responseType' = 'xml', - 'uploadResult' = '0' - ); - - /*..................................................................... - Custom tag sets the HTML response. - */ - - define_tag( - 'htmlreply', - -namespace='fck_', - -priority='replace', - -required='uploadResult', - -optional='NewFilePath', - -type='string', - -description='Sets the HTML response for the FCKEditor File Upload feature.' - ); - $__html_reply__ = '\ - - '; - else; - $__html_reply__ = $__html_reply__ + '\ - window.parent.OnUploadCompleted(' + $uploadResult + '); - - '; - /if; - /define_tag; - - - /*..................................................................... - Calculate the path to the current folder. - */ - $ServerPath == '' ? $ServerPath = $config->find('UserFilesPath'); - - var('currentFolderURL' = $ServerPath - + $config->find('Subdirectories')->find(action_param('Type')) - + $CurrentFolder - ); - - if($CurrentFolder->(Find: '..') || $CurrentFolder->(Find: '\\')); - if($Command == 'FileUpload'); - $responseType = 'html'; - $uploadResult = '102'; - fck_htmlreply( - -uploadResult=$uploadResult - ); - else; - $errorNumber = 102; - $commandData += '\n'; - /if; - else; - - /*..................................................................... - Build the appropriate response per the 'Command' parameter. Wrap the - entire process in an inline for file tag permissions. - */ - inline($connection); - select($Command); - /*............................................................. - List all subdirectories in the 'Current Folder' directory. - */ - case('GetFolders'); - $commandData += '\t\n'; - - iterate(file_listdirectory($currentFolderURL), local('this')); - #this->endswith('/') ? $commandData += '\t\t\n'; - /iterate; - - $commandData += '\t\n'; - - - /*............................................................. - List both files and folders in the 'Current Folder' directory. - Include the file sizes in kilobytes. - */ - case('GetFoldersAndFiles'); - iterate(file_listdirectory($currentFolderURL), local('this')); - if(#this->endswith('/')); - $folders += '\t\t\n'; - else; - local('size') = file_getsize($currentFolderURL + #this) / 1024; - $files += '\t\t\n'; - /if; - /iterate; - - $folders += '\t\n'; - $files += '\t\n'; - - $commandData += $folders + $files; - - - /*............................................................. - Create a directory 'NewFolderName' within the 'Current Folder.' - */ - case('CreateFolder'); - $NewFolderName = (String_ReplaceRegExp: $NewFolderName, -find='\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>', -replace='_'); - var('newFolder' = $currentFolderURL + $NewFolderName + '/'); - file_create($newFolder); - - - /*......................................................... - Map Lasso's file error codes to FCKEditor's error codes. - */ - select(file_currenterror( -errorcode)); - case(0); - $errorNumber = 0; - case( -9983); - $errorNumber = 101; - case( -9976); - $errorNumber = 102; - case( -9977); - $errorNumber = 102; - case( -9961); - $errorNumber = 103; - case; - $errorNumber = 110; - /select; - - $commandData += '\n'; - - - /*............................................................. - Process an uploaded file. - */ - case('FileUpload'); - /*......................................................... - This is the only command that returns an HTML response. - */ - $responseType = 'html'; - - - /*......................................................... - Was a file actually uploaded? - */ - if(file_uploads->size); - $NewFile = file_uploads->get(1); - else; - $uploadResult = '202'; - /if; - - if($uploadResult == '0'); - /*..................................................... - Split the file's extension from the filename in order - to follow the API's naming convention for duplicate - files. (Test.txt, Test(1).txt, Test(2).txt, etc.) - */ - $NewFileName = $NewFile->find('OrigName'); - $NewFileName = (String_ReplaceRegExp: $NewFileName, -find='\\\\|\\/|\\||\\:|\\?|\\*|"|<|>', -replace='_'); - $OrigFilePath = $currentFolderURL + $NewFileName; - $NewFilePath = $OrigFilePath; - local('fileExtension') = '.' + $NewFile->find('OrigExtension'); - #fileExtension = (String_ReplaceRegExp: #fileExtension, -find='\\\\|\\/|\\||\\:|\\?|\\*|"|<|>', -replace='_'); - local('shortFileName') = $NewFileName->removetrailing(#fileExtension)&; - - - /*..................................................... - Make sure the file extension is allowed. - */ - if($config->find('DeniedExtensions')->find($Type) >> $NewFile->find('OrigExtension')); - $uploadResult = '202'; - else; - /*................................................. - Rename the target path until it is unique. - */ - while(file_exists($NewFilePath)); - $NewFilePath = $currentFolderURL + #shortFileName + '(' + loop_count + ')' + #fileExtension; - /while; - - - /*................................................. - Copy the uploaded file to its final location. - */ - file_copy($NewFile->find('path'), $NewFilePath); - - - /*................................................. - Set the error code for the response. Note whether - the file had to be renamed. - */ - select(file_currenterror( -errorcode)); - case(0); - $OrigFilePath != $NewFilePath ? $uploadResult = 201; - case; - $uploadResult = file_currenterror( -errorcode); - /select; - /if; - /if; - fck_htmlreply( - -uploadResult=$uploadResult, - -NewFilePath=$NewFilePath - ); - /select; - /inline; - /if; - - /*..................................................................... - Send a custom header for xml responses. - */ - if($responseType == 'xml'); - header; -] -HTTP/1.0 200 OK -Date: [$headerDate] -Server: Lasso Professional [lasso_version( -lassoversion)] -Expires: Mon, 26 Jul 1997 05:00:00 GMT -Last-Modified: [$headerDate] -Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 -Pragma: no-cache -Keep-Alive: timeout=15, max=98 -Connection: Keep-Alive -Content-Type: text/xml; charset=utf-8 -[//lasso -/header; - - /* - Set the content type encoding for Lasso. - */ - content_type('text/xml; charset=utf-8'); - - /* - Wrap the response as XML and output. - */ - $__html_reply__ = '\ - -'; - - if($errorNumber != '102'); - $__html_reply__ += ''; - /if; - - $__html_reply__ += $commandData + ' -'; - /if; -] diff --git a/fckeditor/editor/filemanager/connectors/lasso/upload.lasso b/fckeditor/editor/filemanager/connectors/lasso/upload.lasso deleted file mode 100644 index fbbe915b..00000000 --- a/fckeditor/editor/filemanager/connectors/lasso/upload.lasso +++ /dev/null @@ -1,168 +0,0 @@ -[//lasso -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This is the "File Uploader" for Lasso. - */ - - /*..................................................................... - Include global configuration. See config.lasso for details. - */ - include('config.lasso'); - - - /*..................................................................... - Convert query string parameters to variables and initialize output. - */ - var( - 'Type' = action_param('Type'), - 'CurrentFolder' = action_param('CurrentFolder'), - 'ServerPath' = action_param('ServerPath'), - 'NewFile' = null, - 'NewFileName' = string, - 'OrigFilePath' = string, - 'NewFilePath' = string, - 'errorNumber' = 0, - 'customMsg' = '' - ); - - $Type == '' ? $Type = 'File'; - - - /*..................................................................... - Calculate the path to the current folder. - */ - $ServerPath == '' ? $ServerPath = $config->find('UserFilesPath'); - - var('currentFolderURL' = $ServerPath - + $config->find('Subdirectories')->find(action_param('Type')) - + action_param('CurrentFolder') - ); - - /*..................................................................... - Custom tag sets the HTML response. - */ - - define_tag( - 'sendresults', - -namespace='fck_', - -priority='replace', - -required='errorNumber', - -type='integer', - -optional='fileUrl', - -type='string', - -optional='fileName', - -type='string', - -optional='customMsg', - -type='string', - -description='Sets the HTML response for the FCKEditor Quick Upload feature.' - ); - - $__html_reply__ = ' - '; - /define_tag; - - if($CurrentFolder->(Find: '..') || $CurrentFolder->(Find: '\\')); - $errorNumber = 102; - /if; - - if($config->find('Enabled')); - /*................................................................. - Process an uploaded file. - */ - inline($connection); - /*............................................................. - Was a file actually uploaded? - */ - if($errorNumber != '102'); - file_uploads->size ? $NewFile = file_uploads->get(1) | $errorNumber = 202; - /if; - - if($errorNumber == 0); - /*......................................................... - Split the file's extension from the filename in order - to follow the API's naming convention for duplicate - files. (Test.txt, Test(1).txt, Test(2).txt, etc.) - */ - $NewFileName = $NewFile->find('OrigName'); - $OrigFilePath = $currentFolderURL + $NewFileName; - $NewFilePath = $OrigFilePath; - local('fileExtension') = '.' + $NewFile->find('OrigExtension'); - local('shortFileName') = $NewFileName->removetrailing(#fileExtension)&; - - - /*......................................................... - Make sure the file extension is allowed. - */ - - if($config->find('DeniedExtensions')->find($Type) >> $NewFile->find('OrigExtension')); - $errorNumber = 202; - else; - /*..................................................... - Rename the target path until it is unique. - */ - while(file_exists($NewFilePath)); - $NewFileName = #shortFileName + '(' + loop_count + ')' + #fileExtension; - $NewFilePath = $currentFolderURL + $NewFileName; - /while; - - - /*..................................................... - Copy the uploaded file to its final location. - */ - file_copy($NewFile->find('path'), $NewFilePath); - - - /*..................................................... - Set the error code for the response. - */ - select(file_currenterror( -errorcode)); - case(0); - $OrigFilePath != $NewFilePath ? $errorNumber = 201; - case; - $errorNumber = 202; - /select; - /if; - /if; - /inline; - else; - $errorNumber = 1; - $customMsg = 'This file uploader is disabled. Please check the "editor/filemanager/upload/lasso/config.lasso" file.'; - /if; - - fck_sendresults( - -errorNumber=$errorNumber, - -fileUrl=$NewFilePath, - -fileName=$NewFileName, - -customMsg=$customMsg - ); -] diff --git a/fckeditor/editor/filemanager/connectors/perl/basexml.pl b/fckeditor/editor/filemanager/connectors/perl/basexml.pl deleted file mode 100644 index c3afa72f..00000000 --- a/fckeditor/editor/filemanager/connectors/perl/basexml.pl +++ /dev/null @@ -1,63 +0,0 @@ -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2008 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -sub CreateXmlHeader -{ - local($command,$resourceType,$currentFolder) = @_; - - # Create the XML document header. - print ''; - - # Create the main "Connector" node. - print ''; - - # Add the current folder node. - print ''; -} - -sub CreateXmlFooter -{ - print ''; -} - -sub SendError -{ - local( $number, $text ) = @_; - - print << "_HTML_HEAD_"; -Content-Type:text/xml; charset=utf-8 -Pragma: no-cache -Cache-Control: no-cache -Expires: Thu, 01 Dec 1994 16:00:00 GMT - -_HTML_HEAD_ - - # Create the XML document header - print '' ; - - print '' ; - - exit ; -} - -1; diff --git a/fckeditor/editor/filemanager/connectors/perl/commands.pl b/fckeditor/editor/filemanager/connectors/perl/commands.pl deleted file mode 100644 index 683f6421..00000000 --- a/fckeditor/editor/filemanager/connectors/perl/commands.pl +++ /dev/null @@ -1,187 +0,0 @@ -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2008 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -sub GetFolders -{ - - local($resourceType, $currentFolder) = @_; - - # Map the virtual path to the local server path. - $sServerDir = &ServerMapFolder($resourceType, $currentFolder); - print ""; # Open the "Folders" node. - - opendir(DIR,"$sServerDir"); - @files = grep(!/^\.\.?$/,readdir(DIR)); - closedir(DIR); - - foreach $sFile (@files) { - if($sFile != '.' && $sFile != '..' && (-d "$sServerDir$sFile")) { - $cnv_filename = &ConvertToXmlAttribute($sFile); - print ''; - } - } - print ""; # Close the "Folders" node. -} - -sub GetFoldersAndFiles -{ - - local($resourceType, $currentFolder) = @_; - # Map the virtual path to the local server path. - $sServerDir = &ServerMapFolder($resourceType,$currentFolder); - - # Initialize the output buffers for "Folders" and "Files". - $sFolders = ''; - $sFiles = ''; - - opendir(DIR,"$sServerDir"); - @files = grep(!/^\.\.?$/,readdir(DIR)); - closedir(DIR); - - foreach $sFile (@files) { - if($sFile ne '.' && $sFile ne '..') { - if(-d "$sServerDir$sFile") { - $cnv_filename = &ConvertToXmlAttribute($sFile); - $sFolders .= '' ; - } else { - ($iFileSize,$refdate,$filedate,$fileperm) = (stat("$sServerDir$sFile"))[7,8,9,2]; - if($iFileSize > 0) { - $iFileSize = int($iFileSize / 1024); - if($iFileSize < 1) { - $iFileSize = 1; - } - } - $cnv_filename = &ConvertToXmlAttribute($sFile); - $sFiles .= '' ; - } - } - } - print $sFolders ; - print ''; # Close the "Folders" node. - print $sFiles ; - print ''; # Close the "Files" node. -} - -sub CreateFolder -{ - - local($resourceType, $currentFolder) = @_; - $sErrorNumber = '0' ; - $sErrorMsg = '' ; - - if($FORM{'NewFolderName'} ne "") { - $sNewFolderName = $FORM{'NewFolderName'}; - $sNewFolderName =~ s/\.|\\|\/|\||\:|\?|\*|\"|<|>|[[:cntrl:]]/_/g; - # Map the virtual path to the local server path of the current folder. - $sServerDir = &ServerMapFolder($resourceType, $currentFolder); - if(-w $sServerDir) { - $sServerDir .= $sNewFolderName; - $sErrorMsg = &CreateServerFolder($sServerDir); - if($sErrorMsg == 0) { - $sErrorNumber = '0'; - } elsif($sErrorMsg eq 'Invalid argument' || $sErrorMsg eq 'No such file or directory') { - $sErrorNumber = '102'; #// Path too long. - } else { - $sErrorNumber = '110'; - } - } else { - $sErrorNumber = '103'; - } - } else { - $sErrorNumber = '102' ; - } - # Create the "Error" node. - $cnv_errmsg = &ConvertToXmlAttribute($sErrorMsg); - print ''; -} - -sub FileUpload -{ -eval("use File::Copy;"); - - local($resourceType, $currentFolder) = @_; - - $sErrorNumber = '0' ; - $sFileName = '' ; - if($new_fname) { - # Map the virtual path to the local server path. - $sServerDir = &ServerMapFolder($resourceType,$currentFolder); - - # Get the uploaded file name. - $sFileName = $new_fname; - $sFileName =~ s/\\|\/|\||\:|\?|\*|\"|<|>|[[:cntrl:]]/_/g; - $sOriginalFileName = $sFileName; - - $iCounter = 0; - while(1) { - $sFilePath = $sServerDir . $sFileName; - if(-e $sFilePath) { - $iCounter++ ; - ($path,$BaseName,$ext) = &RemoveExtension($sOriginalFileName); - $sFileName = $BaseName . '(' . $iCounter . ').' . $ext; - $sErrorNumber = '201'; - } else { - copy("$img_dir/$new_fname","$sFilePath"); - if (defined $CHMOD_ON_UPLOAD) { - if ($CHMOD_ON_UPLOAD) { - umask(000); - chmod($CHMOD_ON_UPLOAD,$sFilePath); - } - } - else { - umask(000); - chmod(0777,$sFilePath); - } - unlink("$img_dir/$new_fname"); - last; - } - } - } else { - $sErrorNumber = '202' ; - } - $sFileName =~ s/"/\\"/g; - - SendUploadResults($sErrorNumber, $resourceType.$currentFolder.$sFileName, $sFileName, ''); -} - -sub SendUploadResults -{ - - local($sErrorNumber, $sFileUrl, $sFileName, $customMsg) = @_; - - # Minified version of the document.domain automatic fix script (#1919). - # The original script can be found at _dev/domain_fix_template.js - # Note: in Perl replace \ with \\ and $ with \$ - print < -(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|\$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); - -EOF - print 'window.parent.OnUploadCompleted(' . $sErrorNumber . ',"' . JS_cnv($sFileUrl) . '","' . JS_cnv($sFileName) . '","' . JS_cnv($customMsg) . '") ;'; - print ''; - exit ; -} - -1; diff --git a/fckeditor/editor/filemanager/connectors/perl/connector.cgi b/fckeditor/editor/filemanager/connectors/perl/connector.cgi deleted file mode 100644 index c4631573..00000000 --- a/fckeditor/editor/filemanager/connectors/perl/connector.cgi +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env perl - -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2008 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -## -# ATTENTION: To enable this connector, look for the "SECURITY" comment in this file. -## - -## START: Hack for Windows (Not important to understand the editor code... Perl specific). -if(Windows_check()) { - chdir(GetScriptPath($0)); -} - -sub Windows_check -{ - # IIS,PWS(NT/95) - $www_server_os = $^O; - # Win98 & NT(SP4) - if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } - # AnHTTPd/Omni/IIS - if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } - # Win Apache - if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } - if($www_server_os=~ /win/i) { return(1); } - return(0); -} - -sub GetScriptPath { - local($path) = @_; - if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } - $path; -} -## END: Hack for IIS - -require 'util.pl'; -require 'io.pl'; -require 'basexml.pl'; -require 'commands.pl'; -require 'upload_fck.pl'; - -## -# SECURITY: REMOVE/COMMENT THE FOLLOWING LINE TO ENABLE THIS CONNECTOR. -## - &SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/connectors/perl/connector.cgi" file' ) ; - - &read_input(); - - if($FORM{'ServerPath'} ne "") { - $GLOBALS{'UserFilesPath'} = $FORM{'ServerPath'}; - if(!($GLOBALS{'UserFilesPath'} =~ /\/$/)) { - $GLOBALS{'UserFilesPath'} .= '/' ; - } - } else { - $GLOBALS{'UserFilesPath'} = '/userfiles/'; - } - - # Map the "UserFiles" path to a local directory. - $rootpath = &GetRootPath(); - $GLOBALS{'UserFilesDirectory'} = $rootpath . $GLOBALS{'UserFilesPath'}; - - &DoResponse(); - -sub DoResponse -{ - - if($FORM{'Command'} eq "" || $FORM{'Type'} eq "" || $FORM{'CurrentFolder'} eq "") { - return ; - } - # Get the main request informaiton. - $sCommand = $FORM{'Command'}; - $sResourceType = $FORM{'Type'}; - $sCurrentFolder = $FORM{'CurrentFolder'}; - - # Check the current folder syntax (must begin and start with a slash). - if(!($sCurrentFolder =~ /\/$/)) { - $sCurrentFolder .= '/'; - } - if(!($sCurrentFolder =~ /^\//)) { - $sCurrentFolder = '/' . $sCurrentFolder; - } - - # Check for invalid folder paths (..) - if ( $sCurrentFolder =~ /(?:\.\.|\\)/ ) { - SendError( 102, "" ) ; - } - - # File Upload doesn't have to Return XML, so it must be intercepted before anything. - if($sCommand eq 'FileUpload') { - FileUpload($sResourceType,$sCurrentFolder); - return ; - } - - print << "_HTML_HEAD_"; -Content-Type:text/xml; charset=utf-8 -Pragma: no-cache -Cache-Control: no-cache -Expires: Thu, 01 Dec 1994 16:00:00 GMT - -_HTML_HEAD_ - - &CreateXmlHeader($sCommand,$sResourceType,$sCurrentFolder); - - # Execute the required command. - if($sCommand eq 'GetFolders') { - &GetFolders($sResourceType,$sCurrentFolder); - } elsif($sCommand eq 'GetFoldersAndFiles') { - &GetFoldersAndFiles($sResourceType,$sCurrentFolder); - } elsif($sCommand eq 'CreateFolder') { - &CreateFolder($sResourceType,$sCurrentFolder); - } - - &CreateXmlFooter(); - - exit ; -} diff --git a/fckeditor/editor/filemanager/connectors/perl/io.pl b/fckeditor/editor/filemanager/connectors/perl/io.pl deleted file mode 100644 index aa6cb367..00000000 --- a/fckeditor/editor/filemanager/connectors/perl/io.pl +++ /dev/null @@ -1,141 +0,0 @@ -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2008 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -sub GetUrlFromPath -{ - local($resourceType, $folderPath) = @_; - - if($resourceType eq '') { - $rmpath = &RemoveFromEnd($GLOBALS{'UserFilesPath'},'/'); - return("$rmpath$folderPath"); - } else { - return("$GLOBALS{'UserFilesPath'}$resourceType$folderPath"); - } -} - -sub RemoveExtension -{ - local($fileName) = @_; - local($path, $base, $ext); - if($fileName !~ /\./) { - $fileName .= '.'; - } - if($fileName =~ /([^\\\/]*)\.(.*)$/) { - $base = $1; - $ext = $2; - if($fileName =~ /(.*)$base\.$ext$/) { - $path = $1; - } - } - return($path,$base,$ext); - -} - -sub ServerMapFolder -{ - local($resourceType,$folderPath) = @_; - - # Get the resource type directory. - $sResourceTypePath = $GLOBALS{'UserFilesDirectory'} . $resourceType . '/'; - - # Ensure that the directory exists. - &CreateServerFolder($sResourceTypePath); - - # Return the resource type directory combined with the required path. - $rmpath = &RemoveFromStart($folderPath,'/'); - return("$sResourceTypePath$rmpath"); -} - -sub GetParentFolder -{ - local($folderPath) = @_; - - $folderPath =~ s/[\/][^\/]+[\/]?$//g; - return $folderPath; -} - -sub CreateServerFolder -{ - local($folderPath) = @_; - - $sParent = &GetParentFolder($folderPath); - # Check if the parent exists, or create it. - if(!(-e $sParent)) { - $sErrorMsg = &CreateServerFolder($sParent); - if($sErrorMsg == 1) { - return(1); - } - } - if(!(-e $folderPath)) { - if (defined $CHMOD_ON_FOLDER_CREATE && !$CHMOD_ON_FOLDER_CREATE) { - mkdir("$folderPath"); - } - else { - umask(000); - if (defined $CHMOD_ON_FOLDER_CREATE) { - mkdir("$folderPath",$CHMOD_ON_FOLDER_CREATE); - } - else { - mkdir("$folderPath",0777); - } - } - - return(0); - } else { - return(1); - } -} - -sub GetRootPath -{ -#use Cwd; - -# my $dir = getcwd; -# print $dir; -# $dir =~ s/$ENV{'DOCUMENT_ROOT'}//g; -# print $dir; -# return($dir); - -# $wk = $0; -# $wk =~ s/\/connector\.cgi//g; -# if($wk) { -# $current_dir = $wk; -# } else { -# $current_dir = `pwd`; -# } -# return($current_dir); -use Cwd; - - if($ENV{'DOCUMENT_ROOT'}) { - $dir = $ENV{'DOCUMENT_ROOT'}; - } else { - my $dir = getcwd; - $workdir =~ s/\/connector\.cgi//g; - $dir =~ s/$workdir//g; - } - return($dir); - - - -} -1; diff --git a/fckeditor/editor/filemanager/connectors/perl/upload.cgi b/fckeditor/editor/filemanager/connectors/perl/upload.cgi deleted file mode 100644 index 1efca613..00000000 --- a/fckeditor/editor/filemanager/connectors/perl/upload.cgi +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env perl - -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2008 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -## -# ATTENTION: To enable this connector, look for the "SECURITY" comment in this file. -## - -## START: Hack for Windows (Not important to understand the editor code... Perl specific). -if(Windows_check()) { - chdir(GetScriptPath($0)); -} - -sub Windows_check -{ - # IIS,PWS(NT/95) - $www_server_os = $^O; - # Win98 & NT(SP4) - if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } - # AnHTTPd/Omni/IIS - if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } - # Win Apache - if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } - if($www_server_os=~ /win/i) { return(1); } - return(0); -} - -sub GetScriptPath { - local($path) = @_; - if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } - $path; -} -## END: Hack for IIS - -require 'util.pl'; -require 'io.pl'; -require 'basexml.pl'; -require 'commands.pl'; -require 'upload_fck.pl'; - -## -# SECURITY: REMOVE/COMMENT THE FOLLOWING LINE TO ENABLE THIS CONNECTOR. -## - &SendUploadResults(1, '', '', 'This connector is disabled. Please check the "editor/filemanager/connectors/perl/upload.cgi" file' ) ; - - &read_input(); - - if($FORM{'ServerPath'} ne "") { - $GLOBALS{'UserFilesPath'} = $FORM{'ServerPath'}; - if(!($GLOBALS{'UserFilesPath'} =~ /\/$/)) { - $GLOBALS{'UserFilesPath'} .= '/' ; - } - } else { - $GLOBALS{'UserFilesPath'} = '/userfiles/'; - } - - # Map the "UserFiles" path to a local directory. - $rootpath = &GetRootPath(); - $GLOBALS{'UserFilesDirectory'} = $rootpath . $GLOBALS{'UserFilesPath'}; - - &DoResponse(); - -sub DoResponse -{ - # Get the main request information. - $sCommand = 'FileUpload'; #$FORM{'Command'}; - $sResourceType = $FORM{'Type'}; - $sCurrentFolder = $FORM{'CurrentFolder'}; - - if ($sResourceType eq '') { - $sResourceType = 'File' ; - } - if ($sCurrentFolder eq '') { - $sCurrentFolder = '/' ; - } - - # Check the current folder syntax (must begin and start with a slash). - if(!($sCurrentFolder =~ /\/$/)) { - $sCurrentFolder .= '/'; - } - if(!($sCurrentFolder =~ /^\//)) { - $sCurrentFolder = '/' . $sCurrentFolder; - } - - # Check for invalid folder paths (..) - if ( $sCurrentFolder =~ /(?:\.\.|\\)/ ) { - SendError( 102, "" ) ; - } - - # File Upload doesn't have to Return XML, so it must be intercepted before anything. - if($sCommand eq 'FileUpload') { - FileUpload($sResourceType,$sCurrentFolder); - return ; - } - -} diff --git a/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl b/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl deleted file mode 100644 index dad9bb8f..00000000 --- a/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl +++ /dev/null @@ -1,686 +0,0 @@ -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2008 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -# image data save dir -$img_dir = './temp/'; - - -# File size max(unit KB) -$MAX_CONTENT_SIZE = 30000; - -# After file is uploaded, sometimes it is required to change its permissions -# so that it was possible to access it at the later time. -# If possible, it is recommended to set more restrictive permissions, like 0755. -# Set to 0 to disable this feature. -$CHMOD_ON_UPLOAD = 0777; - -# See comments above. -# Used when creating folders that does not exist. -$CHMOD_ON_FOLDER_CREATE = 0755; - -# Filelock (1=use,0=not use) -$PM{'flock'} = '1'; - - -# upload Content-Type list -my %UPLOAD_CONTENT_TYPE_LIST = ( - 'image/(x-)?png' => 'png', # PNG image - 'image/p?jpe?g' => 'jpg', # JPEG image - 'image/gif' => 'gif', # GIF image - 'image/x-xbitmap' => 'xbm', # XBM image - - 'image/(x-(MS-)?)?bmp' => 'bmp', # Windows BMP image - 'image/pict' => 'pict', # Macintosh PICT image - 'image/tiff' => 'tif', # TIFF image - 'application/pdf' => 'pdf', # PDF image - 'application/x-shockwave-flash' => 'swf', # Shockwave Flash - - 'video/(x-)?msvideo' => 'avi', # Microsoft Video - 'video/quicktime' => 'mov', # QuickTime Video - 'video/mpeg' => 'mpeg', # MPEG Video - 'video/x-mpeg2' => 'mpv2', # MPEG2 Video - - 'audio/(x-)?midi?' => 'mid', # MIDI Audio - 'audio/(x-)?wav' => 'wav', # WAV Audio - 'audio/basic' => 'au', # ULAW Audio - 'audio/mpeg' => 'mpga', # MPEG Audio - - 'application/(x-)?zip(-compressed)?' => 'zip', # ZIP Compress - - 'text/html' => 'html', # HTML - 'text/plain' => 'txt', # TEXT - '(?:application|text)/(?:rtf|richtext)' => 'rtf', # RichText - - 'application/msword' => 'doc', # Microsoft Word - 'application/vnd.ms-excel' => 'xls', # Microsoft Excel - - '' -); - -# Upload is permitted. -# A regular expression is possible. -my %UPLOAD_EXT_LIST = ( - 'png' => 'PNG image', - 'p?jpe?g|jpe|jfif|pjp' => 'JPEG image', - 'gif' => 'GIF image', - 'xbm' => 'XBM image', - - 'bmp|dib|rle' => 'Windows BMP image', - 'pi?ct' => 'Macintosh PICT image', - 'tiff?' => 'TIFF image', - 'pdf' => 'PDF image', - 'swf' => 'Shockwave Flash', - - 'avi' => 'Microsoft Video', - 'moo?v|qt' => 'QuickTime Video', - 'm(p(e?gv?|e|v)|1v)' => 'MPEG Video', - 'mp(v2|2v)' => 'MPEG2 Video', - - 'midi?|kar|smf|rmi|mff' => 'MIDI Audio', - 'wav' => 'WAVE Audio', - 'au|snd' => 'ULAW Audio', - 'mp(e?ga|2|a|3)|abs' => 'MPEG Audio', - - 'zip' => 'ZIP Compress', - 'lzh' => 'LZH Compress', - 'cab' => 'CAB Compress', - - 'd?html?' => 'HTML', - 'rtf|rtx' => 'RichText', - 'txt|text' => 'Text', - - '' -); - - -# sjis or euc -my $CHARCODE = 'sjis'; - -$TRANS_2BYTE_CODE = 0; - -############################################################################## -# Summary -# -# Form Read input -# -# Parameters -# Returns -# Memo -############################################################################## -sub read_input -{ -eval("use File::Copy;"); -eval("use File::Path;"); - - my ($FORM) = @_; - - if (defined $CHMOD_ON_FOLDER_CREATE && !$CHMOD_ON_FOLDER_CREATE) { - mkdir("$img_dir"); - } - else { - umask(000); - if (defined $CHMOD_ON_FOLDER_CREATE) { - mkdir("$img_dir",$CHMOD_ON_FOLDER_CREATE); - } - else { - mkdir("$img_dir",0777); - } - } - - undef $img_data_exists; - undef @NEWFNAMES; - undef @NEWFNAME_DATA; - - if($ENV{'CONTENT_LENGTH'} > 10000000 || $ENV{'CONTENT_LENGTH'} > $MAX_CONTENT_SIZE * 1024) { - &upload_error( - 'Size Error', - sprintf( - "Transmitting size is too large.MAX %d KB Now Size %d KB(%d bytes Over)", - $MAX_CONTENT_SIZE, - int($ENV{'CONTENT_LENGTH'} / 1024), - $ENV{'CONTENT_LENGTH'} - $MAX_CONTENT_SIZE * 1024 - ) - ); - } - - my $Buffer; - if($ENV{'CONTENT_TYPE'} =~ /multipart\/form-data/) { - # METHOD POST only - return unless($ENV{'CONTENT_LENGTH'}); - - binmode(STDIN); - # STDIN A pause character is detected.'(MacIE3.0 boundary of $ENV{'CONTENT_TYPE'} cannot be trusted.) - my $Boundary = ; - $Boundary =~ s/\x0D\x0A//; - $Boundary = quotemeta($Boundary); - while() { - if(/^\s*Content-Disposition:/i) { - my($name,$ContentType,$FileName); - # form data get - if(/\bname="([^"]+)"/i || /\bname=([^\s:;]+)/i) { - $name = $1; - $name =~ tr/+/ /; - $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; - &Encode(\$name); - } - if(/\bfilename="([^"]*)"/i || /\bfilename=([^\s:;]*)/i) { - $FileName = $1 || 'unknown'; - } - # head read - while() { - last if(! /\w/); - if(/^\s*Content-Type:\s*"([^"]+)"/i || /^\s*Content-Type:\s*([^\s:;]+)/i) { - $ContentType = $1; - } - } - # body read - $value = ""; - while() { - last if(/^$Boundary/o); - $value .= $_; - }; - $lastline = $_; - $value =~s /\x0D\x0A$//; - if($value ne '') { - if($FileName || $ContentType) { - $img_data_exists = 1; - ( - $FileName, # - $Ext, # - $Length, # - $ImageWidth, # - $ImageHeight, # - $ContentName # - ) = &CheckContentType(\$value,$FileName,$ContentType); - - $FORM{$name} = $FileName; - $new_fname = $FileName; - push(@NEWFNAME_DATA,"$FileName\t$Ext\t$Length\t$ImageWidth\t$ImageHeight\t$ContentName"); - - # Multi-upload correspondence - push(@NEWFNAMES,$new_fname); - open(OUT,">$img_dir/$new_fname"); - binmode(OUT); - eval "flock(OUT,2);" if($PM{'flock'} == 1); - print OUT $value; - eval "flock(OUT,8);" if($PM{'flock'} == 1); - close(OUT); - - } elsif($name) { - $value =~ tr/+/ /; - $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; - &Encode(\$value,'trans'); - $FORM{$name} .= "\0" if(defined($FORM{$name})); - $FORM{$name} .= $value; - } - } - }; - last if($lastline =~ /^$Boundary\-\-/o); - } - } elsif($ENV{'CONTENT_LENGTH'}) { - read(STDIN,$Buffer,$ENV{'CONTENT_LENGTH'}); - } - foreach(split(/&/,$Buffer),split(/&/,$ENV{'QUERY_STRING'})) { - my($name, $value) = split(/=/); - $name =~ tr/+/ /; - $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; - $value =~ tr/+/ /; - $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; - - &Encode(\$name); - &Encode(\$value,'trans'); - $FORM{$name} .= "\0" if(defined($FORM{$name})); - $FORM{$name} .= $value; - - } - -} - -############################################################################## -# Summary -# -# CheckContentType -# -# Parameters -# Returns -# Memo -############################################################################## -sub CheckContentType -{ - - my($DATA,$FileName,$ContentType) = @_; - my($Ext,$ImageWidth,$ImageHeight,$ContentName,$Infomation); - my $DataLength = length($$DATA); - - # An unknown file type - - $_ = $ContentType; - my $UnknownType = ( - !$_ - || /^application\/(x-)?macbinary$/i - || /^application\/applefile$/i - || /^application\/octet-stream$/i - || /^text\/plane$/i - || /^x-unknown-content-type/i - ); - - # MacBinary(Mac Unnecessary data are deleted.) - if($UnknownType || $ENV{'HTTP_USER_AGENT'} =~ /Macintosh|Mac_/) { - if($DataLength > 128 && !unpack("C",substr($$DATA,0,1)) && !unpack("C",substr($$DATA,74,1)) && !unpack("C",substr($$DATA,82,1)) ) { - my $MacBinary_ForkLength = unpack("N", substr($$DATA, 83, 4)); # ForkLength Get - my $MacBinary_FileName = quotemeta(substr($$DATA, 2, unpack("C",substr($$DATA, 1, 1)))); - if($MacBinary_FileName && $MacBinary_ForkLength && $DataLength >= $MacBinary_ForkLength + 128 - && ($FileName =~ /$MacBinary_FileName/i || substr($$DATA,102,4) eq 'mBIN')) { # DATA TOP 128byte MacBinary!! - $$DATA = substr($$DATA,128,$MacBinary_ForkLength); - my $ResourceLength = $DataLength - $MacBinary_ForkLength - 128; - $DataLength = $MacBinary_ForkLength; - } - } - } - - # A file name is changed into EUC. -# &jcode::convert(\$FileName,'euc',$FormCodeDefault); -# &jcode::h2z_euc(\$FileName); - $FileName =~ s/^.*\\//; # Windows, Mac - $FileName =~ s/^.*\///; # UNIX - $FileName =~ s/&/&/g; - $FileName =~ s/"/"/g; - $FileName =~ s//>/g; -# -# if($CHARCODE ne 'euc') { -# &jcode::convert(\$FileName,$CHARCODE,'euc'); -# } - - # An extension is extracted and it changes into a small letter. - my $FileExt; - if($FileName =~ /\.(\w+)$/) { - $FileExt = $1; - $FileExt =~ tr/A-Z/a-z/; - } - - # Executable file detection (ban on upload) - if($$DATA =~ /^MZ/) { - $Ext = 'exe'; - } - # text - if(!$Ext && ($UnknownType || $ContentType =~ /^text\//i || $ContentType =~ /^application\/(?:rtf|richtext)$/i || $ContentType =~ /^image\/x-xbitmap$/i) - && ! $$DATA =~ /[\000-\006\177\377]/) { -# $$DATA =~ s/\x0D\x0A/\n/g; -# $$DATA =~ tr/\x0D\x0A/\n\n/; -# -# if( -# $$DATA =~ /<\s*SCRIPT(?:.|\n)*?>/i -# || $$DATA =~ /<\s*(?:.|\n)*?\bONLOAD\s*=(?:.|\n)*?>/i -# || $$DATA =~ /<\s*(?:.|\n)*?\bONCLICK\s*=(?:.|\n)*?>/i -# ) { -# $Infomation = '(JavaScript contains)'; -# } -# if($$DATA =~ /<\s*TABLE(?:.|\n)*?>/i -# || $$DATA =~ /<\s*BLINK(?:.|\n)*?>/i -# || $$DATA =~ /<\s*MARQUEE(?:.|\n)*?>/i -# || $$DATA =~ /<\s*OBJECT(?:.|\n)*?>/i -# || $$DATA =~ /<\s*EMBED(?:.|\n)*?>/i -# || $$DATA =~ /<\s*FRAME(?:.|\n)*?>/i -# || $$DATA =~ /<\s*APPLET(?:.|\n)*?>/i -# || $$DATA =~ /<\s*FORM(?:.|\n)*?>/i -# || $$DATA =~ /<\s*(?:.|\n)*?\bSRC\s*=(?:.|\n)*?>/i -# || $$DATA =~ /<\s*(?:.|\n)*?\bDYNSRC\s*=(?:.|\n)*?>/i -# ) { -# $Infomation = '(the HTML tag which is not safe is included)'; -# } - - if($FileExt =~ /^txt$/i || $FileExt =~ /^cgi$/i || $FileExt =~ /^pl$/i) { # Text File - $Ext = 'txt'; - } elsif($ContentType =~ /^text\/html$/i || $FileExt =~ /html?/i || $$DATA =~ /<\s*HTML(?:.|\n)*?>/i) { # HTML File - $Ext = 'html'; - } elsif($ContentType =~ /^image\/x-xbitmap$/i || $FileExt =~ /^xbm$/i) { # XBM(x-BitMap) Image - my $XbmName = $1; - my ($XbmWidth, $XbmHeight); - if($$DATA =~ /\#define\s*$XbmName\_width\s*(\d+)/i) { - $XbmWidth = $1; - } - if($$DATA =~ /\#define\s*$XbmName\_height\s*(\d+)/i) { - $XbmHeight = $1; - } - if($XbmWidth && $XbmHeight) { - $Ext = 'xbm'; - $ImageWidth = $XbmWidth; - $ImageHeight = $XbmHeight; - } - } else { # - $Ext = 'txt'; - } - } - - # image - if(!$Ext && ($UnknownType || $ContentType =~ /^image\//i)) { - # PNG - if($$DATA =~ /^\x89PNG\x0D\x0A\x1A\x0A/) { - if(substr($$DATA, 12, 4) eq 'IHDR') { - $Ext = 'png'; - ($ImageWidth, $ImageHeight) = unpack("N2", substr($$DATA, 16, 8)); - } - } elsif($$DATA =~ /^GIF8(?:9|7)a/) { # GIF89a(modified), GIF89a, GIF87a - $Ext = 'gif'; - ($ImageWidth, $ImageHeight) = unpack("v2", substr($$DATA, 6, 4)); - } elsif($$DATA =~ /^II\x2a\x00\x08\x00\x00\x00/ || $$DATA =~ /^MM\x00\x2a\x00\x00\x00\x08/) { # TIFF - $Ext = 'tif'; - } elsif($$DATA =~ /^BM/) { # BMP - $Ext = 'bmp'; - } elsif($$DATA =~ /^\xFF\xD8\xFF/ || $$DATA =~ /JFIF/) { # JPEG - my $HeaderPoint = index($$DATA, "\xFF\xD8\xFF", 0); - my $Point = $HeaderPoint + 2; - while($Point < $DataLength) { - my($Maker, $MakerType, $MakerLength) = unpack("C2n",substr($$DATA,$Point,4)); - if($Maker != 0xFF || $MakerType == 0xd9 || $MakerType == 0xda) { - last; - } elsif($MakerType >= 0xC0 && $MakerType <= 0xC3) { - $Ext = 'jpg'; - ($ImageHeight, $ImageWidth) = unpack("n2", substr($$DATA, $Point + 5, 4)); - if($HeaderPoint > 0) { - $$DATA = substr($$DATA, $HeaderPoint); - $DataLength = length($$DATA); - } - last; - } else { - $Point += $MakerLength + 2; - } - } - } - } - - # audio - if(!$Ext && ($UnknownType || $ContentType =~ /^audio\//i)) { - # MIDI Audio - if($$DATA =~ /^MThd/) { - $Ext = 'mid'; - } elsif($$DATA =~ /^\x2esnd/) { # ULAW Audio - $Ext = 'au'; - } elsif($$DATA =~ /^RIFF/ || $$DATA =~ /^ID3/ && $$DATA =~ /RIFF/) { - my $HeaderPoint = index($$DATA, "RIFF", 0); - $_ = substr($$DATA, $HeaderPoint + 8, 8); - if(/^WAVEfmt $/) { - # WAVE - if(unpack("V",substr($$DATA, $HeaderPoint + 16, 4)) == 16) { - $Ext = 'wav'; - } else { # RIFF WAVE MP3 - $Ext = 'mp3'; - } - } elsif(/^RMIDdata$/) { # RIFF MIDI - $Ext = 'rmi'; - } elsif(/^RMP3data$/) { # RIFF MP3 - $Ext = 'rmp'; - } - if($ContentType =~ /^audio\//i) { - $Infomation .= '(RIFF '. substr($$DATA, $HeaderPoint + 8, 4). ')'; - } - } - } - - # a binary file - unless ($Ext) { - # PDF image - if($$DATA =~ /^\%PDF/) { - # Picture size is not measured. - $Ext = 'pdf'; - } elsif($$DATA =~ /^FWS/) { # Shockwave Flash - $Ext = 'swf'; - } elsif($$DATA =~ /^RIFF/ || $$DATA =~ /^ID3/ && $$DATA =~ /RIFF/) { - my $HeaderPoint = index($$DATA, "RIFF", 0); - $_ = substr($$DATA,$HeaderPoint + 8, 8); - # AVI - if(/^AVI LIST$/) { - $Ext = 'avi'; - } - if($ContentType =~ /^video\//i) { - $Infomation .= '(RIFF '. substr($$DATA, $HeaderPoint + 8, 4). ')'; - } - } elsif($$DATA =~ /^PK/) { # ZIP Compress File - $Ext = 'zip'; - } elsif($$DATA =~ /^MSCF/) { # CAB Compress File - $Ext = 'cab'; - } elsif($$DATA =~ /^Rar\!/) { # RAR Compress File - $Ext = 'rar'; - } elsif(substr($$DATA, 2, 5) =~ /^\-lh(\d+|d)\-$/) { # LHA Compress File - $Infomation .= "(lh$1)"; - $Ext = 'lzh'; - } elsif(substr($$DATA, 325, 25) eq "Apple Video Media Handler" || substr($$DATA, 325, 30) eq "Apple \x83\x72\x83\x66\x83\x49\x81\x45\x83\x81\x83\x66\x83\x42\x83\x41\x83\x6E\x83\x93\x83\x68\x83\x89") { - # QuickTime - $Ext = 'mov'; - } - } - - # Header analysis failure - unless ($Ext) { - # It will be followed if it applies for the MIME type from the browser. - foreach (keys %UPLOAD_CONTENT_TYPE_LIST) { - next unless ($_); - if($ContentType =~ /^$_$/i) { - $Ext = $UPLOAD_CONTENT_TYPE_LIST{$_}; - $ContentName = &CheckContentExt($Ext); - if( - grep {$_ eq $Ext;} ( - 'png', - 'gif', - 'jpg', - 'xbm', - 'tif', - 'bmp', - 'pdf', - 'swf', - 'mov', - 'zip', - 'cab', - 'lzh', - 'rar', - 'mid', - 'rmi', - 'au', - 'wav', - 'avi', - 'exe' - ) - ) { - $Infomation .= ' / Header analysis failure'; - } - if($Ext ne $FileExt && &CheckContentExt($FileExt) eq $ContentName) { - $Ext = $FileExt; - } - last; - } - } - # a MIME type is unknown--It judges from an extension. - unless ($Ext) { - $ContentName = &CheckContentExt($FileExt); - if($ContentName) { - $Ext = $FileExt; - $Infomation .= ' / MIME type is unknown('. $ContentType. ')'; - last; - } - } - } - -# $ContentName = &CheckContentExt($Ext) unless($ContentName); -# if($Ext && $ContentName) { -# $ContentName .= $Infomation; -# } else { -# &upload_error( -# 'Extension Error', -# "$FileName A not corresponding extension ($Ext)
        The extension which can be responded ". join(',', sort values(%UPLOAD_EXT_LIST)) -# ); -# } - -# # SSI Tag Deletion -# if($Ext =~ /.?html?/ && $$DATA =~ /<\!/) { -# foreach ( -# 'config', -# 'echo', -# 'exec', -# 'flastmod', -# 'fsize', -# 'include' -# ) { -# $$DATA =~ s/\#\s*$_/\&\#35\;$_/ig -# } -# } - - return ( - $FileName, - $Ext, - int($DataLength / 1024 + 1), - $ImageWidth, - $ImageHeight, - $ContentName - ); -} - -############################################################################## -# Summary -# -# Extension discernment -# -# Parameters -# Returns -# Memo -############################################################################## - -sub CheckContentExt -{ - - my($Ext) = @_; - my $ContentName; - foreach (keys %UPLOAD_EXT_LIST) { - next unless ($_); - if($_ && $Ext =~ /^$_$/) { - $ContentName = $UPLOAD_EXT_LIST{$_}; - last; - } - } - return $ContentName; - -} - -############################################################################## -# Summary -# -# Form decode -# -# Parameters -# Returns -# Memo -############################################################################## -sub Encode -{ - - my($value,$Trans) = @_; - -# my $FormCode = &jcode::getcode($value) || $FormCodeDefault; -# $FormCodeDefault ||= $FormCode; -# -# if($Trans && $TRANS_2BYTE_CODE) { -# if($FormCode ne 'euc') { -# &jcode::convert($value, 'euc', $FormCode); -# } -# &jcode::tr( -# $value, -# "\xA3\xB0-\xA3\xB9\xA3\xC1-\xA3\xDA\xA3\xE1-\xA3\xFA", -# '0-9A-Za-z' -# ); -# if($CHARCODE ne 'euc') { -# &jcode::convert($value,$CHARCODE,'euc'); -# } -# } else { -# if($CHARCODE ne $FormCode) { -# &jcode::convert($value,$CHARCODE,$FormCode); -# } -# } -# if($CHARCODE eq 'euc') { -# &jcode::h2z_euc($value); -# } elsif($CHARCODE eq 'sjis') { -# &jcode::h2z_sjis($value); -# } - -} - -############################################################################## -# Summary -# -# Error Msg -# -# Parameters -# Returns -# Memo -############################################################################## - -sub upload_error -{ - - local($error_message) = $_[0]; - local($error_message2) = $_[1]; - - print "Content-type: text/html\n\n"; - print< - -Error Message - - - - - -
        Error Message
        -

          -

          $error_message

          -$error_message2
          -
        - - -EOF - &rm_tmp_uploaded_files; # Image Temporary deletion - exit; -} - -############################################################################## -# Summary -# -# Image Temporary deletion -# -# Parameters -# Returns -# Memo -############################################################################## - -sub rm_tmp_uploaded_files -{ - if($img_data_exists == 1){ - sleep 1; - foreach $fname_list(@NEWFNAMES) { - if(-e "$img_dir/$fname_list") { - unlink("$img_dir/$fname_list"); - } - } - } - -} -1; diff --git a/fckeditor/editor/filemanager/connectors/perl/util.pl b/fckeditor/editor/filemanager/connectors/perl/util.pl deleted file mode 100644 index 8d1220d6..00000000 --- a/fckeditor/editor/filemanager/connectors/perl/util.pl +++ /dev/null @@ -1,68 +0,0 @@ -##### -# FCKeditor - The text editor for Internet - http://www.fckeditor.net -# Copyright (C) 2003-2008 Frederico Caldeira Knabben -# -# == BEGIN LICENSE == -# -# Licensed under the terms of any of the following licenses at your -# choice: -# -# - GNU General Public License Version 2 or later (the "GPL") -# http://www.gnu.org/licenses/gpl.html -# -# - GNU Lesser General Public License Version 2.1 or later (the "LGPL") -# http://www.gnu.org/licenses/lgpl.html -# -# - Mozilla Public License Version 1.1 or later (the "MPL") -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# == END LICENSE == -# -# This is the File Manager Connector for Perl. -##### - -sub RemoveFromStart -{ - local($sourceString, $charToRemove) = @_; - $sPattern = '^' . $charToRemove . '+' ; - $sourceString =~ s/^$charToRemove+//g; - return $sourceString; -} - -sub RemoveFromEnd -{ - local($sourceString, $charToRemove) = @_; - $sPattern = $charToRemove . '+$' ; - $sourceString =~ s/$charToRemove+$//g; - return $sourceString; -} - -sub ConvertToXmlAttribute -{ - local($value) = @_; - return $value; -# return utf8_encode(htmlspecialchars($value)); - -} - -sub specialchar_cnv -{ - local($ch) = @_; - - $ch =~ s/&/&/g; # & - $ch =~ s/\"/"/g; #" - $ch =~ s/\'/'/g; # ' - $ch =~ s//>/g; # > - return($ch); -} - -sub JS_cnv -{ - local($ch) = @_; - - $ch =~ s/\"/\\\"/g; #" - return($ch); -} - -1; diff --git a/fckeditor/editor/filemanager/connectors/php/basexml.php b/fckeditor/editor/filemanager/connectors/php/basexml.php deleted file mode 100644 index 76b41581..00000000 --- a/fckeditor/editor/filemanager/connectors/php/basexml.php +++ /dev/null @@ -1,93 +0,0 @@ -' ; - - // Create the main "Connector" node. - echo '' ; - - // Add the current folder node. - echo '' ; - - $GLOBALS['HeaderSent'] = true ; -} - -function CreateXmlFooter() -{ - echo '' ; -} - -function SendError( $number, $text ) -{ - if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] ) - { - SendErrorNode( $number, $text ) ; - CreateXmlFooter() ; - } - else - { - SetXmlHeaders() ; - - // Create the XML document header - echo '' ; - - echo '' ; - - SendErrorNode( $number, $text ) ; - - echo '' ; - } - exit ; -} - -function SendErrorNode( $number, $text ) -{ - echo '' ; -} -?> diff --git a/fckeditor/editor/filemanager/connectors/php/commands.php b/fckeditor/editor/filemanager/connectors/php/commands.php deleted file mode 100644 index 382fc197..00000000 --- a/fckeditor/editor/filemanager/connectors/php/commands.php +++ /dev/null @@ -1,273 +0,0 @@ -' ; - } - - closedir( $oCurrentFolder ) ; - - // Open the "Folders" node. - echo "" ; - - natcasesort( $aFolders ) ; - foreach ( $aFolders as $sFolder ) - echo $sFolder ; - - // Close the "Folders" node. - echo "" ; -} - -function GetFoldersAndFiles( $resourceType, $currentFolder ) -{ - // Map the virtual path to the local server path. - $sServerDir = ServerMapFolder( $resourceType, $currentFolder, 'GetFoldersAndFiles' ) ; - - // Arrays that will hold the folders and files names. - $aFolders = array() ; - $aFiles = array() ; - - $oCurrentFolder = opendir( $sServerDir ) ; - - while ( $sFile = readdir( $oCurrentFolder ) ) - { - if ( $sFile != '.' && $sFile != '..' ) - { - if ( is_dir( $sServerDir . $sFile ) ) - $aFolders[] = '' ; - else - { - $iFileSize = @filesize( $sServerDir . $sFile ) ; - if ( !$iFileSize ) { - $iFileSize = 0 ; - } - if ( $iFileSize > 0 ) - { - $iFileSize = round( $iFileSize / 1024 ) ; - if ( $iFileSize < 1 ) $iFileSize = 1 ; - } - - $aFiles[] = '' ; - } - } - } - - // Send the folders - natcasesort( $aFolders ) ; - echo '' ; - - foreach ( $aFolders as $sFolder ) - echo $sFolder ; - - echo '' ; - - // Send the files - natcasesort( $aFiles ) ; - echo '' ; - - foreach ( $aFiles as $sFiles ) - echo $sFiles ; - - echo '' ; -} - -function CreateFolder( $resourceType, $currentFolder ) -{ - if (!isset($_GET)) { - global $_GET; - } - $sErrorNumber = '0' ; - $sErrorMsg = '' ; - - if ( isset( $_GET['NewFolderName'] ) ) - { - $sNewFolderName = $_GET['NewFolderName'] ; - $sNewFolderName = SanitizeFolderName( $sNewFolderName ) ; - - if ( strpos( $sNewFolderName, '..' ) !== FALSE ) - $sErrorNumber = '102' ; // Invalid folder name. - else - { - // Map the virtual path to the local server path of the current folder. - $sServerDir = ServerMapFolder( $resourceType, $currentFolder, 'CreateFolder' ) ; - - if ( is_writable( $sServerDir ) ) - { - $sServerDir .= $sNewFolderName ; - - $sErrorMsg = CreateServerFolder( $sServerDir ) ; - - switch ( $sErrorMsg ) - { - case '' : - $sErrorNumber = '0' ; - break ; - case 'Invalid argument' : - case 'No such file or directory' : - $sErrorNumber = '102' ; // Path too long. - break ; - default : - $sErrorNumber = '110' ; - break ; - } - } - else - $sErrorNumber = '103' ; - } - } - else - $sErrorNumber = '102' ; - - // Create the "Error" node. - echo '' ; -} - -function FileUpload( $resourceType, $currentFolder, $sCommand ) -{ - if (!isset($_FILES)) { - global $_FILES; - } - $sErrorNumber = '0' ; - $sFileName = '' ; - - if ( isset( $_FILES['NewFile'] ) && !is_null( $_FILES['NewFile']['tmp_name'] ) ) - { - global $Config ; - - $oFile = $_FILES['NewFile'] ; - - // Map the virtual path to the local server path. - $sServerDir = ServerMapFolder( $resourceType, $currentFolder, $sCommand ) ; - - // Get the uploaded file name. - $sFileName = $oFile['name'] ; - $sFileName = SanitizeFileName( $sFileName ) ; - - $sOriginalFileName = $sFileName ; - - // Get the extension. - $sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ; - $sExtension = strtolower( $sExtension ) ; - - if ( isset( $Config['SecureImageUploads'] ) ) - { - if ( ( $isImageValid = IsImageValid( $oFile['tmp_name'], $sExtension ) ) === false ) - { - $sErrorNumber = '202' ; - } - } - - if ( isset( $Config['HtmlExtensions'] ) ) - { - if ( !IsHtmlExtension( $sExtension, $Config['HtmlExtensions'] ) && - ( $detectHtml = DetectHtml( $oFile['tmp_name'] ) ) === true ) - { - $sErrorNumber = '202' ; - } - } - - // Check if it is an allowed extension. - if ( !$sErrorNumber && IsAllowedExt( $sExtension, $resourceType ) ) - { - $iCounter = 0 ; - - while ( true ) - { - $sFilePath = $sServerDir . $sFileName ; - - if ( is_file( $sFilePath ) ) - { - $iCounter++ ; - $sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ; - $sErrorNumber = '201' ; - } - else - { - move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ; - - if ( is_file( $sFilePath ) ) - { - if ( isset( $Config['ChmodOnUpload'] ) && !$Config['ChmodOnUpload'] ) - { - break ; - } - - $permissions = 0777; - - if ( isset( $Config['ChmodOnUpload'] ) && $Config['ChmodOnUpload'] ) - { - $permissions = $Config['ChmodOnUpload'] ; - } - - $oldumask = umask(0) ; - chmod( $sFilePath, $permissions ) ; - umask( $oldumask ) ; - } - - break ; - } - } - - if ( file_exists( $sFilePath ) ) - { - //previous checks failed, try once again - if ( isset( $isImageValid ) && $isImageValid === -1 && IsImageValid( $sFilePath, $sExtension ) === false ) - { - @unlink( $sFilePath ) ; - $sErrorNumber = '202' ; - } - else if ( isset( $detectHtml ) && $detectHtml === -1 && DetectHtml( $sFilePath ) === true ) - { - @unlink( $sFilePath ) ; - $sErrorNumber = '202' ; - } - } - } - else - $sErrorNumber = '202' ; - } - else - $sErrorNumber = '202' ; - - - $sFileUrl = CombinePaths( GetResourceTypePath( $resourceType, $sCommand ) , $currentFolder ) ; - $sFileUrl = CombinePaths( $sFileUrl, $sFileName ) ; - - SendUploadResults( $sErrorNumber, $sFileUrl, $sFileName ) ; - - exit ; -} -?> diff --git a/fckeditor/editor/filemanager/connectors/php/config.php b/fckeditor/editor/filemanager/connectors/php/config.php deleted file mode 100644 index 24b60f11..00000000 --- a/fckeditor/editor/filemanager/connectors/php/config.php +++ /dev/null @@ -1,165 +0,0 @@ -prepare("SELECT * FROM config WHERE var='SFIABDIRECTORY'"); -$q->execute(); -$r=$q->fetch(PDO::FETCH_OBJ); -$config_sfiabdirectory=$r->val; - -global $Config ; - -// SECURITY: You must explicitly enable this "connector". (Set it to "true"). -// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only -// authenticated users can access this file or use some kind of session checking. -$Config['Enabled'] = true ; - -// Path to user files relative to the document root. -$Config['UserFilesPath'] = $config_sfiabdirectory.'/data/userfiles/' ; - -// Fill the following value it you prefer to specify the absolute path for the -// user files directory. Useful if you are using a virtual directory, symbolic -// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -// Attention: The above 'UserFilesPath' must point to the same directory. -list($sub,$junk)=explode(".",$_SERVER['HTTP_HOST'],2); -if($junk=="sfiab.com") { - $p="{$_SERVER['DOCUMENT_ROOT']}/{$sub}/data/userfiles/"; - $Config['UserFilesAbsolutePath'] = $p; -} -else { - $Config['UserFilesAbsolutePath'] = ''; -} - -// Due to security issues with Apache modules, it is recommended to leave the -// following setting enabled. -$Config['ForceSingleExtension'] = true ; - -// Perform additional checks for image files. -// If set to true, validate image size (using getimagesize). -$Config['SecureImageUploads'] = true; - -// What the user can do with this connector. -$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ; - -// Allowed Resource Types. -$Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ; - -// For security, HTML is allowed in the first Kb of data for files having the -// following extensions only. -$Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ; - -// After file is uploaded, sometimes it is required to change its permissions -// so that it was possible to access it at the later time. -// If possible, it is recommended to set more restrictive permissions, like 0755. -// Set to 0 to disable this feature. -// Note: not needed on Windows-based servers. -$Config['ChmodOnUpload'] = 0644 ; - -// See comments above. -// Used when creating folders that does not exist. -$Config['ChmodOnFolderCreate'] = 0755 ; - -/* - Configuration settings for each Resource Type - - - AllowedExtensions: the possible extensions that can be allowed. - If it is empty then any file type can be uploaded. - - DeniedExtensions: The extensions that won't be allowed. - If it is empty then no restrictions are done here. - - For a file to be uploaded it has to fulfill both the AllowedExtensions - and DeniedExtensions (that's it: not being denied) conditions. - - - FileTypesPath: the virtual folder relative to the document root where - these resources will be located. - Attention: It must start and end with a slash: '/' - - - FileTypesAbsolutePath: the physical path to the above folder. It must be - an absolute path. - If it's an empty string then it will be autocalculated. - Useful if you are using a virtual directory, symbolic link or alias. - Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. - Attention: The above 'FileTypesPath' must point to the same directory. - Attention: It must end with a slash: '/' - - - QuickUploadPath: the virtual folder relative to the document root where - these resources will be uploaded using the Upload tab in the resources - dialogs. - Attention: It must start and end with a slash: '/' - - - QuickUploadAbsolutePath: the physical path to the above folder. It must be - an absolute path. - If it's an empty string then it will be autocalculated. - Useful if you are using a virtual directory, symbolic link or alias. - Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. - Attention: The above 'QuickUploadPath' must point to the same directory. - Attention: It must end with a slash: '/' - - NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to - "userfiles" directory to maintain backwards compatibility with older versions of FCKeditor. - This is fine, but you in some cases you will be not able to browse uploaded files using file browser. - Example: if you click on "image button", select "Upload" tab and send image - to the server, image will appear in FCKeditor correctly, but because it is placed - directly in /userfiles/ directory, you'll be not able to see it in built-in file browser. - The more expected behaviour would be to send images directly to "image" subfolder. - To achieve that, simply change - $Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ; - $Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ; - into: - $Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ; - $Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ; - -*/ - -$Config['AllowedExtensions']['File'] = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ; -$Config['DeniedExtensions']['File'] = array() ; -$Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . 'file/' ; -$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ; -$Config['QuickUploadPath']['File'] = $Config['FileTypesPath']['File'] ; -$Config['QuickUploadAbsolutePath']['File']= $Config['FileTypesAbsolutePath']['File'] ; - -$Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ; -$Config['DeniedExtensions']['Image'] = array() ; -$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'image/' ; -$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ; -$Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ; -$Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ; - -$Config['AllowedExtensions']['Flash'] = array('swf','flv') ; -$Config['DeniedExtensions']['Flash'] = array() ; -$Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ; -$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ; -$Config['QuickUploadPath']['Flash'] = $Config['FileTypesPath']['Flash'] ; -$Config['QuickUploadAbsolutePath']['Flash']= $Config['FileTypesAbsolultePath']['Flash'] ; - -$Config['AllowedExtensions']['Media'] = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ; -$Config['DeniedExtensions']['Media'] = array() ; -$Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/' ; -$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ; -$Config['QuickUploadPath']['Media'] = $Config['FileTypesPath']['Media'] ; -$Config['QuickUploadAbsolutePath']['Media']= $Config['FileTypesAbsolutePath']['Media'] ; - -?> diff --git a/fckeditor/editor/filemanager/connectors/php/connector.php b/fckeditor/editor/filemanager/connectors/php/connector.php deleted file mode 100644 index d6373ac9..00000000 --- a/fckeditor/editor/filemanager/connectors/php/connector.php +++ /dev/null @@ -1,87 +0,0 @@ - diff --git a/fckeditor/editor/filemanager/connectors/php/io.php b/fckeditor/editor/filemanager/connectors/php/io.php deleted file mode 100644 index 6d4c1a2a..00000000 --- a/fckeditor/editor/filemanager/connectors/php/io.php +++ /dev/null @@ -1,295 +0,0 @@ - 0 ) - return $Config['QuickUploadAbsolutePath'][$resourceType] ; - - // Map the "UserFiles" path to a local directory. - return Server_MapPath( $Config['QuickUploadPath'][$resourceType] ) ; - } - else - { - if ( strlen( $Config['FileTypesAbsolutePath'][$resourceType] ) > 0 ) - return $Config['FileTypesAbsolutePath'][$resourceType] ; - - // Map the "UserFiles" path to a local directory. - return Server_MapPath( $Config['FileTypesPath'][$resourceType] ) ; - } -} - -function GetUrlFromPath( $resourceType, $folderPath, $sCommand ) -{ - return CombinePaths( GetResourceTypePath( $resourceType, $sCommand ), $folderPath ) ; -} - -function RemoveExtension( $fileName ) -{ - return substr( $fileName, 0, strrpos( $fileName, '.' ) ) ; -} - -function ServerMapFolder( $resourceType, $folderPath, $sCommand ) -{ - // Get the resource type directory. - $sResourceTypePath = GetResourceTypeDirectory( $resourceType, $sCommand ) ; - - // Ensure that the directory exists. - $sErrorMsg = CreateServerFolder( $sResourceTypePath ) ; - if ( $sErrorMsg != '' ) - SendError( 1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})" ) ; - - // Return the resource type directory combined with the required path. - return CombinePaths( $sResourceTypePath , $folderPath ) ; -} - -function GetParentFolder( $folderPath ) -{ - $sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ; - return preg_replace( $sPattern, '', $folderPath ) ; -} - -function CreateServerFolder( $folderPath, $lastFolder = null ) -{ - global $Config ; - $sParent = GetParentFolder( $folderPath ) ; - - // Ensure the folder path has no double-slashes, or mkdir may fail on certain platforms - while ( strpos($folderPath, '//') !== false ) - { - $folderPath = str_replace( '//', '/', $folderPath ) ; - } - - // Check if the parent exists, or create it. - if ( !file_exists( $sParent ) ) - { - //prevents agains infinite loop when we can't create root folder - if ( !is_null( $lastFolder ) && $lastFolder === $sParent) { - return "Can't create $folderPath directory" ; - } - - $sErrorMsg = CreateServerFolder( $sParent, $folderPath ) ; - if ( $sErrorMsg != '' ) - return $sErrorMsg ; - } - - if ( !file_exists( $folderPath ) ) - { - // Turn off all error reporting. - error_reporting( 0 ) ; - - $php_errormsg = '' ; - // Enable error tracking to catch the error. - ini_set( 'track_errors', '1' ) ; - - if ( isset( $Config['ChmodOnFolderCreate'] ) && !$Config['ChmodOnFolderCreate'] ) - { - mkdir( $folderPath ) ; - } - else - { - $permissions = 0777 ; - if ( isset( $Config['ChmodOnFolderCreate'] ) ) - { - $permissions = $Config['ChmodOnFolderCreate'] ; - } - // To create the folder with 0777 permissions, we need to set umask to zero. - $oldumask = umask(0) ; - mkdir( $folderPath, $permissions ) ; - umask( $oldumask ) ; - } - - $sErrorMsg = $php_errormsg ; - - // Restore the configurations. - ini_restore( 'track_errors' ) ; - ini_restore( 'error_reporting' ) ; - - return $sErrorMsg ; - } - else - return '' ; -} - -function GetRootPath() -{ - if (!isset($_SERVER)) { - global $_SERVER; - } - $sRealPath = realpath( './' ) ; - // #2124 ensure that no slash is at the end - $sRealPath = rtrim($sRealPath,"\\/"); - - $sSelfPath = $_SERVER['PHP_SELF'] ; - $sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ; - - $sSelfPath = str_replace( '/', DIRECTORY_SEPARATOR, $sSelfPath ) ; - - $position = strpos( $sRealPath, $sSelfPath ) ; - - // This can check only that this script isn't run from a virtual dir - // But it avoids the problems that arise if it isn't checked - if ( $position === false || $position <> strlen( $sRealPath ) - strlen( $sSelfPath ) ) - SendError( 1, 'Sorry, can\'t map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/php/config.php".' ) ; - - return substr( $sRealPath, 0, $position ) ; -} - -// Emulate the asp Server.mapPath function. -// given an url path return the physical directory that it corresponds to -function Server_MapPath( $path ) -{ - // This function is available only for Apache - if ( function_exists( 'apache_lookup_uri' ) ) - { - $info = apache_lookup_uri( $path ) ; - return $info->filename . $info->path_info ; - } - - // This isn't correct but for the moment there's no other solution - // If this script is under a virtual directory or symlink it will detect the problem and stop - return GetRootPath() . $path ; -} - -function IsAllowedExt( $sExtension, $resourceType ) -{ - global $Config ; - // Get the allowed and denied extensions arrays. - $arAllowed = $Config['AllowedExtensions'][$resourceType] ; - $arDenied = $Config['DeniedExtensions'][$resourceType] ; - - if ( count($arAllowed) > 0 && !in_array( $sExtension, $arAllowed ) ) - return false ; - - if ( count($arDenied) > 0 && in_array( $sExtension, $arDenied ) ) - return false ; - - return true ; -} - -function IsAllowedType( $resourceType ) -{ - global $Config ; - if ( !in_array( $resourceType, $Config['ConfigAllowedTypes'] ) ) - return false ; - - return true ; -} - -function IsAllowedCommand( $sCommand ) -{ - global $Config ; - - if ( !in_array( $sCommand, $Config['ConfigAllowedCommands'] ) ) - return false ; - - return true ; -} - -function GetCurrentFolder() -{ - if (!isset($_GET)) { - global $_GET; - } - $sCurrentFolder = isset( $_GET['CurrentFolder'] ) ? $_GET['CurrentFolder'] : '/' ; - - // Check the current folder syntax (must begin and start with a slash). - if ( !preg_match( '|/$|', $sCurrentFolder ) ) - $sCurrentFolder .= '/' ; - if ( strpos( $sCurrentFolder, '/' ) !== 0 ) - $sCurrentFolder = '/' . $sCurrentFolder ; - - // Ensure the folder path has no double-slashes - while ( strpos ($sCurrentFolder, '//') !== false ) { - $sCurrentFolder = str_replace ('//', '/', $sCurrentFolder) ; - } - - // Check for invalid folder paths (..) - if ( strpos( $sCurrentFolder, '..' ) || strpos( $sCurrentFolder, "\\" )) - SendError( 102, '' ) ; - - return $sCurrentFolder ; -} - -// Do a cleanup of the folder name to avoid possible problems -function SanitizeFolderName( $sNewFolderName ) -{ - $sNewFolderName = stripslashes( $sNewFolderName ) ; - - // Remove . \ / | : ? * " < > - $sNewFolderName = preg_replace( '/\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[[:cntrl:]]/', '_', $sNewFolderName ) ; - - return $sNewFolderName ; -} - -// Do a cleanup of the file name to avoid possible problems -function SanitizeFileName( $sNewFileName ) -{ - global $Config ; - - $sNewFileName = stripslashes( $sNewFileName ) ; - - // Replace dots in the name with underscores (only one dot can be there... security issue). - if ( $Config['ForceSingleExtension'] ) - $sNewFileName = preg_replace( '/\\.(?![^.]*$)/', '_', $sNewFileName ) ; - - // Remove \ / | : ? * " < > - $sNewFileName = preg_replace( '/\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[[:cntrl:]]/', '_', $sNewFileName ) ; - - return $sNewFileName ; -} - -// This is the function that sends the results of the uploading process. -function SendUploadResults( $errorNumber, $fileUrl = '', $fileName = '', $customMsg = '' ) -{ - // Minified version of the document.domain automatic fix script (#1919). - // The original script can be found at _dev/domain_fix_template.js - echo << -(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); -EOF; - - $rpl = array( '\\' => '\\\\', '"' => '\\"' ) ; - echo 'window.parent.OnUploadCompleted(' . $errorNumber . ',"' . strtr( $fileUrl, $rpl ) . '","' . strtr( $fileName, $rpl ) . '", "' . strtr( $customMsg, $rpl ) . '") ;' ; - echo '' ; - exit ; -} - -?> diff --git a/fckeditor/editor/filemanager/connectors/php/phpcompat.php b/fckeditor/editor/filemanager/connectors/php/phpcompat.php deleted file mode 100644 index 6fc89e59..00000000 --- a/fckeditor/editor/filemanager/connectors/php/phpcompat.php +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/fckeditor/editor/filemanager/connectors/php/util.php b/fckeditor/editor/filemanager/connectors/php/util.php deleted file mode 100644 index 30dc6c04..00000000 --- a/fckeditor/editor/filemanager/connectors/php/util.php +++ /dev/null @@ -1,220 +0,0 @@ - $val ) - { - $lcaseHtmlExtensions[$key] = strtolower( $val ) ; - } - return in_array( $ext, $lcaseHtmlExtensions ) ; -} - -/** - * Detect HTML in the first KB to prevent against potential security issue with - * IE/Safari/Opera file type auto detection bug. - * Returns true if file contain insecure HTML code at the beginning. - * - * @param string $filePath absolute path to file - * @return boolean - */ -function DetectHtml( $filePath ) -{ - $fp = @fopen( $filePath, 'rb' ) ; - - //open_basedir restriction, see #1906 - if ( $fp === false || !flock( $fp, LOCK_SH ) ) - { - return -1 ; - } - - $chunk = fread( $fp, 1024 ) ; - flock( $fp, LOCK_UN ) ; - fclose( $fp ) ; - - $chunk = strtolower( $chunk ) ; - - if (!$chunk) - { - return false ; - } - - $chunk = trim( $chunk ) ; - - if ( preg_match( "/= 4.0.7 - if ( function_exists( 'version_compare' ) ) { - $sCurrentVersion = phpversion(); - if ( version_compare( $sCurrentVersion, "4.2.0" ) >= 0 ) { - $imageCheckExtensions[] = "tiff"; - $imageCheckExtensions[] = "tif"; - } - if ( version_compare( $sCurrentVersion, "4.3.0" ) >= 0 ) { - $imageCheckExtensions[] = "swc"; - } - if ( version_compare( $sCurrentVersion, "4.3.2" ) >= 0 ) { - $imageCheckExtensions[] = "jpc"; - $imageCheckExtensions[] = "jp2"; - $imageCheckExtensions[] = "jpx"; - $imageCheckExtensions[] = "jb2"; - $imageCheckExtensions[] = "xbm"; - $imageCheckExtensions[] = "wbmp"; - } - } - - if ( !in_array( $extension, $imageCheckExtensions ) ) { - return true; - } - - if ( @getimagesize( $filePath ) === false ) { - return false ; - } - - return true; -} - -?> diff --git a/fckeditor/editor/filemanager/connectors/py/config.py b/fckeditor/editor/filemanager/connectors/py/config.py deleted file mode 100644 index 094800dc..00000000 --- a/fckeditor/editor/filemanager/connectors/py/config.py +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env python -""" - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Configuration file for the File Manager Connector for Python -""" - -# INSTALLATION NOTE: You must set up your server environment accordingly to run -# python scripts. This connector requires Python 2.4 or greater. -# -# Supported operation modes: -# * WSGI (recommended): You'll need apache + mod_python + modpython_gateway -# or any web server capable of the WSGI python standard -# * Plain Old CGI: Any server capable of running standard python scripts -# (although mod_python is recommended for performance) -# This was the previous connector version operation mode -# -# If you're using Apache web server, replace the htaccess.txt to to .htaccess, -# and set the proper options and paths. -# For WSGI and mod_python, you may need to download modpython_gateway from: -# http://projects.amor.org/misc/svn/modpython_gateway.py and copy it in this -# directory. - - -# SECURITY: You must explicitly enable this "connector". (Set it to "True"). -# WARNING: don't just set "ConfigIsEnabled = True", you must be sure that only -# authenticated users can access this file or use some kind of session checking. -Enabled = False - -# Path to user files relative to the document root. -UserFilesPath = '/userfiles/' - -# Fill the following value it you prefer to specify the absolute path for the -# user files directory. Useful if you are using a virtual directory, symbolic -# link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -# Attention: The above 'UserFilesPath' must point to the same directory. -# WARNING: GetRootPath may not work in virtual or mod_python configurations, and -# may not be thread safe. Use this configuration parameter instead. -UserFilesAbsolutePath = '' - -# Due to security issues with Apache modules, it is recommended to leave the -# following setting enabled. -ForceSingleExtension = True - -# What the user can do with this connector -ConfigAllowedCommands = [ 'QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder' ] - -# Allowed Resource Types -ConfigAllowedTypes = ['File', 'Image', 'Flash', 'Media'] - -# After file is uploaded, sometimes it is required to change its permissions -# so that it was possible to access it at the later time. -# If possible, it is recommended to set more restrictive permissions, like 0755. -# Set to 0 to disable this feature. -# Note: not needed on Windows-based servers. -ChmodOnUpload = 0755 - -# See comments above. -# Used when creating folders that does not exist. -ChmodOnFolderCreate = 0755 - -# Do not touch this 3 lines, see "Configuration settings for each Resource Type" -AllowedExtensions = {}; DeniedExtensions = {}; -FileTypesPath = {}; FileTypesAbsolutePath = {}; -QuickUploadPath = {}; QuickUploadAbsolutePath = {}; - -# Configuration settings for each Resource Type -# -# - AllowedExtensions: the possible extensions that can be allowed. -# If it is empty then any file type can be uploaded. -# - DeniedExtensions: The extensions that won't be allowed. -# If it is empty then no restrictions are done here. -# -# For a file to be uploaded it has to fulfill both the AllowedExtensions -# and DeniedExtensions (that's it: not being denied) conditions. -# -# - FileTypesPath: the virtual folder relative to the document root where -# these resources will be located. -# Attention: It must start and end with a slash: '/' -# -# - FileTypesAbsolutePath: the physical path to the above folder. It must be -# an absolute path. -# If it's an empty string then it will be autocalculated. -# Useful if you are using a virtual directory, symbolic link or alias. -# Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -# Attention: The above 'FileTypesPath' must point to the same directory. -# Attention: It must end with a slash: '/' -# -# -# - QuickUploadPath: the virtual folder relative to the document root where -# these resources will be uploaded using the Upload tab in the resources -# dialogs. -# Attention: It must start and end with a slash: '/' -# -# - QuickUploadAbsolutePath: the physical path to the above folder. It must be -# an absolute path. -# If it's an empty string then it will be autocalculated. -# Useful if you are using a virtual directory, symbolic link or alias. -# Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. -# Attention: The above 'QuickUploadPath' must point to the same directory. -# Attention: It must end with a slash: '/' - -AllowedExtensions['File'] = ['7z','aiff','asf','avi','bmp','csv','doc','fla','flv','gif','gz','gzip','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','ods','odt','pdf','png','ppt','pxd','qt','ram','rar','rm','rmi','rmvb','rtf','sdc','sitd','swf','sxc','sxw','tar','tgz','tif','tiff','txt','vsd','wav','wma','wmv','xls','xml','zip'] -DeniedExtensions['File'] = [] -FileTypesPath['File'] = UserFilesPath + 'file/' -FileTypesAbsolutePath['File'] = (not UserFilesAbsolutePath == '') and (UserFilesAbsolutePath + 'file/') or '' -QuickUploadPath['File'] = FileTypesPath['File'] -QuickUploadAbsolutePath['File'] = FileTypesAbsolutePath['File'] - -AllowedExtensions['Image'] = ['bmp','gif','jpeg','jpg','png'] -DeniedExtensions['Image'] = [] -FileTypesPath['Image'] = UserFilesPath + 'image/' -FileTypesAbsolutePath['Image'] = (not UserFilesAbsolutePath == '') and UserFilesAbsolutePath + 'image/' or '' -QuickUploadPath['Image'] = FileTypesPath['Image'] -QuickUploadAbsolutePath['Image']= FileTypesAbsolutePath['Image'] - -AllowedExtensions['Flash'] = ['swf','flv'] -DeniedExtensions['Flash'] = [] -FileTypesPath['Flash'] = UserFilesPath + 'flash/' -FileTypesAbsolutePath['Flash'] = ( not UserFilesAbsolutePath == '') and UserFilesAbsolutePath + 'flash/' or '' -QuickUploadPath['Flash'] = FileTypesPath['Flash'] -QuickUploadAbsolutePath['Flash']= FileTypesAbsolutePath['Flash'] - -AllowedExtensions['Media'] = ['aiff','asf','avi','bmp','fla', 'flv','gif','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','png','qt','ram','rm','rmi','rmvb','swf','tif','tiff','wav','wma','wmv'] -DeniedExtensions['Media'] = [] -FileTypesPath['Media'] = UserFilesPath + 'media/' -FileTypesAbsolutePath['Media'] = ( not UserFilesAbsolutePath == '') and UserFilesAbsolutePath + 'media/' or '' -QuickUploadPath['Media'] = FileTypesPath['Media'] -QuickUploadAbsolutePath['Media']= FileTypesAbsolutePath['Media'] diff --git a/fckeditor/editor/filemanager/connectors/py/connector.py b/fckeditor/editor/filemanager/connectors/py/connector.py deleted file mode 100644 index e3a4c20a..00000000 --- a/fckeditor/editor/filemanager/connectors/py/connector.py +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2008 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - - - GNU General Public License Version 2 or later (the "GPL") - http://www.gnu.org/licenses/gpl.html - - - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - http://www.gnu.org/licenses/lgpl.html - - - Mozilla Public License Version 1.1 or later (the "MPL") - http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Connector for Python (CGI and WSGI). - -See config.py for configuration settings - -""" -import os - -from fckutil import * -from fckcommands import * # default command's implementation -from fckoutput import * # base http, xml and html output mixins -from fckconnector import FCKeditorConnectorBase # import base connector -import config as Config - -class FCKeditorConnector( FCKeditorConnectorBase, - GetFoldersCommandMixin, - GetFoldersAndFilesCommandMixin, - CreateFolderCommandMixin, - UploadFileCommandMixin, - BaseHttpMixin, BaseXmlMixin, BaseHtmlMixin ): - "The Standard connector class." - def doResponse(self): - "Main function. Process the request, set headers and return a string as response." - s = "" - # Check if this connector is disabled - if not(Config.Enabled): - return self.sendError(1, "This connector is disabled. Please check the connector configurations in \"editor/filemanager/connectors/py/config.py\" and try again.") - # Make sure we have valid inputs - for key in ("Command","Type","CurrentFolder"): - if not self.request.has_key (key): - return - # Get command, resource type and current folder - command = self.request.get("Command") - resourceType = self.request.get("Type") - currentFolder = getCurrentFolder(self.request.get("CurrentFolder")) - # Check for invalid paths - if currentFolder is None: - return self.sendError(102, "") - - # Check if it is an allowed command - if ( not command in Config.ConfigAllowedCommands ): - return self.sendError( 1, 'The %s command isn\'t allowed' % command ) - - if ( not resourceType in Config.ConfigAllowedTypes ): - return self.sendError( 1, 'Invalid type specified' ) - - # Setup paths - if command == "QuickUpload": - self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType] - self.webUserFilesFolder = Config.QuickUploadPath[resourceType] - else: - self.userFilesFolder = Config.FileTypesAbsolutePath[resourceType] - self.webUserFilesFolder = Config.FileTypesPath[resourceType] - - if not self.userFilesFolder: # no absolute path given (dangerous...) - self.userFilesFolder = mapServerPath(self.environ, - self.webUserFilesFolder) - # Ensure that the directory exists. - if not os.path.exists(self.userFilesFolder): - try: - self.createServerFoldercreateServerFolder( self.userFilesFolder ) - except: - return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ") - - # File upload doesn't have to return XML, so intercept here - if (command == "FileUpload"): - return self.uploadFile(resourceType, currentFolder) - - # Create Url - url = combinePaths( self.webUserFilesFolder, currentFolder ) - - # Begin XML - s += self.createXmlHeader(command, resourceType, currentFolder, url) - # Execute the command - selector = {"GetFolders": self.getFolders, - "GetFoldersAndFiles": self.getFoldersAndFiles, - "CreateFolder": self.createFolder, - } - s += selector[command](resourceType, currentFolder) - s += self.createXmlFooter() - return s - -# Running from command line (plain old CGI) -if __name__ == '__main__': - try: - # Create a Connector Instance - conn = FCKeditorConnector() - data = conn.doResponse() - for header in conn.headers: - print '%s: %s' % header - print - print data - except: - print "Content-Type: text/plain" - print - import cgi - cgi.print_exception() diff --git a/fckeditor/editor/filemanager/connectors/py/fckcommands.py b/fckeditor/editor/filemanager/connectors/py/fckcommands.py deleted file mode 100644 index 0f4f8eb3..00000000 --- a/fckeditor/editor/filemanager/connectors/py/fckcommands.py +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2008 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Connector for Python (CGI and WSGI). - -""" - -import os -try: # Windows needs stdio set for binary mode for file upload to work. - import msvcrt - msvcrt.setmode (0, os.O_BINARY) # stdin = 0 - msvcrt.setmode (1, os.O_BINARY) # stdout = 1 -except ImportError: - pass - -from fckutil import * -from fckoutput import * -import config as Config - -class GetFoldersCommandMixin (object): - def getFolders(self, resourceType, currentFolder): - """ - Purpose: command to recieve a list of folders - """ - # Map the virtual path to our local server - serverPath = mapServerFolder(self.userFilesFolder,currentFolder) - s = """""" # Open the folders node - for someObject in os.listdir(serverPath): - someObjectPath = mapServerFolder(serverPath, someObject) - if os.path.isdir(someObjectPath): - s += """""" % ( - convertToXmlAttribute(someObject) - ) - s += """""" # Close the folders node - return s - -class GetFoldersAndFilesCommandMixin (object): - def getFoldersAndFiles(self, resourceType, currentFolder): - """ - Purpose: command to recieve a list of folders and files - """ - # Map the virtual path to our local server - serverPath = mapServerFolder(self.userFilesFolder,currentFolder) - # Open the folders / files node - folders = """""" - files = """""" - for someObject in os.listdir(serverPath): - someObjectPath = mapServerFolder(serverPath, someObject) - if os.path.isdir(someObjectPath): - folders += """""" % ( - convertToXmlAttribute(someObject) - ) - elif os.path.isfile(someObjectPath): - size = os.path.getsize(someObjectPath) - files += """""" % ( - convertToXmlAttribute(someObject), - os.path.getsize(someObjectPath) - ) - # Close the folders / files node - folders += """""" - files += """""" - return folders + files - -class CreateFolderCommandMixin (object): - def createFolder(self, resourceType, currentFolder): - """ - Purpose: command to create a new folder - """ - errorNo = 0; errorMsg =''; - if self.request.has_key("NewFolderName"): - newFolder = self.request.get("NewFolderName", None) - newFolder = sanitizeFolderName (newFolder) - try: - newFolderPath = mapServerFolder(self.userFilesFolder, combinePaths(currentFolder, newFolder)) - self.createServerFolder(newFolderPath) - except Exception, e: - errorMsg = str(e).decode('iso-8859-1').encode('utf-8') # warning with encodigns!!! - if hasattr(e,'errno'): - if e.errno==17: #file already exists - errorNo=0 - elif e.errno==13: # permission denied - errorNo = 103 - elif e.errno==36 or e.errno==2 or e.errno==22: # filename too long / no such file / invalid name - errorNo = 102 - else: - errorNo = 110 - else: - errorNo = 102 - return self.sendErrorNode ( errorNo, errorMsg ) - - def createServerFolder(self, folderPath): - "Purpose: physically creates a folder on the server" - # No need to check if the parent exists, just create all hierachy - - try: - permissions = Config.ChmodOnFolderCreate - if not permissions: - os.makedirs(folderPath) - except AttributeError: #ChmodOnFolderCreate undefined - permissions = 0755 - - if permissions: - oldumask = os.umask(0) - os.makedirs(folderPath,mode=0755) - os.umask( oldumask ) - -class UploadFileCommandMixin (object): - def uploadFile(self, resourceType, currentFolder): - """ - Purpose: command to upload files to server (same as FileUpload) - """ - errorNo = 0 - if self.request.has_key("NewFile"): - # newFile has all the contents we need - newFile = self.request.get("NewFile", "") - # Get the file name - newFileName = newFile.filename - newFileName = sanitizeFileName( newFileName ) - newFileNameOnly = removeExtension(newFileName) - newFileExtension = getExtension(newFileName).lower() - allowedExtensions = Config.AllowedExtensions[resourceType] - deniedExtensions = Config.DeniedExtensions[resourceType] - - if (allowedExtensions): - # Check for allowed - isAllowed = False - if (newFileExtension in allowedExtensions): - isAllowed = True - elif (deniedExtensions): - # Check for denied - isAllowed = True - if (newFileExtension in deniedExtensions): - isAllowed = False - else: - # No extension limitations - isAllowed = True - - if (isAllowed): - # Upload to operating system - # Map the virtual path to the local server path - currentFolderPath = mapServerFolder(self.userFilesFolder, currentFolder) - i = 0 - while (True): - newFilePath = os.path.join (currentFolderPath,newFileName) - if os.path.exists(newFilePath): - i += 1 - newFileName = "%s(%04d).%s" % ( - newFileNameOnly, i, newFileExtension - ) - errorNo= 201 # file renamed - else: - # Read file contents and write to the desired path (similar to php's move_uploaded_file) - fout = file(newFilePath, 'wb') - while (True): - chunk = newFile.file.read(100000) - if not chunk: break - fout.write (chunk) - fout.close() - - if os.path.exists ( newFilePath ): - doChmod = False - try: - doChmod = Config.ChmodOnUpload - permissions = Config.ChmodOnUpload - except AttributeError: #ChmodOnUpload undefined - doChmod = True - permissions = 0755 - if ( doChmod ): - oldumask = os.umask(0) - os.chmod( newFilePath, permissions ) - os.umask( oldumask ) - - newFileUrl = self.webUserFilesFolder + currentFolder + newFileName - - return self.sendUploadResults( errorNo , newFileUrl, newFileName ) - else: - return self.sendUploadResults( errorNo = 203, customMsg = "Extension not allowed" ) - else: - return self.sendUploadResults( errorNo = 202, customMsg = "No File" ) diff --git a/fckeditor/editor/filemanager/connectors/py/fckconnector.py b/fckeditor/editor/filemanager/connectors/py/fckconnector.py deleted file mode 100644 index 329aec94..00000000 --- a/fckeditor/editor/filemanager/connectors/py/fckconnector.py +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2008 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Base Connector for Python (CGI and WSGI). - -See config.py for configuration settings - -""" -import cgi, os - -from fckutil import * -from fckcommands import * # default command's implementation -from fckoutput import * # base http, xml and html output mixins -import config as Config - -class FCKeditorConnectorBase( object ): - "The base connector class. Subclass it to extend functionality (see Zope example)" - - def __init__(self, environ=None): - "Constructor: Here you should parse request fields, initialize variables, etc." - self.request = FCKeditorRequest(environ) # Parse request - self.headers = [] # Clean Headers - if environ: - self.environ = environ - else: - self.environ = os.environ - - # local functions - - def setHeader(self, key, value): - self.headers.append ((key, value)) - return - -class FCKeditorRequest(object): - "A wrapper around the request object" - def __init__(self, environ): - if environ: # WSGI - self.request = cgi.FieldStorage(fp=environ['wsgi.input'], - environ=environ, - keep_blank_values=1) - self.environ = environ - else: # plain old cgi - self.environ = os.environ - self.request = cgi.FieldStorage() - if 'REQUEST_METHOD' in self.environ and 'QUERY_STRING' in self.environ: - if self.environ['REQUEST_METHOD'].upper()=='POST': - # we are in a POST, but GET query_string exists - # cgi parses by default POST data, so parse GET QUERY_STRING too - self.get_request = cgi.FieldStorage(fp=None, - environ={ - 'REQUEST_METHOD':'GET', - 'QUERY_STRING':self.environ['QUERY_STRING'], - }, - ) - else: - self.get_request={} - - def has_key(self, key): - return self.request.has_key(key) or self.get_request.has_key(key) - - def get(self, key, default=None): - if key in self.request.keys(): - field = self.request[key] - elif key in self.get_request.keys(): - field = self.get_request[key] - else: - return default - if hasattr(field,"filename") and field.filename: #file upload, do not convert return value - return field - else: - return field.value diff --git a/fckeditor/editor/filemanager/connectors/py/fckoutput.py b/fckeditor/editor/filemanager/connectors/py/fckoutput.py deleted file mode 100644 index 12bcc046..00000000 --- a/fckeditor/editor/filemanager/connectors/py/fckoutput.py +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2008 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Connector for Python (CGI and WSGI). - -""" - -from time import gmtime, strftime -import string - -def escape(text, replace=string.replace): - """ - Converts the special characters '<', '>', and '&'. - - RFC 1866 specifies that these characters be represented - in HTML as < > and & respectively. In Python - 1.5 we use the new string.replace() function for speed. - """ - text = replace(text, '&', '&') # must be done 1st - text = replace(text, '<', '<') - text = replace(text, '>', '>') - text = replace(text, '"', '"') - return text - -def convertToXmlAttribute(value): - if (value is None): - value = "" - return escape(value) - -class BaseHttpMixin(object): - def setHttpHeaders(self, content_type='text/xml'): - "Purpose: to prepare the headers for the xml to return" - # Prevent the browser from caching the result. - # Date in the past - self.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT') - # always modified - self.setHeader('Last-Modified',strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime())) - # HTTP/1.1 - self.setHeader('Cache-Control','no-store, no-cache, must-revalidate') - self.setHeader('Cache-Control','post-check=0, pre-check=0') - # HTTP/1.0 - self.setHeader('Pragma','no-cache') - - # Set the response format. - self.setHeader( 'Content-Type', content_type + '; charset=utf-8' ) - return - -class BaseXmlMixin(object): - def createXmlHeader(self, command, resourceType, currentFolder, url): - "Purpose: returns the xml header" - self.setHttpHeaders() - # Create the XML document header - s = """""" - # Create the main connector node - s += """""" % ( - command, - resourceType - ) - # Add the current folder node - s += """""" % ( - convertToXmlAttribute(currentFolder), - convertToXmlAttribute(url), - ) - return s - - def createXmlFooter(self): - "Purpose: returns the xml footer" - return """""" - - def sendError(self, number, text): - "Purpose: in the event of an error, return an xml based error" - self.setHttpHeaders() - return ("""""" + - """""" + - self.sendErrorNode (number, text) + - """""" ) - - def sendErrorNode(self, number, text): - return """""" % (number, convertToXmlAttribute(text)) - -class BaseHtmlMixin(object): - def sendUploadResults( self, errorNo = 0, fileUrl = '', fileName = '', customMsg = '' ): - self.setHttpHeaders("text/html") - "This is the function that sends the results of the uploading process" - - "Minified version of the document.domain automatic fix script (#1919)." - "The original script can be found at _dev/domain_fix_template.js" - return """""" % { - 'errorNumber': errorNo, - 'fileUrl': fileUrl.replace ('"', '\\"'), - 'fileName': fileName.replace ( '"', '\\"' ) , - 'customMsg': customMsg.replace ( '"', '\\"' ), - } diff --git a/fckeditor/editor/filemanager/connectors/py/fckutil.py b/fckeditor/editor/filemanager/connectors/py/fckutil.py deleted file mode 100644 index eac508d4..00000000 --- a/fckeditor/editor/filemanager/connectors/py/fckutil.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2008 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Utility functions for the File Manager Connector for Python - -""" - -import string, re -import os -import config as Config - -# Generic manipulation functions - -def removeExtension(fileName): - index = fileName.rindex(".") - newFileName = fileName[0:index] - return newFileName - -def getExtension(fileName): - index = fileName.rindex(".") + 1 - fileExtension = fileName[index:] - return fileExtension - -def removeFromStart(string, char): - return string.lstrip(char) - -def removeFromEnd(string, char): - return string.rstrip(char) - -# Path functions - -def combinePaths( basePath, folder ): - return removeFromEnd( basePath, '/' ) + '/' + removeFromStart( folder, '/' ) - -def getFileName(filename): - " Purpose: helper function to extrapolate the filename " - for splitChar in ["/", "\\"]: - array = filename.split(splitChar) - if (len(array) > 1): - filename = array[-1] - return filename - -def sanitizeFolderName( newFolderName ): - "Do a cleanup of the folder name to avoid possible problems" - # Remove . \ / | : ? * " < > and control characters - return re.sub( '(?u)\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[^\u0000-\u001f\u007f-\u009f]', '_', newFolderName ) - -def sanitizeFileName( newFileName ): - "Do a cleanup of the file name to avoid possible problems" - # Replace dots in the name with underscores (only one dot can be there... security issue). - if ( Config.ForceSingleExtension ): # remove dots - newFileName = re.sub ( '/\\.(?![^.]*$)/', '_', newFileName ) ; - newFileName = newFileName.replace('\\','/') # convert windows to unix path - newFileName = os.path.basename (newFileName) # strip directories - # Remove \ / | : ? * - return re.sub ( '(?u)/\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[^\u0000-\u001f\u007f-\u009f]/', '_', newFileName ) - -def getCurrentFolder(currentFolder): - if not currentFolder: - currentFolder = '/' - - # Check the current folder syntax (must begin and end with a slash). - if (currentFolder[-1] <> "/"): - currentFolder += "/" - if (currentFolder[0] <> "/"): - currentFolder = "/" + currentFolder - - # Ensure the folder path has no double-slashes - while '//' in currentFolder: - currentFolder = currentFolder.replace('//','/') - - # Check for invalid folder paths (..) - if '..' in currentFolder or '\\' in currentFolder: - return None - - return currentFolder - -def mapServerPath( environ, url): - " Emulate the asp Server.mapPath function. Given an url path return the physical directory that it corresponds to " - # This isn't correct but for the moment there's no other solution - # If this script is under a virtual directory or symlink it will detect the problem and stop - return combinePaths( getRootPath(environ), url ) - -def mapServerFolder(resourceTypePath, folderPath): - return combinePaths ( resourceTypePath , folderPath ) - -def getRootPath(environ): - "Purpose: returns the root path on the server" - # WARNING: this may not be thread safe, and doesn't work w/ VirtualServer/mod_python - # Use Config.UserFilesAbsolutePath instead - - if environ.has_key('DOCUMENT_ROOT'): - return environ['DOCUMENT_ROOT'] - else: - realPath = os.path.realpath( './' ) - selfPath = environ['SCRIPT_FILENAME'] - selfPath = selfPath [ : selfPath.rfind( '/' ) ] - selfPath = selfPath.replace( '/', os.path.sep) - - position = realPath.find(selfPath) - - # This can check only that this script isn't run from a virtual dir - # But it avoids the problems that arise if it isn't checked - raise realPath - if ( position < 0 or position <> len(realPath) - len(selfPath) or realPath[ : position ]==''): - raise Exception('Sorry, can\'t map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/py/config.py".') - return realPath[ : position ] diff --git a/fckeditor/editor/filemanager/connectors/py/htaccess.txt b/fckeditor/editor/filemanager/connectors/py/htaccess.txt deleted file mode 100644 index 82374196..00000000 --- a/fckeditor/editor/filemanager/connectors/py/htaccess.txt +++ /dev/null @@ -1,23 +0,0 @@ -# replace the name of this file to .htaccess (if using apache), -# and set the proper options and paths according your enviroment - -Allow from all - -# If using mod_python uncomment this: -PythonPath "[r'C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\fckeditor\editor\filemanager\connectors\py'] + sys.path" - - -# Recomended: WSGI application running with mod_python and modpython_gateway -SetHandler python-program -PythonHandler modpython_gateway::handler -PythonOption wsgi.application wsgi::App - - -# Emulated CGI with mod_python and cgihandler -#AddHandler mod_python .py -#PythonHandler mod_python.cgihandler - - -# Plain old CGI -#Options +ExecCGI -#AddHandler cgi-script py diff --git a/fckeditor/editor/filemanager/connectors/py/upload.py b/fckeditor/editor/filemanager/connectors/py/upload.py deleted file mode 100644 index db5a5ab1..00000000 --- a/fckeditor/editor/filemanager/connectors/py/upload.py +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2008 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -This is the "File Uploader" for Python - -""" -import os - -from fckutil import * -from fckcommands import * # default command's implementation -from fckconnector import FCKeditorConnectorBase # import base connector -import config as Config - -class FCKeditorQuickUpload( FCKeditorConnectorBase, - UploadFileCommandMixin, - BaseHttpMixin, BaseHtmlMixin): - def doResponse(self): - "Main function. Process the request, set headers and return a string as response." - # Check if this connector is disabled - if not(Config.Enabled): - return self.sendUploadResults(1, "This file uploader is disabled. Please check the \"editor/filemanager/connectors/py/config.py\"") - command = 'QuickUpload' - # The file type (from the QueryString, by default 'File'). - resourceType = self.request.get('Type','File') - currentFolder = getCurrentFolder(self.request.get("CurrentFolder","")) - # Check for invalid paths - if currentFolder is None: - return self.sendUploadResults(102, '', '', "") - - # Check if it is an allowed command - if ( not command in Config.ConfigAllowedCommands ): - return self.sendUploadResults( 1, '', '', 'The %s command isn\'t allowed' % command ) - - if ( not resourceType in Config.ConfigAllowedTypes ): - return self.sendUploadResults( 1, '', '', 'Invalid type specified' ) - - # Setup paths - self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType] - self.webUserFilesFolder = Config.QuickUploadPath[resourceType] - if not self.userFilesFolder: # no absolute path given (dangerous...) - self.userFilesFolder = mapServerPath(self.environ, - self.webUserFilesFolder) - - # Ensure that the directory exists. - if not os.path.exists(self.userFilesFolder): - try: - self.createServerFoldercreateServerFolder( self.userFilesFolder ) - except: - return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ") - - # File upload doesn't have to return XML, so intercept here - return self.uploadFile(resourceType, currentFolder) - -# Running from command line (plain old CGI) -if __name__ == '__main__': - try: - # Create a Connector Instance - conn = FCKeditorQuickUpload() - data = conn.doResponse() - for header in conn.headers: - if not header is None: - print '%s: %s' % header - print - print data - except: - print "Content-Type: text/plain" - print - import cgi - cgi.print_exception() diff --git a/fckeditor/editor/filemanager/connectors/py/wsgi.py b/fckeditor/editor/filemanager/connectors/py/wsgi.py deleted file mode 100644 index 9b6c4320..00000000 --- a/fckeditor/editor/filemanager/connectors/py/wsgi.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2008 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - - - GNU General Public License Version 2 or later (the "GPL") - http://www.gnu.org/licenses/gpl.html - - - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - http://www.gnu.org/licenses/lgpl.html - - - Mozilla Public License Version 1.1 or later (the "MPL") - http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Connector/QuickUpload for Python (WSGI wrapper). - -See config.py for configuration settings - -""" - -from connector import FCKeditorConnector -from upload import FCKeditorQuickUpload - -import cgitb -from cStringIO import StringIO - -# Running from WSGI capable server (recomended) -def App(environ, start_response): - "WSGI entry point. Run the connector" - if environ['SCRIPT_NAME'].endswith("connector.py"): - conn = FCKeditorConnector(environ) - elif environ['SCRIPT_NAME'].endswith("upload.py"): - conn = FCKeditorQuickUpload(environ) - else: - start_response ("200 Ok", [('Content-Type','text/html')]) - yield "Unknown page requested: " - yield environ['SCRIPT_NAME'] - return - try: - # run the connector - data = conn.doResponse() - # Start WSGI response: - start_response ("200 Ok", conn.headers) - # Send response text - yield data - except: - start_response("500 Internal Server Error",[("Content-type","text/html")]) - file = StringIO() - cgitb.Hook(file = file).handle() - yield file.getvalue() diff --git a/fckeditor/editor/filemanager/connectors/py/zope.py b/fckeditor/editor/filemanager/connectors/py/zope.py deleted file mode 100644 index ed0d5f45..00000000 --- a/fckeditor/editor/filemanager/connectors/py/zope.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env python - -""" -FCKeditor - The text editor for Internet - http://www.fckeditor.net -Copyright (C) 2003-2008 Frederico Caldeira Knabben - -== BEGIN LICENSE == - -Licensed under the terms of any of the following licenses at your -choice: - -- GNU General Public License Version 2 or later (the "GPL") -http://www.gnu.org/licenses/gpl.html - -- GNU Lesser General Public License Version 2.1 or later (the "LGPL") -http://www.gnu.org/licenses/lgpl.html - -- Mozilla Public License Version 1.1 or later (the "MPL") -http://www.mozilla.org/MPL/MPL-1.1.html - -== END LICENSE == - -Connector for Python and Zope. - -This code was not tested at all. -It just was ported from pre 2.5 release, so for further reference see -\editor\filemanager\browser\default\connectors\py\connector.py in previous -releases. - -""" - -from fckutil import * -from connector import * -import config as Config - -class FCKeditorConnectorZope(FCKeditorConnector): - """ - Zope versiof FCKeditorConnector - """ - # Allow access (Zope) - __allow_access_to_unprotected_subobjects__ = 1 - - def __init__(self, context=None): - """ - Constructor - """ - FCKeditorConnector.__init__(self, environ=None) # call superclass constructor - # Instance Attributes - self.context = context - self.request = FCKeditorRequest(context) - - def getZopeRootContext(self): - if self.zopeRootContext is None: - self.zopeRootContext = self.context.getPhysicalRoot() - return self.zopeRootContext - - def getZopeUploadContext(self): - if self.zopeUploadContext is None: - folderNames = self.userFilesFolder.split("/") - c = self.getZopeRootContext() - for folderName in folderNames: - if (folderName <> ""): - c = c[folderName] - self.zopeUploadContext = c - return self.zopeUploadContext - - def setHeader(self, key, value): - self.context.REQUEST.RESPONSE.setHeader(key, value) - - def getFolders(self, resourceType, currentFolder): - # Open the folders node - s = "" - s += """""" - zopeFolder = self.findZopeFolder(resourceType, currentFolder) - for (name, o) in zopeFolder.objectItems(["Folder"]): - s += """""" % ( - convertToXmlAttribute(name) - ) - # Close the folders node - s += """""" - return s - - def getZopeFoldersAndFiles(self, resourceType, currentFolder): - folders = self.getZopeFolders(resourceType, currentFolder) - files = self.getZopeFiles(resourceType, currentFolder) - s = folders + files - return s - - def getZopeFiles(self, resourceType, currentFolder): - # Open the files node - s = "" - s += """""" - zopeFolder = self.findZopeFolder(resourceType, currentFolder) - for (name, o) in zopeFolder.objectItems(["File","Image"]): - s += """""" % ( - convertToXmlAttribute(name), - ((o.get_size() / 1024) + 1) - ) - # Close the files node - s += """""" - return s - - def findZopeFolder(self, resourceType, folderName): - # returns the context of the resource / folder - zopeFolder = self.getZopeUploadContext() - folderName = self.removeFromStart(folderName, "/") - folderName = self.removeFromEnd(folderName, "/") - if (resourceType <> ""): - try: - zopeFolder = zopeFolder[resourceType] - except: - zopeFolder.manage_addProduct["OFSP"].manage_addFolder(id=resourceType, title=resourceType) - zopeFolder = zopeFolder[resourceType] - if (folderName <> ""): - folderNames = folderName.split("/") - for folderName in folderNames: - zopeFolder = zopeFolder[folderName] - return zopeFolder - - def createFolder(self, resourceType, currentFolder): - # Find out where we are - zopeFolder = self.findZopeFolder(resourceType, currentFolder) - errorNo = 0 - errorMsg = "" - if self.request.has_key("NewFolderName"): - newFolder = self.request.get("NewFolderName", None) - zopeFolder.manage_addProduct["OFSP"].manage_addFolder(id=newFolder, title=newFolder) - else: - errorNo = 102 - return self.sendErrorNode ( errorNo, errorMsg ) - - def uploadFile(self, resourceType, currentFolder, count=None): - zopeFolder = self.findZopeFolder(resourceType, currentFolder) - file = self.request.get("NewFile", None) - fileName = self.getFileName(file.filename) - fileNameOnly = self.removeExtension(fileName) - fileExtension = self.getExtension(fileName).lower() - if (count): - nid = "%s.%s.%s" % (fileNameOnly, count, fileExtension) - else: - nid = fileName - title = nid - try: - zopeFolder.manage_addProduct['OFSP'].manage_addFile( - id=nid, - title=title, - file=file.read() - ) - except: - if (count): - count += 1 - else: - count = 1 - return self.zopeFileUpload(resourceType, currentFolder, count) - return self.sendUploadResults( 0 ) - -class FCKeditorRequest(object): - "A wrapper around the request object" - def __init__(self, context=None): - r = context.REQUEST - self.request = r - - def has_key(self, key): - return self.request.has_key(key) - - def get(self, key, default=None): - return self.request.get(key, default) - -""" -Running from zope, you will need to modify this connector. -If you have uploaded the FCKeditor into Zope (like me), you need to -move this connector out of Zope, and replace the "connector" with an -alias as below. The key to it is to pass the Zope context in, as -we then have a like to the Zope context. - -## Script (Python) "connector.py" -##bind container=container -##bind context=context -##bind namespace= -##bind script=script -##bind subpath=traverse_subpath -##parameters=*args, **kws -##title=ALIAS -## - -import Products.zope as connector -return connector.FCKeditorConnectorZope(context=context).doResponse() -""" diff --git a/fckeditor/editor/filemanager/connectors/test.html b/fckeditor/editor/filemanager/connectors/test.html deleted file mode 100644 index 14e54707..00000000 --- a/fckeditor/editor/filemanager/connectors/test.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - FCKeditor - Connectors Tests - - - - - - - - - - - -
        - - - - - - - - -
        - Connector:
        - -
        -     - Current Folder
        -
        -     - Resource Type
        - -
        -
        - - - - - - - - - - -
        - Get Folders -     - Get Folders and Files -     - Create Folder -     -
        - File Upload
        - - -
        -
        -
        - URL: -
        - -
        - - diff --git a/fckeditor/editor/filemanager/connectors/uploadtest.html b/fckeditor/editor/filemanager/connectors/uploadtest.html deleted file mode 100644 index 16d4ba49..00000000 --- a/fckeditor/editor/filemanager/connectors/uploadtest.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - FCKeditor - Uploaders Tests - - - - - - - - - - - -
        - - - - - - - - -
        - Select the "File Uploader" to use:
        - -
        - Resource Type
        - -
        - Current Folder:
        - -
               - Custom Uploader URL:
        - -
        -
        - - - - - - -
        -
        - Upload a new file:
        -
        - - -
        -
               - Uploaded File URL:
        - -
        -
        - Post URL:   -
        - -
        - - diff --git a/fckeditor/editor/images/anchor.gif b/fckeditor/editor/images/anchor.gif deleted file mode 100644 index 5aa797b2240a432d9f3f1d166ed5542eaf684937..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 184 zcmZ?wbhEHb6kygJ|Uu&?oD;%Ae!z@09(NL_hv#6Slx0y!YR{?r|LJZgAju=f-$sQVWNL{+Tsz18#+~Ke%+zTWns()WcPwy8dQcr!JH# U&i)o#0r5dH3``s@d}5hzR)=UXSOWn0FbS~$ diff --git a/fckeditor/editor/images/arrow_rtl.gif b/fckeditor/editor/images/arrow_rtl.gif deleted file mode 100644 index 22e864984dc8be2445bc66780300651610c029b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 49 ucmZ?wbhEHbWMN=uXkcW30L7myKqe!D4u}hqVPN9uDdaf4E0als!5RRbfd=jX diff --git a/fckeditor/editor/images/smiley/msn/angel_smile.gif b/fckeditor/editor/images/smiley/msn/angel_smile.gif deleted file mode 100644 index a95e053715347debd916ed191a9411a81b97c471..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 445 zcmZ?wbhEHb6lM@+xXQrr9|(Sb_<#TZmHYqCocVv?&VeiY|Nox>6kYZI{;DhYSN-3= z>dO9A|L3o|GJn;A1xx<_5B+~X^veCv|NBF)><|4vKlIA{&{gw+f(-xnGhErv@P9tT zmH7<+>qA!oQGDns`_TXO46A_1o}s=zG!%&9LqqLD>*X1!0u+C;aB?uPGw6U!1Nn)8 z?bdpKkHzGr_?|tkP*zrwQ_#3s<;%KVQtI0mlP5;%EsX7TQU#R>4h0^J Y+;U1?I|3RGOjWBEnPcc+z`_b-pkvvd@;YvKie|v^2_6+~!8Lr4P ztg>fVCC^YV9~vqjs%0OlB_CQZ&k!olKy{$_lZBImfrUW_WHQK43~Y}anhH85q*w@Z zCY?~pQtH=mahB4ZsXWO=sn)}7L5GWSrrWAXZBf#-E*hzc7rnDCt4=uXI$6MOYZkA7 zfHH%Mpn#yD91BN!TMQe&3S(QIgrF>Eh4NH+zCdLzW@Y|PK~Kr_#idOOiahP&f)e6l zGW^QiN=x~9g)-tcCyT}+GB%Uce!hTiF?^;x8yJG>gSwKrZG0 z6C=Cw454kTES%E(B9T)Veznhd;v^)Jw)f;D)r6LG-(v@w*>vZyl=!x&dU75dX)&5lr z7A#pce^o<6!~gnKSL#=-s$ccLKJ-d`=>Pc8EAgSL>O)t>hyJ$@y<#8wUp{n|edsEA zpcKQEc!vM>3|H(K{>w95k!M&X&p;!f_>+Z`gMo!X2V_3TPYi5F9GVI|bfo%EJZwBP zMW(}hV%sN?Af<`tSb}Y19K`$CjTLMJ*iN=MCkkjtUr;Yu*rM>hS&T$tHgPEt`JS%OQ5vpPyxUWh@crCCHyjLVyizh^ENYqG*rDc)3mp=#k? zVIIaL2{~y|9ww)496~a}qFjO!5(*N$^)5U@JtExRGIH{lQeC&zaPi6Pzvm$)bhCEZ mWzYI7SuyVWo-7RPPX)NXxr&Ls`^766;Qv5?!M%xr!5RS2k9cPQ diff --git a/fckeditor/editor/images/smiley/msn/cake.gif b/fckeditor/editor/images/smiley/msn/cake.gif deleted file mode 100644 index f6489d7d59dc8dba08fb248e9b0a6182695f5e01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 453 zcmZ?wbhEHb6lM@+xXQrr9|(Sb_<#TZmHYqCocVv?&Vgm8KK!2n6kYZI{;DhYSN-3= z>dO9A|L3n-wSU!u1xr@VU)9jiu&REQR{Sb0`&C-p5cl;Lw$W{eSD~vJ&68_N$gbeS zDhzroJfdsAFGyRV`i=9}4E~kM(rnrlo;*^G!jf71T_V!b{BAlt96Wqt^`f_P;a`ABWE2>Fv+}!NAO*1LA<}WMJL@K%tNMpb3xTy2pofx;E|L)fVEFIb0LGhDBCiZMJEM zF6+Th3MWL`k0+aDo|R*0Nd3-{k*VZ%X3__r<8zOcJXByw?RQD%{;r^-cQVoJ+d5IP zNPYnxL4HdERv%vLu68{hzM9F_#?u5_eW&@)HWt(q| z%*7`&Nm6ozm-R1u?j2Sd7c&_b*U>lynMHL7Yg&A PG*b->VrSA(WUvMRUk7-C diff --git a/fckeditor/editor/images/smiley/msn/cry_smile.gif b/fckeditor/editor/images/smiley/msn/cry_smile.gif deleted file mode 100644 index 0758f429e95b1fa75f3e54b731fab507ab9318bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 473 zcmZ?wbhEHb6lM@+xXQrr9|(SbxN`shnKSnzaM(#e(3-Gp;v%te(0+Gp{wQt1sVSD zXSf1H^BGpvhpvhbU1cA-s-9t0Ji{t`hWh%@`uNaLdmzbBZ_hv>Q2fcl$-%(RpaU`o zp$RRi*^+&@(=1KgLMhldk9yB&+Cz$0#Ola^FV6X-N Dk$IbY diff --git a/fckeditor/editor/images/smiley/msn/devil_smile.gif b/fckeditor/editor/images/smiley/msn/devil_smile.gif deleted file mode 100644 index 15518d7f05408c0c00be035fbbeb20001878807b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 444 zcmZ?wbhEHb6lM@+xXQrr9|(Sb_<#TZmHYn>+&S=n#{Vn(S6!LEYSsQ#tLCq2XlS@n zziL(eDy{nep&$|{75cwE^h$l`|M<`=@u92gLs!Lz{+Z`gMpPn2V^+NPYi4~4>Vm^Bq-G@-}NwJL4y#>vI`qF zx-6f?_xO}ajSc5wRpw1HOIW#=RsGGdoB5=r`DK8K+@91(gD1M;%F0SYLL$w|QeqrQ z@~r}bf=YtQf+7;~0dDNVLV~ReCJHJq|Pj?=;e9q-^_#2|zdIKUYk(Fhu#F*HOF1Rxj!p#lZephOfzAQ~c(1PMrn zL=-^*ilGn`5TJon5v^)56{-_;P-p6>jc5aHOdDzt4bWg3s4A*ZHC1X9jnHTssYx_J zlWC$B(E=@|g-WSIDNRWeF@cGh(43fqIWtFV#2Q#**3g1jfCaNqHFYeQS`}Lqi?C=G zX-O=>l3Ah^u>vb*g+?*LXhvp{EXZP6n4M&Y>?}LxMskDPSZTUD_vb*4gENHbg+BVsnt8;-p&V4KfLVx>nDcC z?z^Mww?A&{pZsFuucY> ztow=MFWxoP-u2J+zjwWK{LsnSJ?p0K{%pFpr}Mzb?SA9j+u!dzHUIdk-Q&01w6$++ x$nQS$<_Jd59(ixz-PXe952gkkx~}V(@%^?x&i-=4>46{K8TW_Vms}&8{s+7l5EK9a diff --git a/fckeditor/editor/images/smiley/msn/envelope.gif b/fckeditor/editor/images/smiley/msn/envelope.gif deleted file mode 100644 index 66d3656147a0f70d36c65ea44a0ee1577fc5832b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1030 zcmW+#U5FM$6g|dTZhx$PAq3H^i})~wp;2T#3{jc}!4lof${kBv77<#ghsuY$pT!ck zJ=GUm56uRPu-AvohoEQ~_a$@tN~B2$jCt@uiUOlBBIq=`2Znow;czeKo_TD~t_OC! z&_M@(V+B*IXKJ-fwcFGR&RjZkV)?2M<^z3%kK&{GNU!iJUd=0gf=}X;`9z=Lv-oU2 z(^vQ^zM8M}gr|6#Cj}6QzyuTraU#ydQ35201d~9CkSG#OB1Iu8q9#g7kR*~!5+y^j zNH)oo3aKL1q*4f>2u(-@w5eeVs)IUFXX>Z{8bpI>phjpEji!;RP!&~Er6y<+O{R&O zp;o$JN*Z7ggBfTJ=ER(tqXk$H3ub{9VNooa#inUviK#WQC0G(m zW{H+zSuC4nT7^}yYF254QH*9}0SctR3RoP9lj5v6mVgqZ1S^3hqC_dtN@P(Km7-RZ zC7~oK$x33$C|OFjl36NBl~S!#7NSrJt&l5rw$2W8Le~fxz#t69Kt?bMqcO7CO%c_#tEJV(8aDkiFt`rqaCdub zKcWMyyNve+@7R56Zt2bGn+G3!ZK!+K#1AJHzC1fQeBH!Q`r?i0nUO~Z`X4`Wbo!53 zd+E-bMn>0u_v2?zot<6SzVnq$OTBCV{W5d$$=>7 z=WoC7##_3N4t)C6@Y`D^XBPLBtxx}ae0b^PzJo`$bpHCax43uk)UKoN^cFtpj*Txa zUpxNMbBhN$n}_B<`2DBTFQ5N>|N95}`@3Tsx848k-qVMcp1tAl`Xd*&Um19D!^C<& zI&|gS?Aq5aj9lJ!=$?ZcF8w+3&DY(x9^TX0{M*j!kIkL*x6Y66?oD>rtieP717~&l A`~Uy| diff --git a/fckeditor/editor/images/smiley/msn/heart.gif b/fckeditor/editor/images/smiley/msn/heart.gif deleted file mode 100644 index 305714f889555d11032bb7a07bff522f5f854acb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1012 zcmW+#U5JoH6g`r{F8w^T{ScHNVN_0O%Wi}gG@@ZYSO{^55E%toF!CX?p3=LTML#cv z3N5kC(vQh~>d7D<#xTK_g%AdVPzE6qgTSDuE$B4sf#IHEINZy*XP$g|^Sbpr$1sM! zu!QMrXZl*1?zibBoVsx8*!-~%BV>l`AuAMw!caUEg@(`= znun$!1Tn~iM1UaSggAf$IXDL~f{~2QC?+tG$(ck0jWnl;8O&sMX0d>UEY2b}u#wH# zM1dmZlnk)0h8tu9Y@iKpgDk=#ExJWnf+bpVOEQBQ&D>0uVVRcQvaG-gt+*9ggEd-n zYcin^Wpa}oaM0ln`2Zj2gZm(l@JNsDQJ&z5p4?N{^s(sXUF;d2>DfKY3%t;adyzMI zqc`^^7hH6?OBJYKg;%H!r~~WZbx@6{ku`dastGl*Ca+1=P>t2RnrcSPtl4W;EvSXH zcrB_8wXrs@O;xC3l~-xW&fa-|25RU;icqAYD@qAURB|PCyJeJl_eB}XRCZ;lK!qx< zA~mQ{&DA9J75Tz~w4h08N}5@s-P67{!n~V{3}hlZvQU6R6h{#n(1_+}>N)C`2Oxj} zohS?l1H<59P>2YT`uFPG+~+;g>N)Rq>CcysZg_8D;=iBHj2&LH{iFSh2cMsK@xH0EZ;$@AeD9BIwtT&L>gIdKZ+YhE z?EV#dUV4A`%1w{lKC$Z9k;CV=Kfdq$`mGPo9N)UyMlYV({lb=Y`)=T>zi+$ac$yu5 z>%xl5({m^8-L(48TPMcuiU(g_`Nqeue75%VJ2(Ea`s4#YTsm~!?`OYw^`Xg)oEg73 Zx%`_QpFEehjXkm9*%NyXEL(=h{s()1^AZ36 diff --git a/fckeditor/editor/images/smiley/msn/kiss.gif b/fckeditor/editor/images/smiley/msn/kiss.gif deleted file mode 100644 index f840ea602cc02693e97a5cc3b3453f7c39dc2abf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 978 zcmW+#O=uoO6dXz`iDG;BE~yBMAXFDcLM|~{mNZr)h#u1Mx&|Z%5xf{_6@011ix>ZT zP%vx?wdgDUL9en=+e6!U+k=R>7o`@8^j4&Yag%}N&9V&dF>m&{=bxQ_a&>|U?qC-i zduL;>Y>eB+F1G*JzHse!OdgYBM$C-aV^%aoV>FMZSP%iCNYDV%+4$tXrwt!EMOsvvxpU}WOY`tgPrWoE(#PW zr(}Q)HQXQzus{oLL6%^NmfVso!!j+qWtqW@W^N`cutFl?SCJ}Isp_gyhdR|= zUD8;Q@9aoBnv>R~&v)tYbgYdqALgO}g(!|9RG<>oQH2h4qC2`qj)vtCh+xDZiUBb& z29H58AtvhX?X9izBhnfR;n{TeaedVLWbGgp1|9t7<$|GlHmS*oBpPekfaQ{mOU!VHq z%O_r)pS$@xXFuG2`qaXy%fH;}>7C_s2Yy|;dH(u~_2su7SUa?MY4z;MwQKFj;eCsz z-+T9q*WQ@9`oZSGsW@}*g>N?>UO({Tk$+YfR~F_zzI^t^_R*#3<5#Ynxbf#v-pBX9 bnSAx{vD59u;bX7d`Qh*DpB=hqKc4y@%md%w diff --git a/fckeditor/editor/images/smiley/msn/lightbulb.gif b/fckeditor/editor/images/smiley/msn/lightbulb.gif deleted file mode 100644 index 863be6e51ca72e7855147df62c8506d60eb0e9c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 303 zcmV+~0nq+ONk%w1VG{ro0K@TH# zs?@)#)Ss%Vzp9|1q^h5)fPjF1pQ``=RsY{r)W22KpH-@#Re*p1s()3gUsbAq0DoUq zRbN#qUsY8$YpNh5b^ri)7!6Y-7!y`)016uqFe(KY6j=cl8xE0E1rUA+7>@-~Q!IT#nJE_w zB{-u84;&B>91mOz7%&7W4h{wm9)?JpBn}Yz9GcS0a>OJd06W)^ BeUJbE diff --git a/fckeditor/editor/images/smiley/msn/omg_smile.gif b/fckeditor/editor/images/smiley/msn/omg_smile.gif deleted file mode 100644 index aabc7fd17e0f09bcb73ac9e200a626f3068d778e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 342 zcmZ?wbhEHb6lM@+IKsg29|(SbxN`shfjbA5o%-;9#{d8KS6u<3{i{~ZU)9ji@c)14 z|NEg=?uY*0A9@9d=7+AD4-{eezn|d>5Y1<3Xkb`XAG)fZVO2aseSK)XJPQK z;!hS%4hB{R9S|2}Cj;x{1jWAAhc=sud8brn*#y@mnaV6C}`I17`wg@}N%$RQqaCWbT-Ve$P+Y-U0{8zn9>2=E0PaO_?wEX7>7 eIK)7SUzA^1KvGIVfcc#rhu~ihrgu&Z4AuY%yn4<6 diff --git a/fckeditor/editor/images/smiley/msn/regular_smile.gif b/fckeditor/editor/images/smiley/msn/regular_smile.gif deleted file mode 100644 index 33f297e818c0fc7cc4841272301963c3344ad373..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1036 zcmW+#O=uoO6da1sM2c1t@KW5Spwg{)Xhmv0Y*TEt@nHHjPejBuAxR+zp*Mxfi;9g( z1fil;k^O9&5TAlrr3XE14nZ^x7Qz<%DQxvp6vSLg4Iai#29`I=GQ7vU*~gC_+5gCB zANp_$8<^fa)0<_w-KICNcx`chdCdp&fj+`V@zH#wS9le#=9NCdC-KRAqR;SId^Vry zD|{7S%~yKDQ#{R+0tiH40*Zq;5oh8k0TM)lNuWeX6p1F0q7W5P6Qv|b5=kbBk|9|n zn`BCbRFP^@DTGjjCZqz|)G!6rL7k{Gb<_Y2qQNv!BQ%Oe(@0gQimItn6Euk?(?reC zESgO-wL+_CHLX;l4W%?C4KRqo3^WIGV$RIb0xXCHvp|cmC>G6P)3mX~)SB25EQuwv zM9Z)&md!G)!m3y`t2DwWMl-Si1yW!IEDpsq{5 z=mUEG#F^e5XSefY0{KOFmg zabmS|v-iEBaXa`*XZN0~+sC@fEr+*_UwOVevC!#V`g!Y#^v+@4JbCGh{)gVZ@^5$e z+hbEdOBt5b@1b<`QtNpj1BL- z_s;SA&Yavm{AIlH_xY($KkxM1|JRE{-;IrS=B{tKaeVpwKd;#f?|0sq9zBRh{|CYs B0q6h# diff --git a/fckeditor/editor/images/smiley/msn/sad_smile.gif b/fckeditor/editor/images/smiley/msn/sad_smile.gif deleted file mode 100644 index dfb78efea7fe651c7ba84aaf2fb3ee19aa8f8efc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1039 zcmW+#O=uoO6nwQRZIK#H1fzu|Dwr(MOGWDMT7PQPprK?ygSd!RrQSS9!NNz@umN&~XyvMxRC!gB2 zrCa`%HH@#H@%1v^ZsTj1|8@Sv!m1DE1AP=9;iLITui_P6%`1HppWu`EM4!cH_-sDY zSMe3Tny>T}Pk5RqAp!x!AcPY*z!@A71OW(!Ktw?Vq9GD0P(TezBtZg_ArV=Sfo#Y` z6;z-aDnS7O8b}qK^VYb3}h5WFd8G9-BeJm`NAYj zU@|5$3p1FFnXJMJR%0dER%A;{rX!EqK4Wib}l_ZiN$s|#-NQPvSOsOIj zQcWsbj+*6O#0$JMLhr;ocxT?x2k`;CvfAlPw@9<)yeZa8tBp1E{d@K1O>$NS+hh9? z-6ES-Rlqd^@^-?C#r_yKZwm!~cAF_^;2d-_o;x>+a#-FTc>)*MHR$4^B*dzkSb4 zr}x77KWdoiy7Kef#NJ+yfxc^JFOIJK`0!%qLvLR^*ZJVajb~RT-o7yO)z-PGEw6T6 z8alYJd*Gv!zSj<&8kw9reRTAv`RV`qAAkPx&A&Y|GqimCNblaxf$42;Jv+DbX8-*s z9vZu2^65)EKV2C4dT{vMO#`35^vXMTT{Cg->Ct1)d^dRJlb&}cHXc8D_|_rZ^WKIH G^1%P79RflC diff --git a/fckeditor/editor/images/smiley/msn/shades_smile.gif b/fckeditor/editor/images/smiley/msn/shades_smile.gif deleted file mode 100644 index 157df770acd36cbd49f1fd80da2cd9251ef52626..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1059 zcmW+#U1$(g7(K4lexM&2lQyE;9zwhr%_Om+ZYHP`VOD+#v$`fMEqcj%TE@4cKpKIh z7DaSd*wSx7AQU|WSExp7+o5>2LwnxR=V zn`UZ-R?%u&sYDw}X-XPk5Q7!E=Subuy9^*i@( z+0Yaxc8=Y0pTD>?^y#jFbuV?{tI4j>TPN4t_Rv3_yFVGd16_wZHXr@-@u>-1S^wPJ z+V^JP$L^6Yd#88Kj(@lR)XS@;54xkna{0*2t^pf=@d3Fw*nMEy-@Etjk4Nl!dwp=k z@4LLI-yNFY@y7Fy93Niy@HJ`a!p8lFe>wBY>YIQ6d1>h6-m>Pw7w*I#`^G=qadPnV z#JO4Jl@k+Fmu~dq@AiD)UtK%(%#WWvJA2@_r#D>~pF8x{rHx-4IJ?J2w%mTTKeqkX Uj>pdQe*Mv?@9e*7RR`|*A1UAdR{#J2 diff --git a/fckeditor/editor/images/smiley/msn/teeth_smile.gif b/fckeditor/editor/images/smiley/msn/teeth_smile.gif deleted file mode 100644 index 26b5a555f834884bf75e8c64021893d85eb1fc7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1064 zcmW+#Uue)(7(LV&v!aqUL5VH~n{@kw)+$%vudp?o3ljYXMsO?8{plfm5TufCnhz04 zQ5gDAccIw!2_+fjOWeJLm4im!6^`Hv=F1*p{r|J_bhiVS?_4g2@8f*u_HB85W6!hg zXvd#e!r1Z|TP|buHnxPRAEr)zz2F=34Sj$Q;)D4>ukb2f%`1I`kK&{GNT1-7_+&oO z7x*H+m@o8%r+Att1rUh91QZ8xBF@B78b~A3m^73C2_nHHP!ysfYNC_~i6YS?QW7MI zB$GrbkRnn{3WX4g(1cV#s~V=DI;azMrjFV`8_~wJp$2FW4W@yrP!&~ErABBJji!;B zph+~DCTf8e(PCPtL>)?LN*Z7ggBfTJ=ER(tqcyNbtTAh70T#r9S*V&imY7-5s zsYA|&S?mV|wWop@O(-@uDjE-hFkZHZgf@btJiKQ2!SKCdczhr4dvoaU!F~Im9>+Lt zU;}fTXKu61_1oMA&R;$M@%QT?dWZ@MAu%KmNx=||!918kM#v1=LslpVg`s#T3Jsw# zG!IQd2x5>2i2y;u32^`ia&Qh}1S1)pQA}VWlQW418fi`wGnmQj%whoxS)4^|U?ZEe zi2_B+DH&j04L8UJ*gzZH23dqfT6BxD1WUB!mShGqnz@-Q!!j+qWm$n0T5&6~25YqD z)?`8-%H$?F;Gn}D@&P{32lqi9;gKHQqddVAJ-Mf@>0{B&yVx^4)3bY)7kHr;_ablb zMsMy-F1YA&mnu-f3a?NdPzTn*>!2D@BWv^;RTFArO)844$k-@Wu)9C@A2AM$evNm>cI^9! zOHYiZ+n;=I_1cA*)rHgH-0L6iI<_?Rf83t?z;TR{K(-W|7@Gz`NbnQ*MI-z&~1;Mym9TT>*Ig#xp>^C{<{CA zH{SZO-16PR_Oa*heP(`i>h0|>|M}aqpU+%;>dgM5r`CR0x%%JM4|d;mVGa-e5AP%G AhX4Qo diff --git a/fckeditor/editor/images/smiley/msn/thumbs_up.gif b/fckeditor/editor/images/smiley/msn/thumbs_up.gif deleted file mode 100644 index 7e8c74627f641e404eee62083dfbb87e8664e119..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 989 zcmW+#KWN`Y9DPI4)Fpv9=pf%V&?48UgB1Kzdu)Nf0B*!gAW%bRyY^bi#iLSjfBl7b-^gLyE8jF1_!hpbQ#3PbTw6dFQf zXdaq^5X2x45&?pQ6XF04E18g7scuz@zX4YCM}wCEOP36^NdEy)aKG;=dqhGklI%d!G1wBlA|4c2JQ zt;vKwl*vtUz(I#Q)m{6<(n_pbo5q*FiO+M%L&xswULLn!F}eLp4_OYN{DEvu3YZwV)Q( z;n?! z(22r;Ffa@r28Dp1++frDeXf$9F(f5ap(_6_AUbuJF=PtkX z^ts2Myc#~6`uy~dvtQ3|&5w_^UbsK~`}K_z$Jb{LeYJZ1N65z>EI_TNaT&eTaf@e+=`Q!P1ARvuh6-4a=c@P)BfCWUJ^Q=%q0E{DPF) zOJ#%>)Lr2g`_#kOV-H=+QF9w)deaKwg49F4w1TK8JKgQT<#R5V!{@{KocqwjJA1bb zwa~(!SVVj2w3kY|-r9>eb?Maj?1J;=JY9eb;)1zAr*JAx%_&`ki{hfWNSEM}xMVKT z6}TdRP5Y&rv_*c4W@yrP!&~ErABBJji!;B zph+~DCTf8e(PCPtL>)?LN*Z7ggBfTItPyL>8k&cBF>mH+0T#r9S*V&imY7-SO&8EuiaPyxo24iR*uydTeg=rpJ31ewZ3QcXIm+Cq_Qp@$|%PJ9BT(JD(gm+uMKX z?%xi$BiHQxqr2mg%bR7xrbpL)H~Eb}boh?`l~4W}MqgjO;@*{OXVy&*A0GLyWAM7c znPs~=etvak-IYDVa|09aec!pFb^p2X?Q@sc+<5lj?DDZ=%iKK<66 zuUvU>+vcCXO?SmDhsK|~dA*z&_~rfmtJXw!;P|pVe?7k=9$a;N<1KG~-1^|liT<&^ z-uCW^zL&RdY+YFY#?(O9wNFeBj_iJR==9O6AD!>)d0^jI*Tu2DUtjDQ`uz9(yN*sy cPW8RG_3G^T;g{~)XUm`QH_Wd7qK$3;1Il~_)&Kwi diff --git a/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif b/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gif deleted file mode 100644 index c0741223de8ddc366826bad1ef5db6e19e938896..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1034 zcmW+#UuYLp82ui!bObFoBPF;7NpVpKjaWro6Q(GV{n>db;W}llm!9hV+dwkbL*z{S z1K!_C#eEdS`a?u<2aU2hE7pCng8NboLSjZ>Gur8H2QJ^aTn^vI`Oe+DZ%^OjgFVtC zw`2t)t7l}jjI`Ux3Z{RZzBIe&gZV%o#YgyPKGLgrg;(=RpTsBlWIoYn@fkjw&-7J% zg|Fr-J;f8A=1GV^05J&R1P*WpM+89tf*}x55P@ijgbEZ;gAz%QfMiHS7GxkBGEoH; zsD?^VK!65PMYO5KRH#nWL7l0i2GIZwrhytoBQ%;us){O9O_iEN6EvA7Y8K7VY?`T6 zv_h+CrBd2ZN>kEAOkiRrG$-a@&dkw*SbznyK#O7#7R_SQw6S1nO>9Xl!ID{`Ww8v) zW|>ySDy*7S8pQ~s8CgV%pokS=aZ((Lv*K8Slzk z)-A~R`uk7c_4Cxg)y_SK`WCNG4bNYA>b28j6T5KW+0MgTpL@~wZo>9s-#qy4-rnwu zul{{yX5-W2^PT>ak8S^bX87Xf{V&~n`QVoE?iZGBe0-xbJv4v&^V@fRcyMNT^wbw! zzioTy(KknzC;nOJJ(Bdm^4cdZ|1tRdMCB!-HH09+ zTH73C6PjvyHV4yM#LEW6LrrQCR>2}HCiLq1NYs2$CKUY z#-CWj==vF5FQe@?x`xH?7eDxN#Rv0&KEg-w(R`#=conbal|I2I@yUFm&+u7%HlOJ$ zd=+2KS9-!zJk65=2t;54ii0>2XW}RU5=4SYphQR%i6)Vv5EW4qr6foaNhXPsAz37w zWJ-lpk!n&YgiwSgqypO1Fa^~?ov1T))Bp{l!8A}KG>S&kNL8qcs;N>FG>InDM9t7F znoTpcLaS&styH27r8FfCFo?knGzW8H&dkvQEQkfOK#Q;_7R_SQw6Vn0n%EL7i6yf{ z%djk#%`&aRs#rCvG{PuGGqL~$QeXuv4#i1vRvb$}2~vWUz!FiSlxQWgD2hr^E6S2k zl9Xg6v1F7iC0ofX6{Sk4Rw@foD1}zYH9K2p2Rfl^gbZL124f&27=_Uo+3cnY)tWC% zU=k){A~TqU*_g=+R$(<(l5It{yi6|hW^xZXy+)g-ZEXUzW-bzt1j&$y3}itzWTFC9 zPz{wWN6m5%c!)-W2Pl)y5h&|J~8miIcdYJ+>dw z4RoHvzOE||UV3I>aB1ed?TgoJy!-Xn`e*K6J^Djm@7Ul~Bc1a@HrRdro!bshJazB0 zr{@k2^_<_8COZzyzPtDQ?l128bKD2bK=fI8I4<9|pSPp%%AN4WNzQYZ^s6QAD-R%?S{wt-q`!#*In1%_Iuycb1!YY=gq&S7Y0VoPWjd8 z=iQ?h&(3}}`RS&#b$I5XpAMa!wSkZJZ+_yH!O|edsbh*WoF>W*oTi?c3uA# L=^WkAfo=Z-Q#A*W diff --git a/fckeditor/editor/images/spacer.gif b/fckeditor/editor/images/spacer.gif deleted file mode 100644 index 5bfd67a2d6f72ac3a55cbfcea5866e841d22f5d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 mcmZ?wbhEHbWMp7uXkdT>#h)yUAf^t80Ld^gF}W}@SOWlZ0R#L1 diff --git a/fckeditor/editor/js/fckadobeair.js b/fckeditor/editor/js/fckadobeair.js deleted file mode 100644 index 811bd00e..00000000 --- a/fckeditor/editor/js/fckadobeair.js +++ /dev/null @@ -1,176 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Compatibility code for Adobe AIR. - */ - -if ( FCKBrowserInfo.IsAIR ) -{ - var FCKAdobeAIR = (function() - { - /* - * ### Private functions. - */ - - var getDocumentHead = function( doc ) - { - var head ; - var heads = doc.getElementsByTagName( 'head' ) ; - - if( heads && heads[0] ) - head = heads[0] ; - else - { - head = doc.createElement( 'head' ) ; - doc.documentElement.insertBefore( head, doc.documentElement.firstChild ) ; - } - - return head ; - } ; - - /* - * ### Public interface. - */ - return { - FCKeditorAPI_Evaluate : function( parentWindow, script ) - { - // TODO : This one doesn't work always. The parent window will - // point to an anonymous function in this window. If this - // window is destroyied the parent window will be pointing to - // an invalid reference. - - // Evaluate the script in this window. - eval( script ) ; - - // Point the FCKeditorAPI property of the parent window to the - // local reference. - parentWindow.FCKeditorAPI = window.FCKeditorAPI ; - }, - - EditingArea_Start : function( doc, html ) - { - // Get the HTML for the . - var headInnerHtml = html.match( /([\s\S]*)<\/head>/i )[1] ; - - if ( headInnerHtml && headInnerHtml.length > 0 ) - { - // Inject the HTML inside a
        . - // Do that before getDocumentHead because WebKit moves - // elements to the at this point. - var div = doc.createElement( 'div' ) ; - div.innerHTML = headInnerHtml ; - - // Move the
        nodes to . - FCKDomTools.MoveChildren( div, getDocumentHead( doc ) ) ; - } - - doc.body.innerHTML = html.match( /([\s\S]*)<\/body>/i )[1] ; - - //prevent clicking on hyperlinks and navigating away - doc.addEventListener('click', function( ev ) - { - ev.preventDefault() ; - ev.stopPropagation() ; - }, true ) ; - }, - - Panel_Contructor : function( doc, baseLocation ) - { - var head = getDocumentHead( doc ) ; - - // Set the href. - head.appendChild( doc.createElement('base') ).href = baseLocation ; - - doc.body.style.margin = '0px' ; - doc.body.style.padding = '0px' ; - }, - - ToolbarSet_GetOutElement : function( win, outMatch ) - { - var toolbarTarget = win.parent ; - - var targetWindowParts = outMatch[1].split( '.' ) ; - while ( targetWindowParts.length > 0 ) - { - var part = targetWindowParts.shift() ; - if ( part.length > 0 ) - toolbarTarget = toolbarTarget[ part ] ; - } - - toolbarTarget = toolbarTarget.document.getElementById( outMatch[2] ) ; - }, - - ToolbarSet_InitOutFrame : function( doc ) - { - var head = getDocumentHead( doc ) ; - - head.appendChild( doc.createElement('base') ).href = window.document.location ; - - var targetWindow = doc.defaultView; - - targetWindow.adjust = function() - { - targetWindow.frameElement.height = doc.body.scrollHeight; - } ; - - targetWindow.onresize = targetWindow.adjust ; - targetWindow.setTimeout( targetWindow.adjust, 0 ) ; - - doc.body.style.overflow = 'hidden'; - doc.body.innerHTML = document.getElementById( 'xToolbarSpace' ).innerHTML ; - } - } ; - })(); - - /* - * ### Overrides - */ - ( function() - { - // Save references for override reuse. - var _Original_FCKPanel_Window_OnFocus = FCKPanel_Window_OnFocus ; - var _Original_FCKPanel_Window_OnBlur = FCKPanel_Window_OnBlur ; - var _Original_FCK_StartEditor = FCK.StartEditor ; - - FCKPanel_Window_OnFocus = function( e, panel ) - { - // Call the original implementation. - _Original_FCKPanel_Window_OnFocus.call( this, e, panel ) ; - - if ( panel._focusTimer ) - clearTimeout( panel._focusTimer ) ; - } - - FCKPanel_Window_OnBlur = function( e, panel ) - { - // Delay the execution of the original function. - panel._focusTimer = FCKTools.SetTimeout( _Original_FCKPanel_Window_OnBlur, 100, this, [ e, panel ] ) ; - } - - FCK.StartEditor = function() - { - // Force pointing to the CSS files instead of using the inline CSS cached styles. - window.FCK_InternalCSS = FCKConfig.BasePath + 'css/fck_internal.css' ; - window.FCK_ShowTableBordersCSS = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ; - - _Original_FCK_StartEditor.apply( this, arguments ) ; - } - })(); -} diff --git a/fckeditor/editor/js/fckeditorcode_gecko.js b/fckeditor/editor/js/fckeditorcode_gecko.js deleted file mode 100644 index c692165a..00000000 --- a/fckeditor/editor/js/fckeditorcode_gecko.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * This file has been compressed for better performance. The original source - * can be found at "editor/_source". - */ - -var FCK_STATUS_NOTLOADED=window.parent.FCK_STATUS_NOTLOADED=0;var FCK_STATUS_ACTIVE=window.parent.FCK_STATUS_ACTIVE=1;var FCK_STATUS_COMPLETE=window.parent.FCK_STATUS_COMPLETE=2;var FCK_TRISTATE_OFF=window.parent.FCK_TRISTATE_OFF=0;var FCK_TRISTATE_ON=window.parent.FCK_TRISTATE_ON=1;var FCK_TRISTATE_DISABLED=window.parent.FCK_TRISTATE_DISABLED=-1;var FCK_UNKNOWN=window.parent.FCK_UNKNOWN=-9;var FCK_TOOLBARITEM_ONLYICON=window.parent.FCK_TOOLBARITEM_ONLYICON=0;var FCK_TOOLBARITEM_ONLYTEXT=window.parent.FCK_TOOLBARITEM_ONLYTEXT=1;var FCK_TOOLBARITEM_ICONTEXT=window.parent.FCK_TOOLBARITEM_ICONTEXT=2;var FCK_EDITMODE_WYSIWYG=window.parent.FCK_EDITMODE_WYSIWYG=0;var FCK_EDITMODE_SOURCE=window.parent.FCK_EDITMODE_SOURCE=1;var FCK_IMAGES_PATH='images/';var FCK_SPACER_PATH='images/spacer.gif';var CTRL=1000;var SHIFT=2000;var ALT=4000;var FCK_STYLE_BLOCK=0;var FCK_STYLE_INLINE=1;var FCK_STYLE_OBJECT=2; -String.prototype.Contains=function(A){return (this.indexOf(A)>-1);};String.prototype.Equals=function(){var A=arguments;if (A.length==1&&A[0].pop) A=A[0];for (var i=0;iC) return false;if (B){var E=new RegExp(A+'$','i');return E.test(this);}else return (D==0||this.substr(C-D,D)==A);};String.prototype.Remove=function(A,B){var s='';if (A>0) s=this.substring(0,A);if (A+B=7),IsIE6:/*@cc_on!@*/false&&(parseInt(s.match(/msie (\d+)/)[1],10)>=6),IsSafari:s.Contains(' applewebkit/'),IsOpera:!!window.opera,IsAIR:s.Contains(' adobeair/'),IsMac:s.Contains('macintosh')};(function(A){A.IsGecko=(navigator.product=='Gecko')&&!A.IsSafari&&!A.IsOpera;A.IsGeckoLike=(A.IsGecko||A.IsSafari||A.IsOpera);if (A.IsGecko){var B=s.match(/rv:(\d+\.\d+)/);var C=B&&parseFloat(B[1]);if (C){A.IsGecko10=(C<1.8);A.IsGecko19=(C>1.8);}}})(FCKBrowserInfo); -var FCKURLParams={};(function(){var A=document.location.search.substr(1).split('&');for (var i=0;i';if (!FCKRegexLib.HtmlOpener.test(A)) A=''+A+'';if (!FCKRegexLib.HeadOpener.test(A)) A=A.replace(FCKRegexLib.HtmlOpener,'$&');return A;}else{var B=FCKConfig.DocType+'0&&!FCKRegexLib.Html4DocType.test(FCKConfig.DocType)) B+=' style="overflow-y: scroll"';B+='>'+A+'';return B;}},ConvertToDataFormat:function(A,B,C,D){var E=FCKXHtml.GetXHTML(A,!B,D);if (C&&FCKRegexLib.EmptyOutParagraph.test(E)) return '';return E;},FixHtml:function(A){return A;}}; -var FCK={Name:FCKURLParams['InstanceName'],Status:0,EditMode:0,Toolbar:null,HasFocus:false,DataProcessor:new FCKDataProcessor(),GetInstanceObject:(function(){var w=window;return function(name){return w[name];}})(),AttachToOnSelectionChange:function(A){this.Events.AttachEvent('OnSelectionChange',A);},GetLinkedFieldValue:function(){return this.LinkedField.value;},GetParentForm:function(){return this.LinkedField.form;},StartupValue:'',IsDirty:function(){if (this.EditMode==1) return (this.StartupValue!=this.EditingArea.Textarea.value);else{if (!this.EditorDocument) return false;return (this.StartupValue!=this.EditorDocument.body.innerHTML);}},ResetIsDirty:function(){if (this.EditMode==1) this.StartupValue=this.EditingArea.Textarea.value;else if (this.EditorDocument.body) this.StartupValue=this.EditorDocument.body.innerHTML;},StartEditor:function(){this.TempBaseTag=FCKConfig.BaseHref.length>0?'':'';var A=FCK.KeystrokeHandler=new FCKKeystrokeHandler();A.OnKeystroke=_FCK_KeystrokeHandler_OnKeystroke;A.SetKeystrokes(FCKConfig.Keystrokes);if (FCKBrowserInfo.IsIE7){if ((CTRL+86) in A.Keystrokes) A.SetKeystrokes([CTRL+86,true]);if ((SHIFT+45) in A.Keystrokes) A.SetKeystrokes([SHIFT+45,true]);};A.SetKeystrokes([CTRL+8,true]);this.EditingArea=new FCKEditingArea(document.getElementById('xEditingArea'));this.EditingArea.FFSpellChecker=FCKConfig.FirefoxSpellChecker;this.SetData(this.GetLinkedFieldValue(),true);FCKTools.AddEventListener(document,"keydown",this._TabKeyHandler);this.AttachToOnSelectionChange(_FCK_PaddingNodeListener);if (FCKBrowserInfo.IsGecko) this.AttachToOnSelectionChange(this._ExecCheckEmptyBlock);},Focus:function(){FCK.EditingArea.Focus();},SetStatus:function(A){this.Status=A;if (A==1){FCKFocusManager.AddWindow(window,true);if (FCKBrowserInfo.IsIE) FCKFocusManager.AddWindow(window.frameElement,true);if (FCKConfig.StartupFocus) FCK.Focus();};this.Events.FireEvent('OnStatusChange',A);},FixBody:function(){var A=FCKConfig.EnterMode;if (A!='p'&&A!='div') return;var B=this.EditorDocument;if (!B) return;var C=B.body;if (!C) return;FCKDomTools.TrimNode(C);var D=C.firstChild;var E;while (D){var F=false;switch (D.nodeType){case 1:var G=D.nodeName.toLowerCase();if (!FCKListsLib.BlockElements[G]&&G!='li'&&!D.getAttribute('_fckfakelement')&&D.getAttribute('_moz_dirty')==null) F=true;break;case 3:if (E||D.nodeValue.Trim().length>0) F=true;break;case 8:if (E) F=true;break;};if (F){var H=D.parentNode;if (!E) E=H.insertBefore(B.createElement(A),D);E.appendChild(H.removeChild(D));D=E.nextSibling;}else{if (E){FCKDomTools.TrimNode(E);E=null;};D=D.nextSibling;}};if (E) FCKDomTools.TrimNode(E);},GetData:function(A){if (FCK.EditMode==1) return FCK.EditingArea.Textarea.value;this.FixBody();var B=FCK.EditorDocument;if (!B) return null;var C=FCKConfig.FullPage;var D=FCK.DataProcessor.ConvertToDataFormat(C?B.documentElement:B.body,!C,FCKConfig.IgnoreEmptyParagraphValue,A);D=FCK.ProtectEventsRestore(D);if (FCKBrowserInfo.IsIE) D=D.replace(FCKRegexLib.ToReplace,'$1');if (C){if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) D=FCK.DocTypeDeclaration+'\n'+D;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) D=FCK.XmlDeclaration+'\n'+D;};return FCKConfig.ProtectedSource.Revert(D);},UpdateLinkedField:function(){var A=FCK.GetXHTML(FCKConfig.FormatOutput);if (FCKConfig.HtmlEncodeOutput) A=FCKTools.HTMLEncode(A);FCK.LinkedField.value=A;FCK.Events.FireEvent('OnAfterLinkedFieldUpdate');},RegisteredDoubleClickHandlers:{},OnDoubleClick:function(A){var B=FCK.RegisteredDoubleClickHandlers[A.tagName.toUpperCase()];if (B){for (var i=0;i0?'|ABBR|XML|EMBED|OBJECT':'ABBR|XML|EMBED|OBJECT';var C;if (B.length>0){C=new RegExp('<('+B+')(?!\w|:)','gi');A=A.replace(C,'','gi');A=A.replace(C,'<\/FCK:$1>');};B='META';if (FCKBrowserInfo.IsIE) B+='|HR';C=new RegExp('<(('+B+')(?=\\s|>|/)[\\s\\S]*?)/?>','gi');A=A.replace(C,'');return A;},SetData:function(A,B){this.EditingArea.Mode=FCK.EditMode;if (FCKBrowserInfo.IsIE&&FCK.EditorDocument){FCK.EditorDocument.detachEvent("onselectionchange",Doc_OnSelectionChange);};FCKTempBin.Reset();if (FCK.EditMode==0){this._ForceResetIsDirty=(B===true);A=FCKConfig.ProtectedSource.Protect(A);A=FCK.DataProcessor.ConvertToHtml(A);A=A.replace(FCKRegexLib.InvalidSelfCloseTags,'$1>');A=FCK.ProtectEvents(A);A=FCK.ProtectUrls(A);A=FCK.ProtectTags(A);if (FCK.TempBaseTag.length>0&&!FCKRegexLib.HasBaseTag.test(A)) A=A.replace(FCKRegexLib.HeadOpener,'$&'+FCK.TempBaseTag);var C='';if (!FCKConfig.FullPage) C+=_FCK_GetEditorAreaStyleTags();if (FCKBrowserInfo.IsIE) C+=FCK._GetBehaviorsStyle();else if (FCKConfig.ShowBorders) C+=FCKTools.GetStyleHtml(FCK_ShowTableBordersCSS,true);C+=FCKTools.GetStyleHtml(FCK_InternalCSS,true);A=A.replace(FCKRegexLib.HeadCloser,C+'$&');this.EditingArea.OnLoad=_FCK_EditingArea_OnLoad;this.EditingArea.Start(A);}else{FCK.EditorWindow=null;FCK.EditorDocument=null;FCKDomTools.PaddingNode=null;this.EditingArea.OnLoad=null;this.EditingArea.Start(A);this.EditingArea.Textarea._FCKShowContextMenu=true;FCK.EnterKeyHandler=null;if (B) this.ResetIsDirty();FCK.KeystrokeHandler.AttachToElement(this.EditingArea.Textarea);this.EditingArea.Textarea.focus();FCK.Events.FireEvent('OnAfterSetHTML');};if (FCKBrowserInfo.IsGecko) window.onresize();},RedirectNamedCommands:{},ExecuteNamedCommand:function(A,B,C,D){if (!D) FCKUndo.SaveUndoStep();if (!C&&FCK.RedirectNamedCommands[A]!=null) FCK.ExecuteRedirectedNamedCommand(A,B);else{FCK.Focus();FCK.EditorDocument.execCommand(A,false,B);FCK.Events.FireEvent('OnSelectionChange');};if (!D) FCKUndo.SaveUndoStep();},GetNamedCommandState:function(A){try{if (FCKBrowserInfo.IsSafari&&FCK.EditorWindow&&A.IEquals('Paste')) return 0;if (!FCK.EditorDocument.queryCommandEnabled(A)) return -1;else{return FCK.EditorDocument.queryCommandState(A)?1:0;}}catch (e){return 0;}},GetNamedCommandValue:function(A){var B='';var C=FCK.GetNamedCommandState(A);if (C==-1) return null;try{B=this.EditorDocument.queryCommandValue(A);}catch(e) {};return B?B:'';},Paste:function(A){if (FCK.Status!=2||!FCK.Events.FireEvent('OnPaste')) return false;return A||FCK._ExecPaste();},PasteFromWord:function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteFromWord,'dialog/fck_paste.html',400,330,'Word');},Preview:function(){var A;if (FCKConfig.FullPage){if (FCK.TempBaseTag.length>0) A=FCK.TempBaseTag+FCK.GetXHTML();else A=FCK.GetXHTML();}else{A=FCKConfig.DocType+''+FCK.TempBaseTag+''+FCKLang.Preview+''+_FCK_GetEditorAreaStyleTags()+''+FCK.GetXHTML()+'';};var B=FCKConfig.ScreenWidth*0.8;var C=FCKConfig.ScreenHeight*0.7;var D=(FCKConfig.ScreenWidth-B)/2;var E='';if (FCK_IS_CUSTOM_DOMAIN&&FCKBrowserInfo.IsIE){window._FCKHtmlToLoad=A;E='javascript:void( (function(){document.open() ;document.domain="'+document.domain+'" ;document.write( window.opener._FCKHtmlToLoad );document.close() ;window.opener._FCKHtmlToLoad = null ;})() )';};var F=window.open(E,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+B+',height='+C+',left='+D);if (!FCK_IS_CUSTOM_DOMAIN||!FCKBrowserInfo.IsIE){F.document.write(A);F.document.close();}},SwitchEditMode:function(A){var B=(FCK.EditMode==0);var C=FCK.IsDirty();var D;if (B){FCKCommands.GetCommand('ShowBlocks').SaveState();if (!A&&FCKBrowserInfo.IsIE) FCKUndo.SaveUndoStep();D=FCK.GetXHTML(FCKConfig.FormatSource);if (FCKBrowserInfo.IsIE) FCKTempBin.ToHtml();if (D==null) return false;}else D=this.EditingArea.Textarea.value;FCK.EditMode=B?1:0;FCK.SetData(D,!C);FCK.Focus();FCKTools.RunFunction(FCK.ToolbarSet.RefreshModeState,FCK.ToolbarSet);return true;},InsertElement:function(A){if (typeof A=='string') A=this.EditorDocument.createElement(A);var B=A.nodeName.toLowerCase();FCKSelection.Restore();var C=new FCKDomRange(this.EditorWindow);C.MoveToSelection();C.DeleteContents();if (FCKListsLib.BlockElements[B]!=null){if (C.StartBlock){if (C.CheckStartOfBlock()) C.MoveToPosition(C.StartBlock,3);else if (C.CheckEndOfBlock()) C.MoveToPosition(C.StartBlock,4);else C.SplitBlock();};C.InsertNode(A);var D=FCKDomTools.GetNextSourceElement(A,false,null,['hr','br','param','img','area','input'],true);if (!D&&FCKConfig.EnterMode!='br'){D=this.EditorDocument.body.appendChild(this.EditorDocument.createElement(FCKConfig.EnterMode));if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(D);};if (FCKListsLib.EmptyElements[B]==null) C.MoveToElementEditStart(A);else if (D) C.MoveToElementEditStart(D);else C.MoveToPosition(A,4);if (FCKBrowserInfo.IsGeckoLike){if (D) FCKDomTools.ScrollIntoView(D,false);FCKDomTools.ScrollIntoView(A,false);}}else{C.InsertNode(A);C.SetStart(A,4);C.SetEnd(A,4);};C.Select();C.Release();this.Focus();return A;},_InsertBlockElement:function(A){},_IsFunctionKey:function(A){if (A>=16&&A<=20) return true;if (A==27||(A>=33&&A<=40)) return true;if (A==45) return true;return false;},_KeyDownListener:function(A){if (!A) A=FCK.EditorWindow.event;if (FCK.EditorWindow){if (!FCK._IsFunctionKey(A.keyCode)&&!(A.ctrlKey||A.metaKey)&&!(A.keyCode==46)) FCK._KeyDownUndo();};return true;},_KeyDownUndo:function(){if (!FCKUndo.Typing){FCKUndo.SaveUndoStep();FCKUndo.Typing=true;FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.TypesCount++;FCKUndo.Changed=1;if (FCKUndo.TypesCount>FCKUndo.MaxTypes){FCKUndo.TypesCount=0;FCKUndo.SaveUndoStep();}},_TabKeyHandler:function(A){if (!A) A=window.event;var B=A.keyCode;if (B==9&&FCK.EditMode!=0){if (FCKBrowserInfo.IsIE){var C=document.selection.createRange();if (C.parentElement()!=FCK.EditingArea.Textarea) return true;C.text='\t';C.select();}else{var a=[];var D=FCK.EditingArea.Textarea;var E=D.selectionStart;var F=D.selectionEnd;a.push(D.value.substr(0,E));a.push('\t');a.push(D.value.substr(F));D.value=a.join('');D.setSelectionRange(E+1,E+1);};if (A.preventDefault) return A.preventDefault();return A.returnValue=false;};return true;}};FCK.Events=new FCKEvents(FCK);FCK.GetHTML=FCK.GetXHTML=FCK.GetData;FCK.SetHTML=FCK.SetData;FCK.InsertElementAndGetIt=FCK.CreateElement=FCK.InsertElement;function _FCK_ProtectEvents_ReplaceTags(A){return A.replace(FCKRegexLib.EventAttributes,_FCK_ProtectEvents_ReplaceEvents);};function _FCK_ProtectEvents_ReplaceEvents(A,B){return ' '+B+'_fckprotectedatt="'+encodeURIComponent(A)+'"';};function _FCK_ProtectEvents_RestoreEvents(A,B){return decodeURIComponent(B);};function _FCK_MouseEventsListener(A){if (!A) A=window.event;if (A.type=='mousedown') FCK.MouseDownFlag=true;else if (A.type=='mouseup') FCK.MouseDownFlag=false;else if (A.type=='mousemove') FCK.Events.FireEvent('OnMouseMove',A);};function _FCK_PaddingNodeListener(){if (FCKConfig.EnterMode.IEquals('br')) return;FCKDomTools.EnforcePaddingNode(FCK.EditorDocument,FCKConfig.EnterMode);if (!FCKBrowserInfo.IsIE&&FCKDomTools.PaddingNode){var A=FCKSelection.GetSelection();if (A&&A.rangeCount==1){var B=A.getRangeAt(0);if (B.collapsed&&B.startContainer==FCK.EditorDocument.body&&B.startOffset==0){B.selectNodeContents(FCKDomTools.PaddingNode);B.collapse(true);A.removeAllRanges();A.addRange(B);}}}else if (FCKDomTools.PaddingNode){var C=FCKSelection.GetParentElement();var D=FCKDomTools.PaddingNode;if (C&&C.nodeName.IEquals('body')){if (FCK.EditorDocument.body.childNodes.length==1&&FCK.EditorDocument.body.firstChild==D){if (FCKSelection._GetSelectionDocument(FCK.EditorDocument.selection)!=FCK.EditorDocument) return;var B=FCK.EditorDocument.body.createTextRange();var F=false;if (!D.childNodes.firstChild){D.appendChild(FCKTools.GetElementDocument(D).createTextNode('\ufeff'));F=true;};B.moveToElementText(D);B.select();if (F) B.pasteHTML('');}}}};function _FCK_EditingArea_OnLoad(){FCK.EditorWindow=FCK.EditingArea.Window;FCK.EditorDocument=FCK.EditingArea.Document;if (FCKBrowserInfo.IsIE) FCKTempBin.ToElements();FCK.InitializeBehaviors();FCK.MouseDownFlag=false;FCKTools.AddEventListener(FCK.EditorDocument,'mousemove',_FCK_MouseEventsListener);FCKTools.AddEventListener(FCK.EditorDocument,'mousedown',_FCK_MouseEventsListener);FCKTools.AddEventListener(FCK.EditorDocument,'mouseup',_FCK_MouseEventsListener);if (FCKBrowserInfo.IsSafari){var A=function(evt){if (!(evt.ctrlKey||evt.metaKey)) return;if (FCK.EditMode!=0) return;switch (evt.keyCode){case 89:FCKUndo.Redo();break;case 90:FCKUndo.Undo();break;}};FCKTools.AddEventListener(FCK.EditorDocument,'keyup',A);};FCK.EnterKeyHandler=new FCKEnterKey(FCK.EditorWindow,FCKConfig.EnterMode,FCKConfig.ShiftEnterMode,FCKConfig.TabSpaces);FCK.KeystrokeHandler.AttachToElement(FCK.EditorDocument);if (FCK._ForceResetIsDirty) FCK.ResetIsDirty();if (FCKBrowserInfo.IsIE&&FCK.HasFocus) FCK.EditorDocument.body.setActive();FCK.OnAfterSetHTML();FCKCommands.GetCommand('ShowBlocks').RestoreState();if (FCK.Status!=0) return;FCK.SetStatus(1);};function _FCK_GetEditorAreaStyleTags(){return FCKTools.GetStyleHtml(FCKConfig.EditorAreaCSS)+FCKTools.GetStyleHtml(FCKConfig.EditorAreaStyles);};function _FCK_KeystrokeHandler_OnKeystroke(A,B){if (FCK.Status!=2) return false;if (FCK.EditMode==0){switch (B){case 'Paste':return!FCK.Paste();case 'Cut':FCKUndo.SaveUndoStep();return false;}}else{if (B.Equals('Paste','Undo','Redo','SelectAll','Cut')) return false;};var C=FCK.Commands.GetCommand(B);if (C.GetState()==-1) return false;return (C.Execute.apply(C,FCKTools.ArgumentsToArray(arguments,2))!==false);};(function(){var A=window.parent.document;var B=A.getElementById(FCK.Name);var i=0;while (B||i==0){if (B&&B.tagName.toLowerCase().Equals('input','textarea')){FCK.LinkedField=B;break;};B=A.getElementsByName(FCK.Name)[i++];}})();var FCKTempBin={Elements:[],AddElement:function(A){var B=this.Elements.length;this.Elements[B]=A;return B;},RemoveElement:function(A){var e=this.Elements[A];this.Elements[A]=null;return e;},Reset:function(){var i=0;while (i '+this.Elements[i].outerHTML+'
        ';this.Elements[i].isHtml=true;}},ToElements:function(){var A=FCK.EditorDocument.createElement('div');for (var i=0;i40) return;};var C=function(H){if (H.nodeType!=1) return false;var D=H.tagName.toLowerCase();return (FCKListsLib.BlockElements[D]||FCKListsLib.EmptyElements[D]);};var E=function(){var F=FCKSelection.GetSelection();var G=F.getRangeAt(0);if (!G||!G.collapsed) return;var H=G.endContainer;if (H.nodeType!=3) return;if (H.nodeValue.length!=G.endOffset) return;var I=H.parentNode.tagName.toLowerCase();if (!(I=='a'||(!FCKBrowserInfo.IsOpera&&String(H.parentNode.contentEditable)=='false')||(!(FCKListsLib.BlockElements[I]||FCKListsLib.NonEmptyBlockElements[I])&&B==35))) return;var J=FCKTools.GetNextTextNode(H,H.parentNode,C);if (J) return;G=FCK.EditorDocument.createRange();J=FCKTools.GetNextTextNode(H,H.parentNode.parentNode,C);if (J){if (FCKBrowserInfo.IsOpera&&B==37) return;G.setStart(J,0);G.setEnd(J,0);}else{while (H.parentNode&&H.parentNode!=FCK.EditorDocument.body&&H.parentNode!=FCK.EditorDocument.documentElement&&H==H.parentNode.lastChild&&(!FCKListsLib.BlockElements[H.parentNode.tagName.toLowerCase()]&&!FCKListsLib.NonEmptyBlockElements[H.parentNode.tagName.toLowerCase()])) H=H.parentNode;if (FCKListsLib.BlockElements[I]||FCKListsLib.EmptyElements[I]||H==FCK.EditorDocument.body){G.setStart(H,H.childNodes.length);G.setEnd(H,H.childNodes.length);}else{var K=H.nextSibling;while (K){if (K.nodeType!=1){K=K.nextSibling;continue;};var L=K.tagName.toLowerCase();if (FCKListsLib.BlockElements[L]||FCKListsLib.EmptyElements[L]||FCKListsLib.NonEmptyBlockElements[L]) break;K=K.nextSibling;};var M=FCK.EditorDocument.createTextNode('');if (K) H.parentNode.insertBefore(M,K);else H.parentNode.appendChild(M);G.setStart(M,0);G.setEnd(M,0);}};F.removeAllRanges();F.addRange(G);FCK.Events.FireEvent("OnSelectionChange");};setTimeout(E,1);};this.ExecOnSelectionChangeTimer=function(){if (FCK.LastOnChangeTimer) window.clearTimeout(FCK.LastOnChangeTimer);FCK.LastOnChangeTimer=window.setTimeout(FCK.ExecOnSelectionChange,100);};this.EditorDocument.addEventListener('mouseup',this.ExecOnSelectionChange,false);this.EditorDocument.addEventListener('keyup',this.ExecOnSelectionChangeTimer,false);this._DblClickListener=function(e){FCK.OnDoubleClick(e.target);e.stopPropagation();};this.EditorDocument.addEventListener('dblclick',this._DblClickListener,true);this.EditorDocument.addEventListener('keydown',this._KeyDownListener,false);if (FCKBrowserInfo.IsGecko){this.EditorWindow.addEventListener('dragdrop',this._ExecDrop,true);}else if (FCKBrowserInfo.IsSafari){var N=function(evt){ if (!FCK.MouseDownFlag) evt.returnValue=false;};this.EditorDocument.addEventListener('dragenter',N,true);this.EditorDocument.addEventListener('dragover',N,true);this.EditorDocument.addEventListener('drop',this._ExecDrop,true);this.EditorDocument.addEventListener('mousedown',function(ev){var O=ev.srcElement;if (O.nodeName.IEquals('IMG','HR','INPUT','TEXTAREA','SELECT')){FCKSelection.SelectNode(O);}},true);this.EditorDocument.addEventListener('mouseup',function(ev){if (ev.srcElement.nodeName.IEquals('INPUT','TEXTAREA','SELECT')) ev.preventDefault()},true);this.EditorDocument.addEventListener('click',function(ev){if (ev.srcElement.nodeName.IEquals('INPUT','TEXTAREA','SELECT')) ev.preventDefault()},true);};if (FCKBrowserInfo.IsGecko||FCKBrowserInfo.IsOpera){this.EditorDocument.addEventListener('keypress',this._ExecCheckCaret,false);this.EditorDocument.addEventListener('click',this._ExecCheckCaret,false);};FCK.ContextMenu._InnerContextMenu.SetMouseClickWindow(FCK.EditorWindow);FCK.ContextMenu._InnerContextMenu.AttachToElement(FCK.EditorDocument);};FCK.MakeEditable=function(){this.EditingArea.MakeEditable();};function Document_OnContextMenu(e){if (!e.target._FCKShowContextMenu) e.preventDefault();};document.oncontextmenu=Document_OnContextMenu;FCK._BaseGetNamedCommandState=FCK.GetNamedCommandState;FCK.GetNamedCommandState=function(A){switch (A){case 'Unlink':return FCKSelection.HasAncestorNode('A')?0:-1;default:return FCK._BaseGetNamedCommandState(A);}};FCK.RedirectNamedCommands={Print:true,Paste:true};FCK.ExecuteRedirectedNamedCommand=function(A,B){switch (A){case 'Print':FCK.EditorWindow.print();break;case 'Paste':try{if (FCKBrowserInfo.IsSafari) throw '';if (FCK.Paste()) FCK.ExecuteNamedCommand('Paste',null,true);}catch (e) { FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.Paste,'dialog/fck_paste.html',400,330,'Security');};break;default:FCK.ExecuteNamedCommand(A,B);}};FCK._ExecPaste=function(){FCKUndo.SaveUndoStep();if (FCKConfig.ForcePasteAsPlainText){FCK.PasteAsPlainText();return false;};return true;};FCK.InsertHtml=function(A){var B=FCK.EditorDocument,range;A=FCKConfig.ProtectedSource.Protect(A);A=FCK.ProtectEvents(A);A=FCK.ProtectUrls(A);A=FCK.ProtectTags(A);FCKUndo.SaveUndoStep();if (FCKBrowserInfo.IsGecko){A=A.replace(/ $/,'$&');var C=new FCKDocumentFragment(this.EditorDocument);C.AppendHtml(A);var D=C.RootNode.lastChild;range=new FCKDomRange(this.EditorWindow);range.MoveToSelection();range.DeleteContents();range.InsertNode(C.RootNode);range.MoveToPosition(D,4);}else B.execCommand('inserthtml',false,A);this.Focus();if (!range){range=new FCKDomRange(this.EditorWindow);range.MoveToSelection();};var E=range.CreateBookmark();FCKDocumentProcessor.Process(B);try{range.MoveToBookmark(E);range.Select();}catch (e) {};this.Events.FireEvent("OnSelectionChange");};FCK.PasteAsPlainText=function(){FCKTools.RunFunction(FCKDialog.OpenDialog,FCKDialog,['FCKDialog_Paste',FCKLang.PasteAsText,'dialog/fck_paste.html',400,330,'PlainText']);};FCK.GetClipboardHTML=function(){return '';};FCK.CreateLink=function(A,B){var C=[];if (FCKSelection.GetSelection().isCollapsed) return C;FCK.ExecuteNamedCommand('Unlink',null,false,!!B);if (A.length>0){var D='javascript:void(0);/*'+(new Date().getTime())+'*/';FCK.ExecuteNamedCommand('CreateLink',D,false,!!B);var E=this.EditorDocument.evaluate("//a[@href='"+D+"']",this.EditorDocument.body,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for (var i=0;i0&&!isNaN(E)) this.PageConfig[D]=parseInt(E,10);else this.PageConfig[D]=E;}};function FCKConfig_LoadPageConfig(){var A=FCKConfig.PageConfig;for (var B in A) FCKConfig[B]=A[B];};function FCKConfig_PreProcess(){var A=FCKConfig;if (A.AllowQueryStringDebug){try{if ((/fckdebug=true/i).test(window.top.location.search)) A.Debug=true;}catch (e) { }};if (!A.PluginsPath.EndsWith('/')) A.PluginsPath+='/';var B=A.ToolbarComboPreviewCSS;if (!B||B.length==0) A.ToolbarComboPreviewCSS=A.EditorAreaCSS;A.RemoveAttributesArray=(A.RemoveAttributes||'').split(',');if (!FCKConfig.SkinEditorCSS||FCKConfig.SkinEditorCSS.length==0) FCKConfig.SkinEditorCSS=FCKConfig.SkinPath+'fck_editor.css';if (!FCKConfig.SkinDialogCSS||FCKConfig.SkinDialogCSS.length==0) FCKConfig.SkinDialogCSS=FCKConfig.SkinPath+'fck_dialog.css';};FCKConfig.ToolbarSets={};FCKConfig.Plugins={};FCKConfig.Plugins.Items=[];FCKConfig.Plugins.Add=function(A,B,C){FCKConfig.Plugins.Items.AddItem([A,B,C]);};FCKConfig.ProtectedSource={};FCKConfig.ProtectedSource._CodeTag=(new Date()).valueOf();FCKConfig.ProtectedSource.RegexEntries=[//g,//gi,//gi];FCKConfig.ProtectedSource.Add=function(A){this.RegexEntries.AddItem(A);};FCKConfig.ProtectedSource.Protect=function(A){var B=this._CodeTag;function _Replace(protectedSource){var C=FCKTempBin.AddElement(protectedSource);return '';};for (var i=0;i|>)","g");return A.replace(D,_Replace);};FCKConfig.GetBodyAttributes=function(){var A='';if (this.BodyId&&this.BodyId.length>0) A+=' id="'+this.BodyId+'"';if (this.BodyClass&&this.BodyClass.length>0) A+=' class="'+this.BodyClass+'"';return A;};FCKConfig.ApplyBodyAttributes=function(A){if (this.BodyId&&this.BodyId.length>0) A.id=FCKConfig.BodyId;if (this.BodyClass&&this.BodyClass.length>0) A.className+=' '+FCKConfig.BodyClass;}; -var FCKDebug={Output:function(){},OutputObject:function(){}}; -var FCKDomTools={MoveChildren:function(A,B,C){if (A==B) return;var D;if (C){while ((D=A.lastChild)) B.insertBefore(A.removeChild(D),B.firstChild);}else{while ((D=A.firstChild)) B.appendChild(A.removeChild(D));}},MoveNode:function(A,B,C){if (C) B.insertBefore(FCKDomTools.RemoveNode(A),B.firstChild);else B.appendChild(FCKDomTools.RemoveNode(A));},TrimNode:function(A){this.LTrimNode(A);this.RTrimNode(A);},LTrimNode:function(A){var B;while ((B=A.firstChild)){if (B.nodeType==3){var C=B.nodeValue.LTrim();var D=B.nodeValue.length;if (C.length==0){A.removeChild(B);continue;}else if (C.length0) break;if (A.lastChild) A=A.lastChild;else return this.GetPreviousSourceElement(A,B,C,D);};return null;},GetNextSourceElement:function(A,B,C,D,E){while((A=this.GetNextSourceNode(A,E))){if (A.nodeType==1){if (C&&A.nodeName.IEquals(C)) break;if (D&&A.nodeName.IEquals(D)) return this.GetNextSourceElement(A,B,C,D);return A;}else if (B&&A.nodeType==3&&A.nodeValue.RTrim().length>0) break;};return null;},GetNextSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.firstChild) E=A.firstChild;else{if (D&&A==D) return null;E=A.nextSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetNextSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetNextSourceNode(E,false,C,D);return E;},GetPreviousSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.lastChild) E=A.lastChild;else{if (D&&A==D) return null;E=A.previousSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetPreviousSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetPreviousSourceNode(E,false,C,D);return E;},InsertAfterNode:function(A,B){return A.parentNode.insertBefore(B,A.nextSibling);},GetParents:function(A){var B=[];while (A){B.unshift(A);A=A.parentNode;};return B;},GetCommonParents:function(A,B){var C=this.GetParents(A);var D=this.GetParents(B);var E=[];for (var i=0;i0) D[C.pop().toLowerCase()]=1;var E=this.GetCommonParents(A,B);var F=null;while ((F=E.pop())){if (D[F.nodeName.toLowerCase()]) return F;};return null;},GetIndexOf:function(A){var B=A.parentNode?A.parentNode.firstChild:null;var C=-1;while (B){C++;if (B==A) return C;B=B.nextSibling;};return-1;},PaddingNode:null,EnforcePaddingNode:function(A,B){try{if (!A||!A.body) return;}catch (e){return;};this.CheckAndRemovePaddingNode(A,B,true);try{if (A.body.lastChild&&(A.body.lastChild.nodeType!=1||A.body.lastChild.tagName.toLowerCase()==B.toLowerCase())) return;}catch (e){return;};var C=A.createElement(B);if (FCKBrowserInfo.IsGecko&&FCKListsLib.NonEmptyBlockElements[B]) FCKTools.AppendBogusBr(C);this.PaddingNode=C;if (A.body.childNodes.length==1&&A.body.firstChild.nodeType==1&&A.body.firstChild.tagName.toLowerCase()=='br'&&(A.body.firstChild.getAttribute('_moz_dirty')!=null||A.body.firstChild.getAttribute('type')=='_moz')) A.body.replaceChild(C,A.body.firstChild);else A.body.appendChild(C);},CheckAndRemovePaddingNode:function(A,B,C){var D=this.PaddingNode;if (!D) return;try{if (D.parentNode!=A.body||D.tagName.toLowerCase()!=B||(D.childNodes.length>1)||(D.firstChild&&D.firstChild.nodeValue!='\xa0'&&String(D.firstChild.tagName).toLowerCase()!='br')){this.PaddingNode=null;return;}}catch (e){this.PaddingNode=null;return;};if (!C){if (D.parentNode.childNodes.length>1) D.parentNode.removeChild(D);this.PaddingNode=null;}},HasAttribute:function(A,B){if (A.hasAttribute) return A.hasAttribute(B);else{var C=A.attributes[B];return (C!=undefined&&C.specified);}},HasAttributes:function(A){var B=A.attributes;for (var i=0;i0) return true;}else if (B[i].specified) return true;};return false;},RemoveAttribute:function(A,B){if (FCKBrowserInfo.IsIE&&B.toLowerCase()=='class') B='className';return A.removeAttribute(B,0);},RemoveAttributes:function (A,B){for (var i=0;i0) return false;C=C.nextSibling;};return D?this.CheckIsEmptyElement(D,B):true;},SetElementStyles:function(A,B){var C=A.style;for (var D in B) C[D]=B[D];},SetOpacity:function(A,B){if (FCKBrowserInfo.IsIE){B=Math.round(B*100);A.style.filter=(B>100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+B+')');}else A.style.opacity=B;},GetCurrentElementStyle:function(A,B){if (FCKBrowserInfo.IsIE) return A.currentStyle[B];else return A.ownerDocument.defaultView.getComputedStyle(A,'').getPropertyValue(B);},GetPositionedAncestor:function(A){var B=A;while (B!=FCKTools.GetElementDocument(B).documentElement){if (this.GetCurrentElementStyle(B,'position')!='static') return B;if (B==FCKTools.GetElementDocument(B).documentElement&¤tWindow!=w) B=currentWindow.frameElement;else B=B.parentNode;};return null;},ScrollIntoView:function(A,B){var C=FCKTools.GetElementWindow(A);var D=FCKTools.GetViewPaneSize(C).Height;var E=D*-1;if (B===false){E+=A.offsetHeight||0;E+=parseInt(this.GetCurrentElementStyle(A,'marginBottom')||0,10)||0;};var F=FCKTools.GetDocumentPosition(C,A);E+=F.y;var G=FCKTools.GetScrollPosition(C).Y;if (E>0&&(E>G||E'+styleDef+'';};var C=function(cssFileUrl,markTemp){if (cssFileUrl.length==0) return '';var B=markTemp?' _fcktemp="true"':'';return '';};return function(cssFileOrArrayOrDef,markTemp){if (!cssFileOrArrayOrDef) return '';if (typeof(cssFileOrArrayOrDef)=='string'){if (/[\\\/\.][^{}]*$/.test(cssFileOrArrayOrDef)){return this.GetStyleHtml(cssFileOrArrayOrDef.split(','),markTemp);}else return A(this._GetUrlFixedCss(cssFileOrArrayOrDef),markTemp);}else{var E='';for (var i=0;i/g,'>');return A;};FCKTools.HTMLDecode=function(A){if (!A) return '';A=A.replace(/>/g,'>');A=A.replace(/</g,'<');A=A.replace(/&/g,'&');return A;};FCKTools._ProcessLineBreaksForPMode=function(A,B,C,D,E){var F=0;var G="

        ";var H="

        ";var I="
        ";if (C){G="
      5. ";H="
      6. ";F=1;}while (D&&D!=A.FCK.EditorDocument.body){if (D.tagName.toLowerCase()=='p'){F=1;break;};D=D.parentNode;};for (var i=0;i0) return A[A.length-1];return null;};FCKTools.GetDocumentPosition=function(w,A){var x=0;var y=0;var B=A;var C=null;var D=FCKTools.GetElementWindow(B);while (B&&!(D==w&&(B==w.document.body||B==w.document.documentElement))){x+=B.offsetLeft-B.scrollLeft;y+=B.offsetTop-B.scrollTop;if (!FCKBrowserInfo.IsOpera){var E=C;while (E&&E!=B){x-=E.scrollLeft;y-=E.scrollTop;E=E.parentNode;}};C=B;if (B.offsetParent) B=B.offsetParent;else{if (D!=w){B=D.frameElement;C=null;if (B) D=B.contentWindow.parent;}else B=null;}};if (FCKDomTools.GetCurrentElementStyle(w.document.body,'position')!='static'||(FCKBrowserInfo.IsIE&&FCKDomTools.GetPositionedAncestor(A)==null)){x+=w.document.body.offsetLeft;y+=w.document.body.offsetTop;};return { "x":x,"y":y };};FCKTools.GetWindowPosition=function(w,A){var B=this.GetDocumentPosition(w,A);var C=FCKTools.GetScrollPosition(w);B.x-=C.X;B.y-=C.Y;return B;};FCKTools.ProtectFormStyles=function(A){if (!A||A.nodeType!=1||A.tagName.toLowerCase()!='form') return [];var B=[];var C=['style','className'];for (var i=0;i0){for (var i=B.length-1;i>=0;i--){var C=B[i][0];var D=B[i][1];if (D) A.insertBefore(C,D);else A.appendChild(C);}}};FCKTools.GetNextNode=function(A,B){if (A.firstChild) return A.firstChild;else if (A.nextSibling) return A.nextSibling;else{var C=A.parentNode;while (C){if (C==B) return null;if (C.nextSibling) return C.nextSibling;else C=C.parentNode;}};return null;};FCKTools.GetNextTextNode=function(A,B,C){node=this.GetNextNode(A,B);if (C&&node&&C(node)) return null;while (node&&node.nodeType!=3){node=this.GetNextNode(node,B);if (C&&node&&C(node)) return null;};return node;};FCKTools.Merge=function(){var A=arguments;var o=A[0];for (var i=1;i');document.domain = '"+FCK_RUNTIME_DOMAIN+"';document.close();}() ) ;";if (FCKBrowserInfo.IsIE){if (FCKBrowserInfo.IsIE7||!FCKBrowserInfo.IsIE6) return "";else return "javascript: '';";};return "javascript: void(0);";};FCKTools.ResetStyles=function(A){A.style.cssText='margin:0;padding:0;border:0;background-color:transparent;background-image:none;';}; -FCKTools.CancelEvent=function(e){if (e) e.preventDefault();};FCKTools.DisableSelection=function(A){if (FCKBrowserInfo.IsGecko) A.style.MozUserSelect='none';else if (FCKBrowserInfo.IsSafari) A.style.KhtmlUserSelect='none';else A.style.userSelect='none';};FCKTools._AppendStyleSheet=function(A,B){var e=A.createElement('LINK');e.rel='stylesheet';e.type='text/css';e.href=B;A.getElementsByTagName("HEAD")[0].appendChild(e);return e;};FCKTools.AppendStyleString=function(A,B){if (!B) return null;var e=A.createElement("STYLE");e.appendChild(A.createTextNode(B));A.getElementsByTagName("HEAD")[0].appendChild(e);return e;};FCKTools.ClearElementAttributes=function(A){for (var i=0;i0) B[B.length]=D;C(parent.childNodes[i]);}};C(A);return B;};FCKTools.RemoveOuterTags=function(e){var A=e.ownerDocument.createDocumentFragment();for (var i=0;i','text/xml');FCKDomTools.RemoveNode(B.firstChild);return B;};return null;};FCKTools.GetScrollPosition=function(A){return { X:A.pageXOffset,Y:A.pageYOffset };};FCKTools.AddEventListener=function(A,B,C){A.addEventListener(B,C,false);};FCKTools.RemoveEventListener=function(A,B,C){A.removeEventListener(B,C,false);};FCKTools.AddEventListenerEx=function(A,B,C,D){A.addEventListener(B,function(e){C.apply(A,[e].concat(D||[]));},false);};FCKTools.GetViewPaneSize=function(A){return { Width:A.innerWidth,Height:A.innerHeight };};FCKTools.SaveStyles=function(A){var B=FCKTools.ProtectFormStyles(A);var C={};if (A.className.length>0){C.Class=A.className;A.className='';};var D=A.getAttribute('style');if (D&&D.length>0){C.Inline=D;A.setAttribute('style','',0);};FCKTools.RestoreFormStyles(A,B);return C;};FCKTools.RestoreStyles=function(A,B){var C=FCKTools.ProtectFormStyles(A);A.className=B.Class||'';if (B.Inline) A.setAttribute('style',B.Inline,0);else A.removeAttribute('style',0);FCKTools.RestoreFormStyles(A,C);};FCKTools.RegisterDollarFunction=function(A){A.$=function(id){return A.document.getElementById(id);};};FCKTools.AppendElement=function(A,B){return A.appendChild(A.ownerDocument.createElement(B));};FCKTools.GetElementPosition=function(A,B){var c={ X:0,Y:0 };var C=B||window;var D=FCKTools.GetElementWindow(A);var E=null;while (A){var F=D.getComputedStyle(A,'').position;if (F&&F!='static'&&A.style.zIndex!=FCKConfig.FloatingPanelsZIndex) break;c.X+=A.offsetLeft-A.scrollLeft;c.Y+=A.offsetTop-A.scrollTop;if (!FCKBrowserInfo.IsOpera){var G=E;while (G&&G!=A){c.X-=G.scrollLeft;c.Y-=G.scrollTop;G=G.parentNode;}};E=A;if (A.offsetParent) A=A.offsetParent;else{if (D!=C){A=D.frameElement;E=null;if (A) D=FCKTools.GetElementWindow(A);}else{c.X+=A.scrollLeft;c.Y+=A.scrollTop;break;}}};return c;}; -var FCKeditorAPI;function InitializeAPI(){var A=window.parent;if (!(FCKeditorAPI=A.FCKeditorAPI)){var B='window.FCKeditorAPI = {Version : "2.6.3",VersionBuild : "19836",Instances : new Object(),GetInstance : function( name ){return this.Instances[ name ];},_FormSubmit : function(){for ( var name in FCKeditorAPI.Instances ){var oEditor = FCKeditorAPI.Instances[ name ] ;if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )oEditor.UpdateLinkedField() ;}this._FCKOriginalSubmit() ;},_FunctionQueue : {Functions : new Array(),IsRunning : false,Add : function( f ){this.Functions.push( f );if ( !this.IsRunning )this.StartNext();},StartNext : function(){var aQueue = this.Functions ;if ( aQueue.length > 0 ){this.IsRunning = true;aQueue[0].call();}else this.IsRunning = false;},Remove : function( f ){var aQueue = this.Functions;var i = 0, fFunc;while( (fFunc = aQueue[ i ]) ){if ( fFunc == f )aQueue.splice( i,1 );i++ ;}this.StartNext();}}}';if (A.execScript) A.execScript(B,'JavaScript');else{if (FCKBrowserInfo.IsGecko10){eval.call(A,B);}else if(FCKBrowserInfo.IsAIR){FCKAdobeAIR.FCKeditorAPI_Evaluate(A,B);}else if (FCKBrowserInfo.IsSafari){var C=A.document;var D=C.createElement('script');D.appendChild(C.createTextNode(B));C.documentElement.appendChild(D);}else A.eval(B);};FCKeditorAPI=A.FCKeditorAPI;FCKeditorAPI.__Instances=FCKeditorAPI.Instances;};FCKeditorAPI.Instances[FCK.Name]=FCK;};function _AttachFormSubmitToAPI(){var A=FCK.GetParentForm();if (A){FCKTools.AddEventListener(A,'submit',FCK.UpdateLinkedField);if (!A._FCKOriginalSubmit&&(typeof(A.submit)=='function'||(!A.submit.tagName&&!A.submit.length))){A._FCKOriginalSubmit=A.submit;A.submit=FCKeditorAPI._FormSubmit;}}};function FCKeditorAPI_Cleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat&&!window.FCKUnloadFlag) return;delete FCKeditorAPI.Instances[FCK.Name];};function FCKeditorAPI_ConfirmCleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat) window.FCKUnloadFlag=true;};FCKTools.AddEventListener(window,'unload',FCKeditorAPI_Cleanup);FCKTools.AddEventListener(window,'beforeunload',FCKeditorAPI_ConfirmCleanup); -var FCKImagePreloader=function(){this._Images=[];};FCKImagePreloader.prototype={AddImages:function(A){if (typeof(A)=='string') A=A.split(';');this._Images=this._Images.concat(A);},Start:function(){var A=this._Images;this._PreloadCount=A.length;for (var i=0;i]*\>)/i,AfterBody:/(\<\/body\>[\s\S]*$)/i,ToReplace:/___fcktoreplace:([\w]+)/ig,MetaHttpEquiv:/http-equiv\s*=\s*["']?([^"' ]+)/i,HasBaseTag:/]/i,HtmlOpener:/]*>/i,HeadOpener:/]*>/i,HeadCloser:/<\/head\s*>/i,FCK_Class:/\s*FCK__[^ ]*(?=\s+|$)/,ElementName:/(^[a-z_:][\w.\-:]*\w$)|(^[a-z_]$)/,ForceSimpleAmpersand:/___FCKAmp___/g,SpaceNoClose:/\/>/g,EmptyParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>\s*(<\/\1>)?$/,EmptyOutParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>(?:\s*| )(<\/\1>)?$/,TagBody:/>]+))/gi,ProtectUrlsA:/]+))/gi,ProtectUrlsArea:/]+))/gi,Html4DocType:/HTML 4\.0 Transitional/i,DocTypeTag:/]*>/i,HtmlDocType:/DTD HTML/,TagsWithEvent:/<[^\>]+ on\w+[\s\r\n]*=[\s\r\n]*?('|")[\s\S]+?\>/g,EventAttributes:/\s(on\w+)[\s\r\n]*=[\s\r\n]*?('|")([\s\S]*?)\2/g,ProtectedEvents:/\s\w+_fckprotectedatt="([^"]+)"/g,StyleProperties:/\S+\s*:/g,InvalidSelfCloseTags:/(<(?!base|meta|link|hr|br|param|img|area|input)([a-zA-Z0-9:]+)[^>]*)\/>/gi,StyleVariableAttName:/#\(\s*("|')(.+?)\1[^\)]*\s*\)/g,RegExp:/^\/(.*)\/([gim]*)$/,HtmlTag:/<[^\s<>](?:"[^"]*"|'[^']*'|[^<])*>/}; -var FCKListsLib={BlockElements:{ address:1,blockquote:1,center:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,marquee:1,noscript:1,ol:1,p:1,pre:1,script:1,table:1,ul:1 },NonEmptyBlockElements:{ p:1,div:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,address:1,pre:1,ol:1,ul:1,li:1,td:1,th:1 },InlineChildReqElements:{ abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },InlineNonEmptyElements:{ a:1,abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },EmptyElements:{ base:1,col:1,meta:1,link:1,hr:1,br:1,param:1,img:1,area:1,input:1 },PathBlockElements:{ address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,de:1 },PathBlockLimitElements:{ body:1,div:1,td:1,th:1,caption:1,form:1 },StyleBlockElements:{ address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 },StyleObjectElements:{ img:1,hr:1,li:1,table:1,tr:1,td:1,embed:1,object:1,ol:1,ul:1 },NonEditableElements:{ button:1,option:1,script:1,iframe:1,textarea:1,object:1,embed:1,map:1,applet:1 },BlockBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1 },ListBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1,br:1 }}; -var FCKLanguageManager=FCK.Language={AvailableLanguages:{af:'Afrikaans',ar:'Arabic',bg:'Bulgarian',bn:'Bengali/Bangla',bs:'Bosnian',ca:'Catalan',cs:'Czech',da:'Danish',de:'German',el:'Greek',en:'English','en-au':'English (Australia)','en-ca':'English (Canadian)','en-uk':'English (United Kingdom)',eo:'Esperanto',es:'Spanish',et:'Estonian',eu:'Basque',fa:'Persian',fi:'Finnish',fo:'Faroese',fr:'French','fr-ca':'French (Canada)',gl:'Galician',gu:'Gujarati',he:'Hebrew',hi:'Hindi',hr:'Croatian',hu:'Hungarian',it:'Italian',ja:'Japanese',km:'Khmer',ko:'Korean',lt:'Lithuanian',lv:'Latvian',mn:'Mongolian',ms:'Malay',nb:'Norwegian Bokmal',nl:'Dutch',no:'Norwegian',pl:'Polish',pt:'Portuguese (Portugal)','pt-br':'Portuguese (Brazil)',ro:'Romanian',ru:'Russian',sk:'Slovak',sl:'Slovenian',sr:'Serbian (Cyrillic)','sr-latn':'Serbian (Latin)',sv:'Swedish',th:'Thai',tr:'Turkish',uk:'Ukrainian',vi:'Vietnamese',zh:'Chinese Traditional','zh-cn':'Chinese Simplified'},GetActiveLanguage:function(){if (FCKConfig.AutoDetectLanguage){var A;if (navigator.userLanguage) A=navigator.userLanguage.toLowerCase();else if (navigator.language) A=navigator.language.toLowerCase();else{return FCKConfig.DefaultLanguage;};if (A.length>=5){A=A.substr(0,5);if (this.AvailableLanguages[A]) return A;};if (A.length>=2){A=A.substr(0,2);if (this.AvailableLanguages[A]) return A;}};return this.DefaultLanguage;},TranslateElements:function(A,B,C,D){var e=A.getElementsByTagName(B);var E,s;for (var i=0;i0) C+='|'+FCKConfig.AdditionalNumericEntities;FCKXHtmlEntities.EntitiesRegex=new RegExp(C,'g');}; -var FCKXHtml={};FCKXHtml.CurrentJobNum=0;FCKXHtml.GetXHTML=function(A,B,C){FCKDomTools.CheckAndRemovePaddingNode(FCKTools.GetElementDocument(A),FCKConfig.EnterMode);FCKXHtmlEntities.Initialize();this._NbspEntity=(FCKConfig.ProcessHTMLEntities?'nbsp':'#160');var D=FCK.IsDirty();FCKXHtml.SpecialBlocks=[];this.XML=FCKTools.CreateXmlObject('DOMDocument');this.MainNode=this.XML.appendChild(this.XML.createElement('xhtml'));FCKXHtml.CurrentJobNum++;if (B) this._AppendNode(this.MainNode,A);else this._AppendChildNodes(this.MainNode,A,false);var E=this._GetMainXmlString();this.XML=null;if (FCKBrowserInfo.IsSafari) E=E.replace(/^/,'');E=E.substr(7,E.length-15).Trim();if (FCKConfig.DocType.length>0&&FCKRegexLib.HtmlDocType.test(FCKConfig.DocType)) E=E.replace(FCKRegexLib.SpaceNoClose,'>');else E=E.replace(FCKRegexLib.SpaceNoClose,' />');if (FCKConfig.ForceSimpleAmpersand) E=E.replace(FCKRegexLib.ForceSimpleAmpersand,'&');if (C) E=FCKCodeFormatter.Format(E);for (var i=0;i0;if (C) A.appendChild(this.XML.createTextNode(B.replace(FCKXHtmlEntities.EntitiesRegex,FCKXHtml_GetEntity)));return C;};function FCKXHtml_GetEntity(A){var B=FCKXHtmlEntities.Entities[A]||('#'+A.charCodeAt(0));return '#?-:'+B+';';};FCKXHtml.TagProcessors={a:function(A,B){if (B.innerHTML.Trim().length==0&&!B.name) return false;var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'href',C);if (FCKBrowserInfo.IsIE){if (B.name) FCKXHtml._AppendAttribute(A,'name',B.name);};A=FCKXHtml._AppendChildNodes(A,B,false);return A;},area:function(A,B){var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'href',C);if (FCKBrowserInfo.IsIE){if (!A.attributes.getNamedItem('coords')){var D=B.getAttribute('coords',2);if (D&&D!='0,0,0') FCKXHtml._AppendAttribute(A,'coords',D);};if (!A.attributes.getNamedItem('shape')){var E=B.getAttribute('shape',2);if (E&&E.length>0) FCKXHtml._AppendAttribute(A,'shape',E.toLowerCase());}};return A;},body:function(A,B){A=FCKXHtml._AppendChildNodes(A,B,false);A.removeAttribute('spellcheck');return A;},iframe:function(A,B){var C=B.innerHTML;if (FCKBrowserInfo.IsGecko) C=FCKTools.HTMLDecode(C);C=C.replace(/\s_fcksavedurl="[^"]*"/g,'');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(C)));return A;},img:function(A,B){if (!A.attributes.getNamedItem('alt')) FCKXHtml._AppendAttribute(A,'alt','');var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'src',C);if (B.style.width) A.removeAttribute('width');if (B.style.height) A.removeAttribute('height');return A;},li:function(A,B,C){if (C.nodeName.IEquals(['ul','ol'])) return FCKXHtml._AppendChildNodes(A,B,true);var D=FCKXHtml.XML.createElement('ul');B._fckxhtmljob=null;do{FCKXHtml._AppendNode(D,B);do{B=FCKDomTools.GetNextSibling(B);} while (B&&B.nodeType==3&&B.nodeValue.Trim().length==0)} while (B&&B.nodeName.toLowerCase()=='li') return D;},ol:function(A,B,C){if (B.innerHTML.Trim().length==0) return false;var D=C.lastChild;if (D&&D.nodeType==3) D=D.previousSibling;if (D&&D.nodeName.toUpperCase()=='LI'){B._fckxhtmljob=null;FCKXHtml._AppendNode(D,B);return false;};A=FCKXHtml._AppendChildNodes(A,B);return A;},pre:function (A,B){var C=B.firstChild;if (C&&C.nodeType==3) A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem('\r\n')));FCKXHtml._AppendChildNodes(A,B,true);return A;},script:function(A,B){if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A,'type','text/javascript');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(B.text)));return A;},span:function(A,B){if (B.innerHTML.length==0) return false;A=FCKXHtml._AppendChildNodes(A,B,false);return A;},style:function(A,B){if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A,'type','text/css');var C=B.innerHTML;if (FCKBrowserInfo.IsIE) C=C.replace(/^(\r\n|\n|\r)/,'');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(C)));return A;},title:function(A,B){A.appendChild(FCKXHtml.XML.createTextNode(FCK.EditorDocument.title));return A;}};FCKXHtml.TagProcessors.ul=FCKXHtml.TagProcessors.ol; -FCKXHtml._GetMainXmlString=function(){return (new XMLSerializer()).serializeToString(this.MainNode);};FCKXHtml._AppendAttributes=function(A,B,C){var D=B.attributes;for (var n=0;n]*\>/gi;A.BlocksCloser=/\<\/(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi;A.NewLineTags=/\<(BR|HR)[^\>]*\>/gi;A.MainTags=/\<\/?(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR)[^\>]*\>/gi;A.LineSplitter=/\s*\n+\s*/g;A.IncreaseIndent=/^\<(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \/\>]/i;A.DecreaseIndent=/^\<\/(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \>]/i;A.FormatIndentatorRemove=new RegExp('^'+FCKConfig.FormatIndentator);A.ProtectedTags=/(]*>)([\s\S]*?)(<\/PRE>)/gi;};FCKCodeFormatter._ProtectData=function(A,B,C,D){return B+'___FCKpd___'+FCKCodeFormatter.ProtectedData.AddItem(C)+D;};FCKCodeFormatter.Format=function(A){if (!this.Regex) this.Init();FCKCodeFormatter.ProtectedData=[];var B=A.replace(this.Regex.ProtectedTags,FCKCodeFormatter._ProtectData);B=B.replace(this.Regex.BlocksOpener,'\n$&');B=B.replace(this.Regex.BlocksCloser,'$&\n');B=B.replace(this.Regex.NewLineTags,'$&\n');B=B.replace(this.Regex.MainTags,'\n$&\n');var C='';var D=B.split(this.Regex.LineSplitter);B='';for (var i=0;iB[i]) return 1;};if (A.lengthB.length) return 1;return 0;};FCKUndo._CheckIsBookmarksEqual=function(A,B){if (!(A&&B)) return false;if (FCKBrowserInfo.IsIE){var C=A[1].search(A[0].StartId);var D=B[1].search(B[0].StartId);var E=A[1].search(A[0].EndId);var F=B[1].search(B[0].EndId);return C==D&&E==F;}else{return this._CompareCursors(A.Start,B.Start)==0&&this._CompareCursors(A.End,B.End)==0;}};FCKUndo.SaveUndoStep=function(){if (FCK.EditMode!=0||this.SaveLocked) return;if (this.SavedData.length) this.Changed=true;var A=FCK.EditorDocument.body.innerHTML;var B=this._GetBookmark();this.SavedData=this.SavedData.slice(0,this.CurrentIndex+1);if (this.CurrentIndex>0&&A==this.SavedData[this.CurrentIndex][0]&&this._CheckIsBookmarksEqual(B,this.SavedData[this.CurrentIndex][1])) return;else if (this.CurrentIndex==0&&this.SavedData.length&&A==this.SavedData[0][0]){this.SavedData[0][1]=B;return;};if (this.CurrentIndex+1>=FCKConfig.MaxUndoLevels) this.SavedData.shift();else this.CurrentIndex++;this.SavedData[this.CurrentIndex]=[A,B];FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.CheckUndoState=function(){return (this.Changed||this.CurrentIndex>0);};FCKUndo.CheckRedoState=function(){return (this.CurrentIndex<(this.SavedData.length-1));};FCKUndo.Undo=function(){if (this.CheckUndoState()){if (this.CurrentIndex==(this.SavedData.length-1)){this.SaveUndoStep();};this._ApplyUndoLevel(--this.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");}};FCKUndo.Redo=function(){if (this.CheckRedoState()){this._ApplyUndoLevel(++this.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");}};FCKUndo._ApplyUndoLevel=function(A){var B=this.SavedData[A];if (!B) return;if (FCKBrowserInfo.IsIE){if (B[1]&&B[1][1]) FCK.SetInnerHtml(B[1][1]);else FCK.SetInnerHtml(B[0]);}else FCK.EditorDocument.body.innerHTML=B[0];this._SelectBookmark(B[1]);this.TypesCount=0;this.Changed=false;this.Typing=false;}; -var FCKEditingArea=function(A){this.TargetElement=A;this.Mode=0;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKEditingArea_Cleanup);};FCKEditingArea.prototype.Start=function(A,B){var C=this.TargetElement;var D=FCKTools.GetElementDocument(C);while(C.firstChild) C.removeChild(C.firstChild);if (this.Mode==0){if (FCK_IS_CUSTOM_DOMAIN) A=''+A;if (FCKBrowserInfo.IsIE) A=A.replace(/(]*?)\s*\/?>(?!\s*<\/base>)/gi,'$1>');else if (!B){var E=A.match(FCKRegexLib.BeforeBody);var F=A.match(FCKRegexLib.AfterBody);if (E&&F){var G=A.substr(E[1].length,A.length-E[1].length-F[1].length);A=E[1]+' '+F[1];if (FCKBrowserInfo.IsGecko&&(G.length==0||FCKRegexLib.EmptyParagraph.test(G))) G='
        ';this._BodyHTML=G;}else this._BodyHTML=A;};var H=this.IFrame=D.createElement('iframe');var I='';H.frameBorder=0;H.style.width=H.style.height='100%';if (FCK_IS_CUSTOM_DOMAIN&&FCKBrowserInfo.IsIE){window._FCKHtmlToLoad=A.replace(//i,''+I);H.src='javascript:void( (function(){document.open() ;document.domain="'+document.domain+'" ;document.write( window.parent._FCKHtmlToLoad );document.close() ;window.parent._FCKHtmlToLoad = null ;})() )';}else if (!FCKBrowserInfo.IsGecko){H.src='javascript:void(0)';};C.appendChild(H);this.Window=H.contentWindow;if (!FCK_IS_CUSTOM_DOMAIN||!FCKBrowserInfo.IsIE){var J=this.Window.document;J.open();J.write(A.replace(//i,''+I));J.close();};if (FCKBrowserInfo.IsAIR) FCKAdobeAIR.EditingArea_Start(J,A);if (FCKBrowserInfo.IsGecko10&&!B){this.Start(A,true);return;};if (H.readyState&&H.readyState!='completed'){var K=this;setTimeout(function(){try{K.Window.document.documentElement.doScroll("left");}catch(e){setTimeout(arguments.callee,0);return;};K.Window._FCKEditingArea=K;FCKEditingArea_CompleteStart.call(K.Window);},0);}else{this.Window._FCKEditingArea=this;if (FCKBrowserInfo.IsGecko10) this.Window.setTimeout(FCKEditingArea_CompleteStart,500);else FCKEditingArea_CompleteStart.call(this.Window);}}else{var L=this.Textarea=D.createElement('textarea');L.className='SourceField';L.dir='ltr';FCKDomTools.SetElementStyles(L,{width:'100%',height:'100%',border:'none',resize:'none',outline:'none'});C.appendChild(L);L.value=A;FCKTools.RunFunction(this.OnLoad);}};function FCKEditingArea_CompleteStart(){if (!this.document.body){this.setTimeout(FCKEditingArea_CompleteStart,50);return;};var A=this._FCKEditingArea;A.Document=A.Window.document;A.MakeEditable();FCKTools.RunFunction(A.OnLoad);};FCKEditingArea.prototype.MakeEditable=function(){var A=this.Document;if (FCKBrowserInfo.IsIE){A.body.disabled=true;A.body.contentEditable=true;A.body.removeAttribute("disabled");}else{try{A.body.spellcheck=(this.FFSpellChecker!==false);if (this._BodyHTML){A.body.innerHTML=this._BodyHTML;A.body.offsetLeft;this._BodyHTML=null;};A.designMode='on';A.execCommand('enableObjectResizing',false,!FCKConfig.DisableObjectResizing);A.execCommand('enableInlineTableEditing',false,!FCKConfig.DisableFFTableHandles);}catch (e){FCKTools.AddEventListener(this.Window.frameElement,'DOMAttrModified',FCKEditingArea_Document_AttributeNodeModified);}}};function FCKEditingArea_Document_AttributeNodeModified(A){var B=A.currentTarget.contentWindow._FCKEditingArea;if (B._timer) window.clearTimeout(B._timer);B._timer=FCKTools.SetTimeout(FCKEditingArea_MakeEditableByMutation,1000,B);};function FCKEditingArea_MakeEditableByMutation(){delete this._timer;FCKTools.RemoveEventListener(this.Window.frameElement,'DOMAttrModified',FCKEditingArea_Document_AttributeNodeModified);this.MakeEditable();};FCKEditingArea.prototype.Focus=function(){try{if (this.Mode==0){if (FCKBrowserInfo.IsIE) this._FocusIE();else this.Window.focus();}else{var A=FCKTools.GetElementDocument(this.Textarea);if ((!A.hasFocus||A.hasFocus())&&A.activeElement==this.Textarea) return;this.Textarea.focus();}}catch(e) {}};FCKEditingArea.prototype._FocusIE=function(){this.Document.body.setActive();this.Window.focus();var A=this.Document.selection.createRange();var B=A.parentElement();var C=B.nodeName.toLowerCase();if (B.childNodes.length>0||!(FCKListsLib.BlockElements[C]||FCKListsLib.NonEmptyBlockElements[C])){return;};A=new FCKDomRange(this.Window);A.MoveToElementEditStart(B);A.Select();};function FCKEditingArea_Cleanup(){if (this.Document) this.Document.body.innerHTML="";this.TargetElement=null;this.IFrame=null;this.Document=null;this.Textarea=null;if (this.Window){this.Window._FCKEditingArea=null;this.Window=null;}}; -var FCKKeystrokeHandler=function(A){this.Keystrokes={};this.CancelCtrlDefaults=(A!==false);};FCKKeystrokeHandler.prototype.AttachToElement=function(A){FCKTools.AddEventListenerEx(A,'keydown',_FCKKeystrokeHandler_OnKeyDown,this);if (FCKBrowserInfo.IsGecko10||FCKBrowserInfo.IsOpera||(FCKBrowserInfo.IsGecko&&FCKBrowserInfo.IsMac)) FCKTools.AddEventListenerEx(A,'keypress',_FCKKeystrokeHandler_OnKeyPress,this);};FCKKeystrokeHandler.prototype.SetKeystrokes=function(){for (var i=0;i40))){B._CancelIt=true;if (A.preventDefault) return A.preventDefault();A.returnValue=false;A.cancelBubble=true;return false;};return true;};function _FCKKeystrokeHandler_OnKeyPress(A,B){if (B._CancelIt){if (A.preventDefault) return A.preventDefault();return false;};return true;}; -FCK.DTD=(function(){var X=FCKTools.Merge;var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I;A={isindex:1,fieldset:1};B={input:1,button:1,select:1,textarea:1,label:1};C=X({a:1},B);D=X({iframe:1},C);E={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1};F={ins:1,del:1,script:1};G=X({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},F);H=X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},G);I=X({p:1},H);J=X({iframe:1},H,B);K={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1};L=X({a:1},J);M={tr:1};N={'#':1};O=X({param:1},K);P=X({form:1},A,D,E,I);Q={li:1};return {col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:P,td:P,br:{},th:P,center:P,kbd:L,button:X(I,E),basefont:{},h5:L,h4:L,samp:L,h6:L,ol:Q,h1:L,h3:L,option:N,h2:L,form:X(A,D,E,I),select:{optgroup:1,option:1},font:J,ins:P,menu:Q,abbr:L,label:L,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:L,script:N,tfoot:M,cite:L,li:P,input:{},iframe:P,strong:J,textarea:N,noframes:P,big:J,small:J,span:J,hr:{},dt:L,sub:J,optgroup:{option:1},param:{},bdo:L,'var':J,div:P,object:O,sup:J,dd:P,strike:J,area:{},dir:Q,map:X({area:1,form:1,p:1},A,F,E),applet:O,dl:{dt:1,dd:1},del:P,isindex:{},fieldset:X({legend:1},K),thead:M,ul:Q,acronym:L,b:J,a:J,blockquote:P,caption:L,i:J,u:J,tbody:M,s:L,address:X(D,I),tt:J,legend:L,q:L,pre:X(G,C),p:L,em:J,dfn:L};})(); -var FCKStyle=function(A){this.Element=(A.Element||'span').toLowerCase();this._StyleDesc=A;};FCKStyle.prototype={GetType:function(){var A=this.GetType_$;if (A!=undefined) return A;var B=this.Element;if (B=='#'||FCKListsLib.StyleBlockElements[B]) A=0;else if (FCKListsLib.StyleObjectElements[B]) A=2;else A=1;return (this.GetType_$=A);},ApplyToSelection:function(A){var B=new FCKDomRange(A);B.MoveToSelection();this.ApplyToRange(B,true);},ApplyToRange:function(A,B,C){switch (this.GetType()){case 0:this.ApplyToRange=this._ApplyBlockStyle;break;case 1:this.ApplyToRange=this._ApplyInlineStyle;break;default:return;};this.ApplyToRange(A,B,C);},ApplyToObject:function(A){if (!A) return;this.BuildElement(null,A);},RemoveFromSelection:function(A){var B=new FCKDomRange(A);B.MoveToSelection();this.RemoveFromRange(B,true);},RemoveFromRange:function(A,B,C){var D;var E=this._GetAttribsForComparison();var F=this._GetOverridesForComparison();if (A.CheckIsCollapsed()){var D=A.CreateBookmark(true);var H=A.GetBookmarkNode(D,true);var I=new FCKElementPath(H.parentNode);var J=[];var K=!FCKDomTools.GetNextSibling(H);var L=K||!FCKDomTools.GetPreviousSibling(H);var M;var N=-1;for (var i=0;i=0;i--){var E=D[i];for (var F in B){if (FCKDomTools.HasAttribute(E,F)){switch (F){case 'style':this._RemoveStylesFromElement(E);break;case 'class':if (FCKDomTools.GetAttributeValue(E,F)!=this.GetFinalAttributeValue(F)) continue;default:FCKDomTools.RemoveAttribute(E,F);}}};this._RemoveOverrides(E,C[this.Element]);this._RemoveNoAttribElement(E);};for (var G in C){if (G!=this.Element){D=A.getElementsByTagName(G);for (var i=D.length-1;i>=0;i--){var E=D[i];this._RemoveOverrides(E,C[G]);this._RemoveNoAttribElement(E);}}}},_RemoveStylesFromElement:function(A){var B=A.style.cssText;var C=this.GetFinalStyleValue();if (B.length>0&&C.length==0) return;C='(^|;)\\s*('+C.replace(/\s*([^ ]+):.*?(;|$)/g,'$1|').replace(/\|$/,'')+'):[^;]+';var D=new RegExp(C,'gi');B=B.replace(D,'').Trim();if (B.length==0||B==';') FCKDomTools.RemoveAttribute(A,'style');else A.style.cssText=B.replace(D,'');},_RemoveOverrides:function(A,B){var C=B&&B.Attributes;if (C){for (var i=0;i0) C.style.cssText=this.GetFinalStyleValue();return C;},_CompareAttributeValues:function(A,B,C){if (A=='style'&&B&&C){B=B.replace(/;$/,'').toLowerCase();C=C.replace(/;$/,'').toLowerCase();};return (B==C||((B===null||B==='')&&(C===null||C==='')))},GetFinalAttributeValue:function(A){var B=this._StyleDesc.Attributes;var B=B?B[A]:null;if (!B&&A=='style') return this.GetFinalStyleValue();if (B&&this._Variables) B=B.Replace(FCKRegexLib.StyleVariableAttName,this._GetVariableReplace,this);return B;},GetFinalStyleValue:function(){var A=this._GetStyleText();if (A.length>0&&this._Variables){A=A.Replace(FCKRegexLib.StyleVariableAttName,this._GetVariableReplace,this);A=FCKTools.NormalizeCssText(A);};return A;},_GetVariableReplace:function(){return this._Variables[arguments[2]]||arguments[0];},SetVariable:function(A,B){var C=this._Variables;if (!C) C=this._Variables={};this._Variables[A]=B;},_FromPre:function(A,B,C){var D=B.innerHTML;D=D.replace(/(\r\n|\r)/g,'\n');D=D.replace(/^[ \t]*\n/,'');D=D.replace(/\n$/,'');D=D.replace(/^[ \t]+|[ \t]+$/g,function(match,offset,s){if (match.length==1) return ' ';else if (offset==0) return new Array(match.length).join(' ')+' ';else return ' '+new Array(match.length).join(' ');});var E=new FCKHtmlIterator(D);var F=[];E.Each(function(isTag,value){if (!isTag){value=value.replace(/\n/g,'
        ');value=value.replace(/[ \t]{2,}/g,function (match){return new Array(match.length).join(' ')+' ';});};F.push(value);});C.innerHTML=F.join('');return C;},_ToPre:function(A,B,C){var D=B.innerHTML.Trim();D=D.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'
        ');var E=new FCKHtmlIterator(D);var F=[];E.Each(function(isTag,value){if (!isTag) value=value.replace(/([ \t\n\r]+| )/g,' ');else if (isTag&&value=='
        ') value='\n';F.push(value);});if (FCKBrowserInfo.IsIE){var G=A.createElement('div');G.appendChild(C);C.outerHTML='
        \n'+F.join('')+'
        ';C=G.removeChild(G.firstChild);}else C.innerHTML=F.join('');return C;},_CheckAndMergePre:function(A,B){if (A!=FCKDomTools.GetPreviousSourceElement(B,true)) return;var C=A.innerHTML.replace(/\n$/,'')+'\n\n'+B.innerHTML.replace(/^\n/,'');if (FCKBrowserInfo.IsIE) B.outerHTML='
        '+C+'
        ';else B.innerHTML=C;FCKDomTools.RemoveNode(A);},_CheckAndSplitPre:function(A){var B;var C=A.firstChild;C=C&&C.nextSibling;while (C){var D=C.nextSibling;if (D&&D.nextSibling&&C.nodeName.IEquals('br')&&D.nodeName.IEquals('br')){FCKDomTools.RemoveNode(C);C=D.nextSibling;FCKDomTools.RemoveNode(D);B=FCKDomTools.InsertAfterNode(B||A,FCKDomTools.CloneElement(A));continue;};if (B){C=C.previousSibling;FCKDomTools.MoveNode(C.nextSibling,B);};C=C.nextSibling;}},_ApplyBlockStyle:function(A,B,C){var D;if (B) D=A.CreateBookmark();var E=new FCKDomRangeIterator(A);E.EnforceRealBlocks=true;var F;var G=A.Window.document;var H;while((F=E.GetNextParagraph())){var I=this.BuildElement(G);var J=I.nodeName.IEquals('pre');var K=F.nodeName.IEquals('pre');var L=J&&!K;var M=!J&&K;if (L) I=this._ToPre(G,F,I);else if (M) I=this._FromPre(G,F,I);else FCKDomTools.MoveChildren(F,I);F.parentNode.insertBefore(I,F);FCKDomTools.RemoveNode(F);if (J){if (H) this._CheckAndMergePre(H,I);H=I;}else if (M) this._CheckAndSplitPre(I);};if (B) A.SelectBookmark(D);if (C) A.MoveToBookmark(D);},_ApplyInlineStyle:function(A,B,C){var D=A.Window.document;if (A.CheckIsCollapsed()){var E=this.BuildElement(D);A.InsertNode(E);A.MoveToPosition(E,2);A.Select();return;};var F=this.Element;var G=FCK.DTD[F]||FCK.DTD.span;var H=this._GetAttribsForComparison();var I;A.Expand('inline_elements');var J=A.CreateBookmark(true);var K=A.GetBookmarkNode(J,true);var L=A.GetBookmarkNode(J,false);A.Release(true);var M=FCKDomTools.GetNextSourceNode(K,true);while (M){var N=false;var O=M.nodeType;var P=O==1?M.nodeName.toLowerCase():null;if (!P||G[P]){if ((FCK.DTD[M.parentNode.nodeName.toLowerCase()]||FCK.DTD.span)[F]||!FCK.DTD[F]){if (!A.CheckHasRange()) A.SetStart(M,3);if (O!=1||M.childNodes.length==0){var Q=M;var R=Q.parentNode;while (Q==R.lastChild&&G[R.nodeName.toLowerCase()]){Q=R;};A.SetEnd(Q,4);if (Q==Q.parentNode.lastChild&&!G[Q.parentNode.nodeName.toLowerCase()]) N=true;}else{A.SetEnd(M,3);}}else N=true;}else N=true;M=FCKDomTools.GetNextSourceNode(M);if (M==L){M=null;N=true;};if (N&&A.CheckHasRange()&&!A.CheckIsCollapsed()){I=this.BuildElement(D);A.ExtractContents().AppendTo(I);if (I.innerHTML.RTrim().length>0){A.InsertNode(I);this.RemoveFromElement(I);this._MergeSiblings(I,this._GetAttribsForComparison());if (!FCKBrowserInfo.IsIE) I.normalize();};A.Release(true);}};this._FixBookmarkStart(K);if (B) A.SelectBookmark(J);if (C) A.MoveToBookmark(J);},_FixBookmarkStart:function(A){var B;while ((B=A.nextSibling)){if (B.nodeType==1&&FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){if (!B.firstChild) FCKDomTools.RemoveNode(B);else FCKDomTools.MoveNode(A,B,true);continue;};if (B.nodeType==3&&B.length==0){FCKDomTools.RemoveNode(B);continue;};break;}},_MergeSiblings:function(A,B){if (!A||A.nodeType!=1||!FCKListsLib.InlineNonEmptyElements[A.nodeName.toLowerCase()]) return;this._MergeNextSibling(A,B);this._MergePreviousSibling(A,B);},_MergeNextSibling:function(A,B){var C=A.nextSibling;var D=(C&&C.nodeType==1&&C.getAttribute('_fck_bookmark'));if (D) C=C.nextSibling;if (C&&C.nodeType==1&&C.nodeName==A.nodeName){if (!B) B=this._CreateElementAttribsForComparison(A);if (this._CheckAttributesMatch(C,B)){var E=A.lastChild;if (D) FCKDomTools.MoveNode(A.nextSibling,A);FCKDomTools.MoveChildren(C,A);FCKDomTools.RemoveNode(C);if (E) this._MergeNextSibling(E);}}},_MergePreviousSibling:function(A,B){var C=A.previousSibling;var D=(C&&C.nodeType==1&&C.getAttribute('_fck_bookmark'));if (D) C=C.previousSibling;if (C&&C.nodeType==1&&C.nodeName==A.nodeName){if (!B) B=this._CreateElementAttribsForComparison(A);if (this._CheckAttributesMatch(C,B)){var E=A.firstChild;if (D) FCKDomTools.MoveNode(A.previousSibling,A,true);FCKDomTools.MoveChildren(C,A,true);FCKDomTools.RemoveNode(C);if (E) this._MergePreviousSibling(E);}}},_GetStyleText:function(){var A=this._StyleDesc.Styles;var B=(this._StyleDesc.Attributes?this._StyleDesc.Attributes['style']||'':'');if (B.length>0) B+=';';for (var C in A) B+=C+':'+A[C]+';';if (B.length>0&&!(/#\(/.test(B))){B=FCKTools.NormalizeCssText(B);};return (this._GetStyleText=function() { return B;})();},_GetAttribsForComparison:function(){var A=this._GetAttribsForComparison_$;if (A) return A;A={};var B=this._StyleDesc.Attributes;if (B){for (var C in B){A[C.toLowerCase()]=B[C].toLowerCase();}};if (this._GetStyleText().length>0){A['style']=this._GetStyleText().toLowerCase();};FCKTools.AppendLengthProperty(A,'_length');return (this._GetAttribsForComparison_$=A);},_GetOverridesForComparison:function(){var A=this._GetOverridesForComparison_$;if (A) return A;A={};var B=this._StyleDesc.Overrides;if (B){if (!FCKTools.IsArray(B)) B=[B];for (var i=0;i0) return true;};B=B.nextSibling;};return false;}}; -var FCKElementPath=function(A){var B=null;var C=null;var D=[];var e=A;while (e){if (e.nodeType==1){if (!this.LastElement) this.LastElement=e;var E=e.nodeName.toLowerCase();if (FCKBrowserInfo.IsIE&&e.scopeName!='HTML') E=e.scopeName.toLowerCase()+':'+E;if (!C){if (!B&&FCKListsLib.PathBlockElements[E]!=null) B=e;if (FCKListsLib.PathBlockLimitElements[E]!=null){if (!B&&E=='div'&&!FCKElementPath._CheckHasBlock(e)) B=e;else C=e;}};D.push(e);if (E=='body') break;};e=e.parentNode;};this.Block=B;this.BlockLimit=C;this.Elements=D;};FCKElementPath._CheckHasBlock=function(A){var B=A.childNodes;for (var i=0,count=B.length;i0){if (D.nodeType==3){var G=D.nodeValue.substr(0,E).Trim();if (G.length!=0) return A.IsStartOfBlock=false;}else F=D.childNodes[E-1];};if (!F) F=FCKDomTools.GetPreviousSourceNode(D,true,null,C);while (F){switch (F.nodeType){case 1:if (!FCKListsLib.InlineChildReqElements[F.nodeName.toLowerCase()]) return A.IsStartOfBlock=false;break;case 3:if (F.nodeValue.Trim().length>0) return A.IsStartOfBlock=false;};F=FCKDomTools.GetPreviousSourceNode(F,false,null,C);};return A.IsStartOfBlock=true;},CheckEndOfBlock:function(A){var B=this._Cache.IsEndOfBlock;if (B!=undefined) return B;var C=this.EndBlock||this.EndBlockLimit;var D=this._Range.endContainer;var E=this._Range.endOffset;var F;if (D.nodeType==3){var G=D.nodeValue;if (E0) return this._Cache.IsEndOfBlock=false;};F=FCKDomTools.GetNextSourceNode(F,false,null,C);};if (A) this.Select();return this._Cache.IsEndOfBlock=true;},CreateBookmark:function(A){var B={StartId:(new Date()).valueOf()+Math.floor(Math.random()*1000)+'S',EndId:(new Date()).valueOf()+Math.floor(Math.random()*1000)+'E'};var C=this.Window.document;var D;var E;var F;if (!this.CheckIsCollapsed()){E=C.createElement('span');E.style.display='none';E.id=B.EndId;E.setAttribute('_fck_bookmark',true);E.innerHTML=' ';F=this.Clone();F.Collapse(false);F.InsertNode(E);};D=C.createElement('span');D.style.display='none';D.id=B.StartId;D.setAttribute('_fck_bookmark',true);D.innerHTML=' ';F=this.Clone();F.Collapse(true);F.InsertNode(D);if (A){B.StartNode=D;B.EndNode=E;};if (E){this.SetStart(D,4);this.SetEnd(E,3);}else this.MoveToPosition(D,4);return B;},GetBookmarkNode:function(A,B){var C=this.Window.document;if (B) return A.StartNode||C.getElementById(A.StartId);else return A.EndNode||C.getElementById(A.EndId);},MoveToBookmark:function(A,B){var C=this.GetBookmarkNode(A,true);var D=this.GetBookmarkNode(A,false);this.SetStart(C,3);if (!B) FCKDomTools.RemoveNode(C);if (D){this.SetEnd(D,3);if (!B) FCKDomTools.RemoveNode(D);}else this.Collapse(true);this._UpdateElementInfo();},CreateBookmark2:function(){if (!this._Range) return { "Start":0,"End":0 };var A={"Start":[this._Range.startOffset],"End":[this._Range.endOffset]};var B=this._Range.startContainer.previousSibling;var C=this._Range.endContainer.previousSibling;var D=this._Range.startContainer;var E=this._Range.endContainer;while (B&&D.nodeType==3){A.Start[0]+=B.length;D=B;B=B.previousSibling;}while (C&&E.nodeType==3){A.End[0]+=C.length;E=C;C=C.previousSibling;};if (D.nodeType==1&&D.childNodes[A.Start[0]]&&D.childNodes[A.Start[0]].nodeType==3){var F=D.childNodes[A.Start[0]];var G=0;while (F.previousSibling&&F.previousSibling.nodeType==3){F=F.previousSibling;G+=F.length;};D=F;A.Start[0]=G;};if (E.nodeType==1&&E.childNodes[A.End[0]]&&E.childNodes[A.End[0]].nodeType==3){var F=E.childNodes[A.End[0]];var G=0;while (F.previousSibling&&F.previousSibling.nodeType==3){F=F.previousSibling;G+=F.length;};E=F;A.End[0]=G;};A.Start=FCKDomTools.GetNodeAddress(D,true).concat(A.Start);A.End=FCKDomTools.GetNodeAddress(E,true).concat(A.End);return A;},MoveToBookmark2:function(A){var B=FCKDomTools.GetNodeFromAddress(this.Window.document,A.Start.slice(0,-1),true);var C=FCKDomTools.GetNodeFromAddress(this.Window.document,A.End.slice(0,-1),true);this.Release(true);this._Range=new FCKW3CRange(this.Window.document);var D=A.Start[A.Start.length-1];var E=A.End[A.End.length-1];while (B.nodeType==3&&D>B.length){if (!B.nextSibling||B.nextSibling.nodeType!=3) break;D-=B.length;B=B.nextSibling;}while (C.nodeType==3&&E>C.length){if (!C.nextSibling||C.nextSibling.nodeType!=3) break;E-=C.length;C=C.nextSibling;};this._Range.setStart(B,D);this._Range.setEnd(C,E);this._UpdateElementInfo();},MoveToPosition:function(A,B){this.SetStart(A,B);this.Collapse(true);},SetStart:function(A,B,C){var D=this._Range;if (!D) D=this._Range=this.CreateRange();switch(B){case 1:D.setStart(A,0);break;case 2:D.setStart(A,A.childNodes.length);break;case 3:D.setStartBefore(A);break;case 4:D.setStartAfter(A);};if (!C) this._UpdateElementInfo();},SetEnd:function(A,B,C){var D=this._Range;if (!D) D=this._Range=this.CreateRange();switch(B){case 1:D.setEnd(A,0);break;case 2:D.setEnd(A,A.childNodes.length);break;case 3:D.setEndBefore(A);break;case 4:D.setEndAfter(A);};if (!C) this._UpdateElementInfo();},Expand:function(A){var B,oSibling;switch (A){case 'inline_elements':if (this._Range.startOffset==0){B=this._Range.startContainer;if (B.nodeType!=1) B=B.previousSibling?null:B.parentNode;if (B){while (FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){this._Range.setStartBefore(B);if (B!=B.parentNode.firstChild) break;B=B.parentNode;}}};B=this._Range.endContainer;var C=this._Range.endOffset;if ((B.nodeType==3&&C>=B.nodeValue.length)||(B.nodeType==1&&C>=B.childNodes.length)||(B.nodeType!=1&&B.nodeType!=3)){if (B.nodeType!=1) B=B.nextSibling?null:B.parentNode;if (B){while (FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){this._Range.setEndAfter(B);if (B!=B.parentNode.lastChild) break;B=B.parentNode;}}};break;case 'block_contents':case 'list_contents':var D=FCKListsLib.BlockBoundaries;if (A=='list_contents'||FCKConfig.EnterMode=='br') D=FCKListsLib.ListBoundaries;if (this.StartBlock&&FCKConfig.EnterMode!='br'&&A=='block_contents') this.SetStart(this.StartBlock,1);else{B=this._Range.startContainer;if (B.nodeType==1){var E=B.childNodes[this._Range.startOffset];if (E) B=FCKDomTools.GetPreviousSourceNode(E,true);else B=B.lastChild||B;}while (B&&(B.nodeType!=1||(B!=this.StartBlockLimit&&!D[B.nodeName.toLowerCase()]))){this._Range.setStartBefore(B);B=B.previousSibling||B.parentNode;}};if (this.EndBlock&&FCKConfig.EnterMode!='br'&&A=='block_contents'&&this.EndBlock.nodeName.toLowerCase()!='li') this.SetEnd(this.EndBlock,2);else{B=this._Range.endContainer;if (B.nodeType==1) B=B.childNodes[this._Range.endOffset]||B.lastChild;while (B&&(B.nodeType!=1||(B!=this.StartBlockLimit&&!D[B.nodeName.toLowerCase()]))){this._Range.setEndAfter(B);B=B.nextSibling||B.parentNode;};if (B&&B.nodeName.toLowerCase()=='br') this._Range.setEndAfter(B);};this._UpdateElementInfo();}},SplitBlock:function(A){var B=A||FCKConfig.EnterMode;if (!this._Range) this.MoveToSelection();if (this.StartBlockLimit==this.EndBlockLimit){var C=this.StartBlock;var D=this.EndBlock;var E=null;if (B!='br'){if (!C){C=this.FixBlock(true,B);D=this.EndBlock;};if (!D) D=this.FixBlock(false,B);};var F=(C!=null&&this.CheckStartOfBlock());var G=(D!=null&&this.CheckEndOfBlock());if (!this.CheckIsEmpty()) this.DeleteContents();if (C&&D&&C==D){if (G){E=new FCKElementPath(this.StartContainer);this.MoveToPosition(D,4);D=null;}else if (F){E=new FCKElementPath(this.StartContainer);this.MoveToPosition(C,3);C=null;}else{this.SetEnd(C,2);var H=this.ExtractContents();D=C.cloneNode(false);D.removeAttribute('id',false);H.AppendTo(D);FCKDomTools.InsertAfterNode(C,D);this.MoveToPosition(C,4);if (FCKBrowserInfo.IsGecko&&!C.nodeName.IEquals(['ul','ol'])) FCKTools.AppendBogusBr(C);}};return {PreviousBlock:C,NextBlock:D,WasStartOfBlock:F,WasEndOfBlock:G,ElementPath:E};};return null;},FixBlock:function(A,B){var C=this.CreateBookmark();this.Collapse(A);this.Expand('block_contents');var D=this.Window.document.createElement(B);this.ExtractContents().AppendTo(D);FCKDomTools.TrimNode(D);if (FCKDomTools.CheckIsEmptyElement(D,function(element) { return element.getAttribute('_fck_bookmark')!='true';})&&FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(D);this.InsertNode(D);this.MoveToBookmark(C);return D;},Release:function(A){if (!A) this.Window=null;this.StartNode=null;this.StartContainer=null;this.StartBlock=null;this.StartBlockLimit=null;this.EndNode=null;this.EndContainer=null;this.EndBlock=null;this.EndBlockLimit=null;this._Range=null;this._Cache=null;},CheckHasRange:function(){return!!this._Range;},GetTouchedStartNode:function(){var A=this._Range;var B=A.startContainer;if (A.collapsed||B.nodeType!=1) return B;return B.childNodes[A.startOffset]||B;},GetTouchedEndNode:function(){var A=this._Range;var B=A.endContainer;if (A.collapsed||B.nodeType!=1) return B;return B.childNodes[A.endOffset-1]||B;}}; -FCKDomRange.prototype.MoveToSelection=function(){this.Release(true);var A=this.Window.getSelection();if (A&&A.rangeCount>0){this._Range=FCKW3CRange.CreateFromRange(this.Window.document,A.getRangeAt(0));this._UpdateElementInfo();}else if (this.Window.document) this.MoveToElementStart(this.Window.document.body);};FCKDomRange.prototype.Select=function(){var A=this._Range;if (A){var B=A.startContainer;if (A.collapsed&&B.nodeType==1&&B.childNodes.length==0) B.appendChild(A._Document.createTextNode(''));var C=this.Window.document.createRange();C.setStart(B,A.startOffset);try{C.setEnd(A.endContainer,A.endOffset);}catch (e){if (e.toString().Contains('NS_ERROR_ILLEGAL_VALUE')){A.collapse(true);C.setEnd(A.endContainer,A.endOffset);}else throw(e);};var D=this.Window.getSelection();D.removeAllRanges();D.addRange(C);}};FCKDomRange.prototype.SelectBookmark=function(A){var B=this.Window.document.createRange();var C=this.GetBookmarkNode(A,true);var D=this.GetBookmarkNode(A,false);B.setStart(C.parentNode,FCKDomTools.GetIndexOf(C));FCKDomTools.RemoveNode(C);if (D){B.setEnd(D.parentNode,FCKDomTools.GetIndexOf(D));FCKDomTools.RemoveNode(D);};var E=this.Window.getSelection();E.removeAllRanges();E.addRange(B);}; -var FCKDomRangeIterator=function(A){this.Range=A;this.ForceBrBreak=false;this.EnforceRealBlocks=false;};FCKDomRangeIterator.CreateFromSelection=function(A){var B=new FCKDomRange(A);B.MoveToSelection();return new FCKDomRangeIterator(B);};FCKDomRangeIterator.prototype={GetNextParagraph:function(){var A;var B;var C;var D;var E;var F=this.ForceBrBreak?FCKListsLib.ListBoundaries:FCKListsLib.BlockBoundaries;if (!this._LastNode){var B=this.Range.Clone();B.Expand(this.ForceBrBreak?'list_contents':'block_contents');this._NextNode=B.GetTouchedStartNode();this._LastNode=B.GetTouchedEndNode();B=null;};var H=this._NextNode;var I=this._LastNode;this._NextNode=null;while (H){var J=false;var K=(H.nodeType!=1);var L=false;if (!K){var M=H.nodeName.toLowerCase();if (F[M]&&(!FCKBrowserInfo.IsIE||H.scopeName=='HTML')){if (M=='br') K=true;else if (!B&&H.childNodes.length==0&&M!='hr'){A=H;C=H==I;break;};if (B){B.SetEnd(H,3,true);if (M!='br') this._NextNode=FCKDomTools.GetNextSourceNode(H,true,null,I);};J=true;}else{if (H.firstChild){if (!B){B=new FCKDomRange(this.Range.Window);B.SetStart(H,3,true);};H=H.firstChild;continue;};K=true;}}else if (H.nodeType==3){if (/^[\r\n\t ]+$/.test(H.nodeValue)) K=false;};if (K&&!B){B=new FCKDomRange(this.Range.Window);B.SetStart(H,3,true);};C=((!J||K)&&H==I);if (B&&!J){while (!H.nextSibling&&!C){var N=H.parentNode;if (F[N.nodeName.toLowerCase()]){J=true;C=C||(N==I);break;};H=N;K=true;C=(H==I);L=true;}};if (K) B.SetEnd(H,4,true);if ((J||C)&&B){B._UpdateElementInfo();if (B.StartNode==B.EndNode&&B.StartNode.parentNode==B.StartBlockLimit&&B.StartNode.getAttribute&&B.StartNode.getAttribute('_fck_bookmark')) B=null;else break;};if (C) break;H=FCKDomTools.GetNextSourceNode(H,L,null,I);};if (!A){if (!B){this._NextNode=null;return null;};A=B.StartBlock;if (!A&&!this.EnforceRealBlocks&&B.StartBlockLimit.nodeName.IEquals('DIV','TH','TD')&&B.CheckStartOfBlock()&&B.CheckEndOfBlock()){A=B.StartBlockLimit;}else if (!A||(this.EnforceRealBlocks&&A.nodeName.toLowerCase()=='li')){A=this.Range.Window.document.createElement(FCKConfig.EnterMode=='p'?'p':'div');B.ExtractContents().AppendTo(A);FCKDomTools.TrimNode(A);B.InsertNode(A);D=true;E=true;}else if (A.nodeName.toLowerCase()!='li'){if (!B.CheckStartOfBlock()||!B.CheckEndOfBlock()){A=A.cloneNode(false);B.ExtractContents().AppendTo(A);FCKDomTools.TrimNode(A);var O=B.SplitBlock();D=!O.WasStartOfBlock;E=!O.WasEndOfBlock;B.InsertNode(A);}}else if (!C){this._NextNode=A==I?null:FCKDomTools.GetNextSourceNode(B.EndNode,true,null,I);return A;}};if (D){var P=A.previousSibling;if (P&&P.nodeType==1){if (P.nodeName.toLowerCase()=='br') P.parentNode.removeChild(P);else if (P.lastChild&&P.lastChild.nodeName.IEquals('br')) P.removeChild(P.lastChild);}};if (E){var Q=A.lastChild;if (Q&&Q.nodeType==1&&Q.nodeName.toLowerCase()=='br') A.removeChild(Q);};if (!this._NextNode) this._NextNode=(C||A==I)?null:FCKDomTools.GetNextSourceNode(A,true,null,I);return A;}}; -var FCKDocumentFragment=function(A,B){this.RootNode=B||A.createDocumentFragment();};FCKDocumentFragment.prototype={AppendTo:function(A){A.appendChild(this.RootNode);},AppendHtml:function(A){var B=this.RootNode.ownerDocument.createElement('div');B.innerHTML=A;FCKDomTools.MoveChildren(B,this.RootNode);},InsertAfterNode:function(A){FCKDomTools.InsertAfterNode(A,this.RootNode);}}; -var FCKW3CRange=function(A){this._Document=A;this.startContainer=null;this.startOffset=null;this.endContainer=null;this.endOffset=null;this.collapsed=true;};FCKW3CRange.CreateRange=function(A){return new FCKW3CRange(A);};FCKW3CRange.CreateFromRange=function(A,B){var C=FCKW3CRange.CreateRange(A);C.setStart(B.startContainer,B.startOffset);C.setEnd(B.endContainer,B.endOffset);return C;};FCKW3CRange.prototype={_UpdateCollapsed:function(){this.collapsed=(this.startContainer==this.endContainer&&this.startOffset==this.endOffset);},setStart:function(A,B){this.startContainer=A;this.startOffset=B;if (!this.endContainer){this.endContainer=A;this.endOffset=B;};this._UpdateCollapsed();},setEnd:function(A,B){this.endContainer=A;this.endOffset=B;if (!this.startContainer){this.startContainer=A;this.startOffset=B;};this._UpdateCollapsed();},setStartAfter:function(A){this.setStart(A.parentNode,FCKDomTools.GetIndexOf(A)+1);},setStartBefore:function(A){this.setStart(A.parentNode,FCKDomTools.GetIndexOf(A));},setEndAfter:function(A){this.setEnd(A.parentNode,FCKDomTools.GetIndexOf(A)+1);},setEndBefore:function(A){this.setEnd(A.parentNode,FCKDomTools.GetIndexOf(A));},collapse:function(A){if (A){this.endContainer=this.startContainer;this.endOffset=this.startOffset;}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset;};this.collapsed=true;},selectNodeContents:function(A){this.setStart(A,0);this.setEnd(A,A.nodeType==3?A.data.length:A.childNodes.length);},insertNode:function(A){var B=this.startContainer;var C=this.startOffset;if (B.nodeType==3){B.splitText(C);if (B==this.endContainer) this.setEnd(B.nextSibling,this.endOffset-this.startOffset);FCKDomTools.InsertAfterNode(B,A);return;}else{B.insertBefore(A,B.childNodes[C]||null);if (B==this.endContainer){this.endOffset++;this.collapsed=false;}}},deleteContents:function(){if (this.collapsed) return;this._ExecContentsAction(0);},extractContents:function(){var A=new FCKDocumentFragment(this._Document);if (!this.collapsed) this._ExecContentsAction(1,A);return A;},cloneContents:function(){var A=new FCKDocumentFragment(this._Document);if (!this.collapsed) this._ExecContentsAction(2,A);return A;},_ExecContentsAction:function(A,B){var C=this.startContainer;var D=this.endContainer;var E=this.startOffset;var F=this.endOffset;var G=false;var H=false;if (D.nodeType==3) D=D.splitText(F);else{if (D.childNodes.length>0){if (F>D.childNodes.length-1){D=FCKDomTools.InsertAfterNode(D.lastChild,this._Document.createTextNode(''));H=true;}else D=D.childNodes[F];}};if (C.nodeType==3){C.splitText(E);if (C==D) D=C.nextSibling;}else{if (E==0){C=C.insertBefore(this._Document.createTextNode(''),C.firstChild);G=true;}else if (E>C.childNodes.length-1){C=C.appendChild(this._Document.createTextNode(''));G=true;}else C=C.childNodes[E].previousSibling;};var I=FCKDomTools.GetParents(C);var J=FCKDomTools.GetParents(D);var i,topStart,topEnd;for (i=0;i0&&levelStartNode!=D) levelClone=K.appendChild(levelStartNode.cloneNode(levelStartNode==D));if (!I[k]||levelStartNode.parentNode!=I[k].parentNode){currentNode=levelStartNode.previousSibling;while(currentNode){if (currentNode==I[k]||currentNode==C) break;currentSibling=currentNode.previousSibling;if (A==2) K.insertBefore(currentNode.cloneNode(true),K.firstChild);else{currentNode.parentNode.removeChild(currentNode);if (A==1) K.insertBefore(currentNode,K.firstChild);};currentNode=currentSibling;}};if (K) K=levelClone;};if (A==2){var L=this.startContainer;if (L.nodeType==3){L.data+=L.nextSibling.data;L.parentNode.removeChild(L.nextSibling);};var M=this.endContainer;if (M.nodeType==3&&M.nextSibling){M.data+=M.nextSibling.data;M.parentNode.removeChild(M.nextSibling);}}else{if (topStart&&topEnd&&(C.parentNode!=topStart.parentNode||D.parentNode!=topEnd.parentNode)){var N=FCKDomTools.GetIndexOf(topEnd);if (G&&topEnd.parentNode==C.parentNode) N--;this.setStart(topEnd.parentNode,N);};this.collapse(true);};if(G) C.parentNode.removeChild(C);if(H&&D.parentNode) D.parentNode.removeChild(D);},cloneRange:function(){return FCKW3CRange.CreateFromRange(this._Document,this);}}; -var FCKEnterKey=function(A,B,C,D){this.Window=A;this.EnterMode=B||'p';this.ShiftEnterMode=C||'br';var E=new FCKKeystrokeHandler(false);E._EnterKey=this;E.OnKeystroke=FCKEnterKey_OnKeystroke;E.SetKeystrokes([[13,'Enter'],[SHIFT+13,'ShiftEnter'],[8,'Backspace'],[CTRL+8,'CtrlBackspace'],[46,'Delete']]);this.TabText='';if (D>0||FCKBrowserInfo.IsSafari){while (D--) this.TabText+='\xa0';E.SetKeystrokes([9,'Tab']);};E.AttachToElement(A.document);};function FCKEnterKey_OnKeystroke(A,B){var C=this._EnterKey;try{switch (B){case 'Enter':return C.DoEnter();break;case 'ShiftEnter':return C.DoShiftEnter();break;case 'Backspace':return C.DoBackspace();break;case 'Delete':return C.DoDelete();break;case 'Tab':return C.DoTab();break;case 'CtrlBackspace':return C.DoCtrlBackspace();break;}}catch (e){};return false;};FCKEnterKey.prototype.DoEnter=function(A,B){FCKUndo.SaveUndoStep();this._HasShift=(B===true);var C=FCKSelection.GetParentElement();var D=new FCKElementPath(C);var E=A||this.EnterMode;if (E=='br'||D.Block&&D.Block.tagName.toLowerCase()=='pre') return this._ExecuteEnterBr();else return this._ExecuteEnterBlock(E);};FCKEnterKey.prototype.DoShiftEnter=function(){return this.DoEnter(this.ShiftEnterMode,true);};FCKEnterKey.prototype.DoBackspace=function(){var A=false;var B=new FCKDomRange(this.Window);B.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(B,this.Window.document.body)){this._FixIESelectAllBug(B);return true;};var C=B.CheckIsCollapsed();if (!C){if (FCKBrowserInfo.IsIE&&this.Window.document.selection.type.toLowerCase()=="control"){var D=this.Window.document.selection.createRange();for (var i=D.length-1;i>=0;i--){var E=D.item(i);E.parentNode.removeChild(E);};return true;};return false;};if (FCKBrowserInfo.IsIE){var F=FCKDomTools.GetPreviousSourceElement(B.StartNode,true);if (F&&F.nodeName.toLowerCase()=='br'){var G=B.Clone();G.SetStart(F,4);if (G.CheckIsEmpty()){F.parentNode.removeChild(F);return true;}}};var H=B.StartBlock;var I=B.EndBlock;if (B.StartBlockLimit==B.EndBlockLimit&&H&&I){if (!C){var J=B.CheckEndOfBlock();B.DeleteContents();if (H!=I){B.SetStart(I,1);B.SetEnd(I,1);};B.Select();A=(H==I);};if (B.CheckStartOfBlock()){var K=B.StartBlock;var L=FCKDomTools.GetPreviousSourceElement(K,true,['BODY',B.StartBlockLimit.nodeName],['UL','OL']);A=this._ExecuteBackspace(B,L,K);}else if (FCKBrowserInfo.IsGeckoLike){B.Select();}};B.Release();return A;};FCKEnterKey.prototype.DoCtrlBackspace=function(){FCKUndo.SaveUndoStep();var A=new FCKDomRange(this.Window);A.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(A,this.Window.document.body)){this._FixIESelectAllBug(A);return true;};return false;};FCKEnterKey.prototype._ExecuteBackspace=function(A,B,C){var D=false;if (!B&&C&&C.nodeName.IEquals('LI')&&C.parentNode.parentNode.nodeName.IEquals('LI')){this._OutdentWithSelection(C,A);return true;};if (B&&B.nodeName.IEquals('LI')){var E=FCKDomTools.GetLastChild(B,['UL','OL']);while (E){B=FCKDomTools.GetLastChild(E,'LI');E=FCKDomTools.GetLastChild(B,['UL','OL']);}};if (B&&C){if (C.nodeName.IEquals('LI')&&!B.nodeName.IEquals('LI')){this._OutdentWithSelection(C,A);return true;};var F=C.parentNode;var G=B.nodeName.toLowerCase();if (FCKListsLib.EmptyElements[G]!=null||G=='table'){FCKDomTools.RemoveNode(B);D=true;}else{FCKDomTools.RemoveNode(C);while (F.innerHTML.Trim().length==0){var H=F.parentNode;H.removeChild(F);F=H;};FCKDomTools.LTrimNode(C);FCKDomTools.RTrimNode(B);A.SetStart(B,2,true);A.Collapse(true);var I=A.CreateBookmark(true);if (!C.tagName.IEquals(['TABLE'])) FCKDomTools.MoveChildren(C,B);A.SelectBookmark(I);D=true;}};return D;};FCKEnterKey.prototype.DoDelete=function(){FCKUndo.SaveUndoStep();var A=false;var B=new FCKDomRange(this.Window);B.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(B,this.Window.document.body)){this._FixIESelectAllBug(B);return true;};if (B.CheckIsCollapsed()&&B.CheckEndOfBlock(FCKBrowserInfo.IsGeckoLike)){var C=B.StartBlock;var D=FCKTools.GetElementAscensor(C,'td');var E=FCKDomTools.GetNextSourceElement(C,true,[B.StartBlockLimit.nodeName],['UL','OL','TR'],true);if (D){var F=FCKTools.GetElementAscensor(E,'td');if (F!=D) return true;};A=this._ExecuteBackspace(B,C,E);};B.Release();return A;};FCKEnterKey.prototype.DoTab=function(){var A=new FCKDomRange(this.Window);A.MoveToSelection();var B=A._Range.startContainer;while (B){if (B.nodeType==1){var C=B.tagName.toLowerCase();if (C=="tr"||C=="td"||C=="th"||C=="tbody"||C=="table") return false;else break;};B=B.parentNode;};if (this.TabText){A.DeleteContents();A.InsertNode(this.Window.document.createTextNode(this.TabText));A.Collapse(false);A.Select();};return true;};FCKEnterKey.prototype._ExecuteEnterBlock=function(A,B){var C=B||new FCKDomRange(this.Window);var D=C.SplitBlock(A);if (D){var E=D.PreviousBlock;var F=D.NextBlock;var G=D.WasStartOfBlock;var H=D.WasEndOfBlock;if (F){if (F.parentNode.nodeName.IEquals('li')){FCKDomTools.BreakParent(F,F.parentNode);FCKDomTools.MoveNode(F,F.nextSibling,true);}}else if (E&&E.parentNode.nodeName.IEquals('li')){FCKDomTools.BreakParent(E,E.parentNode);C.MoveToElementEditStart(E.nextSibling);FCKDomTools.MoveNode(E,E.previousSibling);};if (!G&&!H){if (F.nodeName.IEquals('li')&&F.firstChild&&F.firstChild.nodeName.IEquals(['ul','ol'])) F.insertBefore(FCKTools.GetElementDocument(F).createTextNode('\xa0'),F.firstChild);if (F) C.MoveToElementEditStart(F);}else{if (G&&H&&E.tagName.toUpperCase()=='LI'){C.MoveToElementStart(E);this._OutdentWithSelection(E,C);C.Release();return true;};var I;if (E){var J=E.tagName.toUpperCase();if (!this._HasShift&&!(/^H[1-6]$/).test(J)){I=FCKDomTools.CloneElement(E);}}else if (F) I=FCKDomTools.CloneElement(F);if (!I) I=this.Window.document.createElement(A);var K=D.ElementPath;if (K){for (var i=0,len=K.Elements.length;i=0&&(C=B[i--])){if (C.name.length>0){if (C.innerHTML!==''){if (FCKBrowserInfo.IsIE) C.className+=' FCK__AnchorC';}else{var D=FCKDocumentProcessor_CreateFakeImage('FCK__Anchor',C.cloneNode(true));D.setAttribute('_fckanchor','true',0);C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}}}};var FCKPageBreaksProcessor=FCKDocumentProcessor.AppendNew();FCKPageBreaksProcessor.ProcessDocument=function(A){var B=A.getElementsByTagName('DIV');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){if (C.style.pageBreakAfter=='always'&&C.childNodes.length==1&&C.childNodes[0].style&&C.childNodes[0].style.display=='none'){var D=FCKDocumentProcessor_CreateFakeImage('FCK__PageBreak',C.cloneNode(true));C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}};FCKEmbedAndObjectProcessor=(function(){var A=[];var B=function(el){var C=el.cloneNode(true);var D;var E=D=FCKDocumentProcessor_CreateFakeImage('FCK__UnknownObject',C);FCKEmbedAndObjectProcessor.RefreshView(E,el);for (var i=0;i=0;i--) B(G[i]);};var H=function(doc){F('object',doc);F('embed',doc);};return FCKTools.Merge(FCKDocumentProcessor.AppendNew(),{ProcessDocument:function(doc){if (FCKBrowserInfo.IsGecko) FCKTools.RunFunction(H,this,[doc]);else H(doc);},RefreshView:function(placeHolder,original){if (original.getAttribute('width')>0) placeHolder.style.width=FCKTools.ConvertHtmlSizeToStyle(original.getAttribute('width'));if (original.getAttribute('height')>0) placeHolder.style.height=FCKTools.ConvertHtmlSizeToStyle(original.getAttribute('height'));},AddCustomHandler:function(func){A.push(func);}});})();FCK.GetRealElement=function(A){var e=FCKTempBin.Elements[A.getAttribute('_fckrealelement')];if (A.getAttribute('_fckflash')){if (A.style.width.length>0) e.width=FCKTools.ConvertStyleSizeToHtml(A.style.width);if (A.style.height.length>0) e.height=FCKTools.ConvertStyleSizeToHtml(A.style.height);};return e;};if (FCKBrowserInfo.IsIE){FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByTagName('HR');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){var D=A.createElement('hr');D.mergeAttributes(C,true);FCKDomTools.InsertAfterNode(C,D);C.parentNode.removeChild(C);}}};FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByTagName('INPUT');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){if (C.type=='hidden'){var D=FCKDocumentProcessor_CreateFakeImage('FCK__InputHidden',C.cloneNode(true));D.setAttribute('_fckinputhidden','true',0);C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}};FCKEmbedAndObjectProcessor.AddCustomHandler(function(A,B){if (!(A.nodeName.IEquals('embed')&&(A.type=='application/x-shockwave-flash'||/\.swf($|#|\?)/i.test(A.src)))) return;B.className='FCK__Flash';B.setAttribute('_fckflash','true',0);});if (FCKBrowserInfo.IsSafari){FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByClassName?A.getElementsByClassName('Apple-style-span'):Array.prototype.filter.call(A.getElementsByTagName('span'),function(item){ return item.className=='Apple-style-span';});for (var i=B.length-1;i>=0;i--) FCKDomTools.RemoveNode(B[i],true);}}; -var FCKSelection=FCK.Selection={GetParentBlock:function(){var A=this.GetParentElement();while (A){if (FCKListsLib.BlockBoundaries[A.nodeName.toLowerCase()]) break;A=A.parentNode;};return A;},ApplyStyle:function(A){FCKStyles.ApplyStyle(new FCKStyle(A));}}; -FCKSelection.GetType=function(){var A='Text';var B;try { B=this.GetSelection();} catch (e) {};if (B&&B.rangeCount==1){var C=B.getRangeAt(0);if (C.startContainer==C.endContainer&&(C.endOffset-C.startOffset)==1&&C.startContainer.nodeType==1&&FCKListsLib.StyleObjectElements[C.startContainer.childNodes[C.startOffset].nodeName.toLowerCase()]){A='Control';}};return A;};FCKSelection.GetSelectedElement=function(){var A=!!FCK.EditorWindow&&this.GetSelection();if (!A||A.rangeCount<1) return null;var B=A.getRangeAt(0);if (B.startContainer!=B.endContainer||B.startContainer.nodeType!=1||B.startOffset!=B.endOffset-1) return null;var C=B.startContainer.childNodes[B.startOffset];if (C.nodeType!=1) return null;return C;};FCKSelection.GetParentElement=function(){if (this.GetType()=='Control') return FCKSelection.GetSelectedElement().parentNode;else{var A=this.GetSelection();if (A){if (A.anchorNode&&A.anchorNode==A.focusNode){var B=A.getRangeAt(0);if (B.collapsed||B.startContainer.nodeType==3) return A.anchorNode.parentNode;else return A.anchorNode;};var C=new FCKElementPath(A.anchorNode);var D=new FCKElementPath(A.focusNode);var E=null;var F=null;if (C.Elements.length>D.Elements.length){E=C.Elements;F=D.Elements;}else{E=D.Elements;F=C.Elements;};var G=E.length-F.length;for(var i=0;i0){var C=B.getRangeAt(A?0:(B.rangeCount-1));var D=A?C.startContainer:C.endContainer;return (D.nodeType==1?D:D.parentNode);}};return null;};FCKSelection.SelectNode=function(A){var B=FCK.EditorDocument.createRange();B.selectNode(A);var C=this.GetSelection();C.removeAllRanges();C.addRange(B);};FCKSelection.Collapse=function(A){var B=this.GetSelection();if (A==null||A===true) B.collapseToStart();else B.collapseToEnd();};FCKSelection.HasAncestorNode=function(A){var B=this.GetSelectedElement();if (!B&&FCK.EditorWindow){try { B=this.GetSelection().getRangeAt(0).startContainer;}catch(e){}}while (B){if (B.nodeType==1&&B.nodeName.IEquals(A)) return true;B=B.parentNode;};return false;};FCKSelection.MoveToAncestorNode=function(A){var B;var C=this.GetSelectedElement();if (!C) C=this.GetSelection().getRangeAt(0).startContainer;while (C){if (C.nodeName.IEquals(A)) return C;C=C.parentNode;};return null;};FCKSelection.Delete=function(){var A=this.GetSelection();for (var i=0;i=0;i--){if (C[i]) FCKTableHandler.DeleteRows(C[i]);};return;};var E=FCKTools.GetElementAscensor(A,'TABLE');if (E.rows.length==1){FCKTableHandler.DeleteTable(E);return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteTable=function(A){if (!A){A=FCKSelection.GetSelectedElement();if (!A||A.tagName!='TABLE') A=FCKSelection.MoveToAncestorNode('TABLE');};if (!A) return;FCKSelection.SelectNode(A);FCKSelection.Collapse();if (A.parentNode.childNodes.length==1) A.parentNode.parentNode.removeChild(A.parentNode);else A.parentNode.removeChild(A);};FCKTableHandler.InsertColumn=function(A){var B=null;var C=this.GetSelectedCells();if (C&&C.length) B=C[A?0:(C.length-1)];if (!B) return;var D=FCKTools.GetElementAscensor(B,'TABLE');var E=B.cellIndex;for (var i=0;i=0;i--){if (B[i]) FCKTableHandler.DeleteColumns(B[i]);};return;};if (!A) return;var C=FCKTools.GetElementAscensor(A,'TABLE');var D=A.cellIndex;for (var i=C.rows.length-1;i>=0;i--){var E=C.rows[i];if (D==0&&E.cells.length==1){FCKTableHandler.DeleteRows(E);continue;};if (E.cells[D]) E.removeChild(E.cells[D]);}};FCKTableHandler.InsertCell=function(A,B){var C=null;var D=this.GetSelectedCells();if (D&&D.length) C=D[B?0:(D.length-1)];if (!C) return null;var E=FCK.EditorDocument.createElement('TD');if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(E);if (!B&&C.cellIndex==C.parentNode.cells.length-1) C.parentNode.appendChild(E);else C.parentNode.insertBefore(E,B?C:C.nextSibling);return E;};FCKTableHandler.DeleteCell=function(A){if (A.parentNode.cells.length==1){FCKTableHandler.DeleteRows(FCKTools.GetElementAscensor(A,'TR'));return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteCells=function(){var A=FCKTableHandler.GetSelectedCells();for (var i=A.length-1;i>=0;i--){FCKTableHandler.DeleteCell(A[i]);}};FCKTableHandler._MarkCells=function(A,B){for (var i=0;i=E.height){for (D=F;D0){var L=K.removeChild(K.firstChild);if (L.nodeType!=1||(L.getAttribute('type',2)!='_moz'&&L.getAttribute('_moz_dirty')!=null)){I.appendChild(L);J++;}}};if (J>0) I.appendChild(FCKTools.GetElementDocument(B).createElement('br'));};this._ReplaceCellsByMarker(C,'_SelectedCells',B);this._UnmarkCells(A,'_SelectedCells');this._InstallTableMap(C,B.parentNode.parentNode);B.appendChild(I);if (FCKBrowserInfo.IsGeckoLike&&(!B.firstChild)) FCKTools.AppendBogusBr(B);this._MoveCaretToCell(B,false);};FCKTableHandler.MergeRight=function(){var A=this.GetMergeRightTarget();if (A==null) return;var B=A.refCell;var C=A.tableMap;var D=A.nextCell;var E=FCK.EditorDocument.createDocumentFragment();while (D&&D.childNodes&&D.childNodes.length>0) E.appendChild(D.removeChild(D.firstChild));D.parentNode.removeChild(D);B.appendChild(E);this._MarkCells([D],'_Replace');this._ReplaceCellsByMarker(C,'_Replace',B);this._InstallTableMap(C,B.parentNode.parentNode);this._MoveCaretToCell(B,false);};FCKTableHandler.MergeDown=function(){var A=this.GetMergeDownTarget();if (A==null) return;var B=A.refCell;var C=A.tableMap;var D=A.nextCell;var E=FCKTools.GetElementDocument(B).createDocumentFragment();while (D&&D.childNodes&&D.childNodes.length>0) E.appendChild(D.removeChild(D.firstChild));if (E.firstChild) E.insertBefore(FCKTools.GetElementDocument(D).createElement('br'),E.firstChild);B.appendChild(E);this._MarkCells([D],'_Replace');this._ReplaceCellsByMarker(C,'_Replace',B);this._InstallTableMap(C,B.parentNode.parentNode);this._MoveCaretToCell(B,false);};FCKTableHandler.HorizontalSplitCell=function(){var A=FCKTableHandler.GetSelectedCells();if (A.length!=1) return;var B=A[0];var C=this._CreateTableMap(B.parentNode.parentNode);var D=B.parentNode.rowIndex;var E=FCKTableHandler._GetCellIndexSpan(C,D,B);var F=isNaN(B.colSpan)?1:B.colSpan;if (F>1){var G=Math.ceil(F/2);var H=FCKTools.GetElementDocument(B).createElement('td');if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(H);var I=E+G;var J=E+F;var K=isNaN(B.rowSpan)?1:B.rowSpan;for (var r=D;r1){B.rowSpan=Math.ceil(E/2);var G=F+Math.ceil(E/2);var H=null;for (var i=D+1;iG) L.insertBefore(K,L.rows[G]);else L.appendChild(K);for (var i=0;i0){var D=B.rows[0];D.parentNode.removeChild(D);};for (var i=0;iF) F=j;if (E._colScanned===true) continue;if (A[i][j-1]==E) E.colSpan++;if (A[i][j+1]!=E) E._colScanned=true;}};for (var i=0;i<=F;i++){for (var j=0;j ';var A=FCKDocumentProcessor_CreateFakeImage('FCK__PageBreak',e);var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.SplitBlock();B.InsertNode(A);FCK.Events.FireEvent('OnSelectionChange');};FCKPageBreakCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return 0;};var FCKUnlinkCommand=function(){this.Name='Unlink';};FCKUnlinkCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();if (FCKBrowserInfo.IsGeckoLike){var A=FCK.Selection.MoveToAncestorNode('A');if (A) FCKTools.RemoveOuterTags(A);return;};FCK.ExecuteNamedCommand(this.Name);};FCKUnlinkCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;var A=FCK.GetNamedCommandState(this.Name);if (A==0&&FCK.EditMode==0){var B=FCKSelection.MoveToAncestorNode('A');var C=(B&&B.name.length>0&&B.href.length==0);if (C) A=-1;};return A;};FCKVisitLinkCommand=function(){this.Name='VisitLink';};FCKVisitLinkCommand.prototype={GetState:function(){if (FCK.EditMode!=0) return -1;var A=FCK.GetNamedCommandState('Unlink');if (A==0){var B=FCKSelection.MoveToAncestorNode('A');if (!B.href) A=-1;};return A;},Execute:function(){var A=FCKSelection.MoveToAncestorNode('A');var B=A.getAttribute('_fcksavedurl')||A.getAttribute('href',2);if (!/:\/\//.test(B)){var C=FCKConfig.BaseHref;var D=FCK.GetInstanceObject('parent');if (!C){C=D.document.location.href;C=C.substring(0,C.lastIndexOf('/')+1);};if (/^\//.test(B)){try{C=C.match(/^.*:\/\/+[^\/]+/)[0];}catch (e){C=D.document.location.protocol+'://'+D.parent.document.location.host;}};B=C+B;};if (!window.open(B,'_blank')) alert(FCKLang.VisitLinkBlocked);}};var FCKSelectAllCommand=function(){this.Name='SelectAll';};FCKSelectAllCommand.prototype.Execute=function(){if (FCK.EditMode==0){FCK.ExecuteNamedCommand('SelectAll');}else{var A=FCK.EditingArea.Textarea;if (FCKBrowserInfo.IsIE){A.createTextRange().execCommand('SelectAll');}else{A.selectionStart=0;A.selectionEnd=A.value.length;};A.focus();}};FCKSelectAllCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return 0;};var FCKPasteCommand=function(){this.Name='Paste';};FCKPasteCommand.prototype={Execute:function(){if (FCKBrowserInfo.IsIE) FCK.Paste();else FCK.ExecuteNamedCommand('Paste');},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Paste');}};var FCKRuleCommand=function(){this.Name='Rule';};FCKRuleCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();FCK.InsertElement('hr');},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('InsertHorizontalRule');}};var FCKCutCopyCommand=function(A){this.Name=A?'Cut':'Copy';};FCKCutCopyCommand.prototype={Execute:function(){var A=false;if (FCKBrowserInfo.IsIE){var B=function(){A=true;};var C='on'+this.Name.toLowerCase();FCK.EditorDocument.body.attachEvent(C,B);FCK.ExecuteNamedCommand(this.Name);FCK.EditorDocument.body.detachEvent(C,B);}else{try{FCK.ExecuteNamedCommand(this.Name);A=true;}catch(e){}};if (!A) alert(FCKLang['PasteError'+this.Name]);},GetState:function(){return FCK.EditMode!=0?-1:FCK.GetNamedCommandState('Cut');}};var FCKAnchorDeleteCommand=function(){this.Name='AnchorDelete';};FCKAnchorDeleteCommand.prototype={Execute:function(){if (FCK.Selection.GetType()=='Control'){FCK.Selection.Delete();}else{var A=FCK.Selection.GetSelectedElement();if (A){if (A.tagName=='IMG'&&A.getAttribute('_fckanchor')) oAnchor=FCK.GetRealElement(A);else A=null;};if (!A){oAnchor=FCK.Selection.MoveToAncestorNode('A');if (oAnchor) FCK.Selection.SelectNode(oAnchor);};if (oAnchor.href.length!=0){oAnchor.removeAttribute('name');if (FCKBrowserInfo.IsIE) oAnchor.className=oAnchor.className.replace(FCKRegexLib.FCK_Class,'');return;};if (A){A.parentNode.removeChild(A);return;};if (oAnchor.innerHTML.length==0){oAnchor.parentNode.removeChild(oAnchor);return;};FCKTools.RemoveOuterTags(oAnchor);};if (FCKBrowserInfo.IsGecko) FCK.Selection.Collapse(true);},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Unlink');}};var FCKDeleteDivCommand=function(){};FCKDeleteDivCommand.prototype={GetState:function(){if (FCK.EditMode!=0) return -1;var A=FCKSelection.GetParentElement();var B=new FCKElementPath(A);return B.BlockLimit&&B.BlockLimit.nodeName.IEquals('div')?0:-1;},Execute:function(){FCKUndo.SaveUndoStep();var A=FCKDomTools.GetSelectedDivContainers();var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.CreateBookmark();for (var i=0;i\n \n
        \n '+FCKLang.ColorAutomatic+'\n \n ';FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_AutoOnClick,this);if (!FCKBrowserInfo.IsIE) C.style.width='96%';var G=FCKConfig.FontColors.toString().split(',');var H=0;while (H
    ';if (H>=G.length) C.style.visibility='hidden';else FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_OnClick,[this,L]);}};if (FCKConfig.EnableMoreFontColors){E=D.insertRow(-1).insertCell(-1);E.colSpan=8;C=E.appendChild(CreateSelectionDiv());C.innerHTML='
    '+FCKLang.ColorMoreColors+'
    ';FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_MoreOnClick,this);};if (!FCKBrowserInfo.IsIE) C.style.width='96%';}; -var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Paste');}; -var FCKPasteWordCommand=function(){this.Name='PasteWord';};FCKPasteWordCommand.prototype.Execute=function(){FCK.PasteFromWord();};FCKPasteWordCommand.prototype.GetState=function(){if (FCK.EditMode!=0||FCKConfig.ForcePasteAsPlainText) return -1;else return FCK.GetNamedCommandState('Paste');}; -var FCKTableCommand=function(A){this.Name=A;};FCKTableCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();if (!FCKBrowserInfo.IsGecko){switch (this.Name){case 'TableMergeRight':return FCKTableHandler.MergeRight();case 'TableMergeDown':return FCKTableHandler.MergeDown();}};switch (this.Name){case 'TableInsertRowAfter':return FCKTableHandler.InsertRow(false);case 'TableInsertRowBefore':return FCKTableHandler.InsertRow(true);case 'TableDeleteRows':return FCKTableHandler.DeleteRows();case 'TableInsertColumnAfter':return FCKTableHandler.InsertColumn(false);case 'TableInsertColumnBefore':return FCKTableHandler.InsertColumn(true);case 'TableDeleteColumns':return FCKTableHandler.DeleteColumns();case 'TableInsertCellAfter':return FCKTableHandler.InsertCell(null,false);case 'TableInsertCellBefore':return FCKTableHandler.InsertCell(null,true);case 'TableDeleteCells':return FCKTableHandler.DeleteCells();case 'TableMergeCells':return FCKTableHandler.MergeCells();case 'TableHorizontalSplitCell':return FCKTableHandler.HorizontalSplitCell();case 'TableVerticalSplitCell':return FCKTableHandler.VerticalSplitCell();case 'TableDelete':return FCKTableHandler.DeleteTable();default:return alert(FCKLang.UnknownCommand.replace(/%1/g,this.Name));}};FCKTableCommand.prototype.GetState=function(){if (FCK.EditorDocument!=null&&FCKSelection.HasAncestorNode('TABLE')){switch (this.Name){case 'TableHorizontalSplitCell':case 'TableVerticalSplitCell':if (FCKTableHandler.GetSelectedCells().length==1) return 0;else return -1;case 'TableMergeCells':if (FCKTableHandler.CheckIsSelectionRectangular()&&FCKTableHandler.GetSelectedCells().length>1) return 0;else return -1;case 'TableMergeRight':return FCKTableHandler.GetMergeRightTarget()?0:-1;case 'TableMergeDown':return FCKTableHandler.GetMergeDownTarget()?0:-1;default:return 0;}}else return -1;}; -var FCKFitWindow=function(){this.Name='FitWindow';};FCKFitWindow.prototype.Execute=function(){var A=window.frameElement;var B=A.style;var C=parent;var D=C.document.documentElement;var E=C.document.body;var F=E.style;var G;var H=new FCKDomRange(FCK.EditorWindow);H.MoveToSelection();var I=FCKTools.GetScrollPosition(FCK.EditorWindow);if (!this.IsMaximized){if(FCKBrowserInfo.IsIE) C.attachEvent('onresize',FCKFitWindow_Resize);else C.addEventListener('resize',FCKFitWindow_Resize,true);this._ScrollPos=FCKTools.GetScrollPosition(C);G=A;while((G=G.parentNode)){if (G.nodeType==1){G._fckSavedStyles=FCKTools.SaveStyles(G);G.style.zIndex=FCKConfig.FloatingPanelsZIndex-1;}};if (FCKBrowserInfo.IsIE){this.documentElementOverflow=D.style.overflow;D.style.overflow='hidden';F.overflow='hidden';}else{F.overflow='hidden';F.width='0px';F.height='0px';};this._EditorFrameStyles=FCKTools.SaveStyles(A);var J=FCKTools.GetViewPaneSize(C);B.position="absolute";A.offsetLeft;B.zIndex=FCKConfig.FloatingPanelsZIndex-1;B.left="0px";B.top="0px";B.width=J.Width+"px";B.height=J.Height+"px";if (!FCKBrowserInfo.IsIE){B.borderRight=B.borderBottom="9999px solid white";B.backgroundColor="white";};C.scrollTo(0,0);var K=FCKTools.GetWindowPosition(C,A);if (K.x!=0) B.left=(-1*K.x)+"px";if (K.y!=0) B.top=(-1*K.y)+"px";this.IsMaximized=true;}else{if(FCKBrowserInfo.IsIE) C.detachEvent("onresize",FCKFitWindow_Resize);else C.removeEventListener("resize",FCKFitWindow_Resize,true);G=A;while((G=G.parentNode)){if (G._fckSavedStyles){FCKTools.RestoreStyles(G,G._fckSavedStyles);G._fckSavedStyles=null;}};if (FCKBrowserInfo.IsIE) D.style.overflow=this.documentElementOverflow;FCKTools.RestoreStyles(A,this._EditorFrameStyles);C.scrollTo(this._ScrollPos.X,this._ScrollPos.Y);this.IsMaximized=false;};FCKToolbarItems.GetItem('FitWindow').RefreshState();if (FCK.EditMode==0) FCK.EditingArea.MakeEditable();FCK.Focus();H.Select();FCK.EditorWindow.scrollTo(I.X,I.Y);};FCKFitWindow.prototype.GetState=function(){if (FCKConfig.ToolbarLocation!='In') return -1;else return (this.IsMaximized?1:0);};function FCKFitWindow_Resize(){var A=FCKTools.GetViewPaneSize(parent);var B=window.frameElement.style;B.width=A.Width+'px';B.height=A.Height+'px';}; -var FCKListCommand=function(A,B){this.Name=A;this.TagName=B;};FCKListCommand.prototype={GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=FCKSelection.GetBoundaryParentElement(true);var B=A;while (B){if (B.nodeName.IEquals(['ul','ol'])) break;B=B.parentNode;};if (B&&B.nodeName.IEquals(this.TagName)) return 1;else return 0;},Execute:function(){FCKUndo.SaveUndoStep();var A=FCK.EditorDocument;var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=this.GetState();if (C==0){FCKDomTools.TrimNode(A.body);if (!A.body.firstChild){var D=A.createElement('p');A.body.appendChild(D);B.MoveToNodeContents(D);}};var E=B.CreateBookmark();var F=[];var G={};var H=new FCKDomRangeIterator(B);var I;H.ForceBrBreak=(C==0);var J=true;var K=null;while (J){while ((I=H.GetNextParagraph())){var L=new FCKElementPath(I);var M=null;var N=false;var O=L.BlockLimit;for (var i=L.Elements.length-1;i>=0;i--){var P=L.Elements[i];if (P.nodeName.IEquals(['ol','ul'])){if (O._FCK_ListGroupObject) O._FCK_ListGroupObject=null;var Q=P._FCK_ListGroupObject;if (Q) Q.contents.push(I);else{Q={ 'root':P,'contents':[I] };F.push(Q);FCKDomTools.SetElementMarker(G,P,'_FCK_ListGroupObject',Q);};N=true;break;}};if (N) continue;var R=O;if (R._FCK_ListGroupObject) R._FCK_ListGroupObject.contents.push(I);else{var Q={ 'root':R,'contents':[I] };FCKDomTools.SetElementMarker(G,R,'_FCK_ListGroupObject',Q);F.push(Q);}};if (FCKBrowserInfo.IsIE) J=false;else{if (K==null){K=[];var T=FCKSelection.GetSelection();if (T&&F.length==0) K.push(T.getRangeAt(0));for (var i=1;T&&i0){var Q=F.shift();if (C==0){if (Q.root.nodeName.IEquals(['ul','ol'])) this._ChangeListType(Q,G,W);else this._CreateList(Q,W);}else if (C==1&&Q.root.nodeName.IEquals(['ul','ol'])) this._RemoveList(Q,G);};for (var i=0;iC[i-1].indent+1){var H=C[i-1].indent+1-C[i].indent;var I=C[i].indent;while (C[i]&&C[i].indent>=I){C[i].indent+=H;i++;};i--;}};var J=FCKDomTools.ArrayToList(C,B);if (A.root.nextSibling==null||A.root.nextSibling.nodeName.IEquals('br')){if (J.listNode.lastChild.nodeName.IEquals('br')) J.listNode.removeChild(J.listNode.lastChild);};A.root.parentNode.replaceChild(J.listNode,A.root);}}; -var FCKJustifyCommand=function(A){this.AlignValue=A;var B=FCKConfig.ContentLangDirection.toLowerCase();this.IsDefaultAlign=(A=='left'&&B=='ltr')||(A=='right'&&B=='rtl');var C=this._CssClassName=(function(){var D=FCKConfig.JustifyClasses;if (D){switch (A){case 'left':return D[0]||null;case 'center':return D[1]||null;case 'right':return D[2]||null;case 'justify':return D[3]||null;}};return null;})();if (C&&C.length>0) this._CssClassRegex=new RegExp('(?:^|\\s+)'+C+'(?=$|\\s)');};FCKJustifyCommand._GetClassNameRegex=function(){var A=FCKJustifyCommand._ClassRegex;if (A!=undefined) return A;var B=[];var C=FCKConfig.JustifyClasses;if (C){for (var i=0;i<4;i++){var D=C[i];if (D&&D.length>0) B.push(D);}};if (B.length>0) A=new RegExp('(?:^|\\s+)(?:'+B.join('|')+')(?=$|\\s)');else A=null;return FCKJustifyCommand._ClassRegex=A;};FCKJustifyCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();var A=new FCKDomRange(FCK.EditorWindow);A.MoveToSelection();var B=this.GetState();if (B==-1) return;var C=A.CreateBookmark();var D=this._CssClassName;var E=new FCKDomRangeIterator(A);var F;while ((F=E.GetNextParagraph())){F.removeAttribute('align');if (D){var G=F.className.replace(FCKJustifyCommand._GetClassNameRegex(),'');if (B==0){if (G.length>0) G+=' ';F.className=G+D;}else if (G.length==0) FCKDomTools.RemoveAttribute(F,'class');}else{var H=F.style;if (B==0) H.textAlign=this.AlignValue;else{H.textAlign='';if (H.cssText.length==0) F.removeAttribute('style');}}};A.MoveToBookmark(C);A.Select();FCK.Focus();FCK.Events.FireEvent('OnSelectionChange');},GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=new FCKElementPath(FCKSelection.GetBoundaryParentElement(true));var B=A.Block||A.BlockLimit;if (!B||B.nodeName.toLowerCase()=='body') return 0;var C;if (FCKBrowserInfo.IsIE) C=B.currentStyle.textAlign;else C=FCK.EditorWindow.getComputedStyle(B,'').getPropertyValue('text-align');C=C.replace(/(-moz-|-webkit-|start|auto)/i,'');if ((!C&&this.IsDefaultAlign)||C==this.AlignValue) return 1;return 0;}}; -var FCKIndentCommand=function(A,B){this.Name=A;this.Offset=B;this.IndentCSSProperty=FCKConfig.ContentLangDirection.IEquals('ltr')?'marginLeft':'marginRight';};FCKIndentCommand._InitIndentModeParameters=function(){if (FCKConfig.IndentClasses&&FCKConfig.IndentClasses.length>0){this._UseIndentClasses=true;this._IndentClassMap={};for (var i=0;i0?H+' ':'')+FCKConfig.IndentClasses[G-1];}else{var I=parseInt(E.style[this.IndentCSSProperty],10);if (isNaN(I)) I=0;I+=this.Offset;I=Math.max(I,0);I=Math.ceil(I/this.Offset)*this.Offset;E.style[this.IndentCSSProperty]=I?I+FCKConfig.IndentUnit:'';if (E.getAttribute('style')=='') E.removeAttribute('style');}}},_IndentList:function(A,B){var C=A.StartContainer;var D=A.EndContainer;while (C&&C.parentNode!=B) C=C.parentNode;while (D&&D.parentNode!=B) D=D.parentNode;if (!C||!D) return;var E=C;var F=[];var G=false;while (G==false){if (E==D) G=true;F.push(E);E=E.nextSibling;};if (F.length<1) return;var H=FCKDomTools.GetParents(B);for (var i=0;iN;i++) M[i].indent+=I;var O=FCKDomTools.ArrayToList(M);if (O) B.parentNode.replaceChild(O.listNode,B);FCKDomTools.ClearAllMarkers(L);}}; -var FCKBlockQuoteCommand=function(){};FCKBlockQuoteCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();var A=this.GetState();var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.CreateBookmark();if (FCKBrowserInfo.IsIE){var D=B.GetBookmarkNode(C,true);var E=B.GetBookmarkNode(C,false);var F;if (D&&D.parentNode.nodeName.IEquals('blockquote')&&!D.previousSibling){F=D;while ((F=F.nextSibling)){if (FCKListsLib.BlockElements[F.nodeName.toLowerCase()]) FCKDomTools.MoveNode(D,F,true);}};if (E&&E.parentNode.nodeName.IEquals('blockquote')&&!E.previousSibling){F=E;while ((F=F.nextSibling)){if (FCKListsLib.BlockElements[F.nodeName.toLowerCase()]){if (F.firstChild==D) FCKDomTools.InsertAfterNode(D,E);else FCKDomTools.MoveNode(E,F,true);}}}};var G=new FCKDomRangeIterator(B);var H;if (A==0){G.EnforceRealBlocks=true;var I=[];while ((H=G.GetNextParagraph())) I.push(H);if (I.length<1){para=B.Window.document.createElement(FCKConfig.EnterMode.IEquals('p')?'p':'div');B.InsertNode(para);para.appendChild(B.Window.document.createTextNode('\ufeff'));B.MoveToBookmark(C);B.MoveToNodeContents(para);B.Collapse(true);C=B.CreateBookmark();I.push(para);};var J=I[0].parentNode;var K=[];for (var i=0;i0){H=I.shift();while (H.parentNode!=J) H=H.parentNode;if (H!=L) K.push(H);L=H;}while (K.length>0){H=K.shift();if (H.nodeName.IEquals('blockquote')){var M=FCKTools.GetElementDocument(H).createDocumentFragment();while (H.firstChild){M.appendChild(H.removeChild(H.firstChild));I.push(M.lastChild);};H.parentNode.replaceChild(M,H);}else I.push(H);};var N=B.Window.document.createElement('blockquote');J.insertBefore(N,I[0]);while (I.length>0){H=I.shift();N.appendChild(H);}}else if (A==1){var O=[];while ((H=G.GetNextParagraph())){var P=null;var Q=null;while (H.parentNode){if (H.parentNode.nodeName.IEquals('blockquote')){P=H.parentNode;Q=H;break;};H=H.parentNode;};if (P&&Q) O.push(Q);};var R=[];while (O.length>0){var S=O.shift();var N=S.parentNode;if (S==S.parentNode.firstChild){N.parentNode.insertBefore(N.removeChild(S),N);if (!N.firstChild) N.parentNode.removeChild(N);}else if (S==S.parentNode.lastChild){N.parentNode.insertBefore(N.removeChild(S),N.nextSibling);if (!N.firstChild) N.parentNode.removeChild(N);}else FCKDomTools.BreakParent(S,S.parentNode,B);R.push(S);};if (FCKConfig.EnterMode.IEquals('br')){while (R.length){var S=R.shift();var W=true;if (S.nodeName.IEquals('div')){var M=FCKTools.GetElementDocument(S).createDocumentFragment();var Y=W&&S.previousSibling&&!FCKListsLib.BlockBoundaries[S.previousSibling.nodeName.toLowerCase()];if (W&&Y) M.appendChild(FCKTools.GetElementDocument(S).createElement('br'));var Z=S.nextSibling&&!FCKListsLib.BlockBoundaries[S.nextSibling.nodeName.toLowerCase()];while (S.firstChild) M.appendChild(S.removeChild(S.firstChild));if (Z) M.appendChild(FCKTools.GetElementDocument(S).createElement('br'));S.parentNode.replaceChild(M,S);W=false;}}}};B.MoveToBookmark(C);B.Select();FCK.Focus();FCK.Events.FireEvent('OnSelectionChange');},GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=new FCKElementPath(FCKSelection.GetBoundaryParentElement(true));var B=A.Block||A.BlockLimit;if (!B||B.nodeName.toLowerCase()=='body') return 0;for (var i=0;i';B.open();B.write(''+F+'<\/head><\/body><\/html>');B.close();if(FCKBrowserInfo.IsAIR) FCKAdobeAIR.Panel_Contructor(B,window.document.location);FCKTools.AddEventListenerEx(E,'focus',FCKPanel_Window_OnFocus,this);FCKTools.AddEventListenerEx(E,'blur',FCKPanel_Window_OnBlur,this);};B.dir=FCKLang.Dir;FCKTools.AddEventListener(B,'contextmenu',FCKTools.CancelEvent);this.MainNode=B.body.appendChild(B.createElement('DIV'));this.MainNode.style.cssFloat=this.IsRTL?'right':'left';};FCKPanel.prototype.AppendStyleSheet=function(A){FCKTools.AppendStyleSheet(this.Document,A);};FCKPanel.prototype.Preload=function(x,y,A){if (this._Popup) this._Popup.show(x,y,0,0,A);};FCKPanel.prototype.Show=function(x,y,A,B,C){var D;var E=this.MainNode;if (this._Popup){this._Popup.show(x,y,0,0,A);FCKDomTools.SetElementStyles(E,{B:B?B+'px':'',C:C?C+'px':''});D=E.offsetWidth;if (this.IsRTL){if (this.IsContextMenu) x=x-D+1;else if (A) x=(x*-1)+A.offsetWidth-D;};this._Popup.show(x,y,D,E.offsetHeight,A);if (this.OnHide){if (this._Timer) CheckPopupOnHide.call(this,true);this._Timer=FCKTools.SetInterval(CheckPopupOnHide,100,this);}}else{if (typeof(FCK.ToolbarSet.CurrentInstance.FocusManager)!='undefined') FCK.ToolbarSet.CurrentInstance.FocusManager.Lock();if (this.ParentPanel){this.ParentPanel.Lock();FCKPanel_Window_OnBlur(null,this.ParentPanel);};if (FCKBrowserInfo.IsGecko&&FCKBrowserInfo.IsMac){this._IFrame.scrolling='';FCKTools.RunFunction(function(){ this._IFrame.scrolling='no';},this);};if (FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel&&FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel!=this) FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel.Hide(false,true);FCKDomTools.SetElementStyles(E,{B:B?B+'px':'',C:C?C+'px':''});D=E.offsetWidth;if (!B) this._IFrame.width=1;if (!C) this._IFrame.height=1;D=E.offsetWidth||E.firstChild.offsetWidth;var F=FCKTools.GetDocumentPosition(this._Window,A.nodeType==9?(FCKTools.IsStrictMode(A)?A.documentElement:A.body):A);var G=FCKDomTools.GetPositionedAncestor(this._IFrame.parentNode);if (G){var H=FCKTools.GetDocumentPosition(FCKTools.GetElementWindow(G),G);F.x-=H.x;F.y-=H.y;};if (this.IsRTL&&!this.IsContextMenu) x=(x*-1);x+=F.x;y+=F.y;if (this.IsRTL){if (this.IsContextMenu) x=x-D+1;else if (A) x=x+A.offsetWidth-D;}else{var I=FCKTools.GetViewPaneSize(this._Window);var J=FCKTools.GetScrollPosition(this._Window);var K=I.Height+J.Y;var L=I.Width+J.X;if ((x+D)>L) x-=x+D-L;if ((y+E.offsetHeight)>K) y-=y+E.offsetHeight-K;};FCKDomTools.SetElementStyles(this._IFrame,{left:x+'px',top:y+'px'});this._IFrame.contentWindow.focus();this._IsOpened=true;var M=this;this._resizeTimer=setTimeout(function(){var N=E.offsetWidth||E.firstChild.offsetWidth;var O=E.offsetHeight;M._IFrame.style.width=N+'px';M._IFrame.style.height=O+'px';},0);FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel=this;};FCKTools.RunFunction(this.OnShow,this);};FCKPanel.prototype.Hide=function(A,B){if (this._Popup) this._Popup.hide();else{if (!this._IsOpened||this._LockCounter>0) return;if (typeof(FCKFocusManager)!='undefined'&&!B) FCKFocusManager.Unlock();this._IFrame.style.width=this._IFrame.style.height='0px';this._IsOpened=false;if (this._resizeTimer){clearTimeout(this._resizeTimer);this._resizeTimer=null;};if (this.ParentPanel) this.ParentPanel.Unlock();if (!A) FCKTools.RunFunction(this.OnHide,this);}};FCKPanel.prototype.CheckIsOpened=function(){if (this._Popup) return this._Popup.isOpen;else return this._IsOpened;};FCKPanel.prototype.CreateChildPanel=function(){var A=this._Popup?FCKTools.GetDocumentWindow(this.Document):this._Window;var B=new FCKPanel(A);B.ParentPanel=this;return B;};FCKPanel.prototype.Lock=function(){this._LockCounter++;};FCKPanel.prototype.Unlock=function(){if (--this._LockCounter==0&&!this.HasFocus) this.Hide();};function FCKPanel_Window_OnFocus(e,A){A.HasFocus=true;};function FCKPanel_Window_OnBlur(e,A){A.HasFocus=false;if (A._LockCounter==0) FCKTools.RunFunction(A.Hide,A);};function CheckPopupOnHide(A){if (A||!this._Popup.isOpen){window.clearInterval(this._Timer);this._Timer=null;FCKTools.RunFunction(this.OnHide,this);}};function FCKPanel_Cleanup(){this._Popup=null;this._Window=null;this.Document=null;this.MainNode=null;}; -var FCKIcon=function(A){var B=A?typeof(A):'undefined';switch (B){case 'number':this.Path=FCKConfig.SkinPath+'fck_strip.gif';this.Size=16;this.Position=A;break;case 'undefined':this.Path=FCK_SPACER_PATH;break;case 'string':this.Path=A;break;default:this.Path=A[0];this.Size=A[1];this.Position=A[2];}};FCKIcon.prototype.CreateIconElement=function(A){var B,eIconImage;if (this.Position){var C='-'+((this.Position-1)*this.Size)+'px';if (FCKBrowserInfo.IsIE){B=A.createElement('DIV');eIconImage=B.appendChild(A.createElement('IMG'));eIconImage.src=this.Path;eIconImage.style.top=C;}else{B=A.createElement('IMG');B.src=FCK_SPACER_PATH;B.style.backgroundPosition='0px '+C;B.style.backgroundImage='url("'+this.Path+'")';}}else{if (FCKBrowserInfo.IsIE){B=A.createElement('DIV');eIconImage=B.appendChild(A.createElement('IMG'));eIconImage.src=this.Path?this.Path:FCK_SPACER_PATH;}else{B=A.createElement('IMG');B.src=this.Path?this.Path:FCK_SPACER_PATH;}};B.className='TB_Button_Image';return B;}; -var FCKToolbarButtonUI=function(A,B,C,D,E,F){this.Name=A;this.Label=B||A;this.Tooltip=C||this.Label;this.Style=E||0;this.State=F||0;this.Icon=new FCKIcon(D);if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKToolbarButtonUI_Cleanup);};FCKToolbarButtonUI.prototype._CreatePaddingElement=function(A){var B=A.createElement('IMG');B.className='TB_Button_Padding';B.src=FCK_SPACER_PATH;return B;};FCKToolbarButtonUI.prototype.Create=function(A){var B=FCKTools.GetElementDocument(A);var C=this.MainElement=B.createElement('DIV');C.title=this.Tooltip;if (FCKBrowserInfo.IsGecko) C.onmousedown=FCKTools.CancelEvent;FCKTools.AddEventListenerEx(C,'mouseover',FCKToolbarButtonUI_OnMouseOver,this);FCKTools.AddEventListenerEx(C,'mouseout',FCKToolbarButtonUI_OnMouseOut,this);FCKTools.AddEventListenerEx(C,'click',FCKToolbarButtonUI_OnClick,this);this.ChangeState(this.State,true);if (this.Style==0&&!this.ShowArrow){C.appendChild(this.Icon.CreateIconElement(B));}else{var D=C.appendChild(B.createElement('TABLE'));D.cellPadding=0;D.cellSpacing=0;var E=D.insertRow(-1);var F=E.insertCell(-1);if (this.Style==0||this.Style==2) F.appendChild(this.Icon.CreateIconElement(B));else F.appendChild(this._CreatePaddingElement(B));if (this.Style==1||this.Style==2){F=E.insertCell(-1);F.className='TB_Button_Text';F.noWrap=true;F.appendChild(B.createTextNode(this.Label));};if (this.ShowArrow){if (this.Style!=0){E.insertCell(-1).appendChild(this._CreatePaddingElement(B));};F=E.insertCell(-1);var G=F.appendChild(B.createElement('IMG'));G.src=FCKConfig.SkinPath+'images/toolbar.buttonarrow.gif';G.width=5;G.height=3;};F=E.insertCell(-1);F.appendChild(this._CreatePaddingElement(B));};A.appendChild(C);};FCKToolbarButtonUI.prototype.ChangeState=function(A,B){if (!B&&this.State==A) return;var e=this.MainElement;if (!e) return;switch (parseInt(A,10)){case 0:e.className='TB_Button_Off';break;case 1:e.className='TB_Button_On';break;case -1:e.className='TB_Button_Disabled';break;};this.State=A;};function FCKToolbarButtonUI_OnMouseOver(A,B){if (B.State==0) this.className='TB_Button_Off_Over';else if (B.State==1) this.className='TB_Button_On_Over';};function FCKToolbarButtonUI_OnMouseOut(A,B){if (B.State==0) this.className='TB_Button_Off';else if (B.State==1) this.className='TB_Button_On';};function FCKToolbarButtonUI_OnClick(A,B){if (B.OnClick&&B.State!=-1) B.OnClick(B);};function FCKToolbarButtonUI_Cleanup(){this.MainElement=null;}; -var FCKToolbarButton=function(A,B,C,D,E,F,G){this.CommandName=A;this.Label=B;this.Tooltip=C;this.Style=D;this.SourceView=E?true:false;this.ContextSensitive=F?true:false;if (G==null) this.IconPath=FCKConfig.SkinPath+'toolbar/'+A.toLowerCase()+'.gif';else if (typeof(G)=='number') this.IconPath=[FCKConfig.SkinPath+'fck_strip.gif',16,G];else this.IconPath=G;};FCKToolbarButton.prototype.Create=function(A){this._UIButton=new FCKToolbarButtonUI(this.CommandName,this.Label,this.Tooltip,this.IconPath,this.Style);this._UIButton.OnClick=this.Click;this._UIButton._ToolbarButton=this;this._UIButton.Create(A);};FCKToolbarButton.prototype.RefreshState=function(){var A=this._UIButton;if (!A) return;var B=FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).GetState();if (B==A.State) return;A.ChangeState(B);};FCKToolbarButton.prototype.Click=function(){var A=this._ToolbarButton||this;FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(A.CommandName).Execute();};FCKToolbarButton.prototype.Enable=function(){this.RefreshState();};FCKToolbarButton.prototype.Disable=function(){this._UIButton.ChangeState(-1);}; -var FCKSpecialCombo=function(A,B,C,D,E){this.FieldWidth=B||100;this.PanelWidth=C||150;this.PanelMaxHeight=D||150;this.Label=' ';this.Caption=A;this.Tooltip=A;this.Style=2;this.Enabled=true;this.Items={};this._Panel=new FCKPanel(E||window);this._Panel.AppendStyleSheet(FCKConfig.SkinEditorCSS);this._PanelBox=this._Panel.MainNode.appendChild(this._Panel.Document.createElement('DIV'));this._PanelBox.className='SC_Panel';this._PanelBox.style.width=this.PanelWidth+'px';this._PanelBox.innerHTML='
    ';this._ItemsHolderEl=this._PanelBox.getElementsByTagName('TD')[0];if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKSpecialCombo_Cleanup);};function FCKSpecialCombo_ItemOnMouseOver(){this.className+=' SC_ItemOver';};function FCKSpecialCombo_ItemOnMouseOut(){this.className=this.originalClass;};function FCKSpecialCombo_ItemOnClick(A,B,C){this.className=this.originalClass;B._Panel.Hide();B.SetLabel(this.FCKItemLabel);if (typeof(B.OnSelect)=='function') B.OnSelect(C,this);};FCKSpecialCombo.prototype.ClearItems=function (){if (this.Items) this.Items={};var A=this._ItemsHolderEl;while (A.firstChild) A.removeChild(A.firstChild);};FCKSpecialCombo.prototype.AddItem=function(A,B,C,D){var E=this._ItemsHolderEl.appendChild(this._Panel.Document.createElement('DIV'));E.className=E.originalClass='SC_Item';E.innerHTML=B;E.FCKItemLabel=C||A;E.Selected=false;if (FCKBrowserInfo.IsIE) E.style.width='100%';if (D) E.style.backgroundColor=D;FCKTools.AddEventListenerEx(E,'mouseover',FCKSpecialCombo_ItemOnMouseOver);FCKTools.AddEventListenerEx(E,'mouseout',FCKSpecialCombo_ItemOnMouseOut);FCKTools.AddEventListenerEx(E,'click',FCKSpecialCombo_ItemOnClick,[this,A]);this.Items[A.toString().toLowerCase()]=E;return E;};FCKSpecialCombo.prototype.SelectItem=function(A){if (typeof A=='string') A=this.Items[A.toString().toLowerCase()];if (A){A.className=A.originalClass='SC_ItemSelected';A.Selected=true;}};FCKSpecialCombo.prototype.SelectItemByLabel=function(A,B){for (var C in this.Items){var D=this.Items[C];if (D.FCKItemLabel==A){D.className=D.originalClass='SC_ItemSelected';D.Selected=true;if (B) this.SetLabel(A);}}};FCKSpecialCombo.prototype.DeselectAll=function(A){for (var i in this.Items){if (!this.Items[i]) continue;this.Items[i].className=this.Items[i].originalClass='SC_Item';this.Items[i].Selected=false;};if (A) this.SetLabel('');};FCKSpecialCombo.prototype.SetLabelById=function(A){A=A?A.toString().toLowerCase():'';var B=this.Items[A];this.SetLabel(B?B.FCKItemLabel:'');};FCKSpecialCombo.prototype.SetLabel=function(A){A=(!A||A.length==0)?' ':A;if (A==this.Label) return;this.Label=A;var B=this._LabelEl;if (B){B.innerHTML=A;FCKTools.DisableSelection(B);}};FCKSpecialCombo.prototype.SetEnabled=function(A){this.Enabled=A;if (this._OuterTable) this._OuterTable.className=A?'':'SC_FieldDisabled';};FCKSpecialCombo.prototype.Create=function(A){var B=FCKTools.GetElementDocument(A);var C=this._OuterTable=A.appendChild(B.createElement('TABLE'));C.cellPadding=0;C.cellSpacing=0;C.insertRow(-1);var D;var E;switch (this.Style){case 0:D='TB_ButtonType_Icon';E=false;break;case 1:D='TB_ButtonType_Text';E=false;break;case 2:E=true;break;};if (this.Caption&&this.Caption.length>0&&E){var F=C.rows[0].insertCell(-1);F.innerHTML=this.Caption;F.className='SC_FieldCaption';};var G=FCKTools.AppendElement(C.rows[0].insertCell(-1),'div');if (E){G.className='SC_Field';G.style.width=this.FieldWidth+'px';G.innerHTML='
     
    ';this._LabelEl=G.getElementsByTagName('label')[0];this._LabelEl.innerHTML=this.Label;}else{G.className='TB_Button_Off';G.innerHTML='
    '+this.Caption+'
    ';};FCKTools.AddEventListenerEx(G,'mouseover',FCKSpecialCombo_OnMouseOver,this);FCKTools.AddEventListenerEx(G,'mouseout',FCKSpecialCombo_OnMouseOut,this);FCKTools.AddEventListenerEx(G,'click',FCKSpecialCombo_OnClick,this);FCKTools.DisableSelection(this._Panel.Document.body);};function FCKSpecialCombo_Cleanup(){this._LabelEl=null;this._OuterTable=null;this._ItemsHolderEl=null;this._PanelBox=null;if (this.Items){for (var A in this.Items) this.Items[A]=null;}};function FCKSpecialCombo_OnMouseOver(A,B){if (B.Enabled){switch (B.Style){case 0:this.className='TB_Button_On_Over';break;case 1:this.className='TB_Button_On_Over';break;case 2:this.className='SC_Field SC_FieldOver';break;}}};function FCKSpecialCombo_OnMouseOut(A,B){switch (B.Style){case 0:this.className='TB_Button_Off';break;case 1:this.className='TB_Button_Off';break;case 2:this.className='SC_Field';break;}};function FCKSpecialCombo_OnClick(e,A){if (A.Enabled){var B=A._Panel;var C=A._PanelBox;var D=A._ItemsHolderEl;var E=A.PanelMaxHeight;if (A.OnBeforeClick) A.OnBeforeClick(A);if (FCKBrowserInfo.IsIE) B.Preload(0,this.offsetHeight,this);if (D.offsetHeight>E) C.style.height=E+'px';else C.style.height='';B.Show(0,this.offsetHeight,this);}}; -var FCKToolbarSpecialCombo=function(){this.SourceView=false;this.ContextSensitive=true;this.FieldWidth=null;this.PanelWidth=null;this.PanelMaxHeight=null;};FCKToolbarSpecialCombo.prototype.DefaultLabel='';function FCKToolbarSpecialCombo_OnSelect(A,B){FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).Execute(A,B);};FCKToolbarSpecialCombo.prototype.Create=function(A){this._Combo=new FCKSpecialCombo(this.GetLabel(),this.FieldWidth,this.PanelWidth,this.PanelMaxHeight,FCKBrowserInfo.IsIE?window:FCKTools.GetElementWindow(A).parent);this._Combo.Tooltip=this.Tooltip;this._Combo.Style=this.Style;this.CreateItems(this._Combo);this._Combo.Create(A);this._Combo.CommandName=this.CommandName;this._Combo.OnSelect=FCKToolbarSpecialCombo_OnSelect;};function FCKToolbarSpecialCombo_RefreshActiveItems(A,B){A.DeselectAll();A.SelectItem(B);A.SetLabelById(B);};FCKToolbarSpecialCombo.prototype.RefreshState=function(){var A;var B=FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).GetState();if (B!=-1){A=1;if (this.RefreshActiveItems) this.RefreshActiveItems(this._Combo,B);else{if (this._LastValue!==B){this._LastValue=B;if (!B||B.length==0){this._Combo.DeselectAll();this._Combo.SetLabel(this.DefaultLabel);}else FCKToolbarSpecialCombo_RefreshActiveItems(this._Combo,B);}}}else A=-1;if (A==this.State) return;if (A==-1){this._Combo.DeselectAll();this._Combo.SetLabel('');};this.State=A;this._Combo.SetEnabled(A!=-1);};FCKToolbarSpecialCombo.prototype.Enable=function(){this.RefreshState();};FCKToolbarSpecialCombo.prototype.Disable=function(){this.State=-1;this._Combo.DeselectAll();this._Combo.SetLabel('');this._Combo.SetEnabled(false);}; -var FCKToolbarStyleCombo=function(A,B){if (A===false) return;this.CommandName='Style';this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:2;this.DefaultLabel=FCKConfig.DefaultStyleLabel||'';};FCKToolbarStyleCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarStyleCombo.prototype.GetLabel=function(){return FCKLang.Style;};FCKToolbarStyleCombo.prototype.GetStyles=function(){var A={};var B=FCK.ToolbarSet.CurrentInstance.Styles.GetStyles();for (var C in B){var D=B[C];if (!D.IsCore) A[C]=D;};return A;};FCKToolbarStyleCombo.prototype.CreateItems=function(A){var B=A._Panel.Document;FCKTools.AppendStyleSheet(B,FCKConfig.ToolbarComboPreviewCSS);FCKTools.AppendStyleString(B,FCKConfig.EditorAreaStyles);B.body.className+=' ForceBaseFont';FCKConfig.ApplyBodyAttributes(B.body);var C=this.GetStyles();for (var D in C){var E=C[D];var F=E.GetType()==2?D:FCKToolbarStyleCombo_BuildPreview(E,E.Label||D);var G=A.AddItem(D,F);G.Style=E;};A.OnBeforeClick=this.StyleCombo_OnBeforeClick;};FCKToolbarStyleCombo.prototype.RefreshActiveItems=function(A){var B=FCK.ToolbarSet.CurrentInstance.Selection.GetBoundaryParentElement(true);if (B){var C=new FCKElementPath(B);var D=C.Elements;for (var e=0;e');var E=A.Element;if (E=='bdo') E='span';D=['<',E];var F=A._StyleDesc.Attributes;if (F){for (var G in F){D.push(' ',G,'="',A.GetFinalAttributeValue(G),'"');}};if (A._GetStyleText().length>0) D.push(' style="',A.GetFinalStyleValue(),'"');D.push('>',B,'');if (C==0) D.push('
    ');return D.join('');}; -var FCKToolbarFontFormatCombo=function(A,B){if (A===false) return;this.CommandName='FontFormat';this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:2;this.NormalLabel='Normal';this.PanelWidth=190;this.DefaultLabel=FCKConfig.DefaultFontFormatLabel||'';};FCKToolbarFontFormatCombo.prototype=new FCKToolbarStyleCombo(false);FCKToolbarFontFormatCombo.prototype.GetLabel=function(){return FCKLang.FontFormat;};FCKToolbarFontFormatCombo.prototype.GetStyles=function(){var A={};var B=FCKLang['FontFormats'].split(';');var C={p:B[0],pre:B[1],address:B[2],h1:B[3],h2:B[4],h3:B[5],h4:B[6],h5:B[7],h6:B[8],div:B[9]||(B[0]+' (DIV)')};var D=FCKConfig.FontFormats.split(';');for (var i=0;i';G.open();G.write(''+H+''+document.getElementById('xToolbarSpace').innerHTML+'');G.close();if(FCKBrowserInfo.IsAIR) FCKAdobeAIR.ToolbarSet_InitOutFrame(G);FCKTools.AddEventListener(G,'contextmenu',FCKTools.CancelEvent);FCKTools.AppendStyleSheet(G,FCKConfig.SkinEditorCSS);B=D.__FCKToolbarSet=new FCKToolbarSet(G);B._IFrame=F;if (FCK.IECleanup) FCK.IECleanup.AddItem(D,FCKToolbarSet_Target_Cleanup);};B.CurrentInstance=FCK;if (!B.ToolbarItems) B.ToolbarItems=FCKToolbarItems;FCK.AttachToOnSelectionChange(B.RefreshItemsState);return B;};function FCK_OnBlur(A){var B=A.ToolbarSet;if (B.CurrentInstance==A) B.Disable();};function FCK_OnFocus(A){var B=A.ToolbarSet;var C=A||FCK;B.CurrentInstance.FocusManager.RemoveWindow(B._IFrame.contentWindow);B.CurrentInstance=C;C.FocusManager.AddWindow(B._IFrame.contentWindow,true);B.Enable();};function FCKToolbarSet_Cleanup(){this._TargetElement=null;this._IFrame=null;};function FCKToolbarSet_Target_Cleanup(){this.__FCKToolbarSet=null;};var FCKToolbarSet=function(A){this._Document=A;this._TargetElement=A.getElementById('xToolbar');var B=A.getElementById('xExpandHandle');var C=A.getElementById('xCollapseHandle');B.title=FCKLang.ToolbarExpand;FCKTools.AddEventListener(B,'click',FCKToolbarSet_Expand_OnClick);C.title=FCKLang.ToolbarCollapse;FCKTools.AddEventListener(C,'click',FCKToolbarSet_Collapse_OnClick);if (!FCKConfig.ToolbarCanCollapse||FCKConfig.ToolbarStartExpanded) this.Expand();else this.Collapse();C.style.display=FCKConfig.ToolbarCanCollapse?'':'none';if (FCKConfig.ToolbarCanCollapse) C.style.display='';else A.getElementById('xTBLeftBorder').style.display='';this.Toolbars=[];this.IsLoaded=false;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKToolbarSet_Cleanup);};function FCKToolbarSet_Expand_OnClick(){FCK.ToolbarSet.Expand();};function FCKToolbarSet_Collapse_OnClick(){FCK.ToolbarSet.Collapse();};FCKToolbarSet.prototype.Expand=function(){this._ChangeVisibility(false);};FCKToolbarSet.prototype.Collapse=function(){this._ChangeVisibility(true);};FCKToolbarSet.prototype._ChangeVisibility=function(A){this._Document.getElementById('xCollapsed').style.display=A?'':'none';this._Document.getElementById('xExpanded').style.display=A?'none':'';if (FCKBrowserInfo.IsGecko){FCKTools.RunFunction(window.onresize);}};FCKToolbarSet.prototype.Load=function(A){this.Name=A;this.Items=[];this.ItemsWysiwygOnly=[];this.ItemsContextSensitive=[];this._TargetElement.innerHTML='';var B=FCKConfig.ToolbarSets[A];if (!B){alert(FCKLang.UnknownToolbarSet.replace(/%1/g,A));return;};this.Toolbars=[];for (var x=0;x0) break;}catch (e){break;};D=D.parent;};var E=D.document;var F=function(){if (!B) B=FCKConfig.FloatingPanelsZIndex+999;return++B;};var G=function(){if (!C) return;var H=FCKTools.IsStrictMode(E)?E.documentElement:E.body;FCKDomTools.SetElementStyles(C,{'width':Math.max(H.scrollWidth,H.clientWidth,E.scrollWidth||0)-1+'px','height':Math.max(H.scrollHeight,H.clientHeight,E.scrollHeight||0)-1+'px'});};return {OpenDialog:function(dialogName,dialogTitle,dialogPage,width,height,customValue,parentWindow,resizable){if (!A) this.DisplayMainCover();var I={Title:dialogTitle,Page:dialogPage,Editor:window,CustomValue:customValue,TopWindow:D};FCK.ToolbarSet.CurrentInstance.Selection.Save();var J=FCKTools.GetViewPaneSize(D);var K={ 'X':0,'Y':0 };var L=FCKBrowserInfo.IsIE&&(!FCKBrowserInfo.IsIE7||!FCKTools.IsStrictMode(D.document));if (L) K=FCKTools.GetScrollPosition(D);var M=Math.max(K.Y+(J.Height-height-20)/2,0);var N=Math.max(K.X+(J.Width-width-20)/2,0);var O=E.createElement('iframe');FCKTools.ResetStyles(O);O.src=FCKConfig.BasePath+'fckdialog.html';O.frameBorder=0;O.allowTransparency=true;FCKDomTools.SetElementStyles(O,{'position':(L)?'absolute':'fixed','top':M+'px','left':N+'px','width':width+'px','height':height+'px','zIndex':F()});O._DialogArguments=I;E.body.appendChild(O);O._ParentDialog=A;A=O;},OnDialogClose:function(dialogWindow){var O=dialogWindow.frameElement;FCKDomTools.RemoveNode(O);if (O._ParentDialog){A=O._ParentDialog;O._ParentDialog.contentWindow.SetEnabled(true);}else{if (!FCKBrowserInfo.IsIE) FCK.Focus();this.HideMainCover();setTimeout(function(){ A=null;},0);FCK.ToolbarSet.CurrentInstance.Selection.Release();}},DisplayMainCover:function(){C=E.createElement('div');FCKTools.ResetStyles(C);FCKDomTools.SetElementStyles(C,{'position':'absolute','zIndex':F(),'top':'0px','left':'0px','backgroundColor':FCKConfig.BackgroundBlockerColor});FCKDomTools.SetOpacity(C,FCKConfig.BackgroundBlockerOpacity);if (FCKBrowserInfo.IsIE&&!FCKBrowserInfo.IsIE7){var Q=E.createElement('iframe');FCKTools.ResetStyles(Q);Q.hideFocus=true;Q.frameBorder=0;Q.src=FCKTools.GetVoidUrl();FCKDomTools.SetElementStyles(Q,{'width':'100%','height':'100%','position':'absolute','left':'0px','top':'0px','filter':'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'});C.appendChild(Q);};FCKTools.AddEventListener(D,'resize',G);G();E.body.appendChild(C);FCKFocusManager.Lock();var R=FCK.ToolbarSet.CurrentInstance.GetInstanceObject('frameElement');R._fck_originalTabIndex=R.tabIndex;R.tabIndex=-1;},HideMainCover:function(){FCKDomTools.RemoveNode(C);FCKFocusManager.Unlock();var R=FCK.ToolbarSet.CurrentInstance.GetInstanceObject('frameElement');R.tabIndex=R._fck_originalTabIndex;FCKDomTools.ClearElementJSProperty(R,'_fck_originalTabIndex');},GetCover:function(){return C;}};})(); -var FCKMenuItem=function(A,B,C,D,E,F){this.Name=B;this.Label=C||B;this.IsDisabled=E;this.Icon=new FCKIcon(D);this.SubMenu=new FCKMenuBlockPanel();this.SubMenu.Parent=A;this.SubMenu.OnClick=FCKTools.CreateEventListener(FCKMenuItem_SubMenu_OnClick,this);this.CustomData=F;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKMenuItem_Cleanup);};FCKMenuItem.prototype.AddItem=function(A,B,C,D,E){this.HasSubMenu=true;return this.SubMenu.AddItem(A,B,C,D,E);};FCKMenuItem.prototype.AddSeparator=function(){this.SubMenu.AddSeparator();};FCKMenuItem.prototype.Create=function(A){var B=this.HasSubMenu;var C=FCKTools.GetElementDocument(A);var r=this.MainElement=A.insertRow(-1);r.className=this.IsDisabled?'MN_Item_Disabled':'MN_Item';if (!this.IsDisabled){FCKTools.AddEventListenerEx(r,'mouseover',FCKMenuItem_OnMouseOver,[this]);FCKTools.AddEventListenerEx(r,'click',FCKMenuItem_OnClick,[this]);if (!B) FCKTools.AddEventListenerEx(r,'mouseout',FCKMenuItem_OnMouseOut,[this]);};var D=r.insertCell(-1);D.className='MN_Icon';D.appendChild(this.Icon.CreateIconElement(C));D=r.insertCell(-1);D.className='MN_Label';D.noWrap=true;D.appendChild(C.createTextNode(this.Label));D=r.insertCell(-1);if (B){D.className='MN_Arrow';var E=D.appendChild(C.createElement('IMG'));E.src=FCK_IMAGES_PATH+'arrow_'+FCKLang.Dir+'.gif';E.width=4;E.height=7;this.SubMenu.Create();this.SubMenu.Panel.OnHide=FCKTools.CreateEventListener(FCKMenuItem_SubMenu_OnHide,this);}};FCKMenuItem.prototype.Activate=function(){this.MainElement.className='MN_Item_Over';if (this.HasSubMenu){this.SubMenu.Show(this.MainElement.offsetWidth+2,-2,this.MainElement);};FCKTools.RunFunction(this.OnActivate,this);};FCKMenuItem.prototype.Deactivate=function(){this.MainElement.className='MN_Item';if (this.HasSubMenu) this.SubMenu.Hide();};function FCKMenuItem_SubMenu_OnClick(A,B){FCKTools.RunFunction(B.OnClick,B,[A]);};function FCKMenuItem_SubMenu_OnHide(A){A.Deactivate();};function FCKMenuItem_OnClick(A,B){if (B.HasSubMenu) B.Activate();else{B.Deactivate();FCKTools.RunFunction(B.OnClick,B,[B]);}};function FCKMenuItem_OnMouseOver(A,B){B.Activate();};function FCKMenuItem_OnMouseOut(A,B){B.Deactivate();};function FCKMenuItem_Cleanup(){this.MainElement=null;}; -var FCKMenuBlock=function(){this._Items=[];};FCKMenuBlock.prototype.Count=function(){return this._Items.length;};FCKMenuBlock.prototype.AddItem=function(A,B,C,D,E){var F=new FCKMenuItem(this,A,B,C,D,E);F.OnClick=FCKTools.CreateEventListener(FCKMenuBlock_Item_OnClick,this);F.OnActivate=FCKTools.CreateEventListener(FCKMenuBlock_Item_OnActivate,this);this._Items.push(F);return F;};FCKMenuBlock.prototype.AddSeparator=function(){this._Items.push(new FCKMenuSeparator());};FCKMenuBlock.prototype.RemoveAllItems=function(){this._Items=[];var A=this._ItemsTable;if (A){while (A.rows.length>0) A.deleteRow(0);}};FCKMenuBlock.prototype.Create=function(A){if (!this._ItemsTable){if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKMenuBlock_Cleanup);this._Window=FCKTools.GetElementWindow(A);var B=FCKTools.GetElementDocument(A);var C=A.appendChild(B.createElement('table'));C.cellPadding=0;C.cellSpacing=0;FCKTools.DisableSelection(C);var D=C.insertRow(-1).insertCell(-1);D.className='MN_Menu';var E=this._ItemsTable=D.appendChild(B.createElement('table'));E.cellPadding=0;E.cellSpacing=0;};for (var i=0;i0&&F.href.length==0);if (G) return;menu.AddSeparator();menu.AddItem('VisitLink',FCKLang.VisitLink);menu.AddSeparator();if (E) menu.AddItem('Link',FCKLang.EditLink,34);menu.AddItem('Unlink',FCKLang.RemoveLink,35);}}};case 'Image':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&!tag.getAttribute('_fckfakelement')){menu.AddSeparator();menu.AddItem('Image',FCKLang.ImageProperties,37);}}};case 'Anchor':return {AddItems:function(menu,tag,tagName){var F=FCKSelection.MoveToAncestorNode('A');var G=(F&&F.name.length>0);if (G||(tagName=='IMG'&&tag.getAttribute('_fckanchor'))){menu.AddSeparator();menu.AddItem('Anchor',FCKLang.AnchorProp,36);menu.AddItem('AnchorDelete',FCKLang.AnchorDelete);}}};case 'Flash':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&tag.getAttribute('_fckflash')){menu.AddSeparator();menu.AddItem('Flash',FCKLang.FlashProperties,38);}}};case 'Form':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('FORM')){menu.AddSeparator();menu.AddItem('Form',FCKLang.FormProp,48);}}};case 'Checkbox':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='checkbox'){menu.AddSeparator();menu.AddItem('Checkbox',FCKLang.CheckboxProp,49);}}};case 'Radio':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='radio'){menu.AddSeparator();menu.AddItem('Radio',FCKLang.RadioButtonProp,50);}}};case 'TextField':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&(tag.type=='text'||tag.type=='password')){menu.AddSeparator();menu.AddItem('TextField',FCKLang.TextFieldProp,51);}}};case 'HiddenField':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&tag.getAttribute('_fckinputhidden')){menu.AddSeparator();menu.AddItem('HiddenField',FCKLang.HiddenFieldProp,56);}}};case 'ImageButton':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='image'){menu.AddSeparator();menu.AddItem('ImageButton',FCKLang.ImageButtonProp,55);}}};case 'Button':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&(tag.type=='button'||tag.type=='submit'||tag.type=='reset')){menu.AddSeparator();menu.AddItem('Button',FCKLang.ButtonProp,54);}}};case 'Select':return {AddItems:function(menu,tag,tagName){if (tagName=='SELECT'){menu.AddSeparator();menu.AddItem('Select',FCKLang.SelectionFieldProp,53);}}};case 'Textarea':return {AddItems:function(menu,tag,tagName){if (tagName=='TEXTAREA'){menu.AddSeparator();menu.AddItem('Textarea',FCKLang.TextareaProp,52);}}};case 'BulletedList':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('UL')){menu.AddSeparator();menu.AddItem('BulletedList',FCKLang.BulletedListProp,27);}}};case 'NumberedList':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('OL')){menu.AddSeparator();menu.AddItem('NumberedList',FCKLang.NumberedListProp,26);}}};case 'DivContainer':return {AddItems:function(menu,tag,tagName){var J=FCKDomTools.GetSelectedDivContainers();if (J.length>0){menu.AddSeparator();menu.AddItem('EditDiv',FCKLang.EditDiv,75);menu.AddItem('DeleteDiv',FCKLang.DeleteDiv,76);}}};};return null;};function FCK_ContextMenu_OnBeforeOpen(){FCK.Events.FireEvent('OnSelectionChange');var A,sTagName;if ((A=FCKSelection.GetSelectedElement())) sTagName=A.tagName;var B=FCK.ContextMenu._InnerContextMenu;B.RemoveAllItems();var C=FCK.ContextMenu.Listeners;for (var i=0;i0){D=A.substr(0,B.index);this._sourceHtml=A.substr(B.index);}else{C=true;D=B[0];this._sourceHtml=A.substr(B[0].length);}}else{D=A;this._sourceHtml=null;};return { 'isTag':C,'value':D };},Each:function(A){var B;while ((B=this.Next())) A(B.isTag,B.value);}};var FCKHtmlIterator=function(A){this._sourceHtml=A;};FCKHtmlIterator.prototype={Next:function(){var A=this._sourceHtml;if (A==null) return null;var B=FCKRegexLib.HtmlTag.exec(A);var C=false;var D="";if (B){if (B.index>0){D=A.substr(0,B.index);this._sourceHtml=A.substr(B.index);}else{C=true;D=B[0];this._sourceHtml=A.substr(B[0].length);}}else{D=A;this._sourceHtml=null;};return { 'isTag':C,'value':D };},Each:function(A){var B;while ((B=this.Next())) A(B.isTag,B.value);}}; -var FCKPlugin=function(A,B,C){this.Name=A;this.BasePath=C?C:FCKConfig.PluginsPath;this.Path=this.BasePath+A+'/';if (!B||B.length==0) this.AvailableLangs=[];else this.AvailableLangs=B.split(',');};FCKPlugin.prototype.Load=function(){if (this.AvailableLangs.length>0){var A;if (this.AvailableLangs.IndexOf(FCKLanguageManager.ActiveLanguage.Code)>=0) A=FCKLanguageManager.ActiveLanguage.Code;else A=this.AvailableLangs[0];LoadScript(this.Path+'lang/'+A+'.js');};LoadScript(this.Path+'fckplugin.js');}; -var FCKPlugins=FCK.Plugins={};FCKPlugins.ItemsCount=0;FCKPlugins.Items={};FCKPlugins.Load=function(){var A=FCKPlugins.Items;for (var i=0;i-1);};String.prototype.Equals=function(){var A=arguments;if (A.length==1&&A[0].pop) A=A[0];for (var i=0;iC) return false;if (B){var E=new RegExp(A+'$','i');return E.test(this);}else return (D==0||this.substr(C-D,D)==A);};String.prototype.Remove=function(A,B){var s='';if (A>0) s=this.substring(0,A);if (A+B0){var B=A.pop();if (B) B[1].call(B[0]);};this._FCKCleanupObj=null;if (CollectGarbage) CollectGarbage();}; -var s=navigator.userAgent.toLowerCase();var FCKBrowserInfo={IsIE:/*@cc_on!@*/false,IsIE7:/*@cc_on!@*/false&&(parseInt(s.match(/msie (\d+)/)[1],10)>=7),IsIE6:/*@cc_on!@*/false&&(parseInt(s.match(/msie (\d+)/)[1],10)>=6),IsSafari:s.Contains(' applewebkit/'),IsOpera:!!window.opera,IsAIR:s.Contains(' adobeair/'),IsMac:s.Contains('macintosh')};(function(A){A.IsGecko=(navigator.product=='Gecko')&&!A.IsSafari&&!A.IsOpera;A.IsGeckoLike=(A.IsGecko||A.IsSafari||A.IsOpera);if (A.IsGecko){var B=s.match(/rv:(\d+\.\d+)/);var C=B&&parseFloat(B[1]);if (C){A.IsGecko10=(C<1.8);A.IsGecko19=(C>1.8);}}})(FCKBrowserInfo); -var FCKURLParams={};(function(){var A=document.location.search.substr(1).split('&');for (var i=0;i';if (!FCKRegexLib.HtmlOpener.test(A)) A=''+A+'';if (!FCKRegexLib.HeadOpener.test(A)) A=A.replace(FCKRegexLib.HtmlOpener,'$&');return A;}else{var B=FCKConfig.DocType+'0&&!FCKRegexLib.Html4DocType.test(FCKConfig.DocType)) B+=' style="overflow-y: scroll"';B+='>'+A+'';return B;}},ConvertToDataFormat:function(A,B,C,D){var E=FCKXHtml.GetXHTML(A,!B,D);if (C&&FCKRegexLib.EmptyOutParagraph.test(E)) return '';return E;},FixHtml:function(A){return A;}}; -var FCK={Name:FCKURLParams['InstanceName'],Status:0,EditMode:0,Toolbar:null,HasFocus:false,DataProcessor:new FCKDataProcessor(),GetInstanceObject:(function(){var w=window;return function(name){return w[name];}})(),AttachToOnSelectionChange:function(A){this.Events.AttachEvent('OnSelectionChange',A);},GetLinkedFieldValue:function(){return this.LinkedField.value;},GetParentForm:function(){return this.LinkedField.form;},StartupValue:'',IsDirty:function(){if (this.EditMode==1) return (this.StartupValue!=this.EditingArea.Textarea.value);else{if (!this.EditorDocument) return false;return (this.StartupValue!=this.EditorDocument.body.innerHTML);}},ResetIsDirty:function(){if (this.EditMode==1) this.StartupValue=this.EditingArea.Textarea.value;else if (this.EditorDocument.body) this.StartupValue=this.EditorDocument.body.innerHTML;},StartEditor:function(){this.TempBaseTag=FCKConfig.BaseHref.length>0?'':'';var A=FCK.KeystrokeHandler=new FCKKeystrokeHandler();A.OnKeystroke=_FCK_KeystrokeHandler_OnKeystroke;A.SetKeystrokes(FCKConfig.Keystrokes);if (FCKBrowserInfo.IsIE7){if ((CTRL+86) in A.Keystrokes) A.SetKeystrokes([CTRL+86,true]);if ((SHIFT+45) in A.Keystrokes) A.SetKeystrokes([SHIFT+45,true]);};A.SetKeystrokes([CTRL+8,true]);this.EditingArea=new FCKEditingArea(document.getElementById('xEditingArea'));this.EditingArea.FFSpellChecker=FCKConfig.FirefoxSpellChecker;this.SetData(this.GetLinkedFieldValue(),true);FCKTools.AddEventListener(document,"keydown",this._TabKeyHandler);this.AttachToOnSelectionChange(_FCK_PaddingNodeListener);if (FCKBrowserInfo.IsGecko) this.AttachToOnSelectionChange(this._ExecCheckEmptyBlock);},Focus:function(){FCK.EditingArea.Focus();},SetStatus:function(A){this.Status=A;if (A==1){FCKFocusManager.AddWindow(window,true);if (FCKBrowserInfo.IsIE) FCKFocusManager.AddWindow(window.frameElement,true);if (FCKConfig.StartupFocus) FCK.Focus();};this.Events.FireEvent('OnStatusChange',A);},FixBody:function(){var A=FCKConfig.EnterMode;if (A!='p'&&A!='div') return;var B=this.EditorDocument;if (!B) return;var C=B.body;if (!C) return;FCKDomTools.TrimNode(C);var D=C.firstChild;var E;while (D){var F=false;switch (D.nodeType){case 1:var G=D.nodeName.toLowerCase();if (!FCKListsLib.BlockElements[G]&&G!='li'&&!D.getAttribute('_fckfakelement')&&D.getAttribute('_moz_dirty')==null) F=true;break;case 3:if (E||D.nodeValue.Trim().length>0) F=true;break;case 8:if (E) F=true;break;};if (F){var H=D.parentNode;if (!E) E=H.insertBefore(B.createElement(A),D);E.appendChild(H.removeChild(D));D=E.nextSibling;}else{if (E){FCKDomTools.TrimNode(E);E=null;};D=D.nextSibling;}};if (E) FCKDomTools.TrimNode(E);},GetData:function(A){if (FCK.EditMode==1) return FCK.EditingArea.Textarea.value;this.FixBody();var B=FCK.EditorDocument;if (!B) return null;var C=FCKConfig.FullPage;var D=FCK.DataProcessor.ConvertToDataFormat(C?B.documentElement:B.body,!C,FCKConfig.IgnoreEmptyParagraphValue,A);D=FCK.ProtectEventsRestore(D);if (FCKBrowserInfo.IsIE) D=D.replace(FCKRegexLib.ToReplace,'$1');if (C){if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) D=FCK.DocTypeDeclaration+'\n'+D;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) D=FCK.XmlDeclaration+'\n'+D;};return FCKConfig.ProtectedSource.Revert(D);},UpdateLinkedField:function(){var A=FCK.GetXHTML(FCKConfig.FormatOutput);if (FCKConfig.HtmlEncodeOutput) A=FCKTools.HTMLEncode(A);FCK.LinkedField.value=A;FCK.Events.FireEvent('OnAfterLinkedFieldUpdate');},RegisteredDoubleClickHandlers:{},OnDoubleClick:function(A){var B=FCK.RegisteredDoubleClickHandlers[A.tagName.toUpperCase()];if (B){for (var i=0;i0?'|ABBR|XML|EMBED|OBJECT':'ABBR|XML|EMBED|OBJECT';var C;if (B.length>0){C=new RegExp('<('+B+')(?!\w|:)','gi');A=A.replace(C,'','gi');A=A.replace(C,'<\/FCK:$1>');};B='META';if (FCKBrowserInfo.IsIE) B+='|HR';C=new RegExp('<(('+B+')(?=\\s|>|/)[\\s\\S]*?)/?>','gi');A=A.replace(C,'');return A;},SetData:function(A,B){this.EditingArea.Mode=FCK.EditMode;if (FCKBrowserInfo.IsIE&&FCK.EditorDocument){FCK.EditorDocument.detachEvent("onselectionchange",Doc_OnSelectionChange);};FCKTempBin.Reset();if (FCK.EditMode==0){this._ForceResetIsDirty=(B===true);A=FCKConfig.ProtectedSource.Protect(A);A=FCK.DataProcessor.ConvertToHtml(A);A=A.replace(FCKRegexLib.InvalidSelfCloseTags,'$1>');A=FCK.ProtectEvents(A);A=FCK.ProtectUrls(A);A=FCK.ProtectTags(A);if (FCK.TempBaseTag.length>0&&!FCKRegexLib.HasBaseTag.test(A)) A=A.replace(FCKRegexLib.HeadOpener,'$&'+FCK.TempBaseTag);var C='';if (!FCKConfig.FullPage) C+=_FCK_GetEditorAreaStyleTags();if (FCKBrowserInfo.IsIE) C+=FCK._GetBehaviorsStyle();else if (FCKConfig.ShowBorders) C+=FCKTools.GetStyleHtml(FCK_ShowTableBordersCSS,true);C+=FCKTools.GetStyleHtml(FCK_InternalCSS,true);A=A.replace(FCKRegexLib.HeadCloser,C+'$&');this.EditingArea.OnLoad=_FCK_EditingArea_OnLoad;this.EditingArea.Start(A);}else{FCK.EditorWindow=null;FCK.EditorDocument=null;FCKDomTools.PaddingNode=null;this.EditingArea.OnLoad=null;this.EditingArea.Start(A);this.EditingArea.Textarea._FCKShowContextMenu=true;FCK.EnterKeyHandler=null;if (B) this.ResetIsDirty();FCK.KeystrokeHandler.AttachToElement(this.EditingArea.Textarea);this.EditingArea.Textarea.focus();FCK.Events.FireEvent('OnAfterSetHTML');};if (FCKBrowserInfo.IsGecko) window.onresize();},RedirectNamedCommands:{},ExecuteNamedCommand:function(A,B,C,D){if (!D) FCKUndo.SaveUndoStep();if (!C&&FCK.RedirectNamedCommands[A]!=null) FCK.ExecuteRedirectedNamedCommand(A,B);else{FCK.Focus();FCK.EditorDocument.execCommand(A,false,B);FCK.Events.FireEvent('OnSelectionChange');};if (!D) FCKUndo.SaveUndoStep();},GetNamedCommandState:function(A){try{if (FCKBrowserInfo.IsSafari&&FCK.EditorWindow&&A.IEquals('Paste')) return 0;if (!FCK.EditorDocument.queryCommandEnabled(A)) return -1;else{return FCK.EditorDocument.queryCommandState(A)?1:0;}}catch (e){return 0;}},GetNamedCommandValue:function(A){var B='';var C=FCK.GetNamedCommandState(A);if (C==-1) return null;try{B=this.EditorDocument.queryCommandValue(A);}catch(e) {};return B?B:'';},Paste:function(A){if (FCK.Status!=2||!FCK.Events.FireEvent('OnPaste')) return false;return A||FCK._ExecPaste();},PasteFromWord:function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteFromWord,'dialog/fck_paste.html',400,330,'Word');},Preview:function(){var A;if (FCKConfig.FullPage){if (FCK.TempBaseTag.length>0) A=FCK.TempBaseTag+FCK.GetXHTML();else A=FCK.GetXHTML();}else{A=FCKConfig.DocType+''+FCK.TempBaseTag+''+FCKLang.Preview+''+_FCK_GetEditorAreaStyleTags()+''+FCK.GetXHTML()+'';};var B=FCKConfig.ScreenWidth*0.8;var C=FCKConfig.ScreenHeight*0.7;var D=(FCKConfig.ScreenWidth-B)/2;var E='';if (FCK_IS_CUSTOM_DOMAIN&&FCKBrowserInfo.IsIE){window._FCKHtmlToLoad=A;E='javascript:void( (function(){document.open() ;document.domain="'+document.domain+'" ;document.write( window.opener._FCKHtmlToLoad );document.close() ;window.opener._FCKHtmlToLoad = null ;})() )';};var F=window.open(E,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+B+',height='+C+',left='+D);if (!FCK_IS_CUSTOM_DOMAIN||!FCKBrowserInfo.IsIE){F.document.write(A);F.document.close();}},SwitchEditMode:function(A){var B=(FCK.EditMode==0);var C=FCK.IsDirty();var D;if (B){FCKCommands.GetCommand('ShowBlocks').SaveState();if (!A&&FCKBrowserInfo.IsIE) FCKUndo.SaveUndoStep();D=FCK.GetXHTML(FCKConfig.FormatSource);if (FCKBrowserInfo.IsIE) FCKTempBin.ToHtml();if (D==null) return false;}else D=this.EditingArea.Textarea.value;FCK.EditMode=B?1:0;FCK.SetData(D,!C);FCK.Focus();FCKTools.RunFunction(FCK.ToolbarSet.RefreshModeState,FCK.ToolbarSet);return true;},InsertElement:function(A){if (typeof A=='string') A=this.EditorDocument.createElement(A);var B=A.nodeName.toLowerCase();FCKSelection.Restore();var C=new FCKDomRange(this.EditorWindow);C.MoveToSelection();C.DeleteContents();if (FCKListsLib.BlockElements[B]!=null){if (C.StartBlock){if (C.CheckStartOfBlock()) C.MoveToPosition(C.StartBlock,3);else if (C.CheckEndOfBlock()) C.MoveToPosition(C.StartBlock,4);else C.SplitBlock();};C.InsertNode(A);var D=FCKDomTools.GetNextSourceElement(A,false,null,['hr','br','param','img','area','input'],true);if (!D&&FCKConfig.EnterMode!='br'){D=this.EditorDocument.body.appendChild(this.EditorDocument.createElement(FCKConfig.EnterMode));if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(D);};if (FCKListsLib.EmptyElements[B]==null) C.MoveToElementEditStart(A);else if (D) C.MoveToElementEditStart(D);else C.MoveToPosition(A,4);if (FCKBrowserInfo.IsGeckoLike){if (D) FCKDomTools.ScrollIntoView(D,false);FCKDomTools.ScrollIntoView(A,false);}}else{C.InsertNode(A);C.SetStart(A,4);C.SetEnd(A,4);};C.Select();C.Release();this.Focus();return A;},_InsertBlockElement:function(A){},_IsFunctionKey:function(A){if (A>=16&&A<=20) return true;if (A==27||(A>=33&&A<=40)) return true;if (A==45) return true;return false;},_KeyDownListener:function(A){if (!A) A=FCK.EditorWindow.event;if (FCK.EditorWindow){if (!FCK._IsFunctionKey(A.keyCode)&&!(A.ctrlKey||A.metaKey)&&!(A.keyCode==46)) FCK._KeyDownUndo();};return true;},_KeyDownUndo:function(){if (!FCKUndo.Typing){FCKUndo.SaveUndoStep();FCKUndo.Typing=true;FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.TypesCount++;FCKUndo.Changed=1;if (FCKUndo.TypesCount>FCKUndo.MaxTypes){FCKUndo.TypesCount=0;FCKUndo.SaveUndoStep();}},_TabKeyHandler:function(A){if (!A) A=window.event;var B=A.keyCode;if (B==9&&FCK.EditMode!=0){if (FCKBrowserInfo.IsIE){var C=document.selection.createRange();if (C.parentElement()!=FCK.EditingArea.Textarea) return true;C.text='\t';C.select();}else{var a=[];var D=FCK.EditingArea.Textarea;var E=D.selectionStart;var F=D.selectionEnd;a.push(D.value.substr(0,E));a.push('\t');a.push(D.value.substr(F));D.value=a.join('');D.setSelectionRange(E+1,E+1);};if (A.preventDefault) return A.preventDefault();return A.returnValue=false;};return true;}};FCK.Events=new FCKEvents(FCK);FCK.GetHTML=FCK.GetXHTML=FCK.GetData;FCK.SetHTML=FCK.SetData;FCK.InsertElementAndGetIt=FCK.CreateElement=FCK.InsertElement;function _FCK_ProtectEvents_ReplaceTags(A){return A.replace(FCKRegexLib.EventAttributes,_FCK_ProtectEvents_ReplaceEvents);};function _FCK_ProtectEvents_ReplaceEvents(A,B){return ' '+B+'_fckprotectedatt="'+encodeURIComponent(A)+'"';};function _FCK_ProtectEvents_RestoreEvents(A,B){return decodeURIComponent(B);};function _FCK_MouseEventsListener(A){if (!A) A=window.event;if (A.type=='mousedown') FCK.MouseDownFlag=true;else if (A.type=='mouseup') FCK.MouseDownFlag=false;else if (A.type=='mousemove') FCK.Events.FireEvent('OnMouseMove',A);};function _FCK_PaddingNodeListener(){if (FCKConfig.EnterMode.IEquals('br')) return;FCKDomTools.EnforcePaddingNode(FCK.EditorDocument,FCKConfig.EnterMode);if (!FCKBrowserInfo.IsIE&&FCKDomTools.PaddingNode){var A=FCKSelection.GetSelection();if (A&&A.rangeCount==1){var B=A.getRangeAt(0);if (B.collapsed&&B.startContainer==FCK.EditorDocument.body&&B.startOffset==0){B.selectNodeContents(FCKDomTools.PaddingNode);B.collapse(true);A.removeAllRanges();A.addRange(B);}}}else if (FCKDomTools.PaddingNode){var C=FCKSelection.GetParentElement();var D=FCKDomTools.PaddingNode;if (C&&C.nodeName.IEquals('body')){if (FCK.EditorDocument.body.childNodes.length==1&&FCK.EditorDocument.body.firstChild==D){if (FCKSelection._GetSelectionDocument(FCK.EditorDocument.selection)!=FCK.EditorDocument) return;var B=FCK.EditorDocument.body.createTextRange();var F=false;if (!D.childNodes.firstChild){D.appendChild(FCKTools.GetElementDocument(D).createTextNode('\ufeff'));F=true;};B.moveToElementText(D);B.select();if (F) B.pasteHTML('');}}}};function _FCK_EditingArea_OnLoad(){FCK.EditorWindow=FCK.EditingArea.Window;FCK.EditorDocument=FCK.EditingArea.Document;if (FCKBrowserInfo.IsIE) FCKTempBin.ToElements();FCK.InitializeBehaviors();FCK.MouseDownFlag=false;FCKTools.AddEventListener(FCK.EditorDocument,'mousemove',_FCK_MouseEventsListener);FCKTools.AddEventListener(FCK.EditorDocument,'mousedown',_FCK_MouseEventsListener);FCKTools.AddEventListener(FCK.EditorDocument,'mouseup',_FCK_MouseEventsListener);if (FCKBrowserInfo.IsSafari){var A=function(evt){if (!(evt.ctrlKey||evt.metaKey)) return;if (FCK.EditMode!=0) return;switch (evt.keyCode){case 89:FCKUndo.Redo();break;case 90:FCKUndo.Undo();break;}};FCKTools.AddEventListener(FCK.EditorDocument,'keyup',A);};FCK.EnterKeyHandler=new FCKEnterKey(FCK.EditorWindow,FCKConfig.EnterMode,FCKConfig.ShiftEnterMode,FCKConfig.TabSpaces);FCK.KeystrokeHandler.AttachToElement(FCK.EditorDocument);if (FCK._ForceResetIsDirty) FCK.ResetIsDirty();if (FCKBrowserInfo.IsIE&&FCK.HasFocus) FCK.EditorDocument.body.setActive();FCK.OnAfterSetHTML();FCKCommands.GetCommand('ShowBlocks').RestoreState();if (FCK.Status!=0) return;FCK.SetStatus(1);};function _FCK_GetEditorAreaStyleTags(){return FCKTools.GetStyleHtml(FCKConfig.EditorAreaCSS)+FCKTools.GetStyleHtml(FCKConfig.EditorAreaStyles);};function _FCK_KeystrokeHandler_OnKeystroke(A,B){if (FCK.Status!=2) return false;if (FCK.EditMode==0){switch (B){case 'Paste':return!FCK.Paste();case 'Cut':FCKUndo.SaveUndoStep();return false;}}else{if (B.Equals('Paste','Undo','Redo','SelectAll','Cut')) return false;};var C=FCK.Commands.GetCommand(B);if (C.GetState()==-1) return false;return (C.Execute.apply(C,FCKTools.ArgumentsToArray(arguments,2))!==false);};(function(){var A=window.parent.document;var B=A.getElementById(FCK.Name);var i=0;while (B||i==0){if (B&&B.tagName.toLowerCase().Equals('input','textarea')){FCK.LinkedField=B;break;};B=A.getElementsByName(FCK.Name)[i++];}})();var FCKTempBin={Elements:[],AddElement:function(A){var B=this.Elements.length;this.Elements[B]=A;return B;},RemoveElement:function(A){var e=this.Elements[A];this.Elements[A]=null;return e;},Reset:function(){var i=0;while (i '+this.Elements[i].outerHTML+'
    ';this.Elements[i].isHtml=true;}},ToElements:function(){var A=FCK.EditorDocument.createElement('div');for (var i=0;i0) C+='TABLE { behavior: '+B+' ; }';C+='';FCK._BehaviorsStyle=C;};return FCK._BehaviorsStyle;};function Doc_OnMouseUp(){if (FCK.EditorWindow.event.srcElement.tagName=='HTML'){FCK.Focus();FCK.EditorWindow.event.cancelBubble=true;FCK.EditorWindow.event.returnValue=false;}};function Doc_OnPaste(){var A=FCK.EditorDocument.body;A.detachEvent('onpaste',Doc_OnPaste);var B=FCK.Paste(!FCKConfig.ForcePasteAsPlainText&&!FCKConfig.AutoDetectPasteFromWord);A.attachEvent('onpaste',Doc_OnPaste);return B;};function Doc_OnDblClick(){FCK.OnDoubleClick(FCK.EditorWindow.event.srcElement);FCK.EditorWindow.event.cancelBubble=true;};function Doc_OnSelectionChange(){if (!FCK.IsSelectionChangeLocked&&FCK.EditorDocument) FCK.Events.FireEvent("OnSelectionChange");};function Doc_OnDrop(){if (FCK.MouseDownFlag){FCK.MouseDownFlag=false;return;};if (FCKConfig.ForcePasteAsPlainText){var A=FCK.EditorWindow.event;if (FCK._CheckIsPastingEnabled()||FCKConfig.ShowDropDialog) FCK.PasteAsPlainText(A.dataTransfer.getData('Text'));A.returnValue=false;A.cancelBubble=true;}};FCK.InitializeBehaviors=function(A){this.EditorDocument.attachEvent('onmouseup',Doc_OnMouseUp);this.EditorDocument.body.attachEvent('onpaste',Doc_OnPaste);this.EditorDocument.body.attachEvent('ondrop',Doc_OnDrop);FCK.ContextMenu._InnerContextMenu.AttachToElement(FCK.EditorDocument.body);this.EditorDocument.attachEvent("onkeydown",FCK._KeyDownListener);this.EditorDocument.attachEvent("ondblclick",Doc_OnDblClick);this.EditorDocument.attachEvent("onbeforedeactivate",function(){ FCKSelection.Save(true);});this.EditorDocument.attachEvent("onselectionchange",Doc_OnSelectionChange);FCKTools.AddEventListener(FCK.EditorDocument,'mousedown',Doc_OnMouseDown);};FCK.InsertHtml=function(A){A=FCKConfig.ProtectedSource.Protect(A);A=FCK.ProtectEvents(A);A=FCK.ProtectUrls(A);A=FCK.ProtectTags(A);FCKSelection.Restore();FCK.EditorWindow.focus();FCKUndo.SaveUndoStep();var B=FCKSelection.GetSelection();if (B.type.toLowerCase()=='control') B.clear();A=''+A;B.createRange().pasteHTML(A);FCK.EditorDocument.getElementById('__fakeFCKRemove__').removeNode(true);FCKDocumentProcessor.Process(FCK.EditorDocument);this.Events.FireEvent("OnSelectionChange");};FCK.SetInnerHtml=function(A){var B=FCK.EditorDocument;B.body.innerHTML='
     
    '+A;B.getElementById('__fakeFCKRemove__').removeNode(true);};function FCK_PreloadImages(){var A=new FCKImagePreloader();A.AddImages(FCKConfig.PreloadImages);A.AddImages(FCKConfig.SkinPath+'fck_strip.gif');A.OnComplete=LoadToolbarSetup;A.Start();};function Document_OnContextMenu(){return (event.srcElement._FCKShowContextMenu==true);};document.oncontextmenu=Document_OnContextMenu;function FCK_Cleanup(){this.LinkedField=null;this.EditorWindow=null;this.EditorDocument=null;};FCK._ExecPaste=function(){if (FCK._PasteIsRunning) return true;if (FCKConfig.ForcePasteAsPlainText){FCK.PasteAsPlainText();return false;};var A=FCK._CheckIsPastingEnabled(true);if (A===false) FCKTools.RunFunction(FCKDialog.OpenDialog,FCKDialog,['FCKDialog_Paste',FCKLang.Paste,'dialog/fck_paste.html',400,330,'Security']);else{if (FCKConfig.AutoDetectPasteFromWord&&A.length>0){var B=/<\w[^>]*(( class="?MsoNormal"?)|(="mso-))/gi;if (B.test(A)){if (confirm(FCKLang.PasteWordConfirm)){FCK.PasteFromWord();return false;}}};FCK._PasteIsRunning=true;FCK.ExecuteNamedCommand('Paste');delete FCK._PasteIsRunning;};return false;};FCK.PasteAsPlainText=function(A){if (!FCK._CheckIsPastingEnabled()){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteAsText,'dialog/fck_paste.html',400,330,'PlainText');return;};var B=null;if (!A) B=clipboardData.getData("Text");else B=A;if (B&&B.length>0){B=FCKTools.HTMLEncode(B);B=FCKTools.ProcessLineBreaks(window,FCKConfig,B);var C=B.search('

    ');var D=B.search('

    ');if ((C!=-1&&D!=-1&&C0){if (FCKSelection.GetType()=='Control'){var D=this.EditorDocument.createElement('A');D.href=A;var E=FCKSelection.GetSelectedElement();E.parentNode.insertBefore(D,E);E.parentNode.removeChild(E);D.appendChild(E);return [D];};var F='javascript:void(0);/*'+(new Date().getTime())+'*/';FCK.ExecuteNamedCommand('CreateLink',F,false,!!B);var G=this.EditorDocument.links;for (i=0;i0&&!isNaN(E)) this.PageConfig[D]=parseInt(E,10);else this.PageConfig[D]=E;}};function FCKConfig_LoadPageConfig(){var A=FCKConfig.PageConfig;for (var B in A) FCKConfig[B]=A[B];};function FCKConfig_PreProcess(){var A=FCKConfig;if (A.AllowQueryStringDebug){try{if ((/fckdebug=true/i).test(window.top.location.search)) A.Debug=true;}catch (e) { }};if (!A.PluginsPath.EndsWith('/')) A.PluginsPath+='/';var B=A.ToolbarComboPreviewCSS;if (!B||B.length==0) A.ToolbarComboPreviewCSS=A.EditorAreaCSS;A.RemoveAttributesArray=(A.RemoveAttributes||'').split(',');if (!FCKConfig.SkinEditorCSS||FCKConfig.SkinEditorCSS.length==0) FCKConfig.SkinEditorCSS=FCKConfig.SkinPath+'fck_editor.css';if (!FCKConfig.SkinDialogCSS||FCKConfig.SkinDialogCSS.length==0) FCKConfig.SkinDialogCSS=FCKConfig.SkinPath+'fck_dialog.css';};FCKConfig.ToolbarSets={};FCKConfig.Plugins={};FCKConfig.Plugins.Items=[];FCKConfig.Plugins.Add=function(A,B,C){FCKConfig.Plugins.Items.AddItem([A,B,C]);};FCKConfig.ProtectedSource={};FCKConfig.ProtectedSource._CodeTag=(new Date()).valueOf();FCKConfig.ProtectedSource.RegexEntries=[//g,//gi,//gi];FCKConfig.ProtectedSource.Add=function(A){this.RegexEntries.AddItem(A);};FCKConfig.ProtectedSource.Protect=function(A){var B=this._CodeTag;function _Replace(protectedSource){var C=FCKTempBin.AddElement(protectedSource);return '';};for (var i=0;i|>)","g");return A.replace(D,_Replace);};FCKConfig.GetBodyAttributes=function(){var A='';if (this.BodyId&&this.BodyId.length>0) A+=' id="'+this.BodyId+'"';if (this.BodyClass&&this.BodyClass.length>0) A+=' class="'+this.BodyClass+'"';return A;};FCKConfig.ApplyBodyAttributes=function(A){if (this.BodyId&&this.BodyId.length>0) A.id=FCKConfig.BodyId;if (this.BodyClass&&this.BodyClass.length>0) A.className+=' '+FCKConfig.BodyClass;}; -var FCKDebug={Output:function(){},OutputObject:function(){}}; -var FCKDomTools={MoveChildren:function(A,B,C){if (A==B) return;var D;if (C){while ((D=A.lastChild)) B.insertBefore(A.removeChild(D),B.firstChild);}else{while ((D=A.firstChild)) B.appendChild(A.removeChild(D));}},MoveNode:function(A,B,C){if (C) B.insertBefore(FCKDomTools.RemoveNode(A),B.firstChild);else B.appendChild(FCKDomTools.RemoveNode(A));},TrimNode:function(A){this.LTrimNode(A);this.RTrimNode(A);},LTrimNode:function(A){var B;while ((B=A.firstChild)){if (B.nodeType==3){var C=B.nodeValue.LTrim();var D=B.nodeValue.length;if (C.length==0){A.removeChild(B);continue;}else if (C.length0) break;if (A.lastChild) A=A.lastChild;else return this.GetPreviousSourceElement(A,B,C,D);};return null;},GetNextSourceElement:function(A,B,C,D,E){while((A=this.GetNextSourceNode(A,E))){if (A.nodeType==1){if (C&&A.nodeName.IEquals(C)) break;if (D&&A.nodeName.IEquals(D)) return this.GetNextSourceElement(A,B,C,D);return A;}else if (B&&A.nodeType==3&&A.nodeValue.RTrim().length>0) break;};return null;},GetNextSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.firstChild) E=A.firstChild;else{if (D&&A==D) return null;E=A.nextSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetNextSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetNextSourceNode(E,false,C,D);return E;},GetPreviousSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.lastChild) E=A.lastChild;else{if (D&&A==D) return null;E=A.previousSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetPreviousSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetPreviousSourceNode(E,false,C,D);return E;},InsertAfterNode:function(A,B){return A.parentNode.insertBefore(B,A.nextSibling);},GetParents:function(A){var B=[];while (A){B.unshift(A);A=A.parentNode;};return B;},GetCommonParents:function(A,B){var C=this.GetParents(A);var D=this.GetParents(B);var E=[];for (var i=0;i0) D[C.pop().toLowerCase()]=1;var E=this.GetCommonParents(A,B);var F=null;while ((F=E.pop())){if (D[F.nodeName.toLowerCase()]) return F;};return null;},GetIndexOf:function(A){var B=A.parentNode?A.parentNode.firstChild:null;var C=-1;while (B){C++;if (B==A) return C;B=B.nextSibling;};return-1;},PaddingNode:null,EnforcePaddingNode:function(A,B){try{if (!A||!A.body) return;}catch (e){return;};this.CheckAndRemovePaddingNode(A,B,true);try{if (A.body.lastChild&&(A.body.lastChild.nodeType!=1||A.body.lastChild.tagName.toLowerCase()==B.toLowerCase())) return;}catch (e){return;};var C=A.createElement(B);if (FCKBrowserInfo.IsGecko&&FCKListsLib.NonEmptyBlockElements[B]) FCKTools.AppendBogusBr(C);this.PaddingNode=C;if (A.body.childNodes.length==1&&A.body.firstChild.nodeType==1&&A.body.firstChild.tagName.toLowerCase()=='br'&&(A.body.firstChild.getAttribute('_moz_dirty')!=null||A.body.firstChild.getAttribute('type')=='_moz')) A.body.replaceChild(C,A.body.firstChild);else A.body.appendChild(C);},CheckAndRemovePaddingNode:function(A,B,C){var D=this.PaddingNode;if (!D) return;try{if (D.parentNode!=A.body||D.tagName.toLowerCase()!=B||(D.childNodes.length>1)||(D.firstChild&&D.firstChild.nodeValue!='\xa0'&&String(D.firstChild.tagName).toLowerCase()!='br')){this.PaddingNode=null;return;}}catch (e){this.PaddingNode=null;return;};if (!C){if (D.parentNode.childNodes.length>1) D.parentNode.removeChild(D);this.PaddingNode=null;}},HasAttribute:function(A,B){if (A.hasAttribute) return A.hasAttribute(B);else{var C=A.attributes[B];return (C!=undefined&&C.specified);}},HasAttributes:function(A){var B=A.attributes;for (var i=0;i0) return true;}else if (B[i].specified) return true;};return false;},RemoveAttribute:function(A,B){if (FCKBrowserInfo.IsIE&&B.toLowerCase()=='class') B='className';return A.removeAttribute(B,0);},RemoveAttributes:function (A,B){for (var i=0;i0) return false;C=C.nextSibling;};return D?this.CheckIsEmptyElement(D,B):true;},SetElementStyles:function(A,B){var C=A.style;for (var D in B) C[D]=B[D];},SetOpacity:function(A,B){if (FCKBrowserInfo.IsIE){B=Math.round(B*100);A.style.filter=(B>100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+B+')');}else A.style.opacity=B;},GetCurrentElementStyle:function(A,B){if (FCKBrowserInfo.IsIE) return A.currentStyle[B];else return A.ownerDocument.defaultView.getComputedStyle(A,'').getPropertyValue(B);},GetPositionedAncestor:function(A){var B=A;while (B!=FCKTools.GetElementDocument(B).documentElement){if (this.GetCurrentElementStyle(B,'position')!='static') return B;if (B==FCKTools.GetElementDocument(B).documentElement&¤tWindow!=w) B=currentWindow.frameElement;else B=B.parentNode;};return null;},ScrollIntoView:function(A,B){var C=FCKTools.GetElementWindow(A);var D=FCKTools.GetViewPaneSize(C).Height;var E=D*-1;if (B===false){E+=A.offsetHeight||0;E+=parseInt(this.GetCurrentElementStyle(A,'marginBottom')||0,10)||0;};var F=FCKTools.GetDocumentPosition(C,A);E+=F.y;var G=FCKTools.GetScrollPosition(C).Y;if (E>0&&(E>G||E'+styleDef+'';};var C=function(cssFileUrl,markTemp){if (cssFileUrl.length==0) return '';var B=markTemp?' _fcktemp="true"':'';return '';};return function(cssFileOrArrayOrDef,markTemp){if (!cssFileOrArrayOrDef) return '';if (typeof(cssFileOrArrayOrDef)=='string'){if (/[\\\/\.][^{}]*$/.test(cssFileOrArrayOrDef)){return this.GetStyleHtml(cssFileOrArrayOrDef.split(','),markTemp);}else return A(this._GetUrlFixedCss(cssFileOrArrayOrDef),markTemp);}else{var E='';for (var i=0;i/g,'>');return A;};FCKTools.HTMLDecode=function(A){if (!A) return '';A=A.replace(/>/g,'>');A=A.replace(/</g,'<');A=A.replace(/&/g,'&');return A;};FCKTools._ProcessLineBreaksForPMode=function(A,B,C,D,E){var F=0;var G="

    ";var H="

    ";var I="
    ";if (C){G="
  • ";H="
  • ";F=1;}while (D&&D!=A.FCK.EditorDocument.body){if (D.tagName.toLowerCase()=='p'){F=1;break;};D=D.parentNode;};for (var i=0;i0) return A[A.length-1];return null;};FCKTools.GetDocumentPosition=function(w,A){var x=0;var y=0;var B=A;var C=null;var D=FCKTools.GetElementWindow(B);while (B&&!(D==w&&(B==w.document.body||B==w.document.documentElement))){x+=B.offsetLeft-B.scrollLeft;y+=B.offsetTop-B.scrollTop;if (!FCKBrowserInfo.IsOpera){var E=C;while (E&&E!=B){x-=E.scrollLeft;y-=E.scrollTop;E=E.parentNode;}};C=B;if (B.offsetParent) B=B.offsetParent;else{if (D!=w){B=D.frameElement;C=null;if (B) D=B.contentWindow.parent;}else B=null;}};if (FCKDomTools.GetCurrentElementStyle(w.document.body,'position')!='static'||(FCKBrowserInfo.IsIE&&FCKDomTools.GetPositionedAncestor(A)==null)){x+=w.document.body.offsetLeft;y+=w.document.body.offsetTop;};return { "x":x,"y":y };};FCKTools.GetWindowPosition=function(w,A){var B=this.GetDocumentPosition(w,A);var C=FCKTools.GetScrollPosition(w);B.x-=C.X;B.y-=C.Y;return B;};FCKTools.ProtectFormStyles=function(A){if (!A||A.nodeType!=1||A.tagName.toLowerCase()!='form') return [];var B=[];var C=['style','className'];for (var i=0;i0){for (var i=B.length-1;i>=0;i--){var C=B[i][0];var D=B[i][1];if (D) A.insertBefore(C,D);else A.appendChild(C);}}};FCKTools.GetNextNode=function(A,B){if (A.firstChild) return A.firstChild;else if (A.nextSibling) return A.nextSibling;else{var C=A.parentNode;while (C){if (C==B) return null;if (C.nextSibling) return C.nextSibling;else C=C.parentNode;}};return null;};FCKTools.GetNextTextNode=function(A,B,C){node=this.GetNextNode(A,B);if (C&&node&&C(node)) return null;while (node&&node.nodeType!=3){node=this.GetNextNode(node,B);if (C&&node&&C(node)) return null;};return node;};FCKTools.Merge=function(){var A=arguments;var o=A[0];for (var i=1;i');document.domain = '"+FCK_RUNTIME_DOMAIN+"';document.close();}() ) ;";if (FCKBrowserInfo.IsIE){if (FCKBrowserInfo.IsIE7||!FCKBrowserInfo.IsIE6) return "";else return "javascript: '';";};return "javascript: void(0);";};FCKTools.ResetStyles=function(A){A.style.cssText='margin:0;padding:0;border:0;background-color:transparent;background-image:none;';}; -FCKTools.CancelEvent=function(e){return false;};FCKTools._AppendStyleSheet=function(A,B){return A.createStyleSheet(B).owningElement;};FCKTools.AppendStyleString=function(A,B){if (!B) return null;var s=A.createStyleSheet("");s.cssText=B;return s;};FCKTools.ClearElementAttributes=function(A){A.clearAttributes();};FCKTools.GetAllChildrenIds=function(A){var B=[];for (var i=0;i0) B[B.length]=C;};return B;};FCKTools.RemoveOuterTags=function(e){e.insertAdjacentHTML('beforeBegin',e.innerHTML);e.parentNode.removeChild(e);};FCKTools.CreateXmlObject=function(A){var B;switch (A){case 'XmlHttp':if (document.location.protocol!='file:') try { return new XMLHttpRequest();} catch (e) {};B=['MSXML2.XmlHttp','Microsoft.XmlHttp'];break;case 'DOMDocument':B=['MSXML2.DOMDocument','Microsoft.XmlDom'];break;};for (var i=0;i<2;i++){try { return new ActiveXObject(B[i]);}catch (e){}};if (FCKLang.NoActiveX){alert(FCKLang.NoActiveX);FCKLang.NoActiveX=null;};return null;};FCKTools.DisableSelection=function(A){A.unselectable='on';var e,i=0;while ((e=A.all[i++])){switch (e.tagName){case 'IFRAME':case 'TEXTAREA':case 'INPUT':case 'SELECT':break;default:e.unselectable='on';}}};FCKTools.GetScrollPosition=function(A){var B=A.document;var C={ X:B.documentElement.scrollLeft,Y:B.documentElement.scrollTop };if (C.X>0||C.Y>0) return C;return { X:B.body.scrollLeft,Y:B.body.scrollTop };};FCKTools.AddEventListener=function(A,B,C){A.attachEvent('on'+B,C);};FCKTools.RemoveEventListener=function(A,B,C){A.detachEvent('on'+B,C);};FCKTools.AddEventListenerEx=function(A,B,C,D){var o={};o.Source=A;o.Params=D||[];o.Listener=function(ev){return C.apply(o.Source,[ev].concat(o.Params));};if (FCK.IECleanup) FCK.IECleanup.AddItem(null,function() { o.Source=null;o.Params=null;});A.attachEvent('on'+B,o.Listener);A=null;D=null;};FCKTools.GetViewPaneSize=function(A){var B;var C=A.document.documentElement;if (C&&C.clientWidth) B=C;else B=A.document.body;if (B) return { Width:B.clientWidth,Height:B.clientHeight };else return { Width:0,Height:0 };};FCKTools.SaveStyles=function(A){var B=FCKTools.ProtectFormStyles(A);var C={};if (A.className.length>0){C.Class=A.className;A.className='';};var D=A.style.cssText;if (D.length>0){C.Inline=D;A.style.cssText='';};FCKTools.RestoreFormStyles(A,B);return C;};FCKTools.RestoreStyles=function(A,B){var C=FCKTools.ProtectFormStyles(A);A.className=B.Class||'';A.style.cssText=B.Inline||'';FCKTools.RestoreFormStyles(A,C);};FCKTools.RegisterDollarFunction=function(A){A.$=A.document.getElementById;};FCKTools.AppendElement=function(A,B){return A.appendChild(this.GetElementDocument(A).createElement(B));};FCKTools.ToLowerCase=function(A){return A.toLowerCase();}; -var FCKeditorAPI;function InitializeAPI(){var A=window.parent;if (!(FCKeditorAPI=A.FCKeditorAPI)){var B='window.FCKeditorAPI = {Version : "2.6.3",VersionBuild : "19836",Instances : new Object(),GetInstance : function( name ){return this.Instances[ name ];},_FormSubmit : function(){for ( var name in FCKeditorAPI.Instances ){var oEditor = FCKeditorAPI.Instances[ name ] ;if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )oEditor.UpdateLinkedField() ;}this._FCKOriginalSubmit() ;},_FunctionQueue : {Functions : new Array(),IsRunning : false,Add : function( f ){this.Functions.push( f );if ( !this.IsRunning )this.StartNext();},StartNext : function(){var aQueue = this.Functions ;if ( aQueue.length > 0 ){this.IsRunning = true;aQueue[0].call();}else this.IsRunning = false;},Remove : function( f ){var aQueue = this.Functions;var i = 0, fFunc;while( (fFunc = aQueue[ i ]) ){if ( fFunc == f )aQueue.splice( i,1 );i++ ;}this.StartNext();}}}';if (A.execScript) A.execScript(B,'JavaScript');else{if (FCKBrowserInfo.IsGecko10){eval.call(A,B);}else if(FCKBrowserInfo.IsAIR){FCKAdobeAIR.FCKeditorAPI_Evaluate(A,B);}else if (FCKBrowserInfo.IsSafari){var C=A.document;var D=C.createElement('script');D.appendChild(C.createTextNode(B));C.documentElement.appendChild(D);}else A.eval(B);};FCKeditorAPI=A.FCKeditorAPI;FCKeditorAPI.__Instances=FCKeditorAPI.Instances;};FCKeditorAPI.Instances[FCK.Name]=FCK;};function _AttachFormSubmitToAPI(){var A=FCK.GetParentForm();if (A){FCKTools.AddEventListener(A,'submit',FCK.UpdateLinkedField);if (!A._FCKOriginalSubmit&&(typeof(A.submit)=='function'||(!A.submit.tagName&&!A.submit.length))){A._FCKOriginalSubmit=A.submit;A.submit=FCKeditorAPI._FormSubmit;}}};function FCKeditorAPI_Cleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat&&!window.FCKUnloadFlag) return;delete FCKeditorAPI.Instances[FCK.Name];};function FCKeditorAPI_ConfirmCleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat) window.FCKUnloadFlag=true;};FCKTools.AddEventListener(window,'unload',FCKeditorAPI_Cleanup);FCKTools.AddEventListener(window,'beforeunload',FCKeditorAPI_ConfirmCleanup); -var FCKImagePreloader=function(){this._Images=[];};FCKImagePreloader.prototype={AddImages:function(A){if (typeof(A)=='string') A=A.split(';');this._Images=this._Images.concat(A);},Start:function(){var A=this._Images;this._PreloadCount=A.length;for (var i=0;i]*\>)/i,AfterBody:/(\<\/body\>[\s\S]*$)/i,ToReplace:/___fcktoreplace:([\w]+)/ig,MetaHttpEquiv:/http-equiv\s*=\s*["']?([^"' ]+)/i,HasBaseTag:/]/i,HtmlOpener:/]*>/i,HeadOpener:/]*>/i,HeadCloser:/<\/head\s*>/i,FCK_Class:/\s*FCK__[^ ]*(?=\s+|$)/,ElementName:/(^[a-z_:][\w.\-:]*\w$)|(^[a-z_]$)/,ForceSimpleAmpersand:/___FCKAmp___/g,SpaceNoClose:/\/>/g,EmptyParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>\s*(<\/\1>)?$/,EmptyOutParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>(?:\s*| )(<\/\1>)?$/,TagBody:/>]+))/gi,ProtectUrlsA:/]+))/gi,ProtectUrlsArea:/]+))/gi,Html4DocType:/HTML 4\.0 Transitional/i,DocTypeTag:/]*>/i,HtmlDocType:/DTD HTML/,TagsWithEvent:/<[^\>]+ on\w+[\s\r\n]*=[\s\r\n]*?('|")[\s\S]+?\>/g,EventAttributes:/\s(on\w+)[\s\r\n]*=[\s\r\n]*?('|")([\s\S]*?)\2/g,ProtectedEvents:/\s\w+_fckprotectedatt="([^"]+)"/g,StyleProperties:/\S+\s*:/g,InvalidSelfCloseTags:/(<(?!base|meta|link|hr|br|param|img|area|input)([a-zA-Z0-9:]+)[^>]*)\/>/gi,StyleVariableAttName:/#\(\s*("|')(.+?)\1[^\)]*\s*\)/g,RegExp:/^\/(.*)\/([gim]*)$/,HtmlTag:/<[^\s<>](?:"[^"]*"|'[^']*'|[^<])*>/}; -var FCKListsLib={BlockElements:{ address:1,blockquote:1,center:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,marquee:1,noscript:1,ol:1,p:1,pre:1,script:1,table:1,ul:1 },NonEmptyBlockElements:{ p:1,div:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,address:1,pre:1,ol:1,ul:1,li:1,td:1,th:1 },InlineChildReqElements:{ abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },InlineNonEmptyElements:{ a:1,abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },EmptyElements:{ base:1,col:1,meta:1,link:1,hr:1,br:1,param:1,img:1,area:1,input:1 },PathBlockElements:{ address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,de:1 },PathBlockLimitElements:{ body:1,div:1,td:1,th:1,caption:1,form:1 },StyleBlockElements:{ address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 },StyleObjectElements:{ img:1,hr:1,li:1,table:1,tr:1,td:1,embed:1,object:1,ol:1,ul:1 },NonEditableElements:{ button:1,option:1,script:1,iframe:1,textarea:1,object:1,embed:1,map:1,applet:1 },BlockBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1 },ListBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1,br:1 }}; -var FCKLanguageManager=FCK.Language={AvailableLanguages:{af:'Afrikaans',ar:'Arabic',bg:'Bulgarian',bn:'Bengali/Bangla',bs:'Bosnian',ca:'Catalan',cs:'Czech',da:'Danish',de:'German',el:'Greek',en:'English','en-au':'English (Australia)','en-ca':'English (Canadian)','en-uk':'English (United Kingdom)',eo:'Esperanto',es:'Spanish',et:'Estonian',eu:'Basque',fa:'Persian',fi:'Finnish',fo:'Faroese',fr:'French','fr-ca':'French (Canada)',gl:'Galician',gu:'Gujarati',he:'Hebrew',hi:'Hindi',hr:'Croatian',hu:'Hungarian',it:'Italian',ja:'Japanese',km:'Khmer',ko:'Korean',lt:'Lithuanian',lv:'Latvian',mn:'Mongolian',ms:'Malay',nb:'Norwegian Bokmal',nl:'Dutch',no:'Norwegian',pl:'Polish',pt:'Portuguese (Portugal)','pt-br':'Portuguese (Brazil)',ro:'Romanian',ru:'Russian',sk:'Slovak',sl:'Slovenian',sr:'Serbian (Cyrillic)','sr-latn':'Serbian (Latin)',sv:'Swedish',th:'Thai',tr:'Turkish',uk:'Ukrainian',vi:'Vietnamese',zh:'Chinese Traditional','zh-cn':'Chinese Simplified'},GetActiveLanguage:function(){if (FCKConfig.AutoDetectLanguage){var A;if (navigator.userLanguage) A=navigator.userLanguage.toLowerCase();else if (navigator.language) A=navigator.language.toLowerCase();else{return FCKConfig.DefaultLanguage;};if (A.length>=5){A=A.substr(0,5);if (this.AvailableLanguages[A]) return A;};if (A.length>=2){A=A.substr(0,2);if (this.AvailableLanguages[A]) return A;}};return this.DefaultLanguage;},TranslateElements:function(A,B,C,D){var e=A.getElementsByTagName(B);var E,s;for (var i=0;i0) C+='|'+FCKConfig.AdditionalNumericEntities;FCKXHtmlEntities.EntitiesRegex=new RegExp(C,'g');}; -var FCKXHtml={};FCKXHtml.CurrentJobNum=0;FCKXHtml.GetXHTML=function(A,B,C){FCKDomTools.CheckAndRemovePaddingNode(FCKTools.GetElementDocument(A),FCKConfig.EnterMode);FCKXHtmlEntities.Initialize();this._NbspEntity=(FCKConfig.ProcessHTMLEntities?'nbsp':'#160');var D=FCK.IsDirty();FCKXHtml.SpecialBlocks=[];this.XML=FCKTools.CreateXmlObject('DOMDocument');this.MainNode=this.XML.appendChild(this.XML.createElement('xhtml'));FCKXHtml.CurrentJobNum++;if (B) this._AppendNode(this.MainNode,A);else this._AppendChildNodes(this.MainNode,A,false);var E=this._GetMainXmlString();this.XML=null;if (FCKBrowserInfo.IsSafari) E=E.replace(/^/,'');E=E.substr(7,E.length-15).Trim();if (FCKConfig.DocType.length>0&&FCKRegexLib.HtmlDocType.test(FCKConfig.DocType)) E=E.replace(FCKRegexLib.SpaceNoClose,'>');else E=E.replace(FCKRegexLib.SpaceNoClose,' />');if (FCKConfig.ForceSimpleAmpersand) E=E.replace(FCKRegexLib.ForceSimpleAmpersand,'&');if (C) E=FCKCodeFormatter.Format(E);for (var i=0;i0;if (C) A.appendChild(this.XML.createTextNode(B.replace(FCKXHtmlEntities.EntitiesRegex,FCKXHtml_GetEntity)));return C;};function FCKXHtml_GetEntity(A){var B=FCKXHtmlEntities.Entities[A]||('#'+A.charCodeAt(0));return '#?-:'+B+';';};FCKXHtml.TagProcessors={a:function(A,B){if (B.innerHTML.Trim().length==0&&!B.name) return false;var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'href',C);if (FCKBrowserInfo.IsIE){if (B.name) FCKXHtml._AppendAttribute(A,'name',B.name);};A=FCKXHtml._AppendChildNodes(A,B,false);return A;},area:function(A,B){var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'href',C);if (FCKBrowserInfo.IsIE){if (!A.attributes.getNamedItem('coords')){var D=B.getAttribute('coords',2);if (D&&D!='0,0,0') FCKXHtml._AppendAttribute(A,'coords',D);};if (!A.attributes.getNamedItem('shape')){var E=B.getAttribute('shape',2);if (E&&E.length>0) FCKXHtml._AppendAttribute(A,'shape',E.toLowerCase());}};return A;},body:function(A,B){A=FCKXHtml._AppendChildNodes(A,B,false);A.removeAttribute('spellcheck');return A;},iframe:function(A,B){var C=B.innerHTML;if (FCKBrowserInfo.IsGecko) C=FCKTools.HTMLDecode(C);C=C.replace(/\s_fcksavedurl="[^"]*"/g,'');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(C)));return A;},img:function(A,B){if (!A.attributes.getNamedItem('alt')) FCKXHtml._AppendAttribute(A,'alt','');var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'src',C);if (B.style.width) A.removeAttribute('width');if (B.style.height) A.removeAttribute('height');return A;},li:function(A,B,C){if (C.nodeName.IEquals(['ul','ol'])) return FCKXHtml._AppendChildNodes(A,B,true);var D=FCKXHtml.XML.createElement('ul');B._fckxhtmljob=null;do{FCKXHtml._AppendNode(D,B);do{B=FCKDomTools.GetNextSibling(B);} while (B&&B.nodeType==3&&B.nodeValue.Trim().length==0)} while (B&&B.nodeName.toLowerCase()=='li') return D;},ol:function(A,B,C){if (B.innerHTML.Trim().length==0) return false;var D=C.lastChild;if (D&&D.nodeType==3) D=D.previousSibling;if (D&&D.nodeName.toUpperCase()=='LI'){B._fckxhtmljob=null;FCKXHtml._AppendNode(D,B);return false;};A=FCKXHtml._AppendChildNodes(A,B);return A;},pre:function (A,B){var C=B.firstChild;if (C&&C.nodeType==3) A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem('\r\n')));FCKXHtml._AppendChildNodes(A,B,true);return A;},script:function(A,B){if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A,'type','text/javascript');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(B.text)));return A;},span:function(A,B){if (B.innerHTML.length==0) return false;A=FCKXHtml._AppendChildNodes(A,B,false);return A;},style:function(A,B){if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A,'type','text/css');var C=B.innerHTML;if (FCKBrowserInfo.IsIE) C=C.replace(/^(\r\n|\n|\r)/,'');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(C)));return A;},title:function(A,B){A.appendChild(FCKXHtml.XML.createTextNode(FCK.EditorDocument.title));return A;}};FCKXHtml.TagProcessors.ul=FCKXHtml.TagProcessors.ol; -FCKXHtml._GetMainXmlString=function(){return this.MainNode.xml;};FCKXHtml._AppendAttributes=function(A,B,C,D){var E=B.attributes,bHasStyle;for (var n=0;n0){var I=FCKTools.ProtectFormStyles(B);var J=B.style.cssText.replace(FCKRegexLib.StyleProperties,FCKTools.ToLowerCase);FCKTools.RestoreFormStyles(B,I);this._AppendAttribute(C,'style',J);}};FCKXHtml.TagProcessors['div']=function(A,B){if (B.align.length>0) FCKXHtml._AppendAttribute(A,'align',B.align);A=FCKXHtml._AppendChildNodes(A,B,true);return A;};FCKXHtml.TagProcessors['font']=function(A,B){if (A.attributes.length==0) A=FCKXHtml.XML.createDocumentFragment();A=FCKXHtml._AppendChildNodes(A,B);return A;};FCKXHtml.TagProcessors['form']=function(A,B){if (B.acceptCharset&&B.acceptCharset.length>0&&B.acceptCharset!='UNKNOWN') FCKXHtml._AppendAttribute(A,'accept-charset',B.acceptCharset);var C=B.attributes['name'];if (C&&C.value.length>0) FCKXHtml._AppendAttribute(A,'name',C.value);A=FCKXHtml._AppendChildNodes(A,B,true);return A;};FCKXHtml.TagProcessors['input']=function(A,B){if (B.name) FCKXHtml._AppendAttribute(A,'name',B.name);if (B.value&&!A.attributes.getNamedItem('value')) FCKXHtml._AppendAttribute(A,'value',B.value);if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A,'type','text');return A;};FCKXHtml.TagProcessors['label']=function(A,B){if (B.htmlFor.length>0) FCKXHtml._AppendAttribute(A,'for',B.htmlFor);A=FCKXHtml._AppendChildNodes(A,B);return A;};FCKXHtml.TagProcessors['map']=function(A,B){if (!A.attributes.getNamedItem('name')){var C=B.name;if (C) FCKXHtml._AppendAttribute(A,'name',C);};A=FCKXHtml._AppendChildNodes(A,B,true);return A;};FCKXHtml.TagProcessors['meta']=function(A,B){var C=A.attributes.getNamedItem('http-equiv');if (C==null||C.value.length==0){var D=B.outerHTML.match(FCKRegexLib.MetaHttpEquiv);if (D){D=D[1];FCKXHtml._AppendAttribute(A,'http-equiv',D);}};return A;};FCKXHtml.TagProcessors['option']=function(A,B){if (B.selected&&!A.attributes.getNamedItem('selected')) FCKXHtml._AppendAttribute(A,'selected','selected');A=FCKXHtml._AppendChildNodes(A,B);return A;};FCKXHtml.TagProcessors['textarea']=FCKXHtml.TagProcessors['select']=function(A,B){if (B.name) FCKXHtml._AppendAttribute(A,'name',B.name);A=FCKXHtml._AppendChildNodes(A,B);return A;}; -var FCKCodeFormatter={};FCKCodeFormatter.Init=function(){var A=this.Regex={};A.BlocksOpener=/\<(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi;A.BlocksCloser=/\<\/(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi;A.NewLineTags=/\<(BR|HR)[^\>]*\>/gi;A.MainTags=/\<\/?(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR)[^\>]*\>/gi;A.LineSplitter=/\s*\n+\s*/g;A.IncreaseIndent=/^\<(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \/\>]/i;A.DecreaseIndent=/^\<\/(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \>]/i;A.FormatIndentatorRemove=new RegExp('^'+FCKConfig.FormatIndentator);A.ProtectedTags=/(]*>)([\s\S]*?)(<\/PRE>)/gi;};FCKCodeFormatter._ProtectData=function(A,B,C,D){return B+'___FCKpd___'+FCKCodeFormatter.ProtectedData.AddItem(C)+D;};FCKCodeFormatter.Format=function(A){if (!this.Regex) this.Init();FCKCodeFormatter.ProtectedData=[];var B=A.replace(this.Regex.ProtectedTags,FCKCodeFormatter._ProtectData);B=B.replace(this.Regex.BlocksOpener,'\n$&');B=B.replace(this.Regex.BlocksCloser,'$&\n');B=B.replace(this.Regex.NewLineTags,'$&\n');B=B.replace(this.Regex.MainTags,'\n$&\n');var C='';var D=B.split(this.Regex.LineSplitter);B='';for (var i=0;iB[i]) return 1;};if (A.lengthB.length) return 1;return 0;};FCKUndo._CheckIsBookmarksEqual=function(A,B){if (!(A&&B)) return false;if (FCKBrowserInfo.IsIE){var C=A[1].search(A[0].StartId);var D=B[1].search(B[0].StartId);var E=A[1].search(A[0].EndId);var F=B[1].search(B[0].EndId);return C==D&&E==F;}else{return this._CompareCursors(A.Start,B.Start)==0&&this._CompareCursors(A.End,B.End)==0;}};FCKUndo.SaveUndoStep=function(){if (FCK.EditMode!=0||this.SaveLocked) return;if (this.SavedData.length) this.Changed=true;var A=FCK.EditorDocument.body.innerHTML;var B=this._GetBookmark();this.SavedData=this.SavedData.slice(0,this.CurrentIndex+1);if (this.CurrentIndex>0&&A==this.SavedData[this.CurrentIndex][0]&&this._CheckIsBookmarksEqual(B,this.SavedData[this.CurrentIndex][1])) return;else if (this.CurrentIndex==0&&this.SavedData.length&&A==this.SavedData[0][0]){this.SavedData[0][1]=B;return;};if (this.CurrentIndex+1>=FCKConfig.MaxUndoLevels) this.SavedData.shift();else this.CurrentIndex++;this.SavedData[this.CurrentIndex]=[A,B];FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.CheckUndoState=function(){return (this.Changed||this.CurrentIndex>0);};FCKUndo.CheckRedoState=function(){return (this.CurrentIndex<(this.SavedData.length-1));};FCKUndo.Undo=function(){if (this.CheckUndoState()){if (this.CurrentIndex==(this.SavedData.length-1)){this.SaveUndoStep();};this._ApplyUndoLevel(--this.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");}};FCKUndo.Redo=function(){if (this.CheckRedoState()){this._ApplyUndoLevel(++this.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");}};FCKUndo._ApplyUndoLevel=function(A){var B=this.SavedData[A];if (!B) return;if (FCKBrowserInfo.IsIE){if (B[1]&&B[1][1]) FCK.SetInnerHtml(B[1][1]);else FCK.SetInnerHtml(B[0]);}else FCK.EditorDocument.body.innerHTML=B[0];this._SelectBookmark(B[1]);this.TypesCount=0;this.Changed=false;this.Typing=false;}; -var FCKEditingArea=function(A){this.TargetElement=A;this.Mode=0;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKEditingArea_Cleanup);};FCKEditingArea.prototype.Start=function(A,B){var C=this.TargetElement;var D=FCKTools.GetElementDocument(C);while(C.firstChild) C.removeChild(C.firstChild);if (this.Mode==0){if (FCK_IS_CUSTOM_DOMAIN) A=''+A;if (FCKBrowserInfo.IsIE) A=A.replace(/(]*?)\s*\/?>(?!\s*<\/base>)/gi,'$1>');else if (!B){var E=A.match(FCKRegexLib.BeforeBody);var F=A.match(FCKRegexLib.AfterBody);if (E&&F){var G=A.substr(E[1].length,A.length-E[1].length-F[1].length);A=E[1]+' '+F[1];if (FCKBrowserInfo.IsGecko&&(G.length==0||FCKRegexLib.EmptyParagraph.test(G))) G='
    ';this._BodyHTML=G;}else this._BodyHTML=A;};var H=this.IFrame=D.createElement('iframe');var I='';H.frameBorder=0;H.style.width=H.style.height='100%';if (FCK_IS_CUSTOM_DOMAIN&&FCKBrowserInfo.IsIE){window._FCKHtmlToLoad=A.replace(//i,''+I);H.src='javascript:void( (function(){document.open() ;document.domain="'+document.domain+'" ;document.write( window.parent._FCKHtmlToLoad );document.close() ;window.parent._FCKHtmlToLoad = null ;})() )';}else if (!FCKBrowserInfo.IsGecko){H.src='javascript:void(0)';};C.appendChild(H);this.Window=H.contentWindow;if (!FCK_IS_CUSTOM_DOMAIN||!FCKBrowserInfo.IsIE){var J=this.Window.document;J.open();J.write(A.replace(//i,''+I));J.close();};if (FCKBrowserInfo.IsAIR) FCKAdobeAIR.EditingArea_Start(J,A);if (FCKBrowserInfo.IsGecko10&&!B){this.Start(A,true);return;};if (H.readyState&&H.readyState!='completed'){var K=this;setTimeout(function(){try{K.Window.document.documentElement.doScroll("left");}catch(e){setTimeout(arguments.callee,0);return;};K.Window._FCKEditingArea=K;FCKEditingArea_CompleteStart.call(K.Window);},0);}else{this.Window._FCKEditingArea=this;if (FCKBrowserInfo.IsGecko10) this.Window.setTimeout(FCKEditingArea_CompleteStart,500);else FCKEditingArea_CompleteStart.call(this.Window);}}else{var L=this.Textarea=D.createElement('textarea');L.className='SourceField';L.dir='ltr';FCKDomTools.SetElementStyles(L,{width:'100%',height:'100%',border:'none',resize:'none',outline:'none'});C.appendChild(L);L.value=A;FCKTools.RunFunction(this.OnLoad);}};function FCKEditingArea_CompleteStart(){if (!this.document.body){this.setTimeout(FCKEditingArea_CompleteStart,50);return;};var A=this._FCKEditingArea;A.Document=A.Window.document;A.MakeEditable();FCKTools.RunFunction(A.OnLoad);};FCKEditingArea.prototype.MakeEditable=function(){var A=this.Document;if (FCKBrowserInfo.IsIE){A.body.disabled=true;A.body.contentEditable=true;A.body.removeAttribute("disabled");}else{try{A.body.spellcheck=(this.FFSpellChecker!==false);if (this._BodyHTML){A.body.innerHTML=this._BodyHTML;A.body.offsetLeft;this._BodyHTML=null;};A.designMode='on';A.execCommand('enableObjectResizing',false,!FCKConfig.DisableObjectResizing);A.execCommand('enableInlineTableEditing',false,!FCKConfig.DisableFFTableHandles);}catch (e){FCKTools.AddEventListener(this.Window.frameElement,'DOMAttrModified',FCKEditingArea_Document_AttributeNodeModified);}}};function FCKEditingArea_Document_AttributeNodeModified(A){var B=A.currentTarget.contentWindow._FCKEditingArea;if (B._timer) window.clearTimeout(B._timer);B._timer=FCKTools.SetTimeout(FCKEditingArea_MakeEditableByMutation,1000,B);};function FCKEditingArea_MakeEditableByMutation(){delete this._timer;FCKTools.RemoveEventListener(this.Window.frameElement,'DOMAttrModified',FCKEditingArea_Document_AttributeNodeModified);this.MakeEditable();};FCKEditingArea.prototype.Focus=function(){try{if (this.Mode==0){if (FCKBrowserInfo.IsIE) this._FocusIE();else this.Window.focus();}else{var A=FCKTools.GetElementDocument(this.Textarea);if ((!A.hasFocus||A.hasFocus())&&A.activeElement==this.Textarea) return;this.Textarea.focus();}}catch(e) {}};FCKEditingArea.prototype._FocusIE=function(){this.Document.body.setActive();this.Window.focus();var A=this.Document.selection.createRange();var B=A.parentElement();var C=B.nodeName.toLowerCase();if (B.childNodes.length>0||!(FCKListsLib.BlockElements[C]||FCKListsLib.NonEmptyBlockElements[C])){return;};A=new FCKDomRange(this.Window);A.MoveToElementEditStart(B);A.Select();};function FCKEditingArea_Cleanup(){if (this.Document) this.Document.body.innerHTML="";this.TargetElement=null;this.IFrame=null;this.Document=null;this.Textarea=null;if (this.Window){this.Window._FCKEditingArea=null;this.Window=null;}}; -var FCKKeystrokeHandler=function(A){this.Keystrokes={};this.CancelCtrlDefaults=(A!==false);};FCKKeystrokeHandler.prototype.AttachToElement=function(A){FCKTools.AddEventListenerEx(A,'keydown',_FCKKeystrokeHandler_OnKeyDown,this);if (FCKBrowserInfo.IsGecko10||FCKBrowserInfo.IsOpera||(FCKBrowserInfo.IsGecko&&FCKBrowserInfo.IsMac)) FCKTools.AddEventListenerEx(A,'keypress',_FCKKeystrokeHandler_OnKeyPress,this);};FCKKeystrokeHandler.prototype.SetKeystrokes=function(){for (var i=0;i40))){B._CancelIt=true;if (A.preventDefault) return A.preventDefault();A.returnValue=false;A.cancelBubble=true;return false;};return true;};function _FCKKeystrokeHandler_OnKeyPress(A,B){if (B._CancelIt){if (A.preventDefault) return A.preventDefault();return false;};return true;}; -FCK.DTD=(function(){var X=FCKTools.Merge;var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I;A={isindex:1,fieldset:1};B={input:1,button:1,select:1,textarea:1,label:1};C=X({a:1},B);D=X({iframe:1},C);E={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1};F={ins:1,del:1,script:1};G=X({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},F);H=X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},G);I=X({p:1},H);J=X({iframe:1},H,B);K={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1};L=X({a:1},J);M={tr:1};N={'#':1};O=X({param:1},K);P=X({form:1},A,D,E,I);Q={li:1};return {col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:P,td:P,br:{},th:P,center:P,kbd:L,button:X(I,E),basefont:{},h5:L,h4:L,samp:L,h6:L,ol:Q,h1:L,h3:L,option:N,h2:L,form:X(A,D,E,I),select:{optgroup:1,option:1},font:J,ins:P,menu:Q,abbr:L,label:L,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:L,script:N,tfoot:M,cite:L,li:P,input:{},iframe:P,strong:J,textarea:N,noframes:P,big:J,small:J,span:J,hr:{},dt:L,sub:J,optgroup:{option:1},param:{},bdo:L,'var':J,div:P,object:O,sup:J,dd:P,strike:J,area:{},dir:Q,map:X({area:1,form:1,p:1},A,F,E),applet:O,dl:{dt:1,dd:1},del:P,isindex:{},fieldset:X({legend:1},K),thead:M,ul:Q,acronym:L,b:J,a:J,blockquote:P,caption:L,i:J,u:J,tbody:M,s:L,address:X(D,I),tt:J,legend:L,q:L,pre:X(G,C),p:L,em:J,dfn:L};})(); -var FCKStyle=function(A){this.Element=(A.Element||'span').toLowerCase();this._StyleDesc=A;};FCKStyle.prototype={GetType:function(){var A=this.GetType_$;if (A!=undefined) return A;var B=this.Element;if (B=='#'||FCKListsLib.StyleBlockElements[B]) A=0;else if (FCKListsLib.StyleObjectElements[B]) A=2;else A=1;return (this.GetType_$=A);},ApplyToSelection:function(A){var B=new FCKDomRange(A);B.MoveToSelection();this.ApplyToRange(B,true);},ApplyToRange:function(A,B,C){switch (this.GetType()){case 0:this.ApplyToRange=this._ApplyBlockStyle;break;case 1:this.ApplyToRange=this._ApplyInlineStyle;break;default:return;};this.ApplyToRange(A,B,C);},ApplyToObject:function(A){if (!A) return;this.BuildElement(null,A);},RemoveFromSelection:function(A){var B=new FCKDomRange(A);B.MoveToSelection();this.RemoveFromRange(B,true);},RemoveFromRange:function(A,B,C){var D;var E=this._GetAttribsForComparison();var F=this._GetOverridesForComparison();if (A.CheckIsCollapsed()){var D=A.CreateBookmark(true);var H=A.GetBookmarkNode(D,true);var I=new FCKElementPath(H.parentNode);var J=[];var K=!FCKDomTools.GetNextSibling(H);var L=K||!FCKDomTools.GetPreviousSibling(H);var M;var N=-1;for (var i=0;i=0;i--){var E=D[i];for (var F in B){if (FCKDomTools.HasAttribute(E,F)){switch (F){case 'style':this._RemoveStylesFromElement(E);break;case 'class':if (FCKDomTools.GetAttributeValue(E,F)!=this.GetFinalAttributeValue(F)) continue;default:FCKDomTools.RemoveAttribute(E,F);}}};this._RemoveOverrides(E,C[this.Element]);this._RemoveNoAttribElement(E);};for (var G in C){if (G!=this.Element){D=A.getElementsByTagName(G);for (var i=D.length-1;i>=0;i--){var E=D[i];this._RemoveOverrides(E,C[G]);this._RemoveNoAttribElement(E);}}}},_RemoveStylesFromElement:function(A){var B=A.style.cssText;var C=this.GetFinalStyleValue();if (B.length>0&&C.length==0) return;C='(^|;)\\s*('+C.replace(/\s*([^ ]+):.*?(;|$)/g,'$1|').replace(/\|$/,'')+'):[^;]+';var D=new RegExp(C,'gi');B=B.replace(D,'').Trim();if (B.length==0||B==';') FCKDomTools.RemoveAttribute(A,'style');else A.style.cssText=B.replace(D,'');},_RemoveOverrides:function(A,B){var C=B&&B.Attributes;if (C){for (var i=0;i0) C.style.cssText=this.GetFinalStyleValue();return C;},_CompareAttributeValues:function(A,B,C){if (A=='style'&&B&&C){B=B.replace(/;$/,'').toLowerCase();C=C.replace(/;$/,'').toLowerCase();};return (B==C||((B===null||B==='')&&(C===null||C==='')))},GetFinalAttributeValue:function(A){var B=this._StyleDesc.Attributes;var B=B?B[A]:null;if (!B&&A=='style') return this.GetFinalStyleValue();if (B&&this._Variables) B=B.Replace(FCKRegexLib.StyleVariableAttName,this._GetVariableReplace,this);return B;},GetFinalStyleValue:function(){var A=this._GetStyleText();if (A.length>0&&this._Variables){A=A.Replace(FCKRegexLib.StyleVariableAttName,this._GetVariableReplace,this);A=FCKTools.NormalizeCssText(A);};return A;},_GetVariableReplace:function(){return this._Variables[arguments[2]]||arguments[0];},SetVariable:function(A,B){var C=this._Variables;if (!C) C=this._Variables={};this._Variables[A]=B;},_FromPre:function(A,B,C){var D=B.innerHTML;D=D.replace(/(\r\n|\r)/g,'\n');D=D.replace(/^[ \t]*\n/,'');D=D.replace(/\n$/,'');D=D.replace(/^[ \t]+|[ \t]+$/g,function(match,offset,s){if (match.length==1) return ' ';else if (offset==0) return new Array(match.length).join(' ')+' ';else return ' '+new Array(match.length).join(' ');});var E=new FCKHtmlIterator(D);var F=[];E.Each(function(isTag,value){if (!isTag){value=value.replace(/\n/g,'
    ');value=value.replace(/[ \t]{2,}/g,function (match){return new Array(match.length).join(' ')+' ';});};F.push(value);});C.innerHTML=F.join('');return C;},_ToPre:function(A,B,C){var D=B.innerHTML.Trim();D=D.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'
    ');var E=new FCKHtmlIterator(D);var F=[];E.Each(function(isTag,value){if (!isTag) value=value.replace(/([ \t\n\r]+| )/g,' ');else if (isTag&&value=='
    ') value='\n';F.push(value);});if (FCKBrowserInfo.IsIE){var G=A.createElement('div');G.appendChild(C);C.outerHTML='
    \n'+F.join('')+'
    ';C=G.removeChild(G.firstChild);}else C.innerHTML=F.join('');return C;},_CheckAndMergePre:function(A,B){if (A!=FCKDomTools.GetPreviousSourceElement(B,true)) return;var C=A.innerHTML.replace(/\n$/,'')+'\n\n'+B.innerHTML.replace(/^\n/,'');if (FCKBrowserInfo.IsIE) B.outerHTML='
    '+C+'
    ';else B.innerHTML=C;FCKDomTools.RemoveNode(A);},_CheckAndSplitPre:function(A){var B;var C=A.firstChild;C=C&&C.nextSibling;while (C){var D=C.nextSibling;if (D&&D.nextSibling&&C.nodeName.IEquals('br')&&D.nodeName.IEquals('br')){FCKDomTools.RemoveNode(C);C=D.nextSibling;FCKDomTools.RemoveNode(D);B=FCKDomTools.InsertAfterNode(B||A,FCKDomTools.CloneElement(A));continue;};if (B){C=C.previousSibling;FCKDomTools.MoveNode(C.nextSibling,B);};C=C.nextSibling;}},_ApplyBlockStyle:function(A,B,C){var D;if (B) D=A.CreateBookmark();var E=new FCKDomRangeIterator(A);E.EnforceRealBlocks=true;var F;var G=A.Window.document;var H;while((F=E.GetNextParagraph())){var I=this.BuildElement(G);var J=I.nodeName.IEquals('pre');var K=F.nodeName.IEquals('pre');var L=J&&!K;var M=!J&&K;if (L) I=this._ToPre(G,F,I);else if (M) I=this._FromPre(G,F,I);else FCKDomTools.MoveChildren(F,I);F.parentNode.insertBefore(I,F);FCKDomTools.RemoveNode(F);if (J){if (H) this._CheckAndMergePre(H,I);H=I;}else if (M) this._CheckAndSplitPre(I);};if (B) A.SelectBookmark(D);if (C) A.MoveToBookmark(D);},_ApplyInlineStyle:function(A,B,C){var D=A.Window.document;if (A.CheckIsCollapsed()){var E=this.BuildElement(D);A.InsertNode(E);A.MoveToPosition(E,2);A.Select();return;};var F=this.Element;var G=FCK.DTD[F]||FCK.DTD.span;var H=this._GetAttribsForComparison();var I;A.Expand('inline_elements');var J=A.CreateBookmark(true);var K=A.GetBookmarkNode(J,true);var L=A.GetBookmarkNode(J,false);A.Release(true);var M=FCKDomTools.GetNextSourceNode(K,true);while (M){var N=false;var O=M.nodeType;var P=O==1?M.nodeName.toLowerCase():null;if (!P||G[P]){if ((FCK.DTD[M.parentNode.nodeName.toLowerCase()]||FCK.DTD.span)[F]||!FCK.DTD[F]){if (!A.CheckHasRange()) A.SetStart(M,3);if (O!=1||M.childNodes.length==0){var Q=M;var R=Q.parentNode;while (Q==R.lastChild&&G[R.nodeName.toLowerCase()]){Q=R;};A.SetEnd(Q,4);if (Q==Q.parentNode.lastChild&&!G[Q.parentNode.nodeName.toLowerCase()]) N=true;}else{A.SetEnd(M,3);}}else N=true;}else N=true;M=FCKDomTools.GetNextSourceNode(M);if (M==L){M=null;N=true;};if (N&&A.CheckHasRange()&&!A.CheckIsCollapsed()){I=this.BuildElement(D);A.ExtractContents().AppendTo(I);if (I.innerHTML.RTrim().length>0){A.InsertNode(I);this.RemoveFromElement(I);this._MergeSiblings(I,this._GetAttribsForComparison());if (!FCKBrowserInfo.IsIE) I.normalize();};A.Release(true);}};this._FixBookmarkStart(K);if (B) A.SelectBookmark(J);if (C) A.MoveToBookmark(J);},_FixBookmarkStart:function(A){var B;while ((B=A.nextSibling)){if (B.nodeType==1&&FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){if (!B.firstChild) FCKDomTools.RemoveNode(B);else FCKDomTools.MoveNode(A,B,true);continue;};if (B.nodeType==3&&B.length==0){FCKDomTools.RemoveNode(B);continue;};break;}},_MergeSiblings:function(A,B){if (!A||A.nodeType!=1||!FCKListsLib.InlineNonEmptyElements[A.nodeName.toLowerCase()]) return;this._MergeNextSibling(A,B);this._MergePreviousSibling(A,B);},_MergeNextSibling:function(A,B){var C=A.nextSibling;var D=(C&&C.nodeType==1&&C.getAttribute('_fck_bookmark'));if (D) C=C.nextSibling;if (C&&C.nodeType==1&&C.nodeName==A.nodeName){if (!B) B=this._CreateElementAttribsForComparison(A);if (this._CheckAttributesMatch(C,B)){var E=A.lastChild;if (D) FCKDomTools.MoveNode(A.nextSibling,A);FCKDomTools.MoveChildren(C,A);FCKDomTools.RemoveNode(C);if (E) this._MergeNextSibling(E);}}},_MergePreviousSibling:function(A,B){var C=A.previousSibling;var D=(C&&C.nodeType==1&&C.getAttribute('_fck_bookmark'));if (D) C=C.previousSibling;if (C&&C.nodeType==1&&C.nodeName==A.nodeName){if (!B) B=this._CreateElementAttribsForComparison(A);if (this._CheckAttributesMatch(C,B)){var E=A.firstChild;if (D) FCKDomTools.MoveNode(A.previousSibling,A,true);FCKDomTools.MoveChildren(C,A,true);FCKDomTools.RemoveNode(C);if (E) this._MergePreviousSibling(E);}}},_GetStyleText:function(){var A=this._StyleDesc.Styles;var B=(this._StyleDesc.Attributes?this._StyleDesc.Attributes['style']||'':'');if (B.length>0) B+=';';for (var C in A) B+=C+':'+A[C]+';';if (B.length>0&&!(/#\(/.test(B))){B=FCKTools.NormalizeCssText(B);};return (this._GetStyleText=function() { return B;})();},_GetAttribsForComparison:function(){var A=this._GetAttribsForComparison_$;if (A) return A;A={};var B=this._StyleDesc.Attributes;if (B){for (var C in B){A[C.toLowerCase()]=B[C].toLowerCase();}};if (this._GetStyleText().length>0){A['style']=this._GetStyleText().toLowerCase();};FCKTools.AppendLengthProperty(A,'_length');return (this._GetAttribsForComparison_$=A);},_GetOverridesForComparison:function(){var A=this._GetOverridesForComparison_$;if (A) return A;A={};var B=this._StyleDesc.Overrides;if (B){if (!FCKTools.IsArray(B)) B=[B];for (var i=0;i0) return true;};B=B.nextSibling;};return false;}}; -var FCKElementPath=function(A){var B=null;var C=null;var D=[];var e=A;while (e){if (e.nodeType==1){if (!this.LastElement) this.LastElement=e;var E=e.nodeName.toLowerCase();if (FCKBrowserInfo.IsIE&&e.scopeName!='HTML') E=e.scopeName.toLowerCase()+':'+E;if (!C){if (!B&&FCKListsLib.PathBlockElements[E]!=null) B=e;if (FCKListsLib.PathBlockLimitElements[E]!=null){if (!B&&E=='div'&&!FCKElementPath._CheckHasBlock(e)) B=e;else C=e;}};D.push(e);if (E=='body') break;};e=e.parentNode;};this.Block=B;this.BlockLimit=C;this.Elements=D;};FCKElementPath._CheckHasBlock=function(A){var B=A.childNodes;for (var i=0,count=B.length;i0){if (D.nodeType==3){var G=D.nodeValue.substr(0,E).Trim();if (G.length!=0) return A.IsStartOfBlock=false;}else F=D.childNodes[E-1];};if (!F) F=FCKDomTools.GetPreviousSourceNode(D,true,null,C);while (F){switch (F.nodeType){case 1:if (!FCKListsLib.InlineChildReqElements[F.nodeName.toLowerCase()]) return A.IsStartOfBlock=false;break;case 3:if (F.nodeValue.Trim().length>0) return A.IsStartOfBlock=false;};F=FCKDomTools.GetPreviousSourceNode(F,false,null,C);};return A.IsStartOfBlock=true;},CheckEndOfBlock:function(A){var B=this._Cache.IsEndOfBlock;if (B!=undefined) return B;var C=this.EndBlock||this.EndBlockLimit;var D=this._Range.endContainer;var E=this._Range.endOffset;var F;if (D.nodeType==3){var G=D.nodeValue;if (E0) return this._Cache.IsEndOfBlock=false;};F=FCKDomTools.GetNextSourceNode(F,false,null,C);};if (A) this.Select();return this._Cache.IsEndOfBlock=true;},CreateBookmark:function(A){var B={StartId:(new Date()).valueOf()+Math.floor(Math.random()*1000)+'S',EndId:(new Date()).valueOf()+Math.floor(Math.random()*1000)+'E'};var C=this.Window.document;var D;var E;var F;if (!this.CheckIsCollapsed()){E=C.createElement('span');E.style.display='none';E.id=B.EndId;E.setAttribute('_fck_bookmark',true);E.innerHTML=' ';F=this.Clone();F.Collapse(false);F.InsertNode(E);};D=C.createElement('span');D.style.display='none';D.id=B.StartId;D.setAttribute('_fck_bookmark',true);D.innerHTML=' ';F=this.Clone();F.Collapse(true);F.InsertNode(D);if (A){B.StartNode=D;B.EndNode=E;};if (E){this.SetStart(D,4);this.SetEnd(E,3);}else this.MoveToPosition(D,4);return B;},GetBookmarkNode:function(A,B){var C=this.Window.document;if (B) return A.StartNode||C.getElementById(A.StartId);else return A.EndNode||C.getElementById(A.EndId);},MoveToBookmark:function(A,B){var C=this.GetBookmarkNode(A,true);var D=this.GetBookmarkNode(A,false);this.SetStart(C,3);if (!B) FCKDomTools.RemoveNode(C);if (D){this.SetEnd(D,3);if (!B) FCKDomTools.RemoveNode(D);}else this.Collapse(true);this._UpdateElementInfo();},CreateBookmark2:function(){if (!this._Range) return { "Start":0,"End":0 };var A={"Start":[this._Range.startOffset],"End":[this._Range.endOffset]};var B=this._Range.startContainer.previousSibling;var C=this._Range.endContainer.previousSibling;var D=this._Range.startContainer;var E=this._Range.endContainer;while (B&&D.nodeType==3){A.Start[0]+=B.length;D=B;B=B.previousSibling;}while (C&&E.nodeType==3){A.End[0]+=C.length;E=C;C=C.previousSibling;};if (D.nodeType==1&&D.childNodes[A.Start[0]]&&D.childNodes[A.Start[0]].nodeType==3){var F=D.childNodes[A.Start[0]];var G=0;while (F.previousSibling&&F.previousSibling.nodeType==3){F=F.previousSibling;G+=F.length;};D=F;A.Start[0]=G;};if (E.nodeType==1&&E.childNodes[A.End[0]]&&E.childNodes[A.End[0]].nodeType==3){var F=E.childNodes[A.End[0]];var G=0;while (F.previousSibling&&F.previousSibling.nodeType==3){F=F.previousSibling;G+=F.length;};E=F;A.End[0]=G;};A.Start=FCKDomTools.GetNodeAddress(D,true).concat(A.Start);A.End=FCKDomTools.GetNodeAddress(E,true).concat(A.End);return A;},MoveToBookmark2:function(A){var B=FCKDomTools.GetNodeFromAddress(this.Window.document,A.Start.slice(0,-1),true);var C=FCKDomTools.GetNodeFromAddress(this.Window.document,A.End.slice(0,-1),true);this.Release(true);this._Range=new FCKW3CRange(this.Window.document);var D=A.Start[A.Start.length-1];var E=A.End[A.End.length-1];while (B.nodeType==3&&D>B.length){if (!B.nextSibling||B.nextSibling.nodeType!=3) break;D-=B.length;B=B.nextSibling;}while (C.nodeType==3&&E>C.length){if (!C.nextSibling||C.nextSibling.nodeType!=3) break;E-=C.length;C=C.nextSibling;};this._Range.setStart(B,D);this._Range.setEnd(C,E);this._UpdateElementInfo();},MoveToPosition:function(A,B){this.SetStart(A,B);this.Collapse(true);},SetStart:function(A,B,C){var D=this._Range;if (!D) D=this._Range=this.CreateRange();switch(B){case 1:D.setStart(A,0);break;case 2:D.setStart(A,A.childNodes.length);break;case 3:D.setStartBefore(A);break;case 4:D.setStartAfter(A);};if (!C) this._UpdateElementInfo();},SetEnd:function(A,B,C){var D=this._Range;if (!D) D=this._Range=this.CreateRange();switch(B){case 1:D.setEnd(A,0);break;case 2:D.setEnd(A,A.childNodes.length);break;case 3:D.setEndBefore(A);break;case 4:D.setEndAfter(A);};if (!C) this._UpdateElementInfo();},Expand:function(A){var B,oSibling;switch (A){case 'inline_elements':if (this._Range.startOffset==0){B=this._Range.startContainer;if (B.nodeType!=1) B=B.previousSibling?null:B.parentNode;if (B){while (FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){this._Range.setStartBefore(B);if (B!=B.parentNode.firstChild) break;B=B.parentNode;}}};B=this._Range.endContainer;var C=this._Range.endOffset;if ((B.nodeType==3&&C>=B.nodeValue.length)||(B.nodeType==1&&C>=B.childNodes.length)||(B.nodeType!=1&&B.nodeType!=3)){if (B.nodeType!=1) B=B.nextSibling?null:B.parentNode;if (B){while (FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){this._Range.setEndAfter(B);if (B!=B.parentNode.lastChild) break;B=B.parentNode;}}};break;case 'block_contents':case 'list_contents':var D=FCKListsLib.BlockBoundaries;if (A=='list_contents'||FCKConfig.EnterMode=='br') D=FCKListsLib.ListBoundaries;if (this.StartBlock&&FCKConfig.EnterMode!='br'&&A=='block_contents') this.SetStart(this.StartBlock,1);else{B=this._Range.startContainer;if (B.nodeType==1){var E=B.childNodes[this._Range.startOffset];if (E) B=FCKDomTools.GetPreviousSourceNode(E,true);else B=B.lastChild||B;}while (B&&(B.nodeType!=1||(B!=this.StartBlockLimit&&!D[B.nodeName.toLowerCase()]))){this._Range.setStartBefore(B);B=B.previousSibling||B.parentNode;}};if (this.EndBlock&&FCKConfig.EnterMode!='br'&&A=='block_contents'&&this.EndBlock.nodeName.toLowerCase()!='li') this.SetEnd(this.EndBlock,2);else{B=this._Range.endContainer;if (B.nodeType==1) B=B.childNodes[this._Range.endOffset]||B.lastChild;while (B&&(B.nodeType!=1||(B!=this.StartBlockLimit&&!D[B.nodeName.toLowerCase()]))){this._Range.setEndAfter(B);B=B.nextSibling||B.parentNode;};if (B&&B.nodeName.toLowerCase()=='br') this._Range.setEndAfter(B);};this._UpdateElementInfo();}},SplitBlock:function(A){var B=A||FCKConfig.EnterMode;if (!this._Range) this.MoveToSelection();if (this.StartBlockLimit==this.EndBlockLimit){var C=this.StartBlock;var D=this.EndBlock;var E=null;if (B!='br'){if (!C){C=this.FixBlock(true,B);D=this.EndBlock;};if (!D) D=this.FixBlock(false,B);};var F=(C!=null&&this.CheckStartOfBlock());var G=(D!=null&&this.CheckEndOfBlock());if (!this.CheckIsEmpty()) this.DeleteContents();if (C&&D&&C==D){if (G){E=new FCKElementPath(this.StartContainer);this.MoveToPosition(D,4);D=null;}else if (F){E=new FCKElementPath(this.StartContainer);this.MoveToPosition(C,3);C=null;}else{this.SetEnd(C,2);var H=this.ExtractContents();D=C.cloneNode(false);D.removeAttribute('id',false);H.AppendTo(D);FCKDomTools.InsertAfterNode(C,D);this.MoveToPosition(C,4);if (FCKBrowserInfo.IsGecko&&!C.nodeName.IEquals(['ul','ol'])) FCKTools.AppendBogusBr(C);}};return {PreviousBlock:C,NextBlock:D,WasStartOfBlock:F,WasEndOfBlock:G,ElementPath:E};};return null;},FixBlock:function(A,B){var C=this.CreateBookmark();this.Collapse(A);this.Expand('block_contents');var D=this.Window.document.createElement(B);this.ExtractContents().AppendTo(D);FCKDomTools.TrimNode(D);if (FCKDomTools.CheckIsEmptyElement(D,function(element) { return element.getAttribute('_fck_bookmark')!='true';})&&FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(D);this.InsertNode(D);this.MoveToBookmark(C);return D;},Release:function(A){if (!A) this.Window=null;this.StartNode=null;this.StartContainer=null;this.StartBlock=null;this.StartBlockLimit=null;this.EndNode=null;this.EndContainer=null;this.EndBlock=null;this.EndBlockLimit=null;this._Range=null;this._Cache=null;},CheckHasRange:function(){return!!this._Range;},GetTouchedStartNode:function(){var A=this._Range;var B=A.startContainer;if (A.collapsed||B.nodeType!=1) return B;return B.childNodes[A.startOffset]||B;},GetTouchedEndNode:function(){var A=this._Range;var B=A.endContainer;if (A.collapsed||B.nodeType!=1) return B;return B.childNodes[A.endOffset-1]||B;}}; -FCKDomRange.prototype.MoveToSelection=function(){this.Release(true);this._Range=new FCKW3CRange(this.Window.document);var A=this.Window.document.selection;if (A.type!='Control'){var B=this._GetSelectionMarkerTag(true);var C=this._GetSelectionMarkerTag(false);if (!B&&!C){this._Range.setStart(this.Window.document.body,0);this._UpdateElementInfo();return;};this._Range.setStart(B.parentNode,FCKDomTools.GetIndexOf(B));B.parentNode.removeChild(B);this._Range.setEnd(C.parentNode,FCKDomTools.GetIndexOf(C));C.parentNode.removeChild(C);this._UpdateElementInfo();}else{var D=A.createRange().item(0);if (D){this._Range.setStartBefore(D);this._Range.setEndAfter(D);this._UpdateElementInfo();}}};FCKDomRange.prototype.Select=function(A){if (this._Range) this.SelectBookmark(this.CreateBookmark(true),A);};FCKDomRange.prototype.SelectBookmark=function(A,B){var C=this.CheckIsCollapsed();var D;var E;var F=this.GetBookmarkNode(A,true);if (!F) return;var G;if (!C) G=this.GetBookmarkNode(A,false);var H=this.Window.document.body.createTextRange();H.moveToElementText(F);H.moveStart('character',1);if (G){var I=this.Window.document.body.createTextRange();I.moveToElementText(G);H.setEndPoint('EndToEnd',I);H.moveEnd('character',-1);}else{D=(B||!F.previousSibling||F.previousSibling.nodeName.toLowerCase()=='br')&&!F.nextSibing;E=this.Window.document.createElement('span');E.innerHTML='';F.parentNode.insertBefore(E,F);if (D){F.parentNode.insertBefore(this.Window.document.createTextNode('\ufeff'),F);}};if (!this._Range) this._Range=this.CreateRange();this._Range.setStartBefore(F);F.parentNode.removeChild(F);if (C){if (D){H.moveStart('character',-1);H.select();this.Window.document.selection.clear();}else H.select();FCKDomTools.RemoveNode(E);}else{this._Range.setEndBefore(G);G.parentNode.removeChild(G);H.select();}};FCKDomRange.prototype._GetSelectionMarkerTag=function(A){var B=this.Window.document;var C=B.selection;var D;try{D=C.createRange();}catch (e){return null;};if (D.parentElement().document!=B) return null;D.collapse(A===true);var E='fck_dom_range_temp_'+(new Date()).valueOf()+'_'+Math.floor(Math.random()*1000);D.pasteHTML('');return B.getElementById(E);}; -var FCKDomRangeIterator=function(A){this.Range=A;this.ForceBrBreak=false;this.EnforceRealBlocks=false;};FCKDomRangeIterator.CreateFromSelection=function(A){var B=new FCKDomRange(A);B.MoveToSelection();return new FCKDomRangeIterator(B);};FCKDomRangeIterator.prototype={GetNextParagraph:function(){var A;var B;var C;var D;var E;var F=this.ForceBrBreak?FCKListsLib.ListBoundaries:FCKListsLib.BlockBoundaries;if (!this._LastNode){var B=this.Range.Clone();B.Expand(this.ForceBrBreak?'list_contents':'block_contents');this._NextNode=B.GetTouchedStartNode();this._LastNode=B.GetTouchedEndNode();B=null;};var H=this._NextNode;var I=this._LastNode;this._NextNode=null;while (H){var J=false;var K=(H.nodeType!=1);var L=false;if (!K){var M=H.nodeName.toLowerCase();if (F[M]&&(!FCKBrowserInfo.IsIE||H.scopeName=='HTML')){if (M=='br') K=true;else if (!B&&H.childNodes.length==0&&M!='hr'){A=H;C=H==I;break;};if (B){B.SetEnd(H,3,true);if (M!='br') this._NextNode=FCKDomTools.GetNextSourceNode(H,true,null,I);};J=true;}else{if (H.firstChild){if (!B){B=new FCKDomRange(this.Range.Window);B.SetStart(H,3,true);};H=H.firstChild;continue;};K=true;}}else if (H.nodeType==3){if (/^[\r\n\t ]+$/.test(H.nodeValue)) K=false;};if (K&&!B){B=new FCKDomRange(this.Range.Window);B.SetStart(H,3,true);};C=((!J||K)&&H==I);if (B&&!J){while (!H.nextSibling&&!C){var N=H.parentNode;if (F[N.nodeName.toLowerCase()]){J=true;C=C||(N==I);break;};H=N;K=true;C=(H==I);L=true;}};if (K) B.SetEnd(H,4,true);if ((J||C)&&B){B._UpdateElementInfo();if (B.StartNode==B.EndNode&&B.StartNode.parentNode==B.StartBlockLimit&&B.StartNode.getAttribute&&B.StartNode.getAttribute('_fck_bookmark')) B=null;else break;};if (C) break;H=FCKDomTools.GetNextSourceNode(H,L,null,I);};if (!A){if (!B){this._NextNode=null;return null;};A=B.StartBlock;if (!A&&!this.EnforceRealBlocks&&B.StartBlockLimit.nodeName.IEquals('DIV','TH','TD')&&B.CheckStartOfBlock()&&B.CheckEndOfBlock()){A=B.StartBlockLimit;}else if (!A||(this.EnforceRealBlocks&&A.nodeName.toLowerCase()=='li')){A=this.Range.Window.document.createElement(FCKConfig.EnterMode=='p'?'p':'div');B.ExtractContents().AppendTo(A);FCKDomTools.TrimNode(A);B.InsertNode(A);D=true;E=true;}else if (A.nodeName.toLowerCase()!='li'){if (!B.CheckStartOfBlock()||!B.CheckEndOfBlock()){A=A.cloneNode(false);B.ExtractContents().AppendTo(A);FCKDomTools.TrimNode(A);var O=B.SplitBlock();D=!O.WasStartOfBlock;E=!O.WasEndOfBlock;B.InsertNode(A);}}else if (!C){this._NextNode=A==I?null:FCKDomTools.GetNextSourceNode(B.EndNode,true,null,I);return A;}};if (D){var P=A.previousSibling;if (P&&P.nodeType==1){if (P.nodeName.toLowerCase()=='br') P.parentNode.removeChild(P);else if (P.lastChild&&P.lastChild.nodeName.IEquals('br')) P.removeChild(P.lastChild);}};if (E){var Q=A.lastChild;if (Q&&Q.nodeType==1&&Q.nodeName.toLowerCase()=='br') A.removeChild(Q);};if (!this._NextNode) this._NextNode=(C||A==I)?null:FCKDomTools.GetNextSourceNode(A,true,null,I);return A;}}; -var FCKDocumentFragment=function(A){this._Document=A;this.RootNode=A.createElement('div');};FCKDocumentFragment.prototype={AppendTo:function(A){FCKDomTools.MoveChildren(this.RootNode,A);},AppendHtml:function(A){var B=this._Document.createElement('div');B.innerHTML=A;FCKDomTools.MoveChildren(B,this.RootNode);},InsertAfterNode:function(A){var B=this.RootNode;var C;while((C=B.lastChild)) FCKDomTools.InsertAfterNode(A,B.removeChild(C));}}; -var FCKW3CRange=function(A){this._Document=A;this.startContainer=null;this.startOffset=null;this.endContainer=null;this.endOffset=null;this.collapsed=true;};FCKW3CRange.CreateRange=function(A){return new FCKW3CRange(A);};FCKW3CRange.CreateFromRange=function(A,B){var C=FCKW3CRange.CreateRange(A);C.setStart(B.startContainer,B.startOffset);C.setEnd(B.endContainer,B.endOffset);return C;};FCKW3CRange.prototype={_UpdateCollapsed:function(){this.collapsed=(this.startContainer==this.endContainer&&this.startOffset==this.endOffset);},setStart:function(A,B){this.startContainer=A;this.startOffset=B;if (!this.endContainer){this.endContainer=A;this.endOffset=B;};this._UpdateCollapsed();},setEnd:function(A,B){this.endContainer=A;this.endOffset=B;if (!this.startContainer){this.startContainer=A;this.startOffset=B;};this._UpdateCollapsed();},setStartAfter:function(A){this.setStart(A.parentNode,FCKDomTools.GetIndexOf(A)+1);},setStartBefore:function(A){this.setStart(A.parentNode,FCKDomTools.GetIndexOf(A));},setEndAfter:function(A){this.setEnd(A.parentNode,FCKDomTools.GetIndexOf(A)+1);},setEndBefore:function(A){this.setEnd(A.parentNode,FCKDomTools.GetIndexOf(A));},collapse:function(A){if (A){this.endContainer=this.startContainer;this.endOffset=this.startOffset;}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset;};this.collapsed=true;},selectNodeContents:function(A){this.setStart(A,0);this.setEnd(A,A.nodeType==3?A.data.length:A.childNodes.length);},insertNode:function(A){var B=this.startContainer;var C=this.startOffset;if (B.nodeType==3){B.splitText(C);if (B==this.endContainer) this.setEnd(B.nextSibling,this.endOffset-this.startOffset);FCKDomTools.InsertAfterNode(B,A);return;}else{B.insertBefore(A,B.childNodes[C]||null);if (B==this.endContainer){this.endOffset++;this.collapsed=false;}}},deleteContents:function(){if (this.collapsed) return;this._ExecContentsAction(0);},extractContents:function(){var A=new FCKDocumentFragment(this._Document);if (!this.collapsed) this._ExecContentsAction(1,A);return A;},cloneContents:function(){var A=new FCKDocumentFragment(this._Document);if (!this.collapsed) this._ExecContentsAction(2,A);return A;},_ExecContentsAction:function(A,B){var C=this.startContainer;var D=this.endContainer;var E=this.startOffset;var F=this.endOffset;var G=false;var H=false;if (D.nodeType==3) D=D.splitText(F);else{if (D.childNodes.length>0){if (F>D.childNodes.length-1){D=FCKDomTools.InsertAfterNode(D.lastChild,this._Document.createTextNode(''));H=true;}else D=D.childNodes[F];}};if (C.nodeType==3){C.splitText(E);if (C==D) D=C.nextSibling;}else{if (E==0){C=C.insertBefore(this._Document.createTextNode(''),C.firstChild);G=true;}else if (E>C.childNodes.length-1){C=C.appendChild(this._Document.createTextNode(''));G=true;}else C=C.childNodes[E].previousSibling;};var I=FCKDomTools.GetParents(C);var J=FCKDomTools.GetParents(D);var i,topStart,topEnd;for (i=0;i0&&levelStartNode!=D) levelClone=K.appendChild(levelStartNode.cloneNode(levelStartNode==D));if (!I[k]||levelStartNode.parentNode!=I[k].parentNode){currentNode=levelStartNode.previousSibling;while(currentNode){if (currentNode==I[k]||currentNode==C) break;currentSibling=currentNode.previousSibling;if (A==2) K.insertBefore(currentNode.cloneNode(true),K.firstChild);else{currentNode.parentNode.removeChild(currentNode);if (A==1) K.insertBefore(currentNode,K.firstChild);};currentNode=currentSibling;}};if (K) K=levelClone;};if (A==2){var L=this.startContainer;if (L.nodeType==3){L.data+=L.nextSibling.data;L.parentNode.removeChild(L.nextSibling);};var M=this.endContainer;if (M.nodeType==3&&M.nextSibling){M.data+=M.nextSibling.data;M.parentNode.removeChild(M.nextSibling);}}else{if (topStart&&topEnd&&(C.parentNode!=topStart.parentNode||D.parentNode!=topEnd.parentNode)){var N=FCKDomTools.GetIndexOf(topEnd);if (G&&topEnd.parentNode==C.parentNode) N--;this.setStart(topEnd.parentNode,N);};this.collapse(true);};if(G) C.parentNode.removeChild(C);if(H&&D.parentNode) D.parentNode.removeChild(D);},cloneRange:function(){return FCKW3CRange.CreateFromRange(this._Document,this);}}; -var FCKEnterKey=function(A,B,C,D){this.Window=A;this.EnterMode=B||'p';this.ShiftEnterMode=C||'br';var E=new FCKKeystrokeHandler(false);E._EnterKey=this;E.OnKeystroke=FCKEnterKey_OnKeystroke;E.SetKeystrokes([[13,'Enter'],[SHIFT+13,'ShiftEnter'],[8,'Backspace'],[CTRL+8,'CtrlBackspace'],[46,'Delete']]);this.TabText='';if (D>0||FCKBrowserInfo.IsSafari){while (D--) this.TabText+='\xa0';E.SetKeystrokes([9,'Tab']);};E.AttachToElement(A.document);};function FCKEnterKey_OnKeystroke(A,B){var C=this._EnterKey;try{switch (B){case 'Enter':return C.DoEnter();break;case 'ShiftEnter':return C.DoShiftEnter();break;case 'Backspace':return C.DoBackspace();break;case 'Delete':return C.DoDelete();break;case 'Tab':return C.DoTab();break;case 'CtrlBackspace':return C.DoCtrlBackspace();break;}}catch (e){};return false;};FCKEnterKey.prototype.DoEnter=function(A,B){FCKUndo.SaveUndoStep();this._HasShift=(B===true);var C=FCKSelection.GetParentElement();var D=new FCKElementPath(C);var E=A||this.EnterMode;if (E=='br'||D.Block&&D.Block.tagName.toLowerCase()=='pre') return this._ExecuteEnterBr();else return this._ExecuteEnterBlock(E);};FCKEnterKey.prototype.DoShiftEnter=function(){return this.DoEnter(this.ShiftEnterMode,true);};FCKEnterKey.prototype.DoBackspace=function(){var A=false;var B=new FCKDomRange(this.Window);B.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(B,this.Window.document.body)){this._FixIESelectAllBug(B);return true;};var C=B.CheckIsCollapsed();if (!C){if (FCKBrowserInfo.IsIE&&this.Window.document.selection.type.toLowerCase()=="control"){var D=this.Window.document.selection.createRange();for (var i=D.length-1;i>=0;i--){var E=D.item(i);E.parentNode.removeChild(E);};return true;};return false;};if (FCKBrowserInfo.IsIE){var F=FCKDomTools.GetPreviousSourceElement(B.StartNode,true);if (F&&F.nodeName.toLowerCase()=='br'){var G=B.Clone();G.SetStart(F,4);if (G.CheckIsEmpty()){F.parentNode.removeChild(F);return true;}}};var H=B.StartBlock;var I=B.EndBlock;if (B.StartBlockLimit==B.EndBlockLimit&&H&&I){if (!C){var J=B.CheckEndOfBlock();B.DeleteContents();if (H!=I){B.SetStart(I,1);B.SetEnd(I,1);};B.Select();A=(H==I);};if (B.CheckStartOfBlock()){var K=B.StartBlock;var L=FCKDomTools.GetPreviousSourceElement(K,true,['BODY',B.StartBlockLimit.nodeName],['UL','OL']);A=this._ExecuteBackspace(B,L,K);}else if (FCKBrowserInfo.IsGeckoLike){B.Select();}};B.Release();return A;};FCKEnterKey.prototype.DoCtrlBackspace=function(){FCKUndo.SaveUndoStep();var A=new FCKDomRange(this.Window);A.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(A,this.Window.document.body)){this._FixIESelectAllBug(A);return true;};return false;};FCKEnterKey.prototype._ExecuteBackspace=function(A,B,C){var D=false;if (!B&&C&&C.nodeName.IEquals('LI')&&C.parentNode.parentNode.nodeName.IEquals('LI')){this._OutdentWithSelection(C,A);return true;};if (B&&B.nodeName.IEquals('LI')){var E=FCKDomTools.GetLastChild(B,['UL','OL']);while (E){B=FCKDomTools.GetLastChild(E,'LI');E=FCKDomTools.GetLastChild(B,['UL','OL']);}};if (B&&C){if (C.nodeName.IEquals('LI')&&!B.nodeName.IEquals('LI')){this._OutdentWithSelection(C,A);return true;};var F=C.parentNode;var G=B.nodeName.toLowerCase();if (FCKListsLib.EmptyElements[G]!=null||G=='table'){FCKDomTools.RemoveNode(B);D=true;}else{FCKDomTools.RemoveNode(C);while (F.innerHTML.Trim().length==0){var H=F.parentNode;H.removeChild(F);F=H;};FCKDomTools.LTrimNode(C);FCKDomTools.RTrimNode(B);A.SetStart(B,2,true);A.Collapse(true);var I=A.CreateBookmark(true);if (!C.tagName.IEquals(['TABLE'])) FCKDomTools.MoveChildren(C,B);A.SelectBookmark(I);D=true;}};return D;};FCKEnterKey.prototype.DoDelete=function(){FCKUndo.SaveUndoStep();var A=false;var B=new FCKDomRange(this.Window);B.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(B,this.Window.document.body)){this._FixIESelectAllBug(B);return true;};if (B.CheckIsCollapsed()&&B.CheckEndOfBlock(FCKBrowserInfo.IsGeckoLike)){var C=B.StartBlock;var D=FCKTools.GetElementAscensor(C,'td');var E=FCKDomTools.GetNextSourceElement(C,true,[B.StartBlockLimit.nodeName],['UL','OL','TR'],true);if (D){var F=FCKTools.GetElementAscensor(E,'td');if (F!=D) return true;};A=this._ExecuteBackspace(B,C,E);};B.Release();return A;};FCKEnterKey.prototype.DoTab=function(){var A=new FCKDomRange(this.Window);A.MoveToSelection();var B=A._Range.startContainer;while (B){if (B.nodeType==1){var C=B.tagName.toLowerCase();if (C=="tr"||C=="td"||C=="th"||C=="tbody"||C=="table") return false;else break;};B=B.parentNode;};if (this.TabText){A.DeleteContents();A.InsertNode(this.Window.document.createTextNode(this.TabText));A.Collapse(false);A.Select();};return true;};FCKEnterKey.prototype._ExecuteEnterBlock=function(A,B){var C=B||new FCKDomRange(this.Window);var D=C.SplitBlock(A);if (D){var E=D.PreviousBlock;var F=D.NextBlock;var G=D.WasStartOfBlock;var H=D.WasEndOfBlock;if (F){if (F.parentNode.nodeName.IEquals('li')){FCKDomTools.BreakParent(F,F.parentNode);FCKDomTools.MoveNode(F,F.nextSibling,true);}}else if (E&&E.parentNode.nodeName.IEquals('li')){FCKDomTools.BreakParent(E,E.parentNode);C.MoveToElementEditStart(E.nextSibling);FCKDomTools.MoveNode(E,E.previousSibling);};if (!G&&!H){if (F.nodeName.IEquals('li')&&F.firstChild&&F.firstChild.nodeName.IEquals(['ul','ol'])) F.insertBefore(FCKTools.GetElementDocument(F).createTextNode('\xa0'),F.firstChild);if (F) C.MoveToElementEditStart(F);}else{if (G&&H&&E.tagName.toUpperCase()=='LI'){C.MoveToElementStart(E);this._OutdentWithSelection(E,C);C.Release();return true;};var I;if (E){var J=E.tagName.toUpperCase();if (!this._HasShift&&!(/^H[1-6]$/).test(J)){I=FCKDomTools.CloneElement(E);}}else if (F) I=FCKDomTools.CloneElement(F);if (!I) I=this.Window.document.createElement(A);var K=D.ElementPath;if (K){for (var i=0,len=K.Elements.length;i=0&&(C=B[i--])){if (C.name.length>0){if (C.innerHTML!==''){if (FCKBrowserInfo.IsIE) C.className+=' FCK__AnchorC';}else{var D=FCKDocumentProcessor_CreateFakeImage('FCK__Anchor',C.cloneNode(true));D.setAttribute('_fckanchor','true',0);C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}}}};var FCKPageBreaksProcessor=FCKDocumentProcessor.AppendNew();FCKPageBreaksProcessor.ProcessDocument=function(A){var B=A.getElementsByTagName('DIV');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){if (C.style.pageBreakAfter=='always'&&C.childNodes.length==1&&C.childNodes[0].style&&C.childNodes[0].style.display=='none'){var D=FCKDocumentProcessor_CreateFakeImage('FCK__PageBreak',C.cloneNode(true));C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}};FCKEmbedAndObjectProcessor=(function(){var A=[];var B=function(el){var C=el.cloneNode(true);var D;var E=D=FCKDocumentProcessor_CreateFakeImage('FCK__UnknownObject',C);FCKEmbedAndObjectProcessor.RefreshView(E,el);for (var i=0;i=0;i--) B(G[i]);};var H=function(doc){F('object',doc);F('embed',doc);};return FCKTools.Merge(FCKDocumentProcessor.AppendNew(),{ProcessDocument:function(doc){if (FCKBrowserInfo.IsGecko) FCKTools.RunFunction(H,this,[doc]);else H(doc);},RefreshView:function(placeHolder,original){if (original.getAttribute('width')>0) placeHolder.style.width=FCKTools.ConvertHtmlSizeToStyle(original.getAttribute('width'));if (original.getAttribute('height')>0) placeHolder.style.height=FCKTools.ConvertHtmlSizeToStyle(original.getAttribute('height'));},AddCustomHandler:function(func){A.push(func);}});})();FCK.GetRealElement=function(A){var e=FCKTempBin.Elements[A.getAttribute('_fckrealelement')];if (A.getAttribute('_fckflash')){if (A.style.width.length>0) e.width=FCKTools.ConvertStyleSizeToHtml(A.style.width);if (A.style.height.length>0) e.height=FCKTools.ConvertStyleSizeToHtml(A.style.height);};return e;};if (FCKBrowserInfo.IsIE){FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByTagName('HR');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){var D=A.createElement('hr');D.mergeAttributes(C,true);FCKDomTools.InsertAfterNode(C,D);C.parentNode.removeChild(C);}}};FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByTagName('INPUT');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){if (C.type=='hidden'){var D=FCKDocumentProcessor_CreateFakeImage('FCK__InputHidden',C.cloneNode(true));D.setAttribute('_fckinputhidden','true',0);C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}};FCKEmbedAndObjectProcessor.AddCustomHandler(function(A,B){if (!(A.nodeName.IEquals('embed')&&(A.type=='application/x-shockwave-flash'||/\.swf($|#|\?)/i.test(A.src)))) return;B.className='FCK__Flash';B.setAttribute('_fckflash','true',0);});if (FCKBrowserInfo.IsSafari){FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByClassName?A.getElementsByClassName('Apple-style-span'):Array.prototype.filter.call(A.getElementsByTagName('span'),function(item){ return item.className=='Apple-style-span';});for (var i=B.length-1;i>=0;i--) FCKDomTools.RemoveNode(B[i],true);}}; -var FCKSelection=FCK.Selection={GetParentBlock:function(){var A=this.GetParentElement();while (A){if (FCKListsLib.BlockBoundaries[A.nodeName.toLowerCase()]) break;A=A.parentNode;};return A;},ApplyStyle:function(A){FCKStyles.ApplyStyle(new FCKStyle(A));}}; -FCKSelection.GetType=function(){try{var A=FCKSelection.GetSelection().type;if (A=='Control'||A=='Text') return A;if (this.GetSelection().createRange().parentElement) return 'Text';}catch(e){};return 'None';};FCKSelection.GetSelectedElement=function(){if (this.GetType()=='Control'){var A=this.GetSelection().createRange();if (A&&A.item) return this.GetSelection().createRange().item(0);};return null;};FCKSelection.GetParentElement=function(){switch (this.GetType()){case 'Control':var A=FCKSelection.GetSelectedElement();return A?A.parentElement:null;case 'None':return null;default:return this.GetSelection().createRange().parentElement();}};FCKSelection.GetBoundaryParentElement=function(A){switch (this.GetType()){case 'Control':var B=FCKSelection.GetSelectedElement();return B?B.parentElement:null;case 'None':return null;default:var C=FCK.EditorDocument;var D=C.selection.createRange();D.collapse(A!==false);var B=D.parentElement();return FCKTools.GetElementDocument(B)==C?B:null;}};FCKSelection.SelectNode=function(A){FCK.Focus();this.GetSelection().empty();var B;try{B=FCK.EditorDocument.body.createControlRange();B.addElement(A);}catch(e){B=FCK.EditorDocument.body.createTextRange();B.moveToElementText(A);};B.select();};FCKSelection.Collapse=function(A){FCK.Focus();if (this.GetType()=='Text'){var B=this.GetSelection().createRange();B.collapse(A==null||A===true);B.select();}};FCKSelection.HasAncestorNode=function(A){var B;if (this.GetSelection().type=="Control"){B=this.GetSelectedElement();}else{var C=this.GetSelection().createRange();B=C.parentElement();}while (B){if (B.nodeName.IEquals(A)) return true;B=B.parentNode;};return false;};FCKSelection.MoveToAncestorNode=function(A){var B,oRange;if (!FCK.EditorDocument) return null;if (this.GetSelection().type=="Control"){oRange=this.GetSelection().createRange();for (i=0;i=0;i--){if (C[i]) FCKTableHandler.DeleteRows(C[i]);};return;};var E=FCKTools.GetElementAscensor(A,'TABLE');if (E.rows.length==1){FCKTableHandler.DeleteTable(E);return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteTable=function(A){if (!A){A=FCKSelection.GetSelectedElement();if (!A||A.tagName!='TABLE') A=FCKSelection.MoveToAncestorNode('TABLE');};if (!A) return;FCKSelection.SelectNode(A);FCKSelection.Collapse();if (A.parentNode.childNodes.length==1) A.parentNode.parentNode.removeChild(A.parentNode);else A.parentNode.removeChild(A);};FCKTableHandler.InsertColumn=function(A){var B=null;var C=this.GetSelectedCells();if (C&&C.length) B=C[A?0:(C.length-1)];if (!B) return;var D=FCKTools.GetElementAscensor(B,'TABLE');var E=B.cellIndex;for (var i=0;i=0;i--){if (B[i]) FCKTableHandler.DeleteColumns(B[i]);};return;};if (!A) return;var C=FCKTools.GetElementAscensor(A,'TABLE');var D=A.cellIndex;for (var i=C.rows.length-1;i>=0;i--){var E=C.rows[i];if (D==0&&E.cells.length==1){FCKTableHandler.DeleteRows(E);continue;};if (E.cells[D]) E.removeChild(E.cells[D]);}};FCKTableHandler.InsertCell=function(A,B){var C=null;var D=this.GetSelectedCells();if (D&&D.length) C=D[B?0:(D.length-1)];if (!C) return null;var E=FCK.EditorDocument.createElement('TD');if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(E);if (!B&&C.cellIndex==C.parentNode.cells.length-1) C.parentNode.appendChild(E);else C.parentNode.insertBefore(E,B?C:C.nextSibling);return E;};FCKTableHandler.DeleteCell=function(A){if (A.parentNode.cells.length==1){FCKTableHandler.DeleteRows(FCKTools.GetElementAscensor(A,'TR'));return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteCells=function(){var A=FCKTableHandler.GetSelectedCells();for (var i=A.length-1;i>=0;i--){FCKTableHandler.DeleteCell(A[i]);}};FCKTableHandler._MarkCells=function(A,B){for (var i=0;i=E.height){for (D=F;D0){var L=K.removeChild(K.firstChild);if (L.nodeType!=1||(L.getAttribute('type',2)!='_moz'&&L.getAttribute('_moz_dirty')!=null)){I.appendChild(L);J++;}}};if (J>0) I.appendChild(FCKTools.GetElementDocument(B).createElement('br'));};this._ReplaceCellsByMarker(C,'_SelectedCells',B);this._UnmarkCells(A,'_SelectedCells');this._InstallTableMap(C,B.parentNode.parentNode);B.appendChild(I);if (FCKBrowserInfo.IsGeckoLike&&(!B.firstChild)) FCKTools.AppendBogusBr(B);this._MoveCaretToCell(B,false);};FCKTableHandler.MergeRight=function(){var A=this.GetMergeRightTarget();if (A==null) return;var B=A.refCell;var C=A.tableMap;var D=A.nextCell;var E=FCK.EditorDocument.createDocumentFragment();while (D&&D.childNodes&&D.childNodes.length>0) E.appendChild(D.removeChild(D.firstChild));D.parentNode.removeChild(D);B.appendChild(E);this._MarkCells([D],'_Replace');this._ReplaceCellsByMarker(C,'_Replace',B);this._InstallTableMap(C,B.parentNode.parentNode);this._MoveCaretToCell(B,false);};FCKTableHandler.MergeDown=function(){var A=this.GetMergeDownTarget();if (A==null) return;var B=A.refCell;var C=A.tableMap;var D=A.nextCell;var E=FCKTools.GetElementDocument(B).createDocumentFragment();while (D&&D.childNodes&&D.childNodes.length>0) E.appendChild(D.removeChild(D.firstChild));if (E.firstChild) E.insertBefore(FCKTools.GetElementDocument(D).createElement('br'),E.firstChild);B.appendChild(E);this._MarkCells([D],'_Replace');this._ReplaceCellsByMarker(C,'_Replace',B);this._InstallTableMap(C,B.parentNode.parentNode);this._MoveCaretToCell(B,false);};FCKTableHandler.HorizontalSplitCell=function(){var A=FCKTableHandler.GetSelectedCells();if (A.length!=1) return;var B=A[0];var C=this._CreateTableMap(B.parentNode.parentNode);var D=B.parentNode.rowIndex;var E=FCKTableHandler._GetCellIndexSpan(C,D,B);var F=isNaN(B.colSpan)?1:B.colSpan;if (F>1){var G=Math.ceil(F/2);var H=FCKTools.GetElementDocument(B).createElement('td');if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(H);var I=E+G;var J=E+F;var K=isNaN(B.rowSpan)?1:B.rowSpan;for (var r=D;r1){B.rowSpan=Math.ceil(E/2);var G=F+Math.ceil(E/2);var H=null;for (var i=D+1;iG) L.insertBefore(K,L.rows[G]);else L.appendChild(K);for (var i=0;i0){var D=B.rows[0];D.parentNode.removeChild(D);};for (var i=0;iF) F=j;if (E._colScanned===true) continue;if (A[i][j-1]==E) E.colSpan++;if (A[i][j+1]!=E) E._colScanned=true;}};for (var i=0;i<=F;i++){for (var j=0;j=0&&C.compareEndPoints('StartToEnd',E)<=0)||(C.compareEndPoints('EndToStart',E)>=0&&C.compareEndPoints('EndToEnd',E)<=0)){B[B.length]=D.cells[i];}}}};return B;}; -var FCKXml=function(){this.Error=false;};FCKXml.GetAttribute=function(A,B,C){var D=A.attributes.getNamedItem(B);return D?D.value:C;};FCKXml.TransformToObject=function(A){if (!A) return null;var B={};var C=A.attributes;for (var i=0;i ';var A=FCKDocumentProcessor_CreateFakeImage('FCK__PageBreak',e);var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.SplitBlock();B.InsertNode(A);FCK.Events.FireEvent('OnSelectionChange');};FCKPageBreakCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return 0;};var FCKUnlinkCommand=function(){this.Name='Unlink';};FCKUnlinkCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();if (FCKBrowserInfo.IsGeckoLike){var A=FCK.Selection.MoveToAncestorNode('A');if (A) FCKTools.RemoveOuterTags(A);return;};FCK.ExecuteNamedCommand(this.Name);};FCKUnlinkCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;var A=FCK.GetNamedCommandState(this.Name);if (A==0&&FCK.EditMode==0){var B=FCKSelection.MoveToAncestorNode('A');var C=(B&&B.name.length>0&&B.href.length==0);if (C) A=-1;};return A;};FCKVisitLinkCommand=function(){this.Name='VisitLink';};FCKVisitLinkCommand.prototype={GetState:function(){if (FCK.EditMode!=0) return -1;var A=FCK.GetNamedCommandState('Unlink');if (A==0){var B=FCKSelection.MoveToAncestorNode('A');if (!B.href) A=-1;};return A;},Execute:function(){var A=FCKSelection.MoveToAncestorNode('A');var B=A.getAttribute('_fcksavedurl')||A.getAttribute('href',2);if (!/:\/\//.test(B)){var C=FCKConfig.BaseHref;var D=FCK.GetInstanceObject('parent');if (!C){C=D.document.location.href;C=C.substring(0,C.lastIndexOf('/')+1);};if (/^\//.test(B)){try{C=C.match(/^.*:\/\/+[^\/]+/)[0];}catch (e){C=D.document.location.protocol+'://'+D.parent.document.location.host;}};B=C+B;};if (!window.open(B,'_blank')) alert(FCKLang.VisitLinkBlocked);}};var FCKSelectAllCommand=function(){this.Name='SelectAll';};FCKSelectAllCommand.prototype.Execute=function(){if (FCK.EditMode==0){FCK.ExecuteNamedCommand('SelectAll');}else{var A=FCK.EditingArea.Textarea;if (FCKBrowserInfo.IsIE){A.createTextRange().execCommand('SelectAll');}else{A.selectionStart=0;A.selectionEnd=A.value.length;};A.focus();}};FCKSelectAllCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return 0;};var FCKPasteCommand=function(){this.Name='Paste';};FCKPasteCommand.prototype={Execute:function(){if (FCKBrowserInfo.IsIE) FCK.Paste();else FCK.ExecuteNamedCommand('Paste');},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Paste');}};var FCKRuleCommand=function(){this.Name='Rule';};FCKRuleCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();FCK.InsertElement('hr');},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('InsertHorizontalRule');}};var FCKCutCopyCommand=function(A){this.Name=A?'Cut':'Copy';};FCKCutCopyCommand.prototype={Execute:function(){var A=false;if (FCKBrowserInfo.IsIE){var B=function(){A=true;};var C='on'+this.Name.toLowerCase();FCK.EditorDocument.body.attachEvent(C,B);FCK.ExecuteNamedCommand(this.Name);FCK.EditorDocument.body.detachEvent(C,B);}else{try{FCK.ExecuteNamedCommand(this.Name);A=true;}catch(e){}};if (!A) alert(FCKLang['PasteError'+this.Name]);},GetState:function(){return FCK.EditMode!=0?-1:FCK.GetNamedCommandState('Cut');}};var FCKAnchorDeleteCommand=function(){this.Name='AnchorDelete';};FCKAnchorDeleteCommand.prototype={Execute:function(){if (FCK.Selection.GetType()=='Control'){FCK.Selection.Delete();}else{var A=FCK.Selection.GetSelectedElement();if (A){if (A.tagName=='IMG'&&A.getAttribute('_fckanchor')) oAnchor=FCK.GetRealElement(A);else A=null;};if (!A){oAnchor=FCK.Selection.MoveToAncestorNode('A');if (oAnchor) FCK.Selection.SelectNode(oAnchor);};if (oAnchor.href.length!=0){oAnchor.removeAttribute('name');if (FCKBrowserInfo.IsIE) oAnchor.className=oAnchor.className.replace(FCKRegexLib.FCK_Class,'');return;};if (A){A.parentNode.removeChild(A);return;};if (oAnchor.innerHTML.length==0){oAnchor.parentNode.removeChild(oAnchor);return;};FCKTools.RemoveOuterTags(oAnchor);};if (FCKBrowserInfo.IsGecko) FCK.Selection.Collapse(true);},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Unlink');}};var FCKDeleteDivCommand=function(){};FCKDeleteDivCommand.prototype={GetState:function(){if (FCK.EditMode!=0) return -1;var A=FCKSelection.GetParentElement();var B=new FCKElementPath(A);return B.BlockLimit&&B.BlockLimit.nodeName.IEquals('div')?0:-1;},Execute:function(){FCKUndo.SaveUndoStep();var A=FCKDomTools.GetSelectedDivContainers();var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.CreateBookmark();for (var i=0;i\n \n
    \n '+FCKLang.ColorAutomatic+'\n \n ';FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_AutoOnClick,this);if (!FCKBrowserInfo.IsIE) C.style.width='96%';var G=FCKConfig.FontColors.toString().split(',');var H=0;while (H
    ';if (H>=G.length) C.style.visibility='hidden';else FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_OnClick,[this,L]);}};if (FCKConfig.EnableMoreFontColors){E=D.insertRow(-1).insertCell(-1);E.colSpan=8;C=E.appendChild(CreateSelectionDiv());C.innerHTML='
    '+FCKLang.ColorMoreColors+'
    ';FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_MoreOnClick,this);};if (!FCKBrowserInfo.IsIE) C.style.width='96%';}; -var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Paste');}; -var FCKPasteWordCommand=function(){this.Name='PasteWord';};FCKPasteWordCommand.prototype.Execute=function(){FCK.PasteFromWord();};FCKPasteWordCommand.prototype.GetState=function(){if (FCK.EditMode!=0||FCKConfig.ForcePasteAsPlainText) return -1;else return FCK.GetNamedCommandState('Paste');}; -var FCKTableCommand=function(A){this.Name=A;};FCKTableCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();if (!FCKBrowserInfo.IsGecko){switch (this.Name){case 'TableMergeRight':return FCKTableHandler.MergeRight();case 'TableMergeDown':return FCKTableHandler.MergeDown();}};switch (this.Name){case 'TableInsertRowAfter':return FCKTableHandler.InsertRow(false);case 'TableInsertRowBefore':return FCKTableHandler.InsertRow(true);case 'TableDeleteRows':return FCKTableHandler.DeleteRows();case 'TableInsertColumnAfter':return FCKTableHandler.InsertColumn(false);case 'TableInsertColumnBefore':return FCKTableHandler.InsertColumn(true);case 'TableDeleteColumns':return FCKTableHandler.DeleteColumns();case 'TableInsertCellAfter':return FCKTableHandler.InsertCell(null,false);case 'TableInsertCellBefore':return FCKTableHandler.InsertCell(null,true);case 'TableDeleteCells':return FCKTableHandler.DeleteCells();case 'TableMergeCells':return FCKTableHandler.MergeCells();case 'TableHorizontalSplitCell':return FCKTableHandler.HorizontalSplitCell();case 'TableVerticalSplitCell':return FCKTableHandler.VerticalSplitCell();case 'TableDelete':return FCKTableHandler.DeleteTable();default:return alert(FCKLang.UnknownCommand.replace(/%1/g,this.Name));}};FCKTableCommand.prototype.GetState=function(){if (FCK.EditorDocument!=null&&FCKSelection.HasAncestorNode('TABLE')){switch (this.Name){case 'TableHorizontalSplitCell':case 'TableVerticalSplitCell':if (FCKTableHandler.GetSelectedCells().length==1) return 0;else return -1;case 'TableMergeCells':if (FCKTableHandler.CheckIsSelectionRectangular()&&FCKTableHandler.GetSelectedCells().length>1) return 0;else return -1;case 'TableMergeRight':return FCKTableHandler.GetMergeRightTarget()?0:-1;case 'TableMergeDown':return FCKTableHandler.GetMergeDownTarget()?0:-1;default:return 0;}}else return -1;}; -var FCKFitWindow=function(){this.Name='FitWindow';};FCKFitWindow.prototype.Execute=function(){var A=window.frameElement;var B=A.style;var C=parent;var D=C.document.documentElement;var E=C.document.body;var F=E.style;var G;var H=new FCKDomRange(FCK.EditorWindow);H.MoveToSelection();var I=FCKTools.GetScrollPosition(FCK.EditorWindow);if (!this.IsMaximized){if(FCKBrowserInfo.IsIE) C.attachEvent('onresize',FCKFitWindow_Resize);else C.addEventListener('resize',FCKFitWindow_Resize,true);this._ScrollPos=FCKTools.GetScrollPosition(C);G=A;while((G=G.parentNode)){if (G.nodeType==1){G._fckSavedStyles=FCKTools.SaveStyles(G);G.style.zIndex=FCKConfig.FloatingPanelsZIndex-1;}};if (FCKBrowserInfo.IsIE){this.documentElementOverflow=D.style.overflow;D.style.overflow='hidden';F.overflow='hidden';}else{F.overflow='hidden';F.width='0px';F.height='0px';};this._EditorFrameStyles=FCKTools.SaveStyles(A);var J=FCKTools.GetViewPaneSize(C);B.position="absolute";A.offsetLeft;B.zIndex=FCKConfig.FloatingPanelsZIndex-1;B.left="0px";B.top="0px";B.width=J.Width+"px";B.height=J.Height+"px";if (!FCKBrowserInfo.IsIE){B.borderRight=B.borderBottom="9999px solid white";B.backgroundColor="white";};C.scrollTo(0,0);var K=FCKTools.GetWindowPosition(C,A);if (K.x!=0) B.left=(-1*K.x)+"px";if (K.y!=0) B.top=(-1*K.y)+"px";this.IsMaximized=true;}else{if(FCKBrowserInfo.IsIE) C.detachEvent("onresize",FCKFitWindow_Resize);else C.removeEventListener("resize",FCKFitWindow_Resize,true);G=A;while((G=G.parentNode)){if (G._fckSavedStyles){FCKTools.RestoreStyles(G,G._fckSavedStyles);G._fckSavedStyles=null;}};if (FCKBrowserInfo.IsIE) D.style.overflow=this.documentElementOverflow;FCKTools.RestoreStyles(A,this._EditorFrameStyles);C.scrollTo(this._ScrollPos.X,this._ScrollPos.Y);this.IsMaximized=false;};FCKToolbarItems.GetItem('FitWindow').RefreshState();if (FCK.EditMode==0) FCK.EditingArea.MakeEditable();FCK.Focus();H.Select();FCK.EditorWindow.scrollTo(I.X,I.Y);};FCKFitWindow.prototype.GetState=function(){if (FCKConfig.ToolbarLocation!='In') return -1;else return (this.IsMaximized?1:0);};function FCKFitWindow_Resize(){var A=FCKTools.GetViewPaneSize(parent);var B=window.frameElement.style;B.width=A.Width+'px';B.height=A.Height+'px';}; -var FCKListCommand=function(A,B){this.Name=A;this.TagName=B;};FCKListCommand.prototype={GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=FCKSelection.GetBoundaryParentElement(true);var B=A;while (B){if (B.nodeName.IEquals(['ul','ol'])) break;B=B.parentNode;};if (B&&B.nodeName.IEquals(this.TagName)) return 1;else return 0;},Execute:function(){FCKUndo.SaveUndoStep();var A=FCK.EditorDocument;var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=this.GetState();if (C==0){FCKDomTools.TrimNode(A.body);if (!A.body.firstChild){var D=A.createElement('p');A.body.appendChild(D);B.MoveToNodeContents(D);}};var E=B.CreateBookmark();var F=[];var G={};var H=new FCKDomRangeIterator(B);var I;H.ForceBrBreak=(C==0);var J=true;var K=null;while (J){while ((I=H.GetNextParagraph())){var L=new FCKElementPath(I);var M=null;var N=false;var O=L.BlockLimit;for (var i=L.Elements.length-1;i>=0;i--){var P=L.Elements[i];if (P.nodeName.IEquals(['ol','ul'])){if (O._FCK_ListGroupObject) O._FCK_ListGroupObject=null;var Q=P._FCK_ListGroupObject;if (Q) Q.contents.push(I);else{Q={ 'root':P,'contents':[I] };F.push(Q);FCKDomTools.SetElementMarker(G,P,'_FCK_ListGroupObject',Q);};N=true;break;}};if (N) continue;var R=O;if (R._FCK_ListGroupObject) R._FCK_ListGroupObject.contents.push(I);else{var Q={ 'root':R,'contents':[I] };FCKDomTools.SetElementMarker(G,R,'_FCK_ListGroupObject',Q);F.push(Q);}};if (FCKBrowserInfo.IsIE) J=false;else{if (K==null){K=[];var T=FCKSelection.GetSelection();if (T&&F.length==0) K.push(T.getRangeAt(0));for (var i=1;T&&i0){var Q=F.shift();if (C==0){if (Q.root.nodeName.IEquals(['ul','ol'])) this._ChangeListType(Q,G,W);else this._CreateList(Q,W);}else if (C==1&&Q.root.nodeName.IEquals(['ul','ol'])) this._RemoveList(Q,G);};for (var i=0;iC[i-1].indent+1){var H=C[i-1].indent+1-C[i].indent;var I=C[i].indent;while (C[i]&&C[i].indent>=I){C[i].indent+=H;i++;};i--;}};var J=FCKDomTools.ArrayToList(C,B);if (A.root.nextSibling==null||A.root.nextSibling.nodeName.IEquals('br')){if (J.listNode.lastChild.nodeName.IEquals('br')) J.listNode.removeChild(J.listNode.lastChild);};A.root.parentNode.replaceChild(J.listNode,A.root);}}; -var FCKJustifyCommand=function(A){this.AlignValue=A;var B=FCKConfig.ContentLangDirection.toLowerCase();this.IsDefaultAlign=(A=='left'&&B=='ltr')||(A=='right'&&B=='rtl');var C=this._CssClassName=(function(){var D=FCKConfig.JustifyClasses;if (D){switch (A){case 'left':return D[0]||null;case 'center':return D[1]||null;case 'right':return D[2]||null;case 'justify':return D[3]||null;}};return null;})();if (C&&C.length>0) this._CssClassRegex=new RegExp('(?:^|\\s+)'+C+'(?=$|\\s)');};FCKJustifyCommand._GetClassNameRegex=function(){var A=FCKJustifyCommand._ClassRegex;if (A!=undefined) return A;var B=[];var C=FCKConfig.JustifyClasses;if (C){for (var i=0;i<4;i++){var D=C[i];if (D&&D.length>0) B.push(D);}};if (B.length>0) A=new RegExp('(?:^|\\s+)(?:'+B.join('|')+')(?=$|\\s)');else A=null;return FCKJustifyCommand._ClassRegex=A;};FCKJustifyCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();var A=new FCKDomRange(FCK.EditorWindow);A.MoveToSelection();var B=this.GetState();if (B==-1) return;var C=A.CreateBookmark();var D=this._CssClassName;var E=new FCKDomRangeIterator(A);var F;while ((F=E.GetNextParagraph())){F.removeAttribute('align');if (D){var G=F.className.replace(FCKJustifyCommand._GetClassNameRegex(),'');if (B==0){if (G.length>0) G+=' ';F.className=G+D;}else if (G.length==0) FCKDomTools.RemoveAttribute(F,'class');}else{var H=F.style;if (B==0) H.textAlign=this.AlignValue;else{H.textAlign='';if (H.cssText.length==0) F.removeAttribute('style');}}};A.MoveToBookmark(C);A.Select();FCK.Focus();FCK.Events.FireEvent('OnSelectionChange');},GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=new FCKElementPath(FCKSelection.GetBoundaryParentElement(true));var B=A.Block||A.BlockLimit;if (!B||B.nodeName.toLowerCase()=='body') return 0;var C;if (FCKBrowserInfo.IsIE) C=B.currentStyle.textAlign;else C=FCK.EditorWindow.getComputedStyle(B,'').getPropertyValue('text-align');C=C.replace(/(-moz-|-webkit-|start|auto)/i,'');if ((!C&&this.IsDefaultAlign)||C==this.AlignValue) return 1;return 0;}}; -var FCKIndentCommand=function(A,B){this.Name=A;this.Offset=B;this.IndentCSSProperty=FCKConfig.ContentLangDirection.IEquals('ltr')?'marginLeft':'marginRight';};FCKIndentCommand._InitIndentModeParameters=function(){if (FCKConfig.IndentClasses&&FCKConfig.IndentClasses.length>0){this._UseIndentClasses=true;this._IndentClassMap={};for (var i=0;i0?H+' ':'')+FCKConfig.IndentClasses[G-1];}else{var I=parseInt(E.style[this.IndentCSSProperty],10);if (isNaN(I)) I=0;I+=this.Offset;I=Math.max(I,0);I=Math.ceil(I/this.Offset)*this.Offset;E.style[this.IndentCSSProperty]=I?I+FCKConfig.IndentUnit:'';if (E.getAttribute('style')=='') E.removeAttribute('style');}}},_IndentList:function(A,B){var C=A.StartContainer;var D=A.EndContainer;while (C&&C.parentNode!=B) C=C.parentNode;while (D&&D.parentNode!=B) D=D.parentNode;if (!C||!D) return;var E=C;var F=[];var G=false;while (G==false){if (E==D) G=true;F.push(E);E=E.nextSibling;};if (F.length<1) return;var H=FCKDomTools.GetParents(B);for (var i=0;iN;i++) M[i].indent+=I;var O=FCKDomTools.ArrayToList(M);if (O) B.parentNode.replaceChild(O.listNode,B);FCKDomTools.ClearAllMarkers(L);}}; -var FCKBlockQuoteCommand=function(){};FCKBlockQuoteCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();var A=this.GetState();var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.CreateBookmark();if (FCKBrowserInfo.IsIE){var D=B.GetBookmarkNode(C,true);var E=B.GetBookmarkNode(C,false);var F;if (D&&D.parentNode.nodeName.IEquals('blockquote')&&!D.previousSibling){F=D;while ((F=F.nextSibling)){if (FCKListsLib.BlockElements[F.nodeName.toLowerCase()]) FCKDomTools.MoveNode(D,F,true);}};if (E&&E.parentNode.nodeName.IEquals('blockquote')&&!E.previousSibling){F=E;while ((F=F.nextSibling)){if (FCKListsLib.BlockElements[F.nodeName.toLowerCase()]){if (F.firstChild==D) FCKDomTools.InsertAfterNode(D,E);else FCKDomTools.MoveNode(E,F,true);}}}};var G=new FCKDomRangeIterator(B);var H;if (A==0){G.EnforceRealBlocks=true;var I=[];while ((H=G.GetNextParagraph())) I.push(H);if (I.length<1){para=B.Window.document.createElement(FCKConfig.EnterMode.IEquals('p')?'p':'div');B.InsertNode(para);para.appendChild(B.Window.document.createTextNode('\ufeff'));B.MoveToBookmark(C);B.MoveToNodeContents(para);B.Collapse(true);C=B.CreateBookmark();I.push(para);};var J=I[0].parentNode;var K=[];for (var i=0;i0){H=I.shift();while (H.parentNode!=J) H=H.parentNode;if (H!=L) K.push(H);L=H;}while (K.length>0){H=K.shift();if (H.nodeName.IEquals('blockquote')){var M=FCKTools.GetElementDocument(H).createDocumentFragment();while (H.firstChild){M.appendChild(H.removeChild(H.firstChild));I.push(M.lastChild);};H.parentNode.replaceChild(M,H);}else I.push(H);};var N=B.Window.document.createElement('blockquote');J.insertBefore(N,I[0]);while (I.length>0){H=I.shift();N.appendChild(H);}}else if (A==1){var O=[];while ((H=G.GetNextParagraph())){var P=null;var Q=null;while (H.parentNode){if (H.parentNode.nodeName.IEquals('blockquote')){P=H.parentNode;Q=H;break;};H=H.parentNode;};if (P&&Q) O.push(Q);};var R=[];while (O.length>0){var S=O.shift();var N=S.parentNode;if (S==S.parentNode.firstChild){N.parentNode.insertBefore(N.removeChild(S),N);if (!N.firstChild) N.parentNode.removeChild(N);}else if (S==S.parentNode.lastChild){N.parentNode.insertBefore(N.removeChild(S),N.nextSibling);if (!N.firstChild) N.parentNode.removeChild(N);}else FCKDomTools.BreakParent(S,S.parentNode,B);R.push(S);};if (FCKConfig.EnterMode.IEquals('br')){while (R.length){var S=R.shift();var W=true;if (S.nodeName.IEquals('div')){var M=FCKTools.GetElementDocument(S).createDocumentFragment();var Y=W&&S.previousSibling&&!FCKListsLib.BlockBoundaries[S.previousSibling.nodeName.toLowerCase()];if (W&&Y) M.appendChild(FCKTools.GetElementDocument(S).createElement('br'));var Z=S.nextSibling&&!FCKListsLib.BlockBoundaries[S.nextSibling.nodeName.toLowerCase()];while (S.firstChild) M.appendChild(S.removeChild(S.firstChild));if (Z) M.appendChild(FCKTools.GetElementDocument(S).createElement('br'));S.parentNode.replaceChild(M,S);W=false;}}}};B.MoveToBookmark(C);B.Select();FCK.Focus();FCK.Events.FireEvent('OnSelectionChange');},GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=new FCKElementPath(FCKSelection.GetBoundaryParentElement(true));var B=A.Block||A.BlockLimit;if (!B||B.nodeName.toLowerCase()=='body') return 0;for (var i=0;i';B.open();B.write(''+F+'<\/head><\/body><\/html>');B.close();if(FCKBrowserInfo.IsAIR) FCKAdobeAIR.Panel_Contructor(B,window.document.location);FCKTools.AddEventListenerEx(E,'focus',FCKPanel_Window_OnFocus,this);FCKTools.AddEventListenerEx(E,'blur',FCKPanel_Window_OnBlur,this);};B.dir=FCKLang.Dir;FCKTools.AddEventListener(B,'contextmenu',FCKTools.CancelEvent);this.MainNode=B.body.appendChild(B.createElement('DIV'));this.MainNode.style.cssFloat=this.IsRTL?'right':'left';};FCKPanel.prototype.AppendStyleSheet=function(A){FCKTools.AppendStyleSheet(this.Document,A);};FCKPanel.prototype.Preload=function(x,y,A){if (this._Popup) this._Popup.show(x,y,0,0,A);};FCKPanel.prototype.Show=function(x,y,A,B,C){var D;var E=this.MainNode;if (this._Popup){this._Popup.show(x,y,0,0,A);FCKDomTools.SetElementStyles(E,{B:B?B+'px':'',C:C?C+'px':''});D=E.offsetWidth;if (this.IsRTL){if (this.IsContextMenu) x=x-D+1;else if (A) x=(x*-1)+A.offsetWidth-D;};this._Popup.show(x,y,D,E.offsetHeight,A);if (this.OnHide){if (this._Timer) CheckPopupOnHide.call(this,true);this._Timer=FCKTools.SetInterval(CheckPopupOnHide,100,this);}}else{if (typeof(FCK.ToolbarSet.CurrentInstance.FocusManager)!='undefined') FCK.ToolbarSet.CurrentInstance.FocusManager.Lock();if (this.ParentPanel){this.ParentPanel.Lock();FCKPanel_Window_OnBlur(null,this.ParentPanel);};if (FCKBrowserInfo.IsGecko&&FCKBrowserInfo.IsMac){this._IFrame.scrolling='';FCKTools.RunFunction(function(){ this._IFrame.scrolling='no';},this);};if (FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel&&FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel!=this) FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel.Hide(false,true);FCKDomTools.SetElementStyles(E,{B:B?B+'px':'',C:C?C+'px':''});D=E.offsetWidth;if (!B) this._IFrame.width=1;if (!C) this._IFrame.height=1;D=E.offsetWidth||E.firstChild.offsetWidth;var F=FCKTools.GetDocumentPosition(this._Window,A.nodeType==9?(FCKTools.IsStrictMode(A)?A.documentElement:A.body):A);var G=FCKDomTools.GetPositionedAncestor(this._IFrame.parentNode);if (G){var H=FCKTools.GetDocumentPosition(FCKTools.GetElementWindow(G),G);F.x-=H.x;F.y-=H.y;};if (this.IsRTL&&!this.IsContextMenu) x=(x*-1);x+=F.x;y+=F.y;if (this.IsRTL){if (this.IsContextMenu) x=x-D+1;else if (A) x=x+A.offsetWidth-D;}else{var I=FCKTools.GetViewPaneSize(this._Window);var J=FCKTools.GetScrollPosition(this._Window);var K=I.Height+J.Y;var L=I.Width+J.X;if ((x+D)>L) x-=x+D-L;if ((y+E.offsetHeight)>K) y-=y+E.offsetHeight-K;};FCKDomTools.SetElementStyles(this._IFrame,{left:x+'px',top:y+'px'});this._IFrame.contentWindow.focus();this._IsOpened=true;var M=this;this._resizeTimer=setTimeout(function(){var N=E.offsetWidth||E.firstChild.offsetWidth;var O=E.offsetHeight;M._IFrame.style.width=N+'px';M._IFrame.style.height=O+'px';},0);FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel=this;};FCKTools.RunFunction(this.OnShow,this);};FCKPanel.prototype.Hide=function(A,B){if (this._Popup) this._Popup.hide();else{if (!this._IsOpened||this._LockCounter>0) return;if (typeof(FCKFocusManager)!='undefined'&&!B) FCKFocusManager.Unlock();this._IFrame.style.width=this._IFrame.style.height='0px';this._IsOpened=false;if (this._resizeTimer){clearTimeout(this._resizeTimer);this._resizeTimer=null;};if (this.ParentPanel) this.ParentPanel.Unlock();if (!A) FCKTools.RunFunction(this.OnHide,this);}};FCKPanel.prototype.CheckIsOpened=function(){if (this._Popup) return this._Popup.isOpen;else return this._IsOpened;};FCKPanel.prototype.CreateChildPanel=function(){var A=this._Popup?FCKTools.GetDocumentWindow(this.Document):this._Window;var B=new FCKPanel(A);B.ParentPanel=this;return B;};FCKPanel.prototype.Lock=function(){this._LockCounter++;};FCKPanel.prototype.Unlock=function(){if (--this._LockCounter==0&&!this.HasFocus) this.Hide();};function FCKPanel_Window_OnFocus(e,A){A.HasFocus=true;};function FCKPanel_Window_OnBlur(e,A){A.HasFocus=false;if (A._LockCounter==0) FCKTools.RunFunction(A.Hide,A);};function CheckPopupOnHide(A){if (A||!this._Popup.isOpen){window.clearInterval(this._Timer);this._Timer=null;FCKTools.RunFunction(this.OnHide,this);}};function FCKPanel_Cleanup(){this._Popup=null;this._Window=null;this.Document=null;this.MainNode=null;}; -var FCKIcon=function(A){var B=A?typeof(A):'undefined';switch (B){case 'number':this.Path=FCKConfig.SkinPath+'fck_strip.gif';this.Size=16;this.Position=A;break;case 'undefined':this.Path=FCK_SPACER_PATH;break;case 'string':this.Path=A;break;default:this.Path=A[0];this.Size=A[1];this.Position=A[2];}};FCKIcon.prototype.CreateIconElement=function(A){var B,eIconImage;if (this.Position){var C='-'+((this.Position-1)*this.Size)+'px';if (FCKBrowserInfo.IsIE){B=A.createElement('DIV');eIconImage=B.appendChild(A.createElement('IMG'));eIconImage.src=this.Path;eIconImage.style.top=C;}else{B=A.createElement('IMG');B.src=FCK_SPACER_PATH;B.style.backgroundPosition='0px '+C;B.style.backgroundImage='url("'+this.Path+'")';}}else{if (FCKBrowserInfo.IsIE){B=A.createElement('DIV');eIconImage=B.appendChild(A.createElement('IMG'));eIconImage.src=this.Path?this.Path:FCK_SPACER_PATH;}else{B=A.createElement('IMG');B.src=this.Path?this.Path:FCK_SPACER_PATH;}};B.className='TB_Button_Image';return B;}; -var FCKToolbarButtonUI=function(A,B,C,D,E,F){this.Name=A;this.Label=B||A;this.Tooltip=C||this.Label;this.Style=E||0;this.State=F||0;this.Icon=new FCKIcon(D);if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKToolbarButtonUI_Cleanup);};FCKToolbarButtonUI.prototype._CreatePaddingElement=function(A){var B=A.createElement('IMG');B.className='TB_Button_Padding';B.src=FCK_SPACER_PATH;return B;};FCKToolbarButtonUI.prototype.Create=function(A){var B=FCKTools.GetElementDocument(A);var C=this.MainElement=B.createElement('DIV');C.title=this.Tooltip;if (FCKBrowserInfo.IsGecko) C.onmousedown=FCKTools.CancelEvent;FCKTools.AddEventListenerEx(C,'mouseover',FCKToolbarButtonUI_OnMouseOver,this);FCKTools.AddEventListenerEx(C,'mouseout',FCKToolbarButtonUI_OnMouseOut,this);FCKTools.AddEventListenerEx(C,'click',FCKToolbarButtonUI_OnClick,this);this.ChangeState(this.State,true);if (this.Style==0&&!this.ShowArrow){C.appendChild(this.Icon.CreateIconElement(B));}else{var D=C.appendChild(B.createElement('TABLE'));D.cellPadding=0;D.cellSpacing=0;var E=D.insertRow(-1);var F=E.insertCell(-1);if (this.Style==0||this.Style==2) F.appendChild(this.Icon.CreateIconElement(B));else F.appendChild(this._CreatePaddingElement(B));if (this.Style==1||this.Style==2){F=E.insertCell(-1);F.className='TB_Button_Text';F.noWrap=true;F.appendChild(B.createTextNode(this.Label));};if (this.ShowArrow){if (this.Style!=0){E.insertCell(-1).appendChild(this._CreatePaddingElement(B));};F=E.insertCell(-1);var G=F.appendChild(B.createElement('IMG'));G.src=FCKConfig.SkinPath+'images/toolbar.buttonarrow.gif';G.width=5;G.height=3;};F=E.insertCell(-1);F.appendChild(this._CreatePaddingElement(B));};A.appendChild(C);};FCKToolbarButtonUI.prototype.ChangeState=function(A,B){if (!B&&this.State==A) return;var e=this.MainElement;if (!e) return;switch (parseInt(A,10)){case 0:e.className='TB_Button_Off';break;case 1:e.className='TB_Button_On';break;case -1:e.className='TB_Button_Disabled';break;};this.State=A;};function FCKToolbarButtonUI_OnMouseOver(A,B){if (B.State==0) this.className='TB_Button_Off_Over';else if (B.State==1) this.className='TB_Button_On_Over';};function FCKToolbarButtonUI_OnMouseOut(A,B){if (B.State==0) this.className='TB_Button_Off';else if (B.State==1) this.className='TB_Button_On';};function FCKToolbarButtonUI_OnClick(A,B){if (B.OnClick&&B.State!=-1) B.OnClick(B);};function FCKToolbarButtonUI_Cleanup(){this.MainElement=null;}; -var FCKToolbarButton=function(A,B,C,D,E,F,G){this.CommandName=A;this.Label=B;this.Tooltip=C;this.Style=D;this.SourceView=E?true:false;this.ContextSensitive=F?true:false;if (G==null) this.IconPath=FCKConfig.SkinPath+'toolbar/'+A.toLowerCase()+'.gif';else if (typeof(G)=='number') this.IconPath=[FCKConfig.SkinPath+'fck_strip.gif',16,G];else this.IconPath=G;};FCKToolbarButton.prototype.Create=function(A){this._UIButton=new FCKToolbarButtonUI(this.CommandName,this.Label,this.Tooltip,this.IconPath,this.Style);this._UIButton.OnClick=this.Click;this._UIButton._ToolbarButton=this;this._UIButton.Create(A);};FCKToolbarButton.prototype.RefreshState=function(){var A=this._UIButton;if (!A) return;var B=FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).GetState();if (B==A.State) return;A.ChangeState(B);};FCKToolbarButton.prototype.Click=function(){var A=this._ToolbarButton||this;FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(A.CommandName).Execute();};FCKToolbarButton.prototype.Enable=function(){this.RefreshState();};FCKToolbarButton.prototype.Disable=function(){this._UIButton.ChangeState(-1);}; -var FCKSpecialCombo=function(A,B,C,D,E){this.FieldWidth=B||100;this.PanelWidth=C||150;this.PanelMaxHeight=D||150;this.Label=' ';this.Caption=A;this.Tooltip=A;this.Style=2;this.Enabled=true;this.Items={};this._Panel=new FCKPanel(E||window);this._Panel.AppendStyleSheet(FCKConfig.SkinEditorCSS);this._PanelBox=this._Panel.MainNode.appendChild(this._Panel.Document.createElement('DIV'));this._PanelBox.className='SC_Panel';this._PanelBox.style.width=this.PanelWidth+'px';this._PanelBox.innerHTML='
    ';this._ItemsHolderEl=this._PanelBox.getElementsByTagName('TD')[0];if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKSpecialCombo_Cleanup);};function FCKSpecialCombo_ItemOnMouseOver(){this.className+=' SC_ItemOver';};function FCKSpecialCombo_ItemOnMouseOut(){this.className=this.originalClass;};function FCKSpecialCombo_ItemOnClick(A,B,C){this.className=this.originalClass;B._Panel.Hide();B.SetLabel(this.FCKItemLabel);if (typeof(B.OnSelect)=='function') B.OnSelect(C,this);};FCKSpecialCombo.prototype.ClearItems=function (){if (this.Items) this.Items={};var A=this._ItemsHolderEl;while (A.firstChild) A.removeChild(A.firstChild);};FCKSpecialCombo.prototype.AddItem=function(A,B,C,D){var E=this._ItemsHolderEl.appendChild(this._Panel.Document.createElement('DIV'));E.className=E.originalClass='SC_Item';E.innerHTML=B;E.FCKItemLabel=C||A;E.Selected=false;if (FCKBrowserInfo.IsIE) E.style.width='100%';if (D) E.style.backgroundColor=D;FCKTools.AddEventListenerEx(E,'mouseover',FCKSpecialCombo_ItemOnMouseOver);FCKTools.AddEventListenerEx(E,'mouseout',FCKSpecialCombo_ItemOnMouseOut);FCKTools.AddEventListenerEx(E,'click',FCKSpecialCombo_ItemOnClick,[this,A]);this.Items[A.toString().toLowerCase()]=E;return E;};FCKSpecialCombo.prototype.SelectItem=function(A){if (typeof A=='string') A=this.Items[A.toString().toLowerCase()];if (A){A.className=A.originalClass='SC_ItemSelected';A.Selected=true;}};FCKSpecialCombo.prototype.SelectItemByLabel=function(A,B){for (var C in this.Items){var D=this.Items[C];if (D.FCKItemLabel==A){D.className=D.originalClass='SC_ItemSelected';D.Selected=true;if (B) this.SetLabel(A);}}};FCKSpecialCombo.prototype.DeselectAll=function(A){for (var i in this.Items){if (!this.Items[i]) continue;this.Items[i].className=this.Items[i].originalClass='SC_Item';this.Items[i].Selected=false;};if (A) this.SetLabel('');};FCKSpecialCombo.prototype.SetLabelById=function(A){A=A?A.toString().toLowerCase():'';var B=this.Items[A];this.SetLabel(B?B.FCKItemLabel:'');};FCKSpecialCombo.prototype.SetLabel=function(A){A=(!A||A.length==0)?' ':A;if (A==this.Label) return;this.Label=A;var B=this._LabelEl;if (B){B.innerHTML=A;FCKTools.DisableSelection(B);}};FCKSpecialCombo.prototype.SetEnabled=function(A){this.Enabled=A;if (this._OuterTable) this._OuterTable.className=A?'':'SC_FieldDisabled';};FCKSpecialCombo.prototype.Create=function(A){var B=FCKTools.GetElementDocument(A);var C=this._OuterTable=A.appendChild(B.createElement('TABLE'));C.cellPadding=0;C.cellSpacing=0;C.insertRow(-1);var D;var E;switch (this.Style){case 0:D='TB_ButtonType_Icon';E=false;break;case 1:D='TB_ButtonType_Text';E=false;break;case 2:E=true;break;};if (this.Caption&&this.Caption.length>0&&E){var F=C.rows[0].insertCell(-1);F.innerHTML=this.Caption;F.className='SC_FieldCaption';};var G=FCKTools.AppendElement(C.rows[0].insertCell(-1),'div');if (E){G.className='SC_Field';G.style.width=this.FieldWidth+'px';G.innerHTML='
     
    ';this._LabelEl=G.getElementsByTagName('label')[0];this._LabelEl.innerHTML=this.Label;}else{G.className='TB_Button_Off';G.innerHTML='
    '+this.Caption+'
    ';};FCKTools.AddEventListenerEx(G,'mouseover',FCKSpecialCombo_OnMouseOver,this);FCKTools.AddEventListenerEx(G,'mouseout',FCKSpecialCombo_OnMouseOut,this);FCKTools.AddEventListenerEx(G,'click',FCKSpecialCombo_OnClick,this);FCKTools.DisableSelection(this._Panel.Document.body);};function FCKSpecialCombo_Cleanup(){this._LabelEl=null;this._OuterTable=null;this._ItemsHolderEl=null;this._PanelBox=null;if (this.Items){for (var A in this.Items) this.Items[A]=null;}};function FCKSpecialCombo_OnMouseOver(A,B){if (B.Enabled){switch (B.Style){case 0:this.className='TB_Button_On_Over';break;case 1:this.className='TB_Button_On_Over';break;case 2:this.className='SC_Field SC_FieldOver';break;}}};function FCKSpecialCombo_OnMouseOut(A,B){switch (B.Style){case 0:this.className='TB_Button_Off';break;case 1:this.className='TB_Button_Off';break;case 2:this.className='SC_Field';break;}};function FCKSpecialCombo_OnClick(e,A){if (A.Enabled){var B=A._Panel;var C=A._PanelBox;var D=A._ItemsHolderEl;var E=A.PanelMaxHeight;if (A.OnBeforeClick) A.OnBeforeClick(A);if (FCKBrowserInfo.IsIE) B.Preload(0,this.offsetHeight,this);if (D.offsetHeight>E) C.style.height=E+'px';else C.style.height='';B.Show(0,this.offsetHeight,this);}}; -var FCKToolbarSpecialCombo=function(){this.SourceView=false;this.ContextSensitive=true;this.FieldWidth=null;this.PanelWidth=null;this.PanelMaxHeight=null;};FCKToolbarSpecialCombo.prototype.DefaultLabel='';function FCKToolbarSpecialCombo_OnSelect(A,B){FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).Execute(A,B);};FCKToolbarSpecialCombo.prototype.Create=function(A){this._Combo=new FCKSpecialCombo(this.GetLabel(),this.FieldWidth,this.PanelWidth,this.PanelMaxHeight,FCKBrowserInfo.IsIE?window:FCKTools.GetElementWindow(A).parent);this._Combo.Tooltip=this.Tooltip;this._Combo.Style=this.Style;this.CreateItems(this._Combo);this._Combo.Create(A);this._Combo.CommandName=this.CommandName;this._Combo.OnSelect=FCKToolbarSpecialCombo_OnSelect;};function FCKToolbarSpecialCombo_RefreshActiveItems(A,B){A.DeselectAll();A.SelectItem(B);A.SetLabelById(B);};FCKToolbarSpecialCombo.prototype.RefreshState=function(){var A;var B=FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).GetState();if (B!=-1){A=1;if (this.RefreshActiveItems) this.RefreshActiveItems(this._Combo,B);else{if (this._LastValue!==B){this._LastValue=B;if (!B||B.length==0){this._Combo.DeselectAll();this._Combo.SetLabel(this.DefaultLabel);}else FCKToolbarSpecialCombo_RefreshActiveItems(this._Combo,B);}}}else A=-1;if (A==this.State) return;if (A==-1){this._Combo.DeselectAll();this._Combo.SetLabel('');};this.State=A;this._Combo.SetEnabled(A!=-1);};FCKToolbarSpecialCombo.prototype.Enable=function(){this.RefreshState();};FCKToolbarSpecialCombo.prototype.Disable=function(){this.State=-1;this._Combo.DeselectAll();this._Combo.SetLabel('');this._Combo.SetEnabled(false);}; -var FCKToolbarStyleCombo=function(A,B){if (A===false) return;this.CommandName='Style';this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:2;this.DefaultLabel=FCKConfig.DefaultStyleLabel||'';};FCKToolbarStyleCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarStyleCombo.prototype.GetLabel=function(){return FCKLang.Style;};FCKToolbarStyleCombo.prototype.GetStyles=function(){var A={};var B=FCK.ToolbarSet.CurrentInstance.Styles.GetStyles();for (var C in B){var D=B[C];if (!D.IsCore) A[C]=D;};return A;};FCKToolbarStyleCombo.prototype.CreateItems=function(A){var B=A._Panel.Document;FCKTools.AppendStyleSheet(B,FCKConfig.ToolbarComboPreviewCSS);FCKTools.AppendStyleString(B,FCKConfig.EditorAreaStyles);B.body.className+=' ForceBaseFont';FCKConfig.ApplyBodyAttributes(B.body);var C=this.GetStyles();for (var D in C){var E=C[D];var F=E.GetType()==2?D:FCKToolbarStyleCombo_BuildPreview(E,E.Label||D);var G=A.AddItem(D,F);G.Style=E;};A.OnBeforeClick=this.StyleCombo_OnBeforeClick;};FCKToolbarStyleCombo.prototype.RefreshActiveItems=function(A){var B=FCK.ToolbarSet.CurrentInstance.Selection.GetBoundaryParentElement(true);if (B){var C=new FCKElementPath(B);var D=C.Elements;for (var e=0;e');var E=A.Element;if (E=='bdo') E='span';D=['<',E];var F=A._StyleDesc.Attributes;if (F){for (var G in F){D.push(' ',G,'="',A.GetFinalAttributeValue(G),'"');}};if (A._GetStyleText().length>0) D.push(' style="',A.GetFinalStyleValue(),'"');D.push('>',B,'');if (C==0) D.push('
    ');return D.join('');}; -var FCKToolbarFontFormatCombo=function(A,B){if (A===false) return;this.CommandName='FontFormat';this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:2;this.NormalLabel='Normal';this.PanelWidth=190;this.DefaultLabel=FCKConfig.DefaultFontFormatLabel||'';};FCKToolbarFontFormatCombo.prototype=new FCKToolbarStyleCombo(false);FCKToolbarFontFormatCombo.prototype.GetLabel=function(){return FCKLang.FontFormat;};FCKToolbarFontFormatCombo.prototype.GetStyles=function(){var A={};var B=FCKLang['FontFormats'].split(';');var C={p:B[0],pre:B[1],address:B[2],h1:B[3],h2:B[4],h3:B[5],h4:B[6],h5:B[7],h6:B[8],div:B[9]||(B[0]+' (DIV)')};var D=FCKConfig.FontFormats.split(';');for (var i=0;i';G.open();G.write(''+H+''+document.getElementById('xToolbarSpace').innerHTML+'');G.close();if(FCKBrowserInfo.IsAIR) FCKAdobeAIR.ToolbarSet_InitOutFrame(G);FCKTools.AddEventListener(G,'contextmenu',FCKTools.CancelEvent);FCKTools.AppendStyleSheet(G,FCKConfig.SkinEditorCSS);B=D.__FCKToolbarSet=new FCKToolbarSet(G);B._IFrame=F;if (FCK.IECleanup) FCK.IECleanup.AddItem(D,FCKToolbarSet_Target_Cleanup);};B.CurrentInstance=FCK;if (!B.ToolbarItems) B.ToolbarItems=FCKToolbarItems;FCK.AttachToOnSelectionChange(B.RefreshItemsState);return B;};function FCK_OnBlur(A){var B=A.ToolbarSet;if (B.CurrentInstance==A) B.Disable();};function FCK_OnFocus(A){var B=A.ToolbarSet;var C=A||FCK;B.CurrentInstance.FocusManager.RemoveWindow(B._IFrame.contentWindow);B.CurrentInstance=C;C.FocusManager.AddWindow(B._IFrame.contentWindow,true);B.Enable();};function FCKToolbarSet_Cleanup(){this._TargetElement=null;this._IFrame=null;};function FCKToolbarSet_Target_Cleanup(){this.__FCKToolbarSet=null;};var FCKToolbarSet=function(A){this._Document=A;this._TargetElement=A.getElementById('xToolbar');var B=A.getElementById('xExpandHandle');var C=A.getElementById('xCollapseHandle');B.title=FCKLang.ToolbarExpand;FCKTools.AddEventListener(B,'click',FCKToolbarSet_Expand_OnClick);C.title=FCKLang.ToolbarCollapse;FCKTools.AddEventListener(C,'click',FCKToolbarSet_Collapse_OnClick);if (!FCKConfig.ToolbarCanCollapse||FCKConfig.ToolbarStartExpanded) this.Expand();else this.Collapse();C.style.display=FCKConfig.ToolbarCanCollapse?'':'none';if (FCKConfig.ToolbarCanCollapse) C.style.display='';else A.getElementById('xTBLeftBorder').style.display='';this.Toolbars=[];this.IsLoaded=false;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKToolbarSet_Cleanup);};function FCKToolbarSet_Expand_OnClick(){FCK.ToolbarSet.Expand();};function FCKToolbarSet_Collapse_OnClick(){FCK.ToolbarSet.Collapse();};FCKToolbarSet.prototype.Expand=function(){this._ChangeVisibility(false);};FCKToolbarSet.prototype.Collapse=function(){this._ChangeVisibility(true);};FCKToolbarSet.prototype._ChangeVisibility=function(A){this._Document.getElementById('xCollapsed').style.display=A?'':'none';this._Document.getElementById('xExpanded').style.display=A?'none':'';if (FCKBrowserInfo.IsGecko){FCKTools.RunFunction(window.onresize);}};FCKToolbarSet.prototype.Load=function(A){this.Name=A;this.Items=[];this.ItemsWysiwygOnly=[];this.ItemsContextSensitive=[];this._TargetElement.innerHTML='';var B=FCKConfig.ToolbarSets[A];if (!B){alert(FCKLang.UnknownToolbarSet.replace(/%1/g,A));return;};this.Toolbars=[];for (var x=0;x0) break;}catch (e){break;};D=D.parent;};var E=D.document;var F=function(){if (!B) B=FCKConfig.FloatingPanelsZIndex+999;return++B;};var G=function(){if (!C) return;var H=FCKTools.IsStrictMode(E)?E.documentElement:E.body;FCKDomTools.SetElementStyles(C,{'width':Math.max(H.scrollWidth,H.clientWidth,E.scrollWidth||0)-1+'px','height':Math.max(H.scrollHeight,H.clientHeight,E.scrollHeight||0)-1+'px'});};return {OpenDialog:function(dialogName,dialogTitle,dialogPage,width,height,customValue,parentWindow,resizable){if (!A) this.DisplayMainCover();var I={Title:dialogTitle,Page:dialogPage,Editor:window,CustomValue:customValue,TopWindow:D};FCK.ToolbarSet.CurrentInstance.Selection.Save();var J=FCKTools.GetViewPaneSize(D);var K={ 'X':0,'Y':0 };var L=FCKBrowserInfo.IsIE&&(!FCKBrowserInfo.IsIE7||!FCKTools.IsStrictMode(D.document));if (L) K=FCKTools.GetScrollPosition(D);var M=Math.max(K.Y+(J.Height-height-20)/2,0);var N=Math.max(K.X+(J.Width-width-20)/2,0);var O=E.createElement('iframe');FCKTools.ResetStyles(O);O.src=FCKConfig.BasePath+'fckdialog.html';O.frameBorder=0;O.allowTransparency=true;FCKDomTools.SetElementStyles(O,{'position':(L)?'absolute':'fixed','top':M+'px','left':N+'px','width':width+'px','height':height+'px','zIndex':F()});O._DialogArguments=I;E.body.appendChild(O);O._ParentDialog=A;A=O;},OnDialogClose:function(dialogWindow){var O=dialogWindow.frameElement;FCKDomTools.RemoveNode(O);if (O._ParentDialog){A=O._ParentDialog;O._ParentDialog.contentWindow.SetEnabled(true);}else{if (!FCKBrowserInfo.IsIE) FCK.Focus();this.HideMainCover();setTimeout(function(){ A=null;},0);FCK.ToolbarSet.CurrentInstance.Selection.Release();}},DisplayMainCover:function(){C=E.createElement('div');FCKTools.ResetStyles(C);FCKDomTools.SetElementStyles(C,{'position':'absolute','zIndex':F(),'top':'0px','left':'0px','backgroundColor':FCKConfig.BackgroundBlockerColor});FCKDomTools.SetOpacity(C,FCKConfig.BackgroundBlockerOpacity);if (FCKBrowserInfo.IsIE&&!FCKBrowserInfo.IsIE7){var Q=E.createElement('iframe');FCKTools.ResetStyles(Q);Q.hideFocus=true;Q.frameBorder=0;Q.src=FCKTools.GetVoidUrl();FCKDomTools.SetElementStyles(Q,{'width':'100%','height':'100%','position':'absolute','left':'0px','top':'0px','filter':'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'});C.appendChild(Q);};FCKTools.AddEventListener(D,'resize',G);G();E.body.appendChild(C);FCKFocusManager.Lock();var R=FCK.ToolbarSet.CurrentInstance.GetInstanceObject('frameElement');R._fck_originalTabIndex=R.tabIndex;R.tabIndex=-1;},HideMainCover:function(){FCKDomTools.RemoveNode(C);FCKFocusManager.Unlock();var R=FCK.ToolbarSet.CurrentInstance.GetInstanceObject('frameElement');R.tabIndex=R._fck_originalTabIndex;FCKDomTools.ClearElementJSProperty(R,'_fck_originalTabIndex');},GetCover:function(){return C;}};})(); -var FCKMenuItem=function(A,B,C,D,E,F){this.Name=B;this.Label=C||B;this.IsDisabled=E;this.Icon=new FCKIcon(D);this.SubMenu=new FCKMenuBlockPanel();this.SubMenu.Parent=A;this.SubMenu.OnClick=FCKTools.CreateEventListener(FCKMenuItem_SubMenu_OnClick,this);this.CustomData=F;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKMenuItem_Cleanup);};FCKMenuItem.prototype.AddItem=function(A,B,C,D,E){this.HasSubMenu=true;return this.SubMenu.AddItem(A,B,C,D,E);};FCKMenuItem.prototype.AddSeparator=function(){this.SubMenu.AddSeparator();};FCKMenuItem.prototype.Create=function(A){var B=this.HasSubMenu;var C=FCKTools.GetElementDocument(A);var r=this.MainElement=A.insertRow(-1);r.className=this.IsDisabled?'MN_Item_Disabled':'MN_Item';if (!this.IsDisabled){FCKTools.AddEventListenerEx(r,'mouseover',FCKMenuItem_OnMouseOver,[this]);FCKTools.AddEventListenerEx(r,'click',FCKMenuItem_OnClick,[this]);if (!B) FCKTools.AddEventListenerEx(r,'mouseout',FCKMenuItem_OnMouseOut,[this]);};var D=r.insertCell(-1);D.className='MN_Icon';D.appendChild(this.Icon.CreateIconElement(C));D=r.insertCell(-1);D.className='MN_Label';D.noWrap=true;D.appendChild(C.createTextNode(this.Label));D=r.insertCell(-1);if (B){D.className='MN_Arrow';var E=D.appendChild(C.createElement('IMG'));E.src=FCK_IMAGES_PATH+'arrow_'+FCKLang.Dir+'.gif';E.width=4;E.height=7;this.SubMenu.Create();this.SubMenu.Panel.OnHide=FCKTools.CreateEventListener(FCKMenuItem_SubMenu_OnHide,this);}};FCKMenuItem.prototype.Activate=function(){this.MainElement.className='MN_Item_Over';if (this.HasSubMenu){this.SubMenu.Show(this.MainElement.offsetWidth+2,-2,this.MainElement);};FCKTools.RunFunction(this.OnActivate,this);};FCKMenuItem.prototype.Deactivate=function(){this.MainElement.className='MN_Item';if (this.HasSubMenu) this.SubMenu.Hide();};function FCKMenuItem_SubMenu_OnClick(A,B){FCKTools.RunFunction(B.OnClick,B,[A]);};function FCKMenuItem_SubMenu_OnHide(A){A.Deactivate();};function FCKMenuItem_OnClick(A,B){if (B.HasSubMenu) B.Activate();else{B.Deactivate();FCKTools.RunFunction(B.OnClick,B,[B]);}};function FCKMenuItem_OnMouseOver(A,B){B.Activate();};function FCKMenuItem_OnMouseOut(A,B){B.Deactivate();};function FCKMenuItem_Cleanup(){this.MainElement=null;}; -var FCKMenuBlock=function(){this._Items=[];};FCKMenuBlock.prototype.Count=function(){return this._Items.length;};FCKMenuBlock.prototype.AddItem=function(A,B,C,D,E){var F=new FCKMenuItem(this,A,B,C,D,E);F.OnClick=FCKTools.CreateEventListener(FCKMenuBlock_Item_OnClick,this);F.OnActivate=FCKTools.CreateEventListener(FCKMenuBlock_Item_OnActivate,this);this._Items.push(F);return F;};FCKMenuBlock.prototype.AddSeparator=function(){this._Items.push(new FCKMenuSeparator());};FCKMenuBlock.prototype.RemoveAllItems=function(){this._Items=[];var A=this._ItemsTable;if (A){while (A.rows.length>0) A.deleteRow(0);}};FCKMenuBlock.prototype.Create=function(A){if (!this._ItemsTable){if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKMenuBlock_Cleanup);this._Window=FCKTools.GetElementWindow(A);var B=FCKTools.GetElementDocument(A);var C=A.appendChild(B.createElement('table'));C.cellPadding=0;C.cellSpacing=0;FCKTools.DisableSelection(C);var D=C.insertRow(-1).insertCell(-1);D.className='MN_Menu';var E=this._ItemsTable=D.appendChild(B.createElement('table'));E.cellPadding=0;E.cellSpacing=0;};for (var i=0;i0&&F.href.length==0);if (G) return;menu.AddSeparator();menu.AddItem('VisitLink',FCKLang.VisitLink);menu.AddSeparator();if (E) menu.AddItem('Link',FCKLang.EditLink,34);menu.AddItem('Unlink',FCKLang.RemoveLink,35);}}};case 'Image':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&!tag.getAttribute('_fckfakelement')){menu.AddSeparator();menu.AddItem('Image',FCKLang.ImageProperties,37);}}};case 'Anchor':return {AddItems:function(menu,tag,tagName){var F=FCKSelection.MoveToAncestorNode('A');var G=(F&&F.name.length>0);if (G||(tagName=='IMG'&&tag.getAttribute('_fckanchor'))){menu.AddSeparator();menu.AddItem('Anchor',FCKLang.AnchorProp,36);menu.AddItem('AnchorDelete',FCKLang.AnchorDelete);}}};case 'Flash':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&tag.getAttribute('_fckflash')){menu.AddSeparator();menu.AddItem('Flash',FCKLang.FlashProperties,38);}}};case 'Form':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('FORM')){menu.AddSeparator();menu.AddItem('Form',FCKLang.FormProp,48);}}};case 'Checkbox':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='checkbox'){menu.AddSeparator();menu.AddItem('Checkbox',FCKLang.CheckboxProp,49);}}};case 'Radio':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='radio'){menu.AddSeparator();menu.AddItem('Radio',FCKLang.RadioButtonProp,50);}}};case 'TextField':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&(tag.type=='text'||tag.type=='password')){menu.AddSeparator();menu.AddItem('TextField',FCKLang.TextFieldProp,51);}}};case 'HiddenField':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&tag.getAttribute('_fckinputhidden')){menu.AddSeparator();menu.AddItem('HiddenField',FCKLang.HiddenFieldProp,56);}}};case 'ImageButton':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='image'){menu.AddSeparator();menu.AddItem('ImageButton',FCKLang.ImageButtonProp,55);}}};case 'Button':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&(tag.type=='button'||tag.type=='submit'||tag.type=='reset')){menu.AddSeparator();menu.AddItem('Button',FCKLang.ButtonProp,54);}}};case 'Select':return {AddItems:function(menu,tag,tagName){if (tagName=='SELECT'){menu.AddSeparator();menu.AddItem('Select',FCKLang.SelectionFieldProp,53);}}};case 'Textarea':return {AddItems:function(menu,tag,tagName){if (tagName=='TEXTAREA'){menu.AddSeparator();menu.AddItem('Textarea',FCKLang.TextareaProp,52);}}};case 'BulletedList':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('UL')){menu.AddSeparator();menu.AddItem('BulletedList',FCKLang.BulletedListProp,27);}}};case 'NumberedList':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('OL')){menu.AddSeparator();menu.AddItem('NumberedList',FCKLang.NumberedListProp,26);}}};case 'DivContainer':return {AddItems:function(menu,tag,tagName){var J=FCKDomTools.GetSelectedDivContainers();if (J.length>0){menu.AddSeparator();menu.AddItem('EditDiv',FCKLang.EditDiv,75);menu.AddItem('DeleteDiv',FCKLang.DeleteDiv,76);}}};};return null;};function FCK_ContextMenu_OnBeforeOpen(){FCK.Events.FireEvent('OnSelectionChange');var A,sTagName;if ((A=FCKSelection.GetSelectedElement())) sTagName=A.tagName;var B=FCK.ContextMenu._InnerContextMenu;B.RemoveAllItems();var C=FCK.ContextMenu.Listeners;for (var i=0;i0){D=A.substr(0,B.index);this._sourceHtml=A.substr(B.index);}else{C=true;D=B[0];this._sourceHtml=A.substr(B[0].length);}}else{D=A;this._sourceHtml=null;};return { 'isTag':C,'value':D };},Each:function(A){var B;while ((B=this.Next())) A(B.isTag,B.value);}};var FCKHtmlIterator=function(A){this._sourceHtml=A;};FCKHtmlIterator.prototype={Next:function(){var A=this._sourceHtml;if (A==null) return null;var B=FCKRegexLib.HtmlTag.exec(A);var C=false;var D="";if (B){if (B.index>0){D=A.substr(0,B.index);this._sourceHtml=A.substr(B.index);}else{C=true;D=B[0];this._sourceHtml=A.substr(B[0].length);}}else{D=A;this._sourceHtml=null;};return { 'isTag':C,'value':D };},Each:function(A){var B;while ((B=this.Next())) A(B.isTag,B.value);}}; -var FCKPlugin=function(A,B,C){this.Name=A;this.BasePath=C?C:FCKConfig.PluginsPath;this.Path=this.BasePath+A+'/';if (!B||B.length==0) this.AvailableLangs=[];else this.AvailableLangs=B.split(',');};FCKPlugin.prototype.Load=function(){if (this.AvailableLangs.length>0){var A;if (this.AvailableLangs.IndexOf(FCKLanguageManager.ActiveLanguage.Code)>=0) A=FCKLanguageManager.ActiveLanguage.Code;else A=this.AvailableLangs[0];LoadScript(this.Path+'lang/'+A+'.js');};LoadScript(this.Path+'fckplugin.js');}; -var FCKPlugins=FCK.Plugins={};FCKPlugins.ItemsCount=0;FCKPlugins.Items={};FCKPlugins.Load=function(){var A=FCKPlugins.Items;for (var i=0;i", -DlgInfoTab : "Info", -DlgAlertUrl : "Voeg asseblief die URL in", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Taal rigting", -DlgGenLangDirLtr : "Links na regs (LTR)", -DlgGenLangDirRtl : "Regs na links (RTL)", -DlgGenLangCode : "Taal kode", -DlgGenAccessKey : "Toegang sleutel", -DlgGenName : "Naam", -DlgGenTabIndex : "Tab Index", -DlgGenLongDescr : "Lang beskreiwing URL", -DlgGenClass : "Skakel Tiepe", -DlgGenTitle : "Voorbeveelings Titel", -DlgGenContType : "Voorbeveelings inhoud soort", -DlgGenLinkCharset : "Geskakelde voorbeeld karakterstel", -DlgGenStyle : "Styl", - -// Image Dialog -DlgImgTitle : "Beeld eienskappe", -DlgImgInfoTab : "Beeld informasie", -DlgImgBtnUpload : "Stuur dit na die Server", -DlgImgURL : "URL", -DlgImgUpload : "Uplaai", -DlgImgAlt : "Alternatiewe beskrywing", -DlgImgWidth : "Weidte", -DlgImgHeight : "Hoogde", -DlgImgLockRatio : "Behou preporsie", -DlgBtnResetSize : "Herstel groote", -DlgImgBorder : "Kant", -DlgImgHSpace : "HSpasie", -DlgImgVSpace : "VSpasie", -DlgImgAlign : "Paradeer", -DlgImgAlignLeft : "Links", -DlgImgAlignAbsBottom: "Abs Onder", -DlgImgAlignAbsMiddle: "Abs Middel", -DlgImgAlignBaseline : "Baseline", -DlgImgAlignBottom : "Onder", -DlgImgAlignMiddle : "Middel", -DlgImgAlignRight : "Regs", -DlgImgAlignTextTop : "Text Bo", -DlgImgAlignTop : "Bo", -DlgImgPreview : "Voorskou", -DlgImgAlertUrl : "Voeg asseblief Beeld URL in.", -DlgImgLinkTab : "Skakel", - -// Flash Dialog -DlgFlashTitle : "Flash eienskappe", -DlgFlashChkPlay : "Automaties Speel", -DlgFlashChkLoop : "Herhaling", -DlgFlashChkMenu : "Laat Flash Menu toe", -DlgFlashScale : "Scale", -DlgFlashScaleAll : "Wys alles", -DlgFlashScaleNoBorder : "Geen kante", -DlgFlashScaleFit : "Presiese pas", - -// Link Dialog -DlgLnkWindowTitle : "Skakel", -DlgLnkInfoTab : "Skakel informasie", -DlgLnkTargetTab : "Mikpunt", - -DlgLnkType : "Skakel soort", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Skakel na plekhouers in text", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protokol", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Kies 'n plekhouer", -DlgLnkAnchorByName : "Volgens plekhouer naam", -DlgLnkAnchorById : "Volgens element Id", -DlgLnkNoAnchors : "(Geen plekhouers beskikbaar in dokument}", -DlgLnkEMail : "E-Mail Adres", -DlgLnkEMailSubject : "Boodskap Opskrif", -DlgLnkEMailBody : "Boodskap Inhoud", -DlgLnkUpload : "Oplaai", -DlgLnkBtnUpload : "Stuur na Server", - -DlgLnkTarget : "Mikpunt", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Nuwe Venster (_blank)", -DlgLnkTargetParent : "Vorige Venster (_parent)", -DlgLnkTargetSelf : "Selfde Venster (_self)", -DlgLnkTargetTop : "Boonste Venster (_top)", -DlgLnkTargetFrameName : "Mikpunt Venster Naam", -DlgLnkPopWinName : "Popup Venster Naam", -DlgLnkPopWinFeat : "Popup Venster Geaartheid", -DlgLnkPopResize : "Verstelbare Groote", -DlgLnkPopLocation : "Adres Balk", -DlgLnkPopMenu : "Menu Balk", -DlgLnkPopScroll : "Gleibalkstuk", -DlgLnkPopStatus : "Status Balk", -DlgLnkPopToolbar : "Gereedskap Balk", -DlgLnkPopFullScrn : "Voll Skerm (IE)", -DlgLnkPopDependent : "Afhanklik (Netscape)", -DlgLnkPopWidth : "Weite", -DlgLnkPopHeight : "Hoogde", -DlgLnkPopLeft : "Links Posisie", -DlgLnkPopTop : "Bo Posisie", - -DlnLnkMsgNoUrl : "Voeg asseblief die URL in", -DlnLnkMsgNoEMail : "Voeg asseblief die e-mail adres in", -DlnLnkMsgNoAnchor : "Kies asseblief 'n plekhouer", -DlnLnkMsgInvPopName : "Die popup naam moet begin met alphabetiese karakters sonder spasies.", - -// Color Dialog -DlgColorTitle : "Kies Kleur", -DlgColorBtnClear : "Maak skoon", -DlgColorHighlight : "Highlight", -DlgColorSelected : "Geselekteer", - -// Smiley Dialog -DlgSmileyTitle : "Voeg Smiley by", - -// Special Character Dialog -DlgSpecialCharTitle : "Kies spesiale karakter", - -// Table Dialog -DlgTableTitle : "Tabel eienskappe", -DlgTableRows : "Reie", -DlgTableColumns : "Kolome", -DlgTableBorder : "Kant groote", -DlgTableAlign : "Parideering", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Links", -DlgTableAlignCenter : "Middel", -DlgTableAlignRight : "Regs", -DlgTableWidth : "Weite", -DlgTableWidthPx : "pixels", -DlgTableWidthPc : "percent", -DlgTableHeight : "Hoogde", -DlgTableCellSpace : "Cell spasieering", -DlgTableCellPad : "Cell buffer", -DlgTableCaption : "Beskreiwing", -DlgTableSummary : "Opsomming", - -// Table Cell Dialog -DlgCellTitle : "Cell eienskappe", -DlgCellWidth : "Weite", -DlgCellWidthPx : "pixels", -DlgCellWidthPc : "percent", -DlgCellHeight : "Hoogde", -DlgCellWordWrap : "Woord Wrap", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Ja", -DlgCellWordWrapNo : "Nee", -DlgCellHorAlign : "Horisontale rigting", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Links", -DlgCellHorAlignCenter : "Middel", -DlgCellHorAlignRight: "Regs", -DlgCellVerAlign : "Vertikale rigting", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Bo", -DlgCellVerAlignMiddle : "Middel", -DlgCellVerAlignBottom : "Onder", -DlgCellVerAlignBaseline : "Baseline", -DlgCellRowSpan : "Rei strekking", -DlgCellCollSpan : "Kolom strekking", -DlgCellBackColor : "Agtergrond Kleur", -DlgCellBorderColor : "Kant Kleur", -DlgCellBtnSelect : "Keuse...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", //MISSING - -// Find Dialog -DlgFindTitle : "Vind", -DlgFindFindBtn : "Vind", -DlgFindNotFoundMsg : "Die gespesifiseerde karakters word nie gevind nie.", - -// Replace Dialog -DlgReplaceTitle : "Vervang", -DlgReplaceFindLbl : "Soek wat:", -DlgReplaceReplaceLbl : "Vervang met:", -DlgReplaceCaseChk : "Vergelyk karakter skryfweise", -DlgReplaceReplaceBtn : "Vervang", -DlgReplaceReplAllBtn : "Vervang alles", -DlgReplaceWordChk : "Vergelyk komplete woord", - -// Paste Operations / Dialog -PasteErrorCut : "U browser se sekuriteit instelling behinder die uitsny aksie. Gebruik asseblief die sleutel kombenasie(Ctrl+X).", -PasteErrorCopy : "U browser se sekuriteit instelling behinder die kopieerings aksie. Gebruik asseblief die sleutel kombenasie(Ctrl+C).", - -PasteAsText : "Voeg slegs karakters by", -PasteFromWord : "Byvoeging uit Word", - -DlgPasteMsg2 : "Voeg asseblief die inhoud in die gegewe box by met sleutel kombenasie(Ctrl+V) en druk OK.", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING -DlgPasteIgnoreFont : "Ignoreer karakter soort defenisies", -DlgPasteRemoveStyles : "Verweider Styl defenisies", - -// Color Picker -ColorAutomatic : "Automaties", -ColorMoreColors : "Meer Kleure...", - -// Document Properties -DocProps : "Dokument Eienskappe", - -// Anchor Dialog -DlgAnchorTitle : "Plekhouer Eienskappe", -DlgAnchorName : "Plekhouer Naam", -DlgAnchorErrorName : "Voltooi die plekhouer naam asseblief", - -// Speller Pages Dialog -DlgSpellNotInDic : "Nie in woordeboek nie", -DlgSpellChangeTo : "Verander na", -DlgSpellBtnIgnore : "Ignoreer", -DlgSpellBtnIgnoreAll : "Ignoreer na-volgende", -DlgSpellBtnReplace : "Vervang", -DlgSpellBtnReplaceAll : "vervang na-volgende", -DlgSpellBtnUndo : "Ont-skep", -DlgSpellNoSuggestions : "- Geen voorstel -", -DlgSpellProgress : "Spelling word beproef...", -DlgSpellNoMispell : "Spellproef kompleet: Geen foute", -DlgSpellNoChanges : "Spellproef kompleet: Geen woord veranderings", -DlgSpellOneChange : "Spellproef kompleet: Een woord verander", -DlgSpellManyChanges : "Spellproef kompleet: %1 woorde verander", - -IeSpellDownload : "Geen Spellproefer geinstaleer nie. Wil U dit aflaai?", - -// Button Dialog -DlgButtonText : "Karakters (Waarde)", -DlgButtonType : "Soort", -DlgButtonTypeBtn : "Knop", -DlgButtonTypeSbm : "Indien", -DlgButtonTypeRst : "Reset", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Naam", -DlgCheckboxValue : "Waarde", -DlgCheckboxSelected : "Uitgekies", - -// Form Dialog -DlgFormName : "Naam", -DlgFormAction : "Aksie", -DlgFormMethod : "Metode", - -// Select Field Dialog -DlgSelectName : "Naam", -DlgSelectValue : "Waarde", -DlgSelectSize : "Grote", -DlgSelectLines : "lyne", -DlgSelectChkMulti : "Laat meerere keuses toe", -DlgSelectOpAvail : "Beskikbare Opsies", -DlgSelectOpText : "Karakters", -DlgSelectOpValue : "Waarde", -DlgSelectBtnAdd : "Byvoeg", -DlgSelectBtnModify : "Verander", -DlgSelectBtnUp : "Op", -DlgSelectBtnDown : "Af", -DlgSelectBtnSetValue : "Stel as uitgekiesde waarde", -DlgSelectBtnDelete : "Verweider", - -// Textarea Dialog -DlgTextareaName : "Naam", -DlgTextareaCols : "Kolom", -DlgTextareaRows : "Reie", - -// Text Field Dialog -DlgTextName : "Naam", -DlgTextValue : "Waarde", -DlgTextCharWidth : "Karakter weite", -DlgTextMaxChars : "Maximale karakters", -DlgTextType : "Soort", -DlgTextTypeText : "Karakters", -DlgTextTypePass : "Wagwoord", - -// Hidden Field Dialog -DlgHiddenName : "Naam", -DlgHiddenValue : "Waarde", - -// Bulleted List Dialog -BulletedListProp : "Gepunkte lys eienskappe", -NumberedListProp : "Genommerde lys eienskappe", -DlgLstStart : "Begin", -DlgLstType : "Soort", -DlgLstTypeCircle : "Sirkel", -DlgLstTypeDisc : "Skyf", -DlgLstTypeSquare : "Vierkant", -DlgLstTypeNumbers : "Nommer (1, 2, 3)", -DlgLstTypeLCase : "Klein Letters (a, b, c)", -DlgLstTypeUCase : "Hoof Letters (A, B, C)", -DlgLstTypeSRoman : "Klein Romeinse nommers (i, ii, iii)", -DlgLstTypeLRoman : "Groot Romeinse nommers (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Algemeen", -DlgDocBackTab : "Agtergrond", -DlgDocColorsTab : "Kleure en Rante", -DlgDocMetaTab : "Meta Data", - -DlgDocPageTitle : "Bladsy Opskrif", -DlgDocLangDir : "Taal rigting", -DlgDocLangDirLTR : "Link na Regs (LTR)", -DlgDocLangDirRTL : "Regs na Links (RTL)", -DlgDocLangCode : "Taal Kode", -DlgDocCharSet : "Karakterstel Kodeering", -DlgDocCharSetCE : "Sentraal Europa", -DlgDocCharSetCT : "Chinees Traditioneel (Big5)", -DlgDocCharSetCR : "Cyrillic", -DlgDocCharSetGR : "Grieks", -DlgDocCharSetJP : "Japanees", -DlgDocCharSetKR : "Koreans", -DlgDocCharSetTR : "Turks", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Western European", -DlgDocCharSetOther : "Ander Karakterstel Kodeering", - -DlgDocDocType : "Dokument Opskrif Soort", -DlgDocDocTypeOther : "Ander Dokument Opskrif Soort", -DlgDocIncXHTML : "Voeg XHTML verklaring by", -DlgDocBgColor : "Agtergrond kleur", -DlgDocBgImage : "Agtergrond Beeld URL", -DlgDocBgNoScroll : "Vasgeklemde Agtergrond", -DlgDocCText : "Karakters", -DlgDocCLink : "Skakel", -DlgDocCVisited : "Besoekte Skakel", -DlgDocCActive : "Aktiewe Skakel", -DlgDocMargins : "Bladsy Rante", -DlgDocMaTop : "Bo", -DlgDocMaLeft : "Links", -DlgDocMaRight : "Regs", -DlgDocMaBottom : "Onder", -DlgDocMeIndex : "Dokument Index Sleutelwoorde(comma verdeelt)", -DlgDocMeDescr : "Dokument Beskrywing", -DlgDocMeAuthor : "Skrywer", -DlgDocMeCopy : "Kopiereg", -DlgDocPreview : "Voorskou", - -// Templates Dialog -Templates : "Templates", -DlgTemplatesTitle : "Inhoud Templates", -DlgTemplatesSelMsg : "Kies die template om te gebruik in die editor
    (Inhoud word vervang!):", -DlgTemplatesLoading : "Templates word gelaai. U geduld asseblief...", -DlgTemplatesNoTpl : "(Geen templates gedefinieerd)", -DlgTemplatesReplace : "Vervang bestaande inhoud", - -// About Dialog -DlgAboutAboutTab : "Meer oor", -DlgAboutBrowserInfoTab : "Blaai Informasie deur", -DlgAboutLicenseTab : "Lesensie", -DlgAboutVersion : "weergawe", -DlgAboutInfo : "Vir meer informasie gaan na ", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/ar.js b/fckeditor/editor/lang/ar.js deleted file mode 100644 index f417bfd6..00000000 --- a/fckeditor/editor/lang/ar.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Arabic language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "rtl", - -ToolbarCollapse : "ضم شريط الأدوات", -ToolbarExpand : "تمدد شريط الأدوات", - -// Toolbar Items and Context Menu -Save : "Ø­ÙØ¸", -NewPage : "ØµÙØ­Ø© جديدة", -Preview : "معاينة Ø§Ù„ØµÙØ­Ø©", -Cut : "قص", -Copy : "نسخ", -Paste : "لصق", -PasteText : "لصق كنص بسيط", -PasteWord : "لصق من وورد", -Print : "طباعة", -SelectAll : "تحديد الكل", -RemoveFormat : "إزالة التنسيقات", -InsertLinkLbl : "رابط", -InsertLink : "إدراج/تحرير رابط", -RemoveLink : "إزالة رابط", -VisitLink : "Open Link", //MISSING -Anchor : "إدراج/تحرير إشارة مرجعية", -AnchorDelete : "إزالة إشارة مرجعية", -InsertImageLbl : "صورة", -InsertImage : "إدراج/تحرير صورة", -InsertFlashLbl : "Ùلاش", -InsertFlash : "إدراج/تحرير Ùيلم Ùلاش", -InsertTableLbl : "جدول", -InsertTable : "إدراج/تحرير جدول", -InsertLineLbl : "خط ÙØ§ØµÙ„", -InsertLine : "إدراج خط ÙØ§ØµÙ„", -InsertSpecialCharLbl: "رموز", -InsertSpecialChar : "إدراج رموز..Ù", -InsertSmileyLbl : "ابتسامات", -InsertSmiley : "إدراج ابتسامات", -About : "حول FCKeditor", -Bold : "غامق", -Italic : "مائل", -Underline : "تسطير", -StrikeThrough : "يتوسطه خط", -Subscript : "Ù…Ù†Ø®ÙØ¶", -Superscript : "Ù…Ø±ØªÙØ¹", -LeftJustify : "محاذاة إلى اليسار", -CenterJustify : "توسيط", -RightJustify : "محاذاة إلى اليمين", -BlockJustify : "ضبط", -DecreaseIndent : "إنقاص Ø§Ù„Ù…Ø³Ø§ÙØ© البادئة", -IncreaseIndent : "زيادة Ø§Ù„Ù…Ø³Ø§ÙØ© البادئة", -Blockquote : "اقتباس", -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "تراجع", -Redo : "إعادة", -NumberedListLbl : "تعداد رقمي", -NumberedList : "إدراج/إلغاء تعداد رقمي", -BulletedListLbl : "تعداد نقطي", -BulletedList : "إدراج/إلغاء تعداد نقطي", -ShowTableBorders : "معاينة حدود الجداول", -ShowDetails : "معاينة Ø§Ù„ØªÙØ§ØµÙŠÙ„", -Style : "نمط", -FontFormat : "تنسيق", -Font : "خط", -FontSize : "حجم الخط", -TextColor : "لون النص", -BGColor : "لون الخلÙية", -Source : "Ø´ÙØ±Ø© المصدر", -Find : "بحث", -Replace : "إستبدال", -SpellCheck : "تدقيق إملائي", -UniversalKeyboard : "لوحة Ø§Ù„Ù…ÙØ§ØªÙŠØ­ العالمية", -PageBreakLbl : "ÙØµÙ„ Ø§Ù„ØµÙØ­Ø©", -PageBreak : "إدخال ØµÙØ­Ø© جديدة", - -Form : "نموذج", -Checkbox : "خانة إختيار", -RadioButton : "زر خيار", -TextField : "مربع نص", -Textarea : "ناحية نص", -HiddenField : "إدراج حقل Ø®ÙÙŠ", -Button : "زر ضغط", -SelectionField : "قائمة منسدلة", -ImageButton : "زر صورة", - -FitWindow : "تكبير حجم المحرر", -ShowBlocks : "مخطط ØªÙØµÙŠÙ„ÙŠ", - -// Context Menu -EditLink : "تحرير رابط", -CellCM : "خلية", -RowCM : "صÙ", -ColumnCM : "عمود", -InsertRowAfter : "إدراج ص٠بعد", -InsertRowBefore : "إدراج ص٠قبل", -DeleteRows : "حذ٠صÙÙˆÙ", -InsertColumnAfter : "إدراج عمود بعد", -InsertColumnBefore : "إدراج عمود قبل", -DeleteColumns : "حذ٠أعمدة", -InsertCellAfter : "إدراج خلية بعد", -InsertCellBefore : "إدراج خلية قبل", -DeleteCells : "حذ٠خلايا", -MergeCells : "دمج خلايا", -MergeRight : "دمج لليمين", -MergeDown : "دمج للأسÙÙ„", -HorizontalSplitCell : "تقسيم الخلية Ø£Ùقياً", -VerticalSplitCell : "تقسيم الخلية عمودياً", -TableDelete : "حذ٠الجدول", -CellProperties : "خصائص الخلية", -TableProperties : "خصائص الجدول", -ImageProperties : "خصائص الصورة", -FlashProperties : "خصائص Ùيلم الÙلاش", - -AnchorProp : "خصائص الإشارة المرجعية", -ButtonProp : "خصائص زر الضغط", -CheckboxProp : "خصائص خانة الإختيار", -HiddenFieldProp : "خصائص الحقل الخÙÙŠ", -RadioButtonProp : "خصائص زر الخيار", -ImageButtonProp : "خصائص زر الصورة", -TextFieldProp : "خصائص مربع النص", -SelectionFieldProp : "خصائص القائمة المنسدلة", -TextareaProp : "خصائص ناحية النص", -FormProp : "خصائص النموذج", - -FontFormats : "عادي;منسّق;دوس;العنوان 1;العنوان 2;العنوان 3;العنوان 4;العنوان 5;العنوان 6", - -// Alerts and Messages -ProcessingXHTML : "إنتظر قليلاً ريثما تتم معالَجة†XHTML. لن يستغرق طويلاً...", -Done : "تم", -PasteWordConfirm : "يبدو أن النص المراد لصقه منسوخ من برنامج وورد. هل تود تنظيÙÙ‡ قبل الشروع ÙÙŠ عملية اللصق؟", -NotCompatiblePaste : "هذه الميزة تحتاج Ù„Ù…ØªØµÙØ­ من النوعInternet Explorer إصدار 5.5 Ùما Ùوق. هل تود اللصق دون تنظي٠الكود؟", -UnknownToolbarItem : "عنصر شريط أدوات غير معرو٠\"%1\"", -UnknownCommand : "أمر غير معرو٠\"%1\"", -NotImplemented : "لم يتم دعم هذا الأمر", -UnknownToolbarSet : "لم أتمكن من العثور على طقم الأدوات \"%1\" ", -NoActiveX : "لتأمين Ù…ØªØµÙØ­Ùƒ يجب أن تحدد بعض مميزات المحرر. يتوجب عليك تمكين الخيار \"Run ActiveX controls and plug-ins\". قد تواجة أخطاء وتلاحظ مميزات Ù…Ùقودة", -BrowseServerBlocked : "لايمكن ÙØªØ­ مصدر Ø§Ù„Ù…ØªØµÙØ­. ÙØ¶Ù„ا يجب التأكد بأن جميع موانع Ø§Ù„Ù†ÙˆØ§ÙØ° المنبثقة معطلة", -DialogBlocked : "لايمكن ÙØªØ­ Ù†Ø§ÙØ°Ø© الحوار . ÙØ¶Ù„ا تأكد من أن مانع Ø§Ù„Ù†ÙˆØ§ÙØ° المنبثة معطل .", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "مواÙÙ‚", -DlgBtnCancel : "إلغاء الأمر", -DlgBtnClose : "إغلاق", -DlgBtnBrowseServer : "ØªØµÙØ­ الخادم", -DlgAdvancedTag : "متقدم", -DlgOpOther : "<أخرى>", -DlgInfoTab : "معلومات", -DlgAlertUrl : "الرجاء كتابة عنوان الإنترنت", - -// General Dialogs Labels -DlgGenNotSet : "<بدون تحديد>", -DlgGenId : "الرقم", -DlgGenLangDir : "إتجاه النص", -DlgGenLangDirLtr : "اليسار لليمين (LTR)", -DlgGenLangDirRtl : "اليمين لليسار (RTL)", -DlgGenLangCode : "رمز اللغة", -DlgGenAccessKey : "Ù…ÙØ§ØªÙŠØ­ الإختصار", -DlgGenName : "الاسم", -DlgGenTabIndex : "الترتيب", -DlgGenLongDescr : "عنوان Ø§Ù„ÙˆØµÙ Ø§Ù„Ù…ÙØµÙ‘Ù„", -DlgGenClass : "ÙØ¦Ø§Øª التنسيق", -DlgGenTitle : "تلميح الشاشة", -DlgGenContType : "نوع التلميح", -DlgGenLinkCharset : "ترميز المادة المطلوبة", -DlgGenStyle : "نمط", - -// Image Dialog -DlgImgTitle : "خصائص الصورة", -DlgImgInfoTab : "معلومات الصورة", -DlgImgBtnUpload : "أرسلها للخادم", -DlgImgURL : "موقع الصورة", -DlgImgUpload : "Ø±ÙØ¹", -DlgImgAlt : "الوصÙ", -DlgImgWidth : "العرض", -DlgImgHeight : "Ø§Ù„Ø¥Ø±ØªÙØ§Ø¹", -DlgImgLockRatio : "تناسق الحجم", -DlgBtnResetSize : "إستعادة الحجم الأصلي", -DlgImgBorder : "سمك الحدود", -DlgImgHSpace : "تباعد Ø£Ùقي", -DlgImgVSpace : "تباعد عمودي", -DlgImgAlign : "محاذاة", -DlgImgAlignLeft : "يسار", -DlgImgAlignAbsBottom: "أسÙÙ„ النص", -DlgImgAlignAbsMiddle: "وسط السطر", -DlgImgAlignBaseline : "على السطر", -DlgImgAlignBottom : "أسÙÙ„", -DlgImgAlignMiddle : "وسط", -DlgImgAlignRight : "يمين", -DlgImgAlignTextTop : "أعلى النص", -DlgImgAlignTop : "أعلى", -DlgImgPreview : "معاينة", -DlgImgAlertUrl : "ÙØ¶Ù„اً أكتب الموقع الذي توجد عليه هذه الصورة.", -DlgImgLinkTab : "الرابط", - -// Flash Dialog -DlgFlashTitle : "خصائص Ùيلم الÙلاش", -DlgFlashChkPlay : "تشغيل تلقائي", -DlgFlashChkLoop : "تكرار", -DlgFlashChkMenu : "تمكين قائمة Ùيلم الÙلاش", -DlgFlashScale : "الحجم", -DlgFlashScaleAll : "إظهار الكل", -DlgFlashScaleNoBorder : "بلا حدود", -DlgFlashScaleFit : "ضبط تام", - -// Link Dialog -DlgLnkWindowTitle : "إرتباط تشعبي", -DlgLnkInfoTab : "معلومات الرابط", -DlgLnkTargetTab : "الهدÙ", - -DlgLnkType : "نوع الربط", -DlgLnkTypeURL : "العنوان", -DlgLnkTypeAnchor : "مكان ÙÙŠ هذا المستند", -DlgLnkTypeEMail : "بريد إلكتروني", -DlgLnkProto : "البروتوكول", -DlgLnkProtoOther : "<أخرى>", -DlgLnkURL : "الموقع", -DlgLnkAnchorSel : "اختر علامة مرجعية", -DlgLnkAnchorByName : "حسب اسم العلامة", -DlgLnkAnchorById : "حسب تعري٠العنصر", -DlgLnkNoAnchors : "(لا يوجد علامات مرجعية ÙÙŠ هذا المستند)", -DlgLnkEMail : "عنوان بريد إلكتروني", -DlgLnkEMailSubject : "موضوع الرسالة", -DlgLnkEMailBody : "محتوى الرسالة", -DlgLnkUpload : "Ø±ÙØ¹", -DlgLnkBtnUpload : "أرسلها للخادم", - -DlgLnkTarget : "الهدÙ", -DlgLnkTargetFrame : "<إطار>", -DlgLnkTargetPopup : "<Ù†Ø§ÙØ°Ø© منبثقة>", -DlgLnkTargetBlank : "إطار جديد (_blank)", -DlgLnkTargetParent : "الإطار الأصل (_parent)", -DlgLnkTargetSelf : "Ù†ÙØ³ الإطار (_self)", -DlgLnkTargetTop : "ØµÙØ­Ø© كاملة (_top)", -DlgLnkTargetFrameName : "اسم الإطار الهدÙ", -DlgLnkPopWinName : "تسمية Ø§Ù„Ù†Ø§ÙØ°Ø© المنبثقة", -DlgLnkPopWinFeat : "خصائص Ø§Ù„Ù†Ø§ÙØ°Ø© المنبثقة", -DlgLnkPopResize : "قابلة للتحجيم", -DlgLnkPopLocation : "شريط العنوان", -DlgLnkPopMenu : "القوائم الرئيسية", -DlgLnkPopScroll : "أشرطة التمرير", -DlgLnkPopStatus : "شريط الحالة السÙلي", -DlgLnkPopToolbar : "شريط الأدوات", -DlgLnkPopFullScrn : "ملئ الشاشة (IE)", -DlgLnkPopDependent : "تابع (Netscape)", -DlgLnkPopWidth : "العرض", -DlgLnkPopHeight : "Ø§Ù„Ø¥Ø±ØªÙØ§Ø¹", -DlgLnkPopLeft : "التمركز لليسار", -DlgLnkPopTop : "التمركز للأعلى", - -DlnLnkMsgNoUrl : "ÙØ¶Ù„اً أدخل عنوان الموقع الذي يشير إليه الرابط", -DlnLnkMsgNoEMail : "ÙØ¶Ù„اً أدخل عنوان البريد الإلكتروني", -DlnLnkMsgNoAnchor : "ÙØ¶Ù„اً حدد العلامة المرجعية المرغوبة", -DlnLnkMsgInvPopName : "اسم Ø§Ù„Ù†Ø§ÙØ°Ø© المنبثقة يجب أن يبدأ بحر٠أبجدي دون Ù…Ø³Ø§ÙØ§Øª", - -// Color Dialog -DlgColorTitle : "اختر لوناً", -DlgColorBtnClear : "مسح", -DlgColorHighlight : "تحديد", -DlgColorSelected : "إختيار", - -// Smiley Dialog -DlgSmileyTitle : "إدراج إبتسامات ", - -// Special Character Dialog -DlgSpecialCharTitle : "إدراج رمز", - -// Table Dialog -DlgTableTitle : "إدراج جدول", -DlgTableRows : "صÙÙˆÙ", -DlgTableColumns : "أعمدة", -DlgTableBorder : "سمك الحدود", -DlgTableAlign : "المحاذاة", -DlgTableAlignNotSet : "<بدون تحديد>", -DlgTableAlignLeft : "يسار", -DlgTableAlignCenter : "وسط", -DlgTableAlignRight : "يمين", -DlgTableWidth : "العرض", -DlgTableWidthPx : "بكسل", -DlgTableWidthPc : "بالمئة", -DlgTableHeight : "Ø§Ù„Ø¥Ø±ØªÙØ§Ø¹", -DlgTableCellSpace : "تباعد الخلايا", -DlgTableCellPad : "Ø§Ù„Ù…Ø³Ø§ÙØ© البادئة", -DlgTableCaption : "الوصÙ", -DlgTableSummary : "الخلاصة", - -// Table Cell Dialog -DlgCellTitle : "خصائص الخلية", -DlgCellWidth : "العرض", -DlgCellWidthPx : "بكسل", -DlgCellWidthPc : "بالمئة", -DlgCellHeight : "Ø§Ù„Ø¥Ø±ØªÙØ§Ø¹", -DlgCellWordWrap : "Ø§Ù„ØªÙØ§Ù النص", -DlgCellWordWrapNotSet : "<بدون تحديد>", -DlgCellWordWrapYes : "نعم", -DlgCellWordWrapNo : "لا", -DlgCellHorAlign : "المحاذاة الأÙقية", -DlgCellHorAlignNotSet : "<بدون تحديد>", -DlgCellHorAlignLeft : "يسار", -DlgCellHorAlignCenter : "وسط", -DlgCellHorAlignRight: "يمين", -DlgCellVerAlign : "المحاذاة العمودية", -DlgCellVerAlignNotSet : "<بدون تحديد>", -DlgCellVerAlignTop : "أعلى", -DlgCellVerAlignMiddle : "وسط", -DlgCellVerAlignBottom : "أسÙÙ„", -DlgCellVerAlignBaseline : "على السطر", -DlgCellRowSpan : "إمتداد الصÙÙˆÙ", -DlgCellCollSpan : "إمتداد الأعمدة", -DlgCellBackColor : "لون الخلÙية", -DlgCellBorderColor : "لون الحدود", -DlgCellBtnSelect : "حدّد...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "بحث واستبدال", - -// Find Dialog -DlgFindTitle : "بحث", -DlgFindFindBtn : "ابحث", -DlgFindNotFoundMsg : "لم يتم العثور على النص المحدد.", - -// Replace Dialog -DlgReplaceTitle : "إستبدال", -DlgReplaceFindLbl : "البحث عن:", -DlgReplaceReplaceLbl : "إستبدال بـ:", -DlgReplaceCaseChk : "مطابقة حالة الأحرÙ", -DlgReplaceReplaceBtn : "إستبدال", -DlgReplaceReplAllBtn : "إستبدال الكل", -DlgReplaceWordChk : "الكلمة بالكامل Ùقط", - -// Paste Operations / Dialog -PasteErrorCut : "الإعدادات الأمنية Ù„Ù„Ù…ØªØµÙØ­ الذي تستخدمه تمنع القص التلقائي. ÙØ¶Ù„اً إستخدم لوحة Ø§Ù„Ù…ÙØ§ØªÙŠØ­ Ù„ÙØ¹Ù„ ذلك (Ctrl+X).", -PasteErrorCopy : "الإعدادات الأمنية Ù„Ù„Ù…ØªØµÙØ­ الذي تستخدمه تمنع النسخ التلقائي. ÙØ¶Ù„اً إستخدم لوحة Ø§Ù„Ù…ÙØ§ØªÙŠØ­ Ù„ÙØ¹Ù„ ذلك (Ctrl+C).", - -PasteAsText : "لصق كنص بسيط", -PasteFromWord : "لصق من وورد", - -DlgPasteMsg2 : "الصق داخل الصندوق بإستخدام زرّي (Ctrl+V) ÙÙŠ لوحة Ø§Ù„Ù…ÙØ§ØªÙŠØ­ØŒ ثم اضغط زر مواÙÙ‚.", -DlgPasteSec : "نظراً لإعدادات الأمان الخاصة Ø¨Ù…ØªØµÙØ­ÙƒØŒ لن يتمكن هذا المحرر من الوصول لمحتوى Ø­Ø§ÙØ¸ØªÙƒØŒ لذا وجب عليك لصق المحتوى مرة أخرى ÙÙŠ هذه Ø§Ù„Ù†Ø§ÙØ°Ø©.", -DlgPasteIgnoreFont : "تجاهل ØªØ¹Ø±ÙŠÙØ§Øª أسماء الخطوط", -DlgPasteRemoveStyles : "إزالة ØªØ¹Ø±ÙŠÙØ§Øª الأنماط", - -// Color Picker -ColorAutomatic : "تلقائي", -ColorMoreColors : "ألوان إضاÙية...", - -// Document Properties -DocProps : "خصائص Ø§Ù„ØµÙØ­Ø©", - -// Anchor Dialog -DlgAnchorTitle : "خصائص إشارة مرجعية", -DlgAnchorName : "اسم الإشارة المرجعية", -DlgAnchorErrorName : "الرجاء كتابة اسم الإشارة المرجعية", - -// Speller Pages Dialog -DlgSpellNotInDic : "ليست ÙÙŠ القاموس", -DlgSpellChangeTo : "التغيير إلى", -DlgSpellBtnIgnore : "تجاهل", -DlgSpellBtnIgnoreAll : "تجاهل الكل", -DlgSpellBtnReplace : "تغيير", -DlgSpellBtnReplaceAll : "تغيير الكل", -DlgSpellBtnUndo : "تراجع", -DlgSpellNoSuggestions : "- لا توجد إقتراحات -", -DlgSpellProgress : "جاري التدقيق إملائياً", -DlgSpellNoMispell : "تم إكمال التدقيق الإملائي: لم يتم العثور على أي أخطاء إملائية", -DlgSpellNoChanges : "تم إكمال التدقيق الإملائي: لم يتم تغيير أي كلمة", -DlgSpellOneChange : "تم إكمال التدقيق الإملائي: تم تغيير كلمة واحدة Ùقط", -DlgSpellManyChanges : "تم إكمال التدقيق الإملائي: تم تغيير %1 كلمات\كلمة", - -IeSpellDownload : "المدقق الإملائي (الإنجليزي) غير مثبّت. هل تود تحميله الآن؟", - -// Button Dialog -DlgButtonText : "القيمة/التسمية", -DlgButtonType : "نوع الزر", -DlgButtonTypeBtn : "زر", -DlgButtonTypeSbm : "إرسال", -DlgButtonTypeRst : "إعادة تعيين", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "الاسم", -DlgCheckboxValue : "القيمة", -DlgCheckboxSelected : "محدد", - -// Form Dialog -DlgFormName : "الاسم", -DlgFormAction : "اسم الملÙ", -DlgFormMethod : "الأسلوب", - -// Select Field Dialog -DlgSelectName : "الاسم", -DlgSelectValue : "القيمة", -DlgSelectSize : "الحجم", -DlgSelectLines : "الأسطر", -DlgSelectChkMulti : "السماح بتحديدات متعددة", -DlgSelectOpAvail : "الخيارات المتاحة", -DlgSelectOpText : "النص", -DlgSelectOpValue : "القيمة", -DlgSelectBtnAdd : "Ø¥Ø¶Ø§ÙØ©", -DlgSelectBtnModify : "تعديل", -DlgSelectBtnUp : "تحريك لأعلى", -DlgSelectBtnDown : "تحريك لأسÙÙ„", -DlgSelectBtnSetValue : "إجعلها محددة", -DlgSelectBtnDelete : "إزالة", - -// Textarea Dialog -DlgTextareaName : "الاسم", -DlgTextareaCols : "الأعمدة", -DlgTextareaRows : "الصÙÙˆÙ", - -// Text Field Dialog -DlgTextName : "الاسم", -DlgTextValue : "القيمة", -DlgTextCharWidth : "العرض بالأحرÙ", -DlgTextMaxChars : "عدد الحرو٠الأقصى", -DlgTextType : "نوع المحتوى", -DlgTextTypeText : "نص", -DlgTextTypePass : "كلمة مرور", - -// Hidden Field Dialog -DlgHiddenName : "الاسم", -DlgHiddenValue : "القيمة", - -// Bulleted List Dialog -BulletedListProp : "خصائص التعداد النقطي", -NumberedListProp : "خصائص التعداد الرقمي", -DlgLstStart : "البدء عند", -DlgLstType : "النوع", -DlgLstTypeCircle : "دائرة", -DlgLstTypeDisc : "قرص", -DlgLstTypeSquare : "مربع", -DlgLstTypeNumbers : "أرقام (1ØŒ 2ØŒ 3)ÙŽ", -DlgLstTypeLCase : "حرو٠صغيرة (a, b, c)ÙŽ", -DlgLstTypeUCase : "حرو٠كبيرة (A, B, C)ÙŽ", -DlgLstTypeSRoman : "ترقيم روماني صغير (i, ii, iii)ÙŽ", -DlgLstTypeLRoman : "ترقيم روماني كبير (I, II, III)ÙŽ", - -// Document Properties Dialog -DlgDocGeneralTab : "عام", -DlgDocBackTab : "الخلÙية", -DlgDocColorsTab : "الألوان والهوامش", -DlgDocMetaTab : "Ø§Ù„Ù…Ø¹Ø±Ù‘ÙØ§Øª الرأسية", - -DlgDocPageTitle : "عنوان Ø§Ù„ØµÙØ­Ø©", -DlgDocLangDir : "إتجاه اللغة", -DlgDocLangDirLTR : "اليسار لليمين (LTR)", -DlgDocLangDirRTL : "اليمين لليسار (RTL)", -DlgDocLangCode : "رمز اللغة", -DlgDocCharSet : "ترميز الحروÙ", -DlgDocCharSetCE : "أوروبا الوسطى", -DlgDocCharSetCT : "الصينية التقليدية (Big5)", -DlgDocCharSetCR : "السيريلية", -DlgDocCharSetGR : "اليونانية", -DlgDocCharSetJP : "اليابانية", -DlgDocCharSetKR : "الكورية", -DlgDocCharSetTR : "التركية", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "أوروبا الغربية", -DlgDocCharSetOther : "ترميز آخر", - -DlgDocDocType : "ترويسة نوع Ø§Ù„ØµÙØ­Ø©", -DlgDocDocTypeOther : "ترويسة نوع ØµÙØ­Ø© أخرى", -DlgDocIncXHTML : "تضمين إعلانات†لغة XHTMLÙŽ", -DlgDocBgColor : "لون الخلÙية", -DlgDocBgImage : "رابط الصورة الخلÙية", -DlgDocBgNoScroll : "جعلها علامة مائية", -DlgDocCText : "النص", -DlgDocCLink : "الروابط", -DlgDocCVisited : "المزارة", -DlgDocCActive : "النشطة", -DlgDocMargins : "هوامش Ø§Ù„ØµÙØ­Ø©", -DlgDocMaTop : "علوي", -DlgDocMaLeft : "أيسر", -DlgDocMaRight : "أيمن", -DlgDocMaBottom : "سÙلي", -DlgDocMeIndex : "الكلمات الأساسية (Ù…ÙØµÙˆÙ„Ø© بÙواصل)ÙŽ", -DlgDocMeDescr : "ÙˆØµÙ Ø§Ù„ØµÙØ­Ø©", -DlgDocMeAuthor : "الكاتب", -DlgDocMeCopy : "المالك", -DlgDocPreview : "معاينة", - -// Templates Dialog -Templates : "القوالب", -DlgTemplatesTitle : "قوالب المحتوى", -DlgTemplatesSelMsg : "اختر القالب الذي تود وضعه ÙÙŠ المحرر
    (سيتم Ùقدان المحتوى الحالي):", -DlgTemplatesLoading : "جاري تحميل قائمة القوالب، الرجاء الإنتظار...", -DlgTemplatesNoTpl : "(لم يتم تعري٠أي قالب)", -DlgTemplatesReplace : "استبدال المحتوى", - -// About Dialog -DlgAboutAboutTab : "نبذة", -DlgAboutBrowserInfoTab : "معلومات Ù…ØªØµÙØ­Ùƒ", -DlgAboutLicenseTab : "الترخيص", -DlgAboutVersion : "الإصدار", -DlgAboutInfo : "لمزيد من المعلومات ØªÙØ¶Ù„ بزيارة", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/bg.js b/fckeditor/editor/lang/bg.js deleted file mode 100644 index 6c6f8b1e..00000000 --- a/fckeditor/editor/lang/bg.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Bulgarian language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Скрий панела Ñ Ð¸Ð½Ñтрументите", -ToolbarExpand : "Покажи панела Ñ Ð¸Ð½Ñтрументите", - -// Toolbar Items and Context Menu -Save : "Запази", -NewPage : "Ðова Ñтраница", -Preview : "Предварителен изглед", -Cut : "Изрежи", -Copy : "Запамети", -Paste : "Вмъкни", -PasteText : "Вмъкни Ñамо текÑÑ‚", -PasteWord : "Вмъкни от MS Word", -Print : "Печат", -SelectAll : "Селектирай вÑичко", -RemoveFormat : "Изтрий форматирането", -InsertLinkLbl : "Връзка", -InsertLink : "Добави/Редактирай връзка", -RemoveLink : "Изтрий връзка", -VisitLink : "Open Link", //MISSING -Anchor : "Добави/Редактирай котва", -AnchorDelete : "Remove Anchor", //MISSING -InsertImageLbl : "Изображение", -InsertImage : "Добави/Редактирай изображение", -InsertFlashLbl : "Flash", -InsertFlash : "Добави/Редактиай Flash обект", -InsertTableLbl : "Таблица", -InsertTable : "Добави/Редактирай таблица", -InsertLineLbl : "ЛиниÑ", -InsertLine : "Вмъкни хоризонтална линиÑ", -InsertSpecialCharLbl: "Специален Ñимвол", -InsertSpecialChar : "Вмъкни Ñпециален Ñимвол", -InsertSmileyLbl : "УÑмивка", -InsertSmiley : "Добави уÑмивка", -About : "За FCKeditor", -Bold : "Удебелен", -Italic : "КурÑив", -Underline : "Подчертан", -StrikeThrough : "Зачертан", -Subscript : "Ð˜Ð½Ð´ÐµÐºÑ Ð·Ð° база", -Superscript : "Ð˜Ð½Ð´ÐµÐºÑ Ð·Ð° Ñтепен", -LeftJustify : "ПодравнÑване в лÑво", -CenterJustify : "ПодравнÑвне в Ñредата", -RightJustify : "ПодравнÑване в дÑÑно", -BlockJustify : "ДвуÑтранно подравнÑване", -DecreaseIndent : "Ðамали отÑтъпа", -IncreaseIndent : "Увеличи отÑтъпа", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "Отмени", -Redo : "Повтори", -NumberedListLbl : "Ðумериран ÑпиÑък", -NumberedList : "Добави/Изтрий нумериран ÑпиÑък", -BulletedListLbl : "Ðенумериран ÑпиÑък", -BulletedList : "Добави/Изтрий ненумериран ÑпиÑък", -ShowTableBorders : "Покажи рамките на таблицата", -ShowDetails : "Покажи подробноÑти", -Style : "Стил", -FontFormat : "Формат", -Font : "Шрифт", -FontSize : "Размер", -TextColor : "ЦвÑÑ‚ на текÑта", -BGColor : "ЦвÑÑ‚ на фона", -Source : "Код", -Find : "ТърÑи", -Replace : "ЗамеÑти", -SpellCheck : "Провери правопиÑа", -UniversalKeyboard : "УниверÑална клавиатура", -PageBreakLbl : "Ðов ред", -PageBreak : "Вмъкни нов ред", - -Form : "ФормулÑÑ€", -Checkbox : "Поле за отметка", -RadioButton : "Поле за опциÑ", -TextField : "ТекÑтово поле", -Textarea : "ТекÑтова облаÑÑ‚", -HiddenField : "Скрито поле", -Button : "Бутон", -SelectionField : "Падащо меню Ñ Ð¾Ð¿Ñ†Ð¸Ð¸", -ImageButton : "Бутон-изображение", - -FitWindow : "Maximize the editor size", //MISSING -ShowBlocks : "Show Blocks", //MISSING - -// Context Menu -EditLink : "Редактирай връзка", -CellCM : "Cell", //MISSING -RowCM : "Row", //MISSING -ColumnCM : "Column", //MISSING -InsertRowAfter : "Insert Row After", //MISSING -InsertRowBefore : "Insert Row Before", //MISSING -DeleteRows : "Изтрий редовете", -InsertColumnAfter : "Insert Column After", //MISSING -InsertColumnBefore : "Insert Column Before", //MISSING -DeleteColumns : "Изтрий колоните", -InsertCellAfter : "Insert Cell After", //MISSING -InsertCellBefore : "Insert Cell Before", //MISSING -DeleteCells : "Изтрий клетките", -MergeCells : "Обедини клетките", -MergeRight : "Merge Right", //MISSING -MergeDown : "Merge Down", //MISSING -HorizontalSplitCell : "Split Cell Horizontally", //MISSING -VerticalSplitCell : "Split Cell Vertically", //MISSING -TableDelete : "Изтрий таблицата", -CellProperties : "Параметри на клетката", -TableProperties : "Параметри на таблицата", -ImageProperties : "Параметри на изображението", -FlashProperties : "Параметри на Flash обекта", - -AnchorProp : "Параметри на котвата", -ButtonProp : "Параметри на бутона", -CheckboxProp : "Параметри на полето за отметка", -HiddenFieldProp : "Параметри на Ñкритото поле", -RadioButtonProp : "Параметри на полето за опциÑ", -ImageButtonProp : "Параметри на бутона-изображение", -TextFieldProp : "Параметри на текÑтовото-поле", -SelectionFieldProp : "Параметри на падащото меню Ñ Ð¾Ð¿Ñ†Ð¸Ð¸", -TextareaProp : "Параметри на текÑтовата облаÑÑ‚", -FormProp : "Параметри на формулÑра", - -FontFormats : "Ðормален;Форматиран;ÐдреÑ;Заглавие 1;Заглавие 2;Заглавие 3;Заглавие 4;Заглавие 5;Заглавие 6;Параграф (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Обработка на XHTML. ÐœÐ¾Ð»Ñ Ð¸Ð·Ñ‡Ð°ÐºÐ°Ð¹Ñ‚Ðµ...", -Done : "Готово", -PasteWordConfirm : "ТекÑтът, който иÑкате да вмъкнете е копиран от MS Word. Желаете ли да бъде изчиÑтен преди вмъкването?", -NotCompatiblePaste : "Тази Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¸Ð·Ð¸Ñква MS Internet Explorer верÑÐ¸Ñ 5.5 или по-виÑока. Желаете ли да вмъкнете запаметеното без изчиÑтване?", -UnknownToolbarItem : "Ðепознат инÑтрумент \"%1\"", -UnknownCommand : "Ðепозната команда \"%1\"", -NotImplemented : "Командата не е имплементирана", -UnknownToolbarSet : "Панелът \"%1\" не ÑъщеÑтвува", -NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", //MISSING -BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", //MISSING -DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", //MISSING -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "ОК", -DlgBtnCancel : "Отказ", -DlgBtnClose : "Затвори", -DlgBtnBrowseServer : "Разгледай Ñървъра", -DlgAdvancedTag : "ПодробноÑти...", -DlgOpOther : "<Друго>", -DlgInfoTab : "ИнформациÑ", -DlgAlertUrl : "МолÑ, въведете Ð¿ÑŠÐ»Ð½Ð¸Ñ Ð¿ÑŠÑ‚ (URL)", - -// General Dialogs Labels -DlgGenNotSet : "<не е наÑтроен>", -DlgGenId : "Идентификатор", -DlgGenLangDir : "поÑока на речта", -DlgGenLangDirLtr : "От лÑво на дÑÑно", -DlgGenLangDirRtl : "От дÑÑно на лÑво", -DlgGenLangCode : "Код на езика", -DlgGenAccessKey : "Бърз клавиш", -DlgGenName : "Име", -DlgGenTabIndex : "Ред на доÑтъп", -DlgGenLongDescr : "ОпиÑание на връзката", -DlgGenClass : "ÐšÐ»Ð°Ñ Ð¾Ñ‚ Ñтиловите таблици", -DlgGenTitle : "Препоръчително заглавие", -DlgGenContType : "Препоръчителен тип на Ñъдържанието", -DlgGenLinkCharset : "Тип на ÑÐ²ÑŠÑ€Ð·Ð°Ð½Ð¸Ñ Ñ€ÐµÑурÑ", -DlgGenStyle : "Стил", - -// Image Dialog -DlgImgTitle : "Параметри на изображението", -DlgImgInfoTab : "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° изображението", -DlgImgBtnUpload : "Прати към Ñървъра", -DlgImgURL : "Пълен път (URL)", -DlgImgUpload : "Качи", -DlgImgAlt : "Ðлтернативен текÑÑ‚", -DlgImgWidth : "Ширина", -DlgImgHeight : "ВиÑочина", -DlgImgLockRatio : "Запази пропорциÑта", -DlgBtnResetSize : "ВъзÑтанови размера", -DlgImgBorder : "Рамка", -DlgImgHSpace : "Хоризонтален отÑтъп", -DlgImgVSpace : "Вертикален отÑтъп", -DlgImgAlign : "ПодравнÑване", -DlgImgAlignLeft : "ЛÑво", -DlgImgAlignAbsBottom: "Ðай-долу", -DlgImgAlignAbsMiddle: "Точно по Ñредата", -DlgImgAlignBaseline : "По базовата линиÑ", -DlgImgAlignBottom : "Долу", -DlgImgAlignMiddle : "По Ñредата", -DlgImgAlignRight : "ДÑÑно", -DlgImgAlignTextTop : "Върху текÑта", -DlgImgAlignTop : "Отгоре", -DlgImgPreview : "Изглед", -DlgImgAlertUrl : "МолÑ, въведете Ð¿ÑŠÐ»Ð½Ð¸Ñ Ð¿ÑŠÑ‚ до изображението", -DlgImgLinkTab : "Връзка", - -// Flash Dialog -DlgFlashTitle : "Параметри на Flash обекта", -DlgFlashChkPlay : "Ðвтоматично Ñтартиране", -DlgFlashChkLoop : "Ðово Ñтартиране Ñлед завършването", -DlgFlashChkMenu : "Разрешено Flash меню", -DlgFlashScale : "ОразмерÑване", -DlgFlashScaleAll : "Покажи Ñ†ÐµÐ»Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚", -DlgFlashScaleNoBorder : "Без рамка", -DlgFlashScaleFit : "Според мÑÑтото", - -// Link Dialog -DlgLnkWindowTitle : "Връзка", -DlgLnkInfoTab : "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° връзката", -DlgLnkTargetTab : "Цел", - -DlgLnkType : "Вид на връзката", -DlgLnkTypeURL : "Пълен път (URL)", -DlgLnkTypeAnchor : "Котва в текущата Ñтраница", -DlgLnkTypeEMail : "Е-поща", -DlgLnkProto : "Протокол", -DlgLnkProtoOther : "<друго>", -DlgLnkURL : "Пълен път (URL)", -DlgLnkAnchorSel : "Изберете котва", -DlgLnkAnchorByName : "По име на котвата", -DlgLnkAnchorById : "По идентификатор на елемент", -DlgLnkNoAnchors : "(ÐÑма котви в Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚)", -DlgLnkEMail : "ÐÐ´Ñ€ÐµÑ Ð·Ð° е-поща", -DlgLnkEMailSubject : "Тема на пиÑмото", -DlgLnkEMailBody : "ТекÑÑ‚ на пиÑмото", -DlgLnkUpload : "Качи", -DlgLnkBtnUpload : "Прати на Ñървъра", - -DlgLnkTarget : "Цел", -DlgLnkTargetFrame : "<рамка>", -DlgLnkTargetPopup : "<дъщерен прозорец>", -DlgLnkTargetBlank : "Ðов прозорец (_blank)", -DlgLnkTargetParent : "РодителÑки прозорец (_parent)", -DlgLnkTargetSelf : "ÐÐºÑ‚Ð¸Ð²Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ† (_self)", -DlgLnkTargetTop : "Ð¦ÐµÐ»Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ† (_top)", -DlgLnkTargetFrameName : "Име на Ñ†ÐµÐ»ÐµÐ²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†", -DlgLnkPopWinName : "Име на Ð´ÑŠÑ‰ÐµÑ€Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†", -DlgLnkPopWinFeat : "Параметри на Ð´ÑŠÑ‰ÐµÑ€Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†", -DlgLnkPopResize : "С променливи размери", -DlgLnkPopLocation : "Поле за адреÑ", -DlgLnkPopMenu : "Меню", -DlgLnkPopScroll : "Плъзгач", -DlgLnkPopStatus : "Поле за ÑтатуÑ", -DlgLnkPopToolbar : "Панел Ñ Ð±ÑƒÑ‚Ð¾Ð½Ð¸", -DlgLnkPopFullScrn : "ГолÑм екран (MS IE)", -DlgLnkPopDependent : "ЗавиÑим (Netscape)", -DlgLnkPopWidth : "Ширина", -DlgLnkPopHeight : "ВиÑочина", -DlgLnkPopLeft : "Координати - X", -DlgLnkPopTop : "Координати - Y", - -DlnLnkMsgNoUrl : "МолÑ, напишете Ð¿ÑŠÐ»Ð½Ð¸Ñ Ð¿ÑŠÑ‚ (URL)", -DlnLnkMsgNoEMail : "МолÑ, напишете адреÑа за е-поща", -DlnLnkMsgNoAnchor : "МолÑ, изберете котва", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", //MISSING - -// Color Dialog -DlgColorTitle : "Изберете цвÑÑ‚", -DlgColorBtnClear : "ИзчиÑти", -DlgColorHighlight : "Текущ", -DlgColorSelected : "Избран", - -// Smiley Dialog -DlgSmileyTitle : "Добави уÑмивка", - -// Special Character Dialog -DlgSpecialCharTitle : "Изберете Ñпециален Ñимвол", - -// Table Dialog -DlgTableTitle : "Параметри на таблицата", -DlgTableRows : "Редове", -DlgTableColumns : "Колони", -DlgTableBorder : "Размер на рамката", -DlgTableAlign : "ПодравнÑване", -DlgTableAlignNotSet : "<Ðе е избрано>", -DlgTableAlignLeft : "ЛÑво", -DlgTableAlignCenter : "Център", -DlgTableAlignRight : "ДÑÑно", -DlgTableWidth : "Ширина", -DlgTableWidthPx : "пикÑели", -DlgTableWidthPc : "проценти", -DlgTableHeight : "ВиÑочина", -DlgTableCellSpace : "РазÑтоÑние между клетките", -DlgTableCellPad : "ОтÑтъп на Ñъдържанието в клетките", -DlgTableCaption : "Заглавие", -DlgTableSummary : "Резюме", - -// Table Cell Dialog -DlgCellTitle : "Параметри на клетката", -DlgCellWidth : "Ширина", -DlgCellWidthPx : "пикÑели", -DlgCellWidthPc : "проценти", -DlgCellHeight : "ВиÑочина", -DlgCellWordWrap : "пренаÑÑне на нов ред", -DlgCellWordWrapNotSet : "<Ðе е наÑтроено>", -DlgCellWordWrapYes : "Да", -DlgCellWordWrapNo : "не", -DlgCellHorAlign : "Хоризонтално подравнÑване", -DlgCellHorAlignNotSet : "<Ðе е наÑтроено>", -DlgCellHorAlignLeft : "ЛÑво", -DlgCellHorAlignCenter : "Център", -DlgCellHorAlignRight: "ДÑÑно", -DlgCellVerAlign : "Вертикално подравнÑване", -DlgCellVerAlignNotSet : "<Ðе е наÑтроено>", -DlgCellVerAlignTop : "Горе", -DlgCellVerAlignMiddle : "По Ñредата", -DlgCellVerAlignBottom : "Долу", -DlgCellVerAlignBaseline : "По базовата линиÑ", -DlgCellRowSpan : "повече от един ред", -DlgCellCollSpan : "повече от една колона", -DlgCellBackColor : "фонов цвÑÑ‚", -DlgCellBorderColor : "цвÑÑ‚ на рамката", -DlgCellBtnSelect : "Изберете...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", //MISSING - -// Find Dialog -DlgFindTitle : "ТърÑи", -DlgFindFindBtn : "ТърÑи", -DlgFindNotFoundMsg : "Ð£ÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ñ‚ÐµÐºÑÑ‚ не беше намерен.", - -// Replace Dialog -DlgReplaceTitle : "ЗамеÑти", -DlgReplaceFindLbl : "ТърÑи:", -DlgReplaceReplaceLbl : "ЗамеÑти Ñ:", -DlgReplaceCaseChk : "Ð¡ÑŠÑ ÑÑŠÑ‰Ð¸Ñ Ñ€ÐµÐ³Ð¸Ñтър", -DlgReplaceReplaceBtn : "ЗамеÑти", -DlgReplaceReplAllBtn : "ЗамеÑти вÑички", -DlgReplaceWordChk : "ТърÑи Ñъщата дума", - -// Paste Operations / Dialog -PasteErrorCut : "ÐаÑтройките за ÑигурноÑÑ‚ на Ð²Ð°ÑˆÐ¸Ñ Ð±Ñ€Ð°Ð·ÑƒÑŠÑ€ не разрешават на редактора да изпълни изрÑзването. За целта използвайте клавиатурата (Ctrl+X).", -PasteErrorCopy : "ÐаÑтройките за ÑигурноÑÑ‚ на Ð²Ð°ÑˆÐ¸Ñ Ð±Ñ€Ð°Ð·ÑƒÑŠÑ€ не разрешават на редактора да изпълни запаметÑването. За целта използвайте клавиатурата (Ctrl+C).", - -PasteAsText : "Вмъкни като чиÑÑ‚ текÑÑ‚", -PasteFromWord : "Вмъкни от MS Word", - -DlgPasteMsg2 : "Вмъкнете тук Ñъдъжанието Ñ ÐºÐ»Ð°Ð²Ð¸Ð°Ñ‚ÑƒÐ°Ñ€Ð°Ñ‚Ð° (Ctrl+V) и натиÑнете OK.", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING -DlgPasteIgnoreFont : "Игнорирай шрифтовите дефиниции", -DlgPasteRemoveStyles : "Изтрий Ñтиловите дефиниции", - -// Color Picker -ColorAutomatic : "По подразбиране", -ColorMoreColors : "Други цветове...", - -// Document Properties -DocProps : "Параметри на документа", - -// Anchor Dialog -DlgAnchorTitle : "Параметри на котвата", -DlgAnchorName : "Име на котвата", -DlgAnchorErrorName : "МолÑ, въведете име на котвата", - -// Speller Pages Dialog -DlgSpellNotInDic : "ЛипÑва в речника", -DlgSpellChangeTo : "Промени на", -DlgSpellBtnIgnore : "Игнорирай", -DlgSpellBtnIgnoreAll : "Игнорирай вÑички", -DlgSpellBtnReplace : "ЗамеÑти", -DlgSpellBtnReplaceAll : "ЗамеÑти вÑички", -DlgSpellBtnUndo : "Отмени", -DlgSpellNoSuggestions : "- ÐÑма Ð¿Ñ€ÐµÐ´Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ -", -DlgSpellProgress : "Извършване на проверката за правопиÑ...", -DlgSpellNoMispell : "Проверката за Ð¿Ñ€Ð°Ð²Ð¾Ð¿Ð¸Ñ Ð·Ð°Ð²ÑŠÑ€ÑˆÐµÐ½Ð°: не Ñа открити правопиÑни грешки", -DlgSpellNoChanges : "Проверката за Ð¿Ñ€Ð°Ð²Ð¾Ð¿Ð¸Ñ Ð·Ð°Ð²ÑŠÑ€ÑˆÐµÐ½Ð°: нÑма променени думи", -DlgSpellOneChange : "Проверката за Ð¿Ñ€Ð°Ð²Ð¾Ð¿Ð¸Ñ Ð·Ð°Ð²ÑŠÑ€ÑˆÐµÐ½Ð°: една дума е променена", -DlgSpellManyChanges : "Проверката за Ð¿Ñ€Ð°Ð²Ð¾Ð¿Ð¸Ñ Ð·Ð°Ð²ÑŠÑ€ÑˆÐµÐ½Ð°: %1 думи Ñа променени", - -IeSpellDownload : "ИнÑтрументът за проверка на Ð¿Ñ€Ð°Ð²Ð¾Ð¿Ð¸Ñ Ð½Ðµ е инÑталиран. Желаете ли да го инÑталирате ?", - -// Button Dialog -DlgButtonText : "ТекÑÑ‚ (СтойноÑÑ‚)", -DlgButtonType : "Тип", -DlgButtonTypeBtn : "Button", //MISSING -DlgButtonTypeSbm : "Submit", //MISSING -DlgButtonTypeRst : "Reset", //MISSING - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Име", -DlgCheckboxValue : "СтойноÑÑ‚", -DlgCheckboxSelected : "Отметнато", - -// Form Dialog -DlgFormName : "Име", -DlgFormAction : "ДейÑтвие", -DlgFormMethod : "Метод", - -// Select Field Dialog -DlgSelectName : "Име", -DlgSelectValue : "СтойноÑÑ‚", -DlgSelectSize : "Размер", -DlgSelectLines : "линии", -DlgSelectChkMulti : "Разрешено множеÑтвено Ñелектиране", -DlgSelectOpAvail : "Възможни опции", -DlgSelectOpText : "ТекÑÑ‚", -DlgSelectOpValue : "СтойноÑÑ‚", -DlgSelectBtnAdd : "Добави", -DlgSelectBtnModify : "Промени", -DlgSelectBtnUp : "Ðагоре", -DlgSelectBtnDown : "Ðадолу", -DlgSelectBtnSetValue : "ÐаÑтрой като избрана ÑтойноÑÑ‚", -DlgSelectBtnDelete : "Изтрий", - -// Textarea Dialog -DlgTextareaName : "Име", -DlgTextareaCols : "Колони", -DlgTextareaRows : "Редове", - -// Text Field Dialog -DlgTextName : "Име", -DlgTextValue : "СтойноÑÑ‚", -DlgTextCharWidth : "Ширина на Ñимволите", -DlgTextMaxChars : "МакÑимум Ñимволи", -DlgTextType : "Тип", -DlgTextTypeText : "ТекÑÑ‚", -DlgTextTypePass : "Парола", - -// Hidden Field Dialog -DlgHiddenName : "Име", -DlgHiddenValue : "СтойноÑÑ‚", - -// Bulleted List Dialog -BulletedListProp : "Параметри на Ð½ÐµÐ½ÑƒÐ¼ÐµÑ€Ð¸Ñ€Ð°Ð½Ð¸Ñ ÑпиÑък", -NumberedListProp : "Параметри на Ð½ÑƒÐ¼ÐµÑ€Ð¸Ñ€Ð°Ð½Ð¸Ñ ÑпиÑък", -DlgLstStart : "Start", //MISSING -DlgLstType : "Тип", -DlgLstTypeCircle : "ОкръжноÑÑ‚", -DlgLstTypeDisc : "Кръг", -DlgLstTypeSquare : "Квадрат", -DlgLstTypeNumbers : "ЧиÑла (1, 2, 3)", -DlgLstTypeLCase : "Малки букви (a, b, c)", -DlgLstTypeUCase : "Големи букви (A, B, C)", -DlgLstTypeSRoman : "Малки римÑки чиÑла (i, ii, iii)", -DlgLstTypeLRoman : "Големи римÑки чиÑла (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Общи", -DlgDocBackTab : "Фон", -DlgDocColorsTab : "Цветове и отÑтъпи", -DlgDocMetaTab : "Мета данни", - -DlgDocPageTitle : "Заглавие на Ñтраницата", -DlgDocLangDir : "ПоÑока на речта", -DlgDocLangDirLTR : "От лÑво на дÑÑно", -DlgDocLangDirRTL : "От дÑÑно на лÑво", -DlgDocLangCode : "Код на езика", -DlgDocCharSet : "Кодиране на Ñимволите", -DlgDocCharSetCE : "Central European", //MISSING -DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING -DlgDocCharSetCR : "Cyrillic", //MISSING -DlgDocCharSetGR : "Greek", //MISSING -DlgDocCharSetJP : "Japanese", //MISSING -DlgDocCharSetKR : "Korean", //MISSING -DlgDocCharSetTR : "Turkish", //MISSING -DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING -DlgDocCharSetWE : "Western European", //MISSING -DlgDocCharSetOther : "Друго кодиране на Ñимволите", - -DlgDocDocType : "Тип на документа", -DlgDocDocTypeOther : "Друг тип на документа", -DlgDocIncXHTML : "Включи XHTML декларациÑ", -DlgDocBgColor : "ЦвÑÑ‚ на фона", -DlgDocBgImage : "Пълен път до фоновото изображение", -DlgDocBgNoScroll : "Ðе-повтарÑщо Ñе фоново изображение", -DlgDocCText : "ТекÑÑ‚", -DlgDocCLink : "Връзка", -DlgDocCVisited : "ПоÑетена връзка", -DlgDocCActive : "Ðктивна връзка", -DlgDocMargins : "ОтÑтъпи на Ñтраницата", -DlgDocMaTop : "Горе", -DlgDocMaLeft : "ЛÑво", -DlgDocMaRight : "ДÑÑно", -DlgDocMaBottom : "Долу", -DlgDocMeIndex : "Ключови думи за документа (разделени ÑÑŠÑ Ð·Ð°Ð¿ÐµÑ‚Ð°Ð¸)", -DlgDocMeDescr : "ОпиÑание на документа", -DlgDocMeAuthor : "Ðвтор", -DlgDocMeCopy : "ÐвторÑки права", -DlgDocPreview : "Изглед", - -// Templates Dialog -Templates : "Шаблони", -DlgTemplatesTitle : "Шаблони", -DlgTemplatesSelMsg : "Изберете шаблон
    (текущото Ñъдържание на редактора ще бъде загубено):", -DlgTemplatesLoading : "Зареждане на ÑпиÑъка Ñ ÑˆÐ°Ð±Ð»Ð¾Ð½Ð¸Ñ‚Ðµ. ÐœÐ¾Ð»Ñ Ð¸Ð·Ñ‡Ð°ÐºÐ°Ð¹Ñ‚Ðµ...", -DlgTemplatesNoTpl : "(ÐÑма дефинирани шаблони)", -DlgTemplatesReplace : "Replace actual contents", //MISSING - -// About Dialog -DlgAboutAboutTab : "За", -DlgAboutBrowserInfoTab : "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° браузъра", -DlgAboutLicenseTab : "License", //MISSING -DlgAboutVersion : "верÑиÑ", -DlgAboutInfo : "За повече Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¿Ð¾Ñетете", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/bn.js b/fckeditor/editor/lang/bn.js deleted file mode 100644 index 173182e2..00000000 --- a/fckeditor/editor/lang/bn.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Bengali/Bangla language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "টূলবার গà§à¦Ÿà¦¿à§Ÿà§‡ দাও", -ToolbarExpand : "টূলবার ছড়িয়ে দাও", - -// Toolbar Items and Context Menu -Save : "সংরকà§à¦·à¦¨ কর", -NewPage : "নতà§à¦¨ পেজ", -Preview : "পà§à¦°à¦¿à¦­à¦¿à¦‰", -Cut : "কাট", -Copy : "কপি", -Paste : "পেসà§à¦Ÿ", -PasteText : "পেসà§à¦Ÿ (সাদা টেকà§à¦¸à¦Ÿ)", -PasteWord : "পেসà§à¦Ÿ (শবà§à¦¦)", -Print : "পà§à¦°à¦¿à¦¨à§à¦Ÿ", -SelectAll : "সব সিলেকà§à¦Ÿ কর", -RemoveFormat : "ফরমেট সরাও", -InsertLinkLbl : "লিংকের যà§à¦•à§à¦¤ করার লেবেল", -InsertLink : "লিংক যà§à¦•à§à¦¤ কর", -RemoveLink : "লিংক সরাও", -VisitLink : "Open Link", //MISSING -Anchor : "নোঙà§à¦—র", -AnchorDelete : "Remove Anchor", //MISSING -InsertImageLbl : "ছবির লেবেল যà§à¦•à§à¦¤ কর", -InsertImage : "ছবি যà§à¦•à§à¦¤ কর", -InsertFlashLbl : "ফà§à¦²à¦¾à¦¶ লেবেল যà§à¦•à§à¦¤ কর", -InsertFlash : "ফà§à¦²à¦¾à¦¶ যà§à¦•à§à¦¤ কর", -InsertTableLbl : "টেবিলের লেবেল যà§à¦•à§à¦¤ কর", -InsertTable : "টেবিল যà§à¦•à§à¦¤ কর", -InsertLineLbl : "রেখা যà§à¦•à§à¦¤ কর", -InsertLine : "রেখা যà§à¦•à§à¦¤ কর", -InsertSpecialCharLbl: "বিশেষ অকà§à¦·à¦°à§‡à¦° লেবেল যà§à¦•à§à¦¤ কর", -InsertSpecialChar : "বিশেষ অকà§à¦·à¦° যà§à¦•à§à¦¤ কর", -InsertSmileyLbl : "সà§à¦®à¦¾à¦‡à¦²à§€", -InsertSmiley : "সà§à¦®à¦¾à¦‡à¦²à§€ যà§à¦•à§à¦¤ কর", -About : "FCKeditor কে বানিয়েছে", -Bold : "বোলà§à¦¡", -Italic : "ইটালিক", -Underline : "আনà§à¦¡à¦¾à¦°à¦²à¦¾à¦‡à¦¨", -StrikeThrough : "সà§à¦Ÿà§à¦°à¦¾à¦‡à¦• থà§à¦°à§", -Subscript : "অধোলেখ", -Superscript : "অভিলেখ", -LeftJustify : "বা দিকে ঘেà¦à¦·à¦¾", -CenterJustify : "মাঠবরাবর ঘেষা", -RightJustify : "ডান দিকে ঘেà¦à¦·à¦¾", -BlockJustify : "বà§à¦²à¦• জাসà§à¦Ÿà¦¿à¦«à¦¾à¦‡", -DecreaseIndent : "ইনডেনà§à¦Ÿ কমাও", -IncreaseIndent : "ইনডেনà§à¦Ÿ বাড়াও", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "আনডà§", -Redo : "রি-ডà§", -NumberedListLbl : "সাংখà§à¦¯à¦¿à¦• লিসà§à¦Ÿà§‡à¦° লেবেল", -NumberedList : "সাংখà§à¦¯à¦¿à¦• লিসà§à¦Ÿ", -BulletedListLbl : "বà§à¦²à§‡à¦Ÿ লিসà§à¦Ÿ লেবেল", -BulletedList : "বà§à¦²à§‡à¦Ÿà§‡à¦¡ লিসà§à¦Ÿ", -ShowTableBorders : "টেবিল বরà§à¦¡à¦¾à¦°", -ShowDetails : "সবটà§à¦•ৠদেখাও", -Style : "সà§à¦Ÿà¦¾à¦‡à¦²", -FontFormat : "ফনà§à¦Ÿ ফরমেট", -Font : "ফনà§à¦Ÿ", -FontSize : "সাইজ", -TextColor : "টেকà§à¦¸à§à¦Ÿ রং", -BGColor : "বেকগà§à¦°à¦¾à¦‰à¦¨à§à¦¡ রং", -Source : "সোরà§à¦¸", -Find : "খোজো", -Replace : "রিপà§à¦²à§‡à¦¸", -SpellCheck : "বানান চেক", -UniversalKeyboard : "সারà§à¦¬à¦œà¦¨à§€à¦¨ কিবোরà§à¦¡", -PageBreakLbl : "পেজ বà§à¦°à§‡à¦• লেবেল", -PageBreak : "পেজ বà§à¦°à§‡à¦•", - -Form : "ফরà§à¦®", -Checkbox : "চেক বাকà§à¦¸", -RadioButton : "রেডিও বাটন", -TextField : "টেকà§à¦¸à¦Ÿ ফীলà§à¦¡", -Textarea : "টেকà§à¦¸à¦Ÿ à¦à¦°à¦¿à§Ÿà¦¾", -HiddenField : "গà§à¦ªà§à¦¤ ফীলà§à¦¡", -Button : "বাটন", -SelectionField : "বাছাই ফীলà§à¦¡", -ImageButton : "ছবির বাটন", - -FitWindow : "উইনà§à¦¡à§‹ ফিট কর", -ShowBlocks : "Show Blocks", //MISSING - -// Context Menu -EditLink : "লিংক সমà§à¦ªà¦¾à¦¦à¦¨", -CellCM : "সেল", -RowCM : "রো", -ColumnCM : "কলাম", -InsertRowAfter : "Insert Row After", //MISSING -InsertRowBefore : "Insert Row Before", //MISSING -DeleteRows : "রো মà§à¦›à§‡ দাও", -InsertColumnAfter : "Insert Column After", //MISSING -InsertColumnBefore : "Insert Column Before", //MISSING -DeleteColumns : "কলাম মà§à¦›à§‡ দাও", -InsertCellAfter : "Insert Cell After", //MISSING -InsertCellBefore : "Insert Cell Before", //MISSING -DeleteCells : "সেল মà§à¦›à§‡ দাও", -MergeCells : "সেল জোড়া দাও", -MergeRight : "Merge Right", //MISSING -MergeDown : "Merge Down", //MISSING -HorizontalSplitCell : "Split Cell Horizontally", //MISSING -VerticalSplitCell : "Split Cell Vertically", //MISSING -TableDelete : "টেবিল ডিলীট কর", -CellProperties : "সেলের পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿à¦œ", -TableProperties : "টেবিল পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -ImageProperties : "ছবি পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -FlashProperties : "ফà§à¦²à¦¾à¦¶ পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", - -AnchorProp : "নোঙর পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -ButtonProp : "বাটন পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -CheckboxProp : "চেক বকà§à¦¸ পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -HiddenFieldProp : "গà§à¦ªà§à¦¤ ফীলà§à¦¡ পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -RadioButtonProp : "রেডিও বাটন পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -ImageButtonProp : "ছবি বাটন পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -TextFieldProp : "টেকà§à¦¸à¦Ÿ ফীলà§à¦¡ পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -SelectionFieldProp : "বাছাই ফীলà§à¦¡ পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -TextareaProp : "টেকà§à¦¸à¦Ÿ à¦à¦°à¦¿à§Ÿà¦¾ পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -FormProp : "ফরà§à¦® পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", - -FontFormats : "সাধারণ;ফরà§à¦®à§‡à¦Ÿà§‡à¦¡;ঠিকানা;শীরà§à¦·à¦• à§§;শীরà§à¦·à¦• ২;শীরà§à¦·à¦• à§©;শীরà§à¦·à¦• ৪;শীরà§à¦·à¦• à§«;শীরà§à¦·à¦• ৬;শীরà§à¦·à¦• (DIV)", - -// Alerts and Messages -ProcessingXHTML : "XHTML পà§à¦°à¦¸à§‡à¦¸ করা হচà§à¦›à§‡", -Done : "শেষ হয়েছে", -PasteWordConfirm : "যে টেকসà§à¦Ÿà¦Ÿà¦¿ আপনি পেসà§à¦Ÿ করতে চাচà§à¦›à§‡à¦¨ মনে হচà§à¦›à§‡ সেটি ওয়ারà§à¦¡ থেকে কপি করা। আপনি কি পেসà§à¦Ÿ করার আগে à¦à¦•ে পরিষà§à¦•ার করতে চান?", -NotCompatiblePaste : "à¦à¦‡ কমানà§à¦¡à¦Ÿà¦¿ শà§à¦§à§à¦®à¦¾à¦¤à§à¦° ইনà§à¦Ÿà¦¾à¦°à¦¨à§‡à¦Ÿ à¦à¦•à§à¦¸à¦ªà§à¦²à§‹à¦°à¦¾à¦° à§«.০ বা তার পরের ভারà§à¦¸à¦¨à§‡ পাওয়া সমà§à¦­à¦¬à¥¤ আপনি কি পরিষà§à¦•ার না করেই পেসà§à¦Ÿ করতে চান?", -UnknownToolbarItem : "অজানা টà§à¦²à¦¬à¦¾à¦° আইটেম \"%1\"", -UnknownCommand : "অজানা কমানà§à¦¡ \"%1\"", -NotImplemented : "কমানà§à¦¡ ইমপà§à¦²à¦¿à¦®à§‡à¦¨à§à¦Ÿ করা হয়নি", -UnknownToolbarSet : "টà§à¦²à¦¬à¦¾à¦° সেট \"%1\" à¦à¦° অসà§à¦¤à¦¿à¦¤à§à¦¬ নেই", -NoActiveX : "আপনার বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°à§‡à¦° সà§à¦°à¦•à§à¦·à¦¾ সেটিংস কারনে à¦à¦¡à¦¿à¦Ÿà¦°à§‡à¦° কিছৠফিচার পাওয়া নাও যেতে পারে। আপনাকে অবশà§à¦¯à¦‡ \"Run ActiveX controls and plug-ins\" à¦à¦¨à¦¾à¦¬à§‡à¦² করে নিতে হবে। আপনি ভà§à¦²à¦­à§à¦°à¦¾à¦¨à§à¦¤à¦¿ কিছৠকিছৠফিচারের অনà§à¦ªà¦¸à§à¦¥à¦¿à¦¤à¦¿ উপলবà§à¦§à¦¿ করতে পারেন।", -BrowseServerBlocked : "রিসোরà§à¦¸ বà§à¦°à¦¾à¦‰à¦œà¦¾à¦° খোলা গেল না। নিশà§à¦šà¦¿à¦¤ করà§à¦¨ যে সব পপআপ বà§à¦²à¦•ার বনà§à¦§ করা আছে।", -DialogBlocked : "ডায়ালগ ইউনà§à¦¡à§‹ খোলা গেল না। নিশà§à¦šà¦¿à¦¤ করà§à¦¨ যে সব পপআপ বà§à¦²à¦•ার বনà§à¦§ করা আছে।", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "ওকে", -DlgBtnCancel : "বাতিল", -DlgBtnClose : "বনà§à¦§ কর", -DlgBtnBrowseServer : "বà§à¦°à¦¾à¦‰à¦œ সারà§à¦­à¦¾à¦°", -DlgAdvancedTag : "à¦à¦¡à¦­à¦¾à¦¨à§à¦¸à¦¡", -DlgOpOther : "<অনà§à¦¯>", -DlgInfoTab : "তথà§à¦¯", -DlgAlertUrl : "দয়া করে URL যà§à¦•à§à¦¤ করà§à¦¨", - -// General Dialogs Labels -DlgGenNotSet : "<সেট নেই>", -DlgGenId : "আইডি", -DlgGenLangDir : "ভাষা লেখার দিক", -DlgGenLangDirLtr : "বাম থেকে ডান (LTR)", -DlgGenLangDirRtl : "ডান থেকে বাম (RTL)", -DlgGenLangCode : "ভাষা কোড", -DlgGenAccessKey : "à¦à¦•à§à¦¸à§‡à¦¸ কী", -DlgGenName : "নাম", -DlgGenTabIndex : "টà§à¦¯à¦¾à¦¬ ইনà§à¦¡à§‡à¦•à§à¦¸", -DlgGenLongDescr : "URL à¦à¦° লমà§à¦¬à¦¾ বরà§à¦£à¦¨à¦¾", -DlgGenClass : "সà§à¦Ÿà¦¾à¦‡à¦²-শীট কà§à¦²à¦¾à¦¸", -DlgGenTitle : "পরামরà§à¦¶ শীরà§à¦·à¦•", -DlgGenContType : "পরামরà§à¦¶ কনà§à¦Ÿà§‡à¦¨à§à¦Ÿà§‡à¦° পà§à¦°à¦•ার", -DlgGenLinkCharset : "লিংক রিসোরà§à¦¸ কà§à¦¯à¦¾à¦°à§‡à¦•à§à¦Ÿà¦° সেট", -DlgGenStyle : "সà§à¦Ÿà¦¾à¦‡à¦²", - -// Image Dialog -DlgImgTitle : "ছবির পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -DlgImgInfoTab : "ছবির তথà§à¦¯", -DlgImgBtnUpload : "ইহাকে সারà§à¦­à¦¾à¦°à§‡ পà§à¦°à§‡à¦°à¦¨ কর", -DlgImgURL : "URL", -DlgImgUpload : "আপলোড", -DlgImgAlt : "বিকলà§à¦ª টেকà§à¦¸à¦Ÿ", -DlgImgWidth : "পà§à¦°à¦¸à§à¦¥", -DlgImgHeight : "দৈরà§à¦˜à§à¦¯", -DlgImgLockRatio : "অনà§à¦ªà¦¾à¦¤ লক কর", -DlgBtnResetSize : "সাইজ পূরà§à¦¬à¦¾à¦¬à¦¸à§à¦¥à¦¾à§Ÿ ফিরিয়ে দাও", -DlgImgBorder : "বরà§à¦¡à¦¾à¦°", -DlgImgHSpace : "হরাইজনà§à¦Ÿà¦¾à¦² সà§à¦ªà§‡à¦¸", -DlgImgVSpace : "ভারà§à¦Ÿà¦¿à¦•েল সà§à¦ªà§‡à¦¸", -DlgImgAlign : "à¦à¦²à¦¾à¦‡à¦¨", -DlgImgAlignLeft : "বামে", -DlgImgAlignAbsBottom: "Abs নীচে", -DlgImgAlignAbsMiddle: "Abs উপর", -DlgImgAlignBaseline : "মূল রেখা", -DlgImgAlignBottom : "নীচে", -DlgImgAlignMiddle : "মধà§à¦¯", -DlgImgAlignRight : "ডানে", -DlgImgAlignTextTop : "টেকà§à¦¸à¦Ÿ উপর", -DlgImgAlignTop : "উপর", -DlgImgPreview : "পà§à¦°à§€à¦­à¦¿à¦‰", -DlgImgAlertUrl : "অনà§à¦—à§à¦°à¦¹à¦• করে ছবির URL টাইপ করà§à¦¨", -DlgImgLinkTab : "লিংক", - -// Flash Dialog -DlgFlashTitle : "ফà§à¦²à§à¦¯à¦¾à¦¶ পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -DlgFlashChkPlay : "অটো পà§à¦²à§‡", -DlgFlashChkLoop : "লূপ", -DlgFlashChkMenu : "ফà§à¦²à§à¦¯à¦¾à¦¶ মেনৠà¦à¦¨à¦¾à¦¬à¦² কর", -DlgFlashScale : "সà§à¦•েল", -DlgFlashScaleAll : "সব দেখাও", -DlgFlashScaleNoBorder : "কোনো বরà§à¦¡à¦¾à¦° নেই", -DlgFlashScaleFit : "নিখà§à¦à¦¤ ফিট", - -// Link Dialog -DlgLnkWindowTitle : "লিংক", -DlgLnkInfoTab : "লিংক তথà§à¦¯", -DlgLnkTargetTab : "টারà§à¦—েট", - -DlgLnkType : "লিংক পà§à¦°à¦•ার", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "à¦à¦‡ পেজে নোঙর কর", -DlgLnkTypeEMail : "ইমেইল", -DlgLnkProto : "পà§à¦°à§‹à¦Ÿà§‹à¦•ল", -DlgLnkProtoOther : "<অনà§à¦¯>", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "নোঙর বাছাই", -DlgLnkAnchorByName : "নোঙরের নাম দিয়ে", -DlgLnkAnchorById : "নোঙরের আইডি দিয়ে", -DlgLnkNoAnchors : "(No anchors available in the document)", //MISSING -DlgLnkEMail : "ইমেইল ঠিকানা", -DlgLnkEMailSubject : "মেসেজের বিষয়", -DlgLnkEMailBody : "মেসেজের দেহ", -DlgLnkUpload : "আপলোড", -DlgLnkBtnUpload : "à¦à¦•ে সারà§à¦­à¦¾à¦°à§‡ পাঠাও", - -DlgLnkTarget : "টারà§à¦—েট", -DlgLnkTargetFrame : "<ফà§à¦°à§‡à¦®>", -DlgLnkTargetPopup : "<পপআপ উইনà§à¦¡à§‹>", -DlgLnkTargetBlank : "নতà§à¦¨ উইনà§à¦¡à§‹ (_blank)", -DlgLnkTargetParent : "মূল উইনà§à¦¡à§‹ (_parent)", -DlgLnkTargetSelf : "à¦à¦‡ উইনà§à¦¡à§‹ (_self)", -DlgLnkTargetTop : "শীরà§à¦· উইনà§à¦¡à§‹ (_top)", -DlgLnkTargetFrameName : "টারà§à¦—েট ফà§à¦°à§‡à¦®à§‡à¦° নাম", -DlgLnkPopWinName : "পপআপ উইনà§à¦¡à§‹à¦° নাম", -DlgLnkPopWinFeat : "পপআপ উইনà§à¦¡à§‹ ফীচার সমূহ", -DlgLnkPopResize : "রিসাইজ করা সমà§à¦­à¦¬", -DlgLnkPopLocation : "লোকেশন বার", -DlgLnkPopMenu : "মেনà§à¦¯à§ বার", -DlgLnkPopScroll : "সà§à¦•à§à¦°à¦² বার", -DlgLnkPopStatus : "সà§à¦Ÿà§à¦¯à¦¾à¦Ÿà¦¾à¦¸ বার", -DlgLnkPopToolbar : "টà§à¦² বার", -DlgLnkPopFullScrn : "পূরà§à¦£ পরà§à¦¦à¦¾ জà§à§œà§‡ (IE)", -DlgLnkPopDependent : "ডিপেনà§à¦¡à§‡à¦¨à§à¦Ÿ (Netscape)", -DlgLnkPopWidth : "পà§à¦°à¦¸à§à¦¥", -DlgLnkPopHeight : "দৈরà§à¦˜à§à¦¯", -DlgLnkPopLeft : "বামের পজিশন", -DlgLnkPopTop : "ডানের পজিশন", - -DlnLnkMsgNoUrl : "অনà§à¦—à§à¦°à¦¹ করে URL লিংক টাইপ করà§à¦¨", -DlnLnkMsgNoEMail : "অনà§à¦—à§à¦°à¦¹ করে ইমেইল à¦à¦¡à§à¦°à§‡à¦¸ টাইপ করà§à¦¨", -DlnLnkMsgNoAnchor : "অনà§à¦—à§à¦°à¦¹ করে নোঙর বাছাই করà§à¦¨", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", //MISSING - -// Color Dialog -DlgColorTitle : "রং বাছাই কর", -DlgColorBtnClear : "পরিষà§à¦•ার কর", -DlgColorHighlight : "হাইলাইট", -DlgColorSelected : "সিলেকà§à¦Ÿà§‡à¦¡", - -// Smiley Dialog -DlgSmileyTitle : "সà§à¦®à¦¾à¦‡à¦²à§€ যà§à¦•à§à¦¤ কর", - -// Special Character Dialog -DlgSpecialCharTitle : "বিশেষ কà§à¦¯à¦¾à¦°à§‡à¦•à§à¦Ÿà¦¾à¦° বাছাই কর", - -// Table Dialog -DlgTableTitle : "টেবিল পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -DlgTableRows : "রো", -DlgTableColumns : "কলাম", -DlgTableBorder : "বরà§à¦¡à¦¾à¦° সাইজ", -DlgTableAlign : "à¦à¦²à¦¾à¦‡à¦¨à¦®à§‡à¦¨à§à¦Ÿ", -DlgTableAlignNotSet : "<সেট নেই>", -DlgTableAlignLeft : "বামে", -DlgTableAlignCenter : "মাà¦à¦–ানে", -DlgTableAlignRight : "ডানে", -DlgTableWidth : "পà§à¦°à¦¸à§à¦¥", -DlgTableWidthPx : "পিকà§à¦¸à§‡à¦²", -DlgTableWidthPc : "শতকরা", -DlgTableHeight : "দৈরà§à¦˜à§à¦¯", -DlgTableCellSpace : "সেল সà§à¦ªà§‡à¦¸", -DlgTableCellPad : "সেল পà§à¦¯à¦¾à¦¡à¦¿à¦‚", -DlgTableCaption : "শীরà§à¦·à¦•", -DlgTableSummary : "সারাংশ", - -// Table Cell Dialog -DlgCellTitle : "সেল পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -DlgCellWidth : "পà§à¦°à¦¸à§à¦¥", -DlgCellWidthPx : "পিকà§à¦¸à§‡à¦²", -DlgCellWidthPc : "শতকরা", -DlgCellHeight : "দৈরà§à¦˜à§à¦¯", -DlgCellWordWrap : "ওয়ারà§à¦¡ রেপ", -DlgCellWordWrapNotSet : "<সেট নেই>", -DlgCellWordWrapYes : "হাà¦", -DlgCellWordWrapNo : "না", -DlgCellHorAlign : "হরাইজনà§à¦Ÿà¦¾à¦² à¦à¦²à¦¾à¦‡à¦¨à¦®à§‡à¦¨à§à¦Ÿ", -DlgCellHorAlignNotSet : "<সেট নেই>", -DlgCellHorAlignLeft : "বামে", -DlgCellHorAlignCenter : "মাà¦à¦–ানে", -DlgCellHorAlignRight: "ডানে", -DlgCellVerAlign : "ভারà§à¦Ÿà¦¿à¦•à§à¦¯à¦¾à¦² à¦à¦²à¦¾à¦‡à¦¨à¦®à§‡à¦¨à§à¦Ÿ", -DlgCellVerAlignNotSet : "<সেট নেই>", -DlgCellVerAlignTop : "উপর", -DlgCellVerAlignMiddle : "মধà§à¦¯", -DlgCellVerAlignBottom : "নীচে", -DlgCellVerAlignBaseline : "মূলরেখা", -DlgCellRowSpan : "রো সà§à¦ªà§à¦¯à¦¾à¦¨", -DlgCellCollSpan : "কলাম সà§à¦ªà§à¦¯à¦¾à¦¨", -DlgCellBackColor : "বà§à¦¯à¦¾à¦•গà§à¦°à¦¾à¦‰à¦¨à§à¦¡ রং", -DlgCellBorderColor : "বরà§à¦¡à¦¾à¦°à§‡à¦° রং", -DlgCellBtnSelect : "বাছাই কর", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", //MISSING - -// Find Dialog -DlgFindTitle : "খোà¦à¦œà§‹", -DlgFindFindBtn : "খোà¦à¦œà§‹", -DlgFindNotFoundMsg : "আপনার উলà§à¦²à§‡à¦–িত টেকসà§à¦Ÿ পাওয়া যায়নি", - -// Replace Dialog -DlgReplaceTitle : "বদলে দাও", -DlgReplaceFindLbl : "যা খà§à¦à¦œà¦¤à§‡ হবে:", -DlgReplaceReplaceLbl : "যার সাথে বদলাতে হবে:", -DlgReplaceCaseChk : "কেস মিলাও", -DlgReplaceReplaceBtn : "বদলে দাও", -DlgReplaceReplAllBtn : "সব বদলে দাও", -DlgReplaceWordChk : "পà§à¦°à¦¾ শবà§à¦¦ মেলাও", - -// Paste Operations / Dialog -PasteErrorCut : "আপনার বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°à§‡à¦° সà§à¦°à¦•à§à¦·à¦¾ সেটিংস à¦à¦¡à¦¿à¦Ÿà¦°à¦•ে অটোমেটিক কাট করার অনà§à¦®à¦¤à¦¿ দেয়নি। দয়া করে à¦à¦‡ কাজের জনà§à¦¯ কিবোরà§à¦¡ বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨ (Ctrl+X)।", -PasteErrorCopy : "আপনার বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°à§‡à¦° সà§à¦°à¦•à§à¦·à¦¾ সেটিংস à¦à¦¡à¦¿à¦Ÿà¦°à¦•ে অটোমেটিক কপি করার অনà§à¦®à¦¤à¦¿ দেয়নি। দয়া করে à¦à¦‡ কাজের জনà§à¦¯ কিবোরà§à¦¡ বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨ (Ctrl+C)।", - -PasteAsText : "সাদা টেকà§à¦¸à¦Ÿ হিসেবে পেসà§à¦Ÿ কর", -PasteFromWord : "ওয়ারà§à¦¡ থেকে পেসà§à¦Ÿ কর", - -DlgPasteMsg2 : "অনà§à¦—à§à¦°à¦¹ করে নীচের বাকà§à¦¸à§‡ কিবোরà§à¦¡ বà§à¦¯à¦¬à¦¹à¦¾à¦° করে (Ctrl+V) পেসà§à¦Ÿ করà§à¦¨ à¦à¦¬à¦‚ OK চাপ দিন", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING -DlgPasteIgnoreFont : "ফনà§à¦Ÿ ফেস ডেফিনেশন ইগনোর করà§à¦¨", -DlgPasteRemoveStyles : "সà§à¦Ÿà¦¾à¦‡à¦² ডেফিনেশন সরিয়ে দিন", - -// Color Picker -ColorAutomatic : "অটোমেটিক", -ColorMoreColors : "আরও রং...", - -// Document Properties -DocProps : "ডকà§à¦¯à§à¦®à§‡à¦¨à§à¦Ÿ পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", - -// Anchor Dialog -DlgAnchorTitle : "নোঙরের পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -DlgAnchorName : "নোঙরের নাম", -DlgAnchorErrorName : "নোঙরের নাম টাইপ করà§à¦¨", - -// Speller Pages Dialog -DlgSpellNotInDic : "শবà§à¦¦à¦•োষে নেই", -DlgSpellChangeTo : "à¦à¦¤à§‡ বদলাও", -DlgSpellBtnIgnore : "ইগনোর কর", -DlgSpellBtnIgnoreAll : "সব ইগনোর কর", -DlgSpellBtnReplace : "বদলে দাও", -DlgSpellBtnReplaceAll : "সব বদলে দাও", -DlgSpellBtnUndo : "আনà§à¦¡à§", -DlgSpellNoSuggestions : "- কোন সাজেশন নেই -", -DlgSpellProgress : "বানান পরীকà§à¦·à¦¾ চলছে...", -DlgSpellNoMispell : "বানান পরীকà§à¦·à¦¾ শেষ: কোন ভà§à¦² বানান পাওয়া যায়নি", -DlgSpellNoChanges : "বানান পরীকà§à¦·à¦¾ শেষ: কোন শবà§à¦¦ পরিবরà§à¦¤à¦¨ করা হয়নি", -DlgSpellOneChange : "বানান পরীকà§à¦·à¦¾ শেষ: à¦à¦•টি মাতà§à¦° শবà§à¦¦ পরিবরà§à¦¤à¦¨ করা হয়েছে", -DlgSpellManyChanges : "বানান পরীকà§à¦·à¦¾ শেষ: %1 গà§à¦²à§‹ শবà§à¦¦ বদলে গà§à¦¯à¦¾à¦›à§‡", - -IeSpellDownload : "বানান পরীকà§à¦·à¦• ইনসà§à¦Ÿà¦² করা নেই। আপনি কি à¦à¦–নই à¦à¦Ÿà¦¾ ডাউনলোড করতে চান?", - -// Button Dialog -DlgButtonText : "টেকà§à¦¸à¦Ÿ (ভà§à¦¯à¦¾à¦²à§)", -DlgButtonType : "পà§à¦°à¦•ার", -DlgButtonTypeBtn : "Button", //MISSING -DlgButtonTypeSbm : "Submit", //MISSING -DlgButtonTypeRst : "Reset", //MISSING - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "নাম", -DlgCheckboxValue : "ভà§à¦¯à¦¾à¦²à§", -DlgCheckboxSelected : "সিলেকà§à¦Ÿà§‡à¦¡", - -// Form Dialog -DlgFormName : "নাম", -DlgFormAction : "à¦à¦•শà§à¦¯à¦¨", -DlgFormMethod : "পদà§à¦§à¦¤à¦¿", - -// Select Field Dialog -DlgSelectName : "নাম", -DlgSelectValue : "ভà§à¦¯à¦¾à¦²à§", -DlgSelectSize : "সাইজ", -DlgSelectLines : "লাইন সমূহ", -DlgSelectChkMulti : "à¦à¦•াধিক সিলেকশন à¦à¦²à¦¾à¦‰ কর", -DlgSelectOpAvail : "অনà§à¦¯à¦¾à¦¨à§à¦¯ বিকলà§à¦ª", -DlgSelectOpText : "টেকà§à¦¸à¦Ÿ", -DlgSelectOpValue : "ভà§à¦¯à¦¾à¦²à§", -DlgSelectBtnAdd : "যà§à¦•à§à¦¤", -DlgSelectBtnModify : "বদলে দাও", -DlgSelectBtnUp : "উপর", -DlgSelectBtnDown : "নীচে", -DlgSelectBtnSetValue : "বাছাই করা ভà§à¦¯à¦¾à¦²à§ হিসেবে সেট কর", -DlgSelectBtnDelete : "ডিলীট", - -// Textarea Dialog -DlgTextareaName : "নাম", -DlgTextareaCols : "কলাম", -DlgTextareaRows : "রো", - -// Text Field Dialog -DlgTextName : "নাম", -DlgTextValue : "ভà§à¦¯à¦¾à¦²à§", -DlgTextCharWidth : "কà§à¦¯à¦¾à¦°à§‡à¦•à§à¦Ÿà¦¾à¦° পà§à¦°à¦¶à¦¸à§à¦¤à¦¤à¦¾", -DlgTextMaxChars : "সরà§à¦¬à¦¾à¦§à¦¿à¦• কà§à¦¯à¦¾à¦°à§‡à¦•à§à¦Ÿà¦¾à¦°", -DlgTextType : "টাইপ", -DlgTextTypeText : "টেকà§à¦¸à¦Ÿ", -DlgTextTypePass : "পাসওয়ারà§à¦¡", - -// Hidden Field Dialog -DlgHiddenName : "নাম", -DlgHiddenValue : "ভà§à¦¯à¦¾à¦²à§", - -// Bulleted List Dialog -BulletedListProp : "বà§à¦²à§‡à¦Ÿà§‡à¦¡ সূচী পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -NumberedListProp : "সাংখà§à¦¯à¦¿à¦• সূচী পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿", -DlgLstStart : "Start", //MISSING -DlgLstType : "পà§à¦°à¦•ার", -DlgLstTypeCircle : "গোল", -DlgLstTypeDisc : "ডিসà§à¦•", -DlgLstTypeSquare : "চৌকোণা", -DlgLstTypeNumbers : "সংখà§à¦¯à¦¾ (1, 2, 3)", -DlgLstTypeLCase : "ছোট অকà§à¦·à¦° (a, b, c)", -DlgLstTypeUCase : "বড় অকà§à¦·à¦° (A, B, C)", -DlgLstTypeSRoman : "ছোট রোমান সংখà§à¦¯à¦¾ (i, ii, iii)", -DlgLstTypeLRoman : "বড় রোমান সংখà§à¦¯à¦¾ (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "সাধারন", -DlgDocBackTab : "বà§à¦¯à¦¾à¦•গà§à¦°à¦¾à¦‰à¦¨à§à¦¡", -DlgDocColorsTab : "রং à¦à¦¬à¦‚ মারà§à¦œà¦¿à¦¨", -DlgDocMetaTab : "মেটাডেটা", - -DlgDocPageTitle : "পেজ শীরà§à¦·à¦•", -DlgDocLangDir : "ভাষা লিখার দিক", -DlgDocLangDirLTR : "বাম থেকে ডানে (LTR)", -DlgDocLangDirRTL : "ডান থেকে বামে (RTL)", -DlgDocLangCode : "ভাষা কোড", -DlgDocCharSet : "কà§à¦¯à¦¾à¦°à§‡à¦•à§à¦Ÿà¦¾à¦° সেট à¦à¦¨à¦•োডিং", -DlgDocCharSetCE : "Central European", //MISSING -DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING -DlgDocCharSetCR : "Cyrillic", //MISSING -DlgDocCharSetGR : "Greek", //MISSING -DlgDocCharSetJP : "Japanese", //MISSING -DlgDocCharSetKR : "Korean", //MISSING -DlgDocCharSetTR : "Turkish", //MISSING -DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING -DlgDocCharSetWE : "Western European", //MISSING -DlgDocCharSetOther : "অনà§à¦¯ কà§à¦¯à¦¾à¦°à§‡à¦•à§à¦Ÿà¦¾à¦° সেট à¦à¦¨à¦•োডিং", - -DlgDocDocType : "ডকà§à¦¯à§à¦®à§‡à¦¨à§à¦Ÿ টাইপ হেডিং", -DlgDocDocTypeOther : "অনà§à¦¯ ডকà§à¦¯à§à¦®à§‡à¦¨à§à¦Ÿ টাইপ হেডিং", -DlgDocIncXHTML : "XHTML ডেকà§à¦²à¦¾à¦°à§‡à¦¶à¦¨ যà§à¦•à§à¦¤ কর", -DlgDocBgColor : "বà§à¦¯à¦¾à¦•গà§à¦°à¦¾à¦‰à¦¨à§à¦¡ রং", -DlgDocBgImage : "বà§à¦¯à¦¾à¦•গà§à¦°à¦¾à¦‰à¦¨à§à¦¡ ছবির URL", -DlgDocBgNoScroll : "সà§à¦•à§à¦°à¦²à¦¹à§€à¦¨ বà§à¦¯à¦¾à¦•গà§à¦°à¦¾à¦‰à¦¨à§à¦¡", -DlgDocCText : "টেকà§à¦¸à¦Ÿ", -DlgDocCLink : "লিংক", -DlgDocCVisited : "ভিজিট করা লিংক", -DlgDocCActive : "সকà§à¦°à¦¿à§Ÿ লিংক", -DlgDocMargins : "পেজ মারà§à¦œà¦¿à¦¨", -DlgDocMaTop : "উপর", -DlgDocMaLeft : "বামে", -DlgDocMaRight : "ডানে", -DlgDocMaBottom : "নীচে", -DlgDocMeIndex : "ডকà§à¦¯à§à¦®à§‡à¦¨à§à¦Ÿ ইনà§à¦¡à§‡à¦•à§à¦¸ কিওয়ারà§à¦¡ (কমা দà§à¦¬à¦¾à¦°à¦¾ বিচà§à¦›à¦¿à¦¨à§à¦¨)", -DlgDocMeDescr : "ডকà§à¦¯à§‚মেনà§à¦Ÿ বরà§à¦£à¦¨à¦¾", -DlgDocMeAuthor : "লেখক", -DlgDocMeCopy : "কপীরাইট", -DlgDocPreview : "পà§à¦°à§€à¦­à¦¿à¦‰", - -// Templates Dialog -Templates : "টেমপà§à¦²à§‡à¦Ÿ", -DlgTemplatesTitle : "কনটেনà§à¦Ÿ টেমপà§à¦²à§‡à¦Ÿ", -DlgTemplatesSelMsg : "অনà§à¦—à§à¦°à¦¹ করে à¦à¦¡à¦¿à¦Ÿà¦°à§‡ ওপেন করার জনà§à¦¯ টেমপà§à¦²à§‡à¦Ÿ বাছাই করà§à¦¨
    (আসল কনটেনà§à¦Ÿ হারিয়ে যাবে):", -DlgTemplatesLoading : "টেমপà§à¦²à§‡à¦Ÿ লিসà§à¦Ÿ হারিয়ে যাবে। অনà§à¦—à§à¦°à¦¹ করে অপেকà§à¦·à¦¾ করà§à¦¨...", -DlgTemplatesNoTpl : "(কোন টেমপà§à¦²à§‡à¦Ÿ ডিফাইন করা নেই)", -DlgTemplatesReplace : "Replace actual contents", //MISSING - -// About Dialog -DlgAboutAboutTab : "কে বানিয়েছে", -DlgAboutBrowserInfoTab : "বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°à§‡à¦° বà§à¦¯à¦¾à¦ªà¦¾à¦°à§‡ তথà§à¦¯", -DlgAboutLicenseTab : "লাইসেনà§à¦¸", -DlgAboutVersion : "ভারà§à¦¸à¦¨", -DlgAboutInfo : "আরও তথà§à¦¯à§‡à¦° জনà§à¦¯ যান", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/bs.js b/fckeditor/editor/lang/bs.js deleted file mode 100644 index 662b4b8f..00000000 --- a/fckeditor/editor/lang/bs.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Bosnian language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Skupi trake sa alatima", -ToolbarExpand : "Otvori trake sa alatima", - -// Toolbar Items and Context Menu -Save : "Snimi", -NewPage : "Novi dokument", -Preview : "Prikaži", -Cut : "Izreži", -Copy : "Kopiraj", -Paste : "Zalijepi", -PasteText : "Zalijepi kao obièan tekst", -PasteWord : "Zalijepi iz Word-a", -Print : "Å tampaj", -SelectAll : "Selektuj sve", -RemoveFormat : "PoniÅ¡ti format", -InsertLinkLbl : "Link", -InsertLink : "Ubaci/Izmjeni link", -RemoveLink : "IzbriÅ¡i link", -VisitLink : "Open Link", //MISSING -Anchor : "Insert/Edit Anchor", //MISSING -AnchorDelete : "Remove Anchor", //MISSING -InsertImageLbl : "Slika", -InsertImage : "Ubaci/Izmjeni sliku", -InsertFlashLbl : "Flash", //MISSING -InsertFlash : "Insert/Edit Flash", //MISSING -InsertTableLbl : "Tabela", -InsertTable : "Ubaci/Izmjeni tabelu", -InsertLineLbl : "Linija", -InsertLine : "Ubaci horizontalnu liniju", -InsertSpecialCharLbl: "Specijalni karakter", -InsertSpecialChar : "Ubaci specijalni karater", -InsertSmileyLbl : "SmjeÅ¡ko", -InsertSmiley : "Ubaci smjeÅ¡ka", -About : "O FCKeditor-u", -Bold : "Boldiraj", -Italic : "Ukosi", -Underline : "Podvuci", -StrikeThrough : "Precrtaj", -Subscript : "Subscript", -Superscript : "Superscript", -LeftJustify : "Lijevo poravnanje", -CenterJustify : "Centralno poravnanje", -RightJustify : "Desno poravnanje", -BlockJustify : "Puno poravnanje", -DecreaseIndent : "Smanji uvod", -IncreaseIndent : "Poveæaj uvod", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "Vrati", -Redo : "Ponovi", -NumberedListLbl : "Numerisana lista", -NumberedList : "Ubaci/Izmjeni numerisanu listu", -BulletedListLbl : "Lista", -BulletedList : "Ubaci/Izmjeni listu", -ShowTableBorders : "Pokaži okvire tabela", -ShowDetails : "Pokaži detalje", -Style : "Stil", -FontFormat : "Format", -Font : "Font", -FontSize : "Velièina", -TextColor : "Boja teksta", -BGColor : "Boja pozadine", -Source : "HTML kôd", -Find : "Naði", -Replace : "Zamjeni", -SpellCheck : "Check Spelling", //MISSING -UniversalKeyboard : "Universal Keyboard", //MISSING -PageBreakLbl : "Page Break", //MISSING -PageBreak : "Insert Page Break", //MISSING - -Form : "Form", //MISSING -Checkbox : "Checkbox", //MISSING -RadioButton : "Radio Button", //MISSING -TextField : "Text Field", //MISSING -Textarea : "Textarea", //MISSING -HiddenField : "Hidden Field", //MISSING -Button : "Button", //MISSING -SelectionField : "Selection Field", //MISSING -ImageButton : "Image Button", //MISSING - -FitWindow : "Maximize the editor size", //MISSING -ShowBlocks : "Show Blocks", //MISSING - -// Context Menu -EditLink : "Izmjeni link", -CellCM : "Cell", //MISSING -RowCM : "Row", //MISSING -ColumnCM : "Column", //MISSING -InsertRowAfter : "Insert Row After", //MISSING -InsertRowBefore : "Insert Row Before", //MISSING -DeleteRows : "BriÅ¡i redove", -InsertColumnAfter : "Insert Column After", //MISSING -InsertColumnBefore : "Insert Column Before", //MISSING -DeleteColumns : "BriÅ¡i kolone", -InsertCellAfter : "Insert Cell After", //MISSING -InsertCellBefore : "Insert Cell Before", //MISSING -DeleteCells : "BriÅ¡i æelije", -MergeCells : "Spoji æelije", -MergeRight : "Merge Right", //MISSING -MergeDown : "Merge Down", //MISSING -HorizontalSplitCell : "Split Cell Horizontally", //MISSING -VerticalSplitCell : "Split Cell Vertically", //MISSING -TableDelete : "Delete Table", //MISSING -CellProperties : "Svojstva æelije", -TableProperties : "Svojstva tabele", -ImageProperties : "Svojstva slike", -FlashProperties : "Flash Properties", //MISSING - -AnchorProp : "Anchor Properties", //MISSING -ButtonProp : "Button Properties", //MISSING -CheckboxProp : "Checkbox Properties", //MISSING -HiddenFieldProp : "Hidden Field Properties", //MISSING -RadioButtonProp : "Radio Button Properties", //MISSING -ImageButtonProp : "Image Button Properties", //MISSING -TextFieldProp : "Text Field Properties", //MISSING -SelectionFieldProp : "Selection Field Properties", //MISSING -TextareaProp : "Textarea Properties", //MISSING -FormProp : "Form Properties", //MISSING - -FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6", - -// Alerts and Messages -ProcessingXHTML : "Procesiram XHTML. Molim saèekajte...", -Done : "Gotovo", -PasteWordConfirm : "Tekst koji želite zalijepiti èini se da je kopiran iz Worda. Da li želite da se prvo oèisti?", -NotCompatiblePaste : "Ova komanda je podržana u Internet Explorer-u verzijama 5.5 ili novijim. Da li želite da izvrÅ¡ite lijepljenje teksta bez èišæenja?", -UnknownToolbarItem : "Nepoznata stavka sa trake sa alatima \"%1\"", -UnknownCommand : "Nepoznata komanda \"%1\"", -NotImplemented : "Komanda nije implementirana", -UnknownToolbarSet : "Traka sa alatima \"%1\" ne postoji", -NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", //MISSING -BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", //MISSING -DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", //MISSING -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Odustani", -DlgBtnClose : "Zatvori", -DlgBtnBrowseServer : "Browse Server", //MISSING -DlgAdvancedTag : "Naprednije", -DlgOpOther : "", //MISSING -DlgInfoTab : "Info", //MISSING -DlgAlertUrl : "Please insert the URL", //MISSING - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Smjer pisanja", -DlgGenLangDirLtr : "S lijeva na desno (LTR)", -DlgGenLangDirRtl : "S desna na lijevo (RTL)", -DlgGenLangCode : "Jezièni kôd", -DlgGenAccessKey : "Pristupna tipka", -DlgGenName : "Naziv", -DlgGenTabIndex : "Tab indeks", -DlgGenLongDescr : "Dugaèki opis URL-a", -DlgGenClass : "Klase CSS stilova", -DlgGenTitle : "Advisory title", -DlgGenContType : "Advisory vrsta sadržaja", -DlgGenLinkCharset : "Linked Resource Charset", -DlgGenStyle : "Stil", - -// Image Dialog -DlgImgTitle : "Svojstva slike", -DlgImgInfoTab : "Info slike", -DlgImgBtnUpload : "Å alji na server", -DlgImgURL : "URL", -DlgImgUpload : "Å alji", -DlgImgAlt : "Tekst na slici", -DlgImgWidth : "Å irina", -DlgImgHeight : "Visina", -DlgImgLockRatio : "Zakljuèaj odnos", -DlgBtnResetSize : "Resetuj dimenzije", -DlgImgBorder : "Okvir", -DlgImgHSpace : "HSpace", -DlgImgVSpace : "VSpace", -DlgImgAlign : "Poravnanje", -DlgImgAlignLeft : "Lijevo", -DlgImgAlignAbsBottom: "Abs dole", -DlgImgAlignAbsMiddle: "Abs sredina", -DlgImgAlignBaseline : "Bazno", -DlgImgAlignBottom : "Dno", -DlgImgAlignMiddle : "Sredina", -DlgImgAlignRight : "Desno", -DlgImgAlignTextTop : "Vrh teksta", -DlgImgAlignTop : "Vrh", -DlgImgPreview : "Prikaz", -DlgImgAlertUrl : "Molimo ukucajte URL od slike.", -DlgImgLinkTab : "Link", //MISSING - -// Flash Dialog -DlgFlashTitle : "Flash Properties", //MISSING -DlgFlashChkPlay : "Auto Play", //MISSING -DlgFlashChkLoop : "Loop", //MISSING -DlgFlashChkMenu : "Enable Flash Menu", //MISSING -DlgFlashScale : "Scale", //MISSING -DlgFlashScaleAll : "Show all", //MISSING -DlgFlashScaleNoBorder : "No Border", //MISSING -DlgFlashScaleFit : "Exact Fit", //MISSING - -// Link Dialog -DlgLnkWindowTitle : "Link", -DlgLnkInfoTab : "Link info", -DlgLnkTargetTab : "Prozor", - -DlgLnkType : "Tip linka", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Sidro na ovoj stranici", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protokol", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Izaberi sidro", -DlgLnkAnchorByName : "Po nazivu sidra", -DlgLnkAnchorById : "Po Id-u elementa", -DlgLnkNoAnchors : "(Nema dostupnih sidra na stranici)", -DlgLnkEMail : "E-Mail Adresa", -DlgLnkEMailSubject : "Subjekt poruke", -DlgLnkEMailBody : "Poruka", -DlgLnkUpload : "Å alji", -DlgLnkBtnUpload : "Å alji na server", - -DlgLnkTarget : "Prozor", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Novi prozor (_blank)", -DlgLnkTargetParent : "Glavni prozor (_parent)", -DlgLnkTargetSelf : "Isti prozor (_self)", -DlgLnkTargetTop : "Najgornji prozor (_top)", -DlgLnkTargetFrameName : "Target Frame Name", //MISSING -DlgLnkPopWinName : "Naziv popup prozora", -DlgLnkPopWinFeat : "Moguænosti popup prozora", -DlgLnkPopResize : "Promjenljive velièine", -DlgLnkPopLocation : "Traka za lokaciju", -DlgLnkPopMenu : "Izborna traka", -DlgLnkPopScroll : "Scroll traka", -DlgLnkPopStatus : "Statusna traka", -DlgLnkPopToolbar : "Traka sa alatima", -DlgLnkPopFullScrn : "Cijeli ekran (IE)", -DlgLnkPopDependent : "Ovisno (Netscape)", -DlgLnkPopWidth : "Å irina", -DlgLnkPopHeight : "Visina", -DlgLnkPopLeft : "Lijeva pozicija", -DlgLnkPopTop : "Gornja pozicija", - -DlnLnkMsgNoUrl : "Molimo ukucajte URL link", -DlnLnkMsgNoEMail : "Molimo ukucajte e-mail adresu", -DlnLnkMsgNoAnchor : "Molimo izaberite sidro", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", //MISSING - -// Color Dialog -DlgColorTitle : "Izaberi boju", -DlgColorBtnClear : "Oèisti", -DlgColorHighlight : "Igled", -DlgColorSelected : "Selektovana", - -// Smiley Dialog -DlgSmileyTitle : "Ubaci smjeÅ¡ka", - -// Special Character Dialog -DlgSpecialCharTitle : "Izaberi specijalni karakter", - -// Table Dialog -DlgTableTitle : "Svojstva tabele", -DlgTableRows : "Redova", -DlgTableColumns : "Kolona", -DlgTableBorder : "Okvir", -DlgTableAlign : "Poravnanje", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Lijevo", -DlgTableAlignCenter : "Centar", -DlgTableAlignRight : "Desno", -DlgTableWidth : "Å irina", -DlgTableWidthPx : "piksela", -DlgTableWidthPc : "posto", -DlgTableHeight : "Visina", -DlgTableCellSpace : "Razmak æelija", -DlgTableCellPad : "Uvod æelija", -DlgTableCaption : "Naslov", -DlgTableSummary : "Summary", //MISSING - -// Table Cell Dialog -DlgCellTitle : "Svojstva æelije", -DlgCellWidth : "Å irina", -DlgCellWidthPx : "piksela", -DlgCellWidthPc : "posto", -DlgCellHeight : "Visina", -DlgCellWordWrap : "Vrapuj tekst", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Da", -DlgCellWordWrapNo : "Ne", -DlgCellHorAlign : "Horizontalno poravnanje", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Lijevo", -DlgCellHorAlignCenter : "Centar", -DlgCellHorAlignRight: "Desno", -DlgCellVerAlign : "Vertikalno poravnanje", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Gore", -DlgCellVerAlignMiddle : "Sredina", -DlgCellVerAlignBottom : "Dno", -DlgCellVerAlignBaseline : "Bazno", -DlgCellRowSpan : "Spajanje æelija", -DlgCellCollSpan : "Spajanje kolona", -DlgCellBackColor : "Boja pozadine", -DlgCellBorderColor : "Boja okvira", -DlgCellBtnSelect : "Selektuj...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", //MISSING - -// Find Dialog -DlgFindTitle : "Naði", -DlgFindFindBtn : "Naði", -DlgFindNotFoundMsg : "Traženi tekst nije pronaðen.", - -// Replace Dialog -DlgReplaceTitle : "Zamjeni", -DlgReplaceFindLbl : "Naði Å¡ta:", -DlgReplaceReplaceLbl : "Zamjeni sa:", -DlgReplaceCaseChk : "Uporeðuj velika/mala slova", -DlgReplaceReplaceBtn : "Zamjeni", -DlgReplaceReplAllBtn : "Zamjeni sve", -DlgReplaceWordChk : "Uporeðuj samo cijelu rijeè", - -// Paste Operations / Dialog -PasteErrorCut : "Sigurnosne postavke vaÅ¡eg pretraživaèa ne dozvoljavaju operacije automatskog rezanja. Molimo koristite kraticu na tastaturi (Ctrl+X).", -PasteErrorCopy : "Sigurnosne postavke VaÅ¡eg pretraživaèa ne dozvoljavaju operacije automatskog kopiranja. Molimo koristite kraticu na tastaturi (Ctrl+C).", - -PasteAsText : "Zalijepi kao obièan tekst", -PasteFromWord : "Zalijepi iz Word-a", - -DlgPasteMsg2 : "Please paste inside the following box using the keyboard (Ctrl+V) and hit OK.", //MISSING -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING -DlgPasteIgnoreFont : "Ignore Font Face definitions", //MISSING -DlgPasteRemoveStyles : "Remove Styles definitions", //MISSING - -// Color Picker -ColorAutomatic : "Automatska", -ColorMoreColors : "ViÅ¡e boja...", - -// Document Properties -DocProps : "Document Properties", //MISSING - -// Anchor Dialog -DlgAnchorTitle : "Anchor Properties", //MISSING -DlgAnchorName : "Anchor Name", //MISSING -DlgAnchorErrorName : "Please type the anchor name", //MISSING - -// Speller Pages Dialog -DlgSpellNotInDic : "Not in dictionary", //MISSING -DlgSpellChangeTo : "Change to", //MISSING -DlgSpellBtnIgnore : "Ignore", //MISSING -DlgSpellBtnIgnoreAll : "Ignore All", //MISSING -DlgSpellBtnReplace : "Replace", //MISSING -DlgSpellBtnReplaceAll : "Replace All", //MISSING -DlgSpellBtnUndo : "Undo", //MISSING -DlgSpellNoSuggestions : "- No suggestions -", //MISSING -DlgSpellProgress : "Spell check in progress...", //MISSING -DlgSpellNoMispell : "Spell check complete: No misspellings found", //MISSING -DlgSpellNoChanges : "Spell check complete: No words changed", //MISSING -DlgSpellOneChange : "Spell check complete: One word changed", //MISSING -DlgSpellManyChanges : "Spell check complete: %1 words changed", //MISSING - -IeSpellDownload : "Spell checker not installed. Do you want to download it now?", //MISSING - -// Button Dialog -DlgButtonText : "Text (Value)", //MISSING -DlgButtonType : "Type", //MISSING -DlgButtonTypeBtn : "Button", //MISSING -DlgButtonTypeSbm : "Submit", //MISSING -DlgButtonTypeRst : "Reset", //MISSING - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Name", //MISSING -DlgCheckboxValue : "Value", //MISSING -DlgCheckboxSelected : "Selected", //MISSING - -// Form Dialog -DlgFormName : "Name", //MISSING -DlgFormAction : "Action", //MISSING -DlgFormMethod : "Method", //MISSING - -// Select Field Dialog -DlgSelectName : "Name", //MISSING -DlgSelectValue : "Value", //MISSING -DlgSelectSize : "Size", //MISSING -DlgSelectLines : "lines", //MISSING -DlgSelectChkMulti : "Allow multiple selections", //MISSING -DlgSelectOpAvail : "Available Options", //MISSING -DlgSelectOpText : "Text", //MISSING -DlgSelectOpValue : "Value", //MISSING -DlgSelectBtnAdd : "Add", //MISSING -DlgSelectBtnModify : "Modify", //MISSING -DlgSelectBtnUp : "Up", //MISSING -DlgSelectBtnDown : "Down", //MISSING -DlgSelectBtnSetValue : "Set as selected value", //MISSING -DlgSelectBtnDelete : "Delete", //MISSING - -// Textarea Dialog -DlgTextareaName : "Name", //MISSING -DlgTextareaCols : "Columns", //MISSING -DlgTextareaRows : "Rows", //MISSING - -// Text Field Dialog -DlgTextName : "Name", //MISSING -DlgTextValue : "Value", //MISSING -DlgTextCharWidth : "Character Width", //MISSING -DlgTextMaxChars : "Maximum Characters", //MISSING -DlgTextType : "Type", //MISSING -DlgTextTypeText : "Text", //MISSING -DlgTextTypePass : "Password", //MISSING - -// Hidden Field Dialog -DlgHiddenName : "Name", //MISSING -DlgHiddenValue : "Value", //MISSING - -// Bulleted List Dialog -BulletedListProp : "Bulleted List Properties", //MISSING -NumberedListProp : "Numbered List Properties", //MISSING -DlgLstStart : "Start", //MISSING -DlgLstType : "Type", //MISSING -DlgLstTypeCircle : "Circle", //MISSING -DlgLstTypeDisc : "Disc", //MISSING -DlgLstTypeSquare : "Square", //MISSING -DlgLstTypeNumbers : "Numbers (1, 2, 3)", //MISSING -DlgLstTypeLCase : "Lowercase Letters (a, b, c)", //MISSING -DlgLstTypeUCase : "Uppercase Letters (A, B, C)", //MISSING -DlgLstTypeSRoman : "Small Roman Numerals (i, ii, iii)", //MISSING -DlgLstTypeLRoman : "Large Roman Numerals (I, II, III)", //MISSING - -// Document Properties Dialog -DlgDocGeneralTab : "General", //MISSING -DlgDocBackTab : "Background", //MISSING -DlgDocColorsTab : "Colors and Margins", //MISSING -DlgDocMetaTab : "Meta Data", //MISSING - -DlgDocPageTitle : "Page Title", //MISSING -DlgDocLangDir : "Language Direction", //MISSING -DlgDocLangDirLTR : "Left to Right (LTR)", //MISSING -DlgDocLangDirRTL : "Right to Left (RTL)", //MISSING -DlgDocLangCode : "Language Code", //MISSING -DlgDocCharSet : "Character Set Encoding", //MISSING -DlgDocCharSetCE : "Central European", //MISSING -DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING -DlgDocCharSetCR : "Cyrillic", //MISSING -DlgDocCharSetGR : "Greek", //MISSING -DlgDocCharSetJP : "Japanese", //MISSING -DlgDocCharSetKR : "Korean", //MISSING -DlgDocCharSetTR : "Turkish", //MISSING -DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING -DlgDocCharSetWE : "Western European", //MISSING -DlgDocCharSetOther : "Other Character Set Encoding", //MISSING - -DlgDocDocType : "Document Type Heading", //MISSING -DlgDocDocTypeOther : "Other Document Type Heading", //MISSING -DlgDocIncXHTML : "Include XHTML Declarations", //MISSING -DlgDocBgColor : "Background Color", //MISSING -DlgDocBgImage : "Background Image URL", //MISSING -DlgDocBgNoScroll : "Nonscrolling Background", //MISSING -DlgDocCText : "Text", //MISSING -DlgDocCLink : "Link", //MISSING -DlgDocCVisited : "Visited Link", //MISSING -DlgDocCActive : "Active Link", //MISSING -DlgDocMargins : "Page Margins", //MISSING -DlgDocMaTop : "Top", //MISSING -DlgDocMaLeft : "Left", //MISSING -DlgDocMaRight : "Right", //MISSING -DlgDocMaBottom : "Bottom", //MISSING -DlgDocMeIndex : "Document Indexing Keywords (comma separated)", //MISSING -DlgDocMeDescr : "Document Description", //MISSING -DlgDocMeAuthor : "Author", //MISSING -DlgDocMeCopy : "Copyright", //MISSING -DlgDocPreview : "Preview", //MISSING - -// Templates Dialog -Templates : "Templates", //MISSING -DlgTemplatesTitle : "Content Templates", //MISSING -DlgTemplatesSelMsg : "Please select the template to open in the editor
    (the actual contents will be lost):", //MISSING -DlgTemplatesLoading : "Loading templates list. Please wait...", //MISSING -DlgTemplatesNoTpl : "(No templates defined)", //MISSING -DlgTemplatesReplace : "Replace actual contents", //MISSING - -// About Dialog -DlgAboutAboutTab : "About", //MISSING -DlgAboutBrowserInfoTab : "Browser Info", //MISSING -DlgAboutLicenseTab : "License", //MISSING -DlgAboutVersion : "verzija", -DlgAboutInfo : "Za više informacija posjetite", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/ca.js b/fckeditor/editor/lang/ca.js deleted file mode 100644 index bb877853..00000000 --- a/fckeditor/editor/lang/ca.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Catalan language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Redueix la barra d'eines", -ToolbarExpand : "Amplia la barra d'eines", - -// Toolbar Items and Context Menu -Save : "Desa", -NewPage : "Nova Pàgina", -Preview : "Visualització prèvia", -Cut : "Retalla", -Copy : "Copia", -Paste : "Enganxa", -PasteText : "Enganxa com a text no formatat", -PasteWord : "Enganxa des del Word", -Print : "Imprimeix", -SelectAll : "Selecciona-ho tot", -RemoveFormat : "Elimina Format", -InsertLinkLbl : "Enllaç", -InsertLink : "Insereix/Edita enllaç", -RemoveLink : "Elimina l'enllaç", -VisitLink : "Obre l'enllaç", -Anchor : "Insereix/Edita àncora", -AnchorDelete : "Elimina àncora", -InsertImageLbl : "Imatge", -InsertImage : "Insereix/Edita imatge", -InsertFlashLbl : "Flash", -InsertFlash : "Insereix/Edita Flash", -InsertTableLbl : "Taula", -InsertTable : "Insereix/Edita taula", -InsertLineLbl : "Línia", -InsertLine : "Insereix línia horitzontal", -InsertSpecialCharLbl: "Caràcter Especial", -InsertSpecialChar : "Insereix caràcter especial", -InsertSmileyLbl : "Icona", -InsertSmiley : "Insereix icona", -About : "Quant a l'FCKeditor", -Bold : "Negreta", -Italic : "Cursiva", -Underline : "Subratllat", -StrikeThrough : "Barrat", -Subscript : "Subíndex", -Superscript : "Superíndex", -LeftJustify : "Alinia a l'esquerra", -CenterJustify : "Centrat", -RightJustify : "Alinia a la dreta", -BlockJustify : "Justificat", -DecreaseIndent : "Redueix el sagnat", -IncreaseIndent : "Augmenta el sagnat", -Blockquote : "Bloc de cita", -CreateDiv : "Crea un contenidor Div", -EditDiv : "Edita el contenidor Div", -DeleteDiv : "Elimina el contenidor Div", -Undo : "Desfés", -Redo : "Refés", -NumberedListLbl : "Llista numerada", -NumberedList : "Numeració activada/desactivada", -BulletedListLbl : "Llista de pics", -BulletedList : "Pics activats/descativats", -ShowTableBorders : "Mostra les vores de les taules", -ShowDetails : "Mostra detalls", -Style : "Estil", -FontFormat : "Format", -Font : "Tipus de lletra", -FontSize : "Mida", -TextColor : "Color de Text", -BGColor : "Color de Fons", -Source : "Codi font", -Find : "Cerca", -Replace : "Reemplaça", -SpellCheck : "Revisa l'ortografia", -UniversalKeyboard : "Teclat universal", -PageBreakLbl : "Salt de pàgina", -PageBreak : "Insereix salt de pàgina", - -Form : "Formulari", -Checkbox : "Casella de verificació", -RadioButton : "Botó d'opció", -TextField : "Camp de text", -Textarea : "Àrea de text", -HiddenField : "Camp ocult", -Button : "Botó", -SelectionField : "Camp de selecció", -ImageButton : "Botó d'imatge", - -FitWindow : "Maximiza la mida de l'editor", -ShowBlocks : "Mostra els blocs", - -// Context Menu -EditLink : "Edita l'enllaç", -CellCM : "Cel·la", -RowCM : "Fila", -ColumnCM : "Columna", -InsertRowAfter : "Insereix fila darrera", -InsertRowBefore : "Insereix fila abans de", -DeleteRows : "Suprimeix una fila", -InsertColumnAfter : "Insereix columna darrera", -InsertColumnBefore : "Insereix columna abans de", -DeleteColumns : "Suprimeix una columna", -InsertCellAfter : "Insereix cel·la darrera", -InsertCellBefore : "Insereix cel·la abans de", -DeleteCells : "Suprimeix les cel·les", -MergeCells : "Fusiona les cel·les", -MergeRight : "Fusiona cap a la dreta", -MergeDown : "Fusiona cap avall", -HorizontalSplitCell : "Divideix la cel·la horitzontalment", -VerticalSplitCell : "Divideix la cel·la verticalment", -TableDelete : "Suprimeix la taula", -CellProperties : "Propietats de la cel·la", -TableProperties : "Propietats de la taula", -ImageProperties : "Propietats de la imatge", -FlashProperties : "Propietats del Flash", - -AnchorProp : "Propietats de l'àncora", -ButtonProp : "Propietats del botó", -CheckboxProp : "Propietats de la casella de verificació", -HiddenFieldProp : "Propietats del camp ocult", -RadioButtonProp : "Propietats del botó d'opció", -ImageButtonProp : "Propietats del botó d'imatge", -TextFieldProp : "Propietats del camp de text", -SelectionFieldProp : "Propietats del camp de selecció", -TextareaProp : "Propietats de l'àrea de text", -FormProp : "Propietats del formulari", - -FontFormats : "Normal;Formatejat;Adreça;Encapçalament 1;Encapçalament 2;Encapçalament 3;Encapçalament 4;Encapçalament 5;Encapçalament 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Processant XHTML. Si us plau esperi...", -Done : "Fet", -PasteWordConfirm : "El text que voleu enganxar sembla provenir de Word. Voleu netejar aquest text abans que sigui enganxat?", -NotCompatiblePaste : "Aquesta funció és disponible per a Internet Explorer versió 5.5 o superior. Voleu enganxar sense netejar?", -UnknownToolbarItem : "Element de la barra d'eines desconegut \"%1\"", -UnknownCommand : "Nom de comanda desconegut \"%1\"", -NotImplemented : "Mètode no implementat", -UnknownToolbarSet : "Conjunt de barra d'eines \"%1\" inexistent", -NoActiveX : "Les preferències del navegador poden limitar algunes funcions d'aquest editor. Cal habilitar l'opció \"Executa controls ActiveX i plug-ins\". Poden sorgir errors i poden faltar algunes funcions.", -BrowseServerBlocked : "El visualitzador de recursos no s'ha pogut obrir. Assegura't de que els bloquejos de finestres emergents estan desactivats.", -DialogBlocked : "No ha estat possible obrir una finestra de diàleg. Assegureu-vos que els bloquejos de finestres emergents estan desactivats.", -VisitLinkBlocked : "No ha estat possible obrir una nova finestra. Assegureu-vos que els bloquejos de finestres emergents estan desactivats.", - -// Dialogs -DlgBtnOK : "D'acord", -DlgBtnCancel : "Cancel·la", -DlgBtnClose : "Tanca", -DlgBtnBrowseServer : "Veure servidor", -DlgAdvancedTag : "Avançat", -DlgOpOther : "Altres", -DlgInfoTab : "Info", -DlgAlertUrl : "Si us plau, afegiu la URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Direcció de l'idioma", -DlgGenLangDirLtr : "D'esquerra a dreta (LTR)", -DlgGenLangDirRtl : "De dreta a esquerra (RTL)", -DlgGenLangCode : "Codi d'idioma", -DlgGenAccessKey : "Clau d'accés", -DlgGenName : "Nom", -DlgGenTabIndex : "Index de Tab", -DlgGenLongDescr : "Descripció llarga de la URL", -DlgGenClass : "Classes del full d'estil", -DlgGenTitle : "Títol consultiu", -DlgGenContType : "Tipus de contingut consultiu", -DlgGenLinkCharset : "Conjunt de caràcters font enllaçat", -DlgGenStyle : "Estil", - -// Image Dialog -DlgImgTitle : "Propietats de la imatge", -DlgImgInfoTab : "Informació de la imatge", -DlgImgBtnUpload : "Envia-la al servidor", -DlgImgURL : "URL", -DlgImgUpload : "Puja", -DlgImgAlt : "Text alternatiu", -DlgImgWidth : "Amplada", -DlgImgHeight : "Alçada", -DlgImgLockRatio : "Bloqueja les proporcions", -DlgBtnResetSize : "Restaura la mida", -DlgImgBorder : "Vora", -DlgImgHSpace : "Espaiat horit.", -DlgImgVSpace : "Espaiat vert.", -DlgImgAlign : "Alineació", -DlgImgAlignLeft : "Ajusta a l'esquerra", -DlgImgAlignAbsBottom: "Abs Bottom", -DlgImgAlignAbsMiddle: "Abs Middle", -DlgImgAlignBaseline : "Baseline", -DlgImgAlignBottom : "Bottom", -DlgImgAlignMiddle : "Middle", -DlgImgAlignRight : "Ajusta a la dreta", -DlgImgAlignTextTop : "Text Top", -DlgImgAlignTop : "Top", -DlgImgPreview : "Vista prèvia", -DlgImgAlertUrl : "Si us plau, escriviu la URL de la imatge", -DlgImgLinkTab : "Enllaç", - -// Flash Dialog -DlgFlashTitle : "Propietats del Flash", -DlgFlashChkPlay : "Reprodució automàtica", -DlgFlashChkLoop : "Bucle", -DlgFlashChkMenu : "Habilita menú Flash", -DlgFlashScale : "Escala", -DlgFlashScaleAll : "Mostra-ho tot", -DlgFlashScaleNoBorder : "Sense vores", -DlgFlashScaleFit : "Mida exacta", - -// Link Dialog -DlgLnkWindowTitle : "Enllaç", -DlgLnkInfoTab : "Informació de l'enllaç", -DlgLnkTargetTab : "Destí", - -DlgLnkType : "Tipus d'enllaç", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Àncora en aquesta pàgina", -DlgLnkTypeEMail : "Correu electrònic", -DlgLnkProto : "Protocol", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Selecciona una àncora", -DlgLnkAnchorByName : "Per nom d'àncora", -DlgLnkAnchorById : "Per Id d'element", -DlgLnkNoAnchors : "(No hi ha àncores disponibles en aquest document)", -DlgLnkEMail : "Adreça de correu electrònic", -DlgLnkEMailSubject : "Assumpte del missatge", -DlgLnkEMailBody : "Cos del missatge", -DlgLnkUpload : "Puja", -DlgLnkBtnUpload : "Envia al servidor", - -DlgLnkTarget : "Destí", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Nova finestra (_blank)", -DlgLnkTargetParent : "Finestra pare (_parent)", -DlgLnkTargetSelf : "Mateixa finestra (_self)", -DlgLnkTargetTop : "Finestra Major (_top)", -DlgLnkTargetFrameName : "Nom del marc de destí", -DlgLnkPopWinName : "Nom finestra popup", -DlgLnkPopWinFeat : "Característiques finestra popup", -DlgLnkPopResize : "Redimensionable", -DlgLnkPopLocation : "Barra d'adreça", -DlgLnkPopMenu : "Barra de menú", -DlgLnkPopScroll : "Barres d'scroll", -DlgLnkPopStatus : "Barra d'estat", -DlgLnkPopToolbar : "Barra d'eines", -DlgLnkPopFullScrn : "Pantalla completa (IE)", -DlgLnkPopDependent : "Depenent (Netscape)", -DlgLnkPopWidth : "Amplada", -DlgLnkPopHeight : "Alçada", -DlgLnkPopLeft : "Posició esquerra", -DlgLnkPopTop : "Posició dalt", - -DlnLnkMsgNoUrl : "Si us plau, escrigui l'enllaç URL", -DlnLnkMsgNoEMail : "Si us plau, escrigui l'adreça correu electrònic", -DlnLnkMsgNoAnchor : "Si us plau, escrigui l'àncora", -DlnLnkMsgInvPopName : "El nom de la finestra emergent ha de començar amb una lletra i no pot tenir espais", - -// Color Dialog -DlgColorTitle : "Selecciona el color", -DlgColorBtnClear : "Neteja", -DlgColorHighlight : "Realça", -DlgColorSelected : "Selecciona", - -// Smiley Dialog -DlgSmileyTitle : "Insereix una icona", - -// Special Character Dialog -DlgSpecialCharTitle : "Selecciona el caràcter especial", - -// Table Dialog -DlgTableTitle : "Propietats de la taula", -DlgTableRows : "Files", -DlgTableColumns : "Columnes", -DlgTableBorder : "Mida vora", -DlgTableAlign : "Alineació", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Esquerra", -DlgTableAlignCenter : "Centre", -DlgTableAlignRight : "Dreta", -DlgTableWidth : "Amplada", -DlgTableWidthPx : "píxels", -DlgTableWidthPc : "percentatge", -DlgTableHeight : "Alçada", -DlgTableCellSpace : "Espaiat de cel·les", -DlgTableCellPad : "Encoixinament de cel·les", -DlgTableCaption : "Títol", -DlgTableSummary : "Resum", - -// Table Cell Dialog -DlgCellTitle : "Propietats de la cel·la", -DlgCellWidth : "Amplada", -DlgCellWidthPx : "píxels", -DlgCellWidthPc : "percentatge", -DlgCellHeight : "Alçada", -DlgCellWordWrap : "Ajust de paraula", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Si", -DlgCellWordWrapNo : "No", -DlgCellHorAlign : "Alineació horitzontal", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Esquerra", -DlgCellHorAlignCenter : "Centre", -DlgCellHorAlignRight: "Dreta", -DlgCellVerAlign : "Alineació vertical", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Top", -DlgCellVerAlignMiddle : "Middle", -DlgCellVerAlignBottom : "Bottom", -DlgCellVerAlignBaseline : "Baseline", -DlgCellRowSpan : "Rows Span", -DlgCellCollSpan : "Columns Span", -DlgCellBackColor : "Color de fons", -DlgCellBorderColor : "Color de la vora", -DlgCellBtnSelect : "Seleccioneu...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Cerca i reemplaça", - -// Find Dialog -DlgFindTitle : "Cerca", -DlgFindFindBtn : "Cerca", -DlgFindNotFoundMsg : "El text especificat no s'ha trobat.", - -// Replace Dialog -DlgReplaceTitle : "Reemplaça", -DlgReplaceFindLbl : "Cerca:", -DlgReplaceReplaceLbl : "Remplaça amb:", -DlgReplaceCaseChk : "Distingeix majúscules/minúscules", -DlgReplaceReplaceBtn : "Reemplaça", -DlgReplaceReplAllBtn : "Reemplaça-ho tot", -DlgReplaceWordChk : "Només paraules completes", - -// Paste Operations / Dialog -PasteErrorCut : "La seguretat del vostre navegador no permet executar automàticament les operacions de retallar. Si us plau, utilitzeu el teclat (Ctrl+X).", -PasteErrorCopy : "La seguretat del vostre navegador no permet executar automàticament les operacions de copiar. Si us plau, utilitzeu el teclat (Ctrl+C).", - -PasteAsText : "Enganxa com a text no formatat", -PasteFromWord : "Enganxa com a Word", - -DlgPasteMsg2 : "Si us plau, enganxeu dins del següent camp utilitzant el teclat (Ctrl+V) i premeu OK.", -DlgPasteSec : "A causa de la configuració de seguretat del vostre navegador, l'editor no pot accedir al porta-retalls directament. Enganxeu-ho un altre cop en aquesta finestra.", -DlgPasteIgnoreFont : "Ignora definicions de font", -DlgPasteRemoveStyles : "Elimina definicions d'estil", - -// Color Picker -ColorAutomatic : "Automàtic", -ColorMoreColors : "Més colors...", - -// Document Properties -DocProps : "Propietats del document", - -// Anchor Dialog -DlgAnchorTitle : "Propietats de l'àncora", -DlgAnchorName : "Nom de l'àncora", -DlgAnchorErrorName : "Si us plau, escriviu el nom de l'ancora", - -// Speller Pages Dialog -DlgSpellNotInDic : "No és al diccionari", -DlgSpellChangeTo : "Reemplaça amb", -DlgSpellBtnIgnore : "Ignora", -DlgSpellBtnIgnoreAll : "Ignora-les totes", -DlgSpellBtnReplace : "Canvia", -DlgSpellBtnReplaceAll : "Canvia-les totes", -DlgSpellBtnUndo : "Desfés", -DlgSpellNoSuggestions : "Cap suggeriment", -DlgSpellProgress : "Verificació ortogràfica en curs...", -DlgSpellNoMispell : "Verificació ortogràfica acabada: no hi ha cap paraula mal escrita", -DlgSpellNoChanges : "Verificació ortogràfica: no s'ha canviat cap paraula", -DlgSpellOneChange : "Verificació ortogràfica: s'ha canviat una paraula", -DlgSpellManyChanges : "Verificació ortogràfica: s'han canviat %1 paraules", - -IeSpellDownload : "Verificació ortogràfica no instal·lada. Voleu descarregar-ho ara?", - -// Button Dialog -DlgButtonText : "Text (Valor)", -DlgButtonType : "Tipus", -DlgButtonTypeBtn : "Botó", -DlgButtonTypeSbm : "Transmet formulari", -DlgButtonTypeRst : "Reinicia formulari", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Nom", -DlgCheckboxValue : "Valor", -DlgCheckboxSelected : "Seleccionat", - -// Form Dialog -DlgFormName : "Nom", -DlgFormAction : "Acció", -DlgFormMethod : "Mètode", - -// Select Field Dialog -DlgSelectName : "Nom", -DlgSelectValue : "Valor", -DlgSelectSize : "Mida", -DlgSelectLines : "Línies", -DlgSelectChkMulti : "Permet múltiples seleccions", -DlgSelectOpAvail : "Opcions disponibles", -DlgSelectOpText : "Text", -DlgSelectOpValue : "Valor", -DlgSelectBtnAdd : "Afegeix", -DlgSelectBtnModify : "Modifica", -DlgSelectBtnUp : "Amunt", -DlgSelectBtnDown : "Avall", -DlgSelectBtnSetValue : "Selecciona per defecte", -DlgSelectBtnDelete : "Elimina", - -// Textarea Dialog -DlgTextareaName : "Nom", -DlgTextareaCols : "Columnes", -DlgTextareaRows : "Files", - -// Text Field Dialog -DlgTextName : "Nom", -DlgTextValue : "Valor", -DlgTextCharWidth : "Amplada", -DlgTextMaxChars : "Nombre màxim de caràcters", -DlgTextType : "Tipus", -DlgTextTypeText : "Text", -DlgTextTypePass : "Contrasenya", - -// Hidden Field Dialog -DlgHiddenName : "Nom", -DlgHiddenValue : "Valor", - -// Bulleted List Dialog -BulletedListProp : "Propietats de la llista de pics", -NumberedListProp : "Propietats de llista numerada", -DlgLstStart : "Inici", -DlgLstType : "Tipus", -DlgLstTypeCircle : "Cercle", -DlgLstTypeDisc : "Disc", -DlgLstTypeSquare : "Quadrat", -DlgLstTypeNumbers : "Números (1, 2, 3)", -DlgLstTypeLCase : "Lletres minúscules (a, b, c)", -DlgLstTypeUCase : "Lletres majúscules (A, B, C)", -DlgLstTypeSRoman : "Números romans en minúscules (i, ii, iii)", -DlgLstTypeLRoman : "Números romans en majúscules (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "General", -DlgDocBackTab : "Fons", -DlgDocColorsTab : "Colors i marges", -DlgDocMetaTab : "Metadades", - -DlgDocPageTitle : "Títol de la pàgina", -DlgDocLangDir : "Direcció idioma", -DlgDocLangDirLTR : "Esquerra a dreta (LTR)", -DlgDocLangDirRTL : "Dreta a esquerra (RTL)", -DlgDocLangCode : "Codi d'idioma", -DlgDocCharSet : "Codificació de conjunt de caràcters", -DlgDocCharSetCE : "Centreeuropeu", -DlgDocCharSetCT : "Xinès tradicional (Big5)", -DlgDocCharSetCR : "Ciríl·lic", -DlgDocCharSetGR : "Grec", -DlgDocCharSetJP : "Japonès", -DlgDocCharSetKR : "Coreà", -DlgDocCharSetTR : "Turc", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Europeu occidental", -DlgDocCharSetOther : "Una altra codificació de caràcters", - -DlgDocDocType : "Capçalera de tipus de document", -DlgDocDocTypeOther : "Un altra capçalera de tipus de document", -DlgDocIncXHTML : "Incloure declaracions XHTML", -DlgDocBgColor : "Color de fons", -DlgDocBgImage : "URL de la imatge de fons", -DlgDocBgNoScroll : "Fons fixe", -DlgDocCText : "Text", -DlgDocCLink : "Enllaç", -DlgDocCVisited : "Enllaç visitat", -DlgDocCActive : "Enllaç actiu", -DlgDocMargins : "Marges de pàgina", -DlgDocMaTop : "Cap", -DlgDocMaLeft : "Esquerra", -DlgDocMaRight : "Dreta", -DlgDocMaBottom : "Peu", -DlgDocMeIndex : "Mots clau per a indexació (separats per coma)", -DlgDocMeDescr : "Descripció del document", -DlgDocMeAuthor : "Autor", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Vista prèvia", - -// Templates Dialog -Templates : "Plantilles", -DlgTemplatesTitle : "Contingut plantilles", -DlgTemplatesSelMsg : "Si us plau, seleccioneu la plantilla per obrir a l'editor
    (el contingut actual no serà enregistrat):", -DlgTemplatesLoading : "Carregant la llista de plantilles. Si us plau, espereu...", -DlgTemplatesNoTpl : "(No hi ha plantilles definides)", -DlgTemplatesReplace : "Reemplaça el contingut actual", - -// About Dialog -DlgAboutAboutTab : "Quant a", -DlgAboutBrowserInfoTab : "Informació del navegador", -DlgAboutLicenseTab : "Llicència", -DlgAboutVersion : "versió", -DlgAboutInfo : "Per a més informació aneu a", - -// Div Dialog -DlgDivGeneralTab : "General", -DlgDivAdvancedTab : "Avançat", -DlgDivStyle : "Estil", -DlgDivInlineStyle : "Estil en línia" -}; diff --git a/fckeditor/editor/lang/cs.js b/fckeditor/editor/lang/cs.js deleted file mode 100644 index 20bed144..00000000 --- a/fckeditor/editor/lang/cs.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Czech language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Skrýt panel nástrojů", -ToolbarExpand : "Zobrazit panel nástrojů", - -// Toolbar Items and Context Menu -Save : "Uložit", -NewPage : "Nová stránka", -Preview : "Náhled", -Cut : "Vyjmout", -Copy : "Kopírovat", -Paste : "Vložit", -PasteText : "Vložit jako Äistý text", -PasteWord : "Vložit z Wordu", -Print : "Tisk", -SelectAll : "Vybrat vÅ¡e", -RemoveFormat : "Odstranit formátování", -InsertLinkLbl : "Odkaz", -InsertLink : "Vložit/zmÄ›nit odkaz", -RemoveLink : "Odstranit odkaz", -VisitLink : "Otevřít odkaz", -Anchor : "Vložít/zmÄ›nit záložku", -AnchorDelete : "Odstranit kotvu", -InsertImageLbl : "Obrázek", -InsertImage : "Vložit/zmÄ›nit obrázek", -InsertFlashLbl : "Flash", -InsertFlash : "Vložit/Upravit Flash", -InsertTableLbl : "Tabulka", -InsertTable : "Vložit/zmÄ›nit tabulku", -InsertLineLbl : "Linka", -InsertLine : "Vložit vodorovnou linku", -InsertSpecialCharLbl: "Speciální znaky", -InsertSpecialChar : "Vložit speciální znaky", -InsertSmileyLbl : "Smajlíky", -InsertSmiley : "Vložit smajlík", -About : "O aplikaci FCKeditor", -Bold : "TuÄné", -Italic : "Kurzíva", -Underline : "Podtržené", -StrikeThrough : "PÅ™eÅ¡krtnuté", -Subscript : "Dolní index", -Superscript : "Horní index", -LeftJustify : "Zarovnat vlevo", -CenterJustify : "Zarovnat na stÅ™ed", -RightJustify : "Zarovnat vpravo", -BlockJustify : "Zarovnat do bloku", -DecreaseIndent : "ZmenÅ¡it odsazení", -IncreaseIndent : "ZvÄ›tÅ¡it odsazení", -Blockquote : "Citace", -CreateDiv : "VytvoÅ™it Div kontejner", -EditDiv : "Upravit Div kontejner", -DeleteDiv : "Odstranit Div kontejner", -Undo : "ZpÄ›t", -Redo : "Znovu", -NumberedListLbl : "Číslování", -NumberedList : "Vložit/odstranit Äíslovaný seznam", -BulletedListLbl : "Odrážky", -BulletedList : "Vložit/odstranit odrážky", -ShowTableBorders : "Zobrazit okraje tabulek", -ShowDetails : "Zobrazit podrobnosti", -Style : "Styl", -FontFormat : "Formát", -Font : "Písmo", -FontSize : "Velikost", -TextColor : "Barva textu", -BGColor : "Barva pozadí", -Source : "Zdroj", -Find : "Hledat", -Replace : "Nahradit", -SpellCheck : "Zkontrolovat pravopis", -UniversalKeyboard : "Univerzální klávesnice", -PageBreakLbl : "Konec stránky", -PageBreak : "Vložit konec stránky", - -Form : "Formulář", -Checkbox : "ZaÅ¡krtávací políÄko", -RadioButton : "PÅ™epínaÄ", -TextField : "Textové pole", -Textarea : "Textová oblast", -HiddenField : "Skryté pole", -Button : "TlaÄítko", -SelectionField : "Seznam", -ImageButton : "Obrázkové tlaÄítko", - -FitWindow : "Maximalizovat velikost editoru", -ShowBlocks : "Ukázat bloky", - -// Context Menu -EditLink : "ZmÄ›nit odkaz", -CellCM : "Buňka", -RowCM : "Řádek", -ColumnCM : "Sloupec", -InsertRowAfter : "Vložit řádek za", -InsertRowBefore : "Vložit řádek pÅ™ed", -DeleteRows : "Smazat řádky", -InsertColumnAfter : "Vložit sloupec za", -InsertColumnBefore : "Vložit sloupec pÅ™ed", -DeleteColumns : "Smazat sloupec", -InsertCellAfter : "Vložit buňku za", -InsertCellBefore : "Vložit buňku pÅ™ed", -DeleteCells : "Smazat buňky", -MergeCells : "SlouÄit buňky", -MergeRight : "SlouÄit doprava", -MergeDown : "SlouÄit dolů", -HorizontalSplitCell : "RozdÄ›lit buňky vodorovnÄ›", -VerticalSplitCell : "RozdÄ›lit buňky svisle", -TableDelete : "Smazat tabulku", -CellProperties : "Vlastnosti buňky", -TableProperties : "Vlastnosti tabulky", -ImageProperties : "Vlastnosti obrázku", -FlashProperties : "Vlastnosti Flashe", - -AnchorProp : "Vlastnosti záložky", -ButtonProp : "Vlastnosti tlaÄítka", -CheckboxProp : "Vlastnosti zaÅ¡krtávacího políÄka", -HiddenFieldProp : "Vlastnosti skrytého pole", -RadioButtonProp : "Vlastnosti pÅ™epínaÄe", -ImageButtonProp : "Vlastností obrázkového tlaÄítka", -TextFieldProp : "Vlastnosti textového pole", -SelectionFieldProp : "Vlastnosti seznamu", -TextareaProp : "Vlastnosti textové oblasti", -FormProp : "Vlastnosti formuláře", - -FontFormats : "Normální;Naformátováno;Adresa;Nadpis 1;Nadpis 2;Nadpis 3;Nadpis 4;Nadpis 5;Nadpis 6;Normální (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Probíhá zpracování XHTML. Prosím Äekejte...", -Done : "Hotovo", -PasteWordConfirm : "Jak je vidÄ›t, vkládaný text je kopírován z Wordu. Chcete jej pÅ™ed vložením vyÄistit?", -NotCompatiblePaste : "Tento příkaz je dostupný pouze v Internet Exploreru verze 5.5 nebo vyšší. Chcete vložit text bez vyÄiÅ¡tÄ›ní?", -UnknownToolbarItem : "Neznámá položka panelu nástrojů \"%1\"", -UnknownCommand : "Neznámý příkaz \"%1\"", -NotImplemented : "Příkaz není implementován", -UnknownToolbarSet : "Panel nástrojů \"%1\" neexistuje", -NoActiveX : "Nastavení bezpeÄnosti VaÅ¡eho prohlížeÄe omezuje funkÄnost nÄ›kterých jeho možností. Je tÅ™eba zapnout volbu \"SpouÅ¡tÄ›t ovládáací prvky ActiveX a moduly plug-in\", jinak nebude možné využívat vÅ¡echny dosputné schopnosti editoru.", -BrowseServerBlocked : "Průzkumník zdrojů nelze otevřít. Prověřte, zda nemáte aktivováno blokování popup oken.", -DialogBlocked : "Nelze otevřít dialogové okno. Prověřte, zda nemáte aktivováno blokování popup oken.", -VisitLinkBlocked : "Není možné otevřít nové okno. Prověřte, zda vÅ¡echny nástroje pro blokování vyskakovacích oken jsou vypnuty.", - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Storno", -DlgBtnClose : "Zavřít", -DlgBtnBrowseServer : "Vybrat na serveru", -DlgAdvancedTag : "Rozšířené", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Prosím vložte URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Orientace jazyka", -DlgGenLangDirLtr : "Zleva do prava (LTR)", -DlgGenLangDirRtl : "Zprava do leva (RTL)", -DlgGenLangCode : "Kód jazyka", -DlgGenAccessKey : "Přístupový klíÄ", -DlgGenName : "Jméno", -DlgGenTabIndex : "PoÅ™adí prvku", -DlgGenLongDescr : "Dlouhý popis URL", -DlgGenClass : "Třída stylu", -DlgGenTitle : "Pomocný titulek", -DlgGenContType : "Pomocný typ obsahu", -DlgGenLinkCharset : "PÅ™iÅ™azená znaková sada", -DlgGenStyle : "Styl", - -// Image Dialog -DlgImgTitle : "Vlastnosti obrázku", -DlgImgInfoTab : "Informace o obrázku", -DlgImgBtnUpload : "Odeslat na server", -DlgImgURL : "URL", -DlgImgUpload : "Odeslat", -DlgImgAlt : "Alternativní text", -DlgImgWidth : "Šířka", -DlgImgHeight : "Výška", -DlgImgLockRatio : "Zámek", -DlgBtnResetSize : "Původní velikost", -DlgImgBorder : "Okraje", -DlgImgHSpace : "H-mezera", -DlgImgVSpace : "V-mezera", -DlgImgAlign : "Zarovnání", -DlgImgAlignLeft : "Vlevo", -DlgImgAlignAbsBottom: "Zcela dolů", -DlgImgAlignAbsMiddle: "DoprostÅ™ed", -DlgImgAlignBaseline : "Na úÄaří", -DlgImgAlignBottom : "Dolů", -DlgImgAlignMiddle : "Na stÅ™ed", -DlgImgAlignRight : "Vpravo", -DlgImgAlignTextTop : "Na horní okraj textu", -DlgImgAlignTop : "Nahoru", -DlgImgPreview : "Náhled", -DlgImgAlertUrl : "Zadejte prosím URL obrázku", -DlgImgLinkTab : "Odkaz", - -// Flash Dialog -DlgFlashTitle : "Vlastnosti Flashe", -DlgFlashChkPlay : "Automatické spuÅ¡tÄ›ní", -DlgFlashChkLoop : "Opakování", -DlgFlashChkMenu : "Nabídka Flash", -DlgFlashScale : "Zobrazit", -DlgFlashScaleAll : "Zobrazit vÅ¡e", -DlgFlashScaleNoBorder : "Bez okraje", -DlgFlashScaleFit : "PÅ™izpůsobit", - -// Link Dialog -DlgLnkWindowTitle : "Odkaz", -DlgLnkInfoTab : "Informace o odkazu", -DlgLnkTargetTab : "Cíl", - -DlgLnkType : "Typ odkazu", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Kotva v této stránce", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protokol", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Vybrat kotvu", -DlgLnkAnchorByName : "Podle jména kotvy", -DlgLnkAnchorById : "Podle Id objektu", -DlgLnkNoAnchors : "(Ve stránce není definována žádná kotva!)", -DlgLnkEMail : "E-Mailová adresa", -DlgLnkEMailSubject : "PÅ™edmÄ›t zprávy", -DlgLnkEMailBody : "TÄ›lo zprávy", -DlgLnkUpload : "Odeslat", -DlgLnkBtnUpload : "Odeslat na Server", - -DlgLnkTarget : "Cíl", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Nové okno (_blank)", -DlgLnkTargetParent : "RodiÄovské okno (_parent)", -DlgLnkTargetSelf : "Stejné okno (_self)", -DlgLnkTargetTop : "Hlavní okno (_top)", -DlgLnkTargetFrameName : "Název cílového rámu", -DlgLnkPopWinName : "Název vyskakovacího okna", -DlgLnkPopWinFeat : "Vlastnosti vyskakovacího okna", -DlgLnkPopResize : "MÄ›nitelná velikost", -DlgLnkPopLocation : "Panel umístÄ›ní", -DlgLnkPopMenu : "Panel nabídky", -DlgLnkPopScroll : "Posuvníky", -DlgLnkPopStatus : "Stavový řádek", -DlgLnkPopToolbar : "Panel nástrojů", -DlgLnkPopFullScrn : "Celá obrazovka (IE)", -DlgLnkPopDependent : "Závislost (Netscape)", -DlgLnkPopWidth : "Šířka", -DlgLnkPopHeight : "Výška", -DlgLnkPopLeft : "Levý okraj", -DlgLnkPopTop : "Horní okraj", - -DlnLnkMsgNoUrl : "Zadejte prosím URL odkazu", -DlnLnkMsgNoEMail : "Zadejte prosím e-mailovou adresu", -DlnLnkMsgNoAnchor : "Vyberte prosím kotvu", -DlnLnkMsgInvPopName : "Název vyskakovacího okna musí zaÄínat písmenem a nesmí obsahovat mezery", - -// Color Dialog -DlgColorTitle : "VýbÄ›r barvy", -DlgColorBtnClear : "Vymazat", -DlgColorHighlight : "ZvýraznÄ›ná", -DlgColorSelected : "Vybraná", - -// Smiley Dialog -DlgSmileyTitle : "Vkládání smajlíků", - -// Special Character Dialog -DlgSpecialCharTitle : "VýbÄ›r speciálního znaku", - -// Table Dialog -DlgTableTitle : "Vlastnosti tabulky", -DlgTableRows : "Řádky", -DlgTableColumns : "Sloupce", -DlgTableBorder : "OhraniÄení", -DlgTableAlign : "Zarovnání", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Vlevo", -DlgTableAlignCenter : "Na stÅ™ed", -DlgTableAlignRight : "Vpravo", -DlgTableWidth : "Šířka", -DlgTableWidthPx : "bodů", -DlgTableWidthPc : "procent", -DlgTableHeight : "Výška", -DlgTableCellSpace : "Vzdálenost bunÄ›k", -DlgTableCellPad : "Odsazení obsahu", -DlgTableCaption : "Popis", -DlgTableSummary : "Souhrn", - -// Table Cell Dialog -DlgCellTitle : "Vlastnosti buňky", -DlgCellWidth : "Šířka", -DlgCellWidthPx : "bodů", -DlgCellWidthPc : "procent", -DlgCellHeight : "Výška", -DlgCellWordWrap : "Zalamování", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Ano", -DlgCellWordWrapNo : "Ne", -DlgCellHorAlign : "Vodorovné zarovnání", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Vlevo", -DlgCellHorAlignCenter : "Na stÅ™ed", -DlgCellHorAlignRight: "Vpravo", -DlgCellVerAlign : "Svislé zarovnání", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Nahoru", -DlgCellVerAlignMiddle : "DoprostÅ™ed", -DlgCellVerAlignBottom : "Dolů", -DlgCellVerAlignBaseline : "Na úÄaří", -DlgCellRowSpan : "SlouÄené řádky", -DlgCellCollSpan : "SlouÄené sloupce", -DlgCellBackColor : "Barva pozadí", -DlgCellBorderColor : "Barva ohraniÄení", -DlgCellBtnSelect : "VýbÄ›r...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Najít a nahradit", - -// Find Dialog -DlgFindTitle : "Hledat", -DlgFindFindBtn : "Hledat", -DlgFindNotFoundMsg : "Hledaný text nebyl nalezen.", - -// Replace Dialog -DlgReplaceTitle : "Nahradit", -DlgReplaceFindLbl : "Co hledat:", -DlgReplaceReplaceLbl : "Čím nahradit:", -DlgReplaceCaseChk : "RozliÅ¡ovat velikost písma", -DlgReplaceReplaceBtn : "Nahradit", -DlgReplaceReplAllBtn : "Nahradit vÅ¡e", -DlgReplaceWordChk : "Pouze celá slova", - -// Paste Operations / Dialog -PasteErrorCut : "BezpeÄnostní nastavení VaÅ¡eho prohlížeÄe nedovolují editoru spustit funkci pro vyjmutí zvoleného textu do schránky. Prosím vyjmÄ›te zvolený text do schránky pomocí klávesnice (Ctrl+X).", -PasteErrorCopy : "BezpeÄnostní nastavení VaÅ¡eho prohlížeÄe nedovolují editoru spustit funkci pro kopírování zvoleného textu do schránky. Prosím zkopírujte zvolený text do schránky pomocí klávesnice (Ctrl+C).", - -PasteAsText : "Vložit jako Äistý text", -PasteFromWord : "Vložit text z Wordu", - -DlgPasteMsg2 : "Do následujícího pole vložte požadovaný obsah pomocí klávesnice (Ctrl+V) a stisknÄ›te OK.", -DlgPasteSec : "Z důvodů nastavení bezpeÄnosti VaÅ¡eho prohlížeÄe nemůže editor pÅ™istupovat přímo do schránky. Obsah schránky prosím vložte znovu do tohoto okna.", -DlgPasteIgnoreFont : "Ignorovat písmo", -DlgPasteRemoveStyles : "Odstranit styly", - -// Color Picker -ColorAutomatic : "Automaticky", -ColorMoreColors : "Více barev...", - -// Document Properties -DocProps : "Vlastnosti dokumentu", - -// Anchor Dialog -DlgAnchorTitle : "Vlastnosti záložky", -DlgAnchorName : "Název záložky", -DlgAnchorErrorName : "Zadejte prosím název záložky", - -// Speller Pages Dialog -DlgSpellNotInDic : "Není ve slovníku", -DlgSpellChangeTo : "ZmÄ›nit na", -DlgSpellBtnIgnore : "PÅ™eskoÄit", -DlgSpellBtnIgnoreAll : "PÅ™eskakovat vÅ¡e", -DlgSpellBtnReplace : "ZamÄ›nit", -DlgSpellBtnReplaceAll : "Zaměňovat vÅ¡e", -DlgSpellBtnUndo : "ZpÄ›t", -DlgSpellNoSuggestions : "- žádné návrhy -", -DlgSpellProgress : "Probíhá kontrola pravopisu...", -DlgSpellNoMispell : "Kontrola pravopisu dokonÄena: Žádné pravopisné chyby nenalezeny", -DlgSpellNoChanges : "Kontrola pravopisu dokonÄena: Beze zmÄ›n", -DlgSpellOneChange : "Kontrola pravopisu dokonÄena: Jedno slovo zmÄ›nÄ›no", -DlgSpellManyChanges : "Kontrola pravopisu dokonÄena: %1 slov zmÄ›nÄ›no", - -IeSpellDownload : "Kontrola pravopisu není nainstalována. Chcete ji nyní stáhnout?", - -// Button Dialog -DlgButtonText : "Popisek", -DlgButtonType : "Typ", -DlgButtonTypeBtn : "TlaÄítko", -DlgButtonTypeSbm : "Odeslat", -DlgButtonTypeRst : "Obnovit", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Název", -DlgCheckboxValue : "Hodnota", -DlgCheckboxSelected : "ZaÅ¡krtnuto", - -// Form Dialog -DlgFormName : "Název", -DlgFormAction : "Akce", -DlgFormMethod : "Metoda", - -// Select Field Dialog -DlgSelectName : "Název", -DlgSelectValue : "Hodnota", -DlgSelectSize : "Velikost", -DlgSelectLines : "Řádků", -DlgSelectChkMulti : "Povolit mnohonásobné výbÄ›ry", -DlgSelectOpAvail : "Dostupná nastavení", -DlgSelectOpText : "Text", -DlgSelectOpValue : "Hodnota", -DlgSelectBtnAdd : "PÅ™idat", -DlgSelectBtnModify : "ZmÄ›nit", -DlgSelectBtnUp : "Nahoru", -DlgSelectBtnDown : "Dolů", -DlgSelectBtnSetValue : "Nastavit jako vybranou hodnotu", -DlgSelectBtnDelete : "Smazat", - -// Textarea Dialog -DlgTextareaName : "Název", -DlgTextareaCols : "Sloupců", -DlgTextareaRows : "Řádků", - -// Text Field Dialog -DlgTextName : "Název", -DlgTextValue : "Hodnota", -DlgTextCharWidth : "Šířka ve znacích", -DlgTextMaxChars : "Maximální poÄet znaků", -DlgTextType : "Typ", -DlgTextTypeText : "Text", -DlgTextTypePass : "Heslo", - -// Hidden Field Dialog -DlgHiddenName : "Název", -DlgHiddenValue : "Hodnota", - -// Bulleted List Dialog -BulletedListProp : "Vlastnosti odrážek", -NumberedListProp : "Vlastnosti Äíslovaného seznamu", -DlgLstStart : "ZaÄátek", -DlgLstType : "Typ", -DlgLstTypeCircle : "Kružnice", -DlgLstTypeDisc : "Kruh", -DlgLstTypeSquare : "ÄŒtverec", -DlgLstTypeNumbers : "Čísla (1, 2, 3)", -DlgLstTypeLCase : "Malá písmena (a, b, c)", -DlgLstTypeUCase : "Velká písmena (A, B, C)", -DlgLstTypeSRoman : "Malé římská Äíslice (i, ii, iii)", -DlgLstTypeLRoman : "Velké římské Äíslice (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Obecné", -DlgDocBackTab : "Pozadí", -DlgDocColorsTab : "Barvy a okraje", -DlgDocMetaTab : "Metadata", - -DlgDocPageTitle : "Titulek stránky", -DlgDocLangDir : "SmÄ›r jazyku", -DlgDocLangDirLTR : "Zleva do prava ", -DlgDocLangDirRTL : "Zprava doleva", -DlgDocLangCode : "Kód jazyku", -DlgDocCharSet : "Znaková sada", -DlgDocCharSetCE : "StÅ™edoevropské jazyky", -DlgDocCharSetCT : "TradiÄní ÄínÅ¡tina (Big5)", -DlgDocCharSetCR : "Cyrilice", -DlgDocCharSetGR : "ŘeÄtina", -DlgDocCharSetJP : "JaponÅ¡tina", -DlgDocCharSetKR : "KorejÅ¡tina", -DlgDocCharSetTR : "TureÄtina", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Západoevropské jazyky", -DlgDocCharSetOther : "Další znaková sada", - -DlgDocDocType : "Typ dokumentu", -DlgDocDocTypeOther : "Jiný typ dokumetu", -DlgDocIncXHTML : "Zahrnou deklarace XHTML", -DlgDocBgColor : "Barva pozadí", -DlgDocBgImage : "URL obrázku na pozadí", -DlgDocBgNoScroll : "Nerolovatelné pozadí", -DlgDocCText : "Text", -DlgDocCLink : "Odkaz", -DlgDocCVisited : "NavÅ¡tívený odkaz", -DlgDocCActive : "Vybraný odkaz", -DlgDocMargins : "Okraje stránky", -DlgDocMaTop : "Horní", -DlgDocMaLeft : "Levý", -DlgDocMaRight : "Pravý", -DlgDocMaBottom : "Dolní", -DlgDocMeIndex : "KlíÄová slova (oddÄ›lená Äárkou)", -DlgDocMeDescr : "Popis dokumentu", -DlgDocMeAuthor : "Autor", -DlgDocMeCopy : "Autorská práva", -DlgDocPreview : "Náhled", - -// Templates Dialog -Templates : "Å ablony", -DlgTemplatesTitle : "Å ablony obsahu", -DlgTemplatesSelMsg : "Prosím zvolte Å¡ablonu pro otevÅ™ení v editoru
    (aktuální obsah editoru bude ztracen):", -DlgTemplatesLoading : "Nahrávám pÅ™eheld Å¡ablon. Prosím Äekejte...", -DlgTemplatesNoTpl : "(Není definována žádná Å¡ablona)", -DlgTemplatesReplace : "Nahradit aktuální obsah", - -// About Dialog -DlgAboutAboutTab : "O aplikaci", -DlgAboutBrowserInfoTab : "Informace o prohlížeÄi", -DlgAboutLicenseTab : "Licence", -DlgAboutVersion : "verze", -DlgAboutInfo : "Více informací získáte na", - -// Div Dialog -DlgDivGeneralTab : "Obecné", -DlgDivAdvancedTab : "Rozšířené", -DlgDivStyle : "Styl", -DlgDivInlineStyle : "Vložený styl" -}; diff --git a/fckeditor/editor/lang/da.js b/fckeditor/editor/lang/da.js deleted file mode 100644 index c0273f59..00000000 --- a/fckeditor/editor/lang/da.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Danish language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Skjul værktøjslinier", -ToolbarExpand : "Vis værktøjslinier", - -// Toolbar Items and Context Menu -Save : "Gem", -NewPage : "Ny side", -Preview : "Vis eksempel", -Cut : "Klip", -Copy : "Kopier", -Paste : "Indsæt", -PasteText : "Indsæt som ikke-formateret tekst", -PasteWord : "Indsæt fra Word", -Print : "Udskriv", -SelectAll : "Vælg alt", -RemoveFormat : "Fjern formatering", -InsertLinkLbl : "Hyperlink", -InsertLink : "Indsæt/rediger hyperlink", -RemoveLink : "Fjern hyperlink", -VisitLink : "Open Link", //MISSING -Anchor : "Indsæt/rediger bogmærke", -AnchorDelete : "Remove Anchor", //MISSING -InsertImageLbl : "Indsæt billede", -InsertImage : "Indsæt/rediger billede", -InsertFlashLbl : "Flash", -InsertFlash : "Indsæt/rediger Flash", -InsertTableLbl : "Table", -InsertTable : "Indsæt/rediger tabel", -InsertLineLbl : "Linie", -InsertLine : "Indsæt vandret linie", -InsertSpecialCharLbl: "Symbol", -InsertSpecialChar : "Indsæt symbol", -InsertSmileyLbl : "Smiley", -InsertSmiley : "Indsæt smiley", -About : "Om FCKeditor", -Bold : "Fed", -Italic : "Kursiv", -Underline : "Understreget", -StrikeThrough : "Overstreget", -Subscript : "Sænket skrift", -Superscript : "Hævet skrift", -LeftJustify : "Venstrestillet", -CenterJustify : "Centreret", -RightJustify : "Højrestillet", -BlockJustify : "Lige margener", -DecreaseIndent : "Formindsk indrykning", -IncreaseIndent : "Forøg indrykning", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "Fortryd", -Redo : "Annuller fortryd", -NumberedListLbl : "Talopstilling", -NumberedList : "Indsæt/fjern talopstilling", -BulletedListLbl : "Punktopstilling", -BulletedList : "Indsæt/fjern punktopstilling", -ShowTableBorders : "Vis tabelkanter", -ShowDetails : "Vis detaljer", -Style : "Typografi", -FontFormat : "Formatering", -Font : "Skrifttype", -FontSize : "Skriftstørrelse", -TextColor : "Tekstfarve", -BGColor : "Baggrundsfarve", -Source : "Kilde", -Find : "Søg", -Replace : "Erstat", -SpellCheck : "Stavekontrol", -UniversalKeyboard : "Universaltastatur", -PageBreakLbl : "Sidskift", -PageBreak : "Indsæt sideskift", - -Form : "Indsæt formular", -Checkbox : "Indsæt afkrydsningsfelt", -RadioButton : "Indsæt alternativknap", -TextField : "Indsæt tekstfelt", -Textarea : "Indsæt tekstboks", -HiddenField : "Indsæt skjult felt", -Button : "Indsæt knap", -SelectionField : "Indsæt liste", -ImageButton : "Indsæt billedknap", - -FitWindow : "Maksimer editor vinduet", -ShowBlocks : "Show Blocks", //MISSING - -// Context Menu -EditLink : "Rediger hyperlink", -CellCM : "Celle", -RowCM : "Række", -ColumnCM : "Kolonne", -InsertRowAfter : "Insert Row After", //MISSING -InsertRowBefore : "Insert Row Before", //MISSING -DeleteRows : "Slet række", -InsertColumnAfter : "Insert Column After", //MISSING -InsertColumnBefore : "Insert Column Before", //MISSING -DeleteColumns : "Slet kolonne", -InsertCellAfter : "Insert Cell After", //MISSING -InsertCellBefore : "Insert Cell Before", //MISSING -DeleteCells : "Slet celle", -MergeCells : "Flet celler", -MergeRight : "Merge Right", //MISSING -MergeDown : "Merge Down", //MISSING -HorizontalSplitCell : "Split Cell Horizontally", //MISSING -VerticalSplitCell : "Split Cell Vertically", //MISSING -TableDelete : "Slet tabel", -CellProperties : "Egenskaber for celle", -TableProperties : "Egenskaber for tabel", -ImageProperties : "Egenskaber for billede", -FlashProperties : "Egenskaber for Flash", - -AnchorProp : "Egenskaber for bogmærke", -ButtonProp : "Egenskaber for knap", -CheckboxProp : "Egenskaber for afkrydsningsfelt", -HiddenFieldProp : "Egenskaber for skjult felt", -RadioButtonProp : "Egenskaber for alternativknap", -ImageButtonProp : "Egenskaber for billedknap", -TextFieldProp : "Egenskaber for tekstfelt", -SelectionFieldProp : "Egenskaber for liste", -TextareaProp : "Egenskaber for tekstboks", -FormProp : "Egenskaber for formular", - -FontFormats : "Normal;Formateret;Adresse;Overskrift 1;Overskrift 2;Overskrift 3;Overskrift 4;Overskrift 5;Overskrift 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Behandler XHTML...", -Done : "Færdig", -PasteWordConfirm : "Den tekst du forsøger at indsætte ser ud til at komme fra Word.
    Vil du rense teksten før den indsættes?", -NotCompatiblePaste : "Denne kommando er tilgændelig i Internet Explorer 5.5 eller senere.
    Vil du indsætte teksten uden at rense den ?", -UnknownToolbarItem : "Ukendt værktøjslinjeobjekt \"%1\"!", -UnknownCommand : "Ukendt kommandonavn \"%1\"!", -NotImplemented : "Kommandoen er ikke implementeret!", -UnknownToolbarSet : "Værktøjslinjen \"%1\" eksisterer ikke!", -NoActiveX : "Din browsers sikkerhedsindstillinger begrænser nogle af editorens muligheder.
    Slå \"Kør ActiveX-objekter og plug-ins\" til, ellers vil du opleve fejl og manglende muligheder.", -BrowseServerBlocked : "Browseren kunne ikke åbne de nødvendige ressourcer!
    Slå pop-up blokering fra.", -DialogBlocked : "Dialogvinduet kunne ikke åbnes!
    Slå pop-up blokering fra.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Annuller", -DlgBtnClose : "Luk", -DlgBtnBrowseServer : "Gennemse...", -DlgAdvancedTag : "Avanceret", -DlgOpOther : "", -DlgInfoTab : "Generelt", -DlgAlertUrl : "Indtast URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Tekstretning", -DlgGenLangDirLtr : "Fra venstre mod højre (LTR)", -DlgGenLangDirRtl : "Fra højre mod venstre (RTL)", -DlgGenLangCode : "Sprogkode", -DlgGenAccessKey : "Genvejstast", -DlgGenName : "Navn", -DlgGenTabIndex : "Tabulator indeks", -DlgGenLongDescr : "Udvidet beskrivelse", -DlgGenClass : "Typografiark", -DlgGenTitle : "Titel", -DlgGenContType : "Indholdstype", -DlgGenLinkCharset : "Tegnsæt", -DlgGenStyle : "Typografi", - -// Image Dialog -DlgImgTitle : "Egenskaber for billede", -DlgImgInfoTab : "Generelt", -DlgImgBtnUpload : "Upload", -DlgImgURL : "URL", -DlgImgUpload : "Upload", -DlgImgAlt : "Alternativ tekst", -DlgImgWidth : "Bredde", -DlgImgHeight : "Højde", -DlgImgLockRatio : "Lås størrelsesforhold", -DlgBtnResetSize : "Nulstil størrelse", -DlgImgBorder : "Ramme", -DlgImgHSpace : "HMargen", -DlgImgVSpace : "VMargen", -DlgImgAlign : "Justering", -DlgImgAlignLeft : "Venstre", -DlgImgAlignAbsBottom: "Absolut nederst", -DlgImgAlignAbsMiddle: "Absolut centreret", -DlgImgAlignBaseline : "Grundlinje", -DlgImgAlignBottom : "Nederst", -DlgImgAlignMiddle : "Centreret", -DlgImgAlignRight : "Højre", -DlgImgAlignTextTop : "Toppen af teksten", -DlgImgAlignTop : "Øverst", -DlgImgPreview : "Vis eksempel", -DlgImgAlertUrl : "Indtast stien til billedet", -DlgImgLinkTab : "Hyperlink", - -// Flash Dialog -DlgFlashTitle : "Egenskaber for Flash", -DlgFlashChkPlay : "Automatisk afspilning", -DlgFlashChkLoop : "Gentagelse", -DlgFlashChkMenu : "Vis Flash menu", -DlgFlashScale : "Skalér", -DlgFlashScaleAll : "Vis alt", -DlgFlashScaleNoBorder : "Ingen ramme", -DlgFlashScaleFit : "Tilpas størrelse", - -// Link Dialog -DlgLnkWindowTitle : "Egenskaber for hyperlink", -DlgLnkInfoTab : "Generelt", -DlgLnkTargetTab : "Mål", - -DlgLnkType : "Hyperlink type", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Bogmærke på denne side", -DlgLnkTypeEMail : "E-mail", -DlgLnkProto : "Protokol", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Vælg et anker", -DlgLnkAnchorByName : "Efter anker navn", -DlgLnkAnchorById : "Efter element Id", -DlgLnkNoAnchors : "(Ingen bogmærker dokumentet)", -DlgLnkEMail : "E-mailadresse", -DlgLnkEMailSubject : "Emne", -DlgLnkEMailBody : "Brødtekst", -DlgLnkUpload : "Upload", -DlgLnkBtnUpload : "Upload", - -DlgLnkTarget : "Mål", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Nyt vindue (_blank)", -DlgLnkTargetParent : "Overordnet ramme (_parent)", -DlgLnkTargetSelf : "Samme vindue (_self)", -DlgLnkTargetTop : "Hele vinduet (_top)", -DlgLnkTargetFrameName : "Destinationsvinduets navn", -DlgLnkPopWinName : "Pop-up vinduets navn", -DlgLnkPopWinFeat : "Egenskaber for pop-up", -DlgLnkPopResize : "Skalering", -DlgLnkPopLocation : "Adresselinje", -DlgLnkPopMenu : "Menulinje", -DlgLnkPopScroll : "Scrollbars", -DlgLnkPopStatus : "Statuslinje", -DlgLnkPopToolbar : "Værktøjslinje", -DlgLnkPopFullScrn : "Fuld skærm (IE)", -DlgLnkPopDependent : "Koblet/dependent (Netscape)", -DlgLnkPopWidth : "Bredde", -DlgLnkPopHeight : "Højde", -DlgLnkPopLeft : "Position fra venstre", -DlgLnkPopTop : "Position fra toppen", - -DlnLnkMsgNoUrl : "Indtast hyperlink URL!", -DlnLnkMsgNoEMail : "Indtast e-mailaddresse!", -DlnLnkMsgNoAnchor : "Vælg bogmærke!", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", //MISSING - -// Color Dialog -DlgColorTitle : "Vælg farve", -DlgColorBtnClear : "Nulstil", -DlgColorHighlight : "Markeret", -DlgColorSelected : "Valgt", - -// Smiley Dialog -DlgSmileyTitle : "Vælg smiley", - -// Special Character Dialog -DlgSpecialCharTitle : "Vælg symbol", - -// Table Dialog -DlgTableTitle : "Egenskaber for tabel", -DlgTableRows : "Rækker", -DlgTableColumns : "Kolonner", -DlgTableBorder : "Rammebredde", -DlgTableAlign : "Justering", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Venstrestillet", -DlgTableAlignCenter : "Centreret", -DlgTableAlignRight : "Højrestillet", -DlgTableWidth : "Bredde", -DlgTableWidthPx : "pixels", -DlgTableWidthPc : "procent", -DlgTableHeight : "Højde", -DlgTableCellSpace : "Celleafstand", -DlgTableCellPad : "Cellemargen", -DlgTableCaption : "Titel", -DlgTableSummary : "Resume", - -// Table Cell Dialog -DlgCellTitle : "Egenskaber for celle", -DlgCellWidth : "Bredde", -DlgCellWidthPx : "pixels", -DlgCellWidthPc : "procent", -DlgCellHeight : "Højde", -DlgCellWordWrap : "Orddeling", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Ja", -DlgCellWordWrapNo : "Nej", -DlgCellHorAlign : "Vandret justering", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Venstrestillet", -DlgCellHorAlignCenter : "Centreret", -DlgCellHorAlignRight: "Højrestillet", -DlgCellVerAlign : "Lodret justering", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Øverst", -DlgCellVerAlignMiddle : "Centreret", -DlgCellVerAlignBottom : "Nederst", -DlgCellVerAlignBaseline : "Grundlinje", -DlgCellRowSpan : "Højde i antal rækker", -DlgCellCollSpan : "Bredde i antal kolonner", -DlgCellBackColor : "Baggrundsfarve", -DlgCellBorderColor : "Rammefarve", -DlgCellBtnSelect : "Vælg...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", //MISSING - -// Find Dialog -DlgFindTitle : "Find", -DlgFindFindBtn : "Find", -DlgFindNotFoundMsg : "Søgeteksten blev ikke fundet!", - -// Replace Dialog -DlgReplaceTitle : "Erstat", -DlgReplaceFindLbl : "Søg efter:", -DlgReplaceReplaceLbl : "Erstat med:", -DlgReplaceCaseChk : "Forskel på store og små bogstaver", -DlgReplaceReplaceBtn : "Erstat", -DlgReplaceReplAllBtn : "Erstat alle", -DlgReplaceWordChk : "Kun hele ord", - -// Paste Operations / Dialog -PasteErrorCut : "Din browsers sikkerhedsindstillinger tillader ikke editoren at klippe tekst automatisk!
    Brug i stedet tastaturet til at klippe teksten (Ctrl+X).", -PasteErrorCopy : "Din browsers sikkerhedsindstillinger tillader ikke editoren at kopiere tekst automatisk!
    Brug i stedet tastaturet til at kopiere teksten (Ctrl+C).", - -PasteAsText : "Indsæt som ikke-formateret tekst", -PasteFromWord : "Indsæt fra Word", - -DlgPasteMsg2 : "Indsæt i feltet herunder (Ctrl+V) og klik OK.", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING -DlgPasteIgnoreFont : "Ignorer font definitioner", -DlgPasteRemoveStyles : "Ignorer typografi", - -// Color Picker -ColorAutomatic : "Automatisk", -ColorMoreColors : "Flere farver...", - -// Document Properties -DocProps : "Egenskaber for dokument", - -// Anchor Dialog -DlgAnchorTitle : "Egenskaber for bogmærke", -DlgAnchorName : "Bogmærke navn", -DlgAnchorErrorName : "Indtast bogmærke navn!", - -// Speller Pages Dialog -DlgSpellNotInDic : "Ikke i ordbogen", -DlgSpellChangeTo : "Forslag", -DlgSpellBtnIgnore : "Ignorer", -DlgSpellBtnIgnoreAll : "Ignorer alle", -DlgSpellBtnReplace : "Erstat", -DlgSpellBtnReplaceAll : "Erstat alle", -DlgSpellBtnUndo : "Tilbage", -DlgSpellNoSuggestions : "- ingen forslag -", -DlgSpellProgress : "Stavekontrolen arbejder...", -DlgSpellNoMispell : "Stavekontrol færdig: Ingen fejl fundet", -DlgSpellNoChanges : "Stavekontrol færdig: Ingen ord ændret", -DlgSpellOneChange : "Stavekontrol færdig: Et ord ændret", -DlgSpellManyChanges : "Stavekontrol færdig: %1 ord ændret", - -IeSpellDownload : "Stavekontrol ikke installeret.
    Vil du hente den nu?", - -// Button Dialog -DlgButtonText : "Tekst", -DlgButtonType : "Type", -DlgButtonTypeBtn : "Button", //MISSING -DlgButtonTypeSbm : "Submit", //MISSING -DlgButtonTypeRst : "Reset", //MISSING - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Navn", -DlgCheckboxValue : "Værdi", -DlgCheckboxSelected : "Valgt", - -// Form Dialog -DlgFormName : "Navn", -DlgFormAction : "Handling", -DlgFormMethod : "Metod", - -// Select Field Dialog -DlgSelectName : "Navn", -DlgSelectValue : "Værdi", -DlgSelectSize : "Størrelse", -DlgSelectLines : "linier", -DlgSelectChkMulti : "Tillad flere valg", -DlgSelectOpAvail : "Valgmuligheder", -DlgSelectOpText : "Tekst", -DlgSelectOpValue : "Værdi", -DlgSelectBtnAdd : "Tilføj", -DlgSelectBtnModify : "Rediger", -DlgSelectBtnUp : "Op", -DlgSelectBtnDown : "Ned", -DlgSelectBtnSetValue : "Sæt som valgt", -DlgSelectBtnDelete : "Slet", - -// Textarea Dialog -DlgTextareaName : "Navn", -DlgTextareaCols : "Kolonner", -DlgTextareaRows : "Rækker", - -// Text Field Dialog -DlgTextName : "Navn", -DlgTextValue : "Værdi", -DlgTextCharWidth : "Bredde (tegn)", -DlgTextMaxChars : "Max antal tegn", -DlgTextType : "Type", -DlgTextTypeText : "Tekst", -DlgTextTypePass : "Adgangskode", - -// Hidden Field Dialog -DlgHiddenName : "Navn", -DlgHiddenValue : "Værdi", - -// Bulleted List Dialog -BulletedListProp : "Egenskaber for punktopstilling", -NumberedListProp : "Egenskaber for talopstilling", -DlgLstStart : "Start", //MISSING -DlgLstType : "Type", -DlgLstTypeCircle : "Cirkel", -DlgLstTypeDisc : "Udfyldt cirkel", -DlgLstTypeSquare : "Firkant", -DlgLstTypeNumbers : "Nummereret (1, 2, 3)", -DlgLstTypeLCase : "Små bogstaver (a, b, c)", -DlgLstTypeUCase : "Store bogstaver (A, B, C)", -DlgLstTypeSRoman : "Små romertal (i, ii, iii)", -DlgLstTypeLRoman : "Store romertal (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Generelt", -DlgDocBackTab : "Baggrund", -DlgDocColorsTab : "Farver og margen", -DlgDocMetaTab : "Metadata", - -DlgDocPageTitle : "Sidetitel", -DlgDocLangDir : "Sprog", -DlgDocLangDirLTR : "Fra venstre mod højre (LTR)", -DlgDocLangDirRTL : "Fra højre mod venstre (RTL)", -DlgDocLangCode : "Landekode", -DlgDocCharSet : "Tegnsæt kode", -DlgDocCharSetCE : "Central European", //MISSING -DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING -DlgDocCharSetCR : "Cyrillic", //MISSING -DlgDocCharSetGR : "Greek", //MISSING -DlgDocCharSetJP : "Japanese", //MISSING -DlgDocCharSetKR : "Korean", //MISSING -DlgDocCharSetTR : "Turkish", //MISSING -DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING -DlgDocCharSetWE : "Western European", //MISSING -DlgDocCharSetOther : "Anden tegnsæt kode", - -DlgDocDocType : "Dokumenttype kategori", -DlgDocDocTypeOther : "Anden dokumenttype kategori", -DlgDocIncXHTML : "Inkludere XHTML deklartion", -DlgDocBgColor : "Baggrundsfarve", -DlgDocBgImage : "Baggrundsbillede URL", -DlgDocBgNoScroll : "Fastlåst baggrund", -DlgDocCText : "Tekst", -DlgDocCLink : "Hyperlink", -DlgDocCVisited : "Besøgt hyperlink", -DlgDocCActive : "Aktivt hyperlink", -DlgDocMargins : "Sidemargen", -DlgDocMaTop : "Øverst", -DlgDocMaLeft : "Venstre", -DlgDocMaRight : "Højre", -DlgDocMaBottom : "Nederst", -DlgDocMeIndex : "Dokument index nøgleord (kommasepareret)", -DlgDocMeDescr : "Dokument beskrivelse", -DlgDocMeAuthor : "Forfatter", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Vis", - -// Templates Dialog -Templates : "Skabeloner", -DlgTemplatesTitle : "Indholdsskabeloner", -DlgTemplatesSelMsg : "Vælg den skabelon, som skal åbnes i editoren.
    (Nuværende indhold vil blive overskrevet!):", -DlgTemplatesLoading : "Henter liste over skabeloner...", -DlgTemplatesNoTpl : "(Der er ikke defineret nogen skabelon!)", -DlgTemplatesReplace : "Replace actual contents", //MISSING - -// About Dialog -DlgAboutAboutTab : "Om", -DlgAboutBrowserInfoTab : "Generelt", -DlgAboutLicenseTab : "Licens", -DlgAboutVersion : "version", -DlgAboutInfo : "For yderlig information gÃ¥ til", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/de.js b/fckeditor/editor/lang/de.js deleted file mode 100644 index 7edd90f9..00000000 --- a/fckeditor/editor/lang/de.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * German language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Symbolleiste einklappen", -ToolbarExpand : "Symbolleiste ausklappen", - -// Toolbar Items and Context Menu -Save : "Speichern", -NewPage : "Neue Seite", -Preview : "Vorschau", -Cut : "Ausschneiden", -Copy : "Kopieren", -Paste : "Einfügen", -PasteText : "aus Textdatei einfügen", -PasteWord : "aus MS-Word einfügen", -Print : "Drucken", -SelectAll : "Alles auswählen", -RemoveFormat : "Formatierungen entfernen", -InsertLinkLbl : "Link", -InsertLink : "Link einfügen/editieren", -RemoveLink : "Link entfernen", -VisitLink : "Link aufrufen", -Anchor : "Anker einfügen/editieren", -AnchorDelete : "Anker entfernen", -InsertImageLbl : "Bild", -InsertImage : "Bild einfügen/editieren", -InsertFlashLbl : "Flash", -InsertFlash : "Flash einfügen/editieren", -InsertTableLbl : "Tabelle", -InsertTable : "Tabelle einfügen/editieren", -InsertLineLbl : "Linie", -InsertLine : "Horizontale Linie einfügen", -InsertSpecialCharLbl: "Sonderzeichen", -InsertSpecialChar : "Sonderzeichen einfügen/editieren", -InsertSmileyLbl : "Smiley", -InsertSmiley : "Smiley einfügen", -About : "Über FCKeditor", -Bold : "Fett", -Italic : "Kursiv", -Underline : "Unterstrichen", -StrikeThrough : "Durchgestrichen", -Subscript : "Tiefgestellt", -Superscript : "Hochgestellt", -LeftJustify : "Linksbündig", -CenterJustify : "Zentriert", -RightJustify : "Rechtsbündig", -BlockJustify : "Blocksatz", -DecreaseIndent : "Einzug verringern", -IncreaseIndent : "Einzug erhöhen", -Blockquote : "Zitatblock", -CreateDiv : "Erzeuge Div Block", -EditDiv : "Bearbeite Div Block", -DeleteDiv : "Entferne Div Block", -Undo : "Rückgängig", -Redo : "Wiederherstellen", -NumberedListLbl : "Nummerierte Liste", -NumberedList : "Nummerierte Liste einfügen/entfernen", -BulletedListLbl : "Liste", -BulletedList : "Liste einfügen/entfernen", -ShowTableBorders : "Zeige Tabellenrahmen", -ShowDetails : "Zeige Details", -Style : "Stil", -FontFormat : "Format", -Font : "Schriftart", -FontSize : "Größe", -TextColor : "Textfarbe", -BGColor : "Hintergrundfarbe", -Source : "Quellcode", -Find : "Suchen", -Replace : "Ersetzen", -SpellCheck : "Rechtschreibprüfung", -UniversalKeyboard : "Universal-Tastatur", -PageBreakLbl : "Seitenumbruch", -PageBreak : "Seitenumbruch einfügen", - -Form : "Formular", -Checkbox : "Checkbox", -RadioButton : "Radiobutton", -TextField : "Textfeld einzeilig", -Textarea : "Textfeld mehrzeilig", -HiddenField : "verstecktes Feld", -Button : "Klickbutton", -SelectionField : "Auswahlfeld", -ImageButton : "Bildbutton", - -FitWindow : "Editor maximieren", -ShowBlocks : "Blöcke anzeigen", - -// Context Menu -EditLink : "Link editieren", -CellCM : "Zelle", -RowCM : "Zeile", -ColumnCM : "Spalte", -InsertRowAfter : "Zeile unterhalb einfügen", -InsertRowBefore : "Zeile oberhalb einfügen", -DeleteRows : "Zeile entfernen", -InsertColumnAfter : "Spalte rechts danach einfügen", -InsertColumnBefore : "Spalte links davor einfügen", -DeleteColumns : "Spalte löschen", -InsertCellAfter : "Zelle danach einfügen", -InsertCellBefore : "Zelle davor einfügen", -DeleteCells : "Zelle löschen", -MergeCells : "Zellen verbinden", -MergeRight : "nach rechts verbinden", -MergeDown : "nach unten verbinden", -HorizontalSplitCell : "Zelle horizontal teilen", -VerticalSplitCell : "Zelle vertikal teilen", -TableDelete : "Tabelle löschen", -CellProperties : "Zellen-Eigenschaften", -TableProperties : "Tabellen-Eigenschaften", -ImageProperties : "Bild-Eigenschaften", -FlashProperties : "Flash-Eigenschaften", - -AnchorProp : "Anker-Eigenschaften", -ButtonProp : "Button-Eigenschaften", -CheckboxProp : "Checkbox-Eigenschaften", -HiddenFieldProp : "Verstecktes Feld-Eigenschaften", -RadioButtonProp : "Optionsfeld-Eigenschaften", -ImageButtonProp : "Bildbutton-Eigenschaften", -TextFieldProp : "Textfeld (einzeilig) Eigenschaften", -SelectionFieldProp : "Auswahlfeld-Eigenschaften", -TextareaProp : "Textfeld (mehrzeilig) Eigenschaften", -FormProp : "Formular-Eigenschaften", - -FontFormats : "Normal;Formatiert;Addresse;Überschrift 1;Überschrift 2;Überschrift 3;Überschrift 4;Überschrift 5;Überschrift 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Bearbeite XHTML. Bitte warten...", -Done : "Fertig", -PasteWordConfirm : "Der Text, den Sie einfügen möchten, scheint aus MS-Word kopiert zu sein. Möchten Sie ihn zuvor bereinigen lassen?", -NotCompatiblePaste : "Diese Funktion steht nur im Internet Explorer ab Version 5.5 zur Verfügung. Möchten Sie den Text unbereinigt einfügen?", -UnknownToolbarItem : "Unbekanntes Menüleisten-Objekt \"%1\"", -UnknownCommand : "Unbekannter Befehl \"%1\"", -NotImplemented : "Befehl nicht implementiert", -UnknownToolbarSet : "Menüleiste \"%1\" existiert nicht", -NoActiveX : "Die Sicherheitseinstellungen Ihres Browsers beschränken evtl. einige Funktionen des Editors. Aktivieren Sie die Option \"ActiveX-Steuerelemente und Plugins ausführen\" in den Sicherheitseinstellungen, um diese Funktionen nutzen zu können", -BrowseServerBlocked : "Ein Auswahlfenster konnte nicht geöffnet werden. Stellen Sie sicher, das alle Popup-Blocker ausgeschaltet sind.", -DialogBlocked : "Das Dialog-Fenster konnte nicht geöffnet werden. Stellen Sie sicher, das alle Popup-Blocker ausgeschaltet sind.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Abbrechen", -DlgBtnClose : "Schließen", -DlgBtnBrowseServer : "Server durchsuchen", -DlgAdvancedTag : "Erweitert", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Bitte tragen Sie die URL ein", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "ID", -DlgGenLangDir : "Schreibrichtung", -DlgGenLangDirLtr : "Links nach Rechts (LTR)", -DlgGenLangDirRtl : "Rechts nach Links (RTL)", -DlgGenLangCode : "Sprachenkürzel", -DlgGenAccessKey : "Zugriffstaste", -DlgGenName : "Name", -DlgGenTabIndex : "Tab-Index", -DlgGenLongDescr : "Langform URL", -DlgGenClass : "Stylesheet Klasse", -DlgGenTitle : "Titel Beschreibung", -DlgGenContType : "Inhaltstyp", -DlgGenLinkCharset : "Ziel-Zeichensatz", -DlgGenStyle : "Style", - -// Image Dialog -DlgImgTitle : "Bild-Eigenschaften", -DlgImgInfoTab : "Bild-Info", -DlgImgBtnUpload : "Zum Server senden", -DlgImgURL : "Bildauswahl", -DlgImgUpload : "Upload", -DlgImgAlt : "Alternativer Text", -DlgImgWidth : "Breite", -DlgImgHeight : "Höhe", -DlgImgLockRatio : "Größenverhältniss beibehalten", -DlgBtnResetSize : "Größe zurücksetzen", -DlgImgBorder : "Rahmen", -DlgImgHSpace : "H-Abstand", -DlgImgVSpace : "V-Abstand", -DlgImgAlign : "Ausrichtung", -DlgImgAlignLeft : "Links", -DlgImgAlignAbsBottom: "Abs Unten", -DlgImgAlignAbsMiddle: "Abs Mitte", -DlgImgAlignBaseline : "Baseline", -DlgImgAlignBottom : "Unten", -DlgImgAlignMiddle : "Mitte", -DlgImgAlignRight : "Rechts", -DlgImgAlignTextTop : "Text Oben", -DlgImgAlignTop : "Oben", -DlgImgPreview : "Vorschau", -DlgImgAlertUrl : "Bitte geben Sie die Bild-URL an", -DlgImgLinkTab : "Link", - -// Flash Dialog -DlgFlashTitle : "Flash-Eigenschaften", -DlgFlashChkPlay : "autom. Abspielen", -DlgFlashChkLoop : "Endlosschleife", -DlgFlashChkMenu : "Flash-Menü aktivieren", -DlgFlashScale : "Skalierung", -DlgFlashScaleAll : "Alles anzeigen", -DlgFlashScaleNoBorder : "ohne Rand", -DlgFlashScaleFit : "Passgenau", - -// Link Dialog -DlgLnkWindowTitle : "Link", -DlgLnkInfoTab : "Link-Info", -DlgLnkTargetTab : "Zielseite", - -DlgLnkType : "Link-Typ", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Anker in dieser Seite", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protokoll", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Anker auswählen", -DlgLnkAnchorByName : "nach Anker Name", -DlgLnkAnchorById : "nach Element Id", -DlgLnkNoAnchors : "(keine Anker im Dokument vorhanden)", -DlgLnkEMail : "E-Mail Addresse", -DlgLnkEMailSubject : "Betreffzeile", -DlgLnkEMailBody : "Nachrichtentext", -DlgLnkUpload : "Upload", -DlgLnkBtnUpload : "Zum Server senden", - -DlgLnkTarget : "Zielseite", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Neues Fenster (_blank)", -DlgLnkTargetParent : "Oberes Fenster (_parent)", -DlgLnkTargetSelf : "Gleiches Fenster (_self)", -DlgLnkTargetTop : "Oberstes Fenster (_top)", -DlgLnkTargetFrameName : "Ziel-Fenster-Name", -DlgLnkPopWinName : "Pop-up Fenster-Name", -DlgLnkPopWinFeat : "Pop-up Fenster-Eigenschaften", -DlgLnkPopResize : "Vergrößerbar", -DlgLnkPopLocation : "Adress-Leiste", -DlgLnkPopMenu : "Menü-Leiste", -DlgLnkPopScroll : "Rollbalken", -DlgLnkPopStatus : "Statusleiste", -DlgLnkPopToolbar : "Werkzeugleiste", -DlgLnkPopFullScrn : "Vollbild (IE)", -DlgLnkPopDependent : "Abhängig (Netscape)", -DlgLnkPopWidth : "Breite", -DlgLnkPopHeight : "Höhe", -DlgLnkPopLeft : "Linke Position", -DlgLnkPopTop : "Obere Position", - -DlnLnkMsgNoUrl : "Bitte geben Sie die Link-URL an", -DlnLnkMsgNoEMail : "Bitte geben Sie e-Mail Adresse an", -DlnLnkMsgNoAnchor : "Bitte wählen Sie einen Anker aus", -DlnLnkMsgInvPopName : "Der Name des Popups muss mit einem Buchstaben beginnen und darf keine Leerzeichen enthalten", - -// Color Dialog -DlgColorTitle : "Farbauswahl", -DlgColorBtnClear : "Keine Farbe", -DlgColorHighlight : "Vorschau", -DlgColorSelected : "Ausgewählt", - -// Smiley Dialog -DlgSmileyTitle : "Smiley auswählen", - -// Special Character Dialog -DlgSpecialCharTitle : "Sonderzeichen auswählen", - -// Table Dialog -DlgTableTitle : "Tabellen-Eigenschaften", -DlgTableRows : "Zeile", -DlgTableColumns : "Spalte", -DlgTableBorder : "Rahmen", -DlgTableAlign : "Ausrichtung", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Links", -DlgTableAlignCenter : "Zentriert", -DlgTableAlignRight : "Rechts", -DlgTableWidth : "Breite", -DlgTableWidthPx : "Pixel", -DlgTableWidthPc : "%", -DlgTableHeight : "Höhe", -DlgTableCellSpace : "Zellenabstand außen", -DlgTableCellPad : "Zellenabstand innen", -DlgTableCaption : "Überschrift", -DlgTableSummary : "Inhaltsübersicht", - -// Table Cell Dialog -DlgCellTitle : "Zellen-Eigenschaften", -DlgCellWidth : "Breite", -DlgCellWidthPx : "Pixel", -DlgCellWidthPc : "%", -DlgCellHeight : "Höhe", -DlgCellWordWrap : "Umbruch", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Ja", -DlgCellWordWrapNo : "Nein", -DlgCellHorAlign : "Horizontale Ausrichtung", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Links", -DlgCellHorAlignCenter : "Zentriert", -DlgCellHorAlignRight: "Rechts", -DlgCellVerAlign : "Vertikale Ausrichtung", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Oben", -DlgCellVerAlignMiddle : "Mitte", -DlgCellVerAlignBottom : "Unten", -DlgCellVerAlignBaseline : "Grundlinie", -DlgCellRowSpan : "Zeilen zusammenfassen", -DlgCellCollSpan : "Spalten zusammenfassen", -DlgCellBackColor : "Hintergrundfarbe", -DlgCellBorderColor : "Rahmenfarbe", -DlgCellBtnSelect : "Auswahl...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Suchen und Ersetzen", - -// Find Dialog -DlgFindTitle : "Finden", -DlgFindFindBtn : "Finden", -DlgFindNotFoundMsg : "Der gesuchte Text wurde nicht gefunden.", - -// Replace Dialog -DlgReplaceTitle : "Ersetzen", -DlgReplaceFindLbl : "Suche nach:", -DlgReplaceReplaceLbl : "Ersetze mit:", -DlgReplaceCaseChk : "Groß-Kleinschreibung beachten", -DlgReplaceReplaceBtn : "Ersetzen", -DlgReplaceReplAllBtn : "Alle Ersetzen", -DlgReplaceWordChk : "Nur ganze Worte suchen", - -// Paste Operations / Dialog -PasteErrorCut : "Die Sicherheitseinstellungen Ihres Browsers lassen es nicht zu, den Text automatisch auszuschneiden. Bitte benutzen Sie die System-Zwischenablage über STRG-X (ausschneiden) und STRG-V (einfügen).", -PasteErrorCopy : "Die Sicherheitseinstellungen Ihres Browsers lassen es nicht zu, den Text automatisch kopieren. Bitte benutzen Sie die System-Zwischenablage über STRG-C (kopieren).", - -PasteAsText : "Als Text einfügen", -PasteFromWord : "Aus Word einfügen", - -DlgPasteMsg2 : "Bitte fügen Sie den Text in der folgenden Box über die Tastatur (mit Strg+V) ein und bestätigen Sie mit OK.", -DlgPasteSec : "Aufgrund von Sicherheitsbeschränkungen Ihres Browsers kann der Editor nicht direkt auf die Zwischenablage zugreifen. Bitte fügen Sie den Inhalt erneut in diesem Fenster ein.", -DlgPasteIgnoreFont : "Ignoriere Schriftart-Definitionen", -DlgPasteRemoveStyles : "Entferne Style-Definitionen", - -// Color Picker -ColorAutomatic : "Automatisch", -ColorMoreColors : "Weitere Farben...", - -// Document Properties -DocProps : "Dokument-Eigenschaften", - -// Anchor Dialog -DlgAnchorTitle : "Anker-Eigenschaften", -DlgAnchorName : "Anker Name", -DlgAnchorErrorName : "Bitte geben Sie den Namen des Ankers ein", - -// Speller Pages Dialog -DlgSpellNotInDic : "Nicht im Wörterbuch", -DlgSpellChangeTo : "Ändern in", -DlgSpellBtnIgnore : "Ignorieren", -DlgSpellBtnIgnoreAll : "Alle Ignorieren", -DlgSpellBtnReplace : "Ersetzen", -DlgSpellBtnReplaceAll : "Alle Ersetzen", -DlgSpellBtnUndo : "Rückgängig", -DlgSpellNoSuggestions : " - keine Vorschläge - ", -DlgSpellProgress : "Rechtschreibprüfung läuft...", -DlgSpellNoMispell : "Rechtschreibprüfung abgeschlossen - keine Fehler gefunden", -DlgSpellNoChanges : "Rechtschreibprüfung abgeschlossen - keine Worte geändert", -DlgSpellOneChange : "Rechtschreibprüfung abgeschlossen - ein Wort geändert", -DlgSpellManyChanges : "Rechtschreibprüfung abgeschlossen - %1 Wörter geändert", - -IeSpellDownload : "Rechtschreibprüfung nicht installiert. Möchten Sie sie jetzt herunterladen?", - -// Button Dialog -DlgButtonText : "Text (Wert)", -DlgButtonType : "Typ", -DlgButtonTypeBtn : "Button", -DlgButtonTypeSbm : "Absenden", -DlgButtonTypeRst : "Zurücksetzen", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Name", -DlgCheckboxValue : "Wert", -DlgCheckboxSelected : "ausgewählt", - -// Form Dialog -DlgFormName : "Name", -DlgFormAction : "Action", -DlgFormMethod : "Method", - -// Select Field Dialog -DlgSelectName : "Name", -DlgSelectValue : "Wert", -DlgSelectSize : "Größe", -DlgSelectLines : "Linien", -DlgSelectChkMulti : "Erlaube Mehrfachauswahl", -DlgSelectOpAvail : "Mögliche Optionen", -DlgSelectOpText : "Text", -DlgSelectOpValue : "Wert", -DlgSelectBtnAdd : "Hinzufügen", -DlgSelectBtnModify : "Ändern", -DlgSelectBtnUp : "Hoch", -DlgSelectBtnDown : "Runter", -DlgSelectBtnSetValue : "Setze als Standardwert", -DlgSelectBtnDelete : "Entfernen", - -// Textarea Dialog -DlgTextareaName : "Name", -DlgTextareaCols : "Spalten", -DlgTextareaRows : "Reihen", - -// Text Field Dialog -DlgTextName : "Name", -DlgTextValue : "Wert", -DlgTextCharWidth : "Zeichenbreite", -DlgTextMaxChars : "Max. Zeichen", -DlgTextType : "Typ", -DlgTextTypeText : "Text", -DlgTextTypePass : "Passwort", - -// Hidden Field Dialog -DlgHiddenName : "Name", -DlgHiddenValue : "Wert", - -// Bulleted List Dialog -BulletedListProp : "Listen-Eigenschaften", -NumberedListProp : "Nummerierte Listen-Eigenschaften", -DlgLstStart : "Start", -DlgLstType : "Typ", -DlgLstTypeCircle : "Ring", -DlgLstTypeDisc : "Kreis", -DlgLstTypeSquare : "Quadrat", -DlgLstTypeNumbers : "Nummern (1, 2, 3)", -DlgLstTypeLCase : "Kleinbuchstaben (a, b, c)", -DlgLstTypeUCase : "Großbuchstaben (A, B, C)", -DlgLstTypeSRoman : "Kleine römische Zahlen (i, ii, iii)", -DlgLstTypeLRoman : "Große römische Zahlen (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Allgemein", -DlgDocBackTab : "Hintergrund", -DlgDocColorsTab : "Farben und Abstände", -DlgDocMetaTab : "Metadaten", - -DlgDocPageTitle : "Seitentitel", -DlgDocLangDir : "Schriftrichtung", -DlgDocLangDirLTR : "Links nach Rechts", -DlgDocLangDirRTL : "Rechts nach Links", -DlgDocLangCode : "Sprachkürzel", -DlgDocCharSet : "Zeichenkodierung", -DlgDocCharSetCE : "Zentraleuropäisch", -DlgDocCharSetCT : "traditionell Chinesisch (Big5)", -DlgDocCharSetCR : "Kyrillisch", -DlgDocCharSetGR : "Griechisch", -DlgDocCharSetJP : "Japanisch", -DlgDocCharSetKR : "Koreanisch", -DlgDocCharSetTR : "Türkisch", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Westeuropäisch", -DlgDocCharSetOther : "Andere Zeichenkodierung", - -DlgDocDocType : "Dokumententyp", -DlgDocDocTypeOther : "Anderer Dokumententyp", -DlgDocIncXHTML : "Beziehe XHTML Deklarationen ein", -DlgDocBgColor : "Hintergrundfarbe", -DlgDocBgImage : "Hintergrundbild URL", -DlgDocBgNoScroll : "feststehender Hintergrund", -DlgDocCText : "Text", -DlgDocCLink : "Link", -DlgDocCVisited : "Besuchter Link", -DlgDocCActive : "Aktiver Link", -DlgDocMargins : "Seitenränder", -DlgDocMaTop : "Oben", -DlgDocMaLeft : "Links", -DlgDocMaRight : "Rechts", -DlgDocMaBottom : "Unten", -DlgDocMeIndex : "Schlüsselwörter (durch Komma getrennt)", -DlgDocMeDescr : "Dokument-Beschreibung", -DlgDocMeAuthor : "Autor", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Vorschau", - -// Templates Dialog -Templates : "Vorlagen", -DlgTemplatesTitle : "Vorlagen", -DlgTemplatesSelMsg : "Klicken Sie auf eine Vorlage, um sie im Editor zu öffnen (der aktuelle Inhalt wird dabei gelöscht!):", -DlgTemplatesLoading : "Liste der Vorlagen wird geladen. Bitte warten...", -DlgTemplatesNoTpl : "(keine Vorlagen definiert)", -DlgTemplatesReplace : "Aktuellen Inhalt ersetzen", - -// About Dialog -DlgAboutAboutTab : "Über", -DlgAboutBrowserInfoTab : "Browser-Info", -DlgAboutLicenseTab : "Lizenz", -DlgAboutVersion : "Version", -DlgAboutInfo : "Für weitere Informationen siehe", - -// Div Dialog -DlgDivGeneralTab : "Allgemein", -DlgDivAdvancedTab : "Erweitert", -DlgDivStyle : "Style", -DlgDivInlineStyle : "Inline Style" -}; diff --git a/fckeditor/editor/lang/el.js b/fckeditor/editor/lang/el.js deleted file mode 100644 index e62ded66..00000000 --- a/fckeditor/editor/lang/el.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Greek language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "ΑπόκÏυψη ΜπάÏας ΕÏγαλείων", -ToolbarExpand : "Εμφάνιση ΜπάÏας ΕÏγαλείων", - -// Toolbar Items and Context Menu -Save : "Αποθήκευση", -NewPage : "Îέα Σελίδα", -Preview : "ΠÏοεπισκόπιση", -Cut : "Αποκοπή", -Copy : "ΑντιγÏαφή", -Paste : "Επικόλληση", -PasteText : "Επικόλληση (απλό κείμενο)", -PasteWord : "Επικόλληση από το Word", -Print : "ΕκτÏπωση", -SelectAll : "Επιλογή όλων", -RemoveFormat : "ΑφαίÏεση ΜοÏφοποίησης", -InsertLinkLbl : "ΣÏνδεσμος (Link)", -InsertLink : "Εισαγωγή/Μεταβολή Συνδέσμου (Link)", -RemoveLink : "ΑφαίÏεση Συνδέσμου (Link)", -VisitLink : "Open Link", //MISSING -Anchor : "Εισαγωγή/επεξεÏγασία Anchor", -AnchorDelete : "Remove Anchor", //MISSING -InsertImageLbl : "Εικόνα", -InsertImage : "Εισαγωγή/Μεταβολή Εικόνας", -InsertFlashLbl : "Εισαγωγή Flash", -InsertFlash : "Εισαγωγή/επεξεÏγασία Flash", -InsertTableLbl : "Πίνακας", -InsertTable : "Εισαγωγή/Μεταβολή Πίνακα", -InsertLineLbl : "ΓÏαμμή", -InsertLine : "Εισαγωγή ΟÏιζόντιας ΓÏαμμής", -InsertSpecialCharLbl: "Ειδικό ΣÏμβολο", -InsertSpecialChar : "Εισαγωγή Î•Î¹Î´Î¹ÎºÎ¿Ï Î£Ï…Î¼Î²ÏŒÎ»Î¿Ï…", -InsertSmileyLbl : "Smiley", -InsertSmiley : "Εισαγωγή Smiley", -About : "ΠεÏί του FCKeditor", -Bold : "Έντονα", -Italic : "Πλάγια", -Underline : "ΥπογÏάμμιση", -StrikeThrough : "ΔιαγÏάμμιση", -Subscript : "Δείκτης", -Superscript : "Εκθέτης", -LeftJustify : "Στοίχιση ΑÏιστεÏά", -CenterJustify : "Στοίχιση στο ΚέντÏο", -RightJustify : "Στοίχιση Δεξιά", -BlockJustify : "ΠλήÏης Στοίχιση (Block)", -DecreaseIndent : "Μείωση Εσοχής", -IncreaseIndent : "ΑÏξηση Εσοχής", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "ΑναίÏεση", -Redo : "ΕπαναφοÏά", -NumberedListLbl : "Λίστα με ΑÏιθμοÏÏ‚", -NumberedList : "Εισαγωγή/ΔιαγÏαφή Λίστας με ΑÏιθμοÏÏ‚", -BulletedListLbl : "Λίστα με Bullets", -BulletedList : "Εισαγωγή/ΔιαγÏαφή Λίστας με Bullets", -ShowTableBorders : "ΠÏοβολή ΟÏίων Πίνακα", -ShowDetails : "ΠÏοβολή ΛεπτομεÏειών", -Style : "Στυλ", -FontFormat : "ΜοÏφή ΓÏαμματοσειÏάς", -Font : "ΓÏαμματοσειÏά", -FontSize : "Μέγεθος", -TextColor : "ΧÏώμα ΓÏαμμάτων", -BGColor : "ΧÏώμα ΥποβάθÏου", -Source : "HTML κώδικας", -Find : "Αναζήτηση", -Replace : "Αντικατάσταση", -SpellCheck : "ΟÏθογÏαφικός έλεγχος", -UniversalKeyboard : "Διεθνής πληκτÏολόγιο", -PageBreakLbl : "Τέλος σελίδας", -PageBreak : "Εισαγωγή τέλους σελίδας", - -Form : "ΦόÏμα", -Checkbox : "Κουτί επιλογής", -RadioButton : "Κουμπί Radio", -TextField : "Πεδίο κειμένου", -Textarea : "ΠεÏιοχή κειμένου", -HiddenField : "ΚÏυφό πεδίο", -Button : "Κουμπί", -SelectionField : "Πεδίο επιλογής", -ImageButton : "Κουμπί εικόνας", - -FitWindow : "Μεγιστοποίηση Ï€ÏογÏάμματος", -ShowBlocks : "Show Blocks", //MISSING - -// Context Menu -EditLink : "Μεταβολή Συνδέσμου (Link)", -CellCM : "Κελί", -RowCM : "ΣειÏά", -ColumnCM : "Στήλη", -InsertRowAfter : "Insert Row After", //MISSING -InsertRowBefore : "Insert Row Before", //MISSING -DeleteRows : "ΔιαγÏαφή ΓÏαμμών", -InsertColumnAfter : "Insert Column After", //MISSING -InsertColumnBefore : "Insert Column Before", //MISSING -DeleteColumns : "ΔιαγÏαφή Κολωνών", -InsertCellAfter : "Insert Cell After", //MISSING -InsertCellBefore : "Insert Cell Before", //MISSING -DeleteCells : "ΔιαγÏαφή Κελιών", -MergeCells : "Ενοποίηση Κελιών", -MergeRight : "Merge Right", //MISSING -MergeDown : "Merge Down", //MISSING -HorizontalSplitCell : "Split Cell Horizontally", //MISSING -VerticalSplitCell : "Split Cell Vertically", //MISSING -TableDelete : "ΔιαγÏαφή πίνακα", -CellProperties : "Ιδιότητες ΚελιοÏ", -TableProperties : "Ιδιότητες Πίνακα", -ImageProperties : "Ιδιότητες Εικόνας", -FlashProperties : "Ιδιότητες Flash", - -AnchorProp : "Ιδιότητες άγκυÏας", -ButtonProp : "Ιδιότητες κουμπιοÏ", -CheckboxProp : "Ιδιότητες ÎºÎ¿Ï…Î¼Ï€Î¹Î¿Ï ÎµÏ€Î¹Î»Î¿Î³Î®Ï‚", -HiddenFieldProp : "Ιδιότητες κÏÏ…Ï†Î¿Ï Ï€ÎµÎ´Î¯Î¿Ï…", -RadioButtonProp : "Ιδιότητες ÎºÎ¿Ï…Î¼Ï€Î¹Î¿Ï radio", -ImageButtonProp : "Ιδιότητες ÎºÎ¿Ï…Î¼Ï€Î¹Î¿Ï ÎµÎ¹ÎºÏŒÎ½Î±Ï‚", -TextFieldProp : "Ιδιότητες πεδίου κειμένου", -SelectionFieldProp : "Ιδιότητες πεδίου επιλογής", -TextareaProp : "Ιδιότητες πεÏιοχής κειμένου", -FormProp : "Ιδιότητες φόÏμας", - -FontFormats : "Κανονικό;ΜοÏφοποιημένο;ΔιεÏθυνση;Επικεφαλίδα 1;Επικεφαλίδα 2;Επικεφαλίδα 3;Επικεφαλίδα 4;Επικεφαλίδα 5;Επικεφαλίδα 6", - -// Alerts and Messages -ProcessingXHTML : "ΕπεξεÏγασία XHTML. ΠαÏακαλώ πεÏιμένετε...", -Done : "Έτοιμο", -PasteWordConfirm : "Το κείμενο που θέλετε να επικολήσετε, φαίνεται πως Ï€ÏοέÏχεται από το Word. Θέλετε να καθαÏιστεί Ï€Ïιν επικοληθεί;", -NotCompatiblePaste : "Αυτή η επιλογή είναι διαθέσιμη στον Internet Explorer έκδοση 5.5+. Θέλετε να γίνει η επικόλληση χωÏίς καθαÏισμό;", -UnknownToolbarItem : "Άγνωστο αντικείμενο της μπάÏας εÏγαλείων \"%1\"", -UnknownCommand : "Άγνωστή εντολή \"%1\"", -NotImplemented : "Η εντολή δεν έχει ενεÏγοποιηθεί", -UnknownToolbarSet : "Η μπάÏα εÏγαλείων \"%1\" δεν υπάÏχει", -NoActiveX : "Οι Ïυθμίσεις ασφαλείας του browser σας μποÏεί να πεÏιοÏίσουν κάποιες Ïυθμίσεις του Ï€ÏογÏάμματος. ΧÏειάζεται να ενεÏγοποιήσετε την επιλογή \"Run ActiveX controls and plug-ins\". Ίσως παÏουσιαστοÏν λάθη και παÏατηÏήσετε ελειπείς λειτουÏγίες.", -BrowseServerBlocked : "Οι πόÏοι του browser σας δεν είναι Ï€Ïοσπελάσιμοι. ΣιγουÏευτείτε ότι δεν υπάÏχουν ενεÏγοί popup blockers.", -DialogBlocked : "Δεν ήταν δυνατό να ανοίξει το παÏάθυÏο διαλόγου. ΣιγουÏευτείτε ότι δεν υπάÏχουν ενεÏγοί popup blockers.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "ΑκÏÏωση", -DlgBtnClose : "Κλείσιμο", -DlgBtnBrowseServer : "ΕξεÏεÏνηση διακομιστή", -DlgAdvancedTag : "Για Ï€ÏοχωÏημένους", -DlgOpOther : "<Άλλα>", -DlgInfoTab : "ΠληÏοφοÏίες", -DlgAlertUrl : "ΠαÏακαλώ εισάγετε URL", - -// General Dialogs Labels -DlgGenNotSet : "<χωÏίς>", -DlgGenId : "Id", -DlgGenLangDir : "ΚατεÏθυνση κειμένου", -DlgGenLangDirLtr : "ΑÏιστεÏά Ï€Ïος Δεξιά (LTR)", -DlgGenLangDirRtl : "Δεξιά Ï€Ïος ΑÏιστεÏά (RTL)", -DlgGenLangCode : "Κωδικός Γλώσσας", -DlgGenAccessKey : "Συντόμευση (Access Key)", -DlgGenName : "Όνομα", -DlgGenTabIndex : "Tab Index", -DlgGenLongDescr : "Αναλυτική πεÏιγÏαφή URL", -DlgGenClass : "Stylesheet Classes", -DlgGenTitle : "Συμβουλευτικός τίτλος", -DlgGenContType : "Συμβουλευτικός τίτλος πεÏιεχομένου", -DlgGenLinkCharset : "Linked Resource Charset", -DlgGenStyle : "ΣτÏλ", - -// Image Dialog -DlgImgTitle : "Ιδιότητες Εικόνας", -DlgImgInfoTab : "ΠληÏοφοÏίες Εικόνας", -DlgImgBtnUpload : "Αποστολή στον Διακομιστή", -DlgImgURL : "URL", -DlgImgUpload : "Αποστολή", -DlgImgAlt : "Εναλλακτικό Κείμενο (ALT)", -DlgImgWidth : "Πλάτος", -DlgImgHeight : "Ύψος", -DlgImgLockRatio : "Κλείδωμα Αναλογίας", -DlgBtnResetSize : "ΕπαναφοÏά ΑÏÏ‡Î¹ÎºÎ¿Ï ÎœÎµÎ³Î­Î¸Î¿Ï…Ï‚", -DlgImgBorder : "ΠεÏιθώÏιο", -DlgImgHSpace : "ΟÏιζόντιος ΧώÏος (HSpace)", -DlgImgVSpace : "Κάθετος ΧώÏος (VSpace)", -DlgImgAlign : "ΕυθυγÏάμμιση (Align)", -DlgImgAlignLeft : "ΑÏιστεÏά", -DlgImgAlignAbsBottom: "Απόλυτα Κάτω (Abs Bottom)", -DlgImgAlignAbsMiddle: "Απόλυτα στη Μέση (Abs Middle)", -DlgImgAlignBaseline : "ΓÏαμμή Βάσης (Baseline)", -DlgImgAlignBottom : "Κάτω (Bottom)", -DlgImgAlignMiddle : "Μέση (Middle)", -DlgImgAlignRight : "Δεξιά (Right)", -DlgImgAlignTextTop : "ΚοÏυφή Κειμένου (Text Top)", -DlgImgAlignTop : "Πάνω (Top)", -DlgImgPreview : "ΠÏοεπισκόπιση", -DlgImgAlertUrl : "Εισάγετε την τοποθεσία (URL) της εικόνας", -DlgImgLinkTab : "ΣÏνδεσμος", - -// Flash Dialog -DlgFlashTitle : "Ιδιότητες flash", -DlgFlashChkPlay : "Αυτόματη έναÏξη", -DlgFlashChkLoop : "Επανάληψη", -DlgFlashChkMenu : "ΕνεÏγοποίηση Flash Menu", -DlgFlashScale : "Κλίμακα", -DlgFlashScaleAll : "Εμφάνιση όλων", -DlgFlashScaleNoBorder : "ΧωÏίς ÏŒÏια", -DlgFlashScaleFit : "ΑκÏιβής εφαÏμογή", - -// Link Dialog -DlgLnkWindowTitle : "ΣÏνδεσμος (Link)", -DlgLnkInfoTab : "Link", -DlgLnkTargetTab : "ΠαÏάθυÏο Στόχος (Target)", - -DlgLnkType : "ΤÏπος συνδέσμου (Link)", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "ΆγκυÏα σε αυτή τη σελίδα", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "ΠÏοτόκολο", -DlgLnkProtoOther : "<άλλο>", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Επιλέξτε μια άγκυÏα", -DlgLnkAnchorByName : "Βάσει του Ονόματος (Name) της άγκυÏας", -DlgLnkAnchorById : "Βάσει του Element Id", -DlgLnkNoAnchors : "(Δεν υπάÏχουν άγκυÏες στο κείμενο)", -DlgLnkEMail : "ΔιεÏθυνση ΗλεκτÏÎ¿Î½Î¹ÎºÎ¿Ï Î¤Î±Ï‡Ï…Î´Ïομείου", -DlgLnkEMailSubject : "Θέμα ΜηνÏματος", -DlgLnkEMailBody : "Κείμενο ΜηνÏματος", -DlgLnkUpload : "Αποστολή", -DlgLnkBtnUpload : "Αποστολή στον Διακομιστή", - -DlgLnkTarget : "ΠαÏάθυÏο Στόχος (Target)", -DlgLnkTargetFrame : "<πλαίσιο>", -DlgLnkTargetPopup : "<παÏάθυÏο popup>", -DlgLnkTargetBlank : "Îέο ΠαÏάθυÏο (_blank)", -DlgLnkTargetParent : "Γονικό ΠαÏάθυÏο (_parent)", -DlgLnkTargetSelf : "Ίδιο ΠαÏάθυÏο (_self)", -DlgLnkTargetTop : "Ανώτατο ΠαÏάθυÏο (_top)", -DlgLnkTargetFrameName : "Όνομα πλαισίου στόχου", -DlgLnkPopWinName : "Όνομα Popup Window", -DlgLnkPopWinFeat : "Επιλογές Popup Window", -DlgLnkPopResize : "Με αλλαγή Μεγέθους", -DlgLnkPopLocation : "ΜπάÏα Τοποθεσίας", -DlgLnkPopMenu : "ΜπάÏα Menu", -DlgLnkPopScroll : "ΜπάÏες ΚÏλισης", -DlgLnkPopStatus : "ΜπάÏα Status", -DlgLnkPopToolbar : "ΜπάÏα ΕÏγαλείων", -DlgLnkPopFullScrn : "ΟλόκληÏη η Οθόνη (IE)", -DlgLnkPopDependent : "Dependent (Netscape)", -DlgLnkPopWidth : "Πλάτος", -DlgLnkPopHeight : "Ύψος", -DlgLnkPopLeft : "Τοποθεσία ΑÏιστεÏής ΆκÏης", -DlgLnkPopTop : "Τοποθεσία Πάνω ΆκÏης", - -DlnLnkMsgNoUrl : "Εισάγετε την τοποθεσία (URL) του υπεÏσυνδέσμου (Link)", -DlnLnkMsgNoEMail : "Εισάγετε την διεÏθυνση ηλεκτÏÎ¿Î½Î¹ÎºÎ¿Ï Ï„Î±Ï‡Ï…Î´Ïομείου", -DlnLnkMsgNoAnchor : "Επιλέξτε ένα Anchor", -DlnLnkMsgInvPopName : "Το όνομα του popup Ï€Ïέπει να αÏχίζει με χαÏακτήÏα της αλφαβήτου και να μην πεÏιέχει κενά", - -// Color Dialog -DlgColorTitle : "Επιλογή χÏώματος", -DlgColorBtnClear : "ΚαθαÏισμός", -DlgColorHighlight : "ΠÏοεπισκόπιση", -DlgColorSelected : "Επιλεγμένο", - -// Smiley Dialog -DlgSmileyTitle : "Επιλέξτε ένα Smiley", - -// Special Character Dialog -DlgSpecialCharTitle : "Επιλέξτε ένα Ειδικό ΣÏμβολο", - -// Table Dialog -DlgTableTitle : "Ιδιότητες Πίνακα", -DlgTableRows : "ΓÏαμμές", -DlgTableColumns : "Κολώνες", -DlgTableBorder : "Μέγεθος ΠεÏιθωÏίου", -DlgTableAlign : "Στοίχιση", -DlgTableAlignNotSet : "<χωÏίς>", -DlgTableAlignLeft : "ΑÏιστεÏά", -DlgTableAlignCenter : "ΚέντÏο", -DlgTableAlignRight : "Δεξιά", -DlgTableWidth : "Πλάτος", -DlgTableWidthPx : "pixels", -DlgTableWidthPc : "\%", -DlgTableHeight : "Ύψος", -DlgTableCellSpace : "Απόσταση κελιών", -DlgTableCellPad : "Γέμισμα κελιών", -DlgTableCaption : "ΥπέÏτιτλος", -DlgTableSummary : "ΠεÏίληψη", - -// Table Cell Dialog -DlgCellTitle : "Ιδιότητες ΚελιοÏ", -DlgCellWidth : "Πλάτος", -DlgCellWidthPx : "pixels", -DlgCellWidthPc : "\%", -DlgCellHeight : "Ύψος", -DlgCellWordWrap : "Με αλλαγή γÏαμμής", -DlgCellWordWrapNotSet : "<χωÏίς>", -DlgCellWordWrapYes : "Îαι", -DlgCellWordWrapNo : "Όχι", -DlgCellHorAlign : "ΟÏιζόντια Στοίχιση", -DlgCellHorAlignNotSet : "<χωÏίς>", -DlgCellHorAlignLeft : "ΑÏιστεÏά", -DlgCellHorAlignCenter : "ΚέντÏο", -DlgCellHorAlignRight: "Δεξιά", -DlgCellVerAlign : "Κάθετη Στοίχιση", -DlgCellVerAlignNotSet : "<χωÏίς>", -DlgCellVerAlignTop : "Πάνω (Top)", -DlgCellVerAlignMiddle : "Μέση (Middle)", -DlgCellVerAlignBottom : "Κάτω (Bottom)", -DlgCellVerAlignBaseline : "ΓÏαμμή Βάσης (Baseline)", -DlgCellRowSpan : "ΑÏιθμός ΓÏαμμών (Rows Span)", -DlgCellCollSpan : "ΑÏιθμός Κολωνών (Columns Span)", -DlgCellBackColor : "ΧÏώμα ΥποβάθÏου", -DlgCellBorderColor : "ΧÏώμα ΠεÏιθωÏίου", -DlgCellBtnSelect : "Επιλογή...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", //MISSING - -// Find Dialog -DlgFindTitle : "Αναζήτηση", -DlgFindFindBtn : "Αναζήτηση", -DlgFindNotFoundMsg : "Το κείμενο δεν βÏέθηκε.", - -// Replace Dialog -DlgReplaceTitle : "Αντικατάσταση", -DlgReplaceFindLbl : "Αναζήτηση:", -DlgReplaceReplaceLbl : "Αντικατάσταση με:", -DlgReplaceCaseChk : "Έλεγχος πεζών/κεφαλαίων", -DlgReplaceReplaceBtn : "Αντικατάσταση", -DlgReplaceReplAllBtn : "Αντικατάσταση Όλων", -DlgReplaceWordChk : "ΕÏÏεση πλήÏους λέξης", - -// Paste Operations / Dialog -PasteErrorCut : "Οι Ïυθμίσεις ασφαλείας του φυλλομετÏητή σας δεν επιτÏέπουν την επιλεγμένη εÏγασία αποκοπής. ΧÏησιμοποιείστε το πληκτÏολόγιο (Ctrl+X).", -PasteErrorCopy : "Οι Ïυθμίσεις ασφαλείας του φυλλομετÏητή σας δεν επιτÏέπουν την επιλεγμένη εÏγασία αντιγÏαφής. ΧÏησιμοποιείστε το πληκτÏολόγιο (Ctrl+C).", - -PasteAsText : "Επικόλληση ως Απλό Κείμενο", -PasteFromWord : "Επικόλληση από το Word", - -DlgPasteMsg2 : "ΠαÏακαλώ επικολήστε στο ακόλουθο κουτί χÏησιμοποιόντας το πληκτÏολόγιο (Ctrl+V) και πατήστε OK.", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING -DlgPasteIgnoreFont : "Αγνόηση Ï€ÏοδιαγÏαφών γÏαμματοσειÏάς", -DlgPasteRemoveStyles : "ΑφαίÏεση Ï€ÏοδιαγÏαφών στÏλ", - -// Color Picker -ColorAutomatic : "Αυτόματο", -ColorMoreColors : "ΠεÏισσότεÏα χÏώματα...", - -// Document Properties -DocProps : "Ιδιότητες εγγÏάφου", - -// Anchor Dialog -DlgAnchorTitle : "Ιδιότητες άγκυÏας", -DlgAnchorName : "Όνομα άγκυÏας", -DlgAnchorErrorName : "ΠαÏακαλοÏμε εισάγετε όνομα άγκυÏας", - -// Speller Pages Dialog -DlgSpellNotInDic : "Δεν υπάÏχει στο λεξικό", -DlgSpellChangeTo : "Αλλαγή σε", -DlgSpellBtnIgnore : "Αγνόηση", -DlgSpellBtnIgnoreAll : "Αγνόηση όλων", -DlgSpellBtnReplace : "Αντικατάσταση", -DlgSpellBtnReplaceAll : "Αντικατάσταση όλων", -DlgSpellBtnUndo : "ΑναίÏεση", -DlgSpellNoSuggestions : "- Δεν υπάÏχουν Ï€Ïοτάσεις -", -DlgSpellProgress : "ΟÏθογÏαφικός έλεγχος σε εξέλιξη...", -DlgSpellNoMispell : "Ο οÏθογÏαφικός έλεγχος ολοκληÏώθηκε: Δεν βÏέθηκαν λάθη", -DlgSpellNoChanges : "Ο οÏθογÏαφικός έλεγχος ολοκληÏώθηκε: Δεν άλλαξαν λέξεις", -DlgSpellOneChange : "Ο οÏθογÏαφικός έλεγχος ολοκληÏώθηκε: Μια λέξη άλλαξε", -DlgSpellManyChanges : "Ο οÏθογÏαφικός έλεγχος ολοκληÏώθηκε: %1 λέξεις άλλαξαν", - -IeSpellDownload : "Δεν υπάÏχει εγκατεστημένος οÏθογÏάφος. Θέλετε να τον κατεβάσετε τώÏα;", - -// Button Dialog -DlgButtonText : "Κείμενο (Τιμή)", -DlgButtonType : "ΤÏπος", -DlgButtonTypeBtn : "Κουμπί", -DlgButtonTypeSbm : "ΚαταχώÏηση", -DlgButtonTypeRst : "ΕπαναφοÏά", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Όνομα", -DlgCheckboxValue : "Τιμή", -DlgCheckboxSelected : "Επιλεγμένο", - -// Form Dialog -DlgFormName : "Όνομα", -DlgFormAction : "ΔÏάση", -DlgFormMethod : "Μάθοδος", - -// Select Field Dialog -DlgSelectName : "Όνομα", -DlgSelectValue : "Τιμή", -DlgSelectSize : "Μέγεθος", -DlgSelectLines : "γÏαμμές", -DlgSelectChkMulti : "Πολλαπλές επιλογές", -DlgSelectOpAvail : "Διαθέσιμες επιλογές", -DlgSelectOpText : "Κείμενο", -DlgSelectOpValue : "Τιμή", -DlgSelectBtnAdd : "ΠÏοσθήκη", -DlgSelectBtnModify : "Αλλαγή", -DlgSelectBtnUp : "Πάνω", -DlgSelectBtnDown : "Κάτω", -DlgSelectBtnSetValue : "ΠÏοεπιλεγμένη επιλογή", -DlgSelectBtnDelete : "ΔιαγÏαφή", - -// Textarea Dialog -DlgTextareaName : "Όνομα", -DlgTextareaCols : "Στήλες", -DlgTextareaRows : "ΣειÏές", - -// Text Field Dialog -DlgTextName : "Όνομα", -DlgTextValue : "Τιμή", -DlgTextCharWidth : "Μήκος χαÏακτήÏων", -DlgTextMaxChars : "Μέγιστοι χαÏακτήÏες", -DlgTextType : "ΤÏπος", -DlgTextTypeText : "Κείμενο", -DlgTextTypePass : "Κωδικός", - -// Hidden Field Dialog -DlgHiddenName : "Όνομα", -DlgHiddenValue : "Τιμή", - -// Bulleted List Dialog -BulletedListProp : "Ιδιότητες λίστας Bulleted", -NumberedListProp : "Ιδιότητες αÏιθμημένης λίστας ", -DlgLstStart : "ΑÏχή", -DlgLstType : "ΤÏπος", -DlgLstTypeCircle : "ΚÏκλος", -DlgLstTypeDisc : "Δίσκος", -DlgLstTypeSquare : "ΤετÏάγωνο", -DlgLstTypeNumbers : "ΑÏιθμοί (1, 2, 3)", -DlgLstTypeLCase : "Πεζά γÏάμματα (a, b, c)", -DlgLstTypeUCase : "Κεφαλαία γÏάμματα (A, B, C)", -DlgLstTypeSRoman : "ΜικÏά λατινικά αÏιθμητικά (i, ii, iii)", -DlgLstTypeLRoman : "Μεγάλα λατινικά αÏιθμητικά (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Γενικά", -DlgDocBackTab : "Φόντο", -DlgDocColorsTab : "ΧÏώματα και πεÏιθώÏια", -DlgDocMetaTab : "Δεδομένα Meta", - -DlgDocPageTitle : "Τίτλος σελίδας", -DlgDocLangDir : "ΚατεÏθυνση γÏαφής", -DlgDocLangDirLTR : "αÏιστεÏά Ï€Ïος δεξιά (LTR)", -DlgDocLangDirRTL : "δεξιά Ï€Ïος αÏιστεÏά (RTL)", -DlgDocLangCode : "Κωδικός γλώσσας", -DlgDocCharSet : "Κωδικοποίηση χαÏακτήÏων", -DlgDocCharSetCE : "ΚεντÏικής ΕυÏώπης", -DlgDocCharSetCT : "ΠαÏαδοσιακά κινέζικα (Big5)", -DlgDocCharSetCR : "ΚυÏιλλική", -DlgDocCharSetGR : "Ελληνική", -DlgDocCharSetJP : "Ιαπωνική", -DlgDocCharSetKR : "ΚοÏεάτικη", -DlgDocCharSetTR : "ΤουÏκική", -DlgDocCharSetUN : "Διεθνής (UTF-8)", -DlgDocCharSetWE : "Δυτικής ΕυÏώπης", -DlgDocCharSetOther : "Άλλη κωδικοποίηση χαÏακτήÏων", - -DlgDocDocType : "Επικεφαλίδα Ï„Ïπου εγγÏάφου", -DlgDocDocTypeOther : "Άλλη επικεφαλίδα Ï„Ïπου εγγÏάφου", -DlgDocIncXHTML : "Îα συμπεÏιληφθοÏν οι δηλώσεις XHTML", -DlgDocBgColor : "ΧÏώμα φόντου", -DlgDocBgImage : "ΔιεÏθυνση εικόνας φόντου", -DlgDocBgNoScroll : "Φόντο χωÏίς κÏλιση", -DlgDocCText : "Κείμενο", -DlgDocCLink : "ΣÏνδεσμος", -DlgDocCVisited : "ΣÏνδεσμος που έχει επισκευθεί", -DlgDocCActive : "ΕνεÏγός σÏνδεσμος", -DlgDocMargins : "ΠεÏιθώÏια σελίδας", -DlgDocMaTop : "ΚοÏυφή", -DlgDocMaLeft : "ΑÏιστεÏά", -DlgDocMaRight : "Δεξιά", -DlgDocMaBottom : "Κάτω", -DlgDocMeIndex : "Λέξεις κλειδιά δείκτες εγγÏάφου (διαχωÏισμός με κόμμα)", -DlgDocMeDescr : "ΠεÏιγÏαφή εγγÏάφου", -DlgDocMeAuthor : "ΣυγγÏαφέας", -DlgDocMeCopy : "Πνευματικά δικαιώματα", -DlgDocPreview : "ΠÏοεπισκόπηση", - -// Templates Dialog -Templates : "ΠÏότυπα", -DlgTemplatesTitle : "ΠÏότυπα πεÏιεχομένου", -DlgTemplatesSelMsg : "ΠαÏακαλώ επιλέξτε Ï€Ïότυπο για εισαγωγή στο Ï€ÏόγÏαμμα
    (τα υπάÏχοντα πεÏιεχόμενα θα χαθοÏν):", -DlgTemplatesLoading : "ΦόÏτωση καταλόγου Ï€ÏοτÏπων. ΠαÏακαλώ πεÏιμένετε...", -DlgTemplatesNoTpl : "(Δεν έχουν καθοÏιστεί Ï€Ïότυπα)", -DlgTemplatesReplace : "Αντικατάσταση υπάÏχοντων πεÏιεχομένων", - -// About Dialog -DlgAboutAboutTab : "Σχετικά", -DlgAboutBrowserInfoTab : "ΠληÏοφοÏίες Browser", -DlgAboutLicenseTab : "Άδεια", -DlgAboutVersion : "έκδοση", -DlgAboutInfo : "Για πεÏισσότεÏες πληÏοφοÏίες", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/en-au.js b/fckeditor/editor/lang/en-au.js deleted file mode 100644 index 5ea421ef..00000000 --- a/fckeditor/editor/lang/en-au.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * English (Australia) language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Collapse Toolbar", -ToolbarExpand : "Expand Toolbar", - -// Toolbar Items and Context Menu -Save : "Save", -NewPage : "New Page", -Preview : "Preview", -Cut : "Cut", -Copy : "Copy", -Paste : "Paste", -PasteText : "Paste as plain text", -PasteWord : "Paste from Word", -Print : "Print", -SelectAll : "Select All", -RemoveFormat : "Remove Format", -InsertLinkLbl : "Link", -InsertLink : "Insert/Edit Link", -RemoveLink : "Remove Link", -VisitLink : "Open Link", -Anchor : "Insert/Edit Anchor", -AnchorDelete : "Remove Anchor", -InsertImageLbl : "Image", -InsertImage : "Insert/Edit Image", -InsertFlashLbl : "Flash", -InsertFlash : "Insert/Edit Flash", -InsertTableLbl : "Table", -InsertTable : "Insert/Edit Table", -InsertLineLbl : "Line", -InsertLine : "Insert Horizontal Line", -InsertSpecialCharLbl: "Special Character", -InsertSpecialChar : "Insert Special Character", -InsertSmileyLbl : "Smiley", -InsertSmiley : "Insert Smiley", -About : "About FCKeditor", -Bold : "Bold", -Italic : "Italic", -Underline : "Underline", -StrikeThrough : "Strike Through", -Subscript : "Subscript", -Superscript : "Superscript", -LeftJustify : "Left Justify", -CenterJustify : "Centre Justify", -RightJustify : "Right Justify", -BlockJustify : "Block Justify", -DecreaseIndent : "Decrease Indent", -IncreaseIndent : "Increase Indent", -Blockquote : "Blockquote", -CreateDiv : "Create Div Container", -EditDiv : "Edit Div Container", -DeleteDiv : "Remove Div Container", -Undo : "Undo", -Redo : "Redo", -NumberedListLbl : "Numbered List", -NumberedList : "Insert/Remove Numbered List", -BulletedListLbl : "Bulleted List", -BulletedList : "Insert/Remove Bulleted List", -ShowTableBorders : "Show Table Borders", -ShowDetails : "Show Details", -Style : "Style", -FontFormat : "Format", -Font : "Font", -FontSize : "Size", -TextColor : "Text Colour", -BGColor : "Background Colour", -Source : "Source", -Find : "Find", -Replace : "Replace", -SpellCheck : "Check Spelling", -UniversalKeyboard : "Universal Keyboard", -PageBreakLbl : "Page Break", -PageBreak : "Insert Page Break", - -Form : "Form", -Checkbox : "Checkbox", -RadioButton : "Radio Button", -TextField : "Text Field", -Textarea : "Textarea", -HiddenField : "Hidden Field", -Button : "Button", -SelectionField : "Selection Field", -ImageButton : "Image Button", - -FitWindow : "Maximize the editor size", -ShowBlocks : "Show Blocks", - -// Context Menu -EditLink : "Edit Link", -CellCM : "Cell", -RowCM : "Row", -ColumnCM : "Column", -InsertRowAfter : "Insert Row After", -InsertRowBefore : "Insert Row Before", -DeleteRows : "Delete Rows", -InsertColumnAfter : "Insert Column After", -InsertColumnBefore : "Insert Column Before", -DeleteColumns : "Delete Columns", -InsertCellAfter : "Insert Cell After", -InsertCellBefore : "Insert Cell Before", -DeleteCells : "Delete Cells", -MergeCells : "Merge Cells", -MergeRight : "Merge Right", -MergeDown : "Merge Down", -HorizontalSplitCell : "Split Cell Horizontally", -VerticalSplitCell : "Split Cell Vertically", -TableDelete : "Delete Table", -CellProperties : "Cell Properties", -TableProperties : "Table Properties", -ImageProperties : "Image Properties", -FlashProperties : "Flash Properties", - -AnchorProp : "Anchor Properties", -ButtonProp : "Button Properties", -CheckboxProp : "Checkbox Properties", -HiddenFieldProp : "Hidden Field Properties", -RadioButtonProp : "Radio Button Properties", -ImageButtonProp : "Image Button Properties", -TextFieldProp : "Text Field Properties", -SelectionFieldProp : "Selection Field Properties", -TextareaProp : "Textarea Properties", -FormProp : "Form Properties", - -FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Processing XHTML. Please wait...", -Done : "Done", -PasteWordConfirm : "The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?", -NotCompatiblePaste : "This command is available for Internet Explorer version 5.5 or more. Do you want to paste without cleaning?", -UnknownToolbarItem : "Unknown toolbar item \"%1\"", -UnknownCommand : "Unknown command name \"%1\"", -NotImplemented : "Command not implemented", -UnknownToolbarSet : "Toolbar set \"%1\" doesn't exist", -NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", -BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", -DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Cancel", -DlgBtnClose : "Close", -DlgBtnBrowseServer : "Browse Server", -DlgAdvancedTag : "Advanced", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Please insert the URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Language Direction", -DlgGenLangDirLtr : "Left to Right (LTR)", -DlgGenLangDirRtl : "Right to Left (RTL)", -DlgGenLangCode : "Language Code", -DlgGenAccessKey : "Access Key", -DlgGenName : "Name", -DlgGenTabIndex : "Tab Index", -DlgGenLongDescr : "Long Description URL", -DlgGenClass : "Stylesheet Classes", -DlgGenTitle : "Advisory Title", -DlgGenContType : "Advisory Content Type", -DlgGenLinkCharset : "Linked Resource Charset", -DlgGenStyle : "Style", - -// Image Dialog -DlgImgTitle : "Image Properties", -DlgImgInfoTab : "Image Info", -DlgImgBtnUpload : "Send it to the Server", -DlgImgURL : "URL", -DlgImgUpload : "Upload", -DlgImgAlt : "Alternative Text", -DlgImgWidth : "Width", -DlgImgHeight : "Height", -DlgImgLockRatio : "Lock Ratio", -DlgBtnResetSize : "Reset Size", -DlgImgBorder : "Border", -DlgImgHSpace : "HSpace", -DlgImgVSpace : "VSpace", -DlgImgAlign : "Align", -DlgImgAlignLeft : "Left", -DlgImgAlignAbsBottom: "Abs Bottom", -DlgImgAlignAbsMiddle: "Abs Middle", -DlgImgAlignBaseline : "Baseline", -DlgImgAlignBottom : "Bottom", -DlgImgAlignMiddle : "Middle", -DlgImgAlignRight : "Right", -DlgImgAlignTextTop : "Text Top", -DlgImgAlignTop : "Top", -DlgImgPreview : "Preview", -DlgImgAlertUrl : "Please type the image URL", -DlgImgLinkTab : "Link", - -// Flash Dialog -DlgFlashTitle : "Flash Properties", -DlgFlashChkPlay : "Auto Play", -DlgFlashChkLoop : "Loop", -DlgFlashChkMenu : "Enable Flash Menu", -DlgFlashScale : "Scale", -DlgFlashScaleAll : "Show all", -DlgFlashScaleNoBorder : "No Border", -DlgFlashScaleFit : "Exact Fit", - -// Link Dialog -DlgLnkWindowTitle : "Link", -DlgLnkInfoTab : "Link Info", -DlgLnkTargetTab : "Target", - -DlgLnkType : "Link Type", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Link to anchor in the text", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protocol", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Select an Anchor", -DlgLnkAnchorByName : "By Anchor Name", -DlgLnkAnchorById : "By Element Id", -DlgLnkNoAnchors : "(No anchors available in the document)", -DlgLnkEMail : "E-Mail Address", -DlgLnkEMailSubject : "Message Subject", -DlgLnkEMailBody : "Message Body", -DlgLnkUpload : "Upload", -DlgLnkBtnUpload : "Send it to the Server", - -DlgLnkTarget : "Target", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "New Window (_blank)", -DlgLnkTargetParent : "Parent Window (_parent)", -DlgLnkTargetSelf : "Same Window (_self)", -DlgLnkTargetTop : "Topmost Window (_top)", -DlgLnkTargetFrameName : "Target Frame Name", -DlgLnkPopWinName : "Popup Window Name", -DlgLnkPopWinFeat : "Popup Window Features", -DlgLnkPopResize : "Resizable", -DlgLnkPopLocation : "Location Bar", -DlgLnkPopMenu : "Menu Bar", -DlgLnkPopScroll : "Scroll Bars", -DlgLnkPopStatus : "Status Bar", -DlgLnkPopToolbar : "Toolbar", -DlgLnkPopFullScrn : "Full Screen (IE)", -DlgLnkPopDependent : "Dependent (Netscape)", -DlgLnkPopWidth : "Width", -DlgLnkPopHeight : "Height", -DlgLnkPopLeft : "Left Position", -DlgLnkPopTop : "Top Position", - -DlnLnkMsgNoUrl : "Please type the link URL", -DlnLnkMsgNoEMail : "Please type the e-mail address", -DlnLnkMsgNoAnchor : "Please select an anchor", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", - -// Color Dialog -DlgColorTitle : "Select Colour", -DlgColorBtnClear : "Clear", -DlgColorHighlight : "Highlight", -DlgColorSelected : "Selected", - -// Smiley Dialog -DlgSmileyTitle : "Insert a Smiley", - -// Special Character Dialog -DlgSpecialCharTitle : "Select Special Character", - -// Table Dialog -DlgTableTitle : "Table Properties", -DlgTableRows : "Rows", -DlgTableColumns : "Columns", -DlgTableBorder : "Border size", -DlgTableAlign : "Alignment", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Left", -DlgTableAlignCenter : "Centre", -DlgTableAlignRight : "Right", -DlgTableWidth : "Width", -DlgTableWidthPx : "pixels", -DlgTableWidthPc : "percent", -DlgTableHeight : "Height", -DlgTableCellSpace : "Cell spacing", -DlgTableCellPad : "Cell padding", -DlgTableCaption : "Caption", -DlgTableSummary : "Summary", - -// Table Cell Dialog -DlgCellTitle : "Cell Properties", -DlgCellWidth : "Width", -DlgCellWidthPx : "pixels", -DlgCellWidthPc : "percent", -DlgCellHeight : "Height", -DlgCellWordWrap : "Word Wrap", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Yes", -DlgCellWordWrapNo : "No", -DlgCellHorAlign : "Horizontal Alignment", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Left", -DlgCellHorAlignCenter : "Centre", -DlgCellHorAlignRight: "Right", -DlgCellVerAlign : "Vertical Alignment", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Top", -DlgCellVerAlignMiddle : "Middle", -DlgCellVerAlignBottom : "Bottom", -DlgCellVerAlignBaseline : "Baseline", -DlgCellRowSpan : "Rows Span", -DlgCellCollSpan : "Columns Span", -DlgCellBackColor : "Background Colour", -DlgCellBorderColor : "Border Colour", -DlgCellBtnSelect : "Select...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", - -// Find Dialog -DlgFindTitle : "Find", -DlgFindFindBtn : "Find", -DlgFindNotFoundMsg : "The specified text was not found.", - -// Replace Dialog -DlgReplaceTitle : "Replace", -DlgReplaceFindLbl : "Find what:", -DlgReplaceReplaceLbl : "Replace with:", -DlgReplaceCaseChk : "Match case", -DlgReplaceReplaceBtn : "Replace", -DlgReplaceReplAllBtn : "Replace All", -DlgReplaceWordChk : "Match whole word", - -// Paste Operations / Dialog -PasteErrorCut : "Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl+X).", -PasteErrorCopy : "Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl+C).", - -PasteAsText : "Paste as Plain Text", -PasteFromWord : "Paste from Word", - -DlgPasteMsg2 : "Please paste inside the following box using the keyboard (Ctrl+V) and hit OK.", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", -DlgPasteIgnoreFont : "Ignore Font Face definitions", -DlgPasteRemoveStyles : "Remove Styles definitions", - -// Color Picker -ColorAutomatic : "Automatic", -ColorMoreColors : "More Colours...", - -// Document Properties -DocProps : "Document Properties", - -// Anchor Dialog -DlgAnchorTitle : "Anchor Properties", -DlgAnchorName : "Anchor Name", -DlgAnchorErrorName : "Please type the anchor name", - -// Speller Pages Dialog -DlgSpellNotInDic : "Not in dictionary", -DlgSpellChangeTo : "Change to", -DlgSpellBtnIgnore : "Ignore", -DlgSpellBtnIgnoreAll : "Ignore All", -DlgSpellBtnReplace : "Replace", -DlgSpellBtnReplaceAll : "Replace All", -DlgSpellBtnUndo : "Undo", -DlgSpellNoSuggestions : "- No suggestions -", -DlgSpellProgress : "Spell check in progress...", -DlgSpellNoMispell : "Spell check complete: No misspellings found", -DlgSpellNoChanges : "Spell check complete: No words changed", -DlgSpellOneChange : "Spell check complete: One word changed", -DlgSpellManyChanges : "Spell check complete: %1 words changed", - -IeSpellDownload : "Spell checker not installed. Do you want to download it now?", - -// Button Dialog -DlgButtonText : "Text (Value)", -DlgButtonType : "Type", -DlgButtonTypeBtn : "Button", -DlgButtonTypeSbm : "Submit", -DlgButtonTypeRst : "Reset", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Name", -DlgCheckboxValue : "Value", -DlgCheckboxSelected : "Selected", - -// Form Dialog -DlgFormName : "Name", -DlgFormAction : "Action", -DlgFormMethod : "Method", - -// Select Field Dialog -DlgSelectName : "Name", -DlgSelectValue : "Value", -DlgSelectSize : "Size", -DlgSelectLines : "lines", -DlgSelectChkMulti : "Allow multiple selections", -DlgSelectOpAvail : "Available Options", -DlgSelectOpText : "Text", -DlgSelectOpValue : "Value", -DlgSelectBtnAdd : "Add", -DlgSelectBtnModify : "Modify", -DlgSelectBtnUp : "Up", -DlgSelectBtnDown : "Down", -DlgSelectBtnSetValue : "Set as selected value", -DlgSelectBtnDelete : "Delete", - -// Textarea Dialog -DlgTextareaName : "Name", -DlgTextareaCols : "Columns", -DlgTextareaRows : "Rows", - -// Text Field Dialog -DlgTextName : "Name", -DlgTextValue : "Value", -DlgTextCharWidth : "Character Width", -DlgTextMaxChars : "Maximum Characters", -DlgTextType : "Type", -DlgTextTypeText : "Text", -DlgTextTypePass : "Password", - -// Hidden Field Dialog -DlgHiddenName : "Name", -DlgHiddenValue : "Value", - -// Bulleted List Dialog -BulletedListProp : "Bulleted List Properties", -NumberedListProp : "Numbered List Properties", -DlgLstStart : "Start", -DlgLstType : "Type", -DlgLstTypeCircle : "Circle", -DlgLstTypeDisc : "Disc", -DlgLstTypeSquare : "Square", -DlgLstTypeNumbers : "Numbers (1, 2, 3)", -DlgLstTypeLCase : "Lowercase Letters (a, b, c)", -DlgLstTypeUCase : "Uppercase Letters (A, B, C)", -DlgLstTypeSRoman : "Small Roman Numerals (i, ii, iii)", -DlgLstTypeLRoman : "Large Roman Numerals (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "General", -DlgDocBackTab : "Background", -DlgDocColorsTab : "Colours and Margins", -DlgDocMetaTab : "Meta Data", - -DlgDocPageTitle : "Page Title", -DlgDocLangDir : "Language Direction", -DlgDocLangDirLTR : "Left to Right (LTR)", -DlgDocLangDirRTL : "Right to Left (RTL)", -DlgDocLangCode : "Language Code", -DlgDocCharSet : "Character Set Encoding", -DlgDocCharSetCE : "Central European", -DlgDocCharSetCT : "Chinese Traditional (Big5)", -DlgDocCharSetCR : "Cyrillic", -DlgDocCharSetGR : "Greek", -DlgDocCharSetJP : "Japanese", -DlgDocCharSetKR : "Korean", -DlgDocCharSetTR : "Turkish", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Western European", -DlgDocCharSetOther : "Other Character Set Encoding", - -DlgDocDocType : "Document Type Heading", -DlgDocDocTypeOther : "Other Document Type Heading", -DlgDocIncXHTML : "Include XHTML Declarations", -DlgDocBgColor : "Background Colour", -DlgDocBgImage : "Background Image URL", -DlgDocBgNoScroll : "Nonscrolling Background", -DlgDocCText : "Text", -DlgDocCLink : "Link", -DlgDocCVisited : "Visited Link", -DlgDocCActive : "Active Link", -DlgDocMargins : "Page Margins", -DlgDocMaTop : "Top", -DlgDocMaLeft : "Left", -DlgDocMaRight : "Right", -DlgDocMaBottom : "Bottom", -DlgDocMeIndex : "Document Indexing Keywords (comma separated)", -DlgDocMeDescr : "Document Description", -DlgDocMeAuthor : "Author", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Preview", - -// Templates Dialog -Templates : "Templates", -DlgTemplatesTitle : "Content Templates", -DlgTemplatesSelMsg : "Please select the template to open in the editor
    (the actual contents will be lost):", -DlgTemplatesLoading : "Loading templates list. Please wait...", -DlgTemplatesNoTpl : "(No templates defined)", -DlgTemplatesReplace : "Replace actual contents", - -// About Dialog -DlgAboutAboutTab : "About", -DlgAboutBrowserInfoTab : "Browser Info", -DlgAboutLicenseTab : "License", -DlgAboutVersion : "version", -DlgAboutInfo : "For further information go to", - -// Div Dialog -DlgDivGeneralTab : "General", -DlgDivAdvancedTab : "Advanced", -DlgDivStyle : "Style", -DlgDivInlineStyle : "Inline Style" -}; diff --git a/fckeditor/editor/lang/en-ca.js b/fckeditor/editor/lang/en-ca.js deleted file mode 100644 index b192385e..00000000 --- a/fckeditor/editor/lang/en-ca.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * English (Canadian) language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Collapse Toolbar", -ToolbarExpand : "Expand Toolbar", - -// Toolbar Items and Context Menu -Save : "Save", -NewPage : "New Page", -Preview : "Preview", -Cut : "Cut", -Copy : "Copy", -Paste : "Paste", -PasteText : "Paste as plain text", -PasteWord : "Paste from Word", -Print : "Print", -SelectAll : "Select All", -RemoveFormat : "Remove Format", -InsertLinkLbl : "Link", -InsertLink : "Insert/Edit Link", -RemoveLink : "Remove Link", -VisitLink : "Open Link", -Anchor : "Insert/Edit Anchor", -AnchorDelete : "Remove Anchor", -InsertImageLbl : "Image", -InsertImage : "Insert/Edit Image", -InsertFlashLbl : "Flash", -InsertFlash : "Insert/Edit Flash", -InsertTableLbl : "Table", -InsertTable : "Insert/Edit Table", -InsertLineLbl : "Line", -InsertLine : "Insert Horizontal Line", -InsertSpecialCharLbl: "Special Character", -InsertSpecialChar : "Insert Special Character", -InsertSmileyLbl : "Smiley", -InsertSmiley : "Insert Smiley", -About : "About FCKeditor", -Bold : "Bold", -Italic : "Italic", -Underline : "Underline", -StrikeThrough : "Strike Through", -Subscript : "Subscript", -Superscript : "Superscript", -LeftJustify : "Left Justify", -CenterJustify : "Centre Justify", -RightJustify : "Right Justify", -BlockJustify : "Block Justify", -DecreaseIndent : "Decrease Indent", -IncreaseIndent : "Increase Indent", -Blockquote : "Blockquote", -CreateDiv : "Create Div Container", -EditDiv : "Edit Div Container", -DeleteDiv : "Remove Div Container", -Undo : "Undo", -Redo : "Redo", -NumberedListLbl : "Numbered List", -NumberedList : "Insert/Remove Numbered List", -BulletedListLbl : "Bulleted List", -BulletedList : "Insert/Remove Bulleted List", -ShowTableBorders : "Show Table Borders", -ShowDetails : "Show Details", -Style : "Style", -FontFormat : "Format", -Font : "Font", -FontSize : "Size", -TextColor : "Text Colour", -BGColor : "Background Colour", -Source : "Source", -Find : "Find", -Replace : "Replace", -SpellCheck : "Check Spelling", -UniversalKeyboard : "Universal Keyboard", -PageBreakLbl : "Page Break", -PageBreak : "Insert Page Break", - -Form : "Form", -Checkbox : "Checkbox", -RadioButton : "Radio Button", -TextField : "Text Field", -Textarea : "Textarea", -HiddenField : "Hidden Field", -Button : "Button", -SelectionField : "Selection Field", -ImageButton : "Image Button", - -FitWindow : "Maximize the editor size", -ShowBlocks : "Show Blocks", - -// Context Menu -EditLink : "Edit Link", -CellCM : "Cell", -RowCM : "Row", -ColumnCM : "Column", -InsertRowAfter : "Insert Row After", -InsertRowBefore : "Insert Row Before", -DeleteRows : "Delete Rows", -InsertColumnAfter : "Insert Column After", -InsertColumnBefore : "Insert Column Before", -DeleteColumns : "Delete Columns", -InsertCellAfter : "Insert Cell After", -InsertCellBefore : "Insert Cell Before", -DeleteCells : "Delete Cells", -MergeCells : "Merge Cells", -MergeRight : "Merge Right", -MergeDown : "Merge Down", -HorizontalSplitCell : "Split Cell Horizontally", -VerticalSplitCell : "Split Cell Vertically", -TableDelete : "Delete Table", -CellProperties : "Cell Properties", -TableProperties : "Table Properties", -ImageProperties : "Image Properties", -FlashProperties : "Flash Properties", - -AnchorProp : "Anchor Properties", -ButtonProp : "Button Properties", -CheckboxProp : "Checkbox Properties", -HiddenFieldProp : "Hidden Field Properties", -RadioButtonProp : "Radio Button Properties", -ImageButtonProp : "Image Button Properties", -TextFieldProp : "Text Field Properties", -SelectionFieldProp : "Selection Field Properties", -TextareaProp : "Textarea Properties", -FormProp : "Form Properties", - -FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Processing XHTML. Please wait...", -Done : "Done", -PasteWordConfirm : "The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?", -NotCompatiblePaste : "This command is available for Internet Explorer version 5.5 or more. Do you want to paste without cleaning?", -UnknownToolbarItem : "Unknown toolbar item \"%1\"", -UnknownCommand : "Unknown command name \"%1\"", -NotImplemented : "Command not implemented", -UnknownToolbarSet : "Toolbar set \"%1\" doesn't exist", -NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", -BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", -DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Cancel", -DlgBtnClose : "Close", -DlgBtnBrowseServer : "Browse Server", -DlgAdvancedTag : "Advanced", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Please insert the URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Language Direction", -DlgGenLangDirLtr : "Left to Right (LTR)", -DlgGenLangDirRtl : "Right to Left (RTL)", -DlgGenLangCode : "Language Code", -DlgGenAccessKey : "Access Key", -DlgGenName : "Name", -DlgGenTabIndex : "Tab Index", -DlgGenLongDescr : "Long Description URL", -DlgGenClass : "Stylesheet Classes", -DlgGenTitle : "Advisory Title", -DlgGenContType : "Advisory Content Type", -DlgGenLinkCharset : "Linked Resource Charset", -DlgGenStyle : "Style", - -// Image Dialog -DlgImgTitle : "Image Properties", -DlgImgInfoTab : "Image Info", -DlgImgBtnUpload : "Send it to the Server", -DlgImgURL : "URL", -DlgImgUpload : "Upload", -DlgImgAlt : "Alternative Text", -DlgImgWidth : "Width", -DlgImgHeight : "Height", -DlgImgLockRatio : "Lock Ratio", -DlgBtnResetSize : "Reset Size", -DlgImgBorder : "Border", -DlgImgHSpace : "HSpace", -DlgImgVSpace : "VSpace", -DlgImgAlign : "Align", -DlgImgAlignLeft : "Left", -DlgImgAlignAbsBottom: "Abs Bottom", -DlgImgAlignAbsMiddle: "Abs Middle", -DlgImgAlignBaseline : "Baseline", -DlgImgAlignBottom : "Bottom", -DlgImgAlignMiddle : "Middle", -DlgImgAlignRight : "Right", -DlgImgAlignTextTop : "Text Top", -DlgImgAlignTop : "Top", -DlgImgPreview : "Preview", -DlgImgAlertUrl : "Please type the image URL", -DlgImgLinkTab : "Link", - -// Flash Dialog -DlgFlashTitle : "Flash Properties", -DlgFlashChkPlay : "Auto Play", -DlgFlashChkLoop : "Loop", -DlgFlashChkMenu : "Enable Flash Menu", -DlgFlashScale : "Scale", -DlgFlashScaleAll : "Show all", -DlgFlashScaleNoBorder : "No Border", -DlgFlashScaleFit : "Exact Fit", - -// Link Dialog -DlgLnkWindowTitle : "Link", -DlgLnkInfoTab : "Link Info", -DlgLnkTargetTab : "Target", - -DlgLnkType : "Link Type", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Link to anchor in the text", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protocol", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Select an Anchor", -DlgLnkAnchorByName : "By Anchor Name", -DlgLnkAnchorById : "By Element Id", -DlgLnkNoAnchors : "(No anchors available in the document)", -DlgLnkEMail : "E-Mail Address", -DlgLnkEMailSubject : "Message Subject", -DlgLnkEMailBody : "Message Body", -DlgLnkUpload : "Upload", -DlgLnkBtnUpload : "Send it to the Server", - -DlgLnkTarget : "Target", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "New Window (_blank)", -DlgLnkTargetParent : "Parent Window (_parent)", -DlgLnkTargetSelf : "Same Window (_self)", -DlgLnkTargetTop : "Topmost Window (_top)", -DlgLnkTargetFrameName : "Target Frame Name", -DlgLnkPopWinName : "Popup Window Name", -DlgLnkPopWinFeat : "Popup Window Features", -DlgLnkPopResize : "Resizable", -DlgLnkPopLocation : "Location Bar", -DlgLnkPopMenu : "Menu Bar", -DlgLnkPopScroll : "Scroll Bars", -DlgLnkPopStatus : "Status Bar", -DlgLnkPopToolbar : "Toolbar", -DlgLnkPopFullScrn : "Full Screen (IE)", -DlgLnkPopDependent : "Dependent (Netscape)", -DlgLnkPopWidth : "Width", -DlgLnkPopHeight : "Height", -DlgLnkPopLeft : "Left Position", -DlgLnkPopTop : "Top Position", - -DlnLnkMsgNoUrl : "Please type the link URL", -DlnLnkMsgNoEMail : "Please type the e-mail address", -DlnLnkMsgNoAnchor : "Please select an anchor", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", - -// Color Dialog -DlgColorTitle : "Select Colour", -DlgColorBtnClear : "Clear", -DlgColorHighlight : "Highlight", -DlgColorSelected : "Selected", - -// Smiley Dialog -DlgSmileyTitle : "Insert a Smiley", - -// Special Character Dialog -DlgSpecialCharTitle : "Select Special Character", - -// Table Dialog -DlgTableTitle : "Table Properties", -DlgTableRows : "Rows", -DlgTableColumns : "Columns", -DlgTableBorder : "Border size", -DlgTableAlign : "Alignment", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Left", -DlgTableAlignCenter : "Centre", -DlgTableAlignRight : "Right", -DlgTableWidth : "Width", -DlgTableWidthPx : "pixels", -DlgTableWidthPc : "percent", -DlgTableHeight : "Height", -DlgTableCellSpace : "Cell spacing", -DlgTableCellPad : "Cell padding", -DlgTableCaption : "Caption", -DlgTableSummary : "Summary", - -// Table Cell Dialog -DlgCellTitle : "Cell Properties", -DlgCellWidth : "Width", -DlgCellWidthPx : "pixels", -DlgCellWidthPc : "percent", -DlgCellHeight : "Height", -DlgCellWordWrap : "Word Wrap", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Yes", -DlgCellWordWrapNo : "No", -DlgCellHorAlign : "Horizontal Alignment", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Left", -DlgCellHorAlignCenter : "Centre", -DlgCellHorAlignRight: "Right", -DlgCellVerAlign : "Vertical Alignment", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Top", -DlgCellVerAlignMiddle : "Middle", -DlgCellVerAlignBottom : "Bottom", -DlgCellVerAlignBaseline : "Baseline", -DlgCellRowSpan : "Rows Span", -DlgCellCollSpan : "Columns Span", -DlgCellBackColor : "Background Colour", -DlgCellBorderColor : "Border Colour", -DlgCellBtnSelect : "Select...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", - -// Find Dialog -DlgFindTitle : "Find", -DlgFindFindBtn : "Find", -DlgFindNotFoundMsg : "The specified text was not found.", - -// Replace Dialog -DlgReplaceTitle : "Replace", -DlgReplaceFindLbl : "Find what:", -DlgReplaceReplaceLbl : "Replace with:", -DlgReplaceCaseChk : "Match case", -DlgReplaceReplaceBtn : "Replace", -DlgReplaceReplAllBtn : "Replace All", -DlgReplaceWordChk : "Match whole word", - -// Paste Operations / Dialog -PasteErrorCut : "Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl+X).", -PasteErrorCopy : "Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl+C).", - -PasteAsText : "Paste as Plain Text", -PasteFromWord : "Paste from Word", - -DlgPasteMsg2 : "Please paste inside the following box using the keyboard (Ctrl+V) and hit OK.", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", -DlgPasteIgnoreFont : "Ignore Font Face definitions", -DlgPasteRemoveStyles : "Remove Styles definitions", - -// Color Picker -ColorAutomatic : "Automatic", -ColorMoreColors : "More Colours...", - -// Document Properties -DocProps : "Document Properties", - -// Anchor Dialog -DlgAnchorTitle : "Anchor Properties", -DlgAnchorName : "Anchor Name", -DlgAnchorErrorName : "Please type the anchor name", - -// Speller Pages Dialog -DlgSpellNotInDic : "Not in dictionary", -DlgSpellChangeTo : "Change to", -DlgSpellBtnIgnore : "Ignore", -DlgSpellBtnIgnoreAll : "Ignore All", -DlgSpellBtnReplace : "Replace", -DlgSpellBtnReplaceAll : "Replace All", -DlgSpellBtnUndo : "Undo", -DlgSpellNoSuggestions : "- No suggestions -", -DlgSpellProgress : "Spell check in progress...", -DlgSpellNoMispell : "Spell check complete: No misspellings found", -DlgSpellNoChanges : "Spell check complete: No words changed", -DlgSpellOneChange : "Spell check complete: One word changed", -DlgSpellManyChanges : "Spell check complete: %1 words changed", - -IeSpellDownload : "Spell checker not installed. Do you want to download it now?", - -// Button Dialog -DlgButtonText : "Text (Value)", -DlgButtonType : "Type", -DlgButtonTypeBtn : "Button", -DlgButtonTypeSbm : "Submit", -DlgButtonTypeRst : "Reset", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Name", -DlgCheckboxValue : "Value", -DlgCheckboxSelected : "Selected", - -// Form Dialog -DlgFormName : "Name", -DlgFormAction : "Action", -DlgFormMethod : "Method", - -// Select Field Dialog -DlgSelectName : "Name", -DlgSelectValue : "Value", -DlgSelectSize : "Size", -DlgSelectLines : "lines", -DlgSelectChkMulti : "Allow multiple selections", -DlgSelectOpAvail : "Available Options", -DlgSelectOpText : "Text", -DlgSelectOpValue : "Value", -DlgSelectBtnAdd : "Add", -DlgSelectBtnModify : "Modify", -DlgSelectBtnUp : "Up", -DlgSelectBtnDown : "Down", -DlgSelectBtnSetValue : "Set as selected value", -DlgSelectBtnDelete : "Delete", - -// Textarea Dialog -DlgTextareaName : "Name", -DlgTextareaCols : "Columns", -DlgTextareaRows : "Rows", - -// Text Field Dialog -DlgTextName : "Name", -DlgTextValue : "Value", -DlgTextCharWidth : "Character Width", -DlgTextMaxChars : "Maximum Characters", -DlgTextType : "Type", -DlgTextTypeText : "Text", -DlgTextTypePass : "Password", - -// Hidden Field Dialog -DlgHiddenName : "Name", -DlgHiddenValue : "Value", - -// Bulleted List Dialog -BulletedListProp : "Bulleted List Properties", -NumberedListProp : "Numbered List Properties", -DlgLstStart : "Start", -DlgLstType : "Type", -DlgLstTypeCircle : "Circle", -DlgLstTypeDisc : "Disc", -DlgLstTypeSquare : "Square", -DlgLstTypeNumbers : "Numbers (1, 2, 3)", -DlgLstTypeLCase : "Lowercase Letters (a, b, c)", -DlgLstTypeUCase : "Uppercase Letters (A, B, C)", -DlgLstTypeSRoman : "Small Roman Numerals (i, ii, iii)", -DlgLstTypeLRoman : "Large Roman Numerals (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "General", -DlgDocBackTab : "Background", -DlgDocColorsTab : "Colours and Margins", -DlgDocMetaTab : "Meta Data", - -DlgDocPageTitle : "Page Title", -DlgDocLangDir : "Language Direction", -DlgDocLangDirLTR : "Left to Right (LTR)", -DlgDocLangDirRTL : "Right to Left (RTL)", -DlgDocLangCode : "Language Code", -DlgDocCharSet : "Character Set Encoding", -DlgDocCharSetCE : "Central European", -DlgDocCharSetCT : "Chinese Traditional (Big5)", -DlgDocCharSetCR : "Cyrillic", -DlgDocCharSetGR : "Greek", -DlgDocCharSetJP : "Japanese", -DlgDocCharSetKR : "Korean", -DlgDocCharSetTR : "Turkish", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Western European", -DlgDocCharSetOther : "Other Character Set Encoding", - -DlgDocDocType : "Document Type Heading", -DlgDocDocTypeOther : "Other Document Type Heading", -DlgDocIncXHTML : "Include XHTML Declarations", -DlgDocBgColor : "Background Colour", -DlgDocBgImage : "Background Image URL", -DlgDocBgNoScroll : "Nonscrolling Background", -DlgDocCText : "Text", -DlgDocCLink : "Link", -DlgDocCVisited : "Visited Link", -DlgDocCActive : "Active Link", -DlgDocMargins : "Page Margins", -DlgDocMaTop : "Top", -DlgDocMaLeft : "Left", -DlgDocMaRight : "Right", -DlgDocMaBottom : "Bottom", -DlgDocMeIndex : "Document Indexing Keywords (comma separated)", -DlgDocMeDescr : "Document Description", -DlgDocMeAuthor : "Author", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Preview", - -// Templates Dialog -Templates : "Templates", -DlgTemplatesTitle : "Content Templates", -DlgTemplatesSelMsg : "Please select the template to open in the editor
    (the actual contents will be lost):", -DlgTemplatesLoading : "Loading templates list. Please wait...", -DlgTemplatesNoTpl : "(No templates defined)", -DlgTemplatesReplace : "Replace actual contents", - -// About Dialog -DlgAboutAboutTab : "About", -DlgAboutBrowserInfoTab : "Browser Info", -DlgAboutLicenseTab : "License", -DlgAboutVersion : "version", -DlgAboutInfo : "For further information go to", - -// Div Dialog -DlgDivGeneralTab : "General", -DlgDivAdvancedTab : "Advanced", -DlgDivStyle : "Style", -DlgDivInlineStyle : "Inline Style" -}; diff --git a/fckeditor/editor/lang/en-uk.js b/fckeditor/editor/lang/en-uk.js deleted file mode 100644 index 901c8857..00000000 --- a/fckeditor/editor/lang/en-uk.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * English (United Kingdom) language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Collapse Toolbar", -ToolbarExpand : "Expand Toolbar", - -// Toolbar Items and Context Menu -Save : "Save", -NewPage : "New Page", -Preview : "Preview", -Cut : "Cut", -Copy : "Copy", -Paste : "Paste", -PasteText : "Paste as plain text", -PasteWord : "Paste from Word", -Print : "Print", -SelectAll : "Select All", -RemoveFormat : "Remove Format", -InsertLinkLbl : "Link", -InsertLink : "Insert/Edit Link", -RemoveLink : "Remove Link", -VisitLink : "Open Link", -Anchor : "Insert/Edit Anchor", -AnchorDelete : "Remove Anchor", -InsertImageLbl : "Image", -InsertImage : "Insert/Edit Image", -InsertFlashLbl : "Flash", -InsertFlash : "Insert/Edit Flash", -InsertTableLbl : "Table", -InsertTable : "Insert/Edit Table", -InsertLineLbl : "Line", -InsertLine : "Insert Horizontal Line", -InsertSpecialCharLbl: "Special Character", -InsertSpecialChar : "Insert Special Character", -InsertSmileyLbl : "Smiley", -InsertSmiley : "Insert Smiley", -About : "About FCKeditor", -Bold : "Bold", -Italic : "Italic", -Underline : "Underline", -StrikeThrough : "Strike Through", -Subscript : "Subscript", -Superscript : "Superscript", -LeftJustify : "Left Justify", -CenterJustify : "Centre Justify", -RightJustify : "Right Justify", -BlockJustify : "Block Justify", -DecreaseIndent : "Decrease Indent", -IncreaseIndent : "Increase Indent", -Blockquote : "Blockquote", -CreateDiv : "Create Div Container", -EditDiv : "Edit Div Container", -DeleteDiv : "Remove Div Container", -Undo : "Undo", -Redo : "Redo", -NumberedListLbl : "Numbered List", -NumberedList : "Insert/Remove Numbered List", -BulletedListLbl : "Bulleted List", -BulletedList : "Insert/Remove Bulleted List", -ShowTableBorders : "Show Table Borders", -ShowDetails : "Show Details", -Style : "Style", -FontFormat : "Format", -Font : "Font", -FontSize : "Size", -TextColor : "Text Colour", -BGColor : "Background Colour", -Source : "Source", -Find : "Find", -Replace : "Replace", -SpellCheck : "Check Spelling", -UniversalKeyboard : "Universal Keyboard", -PageBreakLbl : "Page Break", -PageBreak : "Insert Page Break", - -Form : "Form", -Checkbox : "Checkbox", -RadioButton : "Radio Button", -TextField : "Text Field", -Textarea : "Textarea", -HiddenField : "Hidden Field", -Button : "Button", -SelectionField : "Selection Field", -ImageButton : "Image Button", - -FitWindow : "Maximize the editor size", -ShowBlocks : "Show Blocks", - -// Context Menu -EditLink : "Edit Link", -CellCM : "Cell", -RowCM : "Row", -ColumnCM : "Column", -InsertRowAfter : "Insert Row After", -InsertRowBefore : "Insert Row Before", -DeleteRows : "Delete Rows", -InsertColumnAfter : "Insert Column After", -InsertColumnBefore : "Insert Column Before", -DeleteColumns : "Delete Columns", -InsertCellAfter : "Insert Cell After", -InsertCellBefore : "Insert Cell Before", -DeleteCells : "Delete Cells", -MergeCells : "Merge Cells", -MergeRight : "Merge Right", -MergeDown : "Merge Down", -HorizontalSplitCell : "Split Cell Horizontally", -VerticalSplitCell : "Split Cell Vertically", -TableDelete : "Delete Table", -CellProperties : "Cell Properties", -TableProperties : "Table Properties", -ImageProperties : "Image Properties", -FlashProperties : "Flash Properties", - -AnchorProp : "Anchor Properties", -ButtonProp : "Button Properties", -CheckboxProp : "Checkbox Properties", -HiddenFieldProp : "Hidden Field Properties", -RadioButtonProp : "Radio Button Properties", -ImageButtonProp : "Image Button Properties", -TextFieldProp : "Text Field Properties", -SelectionFieldProp : "Selection Field Properties", -TextareaProp : "Textarea Properties", -FormProp : "Form Properties", - -FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Processing XHTML. Please wait...", -Done : "Done", -PasteWordConfirm : "The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?", -NotCompatiblePaste : "This command is available for Internet Explorer version 5.5 or more. Do you want to paste without cleaning?", -UnknownToolbarItem : "Unknown toolbar item \"%1\"", -UnknownCommand : "Unknown command name \"%1\"", -NotImplemented : "Command not implemented", -UnknownToolbarSet : "Toolbar set \"%1\" doesn't exist", -NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", -BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", -DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Cancel", -DlgBtnClose : "Close", -DlgBtnBrowseServer : "Browse Server", -DlgAdvancedTag : "Advanced", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Please insert the URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Language Direction", -DlgGenLangDirLtr : "Left to Right (LTR)", -DlgGenLangDirRtl : "Right to Left (RTL)", -DlgGenLangCode : "Language Code", -DlgGenAccessKey : "Access Key", -DlgGenName : "Name", -DlgGenTabIndex : "Tab Index", -DlgGenLongDescr : "Long Description URL", -DlgGenClass : "Stylesheet Classes", -DlgGenTitle : "Advisory Title", -DlgGenContType : "Advisory Content Type", -DlgGenLinkCharset : "Linked Resource Charset", -DlgGenStyle : "Style", - -// Image Dialog -DlgImgTitle : "Image Properties", -DlgImgInfoTab : "Image Info", -DlgImgBtnUpload : "Send it to the Server", -DlgImgURL : "URL", -DlgImgUpload : "Upload", -DlgImgAlt : "Alternative Text", -DlgImgWidth : "Width", -DlgImgHeight : "Height", -DlgImgLockRatio : "Lock Ratio", -DlgBtnResetSize : "Reset Size", -DlgImgBorder : "Border", -DlgImgHSpace : "HSpace", -DlgImgVSpace : "VSpace", -DlgImgAlign : "Align", -DlgImgAlignLeft : "Left", -DlgImgAlignAbsBottom: "Abs Bottom", -DlgImgAlignAbsMiddle: "Abs Middle", -DlgImgAlignBaseline : "Baseline", -DlgImgAlignBottom : "Bottom", -DlgImgAlignMiddle : "Middle", -DlgImgAlignRight : "Right", -DlgImgAlignTextTop : "Text Top", -DlgImgAlignTop : "Top", -DlgImgPreview : "Preview", -DlgImgAlertUrl : "Please type the image URL", -DlgImgLinkTab : "Link", - -// Flash Dialog -DlgFlashTitle : "Flash Properties", -DlgFlashChkPlay : "Auto Play", -DlgFlashChkLoop : "Loop", -DlgFlashChkMenu : "Enable Flash Menu", -DlgFlashScale : "Scale", -DlgFlashScaleAll : "Show all", -DlgFlashScaleNoBorder : "No Border", -DlgFlashScaleFit : "Exact Fit", - -// Link Dialog -DlgLnkWindowTitle : "Link", -DlgLnkInfoTab : "Link Info", -DlgLnkTargetTab : "Target", - -DlgLnkType : "Link Type", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Link to anchor in the text", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protocol", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Select an Anchor", -DlgLnkAnchorByName : "By Anchor Name", -DlgLnkAnchorById : "By Element Id", -DlgLnkNoAnchors : "(No anchors available in the document)", -DlgLnkEMail : "E-Mail Address", -DlgLnkEMailSubject : "Message Subject", -DlgLnkEMailBody : "Message Body", -DlgLnkUpload : "Upload", -DlgLnkBtnUpload : "Send it to the Server", - -DlgLnkTarget : "Target", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "New Window (_blank)", -DlgLnkTargetParent : "Parent Window (_parent)", -DlgLnkTargetSelf : "Same Window (_self)", -DlgLnkTargetTop : "Topmost Window (_top)", -DlgLnkTargetFrameName : "Target Frame Name", -DlgLnkPopWinName : "Popup Window Name", -DlgLnkPopWinFeat : "Popup Window Features", -DlgLnkPopResize : "Resizable", -DlgLnkPopLocation : "Location Bar", -DlgLnkPopMenu : "Menu Bar", -DlgLnkPopScroll : "Scroll Bars", -DlgLnkPopStatus : "Status Bar", -DlgLnkPopToolbar : "Toolbar", -DlgLnkPopFullScrn : "Full Screen (IE)", -DlgLnkPopDependent : "Dependent (Netscape)", -DlgLnkPopWidth : "Width", -DlgLnkPopHeight : "Height", -DlgLnkPopLeft : "Left Position", -DlgLnkPopTop : "Top Position", - -DlnLnkMsgNoUrl : "Please type the link URL", -DlnLnkMsgNoEMail : "Please type the e-mail address", -DlnLnkMsgNoAnchor : "Please select an anchor", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", - -// Color Dialog -DlgColorTitle : "Select Colour", -DlgColorBtnClear : "Clear", -DlgColorHighlight : "Highlight", -DlgColorSelected : "Selected", - -// Smiley Dialog -DlgSmileyTitle : "Insert a Smiley", - -// Special Character Dialog -DlgSpecialCharTitle : "Select Special Character", - -// Table Dialog -DlgTableTitle : "Table Properties", -DlgTableRows : "Rows", -DlgTableColumns : "Columns", -DlgTableBorder : "Border size", -DlgTableAlign : "Alignment", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Left", -DlgTableAlignCenter : "Centre", -DlgTableAlignRight : "Right", -DlgTableWidth : "Width", -DlgTableWidthPx : "pixels", -DlgTableWidthPc : "percent", -DlgTableHeight : "Height", -DlgTableCellSpace : "Cell spacing", -DlgTableCellPad : "Cell padding", -DlgTableCaption : "Caption", -DlgTableSummary : "Summary", - -// Table Cell Dialog -DlgCellTitle : "Cell Properties", -DlgCellWidth : "Width", -DlgCellWidthPx : "pixels", -DlgCellWidthPc : "percent", -DlgCellHeight : "Height", -DlgCellWordWrap : "Word Wrap", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Yes", -DlgCellWordWrapNo : "No", -DlgCellHorAlign : "Horizontal Alignment", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Left", -DlgCellHorAlignCenter : "Centre", -DlgCellHorAlignRight: "Right", -DlgCellVerAlign : "Vertical Alignment", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Top", -DlgCellVerAlignMiddle : "Middle", -DlgCellVerAlignBottom : "Bottom", -DlgCellVerAlignBaseline : "Baseline", -DlgCellRowSpan : "Rows Span", -DlgCellCollSpan : "Columns Span", -DlgCellBackColor : "Background Colour", -DlgCellBorderColor : "Border Colour", -DlgCellBtnSelect : "Select...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", - -// Find Dialog -DlgFindTitle : "Find", -DlgFindFindBtn : "Find", -DlgFindNotFoundMsg : "The specified text was not found.", - -// Replace Dialog -DlgReplaceTitle : "Replace", -DlgReplaceFindLbl : "Find what:", -DlgReplaceReplaceLbl : "Replace with:", -DlgReplaceCaseChk : "Match case", -DlgReplaceReplaceBtn : "Replace", -DlgReplaceReplAllBtn : "Replace All", -DlgReplaceWordChk : "Match whole word", - -// Paste Operations / Dialog -PasteErrorCut : "Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl+X).", -PasteErrorCopy : "Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl+C).", - -PasteAsText : "Paste as Plain Text", -PasteFromWord : "Paste from Word", - -DlgPasteMsg2 : "Please paste inside the following box using the keyboard (Ctrl+V) and hit OK.", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", -DlgPasteIgnoreFont : "Ignore Font Face definitions", -DlgPasteRemoveStyles : "Remove Styles definitions", - -// Color Picker -ColorAutomatic : "Automatic", -ColorMoreColors : "More Colours...", - -// Document Properties -DocProps : "Document Properties", - -// Anchor Dialog -DlgAnchorTitle : "Anchor Properties", -DlgAnchorName : "Anchor Name", -DlgAnchorErrorName : "Please type the anchor name", - -// Speller Pages Dialog -DlgSpellNotInDic : "Not in dictionary", -DlgSpellChangeTo : "Change to", -DlgSpellBtnIgnore : "Ignore", -DlgSpellBtnIgnoreAll : "Ignore All", -DlgSpellBtnReplace : "Replace", -DlgSpellBtnReplaceAll : "Replace All", -DlgSpellBtnUndo : "Undo", -DlgSpellNoSuggestions : "- No suggestions -", -DlgSpellProgress : "Spell check in progress...", -DlgSpellNoMispell : "Spell check complete: No misspellings found", -DlgSpellNoChanges : "Spell check complete: No words changed", -DlgSpellOneChange : "Spell check complete: One word changed", -DlgSpellManyChanges : "Spell check complete: %1 words changed", - -IeSpellDownload : "Spell checker not installed. Do you want to download it now?", - -// Button Dialog -DlgButtonText : "Text (Value)", -DlgButtonType : "Type", -DlgButtonTypeBtn : "Button", -DlgButtonTypeSbm : "Submit", -DlgButtonTypeRst : "Reset", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Name", -DlgCheckboxValue : "Value", -DlgCheckboxSelected : "Selected", - -// Form Dialog -DlgFormName : "Name", -DlgFormAction : "Action", -DlgFormMethod : "Method", - -// Select Field Dialog -DlgSelectName : "Name", -DlgSelectValue : "Value", -DlgSelectSize : "Size", -DlgSelectLines : "lines", -DlgSelectChkMulti : "Allow multiple selections", -DlgSelectOpAvail : "Available Options", -DlgSelectOpText : "Text", -DlgSelectOpValue : "Value", -DlgSelectBtnAdd : "Add", -DlgSelectBtnModify : "Modify", -DlgSelectBtnUp : "Up", -DlgSelectBtnDown : "Down", -DlgSelectBtnSetValue : "Set as selected value", -DlgSelectBtnDelete : "Delete", - -// Textarea Dialog -DlgTextareaName : "Name", -DlgTextareaCols : "Columns", -DlgTextareaRows : "Rows", - -// Text Field Dialog -DlgTextName : "Name", -DlgTextValue : "Value", -DlgTextCharWidth : "Character Width", -DlgTextMaxChars : "Maximum Characters", -DlgTextType : "Type", -DlgTextTypeText : "Text", -DlgTextTypePass : "Password", - -// Hidden Field Dialog -DlgHiddenName : "Name", -DlgHiddenValue : "Value", - -// Bulleted List Dialog -BulletedListProp : "Bulleted List Properties", -NumberedListProp : "Numbered List Properties", -DlgLstStart : "Start", -DlgLstType : "Type", -DlgLstTypeCircle : "Circle", -DlgLstTypeDisc : "Disc", -DlgLstTypeSquare : "Square", -DlgLstTypeNumbers : "Numbers (1, 2, 3)", -DlgLstTypeLCase : "Lowercase Letters (a, b, c)", -DlgLstTypeUCase : "Uppercase Letters (A, B, C)", -DlgLstTypeSRoman : "Small Roman Numerals (i, ii, iii)", -DlgLstTypeLRoman : "Large Roman Numerals (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "General", -DlgDocBackTab : "Background", -DlgDocColorsTab : "Colours and Margins", -DlgDocMetaTab : "Meta Data", - -DlgDocPageTitle : "Page Title", -DlgDocLangDir : "Language Direction", -DlgDocLangDirLTR : "Left to Right (LTR)", -DlgDocLangDirRTL : "Right to Left (RTL)", -DlgDocLangCode : "Language Code", -DlgDocCharSet : "Character Set Encoding", -DlgDocCharSetCE : "Central European", -DlgDocCharSetCT : "Chinese Traditional (Big5)", -DlgDocCharSetCR : "Cyrillic", -DlgDocCharSetGR : "Greek", -DlgDocCharSetJP : "Japanese", -DlgDocCharSetKR : "Korean", -DlgDocCharSetTR : "Turkish", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Western European", -DlgDocCharSetOther : "Other Character Set Encoding", - -DlgDocDocType : "Document Type Heading", -DlgDocDocTypeOther : "Other Document Type Heading", -DlgDocIncXHTML : "Include XHTML Declarations", -DlgDocBgColor : "Background Colour", -DlgDocBgImage : "Background Image URL", -DlgDocBgNoScroll : "Nonscrolling Background", -DlgDocCText : "Text", -DlgDocCLink : "Link", -DlgDocCVisited : "Visited Link", -DlgDocCActive : "Active Link", -DlgDocMargins : "Page Margins", -DlgDocMaTop : "Top", -DlgDocMaLeft : "Left", -DlgDocMaRight : "Right", -DlgDocMaBottom : "Bottom", -DlgDocMeIndex : "Document Indexing Keywords (comma separated)", -DlgDocMeDescr : "Document Description", -DlgDocMeAuthor : "Author", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Preview", - -// Templates Dialog -Templates : "Templates", -DlgTemplatesTitle : "Content Templates", -DlgTemplatesSelMsg : "Please select the template to open in the editor
    (the actual contents will be lost):", -DlgTemplatesLoading : "Loading templates list. Please wait...", -DlgTemplatesNoTpl : "(No templates defined)", -DlgTemplatesReplace : "Replace actual contents", - -// About Dialog -DlgAboutAboutTab : "About", -DlgAboutBrowserInfoTab : "Browser Info", -DlgAboutLicenseTab : "License", -DlgAboutVersion : "version", -DlgAboutInfo : "For further information go to", - -// Div Dialog -DlgDivGeneralTab : "General", -DlgDivAdvancedTab : "Advanced", -DlgDivStyle : "Style", -DlgDivInlineStyle : "Inline Style" -}; diff --git a/fckeditor/editor/lang/en.js b/fckeditor/editor/lang/en.js deleted file mode 100644 index 59395887..00000000 --- a/fckeditor/editor/lang/en.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * English language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Collapse Toolbar", -ToolbarExpand : "Expand Toolbar", - -// Toolbar Items and Context Menu -Save : "Save", -NewPage : "New Page", -Preview : "Preview", -Cut : "Cut", -Copy : "Copy", -Paste : "Paste", -PasteText : "Paste as plain text", -PasteWord : "Paste from Word", -Print : "Print", -SelectAll : "Select All", -RemoveFormat : "Remove Format", -InsertLinkLbl : "Link", -InsertLink : "Insert/Edit Link", -RemoveLink : "Remove Link", -VisitLink : "Open Link", -Anchor : "Insert/Edit Anchor", -AnchorDelete : "Remove Anchor", -InsertImageLbl : "Image", -InsertImage : "Insert/Edit Image", -InsertFlashLbl : "Flash", -InsertFlash : "Insert/Edit Flash", -InsertTableLbl : "Table", -InsertTable : "Insert/Edit Table", -InsertLineLbl : "Line", -InsertLine : "Insert Horizontal Line", -InsertSpecialCharLbl: "Special Character", -InsertSpecialChar : "Insert Special Character", -InsertSmileyLbl : "Smiley", -InsertSmiley : "Insert Smiley", -About : "About FCKeditor", -Bold : "Bold", -Italic : "Italic", -Underline : "Underline", -StrikeThrough : "Strike Through", -Subscript : "Subscript", -Superscript : "Superscript", -LeftJustify : "Left Justify", -CenterJustify : "Center Justify", -RightJustify : "Right Justify", -BlockJustify : "Block Justify", -DecreaseIndent : "Decrease Indent", -IncreaseIndent : "Increase Indent", -Blockquote : "Blockquote", -CreateDiv : "Create Div Container", -EditDiv : "Edit Div Container", -DeleteDiv : "Remove Div Container", -Undo : "Undo", -Redo : "Redo", -NumberedListLbl : "Numbered List", -NumberedList : "Insert/Remove Numbered List", -BulletedListLbl : "Bulleted List", -BulletedList : "Insert/Remove Bulleted List", -ShowTableBorders : "Show Table Borders", -ShowDetails : "Show Details", -Style : "Style", -FontFormat : "Format", -Font : "Font", -FontSize : "Size", -TextColor : "Text Color", -BGColor : "Background Color", -Source : "Source", -Find : "Find", -Replace : "Replace", -SpellCheck : "Check Spelling", -UniversalKeyboard : "Universal Keyboard", -PageBreakLbl : "Page Break", -PageBreak : "Insert Page Break", - -Form : "Form", -Checkbox : "Checkbox", -RadioButton : "Radio Button", -TextField : "Text Field", -Textarea : "Textarea", -HiddenField : "Hidden Field", -Button : "Button", -SelectionField : "Selection Field", -ImageButton : "Image Button", - -FitWindow : "Maximize the editor size", -ShowBlocks : "Show Blocks", - -// Context Menu -EditLink : "Edit Link", -CellCM : "Cell", -RowCM : "Row", -ColumnCM : "Column", -InsertRowAfter : "Insert Row After", -InsertRowBefore : "Insert Row Before", -DeleteRows : "Delete Rows", -InsertColumnAfter : "Insert Column After", -InsertColumnBefore : "Insert Column Before", -DeleteColumns : "Delete Columns", -InsertCellAfter : "Insert Cell After", -InsertCellBefore : "Insert Cell Before", -DeleteCells : "Delete Cells", -MergeCells : "Merge Cells", -MergeRight : "Merge Right", -MergeDown : "Merge Down", -HorizontalSplitCell : "Split Cell Horizontally", -VerticalSplitCell : "Split Cell Vertically", -TableDelete : "Delete Table", -CellProperties : "Cell Properties", -TableProperties : "Table Properties", -ImageProperties : "Image Properties", -FlashProperties : "Flash Properties", - -AnchorProp : "Anchor Properties", -ButtonProp : "Button Properties", -CheckboxProp : "Checkbox Properties", -HiddenFieldProp : "Hidden Field Properties", -RadioButtonProp : "Radio Button Properties", -ImageButtonProp : "Image Button Properties", -TextFieldProp : "Text Field Properties", -SelectionFieldProp : "Selection Field Properties", -TextareaProp : "Textarea Properties", -FormProp : "Form Properties", - -FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Processing XHTML. Please wait...", -Done : "Done", -PasteWordConfirm : "The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?", -NotCompatiblePaste : "This command is available for Internet Explorer version 5.5 or more. Do you want to paste without cleaning?", -UnknownToolbarItem : "Unknown toolbar item \"%1\"", -UnknownCommand : "Unknown command name \"%1\"", -NotImplemented : "Command not implemented", -UnknownToolbarSet : "Toolbar set \"%1\" doesn't exist", -NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", -BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", -DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Cancel", -DlgBtnClose : "Close", -DlgBtnBrowseServer : "Browse Server", -DlgAdvancedTag : "Advanced", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Please insert the URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Language Direction", -DlgGenLangDirLtr : "Left to Right (LTR)", -DlgGenLangDirRtl : "Right to Left (RTL)", -DlgGenLangCode : "Language Code", -DlgGenAccessKey : "Access Key", -DlgGenName : "Name", -DlgGenTabIndex : "Tab Index", -DlgGenLongDescr : "Long Description URL", -DlgGenClass : "Stylesheet Classes", -DlgGenTitle : "Advisory Title", -DlgGenContType : "Advisory Content Type", -DlgGenLinkCharset : "Linked Resource Charset", -DlgGenStyle : "Style", - -// Image Dialog -DlgImgTitle : "Image Properties", -DlgImgInfoTab : "Image Info", -DlgImgBtnUpload : "Send it to the Server", -DlgImgURL : "URL", -DlgImgUpload : "Upload", -DlgImgAlt : "Alternative Text", -DlgImgWidth : "Width", -DlgImgHeight : "Height", -DlgImgLockRatio : "Lock Ratio", -DlgBtnResetSize : "Reset Size", -DlgImgBorder : "Border", -DlgImgHSpace : "HSpace", -DlgImgVSpace : "VSpace", -DlgImgAlign : "Align", -DlgImgAlignLeft : "Left", -DlgImgAlignAbsBottom: "Abs Bottom", -DlgImgAlignAbsMiddle: "Abs Middle", -DlgImgAlignBaseline : "Baseline", -DlgImgAlignBottom : "Bottom", -DlgImgAlignMiddle : "Middle", -DlgImgAlignRight : "Right", -DlgImgAlignTextTop : "Text Top", -DlgImgAlignTop : "Top", -DlgImgPreview : "Preview", -DlgImgAlertUrl : "Please type the image URL", -DlgImgLinkTab : "Link", - -// Flash Dialog -DlgFlashTitle : "Flash Properties", -DlgFlashChkPlay : "Auto Play", -DlgFlashChkLoop : "Loop", -DlgFlashChkMenu : "Enable Flash Menu", -DlgFlashScale : "Scale", -DlgFlashScaleAll : "Show all", -DlgFlashScaleNoBorder : "No Border", -DlgFlashScaleFit : "Exact Fit", - -// Link Dialog -DlgLnkWindowTitle : "Link", -DlgLnkInfoTab : "Link Info", -DlgLnkTargetTab : "Target", - -DlgLnkType : "Link Type", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Link to anchor in the text", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protocol", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Select an Anchor", -DlgLnkAnchorByName : "By Anchor Name", -DlgLnkAnchorById : "By Element Id", -DlgLnkNoAnchors : "(No anchors available in the document)", -DlgLnkEMail : "E-Mail Address", -DlgLnkEMailSubject : "Message Subject", -DlgLnkEMailBody : "Message Body", -DlgLnkUpload : "Upload", -DlgLnkBtnUpload : "Send it to the Server", - -DlgLnkTarget : "Target", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "New Window (_blank)", -DlgLnkTargetParent : "Parent Window (_parent)", -DlgLnkTargetSelf : "Same Window (_self)", -DlgLnkTargetTop : "Topmost Window (_top)", -DlgLnkTargetFrameName : "Target Frame Name", -DlgLnkPopWinName : "Popup Window Name", -DlgLnkPopWinFeat : "Popup Window Features", -DlgLnkPopResize : "Resizable", -DlgLnkPopLocation : "Location Bar", -DlgLnkPopMenu : "Menu Bar", -DlgLnkPopScroll : "Scroll Bars", -DlgLnkPopStatus : "Status Bar", -DlgLnkPopToolbar : "Toolbar", -DlgLnkPopFullScrn : "Full Screen (IE)", -DlgLnkPopDependent : "Dependent (Netscape)", -DlgLnkPopWidth : "Width", -DlgLnkPopHeight : "Height", -DlgLnkPopLeft : "Left Position", -DlgLnkPopTop : "Top Position", - -DlnLnkMsgNoUrl : "Please type the link URL", -DlnLnkMsgNoEMail : "Please type the e-mail address", -DlnLnkMsgNoAnchor : "Please select an anchor", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", - -// Color Dialog -DlgColorTitle : "Select Color", -DlgColorBtnClear : "Clear", -DlgColorHighlight : "Highlight", -DlgColorSelected : "Selected", - -// Smiley Dialog -DlgSmileyTitle : "Insert a Smiley", - -// Special Character Dialog -DlgSpecialCharTitle : "Select Special Character", - -// Table Dialog -DlgTableTitle : "Table Properties", -DlgTableRows : "Rows", -DlgTableColumns : "Columns", -DlgTableBorder : "Border size", -DlgTableAlign : "Alignment", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Left", -DlgTableAlignCenter : "Center", -DlgTableAlignRight : "Right", -DlgTableWidth : "Width", -DlgTableWidthPx : "pixels", -DlgTableWidthPc : "percent", -DlgTableHeight : "Height", -DlgTableCellSpace : "Cell spacing", -DlgTableCellPad : "Cell padding", -DlgTableCaption : "Caption", -DlgTableSummary : "Summary", - -// Table Cell Dialog -DlgCellTitle : "Cell Properties", -DlgCellWidth : "Width", -DlgCellWidthPx : "pixels", -DlgCellWidthPc : "percent", -DlgCellHeight : "Height", -DlgCellWordWrap : "Word Wrap", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Yes", -DlgCellWordWrapNo : "No", -DlgCellHorAlign : "Horizontal Alignment", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Left", -DlgCellHorAlignCenter : "Center", -DlgCellHorAlignRight: "Right", -DlgCellVerAlign : "Vertical Alignment", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Top", -DlgCellVerAlignMiddle : "Middle", -DlgCellVerAlignBottom : "Bottom", -DlgCellVerAlignBaseline : "Baseline", -DlgCellRowSpan : "Rows Span", -DlgCellCollSpan : "Columns Span", -DlgCellBackColor : "Background Color", -DlgCellBorderColor : "Border Color", -DlgCellBtnSelect : "Select...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", - -// Find Dialog -DlgFindTitle : "Find", -DlgFindFindBtn : "Find", -DlgFindNotFoundMsg : "The specified text was not found.", - -// Replace Dialog -DlgReplaceTitle : "Replace", -DlgReplaceFindLbl : "Find what:", -DlgReplaceReplaceLbl : "Replace with:", -DlgReplaceCaseChk : "Match case", -DlgReplaceReplaceBtn : "Replace", -DlgReplaceReplAllBtn : "Replace All", -DlgReplaceWordChk : "Match whole word", - -// Paste Operations / Dialog -PasteErrorCut : "Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl+X).", -PasteErrorCopy : "Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl+C).", - -PasteAsText : "Paste as Plain Text", -PasteFromWord : "Paste from Word", - -DlgPasteMsg2 : "Please paste inside the following box using the keyboard (Ctrl+V) and hit OK.", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", -DlgPasteIgnoreFont : "Ignore Font Face definitions", -DlgPasteRemoveStyles : "Remove Styles definitions", - -// Color Picker -ColorAutomatic : "Automatic", -ColorMoreColors : "More Colors...", - -// Document Properties -DocProps : "Document Properties", - -// Anchor Dialog -DlgAnchorTitle : "Anchor Properties", -DlgAnchorName : "Anchor Name", -DlgAnchorErrorName : "Please type the anchor name", - -// Speller Pages Dialog -DlgSpellNotInDic : "Not in dictionary", -DlgSpellChangeTo : "Change to", -DlgSpellBtnIgnore : "Ignore", -DlgSpellBtnIgnoreAll : "Ignore All", -DlgSpellBtnReplace : "Replace", -DlgSpellBtnReplaceAll : "Replace All", -DlgSpellBtnUndo : "Undo", -DlgSpellNoSuggestions : "- No suggestions -", -DlgSpellProgress : "Spell check in progress...", -DlgSpellNoMispell : "Spell check complete: No misspellings found", -DlgSpellNoChanges : "Spell check complete: No words changed", -DlgSpellOneChange : "Spell check complete: One word changed", -DlgSpellManyChanges : "Spell check complete: %1 words changed", - -IeSpellDownload : "Spell checker not installed. Do you want to download it now?", - -// Button Dialog -DlgButtonText : "Text (Value)", -DlgButtonType : "Type", -DlgButtonTypeBtn : "Button", -DlgButtonTypeSbm : "Submit", -DlgButtonTypeRst : "Reset", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Name", -DlgCheckboxValue : "Value", -DlgCheckboxSelected : "Selected", - -// Form Dialog -DlgFormName : "Name", -DlgFormAction : "Action", -DlgFormMethod : "Method", - -// Select Field Dialog -DlgSelectName : "Name", -DlgSelectValue : "Value", -DlgSelectSize : "Size", -DlgSelectLines : "lines", -DlgSelectChkMulti : "Allow multiple selections", -DlgSelectOpAvail : "Available Options", -DlgSelectOpText : "Text", -DlgSelectOpValue : "Value", -DlgSelectBtnAdd : "Add", -DlgSelectBtnModify : "Modify", -DlgSelectBtnUp : "Up", -DlgSelectBtnDown : "Down", -DlgSelectBtnSetValue : "Set as selected value", -DlgSelectBtnDelete : "Delete", - -// Textarea Dialog -DlgTextareaName : "Name", -DlgTextareaCols : "Columns", -DlgTextareaRows : "Rows", - -// Text Field Dialog -DlgTextName : "Name", -DlgTextValue : "Value", -DlgTextCharWidth : "Character Width", -DlgTextMaxChars : "Maximum Characters", -DlgTextType : "Type", -DlgTextTypeText : "Text", -DlgTextTypePass : "Password", - -// Hidden Field Dialog -DlgHiddenName : "Name", -DlgHiddenValue : "Value", - -// Bulleted List Dialog -BulletedListProp : "Bulleted List Properties", -NumberedListProp : "Numbered List Properties", -DlgLstStart : "Start", -DlgLstType : "Type", -DlgLstTypeCircle : "Circle", -DlgLstTypeDisc : "Disc", -DlgLstTypeSquare : "Square", -DlgLstTypeNumbers : "Numbers (1, 2, 3)", -DlgLstTypeLCase : "Lowercase Letters (a, b, c)", -DlgLstTypeUCase : "Uppercase Letters (A, B, C)", -DlgLstTypeSRoman : "Small Roman Numerals (i, ii, iii)", -DlgLstTypeLRoman : "Large Roman Numerals (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "General", -DlgDocBackTab : "Background", -DlgDocColorsTab : "Colors and Margins", -DlgDocMetaTab : "Meta Data", - -DlgDocPageTitle : "Page Title", -DlgDocLangDir : "Language Direction", -DlgDocLangDirLTR : "Left to Right (LTR)", -DlgDocLangDirRTL : "Right to Left (RTL)", -DlgDocLangCode : "Language Code", -DlgDocCharSet : "Character Set Encoding", -DlgDocCharSetCE : "Central European", -DlgDocCharSetCT : "Chinese Traditional (Big5)", -DlgDocCharSetCR : "Cyrillic", -DlgDocCharSetGR : "Greek", -DlgDocCharSetJP : "Japanese", -DlgDocCharSetKR : "Korean", -DlgDocCharSetTR : "Turkish", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Western European", -DlgDocCharSetOther : "Other Character Set Encoding", - -DlgDocDocType : "Document Type Heading", -DlgDocDocTypeOther : "Other Document Type Heading", -DlgDocIncXHTML : "Include XHTML Declarations", -DlgDocBgColor : "Background Color", -DlgDocBgImage : "Background Image URL", -DlgDocBgNoScroll : "Nonscrolling Background", -DlgDocCText : "Text", -DlgDocCLink : "Link", -DlgDocCVisited : "Visited Link", -DlgDocCActive : "Active Link", -DlgDocMargins : "Page Margins", -DlgDocMaTop : "Top", -DlgDocMaLeft : "Left", -DlgDocMaRight : "Right", -DlgDocMaBottom : "Bottom", -DlgDocMeIndex : "Document Indexing Keywords (comma separated)", -DlgDocMeDescr : "Document Description", -DlgDocMeAuthor : "Author", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Preview", - -// Templates Dialog -Templates : "Templates", -DlgTemplatesTitle : "Content Templates", -DlgTemplatesSelMsg : "Please select the template to open in the editor
    (the actual contents will be lost):", -DlgTemplatesLoading : "Loading templates list. Please wait...", -DlgTemplatesNoTpl : "(No templates defined)", -DlgTemplatesReplace : "Replace actual contents", - -// About Dialog -DlgAboutAboutTab : "About", -DlgAboutBrowserInfoTab : "Browser Info", -DlgAboutLicenseTab : "License", -DlgAboutVersion : "version", -DlgAboutInfo : "For further information go to", - -// Div Dialog -DlgDivGeneralTab : "General", -DlgDivAdvancedTab : "Advanced", -DlgDivStyle : "Style", -DlgDivInlineStyle : "Inline Style" -}; diff --git a/fckeditor/editor/lang/eo.js b/fckeditor/editor/lang/eo.js deleted file mode 100644 index dc032efe..00000000 --- a/fckeditor/editor/lang/eo.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Esperanto language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "KaÅi Ilobreton", -ToolbarExpand : "Vidigi Ilojn", - -// Toolbar Items and Context Menu -Save : "Sekurigi", -NewPage : "Nova PaÄo", -Preview : "Vidigi Aspekton", -Cut : "Eltondi", -Copy : "Kopii", -Paste : "Interglui", -PasteText : "Interglui kiel Tekston", -PasteWord : "Interglui el Word", -Print : "Presi", -SelectAll : "Elekti ĉion", -RemoveFormat : "Forigi Formaton", -InsertLinkLbl : "Ligilo", -InsertLink : "Enmeti/ÅœanÄi Ligilon", -RemoveLink : "Forigi Ligilon", -VisitLink : "Open Link", //MISSING -Anchor : "Enmeti/ÅœanÄi Ankron", -AnchorDelete : "Remove Anchor", //MISSING -InsertImageLbl : "Bildo", -InsertImage : "Enmeti/ÅœanÄi Bildon", -InsertFlashLbl : "Flash", //MISSING -InsertFlash : "Insert/Edit Flash", //MISSING -InsertTableLbl : "Tabelo", -InsertTable : "Enmeti/ÅœanÄi Tabelon", -InsertLineLbl : "Horizonta Linio", -InsertLine : "Enmeti Horizonta Linio", -InsertSpecialCharLbl: "Speciala Signo", -InsertSpecialChar : "Enmeti Specialan Signon", -InsertSmileyLbl : "Mienvinjeto", -InsertSmiley : "Enmeti Mienvinjeton", -About : "Pri FCKeditor", -Bold : "Grasa", -Italic : "Kursiva", -Underline : "Substreko", -StrikeThrough : "Trastreko", -Subscript : "Subskribo", -Superscript : "Superskribo", -LeftJustify : "Maldekstrigi", -CenterJustify : "Centrigi", -RightJustify : "Dekstrigi", -BlockJustify : "Äœisrandigi AmbaÅ­flanke", -DecreaseIndent : "Malpligrandigi KrommarÄenon", -IncreaseIndent : "Pligrandigi KrommarÄenon", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "Malfari", -Redo : "Refari", -NumberedListLbl : "Numera Listo", -NumberedList : "Enmeti/Forigi Numeran Liston", -BulletedListLbl : "Bula Listo", -BulletedList : "Enmeti/Forigi Bulan Liston", -ShowTableBorders : "Vidigi Borderojn de Tabelo", -ShowDetails : "Vidigi Detalojn", -Style : "Stilo", -FontFormat : "Formato", -Font : "Tiparo", -FontSize : "Grando", -TextColor : "Teksta Koloro", -BGColor : "Fona Koloro", -Source : "Fonto", -Find : "Serĉi", -Replace : "AnstataÅ­igi", -SpellCheck : "Literumada Kontrolilo", -UniversalKeyboard : "Universala Klavaro", -PageBreakLbl : "Page Break", //MISSING -PageBreak : "Insert Page Break", //MISSING - -Form : "Formularo", -Checkbox : "Markobutono", -RadioButton : "Radiobutono", -TextField : "Teksta kampo", -Textarea : "Teksta Areo", -HiddenField : "KaÅita Kampo", -Button : "Butono", -SelectionField : "Elekta Kampo", -ImageButton : "Bildbutono", - -FitWindow : "Maximize the editor size", //MISSING -ShowBlocks : "Show Blocks", //MISSING - -// Context Menu -EditLink : "Modifier Ligilon", -CellCM : "Cell", //MISSING -RowCM : "Row", //MISSING -ColumnCM : "Column", //MISSING -InsertRowAfter : "Insert Row After", //MISSING -InsertRowBefore : "Insert Row Before", //MISSING -DeleteRows : "Forigi Liniojn", -InsertColumnAfter : "Insert Column After", //MISSING -InsertColumnBefore : "Insert Column Before", //MISSING -DeleteColumns : "Forigi Kolumnojn", -InsertCellAfter : "Insert Cell After", //MISSING -InsertCellBefore : "Insert Cell Before", //MISSING -DeleteCells : "Forigi Ĉelojn", -MergeCells : "Kunfandi Ĉelojn", -MergeRight : "Merge Right", //MISSING -MergeDown : "Merge Down", //MISSING -HorizontalSplitCell : "Split Cell Horizontally", //MISSING -VerticalSplitCell : "Split Cell Vertically", //MISSING -TableDelete : "Delete Table", //MISSING -CellProperties : "Atributoj de Ĉelo", -TableProperties : "Atributoj de Tabelo", -ImageProperties : "Atributoj de Bildo", -FlashProperties : "Flash Properties", //MISSING - -AnchorProp : "Ankraj Atributoj", -ButtonProp : "Butonaj Atributoj", -CheckboxProp : "Markobutonaj Atributoj", -HiddenFieldProp : "Atributoj de KaÅita Kampo", -RadioButtonProp : "Radiobutonaj Atributoj", -ImageButtonProp : "Bildbutonaj Atributoj", -TextFieldProp : "Atributoj de Teksta Kampo", -SelectionFieldProp : "Atributoj de Elekta Kampo", -TextareaProp : "Atributoj de Teksta Areo", -FormProp : "Formularaj Atributoj", - -FontFormats : "Normala;Formatita;Adreso;Titolo 1;Titolo 2;Titolo 3;Titolo 4;Titolo 5;Titolo 6;Paragrafo (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Traktado de XHTML. Bonvolu pacienci...", -Done : "Finita", -PasteWordConfirm : "La algluota teksto Åajnas esti Word-devena. Ĉu vi volas purigi Äin antaÅ­ ol interglui?", -NotCompatiblePaste : "Tiu ĉi komando bezonas almenaÅ­ Internet Explorer 5.5. Ĉu vi volas daÅ­rigi sen purigado?", -UnknownToolbarItem : "Ilobretero nekonata \"%1\"", -UnknownCommand : "Komandonomo nekonata \"%1\"", -NotImplemented : "Komando ne ankoraÅ­ realigita", -UnknownToolbarSet : "La ilobreto \"%1\" ne ekzistas", -NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", //MISSING -BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", //MISSING -DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", //MISSING -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "Akcepti", -DlgBtnCancel : "Rezigni", -DlgBtnClose : "Fermi", -DlgBtnBrowseServer : "Foliumi en la Servilo", -DlgAdvancedTag : "Speciala", -DlgOpOther : "", -DlgInfoTab : "Info", //MISSING -DlgAlertUrl : "Please insert the URL", //MISSING - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Skribdirekto", -DlgGenLangDirLtr : "De maldekstro dekstren (LTR)", -DlgGenLangDirRtl : "De dekstro maldekstren (RTL)", -DlgGenLangCode : "Lingva Kodo", -DlgGenAccessKey : "Fulmoklavo", -DlgGenName : "Nomo", -DlgGenTabIndex : "Taba Ordo", -DlgGenLongDescr : "URL de Longa Priskribo", -DlgGenClass : "Klasoj de Stilfolioj", -DlgGenTitle : "Indika Titolo", -DlgGenContType : "Indika Enhavotipo", -DlgGenLinkCharset : "Signaro de la Ligita Rimedo", -DlgGenStyle : "Stilo", - -// Image Dialog -DlgImgTitle : "Atributoj de Bildo", -DlgImgInfoTab : "Informoj pri Bildo", -DlgImgBtnUpload : "Sendu al Servilo", -DlgImgURL : "URL", -DlgImgUpload : "AlÅuti", -DlgImgAlt : "AnstataÅ­iga Teksto", -DlgImgWidth : "LarÄo", -DlgImgHeight : "Alto", -DlgImgLockRatio : "Konservi Proporcion", -DlgBtnResetSize : "Origina Grando", -DlgImgBorder : "Bordero", -DlgImgHSpace : "HSpaco", -DlgImgVSpace : "VSpaco", -DlgImgAlign : "Äœisrandigo", -DlgImgAlignLeft : "Maldekstre", -DlgImgAlignAbsBottom: "Abs Malsupre", -DlgImgAlignAbsMiddle: "Abs Centre", -DlgImgAlignBaseline : "Je Malsupro de Teksto", -DlgImgAlignBottom : "Malsupre", -DlgImgAlignMiddle : "Centre", -DlgImgAlignRight : "Dekstre", -DlgImgAlignTextTop : "Je Supro de Teksto", -DlgImgAlignTop : "Supre", -DlgImgPreview : "Vidigi Aspekton", -DlgImgAlertUrl : "Bonvolu tajpi la URL de la bildo", -DlgImgLinkTab : "Link", //MISSING - -// Flash Dialog -DlgFlashTitle : "Flash Properties", //MISSING -DlgFlashChkPlay : "Auto Play", //MISSING -DlgFlashChkLoop : "Loop", //MISSING -DlgFlashChkMenu : "Enable Flash Menu", //MISSING -DlgFlashScale : "Scale", //MISSING -DlgFlashScaleAll : "Show all", //MISSING -DlgFlashScaleNoBorder : "No Border", //MISSING -DlgFlashScaleFit : "Exact Fit", //MISSING - -// Link Dialog -DlgLnkWindowTitle : "Ligilo", -DlgLnkInfoTab : "Informoj pri la Ligilo", -DlgLnkTargetTab : "Celo", - -DlgLnkType : "Tipo de Ligilo", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Ankri en tiu ĉi paÄo", -DlgLnkTypeEMail : "RetpoÅto", -DlgLnkProto : "Protokolo", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Elekti Ankron", -DlgLnkAnchorByName : "Per Ankronomo", -DlgLnkAnchorById : "Per Elementidentigilo", -DlgLnkNoAnchors : "", -DlgLnkEMail : "Retadreso", -DlgLnkEMailSubject : "Temlinio", -DlgLnkEMailBody : "MesaÄa korpo", -DlgLnkUpload : "AlÅuti", -DlgLnkBtnUpload : "Sendi al Servilo", - -DlgLnkTarget : "Celo", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "<Åprucfenestro>", -DlgLnkTargetBlank : "Nova Fenestro (_blank)", -DlgLnkTargetParent : "Gepatra Fenestro (_parent)", -DlgLnkTargetSelf : "Sama Fenestro (_self)", -DlgLnkTargetTop : "Plej Supra Fenestro (_top)", -DlgLnkTargetFrameName : "Nomo de Kadro", -DlgLnkPopWinName : "Nomo de Åœprucfenestro", -DlgLnkPopWinFeat : "Atributoj de la Åœprucfenestro", -DlgLnkPopResize : "Grando ÅœanÄebla", -DlgLnkPopLocation : "Adresobreto", -DlgLnkPopMenu : "Menubreto", -DlgLnkPopScroll : "Rulumlisteloj", -DlgLnkPopStatus : "Statobreto", -DlgLnkPopToolbar : "Ilobreto", -DlgLnkPopFullScrn : "Tutekrane (IE)", -DlgLnkPopDependent : "Dependa (Netscape)", -DlgLnkPopWidth : "LarÄo", -DlgLnkPopHeight : "Alto", -DlgLnkPopLeft : "Pozicio de Maldekstro", -DlgLnkPopTop : "Pozicio de Supro", - -DlnLnkMsgNoUrl : "Bonvolu entajpi la URL-on", -DlnLnkMsgNoEMail : "Bonvolu entajpi la retadreson", -DlnLnkMsgNoAnchor : "Bonvolu elekti ankron", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", //MISSING - -// Color Dialog -DlgColorTitle : "Elekti", -DlgColorBtnClear : "Forigi", -DlgColorHighlight : "Emfazi", -DlgColorSelected : "Elektita", - -// Smiley Dialog -DlgSmileyTitle : "Enmeti Mienvinjeton", - -// Special Character Dialog -DlgSpecialCharTitle : "Enmeti Specialan Signon", - -// Table Dialog -DlgTableTitle : "Atributoj de Tabelo", -DlgTableRows : "Linioj", -DlgTableColumns : "Kolumnoj", -DlgTableBorder : "Bordero", -DlgTableAlign : "Äœisrandigo", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Maldekstre", -DlgTableAlignCenter : "Centre", -DlgTableAlignRight : "Dekstre", -DlgTableWidth : "LarÄo", -DlgTableWidthPx : "Bitbilderoj", -DlgTableWidthPc : "elcentoj", -DlgTableHeight : "Alto", -DlgTableCellSpace : "Interspacigo de Ĉeloj", -DlgTableCellPad : "ĈirkaÅ­enhava Plenigado", -DlgTableCaption : "Titolo", -DlgTableSummary : "Summary", //MISSING - -// Table Cell Dialog -DlgCellTitle : "Atributoj de Celo", -DlgCellWidth : "LarÄo", -DlgCellWidthPx : "bitbilderoj", -DlgCellWidthPc : "elcentoj", -DlgCellHeight : "Alto", -DlgCellWordWrap : "Linifaldo", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Jes", -DlgCellWordWrapNo : "Ne", -DlgCellHorAlign : "Horizonta Äœisrandigo", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Maldekstre", -DlgCellHorAlignCenter : "Centre", -DlgCellHorAlignRight: "Dekstre", -DlgCellVerAlign : "Vertikala Äœisrandigo", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Supre", -DlgCellVerAlignMiddle : "Centre", -DlgCellVerAlignBottom : "Malsupre", -DlgCellVerAlignBaseline : "Je Malsupro de Teksto", -DlgCellRowSpan : "Linioj Kunfanditaj", -DlgCellCollSpan : "Kolumnoj Kunfanditaj", -DlgCellBackColor : "Fono", -DlgCellBorderColor : "Bordero", -DlgCellBtnSelect : "Elekti...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", //MISSING - -// Find Dialog -DlgFindTitle : "Serĉi", -DlgFindFindBtn : "Serĉi", -DlgFindNotFoundMsg : "La celteksto ne estas trovita.", - -// Replace Dialog -DlgReplaceTitle : "AnstataÅ­igi", -DlgReplaceFindLbl : "Serĉi:", -DlgReplaceReplaceLbl : "AnstataÅ­igi per:", -DlgReplaceCaseChk : "Kongruigi Usklecon", -DlgReplaceReplaceBtn : "AnstataÅ­igi", -DlgReplaceReplAllBtn : "AnstataÅ­igi Ĉiun", -DlgReplaceWordChk : "Tuta Vorto", - -// Paste Operations / Dialog -PasteErrorCut : "La sekurecagordo de via TTT-legilo ne permesas, ke la redaktilo faras eltondajn operaciojn. Bonvolu uzi la klavaron por tio (ctrl-X).", -PasteErrorCopy : "La sekurecagordo de via TTT-legilo ne permesas, ke la redaktilo faras kopiajn operaciojn. Bonvolu uzi la klavaron por tio (ctrl-C).", - -PasteAsText : "Interglui kiel Tekston", -PasteFromWord : "Interglui el Word", - -DlgPasteMsg2 : "Please paste inside the following box using the keyboard (Ctrl+V) and hit OK.", //MISSING -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING -DlgPasteIgnoreFont : "Ignore Font Face definitions", //MISSING -DlgPasteRemoveStyles : "Remove Styles definitions", //MISSING - -// Color Picker -ColorAutomatic : "AÅ­tomata", -ColorMoreColors : "Pli da Koloroj...", - -// Document Properties -DocProps : "Dokumentaj Atributoj", - -// Anchor Dialog -DlgAnchorTitle : "Ankraj Atributoj", -DlgAnchorName : "Ankra Nomo", -DlgAnchorErrorName : "Bv tajpi la ankran nomon", - -// Speller Pages Dialog -DlgSpellNotInDic : "Ne trovita en la vortaro", -DlgSpellChangeTo : "ÅœanÄi al", -DlgSpellBtnIgnore : "Malatenti", -DlgSpellBtnIgnoreAll : "Malatenti Ĉiun", -DlgSpellBtnReplace : "AnstataÅ­igi", -DlgSpellBtnReplaceAll : "AnstataÅ­igi Ĉiun", -DlgSpellBtnUndo : "Malfari", -DlgSpellNoSuggestions : "- Neniu propono -", -DlgSpellProgress : "Literumkontrolado daÅ­ras...", -DlgSpellNoMispell : "Literumkontrolado finita: neniu fuÅo trovita", -DlgSpellNoChanges : "Literumkontrolado finita: neniu vorto ÅanÄita", -DlgSpellOneChange : "Literumkontrolado finita: unu vorto ÅanÄita", -DlgSpellManyChanges : "Literumkontrolado finita: %1 vortoj ÅanÄitaj", - -IeSpellDownload : "Literumada Kontrolilo ne instalita. Ĉu vi volas elÅuti Äin nun?", - -// Button Dialog -DlgButtonText : "Teksto (Valoro)", -DlgButtonType : "Tipo", -DlgButtonTypeBtn : "Button", //MISSING -DlgButtonTypeSbm : "Submit", //MISSING -DlgButtonTypeRst : "Reset", //MISSING - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Nomo", -DlgCheckboxValue : "Valoro", -DlgCheckboxSelected : "Elektita", - -// Form Dialog -DlgFormName : "Nomo", -DlgFormAction : "Ago", -DlgFormMethod : "Metodo", - -// Select Field Dialog -DlgSelectName : "Nomo", -DlgSelectValue : "Valoro", -DlgSelectSize : "Grando", -DlgSelectLines : "Linioj", -DlgSelectChkMulti : "Permesi Plurajn Elektojn", -DlgSelectOpAvail : "Elektoj Disponeblaj", -DlgSelectOpText : "Teksto", -DlgSelectOpValue : "Valoro", -DlgSelectBtnAdd : "Aldoni", -DlgSelectBtnModify : "Modifi", -DlgSelectBtnUp : "Supren", -DlgSelectBtnDown : "Malsupren", -DlgSelectBtnSetValue : "Agordi kiel Elektitan Valoron", -DlgSelectBtnDelete : "Forigi", - -// Textarea Dialog -DlgTextareaName : "Nomo", -DlgTextareaCols : "Kolumnoj", -DlgTextareaRows : "Vicoj", - -// Text Field Dialog -DlgTextName : "Nomo", -DlgTextValue : "Valoro", -DlgTextCharWidth : "SignolarÄo", -DlgTextMaxChars : "Maksimuma Nombro da Signoj", -DlgTextType : "Tipo", -DlgTextTypeText : "Teksto", -DlgTextTypePass : "Pasvorto", - -// Hidden Field Dialog -DlgHiddenName : "Nomo", -DlgHiddenValue : "Valoro", - -// Bulleted List Dialog -BulletedListProp : "Atributoj de Bula Listo", -NumberedListProp : "Atributoj de Numera Listo", -DlgLstStart : "Start", //MISSING -DlgLstType : "Tipo", -DlgLstTypeCircle : "Cirklo", -DlgLstTypeDisc : "Disc", //MISSING -DlgLstTypeSquare : "Kvadrato", -DlgLstTypeNumbers : "Ciferoj (1, 2, 3)", -DlgLstTypeLCase : "Minusklaj Literoj (a, b, c)", -DlgLstTypeUCase : "Majusklaj Literoj (A, B, C)", -DlgLstTypeSRoman : "Malgrandaj Romanaj Ciferoj (i, ii, iii)", -DlgLstTypeLRoman : "Grandaj Romanaj Ciferoj (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Äœeneralaĵoj", -DlgDocBackTab : "Fono", -DlgDocColorsTab : "Koloroj kaj MarÄenoj", -DlgDocMetaTab : "Metadatumoj", - -DlgDocPageTitle : "PaÄotitolo", -DlgDocLangDir : "Skribdirekto de la Lingvo", -DlgDocLangDirLTR : "De maldekstro dekstren (LTR)", -DlgDocLangDirRTL : "De dekstro maldekstren (LTR)", -DlgDocLangCode : "Lingvokodo", -DlgDocCharSet : "Signara Kodo", -DlgDocCharSetCE : "Central European", //MISSING -DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING -DlgDocCharSetCR : "Cyrillic", //MISSING -DlgDocCharSetGR : "Greek", //MISSING -DlgDocCharSetJP : "Japanese", //MISSING -DlgDocCharSetKR : "Korean", //MISSING -DlgDocCharSetTR : "Turkish", //MISSING -DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING -DlgDocCharSetWE : "Western European", //MISSING -DlgDocCharSetOther : "Alia Signara Kodo", - -DlgDocDocType : "Dokumenta Tipo", -DlgDocDocTypeOther : "Alia Dokumenta Tipo", -DlgDocIncXHTML : "Inkluzivi XHTML Deklaroj", -DlgDocBgColor : "Fona Koloro", -DlgDocBgImage : "URL de Fona Bildo", -DlgDocBgNoScroll : "Neruluma Fono", -DlgDocCText : "Teksto", -DlgDocCLink : "Ligilo", -DlgDocCVisited : "Vizitita Ligilo", -DlgDocCActive : "Aktiva Ligilo", -DlgDocMargins : "PaÄaj MarÄenoj", -DlgDocMaTop : "Supra", -DlgDocMaLeft : "Maldekstra", -DlgDocMaRight : "Dekstra", -DlgDocMaBottom : "Malsupra", -DlgDocMeIndex : "Åœlosilvortoj de la Dokumento (apartigita de komoj)", -DlgDocMeDescr : "Dokumenta Priskribo", -DlgDocMeAuthor : "Verkinto", -DlgDocMeCopy : "Kopirajto", -DlgDocPreview : "Aspekto", - -// Templates Dialog -Templates : "Templates", //MISSING -DlgTemplatesTitle : "Content Templates", //MISSING -DlgTemplatesSelMsg : "Please select the template to open in the editor
    (the actual contents will be lost):", //MISSING -DlgTemplatesLoading : "Loading templates list. Please wait...", //MISSING -DlgTemplatesNoTpl : "(No templates defined)", //MISSING -DlgTemplatesReplace : "Replace actual contents", //MISSING - -// About Dialog -DlgAboutAboutTab : "Pri", -DlgAboutBrowserInfoTab : "Informoj pri TTT-legilo", -DlgAboutLicenseTab : "License", //MISSING -DlgAboutVersion : "versio", -DlgAboutInfo : "Por pli da informoj, vizitu", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/es.js b/fckeditor/editor/lang/es.js deleted file mode 100644 index c6f655a2..00000000 --- a/fckeditor/editor/lang/es.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Spanish language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Contraer Barra", -ToolbarExpand : "Expandir Barra", - -// Toolbar Items and Context Menu -Save : "Guardar", -NewPage : "Nueva Página", -Preview : "Vista Previa", -Cut : "Cortar", -Copy : "Copiar", -Paste : "Pegar", -PasteText : "Pegar como texto plano", -PasteWord : "Pegar desde Word", -Print : "Imprimir", -SelectAll : "Seleccionar Todo", -RemoveFormat : "Eliminar Formato", -InsertLinkLbl : "Vínculo", -InsertLink : "Insertar/Editar Vínculo", -RemoveLink : "Eliminar Vínculo", -VisitLink : "Abrir enlace", -Anchor : "Referencia", -AnchorDelete : "Eliminar Referencia", -InsertImageLbl : "Imagen", -InsertImage : "Insertar/Editar Imagen", -InsertFlashLbl : "Flash", -InsertFlash : "Insertar/Editar Flash", -InsertTableLbl : "Tabla", -InsertTable : "Insertar/Editar Tabla", -InsertLineLbl : "Línea", -InsertLine : "Insertar Línea Horizontal", -InsertSpecialCharLbl: "Caracter Especial", -InsertSpecialChar : "Insertar Caracter Especial", -InsertSmileyLbl : "Emoticons", -InsertSmiley : "Insertar Emoticons", -About : "Acerca de FCKeditor", -Bold : "Negrita", -Italic : "Cursiva", -Underline : "Subrayado", -StrikeThrough : "Tachado", -Subscript : "Subíndice", -Superscript : "Superíndice", -LeftJustify : "Alinear a Izquierda", -CenterJustify : "Centrar", -RightJustify : "Alinear a Derecha", -BlockJustify : "Justificado", -DecreaseIndent : "Disminuir Sangría", -IncreaseIndent : "Aumentar Sangría", -Blockquote : "Cita", -CreateDiv : "Crear contenedor (div)", -EditDiv : "Editar contenedor (div)", -DeleteDiv : "Eliminar contenedor (div)", -Undo : "Deshacer", -Redo : "Rehacer", -NumberedListLbl : "Numeración", -NumberedList : "Insertar/Eliminar Numeración", -BulletedListLbl : "Viñetas", -BulletedList : "Insertar/Eliminar Viñetas", -ShowTableBorders : "Mostrar Bordes de Tablas", -ShowDetails : "Mostrar saltos de Párrafo", -Style : "Estilo", -FontFormat : "Formato", -Font : "Fuente", -FontSize : "Tamaño", -TextColor : "Color de Texto", -BGColor : "Color de Fondo", -Source : "Fuente HTML", -Find : "Buscar", -Replace : "Reemplazar", -SpellCheck : "Ortografía", -UniversalKeyboard : "Teclado Universal", -PageBreakLbl : "Salto de Página", -PageBreak : "Insertar Salto de Página", - -Form : "Formulario", -Checkbox : "Casilla de Verificación", -RadioButton : "Botones de Radio", -TextField : "Campo de Texto", -Textarea : "Area de Texto", -HiddenField : "Campo Oculto", -Button : "Botón", -SelectionField : "Campo de Selección", -ImageButton : "Botón Imagen", - -FitWindow : "Maximizar el tamaño del editor", -ShowBlocks : "Mostrar bloques", - -// Context Menu -EditLink : "Editar Vínculo", -CellCM : "Celda", -RowCM : "Fila", -ColumnCM : "Columna", -InsertRowAfter : "Insertar fila en la parte inferior", -InsertRowBefore : "Insertar fila en la parte superior", -DeleteRows : "Eliminar Filas", -InsertColumnAfter : "Insertar columna a la derecha", -InsertColumnBefore : "Insertar columna a la izquierda", -DeleteColumns : "Eliminar Columnas", -InsertCellAfter : "Insertar celda a la derecha", -InsertCellBefore : "Insertar celda a la izquierda", -DeleteCells : "Eliminar Celdas", -MergeCells : "Combinar Celdas", -MergeRight : "Combinar a la derecha", -MergeDown : "Combinar hacia abajo", -HorizontalSplitCell : "Dividir la celda horizontalmente", -VerticalSplitCell : "Dividir la celda verticalmente", -TableDelete : "Eliminar Tabla", -CellProperties : "Propiedades de Celda", -TableProperties : "Propiedades de Tabla", -ImageProperties : "Propiedades de Imagen", -FlashProperties : "Propiedades de Flash", - -AnchorProp : "Propiedades de Referencia", -ButtonProp : "Propiedades de Botón", -CheckboxProp : "Propiedades de Casilla", -HiddenFieldProp : "Propiedades de Campo Oculto", -RadioButtonProp : "Propiedades de Botón de Radio", -ImageButtonProp : "Propiedades de Botón de Imagen", -TextFieldProp : "Propiedades de Campo de Texto", -SelectionFieldProp : "Propiedades de Campo de Selección", -TextareaProp : "Propiedades de Area de Texto", -FormProp : "Propiedades de Formulario", - -FontFormats : "Normal;Con formato;Dirección;Encabezado 1;Encabezado 2;Encabezado 3;Encabezado 4;Encabezado 5;Encabezado 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Procesando XHTML. Por favor, espere...", -Done : "Hecho", -PasteWordConfirm : "El texto que desea parece provenir de Word. Desea depurarlo antes de pegarlo?", -NotCompatiblePaste : "Este comando está disponible sólo para Internet Explorer version 5.5 or superior. Desea pegar sin depurar?", -UnknownToolbarItem : "Item de barra desconocido \"%1\"", -UnknownCommand : "Nombre de comando desconocido \"%1\"", -NotImplemented : "Comando no implementado", -UnknownToolbarSet : "Nombre de barra \"%1\" no definido", -NoActiveX : "La configuración de las opciones de seguridad de su navegador puede estar limitando algunas características del editor. Por favor active la opción \"Ejecutar controles y complementos de ActiveX \", de lo contrario puede experimentar errores o ausencia de funcionalidades.", -BrowseServerBlocked : "La ventana de visualización del servidor no pudo ser abierta. Verifique que su navegador no esté bloqueando las ventanas emergentes (pop up).", -DialogBlocked : "No se ha podido abrir la ventana de diálogo. Verifique que su navegador no esté bloqueando las ventanas emergentes (pop up).", -VisitLinkBlocked : "Nose ha podido abrir la ventana. Asegurese de que todos los bloqueadores de popups están deshabilitados.", - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Cancelar", -DlgBtnClose : "Cerrar", -DlgBtnBrowseServer : "Ver Servidor", -DlgAdvancedTag : "Avanzado", -DlgOpOther : "", -DlgInfoTab : "Información", -DlgAlertUrl : "Inserte el URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Orientación", -DlgGenLangDirLtr : "Izquierda a Derecha (LTR)", -DlgGenLangDirRtl : "Derecha a Izquierda (RTL)", -DlgGenLangCode : "Cód. de idioma", -DlgGenAccessKey : "Clave de Acceso", -DlgGenName : "Nombre", -DlgGenTabIndex : "Indice de tabulación", -DlgGenLongDescr : "Descripción larga URL", -DlgGenClass : "Clases de hojas de estilo", -DlgGenTitle : "Título", -DlgGenContType : "Tipo de Contenido", -DlgGenLinkCharset : "Fuente de caracteres vinculado", -DlgGenStyle : "Estilo", - -// Image Dialog -DlgImgTitle : "Propiedades de Imagen", -DlgImgInfoTab : "Información de Imagen", -DlgImgBtnUpload : "Enviar al Servidor", -DlgImgURL : "URL", -DlgImgUpload : "Cargar", -DlgImgAlt : "Texto Alternativo", -DlgImgWidth : "Anchura", -DlgImgHeight : "Altura", -DlgImgLockRatio : "Proporcional", -DlgBtnResetSize : "Tamaño Original", -DlgImgBorder : "Borde", -DlgImgHSpace : "Esp.Horiz", -DlgImgVSpace : "Esp.Vert", -DlgImgAlign : "Alineación", -DlgImgAlignLeft : "Izquierda", -DlgImgAlignAbsBottom: "Abs inferior", -DlgImgAlignAbsMiddle: "Abs centro", -DlgImgAlignBaseline : "Línea de base", -DlgImgAlignBottom : "Pie", -DlgImgAlignMiddle : "Centro", -DlgImgAlignRight : "Derecha", -DlgImgAlignTextTop : "Tope del texto", -DlgImgAlignTop : "Tope", -DlgImgPreview : "Vista Previa", -DlgImgAlertUrl : "Por favor escriba la URL de la imagen", -DlgImgLinkTab : "Vínculo", - -// Flash Dialog -DlgFlashTitle : "Propiedades de Flash", -DlgFlashChkPlay : "Autoejecución", -DlgFlashChkLoop : "Repetir", -DlgFlashChkMenu : "Activar Menú Flash", -DlgFlashScale : "Escala", -DlgFlashScaleAll : "Mostrar todo", -DlgFlashScaleNoBorder : "Sin Borde", -DlgFlashScaleFit : "Ajustado", - -// Link Dialog -DlgLnkWindowTitle : "Vínculo", -DlgLnkInfoTab : "Información de Vínculo", -DlgLnkTargetTab : "Destino", - -DlgLnkType : "Tipo de vínculo", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Referencia en esta página", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protocolo", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Seleccionar una referencia", -DlgLnkAnchorByName : "Por Nombre de Referencia", -DlgLnkAnchorById : "Por ID de elemento", -DlgLnkNoAnchors : "(No hay referencias disponibles en el documento)", -DlgLnkEMail : "Dirección de E-Mail", -DlgLnkEMailSubject : "Título del Mensaje", -DlgLnkEMailBody : "Cuerpo del Mensaje", -DlgLnkUpload : "Cargar", -DlgLnkBtnUpload : "Enviar al Servidor", - -DlgLnkTarget : "Destino", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Nueva Ventana(_blank)", -DlgLnkTargetParent : "Ventana Padre (_parent)", -DlgLnkTargetSelf : "Misma Ventana (_self)", -DlgLnkTargetTop : "Ventana primaria (_top)", -DlgLnkTargetFrameName : "Nombre del Marco Destino", -DlgLnkPopWinName : "Nombre de Ventana Emergente", -DlgLnkPopWinFeat : "Características de Ventana Emergente", -DlgLnkPopResize : "Ajustable", -DlgLnkPopLocation : "Barra de ubicación", -DlgLnkPopMenu : "Barra de Menú", -DlgLnkPopScroll : "Barras de desplazamiento", -DlgLnkPopStatus : "Barra de Estado", -DlgLnkPopToolbar : "Barra de Herramientas", -DlgLnkPopFullScrn : "Pantalla Completa (IE)", -DlgLnkPopDependent : "Dependiente (Netscape)", -DlgLnkPopWidth : "Anchura", -DlgLnkPopHeight : "Altura", -DlgLnkPopLeft : "Posición Izquierda", -DlgLnkPopTop : "Posición Derecha", - -DlnLnkMsgNoUrl : "Por favor tipee el vínculo URL", -DlnLnkMsgNoEMail : "Por favor tipee la dirección de e-mail", -DlnLnkMsgNoAnchor : "Por favor seleccione una referencia", -DlnLnkMsgInvPopName : "El nombre debe empezar con un caracter alfanumérico y no debe contener espacios", - -// Color Dialog -DlgColorTitle : "Seleccionar Color", -DlgColorBtnClear : "Ninguno", -DlgColorHighlight : "Resaltado", -DlgColorSelected : "Seleccionado", - -// Smiley Dialog -DlgSmileyTitle : "Insertar un Emoticon", - -// Special Character Dialog -DlgSpecialCharTitle : "Seleccione un caracter especial", - -// Table Dialog -DlgTableTitle : "Propiedades de Tabla", -DlgTableRows : "Filas", -DlgTableColumns : "Columnas", -DlgTableBorder : "Tamaño de Borde", -DlgTableAlign : "Alineación", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Izquierda", -DlgTableAlignCenter : "Centrado", -DlgTableAlignRight : "Derecha", -DlgTableWidth : "Anchura", -DlgTableWidthPx : "pixeles", -DlgTableWidthPc : "porcentaje", -DlgTableHeight : "Altura", -DlgTableCellSpace : "Esp. e/celdas", -DlgTableCellPad : "Esp. interior", -DlgTableCaption : "Título", -DlgTableSummary : "Síntesis", - -// Table Cell Dialog -DlgCellTitle : "Propiedades de Celda", -DlgCellWidth : "Anchura", -DlgCellWidthPx : "pixeles", -DlgCellWidthPc : "porcentaje", -DlgCellHeight : "Altura", -DlgCellWordWrap : "Cortar Línea", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Si", -DlgCellWordWrapNo : "No", -DlgCellHorAlign : "Alineación Horizontal", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Izquierda", -DlgCellHorAlignCenter : "Centrado", -DlgCellHorAlignRight: "Derecha", -DlgCellVerAlign : "Alineación Vertical", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Tope", -DlgCellVerAlignMiddle : "Medio", -DlgCellVerAlignBottom : "ie", -DlgCellVerAlignBaseline : "Línea de Base", -DlgCellRowSpan : "Abarcar Filas", -DlgCellCollSpan : "Abarcar Columnas", -DlgCellBackColor : "Color de Fondo", -DlgCellBorderColor : "Color de Borde", -DlgCellBtnSelect : "Seleccione...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Buscar y Reemplazar", - -// Find Dialog -DlgFindTitle : "Buscar", -DlgFindFindBtn : "Buscar", -DlgFindNotFoundMsg : "El texto especificado no ha sido encontrado.", - -// Replace Dialog -DlgReplaceTitle : "Reemplazar", -DlgReplaceFindLbl : "Texto a buscar:", -DlgReplaceReplaceLbl : "Reemplazar con:", -DlgReplaceCaseChk : "Coincidir may/min", -DlgReplaceReplaceBtn : "Reemplazar", -DlgReplaceReplAllBtn : "Reemplazar Todo", -DlgReplaceWordChk : "Coincidir toda la palabra", - -// Paste Operations / Dialog -PasteErrorCut : "La configuración de seguridad de este navegador no permite la ejecución automática de operaciones de cortado. Por favor use el teclado (Ctrl+X).", -PasteErrorCopy : "La configuración de seguridad de este navegador no permite la ejecución automática de operaciones de copiado. Por favor use el teclado (Ctrl+C).", - -PasteAsText : "Pegar como Texto Plano", -PasteFromWord : "Pegar desde Word", - -DlgPasteMsg2 : "Por favor pegue dentro del cuadro utilizando el teclado (Ctrl+V); luego presione OK.", -DlgPasteSec : "Debido a la configuración de seguridad de su navegador, el editor no tiene acceso al portapapeles. Es necesario que lo pegue de nuevo en esta ventana.", -DlgPasteIgnoreFont : "Ignorar definiciones de fuentes", -DlgPasteRemoveStyles : "Remover definiciones de estilo", - -// Color Picker -ColorAutomatic : "Automático", -ColorMoreColors : "Más Colores...", - -// Document Properties -DocProps : "Propiedades del Documento", - -// Anchor Dialog -DlgAnchorTitle : "Propiedades de la Referencia", -DlgAnchorName : "Nombre de la Referencia", -DlgAnchorErrorName : "Por favor, complete el nombre de la Referencia", - -// Speller Pages Dialog -DlgSpellNotInDic : "No se encuentra en el Diccionario", -DlgSpellChangeTo : "Cambiar a", -DlgSpellBtnIgnore : "Ignorar", -DlgSpellBtnIgnoreAll : "Ignorar Todo", -DlgSpellBtnReplace : "Reemplazar", -DlgSpellBtnReplaceAll : "Reemplazar Todo", -DlgSpellBtnUndo : "Deshacer", -DlgSpellNoSuggestions : "- No hay sugerencias -", -DlgSpellProgress : "Control de Ortografía en progreso...", -DlgSpellNoMispell : "Control finalizado: no se encontraron errores", -DlgSpellNoChanges : "Control finalizado: no se ha cambiado ninguna palabra", -DlgSpellOneChange : "Control finalizado: se ha cambiado una palabra", -DlgSpellManyChanges : "Control finalizado: se ha cambiado %1 palabras", - -IeSpellDownload : "Módulo de Control de Ortografía no instalado. ¿Desea descargarlo ahora?", - -// Button Dialog -DlgButtonText : "Texto (Valor)", -DlgButtonType : "Tipo", -DlgButtonTypeBtn : "Boton", -DlgButtonTypeSbm : "Enviar", -DlgButtonTypeRst : "Reestablecer", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Nombre", -DlgCheckboxValue : "Valor", -DlgCheckboxSelected : "Seleccionado", - -// Form Dialog -DlgFormName : "Nombre", -DlgFormAction : "Acción", -DlgFormMethod : "Método", - -// Select Field Dialog -DlgSelectName : "Nombre", -DlgSelectValue : "Valor", -DlgSelectSize : "Tamaño", -DlgSelectLines : "Lineas", -DlgSelectChkMulti : "Permitir múltiple selección", -DlgSelectOpAvail : "Opciones disponibles", -DlgSelectOpText : "Texto", -DlgSelectOpValue : "Valor", -DlgSelectBtnAdd : "Agregar", -DlgSelectBtnModify : "Modificar", -DlgSelectBtnUp : "Subir", -DlgSelectBtnDown : "Bajar", -DlgSelectBtnSetValue : "Establecer como predeterminado", -DlgSelectBtnDelete : "Eliminar", - -// Textarea Dialog -DlgTextareaName : "Nombre", -DlgTextareaCols : "Columnas", -DlgTextareaRows : "Filas", - -// Text Field Dialog -DlgTextName : "Nombre", -DlgTextValue : "Valor", -DlgTextCharWidth : "Caracteres de ancho", -DlgTextMaxChars : "Máximo caracteres", -DlgTextType : "Tipo", -DlgTextTypeText : "Texto", -DlgTextTypePass : "Contraseña", - -// Hidden Field Dialog -DlgHiddenName : "Nombre", -DlgHiddenValue : "Valor", - -// Bulleted List Dialog -BulletedListProp : "Propiedades de Viñetas", -NumberedListProp : "Propiedades de Numeraciones", -DlgLstStart : "Inicio", -DlgLstType : "Tipo", -DlgLstTypeCircle : "Círculo", -DlgLstTypeDisc : "Disco", -DlgLstTypeSquare : "Cuadrado", -DlgLstTypeNumbers : "Números (1, 2, 3)", -DlgLstTypeLCase : "letras en minúsculas (a, b, c)", -DlgLstTypeUCase : "letras en mayúsculas (A, B, C)", -DlgLstTypeSRoman : "Números Romanos (i, ii, iii)", -DlgLstTypeLRoman : "Números Romanos (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "General", -DlgDocBackTab : "Fondo", -DlgDocColorsTab : "Colores y Márgenes", -DlgDocMetaTab : "Meta Información", - -DlgDocPageTitle : "Título de Página", -DlgDocLangDir : "Orientación de idioma", -DlgDocLangDirLTR : "Izq. a Derecha (LTR)", -DlgDocLangDirRTL : "Der. a Izquierda (RTL)", -DlgDocLangCode : "Código de Idioma", -DlgDocCharSet : "Codif. de Conjunto de Caracteres", -DlgDocCharSetCE : "Centro Europeo", -DlgDocCharSetCT : "Chino Tradicional (Big5)", -DlgDocCharSetCR : "Cirílico", -DlgDocCharSetGR : "Griego", -DlgDocCharSetJP : "Japonés", -DlgDocCharSetKR : "Coreano", -DlgDocCharSetTR : "Turco", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Europeo occidental", -DlgDocCharSetOther : "Otra Codificación", - -DlgDocDocType : "Encabezado de Tipo de Documento", -DlgDocDocTypeOther : "Otro Encabezado", -DlgDocIncXHTML : "Incluir Declaraciones XHTML", -DlgDocBgColor : "Color de Fondo", -DlgDocBgImage : "URL de Imagen de Fondo", -DlgDocBgNoScroll : "Fondo sin rolido", -DlgDocCText : "Texto", -DlgDocCLink : "Vínculo", -DlgDocCVisited : "Vínculo Visitado", -DlgDocCActive : "Vínculo Activo", -DlgDocMargins : "Márgenes de Página", -DlgDocMaTop : "Tope", -DlgDocMaLeft : "Izquierda", -DlgDocMaRight : "Derecha", -DlgDocMaBottom : "Pie", -DlgDocMeIndex : "Claves de indexación del Documento (separados por comas)", -DlgDocMeDescr : "Descripción del Documento", -DlgDocMeAuthor : "Autor", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Vista Previa", - -// Templates Dialog -Templates : "Plantillas", -DlgTemplatesTitle : "Contenido de Plantillas", -DlgTemplatesSelMsg : "Por favor selecciona la plantilla a abrir en el editor
    (el contenido actual se perderá):", -DlgTemplatesLoading : "Cargando lista de Plantillas. Por favor, aguarde...", -DlgTemplatesNoTpl : "(No hay plantillas definidas)", -DlgTemplatesReplace : "Reemplazar el contenido actual", - -// About Dialog -DlgAboutAboutTab : "Acerca de", -DlgAboutBrowserInfoTab : "Información de Navegador", -DlgAboutLicenseTab : "Licencia", -DlgAboutVersion : "versión", -DlgAboutInfo : "Para mayor información por favor dirigirse a", - -// Div Dialog -DlgDivGeneralTab : "General", -DlgDivAdvancedTab : "Avanzado", -DlgDivStyle : "Estilo", -DlgDivInlineStyle : "Estilos CSS" -}; diff --git a/fckeditor/editor/lang/et.js b/fckeditor/editor/lang/et.js deleted file mode 100644 index 8c9d5ff4..00000000 --- a/fckeditor/editor/lang/et.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Estonian language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Voldi tööriistariba", -ToolbarExpand : "Laienda tööriistariba", - -// Toolbar Items and Context Menu -Save : "Salvesta", -NewPage : "Uus leht", -Preview : "Eelvaade", -Cut : "Lõika", -Copy : "Kopeeri", -Paste : "Kleebi", -PasteText : "Kleebi tavalise tekstina", -PasteWord : "Kleebi Wordist", -Print : "Prindi", -SelectAll : "Vali kõik", -RemoveFormat : "Eemalda vorming", -InsertLinkLbl : "Link", -InsertLink : "Sisesta link / Muuda linki", -RemoveLink : "Eemalda link", -VisitLink : "Open Link", //MISSING -Anchor : "Sisesta ankur / Muuda ankrut", -AnchorDelete : "Eemalda ankur", -InsertImageLbl : "Pilt", -InsertImage : "Sisesta pilt / Muuda pilti", -InsertFlashLbl : "Flash", -InsertFlash : "Sisesta flash / Muuda flashi", -InsertTableLbl : "Tabel", -InsertTable : "Sisesta tabel / Muuda tabelit", -InsertLineLbl : "Joon", -InsertLine : "Sisesta horisontaaljoon", -InsertSpecialCharLbl: "Erimärgid", -InsertSpecialChar : "Sisesta erimärk", -InsertSmileyLbl : "Emotikon", -InsertSmiley : "Sisesta emotikon", -About : "FCKeditor teave", -Bold : "Paks", -Italic : "Kursiiv", -Underline : "Allajoonitud", -StrikeThrough : "Läbijoonitud", -Subscript : "Allindeks", -Superscript : "Ülaindeks", -LeftJustify : "Vasakjoondus", -CenterJustify : "Keskjoondus", -RightJustify : "Paremjoondus", -BlockJustify : "Rööpjoondus", -DecreaseIndent : "Vähenda taanet", -IncreaseIndent : "Suurenda taanet", -Blockquote : "Blokktsitaat", -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "Võta tagasi", -Redo : "Korda toimingut", -NumberedListLbl : "Nummerdatud loetelu", -NumberedList : "Sisesta/Eemalda nummerdatud loetelu", -BulletedListLbl : "Punktiseeritud loetelu", -BulletedList : "Sisesta/Eemalda punktiseeritud loetelu", -ShowTableBorders : "Näita tabeli jooni", -ShowDetails : "Näita üksikasju", -Style : "Laad", -FontFormat : "Vorming", -Font : "Kiri", -FontSize : "Suurus", -TextColor : "Teksti värv", -BGColor : "Tausta värv", -Source : "Lähtekood", -Find : "Otsi", -Replace : "Asenda", -SpellCheck : "Kontrolli õigekirja", -UniversalKeyboard : "Universaalne klaviatuur", -PageBreakLbl : "Lehepiir", -PageBreak : "Sisesta lehevahetuskoht", - -Form : "Vorm", -Checkbox : "Märkeruut", -RadioButton : "Raadionupp", -TextField : "Tekstilahter", -Textarea : "Tekstiala", -HiddenField : "Varjatud lahter", -Button : "Nupp", -SelectionField : "Valiklahter", -ImageButton : "Piltnupp", - -FitWindow : "Maksimeeri redaktori mõõtmed", -ShowBlocks : "Näita blokke", - -// Context Menu -EditLink : "Muuda linki", -CellCM : "Lahter", -RowCM : "Rida", -ColumnCM : "Veerg", -InsertRowAfter : "Sisesta rida peale", -InsertRowBefore : "Sisesta rida enne", -DeleteRows : "Eemalda read", -InsertColumnAfter : "Sisesta veerg peale", -InsertColumnBefore : "Sisesta veerg enne", -DeleteColumns : "Eemalda veerud", -InsertCellAfter : "Sisesta lahter peale", -InsertCellBefore : "Sisesta lahter enne", -DeleteCells : "Eemalda lahtrid", -MergeCells : "Ühenda lahtrid", -MergeRight : "Ühenda paremale", -MergeDown : "Ühenda alla", -HorizontalSplitCell : "Poolita lahter horisontaalselt", -VerticalSplitCell : "Poolita lahter vertikaalselt", -TableDelete : "Kustuta tabel", -CellProperties : "Lahtri atribuudid", -TableProperties : "Tabeli atribuudid", -ImageProperties : "Pildi atribuudid", -FlashProperties : "Flash omadused", - -AnchorProp : "Ankru omadused", -ButtonProp : "Nupu omadused", -CheckboxProp : "Märkeruudu omadused", -HiddenFieldProp : "Varjatud lahtri omadused", -RadioButtonProp : "Raadionupu omadused", -ImageButtonProp : "Piltnupu omadused", -TextFieldProp : "Tekstilahtri omadused", -SelectionFieldProp : "Valiklahtri omadused", -TextareaProp : "Tekstiala omadused", -FormProp : "Vormi omadused", - -FontFormats : "Tavaline;Vormindatud;Aadress;Pealkiri 1;Pealkiri 2;Pealkiri 3;Pealkiri 4;Pealkiri 5;Pealkiri 6;Tavaline (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Töötlen XHTML'i. Palun oota...", -Done : "Tehtud", -PasteWordConfirm : "Tekst, mida soovid lisada paistab pärinevat Word'ist. Kas soovid seda enne kleepimist puhastada?", -NotCompatiblePaste : "See käsk on saadaval ainult Internet Explorer versioon 5.5 või uuema puhul. Kas soovid kleepida ilma puhastamata?", -UnknownToolbarItem : "Tundmatu tööriistarea üksus \"%1\"", -UnknownCommand : "Tundmatu käsunimi \"%1\"", -NotImplemented : "Käsku ei täidetud", -UnknownToolbarSet : "Tööriistariba \"%1\" ei eksisteeri", -NoActiveX : "Sinu veebisirvija turvalisuse seaded võivad limiteerida mõningaid tekstirdaktori kasutusvõimalusi. Sa peaksid võimaldama valiku \"Run ActiveX controls and plug-ins\" oma veebisirvija seadetes. Muidu võid sa täheldada vigu tekstiredaktori töös ja märgata puuduvaid funktsioone.", -BrowseServerBlocked : "Ressursside sirvija avamine ebaõnnestus. Võimalda pop-up akende avanemine.", -DialogBlocked : "Ei olenud võimalik avada dialoogi akent. Võimalda pop-up akende avanemine.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Loobu", -DlgBtnClose : "Sulge", -DlgBtnBrowseServer : "Sirvi serverit", -DlgAdvancedTag : "Täpsemalt", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Palun sisesta URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Keele suund", -DlgGenLangDirLtr : "Vasakult paremale (LTR)", -DlgGenLangDirRtl : "Paremalt vasakule (RTL)", -DlgGenLangCode : "Keele kood", -DlgGenAccessKey : "Juurdepääsu võti", -DlgGenName : "Nimi", -DlgGenTabIndex : "Tab indeks", -DlgGenLongDescr : "Pikk kirjeldus URL", -DlgGenClass : "Stiilistiku klassid", -DlgGenTitle : "Juhendav tiitel", -DlgGenContType : "Juhendava sisu tüüp", -DlgGenLinkCharset : "Lingitud ressurssi märgistik", -DlgGenStyle : "Laad", - -// Image Dialog -DlgImgTitle : "Pildi atribuudid", -DlgImgInfoTab : "Pildi info", -DlgImgBtnUpload : "Saada serverissee", -DlgImgURL : "URL", -DlgImgUpload : "Lae üles", -DlgImgAlt : "Alternatiivne tekst", -DlgImgWidth : "Laius", -DlgImgHeight : "Kõrgus", -DlgImgLockRatio : "Lukusta kuvasuhe", -DlgBtnResetSize : "Lähtesta suurus", -DlgImgBorder : "Joon", -DlgImgHSpace : "H. vaheruum", -DlgImgVSpace : "V. vaheruum", -DlgImgAlign : "Joondus", -DlgImgAlignLeft : "Vasak", -DlgImgAlignAbsBottom: "Abs alla", -DlgImgAlignAbsMiddle: "Abs keskele", -DlgImgAlignBaseline : "Baasjoonele", -DlgImgAlignBottom : "Alla", -DlgImgAlignMiddle : "Keskele", -DlgImgAlignRight : "Paremale", -DlgImgAlignTextTop : "Tekstit üles", -DlgImgAlignTop : "Üles", -DlgImgPreview : "Eelvaade", -DlgImgAlertUrl : "Palun kirjuta pildi URL", -DlgImgLinkTab : "Link", - -// Flash Dialog -DlgFlashTitle : "Flash omadused", -DlgFlashChkPlay : "Automaatne start ", -DlgFlashChkLoop : "Korduv", -DlgFlashChkMenu : "Võimalda flash menüü", -DlgFlashScale : "Mastaap", -DlgFlashScaleAll : "Näita kõike", -DlgFlashScaleNoBorder : "Äärist ei ole", -DlgFlashScaleFit : "Täpne sobivus", - -// Link Dialog -DlgLnkWindowTitle : "Link", -DlgLnkInfoTab : "Lingi info", -DlgLnkTargetTab : "Sihtkoht", - -DlgLnkType : "Lingi tüüp", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Ankur sellel lehel", -DlgLnkTypeEMail : "E-post", -DlgLnkProto : "Protokoll", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Vali ankur", -DlgLnkAnchorByName : "Ankru nime järgi", -DlgLnkAnchorById : "Elemendi id järgi", -DlgLnkNoAnchors : "(Selles dokumendis ei ole ankruid)", -DlgLnkEMail : "E-posti aadress", -DlgLnkEMailSubject : "Sõnumi teema", -DlgLnkEMailBody : "Sõnumi tekst", -DlgLnkUpload : "Lae üles", -DlgLnkBtnUpload : "Saada serverisse", - -DlgLnkTarget : "Sihtkoht", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Uus aken (_blank)", -DlgLnkTargetParent : "Esivanem aken (_parent)", -DlgLnkTargetSelf : "Sama aken (_self)", -DlgLnkTargetTop : "Pealmine aken (_top)", -DlgLnkTargetFrameName : "Sihtmärk raami nimi", -DlgLnkPopWinName : "Hüpikakna nimi", -DlgLnkPopWinFeat : "Hüpikakna omadused", -DlgLnkPopResize : "Suurendatav", -DlgLnkPopLocation : "Aadressiriba", -DlgLnkPopMenu : "Menüüriba", -DlgLnkPopScroll : "Kerimisribad", -DlgLnkPopStatus : "Olekuriba", -DlgLnkPopToolbar : "Tööriistariba", -DlgLnkPopFullScrn : "Täisekraan (IE)", -DlgLnkPopDependent : "Sõltuv (Netscape)", -DlgLnkPopWidth : "Laius", -DlgLnkPopHeight : "Kõrgus", -DlgLnkPopLeft : "Vasak asukoht", -DlgLnkPopTop : "Ülemine asukoht", - -DlnLnkMsgNoUrl : "Palun kirjuta lingi URL", -DlnLnkMsgNoEMail : "Palun kirjuta E-Posti aadress", -DlnLnkMsgNoAnchor : "Palun vali ankur", -DlnLnkMsgInvPopName : "Hüpikakna nimi peab algama alfabeetilise tähega ja ei tohi sisaldada tühikuid", - -// Color Dialog -DlgColorTitle : "Vali värv", -DlgColorBtnClear : "Tühjenda", -DlgColorHighlight : "Märgi", -DlgColorSelected : "Valitud", - -// Smiley Dialog -DlgSmileyTitle : "Sisesta emotikon", - -// Special Character Dialog -DlgSpecialCharTitle : "Vali erimärk", - -// Table Dialog -DlgTableTitle : "Tabeli atribuudid", -DlgTableRows : "Read", -DlgTableColumns : "Veerud", -DlgTableBorder : "Joone suurus", -DlgTableAlign : "Joondus", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Vasak", -DlgTableAlignCenter : "Kesk", -DlgTableAlignRight : "Parem", -DlgTableWidth : "Laius", -DlgTableWidthPx : "pikslit", -DlgTableWidthPc : "protsenti", -DlgTableHeight : "Kõrgus", -DlgTableCellSpace : "Lahtri vahe", -DlgTableCellPad : "Lahtri täidis", -DlgTableCaption : "Tabeli tiitel", -DlgTableSummary : "Kokkuvõte", - -// Table Cell Dialog -DlgCellTitle : "Lahtri atribuudid", -DlgCellWidth : "Laius", -DlgCellWidthPx : "pikslit", -DlgCellWidthPc : "protsenti", -DlgCellHeight : "Kõrgus", -DlgCellWordWrap : "Sõna ülekanne", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Jah", -DlgCellWordWrapNo : "Ei", -DlgCellHorAlign : "Horisontaaljoondus", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Vasak", -DlgCellHorAlignCenter : "Kesk", -DlgCellHorAlignRight: "Parem", -DlgCellVerAlign : "Vertikaaljoondus", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Üles", -DlgCellVerAlignMiddle : "Keskele", -DlgCellVerAlignBottom : "Alla", -DlgCellVerAlignBaseline : "Baasjoonele", -DlgCellRowSpan : "Reaulatus", -DlgCellCollSpan : "Veeruulatus", -DlgCellBackColor : "Tausta värv", -DlgCellBorderColor : "Joone värv", -DlgCellBtnSelect : "Vali...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Otsi ja asenda", - -// Find Dialog -DlgFindTitle : "Otsi", -DlgFindFindBtn : "Otsi", -DlgFindNotFoundMsg : "Valitud teksti ei leitud.", - -// Replace Dialog -DlgReplaceTitle : "Asenda", -DlgReplaceFindLbl : "Leia mida:", -DlgReplaceReplaceLbl : "Asenda millega:", -DlgReplaceCaseChk : "Erista suur- ja väiketähti", -DlgReplaceReplaceBtn : "Asenda", -DlgReplaceReplAllBtn : "Asenda kõik", -DlgReplaceWordChk : "Otsi terviklike sõnu", - -// Paste Operations / Dialog -PasteErrorCut : "Sinu veebisirvija turvaseaded ei luba redaktoril automaatselt lõigata. Palun kasutage selleks klaviatuuri klahvikombinatsiooni (Ctrl+X).", -PasteErrorCopy : "Sinu veebisirvija turvaseaded ei luba redaktoril automaatselt kopeerida. Palun kasutage selleks klaviatuuri klahvikombinatsiooni (Ctrl+C).", - -PasteAsText : "Kleebi tavalise tekstina", -PasteFromWord : "Kleebi Wordist", - -DlgPasteMsg2 : "Palun kleebi järgnevasse kasti kasutades klaviatuuri klahvikombinatsiooni (Ctrl+V) ja vajuta seejärel OK.", -DlgPasteSec : "Sinu veebisirvija turvaseadete tõttu, ei oma redaktor otsest ligipääsu lõikelaua andmetele. Sa pead kleepima need uuesti siia aknasse.", -DlgPasteIgnoreFont : "Ignoreeri kirja definitsioone", -DlgPasteRemoveStyles : "Eemalda stiilide definitsioonid", - -// Color Picker -ColorAutomatic : "Automaatne", -ColorMoreColors : "Rohkem värve...", - -// Document Properties -DocProps : "Dokumendi omadused", - -// Anchor Dialog -DlgAnchorTitle : "Ankru omadused", -DlgAnchorName : "Ankru nimi", -DlgAnchorErrorName : "Palun sisest ankru nimi", - -// Speller Pages Dialog -DlgSpellNotInDic : "Puudub sõnastikust", -DlgSpellChangeTo : "Muuda", -DlgSpellBtnIgnore : "Ignoreeri", -DlgSpellBtnIgnoreAll : "Ignoreeri kõiki", -DlgSpellBtnReplace : "Asenda", -DlgSpellBtnReplaceAll : "Asenda kõik", -DlgSpellBtnUndo : "Võta tagasi", -DlgSpellNoSuggestions : "- Soovitused puuduvad -", -DlgSpellProgress : "Toimub õigekirja kontroll...", -DlgSpellNoMispell : "Õigekirja kontroll sooritatud: õigekirjuvigu ei leitud", -DlgSpellNoChanges : "Õigekirja kontroll sooritatud: ühtegi sõna ei muudetud", -DlgSpellOneChange : "Õigekirja kontroll sooritatud: üks sõna muudeti", -DlgSpellManyChanges : "Õigekirja kontroll sooritatud: %1 sõna muudetud", - -IeSpellDownload : "Õigekirja kontrollija ei ole installeeritud. Soovid sa selle alla laadida?", - -// Button Dialog -DlgButtonText : "Tekst (väärtus)", -DlgButtonType : "Tüüp", -DlgButtonTypeBtn : "Nupp", -DlgButtonTypeSbm : "Saada", -DlgButtonTypeRst : "Lähtesta", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Nimi", -DlgCheckboxValue : "Väärtus", -DlgCheckboxSelected : "Valitud", - -// Form Dialog -DlgFormName : "Nimi", -DlgFormAction : "Toiming", -DlgFormMethod : "Meetod", - -// Select Field Dialog -DlgSelectName : "Nimi", -DlgSelectValue : "Väärtus", -DlgSelectSize : "Suurus", -DlgSelectLines : "ridu", -DlgSelectChkMulti : "Võimalda mitu valikut", -DlgSelectOpAvail : "Võimalikud valikud", -DlgSelectOpText : "Tekst", -DlgSelectOpValue : "Väärtus", -DlgSelectBtnAdd : "Lisa", -DlgSelectBtnModify : "Muuda", -DlgSelectBtnUp : "Üles", -DlgSelectBtnDown : "Alla", -DlgSelectBtnSetValue : "Sea valitud olekuna", -DlgSelectBtnDelete : "Kustuta", - -// Textarea Dialog -DlgTextareaName : "Nimi", -DlgTextareaCols : "Veerge", -DlgTextareaRows : "Ridu", - -// Text Field Dialog -DlgTextName : "Nimi", -DlgTextValue : "Väärtus", -DlgTextCharWidth : "Laius (tähemärkides)", -DlgTextMaxChars : "Maksimaalselt tähemärke", -DlgTextType : "Tüüp", -DlgTextTypeText : "Tekst", -DlgTextTypePass : "Parool", - -// Hidden Field Dialog -DlgHiddenName : "Nimi", -DlgHiddenValue : "Väärtus", - -// Bulleted List Dialog -BulletedListProp : "Täpitud loetelu omadused", -NumberedListProp : "Nummerdatud loetelu omadused", -DlgLstStart : "Alusta", -DlgLstType : "Tüüp", -DlgLstTypeCircle : "Ring", -DlgLstTypeDisc : "Ketas", -DlgLstTypeSquare : "Ruut", -DlgLstTypeNumbers : "Numbrid (1, 2, 3)", -DlgLstTypeLCase : "Väiketähed (a, b, c)", -DlgLstTypeUCase : "Suurtähed (A, B, C)", -DlgLstTypeSRoman : "Väiksed Rooma numbrid (i, ii, iii)", -DlgLstTypeLRoman : "Suured Rooma numbrid (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Üldine", -DlgDocBackTab : "Taust", -DlgDocColorsTab : "Värvid ja veerised", -DlgDocMetaTab : "Meta andmed", - -DlgDocPageTitle : "Lehekülje tiitel", -DlgDocLangDir : "Kirja suund", -DlgDocLangDirLTR : "Vasakult paremale (LTR)", -DlgDocLangDirRTL : "Paremalt vasakule (RTL)", -DlgDocLangCode : "Keele kood", -DlgDocCharSet : "Märgistiku kodeering", -DlgDocCharSetCE : "Kesk-Euroopa", -DlgDocCharSetCT : "Hiina traditsiooniline (Big5)", -DlgDocCharSetCR : "Kirillisa", -DlgDocCharSetGR : "Kreeka", -DlgDocCharSetJP : "Jaapani", -DlgDocCharSetKR : "Korea", -DlgDocCharSetTR : "Türgi", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Lääne-Euroopa", -DlgDocCharSetOther : "Ülejäänud märgistike kodeeringud", - -DlgDocDocType : "Dokumendi tüüppäis", -DlgDocDocTypeOther : "Teised dokumendi tüüppäised", -DlgDocIncXHTML : "Arva kaasa XHTML deklaratsioonid", -DlgDocBgColor : "Taustavärv", -DlgDocBgImage : "Taustapildi URL", -DlgDocBgNoScroll : "Mittekeritav tagataust", -DlgDocCText : "Tekst", -DlgDocCLink : "Link", -DlgDocCVisited : "Külastatud link", -DlgDocCActive : "Aktiivne link", -DlgDocMargins : "Lehekülje äärised", -DlgDocMaTop : "Ülaserv", -DlgDocMaLeft : "Vasakserv", -DlgDocMaRight : "Paremserv", -DlgDocMaBottom : "Alaserv", -DlgDocMeIndex : "Dokumendi võtmesõnad (eraldatud komadega)", -DlgDocMeDescr : "Dokumendi kirjeldus", -DlgDocMeAuthor : "Autor", -DlgDocMeCopy : "Autoriõigus", -DlgDocPreview : "Eelvaade", - -// Templates Dialog -Templates : "Šabloon", -DlgTemplatesTitle : "Sisu šabloonid", -DlgTemplatesSelMsg : "Palun vali šabloon, et avada see redaktoris
    (praegune sisu läheb kaotsi):", -DlgTemplatesLoading : "Laen šabloonide nimekirja. Palun oota...", -DlgTemplatesNoTpl : "(Ühtegi šablooni ei ole defineeritud)", -DlgTemplatesReplace : "Asenda tegelik sisu", - -// About Dialog -DlgAboutAboutTab : "Teave", -DlgAboutBrowserInfoTab : "Veebisirvija info", -DlgAboutLicenseTab : "Litsents", -DlgAboutVersion : "versioon", -DlgAboutInfo : "Täpsema info saamiseks mine", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/eu.js b/fckeditor/editor/lang/eu.js deleted file mode 100644 index 2ad6f266..00000000 --- a/fckeditor/editor/lang/eu.js +++ /dev/null @@ -1,527 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Basque language file. - * Euskara hizkuntza fitxategia. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Estutu Tresna Barra", -ToolbarExpand : "Hedatu Tresna Barra", - -// Toolbar Items and Context Menu -Save : "Gorde", -NewPage : "Orrialde Berria", -Preview : "Aurrebista", -Cut : "Ebaki", -Copy : "Kopiatu", -Paste : "Itsatsi", -PasteText : "Itsatsi testu bezala", -PasteWord : "Itsatsi Word-etik", -Print : "Inprimatu", -SelectAll : "Hautatu dena", -RemoveFormat : "Kendu Formatoa", -InsertLinkLbl : "Esteka", -InsertLink : "Txertatu/Editatu Esteka", -RemoveLink : "Kendu Esteka", -VisitLink : "Open Link", //MISSING -Anchor : "Aingura", -AnchorDelete : "Ezabatu Aingura", -InsertImageLbl : "Irudia", -InsertImage : "Txertatu/Editatu Irudia", -InsertFlashLbl : "Flasha", -InsertFlash : "Txertatu/Editatu Flasha", -InsertTableLbl : "Taula", -InsertTable : "Txertatu/Editatu Taula", -InsertLineLbl : "Lerroa", -InsertLine : "Txertatu Marra Horizontala", -InsertSpecialCharLbl: "Karaktere Berezia", -InsertSpecialChar : "Txertatu Karaktere Berezia", -InsertSmileyLbl : "Aurpegierak", -InsertSmiley : "Txertatu Aurpegierak", -About : "FCKeditor-ri buruz", -Bold : "Lodia", -Italic : "Etzana", -Underline : "Azpimarratu", -StrikeThrough : "Marratua", -Subscript : "Azpi-indize", -Superscript : "Goi-indize", -LeftJustify : "Lerrokatu Ezkerrean", -CenterJustify : "Lerrokatu Erdian", -RightJustify : "Lerrokatu Eskuman", -BlockJustify : "Justifikatu", -DecreaseIndent : "Txikitu Koska", -IncreaseIndent : "Handitu Koska", -Blockquote : "Aipamen blokea", -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "Desegin", -Redo : "Berregin", -NumberedListLbl : "Zenbakidun Zerrenda", -NumberedList : "Txertatu/Kendu Zenbakidun zerrenda", -BulletedListLbl : "Buletdun Zerrenda", -BulletedList : "Txertatu/Kendu Buletdun zerrenda", -ShowTableBorders : "Erakutsi Taularen Ertzak", -ShowDetails : "Erakutsi Xehetasunak", -Style : "Estiloa", -FontFormat : "Formatoa", -Font : "Letra-tipoa", -FontSize : "Tamaina", -TextColor : "Testu Kolorea", -BGColor : "Atzeko kolorea", -Source : "HTML Iturburua", -Find : "Bilatu", -Replace : "Ordezkatu", -SpellCheck : "Ortografia", -UniversalKeyboard : "Teklatu Unibertsala", -PageBreakLbl : "Orrialde-jauzia", -PageBreak : "Txertatu Orrialde-jauzia", - -Form : "Formularioa", -Checkbox : "Kontrol-laukia", -RadioButton : "Aukera-botoia", -TextField : "Testu Eremua", -Textarea : "Testu-area", -HiddenField : "Ezkutuko Eremua", -Button : "Botoia", -SelectionField : "Hautespen Eremua", -ImageButton : "Irudi Botoia", - -FitWindow : "Maximizatu editorearen tamaina", -ShowBlocks : "Blokeak erakutsi", - -// Context Menu -EditLink : "Aldatu Esteka", -CellCM : "Gelaxka", -RowCM : "Errenkada", -ColumnCM : "Zutabea", -InsertRowAfter : "Txertatu Lerroa Ostean", -InsertRowBefore : "Txertatu Lerroa Aurretik", -DeleteRows : "Ezabatu Errenkadak", -InsertColumnAfter : "Txertatu Zutabea Ostean", -InsertColumnBefore : "Txertatu Zutabea Aurretik", -DeleteColumns : "Ezabatu Zutabeak", -InsertCellAfter : "Txertatu Gelaxka Ostean", -InsertCellBefore : "Txertatu Gelaxka Aurretik", -DeleteCells : "Kendu Gelaxkak", -MergeCells : "Batu Gelaxkak", -MergeRight : "Elkartu Eskumara", -MergeDown : "Elkartu Behera", -HorizontalSplitCell : "Banatu Gelaxkak Horizontalki", -VerticalSplitCell : "Banatu Gelaxkak Bertikalki", -TableDelete : "Ezabatu Taula", -CellProperties : "Gelaxkaren Ezaugarriak", -TableProperties : "Taularen Ezaugarriak", -ImageProperties : "Irudiaren Ezaugarriak", -FlashProperties : "Flasharen Ezaugarriak", - -AnchorProp : "Ainguraren Ezaugarriak", -ButtonProp : "Botoiaren Ezaugarriak", -CheckboxProp : "Kontrol-laukiko Ezaugarriak", -HiddenFieldProp : "Ezkutuko Eremuaren Ezaugarriak", -RadioButtonProp : "Aukera-botoiaren Ezaugarriak", -ImageButtonProp : "Irudi Botoiaren Ezaugarriak", -TextFieldProp : "Testu Eremuaren Ezaugarriak", -SelectionFieldProp : "Hautespen Eremuaren Ezaugarriak", -TextareaProp : "Testu-arearen Ezaugarriak", -FormProp : "Formularioaren Ezaugarriak", - -FontFormats : "Arrunta;Formateatua;Helbidea;Izenburua 1;Izenburua 2;Izenburua 3;Izenburua 4;Izenburua 5;Izenburua 6;Paragrafoa (DIV)", - -// Alerts and Messages -ProcessingXHTML : "XHTML Prozesatzen. Itxaron mesedez...", -Done : "Eginda", -PasteWordConfirm : "Itsatsi nahi duzun textua Wordetik hartua dela dirudi. Itsatsi baino lehen garbitu nahi duzu?", -NotCompatiblePaste : "Komando hau Internet Explorer 5.5 bertsiorako edo ondorengoentzako erabilgarria dago. Garbitu gabe itsatsi nahi duzu?", -UnknownToolbarItem : "Ataza barrako elementu ezezaguna \"%1\"", -UnknownCommand : "Komando izen ezezaguna \"%1\"", -NotImplemented : "Komando ez inplementatua", -UnknownToolbarSet : "Ataza barra \"%1\" taldea ez da existitzen", -NoActiveX : "Zure nabigatzailearen segustasun hobespenak editore honen zenbait ezaugarri mugatu ditzake. \"ActiveX kontrolak eta plug-inak\" aktibatu beharko zenituzke, bestela erroreak eta ezaugarrietan mugak egon daitezke.", -BrowseServerBlocked : "Baliabideen arakatzailea ezin da ireki. Ziurtatu popup blokeatzaileak desgaituta dituzula.", -DialogBlocked : "Ezin da elkarrizketa-leihoa ireki. Ziurtatu popup blokeatzaileak desgaituta dituzula.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "Ados", -DlgBtnCancel : "Utzi", -DlgBtnClose : "Itxi", -DlgBtnBrowseServer : "Zerbitzaria arakatu", -DlgAdvancedTag : "Aurreratua", -DlgOpOther : "", -DlgInfoTab : "Informazioa", -DlgAlertUrl : "Mesedez URLa idatzi ezazu", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Hizkuntzaren Norabidea", -DlgGenLangDirLtr : "Ezkerretik Eskumara(LTR)", -DlgGenLangDirRtl : "Eskumatik Ezkerrera (RTL)", -DlgGenLangCode : "Hizkuntza Kodea", -DlgGenAccessKey : "Sarbide-gakoa", -DlgGenName : "Izena", -DlgGenTabIndex : "Tabulazio Indizea", -DlgGenLongDescr : "URL Deskribapen Luzea", -DlgGenClass : "Estilo-orriko Klaseak", -DlgGenTitle : "Izenburua", -DlgGenContType : "Eduki Mota (Content Type)", -DlgGenLinkCharset : "Estekatutako Karaktere Multzoa", -DlgGenStyle : "Estiloa", - -// Image Dialog -DlgImgTitle : "Irudi Ezaugarriak", -DlgImgInfoTab : "Irudi informazioa", -DlgImgBtnUpload : "Zerbitzarira bidalia", -DlgImgURL : "URL", -DlgImgUpload : "Gora Kargatu", -DlgImgAlt : "Textu Alternatiboa", -DlgImgWidth : "Zabalera", -DlgImgHeight : "Altuera", -DlgImgLockRatio : "Erlazioa Blokeatu", -DlgBtnResetSize : "Tamaina Berrezarri", -DlgImgBorder : "Ertza", -DlgImgHSpace : "HSpace", -DlgImgVSpace : "VSpace", -DlgImgAlign : "Lerrokatu", -DlgImgAlignLeft : "Ezkerrera", -DlgImgAlignAbsBottom: "Abs Behean", -DlgImgAlignAbsMiddle: "Abs Erdian", -DlgImgAlignBaseline : "Oinan", -DlgImgAlignBottom : "Behean", -DlgImgAlignMiddle : "Erdian", -DlgImgAlignRight : "Eskuman", -DlgImgAlignTextTop : "Testua Goian", -DlgImgAlignTop : "Goian", -DlgImgPreview : "Aurrebista", -DlgImgAlertUrl : "Mesedez Irudiaren URLa idatzi", -DlgImgLinkTab : "Esteka", - -// Flash Dialog -DlgFlashTitle : "Flasharen Ezaugarriak", -DlgFlashChkPlay : "Automatikoki Erreproduzitu", -DlgFlashChkLoop : "Begizta", -DlgFlashChkMenu : "Flasharen Menua Gaitu", -DlgFlashScale : "Eskalatu", -DlgFlashScaleAll : "Dena erakutsi", -DlgFlashScaleNoBorder : "Ertzarik gabe", -DlgFlashScaleFit : "Doitu", - -// Link Dialog -DlgLnkWindowTitle : "Esteka", -DlgLnkInfoTab : "Estekaren Informazioa", -DlgLnkTargetTab : "Helburua", - -DlgLnkType : "Esteka Mota", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Aingura horrialde honentan", -DlgLnkTypeEMail : "ePosta", -DlgLnkProto : "Protokoloa", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Aingura bat hautatu", -DlgLnkAnchorByName : "Aingura izenagatik", -DlgLnkAnchorById : "Elementuaren ID-gatik", -DlgLnkNoAnchors : "(Ez daude aingurak eskuragarri dokumentuan)", -DlgLnkEMail : "ePosta Helbidea", -DlgLnkEMailSubject : "Mezuaren Gaia", -DlgLnkEMailBody : "Mezuaren Gorputza", -DlgLnkUpload : "Gora kargatu", -DlgLnkBtnUpload : "Zerbitzarira bidali", - -DlgLnkTarget : "Target (Helburua)", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Lehio Berria (_blank)", -DlgLnkTargetParent : "Lehio Gurasoa (_parent)", -DlgLnkTargetSelf : "Lehio Berdina (_self)", -DlgLnkTargetTop : "Goiko Lehioa (_top)", -DlgLnkTargetFrameName : "Marko Helburuaren Izena", -DlgLnkPopWinName : "Popup Lehioaren Izena", -DlgLnkPopWinFeat : "Popup Lehioaren Ezaugarriak", -DlgLnkPopResize : "Tamaina Aldakorra", -DlgLnkPopLocation : "Kokaleku Barra", -DlgLnkPopMenu : "Menu Barra", -DlgLnkPopScroll : "Korritze Barrak", -DlgLnkPopStatus : "Egoera Barra", -DlgLnkPopToolbar : "Tresna Barra", -DlgLnkPopFullScrn : "Pantaila Osoa (IE)", -DlgLnkPopDependent : "Menpekoa (Netscape)", -DlgLnkPopWidth : "Zabalera", -DlgLnkPopHeight : "Altuera", -DlgLnkPopLeft : "Ezkerreko Posizioa", -DlgLnkPopTop : "Goiko Posizioa", - -DlnLnkMsgNoUrl : "Mesedez URL esteka idatzi", -DlnLnkMsgNoEMail : "Mesedez ePosta helbidea idatzi", -DlnLnkMsgNoAnchor : "Mesedez aingura bat aukeratu", -DlnLnkMsgInvPopName : "Popup lehioaren izenak karaktere alfabetiko batekin hasi behar du eta eta ezin du zuriunerik izan", - -// Color Dialog -DlgColorTitle : "Kolore Aukeraketa", -DlgColorBtnClear : "Garbitu", -DlgColorHighlight : "Nabarmendu", -DlgColorSelected : "Aukeratuta", - -// Smiley Dialog -DlgSmileyTitle : "Aurpegiera Sartu", - -// Special Character Dialog -DlgSpecialCharTitle : "Karaktere Berezia Aukeratu", - -// Table Dialog -DlgTableTitle : "Taularen Ezaugarriak", -DlgTableRows : "Lerroak", -DlgTableColumns : "Zutabeak", -DlgTableBorder : "Ertzaren Zabalera", -DlgTableAlign : "Lerrokatu", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Ezkerrean", -DlgTableAlignCenter : "Erdian", -DlgTableAlignRight : "Eskuman", -DlgTableWidth : "Zabalera", -DlgTableWidthPx : "pixel", -DlgTableWidthPc : "ehuneko", -DlgTableHeight : "Altuera", -DlgTableCellSpace : "Gelaxka arteko tartea", -DlgTableCellPad : "Gelaxken betegarria", -DlgTableCaption : "Epigrafea", -DlgTableSummary : "Laburpena", - -// Table Cell Dialog -DlgCellTitle : "Gelaxken Ezaugarriak", -DlgCellWidth : "Zabalera", -DlgCellWidthPx : "pixel", -DlgCellWidthPc : "ehuneko", -DlgCellHeight : "Altuera", -DlgCellWordWrap : "Itzulbira", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Bai", -DlgCellWordWrapNo : "Ez", -DlgCellHorAlign : "Horizontal Alignment", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Ezkerrean", -DlgCellHorAlignCenter : "Erdian", -DlgCellHorAlignRight: "Eskuman", -DlgCellVerAlign : "Lerrokatu Bertikalki", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Goian", -DlgCellVerAlignMiddle : "Erdian", -DlgCellVerAlignBottom : "Behean", -DlgCellVerAlignBaseline : "Oinan", -DlgCellRowSpan : "Lerroak Hedatu", -DlgCellCollSpan : "Zutabeak Hedatu", -DlgCellBackColor : "Atzeko Kolorea", -DlgCellBorderColor : "Ertzako Kolorea", -DlgCellBtnSelect : "Aukertau...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Bilatu eta Ordeztu", - -// Find Dialog -DlgFindTitle : "Bilaketa", -DlgFindFindBtn : "Bilatu", -DlgFindNotFoundMsg : "Idatzitako testua ez da topatu.", - -// Replace Dialog -DlgReplaceTitle : "Ordeztu", -DlgReplaceFindLbl : "Zer bilatu:", -DlgReplaceReplaceLbl : "Zerekin ordeztu:", -DlgReplaceCaseChk : "Maiuskula/minuskula", -DlgReplaceReplaceBtn : "Ordeztu", -DlgReplaceReplAllBtn : "Ordeztu Guztiak", -DlgReplaceWordChk : "Esaldi osoa bilatu", - -// Paste Operations / Dialog -PasteErrorCut : "Zure web nabigatzailearen segurtasun ezarpenak testuak automatikoki moztea ez dute baimentzen. Mesedez teklatua erabili ezazu (Ctrl+X).", -PasteErrorCopy : "Zure web nabigatzailearen segurtasun ezarpenak testuak automatikoki kopiatzea ez dute baimentzen. Mesedez teklatua erabili ezazu (Ctrl+C).", - -PasteAsText : "Testu Arrunta bezala Itsatsi", -PasteFromWord : "Word-etik itsatsi", - -DlgPasteMsg2 : "Mesedez teklatua erabilita (Ctrl+V) ondorego eremuan testua itsatsi eta OK sakatu.", -DlgPasteSec : "Nabigatzailearen segurtasun ezarpenak direla eta, editoreak ezin du arbela zuzenean erabili. Leiho honetan berriro itsatsi behar duzu.", -DlgPasteIgnoreFont : "Letra Motaren definizioa ezikusi", -DlgPasteRemoveStyles : "Estilo definizioak kendu", - -// Color Picker -ColorAutomatic : "Automatikoa", -ColorMoreColors : "Kolore gehiago...", - -// Document Properties -DocProps : "Dokumentuaren Ezarpenak", - -// Anchor Dialog -DlgAnchorTitle : "Ainguraren Ezaugarriak", -DlgAnchorName : "Ainguraren Izena", -DlgAnchorErrorName : "Idatzi ainguraren izena", - -// Speller Pages Dialog -DlgSpellNotInDic : "Ez dago hiztegian", -DlgSpellChangeTo : "Honekin ordezkatu", -DlgSpellBtnIgnore : "Ezikusi", -DlgSpellBtnIgnoreAll : "Denak Ezikusi", -DlgSpellBtnReplace : "Ordezkatu", -DlgSpellBtnReplaceAll : "Denak Ordezkatu", -DlgSpellBtnUndo : "Desegin", -DlgSpellNoSuggestions : "- Iradokizunik ez -", -DlgSpellProgress : "Zuzenketa ortografikoa martxan...", -DlgSpellNoMispell : "Zuzenketa ortografikoa bukatuta: Akatsik ez", -DlgSpellNoChanges : "Zuzenketa ortografikoa bukatuta: Ez da ezer aldatu", -DlgSpellOneChange : "Zuzenketa ortografikoa bukatuta: Hitz bat aldatu da", -DlgSpellManyChanges : "Zuzenketa ortografikoa bukatuta: %1 hitz aldatu dira", - -IeSpellDownload : "Zuzentzaile ortografikoa ez dago instalatuta. Deskargatu nahi duzu?", - -// Button Dialog -DlgButtonText : "Testua (Balorea)", -DlgButtonType : "Mota", -DlgButtonTypeBtn : "Botoia", -DlgButtonTypeSbm : "Bidali", -DlgButtonTypeRst : "Garbitu", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Izena", -DlgCheckboxValue : "Balorea", -DlgCheckboxSelected : "Hautatuta", - -// Form Dialog -DlgFormName : "Izena", -DlgFormAction : "Ekintza", -DlgFormMethod : "Method", - -// Select Field Dialog -DlgSelectName : "Izena", -DlgSelectValue : "Balorea", -DlgSelectSize : "Tamaina", -DlgSelectLines : "lerro kopurura", -DlgSelectChkMulti : "Hautaketa anitzak baimendu", -DlgSelectOpAvail : "Aukera Eskuragarriak", -DlgSelectOpText : "Testua", -DlgSelectOpValue : "Balorea", -DlgSelectBtnAdd : "Gehitu", -DlgSelectBtnModify : "Aldatu", -DlgSelectBtnUp : "Gora", -DlgSelectBtnDown : "Behera", -DlgSelectBtnSetValue : "Aukeratutako balorea ezarri", -DlgSelectBtnDelete : "Ezabatu", - -// Textarea Dialog -DlgTextareaName : "Izena", -DlgTextareaCols : "Zutabeak", -DlgTextareaRows : "Lerroak", - -// Text Field Dialog -DlgTextName : "Izena", -DlgTextValue : "Balorea", -DlgTextCharWidth : "Zabalera", -DlgTextMaxChars : "Zenbat karaktere gehienez", -DlgTextType : "Mota", -DlgTextTypeText : "Testua", -DlgTextTypePass : "Pasahitza", - -// Hidden Field Dialog -DlgHiddenName : "Izena", -DlgHiddenValue : "Balorea", - -// Bulleted List Dialog -BulletedListProp : "Buletdun Zerrendaren Ezarpenak", -NumberedListProp : "Zenbakidun Zerrendaren Ezarpenak", -DlgLstStart : "Hasiera", -DlgLstType : "Mota", -DlgLstTypeCircle : "Zirkulua", -DlgLstTypeDisc : "Diskoa", -DlgLstTypeSquare : "Karratua", -DlgLstTypeNumbers : "Zenbakiak (1, 2, 3)", -DlgLstTypeLCase : "Letra xeheak (a, b, c)", -DlgLstTypeUCase : "Letra larriak (A, B, C)", -DlgLstTypeSRoman : "Erromatar zenbaki zeheak (i, ii, iii)", -DlgLstTypeLRoman : "Erromatar zenbaki larriak (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Orokorra", -DlgDocBackTab : "Atzekaldea", -DlgDocColorsTab : "Koloreak eta Marjinak", -DlgDocMetaTab : "Meta Informazioa", - -DlgDocPageTitle : "Orriaren Izenburua", -DlgDocLangDir : "Hizkuntzaren Norabidea", -DlgDocLangDirLTR : "Ezkerretik eskumara (LTR)", -DlgDocLangDirRTL : "Eskumatik ezkerrera (RTL)", -DlgDocLangCode : "Hizkuntzaren Kodea", -DlgDocCharSet : "Karaktere Multzoaren Kodeketa", -DlgDocCharSetCE : "Erdialdeko Europakoa", -DlgDocCharSetCT : "Txinatar Tradizionala (Big5)", -DlgDocCharSetCR : "Zirilikoa", -DlgDocCharSetGR : "Grekoa", -DlgDocCharSetJP : "Japoniarra", -DlgDocCharSetKR : "Korearra", -DlgDocCharSetTR : "Turkiarra", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Mendebaldeko Europakoa", -DlgDocCharSetOther : "Beste Karaktere Multzoko Kodeketa", - -DlgDocDocType : "Document Type Goiburua", -DlgDocDocTypeOther : "Beste Document Type Goiburua", -DlgDocIncXHTML : "XHTML Ezarpenak", -DlgDocBgColor : "Atzeko Kolorea", -DlgDocBgImage : "Atzeko Irudiaren URL-a", -DlgDocBgNoScroll : "Korritze gabeko Atzekaldea", -DlgDocCText : "Testua", -DlgDocCLink : "Estekak", -DlgDocCVisited : "Bisitatutako Estekak", -DlgDocCActive : "Esteka Aktiboa", -DlgDocMargins : "Orrialdearen marjinak", -DlgDocMaTop : "Goian", -DlgDocMaLeft : "Ezkerrean", -DlgDocMaRight : "Eskuman", -DlgDocMaBottom : "Behean", -DlgDocMeIndex : "Dokumentuaren Gako-hitzak (komarekin bananduta)", -DlgDocMeDescr : "Dokumentuaren Deskribapena", -DlgDocMeAuthor : "Egilea", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Aurrebista", - -// Templates Dialog -Templates : "Txantiloiak", -DlgTemplatesTitle : "Eduki Txantiloiak", -DlgTemplatesSelMsg : "Mesedez txantiloia aukeratu editorean kargatzeko
    (orain dauden edukiak galduko dira):", -DlgTemplatesLoading : "Txantiloiak kargatzen. Itxaron mesedez...", -DlgTemplatesNoTpl : "(Ez dago definitutako txantiloirik)", -DlgTemplatesReplace : "Ordeztu oraingo edukiak", - -// About Dialog -DlgAboutAboutTab : "Honi buruz", -DlgAboutBrowserInfoTab : "Nabigatzailearen Informazioa", -DlgAboutLicenseTab : "Lizentzia", -DlgAboutVersion : "bertsioa", -DlgAboutInfo : "Informazio gehiago eskuratzeko hona joan", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/fa.js b/fckeditor/editor/lang/fa.js deleted file mode 100644 index a6385267..00000000 --- a/fckeditor/editor/lang/fa.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Persian language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "rtl", - -ToolbarCollapse : "برچیدن نوارابزار", -ToolbarExpand : "گستردن نوارابزار", - -// Toolbar Items and Context Menu -Save : "ذخیره", -NewPage : "برگهٴ تازه", -Preview : "پیش‌نمایش", -Cut : "برش", -Copy : "Ú©Ù¾ÛŒ", -Paste : "چسباندن", -PasteText : "چسباندن به عنوان متن ÙØ³Ø§Ø¯Ù‡", -PasteWord : "چسباندن از Word", -Print : "چاپ", -SelectAll : "گزینش همه", -RemoveFormat : "برداشتن ÙØ±Ù…ت", -InsertLinkLbl : "پیوند", -InsertLink : "گنجاندن/ویرایش Ùپیوند", -RemoveLink : "برداشتن پیوند", -VisitLink : "باز کردن پیوند", -Anchor : "گنجاندن/ویرایش Ùلنگر", -AnchorDelete : "برداشتن لنگر", -InsertImageLbl : "تصویر", -InsertImage : "گنجاندن/ویرایش ÙØªØµÙˆÛŒØ±", -InsertFlashLbl : "Flash", -InsertFlash : "گنجاندن/ویرایش ÙFlash", -InsertTableLbl : "جدول", -InsertTable : "گنجاندن/ویرایش ÙØ¬Ø¯ÙˆÙ„", -InsertLineLbl : "خط", -InsertLine : "گنجاندن خط ÙØ§ÙÙ‚ÛŒ", -InsertSpecialCharLbl: "نویسهٴ ویژه", -InsertSpecialChar : "گنجاندن نویسهٴ ویژه", -InsertSmileyLbl : "خندانک", -InsertSmiley : "گنجاندن خندانک", -About : "دربارهٴ FCKeditor", -Bold : "درشت", -Italic : "خمیده", -Underline : "خط‌زیردار", -StrikeThrough : "میان‌خط", -Subscript : "زیرنویس", -Superscript : "بالانویس", -LeftJustify : "چپ‌چین", -CenterJustify : "میان‌چین", -RightJustify : "راست‌چین", -BlockJustify : "بلوک‌چین", -DecreaseIndent : "کاهش ØªÙˆØ±ÙØªÚ¯ÛŒ", -IncreaseIndent : "Ø§ÙØ²Ø§ÛŒØ´ ØªÙˆØ±ÙØªÚ¯ÛŒ", -Blockquote : "بلوک نقل قول", -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "واچیدن", -Redo : "بازچیدن", -NumberedListLbl : "Ùهرست شماره‌دار", -NumberedList : "گنجاندن/برداشتن Ùهرست شماره‌دار", -BulletedListLbl : "Ùهرست نقطه‌ای", -BulletedList : "گنجاندن/برداشتن Ùهرست نقطه‌ای", -ShowTableBorders : "نمایش لبهٴ جدول", -ShowDetails : "نمایش جزئیات", -Style : "سبک", -FontFormat : "ÙØ±Ù…ت", -Font : "قلم", -FontSize : "اندازه", -TextColor : "رنگ متن", -BGColor : "رنگ پس‌زمینه", -Source : "منبع", -Find : "جستجو", -Replace : "جایگزینی", -SpellCheck : "بررسی املا", -UniversalKeyboard : "ØµÙØ­Ù‡â€ŒÚ©Ù„ید جهانی", -PageBreakLbl : "شکستگی Ùپایان ÙØ¨Ø±Ú¯Ù‡", -PageBreak : "گنجاندن شکستگی Ùپایان ÙØ¨Ø±Ú¯Ù‡", - -Form : "ÙØ±Ù…", -Checkbox : "خانهٴ گزینه‌ای", -RadioButton : "دکمهٴ رادیویی", -TextField : "Ùیلد متنی", -Textarea : "ناحیهٴ متنی", -HiddenField : "Ùیلد پنهان", -Button : "دکمه", -SelectionField : "Ùیلد چندگزینه‌ای", -ImageButton : "دکمهٴ تصویری", - -FitWindow : "بیشینه‌سازی ÙØ§Ù†Ø¯Ø§Ø²Ù‡Ù´ ویرایشگر", -ShowBlocks : "نمایش بلوک‌ها", - -// Context Menu -EditLink : "ویرایش پیوند", -CellCM : "سلول", -RowCM : "سطر", -ColumnCM : "ستون", -InsertRowAfter : "Ø§ÙØ²ÙˆØ¯Ù† سطر بعد از", -InsertRowBefore : "Ø§ÙØ²ÙˆØ¯Ù† سطر قبل از", -DeleteRows : "حذ٠سطرها", -InsertColumnAfter : "Ø§ÙØ²ÙˆØ¯Ù† ستون بعد از", -InsertColumnBefore : "Ø§ÙØ²ÙˆØ¯Ù† ستون قبل از", -DeleteColumns : "حذ٠ستونها", -InsertCellAfter : "Ø§ÙØ²ÙˆØ¯Ù† سلول بعد از", -InsertCellBefore : "Ø§ÙØ²ÙˆØ¯Ù† سلول قبل از", -DeleteCells : "حذ٠سلولها", -MergeCells : "ادغام سلولها", -MergeRight : "ادغام به راست", -MergeDown : "ادغام به پایین", -HorizontalSplitCell : "جدا کردن اÙÙ‚ÛŒ سلول", -VerticalSplitCell : "جدا کردن عمودی سلول", -TableDelete : "پاک‌کردن جدول", -CellProperties : "ویژگیهای سلول", -TableProperties : "ویژگیهای جدول", -ImageProperties : "ویژگیهای تصویر", -FlashProperties : "ویژگیهای Flash", - -AnchorProp : "ویژگیهای لنگر", -ButtonProp : "ویژگیهای دکمه", -CheckboxProp : "ویژگیهای خانهٴ گزینه‌ای", -HiddenFieldProp : "ویژگیهای Ùیلد پنهان", -RadioButtonProp : "ویژگیهای دکمهٴ رادیویی", -ImageButtonProp : "ویژگیهای دکمهٴ تصویری", -TextFieldProp : "ویژگیهای Ùیلد متنی", -SelectionFieldProp : "ویژگیهای Ùیلد چندگزینه‌ای", -TextareaProp : "ویژگیهای ناحیهٴ متنی", -FormProp : "ویژگیهای ÙØ±Ù…", - -FontFormats : "نرمال;ÙØ±Ù…ت‌شده;آدرس;سرنویس 1;سرنویس 2;سرنویس 3;سرنویس 4;سرنویس 5;سرنویس 6;بند;(DIV)", - -// Alerts and Messages -ProcessingXHTML : "پردازش XHTML. Ù„Ø·ÙØ§ صبر کنید...", -Done : "انجام شد", -PasteWordConfirm : "متنی Ú©Ù‡ می‌خواهید بچسبانید به نظر می‌رسد از Word Ú©Ù¾ÛŒ شده است. آیا می‌خواهید قبل از چسباندن آن را پاک‌سازی کنید؟", -NotCompatiblePaste : "این ÙØ±Ù…ان برای مرورگر Internet Explorer از نگارش 5.5 یا بالاتر در دسترس است. آیا می‌خواهید بدون پاک‌سازی، متن را بچسبانید؟", -UnknownToolbarItem : "Ùقرهٴ نوارابزار ناشناخته \"%1\"", -UnknownCommand : "نام دستور ناشناخته \"%1\"", -NotImplemented : "دستور پیاده‌سازی‌نشده", -UnknownToolbarSet : "مجموعهٴ نوارابزار \"%1\" وجود ندارد", -NoActiveX : "تنظیمات امنیتی مرورگر شما ممکن است در بعضی از ویژگیهای مرورگر محدودیت ایجاد کند. شما باید گزینهٴ \"Run ActiveX controls and plug-ins\" را ÙØ¹Ø§Ù„ کنید. ممکن است شما با خطاهایی روبرو باشید Ùˆ متوجه کمبود ویژگیهایی شوید.", -BrowseServerBlocked : "توانایی بازگشایی مرورگر منابع ÙØ±Ø§Ù‡Ù… نیست. اطمینان حاصل کنید Ú©Ù‡ تمامی برنامه‌های پیشگیری از نمایش popup را از کار بازداشته‌اید.", -DialogBlocked : "توانایی بازگشایی پنجرهٴ Ú©ÙˆÚ†Ú© ÙÚ¯ÙØªÚ¯Ùˆ ÙØ±Ø§Ù‡Ù… نیست. اطمینان حاصل کنید Ú©Ù‡ تمامی برنامه‌های پیشگیری از نمایش popup را از کار بازداشته‌اید.", -VisitLinkBlocked : "امکان بازکردن یک پنجره جدید نیست. اطمینان حاصل کنید Ú©Ù‡ تمامی برنامه‌های پیشگیری از نمایش popup را از کار بازداشته‌اید.", - -// Dialogs -DlgBtnOK : "پذیرش", -DlgBtnCancel : "انصراÙ", -DlgBtnClose : "بستن", -DlgBtnBrowseServer : "Ùهرست‌نمایی سرور", -DlgAdvancedTag : "Ù¾ÛŒØ´Ø±ÙØªÙ‡", -DlgOpOther : "<غیره>", -DlgInfoTab : "اطلاعات", -DlgAlertUrl : "Ù„Ø·ÙØ§Ù‹ URL را بنویسید", - -// General Dialogs Labels -DlgGenNotSet : "<تعین‌نشده>", -DlgGenId : "شناسه", -DlgGenLangDir : "جهت‌نمای زبان", -DlgGenLangDirLtr : "Ú†Ù¾ به راست (LTR)", -DlgGenLangDirRtl : "راست به Ú†Ù¾ (RTL)", -DlgGenLangCode : "کد زبان", -DlgGenAccessKey : "کلید دستیابی", -DlgGenName : "نام", -DlgGenTabIndex : "نمایهٴ دسترسی با Tab", -DlgGenLongDescr : "URL توصی٠طولانی", -DlgGenClass : "کلاسهای شیوه‌نامه(Stylesheet)", -DlgGenTitle : "عنوان Ú©Ù…Ú©ÛŒ", -DlgGenContType : "نوع محتوای Ú©Ù…Ú©ÛŒ", -DlgGenLinkCharset : "نویسه‌گان منبع Ùپیوندشده", -DlgGenStyle : "شیوه(style)", - -// Image Dialog -DlgImgTitle : "ویژگیهای تصویر", -DlgImgInfoTab : "اطلاعات تصویر", -DlgImgBtnUpload : "به سرور Ø¨ÙØ±Ø³Øª", -DlgImgURL : "URL", -DlgImgUpload : "انتقال به سرور", -DlgImgAlt : "متن جایگزین", -DlgImgWidth : "پهنا", -DlgImgHeight : "درازا", -DlgImgLockRatio : "Ù‚Ùل‌کردن Ùنسبت", -DlgBtnResetSize : "بازنشانی اندازه", -DlgImgBorder : "لبه", -DlgImgHSpace : "ÙØ§ØµÙ„هٴ اÙÙ‚ÛŒ", -DlgImgVSpace : "ÙØ§ØµÙ„هٴ عمودی", -DlgImgAlign : "چینش", -DlgImgAlignLeft : "Ú†Ù¾", -DlgImgAlignAbsBottom: "پائین مطلق", -DlgImgAlignAbsMiddle: "وسط مطلق", -DlgImgAlignBaseline : "خط‌پایه", -DlgImgAlignBottom : "پائین", -DlgImgAlignMiddle : "وسط", -DlgImgAlignRight : "راست", -DlgImgAlignTextTop : "متن بالا", -DlgImgAlignTop : "بالا", -DlgImgPreview : "پیش‌نمایش", -DlgImgAlertUrl : "Ù„Ø·ÙØ§ URL تصویر را بنویسید", -DlgImgLinkTab : "پیوند", - -// Flash Dialog -DlgFlashTitle : "ویژگیهای Flash", -DlgFlashChkPlay : "آغاز ÙØ®ÙˆØ¯Ú©Ø§Ø±", -DlgFlashChkLoop : "اجرای پیاپی", -DlgFlashChkMenu : "دردسترس‌بودن منوی Flash", -DlgFlashScale : "مقیاس", -DlgFlashScaleAll : "نمایش همه", -DlgFlashScaleNoBorder : "بدون کران", -DlgFlashScaleFit : "جایگیری کامل", - -// Link Dialog -DlgLnkWindowTitle : "پیوند", -DlgLnkInfoTab : "اطلاعات پیوند", -DlgLnkTargetTab : "مقصد", - -DlgLnkType : "نوع پیوند", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "لنگر در همین ØµÙØ­Ù‡", -DlgLnkTypeEMail : "پست الکترونیکی", -DlgLnkProto : "پروتکل", -DlgLnkProtoOther : "<دیگر>", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "یک لنگر برگزینید", -DlgLnkAnchorByName : "با نام لنگر", -DlgLnkAnchorById : "با شناسهٴ المان", -DlgLnkNoAnchors : "(در این سند لنگری دردسترس نیست)", -DlgLnkEMail : "نشانی پست الکترونیکی", -DlgLnkEMailSubject : "موضوع پیام", -DlgLnkEMailBody : "متن پیام", -DlgLnkUpload : "انتقال به سرور", -DlgLnkBtnUpload : "به سرور Ø¨ÙØ±Ø³Øª", - -DlgLnkTarget : "مقصد", -DlgLnkTargetFrame : "<ÙØ±ÛŒÙ…>", -DlgLnkTargetPopup : "<پنجرهٴ پاپاپ>", -DlgLnkTargetBlank : "پنجرهٴ دیگر (_blank)", -DlgLnkTargetParent : "پنجرهٴ والد (_parent)", -DlgLnkTargetSelf : "همان پنجره (_self)", -DlgLnkTargetTop : "بالاترین پنجره (_top)", -DlgLnkTargetFrameName : "نام ÙØ±ÛŒÙ… مقصد", -DlgLnkPopWinName : "نام پنجرهٴ پاپاپ", -DlgLnkPopWinFeat : "ویژگیهای پنجرهٴ پاپاپ", -DlgLnkPopResize : "قابل تغییر اندازه", -DlgLnkPopLocation : "نوار موقعیت", -DlgLnkPopMenu : "نوار منو", -DlgLnkPopScroll : "میله‌های پیمایش", -DlgLnkPopStatus : "نوار وضعیت", -DlgLnkPopToolbar : "نوارابزار", -DlgLnkPopFullScrn : "ØªÙ…Ø§Ù…â€ŒØµÙØ­Ù‡ (IE)", -DlgLnkPopDependent : "وابسته (Netscape)", -DlgLnkPopWidth : "پهنا", -DlgLnkPopHeight : "درازا", -DlgLnkPopLeft : "موقعیت ÙÚ†Ù¾", -DlgLnkPopTop : "موقعیت ÙØ¨Ø§Ù„ا", - -DlnLnkMsgNoUrl : "Ù„Ø·ÙØ§ URL پیوند را بنویسید", -DlnLnkMsgNoEMail : "Ù„Ø·ÙØ§ نشانی پست الکترونیکی را بنویسید", -DlnLnkMsgNoAnchor : "Ù„Ø·ÙØ§ لنگری را برگزینید", -DlnLnkMsgInvPopName : "نام پنجرهٴ پاپاپ باید با یک نویسهٴ Ø§Ù„ÙØ¨Ø§ÛŒÛŒ آغاز گردد Ùˆ نباید ÙØ§ØµÙ„ه‌های خالی در آن باشند", - -// Color Dialog -DlgColorTitle : "گزینش رنگ", -DlgColorBtnClear : "پاک‌کردن", -DlgColorHighlight : "نمونه", -DlgColorSelected : "برگزیده", - -// Smiley Dialog -DlgSmileyTitle : "گنجاندن خندانک", - -// Special Character Dialog -DlgSpecialCharTitle : "گزینش نویسهٴ‌ویژه", - -// Table Dialog -DlgTableTitle : "ویژگیهای جدول", -DlgTableRows : "سطرها", -DlgTableColumns : "ستونها", -DlgTableBorder : "اندازهٴ لبه", -DlgTableAlign : "چینش", -DlgTableAlignNotSet : "<تعین‌نشده>", -DlgTableAlignLeft : "Ú†Ù¾", -DlgTableAlignCenter : "وسط", -DlgTableAlignRight : "راست", -DlgTableWidth : "پهنا", -DlgTableWidthPx : "پیکسل", -DlgTableWidthPc : "درصد", -DlgTableHeight : "درازا", -DlgTableCellSpace : "ÙØ§ØµÙ„هٴ میان سلولها", -DlgTableCellPad : "ÙØ§ØµÙ„هٴ پرشده در سلول", -DlgTableCaption : "عنوان", -DlgTableSummary : "خلاصه", - -// Table Cell Dialog -DlgCellTitle : "ویژگیهای سلول", -DlgCellWidth : "پهنا", -DlgCellWidthPx : "پیکسل", -DlgCellWidthPc : "درصد", -DlgCellHeight : "درازا", -DlgCellWordWrap : "شکستن واژه‌ها", -DlgCellWordWrapNotSet : "<تعین‌نشده>", -DlgCellWordWrapYes : "بله", -DlgCellWordWrapNo : "خیر", -DlgCellHorAlign : "چینش ÙØ§ÙÙ‚ÛŒ", -DlgCellHorAlignNotSet : "<تعین‌نشده>", -DlgCellHorAlignLeft : "Ú†Ù¾", -DlgCellHorAlignCenter : "وسط", -DlgCellHorAlignRight: "راست", -DlgCellVerAlign : "چینش ÙØ¹Ù…ودی", -DlgCellVerAlignNotSet : "<تعین‌نشده>", -DlgCellVerAlignTop : "بالا", -DlgCellVerAlignMiddle : "میان", -DlgCellVerAlignBottom : "پائین", -DlgCellVerAlignBaseline : "خط‌پایه", -DlgCellRowSpan : "گستردگی سطرها", -DlgCellCollSpan : "گستردگی ستونها", -DlgCellBackColor : "رنگ پس‌زمینه", -DlgCellBorderColor : "رنگ لبه", -DlgCellBtnSelect : "برگزینید...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "جستجو Ùˆ جایگزینی", - -// Find Dialog -DlgFindTitle : "ÛŒØ§ÙØªÙ†", -DlgFindFindBtn : "ÛŒØ§ÙØªÙ†", -DlgFindNotFoundMsg : "متن موردنظر ÛŒØ§ÙØª نشد.", - -// Replace Dialog -DlgReplaceTitle : "جایگزینی", -DlgReplaceFindLbl : "چه‌چیز را می‌یابید:", -DlgReplaceReplaceLbl : "جایگزینی با:", -DlgReplaceCaseChk : "همسانی در بزرگی Ùˆ Ú©ÙˆÚ†Ú©ÛŒ نویسه‌ها", -DlgReplaceReplaceBtn : "جایگزینی", -DlgReplaceReplAllBtn : "جایگزینی همهٴ ÛŒØ§ÙØªÙ‡â€ŒÙ‡Ø§", -DlgReplaceWordChk : "همسانی با واژهٴ کامل", - -// Paste Operations / Dialog -PasteErrorCut : "تنظیمات امنیتی مرورگر شما اجازه نمی‌دهد Ú©Ù‡ ویرایشگر به طور خودکار عملکردهای برش را انجام دهد. Ù„Ø·ÙØ§ با دکمه‌های ØµÙØ­Ù‡â€ŒÚ©Ù„ید این کار را انجام دهید (Ctrl+X).", -PasteErrorCopy : "تنظیمات امنیتی مرورگر شما اجازه نمی‌دهد Ú©Ù‡ ویرایشگر به طور خودکار عملکردهای کپی‌کردن را انجام دهد. Ù„Ø·ÙØ§ با دکمه‌های ØµÙØ­Ù‡â€ŒÚ©Ù„ید این کار را انجام دهید (Ctrl+C).", - -PasteAsText : "چسباندن به عنوان متن ÙØ³Ø§Ø¯Ù‡", -PasteFromWord : "چسباندن از Word", - -DlgPasteMsg2 : "Ù„Ø·ÙØ§ متن را با کلیدهای (Ctrl+V) در این جعبهٴ متنی بچسبانید Ùˆ پذیرش را بزنید.", -DlgPasteSec : "به خاطر تنظیمات امنیتی مرورگر شما، ویرایشگر نمی‌تواند دسترسی مستقیم به داده‌های clipboard داشته باشد. شما باید دوباره آنرا در این پنجره بچسبانید.", -DlgPasteIgnoreFont : "چشم‌پوشی از تعاری٠نوع قلم", -DlgPasteRemoveStyles : "چشم‌پوشی از تعاری٠سبک (style)", - -// Color Picker -ColorAutomatic : "خودکار", -ColorMoreColors : "رنگهای بیشتر...", - -// Document Properties -DocProps : "ویژگیهای سند", - -// Anchor Dialog -DlgAnchorTitle : "ویژگیهای لنگر", -DlgAnchorName : "نام لنگر", -DlgAnchorErrorName : "Ù„Ø·ÙØ§ نام لنگر را بنویسید", - -// Speller Pages Dialog -DlgSpellNotInDic : "در واژه‌نامه ÛŒØ§ÙØª نشد", -DlgSpellChangeTo : "تغییر به", -DlgSpellBtnIgnore : "چشم‌پوشی", -DlgSpellBtnIgnoreAll : "چشم‌پوشی همه", -DlgSpellBtnReplace : "جایگزینی", -DlgSpellBtnReplaceAll : "جایگزینی همه", -DlgSpellBtnUndo : "واچینش", -DlgSpellNoSuggestions : "- پیشنهادی نیست -", -DlgSpellProgress : "بررسی املا در حال انجام...", -DlgSpellNoMispell : "بررسی املا انجام شد. هیچ غلط‌املائی ÛŒØ§ÙØª نشد", -DlgSpellNoChanges : "بررسی املا انجام شد. هیچ واژه‌ای تغییر Ù†ÛŒØ§ÙØª", -DlgSpellOneChange : "بررسی املا انجام شد. یک واژه تغییر ÛŒØ§ÙØª", -DlgSpellManyChanges : "بررسی املا انجام شد. %1 واژه تغییر ÛŒØ§ÙØª", - -IeSpellDownload : "بررسی‌کنندهٴ املا نصب نشده است. آیا می‌خواهید آن را هم‌اکنون Ø¯Ø±ÛŒØ§ÙØª کنید؟", - -// Button Dialog -DlgButtonText : "متن (مقدار)", -DlgButtonType : "نوع", -DlgButtonTypeBtn : "دکمه", -DlgButtonTypeSbm : "Submit", -DlgButtonTypeRst : "بازنشانی (Reset)", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "نام", -DlgCheckboxValue : "مقدار", -DlgCheckboxSelected : "برگزیده", - -// Form Dialog -DlgFormName : "نام", -DlgFormAction : "رویداد", -DlgFormMethod : "متد", - -// Select Field Dialog -DlgSelectName : "نام", -DlgSelectValue : "مقدار", -DlgSelectSize : "اندازه", -DlgSelectLines : "خطوط", -DlgSelectChkMulti : "گزینش چندگانه ÙØ±Ø§Ù‡Ù… باشد", -DlgSelectOpAvail : "گزینه‌های دردسترس", -DlgSelectOpText : "متن", -DlgSelectOpValue : "مقدار", -DlgSelectBtnAdd : "Ø§ÙØ²ÙˆØ¯Ù†", -DlgSelectBtnModify : "ویرایش", -DlgSelectBtnUp : "بالا", -DlgSelectBtnDown : "پائین", -DlgSelectBtnSetValue : "تنظیم به عنوان مقدار ÙØ¨Ø±Ú¯Ø²ÛŒØ¯Ù‡", -DlgSelectBtnDelete : "پاک‌کردن", - -// Textarea Dialog -DlgTextareaName : "نام", -DlgTextareaCols : "ستونها", -DlgTextareaRows : "سطرها", - -// Text Field Dialog -DlgTextName : "نام", -DlgTextValue : "مقدار", -DlgTextCharWidth : "پهنای نویسه", -DlgTextMaxChars : "بیشینهٴ نویسه‌ها", -DlgTextType : "نوع", -DlgTextTypeText : "متن", -DlgTextTypePass : "گذرواژه", - -// Hidden Field Dialog -DlgHiddenName : "نام", -DlgHiddenValue : "مقدار", - -// Bulleted List Dialog -BulletedListProp : "ویژگیهای Ùهرست نقطه‌ای", -NumberedListProp : "ویژگیهای Ùهرست شماره‌دار", -DlgLstStart : "آغاز", -DlgLstType : "نوع", -DlgLstTypeCircle : "دایره", -DlgLstTypeDisc : "قرص", -DlgLstTypeSquare : "چهارگوش", -DlgLstTypeNumbers : "شماره‌ها (1ØŒ 2ØŒ 3)", -DlgLstTypeLCase : "نویسه‌های Ú©ÙˆÚ†Ú© (aØŒ bØŒ c)", -DlgLstTypeUCase : "نویسه‌های بزرگ (AØŒ BØŒ C)", -DlgLstTypeSRoman : "شمارگان رومی Ú©ÙˆÚ†Ú© (iØŒ iiØŒ iii)", -DlgLstTypeLRoman : "شمارگان رومی بزرگ (IØŒ IIØŒ III)", - -// Document Properties Dialog -DlgDocGeneralTab : "عمومی", -DlgDocBackTab : "پس‌زمینه", -DlgDocColorsTab : "رنگها Ùˆ حاشیه‌ها", -DlgDocMetaTab : "ÙØ±Ø§Ø¯Ø§Ø¯Ù‡", - -DlgDocPageTitle : "عنوان ØµÙØ­Ù‡", -DlgDocLangDir : "جهت زبان", -DlgDocLangDirLTR : "Ú†Ù¾ به راست (LTR(", -DlgDocLangDirRTL : "راست به Ú†Ù¾ (RTL(", -DlgDocLangCode : "کد زبان", -DlgDocCharSet : "رمزگذاری نویسه‌گان", -DlgDocCharSetCE : "اروپای مرکزی", -DlgDocCharSetCT : "چینی رسمی (Big5)", -DlgDocCharSetCR : "سیریلیک", -DlgDocCharSetGR : "یونانی", -DlgDocCharSetJP : "ژاپنی", -DlgDocCharSetKR : "کره‌ای", -DlgDocCharSetTR : "ترکی", -DlgDocCharSetUN : "ÛŒÙˆÙ†ÛŒÚ©ÙØ¯ (UTF-8)", -DlgDocCharSetWE : "اروپای غربی", -DlgDocCharSetOther : "رمزگذاری نویسه‌گان دیگر", - -DlgDocDocType : "عنوان نوع سند", -DlgDocDocTypeOther : "عنوان نوع سند دیگر", -DlgDocIncXHTML : "شامل تعاری٠XHTML", -DlgDocBgColor : "رنگ پس‌زمینه", -DlgDocBgImage : "URL تصویر پس‌زمینه", -DlgDocBgNoScroll : "پس‌زمینهٴ پیمایش‌ناپذیر", -DlgDocCText : "متن", -DlgDocCLink : "پیوند", -DlgDocCVisited : "پیوند مشاهده‌شده", -DlgDocCActive : "پیوند ÙØ¹Ø§Ù„", -DlgDocMargins : "حاشیه‌های ØµÙØ­Ù‡", -DlgDocMaTop : "بالا", -DlgDocMaLeft : "Ú†Ù¾", -DlgDocMaRight : "راست", -DlgDocMaBottom : "پایین", -DlgDocMeIndex : "کلیدواژگان نمایه‌گذاری سند (با کاما جدا شوند)", -DlgDocMeDescr : "توصی٠سند", -DlgDocMeAuthor : "نویسنده", -DlgDocMeCopy : "کپی‌رایت", -DlgDocPreview : "پیش‌نمایش", - -// Templates Dialog -Templates : "الگوها", -DlgTemplatesTitle : "الگوهای محتویات", -DlgTemplatesSelMsg : "Ù„Ø·ÙØ§ الگوی موردنظر را برای بازکردن در ویرایشگر برگزینید
    (محتویات کنونی از دست خواهند Ø±ÙØª):", -DlgTemplatesLoading : "بارگذاری Ùهرست الگوها. Ù„Ø·ÙØ§ صبر کنید...", -DlgTemplatesNoTpl : "(الگوئی تعری٠نشده است)", -DlgTemplatesReplace : "محتویات کنونی جایگزین شوند", - -// About Dialog -DlgAboutAboutTab : "درباره", -DlgAboutBrowserInfoTab : "اطلاعات مرورگر", -DlgAboutLicenseTab : "گواهینامه", -DlgAboutVersion : "نگارش", -DlgAboutInfo : "برای آگاهی بیشتر به این نشانی بروید", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/fi.js b/fckeditor/editor/lang/fi.js deleted file mode 100644 index 1bd09eab..00000000 --- a/fckeditor/editor/lang/fi.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Finnish language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Piilota työkalurivi", -ToolbarExpand : "Näytä työkalurivi", - -// Toolbar Items and Context Menu -Save : "Tallenna", -NewPage : "Tyhjennä", -Preview : "Esikatsele", -Cut : "Leikkaa", -Copy : "Kopioi", -Paste : "Liitä", -PasteText : "Liitä tekstinä", -PasteWord : "Liitä Wordista", -Print : "Tulosta", -SelectAll : "Valitse kaikki", -RemoveFormat : "Poista muotoilu", -InsertLinkLbl : "Linkki", -InsertLink : "Lisää linkki/muokkaa linkkiä", -RemoveLink : "Poista linkki", -VisitLink : "Open Link", //MISSING -Anchor : "Lisää ankkuri/muokkaa ankkuria", -AnchorDelete : "Poista ankkuri", -InsertImageLbl : "Kuva", -InsertImage : "Lisää kuva/muokkaa kuvaa", -InsertFlashLbl : "Flash", -InsertFlash : "Lisää/muokkaa Flashia", -InsertTableLbl : "Taulu", -InsertTable : "Lisää taulu/muokkaa taulua", -InsertLineLbl : "Murtoviiva", -InsertLine : "Lisää murtoviiva", -InsertSpecialCharLbl: "Erikoismerkki", -InsertSpecialChar : "Lisää erikoismerkki", -InsertSmileyLbl : "Hymiö", -InsertSmiley : "Lisää hymiö", -About : "FCKeditorista", -Bold : "Lihavoitu", -Italic : "Kursivoitu", -Underline : "Alleviivattu", -StrikeThrough : "Yliviivattu", -Subscript : "Alaindeksi", -Superscript : "Yläindeksi", -LeftJustify : "Tasaa vasemmat reunat", -CenterJustify : "Keskitä", -RightJustify : "Tasaa oikeat reunat", -BlockJustify : "Tasaa molemmat reunat", -DecreaseIndent : "Pienennä sisennystä", -IncreaseIndent : "Suurenna sisennystä", -Blockquote : "Lainaus", -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "Kumoa", -Redo : "Toista", -NumberedListLbl : "Numerointi", -NumberedList : "Lisää/poista numerointi", -BulletedListLbl : "Luottelomerkit", -BulletedList : "Lisää/poista luottelomerkit", -ShowTableBorders : "Näytä taulun rajat", -ShowDetails : "Näytä muotoilu", -Style : "Tyyli", -FontFormat : "Muotoilu", -Font : "Fontti", -FontSize : "Koko", -TextColor : "Tekstiväri", -BGColor : "Taustaväri", -Source : "Koodi", -Find : "Etsi", -Replace : "Korvaa", -SpellCheck : "Tarkista oikeinkirjoitus", -UniversalKeyboard : "Universaali näppäimistö", -PageBreakLbl : "Sivun vaihto", -PageBreak : "Lisää sivun vaihto", - -Form : "Lomake", -Checkbox : "Valintaruutu", -RadioButton : "Radiopainike", -TextField : "Tekstikenttä", -Textarea : "Tekstilaatikko", -HiddenField : "Piilokenttä", -Button : "Painike", -SelectionField : "Valintakenttä", -ImageButton : "Kuvapainike", - -FitWindow : "Suurenna editori koko ikkunaan", -ShowBlocks : "Näytä elementit", - -// Context Menu -EditLink : "Muokkaa linkkiä", -CellCM : "Solu", -RowCM : "Rivi", -ColumnCM : "Sarake", -InsertRowAfter : "Lisää rivi alapuolelle", -InsertRowBefore : "Lisää rivi yläpuolelle", -DeleteRows : "Poista rivit", -InsertColumnAfter : "Lisää sarake oikealle", -InsertColumnBefore : "Lisää sarake vasemmalle", -DeleteColumns : "Poista sarakkeet", -InsertCellAfter : "Lisää solu perään", -InsertCellBefore : "Lisää solu eteen", -DeleteCells : "Poista solut", -MergeCells : "Yhdistä solut", -MergeRight : "Yhdistä oikealla olevan kanssa", -MergeDown : "Yhdistä alla olevan kanssa", -HorizontalSplitCell : "Jaa solu vaakasuunnassa", -VerticalSplitCell : "Jaa solu pystysuunnassa", -TableDelete : "Poista taulu", -CellProperties : "Solun ominaisuudet", -TableProperties : "Taulun ominaisuudet", -ImageProperties : "Kuvan ominaisuudet", -FlashProperties : "Flash ominaisuudet", - -AnchorProp : "Ankkurin ominaisuudet", -ButtonProp : "Painikkeen ominaisuudet", -CheckboxProp : "Valintaruudun ominaisuudet", -HiddenFieldProp : "Piilokentän ominaisuudet", -RadioButtonProp : "Radiopainikkeen ominaisuudet", -ImageButtonProp : "Kuvapainikkeen ominaisuudet", -TextFieldProp : "Tekstikentän ominaisuudet", -SelectionFieldProp : "Valintakentän ominaisuudet", -TextareaProp : "Tekstilaatikon ominaisuudet", -FormProp : "Lomakkeen ominaisuudet", - -FontFormats : "Normaali;Muotoiltu;Osoite;Otsikko 1;Otsikko 2;Otsikko 3;Otsikko 4;Otsikko 5;Otsikko 6", - -// Alerts and Messages -ProcessingXHTML : "Prosessoidaan XHTML:ää. Odota hetki...", -Done : "Valmis", -PasteWordConfirm : "Teksti, jonka haluat liittää, näyttää olevan kopioitu Wordista. Haluatko puhdistaa sen ennen liittämistä?", -NotCompatiblePaste : "Tämä komento toimii vain Internet Explorer 5.5:ssa tai uudemmassa. Haluatko liittää ilman puhdistusta?", -UnknownToolbarItem : "Tuntemanton työkalu \"%1\"", -UnknownCommand : "Tuntematon komento \"%1\"", -NotImplemented : "Komentoa ei ole liitetty sovellukseen", -UnknownToolbarSet : "Työkalukokonaisuus \"%1\" ei ole olemassa", -NoActiveX : "Selaimesi turvallisuusasetukset voivat rajoittaa joitain editorin ominaisuuksia. Sinun pitää ottaa käyttöön asetuksista \"Suorita ActiveX komponentit ja -plugin-laajennukset\". Saatat kohdata virheitä ja huomata puuttuvia ominaisuuksia.", -BrowseServerBlocked : "Resurssiselainta ei voitu avata. Varmista, että ponnahdusikkunoiden estäjät eivät ole päällä.", -DialogBlocked : "Apuikkunaa ei voitu avaata. Varmista, että ponnahdusikkunoiden estäjät eivät ole päällä.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Peruuta", -DlgBtnClose : "Sulje", -DlgBtnBrowseServer : "Selaa palvelinta", -DlgAdvancedTag : "Lisäominaisuudet", -DlgOpOther : "Muut", -DlgInfoTab : "Info", -DlgAlertUrl : "Lisää URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Tunniste", -DlgGenLangDir : "Kielen suunta", -DlgGenLangDirLtr : "Vasemmalta oikealle (LTR)", -DlgGenLangDirRtl : "Oikealta vasemmalle (RTL)", -DlgGenLangCode : "Kielikoodi", -DlgGenAccessKey : "Pikanäppäin", -DlgGenName : "Nimi", -DlgGenTabIndex : "Tabulaattori indeksi", -DlgGenLongDescr : "Pitkän kuvauksen URL", -DlgGenClass : "Tyyliluokat", -DlgGenTitle : "Avustava otsikko", -DlgGenContType : "Avustava sisällön tyyppi", -DlgGenLinkCharset : "Linkitetty kirjaimisto", -DlgGenStyle : "Tyyli", - -// Image Dialog -DlgImgTitle : "Kuvan ominaisuudet", -DlgImgInfoTab : "Kuvan tiedot", -DlgImgBtnUpload : "Lähetä palvelimelle", -DlgImgURL : "Osoite", -DlgImgUpload : "Lisää kuva", -DlgImgAlt : "Vaihtoehtoinen teksti", -DlgImgWidth : "Leveys", -DlgImgHeight : "Korkeus", -DlgImgLockRatio : "Lukitse suhteet", -DlgBtnResetSize : "Alkuperäinen koko", -DlgImgBorder : "Raja", -DlgImgHSpace : "Vaakatila", -DlgImgVSpace : "Pystytila", -DlgImgAlign : "Kohdistus", -DlgImgAlignLeft : "Vasemmalle", -DlgImgAlignAbsBottom: "Aivan alas", -DlgImgAlignAbsMiddle: "Aivan keskelle", -DlgImgAlignBaseline : "Alas (teksti)", -DlgImgAlignBottom : "Alas", -DlgImgAlignMiddle : "Keskelle", -DlgImgAlignRight : "Oikealle", -DlgImgAlignTextTop : "Ylös (teksti)", -DlgImgAlignTop : "Ylös", -DlgImgPreview : "Esikatselu", -DlgImgAlertUrl : "Kirjoita kuvan osoite (URL)", -DlgImgLinkTab : "Linkki", - -// Flash Dialog -DlgFlashTitle : "Flash ominaisuudet", -DlgFlashChkPlay : "Automaattinen käynnistys", -DlgFlashChkLoop : "Toisto", -DlgFlashChkMenu : "Näytä Flash-valikko", -DlgFlashScale : "Levitä", -DlgFlashScaleAll : "Näytä kaikki", -DlgFlashScaleNoBorder : "Ei rajaa", -DlgFlashScaleFit : "Tarkka koko", - -// Link Dialog -DlgLnkWindowTitle : "Linkki", -DlgLnkInfoTab : "Linkin tiedot", -DlgLnkTargetTab : "Kohde", - -DlgLnkType : "Linkkityyppi", -DlgLnkTypeURL : "Osoite", -DlgLnkTypeAnchor : "Ankkuri tässä sivussa", -DlgLnkTypeEMail : "Sähköposti", -DlgLnkProto : "Protokolla", -DlgLnkProtoOther : "", -DlgLnkURL : "Osoite", -DlgLnkAnchorSel : "Valitse ankkuri", -DlgLnkAnchorByName : "Ankkurin nimen mukaan", -DlgLnkAnchorById : "Ankkurin ID:n mukaan", -DlgLnkNoAnchors : "(Ei ankkureita tässä dokumentissa)", -DlgLnkEMail : "Sähköpostiosoite", -DlgLnkEMailSubject : "Aihe", -DlgLnkEMailBody : "Viesti", -DlgLnkUpload : "Lisää tiedosto", -DlgLnkBtnUpload : "Lähetä palvelimelle", - -DlgLnkTarget : "Kohde", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Uusi ikkuna (_blank)", -DlgLnkTargetParent : "Emoikkuna (_parent)", -DlgLnkTargetSelf : "Sama ikkuna (_self)", -DlgLnkTargetTop : "Päällimmäisin ikkuna (_top)", -DlgLnkTargetFrameName : "Kohdekehyksen nimi", -DlgLnkPopWinName : "Popup ikkunan nimi", -DlgLnkPopWinFeat : "Popup ikkunan ominaisuudet", -DlgLnkPopResize : "Venytettävä", -DlgLnkPopLocation : "Osoiterivi", -DlgLnkPopMenu : "Valikkorivi", -DlgLnkPopScroll : "Vierityspalkit", -DlgLnkPopStatus : "Tilarivi", -DlgLnkPopToolbar : "Vakiopainikkeet", -DlgLnkPopFullScrn : "Täysi ikkuna (IE)", -DlgLnkPopDependent : "Riippuva (Netscape)", -DlgLnkPopWidth : "Leveys", -DlgLnkPopHeight : "Korkeus", -DlgLnkPopLeft : "Vasemmalta (px)", -DlgLnkPopTop : "Ylhäältä (px)", - -DlnLnkMsgNoUrl : "Linkille on kirjoitettava URL", -DlnLnkMsgNoEMail : "Kirjoita sähköpostiosoite", -DlnLnkMsgNoAnchor : "Valitse ankkuri", -DlnLnkMsgInvPopName : "Popup-ikkunan nimi pitää alkaa aakkosella ja ei saa sisältää välejä", - -// Color Dialog -DlgColorTitle : "Valitse väri", -DlgColorBtnClear : "Tyhjennä", -DlgColorHighlight : "Kohdalla", -DlgColorSelected : "Valittu", - -// Smiley Dialog -DlgSmileyTitle : "Lisää hymiö", - -// Special Character Dialog -DlgSpecialCharTitle : "Valitse erikoismerkki", - -// Table Dialog -DlgTableTitle : "Taulun ominaisuudet", -DlgTableRows : "Rivit", -DlgTableColumns : "Sarakkeet", -DlgTableBorder : "Rajan paksuus", -DlgTableAlign : "Kohdistus", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Vasemmalle", -DlgTableAlignCenter : "Keskelle", -DlgTableAlignRight : "Oikealle", -DlgTableWidth : "Leveys", -DlgTableWidthPx : "pikseliä", -DlgTableWidthPc : "prosenttia", -DlgTableHeight : "Korkeus", -DlgTableCellSpace : "Solujen väli", -DlgTableCellPad : "Solujen sisennys", -DlgTableCaption : "Otsikko", -DlgTableSummary : "Yhteenveto", - -// Table Cell Dialog -DlgCellTitle : "Solun ominaisuudet", -DlgCellWidth : "Leveys", -DlgCellWidthPx : "pikseliä", -DlgCellWidthPc : "prosenttia", -DlgCellHeight : "Korkeus", -DlgCellWordWrap : "Tekstikierrätys", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Kyllä", -DlgCellWordWrapNo : "Ei", -DlgCellHorAlign : "Vaakakohdistus", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Vasemmalle", -DlgCellHorAlignCenter : "Keskelle", -DlgCellHorAlignRight: "Oikealle", -DlgCellVerAlign : "Pystykohdistus", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Ylös", -DlgCellVerAlignMiddle : "Keskelle", -DlgCellVerAlignBottom : "Alas", -DlgCellVerAlignBaseline : "Tekstin alas", -DlgCellRowSpan : "Rivin jatkuvuus", -DlgCellCollSpan : "Sarakkeen jatkuvuus", -DlgCellBackColor : "Taustaväri", -DlgCellBorderColor : "Rajan väri", -DlgCellBtnSelect : "Valitse...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Etsi ja korvaa", - -// Find Dialog -DlgFindTitle : "Etsi", -DlgFindFindBtn : "Etsi", -DlgFindNotFoundMsg : "Etsittyä tekstiä ei löytynyt.", - -// Replace Dialog -DlgReplaceTitle : "Korvaa", -DlgReplaceFindLbl : "Etsi mitä:", -DlgReplaceReplaceLbl : "Korvaa tällä:", -DlgReplaceCaseChk : "Sama kirjainkoko", -DlgReplaceReplaceBtn : "Korvaa", -DlgReplaceReplAllBtn : "Korvaa kaikki", -DlgReplaceWordChk : "Koko sana", - -// Paste Operations / Dialog -PasteErrorCut : "Selaimesi turva-asetukset eivät salli editorin toteuttaa leikkaamista. Käytä näppäimistöä leikkaamiseen (Ctrl+X).", -PasteErrorCopy : "Selaimesi turva-asetukset eivät salli editorin toteuttaa kopioimista. Käytä näppäimistöä kopioimiseen (Ctrl+C).", - -PasteAsText : "Liitä tekstinä", -PasteFromWord : "Liitä Wordista", - -DlgPasteMsg2 : "Liitä painamalla (Ctrl+V) ja painamalla OK.", -DlgPasteSec : "Selaimesi turva-asetukset eivät salli editorin käyttää leikepöytää suoraan. Sinun pitää suorittaa liittäminen tässä ikkunassa.", -DlgPasteIgnoreFont : "Jätä huomioimatta fonttimääritykset", -DlgPasteRemoveStyles : "Poista tyylimääritykset", - -// Color Picker -ColorAutomatic : "Automaattinen", -ColorMoreColors : "Lisää värejä...", - -// Document Properties -DocProps : "Dokumentin ominaisuudet", - -// Anchor Dialog -DlgAnchorTitle : "Ankkurin ominaisuudet", -DlgAnchorName : "Nimi", -DlgAnchorErrorName : "Ankkurille on kirjoitettava nimi", - -// Speller Pages Dialog -DlgSpellNotInDic : "Ei sanakirjassa", -DlgSpellChangeTo : "Vaihda", -DlgSpellBtnIgnore : "Jätä huomioimatta", -DlgSpellBtnIgnoreAll : "Jätä kaikki huomioimatta", -DlgSpellBtnReplace : "Korvaa", -DlgSpellBtnReplaceAll : "Korvaa kaikki", -DlgSpellBtnUndo : "Kumoa", -DlgSpellNoSuggestions : "Ei ehdotuksia", -DlgSpellProgress : "Tarkistus käynnissä...", -DlgSpellNoMispell : "Tarkistus valmis: Ei virheitä", -DlgSpellNoChanges : "Tarkistus valmis: Yhtään sanaa ei muutettu", -DlgSpellOneChange : "Tarkistus valmis: Yksi sana muutettiin", -DlgSpellManyChanges : "Tarkistus valmis: %1 sanaa muutettiin", - -IeSpellDownload : "Oikeinkirjoituksen tarkistusta ei ole asennettu. Haluatko ladata sen nyt?", - -// Button Dialog -DlgButtonText : "Teksti (arvo)", -DlgButtonType : "Tyyppi", -DlgButtonTypeBtn : "Painike", -DlgButtonTypeSbm : "Lähetä", -DlgButtonTypeRst : "Tyhjennä", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Nimi", -DlgCheckboxValue : "Arvo", -DlgCheckboxSelected : "Valittu", - -// Form Dialog -DlgFormName : "Nimi", -DlgFormAction : "Toiminto", -DlgFormMethod : "Tapa", - -// Select Field Dialog -DlgSelectName : "Nimi", -DlgSelectValue : "Arvo", -DlgSelectSize : "Koko", -DlgSelectLines : "Rivit", -DlgSelectChkMulti : "Salli usea valinta", -DlgSelectOpAvail : "Ominaisuudet", -DlgSelectOpText : "Teksti", -DlgSelectOpValue : "Arvo", -DlgSelectBtnAdd : "Lisää", -DlgSelectBtnModify : "Muuta", -DlgSelectBtnUp : "Ylös", -DlgSelectBtnDown : "Alas", -DlgSelectBtnSetValue : "Aseta valituksi", -DlgSelectBtnDelete : "Poista", - -// Textarea Dialog -DlgTextareaName : "Nimi", -DlgTextareaCols : "Sarakkeita", -DlgTextareaRows : "Rivejä", - -// Text Field Dialog -DlgTextName : "Nimi", -DlgTextValue : "Arvo", -DlgTextCharWidth : "Leveys", -DlgTextMaxChars : "Maksimi merkkimäärä", -DlgTextType : "Tyyppi", -DlgTextTypeText : "Teksti", -DlgTextTypePass : "Salasana", - -// Hidden Field Dialog -DlgHiddenName : "Nimi", -DlgHiddenValue : "Arvo", - -// Bulleted List Dialog -BulletedListProp : "Luettelon ominaisuudet", -NumberedListProp : "Numeroinnin ominaisuudet", -DlgLstStart : "Alku", -DlgLstType : "Tyyppi", -DlgLstTypeCircle : "Kehä", -DlgLstTypeDisc : "Ympyrä", -DlgLstTypeSquare : "Neliö", -DlgLstTypeNumbers : "Numerot (1, 2, 3)", -DlgLstTypeLCase : "Pienet kirjaimet (a, b, c)", -DlgLstTypeUCase : "Isot kirjaimet (A, B, C)", -DlgLstTypeSRoman : "Pienet roomalaiset numerot (i, ii, iii)", -DlgLstTypeLRoman : "Isot roomalaiset numerot (Ii, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Yleiset", -DlgDocBackTab : "Tausta", -DlgDocColorsTab : "Värit ja marginaalit", -DlgDocMetaTab : "Meta-tieto", - -DlgDocPageTitle : "Sivun nimi", -DlgDocLangDir : "Kielen suunta", -DlgDocLangDirLTR : "Vasemmalta oikealle (LTR)", -DlgDocLangDirRTL : "Oikealta vasemmalle (RTL)", -DlgDocLangCode : "Kielikoodi", -DlgDocCharSet : "Merkistökoodaus", -DlgDocCharSetCE : "Keskieurooppalainen", -DlgDocCharSetCT : "Kiina, perinteinen (Big5)", -DlgDocCharSetCR : "Kyrillinen", -DlgDocCharSetGR : "Kreikka", -DlgDocCharSetJP : "Japani", -DlgDocCharSetKR : "Korealainen", -DlgDocCharSetTR : "Turkkilainen", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Länsieurooppalainen", -DlgDocCharSetOther : "Muu merkistökoodaus", - -DlgDocDocType : "Dokumentin tyyppi", -DlgDocDocTypeOther : "Muu dokumentin tyyppi", -DlgDocIncXHTML : "Lisää XHTML julistukset", -DlgDocBgColor : "Taustaväri", -DlgDocBgImage : "Taustakuva", -DlgDocBgNoScroll : "Paikallaanpysyvä tausta", -DlgDocCText : "Teksti", -DlgDocCLink : "Linkki", -DlgDocCVisited : "Vierailtu linkki", -DlgDocCActive : "Aktiivinen linkki", -DlgDocMargins : "Sivun marginaalit", -DlgDocMaTop : "Ylä", -DlgDocMaLeft : "Vasen", -DlgDocMaRight : "Oikea", -DlgDocMaBottom : "Ala", -DlgDocMeIndex : "Hakusanat (pilkulla erotettuna)", -DlgDocMeDescr : "Kuvaus", -DlgDocMeAuthor : "Tekijä", -DlgDocMeCopy : "Tekijänoikeudet", -DlgDocPreview : "Esikatselu", - -// Templates Dialog -Templates : "Pohjat", -DlgTemplatesTitle : "Sisältöpohjat", -DlgTemplatesSelMsg : "Valitse pohja editoriin
    (aiempi sisältö menetetään):", -DlgTemplatesLoading : "Ladataan listaa pohjista. Hetkinen...", -DlgTemplatesNoTpl : "(Ei määriteltyjä pohjia)", -DlgTemplatesReplace : "Korvaa editorin koko sisältö", - -// About Dialog -DlgAboutAboutTab : "Editorista", -DlgAboutBrowserInfoTab : "Selaimen tiedot", -DlgAboutLicenseTab : "Lisenssi", -DlgAboutVersion : "versio", -DlgAboutInfo : "Lisää tietoa osoitteesta", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/fo.js b/fckeditor/editor/lang/fo.js deleted file mode 100644 index fa0d8c95..00000000 --- a/fckeditor/editor/lang/fo.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Faroese language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Fjal amboðsbjálkan", -ToolbarExpand : "Vís amboðsbjálkan", - -// Toolbar Items and Context Menu -Save : "Goym", -NewPage : "Nýggj síða", -Preview : "Frumsýning", -Cut : "Kvett", -Copy : "Avrita", -Paste : "Innrita", -PasteText : "Innrita reinan tekst", -PasteWord : "Innrita frá Word", -Print : "Prenta", -SelectAll : "Markera alt", -RemoveFormat : "Strika sniðgeving", -InsertLinkLbl : "Tilknýti", -InsertLink : "Ger/broyt tilknýti", -RemoveLink : "Strika tilknýti", -VisitLink : "Opna tilknýti", -Anchor : "Ger/broyt marknastein", -AnchorDelete : "Strika marknastein", -InsertImageLbl : "Myndir", -InsertImage : "Set inn/broyt mynd", -InsertFlashLbl : "Flash", -InsertFlash : "Set inn/broyt Flash", -InsertTableLbl : "Tabell", -InsertTable : "Set inn/broyt tabell", -InsertLineLbl : "Linja", -InsertLine : "Ger vatnrætta linju", -InsertSpecialCharLbl: "Sertekn", -InsertSpecialChar : "Set inn sertekn", -InsertSmileyLbl : "Smiley", -InsertSmiley : "Set inn Smiley", -About : "Um FCKeditor", -Bold : "Feit skrift", -Italic : "Skráskrift", -Underline : "Undirstrikað", -StrikeThrough : "Yvirstrikað", -Subscript : "Lækkað skrift", -Superscript : "Hækkað skrift", -LeftJustify : "Vinstrasett", -CenterJustify : "Miðsett", -RightJustify : "Høgrasett", -BlockJustify : "Javnir tekstkantar", -DecreaseIndent : "Minka reglubrotarinntriv", -IncreaseIndent : "Økja reglubrotarinntriv", -Blockquote : "Blockquote", -CreateDiv : "Ger DIV øki", -EditDiv : "Broyt DIV øki", -DeleteDiv : "Strika DIV øki", -Undo : "Angra", -Redo : "Vend aftur", -NumberedListLbl : "Talmerktur listi", -NumberedList : "Ger/strika talmerktan lista", -BulletedListLbl : "Punktmerktur listi", -BulletedList : "Ger/strika punktmerktan lista", -ShowTableBorders : "Vís tabellbordar", -ShowDetails : "Vís í smálutum", -Style : "Typografi", -FontFormat : "Skriftsnið", -Font : "Skrift", -FontSize : "Skriftstødd", -TextColor : "Tekstlitur", -BGColor : "Bakgrundslitur", -Source : "Kelda", -Find : "Leita", -Replace : "Yvirskriva", -SpellCheck : "Kanna stavseting", -UniversalKeyboard : "Knappaborð", -PageBreakLbl : "Síðuskift", -PageBreak : "Ger síðuskift", - -Form : "Formur", -Checkbox : "Flugubein", -RadioButton : "Radioknøttur", -TextField : "Tekstteigur", -Textarea : "Tekstumráði", -HiddenField : "Fjaldur teigur", -Button : "Knøttur", -SelectionField : "Valskrá", -ImageButton : "Myndaknøttur", - -FitWindow : "Set tekstviðgera til fulla stødd", -ShowBlocks : "Vís blokkar", - -// Context Menu -EditLink : "Broyt tilknýti", -CellCM : "Meski", -RowCM : "Rað", -ColumnCM : "Kolonna", -InsertRowAfter : "Set rað inn aftaná", -InsertRowBefore : "Set rað inn áðrenn", -DeleteRows : "Strika røðir", -InsertColumnAfter : "Set kolonnu inn aftaná", -InsertColumnBefore : "Set kolonnu inn áðrenn", -DeleteColumns : "Strika kolonnur", -InsertCellAfter : "Set meska inn aftaná", -InsertCellBefore : "Set meska inn áðrenn", -DeleteCells : "Strika meskar", -MergeCells : "Flætta meskar", -MergeRight : "Flætta meskar til høgru", -MergeDown : "Flætta saman", -HorizontalSplitCell : "Kloyv meska vatnrætt", -VerticalSplitCell : "Kloyv meska loddrætt", -TableDelete : "Strika tabell", -CellProperties : "Meskueginleikar", -TableProperties : "Tabelleginleikar", -ImageProperties : "Myndaeginleikar", -FlashProperties : "Flash eginleikar", - -AnchorProp : "Eginleikar fyri marknastein", -ButtonProp : "Eginleikar fyri knøtt", -CheckboxProp : "Eginleikar fyri flugubein", -HiddenFieldProp : "Eginleikar fyri fjaldan teig", -RadioButtonProp : "Eginleikar fyri radioknøtt", -ImageButtonProp : "Eginleikar fyri myndaknøtt", -TextFieldProp : "Eginleikar fyri tekstteig", -SelectionFieldProp : "Eginleikar fyri valskrá", -TextareaProp : "Eginleikar fyri tekstumráði", -FormProp : "Eginleikar fyri Form", - -FontFormats : "Vanligt;Sniðgivið;Adressa;Yvirskrift 1;Yvirskrift 2;Yvirskrift 3;Yvirskrift 4;Yvirskrift 5;Yvirskrift 6", - -// Alerts and Messages -ProcessingXHTML : "XHTML verður viðgjørt. Bíða við...", -Done : "Liðugt", -PasteWordConfirm : "Teksturin, royndur verður at seta inn, tykist at stava frá Word. Vilt tú reinsa tekstin, áðrenn hann verður settur inn?", -NotCompatiblePaste : "Hetta er bert tøkt í Internet Explorer 5.5 og nýggjari. Vilt tú seta tekstin inn kortini - óreinsaðan?", -UnknownToolbarItem : "Ókendur lutur í amboðsbjálkanum \"%1\"", -UnknownCommand : "Ókend kommando \"%1\"", -NotImplemented : "Hetta er ikki tøkt í hesi útgávuni", -UnknownToolbarSet : "Amboðsbjálkin \"%1\" finst ikki", -NoActiveX : "Trygdaruppsetingin í alnótskaganum kann sum er avmarka onkrar hentleikar í tekstviðgeranum. Tú mást loyva møguleikanum \"Run/Kør ActiveX controls and plug-ins\". Tú kanst uppliva feilir og ávaringar um tvørrandi hentleikar.", -BrowseServerBlocked : "Ambætarakagin kundi ikki opnast. Tryggja tær, at allar pop-up forðingar eru óvirknar.", -DialogBlocked : "Tað eyðnaðist ikki at opna samskiftisrútin. Tryggja tær, at allar pop-up forðingar eru óvirknar.", -VisitLinkBlocked : "Tað eyðnaðist ikki at opna nýggjan rút. Tryggja tær, at allar pop-up forðingar eru óvirknar.", - -// Dialogs -DlgBtnOK : "Góðkent", -DlgBtnCancel : "Avlýst", -DlgBtnClose : "Lat aftur", -DlgBtnBrowseServer : "Ambætarakagi", -DlgAdvancedTag : "Fjølbroytt", -DlgOpOther : "", -DlgInfoTab : "Upplýsingar", -DlgAlertUrl : "Vinarliga veit ein URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Tekstkós", -DlgGenLangDirLtr : "Frá vinstru til høgru (LTR)", -DlgGenLangDirRtl : "Frá høgru til vinstru (RTL)", -DlgGenLangCode : "Málkoda", -DlgGenAccessKey : "Snarvegisknappur", -DlgGenName : "Navn", -DlgGenTabIndex : "Inntriv indeks", -DlgGenLongDescr : "Víðkað URL frágreiðing", -DlgGenClass : "Typografi klassar", -DlgGenTitle : "Vegleiðandi heiti", -DlgGenContType : "Vegleiðandi innihaldsslag", -DlgGenLinkCharset : "Atknýtt teknsett", -DlgGenStyle : "Typografi", - -// Image Dialog -DlgImgTitle : "Myndaeginleikar", -DlgImgInfoTab : "Myndaupplýsingar", -DlgImgBtnUpload : "Send til ambætaran", -DlgImgURL : "URL", -DlgImgUpload : "Send", -DlgImgAlt : "Alternativur tekstur", -DlgImgWidth : "Breidd", -DlgImgHeight : "Hædd", -DlgImgLockRatio : "Læs lutfallið", -DlgBtnResetSize : "Upprunastødd", -DlgImgBorder : "Bordi", -DlgImgHSpace : "Høgri breddi", -DlgImgVSpace : "Vinstri breddi", -DlgImgAlign : "Justering", -DlgImgAlignLeft : "Vinstra", -DlgImgAlignAbsBottom: "Abs botnur", -DlgImgAlignAbsMiddle: "Abs miðja", -DlgImgAlignBaseline : "Basislinja", -DlgImgAlignBottom : "Botnur", -DlgImgAlignMiddle : "Miðja", -DlgImgAlignRight : "Høgra", -DlgImgAlignTextTop : "Tekst toppur", -DlgImgAlignTop : "Ovast", -DlgImgPreview : "Frumsýning", -DlgImgAlertUrl : "Rita slóðina til myndina", -DlgImgLinkTab : "Tilknýti", - -// Flash Dialog -DlgFlashTitle : "Flash eginleikar", -DlgFlashChkPlay : "Avspælingin byrjar sjálv", -DlgFlashChkLoop : "Endurspæl", -DlgFlashChkMenu : "Ger Flash skrá virkna", -DlgFlashScale : "Skalering", -DlgFlashScaleAll : "Vís alt", -DlgFlashScaleNoBorder : "Eingin bordi", -DlgFlashScaleFit : "Neyv skalering", - -// Link Dialog -DlgLnkWindowTitle : "Tilknýti", -DlgLnkInfoTab : "Tilknýtis upplýsingar", -DlgLnkTargetTab : "Mál", - -DlgLnkType : "Tilknýtisslag", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Tilknýti til marknastein í tekstinum", -DlgLnkTypeEMail : "Teldupostur", -DlgLnkProto : "Protokoll", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Vel ein marknastein", -DlgLnkAnchorByName : "Eftir navni á marknasteini", -DlgLnkAnchorById : "Eftir element Id", -DlgLnkNoAnchors : "(Eingir marknasteinar eru í hesum dokumentið)", -DlgLnkEMail : "Teldupost-adressa", -DlgLnkEMailSubject : "Evni", -DlgLnkEMailBody : "Breyðtekstur", -DlgLnkUpload : "Send til ambætaran", -DlgLnkBtnUpload : "Send til ambætaran", - -DlgLnkTarget : "Mál", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Nýtt vindeyga (_blank)", -DlgLnkTargetParent : "Upphavliga vindeygað (_parent)", -DlgLnkTargetSelf : "Sama vindeygað (_self)", -DlgLnkTargetTop : "Alt vindeygað (_top)", -DlgLnkTargetFrameName : "Vís navn vindeygans", -DlgLnkPopWinName : "Popup vindeygans navn", -DlgLnkPopWinFeat : "Popup vindeygans víðkaðu eginleikar", -DlgLnkPopResize : "Kann broyta stødd", -DlgLnkPopLocation : "Adressulinja", -DlgLnkPopMenu : "Skrábjálki", -DlgLnkPopScroll : "Rullibjálki", -DlgLnkPopStatus : "Støðufrágreiðingarbjálki", -DlgLnkPopToolbar : "Amboðsbjálki", -DlgLnkPopFullScrn : "Fullur skermur (IE)", -DlgLnkPopDependent : "Bundið (Netscape)", -DlgLnkPopWidth : "Breidd", -DlgLnkPopHeight : "Hædd", -DlgLnkPopLeft : "Frástøða frá vinstru", -DlgLnkPopTop : "Frástøða frá íerva", - -DlnLnkMsgNoUrl : "Vinarliga skriva tilknýti (URL)", -DlnLnkMsgNoEMail : "Vinarliga skriva teldupost-adressu", -DlnLnkMsgNoAnchor : "Vinarliga vel marknastein", -DlnLnkMsgInvPopName : "Popup navnið má byrja við bókstavi og má ikki hava millumrúm", - -// Color Dialog -DlgColorTitle : "Vel lit", -DlgColorBtnClear : "Strika alt", -DlgColorHighlight : "Framhevja", -DlgColorSelected : "Valt", - -// Smiley Dialog -DlgSmileyTitle : "Vel Smiley", - -// Special Character Dialog -DlgSpecialCharTitle : "Vel sertekn", - -// Table Dialog -DlgTableTitle : "Eginleikar fyri tabell", -DlgTableRows : "Røðir", -DlgTableColumns : "Kolonnur", -DlgTableBorder : "Bordabreidd", -DlgTableAlign : "Justering", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Vinstrasett", -DlgTableAlignCenter : "Miðsett", -DlgTableAlignRight : "Høgrasett", -DlgTableWidth : "Breidd", -DlgTableWidthPx : "pixels", -DlgTableWidthPc : "prosent", -DlgTableHeight : "Hædd", -DlgTableCellSpace : "Fjarstøða millum meskar", -DlgTableCellPad : "Meskubreddi", -DlgTableCaption : "Tabellfrágreiðing", -DlgTableSummary : "Samandráttur", - -// Table Cell Dialog -DlgCellTitle : "Mesku eginleikar", -DlgCellWidth : "Breidd", -DlgCellWidthPx : "pixels", -DlgCellWidthPc : "prosent", -DlgCellHeight : "Hædd", -DlgCellWordWrap : "Orðkloyving", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Ja", -DlgCellWordWrapNo : "Nei", -DlgCellHorAlign : "Vatnrøtt justering", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Vinstrasett", -DlgCellHorAlignCenter : "Miðsett", -DlgCellHorAlignRight: "Høgrasett", -DlgCellVerAlign : "Lodrøtt justering", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Ovast", -DlgCellVerAlignMiddle : "Miðjan", -DlgCellVerAlignBottom : "Niðast", -DlgCellVerAlignBaseline : "Basislinja", -DlgCellRowSpan : "Røðir, meskin fevnir um", -DlgCellCollSpan : "Kolonnur, meskin fevnir um", -DlgCellBackColor : "Bakgrundslitur", -DlgCellBorderColor : "Litur á borda", -DlgCellBtnSelect : "Vel...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Finn og broyt", - -// Find Dialog -DlgFindTitle : "Finn", -DlgFindFindBtn : "Finn", -DlgFindNotFoundMsg : "Leititeksturin varð ikki funnin", - -// Replace Dialog -DlgReplaceTitle : "Yvirskriva", -DlgReplaceFindLbl : "Finn:", -DlgReplaceReplaceLbl : "Yvirskriva við:", -DlgReplaceCaseChk : "Munur á stórum og smáðum bókstavum", -DlgReplaceReplaceBtn : "Yvirskriva", -DlgReplaceReplAllBtn : "Yvirskriva alt", -DlgReplaceWordChk : "Bert heil orð", - -// Paste Operations / Dialog -PasteErrorCut : "Trygdaruppseting alnótskagans forðar tekstviðgeranum í at kvetta tekstin. Vinarliga nýt knappaborðið til at kvetta tekstin (CTRL+X).", -PasteErrorCopy : "Trygdaruppseting alnótskagans forðar tekstviðgeranum í at avrita tekstin. Vinarliga nýt knappaborðið til at avrita tekstin (CTRL+C).", - -PasteAsText : "Innrita som reinan tekst", -PasteFromWord : "Innrita fra Word", - -DlgPasteMsg2 : "Vinarliga koyr tekstin í hendan rútin við knappaborðinum (CTRL+V) og klikk á Góðtak.", -DlgPasteSec : "Trygdaruppseting alnótskagans forðar tekstviðgeranum í beinleiðis atgongd til avritingarminnið. Tygum mugu royna aftur í hesum rútinum.", -DlgPasteIgnoreFont : "Forfjóna Font definitiónirnar", -DlgPasteRemoveStyles : "Strika typografi definitiónir", - -// Color Picker -ColorAutomatic : "Automatiskt", -ColorMoreColors : "Fleiri litir...", - -// Document Properties -DocProps : "Eginleikar fyri dokument", - -// Anchor Dialog -DlgAnchorTitle : "Eginleikar fyri marknastein", -DlgAnchorName : "Heiti marknasteinsins", -DlgAnchorErrorName : "Vinarliga rita marknasteinsins heiti", - -// Speller Pages Dialog -DlgSpellNotInDic : "Finst ikki í orðabókini", -DlgSpellChangeTo : "Broyt til", -DlgSpellBtnIgnore : "Forfjóna", -DlgSpellBtnIgnoreAll : "Forfjóna alt", -DlgSpellBtnReplace : "Yvirskriva", -DlgSpellBtnReplaceAll : "Yvirskriva alt", -DlgSpellBtnUndo : "Angra", -DlgSpellNoSuggestions : "- Einki uppskot -", -DlgSpellProgress : "Rættstavarin arbeiðir...", -DlgSpellNoMispell : "Rættstavarain liðugur: Eingin feilur funnin", -DlgSpellNoChanges : "Rættstavarain liðugur: Einki orð varð broytt", -DlgSpellOneChange : "Rættstavarain liðugur: Eitt orð er broytt", -DlgSpellManyChanges : "Rættstavarain liðugur: %1 orð broytt", - -IeSpellDownload : "Rættstavarin er ikki tøkur í tekstviðgeranum. Vilt tú heinta hann nú?", - -// Button Dialog -DlgButtonText : "Tekstur", -DlgButtonType : "Slag", -DlgButtonTypeBtn : "Knøttur", -DlgButtonTypeSbm : "Send", -DlgButtonTypeRst : "Nullstilla", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Navn", -DlgCheckboxValue : "Virði", -DlgCheckboxSelected : "Valt", - -// Form Dialog -DlgFormName : "Navn", -DlgFormAction : "Hending", -DlgFormMethod : "Háttur", - -// Select Field Dialog -DlgSelectName : "Navn", -DlgSelectValue : "Virði", -DlgSelectSize : "Stødd", -DlgSelectLines : "Linjur", -DlgSelectChkMulti : "Loyv fleiri valmøguleikum samstundis", -DlgSelectOpAvail : "Tøkir møguleikar", -DlgSelectOpText : "Tekstur", -DlgSelectOpValue : "Virði", -DlgSelectBtnAdd : "Legg afturat", -DlgSelectBtnModify : "Broyt", -DlgSelectBtnUp : "Upp", -DlgSelectBtnDown : "Niður", -DlgSelectBtnSetValue : "Set sum valt virði", -DlgSelectBtnDelete : "Strika", - -// Textarea Dialog -DlgTextareaName : "Navn", -DlgTextareaCols : "kolonnur", -DlgTextareaRows : "røðir", - -// Text Field Dialog -DlgTextName : "Navn", -DlgTextValue : "Virði", -DlgTextCharWidth : "Breidd (sjónlig tekn)", -DlgTextMaxChars : "Mest loyvdu tekn", -DlgTextType : "Slag", -DlgTextTypeText : "Tekstur", -DlgTextTypePass : "Loyniorð", - -// Hidden Field Dialog -DlgHiddenName : "Navn", -DlgHiddenValue : "Virði", - -// Bulleted List Dialog -BulletedListProp : "Eginleikar fyri punktmerktan lista", -NumberedListProp : "Eginleikar fyri talmerktan lista", -DlgLstStart : "Byrjan", -DlgLstType : "Slag", -DlgLstTypeCircle : "Sirkul", -DlgLstTypeDisc : "Fyltur sirkul", -DlgLstTypeSquare : "Fjórhyrningur", -DlgLstTypeNumbers : "Talmerkt (1, 2, 3)", -DlgLstTypeLCase : "Smáir bókstavir (a, b, c)", -DlgLstTypeUCase : "Stórir bókstavir (A, B, C)", -DlgLstTypeSRoman : "Smá rómaratøl (i, ii, iii)", -DlgLstTypeLRoman : "Stór rómaratøl (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Generelt", -DlgDocBackTab : "Bakgrund", -DlgDocColorsTab : "Litir og breddar", -DlgDocMetaTab : "META-upplýsingar", - -DlgDocPageTitle : "Síðuheiti", -DlgDocLangDir : "Tekstkós", -DlgDocLangDirLTR : "Frá vinstru móti høgru (LTR)", -DlgDocLangDirRTL : "Frá høgru móti vinstru (RTL)", -DlgDocLangCode : "Málkoda", -DlgDocCharSet : "Teknsett koda", -DlgDocCharSetCE : "Miðeuropa", -DlgDocCharSetCT : "Kinesiskt traditionelt (Big5)", -DlgDocCharSetCR : "Cyrilliskt", -DlgDocCharSetGR : "Grikst", -DlgDocCharSetJP : "Japanskt", -DlgDocCharSetKR : "Koreanskt", -DlgDocCharSetTR : "Turkiskt", -DlgDocCharSetUN : "UNICODE (UTF-8)", -DlgDocCharSetWE : "Vestureuropa", -DlgDocCharSetOther : "Onnur teknsett koda", - -DlgDocDocType : "Dokumentslag yvirskrift", -DlgDocDocTypeOther : "Annað dokumentslag yvirskrift", -DlgDocIncXHTML : "Viðfest XHTML deklaratiónir", -DlgDocBgColor : "Bakgrundslitur", -DlgDocBgImage : "Leið til bakgrundsmynd (URL)", -DlgDocBgNoScroll : "Læst bakgrund (rullar ikki)", -DlgDocCText : "Tekstur", -DlgDocCLink : "Tilknýti", -DlgDocCVisited : "Vitjaði tilknýti", -DlgDocCActive : "Virkin tilknýti", -DlgDocMargins : "Síðubreddar", -DlgDocMaTop : "Ovast", -DlgDocMaLeft : "Vinstra", -DlgDocMaRight : "Høgra", -DlgDocMaBottom : "Niðast", -DlgDocMeIndex : "Dokument index lyklaorð (sundurbýtt við komma)", -DlgDocMeDescr : "Dokumentlýsing", -DlgDocMeAuthor : "Høvundur", -DlgDocMeCopy : "Upphavsrættindi", -DlgDocPreview : "Frumsýning", - -// Templates Dialog -Templates : "Skabelónir", -DlgTemplatesTitle : "Innihaldsskabelónir", -DlgTemplatesSelMsg : "Vinarliga vel ta skabelón, ið skal opnast í tekstviðgeranum
    (Hetta yvirskrivar núverandi innihald):", -DlgTemplatesLoading : "Heinti yvirlit yvir skabelónir. Vinarliga bíða við...", -DlgTemplatesNoTpl : "(Ongar skabelónir tøkar)", -DlgTemplatesReplace : "Yvirskriva núverandi innihald", - -// About Dialog -DlgAboutAboutTab : "Um", -DlgAboutBrowserInfoTab : "Upplýsingar um alnótskagan", -DlgAboutLicenseTab : "License", -DlgAboutVersion : "version", -DlgAboutInfo : "Fyri fleiri upplýsingar, far til", - -// Div Dialog -DlgDivGeneralTab : "Generelt", -DlgDivAdvancedTab : "Fjølbroytt", -DlgDivStyle : "Typografi", -DlgDivInlineStyle : "Inline typografi" -}; diff --git a/fckeditor/editor/lang/fr-ca.js b/fckeditor/editor/lang/fr-ca.js deleted file mode 100644 index eb40f8b0..00000000 --- a/fckeditor/editor/lang/fr-ca.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Canadian French language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Masquer Outils", -ToolbarExpand : "Afficher Outils", - -// Toolbar Items and Context Menu -Save : "Sauvegarder", -NewPage : "Nouvelle page", -Preview : "Previsualiser", -Cut : "Couper", -Copy : "Copier", -Paste : "Coller", -PasteText : "Coller en tant que texte", -PasteWord : "Coller en tant que Word (formaté)", -Print : "Imprimer", -SelectAll : "Tout sélectionner", -RemoveFormat : "Supprimer le formatage", -InsertLinkLbl : "Lien", -InsertLink : "Insérer/modifier le lien", -RemoveLink : "Supprimer le lien", -VisitLink : "Suivre le lien", -Anchor : "Insérer/modifier l'ancre", -AnchorDelete : "Supprimer l'ancre", -InsertImageLbl : "Image", -InsertImage : "Insérer/modifier l'image", -InsertFlashLbl : "Animation Flash", -InsertFlash : "Insérer/modifier l'animation Flash", -InsertTableLbl : "Tableau", -InsertTable : "Insérer/modifier le tableau", -InsertLineLbl : "Séparateur", -InsertLine : "Insérer un séparateur", -InsertSpecialCharLbl: "Caractères spéciaux", -InsertSpecialChar : "Insérer un caractère spécial", -InsertSmileyLbl : "Emoticon", -InsertSmiley : "Insérer un Emoticon", -About : "A propos de FCKeditor", -Bold : "Gras", -Italic : "Italique", -Underline : "Souligné", -StrikeThrough : "Barrer", -Subscript : "Indice", -Superscript : "Exposant", -LeftJustify : "Aligner à gauche", -CenterJustify : "Centrer", -RightJustify : "Aligner à Droite", -BlockJustify : "Texte justifié", -DecreaseIndent : "Diminuer le retrait", -IncreaseIndent : "Augmenter le retrait", -Blockquote : "Citation", -CreateDiv : "Créer Balise Div", -EditDiv : "Modifier Balise Div", -DeleteDiv : "Supprimer Balise Div", -Undo : "Annuler", -Redo : "Refaire", -NumberedListLbl : "Liste numérotée", -NumberedList : "Insérer/supprimer la liste numérotée", -BulletedListLbl : "Liste à puces", -BulletedList : "Insérer/supprimer la liste à puces", -ShowTableBorders : "Afficher les bordures du tableau", -ShowDetails : "Afficher les caractères invisibles", -Style : "Style", -FontFormat : "Format", -Font : "Police", -FontSize : "Taille", -TextColor : "Couleur de caractère", -BGColor : "Couleur de fond", -Source : "Source", -Find : "Chercher", -Replace : "Remplacer", -SpellCheck : "Orthographe", -UniversalKeyboard : "Clavier universel", -PageBreakLbl : "Saut de page", -PageBreak : "Insérer un saut de page", - -Form : "Formulaire", -Checkbox : "Case à cocher", -RadioButton : "Bouton radio", -TextField : "Champ texte", -Textarea : "Zone de texte", -HiddenField : "Champ caché", -Button : "Bouton", -SelectionField : "Champ de sélection", -ImageButton : "Bouton image", - -FitWindow : "Edition pleine page", -ShowBlocks : "Afficher les blocs", - -// Context Menu -EditLink : "Modifier le lien", -CellCM : "Cellule", -RowCM : "Ligne", -ColumnCM : "Colonne", -InsertRowAfter : "Insérer une ligne après", -InsertRowBefore : "Insérer une ligne avant", -DeleteRows : "Supprimer des lignes", -InsertColumnAfter : "Insérer une colonne après", -InsertColumnBefore : "Insérer une colonne avant", -DeleteColumns : "Supprimer des colonnes", -InsertCellAfter : "Insérer une cellule après", -InsertCellBefore : "Insérer une cellule avant", -DeleteCells : "Supprimer des cellules", -MergeCells : "Fusionner les cellules", -MergeRight : "Fusionner à droite", -MergeDown : "Fusionner en bas", -HorizontalSplitCell : "Scinder la cellule horizontalement", -VerticalSplitCell : "Scinder la cellule verticalement", -TableDelete : "Supprimer le tableau", -CellProperties : "Propriétés de cellule", -TableProperties : "Propriétés du tableau", -ImageProperties : "Propriétés de l'image", -FlashProperties : "Propriétés de l'animation Flash", - -AnchorProp : "Propriétés de l'ancre", -ButtonProp : "Propriétés du bouton", -CheckboxProp : "Propriétés de la case à cocher", -HiddenFieldProp : "Propriétés du champ caché", -RadioButtonProp : "Propriétés du bouton radio", -ImageButtonProp : "Propriétés du bouton image", -TextFieldProp : "Propriétés du champ texte", -SelectionFieldProp : "Propriétés de la liste/du menu", -TextareaProp : "Propriétés de la zone de texte", -FormProp : "Propriétés du formulaire", - -FontFormats : "Normal;Formaté;Adresse;En-tête 1;En-tête 2;En-tête 3;En-tête 4;En-tête 5;En-tête 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Calcul XHTML. Veuillez patienter...", -Done : "Terminé", -PasteWordConfirm : "Le texte à coller semble provenir de Word. Désirez-vous le nettoyer avant de coller?", -NotCompatiblePaste : "Cette commande nécessite Internet Explorer version 5.5 et plus. Souhaitez-vous coller sans nettoyage?", -UnknownToolbarItem : "Élément de barre d'outil inconnu \"%1\"", -UnknownCommand : "Nom de commande inconnu \"%1\"", -NotImplemented : "Commande indisponible", -UnknownToolbarSet : "La barre d'outils \"%1\" n'existe pas", -NoActiveX : "Les paramètres de sécurité de votre navigateur peuvent limiter quelques fonctionnalités de l'éditeur. Veuillez activer l'option \"Exécuter les contrôles ActiveX et les plug-ins\". Il se peut que vous rencontriez des erreurs et remarquiez quelques limitations.", -BrowseServerBlocked : "Le navigateur n'a pas pu être ouvert. Assurez-vous que les bloqueurs de popups soient désactivés.", -DialogBlocked : "La fenêtre de dialogue n'a pas pu s'ouvrir. Assurez-vous que les bloqueurs de popups soient désactivés.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Annuler", -DlgBtnClose : "Fermer", -DlgBtnBrowseServer : "Parcourir le serveur", -DlgAdvancedTag : "Avancée", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Veuillez saisir l'URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Sens d'écriture", -DlgGenLangDirLtr : "De gauche à droite (LTR)", -DlgGenLangDirRtl : "De droite à gauche (RTL)", -DlgGenLangCode : "Code langue", -DlgGenAccessKey : "Équivalent clavier", -DlgGenName : "Nom", -DlgGenTabIndex : "Ordre de tabulation", -DlgGenLongDescr : "URL de description longue", -DlgGenClass : "Classes de feuilles de style", -DlgGenTitle : "Titre", -DlgGenContType : "Type de contenu", -DlgGenLinkCharset : "Encodage de caractère", -DlgGenStyle : "Style", - -// Image Dialog -DlgImgTitle : "Propriétés de l'image", -DlgImgInfoTab : "Informations sur l'image", -DlgImgBtnUpload : "Envoyer sur le serveur", -DlgImgURL : "URL", -DlgImgUpload : "Télécharger", -DlgImgAlt : "Texte de remplacement", -DlgImgWidth : "Largeur", -DlgImgHeight : "Hauteur", -DlgImgLockRatio : "Garder les proportions", -DlgBtnResetSize : "Taille originale", -DlgImgBorder : "Bordure", -DlgImgHSpace : "Espacement horizontal", -DlgImgVSpace : "Espacement vertical", -DlgImgAlign : "Alignement", -DlgImgAlignLeft : "Gauche", -DlgImgAlignAbsBottom: "Abs Bas", -DlgImgAlignAbsMiddle: "Abs Milieu", -DlgImgAlignBaseline : "Bas du texte", -DlgImgAlignBottom : "Bas", -DlgImgAlignMiddle : "Milieu", -DlgImgAlignRight : "Droite", -DlgImgAlignTextTop : "Haut du texte", -DlgImgAlignTop : "Haut", -DlgImgPreview : "Prévisualisation", -DlgImgAlertUrl : "Veuillez saisir l'URL de l'image", -DlgImgLinkTab : "Lien", - -// Flash Dialog -DlgFlashTitle : "Propriétés de l'animation Flash", -DlgFlashChkPlay : "Lecture automatique", -DlgFlashChkLoop : "Boucle", -DlgFlashChkMenu : "Activer le menu Flash", -DlgFlashScale : "Affichage", -DlgFlashScaleAll : "Par défaut (tout montrer)", -DlgFlashScaleNoBorder : "Sans bordure", -DlgFlashScaleFit : "Ajuster aux dimensions", - -// Link Dialog -DlgLnkWindowTitle : "Propriétés du lien", -DlgLnkInfoTab : "Informations sur le lien", -DlgLnkTargetTab : "Destination", - -DlgLnkType : "Type de lien", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Ancre dans cette page", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protocole", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Sélectionner une ancre", -DlgLnkAnchorByName : "Par nom", -DlgLnkAnchorById : "Par id", -DlgLnkNoAnchors : "(Pas d'ancre disponible dans le document)", -DlgLnkEMail : "Adresse E-Mail", -DlgLnkEMailSubject : "Sujet du message", -DlgLnkEMailBody : "Corps du message", -DlgLnkUpload : "Télécharger", -DlgLnkBtnUpload : "Envoyer sur le serveur", - -DlgLnkTarget : "Destination", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Nouvelle fenêtre (_blank)", -DlgLnkTargetParent : "Fenêtre mère (_parent)", -DlgLnkTargetSelf : "Même fenêtre (_self)", -DlgLnkTargetTop : "Fenêtre supérieure (_top)", -DlgLnkTargetFrameName : "Nom du cadre de destination", -DlgLnkPopWinName : "Nom de la fenêtre popup", -DlgLnkPopWinFeat : "Caractéristiques de la fenêtre popup", -DlgLnkPopResize : "Taille modifiable", -DlgLnkPopLocation : "Barre d'adresses", -DlgLnkPopMenu : "Barre de menu", -DlgLnkPopScroll : "Barres de défilement", -DlgLnkPopStatus : "Barre d'état", -DlgLnkPopToolbar : "Barre d'outils", -DlgLnkPopFullScrn : "Plein écran (IE)", -DlgLnkPopDependent : "Dépendante (Netscape)", -DlgLnkPopWidth : "Largeur", -DlgLnkPopHeight : "Hauteur", -DlgLnkPopLeft : "Position à partir de la gauche", -DlgLnkPopTop : "Position à partir du haut", - -DlnLnkMsgNoUrl : "Veuillez saisir l'URL", -DlnLnkMsgNoEMail : "Veuillez saisir l'adresse e-mail", -DlnLnkMsgNoAnchor : "Veuillez sélectionner une ancre", -DlnLnkMsgInvPopName : "Le nom de la fenêtre popup doit commencer par une lettre et ne doit pas contenir d'espace", - -// Color Dialog -DlgColorTitle : "Sélectionner", -DlgColorBtnClear : "Effacer", -DlgColorHighlight : "Prévisualisation", -DlgColorSelected : "Sélectionné", - -// Smiley Dialog -DlgSmileyTitle : "Insérer un Emoticon", - -// Special Character Dialog -DlgSpecialCharTitle : "Insérer un caractère spécial", - -// Table Dialog -DlgTableTitle : "Propriétés du tableau", -DlgTableRows : "Lignes", -DlgTableColumns : "Colonnes", -DlgTableBorder : "Taille de la bordure", -DlgTableAlign : "Alignement", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Gauche", -DlgTableAlignCenter : "Centré", -DlgTableAlignRight : "Droite", -DlgTableWidth : "Largeur", -DlgTableWidthPx : "pixels", -DlgTableWidthPc : "pourcentage", -DlgTableHeight : "Hauteur", -DlgTableCellSpace : "Espacement", -DlgTableCellPad : "Contour", -DlgTableCaption : "Titre", -DlgTableSummary : "Résumé", - -// Table Cell Dialog -DlgCellTitle : "Propriétés de la cellule", -DlgCellWidth : "Largeur", -DlgCellWidthPx : "pixels", -DlgCellWidthPc : "pourcentage", -DlgCellHeight : "Hauteur", -DlgCellWordWrap : "Retour à la ligne", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Oui", -DlgCellWordWrapNo : "Non", -DlgCellHorAlign : "Alignement horizontal", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Gauche", -DlgCellHorAlignCenter : "Centré", -DlgCellHorAlignRight: "Droite", -DlgCellVerAlign : "Alignement vertical", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Haut", -DlgCellVerAlignMiddle : "Milieu", -DlgCellVerAlignBottom : "Bas", -DlgCellVerAlignBaseline : "Bas du texte", -DlgCellRowSpan : "Lignes fusionnées", -DlgCellCollSpan : "Colonnes fusionnées", -DlgCellBackColor : "Couleur de fond", -DlgCellBorderColor : "Couleur de bordure", -DlgCellBtnSelect : "Sélectionner...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Chercher et Remplacer", - -// Find Dialog -DlgFindTitle : "Chercher", -DlgFindFindBtn : "Chercher", -DlgFindNotFoundMsg : "Le texte indiqué est introuvable.", - -// Replace Dialog -DlgReplaceTitle : "Remplacer", -DlgReplaceFindLbl : "Rechercher:", -DlgReplaceReplaceLbl : "Remplacer par:", -DlgReplaceCaseChk : "Respecter la casse", -DlgReplaceReplaceBtn : "Remplacer", -DlgReplaceReplAllBtn : "Tout remplacer", -DlgReplaceWordChk : "Mot entier", - -// Paste Operations / Dialog -PasteErrorCut : "Les paramètres de sécurité de votre navigateur empêchent l'éditeur de couper automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl+X).", -PasteErrorCopy : "Les paramètres de sécurité de votre navigateur empêchent l'éditeur de copier automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl+C).", - -PasteAsText : "Coller comme texte", -PasteFromWord : "Coller à partir de Word", - -DlgPasteMsg2 : "Veuillez coller dans la zone ci-dessous en utilisant le clavier (Ctrl+V) et appuyer sur OK.", -DlgPasteSec : "A cause des paramètres de sécurité de votre navigateur, l'éditeur ne peut accéder au presse-papier directement. Vous devez coller à nouveau le contenu dans cette fenêtre.", -DlgPasteIgnoreFont : "Ignorer les polices de caractères", -DlgPasteRemoveStyles : "Supprimer les styles", - -// Color Picker -ColorAutomatic : "Automatique", -ColorMoreColors : "Plus de couleurs...", - -// Document Properties -DocProps : "Propriétés du document", - -// Anchor Dialog -DlgAnchorTitle : "Propriétés de l'ancre", -DlgAnchorName : "Nom de l'ancre", -DlgAnchorErrorName : "Veuillez saisir le nom de l'ancre", - -// Speller Pages Dialog -DlgSpellNotInDic : "Pas dans le dictionnaire", -DlgSpellChangeTo : "Changer en", -DlgSpellBtnIgnore : "Ignorer", -DlgSpellBtnIgnoreAll : "Ignorer tout", -DlgSpellBtnReplace : "Remplacer", -DlgSpellBtnReplaceAll : "Remplacer tout", -DlgSpellBtnUndo : "Annuler", -DlgSpellNoSuggestions : "- Pas de suggestion -", -DlgSpellProgress : "Vérification d'orthographe en cours...", -DlgSpellNoMispell : "Vérification d'orthographe terminée: pas d'erreur trouvée", -DlgSpellNoChanges : "Vérification d'orthographe terminée: Pas de modifications", -DlgSpellOneChange : "Vérification d'orthographe terminée: Un mot modifié", -DlgSpellManyChanges : "Vérification d'orthographe terminée: %1 mots modifiés", - -IeSpellDownload : "Le Correcteur d'orthographe n'est pas installé. Souhaitez-vous le télécharger maintenant?", - -// Button Dialog -DlgButtonText : "Texte (Valeur)", -DlgButtonType : "Type", -DlgButtonTypeBtn : "Bouton", -DlgButtonTypeSbm : "Soumettre", -DlgButtonTypeRst : "Réinitialiser", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Nom", -DlgCheckboxValue : "Valeur", -DlgCheckboxSelected : "Sélectionné", - -// Form Dialog -DlgFormName : "Nom", -DlgFormAction : "Action", -DlgFormMethod : "Méthode", - -// Select Field Dialog -DlgSelectName : "Nom", -DlgSelectValue : "Valeur", -DlgSelectSize : "Taille", -DlgSelectLines : "lignes", -DlgSelectChkMulti : "Sélection multiple", -DlgSelectOpAvail : "Options disponibles", -DlgSelectOpText : "Texte", -DlgSelectOpValue : "Valeur", -DlgSelectBtnAdd : "Ajouter", -DlgSelectBtnModify : "Modifier", -DlgSelectBtnUp : "Monter", -DlgSelectBtnDown : "Descendre", -DlgSelectBtnSetValue : "Valeur sélectionnée", -DlgSelectBtnDelete : "Supprimer", - -// Textarea Dialog -DlgTextareaName : "Nom", -DlgTextareaCols : "Colonnes", -DlgTextareaRows : "Lignes", - -// Text Field Dialog -DlgTextName : "Nom", -DlgTextValue : "Valeur", -DlgTextCharWidth : "Largeur en caractères", -DlgTextMaxChars : "Nombre maximum de caractères", -DlgTextType : "Type", -DlgTextTypeText : "Texte", -DlgTextTypePass : "Mot de passe", - -// Hidden Field Dialog -DlgHiddenName : "Nom", -DlgHiddenValue : "Valeur", - -// Bulleted List Dialog -BulletedListProp : "Propriétés de liste à puces", -NumberedListProp : "Propriétés de liste numérotée", -DlgLstStart : "Début", -DlgLstType : "Type", -DlgLstTypeCircle : "Cercle", -DlgLstTypeDisc : "Disque", -DlgLstTypeSquare : "Carré", -DlgLstTypeNumbers : "Nombres (1, 2, 3)", -DlgLstTypeLCase : "Lettres minuscules (a, b, c)", -DlgLstTypeUCase : "Lettres majuscules (A, B, C)", -DlgLstTypeSRoman : "Chiffres romains minuscules (i, ii, iii)", -DlgLstTypeLRoman : "Chiffres romains majuscules (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Général", -DlgDocBackTab : "Fond", -DlgDocColorsTab : "Couleurs et Marges", -DlgDocMetaTab : "Méta-Données", - -DlgDocPageTitle : "Titre de la page", -DlgDocLangDir : "Sens d'écriture", -DlgDocLangDirLTR : "De la gauche vers la droite (LTR)", -DlgDocLangDirRTL : "De la droite vers la gauche (RTL)", -DlgDocLangCode : "Code langue", -DlgDocCharSet : "Encodage de caractère", -DlgDocCharSetCE : "Europe Centrale", -DlgDocCharSetCT : "Chinois Traditionnel (Big5)", -DlgDocCharSetCR : "Cyrillique", -DlgDocCharSetGR : "Grecque", -DlgDocCharSetJP : "Japonais", -DlgDocCharSetKR : "Coréen", -DlgDocCharSetTR : "Turcque", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Occidental", -DlgDocCharSetOther : "Autre encodage de caractère", - -DlgDocDocType : "Type de document", -DlgDocDocTypeOther : "Autre type de document", -DlgDocIncXHTML : "Inclure les déclarations XHTML", -DlgDocBgColor : "Couleur de fond", -DlgDocBgImage : "Image de fond", -DlgDocBgNoScroll : "Image fixe sans défilement", -DlgDocCText : "Texte", -DlgDocCLink : "Lien", -DlgDocCVisited : "Lien visité", -DlgDocCActive : "Lien activé", -DlgDocMargins : "Marges", -DlgDocMaTop : "Haut", -DlgDocMaLeft : "Gauche", -DlgDocMaRight : "Droite", -DlgDocMaBottom : "Bas", -DlgDocMeIndex : "Mots-clés (séparés par des virgules)", -DlgDocMeDescr : "Description", -DlgDocMeAuthor : "Auteur", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Prévisualisation", - -// Templates Dialog -Templates : "Modèles", -DlgTemplatesTitle : "Modèles de contenu", -DlgTemplatesSelMsg : "Sélectionner le modèle à ouvrir dans l'éditeur
    (le contenu actuel sera remplacé):", -DlgTemplatesLoading : "Chargement de la liste des modèles. Veuillez patienter...", -DlgTemplatesNoTpl : "(Aucun modèle disponible)", -DlgTemplatesReplace : "Remplacer tout le contenu actuel", - -// About Dialog -DlgAboutAboutTab : "à propos de", -DlgAboutBrowserInfoTab : "Navigateur", -DlgAboutLicenseTab : "License", -DlgAboutVersion : "Version", -DlgAboutInfo : "Pour plus d'informations, visiter", - -// Div Dialog -DlgDivGeneralTab : "Général", -DlgDivAdvancedTab : "Avancé", -DlgDivStyle : "Style", -DlgDivInlineStyle : "Attribut Style" -}; diff --git a/fckeditor/editor/lang/fr.js b/fckeditor/editor/lang/fr.js deleted file mode 100644 index 7b744ad0..00000000 --- a/fckeditor/editor/lang/fr.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * French language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Masquer Outils", -ToolbarExpand : "Afficher Outils", - -// Toolbar Items and Context Menu -Save : "Enregistrer", -NewPage : "Nouvelle page", -Preview : "Prévisualisation", -Cut : "Couper", -Copy : "Copier", -Paste : "Coller", -PasteText : "Coller comme texte", -PasteWord : "Coller de Word", -Print : "Imprimer", -SelectAll : "Tout sélectionner", -RemoveFormat : "Supprimer le format", -InsertLinkLbl : "Lien", -InsertLink : "Insérer/modifier le lien", -RemoveLink : "Supprimer le lien", -VisitLink : "Suivre le lien", -Anchor : "Insérer/modifier l'ancre", -AnchorDelete : "Supprimer l'ancre", -InsertImageLbl : "Image", -InsertImage : "Insérer/modifier l'image", -InsertFlashLbl : "Animation Flash", -InsertFlash : "Insérer/modifier l'animation Flash", -InsertTableLbl : "Tableau", -InsertTable : "Insérer/modifier le tableau", -InsertLineLbl : "Séparateur", -InsertLine : "Insérer un séparateur", -InsertSpecialCharLbl: "Caractères spéciaux", -InsertSpecialChar : "Insérer un caractère spécial", -InsertSmileyLbl : "Smiley", -InsertSmiley : "Insérer un Smiley", -About : "A propos de FCKeditor", -Bold : "Gras", -Italic : "Italique", -Underline : "Souligné", -StrikeThrough : "Barré", -Subscript : "Indice", -Superscript : "Exposant", -LeftJustify : "Aligné à gauche", -CenterJustify : "Centré", -RightJustify : "Aligné à Droite", -BlockJustify : "Texte justifié", -DecreaseIndent : "Diminuer le retrait", -IncreaseIndent : "Augmenter le retrait", -Blockquote : "Citation", -CreateDiv : "Créer Balise Div", -EditDiv : "Modifier Balise Div", -DeleteDiv : "Supprimer Balise Div", -Undo : "Annuler", -Redo : "Refaire", -NumberedListLbl : "Liste numérotée", -NumberedList : "Insérer/supprimer la liste numérotée", -BulletedListLbl : "Liste à puces", -BulletedList : "Insérer/supprimer la liste à puces", -ShowTableBorders : "Afficher les bordures du tableau", -ShowDetails : "Afficher les caractères invisibles", -Style : "Style", -FontFormat : "Format", -Font : "Police", -FontSize : "Taille", -TextColor : "Couleur de caractère", -BGColor : "Couleur de fond", -Source : "Source", -Find : "Chercher", -Replace : "Remplacer", -SpellCheck : "Orthographe", -UniversalKeyboard : "Clavier universel", -PageBreakLbl : "Saut de page", -PageBreak : "Insérer un saut de page", - -Form : "Formulaire", -Checkbox : "Case à cocher", -RadioButton : "Bouton radio", -TextField : "Champ texte", -Textarea : "Zone de texte", -HiddenField : "Champ caché", -Button : "Bouton", -SelectionField : "Liste/menu", -ImageButton : "Bouton image", - -FitWindow : "Edition pleine page", -ShowBlocks : "Afficher les blocs", - -// Context Menu -EditLink : "Modifier le lien", -CellCM : "Cellule", -RowCM : "Ligne", -ColumnCM : "Colonne", -InsertRowAfter : "Insérer une ligne après", -InsertRowBefore : "Insérer une ligne avant", -DeleteRows : "Supprimer des lignes", -InsertColumnAfter : "Insérer une colonne après", -InsertColumnBefore : "Insérer une colonne avant", -DeleteColumns : "Supprimer des colonnes", -InsertCellAfter : "Insérer une cellule après", -InsertCellBefore : "Insérer une cellule avant", -DeleteCells : "Supprimer des cellules", -MergeCells : "Fusionner les cellules", -MergeRight : "Fusionner à droite", -MergeDown : "Fusionner en bas", -HorizontalSplitCell : "Scinder la cellule horizontalement", -VerticalSplitCell : "Scinder la cellule verticalement", -TableDelete : "Supprimer le tableau", -CellProperties : "Propriétés de cellule", -TableProperties : "Propriétés du tableau", -ImageProperties : "Propriétés de l'image", -FlashProperties : "Propriétés de l'animation Flash", - -AnchorProp : "Propriétés de l'ancre", -ButtonProp : "Propriétés du bouton", -CheckboxProp : "Propriétés de la case à cocher", -HiddenFieldProp : "Propriétés du champ caché", -RadioButtonProp : "Propriétés du bouton radio", -ImageButtonProp : "Propriétés du bouton image", -TextFieldProp : "Propriétés du champ texte", -SelectionFieldProp : "Propriétés de la liste/du menu", -TextareaProp : "Propriétés de la zone de texte", -FormProp : "Propriétés du formulaire", - -FontFormats : "Normal;Formaté;Adresse;En-tête 1;En-tête 2;En-tête 3;En-tête 4;En-tête 5;En-tête 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Calcul XHTML. Veuillez patienter...", -Done : "Terminé", -PasteWordConfirm : "Le texte à coller semble provenir de Word. Désirez-vous le nettoyer avant de coller?", -NotCompatiblePaste : "Cette commande nécessite Internet Explorer version 5.5 minimum. Souhaitez-vous coller sans nettoyage?", -UnknownToolbarItem : "Elément de barre d'outil inconnu \"%1\"", -UnknownCommand : "Nom de commande inconnu \"%1\"", -NotImplemented : "Commande non encore écrite", -UnknownToolbarSet : "La barre d'outils \"%1\" n'existe pas", -NoActiveX : "Les paramètres de sécurité de votre navigateur peuvent limiter quelques fonctionnalités de l'éditeur. Veuillez activer l'option \"Exécuter les contrôles ActiveX et les plug-ins\". Il se peut que vous rencontriez des erreurs et remarquiez quelques limitations.", -BrowseServerBlocked : "Le navigateur n'a pas pu être ouvert. Assurez-vous que les bloqueurs de popups soient désactivés.", -DialogBlocked : "La fenêtre de dialogue n'a pas pu s'ouvrir. Assurez-vous que les bloqueurs de popups soient désactivés.", -VisitLinkBlocked : "Impossible d'ouvrir une nouvelle fenêtre. Assurez-vous que les bloqueurs de popups soient désactivés.", - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Annuler", -DlgBtnClose : "Fermer", -DlgBtnBrowseServer : "Parcourir le serveur", -DlgAdvancedTag : "Avancé", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Veuillez saisir l'URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Sens d'écriture", -DlgGenLangDirLtr : "De gauche à droite (LTR)", -DlgGenLangDirRtl : "De droite à gauche (RTL)", -DlgGenLangCode : "Code langue", -DlgGenAccessKey : "Equivalent clavier", -DlgGenName : "Nom", -DlgGenTabIndex : "Ordre de tabulation", -DlgGenLongDescr : "URL de description longue", -DlgGenClass : "Classes de feuilles de style", -DlgGenTitle : "Titre", -DlgGenContType : "Type de contenu", -DlgGenLinkCharset : "Encodage de caractère", -DlgGenStyle : "Style", - -// Image Dialog -DlgImgTitle : "Propriétés de l'image", -DlgImgInfoTab : "Informations sur l'image", -DlgImgBtnUpload : "Envoyer sur le serveur", -DlgImgURL : "URL", -DlgImgUpload : "Télécharger", -DlgImgAlt : "Texte de remplacement", -DlgImgWidth : "Largeur", -DlgImgHeight : "Hauteur", -DlgImgLockRatio : "Garder les proportions", -DlgBtnResetSize : "Taille originale", -DlgImgBorder : "Bordure", -DlgImgHSpace : "Espacement horizontal", -DlgImgVSpace : "Espacement vertical", -DlgImgAlign : "Alignement", -DlgImgAlignLeft : "Gauche", -DlgImgAlignAbsBottom: "Abs Bas", -DlgImgAlignAbsMiddle: "Abs Milieu", -DlgImgAlignBaseline : "Bas du texte", -DlgImgAlignBottom : "Bas", -DlgImgAlignMiddle : "Milieu", -DlgImgAlignRight : "Droite", -DlgImgAlignTextTop : "Haut du texte", -DlgImgAlignTop : "Haut", -DlgImgPreview : "Prévisualisation", -DlgImgAlertUrl : "Veuillez saisir l'URL de l'image", -DlgImgLinkTab : "Lien", - -// Flash Dialog -DlgFlashTitle : "Propriétés de l'animation Flash", -DlgFlashChkPlay : "Lecture automatique", -DlgFlashChkLoop : "Boucle", -DlgFlashChkMenu : "Activer le menu Flash", -DlgFlashScale : "Affichage", -DlgFlashScaleAll : "Par défaut (tout montrer)", -DlgFlashScaleNoBorder : "Sans bordure", -DlgFlashScaleFit : "Ajuster aux dimensions", - -// Link Dialog -DlgLnkWindowTitle : "Propriétés du lien", -DlgLnkInfoTab : "Informations sur le lien", -DlgLnkTargetTab : "Destination", - -DlgLnkType : "Type de lien", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Ancre dans cette page", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protocole", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Sélectionner une ancre", -DlgLnkAnchorByName : "Par nom", -DlgLnkAnchorById : "Par id", -DlgLnkNoAnchors : "(Pas d'ancre disponible dans le document)", -DlgLnkEMail : "Adresse E-Mail", -DlgLnkEMailSubject : "Sujet du message", -DlgLnkEMailBody : "Corps du message", -DlgLnkUpload : "Télécharger", -DlgLnkBtnUpload : "Envoyer sur le serveur", - -DlgLnkTarget : "Destination", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Nouvelle fenêtre (_blank)", -DlgLnkTargetParent : "Fenêtre mère (_parent)", -DlgLnkTargetSelf : "Même fenêtre (_self)", -DlgLnkTargetTop : "Fenêtre supérieure (_top)", -DlgLnkTargetFrameName : "Nom du cadre de destination", -DlgLnkPopWinName : "Nom de la fenêtre popup", -DlgLnkPopWinFeat : "Caractéristiques de la fenêtre popup", -DlgLnkPopResize : "Taille modifiable", -DlgLnkPopLocation : "Barre d'adresses", -DlgLnkPopMenu : "Barre de menu", -DlgLnkPopScroll : "Barres de défilement", -DlgLnkPopStatus : "Barre d'état", -DlgLnkPopToolbar : "Barre d'outils", -DlgLnkPopFullScrn : "Plein écran (IE)", -DlgLnkPopDependent : "Dépendante (Netscape)", -DlgLnkPopWidth : "Largeur", -DlgLnkPopHeight : "Hauteur", -DlgLnkPopLeft : "Position à partir de la gauche", -DlgLnkPopTop : "Position à partir du haut", - -DlnLnkMsgNoUrl : "Veuillez saisir l'URL", -DlnLnkMsgNoEMail : "Veuillez saisir l'adresse e-mail", -DlnLnkMsgNoAnchor : "Veuillez sélectionner une ancre", -DlnLnkMsgInvPopName : "Le nom de la fenêtre popup doit commencer par une lettre et ne doit pas contenir d'espace", - -// Color Dialog -DlgColorTitle : "Sélectionner", -DlgColorBtnClear : "Effacer", -DlgColorHighlight : "Prévisualisation", -DlgColorSelected : "Sélectionné", - -// Smiley Dialog -DlgSmileyTitle : "Insérer un Smiley", - -// Special Character Dialog -DlgSpecialCharTitle : "Insérer un caractère spécial", - -// Table Dialog -DlgTableTitle : "Propriétés du tableau", -DlgTableRows : "Lignes", -DlgTableColumns : "Colonnes", -DlgTableBorder : "Bordure", -DlgTableAlign : "Alignement", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Gauche", -DlgTableAlignCenter : "Centré", -DlgTableAlignRight : "Droite", -DlgTableWidth : "Largeur", -DlgTableWidthPx : "pixels", -DlgTableWidthPc : "pourcentage", -DlgTableHeight : "Hauteur", -DlgTableCellSpace : "Espacement", -DlgTableCellPad : "Contour", -DlgTableCaption : "Titre", -DlgTableSummary : "Résumé", - -// Table Cell Dialog -DlgCellTitle : "Propriétés de la cellule", -DlgCellWidth : "Largeur", -DlgCellWidthPx : "pixels", -DlgCellWidthPc : "pourcentage", -DlgCellHeight : "Hauteur", -DlgCellWordWrap : "Retour à la ligne", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Oui", -DlgCellWordWrapNo : "Non", -DlgCellHorAlign : "Alignement horizontal", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Gauche", -DlgCellHorAlignCenter : "Centré", -DlgCellHorAlignRight: "Droite", -DlgCellVerAlign : "Alignement vertical", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Haut", -DlgCellVerAlignMiddle : "Milieu", -DlgCellVerAlignBottom : "Bas", -DlgCellVerAlignBaseline : "Bas du texte", -DlgCellRowSpan : "Lignes fusionnées", -DlgCellCollSpan : "Colonnes fusionnées", -DlgCellBackColor : "Fond", -DlgCellBorderColor : "Bordure", -DlgCellBtnSelect : "Choisir...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Chercher et Remplacer", - -// Find Dialog -DlgFindTitle : "Chercher", -DlgFindFindBtn : "Chercher", -DlgFindNotFoundMsg : "Le texte indiqué est introuvable.", - -// Replace Dialog -DlgReplaceTitle : "Remplacer", -DlgReplaceFindLbl : "Rechercher:", -DlgReplaceReplaceLbl : "Remplacer par:", -DlgReplaceCaseChk : "Respecter la casse", -DlgReplaceReplaceBtn : "Remplacer", -DlgReplaceReplAllBtn : "Tout remplacer", -DlgReplaceWordChk : "Mot entier", - -// Paste Operations / Dialog -PasteErrorCut : "Les paramètres de sécurité de votre navigateur empêchent l'éditeur de couper automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl+X).", -PasteErrorCopy : "Les paramètres de sécurité de votre navigateur empêchent l'éditeur de copier automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl+C).", - -PasteAsText : "Coller comme texte", -PasteFromWord : "Coller à partir de Word", - -DlgPasteMsg2 : "Veuillez coller dans la zone ci-dessous en utilisant le clavier (Ctrl+V) et cliquez sur OK.", -DlgPasteSec : "A cause des paramètres de sécurité de votre navigateur, l'éditeur ne peut accéder au presse-papier directement. Vous devez coller à nouveau le contenu dans cette fenêtre.", -DlgPasteIgnoreFont : "Ignorer les polices de caractères", -DlgPasteRemoveStyles : "Supprimer les styles", - -// Color Picker -ColorAutomatic : "Automatique", -ColorMoreColors : "Plus de couleurs...", - -// Document Properties -DocProps : "Propriétés du document", - -// Anchor Dialog -DlgAnchorTitle : "Propriétés de l'ancre", -DlgAnchorName : "Nom de l'ancre", -DlgAnchorErrorName : "Veuillez saisir le nom de l'ancre", - -// Speller Pages Dialog -DlgSpellNotInDic : "Pas dans le dictionnaire", -DlgSpellChangeTo : "Changer en", -DlgSpellBtnIgnore : "Ignorer", -DlgSpellBtnIgnoreAll : "Ignorer tout", -DlgSpellBtnReplace : "Remplacer", -DlgSpellBtnReplaceAll : "Remplacer tout", -DlgSpellBtnUndo : "Annuler", -DlgSpellNoSuggestions : "- Aucune suggestion -", -DlgSpellProgress : "Vérification d'orthographe en cours...", -DlgSpellNoMispell : "Vérification d'orthographe terminée: Aucune erreur trouvée", -DlgSpellNoChanges : "Vérification d'orthographe terminée: Pas de modifications", -DlgSpellOneChange : "Vérification d'orthographe terminée: Un mot modifié", -DlgSpellManyChanges : "Vérification d'orthographe terminée: %1 mots modifiés", - -IeSpellDownload : "Le Correcteur n'est pas installé. Souhaitez-vous le télécharger maintenant?", - -// Button Dialog -DlgButtonText : "Texte (valeur)", -DlgButtonType : "Type", -DlgButtonTypeBtn : "Bouton", -DlgButtonTypeSbm : "Envoyer", -DlgButtonTypeRst : "Réinitialiser", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Nom", -DlgCheckboxValue : "Valeur", -DlgCheckboxSelected : "Sélectionné", - -// Form Dialog -DlgFormName : "Nom", -DlgFormAction : "Action", -DlgFormMethod : "Méthode", - -// Select Field Dialog -DlgSelectName : "Nom", -DlgSelectValue : "Valeur", -DlgSelectSize : "Taille", -DlgSelectLines : "lignes", -DlgSelectChkMulti : "Sélection multiple", -DlgSelectOpAvail : "Options disponibles", -DlgSelectOpText : "Texte", -DlgSelectOpValue : "Valeur", -DlgSelectBtnAdd : "Ajouter", -DlgSelectBtnModify : "Modifier", -DlgSelectBtnUp : "Monter", -DlgSelectBtnDown : "Descendre", -DlgSelectBtnSetValue : "Valeur sélectionnée", -DlgSelectBtnDelete : "Supprimer", - -// Textarea Dialog -DlgTextareaName : "Nom", -DlgTextareaCols : "Colonnes", -DlgTextareaRows : "Lignes", - -// Text Field Dialog -DlgTextName : "Nom", -DlgTextValue : "Valeur", -DlgTextCharWidth : "Largeur en caractères", -DlgTextMaxChars : "Nombre maximum de caractères", -DlgTextType : "Type", -DlgTextTypeText : "Texte", -DlgTextTypePass : "Mot de passe", - -// Hidden Field Dialog -DlgHiddenName : "Nom", -DlgHiddenValue : "Valeur", - -// Bulleted List Dialog -BulletedListProp : "Propriétés de liste à puces", -NumberedListProp : "Propriétés de liste numérotée", -DlgLstStart : "Début", -DlgLstType : "Type", -DlgLstTypeCircle : "Cercle", -DlgLstTypeDisc : "Disque", -DlgLstTypeSquare : "Carré", -DlgLstTypeNumbers : "Nombres (1, 2, 3)", -DlgLstTypeLCase : "Lettres minuscules (a, b, c)", -DlgLstTypeUCase : "Lettres majuscules (A, B, C)", -DlgLstTypeSRoman : "Chiffres romains minuscules (i, ii, iii)", -DlgLstTypeLRoman : "Chiffres romains majuscules (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Général", -DlgDocBackTab : "Fond", -DlgDocColorsTab : "Couleurs et marges", -DlgDocMetaTab : "Métadonnées", - -DlgDocPageTitle : "Titre de la page", -DlgDocLangDir : "Sens d'écriture", -DlgDocLangDirLTR : "De la gauche vers la droite (LTR)", -DlgDocLangDirRTL : "De la droite vers la gauche (RTL)", -DlgDocLangCode : "Code langue", -DlgDocCharSet : "Encodage de caractère", -DlgDocCharSetCE : "Europe Centrale", -DlgDocCharSetCT : "Chinois Traditionnel (Big5)", -DlgDocCharSetCR : "Cyrillique", -DlgDocCharSetGR : "Grec", -DlgDocCharSetJP : "Japonais", -DlgDocCharSetKR : "Coréen", -DlgDocCharSetTR : "Turc", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Occidental", -DlgDocCharSetOther : "Autre encodage de caractère", - -DlgDocDocType : "Type de document", -DlgDocDocTypeOther : "Autre type de document", -DlgDocIncXHTML : "Inclure les déclarations XHTML", -DlgDocBgColor : "Couleur de fond", -DlgDocBgImage : "Image de fond", -DlgDocBgNoScroll : "Image fixe sans défilement", -DlgDocCText : "Texte", -DlgDocCLink : "Lien", -DlgDocCVisited : "Lien visité", -DlgDocCActive : "Lien activé", -DlgDocMargins : "Marges", -DlgDocMaTop : "Haut", -DlgDocMaLeft : "Gauche", -DlgDocMaRight : "Droite", -DlgDocMaBottom : "Bas", -DlgDocMeIndex : "Mots-clés (séparés par des virgules)", -DlgDocMeDescr : "Description", -DlgDocMeAuthor : "Auteur", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Prévisualisation", - -// Templates Dialog -Templates : "Modèles", -DlgTemplatesTitle : "Modèles de contenu", -DlgTemplatesSelMsg : "Veuillez sélectionner le modèle à ouvrir dans l'éditeur
    (le contenu actuel sera remplacé):", -DlgTemplatesLoading : "Chargement de la liste des modèles. Veuillez patienter...", -DlgTemplatesNoTpl : "(Aucun modèle disponible)", -DlgTemplatesReplace : "Remplacer tout le contenu", - -// About Dialog -DlgAboutAboutTab : "A propos de", -DlgAboutBrowserInfoTab : "Navigateur", -DlgAboutLicenseTab : "Licence", -DlgAboutVersion : "Version", -DlgAboutInfo : "Pour plus d'informations, aller à", - -// Div Dialog -DlgDivGeneralTab : "Général", -DlgDivAdvancedTab : "Avancé", -DlgDivStyle : "Style", -DlgDivInlineStyle : "Attribut Style" -}; diff --git a/fckeditor/editor/lang/gl.js b/fckeditor/editor/lang/gl.js deleted file mode 100644 index 560969f7..00000000 --- a/fckeditor/editor/lang/gl.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Galician language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Ocultar Ferramentas", -ToolbarExpand : "Mostrar Ferramentas", - -// Toolbar Items and Context Menu -Save : "Gardar", -NewPage : "Nova Páxina", -Preview : "Vista Previa", -Cut : "Cortar", -Copy : "Copiar", -Paste : "Pegar", -PasteText : "Pegar como texto plano", -PasteWord : "Pegar dende Word", -Print : "Imprimir", -SelectAll : "Seleccionar todo", -RemoveFormat : "Eliminar Formato", -InsertLinkLbl : "Ligazón", -InsertLink : "Inserir/Editar Ligazón", -RemoveLink : "Eliminar Ligazón", -VisitLink : "Open Link", //MISSING -Anchor : "Inserir/Editar Referencia", -AnchorDelete : "Remove Anchor", //MISSING -InsertImageLbl : "Imaxe", -InsertImage : "Inserir/Editar Imaxe", -InsertFlashLbl : "Flash", -InsertFlash : "Inserir/Editar Flash", -InsertTableLbl : "Tabla", -InsertTable : "Inserir/Editar Tabla", -InsertLineLbl : "Liña", -InsertLine : "Inserir Liña Horizontal", -InsertSpecialCharLbl: "Carácter Special", -InsertSpecialChar : "Inserir Carácter Especial", -InsertSmileyLbl : "Smiley", -InsertSmiley : "Inserir Smiley", -About : "Acerca de FCKeditor", -Bold : "Negrita", -Italic : "Cursiva", -Underline : "Sub-raiado", -StrikeThrough : "Tachado", -Subscript : "Subíndice", -Superscript : "Superíndice", -LeftJustify : "Aliñar á Esquerda", -CenterJustify : "Centrado", -RightJustify : "Aliñar á Dereita", -BlockJustify : "Xustificado", -DecreaseIndent : "Disminuir Sangría", -IncreaseIndent : "Aumentar Sangría", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "Desfacer", -Redo : "Refacer", -NumberedListLbl : "Lista Numerada", -NumberedList : "Inserir/Eliminar Lista Numerada", -BulletedListLbl : "Marcas", -BulletedList : "Inserir/Eliminar Marcas", -ShowTableBorders : "Mostrar Bordes das Táboas", -ShowDetails : "Mostrar Marcas Parágrafo", -Style : "Estilo", -FontFormat : "Formato", -Font : "Tipo", -FontSize : "Tamaño", -TextColor : "Cor do Texto", -BGColor : "Cor do Fondo", -Source : "Código Fonte", -Find : "Procurar", -Replace : "Substituir", -SpellCheck : "Corrección Ortográfica", -UniversalKeyboard : "Teclado Universal", -PageBreakLbl : "Salto de Páxina", -PageBreak : "Inserir Salto de Páxina", - -Form : "Formulario", -Checkbox : "Cadro de Verificación", -RadioButton : "Botón de Radio", -TextField : "Campo de Texto", -Textarea : "Ãrea de Texto", -HiddenField : "Campo Oculto", -Button : "Botón", -SelectionField : "Campo de Selección", -ImageButton : "Botón de Imaxe", - -FitWindow : "Maximizar o tamaño do editor", -ShowBlocks : "Show Blocks", //MISSING - -// Context Menu -EditLink : "Editar Ligazón", -CellCM : "Cela", -RowCM : "Fila", -ColumnCM : "Columna", -InsertRowAfter : "Insert Row After", //MISSING -InsertRowBefore : "Insert Row Before", //MISSING -DeleteRows : "Borrar Filas", -InsertColumnAfter : "Insert Column After", //MISSING -InsertColumnBefore : "Insert Column Before", //MISSING -DeleteColumns : "Borrar Columnas", -InsertCellAfter : "Insert Cell After", //MISSING -InsertCellBefore : "Insert Cell Before", //MISSING -DeleteCells : "Borrar Cela", -MergeCells : "Unir Celas", -MergeRight : "Merge Right", //MISSING -MergeDown : "Merge Down", //MISSING -HorizontalSplitCell : "Split Cell Horizontally", //MISSING -VerticalSplitCell : "Split Cell Vertically", //MISSING -TableDelete : "Borrar Táboa", -CellProperties : "Propriedades da Cela", -TableProperties : "Propriedades da Táboa", -ImageProperties : "Propriedades Imaxe", -FlashProperties : "Propriedades Flash", - -AnchorProp : "Propriedades da Referencia", -ButtonProp : "Propriedades do Botón", -CheckboxProp : "Propriedades do Cadro de Verificación", -HiddenFieldProp : "Propriedades do Campo Oculto", -RadioButtonProp : "Propriedades do Botón de Radio", -ImageButtonProp : "Propriedades do Botón de Imaxe", -TextFieldProp : "Propriedades do Campo de Texto", -SelectionFieldProp : "Propriedades do Campo de Selección", -TextareaProp : "Propriedades da Ãrea de Texto", -FormProp : "Propriedades do Formulario", - -FontFormats : "Normal;Formateado;Enderezo;Enacabezado 1;Encabezado 2;Encabezado 3;Encabezado 4;Encabezado 5;Encabezado 6;Paragraph (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Procesando XHTML. Por facor, agarde...", -Done : "Feiro", -PasteWordConfirm : "Parece que o texto que quere pegar está copiado do Word.¿Quere limpar o formato antes de pegalo?", -NotCompatiblePaste : "Este comando está disponible para Internet Explorer versión 5.5 ou superior. ¿Quere pegalo sen limpar o formato?", -UnknownToolbarItem : "Ãtem de ferramentas descoñecido \"%1\"", -UnknownCommand : "Nome de comando descoñecido \"%1\"", -NotImplemented : "Comando non implementado", -UnknownToolbarSet : "O conxunto de ferramentas \"%1\" non existe", -NoActiveX : "As opcións de seguridade do seu navegador poderían limitar algunha das características de editor. Debe activar a opción \"Executar controis ActiveX e plug-ins\". Pode notar que faltan características e experimentar erros", -BrowseServerBlocked : "Non se poido abrir o navegador de recursos. Asegúrese de que están desactivados os bloqueadores de xanelas emerxentes", -DialogBlocked : "Non foi posible abrir a xanela de diálogo. Asegúrese de que están desactivados os bloqueadores de xanelas emerxentes", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Cancelar", -DlgBtnClose : "Pechar", -DlgBtnBrowseServer : "Navegar no Servidor", -DlgAdvancedTag : "Advanzado", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Por favor, insira a URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Orientación do Idioma", -DlgGenLangDirLtr : "Esquerda a Dereita (LTR)", -DlgGenLangDirRtl : "Dereita a Esquerda (RTL)", -DlgGenLangCode : "Código do Idioma", -DlgGenAccessKey : "Chave de Acceso", -DlgGenName : "Nome", -DlgGenTabIndex : "Ãndice de Tabulación", -DlgGenLongDescr : "Descrición Completa da URL", -DlgGenClass : "Clases da Folla de Estilos", -DlgGenTitle : "Título", -DlgGenContType : "Tipo de Contido", -DlgGenLinkCharset : "Fonte de Caracteres Vinculado", -DlgGenStyle : "Estilo", - -// Image Dialog -DlgImgTitle : "Propriedades da Imaxe", -DlgImgInfoTab : "Información da Imaxe", -DlgImgBtnUpload : "Enviar ó Servidor", -DlgImgURL : "URL", -DlgImgUpload : "Carregar", -DlgImgAlt : "Texto Alternativo", -DlgImgWidth : "Largura", -DlgImgHeight : "Altura", -DlgImgLockRatio : "Proporcional", -DlgBtnResetSize : "Tamaño Orixinal", -DlgImgBorder : "Límite", -DlgImgHSpace : "Esp. Horiz.", -DlgImgVSpace : "Esp. Vert.", -DlgImgAlign : "Aliñamento", -DlgImgAlignLeft : "Esquerda", -DlgImgAlignAbsBottom: "Abs Inferior", -DlgImgAlignAbsMiddle: "Abs Centro", -DlgImgAlignBaseline : "Liña Base", -DlgImgAlignBottom : "Pé", -DlgImgAlignMiddle : "Centro", -DlgImgAlignRight : "Dereita", -DlgImgAlignTextTop : "Tope do Texto", -DlgImgAlignTop : "Tope", -DlgImgPreview : "Vista Previa", -DlgImgAlertUrl : "Por favor, escriba a URL da imaxe", -DlgImgLinkTab : "Ligazón", - -// Flash Dialog -DlgFlashTitle : "Propriedades Flash", -DlgFlashChkPlay : "Auto Execución", -DlgFlashChkLoop : "Bucle", -DlgFlashChkMenu : "Activar Menú Flash", -DlgFlashScale : "Escalar", -DlgFlashScaleAll : "Amosar Todo", -DlgFlashScaleNoBorder : "Sen Borde", -DlgFlashScaleFit : "Encaixar axustando", - -// Link Dialog -DlgLnkWindowTitle : "Ligazón", -DlgLnkInfoTab : "Información da Ligazón", -DlgLnkTargetTab : "Referencia a esta páxina", - -DlgLnkType : "Tipo de Ligazón", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Referencia nesta páxina", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protocolo", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Seleccionar unha Referencia", -DlgLnkAnchorByName : "Por Nome de Referencia", -DlgLnkAnchorById : "Por Element Id", -DlgLnkNoAnchors : "(Non hai referencias disponibles no documento)", -DlgLnkEMail : "Enderezo de E-Mail", -DlgLnkEMailSubject : "Asunto do Mensaxe", -DlgLnkEMailBody : "Corpo do Mensaxe", -DlgLnkUpload : "Carregar", -DlgLnkBtnUpload : "Enviar ó servidor", - -DlgLnkTarget : "Destino", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Nova Xanela (_blank)", -DlgLnkTargetParent : "Xanela Pai (_parent)", -DlgLnkTargetSelf : "Mesma Xanela (_self)", -DlgLnkTargetTop : "Xanela Primaria (_top)", -DlgLnkTargetFrameName : "Nome do Marco Destino", -DlgLnkPopWinName : "Nome da Xanela Emerxente", -DlgLnkPopWinFeat : "Características da Xanela Emerxente", -DlgLnkPopResize : "Axustable", -DlgLnkPopLocation : "Barra de Localización", -DlgLnkPopMenu : "Barra de Menú", -DlgLnkPopScroll : "Barras de Desplazamento", -DlgLnkPopStatus : "Barra de Estado", -DlgLnkPopToolbar : "Barra de Ferramentas", -DlgLnkPopFullScrn : "A Toda Pantalla (IE)", -DlgLnkPopDependent : "Dependente (Netscape)", -DlgLnkPopWidth : "Largura", -DlgLnkPopHeight : "Altura", -DlgLnkPopLeft : "Posición Esquerda", -DlgLnkPopTop : "Posición dende Arriba", - -DlnLnkMsgNoUrl : "Por favor, escriba a ligazón URL", -DlnLnkMsgNoEMail : "Por favor, escriba o enderezo de e-mail", -DlnLnkMsgNoAnchor : "Por favor, seleccione un destino", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", //MISSING - -// Color Dialog -DlgColorTitle : "Seleccionar Color", -DlgColorBtnClear : "Nengunha", -DlgColorHighlight : "Destacado", -DlgColorSelected : "Seleccionado", - -// Smiley Dialog -DlgSmileyTitle : "Inserte un Smiley", - -// Special Character Dialog -DlgSpecialCharTitle : "Seleccione Caracter Especial", - -// Table Dialog -DlgTableTitle : "Propiedades da Táboa", -DlgTableRows : "Filas", -DlgTableColumns : "Columnas", -DlgTableBorder : "Tamaño do Borde", -DlgTableAlign : "Aliñamento", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Esquerda", -DlgTableAlignCenter : "Centro", -DlgTableAlignRight : "Ereita", -DlgTableWidth : "Largura", -DlgTableWidthPx : "pixels", -DlgTableWidthPc : "percent", -DlgTableHeight : "Altura", -DlgTableCellSpace : "Marxe entre Celas", -DlgTableCellPad : "Marxe interior", -DlgTableCaption : "Título", -DlgTableSummary : "Sumario", - -// Table Cell Dialog -DlgCellTitle : "Propriedades da Cela", -DlgCellWidth : "Largura", -DlgCellWidthPx : "pixels", -DlgCellWidthPc : "percent", -DlgCellHeight : "Altura", -DlgCellWordWrap : "Axustar Liñas", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Si", -DlgCellWordWrapNo : "Non", -DlgCellHorAlign : "Aliñamento Horizontal", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Esquerda", -DlgCellHorAlignCenter : "Centro", -DlgCellHorAlignRight: "Dereita", -DlgCellVerAlign : "Aliñamento Vertical", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Arriba", -DlgCellVerAlignMiddle : "Medio", -DlgCellVerAlignBottom : "Abaixo", -DlgCellVerAlignBaseline : "Liña de Base", -DlgCellRowSpan : "Ocupar Filas", -DlgCellCollSpan : "Ocupar Columnas", -DlgCellBackColor : "Color de Fondo", -DlgCellBorderColor : "Color de Borde", -DlgCellBtnSelect : "Seleccionar...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", //MISSING - -// Find Dialog -DlgFindTitle : "Procurar", -DlgFindFindBtn : "Procurar", -DlgFindNotFoundMsg : "Non te atopou o texto indicado.", - -// Replace Dialog -DlgReplaceTitle : "Substituir", -DlgReplaceFindLbl : "Texto a procurar:", -DlgReplaceReplaceLbl : "Substituir con:", -DlgReplaceCaseChk : "Coincidir Mai./min.", -DlgReplaceReplaceBtn : "Substituir", -DlgReplaceReplAllBtn : "Substitiur Todo", -DlgReplaceWordChk : "Coincidir con toda a palabra", - -// Paste Operations / Dialog -PasteErrorCut : "Os axustes de seguridade do seu navegador non permiten que o editor realice automáticamente as tarefas de corte. Por favor, use o teclado para iso (Ctrl+X).", -PasteErrorCopy : "Os axustes de seguridade do seu navegador non permiten que o editor realice automáticamente as tarefas de copia. Por favor, use o teclado para iso (Ctrl+C).", - -PasteAsText : "Pegar como texto plano", -PasteFromWord : "Pegar dende Word", - -DlgPasteMsg2 : "Por favor, pegue dentro do seguinte cadro usando o teclado (Ctrl+V) e pulse OK.", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING -DlgPasteIgnoreFont : "Ignorar as definicións de Tipografía", -DlgPasteRemoveStyles : "Eliminar as definicións de Estilos", - -// Color Picker -ColorAutomatic : "Automático", -ColorMoreColors : "Máis Cores...", - -// Document Properties -DocProps : "Propriedades do Documento", - -// Anchor Dialog -DlgAnchorTitle : "Propriedades da Referencia", -DlgAnchorName : "Nome da Referencia", -DlgAnchorErrorName : "Por favor, escriba o nome da referencia", - -// Speller Pages Dialog -DlgSpellNotInDic : "Non está no diccionario", -DlgSpellChangeTo : "Cambiar a", -DlgSpellBtnIgnore : "Ignorar", -DlgSpellBtnIgnoreAll : "Ignorar Todas", -DlgSpellBtnReplace : "Substituir", -DlgSpellBtnReplaceAll : "Substituir Todas", -DlgSpellBtnUndo : "Desfacer", -DlgSpellNoSuggestions : "- Sen candidatos -", -DlgSpellProgress : "Corrección ortográfica en progreso...", -DlgSpellNoMispell : "Corrección ortográfica rematada: Non se atoparon erros", -DlgSpellNoChanges : "Corrección ortográfica rematada: Non se substituiu nengunha verba", -DlgSpellOneChange : "Corrección ortográfica rematada: Unha verba substituida", -DlgSpellManyChanges : "Corrección ortográfica rematada: %1 verbas substituidas", - -IeSpellDownload : "O corrector ortográfico non está instalado. ¿Quere descargalo agora?", - -// Button Dialog -DlgButtonText : "Texto (Valor)", -DlgButtonType : "Tipo", -DlgButtonTypeBtn : "Button", //MISSING -DlgButtonTypeSbm : "Submit", //MISSING -DlgButtonTypeRst : "Reset", //MISSING - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Nome", -DlgCheckboxValue : "Valor", -DlgCheckboxSelected : "Seleccionado", - -// Form Dialog -DlgFormName : "Nome", -DlgFormAction : "Acción", -DlgFormMethod : "Método", - -// Select Field Dialog -DlgSelectName : "Nome", -DlgSelectValue : "Valor", -DlgSelectSize : "Tamaño", -DlgSelectLines : "liñas", -DlgSelectChkMulti : "Permitir múltiples seleccións", -DlgSelectOpAvail : "Opcións Disponibles", -DlgSelectOpText : "Texto", -DlgSelectOpValue : "Valor", -DlgSelectBtnAdd : "Engadir", -DlgSelectBtnModify : "Modificar", -DlgSelectBtnUp : "Subir", -DlgSelectBtnDown : "Baixar", -DlgSelectBtnSetValue : "Definir como valor por defecto", -DlgSelectBtnDelete : "Borrar", - -// Textarea Dialog -DlgTextareaName : "Nome", -DlgTextareaCols : "Columnas", -DlgTextareaRows : "Filas", - -// Text Field Dialog -DlgTextName : "Nome", -DlgTextValue : "Valor", -DlgTextCharWidth : "Tamaño do Caracter", -DlgTextMaxChars : "Máximo de Caracteres", -DlgTextType : "Tipo", -DlgTextTypeText : "Texto", -DlgTextTypePass : "Chave", - -// Hidden Field Dialog -DlgHiddenName : "Nome", -DlgHiddenValue : "Valor", - -// Bulleted List Dialog -BulletedListProp : "Propriedades das Marcas", -NumberedListProp : "Propriedades da Lista de Numeración", -DlgLstStart : "Start", //MISSING -DlgLstType : "Tipo", -DlgLstTypeCircle : "Círculo", -DlgLstTypeDisc : "Disco", -DlgLstTypeSquare : "Cuadrado", -DlgLstTypeNumbers : "Números (1, 2, 3)", -DlgLstTypeLCase : "Letras Minúsculas (a, b, c)", -DlgLstTypeUCase : "Letras Maiúsculas (A, B, C)", -DlgLstTypeSRoman : "Números Romanos en minúscula (i, ii, iii)", -DlgLstTypeLRoman : "Números Romanos en Maiúscula (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Xeral", -DlgDocBackTab : "Fondo", -DlgDocColorsTab : "Cores e Marxes", -DlgDocMetaTab : "Meta Data", - -DlgDocPageTitle : "Título da Páxina", -DlgDocLangDir : "Orientación do Idioma", -DlgDocLangDirLTR : "Esquerda a Dereita (LTR)", -DlgDocLangDirRTL : "Dereita a Esquerda (RTL)", -DlgDocLangCode : "Código de Idioma", -DlgDocCharSet : "Codificación do Xogo de Caracteres", -DlgDocCharSetCE : "Central European", //MISSING -DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING -DlgDocCharSetCR : "Cyrillic", //MISSING -DlgDocCharSetGR : "Greek", //MISSING -DlgDocCharSetJP : "Japanese", //MISSING -DlgDocCharSetKR : "Korean", //MISSING -DlgDocCharSetTR : "Turkish", //MISSING -DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING -DlgDocCharSetWE : "Western European", //MISSING -DlgDocCharSetOther : "Outra Codificación do Xogo de Caracteres", - -DlgDocDocType : "Encabezado do Tipo de Documento", -DlgDocDocTypeOther : "Outro Encabezado do Tipo de Documento", -DlgDocIncXHTML : "Incluir Declaracións XHTML", -DlgDocBgColor : "Cor de Fondo", -DlgDocBgImage : "URL da Imaxe de Fondo", -DlgDocBgNoScroll : "Fondo Fixo", -DlgDocCText : "Texto", -DlgDocCLink : "Ligazóns", -DlgDocCVisited : "Ligazón Visitada", -DlgDocCActive : "Ligazón Activa", -DlgDocMargins : "Marxes da Páxina", -DlgDocMaTop : "Arriba", -DlgDocMaLeft : "Esquerda", -DlgDocMaRight : "Dereita", -DlgDocMaBottom : "Abaixo", -DlgDocMeIndex : "Palabras Chave de Indexación do Documento (separadas por comas)", -DlgDocMeDescr : "Descripción do Documento", -DlgDocMeAuthor : "Autor", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Vista Previa", - -// Templates Dialog -Templates : "Plantillas", -DlgTemplatesTitle : "Plantillas de Contido", -DlgTemplatesSelMsg : "Por favor, seleccione a plantilla a abrir no editor
    (o contido actual perderase):", -DlgTemplatesLoading : "Cargando listado de plantillas. Por favor, espere...", -DlgTemplatesNoTpl : "(Non hai plantillas definidas)", -DlgTemplatesReplace : "Replace actual contents", //MISSING - -// About Dialog -DlgAboutAboutTab : "Acerca de", -DlgAboutBrowserInfoTab : "Información do Navegador", -DlgAboutLicenseTab : "Licencia", -DlgAboutVersion : "versión", -DlgAboutInfo : "Para máis información visitar:", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/gu.js b/fckeditor/editor/lang/gu.js deleted file mode 100644 index e14eca70..00000000 --- a/fckeditor/editor/lang/gu.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Gujarati language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "ટૂલબાર નાનà«àª‚ કરવà«àª‚", -ToolbarExpand : "ટૂલબાર મોટà«àª‚ કરવà«àª‚", - -// Toolbar Items and Context Menu -Save : "સેવ", -NewPage : "નવૠપાનà«àª‚", -Preview : "પૂરà«àªµàª¦àª°à«àª¶àª¨", -Cut : "કાપવà«àª‚", -Copy : "નકલ", -Paste : "પેસà«àªŸ", -PasteText : "પેસà«àªŸ (સાદી ટેકà«àª¸à«àªŸ)", -PasteWord : "પેસà«àªŸ (વડૅ ટેકà«àª¸à«àªŸ)", -Print : "પà«àª°àª¿àª¨à«àªŸ", -SelectAll : "બઘà«àª‚ પસંદ કરવà«àª‚", -RemoveFormat : "ફૉરà«àª®àªŸ કાઢવà«àª‚", -InsertLinkLbl : "સંબંધન, લિંક", -InsertLink : "લિંક ઇનà«àª¸àª°à«àªŸ/દાખલ કરવી", -RemoveLink : "લિંક કાઢવી", -VisitLink : "Open Link", //MISSING -Anchor : "àªàª‚કર ઇનà«àª¸àª°à«àªŸ/દાખલ કરવી", -AnchorDelete : "àªàª‚કર કાઢવી", -InsertImageLbl : "ચિતà«àª°", -InsertImage : "ચિતà«àª° ઇનà«àª¸àª°à«àªŸ/દાખલ કરવà«àª‚", -InsertFlashLbl : "ફà«àª²à«…શ", -InsertFlash : "ફà«àª²à«…શ ઇનà«àª¸àª°à«àªŸ/દાખલ કરવà«àª‚", -InsertTableLbl : "ટેબલ, કોઠો", -InsertTable : "ટેબલ, કોઠો ઇનà«àª¸àª°à«àªŸ/દાખલ કરવà«àª‚", -InsertLineLbl : "રેખા", -InsertLine : "સમસà«àª¤àª°à«€àª¯ રેખા ઇનà«àª¸àª°à«àªŸ/દાખલ કરવી", -InsertSpecialCharLbl: "વિશિષà«àªŸ અકà«àª·àª°", -InsertSpecialChar : "વિશિષà«àªŸ અકà«àª·àª° ઇનà«àª¸àª°à«àªŸ/દાખલ કરવà«àª‚", -InsertSmileyLbl : "સà«àª®àª¾àª‡àª²à«€", -InsertSmiley : "સà«àª®àª¾àª‡àª²à«€ ઇનà«àª¸àª°à«àªŸ/દાખલ કરવી", -About : "FCKeditorના વિષે", -Bold : "બોલà«àª¡/સà«àªªàª·à«àªŸ", -Italic : "ઇટેલિક, તà«àª°àª¾àª‚સા", -Underline : "અનà«àª¡àª°à«àª²àª¾àª‡àª¨, નીચે લીટી", -StrikeThrough : "છેકી નાખવà«àª‚", -Subscript : "àªàª• ચિહà«àª¨àª¨à«€ નીચે કરેલà«àª‚ બીજà«àª‚ ચિહà«àª¨", -Superscript : "àªàª• ચિહà«àª¨ ઉપર કરેલà«àª‚ બીજà«àª‚ ચિહà«àª¨.", -LeftJustify : "ડાબી બાજà«àª/બાજૠતરફ", -CenterJustify : "સંકેંદà«àª°àª£/સેંટરિંગ", -RightJustify : "જમણી બાજà«àª/બાજૠતરફ", -BlockJustify : "બà«àª²à«‰àª•, અંતરાય જસà«àªŸàª¿àª«àª¾àª‡", -DecreaseIndent : "ઇનà«àª¡à«‡àª¨à«àªŸ લીટીના આરંભમાં જગà«àª¯àª¾ ઘટાડવી", -IncreaseIndent : "ઇનà«àª¡à«‡àª¨à«àªŸ, લીટીના આરંભમાં જગà«àª¯àª¾ વધારવી", -Blockquote : "બà«àª²à«‰àª•-કોટ, અવતરણચિહà«àª¨à«‹", -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "રદ કરવà«àª‚; પહેલાં હતી àªàªµà«€ સà«àª¥àª¿àª¤àª¿ પાછી લાવવી", -Redo : "રિડૂ; પછી હતી àªàªµà«€ સà«àª¥àª¿àª¤àª¿ પાછી લાવવી", -NumberedListLbl : "સંખà«àª¯àª¾àª‚કન સૂચિ", -NumberedList : "સંખà«àª¯àª¾àª‚કન સૂચિ ઇનà«àª¸àª°à«àªŸ/દાખલ કરવી", -BulletedListLbl : "બà«àª²à«‡àªŸ સૂચિ", -BulletedList : "બà«àª²à«‡àªŸ સૂચિ ઇનà«àª¸àª°à«àªŸ/દાખલ કરવી", -ShowTableBorders : "ટેબલ, કોઠાની બાજà«(બોરà«àª¡àª°) બતાવવી", -ShowDetails : "વિસà«àª¤à«ƒàª¤ વિગતવાર બતાવવà«àª‚", -Style : "શૈલી/રીત", -FontFormat : "ફૉનà«àªŸ ફૉરà«àª®àªŸ, રચનાની શૈલી", -Font : "ફૉનà«àªŸ", -FontSize : "ફૉનà«àªŸ સાઇàª/કદ", -TextColor : "શબà«àª¦àª¨à«‹ રંગ", -BGColor : "બૅકગà«àª°àª¾àª‰àª¨à«àª¡ રંગ,", -Source : "મૂળ કે પà«àª°àª¾àª¥àª®àª¿àª• દસà«àª¤àª¾àªµà«‡àªœ", -Find : "શોધવà«àª‚", -Replace : "રિપà«àª²à«‡àª¸/બદલવà«àª‚", -SpellCheck : "જોડણી (સà«àªªà«‡àª²àª¿àª‚ગ) તપાસવી", -UniversalKeyboard : "યૂનિવરà«àª¸àª²/વિશà«àªµàªµà«àª¯àª¾àªªàª• કીબૉરà«àª¡", -PageBreakLbl : "પેજબà«àª°à«‡àª•/પાનાને અલગ કરવà«àª‚", -PageBreak : "ઇનà«àª¸àª°à«àªŸ પેજબà«àª°à«‡àª•/પાનાને અલગ કરવà«àª‚/દાખલ કરવà«àª‚", - -Form : "ફૉરà«àª®/પતà«àª°àª•", -Checkbox : "ચેક બોકà«àª¸", -RadioButton : "રેડિઓ બટન", -TextField : "ટેકà«àª¸à«àªŸ ફીલà«àª¡, શબà«àª¦ કà«àª·à«‡àª¤à«àª°", -Textarea : "ટેકà«àª¸à«àªŸ àªàª°àª¿àª†, શબà«àª¦ વિસà«àª¤àª¾àª°", -HiddenField : "ગà«àªªà«àª¤ કà«àª·à«‡àª¤à«àª°", -Button : "બટન", -SelectionField : "પસંદગી કà«àª·à«‡àª¤à«àª°", -ImageButton : "ચિતà«àª° બટન", - -FitWindow : "àªàª¡àª¿àªŸàª°àª¨à«€ સાઇઠઅધિકતમ કરવી", -ShowBlocks : "બà«àª²à«‰àª• બતાવવà«àª‚", - -// Context Menu -EditLink : " લિંક àªàª¡àª¿àªŸ/માં ફેરફાર કરવો", -CellCM : "કોષના ખાના", -RowCM : "પંકà«àª¤àª¿àª¨àª¾ ખાના", -ColumnCM : "કૉલમ/ઊભી કટાર", -InsertRowAfter : "પછી પંકà«àª¤àª¿ ઉમેરવી", -InsertRowBefore : "પહેલાં પંકà«àª¤àª¿ ઉમેરવી", -DeleteRows : "પંકà«àª¤àª¿àª“ ડિલીટ/કાઢી નાખવી", -InsertColumnAfter : "પછી કૉલમ/ઊભી કટાર ઉમેરવી", -InsertColumnBefore : "પહેલાં કૉલમ/ઊભી કટાર ઉમેરવી", -DeleteColumns : "કૉલમ/ઊભી કટાર ડિલીટ/કાઢી નાખવી", -InsertCellAfter : "પછી કોષ ઉમેરવો", -InsertCellBefore : "પહેલાં કોષ ઉમેરવો", -DeleteCells : "કોષ ડિલીટ/કાઢી નાખવો", -MergeCells : "કોષ ભેગા કરવા", -MergeRight : "જમણી બાજૠભેગા કરવા", -MergeDown : "નીચે ભેગા કરવા", -HorizontalSplitCell : "કોષને સમસà«àª¤àª°à«€àª¯ વિભાજન કરવà«àª‚", -VerticalSplitCell : "કોષને સીધà«àª‚ ને ઊભà«àª‚ વિભાજન કરવà«àª‚", -TableDelete : "કોઠો ડિલીટ/કાઢી નાખવà«àª‚", -CellProperties : "કોષના ગà«àª£", -TableProperties : "કોઠાના ગà«àª£", -ImageProperties : "ચિતà«àª°àª¨àª¾ ગà«àª£", -FlashProperties : "ફà«àª²à«…શના ગà«àª£", - -AnchorProp : "àªàª‚કરના ગà«àª£", -ButtonProp : "બટનના ગà«àª£", -CheckboxProp : "ચેક બોકà«àª¸ ગà«àª£", -HiddenFieldProp : "ગà«àªªà«àª¤ કà«àª·à«‡àª¤à«àª°àª¨àª¾ ગà«àª£", -RadioButtonProp : "રેડિઓ બટનના ગà«àª£", -ImageButtonProp : "ચિતà«àª° બટનના ગà«àª£", -TextFieldProp : "ટેકà«àª¸à«àªŸ ફીલà«àª¡, શબà«àª¦ કà«àª·à«‡àª¤à«àª°àª¨àª¾ ગà«àª£", -SelectionFieldProp : "પસંદગી કà«àª·à«‡àª¤à«àª°àª¨àª¾ ગà«àª£", -TextareaProp : "ટેકà«àª¸à«àªŸ àªàª…રિઆ, શબà«àª¦ વિસà«àª¤àª¾àª°àª¨àª¾ ગà«àª£", -FormProp : "ફૉરà«àª®/પતà«àª°àª•ના ગà«àª£", - -FontFormats : "સામાનà«àª¯;ફૉરà«àª®àªŸà«‡àª¡;સરનામà«àª‚;શીરà«àª·àª• 1;શીરà«àª·àª• 2;શીરà«àª·àª• 3;શીરà«àª·àª• 4;શીરà«àª·àª• 5;શીરà«àª·àª• 6;શીરà«àª·àª• (DIV)", - -// Alerts and Messages -ProcessingXHTML : "XHTML પà«àª°àª•à«àª°àª¿àª¯àª¾ ચાલૠછે. મહેરબાની કરીને રાહ જોવો...", -Done : "પતી ગયà«àª‚", -PasteWordConfirm : "તમે જે ટેકà«àª¸à«àªŸ પેસà«àªŸ કરવા માંગો છો, તે વડૅમાંથી કોપી કરેલૠલાગે છે. પેસà«àªŸ કરતા પહેલાં ટેકà«àª¸à«àªŸ સાફ કરવી છે?", -NotCompatiblePaste : "આ કમાનà«àª¡ ઈનટરનેટ àªàª•à«àª¸àªªà«àª²à«‹àª°àª°(Internet Explorer) 5.5 અથવા àªàª¨àª¾ પછીના વરà«àªàª¨ માટેજ છે. ટેકà«àª¸à«àªŸàª¨à«‡ સાફ કયૅા પહેલાં પેસà«àªŸ કરવી છે?", -UnknownToolbarItem : "અજાણી ટૂલબાર આઇટમ \"%1\"", -UnknownCommand : "અજાણયો કમાનà«àª¡ \"%1\"", -NotImplemented : "કમાનà«àª¡ ઇમà«àªªà«àª²àª¿àª®àª¨à«àªŸ નથી કરોયો", -UnknownToolbarSet : "ટૂલબાર સેટ \"%1\" ઉપલબà«àª§ નથી", -NoActiveX : "તમારા બà«àª°àª¾àª‰àªàª°àª¨à«€ સà«àª°àª•à«àª·àª¾ સેટિંગસ àªàª¡àª¿àªŸàª°àª¨àª¾ અમà«àª• ફીચરને પરવાનગી આપતી નથી. કૃપયા \"Run ActiveX controls and plug-ins\" વિકલà«àªªàª¨à«‡ ઇનેબલ/સમરà«àª¥ કરો. તમારા બà«àª°àª¾àª‰àªàª°àª®àª¾àª‚ àªàª°àª° ઇનà«àªµàª¿àªàª¿àª¬àª² ફીચરનો અનà«àª­àªµ થઈ શકે છે. કૃપયા પૉપ-અપ બà«àª²à«‰àª•ર ડિસેબલ કરો.", -BrowseServerBlocked : "રિસૉરà«àª¸ બà«àª°àª¾àª‰àªàª° ખોલી ન સકાયà«àª‚.", -DialogBlocked : "ડાયલૉગ વિનà«àª¡à«‹ ખોલી ન સકાયà«àª‚. કૃપયા પૉપ-અપ બà«àª²à«‰àª•ર ડિસેબલ કરો.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "ઠીક છે", -DlgBtnCancel : "રદ કરવà«àª‚", -DlgBtnClose : "બંધ કરવà«àª‚", -DlgBtnBrowseServer : "સરà«àªµàª° બà«àª°àª¾àª‰àª કરો", -DlgAdvancedTag : "અડà«àªµàª¾àª¨à«àª¸àª¡", -DlgOpOther : "<અનà«àª¯>", -DlgInfoTab : "સૂચના", -DlgAlertUrl : "URL ઇનà«àª¸àª°à«àªŸ કરો", - -// General Dialogs Labels -DlgGenNotSet : "<સેટ નથી>", -DlgGenId : "Id", -DlgGenLangDir : "ભાષા લેખવાની પદà«àª§àª¤àª¿", -DlgGenLangDirLtr : "ડાબે થી જમણે (LTR)", -DlgGenLangDirRtl : "જમણે થી ડાબે (RTL)", -DlgGenLangCode : "ભાષા કોડ", -DlgGenAccessKey : "àªàª•à«àª¸à«‡àª¸ કી", -DlgGenName : "નામ", -DlgGenTabIndex : "ટૅબ ઇનà«àª¡à«‡àª•à«àª¸", -DlgGenLongDescr : "વધારે માહિતી માટે URL", -DlgGenClass : "સà«àªŸàª¾àª‡àª²-શીટ કà«àª²àª¾àª¸", -DlgGenTitle : "મà«àª–à«àª¯ મથાળà«àª‚", -DlgGenContType : "મà«àª–à«àª¯ કનà«àªŸà«‡àª¨à«àªŸ પà«àª°àª•ાર", -DlgGenLinkCharset : "લિંક રિસૉરà«àª¸ કૅરિકà«àªŸàª° સેટ", -DlgGenStyle : "સà«àªŸàª¾àª‡àª²", - -// Image Dialog -DlgImgTitle : "ચિતà«àª°àª¨àª¾ ગà«àª£", -DlgImgInfoTab : "ચિતà«àª° ની જાણકારી", -DlgImgBtnUpload : "આ સરà«àªµàª°àª¨à«‡ મોકલવà«àª‚", -DlgImgURL : "URL", -DlgImgUpload : "અપલોડ", -DlgImgAlt : "ઑલà«àªŸàª°à«àª¨àªŸ ટેકà«àª¸à«àªŸ", -DlgImgWidth : "પહોળાઈ", -DlgImgHeight : "ઊંચાઈ", -DlgImgLockRatio : "લૉક ગà«àª£à«‹àª¤à«àª¤àª°", -DlgBtnResetSize : "રીસેટ સાઇàª", -DlgImgBorder : "બોરà«àª¡àª°", -DlgImgHSpace : "સમસà«àª¤àª°à«€àª¯ જગà«àª¯àª¾", -DlgImgVSpace : "લંબરૂપ જગà«àª¯àª¾", -DlgImgAlign : "લાઇનદોરીમાં ગોઠવવà«àª‚", -DlgImgAlignLeft : "ડાબી બાજૠગોઠવવà«àª‚", -DlgImgAlignAbsBottom: "Abs નીચે", -DlgImgAlignAbsMiddle: "Abs ઉપર", -DlgImgAlignBaseline : "આધાર લીટી", -DlgImgAlignBottom : "નીચે", -DlgImgAlignMiddle : "વચà«àªšà«‡", -DlgImgAlignRight : "જમણી", -DlgImgAlignTextTop : "ટેકà«àª¸à«àªŸ ઉપર", -DlgImgAlignTop : "ઉપર", -DlgImgPreview : "પૂરà«àªµàª¦àª°à«àª¶àª¨", -DlgImgAlertUrl : "ચિતà«àª°àª¨à«€ URL ટાઇપ કરો", -DlgImgLinkTab : "લિંક", - -// Flash Dialog -DlgFlashTitle : "ફà«àª²à«…શ ગà«àª£", -DlgFlashChkPlay : "ઑટો/સà«àªµàª¯àª‚ પà«àª²à«‡", -DlgFlashChkLoop : "લૂપ", -DlgFlashChkMenu : "ફà«àª²à«…શ મેનà«àª¯à«‚ નો પà«àª°àª¯à«‹àª— કરો", -DlgFlashScale : "સà«àª•ેલ", -DlgFlashScaleAll : "સà«àª•ેલ ઓલ/બધૠબતાવો", -DlgFlashScaleNoBorder : "સà«àª•ેલ બોરà«àª¡àª° વગર", -DlgFlashScaleFit : "સà«àª•ેલ àªàª•દમ ફીટ", - -// Link Dialog -DlgLnkWindowTitle : "લિંક", -DlgLnkInfoTab : "લિંક ઇનà«àª«à«‰ ટૅબ", -DlgLnkTargetTab : "ટારà«àª—ેટ/લકà«àª·à«àª¯ ટૅબ", - -DlgLnkType : "લિંક પà«àª°àª•ાર", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "આ પેજનો àªàª‚કર", -DlgLnkTypeEMail : "ઈ-મેલ", -DlgLnkProto : "પà«àª°à«‹àªŸà«‹àª•ૉલ", -DlgLnkProtoOther : "<અનà«àª¯>", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "àªàª‚કર પસંદ કરો", -DlgLnkAnchorByName : "àªàª‚કર નામથી પસંદ કરો", -DlgLnkAnchorById : "àªàª‚કર àªàª²àª¿àª®àª¨à«àªŸ Id થી પસંદ કરો", -DlgLnkNoAnchors : "(ડૉકà«àª¯à«àª®àª¨à«àªŸàª®àª¾àª‚ àªàª‚કરની સંખà«àª¯àª¾)", -DlgLnkEMail : "ઈ-મેલ સરનામà«àª‚", -DlgLnkEMailSubject : "ઈ-મેલ વિષય", -DlgLnkEMailBody : "સંદેશ", -DlgLnkUpload : "અપલોડ", -DlgLnkBtnUpload : "આ સરà«àªµàª°àª¨à«‡ મોકલવà«àª‚", - -DlgLnkTarget : "ટારà«àª—ેટ/લકà«àª·à«àª¯", -DlgLnkTargetFrame : "<ફà«àª°à«‡àª®>", -DlgLnkTargetPopup : "<પૉપ-અપ વિનà«àª¡à«‹>", -DlgLnkTargetBlank : "નવી વિનà«àª¡à«‹ (_blank)", -DlgLnkTargetParent : "મૂળ વિનà«àª¡à«‹ (_parent)", -DlgLnkTargetSelf : "આજ વિનà«àª¡à«‹ (_self)", -DlgLnkTargetTop : "ઉપરની વિનà«àª¡à«‹ (_top)", -DlgLnkTargetFrameName : "ટારà«àª—ેટ ફà«àª°à«‡àª® નà«àª‚ નામ", -DlgLnkPopWinName : "પૉપ-અપ વિનà«àª¡à«‹ નà«àª‚ નામ", -DlgLnkPopWinFeat : "પૉપ-અપ વિનà«àª¡à«‹ ફીચરસૅ", -DlgLnkPopResize : "સાઇઠબદલી સકાય છે", -DlgLnkPopLocation : "લોકેશન બાર", -DlgLnkPopMenu : "મેનà«àª¯à«‚ બાર", -DlgLnkPopScroll : "સà«àª•à«àª°à«‹àª² બાર", -DlgLnkPopStatus : "સà«àªŸà«…ટસ બાર", -DlgLnkPopToolbar : "ટૂલ બાર", -DlgLnkPopFullScrn : "ફà«àª² સà«àª•à«àª°à«€àª¨ (IE)", -DlgLnkPopDependent : "ડિપેનà«àª¡àª¨à«àªŸ (Netscape)", -DlgLnkPopWidth : "પહોળાઈ", -DlgLnkPopHeight : "ઊંચાઈ", -DlgLnkPopLeft : "ડાબી બાજà«", -DlgLnkPopTop : "જમણી બાજà«", - -DlnLnkMsgNoUrl : "લિંક URL ટાઇપ કરો", -DlnLnkMsgNoEMail : "ઈ-મેલ સરનામà«àª‚ ટાઇપ કરો", -DlnLnkMsgNoAnchor : "àªàª‚કર પસંદ કરો", -DlnLnkMsgInvPopName : "પૉપ-અપ વિનà«àª¡à«‹ નà«àª‚ નામ àªàª²à«àª«àª¬à«‡àªŸàª¥à«€ શરૂ કરવો અને તેમાં સà«àªªà«‡àª‡àª¸ ન હોવી જોઈàª", - -// Color Dialog -DlgColorTitle : "રંગ પસંદ કરો", -DlgColorBtnClear : "સાફ કરો", -DlgColorHighlight : "હાઈલાઇટ", -DlgColorSelected : "સિલેકà«àªŸà«‡àª¡/પસંદ કરવà«àª‚", - -// Smiley Dialog -DlgSmileyTitle : "સà«àª®àª¾àª‡àª²à«€ પસંદ કરો", - -// Special Character Dialog -DlgSpecialCharTitle : "સà«àªªà«‡àª¶àª¿àª…લ વિશિષà«àªŸ અકà«àª·àª° પસંદ કરો", - -// Table Dialog -DlgTableTitle : "ટેબલ, કોઠાનà«àª‚ મથાળà«àª‚", -DlgTableRows : "પંકà«àª¤àª¿àª¨àª¾ ખાના", -DlgTableColumns : "કૉલમ/ઊભી કટાર", -DlgTableBorder : "કોઠાની બાજà«(બોરà«àª¡àª°) સાઇàª", -DlgTableAlign : "અલાઇનમનà«àªŸ/ગોઠવાયેલà«àª‚ ", -DlgTableAlignNotSet : "<સેટ નથી>", -DlgTableAlignLeft : "ડાબી બાજà«", -DlgTableAlignCenter : "મધà«àª¯ સેનà«àªŸàª°", -DlgTableAlignRight : "જમણી બાજà«", -DlgTableWidth : "પહોળાઈ", -DlgTableWidthPx : "પિકસલ", -DlgTableWidthPc : "પà«àª°àª¤àª¿àª¶àª¤", -DlgTableHeight : "ઊંચાઈ", -DlgTableCellSpace : "સેલ અંતર", -DlgTableCellPad : "સેલ પૅડિંગ", -DlgTableCaption : "મથાળà«àª‚/કૅપà«àª¶àª¨ ", -DlgTableSummary : "ટૂંકો àªàª¹à«‡àªµàª¾àª²", - -// Table Cell Dialog -DlgCellTitle : "પંકà«àª¤àª¿àª¨àª¾ ખાનાના ગà«àª£", -DlgCellWidth : "પહોળાઈ", -DlgCellWidthPx : "પિકસલ", -DlgCellWidthPc : "પà«àª°àª¤àª¿àª¶àª¤", -DlgCellHeight : "ઊંચાઈ", -DlgCellWordWrap : "વરà«àª¡ રૅપ", -DlgCellWordWrapNotSet : "<સેટ નથી>", -DlgCellWordWrapYes : "હા", -DlgCellWordWrapNo : "ના", -DlgCellHorAlign : "સમસà«àª¤àª°à«€àª¯ ગોઠવવà«àª‚", -DlgCellHorAlignNotSet : "<સેટ નથી>", -DlgCellHorAlignLeft : "ડાબી બાજà«", -DlgCellHorAlignCenter : "મધà«àª¯ સેનà«àªŸàª°", -DlgCellHorAlignRight: "જમણી બાજà«", -DlgCellVerAlign : "લંબરૂપ ગોઠવવà«àª‚", -DlgCellVerAlignNotSet : "<સેટ નથી>", -DlgCellVerAlignTop : "ઉપર", -DlgCellVerAlignMiddle : "મધà«àª¯ સેનà«àªŸàª°", -DlgCellVerAlignBottom : "નીચે", -DlgCellVerAlignBaseline : "મૂળ રેખા", -DlgCellRowSpan : "પંકà«àª¤àª¿ સà«àªªàª¾àª¨", -DlgCellCollSpan : "કૉલમ/ઊભી કટાર સà«àªªàª¾àª¨", -DlgCellBackColor : "બૅકગà«àª°àª¾àª‰àª¨à«àª¡ રંગ", -DlgCellBorderColor : "બોરà«àª¡àª°àª¨à«‹ રંગ", -DlgCellBtnSelect : "પસંદ કરો...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "શોધવà«àª‚ અને બદલવà«àª‚", - -// Find Dialog -DlgFindTitle : "શોધવà«àª‚", -DlgFindFindBtn : "શોધવà«àª‚", -DlgFindNotFoundMsg : "તમે શોધેલી ટેકà«àª¸à«àªŸ નથી મળી", - -// Replace Dialog -DlgReplaceTitle : "બદલવà«àª‚", -DlgReplaceFindLbl : "આ શોધો", -DlgReplaceReplaceLbl : "આનાથી બદલો", -DlgReplaceCaseChk : "કેસ સરખા રાખો", -DlgReplaceReplaceBtn : "બદલવà«àª‚", -DlgReplaceReplAllBtn : "બઘા બદલી ", -DlgReplaceWordChk : "બઘા શબà«àª¦ સરખા રાખો", - -// Paste Operations / Dialog -PasteErrorCut : "તમારા બà«àª°àª¾àª‰àªàª° ની સà«àª°àª•à«àª·àª¿àª¤ સેટિંગસ કટ કરવાની પરવાનગી નથી આપતી. (Ctrl+X) નો ઉપયોગ કરો.", -PasteErrorCopy : "તમારા બà«àª°àª¾àª‰àªàª° ની સà«àª°àª•à«àª·àª¿àª¤ સેટિંગસ કોપી કરવાની પરવાનગી નથી આપતી. (Ctrl+C) का पà¥à¤°à¤¯à¥‹à¤— करें।", - -PasteAsText : "પેસà«àªŸ (ટેકà«àª¸à«àªŸ)", -PasteFromWord : "પેસà«àªŸ (વરà«àª¡ થી)", - -DlgPasteMsg2 : "Ctrl+V નો પà«àª°àª¯à«‹àª— કરી પેસà«àªŸ કરો", -DlgPasteSec : "તમારા બà«àª°àª¾àª‰àªàª° ની સà«àª°àª•à«àª·àª¿àª¤ સેટિંગસના કારણે,àªàª¡àª¿àªŸàª° તમારા કિલà«àªªàª¬à«‹àª°à«àª¡ ડેટા ને કોપી નથી કરી શકતો. તમારે આ વિનà«àª¡à«‹àª®àª¾àª‚ ફરીથી પેસà«àªŸ કરવà«àª‚ પડશે.", -DlgPasteIgnoreFont : "ફૉનà«àªŸàª«à«‡àª¸ વà«àª¯àª¾àª–à«àª¯àª¾àª¨à«€ અવગણના", -DlgPasteRemoveStyles : "સà«àªŸàª¾àª‡àª² વà«àª¯àª¾àª–à«àª¯àª¾ કાઢી નાખવી", - -// Color Picker -ColorAutomatic : "સà«àªµàªšàª¾àª²àª¿àª¤", -ColorMoreColors : "ઔર રંગ...", - -// Document Properties -DocProps : "ડૉકà«àª¯à«àª®àª¨à«àªŸ ગà«àª£/પà«àª°à«‰àªªàª°à«àªŸàª¿àª", - -// Anchor Dialog -DlgAnchorTitle : "àªàª‚કર ગà«àª£/પà«àª°à«‰àªªàª°à«àªŸàª¿àª", -DlgAnchorName : "àªàª‚કરનà«àª‚ નામ", -DlgAnchorErrorName : "àªàª‚કરનà«àª‚ નામ ટાઈપ કરો", - -// Speller Pages Dialog -DlgSpellNotInDic : "શબà«àª¦àª•ોશમાં નથી", -DlgSpellChangeTo : "આનાથી બદલવà«àª‚", -DlgSpellBtnIgnore : "ઇગà«àª¨à«‹àª°/અવગણના કરવી", -DlgSpellBtnIgnoreAll : "બધાની ઇગà«àª¨à«‹àª°/અવગણના કરવી", -DlgSpellBtnReplace : "બદલવà«àª‚", -DlgSpellBtnReplaceAll : "બધા બદલી કરો", -DlgSpellBtnUndo : "અનà«àª¡à«‚", -DlgSpellNoSuggestions : "- કઇ સજેશન નથી -", -DlgSpellProgress : "શબà«àª¦àª¨à«€ જોડણી/સà«àªªà«‡àª² ચેક ચાલૠછે...", -DlgSpellNoMispell : "શબà«àª¦àª¨à«€ જોડણી/સà«àªªà«‡àª² ચેક પૂરà«àª£: ખોટી જોડણી મળી નથી", -DlgSpellNoChanges : "શબà«àª¦àª¨à«€ જોડણી/સà«àªªà«‡àª² ચેક પૂરà«àª£: àªàª•પણ શબà«àª¦ બદલયો નથી", -DlgSpellOneChange : "શબà«àª¦àª¨à«€ જોડણી/સà«àªªà«‡àª² ચેક પૂરà«àª£: àªàª• શબà«àª¦ બદલયો છે", -DlgSpellManyChanges : "શબà«àª¦àª¨à«€ જોડણી/સà«àªªà«‡àª² ચેક પૂરà«àª£: %1 શબà«àª¦ બદલયા છે", - -IeSpellDownload : "સà«àªªà«‡àª²-ચેકર ઇનà«àª¸à«àªŸà«‹àª² નથી. શà«àª‚ તમે ડાઉનલોડ કરવા માંગો છો?", - -// Button Dialog -DlgButtonText : "ટેકà«àª¸à«àªŸ (વૅલà«àª¯à«‚)", -DlgButtonType : "પà«àª°àª•ાર", -DlgButtonTypeBtn : "બટન", -DlgButtonTypeSbm : "સબà«àª®àª¿àªŸ", -DlgButtonTypeRst : "રિસેટ", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "નામ", -DlgCheckboxValue : "વૅલà«àª¯à«‚", -DlgCheckboxSelected : "સિલેકà«àªŸà«‡àª¡", - -// Form Dialog -DlgFormName : "નામ", -DlgFormAction : "કà«àª°àª¿àª¯àª¾", -DlgFormMethod : "પદà«àª§àª¤àª¿", - -// Select Field Dialog -DlgSelectName : "નામ", -DlgSelectValue : "વૅલà«àª¯à«‚", -DlgSelectSize : "સાઇàª", -DlgSelectLines : "લીટીઓ", -DlgSelectChkMulti : "àªàª•થી વધારે પસંદ કરી શકો", -DlgSelectOpAvail : "ઉપલબà«àª§ વિકલà«àªª", -DlgSelectOpText : "ટેકà«àª¸à«àªŸ", -DlgSelectOpValue : "વૅલà«àª¯à«‚", -DlgSelectBtnAdd : "ઉમેરવà«àª‚", -DlgSelectBtnModify : "બદલવà«àª‚", -DlgSelectBtnUp : "ઉપર", -DlgSelectBtnDown : "નીચે", -DlgSelectBtnSetValue : "પસંદ કરલી વૅલà«àª¯à«‚ સેટ કરો", -DlgSelectBtnDelete : "રદ કરવà«àª‚", - -// Textarea Dialog -DlgTextareaName : "નામ", -DlgTextareaCols : "કૉલમ/ઊભી કટાર", -DlgTextareaRows : "પંકà«àª¤àª¿àª“", - -// Text Field Dialog -DlgTextName : "નામ", -DlgTextValue : "વૅલà«àª¯à«‚", -DlgTextCharWidth : "કેરેકà«àªŸàª°àª¨à«€ પહોળાઈ", -DlgTextMaxChars : "અધિકતમ કેરેકà«àªŸàª°", -DlgTextType : "ટાઇપ", -DlgTextTypeText : "ટેકà«àª¸à«àªŸ", -DlgTextTypePass : "પાસવરà«àª¡", - -// Hidden Field Dialog -DlgHiddenName : "નામ", -DlgHiddenValue : "વૅલà«àª¯à«‚", - -// Bulleted List Dialog -BulletedListProp : "બà«àª²à«‡àªŸ સૂચિ ગà«àª£", -NumberedListProp : "સંખà«àª¯àª¾àª‚કà«àª¤àª¿ સૂચિ ગà«àª£", -DlgLstStart : "શરૂઆતથી", -DlgLstType : "પà«àª°àª•ાર", -DlgLstTypeCircle : "વરà«àª¤à«àª³", -DlgLstTypeDisc : "ડિસà«àª•", -DlgLstTypeSquare : "ચોરસ", -DlgLstTypeNumbers : "સંખà«àª¯àª¾ (1, 2, 3)", -DlgLstTypeLCase : "નાના અકà«àª·àª° (a, b, c)", -DlgLstTypeUCase : "મોટા અકà«àª·àª° (A, B, C)", -DlgLstTypeSRoman : "નાના રોમન આંક (i, ii, iii)", -DlgLstTypeLRoman : "મોટા રોમન આંક (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "સાધારણ", -DlgDocBackTab : "બૅકગà«àª°àª¾àª‰àª¨à«àª¡", -DlgDocColorsTab : "રંગ અને મારà«àªœàª¿àª¨/કિનાર", -DlgDocMetaTab : "મેટાડૅટા", - -DlgDocPageTitle : "પેજ મથાળà«àª‚/ટાઇટલ", -DlgDocLangDir : "ભાષા લેખવાની પદà«àª§àª¤àª¿", -DlgDocLangDirLTR : "ડાબે થી જમણે (LTR)", -DlgDocLangDirRTL : "જમણે થી ડાબે (RTL)", -DlgDocLangCode : "ભાષા કોડ", -DlgDocCharSet : "કેરેકà«àªŸàª° સેટ àªàª¨à«àª•ોડિંગ", -DlgDocCharSetCE : "મધà«àª¯ યà«àª°à«‹àªªàª¿àª…ન (Central European)", -DlgDocCharSetCT : "ચાઇનીઠ(Chinese Traditional Big5)", -DlgDocCharSetCR : "સિરીલિક (Cyrillic)", -DlgDocCharSetGR : "ગà«àª°à«€àª• (Greek)", -DlgDocCharSetJP : "જાપાનિઠ(Japanese)", -DlgDocCharSetKR : "કોરીયન (Korean)", -DlgDocCharSetTR : "ટરà«àª•િ (Turkish)", -DlgDocCharSetUN : "યૂનિકોડ (UTF-8)", -DlgDocCharSetWE : "પશà«àªšàª¿àª® યà«àª°à«‹àªªàª¿àª…ન (Western European)", -DlgDocCharSetOther : "અનà«àª¯ કેરેકà«àªŸàª° સેટ àªàª¨à«àª•ોડિંગ", - -DlgDocDocType : "ડૉકà«àª¯à«àª®àª¨à«àªŸ પà«àª°àª•ાર શીરà«àª·àª•", -DlgDocDocTypeOther : "અનà«àª¯ ડૉકà«àª¯à«àª®àª¨à«àªŸ પà«àª°àª•ાર શીરà«àª·àª•", -DlgDocIncXHTML : "XHTML સૂચના સમાવિષà«àªŸ કરવી", -DlgDocBgColor : "બૅકગà«àª°àª¾àª‰àª¨à«àª¡ રંગ", -DlgDocBgImage : "બૅકગà«àª°àª¾àª‰àª¨à«àª¡ ચિતà«àª° URL", -DlgDocBgNoScroll : "સà«àª•à«àª°à«‹àª² ન થાય તેવà«àª‚ બૅકગà«àª°àª¾àª‰àª¨à«àª¡", -DlgDocCText : "ટેકà«àª¸à«àªŸ", -DlgDocCLink : "લિંક", -DlgDocCVisited : "વિàªàª¿àªŸà«‡àª¡ લિંક", -DlgDocCActive : "સકà«àª°àª¿àª¯ લિંક", -DlgDocMargins : "પેજ મારà«àªœàª¿àª¨", -DlgDocMaTop : "ઉપર", -DlgDocMaLeft : "ડાબી", -DlgDocMaRight : "જમણી", -DlgDocMaBottom : "નીચે", -DlgDocMeIndex : "ડૉકà«àª¯à«àª®àª¨à«àªŸ ઇનà«àª¡à«‡àª•à«àª¸ સંકેતશબà«àª¦ (અલà«àªªàªµàª¿àª°àª¾àª® (,) થી અલગ કરો)", -DlgDocMeDescr : "ડૉકà«àª¯à«àª®àª¨à«àªŸ વરà«àª£àª¨", -DlgDocMeAuthor : "લેખક", -DlgDocMeCopy : "કૉપિરાઇટ", -DlgDocPreview : "પૂરà«àªµàª¦àª°à«àª¶àª¨", - -// Templates Dialog -Templates : "ટેમà«àªªà«àª²à«‡àªŸ", -DlgTemplatesTitle : "કનà«àªŸà«‡àª¨à«àªŸ ટેમà«àªªà«àª²à«‡àªŸ", -DlgTemplatesSelMsg : "àªàª¡àª¿àªŸàª°àª®àª¾àª‚ ઓપન કરવા ટેમà«àªªà«àª²à«‡àªŸ પસંદ કરો (વરà«àª¤àª®àª¾àª¨ કનà«àªŸà«‡àª¨à«àªŸ સેવ નહીં થાય):", -DlgTemplatesLoading : "ટેમà«àªªà«àª²à«‡àªŸ સૂચિ લોડ થાય છે. રાહ જà«àª“...", -DlgTemplatesNoTpl : "(કોઈ ટેમà«àªªà«àª²à«‡àªŸ ડિફાઇન નથી)", -DlgTemplatesReplace : "મૂળ શબà«àª¦àª¨à«‡ બદલો", - -// About Dialog -DlgAboutAboutTab : "FCKEditor ના વિષે", -DlgAboutBrowserInfoTab : "બà«àª°àª¾àª‰àªàª° ના વિષે", -DlgAboutLicenseTab : "લાઇસનà«àª¸", -DlgAboutVersion : "વરà«àªàª¨", -DlgAboutInfo : "વધારે માહિતી માટે:", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/he.js b/fckeditor/editor/lang/he.js deleted file mode 100644 index 63cf9766..00000000 --- a/fckeditor/editor/lang/he.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Hebrew language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "rtl", - -ToolbarCollapse : "כיווץ סרגל הכלי×", -ToolbarExpand : "פתיחת סרגל הכלי×", - -// Toolbar Items and Context Menu -Save : "שמירה", -NewPage : "דף חדש", -Preview : "תצוגה מקדימה", -Cut : "גזירה", -Copy : "העתקה", -Paste : "הדבקה", -PasteText : "הדבקה כטקסט פשוט", -PasteWord : "הדבקה מ-וורד", -Print : "הדפסה", -SelectAll : "בחירת הכל", -RemoveFormat : "הסרת העיצוב", -InsertLinkLbl : "קישור", -InsertLink : "הוספת/עריכת קישור", -RemoveLink : "הסרת הקישור", -VisitLink : "פתח קישור", -Anchor : "הוספת/עריכת נקודת עיגון", -AnchorDelete : "הסר נקודת עיגון", -InsertImageLbl : "תמונה", -InsertImage : "הוספת/עריכת תמונה", -InsertFlashLbl : "פל×ש", -InsertFlash : "הוסף/ערוך פל×ש", -InsertTableLbl : "טבלה", -InsertTable : "הוספת/עריכת טבלה", -InsertLineLbl : "קו", -InsertLine : "הוספת קו ×ופקי", -InsertSpecialCharLbl: "תו מיוחד", -InsertSpecialChar : "הוספת תו מיוחד", -InsertSmileyLbl : "סמיילי", -InsertSmiley : "הוספת סמיילי", -About : "×ודות FCKeditor", -Bold : "מודגש", -Italic : "נטוי", -Underline : "קו תחתון", -StrikeThrough : "כתיב מחוק", -Subscript : "כתיב תחתון", -Superscript : "כתיב עליון", -LeftJustify : "יישור לשמ×ל", -CenterJustify : "מרכוז", -RightJustify : "יישור לימין", -BlockJustify : "יישור לשוליי×", -DecreaseIndent : "הקטנת ×ינדנטציה", -IncreaseIndent : "הגדלת ×ינדנטציה", -Blockquote : "בלוק ציטוט", -CreateDiv : "צור מיכל(תג)DIV", -EditDiv : "ערוך מיכל (תג)DIV", -DeleteDiv : "הסר מיכל(תג) DIV", -Undo : "ביטול צעד ×חרון", -Redo : "חזרה על צעד ×חרון", -NumberedListLbl : "רשימה ממוספרת", -NumberedList : "הוספת/הסרת רשימה ממוספרת", -BulletedListLbl : "רשימת נקודות", -BulletedList : "הוספת/הסרת רשימת נקודות", -ShowTableBorders : "הצגת מסגרת הטבלה", -ShowDetails : "הצגת פרטי×", -Style : "סגנון", -FontFormat : "עיצוב", -Font : "גופן", -FontSize : "גודל", -TextColor : "צבע טקסט", -BGColor : "צבע רקע", -Source : "מקור", -Find : "חיפוש", -Replace : "החלפה", -SpellCheck : "בדיקת ×יות", -UniversalKeyboard : "מקלדת ×וניברסלית", -PageBreakLbl : "שבירת דף", -PageBreak : "הוסף שבירת דף", - -Form : "טופס", -Checkbox : "תיבת סימון", -RadioButton : "לחצן ×פשרויות", -TextField : "שדה טקסט", -Textarea : "×יזור טקסט", -HiddenField : "שדה חבוי", -Button : "כפתור", -SelectionField : "שדה בחירה", -ImageButton : "כפתור תמונה", - -FitWindow : "הגדל ×ת גודל העורך", -ShowBlocks : "הצג בלוקי×", - -// Context Menu -EditLink : "עריכת קישור", -CellCM : "ת×", -RowCM : "שורה", -ColumnCM : "עמודה", -InsertRowAfter : "הוסף שורה ×חרי", -InsertRowBefore : "הוסף שורה לפני", -DeleteRows : "מחיקת שורות", -InsertColumnAfter : "הוסף עמודה ×חרי", -InsertColumnBefore : "הוסף עמודה לפני", -DeleteColumns : "מחיקת עמודות", -InsertCellAfter : "הוסף ×ª× ×חרי", -InsertCellBefore : "הוסף ×ª× ×חרי", -DeleteCells : "מחיקת ת××™×", -MergeCells : "מיזוג ת××™×", -MergeRight : "מזג ימינה", -MergeDown : "מזג למטה", -HorizontalSplitCell : "פצל ×ª× ×ופקית", -VerticalSplitCell : "פצל ×ª× ×נכית", -TableDelete : "מחק טבלה", -CellProperties : "תכונות הת×", -TableProperties : "תכונות הטבלה", -ImageProperties : "תכונות התמונה", -FlashProperties : "מ×פייני פל×ש", - -AnchorProp : "מ×פייני נקודת עיגון", -ButtonProp : "מ×פייני כפתור", -CheckboxProp : "מ×פייני תיבת סימון", -HiddenFieldProp : "מ×פיני שדה חבוי", -RadioButtonProp : "מ×פייני לחצן ×פשרויות", -ImageButtonProp : "מ×פיני כפתור תמונה", -TextFieldProp : "מ×פייני שדה טקסט", -SelectionFieldProp : "מ×פייני שדה בחירה", -TextareaProp : "מ×פיני ×יזור טקסט", -FormProp : "מ×פיני טופס", - -FontFormats : "נורמלי;קוד;כתובת;כותרת;כותרת 2;כותרת 3;כותרת 4;כותרת 5;כותרת 6", - -// Alerts and Messages -ProcessingXHTML : "מעבד XHTML, × × ×œ×”×ž×ª×™×Ÿ...", -Done : "המשימה הושלמה", -PasteWordConfirm : "נר××” הטקסט שבכוונתך להדביק מקורו בקובץ וורד. ×”×× ×‘×¨×¦×•× ×š לנקות ×ותו ×˜×¨× ×”×”×“×‘×§×”?", -NotCompatiblePaste : "פעולה זו זמינה לדפדפן ×ינטרנט ×קספלורר ×ž×’×™×¨×¡× 5.5 ומעלה. ×”×× ×œ×”×ž×©×™×š בהדבקה ×œ×œ× ×”× ×™×§×•×™?", -UnknownToolbarItem : "פריט ×œ× ×™×“×•×¢ בסרגל ×”×›×œ×™× \"%1\"", -UnknownCommand : "×©× ×¤×¢×•×œ×” ×œ× ×™×“×•×¢ \"%1\"", -NotImplemented : "הפקודה ×œ× ×ž×™×•×©×ž×ª", -UnknownToolbarSet : "ערכת סרגל ×”×›×œ×™× \"%1\" ×œ× ×§×™×™×ž×ª", -NoActiveX : "הגדרות ×בטחה של הדפדפן עלולות לגביל ×ת ×פשרויות העריכה.יש ל×פשר ×ת ×”×ופציה \"הרץ ×¤×§×“×™× ×¤×¢×™×œ×™× ×•×ª×•×¡×¤×•×ª\". תוכל לחוות טעויות ×•×—×™×•×•×™× ×©×œ ×פשרויות שחסרי×.", -BrowseServerBlocked : "×œ× × ×™×ª×Ÿ לגשת לדפדפן מש×בי×.×× × ×•×•×“× ×©×—×•×¡× ×—×œ×•× ×•×ª ×”×§×•×¤×¦×™× ×œ× ×¤×¢×™×œ.", -DialogBlocked : "×œ× ×”×™×” ניתן לפתוח חלון די×לוג. ×× × ×•×•×“× ×©×—×•×¡× ×—×œ×•× ×•×ª ×§×•×¤×¦×™× ×œ× ×¤×¢×™×œ.", -VisitLinkBlocked : "×œ× × ×™×ª×Ÿ לפתוח חלון חדש.× × ×œ×•×•×“× ×©×—×•×¡×ž×™ החלונות ×”×§×•×¤×¦×™× ×œ× ×¤×¢×™×œ×™×.", - -// Dialogs -DlgBtnOK : "×ישור", -DlgBtnCancel : "ביטול", -DlgBtnClose : "סגירה", -DlgBtnBrowseServer : "סייר השרת", -DlgAdvancedTag : "×פשרויות מתקדמות", -DlgOpOther : "<×חר>", -DlgInfoTab : "מידע", -DlgAlertUrl : "×× × ×”×–×Ÿ URL", - -// General Dialogs Labels -DlgGenNotSet : "<×œ× × ×§×‘×¢>", -DlgGenId : "זיהוי (Id)", -DlgGenLangDir : "כיוון שפה", -DlgGenLangDirLtr : "שמ×ל לימין (LTR)", -DlgGenLangDirRtl : "ימין לשמ×ל (RTL)", -DlgGenLangCode : "קוד שפה", -DlgGenAccessKey : "מקש גישה", -DlgGenName : "ש×", -DlgGenTabIndex : "מספר ט×ב", -DlgGenLongDescr : "קישור לתי×ור מפורט", -DlgGenClass : "גיליונות עיצוב קבוצות", -DlgGenTitle : "כותרת מוצעת", -DlgGenContType : "Content Type מוצע", -DlgGenLinkCharset : "קידוד המש×ב המקושר", -DlgGenStyle : "סגנון", - -// Image Dialog -DlgImgTitle : "תכונות התמונה", -DlgImgInfoTab : "מידע על התמונה", -DlgImgBtnUpload : "שליחה לשרת", -DlgImgURL : "כתובת (URL)", -DlgImgUpload : "העל××”", -DlgImgAlt : "טקסט חלופי", -DlgImgWidth : "רוחב", -DlgImgHeight : "גובה", -DlgImgLockRatio : "נעילת היחס", -DlgBtnResetSize : "×יפוס הגודל", -DlgImgBorder : "מסגרת", -DlgImgHSpace : "מרווח ×ופקי", -DlgImgVSpace : "מרווח ×× ×›×™", -DlgImgAlign : "יישור", -DlgImgAlignLeft : "לשמ×ל", -DlgImgAlignAbsBottom: "לתחתית ×”×בסולוטית", -DlgImgAlignAbsMiddle: "מרכוז ×בסולוטי", -DlgImgAlignBaseline : "לקו התחתית", -DlgImgAlignBottom : "לתחתית", -DlgImgAlignMiddle : "ל×מצע", -DlgImgAlignRight : "לימין", -DlgImgAlignTextTop : "לר×ש הטקסט", -DlgImgAlignTop : "למעלה", -DlgImgPreview : "תצוגה מקדימה", -DlgImgAlertUrl : "× × ×œ×”×§×œ×™×“ ×ת כתובת התמונה", -DlgImgLinkTab : "קישור", - -// Flash Dialog -DlgFlashTitle : "מ×פיני פל×ש", -DlgFlashChkPlay : "נגן ×וטומטי", -DlgFlashChkLoop : "לול××”", -DlgFlashChkMenu : "×פשר תפריט פל×ש", -DlgFlashScale : "גודל", -DlgFlashScaleAll : "הצג הכל", -DlgFlashScaleNoBorder : "×œ×œ× ×’×‘×•×œ×•×ª", -DlgFlashScaleFit : "הת×מה מושלמת", - -// Link Dialog -DlgLnkWindowTitle : "קישור", -DlgLnkInfoTab : "מידע על הקישור", -DlgLnkTargetTab : "מטרה", - -DlgLnkType : "סוג קישור", -DlgLnkTypeURL : "כתובת (URL)", -DlgLnkTypeAnchor : "עוגן בעמוד ×–×”", -DlgLnkTypeEMail : "דו×''ל", -DlgLnkProto : "פרוטוקול", -DlgLnkProtoOther : "<×חר>", -DlgLnkURL : "כתובת (URL)", -DlgLnkAnchorSel : "בחירת עוגן", -DlgLnkAnchorByName : "עפ''×™ ×©× ×”×¢×•×’×Ÿ", -DlgLnkAnchorById : "עפ''×™ זיהוי (Id) הרכיב", -DlgLnkNoAnchors : "(×ין ×¢×•×’× ×™× ×–×ž×™× ×™× ×‘×“×£)", -DlgLnkEMail : "כתובת הדו×''ל", -DlgLnkEMailSubject : "× ×•×©× ×”×”×•×“×¢×”", -DlgLnkEMailBody : "גוף ההודעה", -DlgLnkUpload : "העל××”", -DlgLnkBtnUpload : "שליחה לשרת", - -DlgLnkTarget : "מטרה", -DlgLnkTargetFrame : "<מסגרת>", -DlgLnkTargetPopup : "<חלון קופץ>", -DlgLnkTargetBlank : "חלון חדש (_blank)", -DlgLnkTargetParent : "חלון ×”×ב (_parent)", -DlgLnkTargetSelf : "ב×ותו החלון (_self)", -DlgLnkTargetTop : "חלון ר×שי (_top)", -DlgLnkTargetFrameName : "×©× ×ž×¡×’×¨×ª היעד", -DlgLnkPopWinName : "×©× ×”×—×œ×•×Ÿ הקופץ", -DlgLnkPopWinFeat : "תכונות החלון הקופץ", -DlgLnkPopResize : "בעל גודל ניתן לשינוי", -DlgLnkPopLocation : "סרגל כתובת", -DlgLnkPopMenu : "סרגל תפריט", -DlgLnkPopScroll : "ניתן לגלילה", -DlgLnkPopStatus : "סרגל חיווי", -DlgLnkPopToolbar : "סרגל הכלי×", -DlgLnkPopFullScrn : "מסך ×ž×œ× (IE)", -DlgLnkPopDependent : "תלוי (Netscape)", -DlgLnkPopWidth : "רוחב", -DlgLnkPopHeight : "גובה", -DlgLnkPopLeft : "×ž×™×§×•× ×¦×“ שמ×ל", -DlgLnkPopTop : "×ž×™×§×•× ×¦×“ עליון", - -DlnLnkMsgNoUrl : "× × ×œ×”×§×œ×™×“ ×ת כתובת הקישור (URL)", -DlnLnkMsgNoEMail : "× × ×œ×”×§×œ×™×“ ×ת כתובת הדו×''ל", -DlnLnkMsgNoAnchor : "× × ×œ×‘×—×•×¨ עוגן במסמך", -DlnLnkMsgInvPopName : "×©× ×”×—×œ×•×Ÿ הקופץ חייב להתחיל ב×ותיות ו×סור לכלול רווחי×", - -// Color Dialog -DlgColorTitle : "בחירת צבע", -DlgColorBtnClear : "×יפוס", -DlgColorHighlight : "נוכחי", -DlgColorSelected : "נבחר", - -// Smiley Dialog -DlgSmileyTitle : "הוספת סמיילי", - -// Special Character Dialog -DlgSpecialCharTitle : "בחירת תו מיוחד", - -// Table Dialog -DlgTableTitle : "תכונות טבלה", -DlgTableRows : "שורות", -DlgTableColumns : "עמודות", -DlgTableBorder : "גודל מסגרת", -DlgTableAlign : "יישור", -DlgTableAlignNotSet : "<×œ× × ×§×‘×¢>", -DlgTableAlignLeft : "שמ×ל", -DlgTableAlignCenter : "מרכז", -DlgTableAlignRight : "ימין", -DlgTableWidth : "רוחב", -DlgTableWidthPx : "פיקסלי×", -DlgTableWidthPc : "×חוז", -DlgTableHeight : "גובה", -DlgTableCellSpace : "מרווח ת×", -DlgTableCellPad : "ריפוד ת×", -DlgTableCaption : "כיתוב", -DlgTableSummary : "סיכו×", - -// Table Cell Dialog -DlgCellTitle : "תכונות ת×", -DlgCellWidth : "רוחב", -DlgCellWidthPx : "פיקסלי×", -DlgCellWidthPc : "×חוז", -DlgCellHeight : "גובה", -DlgCellWordWrap : "גלילת שורות", -DlgCellWordWrapNotSet : "<×œ× × ×§×‘×¢>", -DlgCellWordWrapYes : "כן", -DlgCellWordWrapNo : "ל×", -DlgCellHorAlign : "יישור ×ופקי", -DlgCellHorAlignNotSet : "<×œ× × ×§×‘×¢>", -DlgCellHorAlignLeft : "שמ×ל", -DlgCellHorAlignCenter : "מרכז", -DlgCellHorAlignRight: "ימין", -DlgCellVerAlign : "יישור ×× ×›×™", -DlgCellVerAlignNotSet : "<×œ× × ×§×‘×¢>", -DlgCellVerAlignTop : "למעלה", -DlgCellVerAlignMiddle : "ל×מצע", -DlgCellVerAlignBottom : "לתחתית", -DlgCellVerAlignBaseline : "קו תחתית", -DlgCellRowSpan : "טווח שורות", -DlgCellCollSpan : "טווח עמודות", -DlgCellBackColor : "צבע רקע", -DlgCellBorderColor : "צבע מסגרת", -DlgCellBtnSelect : "בחירה...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "חפש והחלף", - -// Find Dialog -DlgFindTitle : "חיפוש", -DlgFindFindBtn : "חיפוש", -DlgFindNotFoundMsg : "הטקסט המבוקש ×œ× × ×ž×¦×.", - -// Replace Dialog -DlgReplaceTitle : "החלפה", -DlgReplaceFindLbl : "חיפוש מחרוזת:", -DlgReplaceReplaceLbl : "החלפה במחרוזת:", -DlgReplaceCaseChk : "הת×מת סוג ×ותיות (Case)", -DlgReplaceReplaceBtn : "החלפה", -DlgReplaceReplAllBtn : "החלפה בכל העמוד", -DlgReplaceWordChk : "הת×מה למילה המל××”", - -// Paste Operations / Dialog -PasteErrorCut : "הגדרות ×”×בטחה בדפדפן שלך ×œ× ×ž×פשרות לעורך לבצע פעולות גזירה ×וטומטיות. יש להשתמש במקלדת ×œ×©× ×›×š (Ctrl+X).", -PasteErrorCopy : "הגדרות ×”×בטחה בדפדפן שלך ×œ× ×ž×פשרות לעורך לבצע פעולות העתקה ×וטומטיות. יש להשתמש במקלדת ×œ×©× ×›×š (Ctrl+C).", - -PasteAsText : "הדבקה כטקסט פשוט", -PasteFromWord : "הדבקה מ-וורד", - -DlgPasteMsg2 : "×× × ×”×“×‘×§ בתוך הקופסה ב×מצעות (Ctrl+V) ולחץ על ×ישור.", -DlgPasteSec : "עקב הגדרות ×בטחה בדפדפן, ×œ× × ×™×ª×Ÿ לגשת ×ל לוח ×”×’×–×™×¨×™× (clipboard) בצורה ישירה.×× × ×‘×¦×¢ הדבק שוב בחלון ×–×”.", -DlgPasteIgnoreFont : "×”×ª×¢×œ× ×ž×”×’×“×¨×•×ª סוג פונט", -DlgPasteRemoveStyles : "הסר הגדרות סגנון", - -// Color Picker -ColorAutomatic : "×וטומטי", -ColorMoreColors : "×¦×‘×¢×™× × ×•×¡×¤×™×...", - -// Document Properties -DocProps : "מ×פיני מסמך", - -// Anchor Dialog -DlgAnchorTitle : "מ×פיני נקודת עיגון", -DlgAnchorName : "×©× ×œ× ×§×•×“×ª עיגון", -DlgAnchorErrorName : "×× × ×”×–×Ÿ ×©× ×œ× ×§×•×“×ª עיגון", - -// Speller Pages Dialog -DlgSpellNotInDic : "×œ× × ×ž×¦× ×‘×ž×™×œ×•×Ÿ", -DlgSpellChangeTo : "שנה ל", -DlgSpellBtnIgnore : "התעל×", -DlgSpellBtnIgnoreAll : "×”×ª×¢×œ× ×ž×”×›×œ", -DlgSpellBtnReplace : "החלף", -DlgSpellBtnReplaceAll : "החלף הכל", -DlgSpellBtnUndo : "החזר", -DlgSpellNoSuggestions : "- ×ין הצעות -", -DlgSpellProgress : "בדיקות ×יות בתהליך ....", -DlgSpellNoMispell : "בדיקות ×יות הסתיימה: ×œ× × ×ž×¦×ו שגיעות כתיב", -DlgSpellNoChanges : "בדיקות ×יות הסתיימה: ×œ× ×©×•× ×ª×” ××£ מילה", -DlgSpellOneChange : "בדיקות ×יות הסתיימה: שונתה מילה ×חת", -DlgSpellManyChanges : "בדיקות ×יות הסתיימה: %1 ×ž×™×œ×™× ×©×•× ×•", - -IeSpellDownload : "בודק ×”×יות ×œ× ×ž×•×ª×§×Ÿ, ×”×× ×תה מעוניין להוריד?", - -// Button Dialog -DlgButtonText : "טקסט (ערך)", -DlgButtonType : "סוג", -DlgButtonTypeBtn : "כפתור", -DlgButtonTypeSbm : "שלח", -DlgButtonTypeRst : "×פס", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "ש×", -DlgCheckboxValue : "ערך", -DlgCheckboxSelected : "בחור", - -// Form Dialog -DlgFormName : "ש×", -DlgFormAction : "שלח ×ל", -DlgFormMethod : "סוג שליחה", - -// Select Field Dialog -DlgSelectName : "ש×", -DlgSelectValue : "ערך", -DlgSelectSize : "גודל", -DlgSelectLines : "שורות", -DlgSelectChkMulti : "×פשר בחירות מרובות", -DlgSelectOpAvail : "×פשרויות זמינות", -DlgSelectOpText : "טקסט", -DlgSelectOpValue : "ערך", -DlgSelectBtnAdd : "הוסף", -DlgSelectBtnModify : "שנה", -DlgSelectBtnUp : "למעלה", -DlgSelectBtnDown : "למטה", -DlgSelectBtnSetValue : "קבע כברירת מחדל", -DlgSelectBtnDelete : "מחק", - -// Textarea Dialog -DlgTextareaName : "ש×", -DlgTextareaCols : "עמודות", -DlgTextareaRows : "שורות", - -// Text Field Dialog -DlgTextName : "ש×", -DlgTextValue : "ערך", -DlgTextCharWidth : "רוחב ב×ותיות", -DlgTextMaxChars : "מקסימות ×ותיות", -DlgTextType : "סוג", -DlgTextTypeText : "טקסט", -DlgTextTypePass : "סיסמה", - -// Hidden Field Dialog -DlgHiddenName : "ש×", -DlgHiddenValue : "ערך", - -// Bulleted List Dialog -BulletedListProp : "מ×פייני רשימה", -NumberedListProp : "מ×פייני רשימה ממוספרת", -DlgLstStart : "התחלה", -DlgLstType : "סוג", -DlgLstTypeCircle : "עיגול", -DlgLstTypeDisc : "דיסק", -DlgLstTypeSquare : "מרובע", -DlgLstTypeNumbers : "×ž×¡×¤×¨×™× (1, 2, 3)", -DlgLstTypeLCase : "×ותיות קטנות (a, b, c)", -DlgLstTypeUCase : "×ותיות גדולות (A, B, C)", -DlgLstTypeSRoman : "ספרות רומ×יות קטנות (i, ii, iii)", -DlgLstTypeLRoman : "ספרות רומ×יות גדולות (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "כללי", -DlgDocBackTab : "רקע", -DlgDocColorsTab : "×¦×‘×¢×™× ×•×’×‘×•×œ×•×ª", -DlgDocMetaTab : "נתוני META", - -DlgDocPageTitle : "כותרת דף", -DlgDocLangDir : "כיוון שפה", -DlgDocLangDirLTR : "שמ×ל לימין (LTR)", -DlgDocLangDirRTL : "ימין לשמ×ל (RTL)", -DlgDocLangCode : "קוד שפה", -DlgDocCharSet : "קידוד ×ותיות", -DlgDocCharSetCE : "מרכז ×ירופה", -DlgDocCharSetCT : "סיני מסורתי (Big5)", -DlgDocCharSetCR : "קירילי", -DlgDocCharSetGR : "יוונית", -DlgDocCharSetJP : "יפנית", -DlgDocCharSetKR : "קור×נית", -DlgDocCharSetTR : "טורקית", -DlgDocCharSetUN : "יוני קוד (UTF-8)", -DlgDocCharSetWE : "מערב ×ירופה", -DlgDocCharSetOther : "קידוד ×ותיות ×חר", - -DlgDocDocType : "הגדרות סוג מסמך", -DlgDocDocTypeOther : "הגדרות סוג מסמך ×חרות", -DlgDocIncXHTML : "כלול הגדרות XHTML", -DlgDocBgColor : "צבע רקע", -DlgDocBgImage : "URL לתמונת רקע", -DlgDocBgNoScroll : "רגע ×œ×œ× ×’×œ×™×œ×”", -DlgDocCText : "טקסט", -DlgDocCLink : "קישור", -DlgDocCVisited : "קישור שבוקר", -DlgDocCActive : " קישור פעיל", -DlgDocMargins : "גבולות דף", -DlgDocMaTop : "למעלה", -DlgDocMaLeft : "שמ×לה", -DlgDocMaRight : "ימינה", -DlgDocMaBottom : "למטה", -DlgDocMeIndex : "מפתח ×¢× ×™×™× ×™× ×©×œ המסמך )מופרד בפסיק(", -DlgDocMeDescr : "ת×ור מסמך", -DlgDocMeAuthor : "מחבר", -DlgDocMeCopy : "זכויות יוצרי×", -DlgDocPreview : "תצוגה מקדימה", - -// Templates Dialog -Templates : "תבניות", -DlgTemplatesTitle : "תביות תוכן", -DlgTemplatesSelMsg : "×× × ×‘×—×¨ תבנית לפתיחה בעורך
    התוכן המקורי ימחק:", -DlgTemplatesLoading : "מעלה רשימת תבניות ×× × ×”×ž×ª×Ÿ", -DlgTemplatesNoTpl : "(×œ× ×”×•×’×“×¨×• תבניות)", -DlgTemplatesReplace : "החלפת תוכן ממשי", - -// About Dialog -DlgAboutAboutTab : "×ודות", -DlgAboutBrowserInfoTab : "גירסת דפדפן", -DlgAboutLicenseTab : "רשיון", -DlgAboutVersion : "גירס×", -DlgAboutInfo : "מידע נוסף ניתן ×œ×ž×¦×•× ×›×ן:", - -// Div Dialog -DlgDivGeneralTab : "כללי", -DlgDivAdvancedTab : "מתקד×", -DlgDivStyle : "סגנון", -DlgDivInlineStyle : "סגנון בתוך השורה" -}; diff --git a/fckeditor/editor/lang/hi.js b/fckeditor/editor/lang/hi.js deleted file mode 100644 index 52dacde2..00000000 --- a/fckeditor/editor/lang/hi.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Hindi language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "टूलबार सिमटायें", -ToolbarExpand : "टूलबार का विसà¥à¤¤à¤¾à¤° करें", - -// Toolbar Items and Context Menu -Save : "सेव", -NewPage : "नया पेज", -Preview : "पà¥à¤°à¥€à¤µà¥à¤¯à¥‚", -Cut : "कट", -Copy : "कॉपी", -Paste : "पेसà¥à¤Ÿ", -PasteText : "पेसà¥à¤Ÿ (सादा टॅकà¥à¤¸à¥à¤Ÿ)", -PasteWord : "पेसà¥à¤Ÿ (वरà¥à¤¡ से)", -Print : "पà¥à¤°à¤¿à¤¨à¥à¤Ÿ", -SelectAll : "सब सॅलॅकà¥à¤Ÿ करें", -RemoveFormat : "फ़ॉरà¥à¤®à¥ˆà¤Ÿ हटायें", -InsertLinkLbl : "लिंक", -InsertLink : "लिंक इनà¥à¤¸à¤°à¥à¤Ÿ/संपादन", -RemoveLink : "लिंक हटायें", -VisitLink : "लिंक खोलें", -Anchor : "à¤à¤‚कर इनà¥à¤¸à¤°à¥à¤Ÿ/संपादन", -AnchorDelete : "à¤à¤‚कर हटायें", -InsertImageLbl : "तसà¥à¤µà¥€à¤°", -InsertImage : "तसà¥à¤µà¥€à¤° इनà¥à¤¸à¤°à¥à¤Ÿ/संपादन", -InsertFlashLbl : "फ़à¥à¤²à¥ˆà¤¶", -InsertFlash : "फ़à¥à¤²à¥ˆà¤¶ इनà¥à¤¸à¤°à¥à¤Ÿ/संपादन", -InsertTableLbl : "टेबल", -InsertTable : "टेबल इनà¥à¤¸à¤°à¥à¤Ÿ/संपादन", -InsertLineLbl : "रेखा", -InsertLine : "हॉरिज़ॉनà¥à¤Ÿà¤² रेखा इनà¥à¤¸à¤°à¥à¤Ÿ करें", -InsertSpecialCharLbl: "विशेष करॅकà¥à¤Ÿà¤°", -InsertSpecialChar : "विशेष करॅकà¥à¤Ÿà¤° इनà¥à¤¸à¤°à¥à¤Ÿ करें", -InsertSmileyLbl : "सà¥à¤®à¤¾à¤‡à¤²à¥€", -InsertSmiley : "सà¥à¤®à¤¾à¤‡à¤²à¥€ इनà¥à¤¸à¤°à¥à¤Ÿ करें", -About : "FCKeditor के बारे में", -Bold : "बोलà¥à¤¡", -Italic : "इटैलिक", -Underline : "रेखांकण", -StrikeThrough : "सà¥à¤Ÿà¥à¤°à¤¾à¤‡à¤• थà¥à¤°à¥‚", -Subscript : "अधोलेख", -Superscript : "अभिलेख", -LeftJustify : "बायीं तरफ", -CenterJustify : "बीच में", -RightJustify : "दायीं तरफ", -BlockJustify : "बà¥à¤²à¥‰à¤• जसà¥à¤Ÿà¥€à¥žà¤¾à¤ˆ", -DecreaseIndent : "इनà¥à¤¡à¥…नà¥à¤Ÿ कम करें", -IncreaseIndent : "इनà¥à¤¡à¥…नà¥à¤Ÿ बà¥à¤¾à¤¯à¥‡à¤‚", -Blockquote : "बà¥à¤²à¥‰à¤•-कोट", -CreateDiv : "डिव (Div) कनà¥à¤Ÿà¥‡à¤¨à¤° बनायें", -EditDiv : "डिव (Div) कनà¥à¤Ÿà¥‡à¤¨à¤° बदलें", -DeleteDiv : "डिव कनà¥à¤Ÿà¥‡à¤¨à¤° हटायें", -Undo : "अनà¥à¤¡à¥‚", -Redo : "रीडू", -NumberedListLbl : "अंकीय सूची", -NumberedList : "अंकीय सूची इनà¥à¤¸à¤°à¥à¤Ÿ/संपादन", -BulletedListLbl : "बà¥à¤²à¥…ट सूची", -BulletedList : "बà¥à¤²à¥…ट सूची इनà¥à¤¸à¤°à¥à¤Ÿ/संपादन", -ShowTableBorders : "टेबल बॉरà¥à¤¡à¤°à¤¯à¥‡à¤‚ दिखायें", -ShowDetails : "जà¥à¤¯à¤¾à¤¦à¤¾ दिखायें", -Style : "सà¥à¤Ÿà¤¾à¤‡à¤²", -FontFormat : "फ़ॉरà¥à¤®à¥ˆà¤Ÿ", -Font : "फ़ॉनà¥à¤Ÿ", -FontSize : "साइज़", -TextColor : "टेकà¥à¤¸à¥à¤Ÿ रंग", -BGColor : "बैकà¥à¤—à¥à¤°à¤¾à¤‰à¤¨à¥à¤¡ रंग", -Source : "सोरà¥à¤¸", -Find : "खोजें", -Replace : "रीपà¥à¤²à¥‡à¤¸", -SpellCheck : "वरà¥à¤¤à¤¨à¥€ (सà¥à¤ªà¥‡à¤²à¤¿à¤‚ग) जाà¤à¤š", -UniversalKeyboard : "यूनीवरà¥à¤¸à¤² कीबोरà¥à¤¡", -PageBreakLbl : "पेज बà¥à¤°à¥‡à¤•", -PageBreak : "पेज बà¥à¤°à¥‡à¤• इनà¥à¤¸à¤°à¥à¤Ÿà¥ करें", - -Form : "फ़ॉरà¥à¤®", -Checkbox : "चॅक बॉकà¥à¤¸", -RadioButton : "रेडिओ बटन", -TextField : "टेकà¥à¤¸à¥à¤Ÿ फ़ीलà¥à¤¡", -Textarea : "टेकà¥à¤¸à¥à¤Ÿ à¤à¤°à¤¿à¤¯à¤¾", -HiddenField : "गà¥à¤ªà¥à¤¤ फ़ीलà¥à¤¡", -Button : "बटन", -SelectionField : "चà¥à¤¨à¤¾à¤µ फ़ीलà¥à¤¡", -ImageButton : "तसà¥à¤µà¥€à¤° बटन", - -FitWindow : "à¤à¤¡à¤¿à¤Ÿà¤° साइज़ को चरम सीमा तक बà¥à¤¾à¤¯à¥‡à¤‚", -ShowBlocks : "बà¥à¤²à¥‰à¤• दिखायें", - -// Context Menu -EditLink : "लिंक संपादन", -CellCM : "खाना", -RowCM : "पंकà¥à¤¤à¤¿", -ColumnCM : "कालम", -InsertRowAfter : "बाद में पंकà¥à¤¤à¤¿ डालें", -InsertRowBefore : "पहले पंकà¥à¤¤à¤¿ डालें", -DeleteRows : "पंकà¥à¤¤à¤¿à¤¯à¤¾à¤ डिलीट करें", -InsertColumnAfter : "बाद में कालम डालें", -InsertColumnBefore : "पहले कालम डालें", -DeleteColumns : "कालम डिलीट करें", -InsertCellAfter : "बाद में सैल डालें", -InsertCellBefore : "पहले सैल डालें", -DeleteCells : "सैल डिलीट करें", -MergeCells : "सैल मिलायें", -MergeRight : "बाà¤à¤¯à¤¾ विलय", -MergeDown : "नीचे विलय करें", -HorizontalSplitCell : "सैल को कà¥à¤·à¥ˆà¤¤à¤¿à¤œ सà¥à¤¥à¤¿à¤¤à¤¿ में विभाजित करें", -VerticalSplitCell : "सैल को लमà¥à¤¬à¤¾à¤•ार में विभाजित करें", -TableDelete : "टेबल डिलीट करें", -CellProperties : "सैल पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -TableProperties : "टेबल पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -ImageProperties : "तसà¥à¤µà¥€à¤° पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -FlashProperties : "फ़à¥à¤²à¥ˆà¤¶ पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", - -AnchorProp : "à¤à¤‚कर पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -ButtonProp : "बटन पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -CheckboxProp : "चॅक बॉकà¥à¤¸ पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -HiddenFieldProp : "गà¥à¤ªà¥à¤¤ फ़ीलà¥à¤¡ पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -RadioButtonProp : "रेडिओ बटन पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -ImageButtonProp : "तसà¥à¤µà¥€à¤° बटन पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -TextFieldProp : "टेकà¥à¤¸à¥à¤Ÿ फ़ीलà¥à¤¡ पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -SelectionFieldProp : "चà¥à¤¨à¤¾à¤µ फ़ीलà¥à¤¡ पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -TextareaProp : "टेकà¥à¤¸à¥à¤¤ à¤à¤°à¤¿à¤¯à¤¾ पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -FormProp : "फ़ॉरà¥à¤® पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", - -FontFormats : "साधारण;फ़ॉरà¥à¤®à¥ˆà¤Ÿà¥…ड;पता;शीरà¥à¤·à¤• 1;शीरà¥à¤·à¤• 2;शीरà¥à¤·à¤• 3;शीरà¥à¤·à¤• 4;शीरà¥à¤·à¤• 5;शीरà¥à¤·à¤• 6;शीरà¥à¤·à¤• (DIV)", - -// Alerts and Messages -ProcessingXHTML : "XHTML पà¥à¤°à¥‹à¤¸à¥…स हो रहा है। ज़रा ठहरें...", -Done : "पूरा हà¥à¤†", -PasteWordConfirm : "आप जो टेकà¥à¤¸à¥à¤Ÿ पेसà¥à¤Ÿ करना चाहते हैं, वह वरà¥à¤¡ से कॉपी किया हà¥à¤† लग रहा है। कà¥à¤¯à¤¾ पेसà¥à¤Ÿ करने से पहले आप इसे साफ़ करना चाहेंगे?", -NotCompatiblePaste : "यह कमांड इनà¥à¤Ÿà¤°à¤¨à¥…ट à¤à¤•à¥à¤¸à¥à¤ªà¥à¤²à¥‹à¤°à¤°(Internet Explorer) 5.5 या उसके बाद के वरà¥à¥›à¤¨ के लिठही उपलबà¥à¤§ है। कà¥à¤¯à¤¾ आप बिना साफ़ किठपेसà¥à¤Ÿ करना चाहेंगे?", -UnknownToolbarItem : "अनजान टूलबार आइटम \"%1\"", -UnknownCommand : "अनजान कमानà¥à¤¡ \"%1\"", -NotImplemented : "कमानà¥à¤¡ इमà¥à¤ªà¥à¤²à¥€à¤®à¥…नà¥à¤Ÿ नहीं किया गया है", -UnknownToolbarSet : "टूलबार सॅट \"%1\" उपलबà¥à¤§ नहीं है", -NoActiveX : "आपके बà¥à¤°à¤¾à¤‰à¥›à¤°à¥ की सà¥à¤°à¤•à¥à¤¶à¤¾ सेटिंगà¥à¤¸à¥ à¤à¤¡à¤¿à¤Ÿà¤° की कà¥à¤›à¥ फ़ीचरों को सीमित करॠसकती हैं। कà¥à¤°à¤¿à¤ªà¤¯à¤¾ \"Run ActiveX controls and plug-ins\" विकलà¥à¤ª को à¤à¤¨à¥‡à¤¬à¤² करें. आपको à¤à¤°à¤°à¥à¤¸à¥ और गायब फ़ीचरà¥à¤¸à¥ का अनà¥à¤­à¤µ हो सकता है।", -BrowseServerBlocked : "रिसोरà¥à¤¸à¥‡à¥› बà¥à¤°à¤¾à¤‰à¥›à¤°à¥ नहीं खोला जा सका। कà¥à¤°à¤¿à¤ªà¤¯à¤¾ सभी पॉपà¥-अपॠबà¥à¤²à¥‰à¤•रà¥à¤¸à¥ को निषà¥à¤•à¥à¤°à¤¿à¤¯ करें।", -DialogBlocked : "डायलग विनà¥à¤¡à¥‹ नहीं खोला जा सका। कà¥à¤°à¤¿à¤ªà¤¯à¤¾ सभी पॉपà¥-अपॠबà¥à¤²à¥‰à¤•रà¥à¤¸à¥ को निषà¥à¤•à¥à¤°à¤¿à¤¯ करें।", -VisitLinkBlocked : "नया विनà¥à¤¡à¥‹ नहीं खोला जा सका। कà¥à¤°à¤¿à¤ªà¤¯à¤¾ सभी पॉपà¥-अपॠबà¥à¤²à¥‰à¤•रà¥à¤¸à¥ को निषà¥à¤•à¥à¤°à¤¿à¤¯ करें।", - -// Dialogs -DlgBtnOK : "ठीक है", -DlgBtnCancel : "रदà¥à¤¦ करें", -DlgBtnClose : "बनà¥à¤¦ करें", -DlgBtnBrowseServer : "सरà¥à¤µà¤° बà¥à¤°à¤¾à¤‰à¥› करें", -DlgAdvancedTag : "à¤à¤¡à¥à¤µà¤¾à¤¨à¥à¤¸à¥à¤¡", -DlgOpOther : "<अनà¥à¤¯>", -DlgInfoTab : "सूचना", -DlgAlertUrl : "URL इनà¥à¤¸à¤°à¥à¤Ÿ करें", - -// General Dialogs Labels -DlgGenNotSet : "<सॅट नहीं>", -DlgGenId : "Id", -DlgGenLangDir : "भाषा लिखने की दिशा", -DlgGenLangDirLtr : "बायें से दायें (LTR)", -DlgGenLangDirRtl : "दायें से बायें (RTL)", -DlgGenLangCode : "भाषा कोड", -DlgGenAccessKey : "à¤à¤•à¥à¤¸à¥…स की", -DlgGenName : "नाम", -DlgGenTabIndex : "टैब इनà¥à¤¡à¥…कà¥à¤¸", -DlgGenLongDescr : "अधिक विवरण के लिठURL", -DlgGenClass : "सà¥à¤Ÿà¤¾à¤‡à¤²-शीट कà¥à¤²à¤¾à¤¸", -DlgGenTitle : "परामरà¥à¤¶ शीरà¥à¤¶à¤•", -DlgGenContType : "परामरà¥à¤¶ कनà¥à¤Ÿà¥…नà¥à¤Ÿ पà¥à¤°à¤•ार", -DlgGenLinkCharset : "लिंक रिसोरà¥à¤¸ करॅकà¥à¤Ÿà¤° सॅट", -DlgGenStyle : "सà¥à¤Ÿà¤¾à¤‡à¤²", - -// Image Dialog -DlgImgTitle : "तसà¥à¤µà¥€à¤° पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -DlgImgInfoTab : "तसà¥à¤µà¥€à¤° की जानकारी", -DlgImgBtnUpload : "इसे सरà¥à¤µà¤° को भेजें", -DlgImgURL : "URL", -DlgImgUpload : "अपलोड", -DlgImgAlt : "वैकलà¥à¤ªà¤¿à¤• टेकà¥à¤¸à¥à¤Ÿ", -DlgImgWidth : "चौड़ाई", -DlgImgHeight : "ऊà¤à¤šà¤¾à¤ˆ", -DlgImgLockRatio : "लॉक अनà¥à¤ªà¤¾à¤¤", -DlgBtnResetSize : "रीसॅट साइज़", -DlgImgBorder : "बॉरà¥à¤¡à¤°", -DlgImgHSpace : "हॉरिज़ॉनà¥à¤Ÿà¤² सà¥à¤ªà¥‡à¤¸", -DlgImgVSpace : "वरà¥à¤Ÿà¤¿à¤•ल सà¥à¤ªà¥‡à¤¸", -DlgImgAlign : "à¤à¤²à¤¾à¤‡à¤¨", -DlgImgAlignLeft : "दायें", -DlgImgAlignAbsBottom: "Abs नीचे", -DlgImgAlignAbsMiddle: "Abs ऊपर", -DlgImgAlignBaseline : "मूल रेखा", -DlgImgAlignBottom : "नीचे", -DlgImgAlignMiddle : "मधà¥à¤¯", -DlgImgAlignRight : "दायें", -DlgImgAlignTextTop : "टेकà¥à¤¸à¥à¤Ÿ ऊपर", -DlgImgAlignTop : "ऊपर", -DlgImgPreview : "पà¥à¤°à¥€à¤µà¥à¤¯à¥‚", -DlgImgAlertUrl : "तसà¥à¤µà¥€à¤° का URL टाइप करें ", -DlgImgLinkTab : "लिंक", - -// Flash Dialog -DlgFlashTitle : "फ़à¥à¤²à¥ˆà¤¶ पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -DlgFlashChkPlay : "ऑटो पà¥à¤²à¥‡", -DlgFlashChkLoop : "लूप", -DlgFlashChkMenu : "फ़à¥à¤²à¥ˆà¤¶ मॅनà¥à¤¯à¥‚ का पà¥à¤°à¤¯à¥‹à¤— करें", -DlgFlashScale : "सà¥à¤•ेल", -DlgFlashScaleAll : "सभी दिखायें", -DlgFlashScaleNoBorder : "कोई बॉरà¥à¤¡à¤° नहीं", -DlgFlashScaleFit : "बिलà¥à¤•à¥à¤² फ़िट", - -// Link Dialog -DlgLnkWindowTitle : "लिंक", -DlgLnkInfoTab : "लिंक ", -DlgLnkTargetTab : "टारà¥à¤—ेट", - -DlgLnkType : "लिंक पà¥à¤°à¤•ार", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "इस पेज का à¤à¤‚कर", -DlgLnkTypeEMail : "ई-मेल", -DlgLnkProto : "पà¥à¤°à¥‹à¤Ÿà¥‹à¤•ॉल", -DlgLnkProtoOther : "<अनà¥à¤¯>", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "à¤à¤‚कर चà¥à¤¨à¥‡à¤‚", -DlgLnkAnchorByName : "à¤à¤‚कर नाम से", -DlgLnkAnchorById : "à¤à¤²à¥€à¤®à¥…नà¥à¤Ÿ Id से", -DlgLnkNoAnchors : "(डॉकà¥à¤¯à¥‚मॅनà¥à¤Ÿ में à¤à¤‚करà¥à¤¸ की संखà¥à¤¯à¤¾)", -DlgLnkEMail : "ई-मेल पता", -DlgLnkEMailSubject : "संदेश विषय", -DlgLnkEMailBody : "संदेश", -DlgLnkUpload : "अपलोड", -DlgLnkBtnUpload : "इसे सरà¥à¤µà¤° को भेजें", - -DlgLnkTarget : "टारà¥à¤—ेट", -DlgLnkTargetFrame : "<फ़à¥à¤°à¥‡à¤®>", -DlgLnkTargetPopup : "<पॉप-अप विनà¥à¤¡à¥‹>", -DlgLnkTargetBlank : "नया विनà¥à¤¡à¥‹ (_blank)", -DlgLnkTargetParent : "मूल विनà¥à¤¡à¥‹ (_parent)", -DlgLnkTargetSelf : "इसी विनà¥à¤¡à¥‹ (_self)", -DlgLnkTargetTop : "शीरà¥à¤· विनà¥à¤¡à¥‹ (_top)", -DlgLnkTargetFrameName : "टारà¥à¤—ेट फ़à¥à¤°à¥‡à¤® का नाम", -DlgLnkPopWinName : "पॉप-अप विनà¥à¤¡à¥‹ का नाम", -DlgLnkPopWinFeat : "पॉप-अप विनà¥à¤¡à¥‹ फ़ीचरà¥à¤¸", -DlgLnkPopResize : "साइज़ बदला जा सकता है", -DlgLnkPopLocation : "लोकेशन बार", -DlgLnkPopMenu : "मॅनà¥à¤¯à¥‚ बार", -DlgLnkPopScroll : "सà¥à¤•à¥à¤°à¥‰à¤² बार", -DlgLnkPopStatus : "सà¥à¤Ÿà¥‡à¤Ÿà¤¸ बार", -DlgLnkPopToolbar : "टूल बार", -DlgLnkPopFullScrn : "फ़à¥à¤² सà¥à¤•à¥à¤°à¥€à¤¨ (IE)", -DlgLnkPopDependent : "डिपेनà¥à¤¡à¥…नà¥à¤Ÿ (Netscape)", -DlgLnkPopWidth : "चौड़ाई", -DlgLnkPopHeight : "ऊà¤à¤šà¤¾à¤ˆ", -DlgLnkPopLeft : "बायीं तरफ", -DlgLnkPopTop : "दायीं तरफ", - -DlnLnkMsgNoUrl : "लिंक URL टाइप करें", -DlnLnkMsgNoEMail : "ई-मेल पता टाइप करें", -DlnLnkMsgNoAnchor : "à¤à¤‚कर चà¥à¤¨à¥‡à¤‚", -DlnLnkMsgInvPopName : "पॉप-अप का नाम अलà¥à¤«à¤¾à¤¬à¥‡à¤Ÿ से शà¥à¤°à¥‚ होना चाहिये और उसमें सà¥à¤ªà¥‡à¤¸ नहीं होने चाहिà¤", - -// Color Dialog -DlgColorTitle : "रंग चà¥à¤¨à¥‡à¤‚", -DlgColorBtnClear : "साफ़ करें", -DlgColorHighlight : "हाइलाइट", -DlgColorSelected : "सॅलॅकà¥à¤Ÿà¥…ड", - -// Smiley Dialog -DlgSmileyTitle : "सà¥à¤®à¤¾à¤‡à¤²à¥€ इनà¥à¤¸à¤°à¥à¤Ÿ करें", - -// Special Character Dialog -DlgSpecialCharTitle : "विशेष करॅकà¥à¤Ÿà¤° चà¥à¤¨à¥‡à¤‚", - -// Table Dialog -DlgTableTitle : "टेबल पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -DlgTableRows : "पंकà¥à¤¤à¤¿à¤¯à¤¾à¤", -DlgTableColumns : "कालम", -DlgTableBorder : "बॉरà¥à¤¡à¤° साइज़", -DlgTableAlign : "à¤à¤²à¤¾à¤‡à¤¨à¥à¤®à¥…नà¥à¤Ÿ", -DlgTableAlignNotSet : "<सॅट नहीं>", -DlgTableAlignLeft : "दायें", -DlgTableAlignCenter : "बीच में", -DlgTableAlignRight : "बायें", -DlgTableWidth : "चौड़ाई", -DlgTableWidthPx : "पिकà¥à¤¸à¥ˆà¤²", -DlgTableWidthPc : "पà¥à¤°à¤¤à¤¿à¤¶à¤¤", -DlgTableHeight : "ऊà¤à¤šà¤¾à¤ˆ", -DlgTableCellSpace : "सैल अंतर", -DlgTableCellPad : "सैल पैडिंग", -DlgTableCaption : "शीरà¥à¤·à¤•", -DlgTableSummary : "सारांश", - -// Table Cell Dialog -DlgCellTitle : "सैल पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -DlgCellWidth : "चौड़ाई", -DlgCellWidthPx : "पिकà¥à¤¸à¥ˆà¤²", -DlgCellWidthPc : "पà¥à¤°à¤¤à¤¿à¤¶à¤¤", -DlgCellHeight : "ऊà¤à¤šà¤¾à¤ˆ", -DlgCellWordWrap : "वरà¥à¤¡ रैप", -DlgCellWordWrapNotSet : "<सॅट नहीं>", -DlgCellWordWrapYes : "हाà¤", -DlgCellWordWrapNo : "नहीं", -DlgCellHorAlign : "हॉरिज़ॉनà¥à¤Ÿà¤² à¤à¤²à¤¾à¤‡à¤¨à¥à¤®à¥…नà¥à¤Ÿ", -DlgCellHorAlignNotSet : "<सॅट नहीं>", -DlgCellHorAlignLeft : "दायें", -DlgCellHorAlignCenter : "बीच में", -DlgCellHorAlignRight: "बायें", -DlgCellVerAlign : "वरà¥à¤Ÿà¤¿à¤•ल à¤à¤²à¤¾à¤‡à¤¨à¥à¤®à¥…नà¥à¤Ÿ", -DlgCellVerAlignNotSet : "<सॅट नहीं>", -DlgCellVerAlignTop : "ऊपर", -DlgCellVerAlignMiddle : "मधà¥à¤¯", -DlgCellVerAlignBottom : "नीचे", -DlgCellVerAlignBaseline : "मूलरेखा", -DlgCellRowSpan : "पंकà¥à¤¤à¤¿ सà¥à¤ªà¥ˆà¤¨", -DlgCellCollSpan : "कालम सà¥à¤ªà¥ˆà¤¨", -DlgCellBackColor : "बैकà¥à¤—à¥à¤°à¤¾à¤‰à¤¨à¥à¤¡ रंग", -DlgCellBorderColor : "बॉरà¥à¤¡à¤° का रंग", -DlgCellBtnSelect : "चà¥à¤¨à¥‡à¤‚...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "खोजें और बदलें", - -// Find Dialog -DlgFindTitle : "खोजें", -DlgFindFindBtn : "खोजें", -DlgFindNotFoundMsg : "आपके दà¥à¤µà¤¾à¤°à¤¾ दिया गया टेकà¥à¤¸à¥à¤Ÿ नहीं मिला", - -// Replace Dialog -DlgReplaceTitle : "रिपà¥à¤²à¥‡à¤¸", -DlgReplaceFindLbl : "यह खोजें:", -DlgReplaceReplaceLbl : "इससे रिपà¥à¤²à¥‡à¤¸ करें:", -DlgReplaceCaseChk : "केस मिलायें", -DlgReplaceReplaceBtn : "रिपà¥à¤²à¥‡à¤¸", -DlgReplaceReplAllBtn : "सभी रिपà¥à¤²à¥‡à¤¸ करें", -DlgReplaceWordChk : "पूरा शबà¥à¤¦ मिलायें", - -// Paste Operations / Dialog -PasteErrorCut : "आपके बà¥à¤°à¤¾à¤‰à¥›à¤° की सà¥à¤°à¤•à¥à¤·à¤¾ सॅटिनà¥à¤—à¥à¤¸ ने कट करने की अनà¥à¤®à¤¤à¤¿ नहीं पà¥à¤°à¤¦à¤¾à¤¨ की है। (Ctrl+X) का पà¥à¤°à¤¯à¥‹à¤— करें।", -PasteErrorCopy : "आपके बà¥à¤°à¤¾à¤†à¤‰à¥›à¤° की सà¥à¤°à¤•à¥à¤·à¤¾ सॅटिनà¥à¤—à¥à¤¸ ने कॉपी करने की अनà¥à¤®à¤¤à¤¿ नहीं पà¥à¤°à¤¦à¤¾à¤¨ की है। (Ctrl+C) का पà¥à¤°à¤¯à¥‹à¤— करें।", - -PasteAsText : "पेसà¥à¤Ÿ (सादा टॅकà¥à¤¸à¥à¤Ÿ)", -PasteFromWord : "पेसà¥à¤Ÿ (वरà¥à¤¡ से)", - -DlgPasteMsg2 : "Ctrl+V का पà¥à¤°à¤¯à¥‹à¤— करके पेसà¥à¤Ÿ करें और ठीक है करें.", -DlgPasteSec : "आपके बà¥à¤°à¤¾à¤‰à¥›à¤° की सà¥à¤°à¤•à¥à¤·à¤¾ आपके बà¥à¤°à¤¾à¤‰à¥›à¤° की सà¥à¤°Kश सैटिंग के कारण, à¤à¤¡à¤¿à¤Ÿà¤° आपके कà¥à¤²à¤¿à¤ªà¤¬à¥‹à¤°à¥à¤¡ डेटा को नहीं पा सकता है. आपको उसे इस विनà¥à¤¡à¥‹ में दोबारा पेसà¥à¤Ÿ करना होगा.", -DlgPasteIgnoreFont : "फ़ॉनà¥à¤Ÿ परिभाषा निकालें", -DlgPasteRemoveStyles : "सà¥à¤Ÿà¤¾à¤‡à¤² परिभाषा निकालें", - -// Color Picker -ColorAutomatic : "सà¥à¤µà¤šà¤¾à¤²à¤¿à¤¤", -ColorMoreColors : "और रंग...", - -// Document Properties -DocProps : "डॉकà¥à¤¯à¥‚मॅनà¥à¤Ÿ पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", - -// Anchor Dialog -DlgAnchorTitle : "à¤à¤‚कर पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -DlgAnchorName : "à¤à¤‚कर का नाम", -DlgAnchorErrorName : "à¤à¤‚कर का नाम टाइप करें", - -// Speller Pages Dialog -DlgSpellNotInDic : "शबà¥à¤¦à¤•ोश में नहीं", -DlgSpellChangeTo : "इसमें बदलें", -DlgSpellBtnIgnore : "इगà¥à¤¨à¥‹à¤°", -DlgSpellBtnIgnoreAll : "सभी इगà¥à¤¨à¥‹à¤° करें", -DlgSpellBtnReplace : "रिपà¥à¤²à¥‡à¤¸", -DlgSpellBtnReplaceAll : "सभी रिपà¥à¤²à¥‡à¤¸ करें", -DlgSpellBtnUndo : "अनà¥à¤¡à¥‚", -DlgSpellNoSuggestions : "- कोई सà¥à¤à¤¾à¤µ नहीं -", -DlgSpellProgress : "वरà¥à¤¤à¤¨à¥€ की जाà¤à¤š (सà¥à¤ªà¥…ल-चॅक) जारी है...", -DlgSpellNoMispell : "वरà¥à¤¤à¤¨à¥€ की जाà¤à¤š : कोई गलत वरà¥à¤¤à¤¨à¥€ (सà¥à¤ªà¥…लिंग) नहीं पाई गई", -DlgSpellNoChanges : "वरà¥à¤¤à¤¨à¥€ की जाà¤à¤š :कोई शबà¥à¤¦ नहीं बदला गया", -DlgSpellOneChange : "वरà¥à¤¤à¤¨à¥€ की जाà¤à¤š : à¤à¤• शबà¥à¤¦ बदला गया", -DlgSpellManyChanges : "वरà¥à¤¤à¤¨à¥€ की जाà¤à¤š : %1 शबà¥à¤¦ बदले गये", - -IeSpellDownload : "सà¥à¤ªà¥…ल-चॅकर इनà¥à¤¸à¥à¤Ÿà¤¾à¤² नहीं किया गया है। कà¥à¤¯à¤¾ आप इसे डा‌उनलोड करना चाहेंगे?", - -// Button Dialog -DlgButtonText : "टेकà¥à¤¸à¥à¤Ÿ (वैलà¥à¤¯à¥‚)", -DlgButtonType : "पà¥à¤°à¤•ार", -DlgButtonTypeBtn : "बटन", -DlgButtonTypeSbm : "सबà¥à¤®à¤¿à¤Ÿ", -DlgButtonTypeRst : "रिसेट", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "नाम", -DlgCheckboxValue : "वैलà¥à¤¯à¥‚", -DlgCheckboxSelected : "सॅलॅकà¥à¤Ÿà¥…ड", - -// Form Dialog -DlgFormName : "नाम", -DlgFormAction : "कà¥à¤°à¤¿à¤¯à¤¾", -DlgFormMethod : "तरीका", - -// Select Field Dialog -DlgSelectName : "नाम", -DlgSelectValue : "वैलà¥à¤¯à¥‚", -DlgSelectSize : "साइज़", -DlgSelectLines : "पंकà¥à¤¤à¤¿à¤¯à¤¾à¤", -DlgSelectChkMulti : "à¤à¤• से जà¥à¤¯à¤¾à¤¦à¤¾ विकलà¥à¤ª चà¥à¤¨à¤¨à¥‡ दें", -DlgSelectOpAvail : "उपलबà¥à¤§ विकलà¥à¤ª", -DlgSelectOpText : "टेकà¥à¤¸à¥à¤Ÿ", -DlgSelectOpValue : "वैलà¥à¤¯à¥‚", -DlgSelectBtnAdd : "जोड़ें", -DlgSelectBtnModify : "बदलें", -DlgSelectBtnUp : "ऊपर", -DlgSelectBtnDown : "नीचे", -DlgSelectBtnSetValue : "चà¥à¤¨à¥€ गई वैलà¥à¤¯à¥‚ सॅट करें", -DlgSelectBtnDelete : "डिलीट", - -// Textarea Dialog -DlgTextareaName : "नाम", -DlgTextareaCols : "कालम", -DlgTextareaRows : "पंकà¥à¤¤à¤¿à¤¯à¤¾à¤‚", - -// Text Field Dialog -DlgTextName : "नाम", -DlgTextValue : "वैलà¥à¤¯à¥‚", -DlgTextCharWidth : "करॅकà¥à¤Ÿà¤° की चौà¥à¤¾à¤ˆ", -DlgTextMaxChars : "अधिकतम करॅकà¥à¤Ÿà¤°", -DlgTextType : "टाइप", -DlgTextTypeText : "टेकà¥à¤¸à¥à¤Ÿ", -DlgTextTypePass : "पासà¥à¤µà¤°à¥à¤¡", - -// Hidden Field Dialog -DlgHiddenName : "नाम", -DlgHiddenValue : "वैलà¥à¤¯à¥‚", - -// Bulleted List Dialog -BulletedListProp : "बà¥à¤²à¥…ट सूची पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -NumberedListProp : "अंकीय सूची पà¥à¤°à¥‰à¤ªà¤°à¥à¤Ÿà¥€à¥›", -DlgLstStart : "पà¥à¤°à¤¾à¤°à¤®à¥à¤­", -DlgLstType : "पà¥à¤°à¤•ार", -DlgLstTypeCircle : "गोल", -DlgLstTypeDisc : "डिसà¥à¤•", -DlgLstTypeSquare : "चौकॊण", -DlgLstTypeNumbers : "अंक (1, 2, 3)", -DlgLstTypeLCase : "छोटे अकà¥à¤·à¤° (a, b, c)", -DlgLstTypeUCase : "बड़े अकà¥à¤·à¤° (A, B, C)", -DlgLstTypeSRoman : "छोटे रोमन अंक (i, ii, iii)", -DlgLstTypeLRoman : "बड़े रोमन अंक (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "आम", -DlgDocBackTab : "बैकà¥à¤—à¥à¤°à¤¾à¤‰à¤¨à¥à¤¡", -DlgDocColorsTab : "रंग और मारà¥à¤œà¤¿à¤¨", -DlgDocMetaTab : "मॅटाडेटा", - -DlgDocPageTitle : "पेज शीरà¥à¤·à¤•", -DlgDocLangDir : "भाषा लिखने की दिशा", -DlgDocLangDirLTR : "बायें से दायें (LTR)", -DlgDocLangDirRTL : "दायें से बायें (RTL)", -DlgDocLangCode : "भाषा कोड", -DlgDocCharSet : "करेकà¥à¤Ÿà¤° सॅट à¤à¤¨à¥à¤•ोडिंग", -DlgDocCharSetCE : "मधà¥à¤¯ यूरोपीय (Central European)", -DlgDocCharSetCT : "चीनी (Chinese Traditional Big5)", -DlgDocCharSetCR : "सिरीलिक (Cyrillic)", -DlgDocCharSetGR : "यवन (Greek)", -DlgDocCharSetJP : "जापानी (Japanese)", -DlgDocCharSetKR : "कोरीयन (Korean)", -DlgDocCharSetTR : "तà¥à¤°à¥à¤•ी (Turkish)", -DlgDocCharSetUN : "यूनीकोड (UTF-8)", -DlgDocCharSetWE : "पशà¥à¤šà¤¿à¤® यूरोपीय (Western European)", -DlgDocCharSetOther : "अनà¥à¤¯ करेकà¥à¤Ÿà¤° सॅट à¤à¤¨à¥à¤•ोडिंग", - -DlgDocDocType : "डॉकà¥à¤¯à¥‚मॅनà¥à¤Ÿ पà¥à¤°à¤•ार शीरà¥à¤·à¤•", -DlgDocDocTypeOther : "अनà¥à¤¯ डॉकà¥à¤¯à¥‚मॅनà¥à¤Ÿ पà¥à¤°à¤•ार शीरà¥à¤·à¤•", -DlgDocIncXHTML : "XHTML सूचना समà¥à¤®à¤¿à¤²à¤¿à¤¤ करें", -DlgDocBgColor : "बैकà¥à¤—à¥à¤°à¤¾à¤‰à¤¨à¥à¤¡ रंग", -DlgDocBgImage : "बैकà¥à¤—à¥à¤°à¤¾à¤‰à¤¨à¥à¤¡ तसà¥à¤µà¥€à¤° URL", -DlgDocBgNoScroll : "सà¥à¤•à¥à¤°à¥‰à¤² न करने वाला बैकà¥à¤—à¥à¤°à¤¾à¤‰à¤¨à¥à¤¡", -DlgDocCText : "टेकà¥à¤¸à¥à¤Ÿ", -DlgDocCLink : "लिंक", -DlgDocCVisited : "विज़िट किया गया लिंक", -DlgDocCActive : "सकà¥à¤°à¤¿à¤¯ लिंक", -DlgDocMargins : "पेज मारà¥à¤œà¤¿à¤¨", -DlgDocMaTop : "ऊपर", -DlgDocMaLeft : "बायें", -DlgDocMaRight : "दायें", -DlgDocMaBottom : "नीचे", -DlgDocMeIndex : "डॉकà¥à¤¯à¥à¤®à¥…नà¥à¤Ÿ इनà¥à¤¡à¥‡à¤•à¥à¤¸ संकेतशबà¥à¤¦ (अलà¥à¤ªà¤µà¤¿à¤°à¤¾à¤® से अलग करें)", -DlgDocMeDescr : "डॉकà¥à¤¯à¥‚मॅनà¥à¤Ÿ करॅकà¥à¤Ÿà¤°à¤¨", -DlgDocMeAuthor : "लेखक", -DlgDocMeCopy : "कॉपीराइट", -DlgDocPreview : "पà¥à¤°à¥€à¤µà¥à¤¯à¥‚", - -// Templates Dialog -Templates : "टॅमà¥à¤ªà¥à¤²à¥‡à¤Ÿ", -DlgTemplatesTitle : "कनà¥à¤Ÿà¥‡à¤¨à¥à¤Ÿ टॅमà¥à¤ªà¥à¤²à¥‡à¤Ÿ", -DlgTemplatesSelMsg : "à¤à¤¡à¤¿à¤Ÿà¤° में ओपन करने हेतॠटॅमà¥à¤ªà¥à¤²à¥‡à¤Ÿ चà¥à¤¨à¥‡à¤‚(वरà¥à¤¤à¤®à¤¾à¤¨ कनà¥à¤Ÿà¥…नà¥à¤Ÿ सेव नहीं होंगे):", -DlgTemplatesLoading : "टॅमà¥à¤ªà¥à¤²à¥‡à¤Ÿ सूची लोड की जा रही है। ज़रा ठहरें...", -DlgTemplatesNoTpl : "(कोई टॅमà¥à¤ªà¥à¤²à¥‡à¤Ÿ डिफ़ाइन नहीं किया गया है)", -DlgTemplatesReplace : "मूल शबà¥à¤¦à¥‹à¤‚ को बदलें", - -// About Dialog -DlgAboutAboutTab : "FCKEditor के बारे में", -DlgAboutBrowserInfoTab : "बà¥à¤°à¤¾à¤‰à¥›à¤° के बारे में", -DlgAboutLicenseTab : "लाइसैनà¥à¤¸", -DlgAboutVersion : "वरà¥à¥›à¤¨", -DlgAboutInfo : "अधिक जानकारी के लिये यहाठजायें:", - -// Div Dialog -DlgDivGeneralTab : "सामानà¥à¤¯", -DlgDivAdvancedTab : "à¤à¤¡à¥à¤µà¤¾à¤¨à¥à¤¸à¥à¤¡", -DlgDivStyle : "सà¥à¤Ÿà¤¾à¤‡à¤²", -DlgDivInlineStyle : "इनलाइन सà¥à¤Ÿà¤¾à¤‡à¤²" -}; diff --git a/fckeditor/editor/lang/hr.js b/fckeditor/editor/lang/hr.js deleted file mode 100644 index 4601e962..00000000 --- a/fckeditor/editor/lang/hr.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Croatian language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Smanji trake s alatima", -ToolbarExpand : "ProÅ¡iri trake s alatima", - -// Toolbar Items and Context Menu -Save : "Snimi", -NewPage : "Nova stranica", -Preview : "Pregledaj", -Cut : "Izreži", -Copy : "Kopiraj", -Paste : "Zalijepi", -PasteText : "Zalijepi kao Äisti tekst", -PasteWord : "Zalijepi iz Worda", -Print : "IspiÅ¡i", -SelectAll : "Odaberi sve", -RemoveFormat : "Ukloni formatiranje", -InsertLinkLbl : "Link", -InsertLink : "Ubaci/promijeni link", -RemoveLink : "Ukloni link", -VisitLink : "Otvori link", -Anchor : "Ubaci/promijeni sidro", -AnchorDelete : "Ukloni sidro", -InsertImageLbl : "Slika", -InsertImage : "Ubaci/promijeni sliku", -InsertFlashLbl : "Flash", -InsertFlash : "Ubaci/promijeni Flash", -InsertTableLbl : "Tablica", -InsertTable : "Ubaci/promijeni tablicu", -InsertLineLbl : "Linija", -InsertLine : "Ubaci vodoravnu liniju", -InsertSpecialCharLbl: "Posebni karakteri", -InsertSpecialChar : "Ubaci posebne znakove", -InsertSmileyLbl : "SmjeÅ¡ko", -InsertSmiley : "Ubaci smjeÅ¡ka", -About : "O FCKeditoru", -Bold : "Podebljaj", -Italic : "Ukosi", -Underline : "Potcrtano", -StrikeThrough : "Precrtano", -Subscript : "Subscript", -Superscript : "Superscript", -LeftJustify : "Lijevo poravnanje", -CenterJustify : "SrediÅ¡nje poravnanje", -RightJustify : "Desno poravnanje", -BlockJustify : "Blok poravnanje", -DecreaseIndent : "Pomakni ulijevo", -IncreaseIndent : "Pomakni udesno", -Blockquote : "Blockquote", -CreateDiv : "Napravi Div kontejner", -EditDiv : "Uredi Div kontejner", -DeleteDiv : "Ukloni Div kontejner", -Undo : "PoniÅ¡ti", -Redo : "Ponovi", -NumberedListLbl : "BrojÄana lista", -NumberedList : "Ubaci/ukloni brojÄanu listu", -BulletedListLbl : "ObiÄna lista", -BulletedList : "Ubaci/ukloni obiÄnu listu", -ShowTableBorders : "Prikaži okvir tablice", -ShowDetails : "Prikaži detalje", -Style : "Stil", -FontFormat : "Format", -Font : "Font", -FontSize : "VeliÄina", -TextColor : "Boja teksta", -BGColor : "Boja pozadine", -Source : "Kôd", -Find : "PronaÄ‘i", -Replace : "Zamijeni", -SpellCheck : "Provjeri pravopis", -UniversalKeyboard : "Univerzalna tipkovnica", -PageBreakLbl : "Prijelom stranice", -PageBreak : "Ubaci prijelom stranice", - -Form : "Form", -Checkbox : "Checkbox", -RadioButton : "Radio Button", -TextField : "Text Field", -Textarea : "Textarea", -HiddenField : "Hidden Field", -Button : "Button", -SelectionField : "Selection Field", -ImageButton : "Image Button", - -FitWindow : "Povećaj veliÄinu editora", -ShowBlocks : "Prikaži blokove", - -// Context Menu -EditLink : "Promijeni link", -CellCM : "Ćelija", -RowCM : "Red", -ColumnCM : "Kolona", -InsertRowAfter : "Ubaci red poslije", -InsertRowBefore : "Ubaci red prije", -DeleteRows : "IzbriÅ¡i redove", -InsertColumnAfter : "Ubaci kolonu poslije", -InsertColumnBefore : "Ubaci kolonu prije", -DeleteColumns : "IzbriÅ¡i kolone", -InsertCellAfter : "Ubaci ćeliju poslije", -InsertCellBefore : "Ubaci ćeliju prije", -DeleteCells : "IzbriÅ¡i ćelije", -MergeCells : "Spoji ćelije", -MergeRight : "Spoji desno", -MergeDown : "Spoji dolje", -HorizontalSplitCell : "Podijeli ćeliju vodoravno", -VerticalSplitCell : "Podijeli ćeliju okomito", -TableDelete : "IzbriÅ¡i tablicu", -CellProperties : "Svojstva ćelije", -TableProperties : "Svojstva tablice", -ImageProperties : "Svojstva slike", -FlashProperties : "Flash svojstva", - -AnchorProp : "Svojstva sidra", -ButtonProp : "Image Button svojstva", -CheckboxProp : "Checkbox svojstva", -HiddenFieldProp : "Hidden Field svojstva", -RadioButtonProp : "Radio Button svojstva", -ImageButtonProp : "Image Button svojstva", -TextFieldProp : "Text Field svojstva", -SelectionFieldProp : "Selection svojstva", -TextareaProp : "Textarea svojstva", -FormProp : "Form svojstva", - -FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "ObraÄ‘ujem XHTML. Molimo priÄekajte...", -Done : "ZavrÅ¡io", -PasteWordConfirm : "Tekst koji želite zalijepiti Äini se da je kopiran iz Worda. Želite li prije oÄistiti tekst?", -NotCompatiblePaste : "Ova naredba je dostupna samo u Internet Exploreru 5.5 ili novijem. Želite li nastaviti bez Äišćenja?", -UnknownToolbarItem : "Nepoznati Älan trake s alatima \"%1\"", -UnknownCommand : "Nepoznata naredba \"%1\"", -NotImplemented : "Naredba nije implementirana", -UnknownToolbarSet : "Traka s alatima \"%1\" ne postoji", -NoActiveX : "VaÅ¡e postavke pretraživaÄa mogle bi ograniÄiti neke od mogućnosti editora. Morate ukljuÄiti opciju \"Run ActiveX controls and plug-ins\" u postavkama. Ukoliko to ne uÄinite, moguće su razliite greÅ¡ke tijekom rada.", -BrowseServerBlocked : "PretraivaÄ nije moguće otvoriti. Provjerite da li je ukljuÄeno blokiranje pop-up prozora.", -DialogBlocked : "Nije moguće otvoriti novi prozor. Provjerite da li je ukljuÄeno blokiranje pop-up prozora.", -VisitLinkBlocked : "Nije moguće otvoriti novi prozor. Provjerite da li je ukljuÄeno blokiranje pop-up prozora.", - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "PoniÅ¡ti", -DlgBtnClose : "Zatvori", -DlgBtnBrowseServer : "Pretraži server", -DlgAdvancedTag : "Napredno", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Molimo unesite URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Smjer jezika", -DlgGenLangDirLtr : "S lijeva na desno (LTR)", -DlgGenLangDirRtl : "S desna na lijevo (RTL)", -DlgGenLangCode : "Kôd jezika", -DlgGenAccessKey : "Pristupna tipka", -DlgGenName : "Naziv", -DlgGenTabIndex : "Tab Indeks", -DlgGenLongDescr : "DugaÄki opis URL", -DlgGenClass : "Stylesheet klase", -DlgGenTitle : "Advisory naslov", -DlgGenContType : "Advisory vrsta sadržaja", -DlgGenLinkCharset : "Kodna stranica povezanih resursa", -DlgGenStyle : "Stil", - -// Image Dialog -DlgImgTitle : "Svojstva slika", -DlgImgInfoTab : "Info slike", -DlgImgBtnUpload : "PoÅ¡alji na server", -DlgImgURL : "URL", -DlgImgUpload : "PoÅ¡alji", -DlgImgAlt : "Alternativni tekst", -DlgImgWidth : "Å irina", -DlgImgHeight : "Visina", -DlgImgLockRatio : "ZakljuÄaj odnos", -DlgBtnResetSize : "ObriÅ¡i veliÄinu", -DlgImgBorder : "Okvir", -DlgImgHSpace : "HSpace", -DlgImgVSpace : "VSpace", -DlgImgAlign : "Poravnaj", -DlgImgAlignLeft : "Lijevo", -DlgImgAlignAbsBottom: "Abs dolje", -DlgImgAlignAbsMiddle: "Abs sredina", -DlgImgAlignBaseline : "Bazno", -DlgImgAlignBottom : "Dolje", -DlgImgAlignMiddle : "Sredina", -DlgImgAlignRight : "Desno", -DlgImgAlignTextTop : "Vrh teksta", -DlgImgAlignTop : "Vrh", -DlgImgPreview : "Pregledaj", -DlgImgAlertUrl : "Unesite URL slike", -DlgImgLinkTab : "Link", - -// Flash Dialog -DlgFlashTitle : "Flash svojstva", -DlgFlashChkPlay : "Auto Play", -DlgFlashChkLoop : "Ponavljaj", -DlgFlashChkMenu : "Omogući Flash izbornik", -DlgFlashScale : "Omjer", -DlgFlashScaleAll : "Prikaži sve", -DlgFlashScaleNoBorder : "Bez okvira", -DlgFlashScaleFit : "ToÄna veliÄina", - -// Link Dialog -DlgLnkWindowTitle : "Link", -DlgLnkInfoTab : "Link Info", -DlgLnkTargetTab : "Meta", - -DlgLnkType : "Link vrsta", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Sidro na ovoj stranici", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protokol", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Odaberi sidro", -DlgLnkAnchorByName : "Po nazivu sidra", -DlgLnkAnchorById : "Po Id elementa", -DlgLnkNoAnchors : "(Nema dostupnih sidra)", -DlgLnkEMail : "E-Mail adresa", -DlgLnkEMailSubject : "Naslov", -DlgLnkEMailBody : "Sadržaj poruke", -DlgLnkUpload : "PoÅ¡alji", -DlgLnkBtnUpload : "PoÅ¡alji na server", - -DlgLnkTarget : "Meta", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Novi prozor (_blank)", -DlgLnkTargetParent : "Roditeljski prozor (_parent)", -DlgLnkTargetSelf : "Isti prozor (_self)", -DlgLnkTargetTop : "VrÅ¡ni prozor (_top)", -DlgLnkTargetFrameName : "Ime ciljnog okvira", -DlgLnkPopWinName : "Naziv popup prozora", -DlgLnkPopWinFeat : "Mogućnosti popup prozora", -DlgLnkPopResize : "Promjenljive veliÄine", -DlgLnkPopLocation : "Traka za lokaciju", -DlgLnkPopMenu : "Izborna traka", -DlgLnkPopScroll : "Scroll traka", -DlgLnkPopStatus : "Statusna traka", -DlgLnkPopToolbar : "Traka s alatima", -DlgLnkPopFullScrn : "Cijeli ekran (IE)", -DlgLnkPopDependent : "Ovisno (Netscape)", -DlgLnkPopWidth : "Å irina", -DlgLnkPopHeight : "Visina", -DlgLnkPopLeft : "Lijeva pozicija", -DlgLnkPopTop : "Gornja pozicija", - -DlnLnkMsgNoUrl : "Molimo upiÅ¡ite URL link", -DlnLnkMsgNoEMail : "Molimo upiÅ¡ite e-mail adresu", -DlnLnkMsgNoAnchor : "Molimo odaberite sidro", -DlnLnkMsgInvPopName : "Ime popup prozora mora poÄeti sa slovom i ne smije sadržavati razmake", - -// Color Dialog -DlgColorTitle : "Odaberite boju", -DlgColorBtnClear : "ObriÅ¡i", -DlgColorHighlight : "Osvijetli", -DlgColorSelected : "Odaberi", - -// Smiley Dialog -DlgSmileyTitle : "Ubaci smjeÅ¡ka", - -// Special Character Dialog -DlgSpecialCharTitle : "Odaberite posebni karakter", - -// Table Dialog -DlgTableTitle : "Svojstva tablice", -DlgTableRows : "Redova", -DlgTableColumns : "Kolona", -DlgTableBorder : "VeliÄina okvira", -DlgTableAlign : "Poravnanje", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Lijevo", -DlgTableAlignCenter : "SrediÅ¡nje", -DlgTableAlignRight : "Desno", -DlgTableWidth : "Å irina", -DlgTableWidthPx : "piksela", -DlgTableWidthPc : "postotaka", -DlgTableHeight : "Visina", -DlgTableCellSpace : "Prostornost ćelija", -DlgTableCellPad : "Razmak ćelija", -DlgTableCaption : "Naslov", -DlgTableSummary : "Sažetak", - -// Table Cell Dialog -DlgCellTitle : "Svojstva ćelije", -DlgCellWidth : "Å irina", -DlgCellWidthPx : "piksela", -DlgCellWidthPc : "postotaka", -DlgCellHeight : "Visina", -DlgCellWordWrap : "Word Wrap", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Da", -DlgCellWordWrapNo : "Ne", -DlgCellHorAlign : "Vodoravno poravnanje", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Lijevo", -DlgCellHorAlignCenter : "SrediÅ¡nje", -DlgCellHorAlignRight: "Desno", -DlgCellVerAlign : "Okomito poravnanje", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Gornje", -DlgCellVerAlignMiddle : "SredniÅ¡nje", -DlgCellVerAlignBottom : "Donje", -DlgCellVerAlignBaseline : "Bazno", -DlgCellRowSpan : "Spajanje redova", -DlgCellCollSpan : "Spajanje kolona", -DlgCellBackColor : "Boja pozadine", -DlgCellBorderColor : "Boja okvira", -DlgCellBtnSelect : "Odaberi...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "PronaÄ‘i i zamijeni", - -// Find Dialog -DlgFindTitle : "PronaÄ‘i", -DlgFindFindBtn : "PronaÄ‘i", -DlgFindNotFoundMsg : "Traženi tekst nije pronaÄ‘en.", - -// Replace Dialog -DlgReplaceTitle : "Zamijeni", -DlgReplaceFindLbl : "PronaÄ‘i:", -DlgReplaceReplaceLbl : "Zamijeni s:", -DlgReplaceCaseChk : "Usporedi mala/velika slova", -DlgReplaceReplaceBtn : "Zamijeni", -DlgReplaceReplAllBtn : "Zamijeni sve", -DlgReplaceWordChk : "Usporedi cijele rijeÄi", - -// Paste Operations / Dialog -PasteErrorCut : "Sigurnosne postavke VaÅ¡eg pretraživaÄa ne dozvoljavaju operacije automatskog izrezivanja. Molimo koristite kraticu na tipkovnici (Ctrl+X).", -PasteErrorCopy : "Sigurnosne postavke VaÅ¡eg pretraživaÄa ne dozvoljavaju operacije automatskog kopiranja. Molimo koristite kraticu na tipkovnici (Ctrl+C).", - -PasteAsText : "Zalijepi kao Äisti tekst", -PasteFromWord : "Zalijepi iz Worda", - -DlgPasteMsg2 : "Molimo zaljepite unutar doljnjeg okvira koristeći tipkovnicu (Ctrl+V) i kliknite OK.", -DlgPasteSec : "Zbog sigurnosnih postavki VaÅ¡eg pretraživaÄa, editor nema direktan pristup VaÅ¡em meÄ‘uspremniku. Potrebno je ponovno zalijepiti tekst u ovaj prozor.", -DlgPasteIgnoreFont : "Zanemari definiciju vrste fonta", -DlgPasteRemoveStyles : "Ukloni definicije stilova", - -// Color Picker -ColorAutomatic : "Automatski", -ColorMoreColors : "ViÅ¡e boja...", - -// Document Properties -DocProps : "Svojstva dokumenta", - -// Anchor Dialog -DlgAnchorTitle : "Svojstva sidra", -DlgAnchorName : "Ime sidra", -DlgAnchorErrorName : "Molimo unesite ime sidra", - -// Speller Pages Dialog -DlgSpellNotInDic : "Nije u rjeÄniku", -DlgSpellChangeTo : "Promijeni u", -DlgSpellBtnIgnore : "Zanemari", -DlgSpellBtnIgnoreAll : "Zanemari sve", -DlgSpellBtnReplace : "Zamijeni", -DlgSpellBtnReplaceAll : "Zamijeni sve", -DlgSpellBtnUndo : "Vrati", -DlgSpellNoSuggestions : "-Nema preporuke-", -DlgSpellProgress : "Provjera u tijeku...", -DlgSpellNoMispell : "Provjera zavrÅ¡ena: Nema greÅ¡aka", -DlgSpellNoChanges : "Provjera zavrÅ¡ena: Nije napravljena promjena", -DlgSpellOneChange : "Provjera zavrÅ¡ena: Jedna rijeÄ promjenjena", -DlgSpellManyChanges : "Provjera zavrÅ¡ena: Promijenjeno %1 rijeÄi", - -IeSpellDownload : "Provjera pravopisa nije instalirana. Želite li skinuti provjeru pravopisa?", - -// Button Dialog -DlgButtonText : "Tekst (vrijednost)", -DlgButtonType : "Vrsta", -DlgButtonTypeBtn : "Gumb", -DlgButtonTypeSbm : "PoÅ¡alji", -DlgButtonTypeRst : "PoniÅ¡ti", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Ime", -DlgCheckboxValue : "Vrijednost", -DlgCheckboxSelected : "Odabrano", - -// Form Dialog -DlgFormName : "Ime", -DlgFormAction : "Akcija", -DlgFormMethod : "Metoda", - -// Select Field Dialog -DlgSelectName : "Ime", -DlgSelectValue : "Vrijednost", -DlgSelectSize : "VeliÄina", -DlgSelectLines : "linija", -DlgSelectChkMulti : "Dozvoli viÅ¡estruki odabir", -DlgSelectOpAvail : "Dostupne opcije", -DlgSelectOpText : "Tekst", -DlgSelectOpValue : "Vrijednost", -DlgSelectBtnAdd : "Dodaj", -DlgSelectBtnModify : "Promijeni", -DlgSelectBtnUp : "Gore", -DlgSelectBtnDown : "Dolje", -DlgSelectBtnSetValue : "Postavi kao odabranu vrijednost", -DlgSelectBtnDelete : "ObriÅ¡i", - -// Textarea Dialog -DlgTextareaName : "Ime", -DlgTextareaCols : "Kolona", -DlgTextareaRows : "Redova", - -// Text Field Dialog -DlgTextName : "Ime", -DlgTextValue : "Vrijednost", -DlgTextCharWidth : "Å irina", -DlgTextMaxChars : "NajviÅ¡e karaktera", -DlgTextType : "Vrsta", -DlgTextTypeText : "Tekst", -DlgTextTypePass : "Å ifra", - -// Hidden Field Dialog -DlgHiddenName : "Ime", -DlgHiddenValue : "Vrijednost", - -// Bulleted List Dialog -BulletedListProp : "Svojstva liste", -NumberedListProp : "Svojstva brojÄane liste", -DlgLstStart : "PoÄetak", -DlgLstType : "Vrsta", -DlgLstTypeCircle : "Krug", -DlgLstTypeDisc : "Disk", -DlgLstTypeSquare : "Kvadrat", -DlgLstTypeNumbers : "Brojevi (1, 2, 3)", -DlgLstTypeLCase : "Mala slova (a, b, c)", -DlgLstTypeUCase : "Velika slova (A, B, C)", -DlgLstTypeSRoman : "Male rimske brojke (i, ii, iii)", -DlgLstTypeLRoman : "Velike rimske brojke (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Općenito", -DlgDocBackTab : "Pozadina", -DlgDocColorsTab : "Boje i margine", -DlgDocMetaTab : "Meta Data", - -DlgDocPageTitle : "Naslov stranice", -DlgDocLangDir : "Smjer jezika", -DlgDocLangDirLTR : "S lijeva na desno", -DlgDocLangDirRTL : "S desna na lijevo", -DlgDocLangCode : "Kôd jezika", -DlgDocCharSet : "Enkodiranje znakova", -DlgDocCharSetCE : "SrediÅ¡nja Europa", -DlgDocCharSetCT : "Tradicionalna kineska (Big5)", -DlgDocCharSetCR : "Ćirilica", -DlgDocCharSetGR : "GrÄka", -DlgDocCharSetJP : "Japanska", -DlgDocCharSetKR : "Koreanska", -DlgDocCharSetTR : "Turska", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Zapadna Europa", -DlgDocCharSetOther : "Ostalo enkodiranje znakova", - -DlgDocDocType : "Zaglavlje vrste dokumenta", -DlgDocDocTypeOther : "Ostalo zaglavlje vrste dokumenta", -DlgDocIncXHTML : "Ubaci XHTML deklaracije", -DlgDocBgColor : "Boja pozadine", -DlgDocBgImage : "URL slike pozadine", -DlgDocBgNoScroll : "Pozadine se ne pomiÄe", -DlgDocCText : "Tekst", -DlgDocCLink : "Link", -DlgDocCVisited : "Posjećeni link", -DlgDocCActive : "Aktivni link", -DlgDocMargins : "Margine stranice", -DlgDocMaTop : "Vrh", -DlgDocMaLeft : "Lijevo", -DlgDocMaRight : "Desno", -DlgDocMaBottom : "Dolje", -DlgDocMeIndex : "KljuÄne rijeÄi dokumenta (odvojene zarezom)", -DlgDocMeDescr : "Opis dokumenta", -DlgDocMeAuthor : "Autor", -DlgDocMeCopy : "Autorska prava", -DlgDocPreview : "Pregledaj", - -// Templates Dialog -Templates : "PredloÅ¡ci", -DlgTemplatesTitle : "PredloÅ¡ci sadržaja", -DlgTemplatesSelMsg : "Molimo odaberite predložak koji želite otvoriti
    (stvarni sadržaj će biti izgubljen):", -DlgTemplatesLoading : "UÄitavam listu predložaka. Molimo priÄekajte...", -DlgTemplatesNoTpl : "(Nema definiranih predložaka)", -DlgTemplatesReplace : "Zamijeni trenutne sadržaje", - -// About Dialog -DlgAboutAboutTab : "O FCKEditoru", -DlgAboutBrowserInfoTab : "Podaci o pretraživaÄu", -DlgAboutLicenseTab : "Licenca", -DlgAboutVersion : "inaÄica", -DlgAboutInfo : "Za viÅ¡e informacija posjetite", - -// Div Dialog -DlgDivGeneralTab : "Općenito", -DlgDivAdvancedTab : "Napredno", -DlgDivStyle : "Stil", -DlgDivInlineStyle : "Stil u redu" -}; diff --git a/fckeditor/editor/lang/hu.js b/fckeditor/editor/lang/hu.js deleted file mode 100644 index b9803e63..00000000 --- a/fckeditor/editor/lang/hu.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Hungarian language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Eszköztár elrejtése", -ToolbarExpand : "Eszköztár megjelenítése", - -// Toolbar Items and Context Menu -Save : "Mentés", -NewPage : "Új oldal", -Preview : "ElÅ‘nézet", -Cut : "Kivágás", -Copy : "Másolás", -Paste : "Beillesztés", -PasteText : "Beillesztés formázás nélkül", -PasteWord : "Beillesztés Word-bÅ‘l", -Print : "Nyomtatás", -SelectAll : "Mindent kijelöl", -RemoveFormat : "Formázás eltávolítása", -InsertLinkLbl : "Hivatkozás", -InsertLink : "Hivatkozás beillesztése/módosítása", -RemoveLink : "Hivatkozás törlése", -VisitLink : "Open Link", //MISSING -Anchor : "Horgony beillesztése/szerkesztése", -AnchorDelete : "Horgony eltávolítása", -InsertImageLbl : "Kép", -InsertImage : "Kép beillesztése/módosítása", -InsertFlashLbl : "Flash", -InsertFlash : "Flash beillesztése, módosítása", -InsertTableLbl : "Táblázat", -InsertTable : "Táblázat beillesztése/módosítása", -InsertLineLbl : "Vonal", -InsertLine : "Elválasztóvonal beillesztése", -InsertSpecialCharLbl: "Speciális karakter", -InsertSpecialChar : "Speciális karakter beillesztése", -InsertSmileyLbl : "Hangulatjelek", -InsertSmiley : "Hangulatjelek beillesztése", -About : "FCKeditor névjegy", -Bold : "Félkövér", -Italic : "DÅ‘lt", -Underline : "Aláhúzott", -StrikeThrough : "Ãthúzott", -Subscript : "Alsó index", -Superscript : "FelsÅ‘ index", -LeftJustify : "Balra", -CenterJustify : "Középre", -RightJustify : "Jobbra", -BlockJustify : "Sorkizárt", -DecreaseIndent : "Behúzás csökkentése", -IncreaseIndent : "Behúzás növelése", -Blockquote : "Idézet blokk", -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "Visszavonás", -Redo : "Ismétlés", -NumberedListLbl : "Számozás", -NumberedList : "Számozás beillesztése/törlése", -BulletedListLbl : "Felsorolás", -BulletedList : "Felsorolás beillesztése/törlése", -ShowTableBorders : "Táblázat szegély mutatása", -ShowDetails : "Részletek mutatása", -Style : "Stílus", -FontFormat : "Formátum", -Font : "Betűtípus", -FontSize : "Méret", -TextColor : "Betűszín", -BGColor : "Háttérszín", -Source : "Forráskód", -Find : "Keresés", -Replace : "Csere", -SpellCheck : "Helyesírás-ellenÅ‘rzés", -UniversalKeyboard : "Univerzális billentyűzet", -PageBreakLbl : "Oldaltörés", -PageBreak : "Oldaltörés beillesztése", - -Form : "Űrlap", -Checkbox : "JelölÅ‘négyzet", -RadioButton : "Választógomb", -TextField : "SzövegmezÅ‘", -Textarea : "Szövegterület", -HiddenField : "RejtettmezÅ‘", -Button : "Gomb", -SelectionField : "LegördülÅ‘ lista", -ImageButton : "Képgomb", - -FitWindow : "Maximalizálás", -ShowBlocks : "Blokkok megjelenítése", - -// Context Menu -EditLink : "Hivatkozás módosítása", -CellCM : "Cella", -RowCM : "Sor", -ColumnCM : "Oszlop", -InsertRowAfter : "Sor beillesztése az aktuális sor mögé", -InsertRowBefore : "Sor beillesztése az aktuális sor elé", -DeleteRows : "Sorok törlése", -InsertColumnAfter : "Oszlop beillesztése az aktuális oszlop mögé", -InsertColumnBefore : "Oszlop beillesztése az aktuális oszlop elé", -DeleteColumns : "Oszlopok törlése", -InsertCellAfter : "Cella beillesztése az aktuális cella mögé", -InsertCellBefore : "Cella beillesztése az aktuális cella elé", -DeleteCells : "Cellák törlése", -MergeCells : "Cellák egyesítése", -MergeRight : "Cellák egyesítése jobbra", -MergeDown : "Cellák egyesítése lefelé", -HorizontalSplitCell : "Cellák szétválasztása vízszintesen", -VerticalSplitCell : "Cellák szétválasztása függÅ‘legesen", -TableDelete : "Táblázat törlése", -CellProperties : "Cella tulajdonságai", -TableProperties : "Táblázat tulajdonságai", -ImageProperties : "Kép tulajdonságai", -FlashProperties : "Flash tulajdonságai", - -AnchorProp : "Horgony tulajdonságai", -ButtonProp : "Gomb tulajdonságai", -CheckboxProp : "JelölÅ‘négyzet tulajdonságai", -HiddenFieldProp : "Rejtett mezÅ‘ tulajdonságai", -RadioButtonProp : "Választógomb tulajdonságai", -ImageButtonProp : "Képgomb tulajdonságai", -TextFieldProp : "SzövegmezÅ‘ tulajdonságai", -SelectionFieldProp : "LegördülÅ‘ lista tulajdonságai", -TextareaProp : "Szövegterület tulajdonságai", -FormProp : "Űrlap tulajdonságai", - -FontFormats : "Normál;Formázott;Címsor;Fejléc 1;Fejléc 2;Fejléc 3;Fejléc 4;Fejléc 5;Fejléc 6;Bekezdés (DIV)", - -// Alerts and Messages -ProcessingXHTML : "XHTML feldolgozása. Kérem várjon...", -Done : "Kész", -PasteWordConfirm : "A beilleszteni kívánt szöveg Word-bÅ‘l van másolva. El kívánja távolítani a formázást a beillesztés elÅ‘tt?", -NotCompatiblePaste : "Ez a parancs csak Internet Explorer 5.5 verziótól használható. Megpróbálja beilleszteni a szöveget az eredeti formázással?", -UnknownToolbarItem : "Ismeretlen eszköztár elem \"%1\"", -UnknownCommand : "Ismeretlen parancs \"%1\"", -NotImplemented : "A parancs nem hajtható végre", -UnknownToolbarSet : "Az eszközkészlet \"%1\" nem létezik", -NoActiveX : "A böngészÅ‘ biztonsági beállításai korlátozzák a szerkesztÅ‘ lehetÅ‘ségeit. Engedélyezni kell ezt az opciót: \"Run ActiveX controls and plug-ins\". EttÅ‘l függetlenül elÅ‘fordulhatnak hibaüzenetek ill. bizonyos funkciók hiányozhatnak.", -BrowseServerBlocked : "Nem lehet megnyitni a fájlböngészÅ‘t. Bizonyosodjon meg róla, hogy a felbukkanó ablakok engedélyezve vannak.", -DialogBlocked : "Nem lehet megnyitni a párbeszédablakot. Bizonyosodjon meg róla, hogy a felbukkanó ablakok engedélyezve vannak.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "Rendben", -DlgBtnCancel : "Mégsem", -DlgBtnClose : "Bezárás", -DlgBtnBrowseServer : "Böngészés a szerveren", -DlgAdvancedTag : "További opciók", -DlgOpOther : "Egyéb", -DlgInfoTab : "Alaptulajdonságok", -DlgAlertUrl : "Illessze be a webcímet", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Azonosító", -DlgGenLangDir : "Ãrás iránya", -DlgGenLangDirLtr : "Balról jobbra", -DlgGenLangDirRtl : "Jobbról balra", -DlgGenLangCode : "Nyelv kódja", -DlgGenAccessKey : "Billentyűkombináció", -DlgGenName : "Név", -DlgGenTabIndex : "Tabulátor index", -DlgGenLongDescr : "Részletes leírás webcíme", -DlgGenClass : "Stíluskészlet", -DlgGenTitle : "Súgócimke", -DlgGenContType : "Súgó tartalomtípusa", -DlgGenLinkCharset : "Hivatkozott tartalom kódlapja", -DlgGenStyle : "Stílus", - -// Image Dialog -DlgImgTitle : "Kép tulajdonságai", -DlgImgInfoTab : "Alaptulajdonságok", -DlgImgBtnUpload : "Küldés a szerverre", -DlgImgURL : "Hivatkozás", -DlgImgUpload : "Feltöltés", -DlgImgAlt : "Buborék szöveg", -DlgImgWidth : "Szélesség", -DlgImgHeight : "Magasság", -DlgImgLockRatio : "Arány megtartása", -DlgBtnResetSize : "Eredeti méret", -DlgImgBorder : "Keret", -DlgImgHSpace : "Vízsz. táv", -DlgImgVSpace : "Függ. táv", -DlgImgAlign : "Igazítás", -DlgImgAlignLeft : "Bal", -DlgImgAlignAbsBottom: "Legaljára", -DlgImgAlignAbsMiddle: "Közepére", -DlgImgAlignBaseline : "Alapvonalhoz", -DlgImgAlignBottom : "Aljára", -DlgImgAlignMiddle : "Középre", -DlgImgAlignRight : "Jobbra", -DlgImgAlignTextTop : "Szöveg tetejére", -DlgImgAlignTop : "Tetejére", -DlgImgPreview : "ElÅ‘nézet", -DlgImgAlertUrl : "Töltse ki a kép webcímét", -DlgImgLinkTab : "Hivatkozás", - -// Flash Dialog -DlgFlashTitle : "Flash tulajdonságai", -DlgFlashChkPlay : "Automata lejátszás", -DlgFlashChkLoop : "Folyamatosan", -DlgFlashChkMenu : "Flash menü engedélyezése", -DlgFlashScale : "Méretezés", -DlgFlashScaleAll : "Mindent mutat", -DlgFlashScaleNoBorder : "Keret nélkül", -DlgFlashScaleFit : "Teljes kitöltés", - -// Link Dialog -DlgLnkWindowTitle : "Hivatkozás tulajdonságai", -DlgLnkInfoTab : "Alaptulajdonságok", -DlgLnkTargetTab : "Megjelenítés", - -DlgLnkType : "Hivatkozás típusa", -DlgLnkTypeURL : "Webcím", -DlgLnkTypeAnchor : "Horgony az oldalon", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protokoll", -DlgLnkProtoOther : "", -DlgLnkURL : "Webcím", -DlgLnkAnchorSel : "Horgony választása", -DlgLnkAnchorByName : "Horgony név szerint", -DlgLnkAnchorById : "Azonosító szerint", -DlgLnkNoAnchors : "(Nincs horgony a dokumentumban)", -DlgLnkEMail : "E-Mail cím", -DlgLnkEMailSubject : "Üzenet tárgya", -DlgLnkEMailBody : "Üzenet", -DlgLnkUpload : "Feltöltés", -DlgLnkBtnUpload : "Küldés a szerverre", - -DlgLnkTarget : "Tartalom megjelenítése", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Új ablakban (_blank)", -DlgLnkTargetParent : "SzülÅ‘ ablakban (_parent)", -DlgLnkTargetSelf : "Azonos ablakban (_self)", -DlgLnkTargetTop : "LegfelsÅ‘ ablakban (_top)", -DlgLnkTargetFrameName : "Keret neve", -DlgLnkPopWinName : "Felugró ablak neve", -DlgLnkPopWinFeat : "Felugró ablak jellemzÅ‘i", -DlgLnkPopResize : "MéretezhetÅ‘", -DlgLnkPopLocation : "Címsor", -DlgLnkPopMenu : "Menü sor", -DlgLnkPopScroll : "GördítÅ‘sáv", -DlgLnkPopStatus : "Ãllapotsor", -DlgLnkPopToolbar : "Eszköztár", -DlgLnkPopFullScrn : "Teljes képernyÅ‘ (csak IE)", -DlgLnkPopDependent : "SzülÅ‘höz kapcsolt (csak Netscape)", -DlgLnkPopWidth : "Szélesség", -DlgLnkPopHeight : "Magasság", -DlgLnkPopLeft : "Bal pozíció", -DlgLnkPopTop : "FelsÅ‘ pozíció", - -DlnLnkMsgNoUrl : "Adja meg a hivatkozás webcímét", -DlnLnkMsgNoEMail : "Adja meg az E-Mail címet", -DlnLnkMsgNoAnchor : "Válasszon egy horgonyt", -DlnLnkMsgInvPopName : "A felbukkanó ablak neve alfanumerikus karakterrel kezdôdjön, valamint ne tartalmazzon szóközt", - -// Color Dialog -DlgColorTitle : "Színválasztás", -DlgColorBtnClear : "Törlés", -DlgColorHighlight : "ElÅ‘nézet", -DlgColorSelected : "Kiválasztott", - -// Smiley Dialog -DlgSmileyTitle : "Hangulatjel beszúrása", - -// Special Character Dialog -DlgSpecialCharTitle : "Speciális karakter választása", - -// Table Dialog -DlgTableTitle : "Táblázat tulajdonságai", -DlgTableRows : "Sorok", -DlgTableColumns : "Oszlopok", -DlgTableBorder : "Szegélyméret", -DlgTableAlign : "Igazítás", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Balra", -DlgTableAlignCenter : "Középre", -DlgTableAlignRight : "Jobbra", -DlgTableWidth : "Szélesség", -DlgTableWidthPx : "képpont", -DlgTableWidthPc : "százalék", -DlgTableHeight : "Magasság", -DlgTableCellSpace : "Cella térköz", -DlgTableCellPad : "Cella belsÅ‘ margó", -DlgTableCaption : "Felirat", -DlgTableSummary : "Leírás", - -// Table Cell Dialog -DlgCellTitle : "Cella tulajdonságai", -DlgCellWidth : "Szélesség", -DlgCellWidthPx : "képpont", -DlgCellWidthPc : "százalék", -DlgCellHeight : "Magasság", -DlgCellWordWrap : "Sortörés", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Igen", -DlgCellWordWrapNo : "Nem", -DlgCellHorAlign : "Vízsz. igazítás", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Balra", -DlgCellHorAlignCenter : "Középre", -DlgCellHorAlignRight: "Jobbra", -DlgCellVerAlign : "Függ. igazítás", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Tetejére", -DlgCellVerAlignMiddle : "Középre", -DlgCellVerAlignBottom : "Aljára", -DlgCellVerAlignBaseline : "Egyvonalba", -DlgCellRowSpan : "Sorok egyesítése", -DlgCellCollSpan : "Oszlopok egyesítése", -DlgCellBackColor : "Háttérszín", -DlgCellBorderColor : "Szegélyszín", -DlgCellBtnSelect : "Kiválasztás...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Keresés és csere", - -// Find Dialog -DlgFindTitle : "Keresés", -DlgFindFindBtn : "Keresés", -DlgFindNotFoundMsg : "A keresett szöveg nem található.", - -// Replace Dialog -DlgReplaceTitle : "Csere", -DlgReplaceFindLbl : "Keresett szöveg:", -DlgReplaceReplaceLbl : "Csere erre:", -DlgReplaceCaseChk : "kis- és nagybetű megkülönböztetése", -DlgReplaceReplaceBtn : "Csere", -DlgReplaceReplAllBtn : "Az összes cseréje", -DlgReplaceWordChk : "csak ha ez a teljes szó", - -// Paste Operations / Dialog -PasteErrorCut : "A böngészÅ‘ biztonsági beállításai nem engedélyezik a szerkesztÅ‘nek, hogy végrehajtsa a kivágás műveletet. Használja az alábbi billentyűkombinációt (Ctrl+X).", -PasteErrorCopy : "A böngészÅ‘ biztonsági beállításai nem engedélyezik a szerkesztÅ‘nek, hogy végrehajtsa a másolás műveletet. Használja az alábbi billentyűkombinációt (Ctrl+X).", - -PasteAsText : "Beillesztés formázatlan szövegként", -PasteFromWord : "Beillesztés Word-bÅ‘l", - -DlgPasteMsg2 : "Másolja be az alábbi mezÅ‘be a Ctrl+V billentyűk lenyomásával, majd nyomjon Rendben-t.", -DlgPasteSec : "A böngészÅ‘ biztonsági beállításai miatt a szerkesztÅ‘ nem képes hozzáférni a vágólap adataihoz. Illeszd be újra ebben az ablakban.", -DlgPasteIgnoreFont : "Betű formázások megszüntetése", -DlgPasteRemoveStyles : "Stílusok eltávolítása", - -// Color Picker -ColorAutomatic : "Automatikus", -ColorMoreColors : "További színek...", - -// Document Properties -DocProps : "Dokumentum tulajdonságai", - -// Anchor Dialog -DlgAnchorTitle : "Horgony tulajdonságai", -DlgAnchorName : "Horgony neve", -DlgAnchorErrorName : "Kérem adja meg a horgony nevét", - -// Speller Pages Dialog -DlgSpellNotInDic : "Nincs a szótárban", -DlgSpellChangeTo : "Módosítás", -DlgSpellBtnIgnore : "Kihagyja", -DlgSpellBtnIgnoreAll : "Mindet kihagyja", -DlgSpellBtnReplace : "Csere", -DlgSpellBtnReplaceAll : "Összes cseréje", -DlgSpellBtnUndo : "Visszavonás", -DlgSpellNoSuggestions : "Nincs javaslat", -DlgSpellProgress : "Helyesírás-ellenÅ‘rzés folyamatban...", -DlgSpellNoMispell : "Helyesírás-ellenÅ‘rzés kész: Nem találtam hibát", -DlgSpellNoChanges : "Helyesírás-ellenÅ‘rzés kész: Nincs változtatott szó", -DlgSpellOneChange : "Helyesírás-ellenÅ‘rzés kész: Egy szó cserélve", -DlgSpellManyChanges : "Helyesírás-ellenÅ‘rzés kész: %1 szó cserélve", - -IeSpellDownload : "A helyesírás-ellenÅ‘rzÅ‘ nincs telepítve. Szeretné letölteni most?", - -// Button Dialog -DlgButtonText : "Szöveg (Érték)", -DlgButtonType : "Típus", -DlgButtonTypeBtn : "Gomb", -DlgButtonTypeSbm : "Küldés", -DlgButtonTypeRst : "Alaphelyzet", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Név", -DlgCheckboxValue : "Érték", -DlgCheckboxSelected : "Kiválasztott", - -// Form Dialog -DlgFormName : "Név", -DlgFormAction : "Adatfeldolgozást végzÅ‘ hivatkozás", -DlgFormMethod : "Adatküldés módja", - -// Select Field Dialog -DlgSelectName : "Név", -DlgSelectValue : "Érték", -DlgSelectSize : "Méret", -DlgSelectLines : "sor", -DlgSelectChkMulti : "több sor is kiválasztható", -DlgSelectOpAvail : "ElérhetÅ‘ opciók", -DlgSelectOpText : "Szöveg", -DlgSelectOpValue : "Érték", -DlgSelectBtnAdd : "Hozzáad", -DlgSelectBtnModify : "Módosít", -DlgSelectBtnUp : "Fel", -DlgSelectBtnDown : "Le", -DlgSelectBtnSetValue : "Legyen az alapértelmezett érték", -DlgSelectBtnDelete : "Töröl", - -// Textarea Dialog -DlgTextareaName : "Név", -DlgTextareaCols : "Karakterek száma egy sorban", -DlgTextareaRows : "Sorok száma", - -// Text Field Dialog -DlgTextName : "Név", -DlgTextValue : "Érték", -DlgTextCharWidth : "Megjelenített karakterek száma", -DlgTextMaxChars : "Maximális karakterszám", -DlgTextType : "Típus", -DlgTextTypeText : "Szöveg", -DlgTextTypePass : "Jelszó", - -// Hidden Field Dialog -DlgHiddenName : "Név", -DlgHiddenValue : "Érték", - -// Bulleted List Dialog -BulletedListProp : "Felsorolás tulajdonságai", -NumberedListProp : "Számozás tulajdonságai", -DlgLstStart : "Start", -DlgLstType : "Formátum", -DlgLstTypeCircle : "Kör", -DlgLstTypeDisc : "Lemez", -DlgLstTypeSquare : "Négyzet", -DlgLstTypeNumbers : "Számok (1, 2, 3)", -DlgLstTypeLCase : "Kisbetűk (a, b, c)", -DlgLstTypeUCase : "Nagybetűk (A, B, C)", -DlgLstTypeSRoman : "Kis római számok (i, ii, iii)", -DlgLstTypeLRoman : "Nagy római számok (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Ãltalános", -DlgDocBackTab : "Háttér", -DlgDocColorsTab : "Színek és margók", -DlgDocMetaTab : "Meta adatok", - -DlgDocPageTitle : "Oldalcím", -DlgDocLangDir : "Ãrás iránya", -DlgDocLangDirLTR : "Balról jobbra", -DlgDocLangDirRTL : "Jobbról balra", -DlgDocLangCode : "Nyelv kód", -DlgDocCharSet : "Karakterkódolás", -DlgDocCharSetCE : "Közép-Európai", -DlgDocCharSetCT : "Kínai Tradicionális (Big5)", -DlgDocCharSetCR : "Cyrill", -DlgDocCharSetGR : "Görög", -DlgDocCharSetJP : "Japán", -DlgDocCharSetKR : "Koreai", -DlgDocCharSetTR : "Török", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Nyugat-Európai", -DlgDocCharSetOther : "Más karakterkódolás", - -DlgDocDocType : "Dokumentum típus fejléc", -DlgDocDocTypeOther : "Más dokumentum típus fejléc", -DlgDocIncXHTML : "XHTML deklarációk beillesztése", -DlgDocBgColor : "Háttérszín", -DlgDocBgImage : "Háttérkép cím", -DlgDocBgNoScroll : "Nem gördíthetÅ‘ háttér", -DlgDocCText : "Szöveg", -DlgDocCLink : "Cím", -DlgDocCVisited : "Látogatott cím", -DlgDocCActive : "Aktív cím", -DlgDocMargins : "Oldal margók", -DlgDocMaTop : "FelsÅ‘", -DlgDocMaLeft : "Bal", -DlgDocMaRight : "Jobb", -DlgDocMaBottom : "Alsó", -DlgDocMeIndex : "Dokumentum keresÅ‘szavak (vesszÅ‘vel elválasztva)", -DlgDocMeDescr : "Dokumentum leírás", -DlgDocMeAuthor : "SzerzÅ‘", -DlgDocMeCopy : "SzerzÅ‘i jog", -DlgDocPreview : "ElÅ‘nézet", - -// Templates Dialog -Templates : "Sablonok", -DlgTemplatesTitle : "ElérhetÅ‘ sablonok", -DlgTemplatesSelMsg : "Válassza ki melyik sablon nyíljon meg a szerkesztÅ‘ben
    (a jelenlegi tartalom elveszik):", -DlgTemplatesLoading : "Sablon lista betöltése. Kis türelmet...", -DlgTemplatesNoTpl : "(Nincs sablon megadva)", -DlgTemplatesReplace : "Kicseréli a jelenlegi tartalmat", - -// About Dialog -DlgAboutAboutTab : "Névjegy", -DlgAboutBrowserInfoTab : "Böngésző információ", -DlgAboutLicenseTab : "Licensz", -DlgAboutVersion : "verzió", -DlgAboutInfo : "További információkért látogasson el ide:", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/it.js b/fckeditor/editor/lang/it.js deleted file mode 100644 index 8b59211c..00000000 --- a/fckeditor/editor/lang/it.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Italian language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Nascondi la barra degli strumenti", -ToolbarExpand : "Mostra la barra degli strumenti", - -// Toolbar Items and Context Menu -Save : "Salva", -NewPage : "Nuova pagina vuota", -Preview : "Anteprima", -Cut : "Taglia", -Copy : "Copia", -Paste : "Incolla", -PasteText : "Incolla come testo semplice", -PasteWord : "Incolla da Word", -Print : "Stampa", -SelectAll : "Seleziona tutto", -RemoveFormat : "Elimina formattazione", -InsertLinkLbl : "Collegamento", -InsertLink : "Inserisci/Modifica collegamento", -RemoveLink : "Elimina collegamento", -VisitLink : "Open Link", //MISSING -Anchor : "Inserisci/Modifica Ancora", -AnchorDelete : "Rimuovi Ancora", -InsertImageLbl : "Immagine", -InsertImage : "Inserisci/Modifica immagine", -InsertFlashLbl : "Oggetto Flash", -InsertFlash : "Inserisci/Modifica Oggetto Flash", -InsertTableLbl : "Tabella", -InsertTable : "Inserisci/Modifica tabella", -InsertLineLbl : "Riga orizzontale", -InsertLine : "Inserisci riga orizzontale", -InsertSpecialCharLbl: "Caratteri speciali", -InsertSpecialChar : "Inserisci carattere speciale", -InsertSmileyLbl : "Emoticon", -InsertSmiley : "Inserisci emoticon", -About : "Informazioni su FCKeditor", -Bold : "Grassetto", -Italic : "Corsivo", -Underline : "Sottolineato", -StrikeThrough : "Barrato", -Subscript : "Pedice", -Superscript : "Apice", -LeftJustify : "Allinea a sinistra", -CenterJustify : "Centra", -RightJustify : "Allinea a destra", -BlockJustify : "Giustifica", -DecreaseIndent : "Riduci rientro", -IncreaseIndent : "Aumenta rientro", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "Annulla", -Redo : "Ripristina", -NumberedListLbl : "Elenco numerato", -NumberedList : "Inserisci/Modifica elenco numerato", -BulletedListLbl : "Elenco puntato", -BulletedList : "Inserisci/Modifica elenco puntato", -ShowTableBorders : "Mostra bordi tabelle", -ShowDetails : "Mostra dettagli", -Style : "Stile", -FontFormat : "Formato", -Font : "Font", -FontSize : "Dimensione", -TextColor : "Colore testo", -BGColor : "Colore sfondo", -Source : "Codice Sorgente", -Find : "Trova", -Replace : "Sostituisci", -SpellCheck : "Correttore ortografico", -UniversalKeyboard : "Tastiera universale", -PageBreakLbl : "Interruzione di pagina", -PageBreak : "Inserisci interruzione di pagina", - -Form : "Modulo", -Checkbox : "Checkbox", -RadioButton : "Radio Button", -TextField : "Campo di testo", -Textarea : "Area di testo", -HiddenField : "Campo nascosto", -Button : "Bottone", -SelectionField : "Menu di selezione", -ImageButton : "Bottone immagine", - -FitWindow : "Massimizza l'area dell'editor", -ShowBlocks : "Visualizza Blocchi", - -// Context Menu -EditLink : "Modifica collegamento", -CellCM : "Cella", -RowCM : "Riga", -ColumnCM : "Colonna", -InsertRowAfter : "Inserisci Riga Dopo", -InsertRowBefore : "Inserisci Riga Prima", -DeleteRows : "Elimina righe", -InsertColumnAfter : "Inserisci Colonna Dopo", -InsertColumnBefore : "Inserisci Colonna Prima", -DeleteColumns : "Elimina colonne", -InsertCellAfter : "Inserisci Cella Dopo", -InsertCellBefore : "Inserisci Cella Prima", -DeleteCells : "Elimina celle", -MergeCells : "Unisce celle", -MergeRight : "Unisci a Destra", -MergeDown : "Unisci in Basso", -HorizontalSplitCell : "Dividi Cella Orizzontalmente", -VerticalSplitCell : "Dividi Cella Verticalmente", -TableDelete : "Cancella Tabella", -CellProperties : "Proprietà cella", -TableProperties : "Proprietà tabella", -ImageProperties : "Proprietà immagine", -FlashProperties : "Proprietà Oggetto Flash", - -AnchorProp : "Proprietà ancora", -ButtonProp : "Proprietà bottone", -CheckboxProp : "Proprietà checkbox", -HiddenFieldProp : "Proprietà campo nascosto", -RadioButtonProp : "Proprietà radio button", -ImageButtonProp : "Proprietà bottone immagine", -TextFieldProp : "Proprietà campo di testo", -SelectionFieldProp : "Proprietà menu di selezione", -TextareaProp : "Proprietà area di testo", -FormProp : "Proprietà modulo", - -FontFormats : "Normale;Formattato;Indirizzo;Titolo 1;Titolo 2;Titolo 3;Titolo 4;Titolo 5;Titolo 6;Paragrafo (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Elaborazione XHTML in corso. Attendere prego...", -Done : "Completato", -PasteWordConfirm : "Il testo da incollare sembra provenire da Word. Desideri pulirlo prima di incollare?", -NotCompatiblePaste : "Questa funzione è disponibile solo per Internet Explorer 5.5 o superiore. Desideri incollare il testo senza pulirlo?", -UnknownToolbarItem : "Elemento della barra strumenti sconosciuto \"%1\"", -UnknownCommand : "Comando sconosciuto \"%1\"", -NotImplemented : "Comando non implementato", -UnknownToolbarSet : "La barra di strumenti \"%1\" non esiste", -NoActiveX : "Le impostazioni di sicurezza del tuo browser potrebbero limitare alcune funzionalità dell'editor. Devi abilitare l'opzione \"Esegui controlli e plug-in ActiveX\". Potresti avere errori e notare funzionalità mancanti.", -BrowseServerBlocked : "Non è possibile aprire la finestra di espolorazione risorse. Verifica che tutti i blocca popup siano bloccati.", -DialogBlocked : "Non è possibile aprire la finestra di dialogo. Verifica che tutti i blocca popup siano bloccati.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Annulla", -DlgBtnClose : "Chiudi", -DlgBtnBrowseServer : "Cerca sul server", -DlgAdvancedTag : "Avanzate", -DlgOpOther : "", -DlgInfoTab : "Info", -DlgAlertUrl : "Devi inserire l'URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Direzione scrittura", -DlgGenLangDirLtr : "Da Sinistra a Destra (LTR)", -DlgGenLangDirRtl : "Da Destra a Sinistra (RTL)", -DlgGenLangCode : "Codice Lingua", -DlgGenAccessKey : "Scorciatoia
    da tastiera", -DlgGenName : "Nome", -DlgGenTabIndex : "Ordine di tabulazione", -DlgGenLongDescr : "URL descrizione estesa", -DlgGenClass : "Nome classe CSS", -DlgGenTitle : "Titolo", -DlgGenContType : "Tipo della risorsa collegata", -DlgGenLinkCharset : "Set di caretteri della risorsa collegata", -DlgGenStyle : "Stile", - -// Image Dialog -DlgImgTitle : "Proprietà immagine", -DlgImgInfoTab : "Informazioni immagine", -DlgImgBtnUpload : "Invia al server", -DlgImgURL : "URL", -DlgImgUpload : "Carica", -DlgImgAlt : "Testo alternativo", -DlgImgWidth : "Larghezza", -DlgImgHeight : "Altezza", -DlgImgLockRatio : "Blocca rapporto", -DlgBtnResetSize : "Reimposta dimensione", -DlgImgBorder : "Bordo", -DlgImgHSpace : "HSpace", -DlgImgVSpace : "VSpace", -DlgImgAlign : "Allineamento", -DlgImgAlignLeft : "Sinistra", -DlgImgAlignAbsBottom: "In basso assoluto", -DlgImgAlignAbsMiddle: "Centrato assoluto", -DlgImgAlignBaseline : "Linea base", -DlgImgAlignBottom : "In Basso", -DlgImgAlignMiddle : "Centrato", -DlgImgAlignRight : "Destra", -DlgImgAlignTextTop : "In alto al testo", -DlgImgAlignTop : "In Alto", -DlgImgPreview : "Anteprima", -DlgImgAlertUrl : "Devi inserire l'URL per l'immagine", -DlgImgLinkTab : "Collegamento", - -// Flash Dialog -DlgFlashTitle : "Proprietà Oggetto Flash", -DlgFlashChkPlay : "Avvio Automatico", -DlgFlashChkLoop : "Cicla", -DlgFlashChkMenu : "Abilita Menu di Flash", -DlgFlashScale : "Ridimensiona", -DlgFlashScaleAll : "Mostra Tutto", -DlgFlashScaleNoBorder : "Senza Bordo", -DlgFlashScaleFit : "Dimensione Esatta", - -// Link Dialog -DlgLnkWindowTitle : "Collegamento", -DlgLnkInfoTab : "Informazioni collegamento", -DlgLnkTargetTab : "Destinazione", - -DlgLnkType : "Tipo di Collegamento", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "Ancora nella pagina", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "Protocollo", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Scegli Ancora", -DlgLnkAnchorByName : "Per Nome", -DlgLnkAnchorById : "Per id elemento", -DlgLnkNoAnchors : "(Nessuna ancora disponibile nel documento)", -DlgLnkEMail : "Indirizzo E-Mail", -DlgLnkEMailSubject : "Oggetto del messaggio", -DlgLnkEMailBody : "Corpo del messaggio", -DlgLnkUpload : "Carica", -DlgLnkBtnUpload : "Invia al Server", - -DlgLnkTarget : "Destinazione", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Nuova finestra (_blank)", -DlgLnkTargetParent : "Finestra padre (_parent)", -DlgLnkTargetSelf : "Stessa finestra (_self)", -DlgLnkTargetTop : "Finestra superiore (_top)", -DlgLnkTargetFrameName : "Nome del riquadro di destinazione", -DlgLnkPopWinName : "Nome finestra popup", -DlgLnkPopWinFeat : "Caratteristiche finestra popup", -DlgLnkPopResize : "Ridimensionabile", -DlgLnkPopLocation : "Barra degli indirizzi", -DlgLnkPopMenu : "Barra del menu", -DlgLnkPopScroll : "Barre di scorrimento", -DlgLnkPopStatus : "Barra di stato", -DlgLnkPopToolbar : "Barra degli strumenti", -DlgLnkPopFullScrn : "A tutto schermo (IE)", -DlgLnkPopDependent : "Dipendente (Netscape)", -DlgLnkPopWidth : "Larghezza", -DlgLnkPopHeight : "Altezza", -DlgLnkPopLeft : "Posizione da sinistra", -DlgLnkPopTop : "Posizione dall'alto", - -DlnLnkMsgNoUrl : "Devi inserire l'URL del collegamento", -DlnLnkMsgNoEMail : "Devi inserire un'indirizzo e-mail", -DlnLnkMsgNoAnchor : "Devi selezionare un'ancora", -DlnLnkMsgInvPopName : "Il nome del popup deve iniziare con una lettera, e non può contenere spazi", - -// Color Dialog -DlgColorTitle : "Seleziona colore", -DlgColorBtnClear : "Vuota", -DlgColorHighlight : "Evidenziato", -DlgColorSelected : "Selezionato", - -// Smiley Dialog -DlgSmileyTitle : "Inserisci emoticon", - -// Special Character Dialog -DlgSpecialCharTitle : "Seleziona carattere speciale", - -// Table Dialog -DlgTableTitle : "Proprietà tabella", -DlgTableRows : "Righe", -DlgTableColumns : "Colonne", -DlgTableBorder : "Dimensione bordo", -DlgTableAlign : "Allineamento", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "Sinistra", -DlgTableAlignCenter : "Centrato", -DlgTableAlignRight : "Destra", -DlgTableWidth : "Larghezza", -DlgTableWidthPx : "pixel", -DlgTableWidthPc : "percento", -DlgTableHeight : "Altezza", -DlgTableCellSpace : "Spaziatura celle", -DlgTableCellPad : "Padding celle", -DlgTableCaption : "Intestazione", -DlgTableSummary : "Indice", - -// Table Cell Dialog -DlgCellTitle : "Proprietà cella", -DlgCellWidth : "Larghezza", -DlgCellWidthPx : "pixel", -DlgCellWidthPc : "percento", -DlgCellHeight : "Altezza", -DlgCellWordWrap : "A capo automatico", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Si", -DlgCellWordWrapNo : "No", -DlgCellHorAlign : "Allineamento orizzontale", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "Sinistra", -DlgCellHorAlignCenter : "Centrato", -DlgCellHorAlignRight: "Destra", -DlgCellVerAlign : "Allineamento verticale", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "In Alto", -DlgCellVerAlignMiddle : "Centrato", -DlgCellVerAlignBottom : "In Basso", -DlgCellVerAlignBaseline : "Linea base", -DlgCellRowSpan : "Righe occupate", -DlgCellCollSpan : "Colonne occupate", -DlgCellBackColor : "Colore sfondo", -DlgCellBorderColor : "Colore bordo", -DlgCellBtnSelect : "Scegli...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Cerca e Sostituisci", - -// Find Dialog -DlgFindTitle : "Trova", -DlgFindFindBtn : "Trova", -DlgFindNotFoundMsg : "L'elemento cercato non è stato trovato.", - -// Replace Dialog -DlgReplaceTitle : "Sostituisci", -DlgReplaceFindLbl : "Trova:", -DlgReplaceReplaceLbl : "Sostituisci con:", -DlgReplaceCaseChk : "Maiuscole/minuscole", -DlgReplaceReplaceBtn : "Sostituisci", -DlgReplaceReplAllBtn : "Sostituisci tutto", -DlgReplaceWordChk : "Solo parole intere", - -// Paste Operations / Dialog -PasteErrorCut : "Le impostazioni di sicurezza del browser non permettono di tagliare automaticamente il testo. Usa la tastiera (Ctrl+X).", -PasteErrorCopy : "Le impostazioni di sicurezza del browser non permettono di copiare automaticamente il testo. Usa la tastiera (Ctrl+C).", - -PasteAsText : "Incolla come testo semplice", -PasteFromWord : "Incolla da Word", - -DlgPasteMsg2 : "Incolla il testo all'interno dell'area sottostante usando la scorciatoia di tastiere (Ctrl+V) e premi OK.", -DlgPasteSec : "A causa delle impostazioni di sicurezza del browser,l'editor non è in grado di accedere direttamente agli appunti. E' pertanto necessario incollarli di nuovo in questa finestra.", -DlgPasteIgnoreFont : "Ignora le definizioni di Font", -DlgPasteRemoveStyles : "Rimuovi le definizioni di Stile", - -// Color Picker -ColorAutomatic : "Automatico", -ColorMoreColors : "Altri colori...", - -// Document Properties -DocProps : "Proprietà del Documento", - -// Anchor Dialog -DlgAnchorTitle : "Proprietà ancora", -DlgAnchorName : "Nome ancora", -DlgAnchorErrorName : "Inserici il nome dell'ancora", - -// Speller Pages Dialog -DlgSpellNotInDic : "Non nel dizionario", -DlgSpellChangeTo : "Cambia in", -DlgSpellBtnIgnore : "Ignora", -DlgSpellBtnIgnoreAll : "Ignora tutto", -DlgSpellBtnReplace : "Cambia", -DlgSpellBtnReplaceAll : "Cambia tutto", -DlgSpellBtnUndo : "Annulla", -DlgSpellNoSuggestions : "- Nessun suggerimento -", -DlgSpellProgress : "Controllo ortografico in corso", -DlgSpellNoMispell : "Controllo ortografico completato: nessun errore trovato", -DlgSpellNoChanges : "Controllo ortografico completato: nessuna parola cambiata", -DlgSpellOneChange : "Controllo ortografico completato: 1 parola cambiata", -DlgSpellManyChanges : "Controllo ortografico completato: %1 parole cambiate", - -IeSpellDownload : "Contollo ortografico non installato. Lo vuoi scaricare ora?", - -// Button Dialog -DlgButtonText : "Testo (Value)", -DlgButtonType : "Tipo", -DlgButtonTypeBtn : "Bottone", -DlgButtonTypeSbm : "Invio", -DlgButtonTypeRst : "Annulla", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Nome", -DlgCheckboxValue : "Valore", -DlgCheckboxSelected : "Selezionato", - -// Form Dialog -DlgFormName : "Nome", -DlgFormAction : "Azione", -DlgFormMethod : "Metodo", - -// Select Field Dialog -DlgSelectName : "Nome", -DlgSelectValue : "Valore", -DlgSelectSize : "Dimensione", -DlgSelectLines : "righe", -DlgSelectChkMulti : "Permetti selezione multipla", -DlgSelectOpAvail : "Opzioni disponibili", -DlgSelectOpText : "Testo", -DlgSelectOpValue : "Valore", -DlgSelectBtnAdd : "Aggiungi", -DlgSelectBtnModify : "Modifica", -DlgSelectBtnUp : "Su", -DlgSelectBtnDown : "Gi", -DlgSelectBtnSetValue : "Imposta come predefinito", -DlgSelectBtnDelete : "Rimuovi", - -// Textarea Dialog -DlgTextareaName : "Nome", -DlgTextareaCols : "Colonne", -DlgTextareaRows : "Righe", - -// Text Field Dialog -DlgTextName : "Nome", -DlgTextValue : "Valore", -DlgTextCharWidth : "Larghezza", -DlgTextMaxChars : "Numero massimo di caratteri", -DlgTextType : "Tipo", -DlgTextTypeText : "Testo", -DlgTextTypePass : "Password", - -// Hidden Field Dialog -DlgHiddenName : "Nome", -DlgHiddenValue : "Valore", - -// Bulleted List Dialog -BulletedListProp : "Proprietà lista puntata", -NumberedListProp : "Proprietà lista numerata", -DlgLstStart : "Inizio", -DlgLstType : "Tipo", -DlgLstTypeCircle : "Tondo", -DlgLstTypeDisc : "Disco", -DlgLstTypeSquare : "Quadrato", -DlgLstTypeNumbers : "Numeri (1, 2, 3)", -DlgLstTypeLCase : "Caratteri minuscoli (a, b, c)", -DlgLstTypeUCase : "Caratteri maiuscoli (A, B, C)", -DlgLstTypeSRoman : "Numeri Romani minuscoli (i, ii, iii)", -DlgLstTypeLRoman : "Numeri Romani maiuscoli (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Genarale", -DlgDocBackTab : "Sfondo", -DlgDocColorsTab : "Colori e margini", -DlgDocMetaTab : "Meta Data", - -DlgDocPageTitle : "Titolo pagina", -DlgDocLangDir : "Direzione scrittura", -DlgDocLangDirLTR : "Da Sinistra a Destra (LTR)", -DlgDocLangDirRTL : "Da Destra a Sinistra (RTL)", -DlgDocLangCode : "Codice Lingua", -DlgDocCharSet : "Set di caretteri", -DlgDocCharSetCE : "Europa Centrale", -DlgDocCharSetCT : "Cinese Tradizionale (Big5)", -DlgDocCharSetCR : "Cirillico", -DlgDocCharSetGR : "Greco", -DlgDocCharSetJP : "Giapponese", -DlgDocCharSetKR : "Coreano", -DlgDocCharSetTR : "Turco", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Europa Occidentale", -DlgDocCharSetOther : "Altro set di caretteri", - -DlgDocDocType : "Intestazione DocType", -DlgDocDocTypeOther : "Altra intestazione DocType", -DlgDocIncXHTML : "Includi dichiarazione XHTML", -DlgDocBgColor : "Colore di sfondo", -DlgDocBgImage : "Immagine di sfondo", -DlgDocBgNoScroll : "Sfondo fissato", -DlgDocCText : "Testo", -DlgDocCLink : "Collegamento", -DlgDocCVisited : "Collegamento visitato", -DlgDocCActive : "Collegamento attivo", -DlgDocMargins : "Margini", -DlgDocMaTop : "In Alto", -DlgDocMaLeft : "A Sinistra", -DlgDocMaRight : "A Destra", -DlgDocMaBottom : "In Basso", -DlgDocMeIndex : "Chiavi di indicizzazione documento (separate da virgola)", -DlgDocMeDescr : "Descrizione documento", -DlgDocMeAuthor : "Autore", -DlgDocMeCopy : "Copyright", -DlgDocPreview : "Anteprima", - -// Templates Dialog -Templates : "Modelli", -DlgTemplatesTitle : "Contenuto dei modelli", -DlgTemplatesSelMsg : "Seleziona il modello da aprire nell'editor
    (il contenuto attuale verrà eliminato):", -DlgTemplatesLoading : "Caricamento modelli in corso. Attendere prego...", -DlgTemplatesNoTpl : "(Nessun modello definito)", -DlgTemplatesReplace : "Cancella il contenuto corrente", - -// About Dialog -DlgAboutAboutTab : "Informazioni", -DlgAboutBrowserInfoTab : "Informazioni Browser", -DlgAboutLicenseTab : "Licenza", -DlgAboutVersion : "versione", -DlgAboutInfo : "Per maggiori informazioni visitare", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/ja.js b/fckeditor/editor/lang/ja.js deleted file mode 100644 index 9f0cffa6..00000000 --- a/fckeditor/editor/lang/ja.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Japanese language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "ツールãƒãƒ¼ã‚’éš ã™", -ToolbarExpand : "ツールãƒãƒ¼ã‚’表示", - -// Toolbar Items and Context Menu -Save : "ä¿å­˜", -NewPage : "æ–°ã—ã„ページ", -Preview : "プレビュー", -Cut : "切りå–り", -Copy : "コピー", -Paste : "貼り付ã‘", -PasteText : "プレーンテキスト貼り付ã‘", -PasteWord : "ワード文章ã‹ã‚‰è²¼ã‚Šä»˜ã‘", -Print : "å°åˆ·", -SelectAll : "ã™ã¹ã¦é¸æŠž", -RemoveFormat : "フォーマット削除", -InsertLinkLbl : "リンク", -InsertLink : "リンク挿入/編集", -RemoveLink : "リンク削除", -VisitLink : "リンクを開ã", -Anchor : "アンカー挿入/編集", -AnchorDelete : "アンカー削除", -InsertImageLbl : "イメージ", -InsertImage : "イメージ挿入/編集", -InsertFlashLbl : "Flash", -InsertFlash : "Flash挿入/編集", -InsertTableLbl : "テーブル", -InsertTable : "テーブル挿入/編集", -InsertLineLbl : "ライン", -InsertLine : "横罫線", -InsertSpecialCharLbl: "特殊文字", -InsertSpecialChar : "特殊文字挿入", -InsertSmileyLbl : "絵文字", -InsertSmiley : "絵文字挿入", -About : "FCKeditorヘルプ", -Bold : "太字", -Italic : "斜体", -Underline : "下線", -StrikeThrough : "æ‰“ã¡æ¶ˆã—ç·š", -Subscript : "æ·»ãˆå­—", -Superscript : "ä¸Šä»˜ãæ–‡å­—", -LeftJustify : "å·¦æƒãˆ", -CenterJustify : "中央æƒãˆ", -RightJustify : "峿ƒãˆ", -BlockJustify : "両端æƒãˆ", -DecreaseIndent : "インデント解除", -IncreaseIndent : "インデント", -Blockquote : "ブロック引用", -CreateDiv : "Div 作æˆ", -EditDiv : "Div 編集", -DeleteDiv : "Div 削除", -Undo : "å…ƒã«æˆ»ã™", -Redo : "やり直ã—", -NumberedListLbl : "段è½ç•ªå·", -NumberedList : "段è½ç•ªå·ã®è¿½åŠ /削除", -BulletedListLbl : "ç®‡æ¡æ›¸ã", -BulletedList : "ç®‡æ¡æ›¸ãã®è¿½åŠ /削除", -ShowTableBorders : "テーブルボーダー表示", -ShowDetails : "詳細表示", -Style : "スタイル", -FontFormat : "フォーマット", -Font : "フォント", -FontSize : "サイズ", -TextColor : "テキスト色", -BGColor : "背景色", -Source : "ソース", -Find : "検索", -Replace : "ç½®ãæ›ãˆ", -SpellCheck : "スペルãƒã‚§ãƒƒã‚¯", -UniversalKeyboard : "ユニãƒãƒ¼ã‚µãƒ«ãƒ»ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰", -PageBreakLbl : "改ページ", -PageBreak : "改ページ挿入", - -Form : "フォーム", -Checkbox : "ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹", -RadioButton : "ラジオボタン", -TextField : "1行テキスト", -Textarea : "テキストエリア", -HiddenField : "ä¸å¯è¦–フィールド", -Button : "ボタン", -SelectionField : "é¸æŠžãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰", -ImageButton : "ç”»åƒãƒœã‚¿ãƒ³", - -FitWindow : "エディタサイズを最大ã«ã—ã¾ã™", -ShowBlocks : "ブロック表示", - -// Context Menu -EditLink : "リンク編集", -CellCM : "セル", -RowCM : "行", -ColumnCM : "カラム", -InsertRowAfter : "列ã®å¾Œã«æŒ¿å…¥", -InsertRowBefore : "列ã®å‰ã«æŒ¿å…¥", -DeleteRows : "行削除", -InsertColumnAfter : "カラムã®å¾Œã«æŒ¿å…¥", -InsertColumnBefore : "カラムã®å‰ã«æŒ¿å…¥", -DeleteColumns : "列削除", -InsertCellAfter : "セルã®å¾Œã«æŒ¿å…¥", -InsertCellBefore : "セルã®å‰ã«æŒ¿å…¥", -DeleteCells : "セル削除", -MergeCells : "セルçµåˆ", -MergeRight : "å³ã«çµåˆ", -MergeDown : "下ã«çµåˆ", -HorizontalSplitCell : "セルを水平方å‘分割", -VerticalSplitCell : "セルを垂直方å‘ã«åˆ†å‰²", -TableDelete : "テーブル削除", -CellProperties : "セル プロパティ", -TableProperties : "テーブル プロパティ", -ImageProperties : "イメージ プロパティ", -FlashProperties : "Flash プロパティ", - -AnchorProp : "アンカー プロパティ", -ButtonProp : "ボタン プロパティ", -CheckboxProp : "ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ プロパティ", -HiddenFieldProp : "ä¸å¯è¦–フィールド プロパティ", -RadioButtonProp : "ラジオボタン プロパティ", -ImageButtonProp : "ç”»åƒãƒœã‚¿ãƒ³ プロパティ", -TextFieldProp : "1行テキスト プロパティ", -SelectionFieldProp : "é¸æŠžãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ プロパティ", -TextareaProp : "テキストエリア プロパティ", -FormProp : "フォーム プロパティ", - -FontFormats : "標準;書å¼ä»˜ã;アドレス;見出㗠1;見出㗠2;見出㗠3;見出㗠4;見出㗠5;見出㗠6;標準 (DIV)", - -// Alerts and Messages -ProcessingXHTML : "XHTML処ç†ä¸­. ã—ã°ã‚‰ããŠå¾…ã¡ãã ã•ã„...", -Done : "完了", -PasteWordConfirm : "貼り付ã‘を行ã†ãƒ†ã‚­ã‚¹ãƒˆã¯ã€ãƒ¯ãƒ¼ãƒ‰æ–‡ç« ã‹ã‚‰ã‚³ãƒ”ーã•れよã†ã¨ã—ã¦ã„ã¾ã™ã€‚貼り付ã‘ã‚‹å‰ã«ã‚¯ãƒªãƒ¼ãƒ‹ãƒ³ã‚°ã‚’行ã„ã¾ã™ã‹ï¼Ÿ", -NotCompatiblePaste : "ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆãƒ»ã‚¨ã‚¯ã‚¹ãƒ—ローラーãƒãƒ¼ã‚¸ãƒ§ãƒ³5.5以上ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚クリーニングã—ãªã„ã§è²¼ã‚Šä»˜ã‘を行ã„ã¾ã™ã‹ï¼Ÿ", -UnknownToolbarItem : "未知ã®ãƒ„ールãƒãƒ¼é …ç›® \"%1\"", -UnknownCommand : "未知ã®ã‚³ãƒžãƒ³ãƒ‰å \"%1\"", -NotImplemented : "コマンドã¯ã‚¤ãƒ³ãƒ—リメントã•れã¾ã›ã‚“ã§ã—ãŸã€‚", -UnknownToolbarSet : "ツールãƒãƒ¼è¨­å®š \"%1\" 存在ã—ã¾ã›ã‚“。", -NoActiveX : "エラーã€è­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãªã©ãŒç™ºç”Ÿã—ãŸå ´åˆã€ãƒ–ラウザーã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šã«ã‚ˆã‚Šã‚¨ãƒ‡ã‚£ã‚¿ã®ã„ãã¤ã‹ã®æ©Ÿèƒ½ãŒåˆ¶é™ã•れã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚セキュリティ設定ã®ã‚ªãƒ—ションã§\"ActiveXコントロールã¨ãƒ—ラグインã®å®Ÿè¡Œ\"を有効ã«ã™ã‚‹ã«ã—ã¦ãã ã•ã„。", -BrowseServerBlocked : "サーãƒãƒ¼ãƒ–ラウザーを開ãã“ã¨ãŒã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ãƒãƒƒãƒ—アップ・ブロック機能ãŒç„¡åйã«ãªã£ã¦ã„ã‚‹ã‹ç¢ºèªã—ã¦ãã ã•ã„。", -DialogBlocked : "ダイアログウィンドウを開ãã“ã¨ãŒã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ãƒãƒƒãƒ—アップ・ブロック機能ãŒç„¡åйã«ãªã£ã¦ã„ã‚‹ã‹ç¢ºèªã—ã¦ãã ã•ã„。", -VisitLinkBlocked : "æ–°ã—ã„ウィンドウを開ãã“ã¨ãŒã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ãƒãƒƒãƒ—アップ・ブロック機能ãŒç„¡åйã«ãªã£ã¦ã„ã‚‹ã‹ç¢ºèªã—ã¦ãã ã•ã„。", - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "キャンセル", -DlgBtnClose : "é–‰ã˜ã‚‹", -DlgBtnBrowseServer : "サーãƒãƒ¼ãƒ–ラウザー", -DlgAdvancedTag : "高度ãªè¨­å®š", -DlgOpOther : "<ãã®ä»–>", -DlgInfoTab : "情報", -DlgAlertUrl : "URLを挿入ã—ã¦ãã ã•ã„", - -// General Dialogs Labels -DlgGenNotSet : "<ãªã—>", -DlgGenId : "Id", -DlgGenLangDir : "æ–‡å­—è¡¨è¨˜ã®æ–¹å‘", -DlgGenLangDirLtr : "å·¦ã‹ã‚‰å³ (LTR)", -DlgGenLangDirRtl : "å³ã‹ã‚‰å·¦ (RTL)", -DlgGenLangCode : "言語コード", -DlgGenAccessKey : "アクセスキー", -DlgGenName : "Name属性", -DlgGenTabIndex : "タブインデックス", -DlgGenLongDescr : "longdesc属性(長文説明)", -DlgGenClass : "スタイルシートクラス", -DlgGenTitle : "Title属性", -DlgGenContType : "Content Type属性", -DlgGenLinkCharset : "リンクcharset属性", -DlgGenStyle : "スタイルシート", - -// Image Dialog -DlgImgTitle : "イメージ プロパティ", -DlgImgInfoTab : "イメージ 情報", -DlgImgBtnUpload : "サーãƒãƒ¼ã«é€ä¿¡", -DlgImgURL : "URL", -DlgImgUpload : "アップロード", -DlgImgAlt : "代替テキスト", -DlgImgWidth : "å¹…", -DlgImgHeight : "高ã•", -DlgImgLockRatio : "ロック比率", -DlgBtnResetSize : "サイズリセット", -DlgImgBorder : "ボーダー", -DlgImgHSpace : "横間隔", -DlgImgVSpace : "縦間隔", -DlgImgAlign : "行æƒãˆ", -DlgImgAlignLeft : "å·¦", -DlgImgAlignAbsBottom: "下部(絶対的)", -DlgImgAlignAbsMiddle: "中央(絶対的)", -DlgImgAlignBaseline : "ベースライン", -DlgImgAlignBottom : "下", -DlgImgAlignMiddle : "中央", -DlgImgAlignRight : "å³", -DlgImgAlignTextTop : "テキスト上部", -DlgImgAlignTop : "上", -DlgImgPreview : "プレビュー", -DlgImgAlertUrl : "イメージã®URLを入力ã—ã¦ãã ã•ã„。", -DlgImgLinkTab : "リンク", - -// Flash Dialog -DlgFlashTitle : "Flash プロパティ", -DlgFlashChkPlay : "å†ç”Ÿ", -DlgFlashChkLoop : "ループå†ç”Ÿ", -DlgFlashChkMenu : "Flashメニューå¯èƒ½", -DlgFlashScale : "拡大縮å°è¨­å®š", -DlgFlashScaleAll : "ã™ã¹ã¦è¡¨ç¤º", -DlgFlashScaleNoBorder : "外ãŒè¦‹ãˆãªã„æ§˜ã«æ‹¡å¤§", -DlgFlashScaleFit : "上下左å³ã«ãƒ•ィット", - -// Link Dialog -DlgLnkWindowTitle : "ãƒã‚¤ãƒ‘ーリンク", -DlgLnkInfoTab : "ãƒã‚¤ãƒ‘ーリンク 情報", -DlgLnkTargetTab : "ターゲット", - -DlgLnkType : "リンクタイプ", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "ã“ã®ãƒšãƒ¼ã‚¸ã®ã‚¢ãƒ³ã‚«ãƒ¼", -DlgLnkTypeEMail : "E-Mail", -DlgLnkProto : "プロトコル", -DlgLnkProtoOther : "<ãã®ä»–>", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "ã‚¢ãƒ³ã‚«ãƒ¼ã‚’é¸æŠž", -DlgLnkAnchorByName : "アンカーå", -DlgLnkAnchorById : "エレメントID", -DlgLnkNoAnchors : "(ドキュメントã«ãŠã„ã¦åˆ©ç”¨å¯èƒ½ãªã‚¢ãƒ³ã‚«ãƒ¼ã¯ã‚りã¾ã›ã‚“。)", -DlgLnkEMail : "E-Mail アドレス", -DlgLnkEMailSubject : "ä»¶å", -DlgLnkEMailBody : "本文", -DlgLnkUpload : "アップロード", -DlgLnkBtnUpload : "サーãƒãƒ¼ã«é€ä¿¡", - -DlgLnkTarget : "ターゲット", -DlgLnkTargetFrame : "<フレーム>", -DlgLnkTargetPopup : "<ãƒãƒƒãƒ—アップウィンドウ>", -DlgLnkTargetBlank : "æ–°ã—ã„ウィンドウ (_blank)", -DlgLnkTargetParent : "親ウィンドウ (_parent)", -DlgLnkTargetSelf : "åŒã˜ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ (_self)", -DlgLnkTargetTop : "最上ä½ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ (_top)", -DlgLnkTargetFrameName : "目的ã®ãƒ•レームå", -DlgLnkPopWinName : "ãƒãƒƒãƒ—アップウィンドウå", -DlgLnkPopWinFeat : "ãƒãƒƒãƒ—アップウィンドウ特徴", -DlgLnkPopResize : "リサイズå¯èƒ½", -DlgLnkPopLocation : "ロケーションãƒãƒ¼", -DlgLnkPopMenu : "メニューãƒãƒ¼", -DlgLnkPopScroll : "スクロールãƒãƒ¼", -DlgLnkPopStatus : "ステータスãƒãƒ¼", -DlgLnkPopToolbar : "ツールãƒãƒ¼", -DlgLnkPopFullScrn : "全画é¢ãƒ¢ãƒ¼ãƒ‰(IE)", -DlgLnkPopDependent : "é–‹ã„ãŸã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«é€£å‹•ã—ã¦é–‰ã˜ã‚‹ (Netscape)", -DlgLnkPopWidth : "å¹…", -DlgLnkPopHeight : "高ã•", -DlgLnkPopLeft : "左端ã‹ã‚‰ã®åº§æ¨™ã§æŒ‡å®š", -DlgLnkPopTop : "上端ã‹ã‚‰ã®åº§æ¨™ã§æŒ‡å®š", - -DlnLnkMsgNoUrl : "リンクURLを入力ã—ã¦ãã ã•ã„。", -DlnLnkMsgNoEMail : "メールアドレスを入力ã—ã¦ãã ã•ã„。", -DlnLnkMsgNoAnchor : "ã‚¢ãƒ³ã‚«ãƒ¼ã‚’é¸æŠžã—ã¦ãã ã•ã„。", -DlnLnkMsgInvPopName : "ãƒãƒƒãƒ—・アップåã¯è‹±å­—ã§å§‹ã¾ã‚‹æ–‡å­—ã§æŒ‡å®šã—ã¦ãã ã„。ãƒãƒƒãƒ—・アップåã«ã‚¹ãƒšãƒ¼ã‚¹ã¯å«ã‚ã¾ã›ã‚“", - -// Color Dialog -DlgColorTitle : "è‰²é¸æŠž", -DlgColorBtnClear : "クリア", -DlgColorHighlight : "ãƒã‚¤ãƒ©ã‚¤ãƒˆ", -DlgColorSelected : "é¸æŠžè‰²", - -// Smiley Dialog -DlgSmileyTitle : "顔文字挿入", - -// Special Character Dialog -DlgSpecialCharTitle : "ç‰¹æ®Šæ–‡å­—é¸æŠž", - -// Table Dialog -DlgTableTitle : "テーブル プロパティ", -DlgTableRows : "行", -DlgTableColumns : "列", -DlgTableBorder : "ボーダーサイズ", -DlgTableAlign : "ã‚­ãƒ£ãƒ—ã‚·ãƒ§ãƒ³ã®æ•´åˆ—", -DlgTableAlignNotSet : "<ãªã—>", -DlgTableAlignLeft : "å·¦", -DlgTableAlignCenter : "中央", -DlgTableAlignRight : "å³", -DlgTableWidth : "テーブル幅", -DlgTableWidthPx : "ピクセル", -DlgTableWidthPc : "パーセント", -DlgTableHeight : "テーブル高ã•", -DlgTableCellSpace : "セル内余白", -DlgTableCellPad : "セル内間隔", -DlgTableCaption : "キャプショï¾", -DlgTableSummary : "テーブル目的/構造", - -// Table Cell Dialog -DlgCellTitle : "セル プロパティ", -DlgCellWidth : "å¹…", -DlgCellWidthPx : "ピクセル", -DlgCellWidthPc : "パーセント", -DlgCellHeight : "高ã•", -DlgCellWordWrap : "折り返ã—", -DlgCellWordWrapNotSet : "<ãªã—>", -DlgCellWordWrapYes : "Yes", -DlgCellWordWrapNo : "No", -DlgCellHorAlign : "ã‚»ãƒ«æ¨ªã®æ•´åˆ—", -DlgCellHorAlignNotSet : "<ãªã—>", -DlgCellHorAlignLeft : "å·¦", -DlgCellHorAlignCenter : "中央", -DlgCellHorAlignRight: "å³", -DlgCellVerAlign : "ã‚»ãƒ«ç¸¦ã®æ•´åˆ—", -DlgCellVerAlignNotSet : "<ãªã—>", -DlgCellVerAlignTop : "上", -DlgCellVerAlignMiddle : "中央", -DlgCellVerAlignBottom : "下", -DlgCellVerAlignBaseline : "ベースライン", -DlgCellRowSpan : "縦幅(行数)", -DlgCellCollSpan : "横幅(列数)", -DlgCellBackColor : "背景色", -DlgCellBorderColor : "ボーダーカラー", -DlgCellBtnSelect : "é¸æŠž...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "検索ã—ã¦ç½®æ›", - -// Find Dialog -DlgFindTitle : "検索", -DlgFindFindBtn : "検索", -DlgFindNotFoundMsg : "指定ã•ã‚ŒãŸæ–‡å­—列ã¯è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚", - -// Replace Dialog -DlgReplaceTitle : "ç½®ãæ›ãˆ", -DlgReplaceFindLbl : "検索ã™ã‚‹æ–‡å­—列:", -DlgReplaceReplaceLbl : "ç½®æ›ãˆã™ã‚‹æ–‡å­—列:", -DlgReplaceCaseChk : "部分一致", -DlgReplaceReplaceBtn : "ç½®æ›ãˆ", -DlgReplaceReplAllBtn : "ã™ã¹ã¦ç½®æ›ãˆ", -DlgReplaceWordChk : "å˜èªžå˜ä½ã§ä¸€è‡´", - -// Paste Operations / Dialog -PasteErrorCut : "ブラウザーã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šã«ã‚ˆã‚Šã‚¨ãƒ‡ã‚£ã‚¿ã®åˆ‡ã‚Šå–りæ“作ãŒè‡ªå‹•ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。実行ã™ã‚‹ã«ã¯æ‰‹å‹•ã§ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã®(Ctrl+X)を使用ã—ã¦ãã ã•ã„。", -PasteErrorCopy : "ブラウザーã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šã«ã‚ˆã‚Šã‚¨ãƒ‡ã‚£ã‚¿ã®ã‚³ãƒ”ーæ“作ãŒè‡ªå‹•ã§å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。実行ã™ã‚‹ã«ã¯æ‰‹å‹•ã§ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã®(Ctrl+C)を使用ã—ã¦ãã ã•ã„。", - -PasteAsText : "プレーンテキスト貼り付ã‘", -PasteFromWord : "ワード文章ã‹ã‚‰è²¼ã‚Šä»˜ã‘", - -DlgPasteMsg2 : "キーボード(Ctrl+V)を使用ã—ã¦ã€æ¬¡ã®å…¥åŠ›ã‚¨ãƒªã‚¢å†…ã§è²¼ã£ã¦ã€OKを押ã—ã¦ãã ã•ã„。", -DlgPasteSec : "ブラウザã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šã«ã‚ˆã‚Šã€ã‚¨ãƒ‡ã‚£ã‚¿ã¯ã‚¯ãƒªãƒƒãƒ—ボード・データã«ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯è²¼ã‚Šä»˜ã‘æ“作を行ã†åº¦ã«è¡¨ç¤ºã•れã¾ã™ã€‚", -DlgPasteIgnoreFont : "Fontã‚¿ã‚°ã®Face属性を無視ã—ã¾ã™ã€‚", -DlgPasteRemoveStyles : "スタイル定義を削除ã—ã¾ã™ã€‚", - -// Color Picker -ColorAutomatic : "自動", -ColorMoreColors : "ãã®ä»–ã®è‰²...", - -// Document Properties -DocProps : "文書 プロパティ", - -// Anchor Dialog -DlgAnchorTitle : "アンカー プロパティ", -DlgAnchorName : "アンカーå", -DlgAnchorErrorName : "アンカーåã‚’å¿…ãšå…¥åŠ›ã—ã¦ãã ã•ã„。", - -// Speller Pages Dialog -DlgSpellNotInDic : "辞書ã«ã‚りã¾ã›ã‚“", -DlgSpellChangeTo : "変更", -DlgSpellBtnIgnore : "無視", -DlgSpellBtnIgnoreAll : "ã™ã¹ã¦ç„¡è¦–", -DlgSpellBtnReplace : "ç½®æ›", -DlgSpellBtnReplaceAll : "ã™ã¹ã¦ç½®æ›", -DlgSpellBtnUndo : "やり直ã—", -DlgSpellNoSuggestions : "- 該当ãªã— -", -DlgSpellProgress : "スペルãƒã‚§ãƒƒã‚¯å‡¦ç†ä¸­...", -DlgSpellNoMispell : "スペルãƒã‚§ãƒƒã‚¯å®Œäº†: スペルã®èª¤ã‚Šã¯ã‚りã¾ã›ã‚“ã§ã—ãŸ", -DlgSpellNoChanges : "スペルãƒã‚§ãƒƒã‚¯å®Œäº†: 語å¥ã¯å¤‰æ›´ã•れã¾ã›ã‚“ã§ã—ãŸ", -DlgSpellOneChange : "スペルãƒã‚§ãƒƒã‚¯å®Œäº†: 1語å¥å¤‰æ›´ã•れã¾ã—ãŸ", -DlgSpellManyChanges : "スペルãƒã‚§ãƒƒã‚¯å®Œäº†: %1 語å¥å¤‰æ›´ã•れã¾ã—ãŸ", - -IeSpellDownload : "スペルãƒã‚§ãƒƒã‚«ãƒ¼ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã¾ã›ã‚“。今ã™ãダウンロードã—ã¾ã™ã‹?", - -// Button Dialog -DlgButtonText : "テキスト (値)", -DlgButtonType : "タイプ", -DlgButtonTypeBtn : "ボタン", -DlgButtonTypeSbm : "é€ä¿¡", -DlgButtonTypeRst : "リセット", - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "åå‰", -DlgCheckboxValue : "値", -DlgCheckboxSelected : "é¸æŠžæ¸ˆã¿", - -// Form Dialog -DlgFormName : "フォームå", -DlgFormAction : "アクション", -DlgFormMethod : "メソッド", - -// Select Field Dialog -DlgSelectName : "åå‰", -DlgSelectValue : "値", -DlgSelectSize : "サイズ", -DlgSelectLines : "行", -DlgSelectChkMulti : "è¤‡æ•°é …ç›®é¸æŠžã‚’è¨±å¯", -DlgSelectOpAvail : "利用å¯èƒ½ãªã‚ªãƒ—ション", -DlgSelectOpText : "é¸æŠžé …ç›®å", -DlgSelectOpValue : "é¸æŠžé …ç›®å€¤", -DlgSelectBtnAdd : "追加", -DlgSelectBtnModify : "編集", -DlgSelectBtnUp : "上ã¸", -DlgSelectBtnDown : "下ã¸", -DlgSelectBtnSetValue : "é¸æŠžã—ãŸå€¤ã‚’設定", -DlgSelectBtnDelete : "削除", - -// Textarea Dialog -DlgTextareaName : "åå‰", -DlgTextareaCols : "列", -DlgTextareaRows : "行", - -// Text Field Dialog -DlgTextName : "åå‰", -DlgTextValue : "値", -DlgTextCharWidth : "サイズ", -DlgTextMaxChars : "最大長", -DlgTextType : "タイプ", -DlgTextTypeText : "テキスト", -DlgTextTypePass : "パスワード入力", - -// Hidden Field Dialog -DlgHiddenName : "åå‰", -DlgHiddenValue : "値", - -// Bulleted List Dialog -BulletedListProp : "ç®‡æ¡æ›¸ã プロパティ", -NumberedListProp : "段è½ç•ªå· プロパティ", -DlgLstStart : "開始文字", -DlgLstType : "タイプ", -DlgLstTypeCircle : "白丸", -DlgLstTypeDisc : "黒丸", -DlgLstTypeSquare : "四角", -DlgLstTypeNumbers : "アラビア数字 (1, 2, 3)", -DlgLstTypeLCase : "è‹±å­—å°æ–‡å­— (a, b, c)", -DlgLstTypeUCase : "英字大文字 (A, B, C)", -DlgLstTypeSRoman : "ãƒ­ãƒ¼ãƒžæ•°å­—å°æ–‡å­— (i, ii, iii)", -DlgLstTypeLRoman : "ローマ数字大文字 (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "全般", -DlgDocBackTab : "背景", -DlgDocColorsTab : "色ã¨ãƒžãƒ¼ã‚¸ãƒ³", -DlgDocMetaTab : "メタデータ", - -DlgDocPageTitle : "ページタイトル", -DlgDocLangDir : "è¨€èªžæ–‡å­—è¡¨è¨˜ã®æ–¹å‘", -DlgDocLangDirLTR : "å·¦ã‹ã‚‰å³ã«è¡¨è¨˜(LTR)", -DlgDocLangDirRTL : "å³ã‹ã‚‰å·¦ã«è¡¨è¨˜(RTL)", -DlgDocLangCode : "言語コード", -DlgDocCharSet : "文字セット符å·åŒ–", -DlgDocCharSetCE : "Central European", -DlgDocCharSetCT : "Chinese Traditional (Big5)", -DlgDocCharSetCR : "Cyrillic", -DlgDocCharSetGR : "Greek", -DlgDocCharSetJP : "Japanese", -DlgDocCharSetKR : "Korean", -DlgDocCharSetTR : "Turkish", -DlgDocCharSetUN : "Unicode (UTF-8)", -DlgDocCharSetWE : "Western European", -DlgDocCharSetOther : "ä»–ã®æ–‡å­—セット符å·åŒ–", - -DlgDocDocType : "文書タイプヘッダー", -DlgDocDocTypeOther : "ãã®ä»–文書タイプヘッダー", -DlgDocIncXHTML : "XHTML宣言をインクルード", -DlgDocBgColor : "背景色", -DlgDocBgImage : "èƒŒæ™¯ç”»åƒ URL", -DlgDocBgNoScroll : "スクロールã—ãªã„背景", -DlgDocCText : "テキスト", -DlgDocCLink : "リンク", -DlgDocCVisited : "アクセス済ã¿ãƒªãƒ³ã‚¯", -DlgDocCActive : "アクセス中リンク", -DlgDocMargins : "ページ・マージン", -DlgDocMaTop : "上部", -DlgDocMaLeft : "å·¦", -DlgDocMaRight : "å³", -DlgDocMaBottom : "下部", -DlgDocMeIndex : "文書ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰(カンマ区切り)", -DlgDocMeDescr : "æ–‡æ›¸ã®æ¦‚è¦", -DlgDocMeAuthor : "文書ã®ä½œè€…", -DlgDocMeCopy : "文書ã®è‘—作権", -DlgDocPreview : "プレビュー", - -// Templates Dialog -Templates : "テンプレート(雛形)", -DlgTemplatesTitle : "テンプレート内容", -DlgTemplatesSelMsg : "エディターã§ä½¿ç”¨ã™ã‚‹ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã‚’é¸æŠžã—ã¦ãã ã•ã„。
    (ç¾åœ¨ã®ã‚¨ãƒ‡ã‚£ã‚¿ã®å†…容ã¯å¤±ã‚れã¾ã™):", -DlgTemplatesLoading : "テンプレート一覧読ã¿è¾¼ã¿ä¸­. ã—ã°ã‚‰ããŠå¾…ã¡ãã ã•ã„...", -DlgTemplatesNoTpl : "(テンプレートãŒå®šç¾©ã•れã¦ã„ã¾ã›ã‚“)", -DlgTemplatesReplace : "ç¾åœ¨ã®ã‚¨ãƒ‡ã‚£ã‚¿ã®å†…容ã¨ç½®æ›ãˆã‚’ã—ã¾ã™", - -// About Dialog -DlgAboutAboutTab : "ãƒãƒ¼ã‚¸ãƒ§ãƒ³æƒ…å ±", -DlgAboutBrowserInfoTab : "ブラウザ情報", -DlgAboutLicenseTab : "ライセンス", -DlgAboutVersion : "ãƒãƒ¼ã‚¸ãƒ§ãƒ³", -DlgAboutInfo : "より詳ã—ã„æƒ…å ±ã¯ã“ã¡ã‚‰ã§", - -// Div Dialog -DlgDivGeneralTab : "全般", -DlgDivAdvancedTab : "高度ãªè¨­å®š", -DlgDivStyle : "スタイル", -DlgDivInlineStyle : "インラインスタイル" -}; diff --git a/fckeditor/editor/lang/km.js b/fckeditor/editor/lang/km.js deleted file mode 100644 index 829e8434..00000000 --- a/fckeditor/editor/lang/km.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Khmer language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "បង្រួមរបាឧបរកណáŸ", -ToolbarExpand : "ពង្រីករបាឧបរណáŸ", - -// Toolbar Items and Context Menu -Save : "រក្សាទុក", -NewPage : "ទំពáŸážšážáŸ’មី", -Preview : "មើលសាកល្បង", -Cut : "កាážáŸ‹áž™áž€", -Copy : "ចំលងយក", -Paste : "ចំលងដាក់", -PasteText : "ចំលងដាក់ជាអážáŸ’ážáž”ទធម្មážáž¶", -PasteWord : "ចំលងដាក់ពី Word", -Print : "បោះពុម្ភ", -SelectAll : "ជ្រើសរើសទាំងអស់", -RemoveFormat : "លប់ចោល ការរចនា", -InsertLinkLbl : "ឈ្នាប់", -InsertLink : "បន្ážáŸ‚ម/កែប្រែ ឈ្នាប់", -RemoveLink : "លប់ឈ្នាប់", -VisitLink : "Open Link", //MISSING -Anchor : "បន្ážáŸ‚ម/កែប្រែ យុážáŸ’កា", -AnchorDelete : "Remove Anchor", //MISSING -InsertImageLbl : "រូបភាព", -InsertImage : "បន្ážáŸ‚ម/កែប្រែ រូបភាព", -InsertFlashLbl : "Flash", -InsertFlash : "បន្ážáŸ‚ម/កែប្រែ Flash", -InsertTableLbl : "ážáž¶ážšáž¶áž„", -InsertTable : "បន្ážáŸ‚ម/កែប្រែ ážáž¶ážšáž¶áž„", -InsertLineLbl : "បន្ទាážáŸ‹", -InsertLine : "បន្ážáŸ‚មបន្ទាážáŸ‹áž•្ážáŸáž€", -InsertSpecialCharLbl: "អក្សរពិសáŸážŸ", -InsertSpecialChar : "បន្ážáŸ‚មអក្សរពិសáŸážŸ", -InsertSmileyLbl : "រូបភាព", -InsertSmiley : "បន្ážáŸ‚ម រូបភាព", -About : "អំពី FCKeditor", -Bold : "អក្សរដិážáž’ំ", -Italic : "អក្សរផ្ážáŸáž€", -Underline : "ដិážáž”ន្ទាážáŸ‹áž–ីក្រោមអក្សរ", -StrikeThrough : "ដិážáž”ន្ទាážáŸ‹áž–ាក់កណ្ážáž¶áž›áž¢áž€áŸ’សរ", -Subscript : "អក្សរážáž¼áž…ក្រោម", -Superscript : "អក្សរážáž¼áž…លើ", -LeftJustify : "ážáŸ†ážšáž¹áž˜áž†áŸ’ážœáŸáž„", -CenterJustify : "ážáŸ†ážšáž¹áž˜áž€ážŽáŸ’ážáž¶áž›", -RightJustify : "ážáŸ†ážšáž¹áž˜ážŸáŸ’ážáž¶áŸ†", -BlockJustify : "ážáŸ†ážšáž¹áž˜ážŸáž„ážáž¶áž„", -DecreaseIndent : "បន្ážáž™áž€áž¶ážšáž…ូលបន្ទាážáŸ‹", -IncreaseIndent : "បន្ážáŸ‚មការចូលបន្ទាážáŸ‹", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "សារឡើងវិញ", -Redo : "ធ្វើឡើងវិញ", -NumberedListLbl : "បញ្ជីជាអក្សរ", -NumberedList : "បន្ážáŸ‚ម/លប់ បញ្ជីជាអក្សរ", -BulletedListLbl : "បញ្ជីជារង្វង់មូល", -BulletedList : "បន្ážáŸ‚ម/លប់ បញ្ជីជារង្វង់មូល", -ShowTableBorders : "បង្ហាញស៊ុមážáž¶ážšáž¶áž„", -ShowDetails : "បង្ហាញពិស្ážáž¶ážš", -Style : "ម៉ូáž", -FontFormat : "រចនា", -Font : "ហ្វុង", -FontSize : "ទំហំ", -TextColor : "ពណ៌អក្សរ", -BGColor : "ពណ៌ផ្ទៃážáž¶áž„ក្រោយ", -Source : "កូáž", -Find : "ស្វែងរក", -Replace : "ជំនួស", -SpellCheck : "ពិនិážáŸ’យអក្ážážšáž¶ážœáž·ážšáž»áž‘្ធ", -UniversalKeyboard : "ក្ážáž¶ážšáž–ុម្ភអក្សរសកល", -PageBreakLbl : "ការផ្ážáž¶áž…់ទំពáŸážš", -PageBreak : "បន្ážáŸ‚ម ការផ្ážáž¶áž…់ទំពáŸážš", - -Form : "បែបបទ", -Checkbox : "ប្រអប់ជ្រើសរើស", -RadioButton : "ប៉ូážáž»áž“រង្វង់មូល", -TextField : "ជួរសរសáŸážšáž¢ážáŸ’ážáž”áž‘", -Textarea : "ážáŸ†áž”ន់សរសáŸážšáž¢ážáŸ’ážáž”áž‘", -HiddenField : "ជួរលាក់", -Button : "ប៉ូážáž»áž“", -SelectionField : "ជួរជ្រើសរើស", -ImageButton : "ប៉ូážáž»áž“រូបភាព", - -FitWindow : "Maximize the editor size", //MISSING -ShowBlocks : "Show Blocks", //MISSING - -// Context Menu -EditLink : "កែប្រែឈ្នាប់", -CellCM : "Cell", //MISSING -RowCM : "Row", //MISSING -ColumnCM : "Column", //MISSING -InsertRowAfter : "Insert Row After", //MISSING -InsertRowBefore : "Insert Row Before", //MISSING -DeleteRows : "លប់ជួរផ្ážáŸáž€", -InsertColumnAfter : "Insert Column After", //MISSING -InsertColumnBefore : "Insert Column Before", //MISSING -DeleteColumns : "លប់ជួរឈរ", -InsertCellAfter : "Insert Cell After", //MISSING -InsertCellBefore : "Insert Cell Before", //MISSING -DeleteCells : "លប់សែល", -MergeCells : "បញ្ជូលសែល", -MergeRight : "Merge Right", //MISSING -MergeDown : "Merge Down", //MISSING -HorizontalSplitCell : "Split Cell Horizontally", //MISSING -VerticalSplitCell : "Split Cell Vertically", //MISSING -TableDelete : "លប់ážáž¶ážšáž¶áž„", -CellProperties : "ការកំណážáŸ‹ážŸáŸ‚áž›", -TableProperties : "ការកំណážáŸ‹ážáž¶ážšáž¶áž„", -ImageProperties : "ការកំណážáŸ‹ážšáž¼áž”áž—áž¶áž–", -FlashProperties : "ការកំណážáŸ‹ Flash", - -AnchorProp : "ការកំណážáŸ‹áž™áž»ážáŸ’កា", -ButtonProp : "ការកំណážáŸ‹ ប៉ូážáž»áž“", -CheckboxProp : "ការកំណážáŸ‹áž”្រអប់ជ្រើសរើស", -HiddenFieldProp : "ការកំណážáŸ‹áž‡áž½ážšáž›áž¶áž€áŸ‹", -RadioButtonProp : "ការកំណážáŸ‹áž”៉ូážáž»áž“រង្វង់", -ImageButtonProp : "ការកំណážáŸ‹áž”៉ូážáž»áž“រូបភាព", -TextFieldProp : "ការកំណážáŸ‹áž‡áž½ážšáž¢ážáŸ’ážáž”áž‘", -SelectionFieldProp : "ការកំណážáŸ‹áž‡áž½ážšáž‡áŸ’រើសរើស", -TextareaProp : "ការកំណážáŸ‹áž€áž“្លែងសរសáŸážšáž¢ážáŸ’ážáž”áž‘", -FormProp : "ការកំណážáŸ‹áž”ែបបទ", - -FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Normal (DIV)", - -// Alerts and Messages -ProcessingXHTML : "កំពុងដំណើរការ XHTML ។ សូមរងចាំ...", -Done : "ចប់រួចរាល់", -PasteWordConfirm : "អážáŸ’ážáž”ទដែលលោកអ្នកបំរុងចំលងដាក់ ហាក់បីដូចជាážáŸ’រូវចំលងមកពីកម្មវិធី​Word​។ ážáž¾áž›áŸ„កអ្នកចង់សំអាážáž˜áž»áž“ចំលងអážáŸ’ážáž”ទដាក់ទáŸ?", -NotCompatiblePaste : "ពាក្យបញ្ជានáŸáŸ‡áž”្រើបានážáŸ‚ជាមួយ Internet Explorer កំរិហ5.5 រឺ លើសនáŸáŸ‡ ។ ážáž¾áž›áŸ„កអ្នកចង់ចំលងដាក់ដោយមិនចាំបាច់សំអាážáž‘áŸ?", -UnknownToolbarItem : "ážœážáŸ’ážáž»áž›áž¾ážšáž”ាឧបរកណ០មិនស្គាល់ \"%1\"", -UnknownCommand : "ឈ្មោះពាក្យបញ្ជា មិនស្គាល់ \"%1\"", -NotImplemented : "ពាក្យបញ្ជា មិនបានអនុវážáŸ’áž", -UnknownToolbarSet : "របាឧបរកណ០\"%1\" ពុំមាន ។", -NoActiveX : "ការកំណážáŸ‹ážŸáž»ážœážáŸ’ážáž—ាពរបស់កម្មវិធីរុករករបស់លោកអ្នក áž“áŸáŸ‡â€‹áž¢áž¶áž…ធ្វើអោយលោកអ្នកមិនអាចប្រើមុážáž„áž¶ážšážáŸ’លះរបស់កម្មវិធីážáž¶áž€áŸ‹ážáŸ‚ងអážáŸ’ážáž”ទនáŸáŸ‡ ។ លោកអ្នកážáŸ’រូវកំណážáŸ‹áž¢áŸ„áž™ \"ActiveX និង​កម្មវិធីជំនួយក្នុង (plug-ins)\" អោយដំណើរការ ។ លោកអ្នកអាចជួបប្រទះនឹង បញ្ហា ព្រមជាមួយនឹងការបាážáŸ‹áž”ង់មុážáž„ារណាមួយរបស់កម្មវិធីážáž¶áž€áŸ‹ážáŸ‚ងអážáŸ’ážáž”ទនáŸáŸ‡ ។", -BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", //MISSING -DialogBlocked : "វីនដូវមិនអាចបើកបានទ០។ សូមពិនិážáŸ’យចំពោះកម្មវិធីបិទ វីនដូវលោហ(popup) ážáž¶ážáž¾ážœáž¶ážŠáŸ†ážŽáž¾ážšáž€áž¶ážšážšážºáž‘០។", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "យល់ព្រម", -DlgBtnCancel : "មិនយល់ព្រម", -DlgBtnClose : "បិទ", -DlgBtnBrowseServer : "មើល", -DlgAdvancedTag : "កំរិážážáŸ’ពស់", -DlgOpOther : "<ផ្សáŸáž„ទៅáž>", -DlgInfoTab : "áž–ážáŸŒáž˜áž¶áž“", -DlgAlertUrl : "សូមសរសáŸážš URL", - -// General Dialogs Labels -DlgGenNotSet : "<មិនមែន>", -DlgGenId : "Id", -DlgGenLangDir : "ទិសដៅភាសា", -DlgGenLangDirLtr : "ពីឆ្វáŸáž„ទៅស្ážáž¶áŸ†(LTR)", -DlgGenLangDirRtl : "ពីស្ážáž¶áŸ†áž‘ៅឆ្វáŸáž„(RTL)", -DlgGenLangCode : "áž›áŸážáž€áž¼ážáž—ាសា", -DlgGenAccessKey : "ឃី សំរាប់ចូល", -DlgGenName : "ឈ្មោះ", -DlgGenTabIndex : "áž›áŸáž Tab", -DlgGenLongDescr : "អធិប្បាយ URL វែង", -DlgGenClass : "Stylesheet Classes", -DlgGenTitle : "ចំណងជើង ប្រឹក្សា", -DlgGenContType : "ប្រភáŸáž‘អážáŸ’ážáž”áž‘ ប្រឹក្សា", -DlgGenLinkCharset : "áž›áŸážáž€áž¼ážáž¢áž€áŸ’សររបស់ឈ្នាប់", -DlgGenStyle : "ម៉ូáž", - -// Image Dialog -DlgImgTitle : "ការកំណážáŸ‹ážšáž¼áž”áž—áž¶áž–", -DlgImgInfoTab : "áž–ážáŸŒáž˜áž¶áž“អំពីរូបភាព", -DlgImgBtnUpload : "បញ្ជូនទៅកាន់ម៉ាស៊ីនផ្ážáž›áŸ‹ážŸáŸážœáž¶", -DlgImgURL : "URL", -DlgImgUpload : "ទាញយក", -DlgImgAlt : "អážáŸ’ážáž”ទជំនួស", -DlgImgWidth : "ទទឹង", -DlgImgHeight : "កំពស់", -DlgImgLockRatio : "អážáŸ’រាឡុក", -DlgBtnResetSize : "កំណážáŸ‹áž‘ំហំឡើងវិញ", -DlgImgBorder : "ស៊ុម", -DlgImgHSpace : "គំលាážáž‘ទឹង", -DlgImgVSpace : "គំលាážáž”ណ្ážáŸ„áž™", -DlgImgAlign : "កំណážáŸ‹áž‘ីážáž¶áŸ†áž„", -DlgImgAlignLeft : "ážáž¶áž„ឆ្វង", -DlgImgAlignAbsBottom: "Abs Bottom", //MISSING -DlgImgAlignAbsMiddle: "Abs Middle", //MISSING -DlgImgAlignBaseline : "បន្ទាážáŸ‹áž‡áž¶áž˜áž¼áž›ážŠáŸ’ឋាន", -DlgImgAlignBottom : "ážáž¶áž„ក្រោម", -DlgImgAlignMiddle : "កណ្ážáž¶áž›", -DlgImgAlignRight : "ážáž¶áž„ស្ážáž¶áŸ†", -DlgImgAlignTextTop : "លើអážáŸ’ážáž”áž‘", -DlgImgAlignTop : "ážáž¶áž„លើ", -DlgImgPreview : "មើលសាកល្បង", -DlgImgAlertUrl : "សូមសរសáŸážšáž„ាសáŸáž™ážŠáŸ’ឋានរបស់រូបភាព", -DlgImgLinkTab : "ឈ្នាប់", - -// Flash Dialog -DlgFlashTitle : "ការកំណážáŸ‹ Flash", -DlgFlashChkPlay : "áž›áŸáž„ដោយស្វáŸáž™áž”្រវážáŸ’áž", -DlgFlashChkLoop : "ចំនួនដង", -DlgFlashChkMenu : "បង្ហាញ មឺនុយរបស់ Flash", -DlgFlashScale : "ទំហំ", -DlgFlashScaleAll : "បង្ហាញទាំងអស់", -DlgFlashScaleNoBorder : "មិនបង្ហាញស៊ុម", -DlgFlashScaleFit : "ážáŸ’រូវល្មម", - -// Link Dialog -DlgLnkWindowTitle : "ឈ្នាប់", -DlgLnkInfoTab : "áž–ážáŸŒáž˜áž¶áž“អំពីឈ្នាប់", -DlgLnkTargetTab : "គោលដៅ", - -DlgLnkType : "ប្រភáŸáž‘ឈ្នាប់", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "យុážáŸ’កានៅក្នុងទំពáŸážšáž“áŸáŸ‡", -DlgLnkTypeEMail : "អ៊ីមែល", -DlgLnkProto : "ប្រូážáž¼áž€áž¼áž›", -DlgLnkProtoOther : "<ផ្សáŸáž„ទៀáž>", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "ជ្រើសរើសយុážáŸ’កា", -DlgLnkAnchorByName : "ážáž¶áž˜ážˆáŸ’មោះរបស់យុážáŸ’កា", -DlgLnkAnchorById : "ážáž¶áž˜ Id", -DlgLnkNoAnchors : "(No anchors available in the document)", //MISSING -DlgLnkEMail : "អ៊ីមែល", -DlgLnkEMailSubject : "ចំណងជើងអážáŸ’ážáž”áž‘", -DlgLnkEMailBody : "អážáŸ’ážáž”áž‘", -DlgLnkUpload : "ទាញយក", -DlgLnkBtnUpload : "ទាញយក", - -DlgLnkTarget : "គោលដៅ", -DlgLnkTargetFrame : "<ហ្វ្រáŸáž˜>", -DlgLnkTargetPopup : "<វីនដូវ លោáž>", -DlgLnkTargetBlank : "វីនដូវážáŸ’មី (_blank)", -DlgLnkTargetParent : "វីនដូវម០(_parent)", -DlgLnkTargetSelf : "វីនដូវដដែល (_self)", -DlgLnkTargetTop : "វីនដូវនៅលើគáŸ(_top)", -DlgLnkTargetFrameName : "ឈ្មោះហ្រ្វáŸáž˜ážŠáŸ‚លជាគោលដៅ", -DlgLnkPopWinName : "ឈ្មោះវីនដូវលោáž", -DlgLnkPopWinFeat : "លក្ážážŽáŸ‡ážšáž”ស់វីនដូលលោáž", -DlgLnkPopResize : "ទំហំអាចផ្លាស់ប្ážáž¼ážš", -DlgLnkPopLocation : "របា ទីážáž¶áŸ†áž„", -DlgLnkPopMenu : "របា មឺនុយ", -DlgLnkPopScroll : "របា ទាញ", -DlgLnkPopStatus : "របា áž–ážáŸŒáž˜áž¶áž“", -DlgLnkPopToolbar : "របា ឩបករណáŸ", -DlgLnkPopFullScrn : "អáŸáž€áŸ’រុងពáŸáž‰(IE)", -DlgLnkPopDependent : "អាស្រáŸáž™áž›áž¾ (Netscape)", -DlgLnkPopWidth : "ទទឹង", -DlgLnkPopHeight : "កំពស់", -DlgLnkPopLeft : "ទីážáž¶áŸ†áž„ážáž¶áž„ឆ្វáŸáž„", -DlgLnkPopTop : "ទីážáž¶áŸ†áž„ážáž¶áž„លើ", - -DlnLnkMsgNoUrl : "សូមសរសáŸážš អាសáŸáž™ážŠáŸ’ឋាន URL", -DlnLnkMsgNoEMail : "សូមសរសáŸážš អាសáŸáž™ážŠáŸ’ឋាន អ៊ីមែល", -DlnLnkMsgNoAnchor : "សូមជ្រើសរើស យុážáŸ’កា", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", //MISSING - -// Color Dialog -DlgColorTitle : "ជ្រើសរើស ពណ៌", -DlgColorBtnClear : "លប់", -DlgColorHighlight : "ផាážáŸ‹áž–ណ៌", -DlgColorSelected : "បានជ្រើសរើស", - -// Smiley Dialog -DlgSmileyTitle : "បញ្ជូលរូបភាព", - -// Special Character Dialog -DlgSpecialCharTitle : "ážáž¼áž¢áž€áŸ’សរពិសáŸážŸ", - -// Table Dialog -DlgTableTitle : "ការកំណážáŸ‹ ážáž¶ážšáž¶áž„", -DlgTableRows : "ជួរផ្ážáŸáž€", -DlgTableColumns : "ជួរឈរ", -DlgTableBorder : "ទំហំស៊ុម", -DlgTableAlign : "ការកំណážáŸ‹áž‘ីážáž¶áŸ†áž„", -DlgTableAlignNotSet : "<មិនកំណážáŸ‹>", -DlgTableAlignLeft : "ážáž¶áž„ឆ្វáŸáž„", -DlgTableAlignCenter : "កណ្ážáž¶áž›", -DlgTableAlignRight : "ážáž¶áž„ស្ážáž¶áŸ†", -DlgTableWidth : "ទទឹង", -DlgTableWidthPx : "ភីកសែល", -DlgTableWidthPc : "ភាគរយ", -DlgTableHeight : "កំពស់", -DlgTableCellSpace : "គំលាážážŸáŸ‚áž›", -DlgTableCellPad : "គែមសែល", -DlgTableCaption : "ចំណងជើង", -DlgTableSummary : "សáŸáž…ក្ážáž¸ážŸáž„្ážáŸáž”", - -// Table Cell Dialog -DlgCellTitle : "ការកំណážáŸ‹ សែល", -DlgCellWidth : "ទទឹង", -DlgCellWidthPx : "ភីកសែល", -DlgCellWidthPc : "ភាគរយ", -DlgCellHeight : "កំពស់", -DlgCellWordWrap : "បង្ហាញអážáŸ’ážáž”ទទាំងអស់", -DlgCellWordWrapNotSet : "<មិនកំណážáŸ‹>", -DlgCellWordWrapYes : "បាទ(áž…áž¶)", -DlgCellWordWrapNo : "áž‘áŸ", -DlgCellHorAlign : "ážáŸ†ážšáž¹áž˜áž•្ážáŸáž€", -DlgCellHorAlignNotSet : "<មិនកំណážáŸ‹>", -DlgCellHorAlignLeft : "ážáž¶áž„ឆ្វáŸáž„", -DlgCellHorAlignCenter : "កណ្ážáž¶áž›", -DlgCellHorAlignRight: "Right", //MISSING -DlgCellVerAlign : "ážáŸ†ážšáž¹áž˜ážˆážš", -DlgCellVerAlignNotSet : "<មិនកណážáŸ‹>", -DlgCellVerAlignTop : "ážáž¶áž„លើ", -DlgCellVerAlignMiddle : "កណ្ážáž¶áž›", -DlgCellVerAlignBottom : "ážáž¶áž„ក្រោម", -DlgCellVerAlignBaseline : "បន្ទាážáŸ‹áž‡áž¶áž˜áž¼áž›ážŠáŸ’ឋាន", -DlgCellRowSpan : "បញ្ជូលជួរផ្ážáŸáž€", -DlgCellCollSpan : "បញ្ជូលជួរឈរ", -DlgCellBackColor : "ពណ៌ផ្នែកážáž¶áž„ក្រោម", -DlgCellBorderColor : "ពណ៌ស៊ុម", -DlgCellBtnSelect : "ជ្រើសរើស...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", //MISSING - -// Find Dialog -DlgFindTitle : "ស្វែងរក", -DlgFindFindBtn : "ស្វែងរក", -DlgFindNotFoundMsg : "ពាក្យនáŸáŸ‡ រកមិនឃើញទ០។", - -// Replace Dialog -DlgReplaceTitle : "ជំនួស", -DlgReplaceFindLbl : "ស្វែងរកអ្វី:", -DlgReplaceReplaceLbl : "ជំនួសជាមួយ:", -DlgReplaceCaseChk : "ករណ៉ážáŸ’រូវរក", -DlgReplaceReplaceBtn : "ជំនួស", -DlgReplaceReplAllBtn : "ជំនួសទាំងអស់", -DlgReplaceWordChk : "ážáŸ’រូវពាក្យទាំងអស់", - -// Paste Operations / Dialog -PasteErrorCut : "ការកំណážáŸ‹ážŸáž»ážœážáŸ’ážáž—ាពរបស់កម្មវិធីរុករករបស់លោកអ្នក áž“áŸáŸ‡â€‹áž˜áž·áž“អាចធ្វើកម្មវិធីážáž¶áž€áŸ‹ážáŸ‚ងអážáŸ’ážáž”áž‘ កាážáŸ‹áž¢ážáŸ’ážáž”ទយកដោយស្វáŸáž™áž”្រវážáŸ’ážáž”ានឡើយ ។ សូមប្រើប្រាស់បន្សំ ឃីដូចនáŸáŸ‡ (Ctrl+X) ។", -PasteErrorCopy : "ការកំណážáŸ‹ážŸáž»ážœážáŸ’ážáž—ាពរបស់កម្មវិធីរុករករបស់លោកអ្នក áž“áŸáŸ‡â€‹áž˜áž·áž“អាចធ្វើកម្មវិធីážáž¶áž€áŸ‹ážáŸ‚ងអážáŸ’ážáž”áž‘ ចំលងអážáŸ’ážáž”ទយកដោយស្វáŸáž™áž”្រវážáŸ’ážáž”ានឡើយ ។ សូមប្រើប្រាស់បន្សំ ឃីដូចនáŸáŸ‡ (Ctrl+C)។", - -PasteAsText : "ចំលងដាក់អážáŸ’ážáž”ទធម្មážáž¶", -PasteFromWord : "ចំលងពាក្យពីកម្មវិធី Word", - -DlgPasteMsg2 : "សូមចំលងអážáŸ’ážáž”ទទៅដាក់ក្នុងប្រអប់ដូចážáž¶áž„ក្រោមដោយប្រើប្រាស់ ឃី ​(Ctrl+V) ហើយចុច OK ។", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING -DlgPasteIgnoreFont : "មិនគិážáž¢áŸ†áž–ីប្រភáŸáž‘ពុម្ភអក្សរ", -DlgPasteRemoveStyles : "លប់ម៉ូáž", - -// Color Picker -ColorAutomatic : "ស្វáŸáž™áž”្រវážáŸ’áž", -ColorMoreColors : "ពណ៌ផ្សáŸáž„ទៀáž..", - -// Document Properties -DocProps : "ការកំណážáŸ‹ ឯកសារ", - -// Anchor Dialog -DlgAnchorTitle : "ការកំណážáŸ‹áž…ំណងជើងយុទ្ធážáŸ’កា", -DlgAnchorName : "ឈ្មោះយុទ្ធážáŸ’កា", -DlgAnchorErrorName : "សូមសរសáŸážš ឈ្មោះយុទ្ធážáŸ’កា", - -// Speller Pages Dialog -DlgSpellNotInDic : "គ្មានក្នុងវចនានុក្រម", -DlgSpellChangeTo : "ផ្លាស់ប្ážáž¼ážšáž‘ៅ", -DlgSpellBtnIgnore : "មិនផ្លាស់ប្ážáž¼ážš", -DlgSpellBtnIgnoreAll : "មិនផ្លាស់ប្ážáž¼ážš ទាំងអស់", -DlgSpellBtnReplace : "ជំនួស", -DlgSpellBtnReplaceAll : "ជំនួសទាំងអស់", -DlgSpellBtnUndo : "សារឡើងវិញ", -DlgSpellNoSuggestions : "- គ្មានសំណើរ -", -DlgSpellProgress : "កំពុងពិនិážáŸ’យអក្ážážšáž¶ážœáž·ážšáž»áž‘្ធ...", -DlgSpellNoMispell : "ការពិនិážáŸ’យអក្ážážšáž¶ážœáž·ážšáž»áž‘្ធបានចប់: គ្មានកំហុស", -DlgSpellNoChanges : "ការពិនិážáŸ’យអក្ážážšáž¶ážœáž·ážšáž»áž‘្ធបានចប់: ពុំមានផ្លាស់ប្ážáž¼ážš", -DlgSpellOneChange : "ការពិនិážáŸ’យអក្ážážšáž¶ážœáž·ážšáž»áž‘្ធបានចប់: ពាក្យមួយážáŸ’រូចបានផ្លាស់ប្ážáž¼ážš", -DlgSpellManyChanges : "ការពិនិážáŸ’យអក្ážážšáž¶ážœáž·ážšáž»áž‘្ធបានចប់: %1 ពាក្យបានផ្លាស់ប្ážáž¼ážš", - -IeSpellDownload : "ពុំមានកម្មវិធីពិនិážáŸ’យអក្ážážšáž¶ážœáž·ážšáž»áž‘្ធ ។ ážáž¾áž…ង់ទាញយកពីណា?", - -// Button Dialog -DlgButtonText : "អážáŸ’ážáž”áž‘(ážáŸ†áž›áŸƒ)", -DlgButtonType : "ប្រភáŸáž‘", -DlgButtonTypeBtn : "Button", //MISSING -DlgButtonTypeSbm : "Submit", //MISSING -DlgButtonTypeRst : "Reset", //MISSING - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "ឈ្មោះ", -DlgCheckboxValue : "ážáŸ†áž›áŸƒ", -DlgCheckboxSelected : "បានជ្រើសរើស", - -// Form Dialog -DlgFormName : "ឈ្មោះ", -DlgFormAction : "សកម្មភាព", -DlgFormMethod : "វិធី", - -// Select Field Dialog -DlgSelectName : "ឈ្មោះ", -DlgSelectValue : "ážáŸ†áž›áŸƒ", -DlgSelectSize : "ទំហំ", -DlgSelectLines : "បន្ទាážáŸ‹", -DlgSelectChkMulti : "អនុញ្ញាážáž¢áŸ„យជ្រើសរើសច្រើន", -DlgSelectOpAvail : "ការកំណážáŸ‹áž‡áŸ’រើសរើស ដែលអាចកំណážáŸ‹áž”áž¶áž“", -DlgSelectOpText : "ពាក្យ", -DlgSelectOpValue : "ážáŸ†áž›áŸƒ", -DlgSelectBtnAdd : "បន្ážáŸ‚ម", -DlgSelectBtnModify : "ផ្លាស់ប្ážáž¼ážš", -DlgSelectBtnUp : "លើ", -DlgSelectBtnDown : "ក្រោម", -DlgSelectBtnSetValue : "Set as selected value", //MISSING -DlgSelectBtnDelete : "លប់", - -// Textarea Dialog -DlgTextareaName : "ឈ្មោះ", -DlgTextareaCols : "ជូរឈរ", -DlgTextareaRows : "ជូរផ្ážáŸáž€", - -// Text Field Dialog -DlgTextName : "ឈ្មោះ", -DlgTextValue : "ážáŸ†áž›áŸƒ", -DlgTextCharWidth : "ទទឹង អក្សរ", -DlgTextMaxChars : "អក្សរអážáž·áž”រិមា", -DlgTextType : "ប្រភáŸáž‘", -DlgTextTypeText : "ពាក្យ", -DlgTextTypePass : "ពាក្យសំងាážáŸ‹", - -// Hidden Field Dialog -DlgHiddenName : "ឈ្មោះ", -DlgHiddenValue : "ážáŸ†áž›áŸƒ", - -// Bulleted List Dialog -BulletedListProp : "កំណážáŸ‹áž”ញ្ជីរង្វង់", -NumberedListProp : "កំណážáŸ‹áž”ញ្áŸáž‡áž¸áž›áŸáž", -DlgLstStart : "Start", //MISSING -DlgLstType : "ប្រភáŸáž‘", -DlgLstTypeCircle : "រង្វង់", -DlgLstTypeDisc : "Disc", -DlgLstTypeSquare : "ការáŸ", -DlgLstTypeNumbers : "áž›áŸáž(1, 2, 3)", -DlgLstTypeLCase : "អក្សរážáž¼áž…(a, b, c)", -DlgLstTypeUCase : "អក្សរធំ(A, B, C)", -DlgLstTypeSRoman : "អក្សរឡាážáž¶áŸ†áž„ážáž¼áž…(i, ii, iii)", -DlgLstTypeLRoman : "អក្សរឡាážáž¶áŸ†áž„ធំ(I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "ទូទៅ", -DlgDocBackTab : "ផ្នែកážáž¶áž„ក្រោយ", -DlgDocColorsTab : "ទំពáŸážšâ€‹áž“áž·áž„ ស៊ុម", -DlgDocMetaTab : "ទិន្ននáŸáž™áž˜áŸ", - -DlgDocPageTitle : "ចំណងជើងទំពáŸážš", -DlgDocLangDir : "ទិសដៅសរសáŸážšáž—ាសា", -DlgDocLangDirLTR : "ពីឆ្វáŸáž„ទៅស្ដាំ(LTR)", -DlgDocLangDirRTL : "ពីស្ដាំទៅឆ្វáŸáž„(RTL)", -DlgDocLangCode : "áž›áŸážáž€áž¼ážáž—ាសា", -DlgDocCharSet : "កំណážáŸ‹áž›áŸážáž€áž¼ážáž—ាសា", -DlgDocCharSetCE : "Central European", //MISSING -DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING -DlgDocCharSetCR : "Cyrillic", //MISSING -DlgDocCharSetGR : "Greek", //MISSING -DlgDocCharSetJP : "Japanese", //MISSING -DlgDocCharSetKR : "Korean", //MISSING -DlgDocCharSetTR : "Turkish", //MISSING -DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING -DlgDocCharSetWE : "Western European", //MISSING -DlgDocCharSetOther : "កំណážáŸ‹áž›áŸážáž€áž¼ážáž—ាសាផ្សáŸáž„ទៀáž", - -DlgDocDocType : "ប្រភáŸáž‘ក្បាលទំពáŸážš", -DlgDocDocTypeOther : "ប្រភáŸáž‘ក្បាលទំពáŸážšáž•្សáŸáž„ទៀáž", -DlgDocIncXHTML : "បញ្ជូល XHTML", -DlgDocBgColor : "ពណ៌ážáž¶áž„ក្រោម", -DlgDocBgImage : "URL របស់រូបភាពážáž¶áž„ក្រោម", -DlgDocBgNoScroll : "ទំពáŸážšáž€áŸ’រោមមិនប្ážáž¼ážš", -DlgDocCText : "អážáŸ’ážáž”áž‘", -DlgDocCLink : "ឈ្នាប់", -DlgDocCVisited : "ឈ្នាប់មើលហើយ", -DlgDocCActive : "ឈ្នាប់កំពុងមើល", -DlgDocMargins : "ស៊ុមទំពáŸážš", -DlgDocMaTop : "លើ", -DlgDocMaLeft : "ឆ្វáŸáž„", -DlgDocMaRight : "ស្ដាំ", -DlgDocMaBottom : "ក្រោម", -DlgDocMeIndex : "ពាក្យនៅក្នុងឯកសារ (ផ្ážáž¶áž…់ពីគ្នាដោយក្បៀស)", -DlgDocMeDescr : "សáŸáž…ក្ážáž¸áž¢ážáŸ’ážáž¶áž’ិប្បាយអំពីឯកសារ", -DlgDocMeAuthor : "អ្នកនិពន្ធ", -DlgDocMeCopy : "រក្សាសិទ្ធិáŸ", -DlgDocPreview : "មើលសាកល្បង", - -// Templates Dialog -Templates : "ឯកសារគំរូ", -DlgTemplatesTitle : "ឯកសារគំរូ របស់អážáŸ’ážáž“áŸáž™", -DlgTemplatesSelMsg : "សូមជ្រើសរើសឯកសារគំរូ ដើម្បីបើកនៅក្នុងកម្មវិធីážáž¶áž€áŸ‹ážáŸ‚ងអážáŸ’ážáž”áž‘
    (អážáŸ’ážáž”ទនឹងបាážáŸ‹áž”ង់):", -DlgTemplatesLoading : "កំពុងអានបញ្ជីឯកសារគំរូ ។ សូមរងចាំ...", -DlgTemplatesNoTpl : "(ពុំមានឯកសារគំរូážáŸ’រូវបានកំណážáŸ‹)", -DlgTemplatesReplace : "Replace actual contents", //MISSING - -// About Dialog -DlgAboutAboutTab : "អំពី", -DlgAboutBrowserInfoTab : "ព៌ážáž˜áž¶áž“កម្មវិធីរុករក", -DlgAboutLicenseTab : "License", //MISSING -DlgAboutVersion : "ជំនាន់", -DlgAboutInfo : "សំរាប់ព៌ážáž˜áž¶áž“ផ្សáŸáž„ទៀហសូមទាក់ទង", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/ko.js b/fckeditor/editor/lang/ko.js deleted file mode 100644 index 00870ded..00000000 --- a/fckeditor/editor/lang/ko.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Korean language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "툴바 ê°ì¶”기", -ToolbarExpand : "툴바 ë³´ì´ê¸°", - -// Toolbar Items and Context Menu -Save : "저장하기", -NewPage : "새 문서", -Preview : "미리보기", -Cut : "잘ë¼ë‚´ê¸°", -Copy : "복사하기", -Paste : "붙여넣기", -PasteText : "í…스트로 붙여넣기", -PasteWord : "MS Word 형ì‹ì—서 붙여넣기", -Print : "ì¸ì‡„하기", -SelectAll : "ì „ì²´ì„ íƒ", -RemoveFormat : "í¬ë§· 지우기", -InsertLinkLbl : "ë§í¬", -InsertLink : "ë§í¬ 삽입/변경", -RemoveLink : "ë§í¬ ì‚­ì œ", -VisitLink : "Open Link", //MISSING -Anchor : "책갈피 삽입/변경", -AnchorDelete : "Remove Anchor", //MISSING -InsertImageLbl : "ì´ë¯¸ì§€", -InsertImage : "ì´ë¯¸ì§€ 삽입/변경", -InsertFlashLbl : "플래쉬", -InsertFlash : "플래쉬 삽입/변경", -InsertTableLbl : "표", -InsertTable : "표 삽입/변경", -InsertLineLbl : "수í‰ì„ ", -InsertLine : "수í‰ì„  삽입", -InsertSpecialCharLbl: "íŠ¹ìˆ˜ë¬¸ìž ì‚½ìž…", -InsertSpecialChar : "íŠ¹ìˆ˜ë¬¸ìž ì‚½ìž…", -InsertSmileyLbl : "ì•„ì´ì½˜", -InsertSmiley : "ì•„ì´ì½˜ 삽입", -About : "FCKeditorì— ëŒ€í•˜ì—¬", -Bold : "진하게", -Italic : "ì´í…”릭", -Underline : "밑줄", -StrikeThrough : "취소선", -Subscript : "아래 첨ìž", -Superscript : "위 첨ìž", -LeftJustify : "왼쪽 ì •ë ¬", -CenterJustify : "ê°€ìš´ë° ì •ë ¬", -RightJustify : "오른쪽 ì •ë ¬", -BlockJustify : "양쪽 맞춤", -DecreaseIndent : "내어쓰기", -IncreaseIndent : "들여쓰기", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "취소", -Redo : "재실행", -NumberedListLbl : "순서있는 목ë¡", -NumberedList : "순서있는 목ë¡", -BulletedListLbl : "순서없는 목ë¡", -BulletedList : "순서없는 목ë¡", -ShowTableBorders : "표 í…Œë‘리 보기", -ShowDetails : "문서기호 보기", -Style : "스타ì¼", -FontFormat : "í¬ë§·", -Font : "í°íЏ", -FontSize : "ê¸€ìž í¬ê¸°", -TextColor : "ê¸€ìž ìƒ‰ìƒ", -BGColor : "ë°°ê²½ 색ìƒ", -Source : "소스", -Find : "찾기", -Replace : "바꾸기", -SpellCheck : "ì² ìžê²€ì‚¬", -UniversalKeyboard : "다국어 입력기", -PageBreakLbl : "Page Break", //MISSING -PageBreak : "Insert Page Break", //MISSING - -Form : "í¼", -Checkbox : "ì²´í¬ë°•스", -RadioButton : "ë¼ë””오버튼", -TextField : "입력필드", -Textarea : "ìž…ë ¥ì˜ì—­", -HiddenField : "숨김필드", -Button : "버튼", -SelectionField : "펼침목ë¡", -ImageButton : "ì´ë¯¸ì§€ë²„튼", - -FitWindow : "ì—디터 최대화", -ShowBlocks : "Show Blocks", //MISSING - -// Context Menu -EditLink : "ë§í¬ 수정", -CellCM : "ì…€/칸(Cell)", -RowCM : "í–‰(Row)", -ColumnCM : "ì—´(Column)", -InsertRowAfter : "ë’¤ì— í–‰ 삽입", -InsertRowBefore : "ì•žì— í–‰ 삽입", -DeleteRows : "가로줄 ì‚­ì œ", -InsertColumnAfter : "ë’¤ì— ì—´ 삽입", -InsertColumnBefore : "ì•žì— ì—´ 삽입", -DeleteColumns : "세로줄 ì‚­ì œ", -InsertCellAfter : "ë’¤ì— ì…€/칸 삽입", -InsertCellBefore : "ì•žì— ì…€/칸 삽입", -DeleteCells : "ì…€ ì‚­ì œ", -MergeCells : "ì…€ 합치기", -MergeRight : "오른쪽 뭉치기", -MergeDown : "왼쪽 뭉치기", -HorizontalSplitCell : "ìˆ˜í‰ ë‚˜ëˆ„ê¸°", -VerticalSplitCell : "ìˆ˜ì§ ë‚˜ëˆ„ê¸°", -TableDelete : "표 ì‚­ì œ", -CellProperties : "ì…€ ì†ì„±", -TableProperties : "표 ì†ì„±", -ImageProperties : "ì´ë¯¸ì§€ ì†ì„±", -FlashProperties : "플래쉬 ì†ì„±", - -AnchorProp : "책갈피 ì†ì„±", -ButtonProp : "버튼 ì†ì„±", -CheckboxProp : "ì²´í¬ë°•스 ì†ì„±", -HiddenFieldProp : "숨김필드 ì†ì„±", -RadioButtonProp : "ë¼ë””오버튼 ì†ì„±", -ImageButtonProp : "ì´ë¯¸ì§€ë²„튼 ì†ì„±", -TextFieldProp : "입력필드 ì†ì„±", -SelectionFieldProp : "íŽ¼ì¹¨ëª©ë¡ ì†ì„±", -TextareaProp : "ìž…ë ¥ì˜ì—­ ì†ì„±", -FormProp : "í¼ ì†ì„±", - -FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6", - -// Alerts and Messages -ProcessingXHTML : "XHTML 처리중. 잠시만 기다려주십시요.", -Done : "완료", -PasteWordConfirm : "붙여넣기 í•  í…스트는 MS Wordì—서 복사한 것입니다. 붙여넣기 ì „ì— MS Word í¬ë©§ì„ 삭제하시겠습니까?", -NotCompatiblePaste : "ì´ ëª…ë ¹ì€ ì¸í„°ë„·ìµìŠ¤í”Œë¡œëŸ¬ 5.5 버전 ì´ìƒì—서만 ìž‘ë™í•©ë‹ˆë‹¤. í¬ë©§ì„ 삭제하지 않고 붙여넣기 하시겠습니까?", -UnknownToolbarItem : "알수없는 툴바입니다. : \"%1\"", -UnknownCommand : "알수없는 기능입니다. : \"%1\"", -NotImplemented : "ê¸°ëŠ¥ì´ ì‹¤í–‰ë˜ì§€ 않았습니다.", -UnknownToolbarSet : "툴바 ì„¤ì •ì´ ì—†ìŠµë‹ˆë‹¤. : \"%1\"", -NoActiveX : "ë¸ŒëŸ¬ìš°ì €ì˜ ë³´ì•ˆ 설정으로 ì¸í•´ 몇몇 ê¸°ëŠ¥ì˜ ìž‘ë™ì— 장애가 ìžˆì„ ìˆ˜ 있습니다. \"액티브-액스 기능과 플러그 ì¸\" ì˜µì…˜ì„ í—ˆìš©í•˜ì—¬ 주시지 않으면 오류가 ë°œìƒí•  수 있습니다.", -BrowseServerBlocked : "브러우저 요소가 열리지 않습니다. íŒì—…차단 ì„¤ì •ì´ êº¼ì ¸ìžˆëŠ”ì§€ 확ì¸í•˜ì—¬ 주십시오.", -DialogBlocked : "윈ë„ìš° ëŒ€í™”ì°½ì„ ì—´ 수 없습니다. íŒì—…차단 ì„¤ì •ì´ êº¼ì ¸ìžˆëŠ”ì§€ 확ì¸í•˜ì—¬ 주십시오.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "예", -DlgBtnCancel : "아니오", -DlgBtnClose : "닫기", -DlgBtnBrowseServer : "서버 보기", -DlgAdvancedTag : "ìžì„¸ížˆ", -DlgOpOther : "<기타>", -DlgInfoTab : "ì •ë³´", -DlgAlertUrl : "URLì„ ìž…ë ¥í•˜ì‹­ì‹œìš”", - -// General Dialogs Labels -DlgGenNotSet : "<설정ë˜ì§€ 않ìŒ>", -DlgGenId : "ID", -DlgGenLangDir : "쓰기 ë°©í–¥", -DlgGenLangDirLtr : "왼쪽ì—서 오른쪽 (LTR)", -DlgGenLangDirRtl : "오른쪽ì—서 왼쪽 (RTL)", -DlgGenLangCode : "언어 코드", -DlgGenAccessKey : "엑세스 키", -DlgGenName : "Name", -DlgGenTabIndex : "탭 순서", -DlgGenLongDescr : "URL 설명", -DlgGenClass : "Stylesheet Classes", -DlgGenTitle : "Advisory Title", -DlgGenContType : "Advisory Content Type", -DlgGenLinkCharset : "Linked Resource Charset", -DlgGenStyle : "Style", - -// Image Dialog -DlgImgTitle : "ì´ë¯¸ì§€ 설정", -DlgImgInfoTab : "ì´ë¯¸ì§€ ì •ë³´", -DlgImgBtnUpload : "서버로 전송", -DlgImgURL : "URL", -DlgImgUpload : "업로드", -DlgImgAlt : "ì´ë¯¸ì§€ 설명", -DlgImgWidth : "너비", -DlgImgHeight : "높ì´", -DlgImgLockRatio : "비율 유지", -DlgBtnResetSize : "ì›ëž˜ í¬ê¸°ë¡œ", -DlgImgBorder : "í…Œë‘리", -DlgImgHSpace : "수í‰ì—¬ë°±", -DlgImgVSpace : "수ì§ì—¬ë°±", -DlgImgAlign : "ì •ë ¬", -DlgImgAlignLeft : "왼쪽", -DlgImgAlignAbsBottom: "줄아래(Abs Bottom)", -DlgImgAlignAbsMiddle: "줄중간(Abs Middle)", -DlgImgAlignBaseline : "기준선", -DlgImgAlignBottom : "아래", -DlgImgAlignMiddle : "중간", -DlgImgAlignRight : "오른쪽", -DlgImgAlignTextTop : "글ìžìƒë‹¨", -DlgImgAlignTop : "위", -DlgImgPreview : "미리보기", -DlgImgAlertUrl : "ì´ë¯¸ì§€ URLì„ ìž…ë ¥í•˜ì‹­ì‹œìš”", -DlgImgLinkTab : "ë§í¬", - -// Flash Dialog -DlgFlashTitle : "플래쉬 등ë¡ì •ë³´", -DlgFlashChkPlay : "ìžë™ìž¬ìƒ", -DlgFlashChkLoop : "반복", -DlgFlashChkMenu : "플래쉬메뉴 가능", -DlgFlashScale : "ì˜ì—­", -DlgFlashScaleAll : "모ë‘보기", -DlgFlashScaleNoBorder : "경계선없ìŒ", -DlgFlashScaleFit : "ì˜ì—­ìžë™ì¡°ì ˆ", - -// Link Dialog -DlgLnkWindowTitle : "ë§í¬", -DlgLnkInfoTab : "ë§í¬ ì •ë³´", -DlgLnkTargetTab : "타겟", - -DlgLnkType : "ë§í¬ 종류", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "책갈피", -DlgLnkTypeEMail : "ì´ë©”ì¼", -DlgLnkProto : "프로토콜", -DlgLnkProtoOther : "<기타>", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "책갈피 ì„ íƒ", -DlgLnkAnchorByName : "책갈피 ì´ë¦„", -DlgLnkAnchorById : "책갈피 ID", -DlgLnkNoAnchors : "(ë¬¸ì„œì— ì±…ê°ˆí”¼ê°€ 없습니다.)", -DlgLnkEMail : "ì´ë©”ì¼ ì£¼ì†Œ", -DlgLnkEMailSubject : "제목", -DlgLnkEMailBody : "ë‚´ìš©", -DlgLnkUpload : "업로드", -DlgLnkBtnUpload : "서버로 전송", - -DlgLnkTarget : "타겟", -DlgLnkTargetFrame : "<프레임>", -DlgLnkTargetPopup : "<íŒì—…ì°½>", -DlgLnkTargetBlank : "새 ì°½ (_blank)", -DlgLnkTargetParent : "부모 ì°½ (_parent)", -DlgLnkTargetSelf : "현재 ì°½ (_self)", -DlgLnkTargetTop : "최 ìƒìœ„ ì°½ (_top)", -DlgLnkTargetFrameName : "타겟 프레임 ì´ë¦„", -DlgLnkPopWinName : "íŒì—…ì°½ ì´ë¦„", -DlgLnkPopWinFeat : "íŒì—…ì°½ 설정", -DlgLnkPopResize : "í¬ê¸°ì¡°ì •", -DlgLnkPopLocation : "주소표시줄", -DlgLnkPopMenu : "메뉴바", -DlgLnkPopScroll : "스í¬ë¡¤ë°”", -DlgLnkPopStatus : "ìƒíƒœë°”", -DlgLnkPopToolbar : "툴바", -DlgLnkPopFullScrn : "전체화면 (IE)", -DlgLnkPopDependent : "Dependent (Netscape)", -DlgLnkPopWidth : "너비", -DlgLnkPopHeight : "높ì´", -DlgLnkPopLeft : "왼쪽 위치", -DlgLnkPopTop : "윗쪽 위치", - -DlnLnkMsgNoUrl : "ë§í¬ URLì„ ìž…ë ¥í•˜ì‹­ì‹œìš”.", -DlnLnkMsgNoEMail : "ì´ë©”ì¼ì£¼ì†Œë¥¼ 입력하십시요.", -DlnLnkMsgNoAnchor : "ì±…ê°ˆí”¼ëª…ì„ ìž…ë ¥í•˜ì‹­ì‹œìš”.", -DlnLnkMsgInvPopName : "íŒì—…ì°½ì˜ íƒ€ì´í‹€ì€ ê³µë°±ì„ í—ˆìš©í•˜ì§€ 않습니다.", - -// Color Dialog -DlgColorTitle : "ìƒ‰ìƒ ì„ íƒ", -DlgColorBtnClear : "지우기", -DlgColorHighlight : "현재", -DlgColorSelected : "ì„ íƒë¨", - -// Smiley Dialog -DlgSmileyTitle : "ì•„ì´ì½˜ 삽입", - -// Special Character Dialog -DlgSpecialCharTitle : "íŠ¹ìˆ˜ë¬¸ìž ì„ íƒ", - -// Table Dialog -DlgTableTitle : "표 설정", -DlgTableRows : "가로줄", -DlgTableColumns : "세로줄", -DlgTableBorder : "í…Œë‘리 í¬ê¸°", -DlgTableAlign : "ì •ë ¬", -DlgTableAlignNotSet : "<설정ë˜ì§€ 않ìŒ>", -DlgTableAlignLeft : "왼쪽", -DlgTableAlignCenter : "가운ë°", -DlgTableAlignRight : "오른쪽", -DlgTableWidth : "너비", -DlgTableWidthPx : "픽셀", -DlgTableWidthPc : "í¼ì„¼íЏ", -DlgTableHeight : "높ì´", -DlgTableCellSpace : "ì…€ 간격", -DlgTableCellPad : "ì…€ 여백", -DlgTableCaption : "캡션", -DlgTableSummary : "Summary", //MISSING - -// Table Cell Dialog -DlgCellTitle : "ì…€ 설정", -DlgCellWidth : "너비", -DlgCellWidthPx : "픽셀", -DlgCellWidthPc : "í¼ì„¼íЏ", -DlgCellHeight : "높ì´", -DlgCellWordWrap : "워드랩", -DlgCellWordWrapNotSet : "<설정ë˜ì§€ 않ìŒ>", -DlgCellWordWrapYes : "예", -DlgCellWordWrapNo : "아니오", -DlgCellHorAlign : "ìˆ˜í‰ ì •ë ¬", -DlgCellHorAlignNotSet : "<설정ë˜ì§€ 않ìŒ>", -DlgCellHorAlignLeft : "왼쪽", -DlgCellHorAlignCenter : "가운ë°", -DlgCellHorAlignRight: "오른쪽", -DlgCellVerAlign : "ìˆ˜ì§ ì •ë ¬", -DlgCellVerAlignNotSet : "<설정ë˜ì§€ 않ìŒ>", -DlgCellVerAlignTop : "위", -DlgCellVerAlignMiddle : "중간", -DlgCellVerAlignBottom : "아래", -DlgCellVerAlignBaseline : "기준선", -DlgCellRowSpan : "세로 합치기", -DlgCellCollSpan : "가로 합치기", -DlgCellBackColor : "ë°°ê²½ 색ìƒ", -DlgCellBorderColor : "í…Œë‘리 색ìƒ", -DlgCellBtnSelect : "ì„ íƒ", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "찾기 & 바꾸기", - -// Find Dialog -DlgFindTitle : "찾기", -DlgFindFindBtn : "찾기", -DlgFindNotFoundMsg : "문ìžì—´ì„ ì°¾ì„ ìˆ˜ 없습니다.", - -// Replace Dialog -DlgReplaceTitle : "바꾸기", -DlgReplaceFindLbl : "ì°¾ì„ ë¬¸ìžì—´:", -DlgReplaceReplaceLbl : "바꿀 문ìžì—´:", -DlgReplaceCaseChk : "ëŒ€ì†Œë¬¸ìž êµ¬ë¶„", -DlgReplaceReplaceBtn : "바꾸기", -DlgReplaceReplAllBtn : "ëª¨ë‘ ë°”ê¾¸ê¸°", -DlgReplaceWordChk : "온전한 단어", - -// Paste Operations / Dialog -PasteErrorCut : "브ë¼ìš°ì €ì˜ ë³´ì•ˆì„¤ì •ë•Œë¬¸ì— ìž˜ë¼ë‚´ê¸° ê¸°ëŠ¥ì„ ì‹¤í–‰í•  수 없습니다. 키보드 ëª…ë ¹ì„ ì‚¬ìš©í•˜ì‹­ì‹œìš”. (Ctrl+X).", -PasteErrorCopy : "브ë¼ìš°ì €ì˜ ë³´ì•ˆì„¤ì •ë•Œë¬¸ì— ë³µì‚¬í•˜ê¸° ê¸°ëŠ¥ì„ ì‹¤í–‰í•  수 없습니다. 키보드 ëª…ë ¹ì„ ì‚¬ìš©í•˜ì‹­ì‹œìš”. (Ctrl+C).", - -PasteAsText : "í…스트로 붙여넣기", -PasteFromWord : "MS Word 형ì‹ì—서 붙여넣기", - -DlgPasteMsg2 : "í‚¤ë³´ë“œì˜ (Ctrl+V) 를 ì´ìš©í•´ì„œ ìƒìžì•ˆì— 붙여넣고 OK 를 누르세요.", -DlgPasteSec : "브러우저 보안 설정으로 ì¸í•´, í´ë¦½ë³´ë“œì˜ ìžë£Œë¥¼ ì§ì ‘ 접근할 수 없습니다. ì´ ì°½ì— ë‹¤ì‹œ 붙여넣기 하십시오.", -DlgPasteIgnoreFont : "í°íЏ 설정 무시", -DlgPasteRemoveStyles : "ìŠ¤íƒ€ì¼ ì •ì˜ ì œê±°", - -// Color Picker -ColorAutomatic : "기본색ìƒ", -ColorMoreColors : "색ìƒì„ íƒ...", - -// Document Properties -DocProps : "문서 ì†ì„±", - -// Anchor Dialog -DlgAnchorTitle : "책갈피 ì†ì„±", -DlgAnchorName : "책갈피 ì´ë¦„", -DlgAnchorErrorName : "책갈피 ì´ë¦„ì„ ìž…ë ¥í•˜ì‹­ì‹œìš”.", - -// Speller Pages Dialog -DlgSpellNotInDic : "ì‚¬ì „ì— ì—†ëŠ” 단어", -DlgSpellChangeTo : "변경할 단어", -DlgSpellBtnIgnore : "건너뜀", -DlgSpellBtnIgnoreAll : "ëª¨ë‘ ê±´ë„ˆëœ€", -DlgSpellBtnReplace : "변경", -DlgSpellBtnReplaceAll : "ëª¨ë‘ ë³€ê²½", -DlgSpellBtnUndo : "취소", -DlgSpellNoSuggestions : "- 추천단어 ì—†ìŒ -", -DlgSpellProgress : "ì² ìžê²€ì‚¬ë¥¼ 진행중입니다...", -DlgSpellNoMispell : "ì² ìžê²€ì‚¬ 완료: ìž˜ëª»ëœ ì² ìžê°€ 없습니다.", -DlgSpellNoChanges : "ì² ìžê²€ì‚¬ 완료: ë³€ê²½ëœ ë‹¨ì–´ê°€ 없습니다.", -DlgSpellOneChange : "ì² ìžê²€ì‚¬ 완료: 단어가 변경ë˜ì—ˆìŠµë‹ˆë‹¤.", -DlgSpellManyChanges : "ì² ìžê²€ì‚¬ 완료: %1 단어가 변경ë˜ì—ˆìŠµë‹ˆë‹¤.", - -IeSpellDownload : "ì² ìž ê²€ì‚¬ê¸°ê°€ 철치ë˜ì§€ 않았습니다. 지금 다운로드하시겠습니까?", - -// Button Dialog -DlgButtonText : "버튼글ìž(ê°’)", -DlgButtonType : "버튼종류", -DlgButtonTypeBtn : "Button", //MISSING -DlgButtonTypeSbm : "Submit", //MISSING -DlgButtonTypeRst : "Reset", //MISSING - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "ì´ë¦„", -DlgCheckboxValue : "ê°’", -DlgCheckboxSelected : "ì„ íƒë¨", - -// Form Dialog -DlgFormName : "í¼ì´ë¦„", -DlgFormAction : "실행경로(Action)", -DlgFormMethod : "방법(Method)", - -// Select Field Dialog -DlgSelectName : "ì´ë¦„", -DlgSelectValue : "ê°’", -DlgSelectSize : "세로í¬ê¸°", -DlgSelectLines : "줄", -DlgSelectChkMulti : "여러항목 ì„ íƒ í—ˆìš©", -DlgSelectOpAvail : "ì„ íƒì˜µì…˜", -DlgSelectOpText : "ì´ë¦„", -DlgSelectOpValue : "ê°’", -DlgSelectBtnAdd : "추가", -DlgSelectBtnModify : "변경", -DlgSelectBtnUp : "위로", -DlgSelectBtnDown : "아래로", -DlgSelectBtnSetValue : "ì„ íƒëœê²ƒìœ¼ë¡œ 설정", -DlgSelectBtnDelete : "ì‚­ì œ", - -// Textarea Dialog -DlgTextareaName : "ì´ë¦„", -DlgTextareaCols : "칸수", -DlgTextareaRows : "줄수", - -// Text Field Dialog -DlgTextName : "ì´ë¦„", -DlgTextValue : "ê°’", -DlgTextCharWidth : "ê¸€ìž ë„ˆë¹„", -DlgTextMaxChars : "최대 글ìžìˆ˜", -DlgTextType : "종류", -DlgTextTypeText : "문ìžì—´", -DlgTextTypePass : "비밀번호", - -// Hidden Field Dialog -DlgHiddenName : "ì´ë¦„", -DlgHiddenValue : "ê°’", - -// Bulleted List Dialog -BulletedListProp : "순서없는 ëª©ë¡ ì†ì„±", -NumberedListProp : "순서있는 ëª©ë¡ ì†ì„±", -DlgLstStart : "Start", //MISSING -DlgLstType : "종류", -DlgLstTypeCircle : "ì›(Circle)", -DlgLstTypeDisc : "Disc", //MISSING -DlgLstTypeSquare : "네모ì (Square)", -DlgLstTypeNumbers : "번호 (1, 2, 3)", -DlgLstTypeLCase : "ì†Œë¬¸ìž (a, b, c)", -DlgLstTypeUCase : "ëŒ€ë¬¸ìž (A, B, C)", -DlgLstTypeSRoman : "ë¡œë§ˆìž ìˆ˜ë¬¸ìž (i, ii, iii)", -DlgLstTypeLRoman : "ë¡œë§ˆìž ëŒ€ë¬¸ìž (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "ì¼ë°˜", -DlgDocBackTab : "ë°°ê²½", -DlgDocColorsTab : "ìƒ‰ìƒ ë° ì—¬ë°±", -DlgDocMetaTab : "메타ë°ì´í„°", - -DlgDocPageTitle : "페ì´ì§€ëª…", -DlgDocLangDir : "ë¬¸ìž ì“°ê¸°ë°©í–¥", -DlgDocLangDirLTR : "왼쪽ì—서 오른쪽 (LTR)", -DlgDocLangDirRTL : "오른쪽ì—서 왼쪽 (RTL)", -DlgDocLangCode : "언어코드", -DlgDocCharSet : "ìºë¦­í„°ì…‹ ì¸ì½”딩", -DlgDocCharSetCE : "Central European", //MISSING -DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING -DlgDocCharSetCR : "Cyrillic", //MISSING -DlgDocCharSetGR : "Greek", //MISSING -DlgDocCharSetJP : "Japanese", //MISSING -DlgDocCharSetKR : "Korean", //MISSING -DlgDocCharSetTR : "Turkish", //MISSING -DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING -DlgDocCharSetWE : "Western European", //MISSING -DlgDocCharSetOther : "다른 ìºë¦­í„°ì…‹ ì¸ì½”딩", - -DlgDocDocType : "문서 헤드", -DlgDocDocTypeOther : "다른 문서헤드", -DlgDocIncXHTML : "XHTML ë¬¸ì„œì •ì˜ í¬í•¨", -DlgDocBgColor : "배경색ìƒ", -DlgDocBgImage : "ë°°ê²½ì´ë¯¸ì§€ URL", -DlgDocBgNoScroll : "스í¬ë¡¤ë˜ì§€ì•ŠëŠ” ë°°ê²½", -DlgDocCText : "í…스트", -DlgDocCLink : "ë§í¬", -DlgDocCVisited : "방문한 ë§í¬(Visited)", -DlgDocCActive : "í™œì„±í™”ëœ ë§í¬(Active)", -DlgDocMargins : "페ì´ì§€ 여백", -DlgDocMaTop : "위", -DlgDocMaLeft : "왼쪽", -DlgDocMaRight : "오른쪽", -DlgDocMaBottom : "아래", -DlgDocMeIndex : "문서 키워드 (콤마로 구분)", -DlgDocMeDescr : "문서 설명", -DlgDocMeAuthor : "작성ìž", -DlgDocMeCopy : "저작권", -DlgDocPreview : "미리보기", - -// Templates Dialog -Templates : "템플릿", -DlgTemplatesTitle : "ë‚´ìš© 템플릿", -DlgTemplatesSelMsg : "ì—디터ì—서 사용할 í…œí”Œë¦¿ì„ ì„ íƒí•˜ì‹­ì‹œìš”.
    (지금까지 ìž‘ì„±ëœ ë‚´ìš©ì€ ì‚¬ë¼ì§‘니다.):", -DlgTemplatesLoading : "템플릿 목ë¡ì„ 불러오는중입니다. 잠시만 기다려주십시요.", -DlgTemplatesNoTpl : "(í…œí”Œë¦¿ì´ ì—†ìŠµë‹ˆë‹¤.)", -DlgTemplatesReplace : "현재 ë‚´ìš© 바꾸기", - -// About Dialog -DlgAboutAboutTab : "About", -DlgAboutBrowserInfoTab : "브ë¼ìš°ì € ì •ë³´", -DlgAboutLicenseTab : "License", //MISSING -DlgAboutVersion : "버전", -DlgAboutInfo : "ë” ë§Žì€ ì •ë³´ë¥¼ 보시려면 ë‹¤ìŒ ì‚¬ì´íŠ¸ë¡œ 가십시오.", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/lt.js b/fckeditor/editor/lang/lt.js deleted file mode 100644 index de2f8f52..00000000 --- a/fckeditor/editor/lang/lt.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Lithuanian language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "Sutraukti mygtukų juostÄ…", -ToolbarExpand : "IÅ¡plÄ—sti mygtukų juostÄ…", - -// Toolbar Items and Context Menu -Save : "IÅ¡saugoti", -NewPage : "Naujas puslapis", -Preview : "PeržiÅ«ra", -Cut : "IÅ¡kirpti", -Copy : "Kopijuoti", -Paste : "Ä®dÄ—ti", -PasteText : "Ä®dÄ—ti kaip grynÄ… tekstÄ…", -PasteWord : "Ä®dÄ—ti iÅ¡ Word", -Print : "Spausdinti", -SelectAll : "PažymÄ—ti viskÄ…", -RemoveFormat : "Panaikinti formatÄ…", -InsertLinkLbl : "Nuoroda", -InsertLink : "Ä®terpti/taisyti nuorodÄ…", -RemoveLink : "Panaikinti nuorodÄ…", -VisitLink : "Open Link", //MISSING -Anchor : "Ä®terpti/modifikuoti žymÄ™", -AnchorDelete : "Remove Anchor", //MISSING -InsertImageLbl : "Vaizdas", -InsertImage : "Ä®terpti/taisyti vaizdÄ…", -InsertFlashLbl : "Flash", -InsertFlash : "Ä®terpti/taisyti Flash", -InsertTableLbl : "LentelÄ—", -InsertTable : "Ä®terpti/taisyti lentelÄ™", -InsertLineLbl : "Linija", -InsertLine : "Ä®terpti horizontaliÄ… linijÄ…", -InsertSpecialCharLbl: "Spec. simbolis", -InsertSpecialChar : "Ä®terpti specialų simbolį", -InsertSmileyLbl : "Veideliai", -InsertSmiley : "Ä®terpti veidelį", -About : "Apie FCKeditor", -Bold : "Pusjuodis", -Italic : "Kursyvas", -Underline : "Pabrauktas", -StrikeThrough : "Perbrauktas", -Subscript : "Apatinis indeksas", -Superscript : "VirÅ¡utinis indeksas", -LeftJustify : "Lygiuoti kairÄ™", -CenterJustify : "Centruoti", -RightJustify : "Lygiuoti deÅ¡inÄ™", -BlockJustify : "Lygiuoti abi puses", -DecreaseIndent : "Sumažinti įtraukÄ…", -IncreaseIndent : "Padidinti įtraukÄ…", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "AtÅ¡aukti", -Redo : "Atstatyti", -NumberedListLbl : "Numeruotas sÄ…raÅ¡as", -NumberedList : "Ä®terpti/Panaikinti numeruotÄ… sÄ…rašą", -BulletedListLbl : "Suženklintas sÄ…raÅ¡as", -BulletedList : "Ä®terpti/Panaikinti suženklintÄ… sÄ…rašą", -ShowTableBorders : "Rodyti lentelÄ—s rÄ—mus", -ShowDetails : "Rodyti detales", -Style : "Stilius", -FontFormat : "Å rifto formatas", -Font : "Å riftas", -FontSize : "Å rifto dydis", -TextColor : "Teksto spalva", -BGColor : "Fono spalva", -Source : "Å altinis", -Find : "Rasti", -Replace : "Pakeisti", -SpellCheck : "RaÅ¡ybos tikrinimas", -UniversalKeyboard : "Universali klaviatÅ«ra", -PageBreakLbl : "Puslapių skirtukas", -PageBreak : "Ä®terpti puslapių skirtukÄ…", - -Form : "Forma", -Checkbox : "Žymimasis langelis", -RadioButton : "Žymimoji akutÄ—", -TextField : "Teksto laukas", -Textarea : "Teksto sritis", -HiddenField : "Nerodomas laukas", -Button : "Mygtukas", -SelectionField : "Atrankos laukas", -ImageButton : "Vaizdinis mygtukas", - -FitWindow : "Maximize the editor size", //MISSING -ShowBlocks : "Show Blocks", //MISSING - -// Context Menu -EditLink : "Taisyti nuorodÄ…", -CellCM : "Cell", //MISSING -RowCM : "Row", //MISSING -ColumnCM : "Column", //MISSING -InsertRowAfter : "Insert Row After", //MISSING -InsertRowBefore : "Insert Row Before", //MISSING -DeleteRows : "Å alinti eilutes", -InsertColumnAfter : "Insert Column After", //MISSING -InsertColumnBefore : "Insert Column Before", //MISSING -DeleteColumns : "Å alinti stulpelius", -InsertCellAfter : "Insert Cell After", //MISSING -InsertCellBefore : "Insert Cell Before", //MISSING -DeleteCells : "Å alinti langelius", -MergeCells : "Sujungti langelius", -MergeRight : "Merge Right", //MISSING -MergeDown : "Merge Down", //MISSING -HorizontalSplitCell : "Split Cell Horizontally", //MISSING -VerticalSplitCell : "Split Cell Vertically", //MISSING -TableDelete : "Å alinti lentelÄ™", -CellProperties : "Langelio savybÄ—s", -TableProperties : "LentelÄ—s savybÄ—s", -ImageProperties : "Vaizdo savybÄ—s", -FlashProperties : "Flash savybÄ—s", - -AnchorProp : "ŽymÄ—s savybÄ—s", -ButtonProp : "Mygtuko savybÄ—s", -CheckboxProp : "Žymimojo langelio savybÄ—s", -HiddenFieldProp : "Nerodomo lauko savybÄ—s", -RadioButtonProp : "Žymimosios akutÄ—s savybÄ—s", -ImageButtonProp : "Vaizdinio mygtuko savybÄ—s", -TextFieldProp : "Teksto lauko savybÄ—s", -SelectionFieldProp : "Atrankos lauko savybÄ—s", -TextareaProp : "Teksto srities savybÄ—s", -FormProp : "Formos savybÄ—s", - -FontFormats : "Normalus;Formuotas;Kreipinio;AntraÅ¡tinis 1;AntraÅ¡tinis 2;AntraÅ¡tinis 3;AntraÅ¡tinis 4;AntraÅ¡tinis 5;AntraÅ¡tinis 6", - -// Alerts and Messages -ProcessingXHTML : "Apdorojamas XHTML. PraÅ¡ome palaukti...", -Done : "Baigta", -PasteWordConfirm : "Ä®dedamas tekstas yra panaÅ¡us į kopijÄ… iÅ¡ Word. Ar JÅ«s norite prieÅ¡ įdÄ—jimÄ… iÅ¡valyti jį?", -NotCompatiblePaste : "Å i komanda yra prieinama tik per Internet Explorer 5.5 ar aukÅ¡tesnÄ™ versijÄ…. Ar JÅ«s norite įterpti be valymo?", -UnknownToolbarItem : "Nežinomas mygtukų juosta elementas \"%1\"", -UnknownCommand : "Nežinomas komandos vardas \"%1\"", -NotImplemented : "Komanda nÄ—ra įgyvendinta", -UnknownToolbarSet : "Mygtukų juostos rinkinys \"%1\" neegzistuoja", -NoActiveX : "JÅ«sų narÅ¡yklÄ—s saugumo nuostatos gali riboti kai kurias redaktoriaus savybes. JÅ«s turite aktyvuoti opcijÄ… \"Run ActiveX controls and plug-ins\". Kitu atveju Jums bus praneÅ¡ama apie klaidas ir trÅ«kstamas savybes.", -BrowseServerBlocked : "Neįmanoma atidaryti naujo narÅ¡yklÄ—s lango. Ä®sitikinkite, kad iÅ¡kylanÄių langų blokavimo programos neveiksnios.", -DialogBlocked : "Neįmanoma atidaryti dialogo lango. Ä®sitikinkite, kad iÅ¡kylanÄių langų blokavimo programos neveiksnios.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "OK", -DlgBtnCancel : "Nutraukti", -DlgBtnClose : "Uždaryti", -DlgBtnBrowseServer : "NarÅ¡yti po serverį", -DlgAdvancedTag : "Papildomas", -DlgOpOther : "", -DlgInfoTab : "Informacija", -DlgAlertUrl : "PraÅ¡ome įraÅ¡yti URL", - -// General Dialogs Labels -DlgGenNotSet : "", -DlgGenId : "Id", -DlgGenLangDir : "Teksto kryptis", -DlgGenLangDirLtr : "IÅ¡ kairÄ—s į deÅ¡inÄ™ (LTR)", -DlgGenLangDirRtl : "IÅ¡ deÅ¡inÄ—s į kairÄ™ (RTL)", -DlgGenLangCode : "Kalbos kodas", -DlgGenAccessKey : "Prieigos raktas", -DlgGenName : "Vardas", -DlgGenTabIndex : "Tabuliavimo indeksas", -DlgGenLongDescr : "Ilgas apraÅ¡ymas URL", -DlgGenClass : "Stilių lentelÄ—s klasÄ—s", -DlgGenTitle : "KonsultacinÄ— antraÅ¡tÄ—", -DlgGenContType : "Konsultacinio turinio tipas", -DlgGenLinkCharset : "Susietų iÅ¡teklių simbolių lentelÄ—", -DlgGenStyle : "Stilius", - -// Image Dialog -DlgImgTitle : "Vaizdo savybÄ—s", -DlgImgInfoTab : "Vaizdo informacija", -DlgImgBtnUpload : "Siųsti į serverį", -DlgImgURL : "URL", -DlgImgUpload : "Nusiųsti", -DlgImgAlt : "Alternatyvus Tekstas", -DlgImgWidth : "Plotis", -DlgImgHeight : "AukÅ¡tis", -DlgImgLockRatio : "IÅ¡laikyti proporcijÄ…", -DlgBtnResetSize : "Atstatyti dydį", -DlgImgBorder : "RÄ—melis", -DlgImgHSpace : "Hor.ErdvÄ—", -DlgImgVSpace : "Vert.ErdvÄ—", -DlgImgAlign : "Lygiuoti", -DlgImgAlignLeft : "KairÄ™", -DlgImgAlignAbsBottom: "AbsoliuÄiÄ… apaÄiÄ…", -DlgImgAlignAbsMiddle: "Absoliutų vidurį", -DlgImgAlignBaseline : "ApatinÄ™ linijÄ…", -DlgImgAlignBottom : "ApaÄiÄ…", -DlgImgAlignMiddle : "Vidurį", -DlgImgAlignRight : "DeÅ¡inÄ™", -DlgImgAlignTextTop : "Teksto viršūnÄ™", -DlgImgAlignTop : "ViršūnÄ™", -DlgImgPreview : "PeržiÅ«ra", -DlgImgAlertUrl : "PraÅ¡ome įvesti vaizdo URL", -DlgImgLinkTab : "Nuoroda", - -// Flash Dialog -DlgFlashTitle : "Flash savybÄ—s", -DlgFlashChkPlay : "Automatinis paleidimas", -DlgFlashChkLoop : "Ciklas", -DlgFlashChkMenu : "Leisti Flash meniu", -DlgFlashScale : "Mastelis", -DlgFlashScaleAll : "Rodyti visÄ…", -DlgFlashScaleNoBorder : "Be rÄ—melio", -DlgFlashScaleFit : "Tikslus atitikimas", - -// Link Dialog -DlgLnkWindowTitle : "Nuoroda", -DlgLnkInfoTab : "Nuorodos informacija", -DlgLnkTargetTab : "Paskirtis", - -DlgLnkType : "Nuorodos tipas", -DlgLnkTypeURL : "URL", -DlgLnkTypeAnchor : "ŽymÄ— Å¡iame puslapyje", -DlgLnkTypeEMail : "El.paÅ¡tas", -DlgLnkProto : "Protokolas", -DlgLnkProtoOther : "", -DlgLnkURL : "URL", -DlgLnkAnchorSel : "Pasirinkite žymÄ™", -DlgLnkAnchorByName : "Pagal žymÄ—s vardÄ…", -DlgLnkAnchorById : "Pagal žymÄ—s Id", -DlgLnkNoAnchors : "(Å iame dokumente žymių nÄ—ra)", -DlgLnkEMail : "El.paÅ¡to adresas", -DlgLnkEMailSubject : "ŽinutÄ—s tema", -DlgLnkEMailBody : "ŽinutÄ—s turinys", -DlgLnkUpload : "Siųsti", -DlgLnkBtnUpload : "Siųsti į serverį", - -DlgLnkTarget : "Paskirties vieta", -DlgLnkTargetFrame : "", -DlgLnkTargetPopup : "", -DlgLnkTargetBlank : "Naujas langas (_blank)", -DlgLnkTargetParent : "Pirminis langas (_parent)", -DlgLnkTargetSelf : "Tas pats langas (_self)", -DlgLnkTargetTop : "Svarbiausias langas (_top)", -DlgLnkTargetFrameName : "Paskirties kadro vardas", -DlgLnkPopWinName : "Paskirties lango vardas", -DlgLnkPopWinFeat : "IÅ¡skleidžiamo lango savybÄ—s", -DlgLnkPopResize : "KeiÄiamas dydis", -DlgLnkPopLocation : "Adreso juosta", -DlgLnkPopMenu : "Meniu juosta", -DlgLnkPopScroll : "Slinkties juostos", -DlgLnkPopStatus : "BÅ«senos juosta", -DlgLnkPopToolbar : "Mygtukų juosta", -DlgLnkPopFullScrn : "Visas ekranas (IE)", -DlgLnkPopDependent : "Priklausomas (Netscape)", -DlgLnkPopWidth : "Plotis", -DlgLnkPopHeight : "AukÅ¡tis", -DlgLnkPopLeft : "KairÄ— pozicija", -DlgLnkPopTop : "VirÅ¡utinÄ— pozicija", - -DlnLnkMsgNoUrl : "PraÅ¡ome įvesti nuorodos URL", -DlnLnkMsgNoEMail : "PraÅ¡ome įvesti el.paÅ¡to adresÄ…", -DlnLnkMsgNoAnchor : "PraÅ¡ome pasirinkti žymÄ™", -DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", //MISSING - -// Color Dialog -DlgColorTitle : "Pasirinkite spalvÄ…", -DlgColorBtnClear : "Trinti", -DlgColorHighlight : "ParyÅ¡kinta", -DlgColorSelected : "PažymÄ—ta", - -// Smiley Dialog -DlgSmileyTitle : "Ä®terpti veidelį", - -// Special Character Dialog -DlgSpecialCharTitle : "Pasirinkite specialų simbolį", - -// Table Dialog -DlgTableTitle : "LentelÄ—s savybÄ—s", -DlgTableRows : "EilutÄ—s", -DlgTableColumns : "Stulpeliai", -DlgTableBorder : "RÄ—melio dydis", -DlgTableAlign : "Lygiuoti", -DlgTableAlignNotSet : "", -DlgTableAlignLeft : "KairÄ™", -DlgTableAlignCenter : "CentrÄ…", -DlgTableAlignRight : "DeÅ¡inÄ™", -DlgTableWidth : "Plotis", -DlgTableWidthPx : "taÅ¡kais", -DlgTableWidthPc : "procentais", -DlgTableHeight : "AukÅ¡tis", -DlgTableCellSpace : "Tarpas tarp langelių", -DlgTableCellPad : "Trapas nuo langelio rÄ—mo iki teksto", -DlgTableCaption : "AntraÅ¡tÄ—", -DlgTableSummary : "Santrauka", - -// Table Cell Dialog -DlgCellTitle : "Langelio savybÄ—s", -DlgCellWidth : "Plotis", -DlgCellWidthPx : "taÅ¡kais", -DlgCellWidthPc : "procentais", -DlgCellHeight : "AukÅ¡tis", -DlgCellWordWrap : "Teksto laužymas", -DlgCellWordWrapNotSet : "", -DlgCellWordWrapYes : "Taip", -DlgCellWordWrapNo : "Ne", -DlgCellHorAlign : "Horizontaliai lygiuoti", -DlgCellHorAlignNotSet : "", -DlgCellHorAlignLeft : "KairÄ™", -DlgCellHorAlignCenter : "CentrÄ…", -DlgCellHorAlignRight: "DeÅ¡inÄ™", -DlgCellVerAlign : "Vertikaliai lygiuoti", -DlgCellVerAlignNotSet : "", -DlgCellVerAlignTop : "Viršų", -DlgCellVerAlignMiddle : "Vidurį", -DlgCellVerAlignBottom : "ApaÄiÄ…", -DlgCellVerAlignBaseline : "ApatinÄ™ linijÄ…", -DlgCellRowSpan : "EiluÄių apjungimas", -DlgCellCollSpan : "Stulpelių apjungimas", -DlgCellBackColor : "Fono spalva", -DlgCellBorderColor : "RÄ—melio spalva", -DlgCellBtnSelect : "PažymÄ—ti...", - -// Find and Replace Dialog -DlgFindAndReplaceTitle : "Find and Replace", //MISSING - -// Find Dialog -DlgFindTitle : "PaieÅ¡ka", -DlgFindFindBtn : "Surasti", -DlgFindNotFoundMsg : "Nurodytas tekstas nerastas.", - -// Replace Dialog -DlgReplaceTitle : "Pakeisti", -DlgReplaceFindLbl : "Surasti tekstÄ…:", -DlgReplaceReplaceLbl : "Pakeisti tekstu:", -DlgReplaceCaseChk : "Skirti didžiÄ…sias ir mažąsias raides", -DlgReplaceReplaceBtn : "Pakeisti", -DlgReplaceReplAllBtn : "Pakeisti viskÄ…", -DlgReplaceWordChk : "Atitikti pilnÄ… žodį", - -// Paste Operations / Dialog -PasteErrorCut : "JÅ«sų narÅ¡yklÄ—s saugumo nustatymai neleidžia redaktoriui automatiÅ¡kai įvykdyti iÅ¡kirpimo operacijų. Tam praÅ¡ome naudoti klaviatÅ«rÄ… (Ctrl+X).", -PasteErrorCopy : "JÅ«sų narÅ¡yklÄ—s saugumo nustatymai neleidžia redaktoriui automatiÅ¡kai įvykdyti kopijavimo operacijų. Tam praÅ¡ome naudoti klaviatÅ«rÄ… (Ctrl+C).", - -PasteAsText : "Ä®dÄ—ti kaip grynÄ… tekstÄ…", -PasteFromWord : "Ä®dÄ—ti iÅ¡ Word", - -DlgPasteMsg2 : "Žemiau esanÄiame įvedimo lauke įdÄ—kite tekstÄ…, naudodami klaviatÅ«rÄ… (Ctrl+V) ir spÅ«stelkite mygtukÄ… OK.", -DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING -DlgPasteIgnoreFont : "Ignoruoti Å¡riftų nustatymus", -DlgPasteRemoveStyles : "PaÅ¡alinti stilių nustatymus", - -// Color Picker -ColorAutomatic : "Automatinis", -ColorMoreColors : "Daugiau spalvų...", - -// Document Properties -DocProps : "Dokumento savybÄ—s", - -// Anchor Dialog -DlgAnchorTitle : "ŽymÄ—s savybÄ—s", -DlgAnchorName : "ŽymÄ—s vardas", -DlgAnchorErrorName : "PraÅ¡ome įvesti žymÄ—s vardÄ…", - -// Speller Pages Dialog -DlgSpellNotInDic : "Žodyne nerastas", -DlgSpellChangeTo : "Pakeisti į", -DlgSpellBtnIgnore : "Ignoruoti", -DlgSpellBtnIgnoreAll : "Ignoruoti visus", -DlgSpellBtnReplace : "Pakeisti", -DlgSpellBtnReplaceAll : "Pakeisti visus", -DlgSpellBtnUndo : "AtÅ¡aukti", -DlgSpellNoSuggestions : "- NÄ—ra pasiÅ«lymų -", -DlgSpellProgress : "Vyksta raÅ¡ybos tikrinimas...", -DlgSpellNoMispell : "RaÅ¡ybos tikrinimas baigtas: Nerasta raÅ¡ybos klaidų", -DlgSpellNoChanges : "RaÅ¡ybos tikrinimas baigtas: NÄ—ra pakeistų žodžių", -DlgSpellOneChange : "RaÅ¡ybos tikrinimas baigtas: Vienas žodis pakeistas", -DlgSpellManyChanges : "RaÅ¡ybos tikrinimas baigtas: Pakeista %1 žodžių", - -IeSpellDownload : "RaÅ¡ybos tikrinimas neinstaliuotas. Ar JÅ«s norite jį dabar atsisiųsti?", - -// Button Dialog -DlgButtonText : "Tekstas (ReikÅ¡mÄ—)", -DlgButtonType : "Tipas", -DlgButtonTypeBtn : "Button", //MISSING -DlgButtonTypeSbm : "Submit", //MISSING -DlgButtonTypeRst : "Reset", //MISSING - -// Checkbox and Radio Button Dialogs -DlgCheckboxName : "Vardas", -DlgCheckboxValue : "ReikÅ¡mÄ—", -DlgCheckboxSelected : "PažymÄ—tas", - -// Form Dialog -DlgFormName : "Vardas", -DlgFormAction : "Veiksmas", -DlgFormMethod : "Metodas", - -// Select Field Dialog -DlgSelectName : "Vardas", -DlgSelectValue : "ReikÅ¡mÄ—", -DlgSelectSize : "Dydis", -DlgSelectLines : "eiluÄių", -DlgSelectChkMulti : "Leisti daugeriopÄ… atrankÄ…", -DlgSelectOpAvail : "Galimos parinktys", -DlgSelectOpText : "Tekstas", -DlgSelectOpValue : "ReikÅ¡mÄ—", -DlgSelectBtnAdd : "Ä®traukti", -DlgSelectBtnModify : "Modifikuoti", -DlgSelectBtnUp : "AukÅ¡tyn", -DlgSelectBtnDown : "Žemyn", -DlgSelectBtnSetValue : "Laikyti pažymÄ—ta reikÅ¡me", -DlgSelectBtnDelete : "Trinti", - -// Textarea Dialog -DlgTextareaName : "Vardas", -DlgTextareaCols : "Ilgis", -DlgTextareaRows : "Plotis", - -// Text Field Dialog -DlgTextName : "Vardas", -DlgTextValue : "ReikÅ¡mÄ—", -DlgTextCharWidth : "Ilgis simboliais", -DlgTextMaxChars : "Maksimalus simbolių skaiÄius", -DlgTextType : "Tipas", -DlgTextTypeText : "Tekstas", -DlgTextTypePass : "Slaptažodis", - -// Hidden Field Dialog -DlgHiddenName : "Vardas", -DlgHiddenValue : "ReikÅ¡mÄ—", - -// Bulleted List Dialog -BulletedListProp : "Suženklinto sÄ…raÅ¡o savybÄ—s", -NumberedListProp : "Numeruoto sÄ…raÅ¡o savybÄ—s", -DlgLstStart : "Start", //MISSING -DlgLstType : "Tipas", -DlgLstTypeCircle : "Apskritimas", -DlgLstTypeDisc : "Diskas", -DlgLstTypeSquare : "Kvadratas", -DlgLstTypeNumbers : "SkaiÄiai (1, 2, 3)", -DlgLstTypeLCase : "Mažosios raidÄ—s (a, b, c)", -DlgLstTypeUCase : "Didžiosios raidÄ—s (A, B, C)", -DlgLstTypeSRoman : "RomÄ—nų mažieji skaiÄiai (i, ii, iii)", -DlgLstTypeLRoman : "RomÄ—nų didieji skaiÄiai (I, II, III)", - -// Document Properties Dialog -DlgDocGeneralTab : "Bendros savybÄ—s", -DlgDocBackTab : "Fonas", -DlgDocColorsTab : "Spalvos ir kraÅ¡tinÄ—s", -DlgDocMetaTab : "Meta duomenys", - -DlgDocPageTitle : "Puslapio antraÅ¡tÄ—", -DlgDocLangDir : "Kalbos kryptis", -DlgDocLangDirLTR : "IÅ¡ kairÄ—s į deÅ¡inÄ™ (LTR)", -DlgDocLangDirRTL : "IÅ¡ deÅ¡inÄ—s į kairÄ™ (RTL)", -DlgDocLangCode : "Kalbos kodas", -DlgDocCharSet : "Simbolių kodavimo lentelÄ—", -DlgDocCharSetCE : "Central European", //MISSING -DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING -DlgDocCharSetCR : "Cyrillic", //MISSING -DlgDocCharSetGR : "Greek", //MISSING -DlgDocCharSetJP : "Japanese", //MISSING -DlgDocCharSetKR : "Korean", //MISSING -DlgDocCharSetTR : "Turkish", //MISSING -DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING -DlgDocCharSetWE : "Western European", //MISSING -DlgDocCharSetOther : "Kita simbolių kodavimo lentelÄ—", - -DlgDocDocType : "Dokumento tipo antraÅ¡tÄ—", -DlgDocDocTypeOther : "Kita dokumento tipo antraÅ¡tÄ—", -DlgDocIncXHTML : "Ä®traukti XHTML deklaracijas", -DlgDocBgColor : "Fono spalva", -DlgDocBgImage : "Fono paveikslÄ—lio nuoroda (URL)", -DlgDocBgNoScroll : "Neslenkantis fonas", -DlgDocCText : "Tekstas", -DlgDocCLink : "Nuoroda", -DlgDocCVisited : "Aplankyta nuoroda", -DlgDocCActive : "Aktyvi nuoroda", -DlgDocMargins : "Puslapio kraÅ¡tinÄ—s", -DlgDocMaTop : "VirÅ¡uje", -DlgDocMaLeft : "KairÄ—je", -DlgDocMaRight : "DeÅ¡inÄ—je", -DlgDocMaBottom : "ApaÄioje", -DlgDocMeIndex : "Dokumento indeksavimo raktiniai žodžiai (atskirti kableliais)", -DlgDocMeDescr : "Dokumento apibÅ«dinimas", -DlgDocMeAuthor : "Autorius", -DlgDocMeCopy : "AutorinÄ—s teisÄ—s", -DlgDocPreview : "PeržiÅ«ra", - -// Templates Dialog -Templates : "Å ablonai", -DlgTemplatesTitle : "Turinio Å¡ablonai", -DlgTemplatesSelMsg : "Pasirinkite norimÄ… Å¡ablonÄ…
    (DÄ—mesio! esamas turinys bus prarastas):", -DlgTemplatesLoading : "Ä®keliamas Å¡ablonų sÄ…raÅ¡as. PraÅ¡ome palaukti...", -DlgTemplatesNoTpl : "(Å ablonų sÄ…raÅ¡as tuÅ¡Äias)", -DlgTemplatesReplace : "Replace actual contents", //MISSING - -// About Dialog -DlgAboutAboutTab : "Apie", -DlgAboutBrowserInfoTab : "NarÅ¡yklÄ—s informacija", -DlgAboutLicenseTab : "License", //MISSING -DlgAboutVersion : "versija", -DlgAboutInfo : "PapildomÄ… informacijÄ… galima gauti", - -// Div Dialog -DlgDivGeneralTab : "General", //MISSING -DlgDivAdvancedTab : "Advanced", //MISSING -DlgDivStyle : "Style", //MISSING -DlgDivInlineStyle : "Inline Style" //MISSING -}; diff --git a/fckeditor/editor/lang/lv.js b/fckeditor/editor/lang/lv.js deleted file mode 100644 index 1db14abf..00000000 --- a/fckeditor/editor/lang/lv.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - * FCKeditor - The text editor for Internet - http://www.fckeditor.net - * Copyright (C) 2003-2008 Frederico Caldeira Knabben - * - * == BEGIN LICENSE == - * - * Licensed under the terms of any of the following licenses at your - * choice: - * - * - GNU General Public License Version 2 or later (the "GPL") - * http://www.gnu.org/licenses/gpl.html - * - * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - * http://www.gnu.org/licenses/lgpl.html - * - * - Mozilla Public License Version 1.1 or later (the "MPL") - * http://www.mozilla.org/MPL/MPL-1.1.html - * - * == END LICENSE == - * - * Latvian language file. - */ - -var FCKLang = -{ -// Language direction : "ltr" (left to right) or "rtl" (right to left). -Dir : "ltr", - -ToolbarCollapse : "SamazinÄt rÄ«ku joslu", -ToolbarExpand : "PaplaÅ¡inÄt rÄ«ku joslu", - -// Toolbar Items and Context Menu -Save : "SaglabÄt", -NewPage : "Jauna lapa", -Preview : "PÄrskatÄ«t", -Cut : "Izgriezt", -Copy : "KopÄ“t", -Paste : "Ievietot", -PasteText : "Ievietot kÄ vienkÄrÅ¡u tekstu", -PasteWord : "Ievietot no Worda", -Print : "DrukÄt", -SelectAll : "IezÄ«mÄ“t visu", -RemoveFormat : "Noņemt stilus", -InsertLinkLbl : "Hipersaite", -InsertLink : "Ievietot/Labot hipersaiti", -RemoveLink : "Noņemt hipersaiti", -VisitLink : "Open Link", //MISSING -Anchor : "Ievietot/Labot iezÄ«mi", -AnchorDelete : "Remove Anchor", //MISSING -InsertImageLbl : "AttÄ“ls", -InsertImage : "Ievietot/Labot AttÄ“lu", -InsertFlashLbl : "Flash", -InsertFlash : "Ievietot/Labot Flash", -InsertTableLbl : "Tabula", -InsertTable : "Ievietot/Labot Tabulu", -InsertLineLbl : "AtdalÄ«tÄjsvÄ«tra", -InsertLine : "Ievietot horizontÄlu AtdalÄ«tÄjsvÄ«tru", -InsertSpecialCharLbl: "ĪpaÅ¡s simbols", -InsertSpecialChar : "Ievietot speciÄlo simbolu", -InsertSmileyLbl : "Smaidiņi", -InsertSmiley : "Ievietot smaidiņu", -About : "ĪsumÄ par FCKeditor", -Bold : "Treknu Å¡riftu", -Italic : "SlÄ«prakstÄ", -Underline : "ApakÅ¡svÄ«tra", -StrikeThrough : "PÄrsvÄ«trots", -Subscript : "ZemrakstÄ", -Superscript : "AugÅ¡rakstÄ", -LeftJustify : "IzlÄ«dzinÄt pa kreisi", -CenterJustify : "IzlÄ«dzinÄt pret centru", -RightJustify : "IzlÄ«dzinÄt pa labi", -BlockJustify : "IzlÄ«dzinÄt malas", -DecreaseIndent : "SamazinÄt atkÄpi", -IncreaseIndent : "PalielinÄt atkÄpi", -Blockquote : "Blockquote", //MISSING -CreateDiv : "Create Div Container", //MISSING -EditDiv : "Edit Div Container", //MISSING -DeleteDiv : "Remove Div Container", //MISSING -Undo : "Atcelt", -Redo : "AtkÄrtot", -NumberedListLbl : "NumurÄ“ts saraksts", -NumberedList : "Ievietot/Noņemt numerÄ“to sarakstu", -BulletedListLbl : "Izcelts saraksts", -BulletedList : "Ievietot/Noņemt izceltu sarakstu", -ShowTableBorders : "ParÄdÄ«t tabulas robežas", -ShowDetails : "ParÄdÄ«t sÄ«kÄku informÄciju", -Style : "Stils", -FontFormat : "FormÄts", -Font : "Å rifts", -FontSize : "IzmÄ“rs", -TextColor : "Teksta krÄsa", -BGColor : "Fona krÄsa", -Source : "HTML kods", -Find : "MeklÄ“t", -Replace : "NomainÄ«t", -SpellCheck : "PareizrakstÄ«bas pÄrbaude", -UniversalKeyboard : "UniversÄla klaviatÅ«ra", -PageBreakLbl : "Lapas pÄrtraukums", -PageBreak : "Ievietot lapas pÄrtraukumu", - -Form : "Forma", -Checkbox : "AtzÄ«mēšanas kastÄ«te", -RadioButton : "IzvÄ“les poga", -TextField : "Teksta rinda", -Textarea : "Teksta laukums", -HiddenField : "PaslÄ“pta teksta rinda", -Button : "Poga", -SelectionField : "IezÄ«mēšanas lauks", -ImageButton : "AttÄ“lpoga", - -FitWindow : "MaksimizÄ“t redaktora izmÄ“ru", -ShowBlocks : "Show Blocks", //MISSING - -// Context Menu -EditLink : "Labot hipersaiti", -CellCM : "Å Å«na", -RowCM : "Rinda", -ColumnCM : "Kolonna", -InsertRowAfter : "Insert Row After", //MISSING -InsertRowBefore : "Insert Row Before", //MISSING -DeleteRows : "DzÄ“st rindas", -InsertColumnAfter : "Insert Column After", //MISSING -InsertColumnBefore : "Insert Column Before", //MISSING -DeleteColumns : "DzÄ“st kolonnas", -InsertCellAfter : "Insert Cell After", //MISSING -InsertCellBefore : "Insert Cell Before", //MISSING -DeleteCells : "DzÄ“st rÅ«tiņas", -MergeCells : "Apvienot rÅ«tiņas", -MergeRight : "Merge Right", //MISSING -MergeDown : "Merge Down", //MISSING -HorizontalSplitCell : "Split Cell Horizontally", //MISSING -VerticalSplitCell : "Split Cell Vertically", //MISSING -TableDelete : "DzÄ“st tabulu", -CellProperties : "RÅ«tiņas Ä«pašības", -TableProperties : "Tabulas Ä«pašības", -ImageProperties : "AttÄ“la Ä«pašības", -FlashProperties : "Flash Ä«pašības", - -AnchorProp : "IezÄ«mes Ä«pašības", -ButtonProp : "Pogas Ä«pašības", -CheckboxProp : "AtzÄ«mēšanas kastÄ«tes Ä«pašības", -HiddenFieldProp : "PaslÄ“ptÄs teksta rindas Ä«pašības", -RadioButtonProp : "IzvÄ“les poga Ä«pašības", -ImageButtonProp : "AttÄ“lpogas Ä«pašības", -TextFieldProp : "Teksta rindas Ä«pašības", -SelectionFieldProp : "IezÄ«mēšanas lauka Ä«pašības", -TextareaProp : "Teksta laukuma Ä«pašības", -FormProp : "Formas Ä«pašības", - -FontFormats : "NormÄls teksts;FormatÄ“ts teksts;Adrese;Virsraksts 1;Virsraksts 2;Virsraksts 3;Virsraksts 4;Virsraksts 5;Virsraksts 6;Rindkopa (DIV)", - -// Alerts and Messages -ProcessingXHTML : "Tiek apstrÄdÄts XHTML. LÅ«dzu uzgaidiet...", -Done : "DarÄ«ts", -PasteWordConfirm : "Teksta fragments, kas tiek ievietots, izskatÄs, ka bÅ«tu sagatavots Word'Ä. Vai vÄ“laties to apstrÄdÄt pirms ievietoÅ¡anas?", -NotCompatiblePaste : "Å Ä« darbÄ«ba ir pieejama Internet Explorer'Ä«, kas jaunÄks par 5.5 versiju. Vai vÄ“laties ievietot bez apstrÄdes?", -UnknownToolbarItem : "NezinÄms rÄ«ku joslas objekts \"%1\"", -UnknownCommand : "NezinÄmas darbÄ«bas nosaukums \"%1\"", -NotImplemented : "DarbÄ«ba netika paveikta", -UnknownToolbarSet : "RÄ«ku joslas komplekts \"%1\" neeksistÄ“", -NoActiveX : "Interneta pÄrlÅ«kprogrammas drošības uzstÄdÄ«jumi varÄ“tu ietekmÄ“t dažas no redaktora Ä«pašībÄm. JÄbÅ«t aktivizÄ“tai sadaļai \"Run ActiveX controls and plug-ins\". SavÄdÄk ir iespÄ“jamas kļūdas darbÄ«bÄ un kļūdu paziņojumu parÄdīšanÄs.", -BrowseServerBlocked : "Resursu pÄrlÅ«ks nevar tikt atvÄ“rts. PÄrliecinieties, ka uznirstoÅ¡o logu bloÄ·Ä“tÄji ir atslÄ“gti.", -DialogBlocked : "Nav iespÄ“jams atvÄ“rt dialoglogu. PÄrliecinieties, ka uznirstoÅ¡o logu bloÄ·Ä“tÄji ir atslÄ“gti.", -VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING - -// Dialogs -DlgBtnOK : "DarÄ«ts!", -DlgBtnCancel : "Atcelt", -DlgBtnClose : "AizvÄ“rt", -DlgBtnBrowseServer : "SkatÄ«t servera saturu", -DlgAdvancedTag : "IzvÄ“rstais", -DlgOpOther : "", -DlgInfoTab : "InformÄcija", -DlgAlertUrl : "LÅ«dzu, ievietojiet hipersaiti", - -// General Dialogs Labels -DlgGenNotSet : "
    + + + + +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    + To register at the fair, please fill in the information below. A temporary password will be emailed to the address you provide. You will be asked to change your password after logging in the first time. +
    + + +
    + + +
    +
    + + +
    + + +
    + + +
    + +
    + + +
    +
    + + +
    +
    + + +
    + + + +
    +
    + +
    + +
    +
    +

    An email with a temporary password was sent to your email + address. Click on the button below to proceed to the login page. + +

    +

    If the email doesn't appear in a few minutes, be sure to check your + Junk or Spam mail folder too. We have recent reports that quite a few emails + to hotmail.com and msn.com email addresses are going to spam folders. + +

    + Proceed to Login +
    +
    + +
    +
    +

    An email with your username was sent to your email + address. If you have also forgotten your password, you can use the link + on the login page again to reset your password. + +

    If the email doesn't appear in a few minutes, be sure to check your + Junk or Spam mail folder too. We have recent reports that quite a few emails + to hotmail.com and msn.com email addresses are going to spam folders. + + Click on the button below to proceed to the login page. + +

    + Proceed to Login +
    +
    + + + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + + +
    +
    + + +
    + + +
    + +

    If you can't remember your username or password, click here to recover them. + + +

    +
    + +
    +
    +

    Your account has been deleted. +

    +
    + + + + diff --git a/install.php b/install.php deleted file mode 100644 index ac933b1c..00000000 --- a/install.php +++ /dev/null @@ -1,155 +0,0 @@ - - Copyright (C) 2005 James Grant - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation, version 2. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ -echo "\n"; -?> - - - - -SFIAB Installation - - - -

    SFIAB Installation - Step 1

    -SFIAB Installation Step 1 is already complete.
    "; - echo "Proceed to installation step 2
    "; - echo ""; - exit; -} -?> -Warning: Function 'system' is not available in this server! Installation may not work!

    "; -} -if(!function_exists("exec")) { - echo "Warning: Function 'exec' is not available in this server! Installation may not work!

    "; -} -else { - $status = 99; - exec("mysql -q --help", $output, $status); - if(!$status == 0){ - echo "Warning: Functions 'system' and 'exec' are available but 'mysql.exe' is not setup for use in system() calls
    Install on this server may not have full funtionality!

    "; - } - $status = 99; - exec("php -v",$output,$status); - if ($status == 0){ - //echo "Good: php is callable from exec and system!
    "; - } - else{ - echo "Warning: Functions 'system' and 'exec' are available but 'php.exe' is not setup for use in system() calls
    Install on this server may not have full funtionality!

    "; - } -} -// This check can be eliminated after all pdf reports are converted to tcpdf -if (!function_exists("pdf_new")){ -echo "Warning: pdflib is not installed on this server! Most pdf reports will fail!

    "; -} - -?> -setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - - $showform=false; - echo "
    Database connection successful!
    "; - echo "
    "; - echo "Storing database connection information... "; - //create the config.inc.php - if($fp=fopen("data/config.inc.php","w")) - { - - fputs($fp,"\n"); - fclose($fp); - echo "Done!
    "; - echo "Proceed to installation step 2
    "; - } - else - { - echo "
    Cannot write to data/config.inc.php. Make sure the web server has write access to the data/ subdirectory
    "; - - } - } catch (PDOException $e) { - // Handle error - echo 'Connection failed: ' . $e->getMessage(); - } - echo "Proceed to installation step 2
    "; -} -else -{ - echo "
    Cannot write to data/config.inc.php. Make sure the web server has write access to the data/ subdirectory
    "; -} - -} -else -{ -echo "
    Connected, but cannot select database. Make sure Database Name is correct, and that the user '".$_POST['dbuser']."' has access to it
    "; -} - - -} -else -{ -echo "
    Cannot connect to database. Make sure Host, User and Pass are correct
    "; -} -echo "
    "; -} - - -if($showform) -{ -?> -SFIAB requires a MySQL database to store all of its information. Please enter your MySQL database connection info for your database to continue. The database must already exist and the user/password you specify must have access to the database. - -
    -
    -
    - - - - - - -
    Database Host
    Database User
    Database Pass
    Database Name
    -
    - - - - - diff --git a/install2.php b/install2.php deleted file mode 100644 index 81273eb4..00000000 --- a/install2.php +++ /dev/null @@ -1,254 +0,0 @@ - - Copyright (C) 2005 James Grant - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation, version 2. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ -echo "\n"; -?> - - - - -SFIAB Installation - - - -

    SFIAB Installation - Step 2

    -Installation requires php's system() function to be available
    \n"; - echo ""; - exit; -} -// Dennis see if mysql is available from cli -$exec_sqlstatus = 99; // will be set to 0 if following works. I test this prior to system("mysql...) calls -exec("mysql -q --help", $outputnotused, $exec_sqlstatus); - -if(!file_exists("data/config.inc.php")) -{ - echo "
    SFIAB Installation Step 1 is not yet complete.
    "; - echo "Go back to installation step 1
    "; - echo ""; - exit; -} - -require_once("data/config.inc.php"); -$DBUSER=substr($DBUSER,0,16); -$pdo = new PDO($DBHOST,$DBUSER,$DBPASS); - - echo "Getting database version requirements for code... "; - - if(file_exists("db/db.code.version.txt")) - { - $dbcodeversion_file=file("db/db.code.version.txt"); - $dbcodeversion=trim($dbcodeversion_file[0]); - } - else - { - echo "ERROR: Couldnt load current db/db.code.version.txt
    "; - exit; - } - echo "version $dbcodeversion
    "; - - echo "Checking for existing SFIAB database... "; - - $q = $pdo->prepare("SELECT val FROM config WHERE var = 'DBVERSION' AND year = '0'"); -$q->execute(); - -$r = $q->fetch(PDO::FETCH_OBJ); - $dbdbversion=$r->val; - - if($dbdbversion) - { - echo "ERROR: found version $dbdbversion
    "; - - //lets see if they match - if($dbcodeversion == $dbdbversion) - echo "Your SFIAB database is already setup with the required version\n"; - else if($dbcodeversion<$dbdbversion) - echo "ERROR: dbcodeversion$dbdbversion) - echo "Your SFIAB database needs to be updated. You should run the update script instead of this installer!\n"; - exit; - } - else - { - echo "Not found (good!)
    "; - } - // Dennis count the errors here and in db_update - $error_count = 0; - echo "Checking for database installer for version $dbcodeversion... "; - if(file_exists("db/db.full.$dbcodeversion.sql")) - { - echo "db/db.full.$dbcodeversion.sql found
    "; - - echo "Setting up database tables... "; - // Dennis If 'system' and 'mysql' do not exist use each section of the sql files not system("sql" ... - // i.e. for windows ISP servers that do not provide system and sql.exe executable - if(function_exists("system") and $exec_sqlstatus == 0 ) { - echo "
    ** USING system('mysql ..) on this server!
    "; - system("mysql --default-character-set=latin1 -h$DBHOST -u$DBUSER -p$DBPASS $DBNAME exec($templine)){ - echo('
    Error performing query!
    '.$templine.'
    mysqlerror: '.pdo->errorInfo().'

    '); - $exit_code = -1; // do we bail out here or keep going? keep going for now, get all errors - } - // Reset temp variable to empty - $templine = ''; - } - } - echo "

    "; - } - if($exit_code != 0) { - /* mysql failed!, what now? */ - $error_count += 1; - echo "
    mysql failed to execute query(s) without error!
    "; - } - echo "Done! installed database version $dbcodeversion
    \n"; - - //now update the db version in the database - $stmt = $pdo->prepare("UPDATE config SET val = :dbcodeversion WHERE var = 'DBVERSION' AND year = '0'"); -$stmt->execute([ - ':dbcodeversion' => $dbcodeversion -]); - - - echo "
    "; - echo "Done!
    "; - // Dennis allert if errors! - if ($error_count > 0){ - echo "THERE WERE ERRORS! The database was not created correctly!
    "; - } - else{ - echo "DATABASE CREATED SUCCESSFULLY!
    "; - } - echo "Proceed to installation step 3
    "; - } - else - { - echo "WARNING: Couldnt find db/db.full.$dbcodeversion.sql
    "; - echo "Trying to find an older version...
    "; - - for($x=$dbcodeversion;$x>0;$x--) - {ALTER TABLE `reports_items` ADD `on_overflow` ENUM( 'truncate', '...', 'scale' ) NOT NULL; - - if(file_exists("db/db.full.$x.sql")) - { - echo "db/db.full.$x.sql found
    "; - echo "Setting up database tables... "; - // Dennis If 'system' and 'mysql' do not exist use each section of the sql files not system("sql" - // i.e. for windows ISP servers that do not provide system and sql.exe executable - if(function_exists("system") and $exec_sqlstatus == 0 ) { - echo "
    ** USING system('mysql ..) on this server!
    "; - system("mysql --default-character-set=latin1 -h$DBHOST -u$DBUSER -p$DBPASS $DBNAME exec($templine)){ - echo('
    Error performing query!
    '.$templine.'
    mysqlerror: '.pdo->errorInfo().'

    '); - $exit_code = -1; // do we bail out here or keep going? keep going for now, get all errors - } - // Reset temp variable to empty - $templine = ''; - } - } - echo "

    "; - } - if($exit_code != 0) { - /* mysql failed!, what now? */ - $error_count += 1; - echo "
    mysql failed to execute query(s) without error!
    "; - } - echo "Done! installed database version $x
    \n"; - - //now update the db version in the database - $stmt = $pdo->prepare("UPDATE config SET val = :x WHERE var = 'DBVERSION' AND year = '0'");$stmt->execute([ - ':x' => $x -]); - - echo "Attempting to update database using standard update script to update from $x to $dbcodeversion
    "; - echo "
    Please scroll to the bottom of this page for the link to the next step of the installation process.
    "; - chdir ("db"); - /* Update the database, but don't update the config variables yet, because - * We haven't set the FAIRYEAR */ - $db_update_skip_variables = true; - include "db_update.php"; - chdir ("../"); - - echo "
    "; - echo "Done!
    "; - // Dennis allert if errors! 2011-02-18 - if ($error_count > 0){ - echo "THERE WERE ERRORS! The database was not created correctly!
    "; - } - else{ - echo "DATABASE CREATED SUCCESSFULLY!
    "; - } - echo "Proceed to installation step 3
    "; - break; - } - } - } - - //only if this file was created will we go ahead with the rest - //creating all the tables and such.. - -?> - - diff --git a/install3.php b/install3.php deleted file mode 100644 index 57d7c8b7..00000000 --- a/install3.php +++ /dev/null @@ -1,277 +0,0 @@ - - Copyright (C) 2005 James Grant - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation, version 2. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -*/ -echo "\n"; -?> - - - - -SFIAB Installation - - - -

    SFIAB Installation - Step 3

    -SFIAB Installation Step 1 is not yet complete."; - echo "Go back to installation step 1
    "; - echo ""; - exit; -} - -require_once("data/config.inc.php"); -require_once("config_editor.inc.php"); -require_once("user.inc.php"); -require_once("committee.inc.php"); -$DBUSER=substr($DBUSER,0,16); - - -$pdo = new PDO($DBHOST,$DBUSER,$DBPASS); - - - echo "Checking for SFIAB database... "; - - - - $stmt = $pdo->prepare("SELECT val FROM config WHERE var = :var AND year = :year"); - $stmt->execute([':var' => 'DBVERSION', ':year' => 0]); - - - $r = $stmt->fetch(PDO::FETCH_OBJ); - - $dbdbversion=$r->val; - - if(!$dbdbversion) - { - echo "
    SFIAB Installation Step 2 is not yet complete.
    "; - echo "Go back to installation step 2
    "; - echo ""; - exit; - } - -//a fresh install should ONLY have DBVERSION defined in the config table. If there are others (FAIRYEAR, SFIABDIRECTORY) then this is NOT fresh -$q=$pdo->query("SELECT * FROM config WHERE year='0' AND ( var='DBVERSION' OR var='FAIRYEAR' OR var='SFIABDIRECTORY') "); -//we might get an error if the config table does not exist (ie, installer step 2 failed) -if($pdo->errorInfo()[0] !== 00000) -{ - //we say all tables, but really only we check for config where year=0; - echo "
    ERROR: No SFIAB tables detected, It seems like step 2 failed. Please go Back to Installation Step 2 and try again.
    "; - echo ""; - exit; - -} -//1 is okay (DBVERSION). More than 1 is bad (already isntalled) -if($q->rowCount()>1) -{ - //we say all tables, but really only we check for config where year=0; - echo "
    ERROR: Detected existing table data, SFIAB Installation Step 3 requires a clean SFIAB database installation.
    "; - echo ""; - exit; -} -echo "Found!
    "; - -if($_POST['action']=="save") -{ - $err=false; - if(!$_POST['fairyear']) - { - echo "Fair Year is required"; - $err=true; - } - - if(!$_POST['email']) - { - echo "Superuser email address is required"; - $err=true; - } - - if(!( $_POST['pass1'] && $_POST['pass2'])) - { - echo "Superuser password and password confirmation are required"; - $err=true; - } - if($_POST['pass1'] != $_POST['pass2']) - { - echo "Password and Password confirmation do not match"; - $err=true; - } - - if(!$err) - { - echo "Creating configuration settings..."; - - - -$stmt = $pdo->prepare("INSERT INTO config (var, val, category, ord, year) VALUES (:var, :val, :category, :ord, :year)"); - - -$stmt->execute([ - ':var' => 'FAIRYEAR', - ':val' => $_POST['fairyear'], - ':category' => 'Special', - ':ord' => '0', - ':year' => '0' -]); - -$stmt->execute([ - ':var' => 'FISCALYEAR', - ':val' => $_POST['fiscalyear'], - ':category' => 'Special', - ':ord' => '0', - ':year' => '0' -]); - -$stmt->execute([ - ':var' => 'SFIABDIRECTORY', - ':val' => $_POST['sfiabdirectory'], - ':category' => 'Special', - ':ord' => '', - ':year' => '0' -]); - - - - $year = intval($_POST['fairyear']); - - //copy over the config defautls - config_update_variables($year); - - // Update some variables - - - $stmt = $pdo->prepare("UPDATE config SET val = :fairname WHERE var = 'fairname' AND year = :year"); - $stmt->execute([':fairname' => stripslashes($_POST['fairname']), ':year' => $year]); - - $stmt = $pdo->prepare("UPDATE config SET val = :email WHERE var = 'fairmanageremail' AND year = :year"); - $stmt->execute([':email' => $_POST['email'],':year' => $year - ]); - - - - $stmt = $pdo->prepare("SELECT * FROM dates WHERE year = :year"); - $stmt->execute([':year' => '-1']); - - $results = $stmt->fetchAll(PDO::FETCH_OBJ); - - $stmt = $pdo->prepare("INSERT INTO dates (date, name, description, year) VALUES (:date, :name, :description, :fairyear)"); - - foreach($results as $r){ - $stmt->execute([ - ':date' => $r->date, - ':name' => $r->name, - ':description' => $r->description, - ':fairyear' => $_POST['fairyear'] - ]); - } - - $stmt = $pdo->prepare('SELECT * FROM award_types WHERE year=:year'); - - $stmt->execute(['year' => -1]); - - $results = $stmt->fetchAll(PDO::FETCH_OBJ); - - $insertStmt = $pdo->prepare("INSERT INTO award_types (id, type, `order`, year) VALUES (:id, :type, :order, :year)"); - //copy over the award_types defautls - - foreach($results as $r){ - $insertStmt->execute([ - 'id' => $r->id, - 'type' => $r->type, - 'order' => $r->order, - 'year' => $fairYear - ]); - } - - echo "Done!
    "; - echo "Creating superuser account..."; - - $u = user_create('committee',$_POST['email']); - if($_POST['firstname'] && $_POST['lastname']) { - $u['firstname']=stripslashes($_POST['firstname']); - $u['lastname']=stripslashes($_POST['lastname']); - } - else { - $u['firstname'] = 'Superuser'; - $u['lastname'] = 'Account'; - } - $u['emailprivate'] = stripslashes($_POST['email']); - $u['email'] = stripslashes($_POST['email']); - $u['username'] = stripslashes($_POST['email']); - $u['password'] = stripslashes($_POST['pass1']); - $u['access_admin'] = 'yes'; - $u['access_config'] = 'yes'; - $u['access_super'] = 'yes'; - user_save($u); - - echo "Done!
    "; - echo "Installation is now complete! You can now proceed to the following location:
    "; - echo "    Your SFIAB main page
    "; - echo ""; - exit; - } - -} - -echo "
    "; - -echo "Please enter the following options
    "; - -echo "
    "; - -$month=date("m"); -if($month>4) $fairyearsuggest=date("Y")+1; -else $fairyearsuggest=date("Y"); - -if($month>6) $fiscalyearsuggest=date("Y")+1; -else $fiscalyearsuggest=date("Y"); -// Dennis $_SERVER['REQUEST_URI'] is not available on many Windows servers -//$directorysuggest = substr($_SERVER['REQUEST_URI'],0,-13); -$directorysuggest = substr(getenv("SCRIPT_NAME"),0,-13); -echo "

    Options

    "; -echo "
    "; -echo ""; - -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; - -echo "
    Fair NameThe name of the fair you are installing SFIAB to run
    Fair YearThe year of the fair you are installing SFIAB to run
    Fiscal YearThe current fiscal year (for fundraising/accounting purposes)
    DirectoryThe directory of this SFIAB installation as seen by the web browser
    "; -echo "
    "; -echo "

    Superuser Account

    "; -echo "Please choose your superuser account which is required to login to SFIAB and configure the system, as well as to add other users.
    "; -echo ""; -echo ""; -echo ""; -echo ""; -echo "
    Superuser Email Address
    Superuser Password
    Superuser Password (Confirm)
    "; -echo "
    "; -echo ""; -echo "
    "; - -?> - - diff --git a/isef.inc.php b/isef.inc.php new file mode 100644 index 00000000..76473aa4 --- /dev/null +++ b/isef.inc.php @@ -0,0 +1,256 @@ + array('id'=> 1, 'parent'=>false, 'div'=>'AS', 'name'=>'ANIMAL SCIENCES', 'desc'=>'Study of animals and animal life, including their structure, function, life history, interactions, classification, and evolution.'), + => 94, 17, 23, + + => array('id'=>11, 'parent'=>false, 'div'=>'BE', 'name'=>'BEHAVIORAL AND SOCIAL SCIENCES', 'desc'=>'The science or study of the thought processes and behavior of humans and other animals in their interactions with the environment studied through observational and experimental methods.'), + => 94 + + => array('id'=>17, 'parent'=>false, 'div'=>'BI', 'name'=>'BIOCHEMISTRY', 'desc'=>'The study of chemical substances, interactions, and processes relevant to living organisms.'), + => 23, 94, 101 + + => array('id'=>23, 'parent'=>false, 'div'=>'CB', 'name'=>'CELLULAR AND MOLECULAR BIOLOGY', 'desc'=>'The study of the structure and formation of cells.'), + => 17, 94, 101 + + => array('id'=>29, 'parent'=>false, 'div'=>'CH', 'name'=>'CHEMISTRY', 'desc'=>'The science of the composition, structure, properties, and reactions of matter.'), + => 17, 80, 121 + + => array('id'=>37, 'parent'=>false, 'div'=>'CS', 'name'=>'COMPUTER SCIENCE', 'desc'=>'The study of information processes, the structures and procedures that represent processes, and their implementation in information processing systems. It includes systems analysis and design, application and system software design, programming, and datacenter operations.'), + => 85, 53, + + => array('id'=>45, 'parent'=>false, 'div'=>'EA', 'name'=>'EARTH AND PLANETARY SCIENCE', 'desc'=>'The study of sciences related to the planet Earth (Geology, minerology, physiography, oceanography, meteorology, climatology, speleology, sesismology, geography, atmospheric sciences, etc.)'), + => 66, 73, 82 + + => array('id'=>53, 'parent'=>false, 'div'=>'EE', 'name'=>'ENGINEERING: Electrical and Mechanical', 'desc'=>'The application of scientific and mathematical principles to practical ends such as the design, manufacture, and operation of efficient and economical structures, processes, and systems.'), + => 59, 66, 37 + + => array('id'=>59, 'parent'=>false, 'div'=>'EN', 'name'=>'ENGINEERING: Materials and Bioengineering', 'desc'=>'The application of scientific and mathematical principles to practical ends such as the design, manufacture, and operation of efficient and economical machines and systems.'), + + => array('id'=>66, 'parent'=>false, 'div'=>'ET', 'name'=>'ENERGY & TRANSPORTATION', 'desc'=>'The study of renewable energy sources, energy efficiency, clean transport, and alternative fuels.'), + -> 53, 59, 45 + + => array('id'=>73, 'parent'=>false, 'div'=>'EM', 'name'=>'ENVIRONMENTAL MANAGEMENT', 'desc'=>'The application of engineering principals to solve practical problems of managing mans\' interaction with the environment with the goal to maintain and improve the state of an environmental resource affected by human activities.'), + => 80, 66, 59 + + => array('id'=>80, 'parent'=>false, 'div'=>'EV', 'name'=>'ENVIRONMENTAL SCIENCES', 'desc'=>'The analysis of existing conditions of the environment.'), + => 17, 29, 45 + + => array('id'=>85, 'parent'=>false, 'div'=>'MA', 'name'=>'MATHEMATICAL SCIENCES', 'desc'=>'The study of the measurement, properties, and relationships of quantities and sets, using numbers and symbols. The deductive study of numbers, geometry, and various abstract constructs, or structures.'), + => 109, + + => array('id'=>94, 'parent'=>false, 'div'=>'ME', 'name'=>'HEALTH SCIENCES', 'desc'=>'The science of diagnosing, treating, or preventing disease and other damage to the body or mind.'), + => 11, 17, 23, 101 + + => array('id'=>101, 'parent'=>false, 'div'=>'MI', 'name'=>'MICROBIOLOGY', 'desc'=>'The study of microorganisms, including bacteria, viruses, fungi, and pathogens.'), + => 23, 94, 17, + + => array('id'=>109, 'parent'=>false, 'div'=>'PH', 'name'=>'PHYSICS AND ASTRONOMY', 'desc'=>'Physics is the science of matter and energy and of interactions between the two. Astronomy is the study of anything in the universe beyond the Earth.'), + => 45, + + => array('id'=>121, 'parent'=>false, 'div'=>'PS', 'name'=>'PLANT SCIENCES', 'desc'=>'Study of plant life, including their structure and function, life history, growth, interactions with other plants and animals, classification, and evolution.'), + => 17, 80, 29 + + ); + +*/ + +$isef_divs = array( + 1 => array('id'=> 1, 'parent'=>false, 'div'=>'AS', 'name'=>'ANIMAL SCIENCES', 'desc'=>'Study of animals and animal life, including their structure, function, life history, interactions, classification, and evolution.'), + + 2=> array('id'=> 2, 'parent'=>'AS', 'div'=>'BEH', 'name'=>'Animal Behavior', 'desc'=>'The study of animal activities, on the level of the intact organism or its neurological components. This includes rhythmic functions, learning, and intelligence, sensory preferences, and environmental effects on behaviors.'), + 3=> array('id'=> 3, 'parent'=>'AS', 'div'=>'DEV', 'name'=>'Development', 'desc'=>'The study of an organism from earliest stages through birth or hatching and into later life. This includes cellular and molecular aspects of development, regeneration, and environmental effects on development.'), + 4=> array('id'=> 4, 'parent'=>'AS', 'div'=>'ECO', 'name'=>'Ecology', 'desc'=>'The science of the interactions and relationships among animals and animals and plants with their environments.'), + 5=> array('id'=> 5, 'parent'=>'AS', 'div'=>'GENE', 'name'=>'Genetics', 'desc'=>'The study of organismic and population genetics.'), + 6=> array('id'=> 6, 'parent'=>'AS', 'div'=>'NUTR', 'name'=>'Nutrition and Growth', 'desc'=>'The study of natural and artificial nutrients on animal growth and reproduction. This also includes the effects of biological and chemical control agents on reproduction and populations.'), + 7=> array('id'=> 7, 'parent'=>'AS', 'div'=>'PATH', 'name'=>'Pathology', 'desc'=>'The study of disease states, and their causes, processes, and consequences. This includes effects of parasites or disease-causing microbes.'), + 8=> array('id'=> 8, 'parent'=>'AS', 'div'=>'PHY', 'name'=>'Physiology', 'desc'=>'The study of functions in systems of animals, their mechanisms, and how they are affected by environmental factors or natural variations that select for particular genes.'), + 9=> array('id'=> 9, 'parent'=>'AS', 'div'=>'SYST', 'name'=>'Systematics and Evolution', 'desc'=>'The study of classification of organisms and their evolutionary relationships. This includes morphological, biochemical, genetic, and modeled systems.'), + 10=> array('id'=>10, 'parent'=>'AS', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 11=> array('id'=>11, 'parent'=>false, 'div'=>'BE', 'name'=>'BEHAVIORAL AND SOCIAL SCIENCES', 'desc'=>'The science or study of the thought processes and behavior of humans and other animals in their interactions with the environment studied through observational and experimental methods.'), + + 12=> array('id'=>12, 'parent'=>'BE', 'div'=>'CLIN', 'name'=>'Clinical and Developmental Psychology', 'desc'=>'The study and treatment of emotional or behavioral disorders. Developmental psychology is concerned with the study of progressive behavioral changes in an individual from birth until death.'), + 13=> array('id'=>13, 'parent'=>'BE', 'div'=>'COG', 'name'=>'Cognitive, Brain and Cognition, Neuro', 'desc'=>'psychology - The study of cognition, the mental processes that underlie behavior, including thinking, deciding, reasoning, and to some extent motivation and emotion. Neuro-psychology studies the relationship between the nervous system, especially the brain, and cerebral or mental functions such as language, memory, and perception.'), + 14=> array('id'=>14, 'parent'=>'BE', 'div'=>'PHY', 'name'=>'Physiological Psychology', 'desc'=>'The study of the biological and physiological basis of behavior.'), + 15=> array('id'=>15, 'parent'=>'BE', 'div'=>'SOC', 'name'=>'Sociology and Social Psychology; Industrial/Organizational Psychology', 'desc'=>'The study of human social behavior, especially the study of the origins, organization, institutions, and development of human society. Sociology is concerned with all group activities-economic, social, political, and religious.'), + 16=> array('id'=>16, 'parent'=>'BE', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 17=> array('id'=>17, 'parent'=>false, 'div'=>'BI', 'name'=>'BIOCHEMISTRY', 'desc'=>'The study of chemical substances, interactions, and processes relevant to living organisms.'), + + 18=> array('id'=>18, 'parent'=>'BI', 'div'=>'ANAL', 'name'=>'Analytical Biochemistry', 'desc'=>'The study of the separation, identification, and quantification of chemical components relevant to living organisms.'), + 19=> array('id'=>19, 'parent'=>'BI', 'div'=>'GEN', 'name'=>'General Biochemistry', 'desc'=>'The study of chemical processes, including interactions and reactions, relevant to living organisms.'), + 20=> array('id'=>20, 'parent'=>'BI', 'div'=>'MED', 'name'=>'Medicinal Biochemistry', 'desc'=>'The study of biochemical processes within the human body, with special reference to health and disease. '), + 21=> array('id'=>21, 'parent'=>'BI', 'div'=>'STRU', 'name'=>'Structural Biochemistry', 'desc'=>'The study of the structure and or function of biological molecules.'), + 22=> array('id'=>22, 'parent'=>'BI', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories. '), + + 23=> array('id'=>23, 'parent'=>false, 'div'=>'CB', 'name'=>'CELLULAR AND MOLECULAR BIOLOGY', 'desc'=>'The study of the structure and formation of cells.'), + + 24=> array('id'=>24, 'parent'=>'CB', 'div'=>'CELL', 'name'=>'Cellular Biology', 'desc'=>'The study of the organization and functioning of the individual cell.'), + 25=> array('id'=>25, 'parent'=>'CB', 'div'=>'GENE', 'name'=>'Genetics', 'desc'=>'The study of molecular genetics focusing on the structure and function of genes at a molecular level.'), + 26=> array('id'=>26, 'parent'=>'CB', 'div'=>'IMM', 'name'=>'Immunology', 'desc'=>'The study of the structure and function of the immune system, innate and acquired immunity, and laboratory techniques involving the interaction of antigens with antibodies.'), + 27=> array('id'=>27, 'parent'=>'CB', 'div'=>'MOLE', 'name'=>'Molecular Biology', 'desc'=>'The study of biology at the molecular level. Chiefly concerns itself with understanding the interactions between the various systems of a cell, including the interrelationships of DNA, RNA and protein synthesis and learning how these interactions are regulated.'), + 28=> array('id'=>28, 'parent'=>'CB', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 29=> array('id'=>29, 'parent'=>false, 'div'=>'CH', 'name'=>'CHEMISTRY', 'desc'=>'The science of the composition, structure, properties, and reactions of matter.'), + + 30=> array('id'=>30, 'parent'=>'CH', 'div'=>'ANAL', 'name'=>'Analytical Chemistry', 'desc'=>'The study of the separation, identification, and quantification of the chemical components of materials. '), + 31=> array('id'=>31, 'parent'=>'CH', 'div'=>'ENV', 'name'=>'Environmental Chemistry', 'desc'=>'The study of chemical species in the natural environment, including the effects of human activities, such as the design of products and processes that reduce or eliminate the use or generation of hazardous substances.'), + 32=> array('id'=>32, 'parent'=>'CH', 'div'=>'INOR', 'name'=>'Inorganic Chemistry', 'desc'=>'The study of the properties and reactions of inorganic and organometallic compounds. '), + 33=> array('id'=>33, 'parent'=>'CH', 'div'=>'MAT', 'name'=>'Materials Chemistry', 'desc'=>'The study of the design, synthesis and properties of substances, including condensed phases (solids, liquids, polymers) and interfaces, with a useful or potentially useful function, such as catalysis or solar energy. '), + 34=> array('id'=>34, 'parent'=>'CH', 'div'=>'ORGA', 'name'=>'Organic Chemistry', 'desc'=>'The study of carbon-containing compounds, including hydrocarbons and their derivatives. '), + 35=> array('id'=>35, 'parent'=>'CH', 'div'=>'PHY', 'name'=>'Physical Chemistry', 'desc'=>'The study of the fundamental physical basis of chemical systems and processes, including chemical kinetics, chemical thermodynamics, electrochemistry, photochemistry, spectroscopy, statistical mechanics and astro-chemistry.'), + 36=> array('id'=>36, 'parent'=>'CH', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above subcategories, such as nuclear chemistry, surface chemistry and theoretical chemistry.'), + + 37=> array('id'=>37, 'parent'=>false, 'div'=>'CS', 'name'=>'COMPUTER SCIENCE', 'desc'=>'The study of information processes, the structures and procedures that represent processes, and their implementation in information processing systems. It includes systems analysis and design, application and system software design, programming, and datacenter operations.'), + + 38=> array('id'=>38, 'parent'=>'CS', 'div'=>'ALGO', 'name'=>'Algorithms, Data Bases', 'desc'=>'The study of algorithms and databases. Software developed to manage any form of data including text, images, sound and video.'), + 39=> array('id'=>39, 'parent'=>'CS', 'div'=>'ARTI', 'name'=>'Artificial Intelligence', 'desc'=>'The study of the ability of a computer or other machine to perform those activities that are normally thought to require intelligence, such as solving problems, discriminating among objects, and/or responding to voice commands. This also includes speech analysis and synthesis.'), + 40=> array('id'=>40, 'parent'=>'CS', 'div'=>'NET', 'name'=>'Networking and Communications', 'desc'=>'The study of systems that transmits any combination of voice, video, and/or data among users.'), + 41=> array('id'=>41, 'parent'=>'CS', 'div'=>'SCIE', 'name'=>'Computational Science, Computer Graphics', 'desc'=>'The study of the use of computers to perform research in other fields, such as computer simulations. Also includes the study of computer graphics or the transfer of pictorial data into and out of a computer by various means (analog-to-digital, optical scanning, etc), such as in computer image processing.'), + 42=> array('id'=>42, 'parent'=>'CS', 'div'=>'SOFT', 'name'=>'Software Engineering, Programming Languages', 'desc'=>'The study of software designed to control the hardware of a specific data processing system in order to allow users and application programs to make use of it. This sub-category includes web technologies, programming languages and human-computer interactions.'), + 43=> array('id'=>43, 'parent'=>'CS', 'div'=>'SYST', 'name'=>'Computer System, Operating System', 'desc'=>'The study of system software responsible for the direct control and management of hardware and basic system operations of a computer.'), + 44=> array('id'=>44, 'parent'=>'CS', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 45=> array('id'=>45, 'parent'=>false, 'div'=>'EA', 'name'=>'EARTH AND PLANETARY SCIENCE', 'desc'=>'The study of sciences related to the planet Earth (Geology, minerology, physiography, oceanography, meteorology, climatology, speleology, sesismology, geography, atmospheric sciences, etc.)'), + 46=> array('id'=>46, 'parent'=>'EA', 'div'=>'CLIM', 'name'=>'Climatology, Meteorology, Weather', 'desc'=>'the scientific study of the atmosphere that focuses on weather processes and forecasting.'), + 47=> array('id'=>47, 'parent'=>'EA', 'div'=>'GEO', 'name'=>'Geochemistry, Mineralogy', 'desc'=>'The study of the chemical composition of the earth and other planets, chemical processes and reactions that govern the composition of rocks and soils. Mineralogy is focused around the chemistry, crystal structure and physical (including optical) properties of minerals.'), + 48=> array('id'=>48, 'parent'=>'EA', 'div'=>'HIST', 'name'=>'Historical Paleontology', 'desc'=>'The study of life in the geologic past as recorded by fossil remains.'), + 49=> array('id'=>49, 'parent'=>'EA', 'div'=>'PHY', 'name'=>'Geophysics', 'desc'=>'Branch of geology in which the principles and practices of physics are used to study the earth and its environment.'), + 50=> array('id'=>50, 'parent'=>'EA', 'div'=>'PLAN', 'name'=>'Planetary Science', 'desc'=>'The study of planets or planetary systems and the solar system.'), + 51=> array('id'=>51, 'parent'=>'EA', 'div'=>'TECH', 'name'=>'Tectonics', 'desc'=>'The study of the earth\'s structural features as related to plate structure, plate movement, volcanism, etc.'), + 52=> array('id'=>52, 'parent'=>'EA', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 53=> array('id'=>53, 'parent'=>false, 'div'=>'EE', 'name'=>'ENGINEERING: Electrical and Mechanical', 'desc'=>'The application of scientific and mathematical principles to practical ends such as the design, manufacture, and operation of efficient and economical structures, processes, and systems.'), + 54=> array('id'=>54, 'parent'=>'EE', 'div'=>'ELEC', 'name'=>'Electrical Engineering, Computer Engineering, Controls', 'desc'=>'Electrical engineering is the branch of engineering that deals with the technology of electricity, especially the design and application of circuitry and equipment for power generation and distribution, machine control, and communications. A computer engineer is an electrical engineer with a focus on digital logic systems or a software architect with a focus on the interaction between software programs and the underlying hardware architecture.'), + 55=> array('id'=>55, 'parent'=>'EE', 'div'=>'MECH', 'name'=>'Mechanical Engineering', 'desc'=>'The branch of engineering that encompasses the generation and application of heat and mechanical power and the design, production, and use of machines and tools.'), + 56=> array('id'=>56, 'parent'=>'EE', 'div'=>'ROB', 'name'=>'Robotics', 'desc'=>'The science or study of the technology associated with the design, fabrication, theory, and application of robots and of general purpose, programmable machine systems.'), + 57=> array('id'=>57, 'parent'=>'EE', 'div'=>'THRM', 'name'=>'Thermodynamics, Solar', 'desc'=>'Thermodynamics involves the physics of the relationships and conversions between heat and other forms of energy. Solar is the technology of obtaining usable energy from the light of the sun.'), + 58=> array('id'=>58, 'parent'=>'EE', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 59=> array('id'=>59, 'parent'=>false, 'div'=>'EN', 'name'=>'ENGINEERING: Materials and Bioengineering', 'desc'=>'The application of scientific and mathematical principles to practical ends such as the design, manufacture, and operation of efficient and economical machines and systems.'), + 60=> array('id'=>60, 'parent'=>'EN', 'div'=>'BIO', 'name'=>'Bioengineering', 'desc'=>'Involves the application of engineering principles to the fields of biology and medicine, as in the development of aids or replacements for defective or missing body organs; the development and manufacture of prostheses, medical devices, diagnostic devices, drugs and other therapies as well as the application of engineering principles to basic biological science problems.'), + 61=> array('id'=>61, 'parent'=>'EN', 'div'=>'CHEM', 'name'=>'Chemical Engineering', 'desc'=>'Deals with the design, construction, and operation of plants and machinery for making such products as acids, dyes, drugs, plastics, and synthetic rubber by adapting the chemical reactions discovered by the laboratory chemist to large-scale production.'), + 62=> array('id'=>62, 'parent'=>'EN', 'div'=>'CIVI', 'name'=>'Civil Engineering, Construction Engineering', 'desc'=>'Includes the planning, designing, construction, and maintenance of structures and public works, such as bridges or dams, roads, water supply, sewer, flood control and, traffic.'), + 63=> array('id'=>63, 'parent'=>'EN', 'div'=>'IND', 'name'=>'Industrial Engineering, Processing', 'desc'=>'Concerned with efficient production of industrial goods as affected by elements such as plant and procedural design, the management of materials and energy, and the integration of workers within the overall system. The industrial engineer designs methods, not machinery.'), + 64=> array('id'=>64, 'parent'=>'EN', 'div'=>'MAT', 'name'=>'Material Science', 'desc'=>'A multidisciplinary field relating the performance and function of matter in any and all applications to its micro, nano, and atomic structure, and vice versa. It often involves the study of the characteristics and uses of various materials, such as metals, ceramics, and plastics and their potential engineering applications.'), + 65=> array('id'=>65, 'parent'=>'EN', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 66=> array('id'=>66, 'parent'=>false, 'div'=>'ET', 'name'=>'ENERGY & TRANSPORTATION', 'desc'=>'The study of renewable energy sources, energy efficiency, clean transport, and alternative fuels.'), + 67=> array('id'=>67, 'parent'=>'ET', 'div'=>'AERO', 'name'=>'Aerospace and Aeronautical Engineering, Aerodynamics', 'desc'=>'The design of aircraft and space vehicles and the direction of the technical phases of their manufacture and operation.'), + 68=> array('id'=>68, 'parent'=>'ET', 'div'=>'ALT', 'name'=>'Alternative Fuels', 'desc'=>'Any method of powering an engine that does not involve petroleum (oil). Some alternative fuels are electricity, hythane, hydrogen, natural gas, and wood.'), + 69=> array('id'=>69, 'parent'=>'ET', 'div'=>'FOS', 'name'=>'Fossil Fuel Energy', 'desc'=>'Energy from a hydrocarbon deposit, such as petroleum, coal, or natural gas, derived from living matter of a previous geologic time and used for fuel.'), + 70=> array('id'=>70, 'parent'=>'ET', 'div'=>'VEH', 'name'=>'Vehicle Development', 'desc'=>'Engineering of vehicles that operate using energy other than from fossil fuel.'), + 71=> array('id'=>71, 'parent'=>'ET', 'div'=>'REN', 'name'=>'Renewable Energies', 'desc'=>'Renewable energy sources capture their energy from existing flows of energy, from on-going natural processes such as sunshine, wind, flowing water, biological processes, and geothermal heat flows.'), + 72=> array('id'=>72, 'parent'=>'ET', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 73=> array('id'=>73, 'parent'=>false, 'div'=>'EM', 'name'=>'ENVIRONMENTAL MANAGEMENT', 'desc'=>'The application of engineering principals to solve practical problems of managing mans\' interaction with the environment with the goal to maintain and improve the state of an environmental resource affected by human activities.'), + 74=> array('id'=>74, 'parent'=>'EM', 'div'=>'BIO', 'name'=>'Bioremediation', 'desc'=>'The use of biological agents, such as bacteria or plants, to remove or neutralize contaminants, as in polluted soil or water. Includes phytoremediation, constructed wetlands for wastewater treatment, biodegradation, etc.'), + 75=> array('id'=>75, 'parent'=>'EM', 'div'=>'ECO', 'name'=>'Ecosystems Management', 'desc'=>'The integration of ecological, economic, and social principles to manage biological and physical systems in a manner that safeguards the long-term ecological sustainability, natural diversity, and productivity of the landscape. An ecological approach to managing the environment.'), + 76=> array('id'=>76, 'parent'=>'EM', 'div'=>'ENG', 'name'=>'Environmental Engineering', 'desc'=>'The application of engineering principals to solve practical problems in the supply of water, the disposal of waste, and the control of pollution. Includes alternative engineering methodologies to meet society\'s needs in an environmentally sound and sustainable manner. Preservation of the environment by preventing the contamination of, and facilitating the clean up of, air, water, and land resources.'), + 77=> array('id'=>77, 'parent'=>'EM', 'div'=>'LAND', 'name'=>'Land Resource Management and Forestry', 'desc'=>'A landscape approach to sustainable resource management, coastal management, biological diversity management, land use planning, or forest succession management. It often includes a resource planning component as well as implementation methodologies. An example would be the management of longleaf pine forests including controlled burns to imitate natural processes.'), + 78=> array('id'=>78, 'parent'=>'EM', 'div'=>'REC', 'name'=>'Recycling and Waste Management', 'desc'=>'The extraction and reuse of useful substances from discarded items, garbage, or waste. The process of managing, and disposing of, wastes and hazardous substances through methodologies such as landfills, sewage treatment, composting, waste reduction, etc.'), + 79=> array('id'=>79, 'parent'=>'EM', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 80=> array('id'=>80, 'parent'=>false, 'div'=>'EV', 'name'=>'ENVIRONMENTAL SCIENCES', 'desc'=>'The analysis of existing conditions of the environment.'), + 81=> array('id'=>81, 'parent'=>'EV', 'div'=>'AIR', 'name'=>'Air Pollution and Air Quality', 'desc'=>'The study of contamination of the air by such things as noxious gases, elements, minerals, chemicals, solid and liquid matter (particulates), etc. Air pollution is the study of such contaminates in concentrations that endanger the health of humans, plants, and/or animals.'), + 82=> array('id'=>82, 'parent'=>'EV', 'div'=>'SOIL', 'name'=>'Soil Contamination and Soil Quality', 'desc'=>'The study of contamination of the soil by such things as noxious elements, minerals, chemicals, solids, liquids, etc. Soil contamination is the study of such contaminates in concentrations that endanger the health of humans, plants, and/or animals.'), + 83=> array('id'=>83, 'parent'=>'EV', 'div'=>'WATE', 'name'=>'Water Pollution and Water Quality', 'desc'=>'The study of contamination of the water by such things as noxious elements, minerals, chemicals, solids, etc. Water pollution is the study of such contaminates in concentrations that endanger the health of humans, plants, and/or animals.'), + 84=> array('id'=>84, 'parent'=>'EV', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 85=> array('id'=>85, 'parent'=>false, 'div'=>'MA', 'name'=>'MATHEMATICAL SCIENCES', 'desc'=>'The study of the measurement, properties, and relationships of quantities and sets, using numbers and symbols. The deductive study of numbers, geometry, and various abstract constructs, or structures.'), + 86=> array('id'=>86, 'parent'=>'MA', 'div'=>'ALG', 'name'=>'Algebra', 'desc'=>'The study of algebraic operations and/or relations and the structures which arise from them. An example is given by (systems of) equations which involve polynomial functions of one or more variables. '), + 87=> array('id'=>87, 'parent'=>'MA', 'div'=>'ANAL', 'name'=>'Analysis', 'desc'=>'The study of infinitesimal processes in mathematics, typically involving the concept of a limit. This begins with differential and integral calculus, for functions of one or several variables, and includes differential equations. '), + 88=> array('id'=>88, 'parent'=>'MA', 'div'=>'COMP', 'name'=>'Computer Mathematics', 'desc'=>'Branch of mathematics that concerns itself with the mathematical techniques typically used in the application of mathematical knowledge to other domains. Not every project that uses some mathematics belongs here; this category is for projects where the mathematics is the primary component. '), + 89=> array('id'=>89, 'parent'=>'MA', 'div'=>'COMB', 'name'=>'Combinatorics, Graph Theory and Game Theory', 'desc'=>'The study of combinatorial structures in mathematics, such as finite sets, graphs, and games, often with a view toward classification and/or enumeration.'), + 90=> array('id'=>90, 'parent'=>'MA', 'div'=>'GEO', 'name'=>'Geometry and Topology', 'desc'=>'The study of the shape, size, and other properties of figures and spaces. Includes such subjects as Euclidean geometry, non-Euclidean geometries (spherical, hyperbolic, Riemannian, Lorentzian), and knot theory (classification of knots in 3-space).'), + 91=> array('id'=>91, 'parent'=>'MA', 'div'=>'NUM', 'name'=>'Number Theory', 'desc'=>'The study of the arithmetic properties of integers and related topics such as cryptography.'), + 92=> array('id'=>92, 'parent'=>'MA', 'div'=>'PROB', 'name'=>'Probability and Statistics', 'desc'=>'Mathematical study of random phenomena and the study of statistical tools used to analyze and interpret data.'), + 93=> array('id'=>93, 'parent'=>'MA', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 94=> array('id'=>94, 'parent'=>false, 'div'=>'ME', 'name'=>'HEALTH SCIENCES', 'desc'=>'The science of diagnosing, treating, or preventing disease and other damage to the body or mind.'), + 95=> array('id'=>95, 'parent'=>'ME', 'div'=>'DIS', 'name'=>'Disease Diagnosis and Treatment', 'desc'=>'The act or process of identifying or determining the nature and cause of a disease or injury through evaluation of patient history, examination, and review of laboratory data. Administration or application of remedies to a patient or for a disease or injury; medicinal or surgical management; therapy.'), + 96=> array('id'=>96, 'parent'=>'ME', 'div'=>'EPID', 'name'=>'Epidemiology', 'desc'=>'The study of the causes, distribution, and control of disease in populations. Epidemiologists, using sophisticated statistical analyses, field investigations, and complex laboratory techniques, investigate the cause of a disease, its distribution (geographic, ecological, and ethnic), method of spread, and measures for control and prevention.'), + 97=> array('id'=>97, 'parent'=>'ME', 'div'=>'GENE', 'name'=>'Genetics', 'desc'=>'The study of heredity, especially the mechanisms of hereditary transmission and the variation of inherited traits among similar or related organisms.'), + 98=> array('id'=>98, 'parent'=>'ME', 'div'=>'MOLE', 'name'=>'Molecular Biology of Diseases', 'desc'=>'The study of diseases at the molecular level.'), + 99=> array('id'=>99, 'parent'=>'ME', 'div'=>'PHYS', 'name'=>'Physiology and Pathophysiology', 'desc'=>'The science of the mechanical, physical, and biochemical functions of normal tissues or organs. Pathophysiology is the study of the disturbance of normal mechanical, physical, and biochemical functions that a disease causes, or that which causes the disease.'), + 100=> array('id'=>100, 'parent'=>'ME', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories.'), + + 101=> array('id'=>101, 'parent'=>false, 'div'=>'MI', 'name'=>'MICROBIOLOGY', 'desc'=>'The study of microorganisms, including bacteria, viruses, fungi, and pathogens.'), + 102=> array('id'=>102, 'parent'=>'MI', 'div'=>'ANTI', 'name'=>'Antimicrobial Agents', 'desc'=>'The study of substances that kill or inhibit the growth of microorganisms.'), + 103=> array('id'=>103, 'parent'=>'MI', 'div'=>'APP', 'name'=>'Applied Microbiology', 'desc'=>'The study of microorganisms having potential applications in human, animal or plant health or energy production.'), + 104=> array('id'=>104, 'parent'=>'MI', 'div'=>'BACT', 'name'=>'Bacterial Microbiology', 'desc'=>'The study of bacteria and bacterial diseases.'), + 105=> array('id'=>105, 'parent'=>'MI', 'div'=>'ENV', 'name'=>'Environmental Microbiology', 'desc'=>'The study of the structure, function, diversity and relationship of microorganisms with respect to their environment.'), + 106=> array('id'=>106, 'parent'=>'MI', 'div'=>'GENE', 'name'=>'Microbial Genetics', 'desc'=>'The study of how genes are organized and regulated in microorganisms in relation to their cellular function.'), + 107=> array('id'=>107, 'parent'=>'MI', 'div'=>'VIRO', 'name'=>'Virology', 'desc'=>'The study the anatomy, physiology of viruses and the diseases they cause.'), + 108=> array('id'=>108, 'parent'=>'MI', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories, such as microbial cytology, physiology and pathogenesis.'), + + 109=> array('id'=>109, 'parent'=>false, 'div'=>'PH', 'name'=>'PHYSICS AND ASTRONOMY', 'desc'=>'Physics is the science of matter and energy and of interactions between the two. Astronomy is the study of anything in the universe beyond the Earth.'), + 110=> array('id'=>110, 'parent'=>'PH', 'div'=>'AMO', 'name'=>'Atomic Molecular and Optical Physics', 'desc'=>'The study of atoms, simple molecules, electrons and light, and their interactions.'), + 111=> array('id'=>111, 'parent'=>'PH', 'div'=>'ASTR', 'name'=>'Astronomy and Cosmology', 'desc'=>'The study of space, the universe as a whole, including its origins and evolution, the physical properties of objects in space and computational astronomy'), + 112=> array('id'=>112, 'parent'=>'PH', 'div'=>'BIO', 'name'=>'Biological Physics', 'desc'=>'The study of the physics of biological processes.'), + 113=> array('id'=>113, 'parent'=>'PH', 'div'=>'INST', 'name'=>'Instrumentation and Electronics', 'desc'=>'Instrumentation is the process of developing means of precise measurement of various variables such as flow and pressure while maintaining control of the variables at desired levels of safety and economy. Electronics is the branch of physics that deals with the emission and effects of electrons and with the use of electronic devices.'), + 114=> array('id'=>114, 'parent'=>'PH', 'div'=>'MAT', 'name'=>'Condensed Matter and Materials', 'desc'=>'The study of the preparation, properties and performance of materials to help understand and optimize their behavior. Topics such as superconductivity, semi-conductors, complex fluids, and thin films are studied.'), + 115=> array('id'=>115, 'parent'=>'PH', 'div'=>'MAG', 'name'=>'Magnetics, Electromagnetics and Plasmas', 'desc'=>'The study of electrical and magnetic fields and of matter in the plasma phase and their effects on materials in the solid, liquid or gaseous states.'), + 116=> array('id'=>116, 'parent'=>'PH', 'div'=>'MECH', 'name'=>'Mechanics', 'desc'=>'Classical physics and mechanics, including the macroscopic study of forces, vibrations and flows; on solid, liquid and gaseous materials'), + 117=> array('id'=>117, 'parent'=>'PH', 'div'=>'NUCL', 'name'=>'Nuclear and Particle Physics', 'desc'=>'The study of the physical properties of the atomic nucleus and of fundamental particles and the forces of their interaction'), + 118=> array('id'=>118, 'parent'=>'PH', 'div'=>'OPT', 'name'=>'Optics, Lasers, and Masers', 'desc'=>'The study of the physical properties of light, lasers and masers.'), + 119=> array('id'=>119, 'parent'=>'PH', 'div'=>'THEO', 'name'=>'Theoretical Physics, Theoretical or Computational Astronomy', 'desc'=>'The study of nature, phenomena and the laws of physics employing mathematical models and abstractions rather than experimental processes. '), + 120=> array('id'=>120, 'parent'=>'PH', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories. '), + + 121=> array('id'=>121, 'parent'=>false, 'div'=>'PS', 'name'=>'PLANT SCIENCES', 'desc'=>'Study of plant life, including their structure and function, life history, growth, interactions with other plants and animals, classification, and evolution.'), + 122=> array('id'=>122, 'parent'=>'PS', 'div'=>'AGR', 'name'=>'Agronomy', 'desc'=>'The application of the various soil and plant sciences to soil management and agricultural and horticultural crop production. Includes biological and chemical controls of pests, hydroponics, fertilizers and supplements.'), + 123=> array('id'=>123, 'parent'=>'PS', 'div'=>'DEV', 'name'=>'Development and Growth', 'desc'=>'The study of a plant from earliest stages through germination and into later life. This includes cellular and molecular aspects of development and environmental effects, natural or manmade, on development and growth.'), + 124=> array('id'=>124, 'parent'=>'PS', 'div'=>'ECO', 'name'=>'Ecology', 'desc'=>'The study of interactions and relationships among plants, and plants and animals, with their environment.'), + 125=> array('id'=>125, 'parent'=>'PS', 'div'=>'GEN', 'name'=>'Genetics/Breeding', 'desc'=>'The study of organismic and population genetics of plants. The application of plant genetics and biotechnology to crop improvement.'), + 126=> array('id'=>126, 'parent'=>'PS', 'div'=>'PATH', 'name'=>'Pathology', 'desc'=>'The study of plant disease states, and their causes, processes, and consequences. This includes effects of parasites or disease-causing microbes.'), + 127=> array('id'=>127, 'parent'=>'PS', 'div'=>'PHY', 'name'=>'Plant Physiology', 'desc'=>'The study of functions of plants, their mechanisms, and how they are affected by environmental factors or natural variations. This includes all aspects of photosynthesis.'), + 128=> array('id'=>128, 'parent'=>'PS', 'div'=>'SYST', 'name'=>'Systematics and Evolution', 'desc'=>'The study of classification of organisms and their evolutionary relationships. This includes morphological, biochemical, genetic, and modeled systems.'), + 129=> array('id'=>129, 'parent'=>'PS', 'div'=>'OTHR', 'name'=>'Other', 'desc'=>'Studies that cannot be assigned to one of the above categories, such as the effects of plants or plant-derived substances on animal and human health.'), + ); + +function isef_get_div_names() +{ + global $isef_divs; + + $ret = array(); + + foreach($isef_divs as $id=>$d) { + if($d['parent'] === false) { + $curr_parent = $d['div']; + $curr_parent_name = $d['name']; + $ret[$d['name']] = array(); + continue; + } + + if($curr_parent != $d['parent']) { + print("Error 1006: $curr_parent {$d['div']}"); + exit(); + } + + $id = $d['id']; + + $ret[$curr_parent_name][$id] = $curr_parent_name." - ".$d['name']; + } + return $ret; +} + +function isef_get_major_div_names() +{ + global $isef_divs; + + $ret = array(); + + $ret["Detailed Divisions"] = array(); + foreach($isef_divs as $id=>$d) { + if($d['parent'] === false) { + $ret["Detailed Divisions"][$id] = $d['name']; + } + } + return $ret; + +} + + +?> diff --git a/j_expertise.php b/j_expertise.php new file mode 100644 index 00000000..4be40b5a --- /dev/null +++ b/j_expertise.php @@ -0,0 +1,166 @@ +0, 'missing'=>$ret)); + exit(); +} + +$help = ' +
    • Sponsor Judge - If you represent the sponsor of a specific special award, then choose \'Yes\' here and select which special award(s) you will be judging. +
    • School/District - Years of judging experience at the school or district level +
    • Regional - Years of judging experience at regional fairs (the GVRSF is a regional fair) +
    • National - Years of judging experience at the national (CWSF or ISEF) fair. +
    • Div 1,2,3 - Choose the top three divisions you feel comfortable +judging in. We use this to match projects for you to judge. We will also +include projects in the same general area with slightly less priority if there +aren\'t perfect matches available. That is, if you select Biochemistry--Medicinal, you may also be matched with other Biochemistry projects. +
    • Age Category - You may choose an age category you prefer to judge. This is not a guarantee you will judge this age group, but we will try. +
    '; + +sfiab_page_begin($u, "Expertise", $page_id, $help); + +?> + + +
    + +'No Preference'); + foreach($cats as $cid=>$c) { + $cats_data[$cid] = $c['name']; + } + + $sa_only = ($u['j_sa_only'] == 1) ? 1 : 0; + $hidden = "style=\"display:none\""; + + $form_id = $page_id.'_form'; + form_begin($form_id, 'j_expertise.php', $closed); +?> +

    Sponsor Judges

    + +
    > + Note: Our chief judge will double-check with all Sponsor Judges ensure they + are a sponsor for a special award. If you are not sure then you are probably not a Sponsor judge. + +
    + +
    > +

    Years of Judging Experience

    + Enter how many years of judging experience you have at each level of science fair competitions: + +

    Judging Preferences

    + Select your top three detailed divisions to judge and an age category + preference if you have one. We use this to match you with projects to + judge. We will do our best to match you with projects + only in divisions you select, but we cannot guarantee that all projects + you are assigned to judge will be a perfect match. + + +

    For the divisions, we will also match you with projects in the + same general division with slightly less priority. That means if you + select "Biochemistry--Medicinal", you will also be matched with + projects in "Biochemistry--Analytical" and all other Biochemistry + divisions as well. + +

    + + + + + + +
    + + + + diff --git a/j_main.php b/j_main.php new file mode 100644 index 00000000..5b3ac34c --- /dev/null +++ b/j_main.php @@ -0,0 +1,144 @@ +0, 'location'=>'j_main.php')); + exit(); +} + + +$help = ' +
    • Attending the Fair - If you are unable to attend the fair, +indicate that here and you will not be assigned to any judging +team, or we will remove you from any teams you have been assigned to. +
    '; + +sfiab_page_begin($u, "Judge Main", $page_id, $help); +?> + +
    + +

    Hello ,

    + +

    + +

    Help for all pages is available by pressing the information icon on the top right of the page. + + +

    Registration Status: Not Attending

    + +

    You have indicated that you're not able to judge at the + fair this year, thanks for letting us know. You won't be + assigned to judge anything and you don't need to fill out + anything else. + +

    Your registration will still be here next year if you are + able to judge again. + + +

    Registration is now closed for this year. + +

    If your plans change for this year, just indicate below that + you are able to judge at the fair again, and finish the registration + process. If the registration deadline has passed, please contact + our chief judge . + + +

    Thank you. + +

    Registration Status: Complete

    + + Thank you for completing your registration. We will send out an email + when judging teams have been created and project abstracts are ready + for judges to view. + +

    Judging Team and Schedule

    + +

    Judging Team and Schedules are available here: Judging Team and Schedules +

    If the page is blank it means you haven't been assigned to a + judging team, yet. You will be assigned to a judging + team at or before fair, we're just not sure which one yet. + e.g., some judges cancel at the last minute, some judging teams + need extra expertise in certain areas, and some unlisted + special awards still need judges. + + +

    Registration Status: Incomplete

    + + +

    Registration is now closed. + +

    The red numbers in the menu on the left indicate which sections + have missing data. Registration closes on . + You have until this day to complete your registration. + After this date, the registration system closes and you + will not be assigned to a judging team. + + + +


    + +

    Cancelling

    + If you are regrettably unable to judge at the fair this year, just flip + the switch below to let us know. This helps us organize judging teams + and numbers. You can always flip the switch back again. + +

    Registration is closed and judging teams have been assigned. + If you indicate below that you're not attending, you will be + removed from any judging team you were on. If you later change + your status back to attending, you may not be assigned to the + same judging team. Last minute judging changes are all done + manually by the chief judge. +'Yes, I\'ll be there', '0'=>'No, I can\'t make it'); + + $form_id = 'j_attending_form'; + form_begin($form_id, 'j_main.php'); + form_radio_h($form_id, 'j_attending', "Judging at the fair", $sel, $u['attending']); + form_submit($form_id, 'save', 'Save', 'Information Saved'); + form_end($form_id); +?> + +

    + + diff --git a/j_mentorship.php b/j_mentorship.php new file mode 100644 index 00000000..320114ea --- /dev/null +++ b/j_mentorship.php @@ -0,0 +1,66 @@ +0, 'missing'=>$ret)); + exit(); +} + +$help = ' +
    • Mentored - Select \'Yes\' if you have acted as a mentor or in an advisory role for any project at the fair this year. +
    '; + +sfiab_page_begin($u, "Mentorship", $page_id, $help); + +?> + + +
    + + +

    Mentorship

    + + +
    + + + + + + diff --git a/j_options.php b/j_options.php new file mode 100644 index 00000000..696d2ebf --- /dev/null +++ b/j_options.php @@ -0,0 +1,147 @@ + 'English', 'fr' => 'French' ); + +$rounds = timeslots_load_rounds($mysqli); +$num_rounds = count($rounds); + +switch($action) { +case 'save': + if($closed) exit(); + post_bool($u['j_willing_lead'], 'j_willing_lead'); + + if($config['judge_ask_dinner']) { + post_bool($u['j_dinner'], 'j_dinner'); + } else { + $u['j_dinner'] = 0; + } + + $u['j_rounds'] = array(); + if($config['judge_require_all_rounds']) { + /* Fill the rounds as though they selected 'yes' to each round for time availability */ + for($r = 0; $r<$num_rounds; $r++) { + $u['j_rounds'][$r] = $r; + } + } else { + for($r = 0; $r<$num_rounds; $r++) { + post_int($u['j_rounds'][$r], array('j_rounds', $r) ); + } + } + + $u['j_languages'] = NULL; + post_array($u['j_languages'], 'j_languages', $langs); + user_save($mysqli, $u); + + incomplete_check($mysqli, $ret, $u, $page_id, true); + $e = ''; + if(count($incomplete_errors) > 0) { + $e = join('
    ', $incomplete_errors); + } + form_ajax_response(array('status'=>0, 'missing'=>$ret, 'error'=>$e)); + exit(); +} + + +$dinner_time = ''; +$dinner_help = ''; + +if($config['judge_ask_dinner'] == 1) { + if($num_rounds >= 2) { + $dinner_start = date('g:ia', $rounds[0]['end_timestamp']); + $dinner_end = date('g:ia', $rounds[1]['start_timestamp']); + $dinner_time = " from $dinner_start - $dinner_end on judging day"; + } + $dinner_help = "
  • Dinner - There is a judge's dinner$dinner_time for all judges. This helps us guage the amount of food to purchse."; +} + +$help = " +
      +
    • Team-Lead - A team lead is responsible for communicating the final decision of the judging team to the chief judge. +$dinner_help +
    • Round 1/2 - When are you available to judge? You will be assigned to judge in ALL rounds you answer \'Yes\' to. +
    "; + + + +sfiab_page_begin($u, "Options", $page_id, $help); + +?> + + +
    + + 0) { + $e = join('
    ', $incomplete_errors); + } + form_page_begin($page_id, $fields, $e); + form_disable_message($page_id, $closed); + + $form_id=$page_id.'_form'; + form_begin($form_id,'j_options.php', $closed); +?> +

    Judging Options

    + +

    Judging Languages

    + + +

    Time Availability

    + + Note: You will be scheduled to judge in ALL of the judging rounds listed below. If you are unable to commit to all the times below, you can let the committee know by selecting "No, I can't make it" on the Main Judging Page. + + Note: You will be scheduled to judge in ALL of the judging rounds you answer 'Yes' to, not just one. + 'No', $r => 'Yes'); + + $v = array_key_exists($r, $u['j_rounds']) ? $u['j_rounds'][$r] : ''; + if($config['judge_require_all_rounds']) { + form_label($form_id, "j_rounds[$r]", "{$ts['name']}", "$date_str", true); + } else { + form_radio_h($form_id, "j_rounds[$r]", "Are you available to judge in {$ts['name']} ($date_str)?", $data_values, $u['j_rounds'][$r], true); + } + } + form_submit($form_id, 'save','Save','Information Saved'); + form_end($form_id); +?> +
    + + + + + + diff --git a/j_personal.php b/j_personal.php new file mode 100644 index 00000000..3db15ee3 --- /dev/null +++ b/j_personal.php @@ -0,0 +1,101 @@ +0, 'missing'=>$ret, 'val'=>$updates)); + exit(); +} + +$help = ' +
    • Salutation - Will appear before your name on your judge name badge. Dr. for example. +
    • Language - Preferred language of communication (the system is only in English right now, sorry.) +
    • Highest Post-Secondary Degree - PhD, MSc, BASc, etc. +
    '; + +sfiab_page_begin($u, "Judge Personal", $page_id, $help); + +?> + + +
    + +'None', 'bachelor'=>'Bachelor', 'master'=>'Master', 'doctorate'=>'Doctorate' ); + + incomplete_check($mysqli, $fields, $u, $page_id); + form_page_begin($page_id, $fields); + form_disable_message($page_id, $closed); + + $form_id = $page_id."_form"; + form_begin($form_id, 'j_personal.php', $closed); + + form_text($form_id, 'salutation', "Salutation (This goes on your name tag!)", $u); + form_text($form_id, 'firstname', "First Name", $u); + form_text($form_id, 'lastname', "Last Name", $u); + form_radio_h($form_id, 'sex', 'Gender', array( 'male' => 'Male', 'female' => 'Female'), $u); + form_text($form_id, 'phone1', "Primary Phone", $u, 'tel'); + form_text($form_id, 'phone2', "Secondary Phone", $u, 'tel'); + form_text($form_id, 'organization', "Organization (This goes on your name tag!)", $u); + form_text($form_id, 'city', 'City', $u['city']); + form_province($form_id, 'province', 'Province / Territory', $u); + form_lang($form_id, 'language', "Preferred Language", $u); + form_select($form_id, 'j_psd', "Highest Post-Secondary Degree (or equivalent)", $degrees, $u); + form_text($form_id, 'j_heard_about', "How did you hear about becoming a judge at the fair?", $u); + form_submit($form_id, 'save', 'Save', 'Information Saved'); + form_end($form_id); +?> + + +
    + + + + + + diff --git a/j_schedule.php b/j_schedule.php new file mode 100644 index 00000000..4c5a9f91 --- /dev/null +++ b/j_schedule.php @@ -0,0 +1,115 @@ +'; + +sfiab_page_begin($u, "Judge Schedule", $page_id, $help); + +$timeslots = timeslots_load_all($mysqli); + +?> + + +
    + +

    Judge Team and Project Assignments:

    + +

    Judging assignments are not available yet. + &$ts) { + $header_printed = false; + + if(!in_array($ts['round'], $u['j_rounds'])) { + continue; + } + + $round_start = date('F j, g:ia', $ts['start_timestamp']); + $round_end = date('g:ia', $ts['end_timestamp']); + +?>

    - -

    + + +

    Team # -

    + + +
    Members:
    Projects: + + This is a CUSP judging team, projects will be assigned after the first round of judging is complete + + No projects yet. This could be because students cannot self-nominate for this award, or because all projects on the floor are eligible. You will given judging instructions at the fair. + + +{$p['number']}"; +?> + + +
    +
    + +
    +

    You have no judging assignments (yet). You will be + assigned to a judging team at or before fair, we're just not + sure which one yet. e.g., some judges cancel at the last + minute, some judging teams need extra expertise in certain + areas, and some unlisted special awards still need judges. + +

    + + + diff --git a/jquery/jquery-1.9.1.min.js b/jquery/jquery-1.9.1.min.js new file mode 100644 index 00000000..006e9531 --- /dev/null +++ b/jquery/jquery-1.9.1.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery.min.map +*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
    a",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="
    t
    ",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
    ",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; +return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="
    ",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) +}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("