From 5fd9fa480f302902328b81f912dd67ce378284f8 Mon Sep 17 00:00:00 2001 From: citizenz7 Date: Thu, 20 Apr 2017 18:50:55 +0200 Subject: V.1.4.6 --- Html/404.php | 49 + Html/activate.php | 40 + Html/admin/.htaccess | 1 + Html/admin/add-category.php | 134 + Html/admin/add-licence.php | 134 + Html/admin/add-user.php | 156 + Html/admin/categories.php | 112 + Html/admin/download.php | 90 + Html/admin/edit-category.php | 125 + Html/admin/edit-licence.php | 125 + Html/admin/edit-post.php | 398 +++ Html/admin/edit-profil.php | 281 ++ Html/admin/edit-user.php | 166 ++ Html/admin/index.php | 185 ++ Html/admin/licences.php | 110 + Html/admin/login.php | 92 + Html/admin/logout.php | 17 + Html/admin/logs.php | 95 + Html/admin/menu.php | 11 + Html/admin/messagerie.php | 111 + Html/admin/messages_envoyer_tous.php | 114 + Html/admin/profil.php | 619 ++++ Html/admin/recup_pass.php | 124 + Html/admin/signup.php | 233 ++ Html/admin/upload.php | 373 +++ Html/admin/upload.php.DIST | 372 +++ Html/admin/users.php | 170 ++ Html/apropos.php | 100 + Html/archives.php | 96 + Html/catpost.php | 137 + Html/classes/.htaccess | 1 + Html/classes/class.paginator.php | 198 ++ Html/classes/class.password.php | 213 ++ Html/classes/class.user.php | 68 + Html/classes/phpmailer/exception.php | 18 + Html/classes/phpmailer/mail.php | 33 + Html/classes/phpmailer/phpmailer.php | 3403 ++++++++++++++++++++++ Html/classes/phpmailer/pop3.php | 417 +++ Html/classes/phpmailer/smtp.php | 935 ++++++ Html/contact.php | 152 + Html/favicon.ico | Bin 0 -> 1406 bytes Html/images/.htaccess | 1 + Html/images/Calendar-icon.png | Bin 0 -> 605 bytes Html/images/Chat-icon.png | Bin 0 -> 445 bytes Html/images/Communicate-icon.png | Bin 0 -> 448 bytes Html/images/Email-icon.png | Bin 0 -> 366 bytes Html/images/File-icon.png | Bin 0 -> 378 bytes Html/images/Folder-icon.png | Bin 0 -> 382 bytes Html/images/account-ico.png | Bin 0 -> 771 bytes Html/images/admin.png | Bin 0 -> 974 bytes Html/images/asc.gif | Bin 0 -> 54 bytes Html/images/attention-1.jpg | Bin 0 -> 1874 bytes Html/images/author.png | Bin 0 -> 722 bytes Html/images/avatars/avatar-profil.png | Bin 0 -> 11785 bytes Html/images/avatars/avatar.png | Bin 0 -> 782 bytes Html/images/back.png | Bin 0 -> 164 bytes Html/images/back1.png | Bin 0 -> 133 bytes Html/images/back2.png | Bin 0 -> 88953 bytes Html/images/back3.png | Bin 0 -> 139444 bytes Html/images/background03.jpg | Bin 0 -> 18166 bytes Html/images/bg.gif | Bin 0 -> 64 bytes Html/images/bottom-arrow.png | Bin 0 -> 987 bytes Html/images/btn_recherche.gif | Bin 0 -> 1585 bytes Html/images/category.png | Bin 0 -> 632 bytes Html/images/cloud-ico.png | Bin 0 -> 818 bytes Html/images/comments.png | Bin 0 -> 846 bytes Html/images/date.png | Bin 0 -> 1667 bytes Html/images/desc.gif | Bin 0 -> 54 bytes Html/images/down.gif | Bin 0 -> 282 bytes Html/images/down.png | Bin 0 -> 1212 bytes Html/images/download-2-icon.png | Bin 0 -> 247 bytes Html/images/download.png | Bin 0 -> 1117 bytes Html/images/envelope-newmail.gif | Bin 0 -> 4196 bytes Html/images/file.png | Bin 0 -> 632 bytes Html/images/footer-bg.png | Bin 0 -> 166 bytes Html/images/header-bg.jpg | Bin 0 -> 18824 bytes Html/images/index.html | 0 Html/images/licence.png | Bin 0 -> 718 bytes Html/images/login-ico.png | Bin 0 -> 528 bytes Html/images/logo-fond45.png | Bin 0 -> 93001 bytes Html/images/logo.png | Bin 0 -> 6334 bytes Html/images/logout.png | Bin 0 -> 685 bytes Html/images/member-icon.png | Bin 0 -> 651 bytes Html/images/menu-primary-shadow.png | Bin 0 -> 1698 bytes Html/images/menu-secondary-bg.png | Bin 0 -> 172 bytes Html/images/menu-secondary-shadow.png | Bin 0 -> 1698 bytes Html/images/messagerie.jpg | Bin 0 -> 714 bytes Html/images/meta-separator.png | Bin 0 -> 121 bytes Html/images/noimage.png | Bin 0 -> 5308 bytes Html/images/read.png | Bin 0 -> 293 bytes Html/images/readmore-bg.png | Bin 0 -> 264 bytes Html/images/search.png | Bin 0 -> 378 bytes Html/images/social/facebook-icon.png | Bin 0 -> 706 bytes Html/images/social/facebook_32.png | Bin 0 -> 1515 bytes Html/images/social/feed_32.png | Bin 0 -> 1621 bytes Html/images/social/google-plus-icon.png | Bin 0 -> 1718 bytes Html/images/social/googleplus_32.png | Bin 0 -> 2468 bytes Html/images/social/mail-icon.png | Bin 0 -> 1605 bytes Html/images/social/mastodon.png | Bin 0 -> 1846 bytes Html/images/social/rss-icon.png | Bin 0 -> 1767 bytes Html/images/social/twitter-icon.png | Bin 0 -> 1336 bytes Html/images/social/twitter_32.png | Bin 0 -> 1542 bytes Html/images/star-ico.png | Bin 0 -> 1272 bytes Html/images/stats.png | Bin 0 -> 604 bytes Html/images/tabs-bg.png | Bin 0 -> 205 bytes Html/images/tags.png | Bin 0 -> 786 bytes Html/images/tele.png | Bin 0 -> 345 bytes Html/images/torrentfileblue.png | Bin 0 -> 5279 bytes Html/images/up.png | Bin 0 -> 1236 bytes Html/images/uptorr.png | Bin 0 -> 677 bytes Html/images/user.png | Bin 0 -> 688 bytes Html/images/visitor.png | Bin 0 -> 651 bytes Html/images/warning.png | Bin 0 -> 789 bytes Html/images/wrapper-bg.png | Bin 0 -> 184 bytes Html/includes/.htaccess | 1 + Html/includes/BDecode.php | 172 ++ Html/includes/BEncode.php | 94 + Html/includes/ariane.php | 32 + Html/includes/config.php | 138 + Html/includes/footer.php | 40 + Html/includes/functions.php | 385 +++ Html/includes/header-logo.php | 14 + Html/includes/header.php | 158 + Html/includes/nav.php | 10 + Html/index.php | 176 ++ Html/infosite.php | 157 + Html/js/.htaccess | 1 + Html/js/SCEditor/emoticons/alien.png | Bin 0 -> 756 bytes Html/js/SCEditor/emoticons/angel.png | Bin 0 -> 1182 bytes Html/js/SCEditor/emoticons/angry.png | Bin 0 -> 781 bytes Html/js/SCEditor/emoticons/blink.png | Bin 0 -> 972 bytes Html/js/SCEditor/emoticons/blush.png | Bin 0 -> 865 bytes Html/js/SCEditor/emoticons/cheerful.png | Bin 0 -> 753 bytes Html/js/SCEditor/emoticons/cool.png | Bin 0 -> 965 bytes Html/js/SCEditor/emoticons/credits.txt | 9 + Html/js/SCEditor/emoticons/cwy.png | Bin 0 -> 877 bytes Html/js/SCEditor/emoticons/devil.png | Bin 0 -> 1012 bytes Html/js/SCEditor/emoticons/dizzy.png | Bin 0 -> 991 bytes Html/js/SCEditor/emoticons/ermm.png | Bin 0 -> 983 bytes Html/js/SCEditor/emoticons/face.png | Bin 0 -> 793 bytes Html/js/SCEditor/emoticons/getlost.png | Bin 0 -> 792 bytes Html/js/SCEditor/emoticons/grin.png | Bin 0 -> 867 bytes Html/js/SCEditor/emoticons/happy.png | Bin 0 -> 792 bytes Html/js/SCEditor/emoticons/heart.png | Bin 0 -> 572 bytes Html/js/SCEditor/emoticons/kissing.png | Bin 0 -> 793 bytes Html/js/SCEditor/emoticons/laughing.png | Bin 0 -> 912 bytes Html/js/SCEditor/emoticons/ninja.png | Bin 0 -> 694 bytes Html/js/SCEditor/emoticons/pinch.png | Bin 0 -> 804 bytes Html/js/SCEditor/emoticons/pouty.png | Bin 0 -> 799 bytes Html/js/SCEditor/emoticons/sad.png | Bin 0 -> 789 bytes Html/js/SCEditor/emoticons/shocked.png | Bin 0 -> 780 bytes Html/js/SCEditor/emoticons/sick.png | Bin 0 -> 783 bytes Html/js/SCEditor/emoticons/sideways.png | Bin 0 -> 788 bytes Html/js/SCEditor/emoticons/silly.png | Bin 0 -> 930 bytes Html/js/SCEditor/emoticons/sleeping.png | Bin 0 -> 1039 bytes Html/js/SCEditor/emoticons/smile.png | Bin 0 -> 983 bytes Html/js/SCEditor/emoticons/tongue.png | Bin 0 -> 981 bytes Html/js/SCEditor/emoticons/unsure.png | Bin 0 -> 763 bytes Html/js/SCEditor/emoticons/w00t.png | Bin 0 -> 718 bytes Html/js/SCEditor/emoticons/wassat.png | Bin 0 -> 810 bytes Html/js/SCEditor/emoticons/whistling.png | Bin 0 -> 1072 bytes Html/js/SCEditor/emoticons/wink.png | Bin 0 -> 791 bytes Html/js/SCEditor/emoticons/wub.png | Bin 0 -> 1010 bytes Html/js/SCEditor/jquery.sceditor.bbcode.min.js | 4 + Html/js/SCEditor/jquery.sceditor.default.min.css | 1 + Html/js/SCEditor/jquery.sceditor.min.js | 3 + Html/js/SCEditor/jquery.sceditor.xhtml.min.js | 3 + Html/js/SCEditor/languages/ar.js | 68 + Html/js/SCEditor/languages/ca.js | 68 + Html/js/SCEditor/languages/cn.js | 68 + Html/js/SCEditor/languages/cs.js | 71 + Html/js/SCEditor/languages/de.js | 59 + Html/js/SCEditor/languages/el.js | 68 + Html/js/SCEditor/languages/en-US.js | 7 + Html/js/SCEditor/languages/en.js | 12 + Html/js/SCEditor/languages/es.js | 68 + Html/js/SCEditor/languages/et.js | 57 + Html/js/SCEditor/languages/fa.js | 69 + Html/js/SCEditor/languages/fr.js | 70 + Html/js/SCEditor/languages/gl.js | 68 + Html/js/SCEditor/languages/hu.js | 69 + Html/js/SCEditor/languages/it.js | 72 + Html/js/SCEditor/languages/ja.js | 71 + Html/js/SCEditor/languages/lt.js | 68 + Html/js/SCEditor/languages/nb.js | 70 + Html/js/SCEditor/languages/nl.js | 57 + Html/js/SCEditor/languages/pl.js | 68 + Html/js/SCEditor/languages/pt-BR.js | 67 + Html/js/SCEditor/languages/pt.js | 69 + Html/js/SCEditor/languages/ru.js | 57 + Html/js/SCEditor/languages/sv.js | 58 + Html/js/SCEditor/languages/template.js | 74 + Html/js/SCEditor/languages/tr.js | 66 + Html/js/SCEditor/languages/tw.js | 68 + Html/js/SCEditor/languages/uk.js | 57 + Html/js/SCEditor/languages/vi.js | 68 + Html/js/SCEditor/plugins/bbcode.js | 2 + Html/js/SCEditor/plugins/format.js | 2 + Html/js/SCEditor/plugins/undo.js | 2 + Html/js/SCEditor/plugins/xhtml.js | 2 + Html/js/SCEditor/themes/default.min.css | 1 + Html/js/SCEditor/themes/famfamfam.png | Bin 0 -> 11682 bytes Html/js/SCEditor/themes/modern.min.css | 1 + Html/js/SCEditor/themes/monocons.min.css | 1 + Html/js/SCEditor/themes/monocons/monocons.eot | Bin 0 -> 8028 bytes Html/js/SCEditor/themes/monocons/monocons.ttf | Bin 0 -> 7860 bytes Html/js/SCEditor/themes/office-toolbar.min.css | 1 + Html/js/SCEditor/themes/office.min.css | 1 + Html/js/SCEditor/themes/square.min.css | 1 + Html/js/fr_FR.js | 219 ++ Html/js/passwd.js | 81 + Html/licpost.php | 132 + Html/mailer.php | 28 + Html/membres.php | 161 + Html/messages_envoyer.php | 136 + Html/messages_lire.php | 133 + Html/messages_repondre.php | 96 + Html/messages_supprimer.php | 23 + Html/peers.php | 270 ++ Html/recherche-membres.php | 103 + Html/recherche.php | 116 + Html/robots.txt | 7 + Html/rss.php | 55 + Html/sidebar.php | 441 +++ Html/style/.htaccess | 1 + Html/style/bootstrap.min.css | 5 + Html/style/main.css | 872 ++++++ Html/style/normalize.css | 500 ++++ Html/style/strength.css | 34 + Html/torrents.php | 182 ++ Html/torrents/.htaccess | 1 + Html/verificationimage.php | 28 + Html/viewpost.php | 415 +++ 233 files changed, 17472 insertions(+) create mode 100644 Html/404.php create mode 100644 Html/activate.php create mode 100644 Html/admin/.htaccess create mode 100644 Html/admin/add-category.php create mode 100644 Html/admin/add-licence.php create mode 100644 Html/admin/add-user.php create mode 100644 Html/admin/categories.php create mode 100644 Html/admin/download.php create mode 100644 Html/admin/edit-category.php create mode 100644 Html/admin/edit-licence.php create mode 100644 Html/admin/edit-post.php create mode 100644 Html/admin/edit-profil.php create mode 100644 Html/admin/edit-user.php create mode 100644 Html/admin/index.php create mode 100644 Html/admin/licences.php create mode 100644 Html/admin/login.php create mode 100644 Html/admin/logout.php create mode 100644 Html/admin/logs.php create mode 100644 Html/admin/menu.php create mode 100644 Html/admin/messagerie.php create mode 100644 Html/admin/messages_envoyer_tous.php create mode 100644 Html/admin/profil.php create mode 100644 Html/admin/recup_pass.php create mode 100644 Html/admin/signup.php create mode 100644 Html/admin/upload.php create mode 100644 Html/admin/upload.php.DIST create mode 100644 Html/admin/users.php create mode 100644 Html/apropos.php create mode 100644 Html/archives.php create mode 100644 Html/catpost.php create mode 100644 Html/classes/.htaccess create mode 100644 Html/classes/class.paginator.php create mode 100644 Html/classes/class.password.php create mode 100644 Html/classes/class.user.php create mode 100644 Html/classes/phpmailer/exception.php create mode 100644 Html/classes/phpmailer/mail.php create mode 100644 Html/classes/phpmailer/phpmailer.php create mode 100644 Html/classes/phpmailer/pop3.php create mode 100644 Html/classes/phpmailer/smtp.php create mode 100644 Html/contact.php create mode 100644 Html/favicon.ico create mode 100644 Html/images/.htaccess create mode 100644 Html/images/Calendar-icon.png create mode 100644 Html/images/Chat-icon.png create mode 100644 Html/images/Communicate-icon.png create mode 100644 Html/images/Email-icon.png create mode 100644 Html/images/File-icon.png create mode 100644 Html/images/Folder-icon.png create mode 100644 Html/images/account-ico.png create mode 100644 Html/images/admin.png create mode 100644 Html/images/asc.gif create mode 100644 Html/images/attention-1.jpg create mode 100644 Html/images/author.png create mode 100644 Html/images/avatars/avatar-profil.png create mode 100644 Html/images/avatars/avatar.png create mode 100644 Html/images/back.png create mode 100644 Html/images/back1.png create mode 100644 Html/images/back2.png create mode 100644 Html/images/back3.png create mode 100644 Html/images/background03.jpg create mode 100644 Html/images/bg.gif create mode 100644 Html/images/bottom-arrow.png create mode 100644 Html/images/btn_recherche.gif create mode 100644 Html/images/category.png create mode 100644 Html/images/cloud-ico.png create mode 100644 Html/images/comments.png create mode 100644 Html/images/date.png create mode 100644 Html/images/desc.gif create mode 100644 Html/images/down.gif create mode 100644 Html/images/down.png create mode 100644 Html/images/download-2-icon.png create mode 100644 Html/images/download.png create mode 100644 Html/images/envelope-newmail.gif create mode 100644 Html/images/file.png create mode 100644 Html/images/footer-bg.png create mode 100644 Html/images/header-bg.jpg create mode 100644 Html/images/index.html create mode 100644 Html/images/licence.png create mode 100644 Html/images/login-ico.png create mode 100644 Html/images/logo-fond45.png create mode 100644 Html/images/logo.png create mode 100644 Html/images/logout.png create mode 100644 Html/images/member-icon.png create mode 100644 Html/images/menu-primary-shadow.png create mode 100644 Html/images/menu-secondary-bg.png create mode 100644 Html/images/menu-secondary-shadow.png create mode 100644 Html/images/messagerie.jpg create mode 100644 Html/images/meta-separator.png create mode 100644 Html/images/noimage.png create mode 100644 Html/images/read.png create mode 100644 Html/images/readmore-bg.png create mode 100644 Html/images/search.png create mode 100644 Html/images/social/facebook-icon.png create mode 100644 Html/images/social/facebook_32.png create mode 100644 Html/images/social/feed_32.png create mode 100644 Html/images/social/google-plus-icon.png create mode 100644 Html/images/social/googleplus_32.png create mode 100644 Html/images/social/mail-icon.png create mode 100644 Html/images/social/mastodon.png create mode 100644 Html/images/social/rss-icon.png create mode 100644 Html/images/social/twitter-icon.png create mode 100644 Html/images/social/twitter_32.png create mode 100644 Html/images/star-ico.png create mode 100644 Html/images/stats.png create mode 100644 Html/images/tabs-bg.png create mode 100644 Html/images/tags.png create mode 100644 Html/images/tele.png create mode 100644 Html/images/torrentfileblue.png create mode 100644 Html/images/up.png create mode 100644 Html/images/uptorr.png create mode 100644 Html/images/user.png create mode 100644 Html/images/visitor.png create mode 100644 Html/images/warning.png create mode 100644 Html/images/wrapper-bg.png create mode 100644 Html/includes/.htaccess create mode 100644 Html/includes/BDecode.php create mode 100644 Html/includes/BEncode.php create mode 100644 Html/includes/ariane.php create mode 100644 Html/includes/config.php create mode 100644 Html/includes/footer.php create mode 100644 Html/includes/functions.php create mode 100644 Html/includes/header-logo.php create mode 100644 Html/includes/header.php create mode 100644 Html/includes/nav.php create mode 100644 Html/index.php create mode 100644 Html/infosite.php create mode 100644 Html/js/.htaccess create mode 100644 Html/js/SCEditor/emoticons/alien.png create mode 100644 Html/js/SCEditor/emoticons/angel.png create mode 100644 Html/js/SCEditor/emoticons/angry.png create mode 100644 Html/js/SCEditor/emoticons/blink.png create mode 100644 Html/js/SCEditor/emoticons/blush.png create mode 100644 Html/js/SCEditor/emoticons/cheerful.png create mode 100644 Html/js/SCEditor/emoticons/cool.png create mode 100644 Html/js/SCEditor/emoticons/credits.txt create mode 100644 Html/js/SCEditor/emoticons/cwy.png create mode 100644 Html/js/SCEditor/emoticons/devil.png create mode 100644 Html/js/SCEditor/emoticons/dizzy.png create mode 100644 Html/js/SCEditor/emoticons/ermm.png create mode 100644 Html/js/SCEditor/emoticons/face.png create mode 100644 Html/js/SCEditor/emoticons/getlost.png create mode 100644 Html/js/SCEditor/emoticons/grin.png create mode 100644 Html/js/SCEditor/emoticons/happy.png create mode 100644 Html/js/SCEditor/emoticons/heart.png create mode 100644 Html/js/SCEditor/emoticons/kissing.png create mode 100644 Html/js/SCEditor/emoticons/laughing.png create mode 100644 Html/js/SCEditor/emoticons/ninja.png create mode 100644 Html/js/SCEditor/emoticons/pinch.png create mode 100644 Html/js/SCEditor/emoticons/pouty.png create mode 100644 Html/js/SCEditor/emoticons/sad.png create mode 100644 Html/js/SCEditor/emoticons/shocked.png create mode 100644 Html/js/SCEditor/emoticons/sick.png create mode 100644 Html/js/SCEditor/emoticons/sideways.png create mode 100644 Html/js/SCEditor/emoticons/silly.png create mode 100644 Html/js/SCEditor/emoticons/sleeping.png create mode 100644 Html/js/SCEditor/emoticons/smile.png create mode 100644 Html/js/SCEditor/emoticons/tongue.png create mode 100644 Html/js/SCEditor/emoticons/unsure.png create mode 100644 Html/js/SCEditor/emoticons/w00t.png create mode 100644 Html/js/SCEditor/emoticons/wassat.png create mode 100644 Html/js/SCEditor/emoticons/whistling.png create mode 100644 Html/js/SCEditor/emoticons/wink.png create mode 100644 Html/js/SCEditor/emoticons/wub.png create mode 100644 Html/js/SCEditor/jquery.sceditor.bbcode.min.js create mode 100644 Html/js/SCEditor/jquery.sceditor.default.min.css create mode 100644 Html/js/SCEditor/jquery.sceditor.min.js create mode 100644 Html/js/SCEditor/jquery.sceditor.xhtml.min.js create mode 100644 Html/js/SCEditor/languages/ar.js create mode 100644 Html/js/SCEditor/languages/ca.js create mode 100644 Html/js/SCEditor/languages/cn.js create mode 100644 Html/js/SCEditor/languages/cs.js create mode 100644 Html/js/SCEditor/languages/de.js create mode 100644 Html/js/SCEditor/languages/el.js create mode 100644 Html/js/SCEditor/languages/en-US.js create mode 100644 Html/js/SCEditor/languages/en.js create mode 100644 Html/js/SCEditor/languages/es.js create mode 100644 Html/js/SCEditor/languages/et.js create mode 100644 Html/js/SCEditor/languages/fa.js create mode 100644 Html/js/SCEditor/languages/fr.js create mode 100644 Html/js/SCEditor/languages/gl.js create mode 100644 Html/js/SCEditor/languages/hu.js create mode 100644 Html/js/SCEditor/languages/it.js create mode 100644 Html/js/SCEditor/languages/ja.js create mode 100644 Html/js/SCEditor/languages/lt.js create mode 100644 Html/js/SCEditor/languages/nb.js create mode 100644 Html/js/SCEditor/languages/nl.js create mode 100644 Html/js/SCEditor/languages/pl.js create mode 100644 Html/js/SCEditor/languages/pt-BR.js create mode 100644 Html/js/SCEditor/languages/pt.js create mode 100644 Html/js/SCEditor/languages/ru.js create mode 100644 Html/js/SCEditor/languages/sv.js create mode 100644 Html/js/SCEditor/languages/template.js create mode 100644 Html/js/SCEditor/languages/tr.js create mode 100644 Html/js/SCEditor/languages/tw.js create mode 100644 Html/js/SCEditor/languages/uk.js create mode 100644 Html/js/SCEditor/languages/vi.js create mode 100644 Html/js/SCEditor/plugins/bbcode.js create mode 100644 Html/js/SCEditor/plugins/format.js create mode 100644 Html/js/SCEditor/plugins/undo.js create mode 100644 Html/js/SCEditor/plugins/xhtml.js create mode 100644 Html/js/SCEditor/themes/default.min.css create mode 100644 Html/js/SCEditor/themes/famfamfam.png create mode 100644 Html/js/SCEditor/themes/modern.min.css create mode 100644 Html/js/SCEditor/themes/monocons.min.css create mode 100644 Html/js/SCEditor/themes/monocons/monocons.eot create mode 100644 Html/js/SCEditor/themes/monocons/monocons.ttf create mode 100644 Html/js/SCEditor/themes/office-toolbar.min.css create mode 100644 Html/js/SCEditor/themes/office.min.css create mode 100644 Html/js/SCEditor/themes/square.min.css create mode 100644 Html/js/fr_FR.js create mode 100644 Html/js/passwd.js create mode 100644 Html/licpost.php create mode 100644 Html/mailer.php create mode 100644 Html/membres.php create mode 100644 Html/messages_envoyer.php create mode 100644 Html/messages_lire.php create mode 100644 Html/messages_repondre.php create mode 100644 Html/messages_supprimer.php create mode 100644 Html/peers.php create mode 100644 Html/recherche-membres.php create mode 100644 Html/recherche.php create mode 100644 Html/robots.txt create mode 100644 Html/rss.php create mode 100644 Html/sidebar.php create mode 100644 Html/style/.htaccess create mode 100644 Html/style/bootstrap.min.css create mode 100644 Html/style/main.css create mode 100644 Html/style/normalize.css create mode 100644 Html/style/strength.css create mode 100644 Html/torrents.php create mode 100644 Html/torrents/.htaccess create mode 100644 Html/verificationimage.php create mode 100644 Html/viewpost.php (limited to 'Html') diff --git a/Html/404.php b/Html/404.php new file mode 100644 index 0000000..cabe0db --- /dev/null +++ b/Html/404.php @@ -0,0 +1,49 @@ + + + + +
+ + + +
+
+ + +
+ +
+

4 0 4

+

Erreur : désolé, cette page n'existe pas !

+
+ +
+ + + +
+
+
+ + + + + diff --git a/Html/activate.php b/Html/activate.php new file mode 100644 index 0000000..777f640 --- /dev/null +++ b/Html/activate.php @@ -0,0 +1,40 @@ +prepare("UPDATE blog_members SET active = 'yes' WHERE memberID = :memberID AND active = :active"); + $stmt->execute(array( + ':memberID' => $memberID, + ':active' => $active + )); + + //if the row was updated redirect the user + if($stmt->rowCount() == 1){ + + $stmt = $db->prepare("SELECT username FROM blog_members WHERE memberID = :memberID"); + $stmt->execute(array( + ':memberID' => $memberID, + )); + $row = $stmt->fetch(); + + $username = $row['username']; + + //redirect to login page + write_log('Nouveau membre : '.$username, $db); + header('Location: '.SITEURL.'/admin/login.php?action=active'); + exit; + + } else { + header('Location: '.SITEURL.'/admin/login.php?action=echec'); + exit; + } + +} +?> diff --git a/Html/admin/.htaccess b/Html/admin/.htaccess new file mode 100644 index 0000000..5a928f6 --- /dev/null +++ b/Html/admin/.htaccess @@ -0,0 +1 @@ +Options -Indexes diff --git a/Html/admin/add-category.php b/Html/admin/add-category.php new file mode 100644 index 0000000..9e8ce8b --- /dev/null +++ b/Html/admin/add-category.php @@ -0,0 +1,134 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php'); +} + +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +// titre de la page +$pagetitle = 'Admin : ajouter une catégorie'; +require('../includes/header.php'); +?> + + + + +
+ + + +
+
+ +Accueil > '); +for($i=1; $i"; + } + else $prChunks[0]=$dChunks[$i] . ' > '; + echo('">'); + echo(str_replace("_" , " " , $prChunks[0])); +} +?> +

+ + + + +

Categories Index

+

Ajouter une catégorie

+ + prepare('INSERT INTO blog_cats (catTitle,catSlug) VALUES (:catTitle, :catSlug)') ; + $stmt->execute(array( + ':catTitle' => $catTitle, + ':catSlug' => $catSlug + )); + + //redirect to index page + header('Location: categories.php?action=ajoute'); + exit; + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } + + //check for any errors + if(isset($error)){ + foreach($error as $error){ + echo '

'.$error.'

'; + } + } + ?> + +
+ +


+ '>

+ +

+ +
+ +
+ + + +
+
+
+ + + + + diff --git a/Html/admin/add-licence.php b/Html/admin/add-licence.php new file mode 100644 index 0000000..900f331 --- /dev/null +++ b/Html/admin/add-licence.php @@ -0,0 +1,134 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php'); +} + +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +// titre de la page +$pagetitle= 'Admin : ajouter une licence'; +require('../includes/header.php'); +?> + + + +
+ + + +
+
+ +Accueil > '); +for($i=1; $i"; + } + else $prChunks[0]=$dChunks[$i] . ' > '; + echo('">'); + echo(str_replace("_" , " " , $prChunks[0])); +} +?> +

+ + + +

Licences Index

+ +

Ajouter une licence

+ + prepare('INSERT INTO blog_licences (licenceTitle,licenceSlug) VALUES (:licenceTitle, :licenceSlug)') ; + $stmt->execute(array( + ':licenceTitle' => $licenceTitle, + ':licenceSlug' => $licenceSlug + )); + + //redirect to index page + header('Location: licences.php?action=ajoute'); + exit; + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } + + //check for any errors + if(isset($error)){ + foreach($error as $error){ + echo '

'.$error.'

'; + } + } + ?> + +
+ +


+ '>

+ +

+ +
+ +
+ + + +
+
+
+ + + + + diff --git a/Html/admin/add-user.php b/Html/admin/add-user.php new file mode 100644 index 0000000..bd0ea57 --- /dev/null +++ b/Html/admin/add-user.php @@ -0,0 +1,156 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php'); +} + +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +// titre de la page +$pagetitle= 'Admin : ajouter un membre'; +require('../includes/header.php'); +?> + + + +
+ + + +
+
+ +Accueil > '); +for($i=1; $i"; + } + else $prChunks[0]=$dChunks[$i] . ' > '; + echo('">'); + echo(str_replace("_" , " " , $prChunks[0])); +} +?> +

+ + + +

Membres Admin Index

+ +

Ajouter un membre

+ password_hash($_POST['password'], PASSWORD_BCRYPT); + + try { + + //insert into database + $stmt = $db->prepare('INSERT INTO blog_members (username,password,email) VALUES (:username, :password, :email)') ; + $stmt->execute(array( + ':username' => $username, + ':password' => $hashedpassword, + ':email' => $email + )); + + //redirect to index page + header('Location: users.php?action=ajoute'); + exit; + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } + //check for any errors + if(isset($error)){ + foreach($error as $error){ + echo '

'.$error.'

'; + } + } + ?> + +
+ +


+ '>

+ +


+ '>

+ +


+ '>

+ +


+ '>

+ +

+ +
+
+ + + +
+
+
+ + + + + diff --git a/Html/admin/categories.php b/Html/admin/categories.php new file mode 100644 index 0000000..66c911a --- /dev/null +++ b/Html/admin/categories.php @@ -0,0 +1,112 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php'); +} + +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +//show message from add / edit page +if(isset($_GET['delcat'])){ + + $stmt = $db->prepare('DELETE FROM blog_cats WHERE catID = :catID') ; + $stmt->execute(array(':catID' => html($_GET['delcat']))); + + header('Location: categories.php?action=supprime'); + exit; +} + +// titre de la page +$pagetitle= 'Admin : gestion des catégories'; +require('../includes/header.php'); +?> + + + +
+ + + + +
+
+ + + + + La catégorie a été supprimée avec succès.'; + } + if(isset($_GET['action']) && $_GET['action'] == 'ajoute'){ + echo '

La catégorie a été ajoutée avec succès.

'; + } + + ?> + + + + + + + query('SELECT catID FROM blog_cats'); + //pass number of records to + $pages->set_total($stmt->rowCount()); + + $stmt = $db->query('SELECT catID, catTitle, catSlug FROM blog_cats ORDER BY catTitle ASC '.$pages->get_limit()); + + while($row = $stmt->fetch()){ + + echo ''; + echo ''; + ?> + + + + '; + } + + } catch(PDOException $e) { + echo $e->getMessage(); + } + ?> +
TitreAction
'.html($row['catTitle']).' + | + +
+ +
+

+ + page_links(); + ?> +
+ + + +
+
+
+ + + + + diff --git a/Html/admin/download.php b/Html/admin/download.php new file mode 100644 index 0000000..136cc35 --- /dev/null +++ b/Html/admin/download.php @@ -0,0 +1,90 @@ +prepare('SELECT * FROM blog_members WHERE username = :username'); + $stmt->execute(array(':username' => html($_SESSION['username']))); + $row = $stmt->fetch(); + $uid = $row['memberID']; +} +else { + // s'il n'y a pas de session, c'est donc un visiteur avec l'id 32 + $uid = 32; +} + +/* +//on recherche le hash dans la base xbt_files +$stmt1 = $db->prepare('SELECT * FROM xbt_files WHERE fid = :fid'); +$stmt1->execute(array(':fid' => $fid)); +$row1 = $stmt1->fetch(); +*/ + +//on recherche le torrent dans la base blog_posts_seo +$stmt2 = $db->prepare('SELECT * FROM blog_posts_seo WHERE postID = :postID'); +$stmt2->execute(array(':postID' => $fid)); +$row2 = $stmt2->fetch(); + +if($row2['postID'] == '') { + header('Location: '.SITEURL.'/torrents.php?action=noexist'); +} + + +$torrent = $row2['postTorrent']; + +$torrentfile = $REP_TORRENTS.'/'.$torrent; + +// On décode le fichier torrent +$fd = fopen($torrentfile, "rb"); +$alltorrent = fread($fd, filesize($torrentfile)); +$array = BDecode($alltorrent); +fclose($fd); + +//On cherche le pid +$stmt3 = $db->prepare('SELECT * FROM blog_members WHERE memberID = :uid'); +$stmt3->execute(array(':uid' => $uid)); +$row3 = $stmt3->fetch(); + +// Il n'y a que les membres + les visiteurs qui peuvent télécharger +// pas de userid = 0 +if ($row3['pid'] == '') { + header('Location: '.SITEURL); +} + +if ($row3['pid'] == '00000000000000000000000000000000') { + $pid = '00000000000000000000000000000000'; +} +else { + $pid = $row3['pid']; +} + +$tracker_announce_urls = SITEURL.':'.ANNOUNCEPORT.'/announce'; + +// On construit la nouvelle announce avec le pid (passkey ...) +$array["announce"] = SITEURL.":".ANNOUNCEPORT."/".$pid."/announce"; + +$alltorrent=BEncode($array); + +// On construit le header +header("Content-Type: application/x-bittorrent"); +header('Content-Disposition: attachment; filename="['.SITENAMELONG.']'.$torrent.'"'); +print($alltorrent); + +if(isset($_SESSION['username'])) { + write_log('Download torrent : '.html($row2['postTitle']).' par '.html($_SESSION['username']), $db); +} +else { + write_log('Download torrent : '.html($row2['postTitle']).' par Visiteur', $db); +} + +?> diff --git a/Html/admin/edit-category.php b/Html/admin/edit-category.php new file mode 100644 index 0000000..82d2249 --- /dev/null +++ b/Html/admin/edit-category.php @@ -0,0 +1,125 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php'); +} + +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +// titre de la page +$pagetitle= 'Admin : Edition des catégories'; +require('../includes/header.php'); +?> + + +
+ + + +
+
+ + +

Catégories Index

+ +

Edition de la catégorie

+ + prepare('UPDATE blog_cats SET catTitle = :catTitle, catSlug = :catSlug WHERE catID = :catID') ; + $stmt->execute(array( + ':catTitle' => $catTitle, + ':catSlug' => $catSlug, + ':catID' => $catID + )); + + //redirect to index page + header('Location: categories.php?action=updated'); + exit; + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } + ?> + + '; + } + } + + try { + + $stmt = $db->prepare('SELECT catID, catTitle FROM blog_cats WHERE catID = :catID') ; + $stmt->execute(array(':catID' => $_GET['id'])); + $row = $stmt->fetch(); + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + ?> + +
+ '> + +


+ '>

+ +

+ +
+
+ + + +
+
+
+ + + + + diff --git a/Html/admin/edit-licence.php b/Html/admin/edit-licence.php new file mode 100644 index 0000000..bbdb466 --- /dev/null +++ b/Html/admin/edit-licence.php @@ -0,0 +1,125 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php'); +} + +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +// titre de la page +$pagetitle= 'Admin : Edition des licences'; +require('../includes/header.php'); +?> + + +
+ + + +
+
+ + +

Licences Index

+ +

Edition de la licence

+ + prepare('UPDATE blog_licences SET licenceTitle = :licenceTitle, licenceSlug = :licenceSlug WHERE licenceID = :licenceID') ; + $stmt->execute(array( + ':licenceTitle' => $licenceTitle, + ':licenceSlug' => $licenceSlug, + ':licenceID' => $licenceID + )); + + //redirect to index page + header('Location: licences.php?action=updated'); + exit; + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } + ?> + + '; + } + } + + try { + + $stmt = $db->prepare('SELECT licenceID, licenceTitle FROM blog_licences WHERE licenceID = :licenceID') ; + $stmt->execute(array(':licenceID' => $_GET['id'])); + $row = $stmt->fetch(); + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + ?> + +
+ '> + +


+ '>

+ +

+ +
+
+ + + +
+
+
+ + + + + diff --git a/Html/admin/edit-post.php b/Html/admin/edit-post.php new file mode 100644 index 0000000..32e7634 --- /dev/null +++ b/Html/admin/edit-post.php @@ -0,0 +1,398 @@ +prepare('SELECT * FROM blog_posts_seo WHERE postID = :postID'); + $stmt->execute(array(':postID' => $_GET['id'])); + $rowpost = $stmt->fetch(); +} + +catch(PDOException $e) { + echo $e->getMessage(); +} + +//Si pas connecté : on renvoie sur page principale +if(!$user->is_logged_in()) { + header('Location: '.SITEURL.'/login.php'); +} + +//Si pas l'auteur du post : on renvoie sur page principale +//if($rowpost['postAuthor'] != $_SESSION['username']) { +// header('Location: '.SITEURL); +//} + + +// ----------------------------------------------------------------------------------------------- +// si c'est l'auteur du post ou si c'est l'admin, on donne les droits d'édition +if(isset($_SESSION['username']) && isset($_SESSION['userid'])) { + if(($rowpost['postAuthor'] == $_SESSION['username']) || ($_SESSION['userid'] == 1)) { + + + +//Si on supprime l'icone de présentation +if(isset($_GET['delimage'])) { + + $delimage = $_GET['delimage']; + + //on supprime le fichier image + $stmt = $db->prepare('SELECT postImage FROM blog_posts_seo WHERE postID = :postID'); + $stmt->execute(array( + ':postID' => $delimage + )); + $sup = $stmt->fetch(); + $file = $REP_IMAGES_TORRENTS.$sup['postImage']; + if (file_exists($file)) { + unlink($file); + } + + //puis on supprime l'image dans la base + $stmt = $db->prepare('UPDATE blog_posts_seo SET postImage = NULL WHERE postID = :postID'); + $stmt->execute(array( + ':postID' => $delimage + )); + + header('Location: edit-post.php?id='.$delimage); +} + +// titre de la page +$pagetitle = 'Admin : édition du torrent : '.$rowpost['postTitle']; +require('../includes/header.php'); + +?> + + + +
+ + + +
+
+ + + + +

Edition du post :

+ + + 0 && $_FILES['icontorr']['error'] != 4) { + //if ($_FILES['icontorr']['error'] > 0) { + $error[] = 'Erreur lors du transfert de l\'icone de présentation du torrent.'; + } + + // On cherche si l'image n'existe pas déjà sous ce même nom + if (file_exists($target_file)) { + $error[] = 'Désolé, cette image existe déjà. Veillez en choisir une autre ou tout simplement changer son nom.'; + } + + // taille de l'image + if ($_FILES['icontorr']['size'] > $MAX_SIZE_ICON) { + $error[] = 'Image trop grosse. Taille maxi : '.makesize($MAX_SIZE_ICON); + } + + // format de l'image + if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg") { + $error[] = 'Désolé : seuls les fichiers .jpg, .png, .jpeg sont autorisés !'; + } + + // poids de l'image + $image_sizes = getimagesize($_FILES['icontorr']['tmp_name']); + if ($image_sizes[0] > $WIDTH_MAX_ICON OR $image_sizes[1] > $HEIGHT_MAX_ICON) { + $error[] = 'Image trop grande : '.$WIDTH_MAX_ICON.' x '.$HEIGHT_MAX_ICON.' maxi !'; + } + + // on vérifie que c'est bien une image + if($image_sizes == false) { + $error[] = 'L\'image envoyée n\'est pas une image !'; + } + + // on upload l'image s'il n'y a pas d'erreur + if(!isset($error)) { + if(!move_uploaded_file($_FILES['icontorr']['tmp_name'], $REP_IMAGES_TORRENTS.$_FILES['icontorr']['name'])) { + $error[] = 'Problème de téléchargement de l\'icone de présentation du torrent.'; + } + } + + }//fin de if(isset($_FILES['icontorr']['name'])) + + // *************************************** + // fin upload icone de présentation du torrent + // *************************************** + + + + extract($_POST); + + //very basic validation + if($postID == ''){ + $error[] = 'Ce post possède un ID invalide !'; + } + + if($postTitle == ''){ + $error[] = 'Veuillez entrer un titre.'; + } + + if($postLink == ''){ + $error[] = 'Veuillez entrer une URL pour le média.'; + } + + if($postDesc == ''){ + $error[] = 'Veuillez entrer une courte description.'; + } + + if($postCont == ''){ + $error[] = 'Veuillez entrer un contenu.'; + } + + if($catID == '') { + $error[] = 'Veuillez sélectionner au moins une catégorie.'; + } + + if($licenceID == '') { + $error[] = 'Veuillez sélectionner au moins une licence.'; + } + + + if(!isset($error)){ + try { + + $postSlug = slug($postTitle); + + // Si on a une nouvelle image, on met tout à jour, même l'image de présentation + if(isset($_FILES['icontorr']['name']) && !empty($_FILES['icontorr']['name'])) { + + //insert into database + $stmt = $db->prepare('UPDATE blog_posts_seo SET postTitle = :postTitle, postSlug = :postSlug, postLink = :postLink, postDesc = :postDesc, postCont = :postCont, postImage = :postImage WHERE postID = :postID') ; + $stmt->execute(array( + ':postTitle' => $postTitle, + ':postSlug' => $postSlug, + ':postLink' => $postLink, + ':postDesc' => $postDesc, + ':postCont' => $postCont, + ':postImage' => $_FILES['icontorr']['name'], + ':postID' => $_GET['id'] + )); + + } + + else { // sinon on met tout à jour SAUF l'icone de présentation + + //insert into database + $stmt = $db->prepare('UPDATE blog_posts_seo SET postTitle = :postTitle, postSlug = :postSlug, postLink = :postLink, postDesc = :postDesc, postCont = :postCont WHERE postID = :postID') ; + $stmt->execute(array( + ':postTitle' => $postTitle, + ':postSlug' => $postSlug, + ':postLink' => $postLink, + ':postDesc' => $postDesc, + ':postCont' => $postCont, + ':postID' => $_GET['id'] + )); + + } + + + //delete all items with the current postID in categories + $stmt = $db->prepare('DELETE FROM blog_post_cats WHERE postID = :postID'); + $stmt->execute(array(':postID' => $postID)); + + if(is_array($catID)){ + foreach($_POST['catID'] as $catID){ + $stmt = $db->prepare('INSERT INTO blog_post_cats (postID,catID)VALUES(:postID,:catID)'); + $stmt->execute(array( + ':postID' => $postID, + ':catID' => $catID + )); + } + } + + //delete all items with the current postID in licences + $stmt = $db->prepare('DELETE FROM blog_post_licences WHERE postID_BPL = :postID_BPL'); + $stmt->execute(array(':postID_BPL' => $postID)); + + if(is_array($licenceID)){ + foreach($_POST['licenceID'] as $licenceID){ + $stmt = $db->prepare('INSERT INTO blog_post_licences (postID_BPL,licenceID_BPL) VALUES (:postID_BPL,:licenceID_BPL)'); + $stmt->execute(array( + ':postID_BPL' => $postID, + ':licenceID_BPL' => $licenceID + )); + } + } + + //redirect to index page + header('Location: '.SITEURL.'/torrents.php'); + exit; + + } // fin de try + + catch(PDOException $e) { + echo $e->getMessage(); + } + + } // fin de if(!isset($error)) + + } // fin if(isset($_POST['submit'])) + + + //check for any errors + if(isset($error)){ + foreach($error as $error){ + echo '

'.$error.'

'; + } + } + + try { + + $stmt = $db->prepare('SELECT postID, postTitle, postLink, postDesc, postCont, postImage FROM blog_posts_seo WHERE postID = :postID') ; + $stmt->execute(array( + ':postID' => $id + )); + + $row = $stmt->fetch(); + + } + + catch(PDOException $e) { + echo $e->getMessage(); + } + ?> + +
+ '> + +


+ '>

+ +


+ '>

+ +


+

+ +


+

+ +


+ + +

Icone de présentation : + '; + ?> + + Supprimer + + '; + } + ?> + + +


+ +
+ Catégories + + query('SELECT catID, catTitle FROM blog_cats ORDER BY catTitle'); + while($row2 = $stmt2->fetch()){ + + $stmt3 = $db->prepare('SELECT catID FROM blog_post_cats WHERE catID = :catID AND postID = :postID') ; + $stmt3->execute(array(':catID' => $row2['catID'], ':postID' => $row['postID'])); + $row3 = $stmt3->fetch(); + + if($row3['catID'] == $row2['catID']){ + $checked = 'checked=checked'; + } else { + $checked = null; + } + + echo " ".$row2['catTitle']."
"; + } + + $stmt2->closeCursor(); + + ?> +
+ + +
+ Licences + + query('SELECT licenceID, licenceTitle FROM blog_licences ORDER BY licenceTitle'); + while($row2 = $stmt2->fetch()) { + + $stmt3 = $db->prepare('SELECT licenceID_BPL FROM blog_post_licences WHERE licenceID_BPL = :licenceID_BPL AND postID_BPL = :postID_BPL') ; + $stmt3->execute(array( + ':licenceID_BPL' => $row2['licenceID'], + ':postID_BPL' => $row['postID'])); + $row3 = $stmt3->fetch(); + + if($row3['licenceID_BPL'] == $row2['licenceID']){ + $checked = 'checked=checked'; + } else { + $checked = null; + } + + echo " ".$row2['licenceTitle']."
"; + } + ?> +
+ + +

+
+
+ + + +
+
+
+ + + + + + + + diff --git a/Html/admin/edit-profil.php b/Html/admin/edit-profil.php new file mode 100644 index 0000000..009c2e0 --- /dev/null +++ b/Html/admin/edit-profil.php @@ -0,0 +1,281 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: '.SITEURL.'/admin/login.php'); +} + +if(isset($_SESSION['username']) && $_SESSION['username'] != $_GET['membre']) { + header('Location: ./'); +} + + + +//Si on supprime l'avatar... +if(isset($_GET['delavatar'])) { + + $delavatar = html($_GET['delavatar']); + + // on supprime le fichier image + $stmt = $db->prepare('SELECT avatar FROM blog_members WHERE memberID = :memberID'); + $stmt->execute(array( + ':memberID' => $delavatar + )); + $sup = $stmt->fetch(); + + $file = $REP_IMAGES_AVATARS.$sup['avatar']; + if (file_exists($file)) { + unlink($file); + } + + //puis on supprime l'avatar dans la base + $stmt = $db->prepare('UPDATE blog_members SET avatar = NULL WHERE memberID = :memberID'); + $stmt->execute(array( + ':memberID' => $delavatar + )); + + header('Location: '.SITEURL.'/admin/profil.php?action=ok&membre='.html($_SESSION['username'])); + +} + +// titre de la page +$pagetitle = 'Edition du profil de '.html($_SESSION['username']); +require_once '../includes/header.php'; +?> + + +
+ + + +
+
+ +

Edition du profil membre de

+ + 0) { + //if ($_FILES['avatar']['error'] > 0) { + $error[] = 'Erreur lors du transfert de l\'avatar membre.'; + } + + // On cherche si l'image n'existe pas déjà sous ce même nom + if (file_exists($target_file)) { + $error[] = 'Désolé, cet avatar membre existe déjà. Veillez en choisir un autre ou tout simplement changer son nom.'; + } + + // Poids de l'image + if ($_FILES['avatar']['size'] > $MAX_SIZE_AVATAR) { + $error[] = 'Avatar membre trop gros. Taille maxi : '.makesize($MAX_SIZE_AVATAR); + } + + // format de l'image + if($imageFileType != "jpg" && $imageFileType != "png") { + $error[] = 'Désolé : seuls les fichiers jpg et png sont autorisés !'; + } + + // Dimensions de l'image + $image_sizes = getimagesize($_FILES['avatar']['tmp_name']); + if ($image_sizes[0] > $WIDTH_MAX_AVATAR OR $image_sizes[1] > $HEIGHT_MAX_AVATAR) { + $error[] = 'Avatar trop grand : '.$WIDTH_MAX_AVATAR.' x '.$HEIGHT_MAX_AVATAR.' maxi !'; + } + + // on vérifie que c'est bien une image + if($image_sizes == false) { + $error[] = 'L\'image envoyée n\'est pas une image !'; + } + + // on upload l'image s'il n'y a pas d'erreur + if(!isset($error)) { + if(!move_uploaded_file($_FILES['avatar']['tmp_name'], $REP_IMAGES_AVATARS.$_FILES['avatar']['name'])) { + $error[] = 'Problème de téléchargement de l\'avatar membre.'; + } + } + + }//fin de if(isset($_FILES['avatar']['name'])) + + + //very basic validation + if($username ==''){ + $error[] = 'Veuillez entrer un pseudo.'; + } + + // On cherche si le pseudo fait moins de 4 caractères et s'il est déjà dans la base + if (strlen($_POST['username']) < 4) { + $error[] = 'Le pseudo est trop court ! (4 caractères minimum)'; + } + + // Le username ne peut pas contenir de caractères spéciaux, balises, etc. + if (!preg_match("/^[a-zA-Z0-9]+$/",$username)) { + $error[] = 'Le pseudo ne peut contenir que des lettres et des chiffres !'; + } + + /* + if($password ==''){ + $error[] = 'Veuillez entrer un mot de passe.'; + } + */ + + if(!empty($password)) { + + if(strlen($password) < 6) { + $error[] = 'Le mot de passe est trop court ! (6 caractères minimum)'; + } + + if($passwordConfirm ==''){ + $error[] = 'Veuillez confirmer le mot de passe.'; + } + + if($password != $passwordConfirm){ + $error[] = 'Les mots de passe ne concordent pas.'; + } + } + + if($email =='') { + $error[] = 'Veuillez entrer une adresse e-mail.'; + } + + if(!isset($error)) { + + try { + if(isset($password) && !empty($password)){ + + $hashedpassword = $user->password_hash($password, PASSWORD_BCRYPT); + + //Mise à jour de la base avec le nouveau mot de passe + $stmt = $db->prepare('UPDATE blog_members SET password = :password, email = :email WHERE username = :username') ; + $stmt->execute(array( + ':username' => $username, + ':password' => $hashedpassword, + ':email' => $email + )); + } + + elseif(isset($_FILES['avatar']['name']) && !empty($_FILES['avatar']['name'])) { + //Mise à jour de la base avec le nouvel avatar + $stmt = $db->prepare('UPDATE blog_members SET email = :email, avatar = :avatar WHERE username = :username') ; + $stmt->execute(array( + ':username' => $username, + ':avatar' => $_FILES['avatar']['name'], + ':email' => $email + )); + } + + else { + //Mise à jour de la base avec adresse e-mail seulement. Aucun nouveau mot de passe n'a été soumis ni aucun avatar + $stmt = $db->prepare('UPDATE blog_members SET email = :email WHERE username = :username') ; + $stmt->execute(array( + ':username' => $username, + ':email' => $email + )); + } + + write_log('Edition profil utilisateur : '.$username, $db); + + //redirect to page + header('Location: '.SITEURL.'/admin/profil.php?action=ok&membre='.$username); + exit; + + $stmt->closeCursor(); + + } + + catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } + + //check for any errors + if(isset($error)) { + foreach($error as $error) { + echo '

'.$error.'

'; + } + } + + try { + + $stmt = $db->prepare('SELECT memberID,username,email,avatar FROM blog_members WHERE username = :username') ; + $stmt->execute(array(':username' => $username)); + $row = $stmt->fetch(); + + } + + catch(PDOException $e) { + echo $e->getMessage(); + } + + ?> + +
+ +


+ '>

+ +


+

+ +


+

+ +


+ '>

+ +


+ + +

Avatar actuel : + '; + ?> + Supprimer + '; + } + ?> +

+ +
+

+ +
+
+ + + +
+
+
+ + + + + diff --git a/Html/admin/edit-user.php b/Html/admin/edit-user.php new file mode 100644 index 0000000..cc4dab9 --- /dev/null +++ b/Html/admin/edit-user.php @@ -0,0 +1,166 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php'); +} + +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +// titre de la page +$pagetitle = 'Admin : édition du profil de '.$_SESSION['username']; +require('../includes/header.php'); +?> + + +
+ + + +
+
+ + +

Liste des membres

+ +

Edition du profil membre

+ + + 0){ + + if($password ==''){ + $error[] = 'Veuillez entrer un mot de passe.'; + } + + if($passwordConfirm ==''){ + $error[] = 'Veuillez confirmer le mot de passe.'; + } + + if($password != $passwordConfirm){ + $error[] = 'Les mots de passe ne concordent pas.'; + } + + } + + + if($email ==''){ + $error[] = 'Veuillez entrer une adresse e-mail.'; + } + if(!isset($error)){ + + try { + + if(isset($password)){ + + $hashedpassword = $user->password_hash($password, PASSWORD_BCRYPT); + + //update into database + $stmt = $db->prepare('UPDATE blog_members SET username = :username, password = :password, email = :email WHERE memberID = :memberID') ; + $stmt->execute(array( + ':username' => $username, + ':password' => $hashedpassword, + ':email' => $email, + ':memberID' => $memberID + )); + + + } else { + + //update database + $stmt = $db->prepare('UPDATE blog_members SET username = :username, email = :email WHERE memberID = :memberID') ; + $stmt->execute(array( + ':username' => $username, + ':email' => $email, + ':memberID' => $memberID + )); + + } + + + //redirect to index page + header('Location: users.php?action=updated'); + exit; + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } + + ?> + '; + } + } + + try { + + $stmt = $db->prepare('SELECT memberID, username, email FROM blog_members WHERE memberID = :memberID') ; + $stmt->execute(array(':memberID' => $_GET['id'])); + $row = $stmt->fetch(); + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + ?> + +
+ '> + +


+ '>

+ +


+

+ +


+

+ +


+ '>

+ +

+ +
+
+ + + +
+
+
+ + + + + diff --git a/Html/admin/index.php b/Html/admin/index.php new file mode 100644 index 0000000..d47b017 --- /dev/null +++ b/Html/admin/index.php @@ -0,0 +1,185 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php?action=connecte'); + exit(); +} + +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: login.php?action=pasledroit'); + exit(); + } +} + +//Si le torrent est à supprimer ... +if(isset($_GET['delpost'])) { + + // 1 - on supprime le fichier .torrent dans le répertoire /torrents ... + $stmt4 = $db->prepare('SELECT postID, postTorrent, postImage FROM blog_posts_seo WHERE postID = :postID') ; + $stmt4->execute(array( + ':postID' => $_GET['delpost'] + )); + $efface = $stmt4->fetch(); + + $file = $REP_TORRENTS.$efface['postTorrent']; + if (file_exists($file)) { + unlink($file); + } + + // 2 - ... on supprime aussi l'image de présentation du torrent + $postimage = $REP_IMAGES_TORRENTS.$efface['postImage']; + if (file_exists($postimage)) { + unlink($postimage); + } + + + // 3 - on supprime le torrent dans la base + $stmt = $db->prepare('DELETE FROM blog_posts_seo WHERE postID = :postID') ; + $stmt->execute(array( + ':postID' => $_GET['delpost'] + )); + + // 4 - on supprime sa référence de catégorie + $stmt1 = $db->prepare('DELETE FROM blog_post_cats WHERE postID = :postID'); + $stmt1->execute(array( + ':postID' => $_GET['delpost'] + )); + + // 5 - on supprime sa référence de licence + $stmt2 = $db->prepare('DELETE FROM blog_post_licences WHERE postID_BPL = :postID_BPL'); + $stmt2->execute(array( + ':postID_BPL' => $_GET['delpost'] + )); + + // 6 - on supprime ses commentaires s'ils existent + /* + $stmt22 = $db->prepare('SELECT cid_torrent FROM blog_posts_comments WHERE cid_torrent = :cid_torrent'); + $stmt22->execute(array( + ':cid_torrent' => $_GET['delpost'] + )); + $commentaire = $stmt22->fetch(); + + if(!empty($commentaire)) { + $stmtsupcomm = $db->prepare('DELETE FROM blog_posts_comments WHERE cid_torrent = :cid_torrent'); + $stmtsupcomm->execute(array( + ':cid_torrent' => $_GET['delpost'] + )); + } + */ + + // 7 - enfin, on met le flag à "1" pour supprimer le fichier dans la tables xbt_files + $stmt3 = $db->prepare('UPDATE xbt_files SET flags = :flags WHERE fid = :fid') ; + $stmt3->execute(array( + ':flags' => '1', + ':fid' => $_GET['delpost'] + )); + + + header('Location: index.php?action=supprime'); + exit; + +}//fin de if isset $_GET['delpost'] + + +// titre de la page +$pagetitle = 'Admin : gestion des torrents'; + +include_once('../includes/header.php'); + +?> + + + +
+ + + +
+
+ + + + Le torrent a été supprimé avec succès.

'; + } + + if(isset($_GET['action']) && $_GET['action'] == 'ajoute'){ + echo '
Le torrent a été ajouté avec succès.

'; + } + + if(isset($_GET['message']) && $_GET['message'] == 'envoye') { + echo '
Message envoyé à tous les membres.

'; + } + ?> + + + + + + + + + query('SELECT postID FROM blog_posts_seo'); + + //pass number of records to + $pages->set_total($stmt->rowCount()); + + $stmt = $db->query('SELECT postID, postTitle, postAuthor, postDate FROM blog_posts_seo ORDER BY postID DESC '.$pages->get_limit()); + while($row = $stmt->fetch()){ + + echo ''; + echo ''; + sscanf($row['postDate'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde); + echo ''; + echo ''; + ?> + + + + '; + + } + + + } catch(PDOException $e) { + echo $e->getMessage(); + } + ?> +
TitreDateUploaderAction
'.$row['postTitle'].''.$jour.'-'.$mois.'-'.$annee.''.$row['postAuthor'].' +   + +
+ +

+ page_links(); ?> +

+ +
+ + + +
+
+ + + + + + diff --git a/Html/admin/licences.php b/Html/admin/licences.php new file mode 100644 index 0000000..73cab4e --- /dev/null +++ b/Html/admin/licences.php @@ -0,0 +1,110 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php'); +} + +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +//show message from add / edit page +if(isset($_GET['dellicence'])){ + + $stmt = $db->prepare('DELETE FROM blog_licences WHERE licenceID = :licenceID') ; + $stmt->execute(array(':licenceID' => $_GET['dellicence'])); + + header('Location: licences.php?action=supprime'); + exit; +} + +// titre de la page +$pagetitle= 'Admin : gestion des licences'; +require('../includes/header.php'); +?> + + + +
+ + + + +
+
+ + + + La licence a été supprimée avec succès.'; + } + if(isset($_GET['action']) && $_GET['action'] == 'ajoute'){ + echo '

La licence a été ajoutée avec succès.

'; + } + ?> + + + + + + + query('SELECT licenceID FROM blog_licences'); + //pass number of records to + $pages->set_total($stmt->rowCount()); + + $stmt = $db->query('SELECT licenceID, licenceTitle, licenceSlug FROM blog_licences ORDER BY licenceTitle ASC '.$pages->get_limit()); + + while($row = $stmt->fetch()){ + + echo ''; + echo ''; + ?> + + + + '; + } + + } catch(PDOException $e) { + echo $e->getMessage(); + } + ?> +
TitreAction
'.html($row['licenceTitle']).' + | + +
+ +
+

+ + page_links(); + ?> +
+ + + +
+
+
+ + + + + diff --git a/Html/admin/login.php b/Html/admin/login.php new file mode 100644 index 0000000..1276d2a --- /dev/null +++ b/Html/admin/login.php @@ -0,0 +1,92 @@ +is_logged_in()) { + header('Location: ../index.php'); +} + +$pagetitle= 'Connexion membre'; +include_once '../includes/header.php'; +?> + + + +
+ + + +
+
+ + Votre compte est maintenant actif. Vous pouvez vous connecter.'; + break; + case 'echec': + $message = 'Erreur : votre compte n\'a pas pu être activé :/
Merci de vérifier le lien d\'activation.
+ En cas de problème persistant, merci d\'informer le webmaster en utilisant la page contact du site en indiquant votre pseudo et votre adresse e-mail.
'; + break; + case 'connecte': + $message = 'Vous devez être connecté(e) pour accéder à cette page.'; + break; + case 'pasledroit': + $message = 'Vous n\'avez pas le droit d\'accéder à cette page.'; + break; + } + } + + + //process login form if submitted + if(isset($_POST['submit'])){ + + $username = html(trim($_POST['username'])); + $password = html(trim($_POST['password'])); + + if($user->login($username,$password)) { + //Une fois connecté, on retourne sur la page index + write_log('Connexion utilisateur : '.$username, $db); + header('Location: ../index.php'); + exit; + } + + else { + $message = '
Mauvais identifiants ou compte non activé.
'; + } + + }//end if submit + + if(isset($message)) { + echo $message; + } + + ?> + +
+

:

+

:

+

+
+ +
Mot de passe oublié ?
+ +
+ + + +
+
+
+ + + + + diff --git a/Html/admin/logout.php b/Html/admin/logout.php new file mode 100644 index 0000000..dbd5586 --- /dev/null +++ b/Html/admin/logout.php @@ -0,0 +1,17 @@ +logout(); + +//on supprime le user de la base SQL connectes +$stmt = $db->prepare('DELETE FROM connectes WHERE pseudo = :pseudo') ; +$stmt->execute(array( + ':pseudo' => $_SESSION['username'] +)); + + +header('Location: login.php'); + +?> diff --git a/Html/admin/logs.php b/Html/admin/logs.php new file mode 100644 index 0000000..0bd7652 --- /dev/null +++ b/Html/admin/logs.php @@ -0,0 +1,95 @@ +is_logged_in()) { + header('Location: login.php'); +} + +//Il n'y a que l'admin qui accède à cette page +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +$pagetitle = 'Page de logs du site'; + +include_once('../includes/header.php'); + +?> + + + +
+ + + +
+ +
+ + + + + + + + + + + + query('SELECT * FROM blog_logs'); + $pages->set_total($query->rowCount()); + + //On cherche tous les logs + $query = $db->query('SELECT * FROM blog_logs ORDER BY log_id DESC '.$pages->get_limit()); + + while($logs = $query->fetch()) { + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + sscanf($logs['log_date'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde); + echo ''; + echo ''; + + } //while + + echo '
IdRemote adresseResquest uriMessageDate log
'.$logs['log_id'].''.$logs['remote_addr'].''.$logs['request_uri'].''.$logs['message'].''.$jour.'-'.$mois.'-'.$annee.'
à '.$heure.':'.$minute.':'.$seconde.'

'; + echo $pages->page_links(); + + } + + catch(PDOException $e) { + echo $e->getMessage(); + } + ?> + +
+ + + +
+ +
+ +
+ + + + + diff --git a/Html/admin/menu.php b/Html/admin/menu.php new file mode 100644 index 0000000..e921b70 --- /dev/null +++ b/Html/admin/menu.php @@ -0,0 +1,11 @@ +

Administration


+ + +


diff --git a/Html/admin/messagerie.php b/Html/admin/messagerie.php new file mode 100644 index 0000000..075c6b2 --- /dev/null +++ b/Html/admin/messagerie.php @@ -0,0 +1,111 @@ + + + +
+ + + +
+
+ +Le message a été envoyé avec succès.
'; +} + +if(isset($_GET['action']) && $_GET['action'] == 'messupprime'){ + echo '
Le message a été supprimé de votre messagerie.
'; +} +?> + +prepare('SELECT * FROM blog_members,xbt_users WHERE blog_members.memberID = xbt_users.uid AND username = :username'); + $stmt->bindvalue('username', $_GET['membre'], PDO::PARAM_STR); + $stmt->execute(); + $row = $stmt->fetch(); +} + + catch(PDOException $e) { + echo $e->getMessage(); + } +?> + +prepare('SELECT messages_id FROM blog_messages WHERE messages_id_destinataire = :destinataire'); +$stmt->execute(array( + ':destinataire' => $row['memberID'] +)); +$pages->set_total($stmt->rowCount()); + +// on prépare une requete SQL cherchant le titre, la date, l'expéditeur des messages pour le membre connecté +$stmt = $db->prepare('SELECT blog_messages.messages_titre, blog_messages.messages_date, blog_members.username as expediteur, blog_messages.messages_id as id_message, blog_messages.messages_lu FROM blog_messages, blog_members WHERE blog_messages.messages_id_destinataire = :id_destinataire AND blog_messages.messages_id_expediteur = blog_members.memberID ORDER BY blog_messages.messages_date DESC '.$pages->get_limit()); +$stmt->bindValue(':id_destinataire', $row['memberID'], PDO::PARAM_INT); +$stmt->execute(); +?> + + + + + + + + + + + + fetch()){ + echo ''; + sscanf($data['messages_date'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde); + echo ''; + echo ''; + echo ''; + echo ''; + } + ?> +
+ Messagerie interne : + + +
DateTitreExpéditeur
le '.$jour.'-'.$mois.'-'.$annee.' à '.$heure.':'.$minute.':'.$seconde.''; + if($data['messages_lu'] == 0) { + echo ' '; + } + echo ''.html(trim($data['messages_titre'])).''; + echo ''.html(trim($data['expediteur'])).'
+ +'; + echo $pages->page_links('?membre='.html($row['username']).'&'); + echo '
'; +?> + +

+ +
+ + + +
+ + + + + + + diff --git a/Html/admin/messages_envoyer_tous.php b/Html/admin/messages_envoyer_tous.php new file mode 100644 index 0000000..daaec2e --- /dev/null +++ b/Html/admin/messages_envoyer_tous.php @@ -0,0 +1,114 @@ +is_logged_in()) { + header('Location: login.php'); +} + +//Il n'y a que l'admin qui accède à cette page +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +$pagetitle = 'Message groupé à tous les membres'; + +include_once('../includes/header.php'); + +?> + + + +
+ + + +
+ +
+ +query('SELECT * FROM blog_members WHERE memberID != 1 AND memberID != 32 AND active = "yes"'); + + while($result = $getusers->fetch(PDO::FETCH_ASSOC)) { + + $stmt = $db->prepare('INSERT INTO blog_messages (messages_id_expediteur,messages_id_destinataire,messages_date,messages_titre,messages_message) VALUES (:messages_id_expediteur,:messages_id_destinataire,:messages_date,:messages_titre,:messages_message)'); + $stmt->execute(array( + ':messages_id_expediteur' => 1, + ':messages_id_destinataire' => $result['memberID'], + ':messages_date' => date("Y-m-d H:i:s"), + ':messages_titre' => html($_POST['titre']), + ':messages_message' => html($_POST['message']) + )); + + } //while + + header('Location: index.php?&message=envoye'); + $stmt->closeCursor(); + exit(); + } + + catch(PDOException $e) { + echo $e->getMessage(); + } +} +?> + +
+Message à tous les membres : + +
+ +ERREUR : '.$error.'
'; + } +} +?> + +
+
+ +Titre du message :
+ +

+Message : +

+ + + + +
+ + + +
+
+ + + + + + diff --git a/Html/admin/profil.php b/Html/admin/profil.php new file mode 100644 index 0000000..97d7fbb --- /dev/null +++ b/Html/admin/profil.php @@ -0,0 +1,619 @@ +is_logged_in()) { + header('Location: login.php'); +} + +if(!isset($_GET['membre'])) { + header('Location: ./'); +} + +$stmt = $db->prepare('SELECT * FROM blog_members WHERE username = :username'); +$stmt->bindValue(':username', $_GET['membre'], PDO::PARAM_STR); +$stmt->execute(); +$row = $stmt->fetch(); + +if($row['username'] == '') { + header('Location: '.SITEURL.'/membres.php?action=noexistmember'); +} + +// Il n'y a pas de page profil pour le compte Visiteur +if($_GET['membre'] == 'Visiteur') { + header('Location: ./'); +} + + +// C'est parti !!! +else { + +// titre de la page +$pagetitle = 'Page Profil de '.html($_GET['membre']); + +include_once('../includes/header.php'); +?> + + +
+ + + + +
+
+ + Votre profil a été mis à jour !
'; + } + + //On affiche le résultat de l'envoi de message interne + if(isset($_GET['message'])){ + echo '
Le message a été envoyé !
'; + } + + + try { + $stmt = $db->prepare('SELECT * FROM blog_members,xbt_users WHERE blog_members.memberID = xbt_users.uid AND username = :username'); + $stmt->bindValue(':username', $_GET['membre'], PDO::PARAM_STR); + $stmt->execute(); + $row = $stmt->fetch(); + } + catch(PDOException $e) { + echo $e->getMessage(); + } + ?> + + + + + + + + + + + + + + + + + + + + + 0) { + $ratio=number_format($row["uploaded"]/$row["downloaded"],2); + } + else { + $ratio='∞'; + } + ?> + + +
ID de membre : Pas d'avatar pour <?php echo html($row['username']); ?>Avatar de <?php echo html($row['username']); ?>
Pseudo : + [ Webmaster ] | Jabber : mumbly_58 AT jabber.fr'; + echo ' [ Webmaster ] [ Jabber ]'; + } + ?> +
Date d'inscription : + + + +
Envoyé :
Téléchargé :
Ratio de partage :
+ + + + + + prepare('SELECT fid FROM xbt_files_users WHERE uid = :uid'); + $stmt->bindValue(':uid', $row['memberID'], PDO::PARAM_INT); + $stmt->execute(); + + $pages->set_total($stmt->rowCount()); + + + // Tri de colonnes + $tri = 'postTitle'; + $ordre = 'DESC'; + + if(isset($_GET['tri'])) { + // Les valeurs authorisee + $columns = array('postTitle','postDate','postTaille','seeders','leechers','xf.completed'); + $direction = array('ASC','DESC','asc','desc'); + if(in_array($_GET['tri'],$columns)){ //Une des valeurs authorisee, on la set. Sinon ca sera la veleurs par defaut fixee au dessus + $tri = htmlentities($_GET['tri']); + } + if(isset($_GET['ordre']) and in_array($_GET['ordre'],$direction)){ //Une des valeurs authorisee, on la set. Sinon ca sera la veleurs par defaut fixee au dessus + $ordre = htmlentities($_GET['ordre']); + } + } + + $stmtorr1 = $db->prepare(' + SELECT * FROM xbt_files_users xfu + LEFT JOIN blog_posts_seo bps ON bps.postID = xfu.fid + LEFT JOIN xbt_files xf ON xf.fid = bps.postID + WHERE xfu.uid = :uid + ORDER BY '.$tri.' '.$ordre.' '.$pages->get_limit() + ); + $stmtorr1->execute(array( + ':uid' => $row['memberID'] + )); + ?> + + + + + + + + + + fetch()) { + ?> + + + '.$jour.'-'.$mois.'-'.$annee.''; + ?> + + + + + + + +

Ses Téléchargements :

NomAjoutéTailleSLT
+ +
+ + +'; + //echo $pages->page_links('?membre='.$row['username'].'&'); + echo $pages->page_links('?membre='.$row['username'].'&tri='.$tri.'&ordre='.$ordre.'&'); + echo '
'; +?> + +
+ + + + + + prepare('SELECT postID FROM blog_posts_seo WHERE postAuthor = :postAuthor'); + //$stmt = $db->prepare('SELECT fid FROM xbt_files_users WHERE uid = :uid'); + $stmt->execute(array( + ':postAuthor' => $row['username'] + )); + $pages->set_total($stmt->rowCount()); + + /* + // TRI + if(isset($_GET['tri'])) { + $tri = htmlentities($_GET['tri']); + } + else { + $tri = 'postID'; + } + if(isset($_GET['ordre'])) { + $ordre = htmlentities($_GET['ordre']); + } + else { + $ordre = 'DESC'; + } + */ + + if(isset($_GET['tri'])) { + // Les valeurs authorisee + $columns = array('postTitle','postDate','postTaille','seeders','leechers','xf.completed'); + $direction = array('ASC','DESC','asc','desc'); + if(in_array($_GET['tri'],$columns)){ //Une des valeurs authorisee, on la set. Sinon ca sera la veleurs par defaut fixee au dessus + $tri = htmlentities($_GET['tri']); + } + if(isset($_GET['ordre']) and in_array($_GET['ordre'],$direction)){ //Une des valeurs authorisee, on la set. Sinon ca sera la veleurs par defaut fixee au dessus + $ordre = htmlentities($_GET['ordre']); + } + } + + $stmtorr2 = $db->prepare(' + SELECT * FROM blog_posts_seo + LEFT JOIN xbt_files xf ON xf.fid = blog_posts_seo.postID + WHERE blog_posts_seo.postAuthor = :postAuthor + ORDER BY '.$tri.' '.$ordre.' '.$pages->get_limit() + ); + $stmtorr2->execute(array( + ':postAuthor' => $row['username'] + )); + ?> + + + + + + + + + + fetch()) { + ?> + + + '.$jour.'-'.$mois.'-'.$annee.''; + ?> + + + + + + + +

Ses Uploads :

NomAjoutéTailleSLT
+ +
+ + +'; + echo $pages->page_links('?membre='.$row['username'].'&tri='.$tri.'&ordre='.$ordre.'&'); + echo '
'; +?> + +
+ + + + + + Profil membre de :   + + + [  Editer votre profil +  |  +  Messagerie interne ] + +

+ + + + + + + + + + + + + + + + + + 0) { + $ratio=number_format($row["uploaded"]/$row["downloaded"],2); + } + else { + $ratio='∞'; + } + ?> + + + +
ID de membre : Pas d'avatar pour <?php echo $row['username']; ?>Avatar de <?php echo $row['username']; ?>
E-mail :
Pid :
Date d'inscription : + + + +
Envoyé :
Téléchargé :
Ratio de partage :
+ +
+ + + + + + + prepare('SELECT fid FROM xbt_files_users WHERE uid = :uid'); + $stmt->execute(array( + ':uid' => $row['memberID'] + )); + + $pages->set_total($stmt->rowCount()); + + /* + // TRI + if(isset($_GET['tri'])) { + $tri = htmlentities($_GET['tri']); + } + else { + $tri = 'postID'; + } + if(isset($_GET['ordre'])) { + $ordre = htmlentities($_GET['ordre']); + } + else { + $ordre = 'DESC'; + } + */ + + // Tri de colonnes + $tri = 'postDate'; + $ordre = 'DESC'; + if(isset($_GET['tri'])) { + // Les valeurs authorisee + $columns = array('postTitle','postDate','postTaille','seeders','leechers','xf.completed'); + $direction = array('ASC','DESC','asc','desc'); + if(in_array($_GET['tri'],$columns)){ //Une des valeurs authorisee, on la set. Sinon ca sera la veleurs par defaut fixee au dessus + $tri = htmlentities($_GET['tri']); + } + if(isset($_GET['ordre']) and in_array($_GET['ordre'],$direction)){ //Une des valeurs authorisee, on la set. Sinon ca sera la veleurs par defaut fixee au dessus + $ordre = htmlentities($_GET['ordre']); + } + } + + $stmtorr1 = $db->prepare(' + SELECT * FROM xbt_files_users xfu + LEFT JOIN blog_posts_seo bps ON bps.postID = xfu.fid + LEFT JOIN xbt_files xf ON xf.fid = bps.postID + WHERE xfu.uid = :uid + ORDER BY '.$tri.' '.$ordre.' '.$pages->get_limit() + ); + $stmtorr1->execute(array( + ':uid' => $row['memberID'] + )); + ?> + + + + + + + + + + fetch()) { + ?> + + + '.$jour.'-'.$mois.'-'.$annee.''; + ?> + + + + + + + +

Mes Téléchargements :

NomAjoutéTailleSLT
+ +
+ + +'; + echo $pages->page_links('?membre='.$row['username'].'&tri='.$tri.'&ordre='.$ordre.'&'); + echo ''; +?> + + + + + + + prepare('SELECT postID FROM blog_posts_seo WHERE postAuthor = :postAuthor'); + $stmt->bindValue(':postAuthor',$sessionuser,PDO::PARAM_STR); + $stmt->execute(); + $pages->set_total($stmt->rowCount()); + + + // Tri de colonnes + $tri = 'postDate'; + $ordre = 'DESC'; + + if(isset($_GET['tri'])) { + // Les valeurs authorisee + $columns = array('postTitle','postDate','postTaille','seeders','leechers','xf.completed'); + $direction = array('ASC','DESC','asc','desc'); + if(in_array($_GET['tri'],$columns)){ //Une des valeurs authorisee, on la set. Sinon ca sera la veleurs par defaut fixee au dessus + $tri = htmlentities($_GET['tri']); + } + if(isset($_GET['ordre']) and in_array($_GET['ordre'],$direction)){ //Une des valeurs authorisee, on la set. Sinon ca sera la veleurs par defaut fixee au dessus + $ordre = htmlentities($_GET['ordre']); + } + } + + $stmtorr2 = $db->prepare(' + SELECT * FROM blog_posts_seo + LEFT JOIN xbt_files xf ON xf.fid = blog_posts_seo.postID + WHERE blog_posts_seo.postAuthor = :postAuthor + ORDER BY '.$tri.' '.$ordre.' '.$pages->get_limit() + ); + $stmtorr2->execute(array( + ':postAuthor' => $row['username'] + )); + ?> + + + + + + + + + + fetch()) { + ?> + + + '.$jour.'-'.$mois.'-'.$annee.''; + ?> + + + + + + + +

Mes Uploads :

NomAjoutéTailleSLT
+ +
+ + +'; + //echo $pages->page_links('?membre='.$row['username'].'&'); + echo $pages->page_links('?membre='.$row['username'].'&tri='.$tri.'&ordre='.$ordre.'&'); + echo ''; +?> + +
+ + + + + + + + + + +prepare('SELECT messages_id FROM blog_messages WHERE messages_id_destinataire = :destinataire'); +$stmt->execute(array( + ':destinataire' => $row['memberID'] + )); +$pages->set_total($stmt->rowCount()); + +// on prépare une requete SQL cherchant le titre, la date, l'expéditeur des messages pour le membre connecté +$stmt = $db->prepare('SELECT blog_messages.messages_titre, blog_messages.messages_date, blog_members.username as expediteur, blog_messages.messages_id as id_message, blog_messages.messages_lu FROM blog_messages, blog_members WHERE blog_messages.messages_id_destinataire = :id_destinataire AND blog_messages.messages_id_expediteur = blog_members.memberID ORDER BY blog_messages.messages_date DESC '.$pages->get_limit()); +$stmt->execute(array( + ':id_destinataire' => $row['memberID'] + )); +?> + + + + + + + + + + + + fetch()){ + echo ''; + sscanf($data['messages_date'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde); + echo ''; + echo ''; + echo ''; + echo ''; + } + ?> +
+

Mes Messages : + +

+
DateTitreExpéditeur
'.$jour.'-'.$mois.'-'.$annee.' à '.$heure.':'.$minute.':'.$seconde.''; + if($data['messages_lu'] == 0) { + echo ' '; + } + echo ''.stripslashes(htmlentities(trim($data['messages_titre']), ENT_QUOTES, "UTF-8")).''; + echo ''.stripslashes(htmlentities(trim($data['expediteur']), ENT_QUOTES, "UTF-8")).'
+ +'; + echo $pages->page_links('?membre='.$row['username'].'&'); + echo ''; +?> + +

+ + + + + + + + + + + + + + + + + +
+ + + + + + + + diff --git a/Html/admin/recup_pass.php b/Html/admin/recup_pass.php new file mode 100644 index 0000000..4c36e58 --- /dev/null +++ b/Html/admin/recup_pass.php @@ -0,0 +1,124 @@ +query("SELECT email FROM blog_members WHERE email = '".$email."' "); + + //si le nombre de lignes retourne par la requete != 1 + if ($stmt->rowCount() != 1) { + $error[] = 'adresse e-mail inconnue.'; + } + + else { + $row1 = $stmt->fetch(); + + $retour = $db->query("SELECT password FROM blog_members WHERE email = '".$email."' "); + $row2 = $retour->fetch(); + $new_password = fct_passwd(); //création d'un nouveau mot de passe + $hashedpassword = $user->password_hash($new_password, PASSWORD_BCRYPT); // cryptage du password + + //On crée le mail + $headers = 'MIME-Version: 1.0' . "\r\n"; + $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; + $headers .= 'From: '.SITENAME.' <'.SITEMAIL.'>'."\r\n"; + //$headers .= '\r\n'; + + $objet = 'Votre nouveau mot de passe sur '.SITEURL; + + $message = "Bonjour,
\n"; + $message .= "Vous avez demandé un nouveau mot de passe pour votre compte sur " . SITEURL . ".
\n"; + $message .= "Votre nouveau mot de passe est : " . $new_password . "
\n\n"; + $message .= "Cordialement,
\n\n"; + $message .= "L'equipe de " . SITENAME; + + if(!mail($row1['email'], $objet, $message, $headers)) { + $error[] = "Problème lors de l'envoi du mail."; + } + + else { + //mise à jour de la base de données de l'utilisateur + $stmt = $db->prepare('UPDATE blog_members SET password = :password WHERE email = :email') ; + $stmt->execute(array( + ':password' => $hashedpassword, + ':email' => $email + )); + + $cok = "Un mail contenant votre nouveau mot de passe vous a été envoyé.
Veuillez le consulter avant de vous reconnecter sur " . SITEURL.'.'; + } + + } + +} + +$pagetitle = 'Demande de nouveau mot de passe'; +require('../includes/header.php'); +?> + +
+ + + +
+
+

Vous avez oublié votre mot de passe ?

+ + + +
+ + Vous allez faire une demande de nouveau mot de passe.
+ Ce nouveau mot de passe vous sera envoyé par e-mail.
+ Une fois connecté avec vos identifiants, vous pourrez éventuellement redéfinir un mot de passe à partir de votre page profil.
+
Veuillez donc entrer ci-dessous l'adresse e-mail correspondant à votre compte : +
+ +

+ Entrez l'adresse e-mail de votre compte : +

+ +

+ +

+
+ + + ERREUR : '.$error.'

'; + } + } + elseif (isset($cok)) { + echo '

' . $cok . '

'; + } + ?> + +
+ + + +
+
+
+ + + + + diff --git a/Html/admin/signup.php b/Html/admin/signup.php new file mode 100644 index 0000000..b25ec12 --- /dev/null +++ b/Html/admin/signup.php @@ -0,0 +1,233 @@ +is_logged_in()) { + header('Location: ../index.php'); +} + +//titre de la page +$pagetitle= 'Créer un compte'; +include_once('../includes/header.php'); +?> + + +
+ + + +
+
+ +

Créer un compte

+ +
+

+ Vous allez créer un compte sur ...
+ Le fait de devenir membre vous fera bénéficier de plusieurs avantages :
+ - uploader des torrents,
+ - disposer d'un espace membre,
+ - disposer de statistiques personnelles.
+ Merci de choisir un pseudo, un mot de passe et une adresse e-mail. Vous recevrez un e-mail de notre part avec un lien qui vous permettra d'activer votre nouveau compte.
+ (Eventuellement, merci de vérifier votre répertoire Spam) +

+
+ + prepare('SELECT email FROM blog_members WHERE email = :email'); + $stmt->bindValue(':email',$postemail,PDO::PARAM_STR); + $stmt->execute(); + $res = $stmt->fetch(); + + if ($res) { + $error[] = 'Cette adresse e-mail est déjà utilisée !'; + } + } + + //Vérification simple de la validité de l'e-mail + if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { + $error[] = 'Cette adresse e-mail n\'est pas valide !'; + } + + // Le username ne peut pas contenir de caractères spéciaux, balises, etc. + $postusername = $_POST['username']; + if (!preg_match("/^[a-zA-Z0-9]+$/",$postusername)) { + $error[] = 'Le pseudo ne peut contenir que des lettres et des chiffres !'; + } + + // On cherche si le pseudo fait moins de 4 caractères et s'il est déjà dans la base + if (strlen($_POST['username']) < 4) { + $error[] = 'Le pseudo est trop court ! (4 caractères minimum)'; + } + + else { + $stmt = $db->prepare('SELECT username FROM blog_members WHERE username = :username'); + $stmt->bindValue(':username',$postusername,PDO::PARAM_STR); + $stmt->execute(); + $row = $stmt->fetch(); + + if (!empty($row['username'])) { + $error[] = 'Ce pseudo est déjà utilisé ! Merci d\'en choisir un autre.'; + } + } + + $verif_box = $_REQUEST["captcha"]; + + // on vérifie le captcha + if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']) { + + if(!isset($error)){ + $hashedpassword = $user->password_hash($_POST['password'], PASSWORD_BCRYPT); + $pid = md5(uniqid(rand(),true)); + $activation = md5(uniqid(rand(),true)); + + // Remove all illegal characters from an email address + $email = filter_var($email, FILTER_SANITIZE_EMAIL); + + try { + //On insert les données dans la table blog_members + $result1 = $db->prepare('INSERT INTO blog_members (username,password,email,pid,memberDate,active) VALUES (:username,:password,:email,:pid,:memberDate,:active)') ; + $result1->execute(array( + ':username' => $username, + ':password' => $hashedpassword, + ':email' => $email, + ':pid' => $pid, + ':memberDate' => date('Y-m-d H:i:s'), + ':active' => $activation + )); + + $newuid = $db->lastInsertId(); + + //On insert aussi le PID et l'ID du membre dans la table xbt_users + $result2 = $db->prepare('INSERT INTO xbt_users (uid, torrent_pass) VALUES (:uid, :torrent_pass)'); + $result2->execute(array( + ':uid' => $newuid, + ':torrent_pass' => $pid + )); + + if(!$result1 || !$result2) + { + $error[] = 'Erreur : votre compte utilisateur n\'a pas pu être créé.'; + } + + else { + // si tout OK, on envoie le mail de confirmation de compte + $newuid = $db->lastInsertId(); + $to = $email; + $subject = "Confirmation d'enregistrement de compte"; + $body = "

Merci de vous êtes enregistré(e) sur ".SITENAMELONG.".

+

Pour activer votre compte, veuillez cliquer sur le lien suivant: ".SITEURL."/activate.php?x=$newuid&y=$activation

+

Cordialement,
Le webmaster de ".SITENAMELONG."

"; + + $mail = new Mail(); + $mail->setFrom(SITEMAIL); + $mail->addAddress($to); + $mail->subject($subject); + $mail->body($body); + $mail->send(); + + //redirect to index page + header('Location: ../membres.php?action=activation'); + exit; + } + + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } // captcha + + else { + $error[] = 'Mauvais code anti-spam ! Veuillez recopier le bon code.'; + } + + } + + //check for any errors + if(isset($error)){ + foreach($error as $error){ + echo '
Erreur !'.$error.'
'; + } + } + ?> + +
+ +


+ '>

+ +

(6 caractères minimum)
+ '>
+ + + + +

+ +


+ '>

+ +


+ '>

+ +


+  captcha +

+ +

+ +
+
+ + + +
+
+
+ + + + + diff --git a/Html/admin/upload.php b/Html/admin/upload.php new file mode 100644 index 0000000..a967bcc --- /dev/null +++ b/Html/admin/upload.php @@ -0,0 +1,373 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php?action=connecte'); +} + +// titre de la page +$pagetitle= 'Ajouter un torrent'; +include_once('../includes/header.php'); +?> + + +
+ + + +
+
+ + 0) { + $error[] = "Erreur lors du transfert"; + } + + // taille de l'image + if ($_FILES['imagetorrent']['size'] > MAX_FILE_SIZE) { + $error[] = "L'image est trop grosse."; + } + + //$extensions_valides = array( 'jpg' , 'png' ); + //1. strrchr renvoie l'extension avec le point (« . »). + //2. substr(chaine,1) ignore le premier caractère de chaine. + //3. strtolower met l'extension en minuscules. + $extension_upload = strtolower( substr( strrchr($_FILES['imagetorrent']['name'], '.') ,1) ); + + if(!in_array($extension_upload,$EXTENSIONS_VALIDES)) { + $error[] = "Extension d'image incorrecte (.png ou .jpg seulement !)"; + } + + $image_sizes = getimagesize($_FILES['imagetorrent']['tmp_name']); + if ($image_sizes[0] > $WIDTH_MAX OR $image_sizes[1] > $HEIGHT_MAX) { + $error[] = "Image trop grande (dimensions)"; + } + + // on upload l'image + if(!move_uploaded_file($_FILES['imagetorrent']['tmp_name'], $REP_IMAGES_TORRENTS.$_FILES['imagetorrent']['name'])) { + $error[] = 'Problème de téléchargement de l\'image.'; + } + + // *************************************** + // fin image torrent upload + // *************************************** + + + // *************************************** + // upload fichier torrent + // *************************************** + + // si il y a bien un fichier .torrent, on poursuit ... + if (!isset($_FILES["torrent"]) && empty($torrent)) { + $error[] = 'Veuillez choisir un fichier .torrent'; + } + + else { + //Collecte des données ... + extract($_POST); + + $type_file = $_FILES['torrent']['type']; + $tmp_file = $_FILES['torrent']['tmp_name']; + $name_file = $_FILES['torrent']['name']; + + + $fd = fopen($_FILES["torrent"]["tmp_name"], "rb"); + + $length=filesize($_FILES["torrent"]["tmp_name"]); + if ($length) { + $alltorrent = fread($fd, $length); + } + + $array = BDecode($alltorrent); + + $hash = sha1(BEncode($array["info"])); + + fclose($fd); + + if (isset($array["info"]) && $array["info"]) { + $upfile=$array["info"]; + } + else { + $upfile = 0; + } + + if (isset($upfile["length"])) { + $size = (float)($upfile["length"]); + } + else if (isset($upfile["files"])) { + // multifiles torrent + $size=0; + foreach ($upfile["files"] as $file) { + $size+=(float)($file["length"]); + } + } + else { + $size = "0"; + } + + $announce=trim($array["announce"]); + + + // on vérifie si le torrent existe dja : on compare les champs info_hash + //$stmt = $db->query("SELECT * FROM xbt_files WHERE LOWER(hex('info_hash')) = '".$hash."'"); + $stmt = $db->query("SELECT * FROM xbt_files WHERE info_hash = 0x$hash"); + $exists = $stmt->fetch(); + if(!empty($exists)) { + $error[] = "Ce torrent existe dans la base."; + } + + // On vérifie que l'url d'announce n'est pas vide + //if(empty($array['announce'])) { + // $error[] = 'L\'url d\'announce est vide !'; + //} + + + // on vérifie l'url d'announce + if($array['announce'] != $ANNOUNCEURL) { + $error[] = 'Vous n\'avez pas fournit la bonne adresse d\'announce dans votre torrent : l\'url d\'announce doit etre '.$ANNOUNCEURL; + } + + // si le nom du torrent n'a pas été fournit (facultatif), on récupère le nom public du fichier + if (empty($_POST['postTitle'])) + { + // on calcule le nom du fichier SANS .torrent a la fin + $file = $_FILES['torrent']['name']; + $var = explode(".",$file); + $nb = count($var)-1; + $postTitle = substr($file, 0, strlen($file)-strlen($var[$nb])-1); + } + else + { + // sinon on prend le nom fournit dans le formulaire d'upload + $postTitle = $_POST['postTitle']; + } + + // on vérifie la taille du fichier .torrent + if ($_FILES['torrent']['size'] > $MAX_FILE_SIZE){ + $error[] = 'Le fichier .torrent est trop gros. Etes-vous certain qu\'il s\'agisse d\'un fichier .torrent ?'; + } + + /* + if(!strstr($type_file, 'torrent')){ + $error[] = 'Le fichier n\'est pas un fichier .torrent !'; + } + */ + + /* + if($postTitle ==''){ + $error[] = 'Veuillez entrer un titre.'; + } + */ + + if($postLink ==''){ + $error[] = 'Veuillez entrer un lien web pour le média proposé.'; + } + + if($postDesc ==''){ + $error[] = 'Veuillez entrer une courte description.'; + } + + if($postCont ==''){ + $error[] = 'Veuillez entrer un contenu.'; + } + + if($catID ==''){ + $error[] = 'Veuillez choisir une catégorie.'; + } + + if($licenceID ==''){ + $error[] = 'Veuillez choisir une licence.'; + } + + }// fin if (isset($_FILES["torrent"])) + + + + // s'il n'y a pas d'erreur on y va !!! + if(!isset($error)) { + + // on upload le fichier .torrent + if(!move_uploaded_file($_FILES['torrent']['tmp_name'], $REP_TORRENTS.$_FILES['torrent']['name'])) { + $error[] = 'Problème lors de l\'upload du fichier .torrent'; + } + +// *************************************** +// fin upload fichier torrent +// *************************************** + try { + + $postSlug = slug($postTitle); + $postAuthor = html($_SESSION['username']); + + //On insert les données dans la table blog_posts_seo + $stmt = $db->prepare('INSERT INTO blog_posts_seo (postHash,postTitle,postAuthor,postSlug,postLink,postDesc,postCont,postTaille,postDate,postTorrent,postImage) VALUES (:postHash, :postTitle, :postAuthor, :postSlug, :postLink, :postDesc, :postCont, :postTaille, :postDate, :postTorrent, :postImage)') ; + $stmt->execute(array( + ':postHash' => $hash, + ':postTitle' => $postTitle, + ':postAuthor' => $postAuthor, + ':postSlug' => $postSlug, + ':postLink' => $postLink, + ':postDesc' => $postDesc, + ':postCont' => $postCont, + ':postTaille' => $size, + ':postDate' => date('Y-m-d H:i:s'), + ':postTorrent' => $name_file, + ':postImage' => $image_torrent + )); + + $postID = $db->lastInsertId(); + + write_log('Upload torrent : '.$postTitle.' par '.$postAuthor, $db); + + //On insert les données dans la table xbt_files également + $stmt2 = $db->query("INSERT INTO xbt_files SET info_hash=0x$hash, ctime=UNIX_TIMESTAMP() ON DUPLICATE KEY UPDATE flags=0"); + + //On ajoute les données dans la table categories + if(is_array($catID)){ + foreach($_POST['catID'] as $catID){ + $stmt = $db->prepare('INSERT INTO blog_post_cats (postID,catID)VALUES(:postID,:catID)'); + $stmt->execute(array( + ':postID' => $postID, + ':catID' => $catID + )); + } + } + + //On ajoute les données dans la table licences + if(is_array($licenceID)){ + foreach($_POST['licenceID'] as $licenceID){ + $stmt = $db->prepare('INSERT INTO blog_post_licences (postID_BPL,licenceID_BPL)VALUES(:postID_BPL,:licenceID_BPL)'); + $stmt->execute(array( + ':postID_BPL' => $postID, + ':licenceID_BPL' => $licenceID + )); + } + } + + //On redirige vers la page torrents pour tout ajout de torrent + header('Location: '.SITEURL.'/torrents.php?action=ajoute'); + exit; + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } + + //S'il y a des erreurs, on les affiche + if(isset($error)){ + foreach($error as $error){ + echo '
ERREUR : '.$error.'
'; + } + } + ?> + + + +

Ajouter un torrent

+

URL d'annonce :

+ +
+ +
+ +
+ Fichier .torrent + + +
+ +
+ +
+ Titre (facultatif) + +
+ +
+ +
+ Lien web du projet, de l'oeuvre, ... + +
+ +


+

+ +


+

+ +
+ Icone d'illustration (page accueil et article) + PNG ou JPG seulement | max. | max. px X px
+ +
+ +
+ +
+ Catégories + + query('SELECT catID, catTitle FROM blog_cats ORDER BY catTitle'); + while($row2 = $stmt2->fetch()){ + echo ' '.$row2['catTitle'].'
'; + } + ?> + +
+ +
+
+ Licences + + query('SELECT licenceID, licenceTitle FROM blog_licences ORDER BY licenceTitle'); + while($row3 = $stmt3->fetch()){ + echo ' '.$row3['licenceTitle'].'
'; + } + + ?> + +
+ +

+ +
+ + + +
+ + + +
+
+
+ + + + + diff --git a/Html/admin/upload.php.DIST b/Html/admin/upload.php.DIST new file mode 100644 index 0000000..5c02983 --- /dev/null +++ b/Html/admin/upload.php.DIST @@ -0,0 +1,372 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php'); +} + +// titre de la page +$pagetitle= 'Ajouter un torrent'; +include_once '../includes/header.php'; +?> + + +
+ + + +
+
+ + 0) { + $error[] = "Erreur lors du transfert"; + } + + // taille de l'image + if ($_FILES['imagetorrent']['size'] > MAX_SIZE) { + $error = "L'image est trop grosse."; + } + + $extensions_valides = array( 'jpg' , 'png' ); + //1. strrchr renvoie l'extension avec le point (« . »). + //2. substr(chaine,1) ignore le premier caractère de chaine. + //3. strtolower met l'extension en minuscules. + $extension_upload = strtolower( substr( strrchr($_FILES['imagetorrent']['name'], '.') ,1) ); + + if(!in_array($extension_upload,$extensions_valides)) { + $error[] = "Extension d'image incorrecte (.png ou .jpg seulement !)"; + } + + $image_sizes = getimagesize($_FILES['imagetorrent']['tmp_name']); + if ($image_sizes[0] > WIDTH_MAX OR $image_sizes[1] > HEIGHT_MAX) { + $error = "Image trop grande (dimensions)"; + } + + // on upload l'image + if(!move_uploaded_file($_FILES['imagetorrent']['tmp_name'], $REP_IMAGES_TORRENTS.$_FILES['imagetorrent']['name'])) { + $error[] = 'Problème de téléchargement de l\'image.'; + } + + // *************************************** + // fin image torrent upload + // *************************************** + + + // *************************************** + // upload fichier torrent + // *************************************** + + // si il y a bien un fichier .torrent, on poursuit ... + if (!isset($_FILES["torrent"]) && empty($torrent)) { + $error[] = 'Veuillez choisir un fichier .torrent'; + } + + else { + //Collecte des données ... + extract($_POST); + + $type_file = $_FILES['torrent']['type']; + $tmp_file = $_FILES['torrent']['tmp_name']; + $name_file = $_FILES['torrent']['name']; + + + $fd = fopen($_FILES["torrent"]["tmp_name"], "rb"); + + $length=filesize($_FILES["torrent"]["tmp_name"]); + if ($length) { + $alltorrent = fread($fd, $length); + } + + $array = BDecode($alltorrent); + + $hash = sha1(BEncode($array["info"])); + + fclose($fd); + + if (isset($array["info"]) && $array["info"]) { + $upfile=$array["info"]; + } + else { + $upfile = 0; + } + + if (isset($upfile["length"])) { + $size = (float)($upfile["length"]); + } + else if (isset($upfile["files"])) { + // multifiles torrent + $size=0; + foreach ($upfile["files"] as $file) { + $size+=(float)($file["length"]); + } + } + else { + $size = "0"; + } + + $announce=trim($array["announce"]); + + + // on vérifie si le torrent existe dja : on compare les champs info_hash + //$stmt = $db->query("SELECT * FROM xbt_files WHERE LOWER(hex('info_hash')) = '".$hash."'"); + $stmt = $db->query("SELECT * FROM xbt_files WHERE info_hash = 0x$hash"); + $exists = $stmt->fetch(); + if(!empty($exists)) { + $error[] = "Ce torrent existe dans la base."; + } + + // On vérifie que l'url d'announce n'est pas vide + //if(empty($array['announce'])) { + // $error[] = 'L\'url d\'announce est vide !'; + //} + + + // on vérifie l'url d'announce + if($array['announce'] != $ANNOUNCEURL) { + $error[] = 'Vous n\'avez pas fournit la bonne adresse d\'announce dans votre torrent : l\'url d\'announce doit etre '.$ANNOUNCEURL; + } + + // si le nom du torrent n'a pas été fournit (facultatif), on récupère le nom public du fichier + if (empty($_POST['postTitle'])) + { + // on calcule le nom du fichier SANS .torrent a la fin + $file = $_FILES['torrent']['name']; + $var = explode(".",$file); + $nb = count($var)-1; + $postTitle = substr($file, 0, strlen($file)-strlen($var[$nb])-1); + } + else + { + // sinon on prend le nom fournit dans le formulaire d'upload + $postTitle = $_POST['postTitle']; + } + + // on vérifie la taille du fichier .torrent + if ($_FILES['torrent']['size'] > $MAX_FILE_SIZE){ + $error[] = 'Le fichier .torrent est trop gros. Etes-vous certain qu\'il s\'agisse d\'un fichier .torrent ?'; + } + + /* + if(!strstr($type_file, 'torrent')){ + $error[] = 'Le fichier n\'est pas un fichier .torrent !'; + } + */ + + /* + if($postTitle ==''){ + $error[] = 'Veuillez entrer un titre.'; + } + */ + + if($postLink ==''){ + $error[] = 'Veuillez entrer un lien web pour le média proposé.'; + } + + if($postDesc ==''){ + $error[] = 'Veuillez entrer une courte description.'; + } + + if($postCont ==''){ + $error[] = 'Veuillez entrer un contenu.'; + } + + if($catID ==''){ + $error[] = 'Veuillez choisir une catégorie.'; + } + + if($licenceID ==''){ + $error[] = 'Veuillez choisir une licence.'; + } + + }// fin if (isset($_FILES["torrent"])) + + + + // s'il n'y a pas d'erreur on y va !!! + if(!isset($error)) { + + // on upload le fichier .torrent + if(!move_uploaded_file($_FILES['torrent']['tmp_name'], $REP_TORRENTS.$_FILES['torrent']['name'])) { + $error[] = 'Problème lors de l\'upload du fichier .torrent'; + } + +// *************************************** +// fin upload fichier torrent +// *************************************** + try { + + $postSlug = slug($postTitle); + $postAuthor = $_SESSION['username']; + + //On insert les données dans la table blog_posts_seo + $stmt = $db->prepare('INSERT INTO blog_posts_seo (postTitle,postAuthor,postSlug,postLink,postDesc,postCont,postTaille,postDate,postTorrent,postImage) VALUES (:postTitle, :postAuthor, :postSlug, :postLink, :postDesc, :postCont, :postTaille, :postDate, :postTorrent, :postImage)') ; + $stmt->execute(array( + ':postTitle' => $postTitle, + ':postAuthor' => $postAuthor, + ':postSlug' => $postSlug, + ':postLink' => $postLink, + ':postDesc' => $postDesc, + ':postCont' => $postCont, + ':postTaille' => $size, + ':postDate' => date('Y-m-d H:i:s'), + ':postTorrent' => $name_file, + ':postImage' => $image_torrent + )); + + $postID = $db->lastInsertId(); + + //On insert les données dans la table xbt_files également + $stmt2 = $db->query("INSERT INTO xbt_files SET info_hash=0x$hash, ctime=UNIX_TIMESTAMP() ON DUPLICATE KEY UPDATE flags=0"); + //$stmt2 = $db->query("INSERT INTO xbt_files (info_hash,mtime,ctime) VALUES(X'".$info['info_hash']."',UNIX_TIMESTAMP(),UNIX_TIMESTAMP())"); + + //On ajoute les données dans la table categories + if(is_array($catID)){ + foreach($_POST['catID'] as $catID){ + $stmt = $db->prepare('INSERT INTO blog_post_cats (postID,catID)VALUES(:postID,:catID)'); + $stmt->execute(array( + ':postID' => $postID, + ':catID' => $catID + )); + } + } + + + //On ajoute les données dans la table licences + if(is_array($licenceID)){ + foreach($_POST['licenceID'] as $licenceID){ + $stmt = $db->prepare('INSERT INTO blog_post_licences (postID_BPL,licenceID_BPL)VALUES(:postID_BPL,:licenceID_BPL)'); + $stmt->execute(array( + ':postID_BPL' => $postID, + ':licenceID_BPL' => $licenceID + )); + } + } + + //On redirige vers la page torrents = action = ok + header('Location: '.SITEURL.'/torrents.php?action=ok'); + exit; + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + } + + } + + //S'il y a des erreurs, on les affiche + if(isset($error)){ + foreach($error as $error){ + echo '
ERREUR : '.$error.'
'; + } + } + ?> + + + +

Ajouter un torrent

+

URL d'annonce :

+ +
+ +
+ +
+ Fichier .torrent + + +
+ +
+ +
+ Titre (facultatif) + '> +
+ +
+ +
+ Lien web du projet, de l'oeuvre, ... + '> +
+ +


+

+ +


+

+ +
+ Icone d'illustration (page accueil et article) + PNG ou JPG seulement | max. | max. px X px
+ +
+ +
+ +
+ Catégories + + query('SELECT catID, catTitle FROM blog_cats ORDER BY catTitle'); + while($row2 = $stmt2->fetch()){ + echo " ".$row2['catTitle']."
"; + } + ?> + +
+ +
+
+ Licences + + query('SELECT licenceID, licenceTitle FROM blog_licences ORDER BY licenceTitle'); + while($row3 = $stmt3->fetch()){ + echo " ".$row3['licenceTitle']."
"; + } + + ?> + +
+ +

+ +
+ + + +
+ + + +
+
+
+ + + + + diff --git a/Html/admin/users.php b/Html/admin/users.php new file mode 100644 index 0000000..9e12cd9 --- /dev/null +++ b/Html/admin/users.php @@ -0,0 +1,170 @@ + retour sur la page login +if(!$user->is_logged_in()) { + header('Location: login.php'); +} + +if(isset($_SESSION['userid'])) { + if($_SESSION['userid'] != 1) { + header('Location: '.SITEURL); + } +} + +//show message from add / edit page +if(isset($_GET['deluser'])){ + + //if user id is 1 ignore + if($_GET['deluser'] !='1'){ + + // On supprime l'avatar du membre + $stmt = $db->prepare('SELECT avatar FROM blog_members WHERE memberID = :memberID'); + $stmt->execute(array(':memberID' => (int) $_GET['deluser'])); + $sup = $stmt->fetch(); + $file = $REP_IMAGES_AVATARS.$sup['avatar']; + if (!empty($sup['avatar'])) { + unlink($file); + } + + // on supprime le membre + $stmt = $db->prepare('DELETE FROM blog_members WHERE memberID = :memberID') ; + $stmt->execute(array(':memberID' => (int) $_GET['deluser'])); + + // on supprime les données torrent du membre + $stmt1 = $db->prepare('DELETE FROM xbt_users WHERE uid = :uid') ; + $stmt1->execute(array(':uid' => (int) $_GET['deluser'])); + + // on supprime les commentaires du membre + //$delname = html($_GET['delname']); + //$stmt2 = $db->prepare('DELETE FROM blog_posts_comments WHERE cuser = :cuser') ; + //$stmt2->execute(array(':cuser' => $delname)); + + header('Location: users.php?action=supprime'); + exit; + + } +} + +// titre de la page +$pagetitle= 'Admin : gestion des membres'; +include_once '../includes/header.php'; + +?> + + + +
+ + + + +
+
+ + + + Le membre a été supprimé avec succès.'; + } + if(isset($_GET['action']) && $_GET['action'] == 'ajoute'){ + echo '

Le membre a été ajouté avec succès.

'; + } + ?> + + + + + + + + + + + + query('SELECT memberID FROM blog_members'); + + //pass number of records to + $pages->set_total($stmt->rowCount()); + + $stmt = $db->query('SELECT memberID,username,pid,email,memberDate,active FROM blog_members ORDER BY memberID DESC '.$pages->get_limit()); + while($row = $stmt->fetch()){ + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + sscanf($row['memberDate'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde); + echo ''; + ?> + + '; + if($row['active'] == 'yes') { + echo 'oui'; + } + elseif($row['active'] != 'yes' || $row['active'] == 'no') { + echo 'non'; + } + echo ''; + ?> + + + + '; + + } + + } catch(PDOException $e) { + echo $e->getMessage(); + } + ?> +
IDPseudoPIDEmailInscriptionValidéAction
'.html($row['memberID']).''.html($row['username']).''.html($row['pid']).''.html($row['email']).''.$jour.'-'.$mois.'-'.$annee.' + + + + | + + +
+ +
+ + page_links(); + ?> + +

+ +

+
+ + + +
+
+
+ + + + + diff --git a/Html/apropos.php b/Html/apropos.php new file mode 100644 index 0000000..a0400bd --- /dev/null +++ b/Html/apropos.php @@ -0,0 +1,100 @@ + + + +
+ + + +
+
+ + + + +
+ +

Mentions légales

+
+
+
+Mail :

+ +Hébergement :
+OVH - Kimsufi - Serveur dédié 100 Mb/s

+ +

A propos et Présentation :

+ rassemble des OS libres (Systèmes d'exploitation) et tous projets libres et les propose au téléchargement par l'intermédiaire du protocole Bittorrent.
+Il est complémentaire des projets officiels qui possèdent déjà leurs services Bittorrent (distributions Gnu/Linux, projets divers, ...) et s'adresse tout particulièrement aux projets plus modestes qui recherchent un moyen simple de partager librement leurs travaux.
+
+

Un peu d'aide ?

+Si vous vous sentez l'âme d'un codeur php, et si vous deviez décider de consacrer un peu de temps à , cela serait avec joie. Le code a certainement besoin d'être afiné, "nettoyé", sécurisé. N'hésitez pas à m'envoyer un petit mot par l'intermédiaire du formulaire de contact. + +

Conditions d'Utilisation :

+ propose des médias sous licence libre ou licence de libre diffusion EXCLUSIVEMENT. +Tout autre matériel sous une quelconque licence restrictive, commerciale ou propriétaire n'est pas admis sur .
+Tout média "cracké" ou "piraté" (warez, etc.) est strictement interdit sur et sera irrémédiablement et immédiatement effacé.
+Le compte de l'utilisateur responsable de l'upload de torrents interdits sera supprimé et son adresse IP transmise aux ayant-droits.
+En tant qu'utilisateur ou membre inscrit, la "personne" accepte les conditions générales d'utilisation.
+ +

Download / Upload (Proposer des fichiers)

+Pour uploader (proposer) des torrents, le visiteur doit devenir membre (inscription) en créant un compte.
+ se réserve le droit de supprimer ou de modifier tout fichier envoyé et mis en partage sur son serveur et ne pourra être tenu responsable des écrits, prises de positions, convictions ou partis-pris exposés ou suggérés dans les fichiers proposés au téléchargement. +
+ n'est ainsi pas responsable des fichiers proposés par ses membres. +
+ s'engage néanmoins à faire tout ce qui est en son pouvoir pour lutter contre la diffusion de fichiers illégaux et/ou immoraux. Dans les cas les plus graves d'atteinte à la personne humaine notamment, jouera pleinement son rôle citoyen et responsable en avertissant les autorités compétentes. +
+En tant qu'utilisateur de , vous vous engagez à respecter la loi en général, et la loi sur les droits d'auteur en particulier. +
+Vous pourrez, à tout moment, avertir le webmaster de de la présence de fichiers suspects ou illégaux sur le site en faisant un simple signalement par l'intermédiaire de la page de contact. +
Ainsi, n'incite pas à la délation péjorative mais souhaite de manière communautaire participer à la promotion du "Libre" et se protéger au niveau de la loi.
+ +

Informatique et libertés

+Informations personnelles collectées
+En France, les données personnelles sont notamment protégées par la loi n 78-87 du 6 janvier 1978, la loi n 2004-801 du 6 août 2004, l'article L. 226-13 du Code pénal et la Directive Européenne du 24 octobre 1995.
+En tout état de cause, ne collecte des informations personnelles relatives à l'utilisateur (nom, adresse électronique, coordonnées ....) que pour le besoin des services proposés par le site web de , notamment pour l'inscription à des événements par le biais de formulaires en ligne. L'utilisateur fournit ces informations en toute connaissance de cause, notamment lorsqu'il procède par lui-même à leur saisie. Il est alors précisé à l'utilisateur le caractère obligatoire ou non des informations qu'il serait amené à fournir.
+Aucune information personnelle de l'utilisateur du site de n'est collectée à l'insu de l'utilisateur, publiée à l'insu de l'utilisateur, échangée, transférée, cédée ou vendue sur un support quelconque à des tiers. +
+ +

Rectification des informations nominatives collectées

+Conformément aux dispositions de l'article 34 de la loi n 48-87 du 6 janvier 1978, l'utilisateur dispose d'un droit de modification des données nominatives collectées le concernant.
+Pour ce faire, l'utilisateur envoie à un courrier électronique en utilisant le formulaire de contact en indiquant son nom ou sa raison sociale, ses coordonnées physiques et/ou électroniques, ainsi que le cas échéant la référence dont il disposerait en tant qu'utilisateur du site de . La modification interviendra dans des délais raisonnables à compter de la réception de la demande de l'utilisateur. +
+ +

Limitation de responsabilité

+ peut comporter des informations mises à disposition par des sociétés externes ou des liens hypertextes vers d'autres sites qui n'ont pas été développés par . Le contenu mis à disposition sur le site est fourni à titre informatif. L'existence d'un lien de ce site vers un autre site ne constitue pas une validation de ce site ou de son contenu. Il appartient à l'internaute d'utiliser ces informations avec discernement et esprit critique. La responsabilité de ne saurait être engagée du fait des informations, opinions et recommandations formulées par des tiers. +

+
+ +
+ + + +
+
+
+ + + + + diff --git a/Html/archives.php b/Html/archives.php new file mode 100644 index 0000000..0347087 --- /dev/null +++ b/Html/archives.php @@ -0,0 +1,96 @@ + + +
+ + + +
+
+ + + +
+ + prepare('SELECT postID FROM blog_posts_seo WHERE postDate >= :from AND postDate <= :to'); + $stmt->execute(array( + ':from' => $from, + ':to' => $to + )); + + //pass number of records to + $pages->set_total($stmt->rowCount()); + + $stmt = $db->prepare('SELECT postID, postTitle, postSlug, postAuthor, postDesc, postDate FROM blog_posts_seo WHERE postDate >= :from AND postDate <= :to ORDER BY postID DESC '.$pages->get_limit()); + $stmt->execute(array( + ':from' => $from, + ':to' => $to + )); + + echo '

Archives : '.$month.'-'.$year.'


'; + + while($row = $stmt->fetch()){ + echo '
'; + echo ''.html($row['postTitle']).''; + echo '
Posté le '.date_fr('l j F Y à H:i:s', strtotime(html($row['postDate']))).' par '; + echo html($row['postAuthor']).' dans '; + + $stmt2 = $db->prepare('SELECT catTitle, catSlug FROM blog_cats, blog_post_cats WHERE blog_cats.catID = blog_post_cats.catID AND blog_post_cats.postID = :postID'); + $stmt2->bindValue(':postID', $row['postID'], PDO::PARAM_INT); + $stmt2->execute(); + $catRow = $stmt2->fetchAll(PDO::FETCH_ASSOC); + + $links = array(); + foreach ($catRow as $cat) + { + $links[] = "".html($cat['catTitle']).""; + } + echo implode(", ", $links); + echo '
'; + } + echo '

'; + + echo $pages->page_links("a-$month-$year&"); + + } catch(PDOException $e) { + echo $e->getMessage(); + } + ?> +
+ + + +
+
+
+ + + + + diff --git a/Html/catpost.php b/Html/catpost.php new file mode 100644 index 0000000..3e5c8e3 --- /dev/null +++ b/Html/catpost.php @@ -0,0 +1,137 @@ +prepare('SELECT catID,catTitle FROM blog_cats WHERE catSlug = :catSlug'); +$stmt->bindValue(':catSlug', $_GET['id'], PDO::PARAM_INT); +$stmt->execute(); +$row = $stmt->fetch(); + + +if (!isset($row['catID']) || empty($row['catID'])) { + header('Location: ./'); + exit(); +} + +elseif (!filter_var($row['catID'], FILTER_VALIDATE_INT)) { + header('Location: ./'); + exit(); +} + + +$pagetitle = 'Catégorie : '.html($row['catTitle']); + +include_once('includes/header.php'); + +define("_BBC_PAGE_NAME", $pagetitle); +define("_BBCLONE_DIR", "bbclone/"); +define("COUNTER", _BBCLONE_DIR."mark_page.php"); +if (is_readable(COUNTER)) include_once(COUNTER); +?> + + +
+ + + +
+
+ + + +
+ +

+ + + prepare('SELECT blog_posts_seo.postID FROM blog_posts_seo, blog_post_cats WHERE blog_posts_seo.postID = blog_post_cats.postID AND blog_post_cats.catID = :catID'); + $stmt->bindValue(':catID', $row['catID'], PDO::PARAM_INT); + $stmt->execute(); + + $count = $stmt->rowCount(); + + if (empty($count)) { + echo '

Aucun torrent dans cette catégorie.

'; + } + + + //pass number of records to + $pages->set_total($stmt->rowCount()); + + $stmt = $db->prepare(' + SELECT + blog_posts_seo.postID, blog_posts_seo.postHash, blog_posts_seo.postTitle, blog_posts_seo.postAuthor, blog_posts_seo.postSlug, blog_posts_seo.postLink, blog_posts_seo.postDesc, blog_posts_seo.postTaille, blog_posts_seo.postDate, blog_posts_seo.postViews, blog_posts_seo.postImage + FROM + blog_posts_seo, + blog_post_cats + WHERE + blog_posts_seo.postID = blog_post_cats.postID + AND blog_post_cats.catID = :catID + ORDER BY + postID DESC + '.$pages->get_limit()); + $stmt->bindValue(':catID', $row['catID'], PDO::PARAM_INT); + $stmt->execute(); + + while($row = $stmt->fetch()){ + + echo '
'; + echo ''.html($row['postTitle']).''; + echo '
Posté le '.date_fr('l j F Y à H:i:s', strtotime($row['postDate'])).' par '; + + $stmt2 = $db->prepare('SELECT catTitle, catSlug FROM blog_cats, blog_post_cats WHERE blog_cats.catID = blog_post_cats.catID AND blog_post_cats.postID = :postID'); + $stmt2->bindValue(':postID', $row['postID'], PDO::PARAM_INT); + $stmt2->execute(); + $catRow = $stmt2->fetchAll(PDO::FETCH_ASSOC); + + echo html($row['postAuthor']).' dans '; + + $links = array(); + foreach ($catRow as $cat) + { + $links[] = "".html($cat['catTitle']).""; + } + echo implode(", ", $links); + + echo ''; + + echo '

'; + echo ''.$row['postTitle'].''; + echo bbcode($row['postDesc']); + echo '

'; + + echo '
'; + + } + + echo '

'; + echo $pages->page_links('c-'.html($_GET['id']).'&'); + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + ?> +
+ + + +
+
+
+ + + + + diff --git a/Html/classes/.htaccess b/Html/classes/.htaccess new file mode 100644 index 0000000..5a928f6 --- /dev/null +++ b/Html/classes/.htaccess @@ -0,0 +1 @@ +Options -Indexes diff --git a/Html/classes/class.paginator.php b/Html/classes/class.paginator.php new file mode 100644 index 0000000..109c241 --- /dev/null +++ b/Html/classes/class.paginator.php @@ -0,0 +1,198 @@ +_instance = $instance; + $this->_perPage = $perPage; + $this->set_instance(); + } + + /** + * get_start + * + * creates the starting point for limiting the dataset + * @return numeric + */ + private function get_start(){ + return ($this->_page * $this->_perPage) - $this->_perPage; + } + + /** + * set_instance + * + * sets the instance parameter, if numeric value is 0 then set to 1 + * + * @var numeric + */ + private function set_instance(){ + $this->_page = (int) (!isset($_GET[$this->_instance]) ? 1 : $_GET[$this->_instance]); + $this->_page = ($this->_page == 0 ? 1 : $this->_page); + } + + /** + * set_total + * + * collect a numberic value and assigns it to the totalRows + * + * @var numeric + */ + public function set_total($_totalRows){ + $this->_totalRows = $_totalRows; + } + + /** + * get_limit + * + * returns the limit for the data source, calling the get_start method and passing in the number of items perp page + * + * @return string + */ + public function get_limit(){ + return "LIMIT ".$this->get_start().",$this->_perPage"; + } + + /** + * page_links + * + * create the html links for navigating through the dataset + * + * @var sting $path optionally set the path for the link + * @var sting $ext optionally pass in extra parameters to the GET + * @return string returns the html menu + */ + public function page_links($path='?',$ext=null) + { + $adjacents = "2"; + $prev = $this->_page - 1; + $next = $this->_page + 1; + $lastpage = ceil($this->_totalRows/$this->_perPage); + $lpm1 = $lastpage - 1; + + $pagination = ""; + if($lastpage > 1) + { + $pagination .= "\n"; + } + + + return $pagination; + } +} diff --git a/Html/classes/class.password.php b/Html/classes/class.password.php new file mode 100644 index 0000000..e54b83a --- /dev/null +++ b/Html/classes/class.password.php @@ -0,0 +1,213 @@ + 31) { + trigger_error(sprintf("password_hash(): Invalid bcrypt cost parameter specified: %d", $cost), E_USER_WARNING); + return null; + } + } + // The length of salt to generate + $raw_salt_len = 16; + // The length required in the final serialization + $required_salt_len = 22; + $hash_format = sprintf("$2y$%02d$", $cost); + break; + default : + trigger_error(sprintf("password_hash(): Unknown password hashing algorithm: %s", $algo), E_USER_WARNING); + return null; + } + if (isset($options['salt'])) { + switch (gettype($options['salt'])) { + case 'NULL' : + case 'boolean' : + case 'integer' : + case 'double' : + case 'string' : + $salt = (string)$options['salt']; + break; + case 'object' : + if (method_exists($options['salt'], '__tostring')) { + $salt = (string)$options['salt']; + break; + } + case 'array' : + case 'resource' : + default : + trigger_error('password_hash(): Non-string salt parameter supplied', E_USER_WARNING); + return null; + } + if (strlen($salt) < $required_salt_len) { + trigger_error(sprintf("password_hash(): Provided salt is too short: %d expecting %d", strlen($salt), $required_salt_len), E_USER_WARNING); + return null; + } elseif (0 == preg_match('#^[a-zA-Z0-9./]+$#D', $salt)) { + $salt = str_replace('+', '.', base64_encode($salt)); + } + } else { + $buffer = ''; + $buffer_valid = false; + if (function_exists('mcrypt_create_iv') && !defined('PHALANGER')) { + $buffer = mcrypt_create_iv($raw_salt_len, MCRYPT_DEV_URANDOM); + if ($buffer) { + $buffer_valid = true; + } + } + if (!$buffer_valid && function_exists('openssl_random_pseudo_bytes')) { + $buffer = openssl_random_pseudo_bytes($raw_salt_len); + if ($buffer) { + $buffer_valid = true; + } + } + if (!$buffer_valid && is_readable('/dev/urandom')) { + $f = fopen('/dev/urandom', 'r'); + $read = strlen($buffer); + while ($read < $raw_salt_len) { + $buffer .= fread($f, $raw_salt_len - $read); + $read = strlen($buffer); + } + fclose($f); + if ($read >= $raw_salt_len) { + $buffer_valid = true; + } + } + if (!$buffer_valid || strlen($buffer) < $raw_salt_len) { + $bl = strlen($buffer); + for ($i = 0; $i < $raw_salt_len; $i++) { + if ($i < $bl) { + $buffer[$i] = $buffer[$i] ^ chr(mt_rand(0, 255)); + } else { + $buffer .= chr(mt_rand(0, 255)); + } + } + } + $salt = str_replace('+', '.', base64_encode($buffer)); + } + $salt = substr($salt, 0, $required_salt_len); + + $hash = $hash_format . $salt; + + $ret = crypt($password, $hash); + + if (!is_string($ret) || strlen($ret) <= 13) { + return false; + } + + return $ret; + } + + /** + * Get information about the password hash. Returns an array of the information + * that was used to generate the password hash. + * + * array( + * 'algo' => 1, + * 'algoName' => 'bcrypt', + * 'options' => array( + * 'cost' => 10, + * ), + * ) + * + * @param string $hash The password hash to extract info from + * + * @return array The array of information about the hash. + */ + function password_get_info($hash) { + $return = array('algo' => 0, 'algoName' => 'unknown', 'options' => array(), ); + if (substr($hash, 0, 4) == '$2y$' && strlen($hash) == 60) { + $return['algo'] = PASSWORD_BCRYPT; + $return['algoName'] = 'bcrypt'; + list($cost) = sscanf($hash, "$2y$%d$"); + $return['options']['cost'] = $cost; + } + return $return; + } + + /** + * Determine if the password hash needs to be rehashed according to the options provided + * + * If the answer is true, after validating the password using password_verify, rehash it. + * + * @param string $hash The hash to test + * @param int $algo The algorithm used for new password hashes + * @param array $options The options array passed to password_hash + * + * @return boolean True if the password needs to be rehashed. + */ + function password_needs_rehash($hash, $algo, array $options = array()) { + $info = password_get_info($hash); + if ($info['algo'] != $algo) { + return true; + } + switch ($algo) { + case PASSWORD_BCRYPT : + $cost = isset($options['cost']) ? $options['cost'] : 10; + if ($cost != $info['options']['cost']) { + return true; + } + break; + } + return false; + } + + /** + * Verify a password against a hash using a timing attack resistant approach + * + * @param string $password The password to verify + * @param string $hash The hash to verify against + * + * @return boolean If the password matches the hash + */ + public function password_verify($password, $hash) { + if (!function_exists('crypt')) { + trigger_error("Crypt must be loaded for password_verify to function", E_USER_WARNING); + return false; + } + $ret = crypt($password, $hash); + if (!is_string($ret) || strlen($ret) != strlen($hash) || strlen($ret) <= 13) { + return false; + } + + $status = 0; + for ($i = 0; $i < strlen($ret); $i++) { + $status |= (ord($ret[$i]) ^ ord($hash[$i])); + } + + return $status === 0; + } + + } \ No newline at end of file diff --git a/Html/classes/class.user.php b/Html/classes/class.user.php new file mode 100644 index 0000000..b0f5e57 --- /dev/null +++ b/Html/classes/class.user.php @@ -0,0 +1,68 @@ +_db = $db; + } + + public function is_logged_in(){ + if(isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true){ + return true; + } + } + + private function get_user_hash($username){ + + try { + + $stmt = $this->_db->prepare('SELECT password FROM blog_members WHERE username = :username'); + $stmt->execute(array('username' => $username)); + + $row = $stmt->fetch(); + return $row['password']; + + } catch(PDOException $e) { + echo '

'.$e->getMessage().'

'; + } + } + + + public function login($username,$password){ + + $hashed = $this->get_user_hash($username); + + try { + + $stmt = $this->_db->prepare('SELECT memberID,password,active FROM blog_members WHERE username = :username'); + $stmt->execute(array('username' => $username)); + $row = $stmt->fetch(); + + if($this->password_verify($password,$hashed) == 1 && $row['active'] == 'yes') { + $_SESSION['time'] = time(); + $_SESSION['loggedin'] = true; + $_SESSION['username'] = $username; + $_SESSION['userid'] = $row['memberID']; + + return true; + } + + } catch(PDOException $e) { + echo '

'.$e->getMessage().'

'; + } + } + + + public function logout(){ + session_destroy(); + } + +} + +?> diff --git a/Html/classes/phpmailer/exception.php b/Html/classes/phpmailer/exception.php new file mode 100644 index 0000000..9a4b846 --- /dev/null +++ b/Html/classes/phpmailer/exception.php @@ -0,0 +1,18 @@ +' . $this->getMessage() . "
\n"; + echo $errorMsg; + } +} diff --git a/Html/classes/phpmailer/mail.php b/Html/classes/phpmailer/mail.php new file mode 100644 index 0000000..4054203 --- /dev/null +++ b/Html/classes/phpmailer/mail.php @@ -0,0 +1,33 @@ +Subject = $subject; + } + + public function body($body) + { + $this->Body = $body; + } + + public function send() + { + $this->AltBody = strip_tags(stripslashes($this->Body))."\n\n"; + $this->AltBody = str_replace(" ", "\n\n", $this->AltBody); + return parent::send(); + } +} diff --git a/Html/classes/phpmailer/phpmailer.php b/Html/classes/phpmailer/phpmailer.php new file mode 100644 index 0000000..3b66d10 --- /dev/null +++ b/Html/classes/phpmailer/phpmailer.php @@ -0,0 +1,3403 @@ +' . $this->getMessage() . "
\n"; + echo $errorMsg; + } +} + +/** + * PHPMailer - PHP email creation and transport class. + * PHP Version 5 + * @package PHPMailer + * @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 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 - PHP email creation and transport class. + * @package PHPMailer + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + */ +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 + * @deprecated Email senders should never set a return-path header; + * it's the receiver's job (RFC5321 section 4.4), so this no longer does anything. + * @link https://tools.ietf.org/html/rfc5321#section-4.4 RFC5321 reference + */ + 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: no output + * 1: commands + * 2: data and commands + * 3: as 2 plus connection status + * 4: low level data output + * @type int + * @see SMTP::$do_debug + */ + public $SMTPDebug = 0; + + /** + * How to handle debug output. + * Options: + * 'echo': Output plain-text as-is, appropriate for CLI + * 'html': Output escaped, line breaks converted to
, appropriate for browser output + * 'error_log': Output to error log as configured in php.ini + * @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 + * @link http://www.postfix.org/VERP_README.html Postfix VERP info + * @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 any php callable: http://www.php.net/is_callable + * + * 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) + { + if (version_compare(PHP_VERSION, '5.0.0', '<')) { + exit("Sorry, PHPMailer will only run on PHP version 5 or greater!\n"); + } + $this->exceptions = ($exceptions == true); + //Make sure our autoloader is loaded + if (version_compare(PHP_VERSION, '5.1.2', '>=')) { + $autoload = spl_autoload_functions(); + if ($autoload === false or !in_array('PHPMailerAutoload', $autoload)) { + //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)) { + $result = @mail($to, $subject, $body, $header); + } else { + $result = @mail($to, $subject, $body, $header, $params); + } + return $result; + } + + /** + * 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: + echo $str."\n"; + } + } + + /** + * 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); + $this->edebug($this->lang('Invalid recipient array') . ': ' . $kind); + if ($this->exceptions) { + throw new phpmailerException('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); + $this->edebug($this->lang('invalid_address') . ': ' . $address); + if ($this->exceptions) { + throw new phpmailerException($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); + $this->edebug($this->lang('invalid_address') . ': ' . $address); + if ($this->exceptions) { + throw new phpmailerException($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 strictest 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; same as pcre8 but does not allow 'dotless' domains; + * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. + * * `noregex` Don't use a regex: 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 constant so it works when extension_loaded() 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': + /** + * Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains. + * @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 'html5': + /** + * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. + * @link http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email) + */ + return '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])'. + '?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD'; + 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 $exc) { + $this->mailHeader = ''; + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + 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 $exc) { + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + 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: + $sendMethod = $this->Mailer.'Send'; + if (method_exists($this, $sendMethod)) { + return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); + } + + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + } + } catch (phpmailerException $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + } + 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 $toaddr) { + $toArr[] = $this->addrFormat($toaddr); + } + $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); + } + $result = false; + if ($this->SingleTo === true && count($toArr) > 1) { + foreach ($toArr as $val) { + $result = $this->mailPassthru($val, $this->Subject, $body, $header, $params); + // implement call back function if it exists + $isSent = ($result == 1) ? 1 : 0; + $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body, $this->From); + } + } else { + $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); + // implement call back function if it exists + $isSent = ($result == 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 (!$result) { + 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 to 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); + } + + //Only send the DATA command if we have viable recipients + if ((count($this->all_recipients) > count($bad_rcpt)) and !$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 $exc) { + $lastexception = $exc; + //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 = '') + { + //Define full set of translatable strings in English + $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: ' + ); + if (empty($lang_path)) { + //Calculate an absolute path so it can work if CWD is not here + $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR; + } + $foundlang = true; + $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php'; + if ($langcode != 'en') { //There is no English translation file + //Make sure language file path is readable + if (!is_readable($lang_file)) { + $foundlang = false; + } else { + //Overwrite language-specific strings. + //This way we'll never have missing translations. + $foundlang = include $lang_file; + } + } + $this->language = $PHPMAILER_LANG; + return ($foundlang == 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 $address) { + $addresses[] = $this->addrFormat($address); + } + 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); + } + + // To be created automatically by mail() + if ($this->SingleTo === true) { + if ($this->Mailer != 'mail') { + foreach ($this->to as $toaddr) { + $this->SingleToArray[] = $this->addrFormat($toaddr); + } + } + } else { + if (count($this->to) > 0) { + if ($this->Mailer != 'mail') { + $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(); + + $bodyEncoding = $this->Encoding; + $bodyCharSet = $this->CharSet; + if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) { + $bodyEncoding = '7bit'; + $bodyCharSet = 'us-ascii'; + } + $altBodyEncoding = $this->Encoding; + $altBodyCharSet = $this->CharSet; + if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) { + $altBodyEncoding = '7bit'; + $altBodyCharSet = 'us-ascii'; + } + switch ($this->message_type) { + case 'inline': + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[1]); + break; + case 'attach': + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $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], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $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], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $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], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $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], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $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], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $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], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $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], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $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, $bodyEncoding); + 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 $exc) { + $body = ''; + if ($this->exceptions) { + throw $exc; + } + } + } + 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; + //RFC1341 part 5 says 7bit is assumed if not specified + if ($encoding != '7bit') { + $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 $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + 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 + ); + //RFC1341 part 5 says 7bit is assumed if not specified + if ($encoding != '7bit') { + $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 $exc) { + $this->setError($exc->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') + { + $matchcount = 0; + switch (strtolower($position)) { + case 'phrase': + if (!preg_match('/[\200-\377]/', $str)) { + // Can't use addslashes as we don't know the value of magic_quotes_sybase + $encoded = addcslashes($str, "\0..\37\177\\\""); + if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { + return ($encoded); + } else { + return ("\"$encoded\""); + } + } + $matchcount = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + /** @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + $matchcount = preg_match_all('/[()"]/', $str, $matches); + // Intentional fall-through + case 'text': + default: + $matchcount += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + if ($matchcount == 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 ($matchcount > 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; + } + } + + /** + * Does a string contain any 8-bit chars (in any charset)? + * @param string $text + * @return bool + */ + public function has8bitChars($text) + { + return (bool)preg_match('/[\x80-\xFF]/', $text); + } + + /** + * Encode and wrap long multibyte strings for mail headers + * without breaking lines within a character. + * Adapted from a function by paravoid + * @link http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 + * @access public + * @param string $str multi-byte text to wrap encode + * @param string $linebreak string to use as linefeed/end-of-line + * @return string + */ + public function base64EncodeWrapMB($str, $linebreak = null) + { + $start = "=?" . $this->CharSet . "?B?"; + $end = "?="; + $encoded = ""; + if ($linebreak === null) { + $linebreak = $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 . $linebreak; + } + + // Chomp the last linefeed + $encoded = substr($encoded, 0, -strlen($linebreak)); + 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 http://www.php.net/manual/en/function.quoted-printable-decode.php#89417 Adapted from this comment + */ + public function encodeQP($string, $line_max = 76) + { + if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3) + return $this->fixEOL(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 $this->fixEOL($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 + $eqkey = array_search('=', $matches[0]); + if ($eqkey !== false) { + unset($matches[0][$eqkey]); + 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() + { + $result = 'localhost.localdomain'; + if (!empty($this->Hostname)) { + $result = $this->Hostname; + } elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER) and !empty($_SERVER['SERVER_NAME'])) { + $result = $_SERVER['SERVER_NAME']; + } elseif (function_exists('gethostname') && gethostname() !== false) { + $result = gethostname(); + } elseif (php_uname('n') !== false) { + $result = php_uname('n'); + } + 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 $imgindex => $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][$imgindex] . "=[\"']" . preg_quote($url, '/') . "[\"']/Ui", + $images[1][$imgindex] . "=\"cid:" . $cid . "\"", + $message + ); + } + } + } + } + $this->isHTML(true); + //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)); + if (empty($this->AltBody)) { + $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . + self::CRLF . self::CRLF; + } + 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'; + $htmlconverter = new html2text($html); + return $htmlconverter->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', + 'vcf' => 'text/vcard', + 'vcard' => 'text/vcard', + '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' => ''); + $pathinfo = array(); + preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im', $path, $pathinfo); + if (array_key_exists(1, $pathinfo)) { + $ret['dirname'] = $pathinfo[1]; + } + if (array_key_exists(2, $pathinfo)) { + $ret['basename'] = $pathinfo[2]; + } + if (array_key_exists(5, $pathinfo)) { + $ret['extension'] = $pathinfo[5]; + } + if (array_key_exists(3, $pathinfo)) { + $ret['filename'] = $pathinfo[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 $exc) { + $this->setError($exc->getMessage()); + if ($exc->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 $signheader Header + * @throws phpmailerException + * @return string + */ + public function DKIM_Sign($signheader) + { + 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($signheader, $signature, $privKey)) { + return base64_encode($signature); + } + return ''; + } + + /** + * Generate a DKIM canonicalization header. + * @access public + * @param string $signheader Header + * @return string + */ + public function DKIM_HeaderC($signheader) + { + $signheader = preg_replace("/\r\n\s+/", " ", $signheader); + $lines = explode("\r\n", $signheader); + 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 + } + $signheader = implode("\r\n", $lines); + return $signheader; + } + + /** + * 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"; + } + + /** + * Allows for public read access to 'to' property. + * @access public + * @return array + */ + public function getToAddresses() + { + return $this->to; + } + + /** + * Allows for public read access to 'cc' property. + * @access public + * @return array + */ + public function getCcAddresses() + { + return $this->cc; + } + + /** + * Allows for public read access to 'bcc' property. + * @access public + * @return array + */ + public function getBccAddresses() + { + return $this->bcc; + } + + /** + * Allows for public read access to 'ReplyTo' property. + * @access public + * @return array + */ + public function getReplyToAddresses() + { + return $this->ReplyTo; + } + + /** + * Allows for public read access to 'all_recipients' property. + * @access public + * @return array + */ + public function getAllRecipientAddresses() + { + return $this->all_recipients; + } + + /** + * 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); + } + } +} diff --git a/Html/classes/phpmailer/pop3.php b/Html/classes/phpmailer/pop3.php new file mode 100644 index 0000000..e07c7c6 --- /dev/null +++ b/Html/classes/phpmailer/pop3.php @@ -0,0 +1,417 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 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 (Synchro/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) + { + $response = fgets($this->pop_conn, $size); + if ($this->do_debug >= 1) { + echo "Server -> Client: $response"; + } + return $response; + } + + /** + * 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/Html/classes/phpmailer/smtp.php b/Html/classes/phpmailer/smtp.php new file mode 100644 index 0000000..a2bcc0d --- /dev/null +++ b/Html/classes/phpmailer/smtp.php @@ -0,0 +1,935 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2014 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 RFC821 SMTP email transport class. + * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. + * @package PHPMailer + * @author Chris Ryan + * @author Marcus Bointon + */ +class Smtp +{ + /** + * The PHPMailer SMTP version number. + * @type string + */ + const VERSION = '5.2.7'; + + /** + * SMTP line break constant. + * @type string + */ + const CRLF = "\r\n"; + + /** + * The SMTP port to use if one is not specified. + * @type int + */ + const DEFAULT_SMTP_PORT = 25; + + /** + * The maximum line length allowed by RFC 2822 section 2.1.1 + * @type int + */ + const MAX_LINE_LENGTH = 998; + + /** + * The PHPMailer SMTP Version number. + * @type string + * @deprecated Use the constant instead + * @see SMTP::VERSION + */ + public $Version = '5.2.7'; + + /** + * SMTP server port number. + * @type int + * @deprecated This is only ever used as a default value, so use the constant instead + * @see SMTP::DEFAULT_SMTP_PORT + */ + public $SMTP_PORT = 25; + + /** + * SMTP reply line ending. + * @type string + * @deprecated Use the 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; + + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to
, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * @type string + */ + public $Debugoutput = 'echo'; + + /** + * Whether to use VERP. + * @link http://en.wikipedia.org/wiki/Variable_envelope_return_path + * @link http://www.postfix.org/VERP_README.html Info on 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 + * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. + * @link http://tools.ietf.org/html/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 + + $bytelen = 64; // byte length for md5 + if (strlen($key) > $bytelen) { + $key = pack('H*', md5($key)); + } + $key = str_pad($key, $bytelen, chr(0x00)); + $ipad = str_pad('', $bytelen, chr(0x36)); + $opad = str_pad('', $bytelen, 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 characters on a single line (including the CRLF) + * 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. + * We will also look for lines that start with a '.' and prepend an additional '.'. + * NOTE: this does not count towards line-length limit. + */ + + // Normalize line breaks before exploding + $lines = explode("\n", str_replace(array("\r\n", "\r"), "\n", $msg_data)); + + /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field + * of the first line (':' separated) does not contain a space then it _should_ be a header and we will + * process all lines before a blank line as headers. + */ + + $field = substr($lines[0], 0, strpos($lines[0], ':')); + $in_headers = false; + if (!empty($field) && strpos($field, ' ') === false) { + $in_headers = true; + } + + foreach ($lines as $line) { + $lines_out = array(); + if ($in_headers and $line == '') { + $in_headers = false; + } + // ok we need to break this line up into several smaller lines + //This is a small micro-optimisation: isset($str[$len]) is equivalent to (strlen($str) > $len) + while (isset($line[self::MAX_LINE_LENGTH])) { + //Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on + //so as to avoid breaking in the middle of a word + $pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' '); + if (!$pos) { //Deliberately matches both false and 0 + //No nice break found, add a hard break + $pos = self::MAX_LINE_LENGTH - 1; + $lines_out[] = substr($line, 0, $pos); + $line = substr($line, $pos); + } else { + //Break at the found point + $lines_out[] = substr($line, 0, $pos); + //Move along by the amount we dealt with + $line = substr($line, $pos + 1); + } + /* If processing headers add a LWSP-char to the front of new line + * RFC822 section 3.1.1 + */ + if ($in_headers) { + $line = "\t" . $line; + } + } + $lines_out[] = $line; + + // Send the lines to the server + foreach ($lines_out as $line_out) { + //RFC2821 section 4.5.2 + if (!empty($line_out) and $line_out[0] == '.') { + $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 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) + return (bool)($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host)); + } + + /** + * 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); + $err = $this->error; //Save any error + if ($noerror or $close_on_error) { + $this->close(); + $this->error = $err; //Restore any error from the quit command + } + return $noerror; + } + + /** + * Send an SMTP RCPT command. + * Sets the TO argument to $toaddr. + * Returns true if the recipient was accepted false if it was rejected. + * Implements from rfc 821: RCPT TO: + * @param string $toaddr The address the message is being sent to + * @access public + * @return bool + */ + public function recipient($toaddr) + { + return $this->sendCommand( + 'RCPT TO', + 'RCPT TO:<' . $toaddr . '>', + 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() + { + // If the connection is bad, give up straight away + if (!is_resource($this->smtp_conn)) { + return ''; + } + $data = ''; + $endtime = 0; + 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, micro-optimisation over strlen + if ((isset($str[3]) and $str[3] == ' ')) { + 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 and 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/Html/contact.php b/Html/contact.php new file mode 100644 index 0000000..58f7def --- /dev/null +++ b/Html/contact.php @@ -0,0 +1,152 @@ + + + + +
+ + + +
+
+ + + + +Votre message a bien été envoyé !
Nous y répondrons dès que possible !
'; +} +?> + +
Mauvais code anti-spam !
'; +} +?> + + +'.$error.'
'; + } + } +?> + +

Nous contacter :

+

Merci d'utiliser le formulaire ci-dessous pour nous contacter :

+ +
+ +Votre nom :
+ + +
+
+ +Votre e-mail :
+ + +
+
+ +Sujet :
+ + +
+
+ +Anti-spam : veuillez recopier le code ci-dessous
+ + verification +
+
+ +Message :
+ + + +

+
+ +
+ + + +
+ + + + + + + diff --git a/Html/favicon.ico b/Html/favicon.ico new file mode 100644 index 0000000..f991bb6 Binary files /dev/null and b/Html/favicon.ico differ diff --git a/Html/images/.htaccess b/Html/images/.htaccess new file mode 100644 index 0000000..5a928f6 --- /dev/null +++ b/Html/images/.htaccess @@ -0,0 +1 @@ +Options -Indexes diff --git a/Html/images/Calendar-icon.png b/Html/images/Calendar-icon.png new file mode 100644 index 0000000..a84cdcd Binary files /dev/null and b/Html/images/Calendar-icon.png differ diff --git a/Html/images/Chat-icon.png b/Html/images/Chat-icon.png new file mode 100644 index 0000000..4cac425 Binary files /dev/null and b/Html/images/Chat-icon.png differ diff --git a/Html/images/Communicate-icon.png b/Html/images/Communicate-icon.png new file mode 100644 index 0000000..91b7da1 Binary files /dev/null and b/Html/images/Communicate-icon.png differ diff --git a/Html/images/Email-icon.png b/Html/images/Email-icon.png new file mode 100644 index 0000000..34ef71f Binary files /dev/null and b/Html/images/Email-icon.png differ diff --git a/Html/images/File-icon.png b/Html/images/File-icon.png new file mode 100644 index 0000000..8f9329b Binary files /dev/null and b/Html/images/File-icon.png differ diff --git a/Html/images/Folder-icon.png b/Html/images/Folder-icon.png new file mode 100644 index 0000000..1ada3f3 Binary files /dev/null and b/Html/images/Folder-icon.png differ diff --git a/Html/images/account-ico.png b/Html/images/account-ico.png new file mode 100644 index 0000000..1785b2e Binary files /dev/null and b/Html/images/account-ico.png differ diff --git a/Html/images/admin.png b/Html/images/admin.png new file mode 100644 index 0000000..0b20b3e Binary files /dev/null and b/Html/images/admin.png differ diff --git a/Html/images/asc.gif b/Html/images/asc.gif new file mode 100644 index 0000000..7415786 Binary files /dev/null and b/Html/images/asc.gif differ diff --git a/Html/images/attention-1.jpg b/Html/images/attention-1.jpg new file mode 100644 index 0000000..6181b7c Binary files /dev/null and b/Html/images/attention-1.jpg differ diff --git a/Html/images/author.png b/Html/images/author.png new file mode 100644 index 0000000..f4d607d Binary files /dev/null and b/Html/images/author.png differ diff --git a/Html/images/avatars/avatar-profil.png b/Html/images/avatars/avatar-profil.png new file mode 100644 index 0000000..312e017 Binary files /dev/null and b/Html/images/avatars/avatar-profil.png differ diff --git a/Html/images/avatars/avatar.png b/Html/images/avatars/avatar.png new file mode 100644 index 0000000..00fbffb Binary files /dev/null and b/Html/images/avatars/avatar.png differ diff --git a/Html/images/back.png b/Html/images/back.png new file mode 100644 index 0000000..8cbd34e Binary files /dev/null and b/Html/images/back.png differ diff --git a/Html/images/back1.png b/Html/images/back1.png new file mode 100644 index 0000000..240838f Binary files /dev/null and b/Html/images/back1.png differ diff --git a/Html/images/back2.png b/Html/images/back2.png new file mode 100644 index 0000000..78f32af Binary files /dev/null and b/Html/images/back2.png differ diff --git a/Html/images/back3.png b/Html/images/back3.png new file mode 100644 index 0000000..0230109 Binary files /dev/null and b/Html/images/back3.png differ diff --git a/Html/images/background03.jpg b/Html/images/background03.jpg new file mode 100644 index 0000000..9cb7c84 Binary files /dev/null and b/Html/images/background03.jpg differ diff --git a/Html/images/bg.gif b/Html/images/bg.gif new file mode 100644 index 0000000..fac668f Binary files /dev/null and b/Html/images/bg.gif differ diff --git a/Html/images/bottom-arrow.png b/Html/images/bottom-arrow.png new file mode 100644 index 0000000..65915b8 Binary files /dev/null and b/Html/images/bottom-arrow.png differ diff --git a/Html/images/btn_recherche.gif b/Html/images/btn_recherche.gif new file mode 100644 index 0000000..80b57f9 Binary files /dev/null and b/Html/images/btn_recherche.gif differ diff --git a/Html/images/category.png b/Html/images/category.png new file mode 100644 index 0000000..f1ed9ab Binary files /dev/null and b/Html/images/category.png differ diff --git a/Html/images/cloud-ico.png b/Html/images/cloud-ico.png new file mode 100644 index 0000000..9adb298 Binary files /dev/null and b/Html/images/cloud-ico.png differ diff --git a/Html/images/comments.png b/Html/images/comments.png new file mode 100644 index 0000000..9058397 Binary files /dev/null and b/Html/images/comments.png differ diff --git a/Html/images/date.png b/Html/images/date.png new file mode 100644 index 0000000..2179367 Binary files /dev/null and b/Html/images/date.png differ diff --git a/Html/images/desc.gif b/Html/images/desc.gif new file mode 100644 index 0000000..3b30b3c Binary files /dev/null and b/Html/images/desc.gif differ diff --git a/Html/images/down.gif b/Html/images/down.gif new file mode 100644 index 0000000..1dd9e24 Binary files /dev/null and b/Html/images/down.gif differ diff --git a/Html/images/down.png b/Html/images/down.png new file mode 100644 index 0000000..39a68e5 Binary files /dev/null and b/Html/images/down.png differ diff --git a/Html/images/download-2-icon.png b/Html/images/download-2-icon.png new file mode 100644 index 0000000..59837f1 Binary files /dev/null and b/Html/images/download-2-icon.png differ diff --git a/Html/images/download.png b/Html/images/download.png new file mode 100644 index 0000000..55a4730 Binary files /dev/null and b/Html/images/download.png differ diff --git a/Html/images/envelope-newmail.gif b/Html/images/envelope-newmail.gif new file mode 100644 index 0000000..4c183f7 Binary files /dev/null and b/Html/images/envelope-newmail.gif differ diff --git a/Html/images/file.png b/Html/images/file.png new file mode 100644 index 0000000..f1ed9ab Binary files /dev/null and b/Html/images/file.png differ diff --git a/Html/images/footer-bg.png b/Html/images/footer-bg.png new file mode 100644 index 0000000..37830d2 Binary files /dev/null and b/Html/images/footer-bg.png differ diff --git a/Html/images/header-bg.jpg b/Html/images/header-bg.jpg new file mode 100644 index 0000000..e15914f Binary files /dev/null and b/Html/images/header-bg.jpg differ diff --git a/Html/images/index.html b/Html/images/index.html new file mode 100644 index 0000000..e69de29 diff --git a/Html/images/licence.png b/Html/images/licence.png new file mode 100644 index 0000000..f272d93 Binary files /dev/null and b/Html/images/licence.png differ diff --git a/Html/images/login-ico.png b/Html/images/login-ico.png new file mode 100644 index 0000000..08fbc91 Binary files /dev/null and b/Html/images/login-ico.png differ diff --git a/Html/images/logo-fond45.png b/Html/images/logo-fond45.png new file mode 100644 index 0000000..9731e32 Binary files /dev/null and b/Html/images/logo-fond45.png differ diff --git a/Html/images/logo.png b/Html/images/logo.png new file mode 100644 index 0000000..0b860d4 Binary files /dev/null and b/Html/images/logo.png differ diff --git a/Html/images/logout.png b/Html/images/logout.png new file mode 100644 index 0000000..0eb129c Binary files /dev/null and b/Html/images/logout.png differ diff --git a/Html/images/member-icon.png b/Html/images/member-icon.png new file mode 100644 index 0000000..4bf66ab Binary files /dev/null and b/Html/images/member-icon.png differ diff --git a/Html/images/menu-primary-shadow.png b/Html/images/menu-primary-shadow.png new file mode 100644 index 0000000..c04d21b Binary files /dev/null and b/Html/images/menu-primary-shadow.png differ diff --git a/Html/images/menu-secondary-bg.png b/Html/images/menu-secondary-bg.png new file mode 100644 index 0000000..d39b69f Binary files /dev/null and b/Html/images/menu-secondary-bg.png differ diff --git a/Html/images/menu-secondary-shadow.png b/Html/images/menu-secondary-shadow.png new file mode 100644 index 0000000..c04d21b Binary files /dev/null and b/Html/images/menu-secondary-shadow.png differ diff --git a/Html/images/messagerie.jpg b/Html/images/messagerie.jpg new file mode 100644 index 0000000..06efe36 Binary files /dev/null and b/Html/images/messagerie.jpg differ diff --git a/Html/images/meta-separator.png b/Html/images/meta-separator.png new file mode 100644 index 0000000..5d5d520 Binary files /dev/null and b/Html/images/meta-separator.png differ diff --git a/Html/images/noimage.png b/Html/images/noimage.png new file mode 100644 index 0000000..717d55c Binary files /dev/null and b/Html/images/noimage.png differ diff --git a/Html/images/read.png b/Html/images/read.png new file mode 100644 index 0000000..bde3467 Binary files /dev/null and b/Html/images/read.png differ diff --git a/Html/images/readmore-bg.png b/Html/images/readmore-bg.png new file mode 100644 index 0000000..95dd641 Binary files /dev/null and b/Html/images/readmore-bg.png differ diff --git a/Html/images/search.png b/Html/images/search.png new file mode 100644 index 0000000..80677f4 Binary files /dev/null and b/Html/images/search.png differ diff --git a/Html/images/social/facebook-icon.png b/Html/images/social/facebook-icon.png new file mode 100644 index 0000000..7370509 Binary files /dev/null and b/Html/images/social/facebook-icon.png differ diff --git a/Html/images/social/facebook_32.png b/Html/images/social/facebook_32.png new file mode 100644 index 0000000..55b4964 Binary files /dev/null and b/Html/images/social/facebook_32.png differ diff --git a/Html/images/social/feed_32.png b/Html/images/social/feed_32.png new file mode 100644 index 0000000..78314a7 Binary files /dev/null and b/Html/images/social/feed_32.png differ diff --git a/Html/images/social/google-plus-icon.png b/Html/images/social/google-plus-icon.png new file mode 100644 index 0000000..74a581c Binary files /dev/null and b/Html/images/social/google-plus-icon.png differ diff --git a/Html/images/social/googleplus_32.png b/Html/images/social/googleplus_32.png new file mode 100644 index 0000000..072947a Binary files /dev/null and b/Html/images/social/googleplus_32.png differ diff --git a/Html/images/social/mail-icon.png b/Html/images/social/mail-icon.png new file mode 100644 index 0000000..0a6f010 Binary files /dev/null and b/Html/images/social/mail-icon.png differ diff --git a/Html/images/social/mastodon.png b/Html/images/social/mastodon.png new file mode 100644 index 0000000..2944aa6 Binary files /dev/null and b/Html/images/social/mastodon.png differ diff --git a/Html/images/social/rss-icon.png b/Html/images/social/rss-icon.png new file mode 100644 index 0000000..5fde48c Binary files /dev/null and b/Html/images/social/rss-icon.png differ diff --git a/Html/images/social/twitter-icon.png b/Html/images/social/twitter-icon.png new file mode 100644 index 0000000..8ea14d9 Binary files /dev/null and b/Html/images/social/twitter-icon.png differ diff --git a/Html/images/social/twitter_32.png b/Html/images/social/twitter_32.png new file mode 100644 index 0000000..889be59 Binary files /dev/null and b/Html/images/social/twitter_32.png differ diff --git a/Html/images/star-ico.png b/Html/images/star-ico.png new file mode 100644 index 0000000..d64ba3b Binary files /dev/null and b/Html/images/star-ico.png differ diff --git a/Html/images/stats.png b/Html/images/stats.png new file mode 100644 index 0000000..bae0bab Binary files /dev/null and b/Html/images/stats.png differ diff --git a/Html/images/tabs-bg.png b/Html/images/tabs-bg.png new file mode 100644 index 0000000..29039f6 Binary files /dev/null and b/Html/images/tabs-bg.png differ diff --git a/Html/images/tags.png b/Html/images/tags.png new file mode 100644 index 0000000..b4a0ac8 Binary files /dev/null and b/Html/images/tags.png differ diff --git a/Html/images/tele.png b/Html/images/tele.png new file mode 100644 index 0000000..cf9ae83 Binary files /dev/null and b/Html/images/tele.png differ diff --git a/Html/images/torrentfileblue.png b/Html/images/torrentfileblue.png new file mode 100644 index 0000000..0f74282 Binary files /dev/null and b/Html/images/torrentfileblue.png differ diff --git a/Html/images/up.png b/Html/images/up.png new file mode 100644 index 0000000..ab60c95 Binary files /dev/null and b/Html/images/up.png differ diff --git a/Html/images/uptorr.png b/Html/images/uptorr.png new file mode 100644 index 0000000..6513c4e Binary files /dev/null and b/Html/images/uptorr.png differ diff --git a/Html/images/user.png b/Html/images/user.png new file mode 100644 index 0000000..e7c60bd Binary files /dev/null and b/Html/images/user.png differ diff --git a/Html/images/visitor.png b/Html/images/visitor.png new file mode 100644 index 0000000..35540a5 Binary files /dev/null and b/Html/images/visitor.png differ diff --git a/Html/images/warning.png b/Html/images/warning.png new file mode 100644 index 0000000..aed2548 Binary files /dev/null and b/Html/images/warning.png differ diff --git a/Html/images/wrapper-bg.png b/Html/images/wrapper-bg.png new file mode 100644 index 0000000..91778da Binary files /dev/null and b/Html/images/wrapper-bg.png differ diff --git a/Html/includes/.htaccess b/Html/includes/.htaccess new file mode 100644 index 0000000..5a928f6 --- /dev/null +++ b/Html/includes/.htaccess @@ -0,0 +1 @@ +Options -Indexes diff --git a/Html/includes/BDecode.php b/Html/includes/BDecode.php new file mode 100644 index 0000000..fbf12bc --- /dev/null +++ b/Html/includes/BDecode.php @@ -0,0 +1,172 @@ += '0' && $wholefile[$offset] <= '9') { + $ret[0] *= 10; + //Added 2005.02.21 - VisiGod + //Changing the type of variable from integer to double to prevent a numeric overflow + settype($ret[0],'double'); + //Added 2005.02.21 - VisiGod + $ret[0] += ord($wholefile[$offset]) - ord('0'); + $offset++; + } else if ($wholefile[$offset] == 'e' || $wholefile[$offset] == ':') { + // Tolerate : or e because this is a multiuse function + $ret[1] = $offset+1; + if ($negative) { + if ($ret[0] == 0) + return array(false); + $ret[0] = - $ret[0]; + } + return $ret; + } else return array(false); + } + } + + function decodeEntry($wholefile, $offset=0) { + if ($wholefile[$offset] == 'd') + return $this->decodeDict($wholefile, $offset); + if ($wholefile[$offset] == 'l') + return $this->decodelist($wholefile, $offset); + if ($wholefile[$offset] == 'i') + return $this->numberdecode($wholefile, ++$offset); + // String value: decode number, then grab substring + + $info = $this->numberdecode($wholefile, $offset); + + if ($info[0] === false) + return array(false); + $ret[0] = substr($wholefile, $info[1], $info[0]); + $ret[1] = $info[1]+strlen($ret[0]); + + + return $ret; + } + + function decodeList($wholefile, $offset) { + if ($wholefile[$offset] != 'l') + return array(false); + $offset++; + $ret = array(); + for ($i=0;;$i++) { + if ($wholefile[$offset] == 'e') + break; + $value = $this->decodeEntry($wholefile, $offset); + if ($value[0] === false) + return array(false); + $ret[$i] = $value[0]; + $offset = $value[1]; + } + // The empty list is an empty array. Seems fine. + return array(0=>$ret, 1=>++$offset); + } + + // Tries to construct an array + function decodeDict($wholefile, $offset=0) { + if ($wholefile[$offset] == 'l') + return $this->decodeList($wholefile, $offset); + if ($wholefile[$offset] != 'd') + return false; + $ret=array(); + $offset++; + for (;;) { + if ($wholefile[$offset] == 'e') { + $offset++; + break; + } + $left = $this->decodeEntry($wholefile, $offset); + if ($left[0]===false) { + die("stop...".$left[1]); + return false; + } + + $offset = $left[1]; + if ($wholefile[$offset] == 'd') { + // Recurse + $value = $this->decodedict($wholefile, $offset); + if ($value[0]) { + $ret[addslashes($left[0])] = $value[0]; + $offset= $value[1]; + } + continue; + } + if ($wholefile[$offset] == 'l') { + $value = $this->decodeList($wholefile, $offset); + if (!$value[0] && is_bool($value[0])) + return false; + $ret[addslashes($left[0])] = $value[0]; + $offset = $value[1]; + continue; + } + $value = $this->decodeEntry($wholefile, $offset); + if ($value[0] === false) + return false; + $ret[addslashes($left[0])] = $value[0]; + $offset = $value[1]; + + } + + return array(0=>(empty($ret)?true:$ret), 1=>$offset); + } +} // End of class declaration. + +// Use this function. eg: BDecode("d8:announce44:http://www. ... e"); +function BDecode($wholefile) { + $decoder = new BDecode; + $return = $decoder->decodeEntry($wholefile); + return $return[0]; +} +?> \ No newline at end of file diff --git a/Html/includes/BEncode.php b/Html/includes/BEncode.php new file mode 100644 index 0000000..b0876e7 --- /dev/null +++ b/Html/includes/BEncode.php @@ -0,0 +1,94 @@ + $dummy) + $keys[$i++] = stripslashes($key); + sort($keys); + for ($i=0; isset($keys[$i]); $i++) + $return[addslashes($keys[$i])] = $array[addslashes($keys[$i])]; + return $return; + } + + // Encodes strings, integers and empty dictionaries. + // $unstrip is set to true when decoding dictionary keys + function encodeEntry($entry, &$fd, $unstrip = false) { + if (is_bool($entry)) { + $fd .= 'de'; + return; + } + if (is_int($entry) || is_float($entry)) { + $fd .= 'i'.$entry.'e'; + return; + } + if ($unstrip) + $myentry = stripslashes($entry); + else + $myentry = $entry; + $length = strlen($myentry); + $fd .= $length.':'.$myentry; + } + + // Encodes lists + function encodeList($array, &$fd) { + $fd .= 'l'; + // The empty list is defined as array(); + if (empty($array)) { + $fd .= 'e'; + return; + } + for ($i = 0; isset($array[$i]); $i++) + $this->decideEncode($array[$i], $fd); + $fd .= 'e'; + } + + // Passes lists and dictionaries accordingly, and has encodeEntry handle + // the strings and integers. + function decideEncode($unknown, &$fd) { + if (is_array($unknown)) { + if (isset($unknown[0]) || empty($unknown)) + return $this->encodeList($unknown, $fd); + else + return $this->encodeDict($unknown, $fd); + } + $this->encodeEntry($unknown, $fd); + } + + // Encodes dictionaries + function encodeDict($array, &$fd) { + $fd .= 'd'; + if (is_bool($array)) { + $fd .= 'e'; + return; + } + // NEED TO SORT! + $newarray = $this->makeSorted($array); + foreach($newarray as $left => $right) { + $this->encodeEntry($left, $fd, true); + $this->decideEncode($right, $fd); + } + $fd .= 'e'; + } +} // End of class declaration. + +// Use this function in your own code. +function BEncode($array) { + $string = ''; + $encoder = new BEncode; + $encoder->decideEncode($array, $string); + return $string; +} +?> \ No newline at end of file diff --git a/Html/includes/ariane.php b/Html/includes/ariane.php new file mode 100644 index 0000000..d63374a --- /dev/null +++ b/Html/includes/ariane.php @@ -0,0 +1,32 @@ +'; + + echo 'Accueil'; + + for($i=1; $i"; + } + else { + $prChunks[0]=$dChunks[$i] . ' ›› '; + } + echo '">'; + echo str_replace("_" , " " , $prChunks[0]); + } + +echo '

'; +?> diff --git a/Html/includes/config.php b/Html/includes/config.php new file mode 100644 index 0000000..64e7f00 --- /dev/null +++ b/Html/includes/config.php @@ -0,0 +1,138 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +} +catch(PDOException $e) { + //show error + echo '

'.$e->getMessage().'

'; + exit; +} + +//PARAMETRES DU SITE----------------------------------------------------------------- +define('WEBPATH','/var/www/freetorrent.fr/web'); // Path of your website files +define('SITENAME','freetorrent'); +define('SITENAMELONG','freetorrent.fr'); +define('SITESLOGAN','Freetorrent : Bittorrent au service du Libre'); +define('SITEDESCRIPTION','freetorrent.fr rassemble des OS libres (Systèmes d\'exploitation) et les propose au téléchargement par l\'intermédiaire du protocole Bittorrent.'); +define('SITEURL','http://www.freetorrent.fr'); +define('SITEMAIL','contact@freetorrent.fr'); +define('SITEOWNORNAME',''); // author's name +define('SITEOWNORADDRESS',''); // author's real address ... +define('SITEDISQUS',''); // DISQUS comments if enabled +define('ANNOUNCEPORT',''); // PORT FOR XBTT +define('SITEVERSION','1.4.6'); +define('SITEDATE','24/12/16'); +define('COPYDATE','2016-2017'); +define('CHARSET','UTF-8'); + + +define('NBTORRENTS','15'); // Number of torrents in torrents list + +// Deconnexion auto au bout de 10 minutes +if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) { + if (isset($_SESSION['time'])) { + if ($_SESSION['time'] + 600 > time()) { + $_SESSION['time'] = time(); + } + else { + header ('Location: '.SITEURL.'/admin/logout.php'); + } + } + else { + $_SESSION['time'] = time(); + } +} + + +// Announce +$ANNOUNCEURL = SITEURL.':'.ANNOUNCEPORT.'/announce'; + +// Répertoire des images +$REP_IMAGES = '/var/www/freetorrent.fr/web/images/'; + +// Edito - Page d'accueil +$EDITO = ' +

Bienvenue sur '.SITEURL.' !

+

'.SITENAMELONG.' rassemble des projets sous licences libres et licences de libre diffusion et les propose au téléchargement par l\'intermédiaire du protocole Bittorrent.
+Il est complémentaire de certains gros projets officiels qui possèdent déjà leurs services Bittorrent et s\'adresse tout particulièrement aux projets plus modestes qui recherchent un moyen simple de partager librement leurs travaux.
+Si vous voulez nous apporter un peu d\'aide, merci de nous contacter par l\'intermédiaire du formulaire de contact.
+Le téléchargement (leech) est libre et ne nécessite aucune création de compte. Néanmoins, vous devrez créer un compte membre afin d\'uploader des torrents. +

+'; + +//Paramètres pour le fichier torrent (upload.php) +define('MAX_FILE_SIZE', 1048576); // Taille maxi en octets du fichier .torrent +$WIDTH_MAX = 500; // Largeur max de l'image en pixels +$HEIGHT_MAX = 500; // Hauteur max de l'image en pixels +$REP_TORRENTS = '/var/www/freetorrent.fr/web/torrents/'; // Répertoire des fichiers .torrents + +//Paramètres pour l'icone de présentation du torrent (index.php, edit-post.php, ...) +$WIDTH_MAX_ICON = 150; //largeur maxi de l'icone de présentation dut orrent +$HEIGHT_MAX_ICON = 150; //Hauteur maxi de l'icone de présentation du torrent +$MAX_SIZE_ICON = 30725; // Taille max en octet de l'icone de présentation du torrent (30 Ko) +$REP_IMAGES_TORRENTS = '/var/www/freetorrent.fr/web/images/imgtorrents/'; +$WEB_IMAGES_TORRENTS = 'images/imgtorrents/'; + +//Paramètres pour l'avatar membre (profile.php, edit-profil.php, ...) +$MAX_SIZE_AVATAR = 51200; // Taille max en octets du fichier (50 Ko) +$WIDTH_MAX_AVATAR = 200; // Largeur max de l'image en pixels +$HEIGHT_MAX_AVATAR = 200; // Hauteur max de l'image en pixels +$EXTENSIONS_VALIDES = array( 'jpg' , 'png' ); //extensions d'images valides +$REP_IMAGES_AVATARS = '/var/www/freetorrent.fr/web/images/avatars/'; // Répertoires des images avatar des membres + + +// ----------------------------------------------------------------------------------- +// CLASSES +// ----------------------------------------------------------------------------------- + +//load classes as needed +function __autoload($class) { + + $class = strtolower($class); + + //if call from within assets adjust the path + $classpath = 'classes/class.'.$class . '.php'; + if ( file_exists($classpath)) { + require_once $classpath; + } + + //if call from within admin adjust the path + $classpath = '../classes/class.'.$class . '.php'; + if ( file_exists($classpath)) { + require_once $classpath; + } + + //if call from within admin adjust the path + $classpath = '../../classes/class.'.$class . '.php'; + if ( file_exists($classpath)) { + require_once $classpath; + } + +} + +require_once(WEBPATH.'/classes/phpmailer/mail.php'); + +$user = new User($db); + +// On inclut le fichier de fonctions +// et les fichiers d'encodage et de décodage des torrents +require_once('functions.php'); +require_once('BDecode.php'); +require_once('BEncode.php'); + +?> diff --git a/Html/includes/footer.php b/Html/includes/footer.php new file mode 100644 index 0000000..1d1c808 --- /dev/null +++ b/Html/includes/footer.php @@ -0,0 +1,40 @@ +
+
+
+ +
+ + diff --git a/Html/includes/functions.php b/Html/includes/functions.php new file mode 100644 index 0000000..a46978e --- /dev/null +++ b/Html/includes/functions.php @@ -0,0 +1,385 @@ + 0) + return "$weeks semaine" . ($weeks > 1 ? "s" : ""); + if ($days > 0) + return "$days jour" . ($days > 1 ? "s" : ""); + if ($hours > 0) + return "$hours heure" . ($hours > 1 ? "s" : ""); + if ($mins > 0) + return "$mins min" . ($mins > 1 ? "s" : ""); + return "< 1 min"; +} + + +function buildTreeArray($files) +{ + $ret = array(); + + foreach ($files as $k => $v) + { + $filename=$v['filename']; + + $parts = preg_split('/\//', $filename, -1, PREG_SPLIT_NO_EMPTY); + $leaf = array_pop($parts); + + // build parent structure + $parent = &$ret; + foreach ($parts as $part) + { + $parent = &$parent[$part]; + } + + if (empty($parent[$leaf])) + { + $v['filename']=$leaf; + $parent[$leaf] = $v; + } + } + + return $ret; +} + + +function outputTree($files, $indent=1) +{ + //echo "$v) + { + $entry=isset($v['filename']) ? $v['filename'] : $k; + $size=$v['size']; + + if($indent==0) + { + // root + $is_folder=true; + } + elseif(is_array($v) && (!array_key_exists('filename',$v) && !array_key_exists('size',$v))) + { + // normal node + $is_folder=true; + } + else + { + // leaf node, i.e. a file + $is_folder=false; + } + + if($is_folder) + { + // we could output a folder icon here + } + else + { + // we could output an appropriate icon + // based on file extension here + $ext=pathinfo($entry,PATHINFO_EXTENSION); + } + + // echo ""; + + if(is_array($v) && $is_folder) + { + outputTree($v, ($indent+1)); + } + } + + //echo "
"; + echo $entry; // output folder name or filename + + if(!$is_folder) + { + // if it’s not a folder, show file size + echo " (".makesize($size).")"; + } + + //echo "
"; +} + + +function unesc($x) { + if (get_magic_quotes_gpc()) + return stripslashes($x); + return $x; +} + +/* +function benc($str) //bencoding +{ + if (is_string($str)) { //string + return strlen($str) . ':' . $str; + } + + if (is_numeric($str)) { //integer + return 'i' . $str . 'e'; + } + + if (is_array($str)) { + $ret_str = ''; //the return string + + $k = key($str); //we check the 1st key, if the key is 0 then is a list if not a dictionary + foreach($str as $var => $val) { + if ($k) { //is dictionary + $ret_str .= benc($var); //bencode the var + } + $ret_str .= benc($val); //we recursivly bencode the contents + } + + if ($k) { //is dictionary + return 'd' . $ret_str . 'e'; + } + + return 'l' . $ret_str . 'e'; + } +} + +function bdec_file($f, $ms) +{ + $fp = fopen($f, "rb"); + if (!$fp) + return; + $e = fread($fp, $ms); + fclose($fp); + return bdec($e); +} + +function bdec($str, &$_len = 0) //bdecoding +{ + $type = substr($str, 0, 1); + + if (is_numeric($type)) { + $type = 's'; + } + + switch ($type) { + case 'i': //integer + $p = strpos($str, 'e'); + $_len = $p + 1; //lenght of bencoded data + return intval(substr($str, 1, $p - 1)); + break; + + case 's': //string + $p = strpos($str, ':'); + $len = substr($str, 0, $p); + $_len = $len + $p + 1; //lenght of bencoded data + return substr($str, $p + 1, $len); + break; + + case 'l': //list + $l = 1; + $ret_array = array(); + while (substr($str, $l, 1) != 'e') { + $ret_array[] = bdec(substr($str, $l), $len); + $l += $len; + } + $_len = $l + 1; //lenght of bencoded data + return $ret_array; + break; + + case 'd': //dictionary + $l = 1; + $ret_array = array(); + while (substr($str, $l, 1) != 'e') { + $var = bdec(substr($str, $l), $len); + $l += $len; + + $ret_array[$var] = bdec(substr($str, $l), $len); + $l += $len; + } + $_len = $l + 1; //lenght of bencoded data + return $ret_array; + break; + } +} +*/ + + +function date_fr($format, $timestamp=false) { + if ( !$timestamp ) $date_en = date($format); + else $date_en = date($format,$timestamp); + + $texte_en = array( + "Monday", "Tuesday", "Wednesday", "Thursday", + "Friday", "Saturday", "Sunday", "January", + "February", "March", "April", "May", + "June", "July", "August", "September", + "October", "November", "December" + ); + $texte_fr = array( + "lundi", "mardi", "mercredi", "jeudi", + "vendredi", "samedi", "dimanche", "janvier", + "février", "mars", "avril", "mai", + "juin", "juillet", "août", "septembre", + "octobre", "novembre", "décembre" + ); + $date_fr = str_replace($texte_en, $texte_fr, $date_en); + + $texte_en = array( + "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", + "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", + "Aug", "Sep", "Oct", "Nov", "Dec" + ); + $texte_fr = array( + "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim", + "Jan", "Fév", "Mar", "Avr", "Mai", "Jui", + "Jui", "Aoû", "Sep", "Oct", "Nov", "Déc" + ); + $date_fr = str_replace($texte_en, $texte_fr, $date_fr); + + return $date_fr; +} + + +// --------------------------------------------------------------------- +// Générer un mot de passe aléatoire +// --------------------------------------------------------------------- +function fct_passwd( $chrs = "") +{ + if( $chrs == "" ) $chrs = 10; + $chaine = ""; + + $list = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghkmnpqrstuvwxyz!=$"; + mt_srand((double)microtime()*1000000); + $newstring=""; + + while( strlen( $newstring )< $chrs ) { + $newstring .= $list[mt_rand(0, strlen($list)-1)]; + } + return $newstring; + } + + +function get_extension($nom) { + $nom = explode(".", $nom); + $nb = count($nom); + return strtolower($nom[$nb-1]); +} + + +define('REPLACE_FLAGS', ENT_COMPAT | ENT_XHTML); + +function html($string) { + return htmlspecialchars($string, REPLACE_FLAGS, CHARSET); +} + + +function bbcode($input){ + $input = strip_tags($input); + $input = html($input); + + $search = array( + '/\[b\](.*?)\[\/b\]/is', + '/\[i\](.*?)\[\/i\]/is', + '/\[u\](.*?)\[\/u\]/is', + '/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/is', + '/\[url=(.*?)\](.*?)\[\/url\]/is', + '/\[color=(.*?)\](.*?)\[\/color\]/is', + '/\[size=(.*?)\](.*?)\[\/size\]/is', + '/\[code\](.*?)\[\/code\]/is', + '/\[quote\](.*?)\[\/quote\]/is', + '/\[center\](.*?)\[\/center\]/is', + '/\[right\](.*?)\[\/right\]/is', + '/\[justify\](.*?)\[\/justify\]/is' + ); + + $replace = array( + '$1', + '$1', + '$1', + '', + '$1', + '$2', + '$2', + '$1', + '
$1
', + '

$1

', + '

$1

', + '

$1

' + ); + + return preg_replace($search,$replace,$input); +} + + +function write_log($message, $db) { + + /* + // Check database connection + if(($db instanceof PDO) == false) { + return array(status => false, message => 'ERREUR : connexion MySQL non valide'); + } + */ + + // Check message + if($message == '') { + return array(status => false, message => 'Message vide'); + } + + // Get IP address + if( ($remote_addr = $_SERVER['REMOTE_ADDR']) == '') { + $remote_addr = "Adresse IP inconnue"; + } + + // Get requested script + if( ($request_uri = $_SERVER['REQUEST_URI']) == '') { + $request_uri = "Adresse inconnue"; + } + + // Mysql + $sql = "INSERT INTO blog_logs (remote_addr, request_uri, message) VALUES('$remote_addr', '$request_uri','$message')"; + + // Execute query and save data + $result = $db->query($sql); + if($result) { + return array(status => true, message => 'ok'); + } + else { + return array(status => false, message => 'ERREUR : écriture impossible dans la base de données.'); + } +} +?> diff --git a/Html/includes/header-logo.php b/Html/includes/header-logo.php new file mode 100644 index 0000000..0857700 --- /dev/null +++ b/Html/includes/header-logo.php @@ -0,0 +1,14 @@ + diff --git a/Html/includes/header.php b/Html/includes/header.php new file mode 100644 index 0000000..1f53595 --- /dev/null +++ b/Html/includes/header.php @@ -0,0 +1,158 @@ + + + + + <?php + if(isset($pagetitle)) { + echo SITENAMELONG .' - '. $pagetitle; + } + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Html/includes/nav.php b/Html/includes/nav.php new file mode 100644 index 0000000..d671c14 --- /dev/null +++ b/Html/includes/nav.php @@ -0,0 +1,10 @@ + diff --git a/Html/index.php b/Html/index.php new file mode 100644 index 0000000..92c81ce --- /dev/null +++ b/Html/index.php @@ -0,0 +1,176 @@ + + + + +
+ + + +
+
+ +
+ +
+ + + +
+

Les derniers torrents

+
+ +query('SELECT postHash FROM blog_posts_seo'); + + // On passe le nb d'enregistrements à $pages + $pages->set_total($stmt->rowCount()); + + $stmt = $db->query('SELECT postID,postHash,postTitle,postAuthor,postSlug,postDesc,postDate,postImage,postViews FROM blog_posts_seo ORDER BY postDate DESC '.$pages->get_limit()); + + while($row = $stmt->fetch()) { + echo '
'; + echo '
'; + echo ''.html($row['postTitle']).'
'; + sscanf($row['postDate'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde); + echo ''; + echo 'Date '.$jour.'-'.$mois.'-'.$annee.' Auteur '; + echo ''.html($row['postAuthor']).''; + + $stmt2 = $db->prepare(' + SELECT catTitle, catSlug FROM blog_cats, blog_post_cats + WHERE blog_cats.catID = blog_post_cats.catID AND blog_post_cats.postID = :postID'); + $stmt2->bindValue(':postID', $row['postID'], PDO::PARAM_INT); + $stmt2->execute(); + $catRow = $stmt2->fetchAll(PDO::FETCH_ASSOC); + + $links = array(); + foreach ($catRow as $cat) { + $links[] = $cat['catTitle']; + } + echo '  '; + + $max = 120; + $chaine = implode(", ", $links); + if (strlen($chaine) >= $max) { + $chaine = substr($chaine, 0, $max); + $espace = strrpos($chaine, ", "); + $chaine = substr($chaine, 0, $espace).' ...'; + } + + echo 'Catégories '.html($chaine).''; + echo ' Commentaires # '; + echo ' Licence '; + + $stmt4 = $db->prepare(' + SELECT licenceID,licenceTitle FROM blog_licences, blog_post_licences + WHERE blog_licences.licenceID = blog_post_licences.licenceID_BPL AND blog_post_licences.postID_BPL = :postID_BPL + ORDER BY licenceTitle ASC'); + $stmt4->bindValue(':postID_BPL', $row['postID'], PDO::PARAM_INT); + $stmt4->execute(); + $licenceRow = $stmt4->fetchALL(PDO::FETCH_ASSOC); + + $liclist = array(); + foreach($licenceRow as $lic) { + $liclist[] = $lic['licenceTitle']; + } + + $max = 30; + $chaine = implode(", ", $liclist); + if (strlen($chaine) >= $max) { + $chaine = substr($chaine, 0, $max); + $espace = strrpos($chaine, ", "); + $chaine = substr($chaine, 0, $espace).' [...] '; + } + echo html($chaine); + + echo ''; + echo 'Lectures Lu : '.html($row['postViews']).' fois'; + + echo ''; + echo '
'; + + echo '
'; + + if (!empty($row['postImage']) && file_exists($REP_IMAGES_TORRENTS.$row['postImage'])) { + echo ''.html($row['postTitle']).''; + } + else { + echo 'Image'; + } + + $max = 500; + $chaine = $row['postDesc']; + if (strlen($chaine) >= $max) { + $chaine = substr($chaine, 0, $max); + $espace = strrpos($chaine, " "); + $chaine = substr($chaine, 0, $espace).' ...'; + } + + echo '

'.nl2br(bbcode(html($chaine))).'

'; + echo '

'; + echo '
'; + } + + } + + catch(PDOException $e) { + echo $e->getMessage(); + } + + echo '
'; + echo $pages->page_links(); + echo '
'; + ?> + +
+ + + +
+
+
+ + + + + + + diff --git a/Html/infosite.php b/Html/infosite.php new file mode 100644 index 0000000..7e6ad6d --- /dev/null +++ b/Html/infosite.php @@ -0,0 +1,157 @@ + + + + +
+ + + +
+
+ + + +
+ +
Les 5 derniers torrents :
+
+ + + + + + + + query('SELECT blog_posts_seo.postID,blog_posts_seo.postHash,blog_posts_seo.postTitle,blog_posts_seo.postSlug,xbt_files.seeders,xbt_files.leechers FROM blog_posts_seo,xbt_files WHERE blog_posts_seo.postID = xbt_files.fid ORDER BY postID DESC LIMIT 5'); + while($row = $stmt->fetch()){ + echo ''; + echo ' + + + + '; + echo ''; + } + ?> + +
Nom du torrentSeedersLeechers
'.html($row['postTitle']).''.html($row['seeders']).''.html($row['leechers']).'
+ +

+ +
Les 5 torrents les plus populaires :
+
+ + + + + + + query('SELECT postSlug,postTitle,postAuthor,postDate,postViews FROM blog_posts_seo ORDER BY postViews DESC LIMIT 5'); + while($row = $stmt->fetch()) { + echo ''; + echo ' + + + '; + echo ''; + } + ?> + +
Nom du torrentNb de vues
'.html($row['postTitle']).''.html($row['postViews']).'
+ + query('SELECT blog_posts_seo.postID,blog_posts_seo.postHash,blog_posts_seo.postTitle,blog_posts_seo.postSlug,xbt_files.fid,xbt_files.seeders,xbt_files.leechers FROM blog_posts_seo,xbt_files WHERE blog_posts_seo.postID = xbt_files.fid AND xbt_files.seeders = 0 AND xbt_files.leechers > 0 ORDER BY postID DESC LIMIT 5'); + $count = $stmt->rowCount(); + + if (!empty($count)) { + ?> + +

+ +
Torrents qui ont besoin de seeds :
+
+ + + + + + + + fetch()) { + echo ''; + echo ' + + + + '; + echo ''; + } + ?> + +
Nom du torrentSeedersLeechers
'.html($row['postTitle']).''.html($row['seeders']).''.html($row['leechers']).'
+ + + +

+ +
Les 5 torrents les plus actifs :
+
+ + + + + + + + query('SELECT blog_posts_seo.postID,blog_posts_seo.postHash,blog_posts_seo.postTitle,blog_posts_seo.postSlug,xbt_files.seeders,xbt_files.leechers FROM blog_posts_seo,xbt_files WHERE blog_posts_seo.postID = xbt_files.fid ORDER BY xbt_files.seeders DESC LIMIT 5'); + while($row = $stmt->fetch()){ + echo ''; + echo ' + + + + '; + echo ''; + } + ?> + +
Nom du torrentSeedersLeechers
'.html($row['postTitle']).''.html($row['seeders']).''.html($row['leechers']).'
+ +
+ + + +
+ + + +
+
+
+ + + + + diff --git a/Html/js/.htaccess b/Html/js/.htaccess new file mode 100644 index 0000000..5a928f6 --- /dev/null +++ b/Html/js/.htaccess @@ -0,0 +1 @@ +Options -Indexes diff --git a/Html/js/SCEditor/emoticons/alien.png b/Html/js/SCEditor/emoticons/alien.png new file mode 100644 index 0000000..58a0767 Binary files /dev/null and b/Html/js/SCEditor/emoticons/alien.png differ diff --git a/Html/js/SCEditor/emoticons/angel.png b/Html/js/SCEditor/emoticons/angel.png new file mode 100644 index 0000000..4792225 Binary files /dev/null and b/Html/js/SCEditor/emoticons/angel.png differ diff --git a/Html/js/SCEditor/emoticons/angry.png b/Html/js/SCEditor/emoticons/angry.png new file mode 100644 index 0000000..7bec8e4 Binary files /dev/null and b/Html/js/SCEditor/emoticons/angry.png differ diff --git a/Html/js/SCEditor/emoticons/blink.png b/Html/js/SCEditor/emoticons/blink.png new file mode 100644 index 0000000..ff529f1 Binary files /dev/null and b/Html/js/SCEditor/emoticons/blink.png differ diff --git a/Html/js/SCEditor/emoticons/blush.png b/Html/js/SCEditor/emoticons/blush.png new file mode 100644 index 0000000..8ff7d1d Binary files /dev/null and b/Html/js/SCEditor/emoticons/blush.png differ diff --git a/Html/js/SCEditor/emoticons/cheerful.png b/Html/js/SCEditor/emoticons/cheerful.png new file mode 100644 index 0000000..c7c5cb8 Binary files /dev/null and b/Html/js/SCEditor/emoticons/cheerful.png differ diff --git a/Html/js/SCEditor/emoticons/cool.png b/Html/js/SCEditor/emoticons/cool.png new file mode 100644 index 0000000..d21c544 Binary files /dev/null and b/Html/js/SCEditor/emoticons/cool.png differ diff --git a/Html/js/SCEditor/emoticons/credits.txt b/Html/js/SCEditor/emoticons/credits.txt new file mode 100644 index 0000000..96b3e7a --- /dev/null +++ b/Html/js/SCEditor/emoticons/credits.txt @@ -0,0 +1,9 @@ +Presenting, Nomicons: The Full Monty :o + +Credits: +Oscar Gruno, aka Nominell v. 2.0 -> oscargruno@mac.com +Andy Fedosjeenko, aka Nightwolf -> bobo@animevanguard.com + +Copyright (C) 2001-Infinity, Oscar Gruno & Andy Fedosjeenko + +You can redistribute these files as much as you like, as long as you keep this file with them and give us the proper credit. You may even rape them if you please, just give us credit for our work. \ No newline at end of file diff --git a/Html/js/SCEditor/emoticons/cwy.png b/Html/js/SCEditor/emoticons/cwy.png new file mode 100644 index 0000000..58ee08f Binary files /dev/null and b/Html/js/SCEditor/emoticons/cwy.png differ diff --git a/Html/js/SCEditor/emoticons/devil.png b/Html/js/SCEditor/emoticons/devil.png new file mode 100644 index 0000000..7d8226a Binary files /dev/null and b/Html/js/SCEditor/emoticons/devil.png differ diff --git a/Html/js/SCEditor/emoticons/dizzy.png b/Html/js/SCEditor/emoticons/dizzy.png new file mode 100644 index 0000000..8218464 Binary files /dev/null and b/Html/js/SCEditor/emoticons/dizzy.png differ diff --git a/Html/js/SCEditor/emoticons/ermm.png b/Html/js/SCEditor/emoticons/ermm.png new file mode 100644 index 0000000..122c10f Binary files /dev/null and b/Html/js/SCEditor/emoticons/ermm.png differ diff --git a/Html/js/SCEditor/emoticons/face.png b/Html/js/SCEditor/emoticons/face.png new file mode 100644 index 0000000..04ad4b7 Binary files /dev/null and b/Html/js/SCEditor/emoticons/face.png differ diff --git a/Html/js/SCEditor/emoticons/getlost.png b/Html/js/SCEditor/emoticons/getlost.png new file mode 100644 index 0000000..ac87dce Binary files /dev/null and b/Html/js/SCEditor/emoticons/getlost.png differ diff --git a/Html/js/SCEditor/emoticons/grin.png b/Html/js/SCEditor/emoticons/grin.png new file mode 100644 index 0000000..69cf5a3 Binary files /dev/null and b/Html/js/SCEditor/emoticons/grin.png differ diff --git a/Html/js/SCEditor/emoticons/happy.png b/Html/js/SCEditor/emoticons/happy.png new file mode 100644 index 0000000..54b9131 Binary files /dev/null and b/Html/js/SCEditor/emoticons/happy.png differ diff --git a/Html/js/SCEditor/emoticons/heart.png b/Html/js/SCEditor/emoticons/heart.png new file mode 100644 index 0000000..451058d Binary files /dev/null and b/Html/js/SCEditor/emoticons/heart.png differ diff --git a/Html/js/SCEditor/emoticons/kissing.png b/Html/js/SCEditor/emoticons/kissing.png new file mode 100644 index 0000000..28d7752 Binary files /dev/null and b/Html/js/SCEditor/emoticons/kissing.png differ diff --git a/Html/js/SCEditor/emoticons/laughing.png b/Html/js/SCEditor/emoticons/laughing.png new file mode 100644 index 0000000..d65f35e Binary files /dev/null and b/Html/js/SCEditor/emoticons/laughing.png differ diff --git a/Html/js/SCEditor/emoticons/ninja.png b/Html/js/SCEditor/emoticons/ninja.png new file mode 100644 index 0000000..952f811 Binary files /dev/null and b/Html/js/SCEditor/emoticons/ninja.png differ diff --git a/Html/js/SCEditor/emoticons/pinch.png b/Html/js/SCEditor/emoticons/pinch.png new file mode 100644 index 0000000..f6f6e53 Binary files /dev/null and b/Html/js/SCEditor/emoticons/pinch.png differ diff --git a/Html/js/SCEditor/emoticons/pouty.png b/Html/js/SCEditor/emoticons/pouty.png new file mode 100644 index 0000000..f3cef70 Binary files /dev/null and b/Html/js/SCEditor/emoticons/pouty.png differ diff --git a/Html/js/SCEditor/emoticons/sad.png b/Html/js/SCEditor/emoticons/sad.png new file mode 100644 index 0000000..d08666e Binary files /dev/null and b/Html/js/SCEditor/emoticons/sad.png differ diff --git a/Html/js/SCEditor/emoticons/shocked.png b/Html/js/SCEditor/emoticons/shocked.png new file mode 100644 index 0000000..f3dfb11 Binary files /dev/null and b/Html/js/SCEditor/emoticons/shocked.png differ diff --git a/Html/js/SCEditor/emoticons/sick.png b/Html/js/SCEditor/emoticons/sick.png new file mode 100644 index 0000000..3a47381 Binary files /dev/null and b/Html/js/SCEditor/emoticons/sick.png differ diff --git a/Html/js/SCEditor/emoticons/sideways.png b/Html/js/SCEditor/emoticons/sideways.png new file mode 100644 index 0000000..b3dd09a Binary files /dev/null and b/Html/js/SCEditor/emoticons/sideways.png differ diff --git a/Html/js/SCEditor/emoticons/silly.png b/Html/js/SCEditor/emoticons/silly.png new file mode 100644 index 0000000..d4497d9 Binary files /dev/null and b/Html/js/SCEditor/emoticons/silly.png differ diff --git a/Html/js/SCEditor/emoticons/sleeping.png b/Html/js/SCEditor/emoticons/sleeping.png new file mode 100644 index 0000000..2b97a80 Binary files /dev/null and b/Html/js/SCEditor/emoticons/sleeping.png differ diff --git a/Html/js/SCEditor/emoticons/smile.png b/Html/js/SCEditor/emoticons/smile.png new file mode 100644 index 0000000..c11821e Binary files /dev/null and b/Html/js/SCEditor/emoticons/smile.png differ diff --git a/Html/js/SCEditor/emoticons/tongue.png b/Html/js/SCEditor/emoticons/tongue.png new file mode 100644 index 0000000..73da3e3 Binary files /dev/null and b/Html/js/SCEditor/emoticons/tongue.png differ diff --git a/Html/js/SCEditor/emoticons/unsure.png b/Html/js/SCEditor/emoticons/unsure.png new file mode 100644 index 0000000..87c7599 Binary files /dev/null and b/Html/js/SCEditor/emoticons/unsure.png differ diff --git a/Html/js/SCEditor/emoticons/w00t.png b/Html/js/SCEditor/emoticons/w00t.png new file mode 100644 index 0000000..fa08831 Binary files /dev/null and b/Html/js/SCEditor/emoticons/w00t.png differ diff --git a/Html/js/SCEditor/emoticons/wassat.png b/Html/js/SCEditor/emoticons/wassat.png new file mode 100644 index 0000000..201733b Binary files /dev/null and b/Html/js/SCEditor/emoticons/wassat.png differ diff --git a/Html/js/SCEditor/emoticons/whistling.png b/Html/js/SCEditor/emoticons/whistling.png new file mode 100644 index 0000000..3940f0d Binary files /dev/null and b/Html/js/SCEditor/emoticons/whistling.png differ diff --git a/Html/js/SCEditor/emoticons/wink.png b/Html/js/SCEditor/emoticons/wink.png new file mode 100644 index 0000000..3d1a9cc Binary files /dev/null and b/Html/js/SCEditor/emoticons/wink.png differ diff --git a/Html/js/SCEditor/emoticons/wub.png b/Html/js/SCEditor/emoticons/wub.png new file mode 100644 index 0000000..d5faa2b Binary files /dev/null and b/Html/js/SCEditor/emoticons/wub.png differ diff --git a/Html/js/SCEditor/jquery.sceditor.bbcode.min.js b/Html/js/SCEditor/jquery.sceditor.bbcode.min.js new file mode 100644 index 0000000..0fde818 --- /dev/null +++ b/Html/js/SCEditor/jquery.sceditor.bbcode.min.js @@ -0,0 +1,4 @@ +/* SCEditor v1.5.1 | (C) 2016, Sam Clarke | sceditor.com/license */ +!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d;d=function(a){"use strict";var b=c(1),d=c(2),e=c(3),f=c(6),g=c(7);b.sceditor=d,d.commands=c(9),d.defaultOptions=c(10),d.RangeHelper=c(4),d.dom=c(5),d.ie=f.ie,d.ios=f.ios,d.isWysiwygSupported=f.isWysiwygSupported,d.regexEscape=g.regex,d.escapeEntities=g.entities,d.escapeUriScheme=g.uriScheme,d.PluginManager=e,d.plugins=e.plugins,b.fn.sceditor=function(a){var c,e,g=[];if(a=a||{},a.runWithoutWysiwygSupport||f.isWysiwygSupported)return this.each(function(){c=this.jquery?this:b(this),e=c.data("sceditor"),c.parents(".sceditor-container").length>0||("state"===a?g.push(!!e):"instance"===a?g.push(e):e||new d(this,a))}),g.length?1===g.length?g[0]:b(g):this}}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b){a.exports=jQuery},function(a,b,c){var d;d=function(a){"use strict";var b=c(1),d=c(3),e=c(4),f=c(5),g=c(7),h=c(6),i=c(8),j=window,k=document,l=b(j),m=b(k),n=h.ie,o=n&&n<11,p=function(a,c){var q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua=this,va=a.get?a.get(0):a,wa=b(va),xa=[],ya=[],za=[],Aa={},Ba=[],Ca={};ua.commands=b.extend(!0,{},c.commands||p.commands),ua.opts=c=b.extend({},p.defaultOptions,c),K=function(){wa.data("sceditor",ua),b.each(c,function(a,d){b.isPlainObject(d)&&(c[a]=b.extend(!0,{},d))}),c.locale&&"en"!==c.locale&&Q(),q=b('
').insertAfter(wa).css("z-index",c.zIndex),n&&q.addClass("ie ie"+n),H=!!wa.attr("required"),wa.removeAttr("required"),P(),W(),R(),O(!!c.startInSourceMode),U(),S(),T(),h.isWysiwygSupported||ua.toggleSourceMode(),ha();var a=function(){l.off("load",a),c.autofocus&&ma(),c.autoExpand&&ua.expandToContent(),fa(),C.call("ready")};l.on("load",a),k.readyState&&"complete"===k.readyState&&a()},P=function(){var a=c.plugins;a=a?a.toString().split(","):[],C=new d(ua),b.each(a,function(a,c){C.register(b.trim(c))})},Q=function(){var a;A=p.locale[c.locale],A||(a=c.locale.split("-"),A=p.locale[a[0]]),A&&A.dateFormat&&(c.dateFormat=A.dateFormat)},O=function(a){var d,f;w=b(""),s=b(''),a?(q.addClass("sourceMode"),s.hide()):(q.addClass("wysiwygMode"),w.hide()),c.spellcheck||w.attr("spellcheck","false"),"https:"===j.location.protocol&&s.attr("src","javascript:false"),q.append(s).append(w),t=s[0],x=w[0],ua.dimensions(c.width||wa.width(),c.height||wa.height()),d=X(),d.open(),d.write(i("html",{attrs:n?' class="ie ie'+n+'"':"",spellcheck:c.spellcheck?"":'spellcheck="false"',charset:c.charset,style:c.style})),d.close(),v=b(d),u=b(d.body),ua.readOnly(!!c.readOnly),(h.ios||n)&&(u.height("100%"),n||u.on("touchend",ua.focus)),f=wa.attr("tabindex"),w.attr("tabindex",f),s.attr("tabindex",f),B=new e(t.contentWindow),ua.val(wa.hide().val())},S=function(){c.autoUpdate&&(u.on("blur",ta),w.on("blur",ta)),null===c.rtl&&(c.rtl="rtl"===w.css("direction")),ua.rtl(!!c.rtl),c.autoExpand&&v.on("keyup",ua.expandToContent),c.resizeEnabled&&V(),q.attr("id",c.id),ua.emoticons(c.emoticonsEnabled)},T=function(){var a=n?"selectionchange":"keyup focus blur contextmenu mouseup touchend click",d="keydown keyup keypress focus blur contextmenu";m.click(ea),b(va.form).on("reset",ba).submit(ua.updateOriginal),l.on("resize orientationChanged",fa),u.keypress(aa).keydown($).keydown(_).keyup(ja).blur(ra).keyup(sa).on("paste",Y).on(a,ka).on(d,da),c.emoticonsCompat&&j.getSelection&&u.keyup(oa),w.blur(ra).keyup(sa).keydown($).on(d,da),v.mousedown(ca).blur(ra).on(a,ka).on("beforedeactivate keyup mouseup",N).keyup(ja).focus(function(){z=null}),q.on("selectionchanged",la).on("selectionchanged",ha).on("selectionchanged valuechanged nodechanged",da)},R=function(){var a,d=ua.commands,e=(c.toolbarExclude||"").split(","),f=c.toolbar.split("|");r=b('
'),b.each(f,function(c,f){a=b('
'),b.each(f.split(","),function(c,f){var g,h,j=d[f];!j||b.inArray(f,e)>-1||(h=j.shortcut,g=i("toolbarButton",{name:f,dispName:ua._(j.name||j.tooltip||f)},!0),g.data("sceditor-txtmode",!!j.txtExec).data("sceditor-wysiwygmode",!!j.exec).toggleClass("disabled",!j.exec).mousedown(function(){(!n||n<9)&&(J=!0)}).click(function(){var a=b(this);return a.hasClass("disabled")||M(a,j),ha(),!1}),j.tooltip&&g.attr("title",ua._(j.tooltip)+(h?" ("+h+")":"")),h&&ua.addShortcut(h,f),j.state?za.push({name:f,state:j.state}):"string"==typeof j.exec&&za.push({name:f,state:j.exec}),a.append(g),Ca[f]=g)}),a[0].firstChild&&r.append(a)}),b(c.toolbarContainer||q).append(r)},U=function(){b.each(ua.commands,function(a,c){c.forceNewLineAfter&&b.isArray(c.forceNewLineAfter)&&(ya=b.merge(ya,c.forceNewLineAfter))}),ja()},V=function(){var a,d,e,f,g,h,i=b('
'),k=b('
'),l="touchmove mousemove",o="touchcancel touchend mouseup",p=0,r=0,s=0,t=0,u=0,v=0,w=q.width(),x=q.height(),y=!1,z=ua.rtl();a=c.resizeMinHeight||x/1.5,d=c.resizeMaxHeight||2.5*x,e=c.resizeMinWidth||w/1.25,f=c.resizeMaxWidth||1.25*w,g=function(b){"touchmove"===b.type?(b=j.event,s=b.changedTouches[0].pageX,t=b.changedTouches[0].pageY):(s=b.pageX,t=b.pageY);var g=v+(t-r),h=z?u-(s-p):u+(s-p);f>0&&h>f&&(h=f),e>0&&h0&&g>d&&(g=d),a>0&&g-1&&(a=q.width()),s.width(a-s.data("outerWidthOffset")),w.width(a-w.data("outerWidthOffset")),h.ios&&u&&u.width(a-s.data("outerWidthOffset")-(u.outerWidth(!0)-u.width()))),b!==!1&&(d!==!1&&(c.height=b),b&&b.toString().indexOf("%")>-1&&(b=q.height(b).height(),q.height("auto")),b-=c.toolbarContainer?0:r.outerHeight(!0),s.height(b-s.data("outerHeightOffset")),w.height(b-f-w.data("outerHeightOffset"))),ua)},ua.updateStyleCache=function(){s.data("outerWidthOffset",s.outerWidth(!0)-s.width()),w.data("outerWidthOffset",w.outerWidth(!0)-w.width()),s.data("outerHeightOffset",s.outerHeight(!0)-s.height()),w.data("outerHeightOffset",w.outerHeight(!0)-w.height())},ua.height=function(a,b){return a||0===a?(ua.dimensions(null,a,b),ua):q.height()},ua.maximize=function(a){return"undefined"==typeof a?q.is(".sceditor-maximize"):(a=!!a,n<7&&b("html, body").toggleClass("sceditor-maximize",a),q.toggleClass("sceditor-maximize",a),ua.width(a?"100%":c.width,!1),ua.height(a?"100%":c.height,!1),ua)},ua.expandToContent=function(a){var b=q.height(),d=b-s.height(),e=u[0].scrollHeight||v[0].documentElement.scrollHeight,f=c.resizeMaxHeight||2*(c.height||wa.height());e+=d,(a===!0||e<=f)&&e>b&&ua.height(e)},ua.destroy=function(){C&&(C.destroy(),B=null,z=null,C=null,y&&y.off().remove(),m.off("click",ea),l.off("resize orientationChanged",fa),b(va.form).off("reset",ba).off("submit",ua.updateOriginal),u.off(),v.off().find("*").remove(),w.off().remove(),r.remove(),q.off().find("*").off().remove(),q.remove(),wa.removeData("sceditor").removeData("sceditorbbcode").show(),H&&wa.attr("required","required"))},ua.createDropDown=function(a,d,e,f){var g,h="sceditor-"+d,i=y&&y.is("."+h);ua.closeDropDown(!0),i||(f!==!1&&b(e).find(":not(input,textarea)").filter(function(){return 1===this.nodeType}).attr("unselectable","on"),g={top:a.offset().top,left:a.offset().left,marginTop:a.outerHeight()},b.extend(g,c.dropDownCss),y=b('
').css(g).append(e).appendTo(b("body")).on("click focusin",function(a){a.stopPropagation()}),setTimeout(function(){y&&y.find("input,textarea").first().focus()}))},ea=function(a){3!==a.which&&y&&(ta(),ua.closeDropDown())},Y=function(a){var b,d,e,f=u[0],g=v[0],h=0,i=k.createElement("div"),j=g.createDocumentFragment(),l=!!a&&a.clipboardData;if(c.disablePasting)return!1;if(c.enablePasteFiltering){if(B.saveRange(),k.body.appendChild(i),l&&l.getData&&((b=l.getData("text/html"))||(b=l.getData("text/plain"))))return i.innerHTML=b,Z(f,i),!1;for(e=u.scrollTop()||v.scrollTop();f.firstChild;)j.appendChild(f.firstChild);return d=function(a,b){if(a.childNodes.length>0||h>25){for(;a.firstChild;)b.appendChild(a.firstChild);for(;j.firstChild;)a.appendChild(j.firstChild);u.scrollTop(e),v.scrollTop(e),b.childNodes.length>0?Z(a,b):B.restoreRange()}else h++,setTimeout(function(){d(a,b)},20)},d(f,i),ua.focus(),!0}},Z=function(a,c){f.fixNesting(c);var d=c.innerHTML;C.hasHandler("toSource")&&(d=C.callOnlyFirst("toSource",d,b(c))),c.parentNode.removeChild(c),C.hasHandler("toWysiwyg")&&(d=C.callOnlyFirst("toWysiwyg",d,!0)),B.restoreRange(),ua.wysiwygEditorInsertHtml(d,null,!0)},ua.closeDropDown=function(a){y&&(y.off().remove(),y=null),a===!0&&ua.focus()},X=function(){return t.contentDocument?t.contentDocument:t.contentWindow&&t.contentWindow.document?t.contentWindow.document:t.document},ua.wysiwygEditorInsertHtml=function(a,c,d){var e,g,h,i=s.height();ua.focus(),(d||!b(E).is("code")&&0===b(E).parents("code").length)&&(B.insertHTML(a,c),B.saveRange(),L(u[0]),e=u.find("#sceditor-end-marker").show(),g=u.scrollTop()||v.scrollTop(),h=f.getOffset(e[0]).top+1.5*e.outerHeight(!0)-i,e.hide(),(h>g||h+i").appendTo(b("body")).hide().html(g);d!==!1&&C.hasHandler("toSource")&&(g=C.callOnlyFirst("toSource",g,h)),h.remove(),a+=g+c}return d!==!1&&C.hasHandler("toWysiwyg")&&(a=C.callOnlyFirst("toWysiwyg",a,!0)),d!==!1&&f===!0&&(a=a.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")),ua.wysiwygEditorInsertHtml(a),ua},ua.getWysiwygEditorValue=function(a){var c,d=b("
").appendTo(document.body).append(b(u[0].childNodes).clone());return f.fixNesting(d[0]),c=d.html(),a!==!1&&C.hasHandler("toSource")&&(c=C.callOnlyFirst("toSource",c,d)),d.remove(),c},ua.getBody=function(){return u},ua.getContentAreaContainer=function(){return s},ua.getSourceEditorValue=function(a){var b=w.val();return a!==!1&&C.hasHandler("toWysiwyg")&&(b=C.callOnlyFirst("toWysiwyg",b)),b},ua.setWysiwygEditorValue=function(a){a||(a="

"+(n?"":"
")+"

"),u[0].innerHTML=a,L(u[0]),ja(),qa()},ua.setSourceEditorValue=function(a){w.val(a),qa()},ua.updateOriginal=function(){wa.val(ua.val())},L=function(a){if(c.emoticonsEnabled&&!b(a).parents("code").length){var d=a.ownerDocument,e="\\s| | | | | ",h=[],j=[],k=b.extend({},c.emoticons.more,c.emoticons.dropdown,c.emoticons.hidden);b.each(k,function(a){c.emoticonsCompat&&(j[a]=new RegExp("(>|^|"+e+")"+g.regex(a)+"($|<|"+e+")")),h.push(a)});var l=function(a){for(a=a.firstChild;a;){var e,g,m,n,o,p,q,r=a.parentNode,s=a.nodeValue;if(3!==a.nodeType)b(a).is("code")||l(a);else if(s)for(o=h.length;o--;)g=h[o],q=c.emoticonsCompat?s.search(j[g]):s.indexOf(g),q>-1&&(p=a.nextSibling,m=k[g],e=s.substr(q).split(g),s=s.substr(0,q)+e.shift(),a.nodeValue=s,n=f.parseHTML(i("emoticon",{key:g,url:m.url||m,tooltip:m.tooltip||g}),d),r.insertBefore(n[0],p),r.insertBefore(d.createTextNode(e.join(g)),p));a=a.nextSibling}};l(a),c.emoticonsCompat&&(Ba=u.find("img[data-sceditor-emoticon]"))}},ua.inSourceMode=function(){return q.hasClass("sourceMode")},ua.sourceMode=function(a){var b=ua.inSourceMode();return"boolean"!=typeof a?b:((b&&!a||!b&&a)&&ua.toggleSourceMode(),ua)},ua.toggleSourceMode=function(){var a=ua.inSourceMode();!h.isWysiwygSupported&&a||(a||(B.saveRange(),B.clear()),ua.blur(),a?ua.setWysiwygEditorValue(ua.getSourceEditorValue()):ua.setSourceEditorValue(ua.getWysiwygEditorValue()),z=null,w.toggle(),s.toggle(),q.toggleClass("wysiwygMode",a).toggleClass("sourceMode",!a),ga(),ha())},ia=function(){return x.focus(),"undefined"!=typeof x.selectionStart?x.value.substring(x.selectionStart,x.selectionEnd):k.selection.createRange().text},M=function(a,c){ua.inSourceMode()?c.txtExec&&(b.isArray(c.txtExec)?ua.sourceEditorInsertText.apply(ua,c.txtExec):c.txtExec.call(ua,a,ia())):c.exec&&(b.isFunction(c.exec)?c.exec.call(ua,a):ua.execCommand(c.exec,c.hasOwnProperty("execParam")?c.execParam:null))},N=function(){n&&(z=B.selectedRange())},ua.execCommand=function(a,c){var d=!1,e=ua.commands[a],f=b(B.parentNode());if(ua.focus(),!f.is("code")&&0===f.parents("code").length){try{d=v[0].execCommand(a,!1,c)}catch(a){}!d&&e&&e.errorMessage&&alert(ua._(e.errorMessage)),ha()}},ka=function(){function a(){B&&!B.compare(F)&&(F=B.cloneSelected(),q.trigger(b.Event("selectionchanged"))),G=!1}G||(G=!0,n?a():setTimeout(a,100))},la=function(){var a,c=B.parentNode();D!==c&&(a=D,D=c,E=B.getFirstBlockParent(c),q.trigger(b.Event("nodechanged",{oldNode:a,newNode:D})))},ua.currentNode=function(){return D},ua.currentBlockNode=function(){return E},ha=function(a){var b,c,d="active",e=v[0],f=ua.sourceMode();if(ua.readOnly())return void r.find(d).removeClass(d);f||(c=a?a.newNode:B.parentNode(),b=B.getFirstBlockParent(c));for(var g=0;g-1&&(h=e.queryCommandState(j)?1:0)}catch(a){}}else k||(h=j.call(ua,c,b));i.toggleClass("disabled",k||h<0).toggleClass(d,h>0)}},aa=function(a){var c,d,e,g,h="code,blockquote,pre",i="li,ul,ol";if(!a.originalEvent.defaultPrevented)return ua.closeDropDown(),c=b(E).closest(h+","+i).first(),13===a.which&&c.length&&!c.is(i)?(z=null,d=v[0].createElement("br"),B.insertNode(d),o||(e=d.parentNode,g=e.lastChild,g&&3===g.nodeType&&""===g.nodeValue&&(e.removeChild(g),g=e.lastChild),!f.isInline(e,!0)&&g===d&&f.isInline(d.previousSibling)&&B.insertHTML("
")),!1):void 0},ja=function(){var a,c,d,e=u[0];f.rTraverse(e,function(g){if(a=g.nodeName.toLowerCase(),b.inArray(a,ya)>-1&&(c=!0),3===g.nodeType&&!/^\s*$/.test(g.nodeValue)||"br"===a||o&&!g.firstChild&&!f.isInline(g,!1))return c&&(d=v[0].createElement("p"),d.className="sceditor-nlf",d.innerHTML=o?"":"
",e.appendChild(d)),!1})},ba=function(){ua.val(wa.val())},ca=function(){ua.closeDropDown(),z=null},fa=function(){var a=c.height,b=c.width;ua.maximize()?ua.dimensions("100%","100%",!1):(a&&a.toString().indexOf("%")>-1||b&&b.toString().indexOf("%")>-1)&&ua.dimensions(b,a)},ua._=function(){var a,b=arguments;return A&&A[b[0]]&&(b[0]=A[b[0]]),b[0].replace(/\{(\d+)\}/g,function(c,d){return b[d-0+1]!==a?b[d-0+1]:"{"+d+"}"})},da=function(a){C.call(a.type+"Event",a,ua);var c=a.target===x?"scesrc":"scewys",d=b.Event(a);d.type=c+a.type,q.trigger(d,ua)},ua.bind=function(a,c,d,e){a=a.split(" ");for(var f=a.length;f--;)b.isFunction(c)&&(d||q.on("scewys"+a[f],c),e||q.on("scesrc"+a[f],c),"valuechanged"===a[f]&&(qa.hasHandler=!0));return ua},ua.unbind=function(a,c,d,e){a=a.split(" ");for(var f=a.length;f--;)b.isFunction(c)&&(d||q.off("scewys"+a[f],c),e||q.off("scesrc"+a[f],c));return ua},ua.blur=function(a,c,d){return b.isFunction(a)?ua.bind("blur",a,c,d):ua.sourceMode()?w.blur():u.blur(),ua},ua.focus=function(a,c,d){if(b.isFunction(a))ua.bind("focus",a,c,d);else if(ua.inSourceMode())x.focus();else{var e,f=B.selectedRange();F||B.hasSelection()||ma(),!o&&f&&1===f.endOffset&&f.collapsed&&(e=f.endContainer,e&&1===e.childNodes.length&&b(e.firstChild).is("br")&&(f.setStartBefore(e.firstChild),f.collapse(!0),B.selectRange(f))),t.contentWindow.focus(),u[0].focus(),z&&(B.selectRange(z),z=null)}return ha(),ua},ua.keyDown=function(a,b,c){return ua.bind("keydown",a,b,c)},ua.keyPress=function(a,b,c){return ua.bind("keypress",a,b,c)},ua.keyUp=function(a,b,c){return ua.bind("keyup",a,b,c)},ua.nodeChanged=function(a){return ua.bind("nodechanged",a,!1,!0)},ua.selectionChanged=function(a){return ua.bind("selectionchanged",a,!1,!0)},ua.valueChanged=function(a,b,c){return ua.bind("valuechanged",a,b,c)},na=function(a){var d,e=0,f=ua.emoticonsCache,g=String.fromCharCode(a.which);if(!b(E).is("code")&&!b(E).parents("code").length)return f||(f=[],b.each(b.extend({},c.emoticons.more,c.emoticons.dropdown,c.emoticons.hidden),function(a,b){f[e++]=[a,i("emoticon",{key:a,url:b.url||b,tooltip:b.tooltip||a})]}),f.sort(function(a,b){return a[0].length-b[0].length}),ua.emoticonsCache=f,ua.longestEmoticonCode=f[f.length-1][0].length),d=B.replaceKeyword(ua.emoticonsCache,!0,!0,ua.longestEmoticonCode,c.emoticonsCompat,g),d&&c.emoticonsCompat?(Ba=u.find("img[data-sceditor-emoticon]"),/^\s$/.test(g)):!d},oa=function(){if(Ba.length){var a,c,d,e,f,g,h=ua.currentBlockNode(),i=!1,j=/[^\s\xA0\u2002\u2003\u2009\u00a0]+/;Ba=b.map(Ba,function(k){return k&&k.parentNode?b.contains(h,k)?(a=k.previousSibling,c=k.nextSibling,f=a.nodeValue,null===f&&(f=a.innerText||""),a&&j.test(a.nodeValue.slice(-1))||c&&j.test((c.nodeValue||"")[0])?(d=k.parentNode,e=B.cloneSelected(),g=e.startContainer,f+=b(k).data("sceditor-emoticon"),g===c?i=f.length+e.startOffset:g===h&&h.childNodes[e.startOffset]===c?i=f.length:g===a&&(i=e.startOffset),c&&3===c.nodeType||(c=d.insertBefore(d.ownerDocument.createTextNode(""),c)),c.insertData(0,f),d.removeChild(a),d.removeChild(k),i!==!1&&(e.setStart(c,i),e.collapse(!0),B.selectRange(e)),null):k):k:null})}},ua.emoticons=function(a){return a||a===!1?(c.emoticonsEnabled=a,a?(u.keypress(na),ua.sourceMode()||(B.saveRange(),L(u[0]),Ba=u.find("img[data-sceditor-emoticon]"),qa(!1),B.restoreRange())):(u.find("img[data-sceditor-emoticon]").replaceWith(function(){return b(this).data("sceditor-emoticon")}),Ba=[],u.off("keypress",na),qa()),ua):c.emoticonsEnabled},ua.css=function(a){return I||(I=b('

',toolbarButton:'
{dispName}
',emoticon:'{key}',fontOpt:'{font}',sizeOpt:'{size}',pastetext:'
',table:'
',image:'
',email:'
',link:'
',youtubeMenu:'
',youtube:''};return function(b,c,d){var e=a[b];return $.each(c,function(a,b){e=e.replace(new RegExp("\\{"+a+"\\}","g"),b)}),d&&(e=$(e)),e}}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(a){"use strict";var b=c(1),d=c(6).ie,e=c(8),f=d&&d<11,g={bold:{exec:"bold",tooltip:"Bold",shortcut:"Ctrl+B"},italic:{exec:"italic",tooltip:"Italic",shortcut:"Ctrl+I"},underline:{exec:"underline",tooltip:"Underline",shortcut:"Ctrl+U"},strike:{exec:"strikethrough",tooltip:"Strikethrough"},subscript:{exec:"subscript",tooltip:"Subscript"},superscript:{exec:"superscript",tooltip:"Superscript"},left:{exec:"justifyleft",tooltip:"Align left"},center:{exec:"justifycenter",tooltip:"Center"},right:{exec:"justifyright",tooltip:"Align right"},justify:{exec:"justifyfull",tooltip:"Justify"},font:{_dropDown:function(a,c,d){for(var f=0,g=a.opts.fonts.split(","),h=b("
"),i=function(){return d(b(this).data("font")),a.closeDropDown(!0),!1};f"),g=function(c){d(b(this).data("size")),a.closeDropDown(!0),c.preventDefault()},h=1;h<=7;h++)f.append(e("sizeOpt",{size:h},!0).click(g));a.createDropDown(c,"fontsize-picker",f)},exec:function(a){var b=this;g.size._dropDown(b,a,function(a){b.execCommand("fontsize",a)})},tooltip:"Font Size"},color:{_dropDown:function(a,c,d){var e,f,h,i,j={r:255,g:255,b:255},k=b("
"),l=a.opts.colors?a.opts.colors.split("|"):new Array(21),m=[],n=g.color;if(!n._htmlCache){for(e=0;e'),f=0;f'),f%5===0?(j.g-=51,j.b=255):j.b-=51;m.push("
"),e%5===0?(j.r-=51,j.g=255,j.b=255):(j.g=255,j.b=255)}n._htmlCache=m.join("")}k.append(n._htmlCache).find("a").click(function(c){d(b(this).attr("data-color")),a.closeDropDown(!0),c.preventDefault()}),a.createDropDown(c,"color-picker",k)},exec:function(a){var b=this;g.color._dropDown(b,a,function(a){b.execCommand("forecolor",a)})},tooltip:"Font Color"},removeformat:{exec:"removeformat",tooltip:"Remove Formatting"},cut:{exec:"cut",tooltip:"Cut",errorMessage:"Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X"},copy:{exec:"copy",tooltip:"Copy",errorMessage:"Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C"},paste:{exec:"paste",tooltip:"Paste",errorMessage:"Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V"},pastetext:{exec:function(a){var b,c,d=this;c=e("pastetext",{label:d._("Paste your text inside the following box:"),insert:d._("Insert")},!0),c.find(".button").click(function(a){b=c.find("#txt").val(),b&&d.wysiwygEditorInsertText(b),d.closeDropDown(!0),a.preventDefault()}),d.createDropDown(a,"pastetext",c)},tooltip:"Paste Text"},bulletlist:{exec:"insertunorderedlist",tooltip:"Bullet list"},orderedlist:{exec:"insertorderedlist",tooltip:"Numbered list"},indent:{state:function(a,c){var d,e,f,g=b(c),h=g.parents("ul,ol,menu"),i=h.first();if(h.length>1||i.children().length>1)return 0;if(g.is("ul,ol,menu")){if(d=this.getRangeHelper().selectedRange(),!(window.Range&&d instanceof Range))return g.is("li,ul,ol,menu")?0:-1;if(e=d.startContainer.parentNode,f=d.endContainer.parentNode,e!==e.parentNode.firstElementChild||b(f).is("li")&&f!==f.parentNode.lastElementChild)return 0}return-1},exec:function(){var a=this,c=b(a.getRangeHelper().getFirstBlockParent());a.focus(),c.parents("ul,ol,menu")&&a.execCommand("indent")},tooltip:"Add indent"},outdent:{state:function(a,c){return b(c).is("ul,ol,menu")||b(c).parents("ul,ol,menu").length>0?0:-1},exec:function(){var a=this,c=b(a.getRangeHelper().getFirstBlockParent());c.parents("ul,ol,menu")&&a.execCommand("outdent")},tooltip:"Remove one indent"},table:{forceNewLineAfter:["table"],exec:function(a){var b=this,c=e("table",{rows:b._("Rows:"),cols:b._("Cols:"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d,e,g=c.find("#rows").val()-0,h=c.find("#cols").val()-0,i="";if(!(g<1||h<1)){for(d=0;d",e=0;e"+(f?"":"
")+"";i+=""}i+="
",b.wysiwygEditorInsertHtml(i),b.closeDropDown(!0),a.preventDefault()}}),b.createDropDown(a,"inserttable",c)},tooltip:"Insert a table"},horizontalrule:{exec:"inserthorizontalrule",tooltip:"Insert a horizontal rule"},code:{forceNewLineAfter:["code"],exec:function(){this.wysiwygEditorInsertHtml("",(f?"":"
")+"
")},tooltip:"Code"},image:{exec:function(a){var b=this,c=e("image",{url:b._("URL:"),width:b._("Width (optional):"),height:b._("Height (optional):"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#image").val(),e=c.find("#width").val(),f=c.find("#height").val(),g="";e&&(g+=' width="'+e+'"'),f&&(g+=' height="'+f+'"'),d&&b.wysiwygEditorInsertHtml("'),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertimage",c)},tooltip:"Insert an image"},email:{exec:function(a){var b=this,c=e("email",{label:b._("E-mail:"),desc:b._("Description (optional):"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#email").val(),e=c.find("#des").val();d&&(b.focus(),!b.getRangeHelper().selectedHtml()||e?(e=e||d,b.wysiwygEditorInsertHtml(''+e+"")):b.execCommand("createlink","mailto:"+d)),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertemail",c)},tooltip:"Insert an email"},link:{exec:function(a){var b=this,c=e("link",{url:b._("URL:"),desc:b._("Description (optional):"),ins:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#link").val(),e=c.find("#des").val();d&&(b.focus(),!b.getRangeHelper().selectedHtml()||e?(e=e||d,b.wysiwygEditorInsertHtml(''+e+"")):b.execCommand("createlink",d)),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertlink",c)},tooltip:"Insert a link"},unlink:{state:function(){var a=b(this.currentNode());return a.is("a")||a.parents("a").length>0?0:-1},exec:function(){var a=b(this.currentNode()),c=a.is("a")?a:a.parents("a").first();c.length&&c.replaceWith(c.contents())},tooltip:"Unlink"},quote:{forceNewLineAfter:["blockquote"],exec:function(a,b,c){var d="
",e="
";b?(c=c?""+c+"":"",d=d+c+b+e,e=null):""===this.getRangeHelper().selectedHtml()&&(e=(f?"":"
")+e),this.wysiwygEditorInsertHtml(d,e)},tooltip:"Insert a Quote"},emoticon:{exec:function(a){var c=this,d=function(e){var f,g=c.opts.emoticonsCompat,h=c.getRangeHelper(),i=g&&" "!==h.getOuterText(!0,1)?" ":"",j=g&&" "!==h.getOuterText(!1,1)?" ":"",k=b("
"),l=b("
").appendTo(k),m=0,n=b.extend({},c.opts.emoticons.dropdown,e?c.opts.emoticons.more:{});return b.each(n,function(){m++}),m=Math.sqrt(m),b.each(n,function(a,d){l.append(b("").attr({src:d.url||d,alt:a,title:d.tooltip||a}).click(function(){return c.insert(i+b(this).attr("alt")+j,null,!1).closeDropDown(!0),!1})),l.children().length>=m&&(l=b("
").appendTo(k))}),!e&&c.opts.emoticons.more&&(f=b(''+c._("More")+"").click(function(){return c.createDropDown(a,"more-emoticons",d(!0)),!1}),k.append(f)),k};c.createDropDown(a,"emoticons",d(!1))},txtExec:function(a){g.emoticon.exec.call(this,a)},tooltip:"Insert an emoticon"},youtube:{_dropDown:function(a,b,c){var d,f=e("youtubeMenu",{label:a._("Video URL:"),insert:a._("Insert")},!0);f.find(".button").click(function(b){var e=f.find("#link").val();e&&(d=e.match(/(?:v=|v\/|embed\/|youtu.be\/)(.{11})/),d&&(e=d[1]),/^[a-zA-Z0-9_\-]{11}$/.test(e)?c(e):alert("Invalid YouTube video")),a.closeDropDown(!0),b.preventDefault()}),a.createDropDown(b,"insertlink",f)},exec:function(a){var b=this;g.youtube._dropDown(b,a,function(a){b.wysiwygEditorInsertHtml(e("youtube",{id:a}))})},tooltip:"Insert a YouTube video"},date:{_date:function(a){var b=new Date,c=b.getYear(),d=b.getMonth()+1,e=b.getDate();return c<2e3&&(c=1900+c),d<10&&(d="0"+d),e<10&&(e="0"+e),a.opts.dateFormat.replace(/year/i,c).replace(/month/i,d).replace(/day/i,e)},exec:function(){this.insertText(g.date._date(this))},txtExec:function(){this.insertText(g.date._date(this))},tooltip:"Insert current date"},time:{_time:function(){var a=new Date,b=a.getHours(),c=a.getMinutes(),d=a.getSeconds();return b<10&&(b="0"+b),c<10&&(c="0"+c),d<10&&(d="0"+d),b+":"+c+":"+d},exec:function(){this.insertText(g.time._time())},txtExec:function(){this.insertText(g.time._time())},tooltip:"Insert current time"},ltr:{state:function(a,b){return b&&"ltr"===b.style.direction},exec:function(){var a=this,c=a.getRangeHelper().getFirstBlockParent(),d=b(c);a.focus(),(c&&!d.is("body")||(a.execCommand("formatBlock","p"),c=a.getRangeHelper().getFirstBlockParent(),d=b(c),c&&!d.is("body")))&&("ltr"===d.css("direction")?d.css("direction",""):d.css("direction","ltr"))},tooltip:"Left-to-Right"},rtl:{state:function(a,b){return b&&"rtl"===b.style.direction},exec:function(){var a=this,c=a.getRangeHelper().getFirstBlockParent(),d=b(c);a.focus(),(c&&!d.is("body")||(a.execCommand("formatBlock","p"),c=a.getRangeHelper().getFirstBlockParent(),d=b(c),c&&!d.is("body")))&&("rtl"===d.css("direction")?d.css("direction",""):d.css("direction","rtl"))},tooltip:"Right-to-Left"},print:{exec:"print",tooltip:"Print"},maximize:{state:function(){return this.maximize()},exec:function(){this.maximize(!this.maximize())},txtExec:function(){this.maximize(!this.maximize())},tooltip:"Maximize",shortcut:"Ctrl+Shift+M"},source:{state:function(){return this.sourceMode()},exec:function(){this.toggleSourceMode()},txtExec:function(){this.toggleSourceMode()},tooltip:"View source",shortcut:"Ctrl+Shift+S"},ignore:{}};return g}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(a){"use strict";var b=c(1);return{toolbar:"bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,paste,pastetext|bulletlist,orderedlist,indent,outdent|table|code,quote|horizontalrule,image,email,link,unlink|emoticon,youtube,date,time|ltr,rtl|print,maximize,source",toolbarExclude:null,style:"jquery.sceditor.default.css",fonts:"Arial,Arial Black,Comic Sans MS,Courier New,Georgia,Impact,Sans-serif,Serif,Times New Roman,Trebuchet MS,Verdana",colors:null,locale:b("html").attr("lang")||"en",charset:"utf-8",emoticonsCompat:!1,emoticonsEnabled:!0,emoticonsRoot:"",emoticons:{dropdown:{":)":"emoticons/smile.png",":angel:":"emoticons/angel.png",":angry:":"emoticons/angry.png","8-)":"emoticons/cool.png",":'(":"emoticons/cwy.png",":ermm:":"emoticons/ermm.png",":D":"emoticons/grin.png","<3":"emoticons/heart.png",":(":"emoticons/sad.png",":O":"emoticons/shocked.png",":P":"emoticons/tongue.png",";)":"emoticons/wink.png"},more:{":alien:":"emoticons/alien.png",":blink:":"emoticons/blink.png",":blush:":"emoticons/blush.png",":cheerful:":"emoticons/cheerful.png",":devil:":"emoticons/devil.png",":dizzy:":"emoticons/dizzy.png",":getlost:":"emoticons/getlost.png",":happy:":"emoticons/happy.png",":kissing:":"emoticons/kissing.png",":ninja:":"emoticons/ninja.png",":pinch:":"emoticons/pinch.png",":pouty:":"emoticons/pouty.png",":sick:":"emoticons/sick.png",":sideways:":"emoticons/sideways.png",":silly:":"emoticons/silly.png",":sleeping:":"emoticons/sleeping.png",":unsure:":"emoticons/unsure.png",":woot:":"emoticons/w00t.png",":wassat:":"emoticons/wassat.png"},hidden:{":whistling:":"emoticons/whistling.png",":love:":"emoticons/wub.png"}},width:null,height:null,resizeEnabled:!0,resizeMinWidth:null,resizeMinHeight:null,resizeMaxHeight:null,resizeMaxWidth:null,resizeHeight:!0,resizeWidth:!0,dateFormat:"year-month-day",toolbarContainer:null,enablePasteFiltering:!1,disablePasting:!1,readOnly:!1,rtl:!1,autofocus:!1,autofocusEnd:!0,autoExpand:!1,autoUpdate:!1,spellcheck:!0,runWithoutWysiwygSupport:!1,startInSourceMode:!1,id:null,plugins:"",zIndex:null,bbcodeTrim:!1,disableBlockRemove:!1,parserOptions:{},dropDownCss:{}}}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))}]),function(a,b,c){"use strict";var d=a.sceditor,e=d.plugins,f=d.escapeEntities,g=d.escapeUriScheme,h=d.ie,i=h&&h<11,j=d.command.get,k={bold:{txtExec:["[b]","[/b]"]},italic:{txtExec:["[i]","[/i]"]},underline:{txtExec:["[u]","[/u]"]},strike:{txtExec:["[s]","[/s]"]},subscript:{txtExec:["[sub]","[/sub]"]},superscript:{txtExec:["[sup]","[/sup]"]},left:{txtExec:["[left]","[/left]"]},center:{txtExec:["[center]","[/center]"]},right:{txtExec:["[right]","[/right]"]},justify:{txtExec:["[justify]","[/justify]"]},font:{txtExec:function(a){var b=this;j("font")._dropDown(b,a,function(a){b.insertText("[font="+a+"]","[/font]")})}},size:{txtExec:function(a){var b=this;j("size")._dropDown(b,a,function(a){b.insertText("[size="+a+"]","[/size]")})}},color:{txtExec:function(a){var b=this;j("color")._dropDown(b,a,function(a){b.insertText("[color="+a+"]","[/color]")})}},bulletlist:{txtExec:function(b,c){var d="";a.each(c.split(/\r?\n/),function(){d+=(d?"\n":"")+"[li]"+this+"[/li]"}),this.insertText("[ul]\n"+d+"\n[/ul]")}},orderedlist:{txtExec:function(b,c){var d="";a.each(c.split(/\r?\n/),function(){d+=(d?"\n":"")+"[li]"+this+"[/li]"}),e.bbcode.bbcode.get(""),this.insertText("[ol]\n"+d+"\n[/ol]")}},table:{txtExec:["[table][tr][td]","[/td][/tr][/table]"]},horizontalrule:{txtExec:["[hr]"]},code:{txtExec:["[code]","[/code]"]},image:{txtExec:function(a,b){var c=this,d=prompt(c._("Enter the image URL:"),b);d&&c.insertText("[img]"+d+"[/img]")}},email:{txtExec:function(a,b){var c=this,d=b&&b.indexOf("@")>-1?null:b,e=prompt(c._("Enter the e-mail address:"),d?"":b),f=prompt(c._("Enter the displayed text:"),d||e)||e;e&&c.insertText("[email="+e+"]"+f+"[/email]")}},link:{txtExec:function(b,c){var d=this,e=/^[a-z]+:\/\//i.test(a.trim(c))?null:c,f=prompt(d._("Enter URL:"),e?"http://":a.trim(c)),g=prompt(d._("Enter the displayed text:"),e||f)||f;f&&d.insertText("[url="+f+"]"+g+"[/url]")}},quote:{txtExec:["[quote]","[/quote]"]},youtube:{txtExec:function(a){var b=this;j("youtube")._dropDown(b,a,function(a){b.insertText("[youtube]"+a+"[/youtube]")})}},rtl:{txtExec:["[rtl]","[/rtl]"]},ltr:{txtExec:["[ltr]","[/ltr]"]}},l=function(a){return a?a.replace(/\\(.)/g,"$1").replace(/^(["'])(.*?)\1$/,"$2"):a},m=function(){var a,b=arguments;return b[0].replace(/\{(\d+)\}/g,function(c,d){return b[d-0+1]!==a?b[d-0+1]:"{"+d+"}"})},n={OPEN:"open",CONTENT:"content",NEWLINE:"newline",CLOSE:"close"},o=function(a,b,c,d,e,f){var g=this;g.type=a,g.name=b,g.val=c,g.attrs=d||{},g.children=e||[],g.closing=f||null};o.prototype={clone:function(a){var b=this;return new o(b.type,b.name,b.val,b.attrs,a?b.children:[],b.closing?b.closing.clone():null)},splitAt:function(b){var c,d=this,e=0,f=d.children.length;if("number"!=typeof b&&(b=a.inArray(b,d.children)),b<0||b>f)return null;for(;f--;)f>=b?e++:f=0;return c=d.clone(),c.children=d.children.splice(b,e),c}};var p=function(b){if(!(this instanceof p))return new p(b);var d,g,j,k,m,q,r,s,t,u,v,w,x,y,z,A=this;d=function(){A.bbcodes=e.bbcode.bbcodes,A.opts=a.extend({},p.defaults,b)},A.tokenize=function(a){var b,c,d,e=[],f=[{type:n.CLOSE,regex:/^\[\/[^\[\]]+\]/},{type:n.OPEN,regex:/^\[[^\[\]]+\]/},{type:n.NEWLINE,regex:/^(\r\n|\r|\n)/},{type:n.CONTENT,regex:/^([^\[\r\n]+|\[)/}];f.reverse();a:for(;a.length;){for(d=f.length;d--;)if(c=f[d].type,(b=a.match(f[d].regex))&&b[0]){e.push(g(c,b[0])),a=a.substr(b[0].length);continue a}a.length&&e.push(g(n.CONTENT,a)),a=""}return e},g=function(b,c){var d,f,g,h=/\[([^\]\s=]+)(?:([^\]]+))?\]/,i=/\[\/([^\[\]]+)\]/;return b===n.OPEN&&(d=c.match(h))&&(g=y(d[1]),d[2]&&(d[2]=a.trim(d[2]))&&(f=j(d[2]))),b===n.CLOSE&&(d=c.match(i))&&(g=y(d[1])),b===n.NEWLINE&&(g="#newline"),g&&(b!==n.OPEN&&b!==n.CLOSE||e.bbcode.bbcodes[g])||(b=n.CONTENT,g="#"),new o(b,g,c,f)},j=function(a){var b,c=/([^\s=]+)=(?:(?:(["'])((?:\\\2|[^\2])*?)\2)|((?:.(?!\s\S+=))*.))/g,d={};if("="===a.charAt(0)&&a.indexOf("=",1)<0)d.defaultattr=l(a.substr(1));else for("="===a.charAt(0)&&(a="defaultattr"+a);b=c.exec(a);)d[y(b[1])]=l(b[3])||b[4];return d},A.parse=function(a,b){var c=k(A.tokenize(a)),d=A.opts;return d.fixInvalidChildren&&t(c),d.removeEmptyTags&&s(c),d.fixInvalidNesting&&q(c),m(c,null,b),d.removeEmptyTags&&s(c),c},w=function(a,b,c){for(var d=c.length;d--;)if(c[d].type===b&&c[d].name===a)return!0;return!1},r=function(b,c){var d=b?A.bbcodes[b.name]:{},e=d.allowedChildren;return!A.opts.fixInvalidChildren||!e||a.inArray(c.name||"#",e)>-1},k=function(b){for(var c,d,e,f,g,h,i,j=[],k=[],l=[],m=function(){return z(l)},o=function(a){m()?m().children.push(a):k.push(a)},p=function(b){return m()&&(d=A.bbcodes[m().name])&&d.closedBy&&a.inArray(b,d.closedBy)>-1};c=b.shift();){switch(i=b[0],c.type){case n.OPEN:p(c.name)&&l.pop(),o(c),d=A.bbcodes[c.name],d&&d.isSelfClosing||!d.closedBy&&!w(c.name,n.CLOSE,b)?d&&d.isSelfClosing||(c.type=n.CONTENT):l.push(c);break;case n.CLOSE:if(m()&&c.name!==m().name&&p("/"+c.name)&&l.pop(),m()&&c.name===m().name)m().closing=c,l.pop();else if(w(c.name,n.OPEN,l)){for(;e=l.pop();){if(e.name===c.name){e.closing=c;break}f=e.clone(),j.length>1&&f.children.push(z(j)),j.push(f)}for(o(z(j)),g=j.length;g--;)l.push(j[g]);j.length=0}else c.type=n.CONTENT,o(c);break;case n.NEWLINE:m()&&i&&p((i.type===n.CLOSE?"/":"")+i.name)&&(i.type===n.CLOSE&&i.name===m().name||(d=A.bbcodes[m().name],d&&d.breakAfter?l.pop():d&&d.isInline===!1&&A.opts.breakAfterBlock&&d.breakAfter!==!1&&l.pop())),o(c);break;default:o(c)}h=c}return k},m=function(a,b,c){var d,e,f,g,h,i,j,k,l=a.length;b&&(g=A.bbcodes[b.name]);for(var o=l;o--;)if(d=a[o])if(d.type===n.NEWLINE){if(e=o>0?a[o-1]:null,f=o1?c[c.length-2].children:e,i=a.inArray(h,j),i>-1))return k.children.splice(a.inArray(f,k.children),1),void j.splice(i+1,0,f,k);c.push(f),q(f.children,c,d||l(f),e),c.pop(f)}},t=function(a,b){for(var c,d,e=a.length;e--;)(c=a[e])&&(r(b,c)||(c.name=null,c.type=n.CONTENT,r(b,c)?(d=[e+1,0].concat(c.children),c.closing&&(c.closing.name=null,c.closing.type=n.CONTENT,d.push(c.closing)),e+=d.length-1,Array.prototype.splice.apply(a,d)):b.children.splice(e,1)),c.type===n.OPEN&&t(c.children,c))},s=function(b){for(var c,d,e=function(a){for(var b=a.length;b--;){var c=a[b].type;if(c===n.OPEN||c===n.CLOSE)return!1;if(c===n.CONTENT&&/\S|\u00A0/.test(a[b].val))return!1}return!0},f=b.length;f--;)(c=b[f])&&c.type===n.OPEN&&(d=A.bbcodes[c.name],s(c.children),e(c.children)&&d&&!d.isSelfClosing&&!d.allowsEmpty&&b.splice.apply(b,a.merge([f,1],c.children)))},A.toHTML=function(a,b){return u(A.parse(a,b),!0)},u=function(b,d){var g,j,k,l,m,o,p,q,r,s=[];for(q=function(a){return(!a||(a.isHtmlInline!==g?a.isHtmlInline:a.isInline))!==!1};b.length>0;)if(j=b.shift()){if(j.type===n.OPEN)r=j.children[j.children.length-1]||{},k=A.bbcodes[j.name],o=d&&q(k),l=u(j.children,!1),k&&k.html?(q(k)||!q(A.bbcodes[r.name])||k.isPreFormatted||k.skipLastLineBreak||i||(l+="
"),a.isFunction(k.html)?m=k.html.call(A,j,j.attrs,l):(j.attrs[0]=l,m=e.bbcode.formatBBCodeString(k.html,j.attrs))):m=j.val+l+(j.closing?j.closing.val:"");else{if(j.type===n.NEWLINE){if(!d){s.push("
");continue}p||(s.push("
"),(h<8||c.documentMode&&c.documentMode<8)&&s.push(" ")),i||s.push("
"),b.length||s.push("
"),s.push("
\n"),p=!1;continue}o=d,m=f(j.val,!0)}o&&!p?(s.push("
"),p=!0):!o&&p&&(s.push("
\n"),p=!1),s.push(m)}return p&&s.push("
\n"),s.join("")},A.toBBCode=function(a,b){return v(A.parse(a,b))},v=function(a){for(var b,c,d,e,f,g,h,i,j,k,l=[];a.length>0;)if(b=a.shift())if(d=A.bbcodes[b.name],e=!(!d||d.isInline!==!1),f=d&&d.isSelfClosing,h=e&&A.opts.breakBeforeBlock&&d.breakBefore!==!1||d&&d.breakBefore,i=e&&!f&&A.opts.breakStartBlock&&d.breakStart!==!1||d&&d.breakStart,j=e&&A.opts.breakEndBlock&&d.breakEnd!==!1||d&&d.breakEnd,k=e&&A.opts.breakAfterBlock&&d.breakAfter!==!1||d&&d.breakAfter,g=(d?d.quoteType:null)||A.opts.quoteType||p.QuoteType.auto,d||b.type!==n.OPEN)if(b.type===n.OPEN){if(h&&l.push("\n"),l.push("["+b.name),b.attrs){b.attrs.defaultattr&&(l.push("=",x(b.attrs.defaultattr,g,"defaultattr")),delete b.attrs.defaultattr);for(c in b.attrs)b.attrs.hasOwnProperty(c)&&l.push(" ",c,"=",x(b.attrs[c],g,c))}l.push("]"),i&&l.push("\n"),b.children&&l.push(v(b.children)),f||d.excludeClosing||(j&&l.push("\n"),l.push("[/"+b.name+"]")),k&&l.push("\n"),b.closing&&f&&l.push(b.closing.val)}else l.push(b.val);else l.push(b.val),b.children&&l.push(v(b.children)),b.closing&&l.push(b.closing.val);return l.join("")},x=function(b,c,d){var e=p.QuoteType,f=/\s|=/.test(b);return a.isFunction(c)?c(b,d):c===e.never||c===e.auto&&!f?b:'"'+b.replace("\\","\\\\").replace('"','\\"')+'"'},z=function(a){return a.length?a[a.length-1]:null},y=function(a){return a.toLowerCase()},d()};p.QuoteType={always:1,never:2,auto:3},p.defaults={breakBeforeBlock:!1,breakStartBlock:!1,breakEndBlock:!1,breakAfterBlock:!0,removeEmptyTags:!0,fixInvalidNesting:!0,fixInvalidChildren:!0,quoteType:p.QuoteType.auto},a.sceditorBBCodePlugin=e.bbcode=function(){var b,f,g,h,j=this;j.bbcodes=e.bbcode.bbcodes,j.stripQuotes=l;var n={},o={},q={ul:["li","ol","ul"],ol:["li","ol","ul"],table:["tr"],tr:["td","th"],code:["br","p","div"]};j.init=function(){j.opts=this.opts,b(),this.commands=a.extend(!0,{},k,this.commands),this.toBBCode=j.signalToSource,this.fromBBCode=j.signalToWysiwyg},b=function(){a.each(j.bbcodes,function(b){var c,d=j.bbcodes[b].tags,e=j.bbcodes[b].styles;d&&a.each(d,function(a,d){c=j.bbcodes[b].isInline===!1,n[a]=n[a]||{},n[a][c]=n[a][c]||{},n[a][c][b]=d}),e&&a.each(e,function(a,d){c=j.bbcodes[b].isInline===!1,o[c]=o[c]||{},o[c][a]=o[c][a]||{},o[c][a][b]=d})})},f=function(b,c,e){var f,g,h=d.dom.getStyle;return e=!!e,o[e]?(a.each(o[e],function(d,e){f=h(b[0],d),f&&h(b.parent()[0],d)!==f&&a.each(e,function(d,e){(!e||a.inArray(f.toString(),e)>-1)&&(g=j.bbcodes[d].format,c=a.isFunction(g)?g.call(j,b,c):m(g,c))})}),c):c},g=function(b,c,e){var f,g,h=b[0],k=h.nodeName.toLowerCase();e=!!e,n[k]&&n[k][e]&&a.each(n[k][e],function(d,e){e&&(f=!1,a.each(e,function(c,d){if(b.attr(c)&&!(d&&a.inArray(b.attr(c),d)<0))return f=!0,!1}),!f)||(g=j.bbcodes[d].format,c=a.isFunction(g)?g.call(j,b,c):m(g,c))});var l=d.dom.isInline;if(e&&(!l(h,!0)||"br"===k)){for(var o,p,q,r=h.previousSibling;r&&1===r.nodeType&&!a(r).is("br")&&l(r,!0)&&!r.firstChild;)r=r.previousSibling;do p=h.parentNode,q=p.lastChild,o=q===h,h=p;while(p&&o&&l(p,!0));(!o||"li"===k||"br"===k&&i)&&(c+="\n"),"br"!==k&&r&&!a(r).is("br")&&l(r,!0)&&(c="\n"+c)}return c},j.signalToSource=function(b,e){var f,g,h=new p(j.opts.parserOptions);return e||("string"==typeof b?(f=a("
").css("visibility","hidden").appendTo(c.body).html(b),e=f):e=a(b)),e&&e.jquery?(d.dom.removeWhiteSpace(e[0]),a(".sceditor-ignore",e).remove(),g=j.elementToBbcode(e),f&&f.remove(),g=h.toBBCode(g,!0),j.opts.bbcodeTrim&&(g=a.trim(g)),g):""},j.elementToBbcode=function(b){var c=function(b,e){var h="";return d.dom.traverse(b,function(b){var d=a(b),j="",k=b.nodeType,l=b.nodeName.toLowerCase(),m=q[l],n=b.firstChild,o=!0;if("object"==typeof e&&(o=a.inArray(l,e)>-1,d.is("img")&&d.data("sceditor-emoticon")&&(o=!0),o||(m=e)),3===k||1===k)if(1===k){if(d.hasClass("sceditor-nlf")&&(!n||!i&&1===b.childNodes.length&&/br/i.test(n.nodeName)))return;"iframe"!==l&&(j=c(b,m)),o?("code"!==l&&(j=f(d,j),j=g(d,j),j=f(d,j,!0)),h+=g(d,j,!0)):h+=j}else h+=b.nodeValue},!1,!0),h};return c(b[0])},j.signalToWysiwyg=function(b,c){var d=new p(j.opts.parserOptions),e=d.toHTML(j.opts.bbcodeTrim?a.trim(b):b);return c?h(e):e},h=function(b){var e,f,g,h=a("
").hide().appendTo(c.body),j=h[0];return g=function(b,e){if(!d.dom.hasStyling(b)){if(i||1!==b.childNodes.length||!a(b.firstChild).is("br"))for(;f=b.firstChild;)j.insertBefore(f,b);if(e){var g=j.lastChild;b!==g&&a(g).is("div")&&b.nextSibling===g&&j.insertBefore(c.createElement("br"),b)}j.removeChild(b)}},j.innerHTML=b.replace(/<\/div>\n/g,"
"),(e=j.firstChild)&&a(e).is("div")&&g(e,!0),(e=j.lastChild)&&a(e).is("div")&&g(e),j=j.innerHTML,h.remove(),j}},e.bbcode.formatBBCodeString=function(a,b){return a.replace(/\{([^}]+)\}/g,function(a,c){ +var d,e=!0;return"!"===c.charAt(0)&&(e=!1,c=c.substring(1)),"0"===c&&(e=!1),b[c]===d?a:e?f(b[c],!0):b[c]})};var q=function(a){return a=parseInt(a,10),isNaN(a)?"00":(a=Math.max(0,Math.min(a,255)).toString(16),a.length<2?"0"+a:a)},r=function(a){var b;return a=a||"#000",(b=a.match(/rgb\((\d{1,3}),\s*?(\d{1,3}),\s*?(\d{1,3})\)/i))?"#"+q(b[1])+q(b[2]-0)+q(b[3]-0):(b=a.match(/#([0-f])([0-f])([0-f])\s*?$/i))?"#"+b[1]+b[1]+b[2]+b[2]+b[3]+b[3]:a},s={b:{tags:{b:null,strong:null},styles:{"font-weight":["bold","bolder","401","700","800","900"]},format:"[b]{0}[/b]",html:"{0}"},i:{tags:{i:null,em:null},styles:{"font-style":["italic","oblique"]},format:"[i]{0}[/i]",html:"{0}"},u:{tags:{u:null},styles:{"text-decoration":["underline"]},format:"[u]{0}[/u]",html:"{0}"},s:{tags:{s:null,strike:null},styles:{"text-decoration":["line-through"]},format:"[s]{0}[/s]",html:"{0}"},sub:{tags:{sub:null},format:"[sub]{0}[/sub]",html:"{0}"},sup:{tags:{sup:null},format:"[sup]{0}[/sup]",html:"{0}"},font:{tags:{font:{face:null}},styles:{"font-family":null},quoteType:p.QuoteType.never,format:function(a,b){var c;return a.is("font")&&(c=a.attr("face"))||(c=a.css("font-family")),"[font="+l(c)+"]"+b+"[/font]"},html:'{0}'},size:{tags:{font:{size:null}},styles:{"font-size":null},format:function(a,b){var c=a.attr("size"),d=2;return c||(c=a.css("fontSize")),c.indexOf("px")>-1?(c=c.replace("px","")-0,c<12&&(d=1),c>15&&(d=3),c>17&&(d=4),c>23&&(d=5),c>31&&(d=6),c>47&&(d=7)):d=c,"[size="+d+"]"+b+"[/size]"},html:'{!0}'},color:{tags:{font:{color:null}},styles:{color:null},quoteType:p.QuoteType.never,format:function(a,b){var c;return a.is("font")&&(c=a.attr("color"))||(c=a[0].style.color||a.css("color")),"[color="+r(c)+"]"+b+"[/color]"},html:function(a,b,c){return''+c+""}},ul:{tags:{ul:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[ul]{0}[/ul]",html:"
    {0}
"},list:{breakStart:!0,isInline:!1,skipLastLineBreak:!0,html:"
    {0}
"},ol:{tags:{ol:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[ol]{0}[/ol]",html:"
    {0}
"},li:{tags:{li:null},isInline:!1,closedBy:["/ul","/ol","/list","*","li"],format:"[li]{0}[/li]",html:"
  • {0}
  • "},"*":{isInline:!1,closedBy:["/ul","/ol","/list","*","li"],html:"
  • {0}
  • "},table:{tags:{table:null},isInline:!1,isHtmlInline:!0,skipLastLineBreak:!0,format:"[table]{0}[/table]",html:"{0}
    "},tr:{tags:{tr:null},isInline:!1,skipLastLineBreak:!0,format:"[tr]{0}[/tr]",html:"{0}"},th:{tags:{th:null},allowsEmpty:!0,isInline:!1,format:"[th]{0}[/th]",html:"{0}"},td:{tags:{td:null},allowsEmpty:!0,isInline:!1,format:"[td]{0}[/td]",html:"{0}"},emoticon:{allowsEmpty:!0,tags:{img:{src:null,"data-sceditor-emoticon":null}},format:function(a,b){return a.data("sceditor-emoticon")+b},html:"{0}"},hr:{tags:{hr:null},allowsEmpty:!0,isSelfClosing:!0,isInline:!1,format:"[hr]{0}",html:"
    "},img:{allowsEmpty:!0,tags:{img:{src:null}},allowedChildren:["#"],quoteType:p.QuoteType.never,format:function(a,b){var c,d,e="",f=a[0],g=function(a){return f.style?f.style[a]:null};return a.attr("data-sceditor-emoticon")?b:(c=a.attr("width")||g("width"),d=a.attr("height")||g("height"),(f.complete&&(c||d)||c&&d)&&(e="="+a.width()+"x"+a.height()),"[img"+e+"]"+a.attr("src")+"[/img]")},html:function(a,b,c){var d,e,h,i,j="";return e=b.width,h=b.height,b.defaultattr&&(i=b.defaultattr.split(/x/i),e=i[0],h=2===i.length?i[1]:i[0]),e!==d&&(j+=' width="'+f(e,!0)+'"'),h!==d&&(j+=' height="'+f(h,!0)+'"'),"'}},url:{allowsEmpty:!0,tags:{a:{href:null}},quoteType:p.QuoteType.never,format:function(a,b){var c=a.attr("href");return"mailto:"===c.substr(0,7)?'[email="'+c.substr(7)+'"]'+b+"[/email]":"[url="+c+"]"+b+"[/url]"},html:function(a,b,c){return b.defaultattr=f(b.defaultattr,!0)||c,''+c+""}},email:{quoteType:p.QuoteType.never,html:function(a,b,c){return''+c+""}},quote:{tags:{blockquote:null},isInline:!1,quoteType:p.QuoteType.never,format:function(b,c){var d="",e=a(b),f=e.children("cite").first();return(1===f.length||e.data("author"))&&(d=f.text()||e.data("author"),e.data("author",d),f.remove(),c=this.elementToBbcode(a(b)),d="="+d.replace(/(^\s+|\s+$)/g,""),e.prepend(f)),"[quote"+d+"]"+c+"[/quote]"},html:function(a,b,c){return b.defaultattr&&(c=""+f(b.defaultattr)+""+c),"
    "+c+"
    "}},code:{tags:{code:null},isInline:!1,allowedChildren:["#","#newline"],format:"[code]{0}[/code]",html:"{0}"},left:{styles:{"text-align":["left","-webkit-left","-moz-left","-khtml-left"]},isInline:!1,format:"[left]{0}[/left]",html:'
    {0}
    '},center:{styles:{"text-align":["center","-webkit-center","-moz-center","-khtml-center"]},isInline:!1,format:"[center]{0}[/center]",html:'
    {0}
    '},right:{styles:{"text-align":["right","-webkit-right","-moz-right","-khtml-right"]},isInline:!1,format:"[right]{0}[/right]",html:'
    {0}
    '},justify:{styles:{"text-align":["justify","-webkit-justify","-moz-justify","-khtml-justify"]},isInline:!1,format:"[justify]{0}[/justify]",html:'
    {0}
    '},youtube:{allowsEmpty:!0,tags:{iframe:{"data-youtube-id":null}},format:function(a,b){return a=a.attr("data-youtube-id"),a?"[youtube]"+a+"[/youtube]":b},html:''},rtl:{styles:{direction:["rtl"]},format:"[rtl]{0}[/rtl]",html:'
    {0}
    '},ltr:{styles:{direction:["ltr"]},format:"[ltr]{0}[/ltr]",html:'
    {0}
    '},ignore:{}};e.bbcode.bbcode={get:function(a){return s[a]||null},set:function(b,c){return!(!b||!c)&&(c=a.extend(s[b]||{},c),c.remove=function(){delete s[b]},s[b]=c,this)},rename:function(a,b){return a in s&&(s[b]=s[a],delete s[a],this)},remove:function(a){return a in s&&delete s[a],this}},a.fn.sceditorBBCodePlugin=function(b){return b=b||{},a.isPlainObject(b)&&(b.plugins=(b.plugins||"")+"bbcode"),this.sceditor(b)},e.bbcode.normaliseColour=r,e.bbcode.formatString=m,e.bbcode.stripQuotes=l,e.bbcode.bbcodes=s,d.BBCodeParser=p}(jQuery,window,document); \ No newline at end of file diff --git a/Html/js/SCEditor/jquery.sceditor.default.min.css b/Html/js/SCEditor/jquery.sceditor.default.min.css new file mode 100644 index 0000000..2d504cb --- /dev/null +++ b/Html/js/SCEditor/jquery.sceditor.default.min.css @@ -0,0 +1 @@ +/*! SCEditor | (C) 2011-2013, Sam Clarke | sceditor.com/license */body,html{overflow:auto}blockquote,code{position:relative;border:1px solid #aaa;padding:.25em}body,code:before,html,p,table{margin:0;padding:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;color:#111}html{height:100%;-webkit-overflow-scrolling:touch}body{position:relative;min-height:100%;word-wrap:break-word}ol,ul{margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0}table,td{border:1px dotted #000;empty-cells:show}code:before{position:absolute;content:'Code:';top:-1.35em;left:0}code{margin-top:1.5em;background:#eee;white-space:pre;display:block}.ie6 code,.ie7 code{margin-top:0}code,code:before{display:block;text-align:left}blockquote{background:#fff6c7;margin:.25em 0}blockquote cite{font-weight:700;display:block;font-size:1em;border-bottom:1px solid #aaa}h1,h2,h3,h4,h5,h6{padding:0;margin:0}div,p{min-height:1.25em} \ No newline at end of file diff --git a/Html/js/SCEditor/jquery.sceditor.min.js b/Html/js/SCEditor/jquery.sceditor.min.js new file mode 100644 index 0000000..ab22b3e --- /dev/null +++ b/Html/js/SCEditor/jquery.sceditor.min.js @@ -0,0 +1,3 @@ +/* SCEditor v1.5.1 | (C) 2016, Sam Clarke | sceditor.com/license */ +!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d;d=function(a){"use strict";var b=c(1),d=c(2),e=c(3),f=c(6),g=c(7);b.sceditor=d,d.commands=c(9),d.defaultOptions=c(10),d.RangeHelper=c(4),d.dom=c(5),d.ie=f.ie,d.ios=f.ios,d.isWysiwygSupported=f.isWysiwygSupported,d.regexEscape=g.regex,d.escapeEntities=g.entities,d.escapeUriScheme=g.uriScheme,d.PluginManager=e,d.plugins=e.plugins,b.fn.sceditor=function(a){var c,e,g=[];if(a=a||{},a.runWithoutWysiwygSupport||f.isWysiwygSupported)return this.each(function(){c=this.jquery?this:b(this),e=c.data("sceditor"),c.parents(".sceditor-container").length>0||("state"===a?g.push(!!e):"instance"===a?g.push(e):e||new d(this,a))}),g.length?1===g.length?g[0]:b(g):this}}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b){a.exports=jQuery},function(a,b,c){var d;d=function(a){"use strict";var b=c(1),d=c(3),e=c(4),f=c(5),g=c(7),h=c(6),i=c(8),j=window,k=document,l=b(j),m=b(k),n=h.ie,o=n&&n<11,p=function(a,c){var q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua=this,va=a.get?a.get(0):a,wa=b(va),xa=[],ya=[],za=[],Aa={},Ba=[],Ca={};ua.commands=b.extend(!0,{},c.commands||p.commands),ua.opts=c=b.extend({},p.defaultOptions,c),K=function(){wa.data("sceditor",ua),b.each(c,function(a,d){b.isPlainObject(d)&&(c[a]=b.extend(!0,{},d))}),c.locale&&"en"!==c.locale&&Q(),q=b('
    ').insertAfter(wa).css("z-index",c.zIndex),n&&q.addClass("ie ie"+n),H=!!wa.attr("required"),wa.removeAttr("required"),P(),W(),R(),O(!!c.startInSourceMode),U(),S(),T(),h.isWysiwygSupported||ua.toggleSourceMode(),ha();var a=function(){l.off("load",a),c.autofocus&&ma(),c.autoExpand&&ua.expandToContent(),fa(),C.call("ready")};l.on("load",a),k.readyState&&"complete"===k.readyState&&a()},P=function(){var a=c.plugins;a=a?a.toString().split(","):[],C=new d(ua),b.each(a,function(a,c){C.register(b.trim(c))})},Q=function(){var a;A=p.locale[c.locale],A||(a=c.locale.split("-"),A=p.locale[a[0]]),A&&A.dateFormat&&(c.dateFormat=A.dateFormat)},O=function(a){var d,f;w=b(""),s=b(''),a?(q.addClass("sourceMode"),s.hide()):(q.addClass("wysiwygMode"),w.hide()),c.spellcheck||w.attr("spellcheck","false"),"https:"===j.location.protocol&&s.attr("src","javascript:false"),q.append(s).append(w),t=s[0],x=w[0],ua.dimensions(c.width||wa.width(),c.height||wa.height()),d=X(),d.open(),d.write(i("html",{attrs:n?' class="ie ie'+n+'"':"",spellcheck:c.spellcheck?"":'spellcheck="false"',charset:c.charset,style:c.style})),d.close(),v=b(d),u=b(d.body),ua.readOnly(!!c.readOnly),(h.ios||n)&&(u.height("100%"),n||u.on("touchend",ua.focus)),f=wa.attr("tabindex"),w.attr("tabindex",f),s.attr("tabindex",f),B=new e(t.contentWindow),ua.val(wa.hide().val())},S=function(){c.autoUpdate&&(u.on("blur",ta),w.on("blur",ta)),null===c.rtl&&(c.rtl="rtl"===w.css("direction")),ua.rtl(!!c.rtl),c.autoExpand&&v.on("keyup",ua.expandToContent),c.resizeEnabled&&V(),q.attr("id",c.id),ua.emoticons(c.emoticonsEnabled)},T=function(){var a=n?"selectionchange":"keyup focus blur contextmenu mouseup touchend click",d="keydown keyup keypress focus blur contextmenu";m.click(ea),b(va.form).on("reset",ba).submit(ua.updateOriginal),l.on("resize orientationChanged",fa),u.keypress(aa).keydown($).keydown(_).keyup(ja).blur(ra).keyup(sa).on("paste",Y).on(a,ka).on(d,da),c.emoticonsCompat&&j.getSelection&&u.keyup(oa),w.blur(ra).keyup(sa).keydown($).on(d,da),v.mousedown(ca).blur(ra).on(a,ka).on("beforedeactivate keyup mouseup",N).keyup(ja).focus(function(){z=null}),q.on("selectionchanged",la).on("selectionchanged",ha).on("selectionchanged valuechanged nodechanged",da)},R=function(){var a,d=ua.commands,e=(c.toolbarExclude||"").split(","),f=c.toolbar.split("|");r=b('
    '),b.each(f,function(c,f){a=b('
    '),b.each(f.split(","),function(c,f){var g,h,j=d[f];!j||b.inArray(f,e)>-1||(h=j.shortcut,g=i("toolbarButton",{name:f,dispName:ua._(j.name||j.tooltip||f)},!0),g.data("sceditor-txtmode",!!j.txtExec).data("sceditor-wysiwygmode",!!j.exec).toggleClass("disabled",!j.exec).mousedown(function(){(!n||n<9)&&(J=!0)}).click(function(){var a=b(this);return a.hasClass("disabled")||M(a,j),ha(),!1}),j.tooltip&&g.attr("title",ua._(j.tooltip)+(h?" ("+h+")":"")),h&&ua.addShortcut(h,f),j.state?za.push({name:f,state:j.state}):"string"==typeof j.exec&&za.push({name:f,state:j.exec}),a.append(g),Ca[f]=g)}),a[0].firstChild&&r.append(a)}),b(c.toolbarContainer||q).append(r)},U=function(){b.each(ua.commands,function(a,c){c.forceNewLineAfter&&b.isArray(c.forceNewLineAfter)&&(ya=b.merge(ya,c.forceNewLineAfter))}),ja()},V=function(){var a,d,e,f,g,h,i=b('
    '),k=b('
    '),l="touchmove mousemove",o="touchcancel touchend mouseup",p=0,r=0,s=0,t=0,u=0,v=0,w=q.width(),x=q.height(),y=!1,z=ua.rtl();a=c.resizeMinHeight||x/1.5,d=c.resizeMaxHeight||2.5*x,e=c.resizeMinWidth||w/1.25,f=c.resizeMaxWidth||1.25*w,g=function(b){"touchmove"===b.type?(b=j.event,s=b.changedTouches[0].pageX,t=b.changedTouches[0].pageY):(s=b.pageX,t=b.pageY);var g=v+(t-r),h=z?u-(s-p):u+(s-p);f>0&&h>f&&(h=f),e>0&&h0&&g>d&&(g=d),a>0&&g-1&&(a=q.width()),s.width(a-s.data("outerWidthOffset")),w.width(a-w.data("outerWidthOffset")),h.ios&&u&&u.width(a-s.data("outerWidthOffset")-(u.outerWidth(!0)-u.width()))),b!==!1&&(d!==!1&&(c.height=b),b&&b.toString().indexOf("%")>-1&&(b=q.height(b).height(),q.height("auto")),b-=c.toolbarContainer?0:r.outerHeight(!0),s.height(b-s.data("outerHeightOffset")),w.height(b-f-w.data("outerHeightOffset"))),ua)},ua.updateStyleCache=function(){s.data("outerWidthOffset",s.outerWidth(!0)-s.width()),w.data("outerWidthOffset",w.outerWidth(!0)-w.width()),s.data("outerHeightOffset",s.outerHeight(!0)-s.height()),w.data("outerHeightOffset",w.outerHeight(!0)-w.height())},ua.height=function(a,b){return a||0===a?(ua.dimensions(null,a,b),ua):q.height()},ua.maximize=function(a){return"undefined"==typeof a?q.is(".sceditor-maximize"):(a=!!a,n<7&&b("html, body").toggleClass("sceditor-maximize",a),q.toggleClass("sceditor-maximize",a),ua.width(a?"100%":c.width,!1),ua.height(a?"100%":c.height,!1),ua)},ua.expandToContent=function(a){var b=q.height(),d=b-s.height(),e=u[0].scrollHeight||v[0].documentElement.scrollHeight,f=c.resizeMaxHeight||2*(c.height||wa.height());e+=d,(a===!0||e<=f)&&e>b&&ua.height(e)},ua.destroy=function(){C&&(C.destroy(),B=null,z=null,C=null,y&&y.off().remove(),m.off("click",ea),l.off("resize orientationChanged",fa),b(va.form).off("reset",ba).off("submit",ua.updateOriginal),u.off(),v.off().find("*").remove(),w.off().remove(),r.remove(),q.off().find("*").off().remove(),q.remove(),wa.removeData("sceditor").removeData("sceditorbbcode").show(),H&&wa.attr("required","required"))},ua.createDropDown=function(a,d,e,f){var g,h="sceditor-"+d,i=y&&y.is("."+h);ua.closeDropDown(!0),i||(f!==!1&&b(e).find(":not(input,textarea)").filter(function(){return 1===this.nodeType}).attr("unselectable","on"),g={top:a.offset().top,left:a.offset().left,marginTop:a.outerHeight()},b.extend(g,c.dropDownCss),y=b('
    ').css(g).append(e).appendTo(b("body")).on("click focusin",function(a){a.stopPropagation()}),setTimeout(function(){y&&y.find("input,textarea").first().focus()}))},ea=function(a){3!==a.which&&y&&(ta(),ua.closeDropDown())},Y=function(a){var b,d,e,f=u[0],g=v[0],h=0,i=k.createElement("div"),j=g.createDocumentFragment(),l=!!a&&a.clipboardData;if(c.disablePasting)return!1;if(c.enablePasteFiltering){if(B.saveRange(),k.body.appendChild(i),l&&l.getData&&((b=l.getData("text/html"))||(b=l.getData("text/plain"))))return i.innerHTML=b,Z(f,i),!1;for(e=u.scrollTop()||v.scrollTop();f.firstChild;)j.appendChild(f.firstChild);return d=function(a,b){if(a.childNodes.length>0||h>25){for(;a.firstChild;)b.appendChild(a.firstChild);for(;j.firstChild;)a.appendChild(j.firstChild);u.scrollTop(e),v.scrollTop(e),b.childNodes.length>0?Z(a,b):B.restoreRange()}else h++,setTimeout(function(){d(a,b)},20)},d(f,i),ua.focus(),!0}},Z=function(a,c){f.fixNesting(c);var d=c.innerHTML;C.hasHandler("toSource")&&(d=C.callOnlyFirst("toSource",d,b(c))),c.parentNode.removeChild(c),C.hasHandler("toWysiwyg")&&(d=C.callOnlyFirst("toWysiwyg",d,!0)),B.restoreRange(),ua.wysiwygEditorInsertHtml(d,null,!0)},ua.closeDropDown=function(a){y&&(y.off().remove(),y=null),a===!0&&ua.focus()},X=function(){return t.contentDocument?t.contentDocument:t.contentWindow&&t.contentWindow.document?t.contentWindow.document:t.document},ua.wysiwygEditorInsertHtml=function(a,c,d){var e,g,h,i=s.height();ua.focus(),(d||!b(E).is("code")&&0===b(E).parents("code").length)&&(B.insertHTML(a,c),B.saveRange(),L(u[0]),e=u.find("#sceditor-end-marker").show(),g=u.scrollTop()||v.scrollTop(),h=f.getOffset(e[0]).top+1.5*e.outerHeight(!0)-i,e.hide(),(h>g||h+i").appendTo(b("body")).hide().html(g);d!==!1&&C.hasHandler("toSource")&&(g=C.callOnlyFirst("toSource",g,h)),h.remove(),a+=g+c}return d!==!1&&C.hasHandler("toWysiwyg")&&(a=C.callOnlyFirst("toWysiwyg",a,!0)),d!==!1&&f===!0&&(a=a.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")),ua.wysiwygEditorInsertHtml(a),ua},ua.getWysiwygEditorValue=function(a){var c,d=b("
    ").appendTo(document.body).append(b(u[0].childNodes).clone());return f.fixNesting(d[0]),c=d.html(),a!==!1&&C.hasHandler("toSource")&&(c=C.callOnlyFirst("toSource",c,d)),d.remove(),c},ua.getBody=function(){return u},ua.getContentAreaContainer=function(){return s},ua.getSourceEditorValue=function(a){var b=w.val();return a!==!1&&C.hasHandler("toWysiwyg")&&(b=C.callOnlyFirst("toWysiwyg",b)),b},ua.setWysiwygEditorValue=function(a){a||(a="

    "+(n?"":"
    ")+"

    "),u[0].innerHTML=a,L(u[0]),ja(),qa()},ua.setSourceEditorValue=function(a){w.val(a),qa()},ua.updateOriginal=function(){wa.val(ua.val())},L=function(a){if(c.emoticonsEnabled&&!b(a).parents("code").length){var d=a.ownerDocument,e="\\s| | | | | ",h=[],j=[],k=b.extend({},c.emoticons.more,c.emoticons.dropdown,c.emoticons.hidden);b.each(k,function(a){c.emoticonsCompat&&(j[a]=new RegExp("(>|^|"+e+")"+g.regex(a)+"($|<|"+e+")")),h.push(a)});var l=function(a){for(a=a.firstChild;a;){var e,g,m,n,o,p,q,r=a.parentNode,s=a.nodeValue;if(3!==a.nodeType)b(a).is("code")||l(a);else if(s)for(o=h.length;o--;)g=h[o],q=c.emoticonsCompat?s.search(j[g]):s.indexOf(g),q>-1&&(p=a.nextSibling,m=k[g],e=s.substr(q).split(g),s=s.substr(0,q)+e.shift(),a.nodeValue=s,n=f.parseHTML(i("emoticon",{key:g,url:m.url||m,tooltip:m.tooltip||g}),d),r.insertBefore(n[0],p),r.insertBefore(d.createTextNode(e.join(g)),p));a=a.nextSibling}};l(a),c.emoticonsCompat&&(Ba=u.find("img[data-sceditor-emoticon]"))}},ua.inSourceMode=function(){return q.hasClass("sourceMode")},ua.sourceMode=function(a){var b=ua.inSourceMode();return"boolean"!=typeof a?b:((b&&!a||!b&&a)&&ua.toggleSourceMode(),ua)},ua.toggleSourceMode=function(){var a=ua.inSourceMode();!h.isWysiwygSupported&&a||(a||(B.saveRange(),B.clear()),ua.blur(),a?ua.setWysiwygEditorValue(ua.getSourceEditorValue()):ua.setSourceEditorValue(ua.getWysiwygEditorValue()),z=null,w.toggle(),s.toggle(),q.toggleClass("wysiwygMode",a).toggleClass("sourceMode",!a),ga(),ha())},ia=function(){return x.focus(),"undefined"!=typeof x.selectionStart?x.value.substring(x.selectionStart,x.selectionEnd):k.selection.createRange().text},M=function(a,c){ua.inSourceMode()?c.txtExec&&(b.isArray(c.txtExec)?ua.sourceEditorInsertText.apply(ua,c.txtExec):c.txtExec.call(ua,a,ia())):c.exec&&(b.isFunction(c.exec)?c.exec.call(ua,a):ua.execCommand(c.exec,c.hasOwnProperty("execParam")?c.execParam:null))},N=function(){n&&(z=B.selectedRange())},ua.execCommand=function(a,c){var d=!1,e=ua.commands[a],f=b(B.parentNode());if(ua.focus(),!f.is("code")&&0===f.parents("code").length){try{d=v[0].execCommand(a,!1,c)}catch(a){}!d&&e&&e.errorMessage&&alert(ua._(e.errorMessage)),ha()}},ka=function(){function a(){B&&!B.compare(F)&&(F=B.cloneSelected(),q.trigger(b.Event("selectionchanged"))),G=!1}G||(G=!0,n?a():setTimeout(a,100))},la=function(){var a,c=B.parentNode();D!==c&&(a=D,D=c,E=B.getFirstBlockParent(c),q.trigger(b.Event("nodechanged",{oldNode:a,newNode:D})))},ua.currentNode=function(){return D},ua.currentBlockNode=function(){return E},ha=function(a){var b,c,d="active",e=v[0],f=ua.sourceMode();if(ua.readOnly())return void r.find(d).removeClass(d);f||(c=a?a.newNode:B.parentNode(),b=B.getFirstBlockParent(c));for(var g=0;g-1&&(h=e.queryCommandState(j)?1:0)}catch(a){}}else k||(h=j.call(ua,c,b));i.toggleClass("disabled",k||h<0).toggleClass(d,h>0)}},aa=function(a){var c,d,e,g,h="code,blockquote,pre",i="li,ul,ol";if(!a.originalEvent.defaultPrevented)return ua.closeDropDown(),c=b(E).closest(h+","+i).first(),13===a.which&&c.length&&!c.is(i)?(z=null,d=v[0].createElement("br"),B.insertNode(d),o||(e=d.parentNode,g=e.lastChild,g&&3===g.nodeType&&""===g.nodeValue&&(e.removeChild(g),g=e.lastChild),!f.isInline(e,!0)&&g===d&&f.isInline(d.previousSibling)&&B.insertHTML("
    ")),!1):void 0},ja=function(){var a,c,d,e=u[0];f.rTraverse(e,function(g){if(a=g.nodeName.toLowerCase(),b.inArray(a,ya)>-1&&(c=!0),3===g.nodeType&&!/^\s*$/.test(g.nodeValue)||"br"===a||o&&!g.firstChild&&!f.isInline(g,!1))return c&&(d=v[0].createElement("p"),d.className="sceditor-nlf",d.innerHTML=o?"":"
    ",e.appendChild(d)),!1})},ba=function(){ua.val(wa.val())},ca=function(){ua.closeDropDown(),z=null},fa=function(){var a=c.height,b=c.width;ua.maximize()?ua.dimensions("100%","100%",!1):(a&&a.toString().indexOf("%")>-1||b&&b.toString().indexOf("%")>-1)&&ua.dimensions(b,a)},ua._=function(){var a,b=arguments;return A&&A[b[0]]&&(b[0]=A[b[0]]),b[0].replace(/\{(\d+)\}/g,function(c,d){return b[d-0+1]!==a?b[d-0+1]:"{"+d+"}"})},da=function(a){C.call(a.type+"Event",a,ua);var c=a.target===x?"scesrc":"scewys",d=b.Event(a);d.type=c+a.type,q.trigger(d,ua)},ua.bind=function(a,c,d,e){a=a.split(" ");for(var f=a.length;f--;)b.isFunction(c)&&(d||q.on("scewys"+a[f],c),e||q.on("scesrc"+a[f],c),"valuechanged"===a[f]&&(qa.hasHandler=!0));return ua},ua.unbind=function(a,c,d,e){a=a.split(" ");for(var f=a.length;f--;)b.isFunction(c)&&(d||q.off("scewys"+a[f],c),e||q.off("scesrc"+a[f],c));return ua},ua.blur=function(a,c,d){return b.isFunction(a)?ua.bind("blur",a,c,d):ua.sourceMode()?w.blur():u.blur(),ua},ua.focus=function(a,c,d){if(b.isFunction(a))ua.bind("focus",a,c,d);else if(ua.inSourceMode())x.focus();else{var e,f=B.selectedRange();F||B.hasSelection()||ma(),!o&&f&&1===f.endOffset&&f.collapsed&&(e=f.endContainer,e&&1===e.childNodes.length&&b(e.firstChild).is("br")&&(f.setStartBefore(e.firstChild),f.collapse(!0),B.selectRange(f))),t.contentWindow.focus(),u[0].focus(),z&&(B.selectRange(z),z=null)}return ha(),ua},ua.keyDown=function(a,b,c){return ua.bind("keydown",a,b,c)},ua.keyPress=function(a,b,c){return ua.bind("keypress",a,b,c)},ua.keyUp=function(a,b,c){return ua.bind("keyup",a,b,c)},ua.nodeChanged=function(a){return ua.bind("nodechanged",a,!1,!0)},ua.selectionChanged=function(a){return ua.bind("selectionchanged",a,!1,!0)},ua.valueChanged=function(a,b,c){return ua.bind("valuechanged",a,b,c)},na=function(a){var d,e=0,f=ua.emoticonsCache,g=String.fromCharCode(a.which);if(!b(E).is("code")&&!b(E).parents("code").length)return f||(f=[],b.each(b.extend({},c.emoticons.more,c.emoticons.dropdown,c.emoticons.hidden),function(a,b){f[e++]=[a,i("emoticon",{key:a,url:b.url||b,tooltip:b.tooltip||a})]}),f.sort(function(a,b){return a[0].length-b[0].length}),ua.emoticonsCache=f,ua.longestEmoticonCode=f[f.length-1][0].length),d=B.replaceKeyword(ua.emoticonsCache,!0,!0,ua.longestEmoticonCode,c.emoticonsCompat,g),d&&c.emoticonsCompat?(Ba=u.find("img[data-sceditor-emoticon]"),/^\s$/.test(g)):!d},oa=function(){if(Ba.length){var a,c,d,e,f,g,h=ua.currentBlockNode(),i=!1,j=/[^\s\xA0\u2002\u2003\u2009\u00a0]+/;Ba=b.map(Ba,function(k){return k&&k.parentNode?b.contains(h,k)?(a=k.previousSibling,c=k.nextSibling,f=a.nodeValue,null===f&&(f=a.innerText||""),a&&j.test(a.nodeValue.slice(-1))||c&&j.test((c.nodeValue||"")[0])?(d=k.parentNode,e=B.cloneSelected(),g=e.startContainer,f+=b(k).data("sceditor-emoticon"),g===c?i=f.length+e.startOffset:g===h&&h.childNodes[e.startOffset]===c?i=f.length:g===a&&(i=e.startOffset),c&&3===c.nodeType||(c=d.insertBefore(d.ownerDocument.createTextNode(""),c)),c.insertData(0,f),d.removeChild(a),d.removeChild(k),i!==!1&&(e.setStart(c,i),e.collapse(!0),B.selectRange(e)),null):k):k:null})}},ua.emoticons=function(a){return a||a===!1?(c.emoticonsEnabled=a,a?(u.keypress(na),ua.sourceMode()||(B.saveRange(),L(u[0]),Ba=u.find("img[data-sceditor-emoticon]"),qa(!1),B.restoreRange())):(u.find("img[data-sceditor-emoticon]").replaceWith(function(){return b(this).data("sceditor-emoticon")}),Ba=[],u.off("keypress",na),qa()),ua):c.emoticonsEnabled},ua.css=function(a){return I||(I=b('

    ',toolbarButton:'
    {dispName}
    ',emoticon:'{key}',fontOpt:'{font}',sizeOpt:'{size}',pastetext:'
    ',table:'
    ',image:'
    ',email:'
    ',link:'
    ',youtubeMenu:'
    ',youtube:''};return function(b,c,d){var e=a[b];return $.each(c,function(a,b){e=e.replace(new RegExp("\\{"+a+"\\}","g"),b)}),d&&(e=$(e)),e}}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(a){"use strict";var b=c(1),d=c(6).ie,e=c(8),f=d&&d<11,g={bold:{exec:"bold",tooltip:"Bold",shortcut:"Ctrl+B"},italic:{exec:"italic",tooltip:"Italic",shortcut:"Ctrl+I"},underline:{exec:"underline",tooltip:"Underline",shortcut:"Ctrl+U"},strike:{exec:"strikethrough",tooltip:"Strikethrough"},subscript:{exec:"subscript",tooltip:"Subscript"},superscript:{exec:"superscript",tooltip:"Superscript"},left:{exec:"justifyleft",tooltip:"Align left"},center:{exec:"justifycenter",tooltip:"Center"},right:{exec:"justifyright",tooltip:"Align right"},justify:{exec:"justifyfull",tooltip:"Justify"},font:{_dropDown:function(a,c,d){for(var f=0,g=a.opts.fonts.split(","),h=b("
    "),i=function(){return d(b(this).data("font")),a.closeDropDown(!0),!1};f"),g=function(c){d(b(this).data("size")),a.closeDropDown(!0),c.preventDefault()},h=1;h<=7;h++)f.append(e("sizeOpt",{size:h},!0).click(g));a.createDropDown(c,"fontsize-picker",f)},exec:function(a){var b=this;g.size._dropDown(b,a,function(a){b.execCommand("fontsize",a)})},tooltip:"Font Size"},color:{_dropDown:function(a,c,d){var e,f,h,i,j={r:255,g:255,b:255},k=b("
    "),l=a.opts.colors?a.opts.colors.split("|"):new Array(21),m=[],n=g.color;if(!n._htmlCache){for(e=0;e'),f=0;f'),f%5===0?(j.g-=51,j.b=255):j.b-=51;m.push("
    "),e%5===0?(j.r-=51,j.g=255,j.b=255):(j.g=255,j.b=255)}n._htmlCache=m.join("")}k.append(n._htmlCache).find("a").click(function(c){d(b(this).attr("data-color")),a.closeDropDown(!0),c.preventDefault()}),a.createDropDown(c,"color-picker",k)},exec:function(a){var b=this;g.color._dropDown(b,a,function(a){b.execCommand("forecolor",a)})},tooltip:"Font Color"},removeformat:{exec:"removeformat",tooltip:"Remove Formatting"},cut:{exec:"cut",tooltip:"Cut",errorMessage:"Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X"},copy:{exec:"copy",tooltip:"Copy",errorMessage:"Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C"},paste:{exec:"paste",tooltip:"Paste",errorMessage:"Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V"},pastetext:{exec:function(a){var b,c,d=this;c=e("pastetext",{label:d._("Paste your text inside the following box:"),insert:d._("Insert")},!0),c.find(".button").click(function(a){b=c.find("#txt").val(),b&&d.wysiwygEditorInsertText(b),d.closeDropDown(!0),a.preventDefault()}),d.createDropDown(a,"pastetext",c)},tooltip:"Paste Text"},bulletlist:{exec:"insertunorderedlist",tooltip:"Bullet list"},orderedlist:{exec:"insertorderedlist",tooltip:"Numbered list"},indent:{state:function(a,c){var d,e,f,g=b(c),h=g.parents("ul,ol,menu"),i=h.first();if(h.length>1||i.children().length>1)return 0;if(g.is("ul,ol,menu")){if(d=this.getRangeHelper().selectedRange(),!(window.Range&&d instanceof Range))return g.is("li,ul,ol,menu")?0:-1;if(e=d.startContainer.parentNode,f=d.endContainer.parentNode,e!==e.parentNode.firstElementChild||b(f).is("li")&&f!==f.parentNode.lastElementChild)return 0}return-1},exec:function(){var a=this,c=b(a.getRangeHelper().getFirstBlockParent());a.focus(),c.parents("ul,ol,menu")&&a.execCommand("indent")},tooltip:"Add indent"},outdent:{state:function(a,c){return b(c).is("ul,ol,menu")||b(c).parents("ul,ol,menu").length>0?0:-1},exec:function(){var a=this,c=b(a.getRangeHelper().getFirstBlockParent());c.parents("ul,ol,menu")&&a.execCommand("outdent")},tooltip:"Remove one indent"},table:{forceNewLineAfter:["table"],exec:function(a){var b=this,c=e("table",{rows:b._("Rows:"),cols:b._("Cols:"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d,e,g=c.find("#rows").val()-0,h=c.find("#cols").val()-0,i="";if(!(g<1||h<1)){for(d=0;d",e=0;e"+(f?"":"
    ")+"";i+=""}i+="
    ",b.wysiwygEditorInsertHtml(i),b.closeDropDown(!0),a.preventDefault()}}),b.createDropDown(a,"inserttable",c)},tooltip:"Insert a table"},horizontalrule:{exec:"inserthorizontalrule",tooltip:"Insert a horizontal rule"},code:{forceNewLineAfter:["code"],exec:function(){this.wysiwygEditorInsertHtml("",(f?"":"
    ")+"
    ")},tooltip:"Code"},image:{exec:function(a){var b=this,c=e("image",{url:b._("URL:"),width:b._("Width (optional):"),height:b._("Height (optional):"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#image").val(),e=c.find("#width").val(),f=c.find("#height").val(),g="";e&&(g+=' width="'+e+'"'),f&&(g+=' height="'+f+'"'),d&&b.wysiwygEditorInsertHtml("'),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertimage",c)},tooltip:"Insert an image"},email:{exec:function(a){var b=this,c=e("email",{label:b._("E-mail:"),desc:b._("Description (optional):"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#email").val(),e=c.find("#des").val();d&&(b.focus(),!b.getRangeHelper().selectedHtml()||e?(e=e||d,b.wysiwygEditorInsertHtml(''+e+"")):b.execCommand("createlink","mailto:"+d)),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertemail",c)},tooltip:"Insert an email"},link:{exec:function(a){var b=this,c=e("link",{url:b._("URL:"),desc:b._("Description (optional):"),ins:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#link").val(),e=c.find("#des").val();d&&(b.focus(),!b.getRangeHelper().selectedHtml()||e?(e=e||d,b.wysiwygEditorInsertHtml(''+e+"")):b.execCommand("createlink",d)),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertlink",c)},tooltip:"Insert a link"},unlink:{state:function(){var a=b(this.currentNode());return a.is("a")||a.parents("a").length>0?0:-1},exec:function(){var a=b(this.currentNode()),c=a.is("a")?a:a.parents("a").first();c.length&&c.replaceWith(c.contents())},tooltip:"Unlink"},quote:{forceNewLineAfter:["blockquote"],exec:function(a,b,c){var d="
    ",e="
    ";b?(c=c?""+c+"":"",d=d+c+b+e,e=null):""===this.getRangeHelper().selectedHtml()&&(e=(f?"":"
    ")+e),this.wysiwygEditorInsertHtml(d,e)},tooltip:"Insert a Quote"},emoticon:{exec:function(a){var c=this,d=function(e){var f,g=c.opts.emoticonsCompat,h=c.getRangeHelper(),i=g&&" "!==h.getOuterText(!0,1)?" ":"",j=g&&" "!==h.getOuterText(!1,1)?" ":"",k=b("
    "),l=b("
    ").appendTo(k),m=0,n=b.extend({},c.opts.emoticons.dropdown,e?c.opts.emoticons.more:{});return b.each(n,function(){m++}),m=Math.sqrt(m),b.each(n,function(a,d){l.append(b("").attr({src:d.url||d,alt:a,title:d.tooltip||a}).click(function(){return c.insert(i+b(this).attr("alt")+j,null,!1).closeDropDown(!0),!1})),l.children().length>=m&&(l=b("
    ").appendTo(k))}),!e&&c.opts.emoticons.more&&(f=b(''+c._("More")+"").click(function(){return c.createDropDown(a,"more-emoticons",d(!0)),!1}),k.append(f)),k};c.createDropDown(a,"emoticons",d(!1))},txtExec:function(a){g.emoticon.exec.call(this,a)},tooltip:"Insert an emoticon"},youtube:{_dropDown:function(a,b,c){var d,f=e("youtubeMenu",{label:a._("Video URL:"),insert:a._("Insert")},!0);f.find(".button").click(function(b){var e=f.find("#link").val();e&&(d=e.match(/(?:v=|v\/|embed\/|youtu.be\/)(.{11})/),d&&(e=d[1]),/^[a-zA-Z0-9_\-]{11}$/.test(e)?c(e):alert("Invalid YouTube video")),a.closeDropDown(!0),b.preventDefault()}),a.createDropDown(b,"insertlink",f)},exec:function(a){var b=this;g.youtube._dropDown(b,a,function(a){b.wysiwygEditorInsertHtml(e("youtube",{id:a}))})},tooltip:"Insert a YouTube video"},date:{_date:function(a){var b=new Date,c=b.getYear(),d=b.getMonth()+1,e=b.getDate();return c<2e3&&(c=1900+c),d<10&&(d="0"+d),e<10&&(e="0"+e),a.opts.dateFormat.replace(/year/i,c).replace(/month/i,d).replace(/day/i,e)},exec:function(){this.insertText(g.date._date(this))},txtExec:function(){this.insertText(g.date._date(this))},tooltip:"Insert current date"},time:{_time:function(){var a=new Date,b=a.getHours(),c=a.getMinutes(),d=a.getSeconds();return b<10&&(b="0"+b),c<10&&(c="0"+c),d<10&&(d="0"+d),b+":"+c+":"+d},exec:function(){this.insertText(g.time._time())},txtExec:function(){this.insertText(g.time._time())},tooltip:"Insert current time"},ltr:{state:function(a,b){return b&&"ltr"===b.style.direction},exec:function(){var a=this,c=a.getRangeHelper().getFirstBlockParent(),d=b(c);a.focus(),(c&&!d.is("body")||(a.execCommand("formatBlock","p"),c=a.getRangeHelper().getFirstBlockParent(),d=b(c),c&&!d.is("body")))&&("ltr"===d.css("direction")?d.css("direction",""):d.css("direction","ltr"))},tooltip:"Left-to-Right"},rtl:{state:function(a,b){return b&&"rtl"===b.style.direction},exec:function(){var a=this,c=a.getRangeHelper().getFirstBlockParent(),d=b(c);a.focus(),(c&&!d.is("body")||(a.execCommand("formatBlock","p"),c=a.getRangeHelper().getFirstBlockParent(),d=b(c),c&&!d.is("body")))&&("rtl"===d.css("direction")?d.css("direction",""):d.css("direction","rtl"))},tooltip:"Right-to-Left"},print:{exec:"print",tooltip:"Print"},maximize:{state:function(){return this.maximize()},exec:function(){this.maximize(!this.maximize())},txtExec:function(){this.maximize(!this.maximize())},tooltip:"Maximize",shortcut:"Ctrl+Shift+M"},source:{state:function(){return this.sourceMode()},exec:function(){this.toggleSourceMode()},txtExec:function(){this.toggleSourceMode()},tooltip:"View source",shortcut:"Ctrl+Shift+S"},ignore:{}};return g}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(a){"use strict";var b=c(1);return{toolbar:"bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,paste,pastetext|bulletlist,orderedlist,indent,outdent|table|code,quote|horizontalrule,image,email,link,unlink|emoticon,youtube,date,time|ltr,rtl|print,maximize,source",toolbarExclude:null,style:"jquery.sceditor.default.css",fonts:"Arial,Arial Black,Comic Sans MS,Courier New,Georgia,Impact,Sans-serif,Serif,Times New Roman,Trebuchet MS,Verdana",colors:null,locale:b("html").attr("lang")||"en",charset:"utf-8",emoticonsCompat:!1,emoticonsEnabled:!0,emoticonsRoot:"",emoticons:{dropdown:{":)":"emoticons/smile.png",":angel:":"emoticons/angel.png",":angry:":"emoticons/angry.png","8-)":"emoticons/cool.png",":'(":"emoticons/cwy.png",":ermm:":"emoticons/ermm.png",":D":"emoticons/grin.png","<3":"emoticons/heart.png",":(":"emoticons/sad.png",":O":"emoticons/shocked.png",":P":"emoticons/tongue.png",";)":"emoticons/wink.png"},more:{":alien:":"emoticons/alien.png",":blink:":"emoticons/blink.png",":blush:":"emoticons/blush.png",":cheerful:":"emoticons/cheerful.png",":devil:":"emoticons/devil.png",":dizzy:":"emoticons/dizzy.png",":getlost:":"emoticons/getlost.png",":happy:":"emoticons/happy.png",":kissing:":"emoticons/kissing.png",":ninja:":"emoticons/ninja.png",":pinch:":"emoticons/pinch.png",":pouty:":"emoticons/pouty.png",":sick:":"emoticons/sick.png",":sideways:":"emoticons/sideways.png",":silly:":"emoticons/silly.png",":sleeping:":"emoticons/sleeping.png",":unsure:":"emoticons/unsure.png",":woot:":"emoticons/w00t.png",":wassat:":"emoticons/wassat.png"},hidden:{":whistling:":"emoticons/whistling.png",":love:":"emoticons/wub.png"}},width:null,height:null,resizeEnabled:!0,resizeMinWidth:null,resizeMinHeight:null,resizeMaxHeight:null,resizeMaxWidth:null,resizeHeight:!0,resizeWidth:!0,dateFormat:"year-month-day",toolbarContainer:null,enablePasteFiltering:!1,disablePasting:!1,readOnly:!1,rtl:!1,autofocus:!1,autofocusEnd:!0,autoExpand:!1,autoUpdate:!1,spellcheck:!0,runWithoutWysiwygSupport:!1,startInSourceMode:!1,id:null,plugins:"",zIndex:null,bbcodeTrim:!1,disableBlockRemove:!1,parserOptions:{},dropDownCss:{}}}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))}]); \ No newline at end of file diff --git a/Html/js/SCEditor/jquery.sceditor.xhtml.min.js b/Html/js/SCEditor/jquery.sceditor.xhtml.min.js new file mode 100644 index 0000000..55e0115 --- /dev/null +++ b/Html/js/SCEditor/jquery.sceditor.xhtml.min.js @@ -0,0 +1,3 @@ +/* SCEditor v1.5.1 | (C) 2016, Sam Clarke | sceditor.com/license */ +!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d;d=function(a){"use strict";var b=c(1),d=c(2),e=c(3),f=c(6),g=c(7);b.sceditor=d,d.commands=c(9),d.defaultOptions=c(10),d.RangeHelper=c(4),d.dom=c(5),d.ie=f.ie,d.ios=f.ios,d.isWysiwygSupported=f.isWysiwygSupported,d.regexEscape=g.regex,d.escapeEntities=g.entities,d.escapeUriScheme=g.uriScheme,d.PluginManager=e,d.plugins=e.plugins,b.fn.sceditor=function(a){var c,e,g=[];if(a=a||{},a.runWithoutWysiwygSupport||f.isWysiwygSupported)return this.each(function(){c=this.jquery?this:b(this),e=c.data("sceditor"),c.parents(".sceditor-container").length>0||("state"===a?g.push(!!e):"instance"===a?g.push(e):e||new d(this,a))}),g.length?1===g.length?g[0]:b(g):this}}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b){a.exports=jQuery},function(a,b,c){var d;d=function(a){"use strict";var b=c(1),d=c(3),e=c(4),f=c(5),g=c(7),h=c(6),i=c(8),j=window,k=document,l=b(j),m=b(k),n=h.ie,o=n&&n<11,p=function(a,c){var q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua=this,va=a.get?a.get(0):a,wa=b(va),xa=[],ya=[],za=[],Aa={},Ba=[],Ca={};ua.commands=b.extend(!0,{},c.commands||p.commands),ua.opts=c=b.extend({},p.defaultOptions,c),K=function(){wa.data("sceditor",ua),b.each(c,function(a,d){b.isPlainObject(d)&&(c[a]=b.extend(!0,{},d))}),c.locale&&"en"!==c.locale&&Q(),q=b('
    ').insertAfter(wa).css("z-index",c.zIndex),n&&q.addClass("ie ie"+n),H=!!wa.attr("required"),wa.removeAttr("required"),P(),W(),R(),O(!!c.startInSourceMode),U(),S(),T(),h.isWysiwygSupported||ua.toggleSourceMode(),ha();var a=function(){l.off("load",a),c.autofocus&&ma(),c.autoExpand&&ua.expandToContent(),fa(),C.call("ready")};l.on("load",a),k.readyState&&"complete"===k.readyState&&a()},P=function(){var a=c.plugins;a=a?a.toString().split(","):[],C=new d(ua),b.each(a,function(a,c){C.register(b.trim(c))})},Q=function(){var a;A=p.locale[c.locale],A||(a=c.locale.split("-"),A=p.locale[a[0]]),A&&A.dateFormat&&(c.dateFormat=A.dateFormat)},O=function(a){var d,f;w=b(""),s=b(''),a?(q.addClass("sourceMode"),s.hide()):(q.addClass("wysiwygMode"),w.hide()),c.spellcheck||w.attr("spellcheck","false"),"https:"===j.location.protocol&&s.attr("src","javascript:false"),q.append(s).append(w),t=s[0],x=w[0],ua.dimensions(c.width||wa.width(),c.height||wa.height()),d=X(),d.open(),d.write(i("html",{attrs:n?' class="ie ie'+n+'"':"",spellcheck:c.spellcheck?"":'spellcheck="false"',charset:c.charset,style:c.style})),d.close(),v=b(d),u=b(d.body),ua.readOnly(!!c.readOnly),(h.ios||n)&&(u.height("100%"),n||u.on("touchend",ua.focus)),f=wa.attr("tabindex"),w.attr("tabindex",f),s.attr("tabindex",f),B=new e(t.contentWindow),ua.val(wa.hide().val())},S=function(){c.autoUpdate&&(u.on("blur",ta),w.on("blur",ta)),null===c.rtl&&(c.rtl="rtl"===w.css("direction")),ua.rtl(!!c.rtl),c.autoExpand&&v.on("keyup",ua.expandToContent),c.resizeEnabled&&V(),q.attr("id",c.id),ua.emoticons(c.emoticonsEnabled)},T=function(){var a=n?"selectionchange":"keyup focus blur contextmenu mouseup touchend click",d="keydown keyup keypress focus blur contextmenu";m.click(ea),b(va.form).on("reset",ba).submit(ua.updateOriginal),l.on("resize orientationChanged",fa),u.keypress(aa).keydown($).keydown(_).keyup(ja).blur(ra).keyup(sa).on("paste",Y).on(a,ka).on(d,da),c.emoticonsCompat&&j.getSelection&&u.keyup(oa),w.blur(ra).keyup(sa).keydown($).on(d,da),v.mousedown(ca).blur(ra).on(a,ka).on("beforedeactivate keyup mouseup",N).keyup(ja).focus(function(){z=null}),q.on("selectionchanged",la).on("selectionchanged",ha).on("selectionchanged valuechanged nodechanged",da)},R=function(){var a,d=ua.commands,e=(c.toolbarExclude||"").split(","),f=c.toolbar.split("|");r=b('
    '),b.each(f,function(c,f){a=b('
    '),b.each(f.split(","),function(c,f){var g,h,j=d[f];!j||b.inArray(f,e)>-1||(h=j.shortcut,g=i("toolbarButton",{name:f,dispName:ua._(j.name||j.tooltip||f)},!0),g.data("sceditor-txtmode",!!j.txtExec).data("sceditor-wysiwygmode",!!j.exec).toggleClass("disabled",!j.exec).mousedown(function(){(!n||n<9)&&(J=!0)}).click(function(){var a=b(this);return a.hasClass("disabled")||M(a,j),ha(),!1}),j.tooltip&&g.attr("title",ua._(j.tooltip)+(h?" ("+h+")":"")),h&&ua.addShortcut(h,f),j.state?za.push({name:f,state:j.state}):"string"==typeof j.exec&&za.push({name:f,state:j.exec}),a.append(g),Ca[f]=g)}),a[0].firstChild&&r.append(a)}),b(c.toolbarContainer||q).append(r)},U=function(){b.each(ua.commands,function(a,c){c.forceNewLineAfter&&b.isArray(c.forceNewLineAfter)&&(ya=b.merge(ya,c.forceNewLineAfter))}),ja()},V=function(){var a,d,e,f,g,h,i=b('
    '),k=b('
    '),l="touchmove mousemove",o="touchcancel touchend mouseup",p=0,r=0,s=0,t=0,u=0,v=0,w=q.width(),x=q.height(),y=!1,z=ua.rtl();a=c.resizeMinHeight||x/1.5,d=c.resizeMaxHeight||2.5*x,e=c.resizeMinWidth||w/1.25,f=c.resizeMaxWidth||1.25*w,g=function(b){"touchmove"===b.type?(b=j.event,s=b.changedTouches[0].pageX,t=b.changedTouches[0].pageY):(s=b.pageX,t=b.pageY);var g=v+(t-r),h=z?u-(s-p):u+(s-p);f>0&&h>f&&(h=f),e>0&&h0&&g>d&&(g=d),a>0&&g-1&&(a=q.width()),s.width(a-s.data("outerWidthOffset")),w.width(a-w.data("outerWidthOffset")),h.ios&&u&&u.width(a-s.data("outerWidthOffset")-(u.outerWidth(!0)-u.width()))),b!==!1&&(d!==!1&&(c.height=b),b&&b.toString().indexOf("%")>-1&&(b=q.height(b).height(),q.height("auto")),b-=c.toolbarContainer?0:r.outerHeight(!0),s.height(b-s.data("outerHeightOffset")),w.height(b-f-w.data("outerHeightOffset"))),ua)},ua.updateStyleCache=function(){s.data("outerWidthOffset",s.outerWidth(!0)-s.width()),w.data("outerWidthOffset",w.outerWidth(!0)-w.width()),s.data("outerHeightOffset",s.outerHeight(!0)-s.height()),w.data("outerHeightOffset",w.outerHeight(!0)-w.height())},ua.height=function(a,b){return a||0===a?(ua.dimensions(null,a,b),ua):q.height()},ua.maximize=function(a){return"undefined"==typeof a?q.is(".sceditor-maximize"):(a=!!a,n<7&&b("html, body").toggleClass("sceditor-maximize",a),q.toggleClass("sceditor-maximize",a),ua.width(a?"100%":c.width,!1),ua.height(a?"100%":c.height,!1),ua)},ua.expandToContent=function(a){var b=q.height(),d=b-s.height(),e=u[0].scrollHeight||v[0].documentElement.scrollHeight,f=c.resizeMaxHeight||2*(c.height||wa.height());e+=d,(a===!0||e<=f)&&e>b&&ua.height(e)},ua.destroy=function(){C&&(C.destroy(),B=null,z=null,C=null,y&&y.off().remove(),m.off("click",ea),l.off("resize orientationChanged",fa),b(va.form).off("reset",ba).off("submit",ua.updateOriginal),u.off(),v.off().find("*").remove(),w.off().remove(),r.remove(),q.off().find("*").off().remove(),q.remove(),wa.removeData("sceditor").removeData("sceditorbbcode").show(),H&&wa.attr("required","required"))},ua.createDropDown=function(a,d,e,f){var g,h="sceditor-"+d,i=y&&y.is("."+h);ua.closeDropDown(!0),i||(f!==!1&&b(e).find(":not(input,textarea)").filter(function(){return 1===this.nodeType}).attr("unselectable","on"),g={top:a.offset().top,left:a.offset().left,marginTop:a.outerHeight()},b.extend(g,c.dropDownCss),y=b('
    ').css(g).append(e).appendTo(b("body")).on("click focusin",function(a){a.stopPropagation()}),setTimeout(function(){y&&y.find("input,textarea").first().focus()}))},ea=function(a){3!==a.which&&y&&(ta(),ua.closeDropDown())},Y=function(a){var b,d,e,f=u[0],g=v[0],h=0,i=k.createElement("div"),j=g.createDocumentFragment(),l=!!a&&a.clipboardData;if(c.disablePasting)return!1;if(c.enablePasteFiltering){if(B.saveRange(),k.body.appendChild(i),l&&l.getData&&((b=l.getData("text/html"))||(b=l.getData("text/plain"))))return i.innerHTML=b,Z(f,i),!1;for(e=u.scrollTop()||v.scrollTop();f.firstChild;)j.appendChild(f.firstChild);return d=function(a,b){if(a.childNodes.length>0||h>25){for(;a.firstChild;)b.appendChild(a.firstChild);for(;j.firstChild;)a.appendChild(j.firstChild);u.scrollTop(e),v.scrollTop(e),b.childNodes.length>0?Z(a,b):B.restoreRange()}else h++,setTimeout(function(){d(a,b)},20)},d(f,i),ua.focus(),!0}},Z=function(a,c){f.fixNesting(c);var d=c.innerHTML;C.hasHandler("toSource")&&(d=C.callOnlyFirst("toSource",d,b(c))),c.parentNode.removeChild(c),C.hasHandler("toWysiwyg")&&(d=C.callOnlyFirst("toWysiwyg",d,!0)),B.restoreRange(),ua.wysiwygEditorInsertHtml(d,null,!0)},ua.closeDropDown=function(a){y&&(y.off().remove(),y=null),a===!0&&ua.focus()},X=function(){return t.contentDocument?t.contentDocument:t.contentWindow&&t.contentWindow.document?t.contentWindow.document:t.document},ua.wysiwygEditorInsertHtml=function(a,c,d){var e,g,h,i=s.height();ua.focus(),(d||!b(E).is("code")&&0===b(E).parents("code").length)&&(B.insertHTML(a,c),B.saveRange(),L(u[0]),e=u.find("#sceditor-end-marker").show(),g=u.scrollTop()||v.scrollTop(),h=f.getOffset(e[0]).top+1.5*e.outerHeight(!0)-i,e.hide(),(h>g||h+i").appendTo(b("body")).hide().html(g);d!==!1&&C.hasHandler("toSource")&&(g=C.callOnlyFirst("toSource",g,h)),h.remove(),a+=g+c}return d!==!1&&C.hasHandler("toWysiwyg")&&(a=C.callOnlyFirst("toWysiwyg",a,!0)),d!==!1&&f===!0&&(a=a.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")),ua.wysiwygEditorInsertHtml(a),ua},ua.getWysiwygEditorValue=function(a){var c,d=b("
    ").appendTo(document.body).append(b(u[0].childNodes).clone());return f.fixNesting(d[0]),c=d.html(),a!==!1&&C.hasHandler("toSource")&&(c=C.callOnlyFirst("toSource",c,d)),d.remove(),c},ua.getBody=function(){return u},ua.getContentAreaContainer=function(){return s},ua.getSourceEditorValue=function(a){var b=w.val();return a!==!1&&C.hasHandler("toWysiwyg")&&(b=C.callOnlyFirst("toWysiwyg",b)),b},ua.setWysiwygEditorValue=function(a){a||(a="

    "+(n?"":"
    ")+"

    "),u[0].innerHTML=a,L(u[0]),ja(),qa()},ua.setSourceEditorValue=function(a){w.val(a),qa()},ua.updateOriginal=function(){wa.val(ua.val())},L=function(a){if(c.emoticonsEnabled&&!b(a).parents("code").length){var d=a.ownerDocument,e="\\s| | | | | ",h=[],j=[],k=b.extend({},c.emoticons.more,c.emoticons.dropdown,c.emoticons.hidden);b.each(k,function(a){c.emoticonsCompat&&(j[a]=new RegExp("(>|^|"+e+")"+g.regex(a)+"($|<|"+e+")")),h.push(a)});var l=function(a){for(a=a.firstChild;a;){var e,g,m,n,o,p,q,r=a.parentNode,s=a.nodeValue;if(3!==a.nodeType)b(a).is("code")||l(a);else if(s)for(o=h.length;o--;)g=h[o],q=c.emoticonsCompat?s.search(j[g]):s.indexOf(g),q>-1&&(p=a.nextSibling,m=k[g],e=s.substr(q).split(g),s=s.substr(0,q)+e.shift(),a.nodeValue=s,n=f.parseHTML(i("emoticon",{key:g,url:m.url||m,tooltip:m.tooltip||g}),d),r.insertBefore(n[0],p),r.insertBefore(d.createTextNode(e.join(g)),p));a=a.nextSibling}};l(a),c.emoticonsCompat&&(Ba=u.find("img[data-sceditor-emoticon]"))}},ua.inSourceMode=function(){return q.hasClass("sourceMode")},ua.sourceMode=function(a){var b=ua.inSourceMode();return"boolean"!=typeof a?b:((b&&!a||!b&&a)&&ua.toggleSourceMode(),ua)},ua.toggleSourceMode=function(){var a=ua.inSourceMode();!h.isWysiwygSupported&&a||(a||(B.saveRange(),B.clear()),ua.blur(),a?ua.setWysiwygEditorValue(ua.getSourceEditorValue()):ua.setSourceEditorValue(ua.getWysiwygEditorValue()),z=null,w.toggle(),s.toggle(),q.toggleClass("wysiwygMode",a).toggleClass("sourceMode",!a),ga(),ha())},ia=function(){return x.focus(),"undefined"!=typeof x.selectionStart?x.value.substring(x.selectionStart,x.selectionEnd):k.selection.createRange().text},M=function(a,c){ua.inSourceMode()?c.txtExec&&(b.isArray(c.txtExec)?ua.sourceEditorInsertText.apply(ua,c.txtExec):c.txtExec.call(ua,a,ia())):c.exec&&(b.isFunction(c.exec)?c.exec.call(ua,a):ua.execCommand(c.exec,c.hasOwnProperty("execParam")?c.execParam:null))},N=function(){n&&(z=B.selectedRange())},ua.execCommand=function(a,c){var d=!1,e=ua.commands[a],f=b(B.parentNode());if(ua.focus(),!f.is("code")&&0===f.parents("code").length){try{d=v[0].execCommand(a,!1,c)}catch(a){}!d&&e&&e.errorMessage&&alert(ua._(e.errorMessage)),ha()}},ka=function(){function a(){B&&!B.compare(F)&&(F=B.cloneSelected(),q.trigger(b.Event("selectionchanged"))),G=!1}G||(G=!0,n?a():setTimeout(a,100))},la=function(){var a,c=B.parentNode();D!==c&&(a=D,D=c,E=B.getFirstBlockParent(c),q.trigger(b.Event("nodechanged",{oldNode:a,newNode:D})))},ua.currentNode=function(){return D},ua.currentBlockNode=function(){return E},ha=function(a){var b,c,d="active",e=v[0],f=ua.sourceMode();if(ua.readOnly())return void r.find(d).removeClass(d);f||(c=a?a.newNode:B.parentNode(),b=B.getFirstBlockParent(c));for(var g=0;g-1&&(h=e.queryCommandState(j)?1:0)}catch(a){}}else k||(h=j.call(ua,c,b));i.toggleClass("disabled",k||h<0).toggleClass(d,h>0)}},aa=function(a){var c,d,e,g,h="code,blockquote,pre",i="li,ul,ol";if(!a.originalEvent.defaultPrevented)return ua.closeDropDown(),c=b(E).closest(h+","+i).first(),13===a.which&&c.length&&!c.is(i)?(z=null,d=v[0].createElement("br"),B.insertNode(d),o||(e=d.parentNode,g=e.lastChild,g&&3===g.nodeType&&""===g.nodeValue&&(e.removeChild(g),g=e.lastChild),!f.isInline(e,!0)&&g===d&&f.isInline(d.previousSibling)&&B.insertHTML("
    ")),!1):void 0},ja=function(){var a,c,d,e=u[0];f.rTraverse(e,function(g){if(a=g.nodeName.toLowerCase(),b.inArray(a,ya)>-1&&(c=!0),3===g.nodeType&&!/^\s*$/.test(g.nodeValue)||"br"===a||o&&!g.firstChild&&!f.isInline(g,!1))return c&&(d=v[0].createElement("p"),d.className="sceditor-nlf",d.innerHTML=o?"":"
    ",e.appendChild(d)),!1})},ba=function(){ua.val(wa.val())},ca=function(){ua.closeDropDown(),z=null},fa=function(){var a=c.height,b=c.width;ua.maximize()?ua.dimensions("100%","100%",!1):(a&&a.toString().indexOf("%")>-1||b&&b.toString().indexOf("%")>-1)&&ua.dimensions(b,a)},ua._=function(){var a,b=arguments;return A&&A[b[0]]&&(b[0]=A[b[0]]),b[0].replace(/\{(\d+)\}/g,function(c,d){return b[d-0+1]!==a?b[d-0+1]:"{"+d+"}"})},da=function(a){C.call(a.type+"Event",a,ua);var c=a.target===x?"scesrc":"scewys",d=b.Event(a);d.type=c+a.type,q.trigger(d,ua)},ua.bind=function(a,c,d,e){a=a.split(" ");for(var f=a.length;f--;)b.isFunction(c)&&(d||q.on("scewys"+a[f],c),e||q.on("scesrc"+a[f],c),"valuechanged"===a[f]&&(qa.hasHandler=!0));return ua},ua.unbind=function(a,c,d,e){a=a.split(" ");for(var f=a.length;f--;)b.isFunction(c)&&(d||q.off("scewys"+a[f],c),e||q.off("scesrc"+a[f],c));return ua},ua.blur=function(a,c,d){return b.isFunction(a)?ua.bind("blur",a,c,d):ua.sourceMode()?w.blur():u.blur(),ua},ua.focus=function(a,c,d){if(b.isFunction(a))ua.bind("focus",a,c,d);else if(ua.inSourceMode())x.focus();else{var e,f=B.selectedRange();F||B.hasSelection()||ma(),!o&&f&&1===f.endOffset&&f.collapsed&&(e=f.endContainer,e&&1===e.childNodes.length&&b(e.firstChild).is("br")&&(f.setStartBefore(e.firstChild),f.collapse(!0),B.selectRange(f))),t.contentWindow.focus(),u[0].focus(),z&&(B.selectRange(z),z=null)}return ha(),ua},ua.keyDown=function(a,b,c){return ua.bind("keydown",a,b,c)},ua.keyPress=function(a,b,c){return ua.bind("keypress",a,b,c)},ua.keyUp=function(a,b,c){return ua.bind("keyup",a,b,c)},ua.nodeChanged=function(a){return ua.bind("nodechanged",a,!1,!0)},ua.selectionChanged=function(a){return ua.bind("selectionchanged",a,!1,!0)},ua.valueChanged=function(a,b,c){return ua.bind("valuechanged",a,b,c)},na=function(a){var d,e=0,f=ua.emoticonsCache,g=String.fromCharCode(a.which);if(!b(E).is("code")&&!b(E).parents("code").length)return f||(f=[],b.each(b.extend({},c.emoticons.more,c.emoticons.dropdown,c.emoticons.hidden),function(a,b){f[e++]=[a,i("emoticon",{key:a,url:b.url||b,tooltip:b.tooltip||a})]}),f.sort(function(a,b){return a[0].length-b[0].length}),ua.emoticonsCache=f,ua.longestEmoticonCode=f[f.length-1][0].length),d=B.replaceKeyword(ua.emoticonsCache,!0,!0,ua.longestEmoticonCode,c.emoticonsCompat,g),d&&c.emoticonsCompat?(Ba=u.find("img[data-sceditor-emoticon]"),/^\s$/.test(g)):!d},oa=function(){if(Ba.length){var a,c,d,e,f,g,h=ua.currentBlockNode(),i=!1,j=/[^\s\xA0\u2002\u2003\u2009\u00a0]+/;Ba=b.map(Ba,function(k){return k&&k.parentNode?b.contains(h,k)?(a=k.previousSibling,c=k.nextSibling,f=a.nodeValue,null===f&&(f=a.innerText||""),a&&j.test(a.nodeValue.slice(-1))||c&&j.test((c.nodeValue||"")[0])?(d=k.parentNode,e=B.cloneSelected(),g=e.startContainer,f+=b(k).data("sceditor-emoticon"),g===c?i=f.length+e.startOffset:g===h&&h.childNodes[e.startOffset]===c?i=f.length:g===a&&(i=e.startOffset),c&&3===c.nodeType||(c=d.insertBefore(d.ownerDocument.createTextNode(""),c)),c.insertData(0,f),d.removeChild(a),d.removeChild(k),i!==!1&&(e.setStart(c,i),e.collapse(!0),B.selectRange(e)),null):k):k:null})}},ua.emoticons=function(a){return a||a===!1?(c.emoticonsEnabled=a,a?(u.keypress(na),ua.sourceMode()||(B.saveRange(),L(u[0]),Ba=u.find("img[data-sceditor-emoticon]"),qa(!1),B.restoreRange())):(u.find("img[data-sceditor-emoticon]").replaceWith(function(){return b(this).data("sceditor-emoticon")}),Ba=[],u.off("keypress",na),qa()),ua):c.emoticonsEnabled},ua.css=function(a){return I||(I=b('

    ',toolbarButton:'
    {dispName}
    ',emoticon:'{key}',fontOpt:'{font}',sizeOpt:'{size}',pastetext:'
    ',table:'
    ',image:'
    ',email:'
    ',link:'
    ',youtubeMenu:'
    ',youtube:''};return function(b,c,d){var e=a[b];return $.each(c,function(a,b){e=e.replace(new RegExp("\\{"+a+"\\}","g"),b)}),d&&(e=$(e)),e}}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(a){"use strict";var b=c(1),d=c(6).ie,e=c(8),f=d&&d<11,g={bold:{exec:"bold",tooltip:"Bold",shortcut:"Ctrl+B"},italic:{exec:"italic",tooltip:"Italic",shortcut:"Ctrl+I"},underline:{exec:"underline",tooltip:"Underline",shortcut:"Ctrl+U"},strike:{exec:"strikethrough",tooltip:"Strikethrough"},subscript:{exec:"subscript",tooltip:"Subscript"},superscript:{exec:"superscript",tooltip:"Superscript"},left:{exec:"justifyleft",tooltip:"Align left"},center:{exec:"justifycenter",tooltip:"Center"},right:{exec:"justifyright",tooltip:"Align right"},justify:{exec:"justifyfull",tooltip:"Justify"},font:{_dropDown:function(a,c,d){for(var f=0,g=a.opts.fonts.split(","),h=b("
    "),i=function(){return d(b(this).data("font")),a.closeDropDown(!0),!1};f"),g=function(c){d(b(this).data("size")),a.closeDropDown(!0),c.preventDefault()},h=1;h<=7;h++)f.append(e("sizeOpt",{size:h},!0).click(g));a.createDropDown(c,"fontsize-picker",f)},exec:function(a){var b=this;g.size._dropDown(b,a,function(a){b.execCommand("fontsize",a)})},tooltip:"Font Size"},color:{_dropDown:function(a,c,d){var e,f,h,i,j={r:255,g:255,b:255},k=b("
    "),l=a.opts.colors?a.opts.colors.split("|"):new Array(21),m=[],n=g.color;if(!n._htmlCache){for(e=0;e'),f=0;f'),f%5===0?(j.g-=51,j.b=255):j.b-=51;m.push("
    "),e%5===0?(j.r-=51,j.g=255,j.b=255):(j.g=255,j.b=255)}n._htmlCache=m.join("")}k.append(n._htmlCache).find("a").click(function(c){d(b(this).attr("data-color")),a.closeDropDown(!0),c.preventDefault()}),a.createDropDown(c,"color-picker",k)},exec:function(a){var b=this;g.color._dropDown(b,a,function(a){b.execCommand("forecolor",a)})},tooltip:"Font Color"},removeformat:{exec:"removeformat",tooltip:"Remove Formatting"},cut:{exec:"cut",tooltip:"Cut",errorMessage:"Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X"},copy:{exec:"copy",tooltip:"Copy",errorMessage:"Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C"},paste:{exec:"paste",tooltip:"Paste",errorMessage:"Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V"},pastetext:{exec:function(a){var b,c,d=this;c=e("pastetext",{label:d._("Paste your text inside the following box:"),insert:d._("Insert")},!0),c.find(".button").click(function(a){b=c.find("#txt").val(),b&&d.wysiwygEditorInsertText(b),d.closeDropDown(!0),a.preventDefault()}),d.createDropDown(a,"pastetext",c)},tooltip:"Paste Text"},bulletlist:{exec:"insertunorderedlist",tooltip:"Bullet list"},orderedlist:{exec:"insertorderedlist",tooltip:"Numbered list"},indent:{state:function(a,c){var d,e,f,g=b(c),h=g.parents("ul,ol,menu"),i=h.first();if(h.length>1||i.children().length>1)return 0;if(g.is("ul,ol,menu")){if(d=this.getRangeHelper().selectedRange(),!(window.Range&&d instanceof Range))return g.is("li,ul,ol,menu")?0:-1;if(e=d.startContainer.parentNode,f=d.endContainer.parentNode,e!==e.parentNode.firstElementChild||b(f).is("li")&&f!==f.parentNode.lastElementChild)return 0}return-1},exec:function(){var a=this,c=b(a.getRangeHelper().getFirstBlockParent());a.focus(),c.parents("ul,ol,menu")&&a.execCommand("indent")},tooltip:"Add indent"},outdent:{state:function(a,c){return b(c).is("ul,ol,menu")||b(c).parents("ul,ol,menu").length>0?0:-1},exec:function(){var a=this,c=b(a.getRangeHelper().getFirstBlockParent());c.parents("ul,ol,menu")&&a.execCommand("outdent")},tooltip:"Remove one indent"},table:{forceNewLineAfter:["table"],exec:function(a){var b=this,c=e("table",{rows:b._("Rows:"),cols:b._("Cols:"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d,e,g=c.find("#rows").val()-0,h=c.find("#cols").val()-0,i="";if(!(g<1||h<1)){for(d=0;d",e=0;e"+(f?"":"
    ")+"";i+=""}i+="
    ",b.wysiwygEditorInsertHtml(i),b.closeDropDown(!0),a.preventDefault()}}),b.createDropDown(a,"inserttable",c)},tooltip:"Insert a table"},horizontalrule:{exec:"inserthorizontalrule",tooltip:"Insert a horizontal rule"},code:{forceNewLineAfter:["code"],exec:function(){this.wysiwygEditorInsertHtml("",(f?"":"
    ")+"
    ")},tooltip:"Code"},image:{exec:function(a){var b=this,c=e("image",{url:b._("URL:"),width:b._("Width (optional):"),height:b._("Height (optional):"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#image").val(),e=c.find("#width").val(),f=c.find("#height").val(),g="";e&&(g+=' width="'+e+'"'),f&&(g+=' height="'+f+'"'),d&&b.wysiwygEditorInsertHtml("'),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertimage",c)},tooltip:"Insert an image"},email:{exec:function(a){var b=this,c=e("email",{label:b._("E-mail:"),desc:b._("Description (optional):"),insert:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#email").val(),e=c.find("#des").val();d&&(b.focus(),!b.getRangeHelper().selectedHtml()||e?(e=e||d,b.wysiwygEditorInsertHtml(''+e+"")):b.execCommand("createlink","mailto:"+d)),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertemail",c)},tooltip:"Insert an email"},link:{exec:function(a){var b=this,c=e("link",{url:b._("URL:"),desc:b._("Description (optional):"),ins:b._("Insert")},!0);c.find(".button").click(function(a){var d=c.find("#link").val(),e=c.find("#des").val();d&&(b.focus(),!b.getRangeHelper().selectedHtml()||e?(e=e||d,b.wysiwygEditorInsertHtml(''+e+"")):b.execCommand("createlink",d)),b.closeDropDown(!0),a.preventDefault()}),b.createDropDown(a,"insertlink",c)},tooltip:"Insert a link"},unlink:{state:function(){var a=b(this.currentNode());return a.is("a")||a.parents("a").length>0?0:-1},exec:function(){var a=b(this.currentNode()),c=a.is("a")?a:a.parents("a").first();c.length&&c.replaceWith(c.contents())},tooltip:"Unlink"},quote:{forceNewLineAfter:["blockquote"],exec:function(a,b,c){var d="
    ",e="
    ";b?(c=c?""+c+"":"",d=d+c+b+e,e=null):""===this.getRangeHelper().selectedHtml()&&(e=(f?"":"
    ")+e),this.wysiwygEditorInsertHtml(d,e)},tooltip:"Insert a Quote"},emoticon:{exec:function(a){var c=this,d=function(e){var f,g=c.opts.emoticonsCompat,h=c.getRangeHelper(),i=g&&" "!==h.getOuterText(!0,1)?" ":"",j=g&&" "!==h.getOuterText(!1,1)?" ":"",k=b("
    "),l=b("
    ").appendTo(k),m=0,n=b.extend({},c.opts.emoticons.dropdown,e?c.opts.emoticons.more:{});return b.each(n,function(){m++}),m=Math.sqrt(m),b.each(n,function(a,d){l.append(b("").attr({src:d.url||d,alt:a,title:d.tooltip||a}).click(function(){return c.insert(i+b(this).attr("alt")+j,null,!1).closeDropDown(!0),!1})),l.children().length>=m&&(l=b("
    ").appendTo(k))}),!e&&c.opts.emoticons.more&&(f=b(''+c._("More")+"").click(function(){return c.createDropDown(a,"more-emoticons",d(!0)),!1}),k.append(f)),k};c.createDropDown(a,"emoticons",d(!1))},txtExec:function(a){g.emoticon.exec.call(this,a)},tooltip:"Insert an emoticon"},youtube:{_dropDown:function(a,b,c){var d,f=e("youtubeMenu",{label:a._("Video URL:"),insert:a._("Insert")},!0);f.find(".button").click(function(b){var e=f.find("#link").val();e&&(d=e.match(/(?:v=|v\/|embed\/|youtu.be\/)(.{11})/),d&&(e=d[1]),/^[a-zA-Z0-9_\-]{11}$/.test(e)?c(e):alert("Invalid YouTube video")),a.closeDropDown(!0),b.preventDefault()}),a.createDropDown(b,"insertlink",f)},exec:function(a){var b=this;g.youtube._dropDown(b,a,function(a){b.wysiwygEditorInsertHtml(e("youtube",{id:a}))})},tooltip:"Insert a YouTube video"},date:{_date:function(a){var b=new Date,c=b.getYear(),d=b.getMonth()+1,e=b.getDate();return c<2e3&&(c=1900+c),d<10&&(d="0"+d),e<10&&(e="0"+e),a.opts.dateFormat.replace(/year/i,c).replace(/month/i,d).replace(/day/i,e)},exec:function(){this.insertText(g.date._date(this))},txtExec:function(){this.insertText(g.date._date(this))},tooltip:"Insert current date"},time:{_time:function(){var a=new Date,b=a.getHours(),c=a.getMinutes(),d=a.getSeconds();return b<10&&(b="0"+b),c<10&&(c="0"+c),d<10&&(d="0"+d),b+":"+c+":"+d},exec:function(){this.insertText(g.time._time())},txtExec:function(){this.insertText(g.time._time())},tooltip:"Insert current time"},ltr:{state:function(a,b){return b&&"ltr"===b.style.direction},exec:function(){var a=this,c=a.getRangeHelper().getFirstBlockParent(),d=b(c);a.focus(),(c&&!d.is("body")||(a.execCommand("formatBlock","p"),c=a.getRangeHelper().getFirstBlockParent(),d=b(c),c&&!d.is("body")))&&("ltr"===d.css("direction")?d.css("direction",""):d.css("direction","ltr"))},tooltip:"Left-to-Right"},rtl:{state:function(a,b){return b&&"rtl"===b.style.direction},exec:function(){var a=this,c=a.getRangeHelper().getFirstBlockParent(),d=b(c);a.focus(),(c&&!d.is("body")||(a.execCommand("formatBlock","p"),c=a.getRangeHelper().getFirstBlockParent(),d=b(c),c&&!d.is("body")))&&("rtl"===d.css("direction")?d.css("direction",""):d.css("direction","rtl"))},tooltip:"Right-to-Left"},print:{exec:"print",tooltip:"Print"},maximize:{state:function(){return this.maximize()},exec:function(){this.maximize(!this.maximize())},txtExec:function(){this.maximize(!this.maximize())},tooltip:"Maximize",shortcut:"Ctrl+Shift+M"},source:{state:function(){return this.sourceMode()},exec:function(){this.toggleSourceMode()},txtExec:function(){this.toggleSourceMode()},tooltip:"View source",shortcut:"Ctrl+Shift+S"},ignore:{}};return g}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))},function(a,b,c){var d;d=function(a){"use strict";var b=c(1);return{toolbar:"bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,paste,pastetext|bulletlist,orderedlist,indent,outdent|table|code,quote|horizontalrule,image,email,link,unlink|emoticon,youtube,date,time|ltr,rtl|print,maximize,source",toolbarExclude:null,style:"jquery.sceditor.default.css",fonts:"Arial,Arial Black,Comic Sans MS,Courier New,Georgia,Impact,Sans-serif,Serif,Times New Roman,Trebuchet MS,Verdana",colors:null,locale:b("html").attr("lang")||"en",charset:"utf-8",emoticonsCompat:!1,emoticonsEnabled:!0,emoticonsRoot:"",emoticons:{dropdown:{":)":"emoticons/smile.png",":angel:":"emoticons/angel.png",":angry:":"emoticons/angry.png","8-)":"emoticons/cool.png",":'(":"emoticons/cwy.png",":ermm:":"emoticons/ermm.png",":D":"emoticons/grin.png","<3":"emoticons/heart.png",":(":"emoticons/sad.png",":O":"emoticons/shocked.png",":P":"emoticons/tongue.png",";)":"emoticons/wink.png"},more:{":alien:":"emoticons/alien.png",":blink:":"emoticons/blink.png",":blush:":"emoticons/blush.png",":cheerful:":"emoticons/cheerful.png",":devil:":"emoticons/devil.png",":dizzy:":"emoticons/dizzy.png",":getlost:":"emoticons/getlost.png",":happy:":"emoticons/happy.png",":kissing:":"emoticons/kissing.png",":ninja:":"emoticons/ninja.png",":pinch:":"emoticons/pinch.png",":pouty:":"emoticons/pouty.png",":sick:":"emoticons/sick.png",":sideways:":"emoticons/sideways.png",":silly:":"emoticons/silly.png",":sleeping:":"emoticons/sleeping.png",":unsure:":"emoticons/unsure.png",":woot:":"emoticons/w00t.png",":wassat:":"emoticons/wassat.png"},hidden:{":whistling:":"emoticons/whistling.png",":love:":"emoticons/wub.png"}},width:null,height:null,resizeEnabled:!0,resizeMinWidth:null,resizeMinHeight:null,resizeMaxHeight:null,resizeMaxWidth:null,resizeHeight:!0,resizeWidth:!0,dateFormat:"year-month-day",toolbarContainer:null,enablePasteFiltering:!1,disablePasting:!1,readOnly:!1,rtl:!1,autofocus:!1,autofocusEnd:!0,autoExpand:!1,autoUpdate:!1,spellcheck:!0,runWithoutWysiwygSupport:!1,startInSourceMode:!1,id:null,plugins:"",zIndex:null,bbcodeTrim:!1,disableBlockRemove:!1,parserOptions:{},dropDownCss:{}}}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))}]),function(a){"use strict";var b=a.sceditor,c=b.plugins,d=b.dom,e={bold:{txtExec:["",""]},italic:{txtExec:["",""]},underline:{txtExec:['',""]},strike:{txtExec:['',""]},subscript:{txtExec:["",""]},superscript:{txtExec:["",""]},left:{txtExec:['
    ',"
    "]},center:{txtExec:['
    ',"
    "]},right:{txtExec:['
    ',"
    "]},justify:{txtExec:['
    ',"
    "]},font:{txtExec:function(a){var c=this;b.command.get("font")._dropDown(c,a,function(a){c.insertText('',"")})}},size:{txtExec:function(a){var c=this;b.command.get("size")._dropDown(c,a,function(a){c.insertText('',"")})}},color:{txtExec:function(a){var c=this;b.command.get("color")._dropDown(c,a,function(a){c.insertText('',"")})}},bulletlist:{txtExec:["
    • ","
    "]},orderedlist:{txtExec:["
    1. ","
    "]},table:{txtExec:["
    ","
    "]},horizontalrule:{txtExec:["
    "]},code:{txtExec:["",""]},image:{txtExec:function(a,b){var c=prompt(this._("Enter the image URL:"),b);c&&this.insertText('')}},email:{txtExec:function(a,b){var c,d,e=b&&b.indexOf("@")>-1?null:b;c=prompt(this._("Enter the e-mail address:"),e?"":b),d=prompt(this._("Enter the displayed text:"),e||c)||c,c&&this.insertText(''+d+"")}},link:{txtExec:function(a,b){var c=b&&b.indexOf("http://")>-1?null:b,d=prompt(this._("Enter URL:"),c?"http://":b),e=prompt(this._("Enter the displayed text:"),c||d)||d;d&&this.insertText(''+e+"")}},quote:{txtExec:["
    ","
    "]},youtube:{txtExec:function(a){var c=this;b.command.get("youtube")._dropDown(c,a,function(a){c.insertText('')})}},rtl:{txtExec:['
    ',"
    "]},ltr:{txtExec:['
    ',"
    "]}};b.XHTMLSerializer=function(){var c,e,f,g,h,i,j,k,l,m,n=this,o={indentStr:"\t"},p=[],q=0;c=function(a){var b={"&":"&","<":"<",">":">",'"':"""};return a?a.replace(/[&<>"]/g,function(a){return b[a]||a}):""},e=function(a){return a.replace(/[\r\n]/," ").replace(/[^\S|\u00A0]+/g," ")},n.serialize=function(a,b){if(p=[],b)for(a=a.firstChild;a;)f(a),a=a.nextSibling;else f(a);return p.join("")},f=function(a,b){switch(a.nodeType){case 1:var c=a.nodeName.toLowerCase();"!"===c?j(a):h(a,b);break;case 3:k(a,b);break;case 4:i(a);break;case 8:j(a);break;case 9:case 11:g(a);break;case 2:case 5:case 6:case 7:case 10:case 12:}},g=function(a){for(var b=a.firstChild;b;)f(b),b=b.nextSibling},h=function(e,g){var h,i,j,k=e.nodeName.toLowerCase(),n="iframe"===k,o=e.attributes.length,p=e.firstChild,r=g||/pre(?:\-wrap)?$/i.test(a(e).css("whiteSpace")),s=!e.firstChild&&!d.canHaveChildren(e)&&!n;if(!a(e).hasClass("sceditor-ignore")){for(l("<"+k,!g&&m(e));o--;)i=e.attributes[o],(!b.ie||i.specified||"input"===k&&"value"===i.name)&&(j=b.ie<8&&/style/i.test(i.name)?e.style.cssText:i.value,l(" "+i.name.toLowerCase()+'="'+c(j)+'"',!1));for(l(s?" />":">",!1),n||(h=p);h;)q++,f(h,r),h=h.nextSibling,q--;s||l("",!r&&!n&&m(e)&&p&&m(p))}},i=function(a){l("")},j=function(a){l("")},k=function(a,b){var d=a.nodeValue;b||(d=e(d)),d&&l(c(d),!b&&m(a))},l=function(a,b){var c=q;if(b!==!1)for(p.length&&p.push("\n");c--;)p.push(o.indentStr);p.push(a)},m=function(a){var b=a.previousSibling;return 1!==a.nodeType&&b?!d.isInline(b):!b&&!d.isInline(a.parentNode)||!d.isInline(a)}},c.xhtml=function(){var f,g,h,i,j,k,l,m=this,n={},o={};m.init=function(){a.isEmptyObject(c.xhtml.converters||{})||a.each(c.xhtml.converters,function(b,c){a.each(c.tags,function(a){n[a]||(n[a]=[]),n[a].push(c)})}),this.commands=a.extend(!0,{},e,this.commands)},m.signalToSource=function(a,c){return c=c.jquery?c[0]:c,f(c),i(c),k(c),l(c),(new b.XHTMLSerializer).serialize(c,!0)},m.signalToWysiwyg=function(a){return a},m.convertTagTo=d.convertElement,g=function(c,d,e){n[c]&&a.each(n[c],function(f,g){g.tags[c]?a.each(g.tags[c],function(c,f){e.getAttributeNode&&(c=e.getAttributeNode(c),!c||b.ie<8&&!c.specified||f&&a.inArray(c.value,f)<0||g.conv.call(m,e,d))}):g.conv&&g.conv.call(m,e,d)})},f=function(b){d.traverse(b,function(b){var c=a(b),d=b.nodeName.toLowerCase();g("*",c,b),g(d,c,b)},!0)},h=function(b,c){var e=b.childNodes,f=b.nodeName.toLowerCase(),g=b.nodeValue,i=e.length;if(c&&"br"===f)return!0;if(a(b).hasClass("sceditor-ignore"))return!0;if(!d.canHaveChildren(b))return!1;if(g&&/\S|\u00A0/.test(g))return!1;for(;i--;)if(!h(e[i],c&&!b.previousSibling&&!b.nextSibling))return!1;return!0},i=function(b){d.traverse(b,function(e){var f,g=e.nodeName.toLowerCase(),i=e.parentNode,j=e.nodeType,k=!d.isInline(e),l=e.previousSibling,m=e.nextSibling,n=i===b,o=!l&&!m,p="iframe"!==g&&h(e,n&&o&&"br"!==g),q=e.ownerDocument,r=c.xhtml.allowedTags,s=c.xhtml.disallowedTags;if(3!==j&&(4===j?g="!cdata":"!"!==g&&8!==j||(g="!comment"),p?f=!0:r&&r.length?f=a.inArray(g,r)<0:s&&s.length&&(f=a.inArray(g,s)>-1),f)){if(!p){for(k&&l&&d.isInline(l)&&i.insertBefore(q.createTextNode(" "),e);e.firstChild;)i.insertBefore(e.firstChild,m);k&&m&&d.isInline(m)&&i.insertBefore(q.createTextNode(" "),m)}i.removeChild(e)}},!0)},j=function(b,c){var d={};return b&&a.extend(d,b),c?(a.each(c,function(b,c){a.isArray(c)?d[b]=a.merge(d[b]||[],c):d[b]||(d[b]=null)}),d):d},l=function(b){var c=[],e=function(){c.length&&(a("

    ",b.ownerDocument).insertBefore(c[0]).append(c),c=[])};d.removeWhiteSpace(b);for(var f=b.firstChild;f;)d.isInline(f)&&!a(f).is(".sceditor-ignore")?c.push(f):e(),f=f.nextSibling;e()},k=function(b){var e,f,g,h,i,k,l=c.xhtml.allowedAttribs,m=l&&!a.isEmptyObject(l),n=c.xhtml.disallowedAttribs,p=n&&!a.isEmptyObject(n);o={},d.traverse(b,function(b){if(b.attributes&&(e=b.nodeName.toLowerCase(),h=b.attributes.length))for(o[e]||(m?o[e]=j(l["*"],l[e]):o[e]=j(n["*"],n[e]));h--;)f=b.attributes[h],g=f.name,i=o[e][g],k=!1,m?k=null!==i&&(!a.isArray(i)||a.inArray(f.value,i)<0):p&&(k=null===i||a.isArray(i)&&a.inArray(f.value,i)>-1),k&&b.removeAttribute(g)})}},c.xhtml.converters=[{tags:{"*":{width:null}},conv:function(a,b){b.css("width",b.attr("width")).removeAttr("width")}},{tags:{"*":{height:null}},conv:function(a,b){b.css("height",b.attr("height")).removeAttr("height")}},{tags:{li:{value:null}},conv:function(a,c){b.ie<8?a.removeAttribute("value"):c.removeAttr("value")}},{tags:{"*":{text:null}},conv:function(a,b){b.css("color",b.attr("text")).removeAttr("text")}},{tags:{"*":{color:null}},conv:function(a,b){b.css("color",b.attr("color")).removeAttr("color")}},{tags:{"*":{face:null}},conv:function(a,b){b.css("fontFamily",b.attr("face")).removeAttr("face")}},{tags:{"*":{align:null}},conv:function(a,b){b.css("textAlign",b.attr("align")).removeAttr("align")}},{tags:{"*":{border:null}},conv:function(a,b){b.css("borderWidth",b.attr("border")).removeAttr("border")}},{tags:{applet:{name:null},img:{name:null},layer:{name:null},map:{name:null},object:{name:null},param:{name:null}},conv:function(a,b){b.attr("id")||b.attr("id",b.attr("name")),b.removeAttr("name")}},{tags:{"*":{vspace:null}},conv:function(a,b){b.css("marginTop",b.attr("vspace")-0).css("marginBottom",b.attr("vspace")-0).removeAttr("vspace")}},{tags:{"*":{hspace:null}},conv:function(a,b){b.css("marginLeft",b.attr("hspace")-0).css("marginRight",b.attr("hspace")-0).removeAttr("hspace")}},{tags:{hr:{noshade:null}},conv:function(a,b){b.css("borderStyle","solid").removeAttr("noshade")}},{tags:{"*":{nowrap:null}},conv:function(a,b){b.css("white-space","nowrap").removeAttr("nowrap")}},{tags:{big:null},conv:function(b){a(this.convertTagTo(b,"span")).css("fontSize","larger")}},{tags:{small:null},conv:function(b){a(this.convertTagTo(b,"span")).css("fontSize","smaller")}},{tags:{b:null},conv:function(b){a(this.convertTagTo(b,"strong"))}},{tags:{u:null},conv:function(b){a(this.convertTagTo(b,"span")).css("textDecoration","underline")}},{tags:{i:null},conv:function(b){a(this.convertTagTo(b,"em"))}},{tags:{s:null,strike:null},conv:function(b){a(this.convertTagTo(b,"span")).css("textDecoration","line-through")}},{tags:{dir:null},conv:function(a){this.convertTagTo(a,"ul")}},{tags:{center:null},conv:function(b){a(this.convertTagTo(b,"div")).css("textAlign","center")}},{tags:{font:{size:null}},conv:function(a,c){var d=c.css("fontSize"),e=d;"+0"!==e&&(b.ie<9&&(e=10,d>1&&(e=13),d>2&&(e=16),d>3&&(e=18),d>4&&(e=24),d>5&&(e=32),d>6&&(e=48)),c.css("fontSize",e)),c.removeAttr("size")}},{tags:{font:null},conv:function(a){this.convertTagTo(a,"span")}},{tags:{"*":{type:["_moz"]}},conv:function(a,b){b.removeAttr("type")}},{tags:{"*":{_moz_dirty:null}},conv:function(a,b){b.removeAttr("_moz_dirty")}},{tags:{"*":{_moz_editor_bogus_node:null}},conv:function(a,b){b.remove()}}],c.xhtml.allowedAttribs={},c.xhtml.disallowedAttribs={},c.xhtml.allowedTags=[],c.xhtml.disallowedTags=[]}(jQuery); \ No newline at end of file diff --git a/Html/js/SCEditor/languages/ar.js b/Html/js/SCEditor/languages/ar.js new file mode 100644 index 0000000..ac7b0e5 --- /dev/null +++ b/Html/js/SCEditor/languages/ar.js @@ -0,0 +1,68 @@ +/** + * @author Atramez_Zeton http://onyx-sy.net + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['ar'] = { + 'Bold': 'عريض', + 'Italic': 'مائل', + 'Underline': 'خط من الأسفل', + 'Strikethrough': 'خط في المنتصف', + 'Subscript': 'حرف منخفض', + 'Superscript': 'حرف مرتفع', + 'Align left': 'انحياز إلى اليسار', + 'Center': 'توسط', + 'Align right': 'انحياز إالى اليمين', + 'Justify': 'ملأ السطر', + 'Font Name': 'نوع الخط', + 'Font Size': 'حجم الخط', + 'Font Color': 'لون الخط', + 'Remove Formatting': 'ازالة التعديلات', + 'Cut': 'قص', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Ctrl/Cmd-X متصفحك لا يدعم اوامر القص الرجاء استخدام اختصارات لوحة التحكم', + 'Copy': 'نسخ', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Ctrl/Cmd-C متصفحك لا يدعم اوامر النسخ الرجاء استخدام اختصارات لوحة التحكم', + 'Paste': 'لصق', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Ctrl/Cmd-V متصفحك لا يدعم اوامر اللصق الرجاء استخدام اختصارات لوحة التحكم', + 'Paste your text inside the following box:': 'قم بلصق نصّك في المربع', + 'Paste Text': 'الصق النص', + 'Bullet list': 'قائمة نقطية', + 'Numbered list': 'قائمة مرقمة', + 'Undo': 'تراجع', + 'Redo': 'تقدم', + 'Rows:': 'اسطر', + 'Cols:': 'اعمدة', + 'Insert a table': 'ادرج جدول', + 'Insert a horizontal rule': 'ادرج مسطرة افقية', + 'Code': 'كود', + 'Width (optional):': 'عرض (اختياري)', + 'Height (optional):': 'ارتفاع (اختياري)', + 'Insert an image': 'ادرج صورة', + 'E-mail:': 'بريد الكتروني', + 'Insert an email': 'ادرج بريدا الكترونيا', + 'URL:': 'وصلة موقع', + 'Insert a link': 'ادرج وصلة لموقع', + 'Unlink': 'ازالة الوصلة', + 'More': 'المزيد', + 'Insert an emoticon': 'ادرج وجها', + 'Video URL:': 'وصلة فيديو', + 'Insert': 'ادرج', + 'Insert a YouTube video': 'ادرج وصلة فيديو يوتيوب', + 'Insert current date': 'ادرج التاريخ الحالي', + 'Insert current time': 'ادرج الوقت الحالي', + 'Print': 'اطبع', + 'View source': 'اظهر المصدر', + 'Description (optional):': 'الوصف (اختياري)', + 'Enter the image URL:': 'ضع وصلة الصورة', + 'Enter the e-mail address:': 'ضع عنوان البريد الإلكتروني', + 'Enter the displayed text:': 'ضع النص الذي تريد اظهاره', + 'Enter URL:': 'ضع وصلة موقع', + 'Enter the YouTube video URL or ID:': 'ضع وصلة فيديو يوتيوب او رقم الفيديو', + 'Insert a Quote': 'ادرج اقتباسا', + 'Invalid YouTube video': 'هذا الفيديو غير صالح', + + dateFormat: 'day-month-year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/ca.js b/Html/js/SCEditor/languages/ca.js new file mode 100644 index 0000000..ad26f5f --- /dev/null +++ b/Html/js/SCEditor/languages/ca.js @@ -0,0 +1,68 @@ +/** + * @author Fran Sobrino + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['ca'] = { + 'Bold': 'Negrita', + 'Italic': 'Cursiva', + 'Underline': 'Subratlla', + 'Strikethrough': 'Ratllar', + 'Subscript': 'Sub\u00edndice', + 'Superscript': 'Super\u00edndice', + 'Align left': 'Alinear a l\'Esquerra', + 'Center': 'Centrar', + 'Align right': 'Alinear a la dreta', + 'Justify': 'Justificar', + 'Font Name': 'Tipus de Lletra', + 'Font Size': 'Mida de Lletra', + 'Font Color': 'Color de Font', + 'Remove Formatting': 'Treure Formats', + 'Cut': 'Tallar', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'O seu navegador non acepta o comando cortar. Por favor, empregue a combinaci\u00f3n Ctrl/Cmd-X', + 'Copy': 'Copiar', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'O seu navegador non acepta o comando cortar. Por favor, empregue a combinaci\u00f3n Ctrl/Cmd-C', + 'Paste': 'Pegar', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'O seu navegador non acepta o comando cortar. Por favor, empregue a combinaci\u00f3n Ctrl/Cmd-V', + 'Paste your text inside the following box:': 'Pega o texto dentro do seguinte recadro', + 'Paste Text': 'Pegar Texto', + 'Bullet list': 'Llista d\'Vinyetes', + 'Numbered list': 'Llista numerada', + 'Undo': 'Desfer', + 'Redo': 'Refer', + 'Rows:': 'Files', + 'Cols:': 'Columnes', + 'Insert a table': 'Inserir una taula', + 'Insert a horizontal rule': 'Insereix una Regla horitzontal', + 'Code': 'C\u00f3digo', + 'Width (optional):': 'Ample (Opcional)', + 'Height (optional):': 'Alçada (Opcional)', + 'Insert an image': 'Insereix una imatge', + 'E-mail:': 'Correu electrònic', + 'Insert an email': 'Insereix un Email', + 'URL:': 'URL', + 'Insert a link': 'Inserir un enllaç', + 'Unlink': 'Treure un enllaç', + 'More': 'Més', + 'Insert an emoticon': 'Inserir un emoticon', + 'Video URL:': 'URL del V\u00eddeo', + 'Insert': 'Insereix', + 'Insert a YouTube video': 'Insereix un v\u00eddeo de YouTube', + 'Insert current date': 'Insereix data actual', + 'Insert current time': 'Insereix hora actual', + 'Print': 'Imprimir', + 'View source': 'Veure C\u00f3digo', + 'Description (optional):': 'Descripci\u00f3 (Opcional):', + 'Enter the image URL:': 'Ingressar la URL de la imatge:', + 'Enter the e-mail address:': 'Ingressar el correu electr\u00f3nico:', + 'Enter the displayed text:': 'Ingressar el texto mostrat:', + 'Enter URL:': 'Entrada URL:', + 'Enter the YouTube video URL or ID:': 'Entrada URL ou ID de YouTube', + 'Insert a Quote': 'v Insereix', + 'Invalid YouTube video': 'V\u00eddeo de YouTube Inv\u00e1lido', + + dateFormat: 'day-month-year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/cn.js b/Html/js/SCEditor/languages/cn.js new file mode 100644 index 0000000..b5a4c01 --- /dev/null +++ b/Html/js/SCEditor/languages/cn.js @@ -0,0 +1,68 @@ +/** + * @author + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['cn'] = { + 'Bold': '粗体', + 'Italic': '斜体', + 'Underline': '下划线', + 'Strikethrough': '删除线', + 'Subscript': '下标', + 'Superscript': '上标', + 'Align left': '靠左对齐', + 'Center': '置中', + 'Align right': '靠右对齐', + 'Justify': '两端对齐', + 'Font Name': '字体', + 'Font Size': '字号', + 'Font Color': '字色', + 'Remove Formatting': '格式清除', + 'Cut': '剪切', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': '您的浏览器不支持剪切命令,请使用快捷键 Ctrl/Cmd-X', + 'Copy': '拷贝', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': '您的浏览器不支持拷贝命令,请使用快捷键 Ctrl/Cmd-C', + 'Paste': '粘贴', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': '您的浏览器不支持粘贴命令,请使用快捷键 Ctrl/Cmd-V', + 'Paste your text inside the following box:': '请在下面贴入您的文本', + 'Paste Text': '粘贴纯文本', + 'Bullet list': '符号列表', + 'Numbered list': '编号列表', + 'Undo': '恢复', + 'Redo': '撤消', + 'Rows:': '行数', + 'Cols:': '列数', + 'Insert a table': '插入表格', + 'Insert a horizontal rule': '插入分隔符', + 'Code': '代码', + 'Width (optional):': '宽度(选填)', + 'Height (optional):': '高度(选填)', + 'Insert an image': '插入图片', + 'E-mail:': 'Email地址', + 'Insert an email': '插入Email地址', + 'URL:': '网址', + 'Insert a link': '插入链接', + 'Unlink': '取消链接', + 'More': '更多', + 'Insert an emoticon': '插入表情符号', + 'Video URL:': '视频地址', + 'Insert': '插入', + 'Insert a YouTube video': '插入YouTube视频', + 'Insert current date': '插入当前日期', + 'Insert current time': '插入当前时间', + 'Print': '打印', + 'View source': '查看代码', + 'Description (optional):': '描述(选填)', + 'Enter the image URL:': '输入图片地址', + 'Enter the e-mail address:': '输入email地址', + 'Enter the displayed text:': '输入显示文字', + 'Enter URL:': '输入网址', + 'Enter the YouTube video URL or ID:': '输入YouTube地址或编号', + 'Insert a Quote': '插入引用', + 'Invalid YouTube video': '无效的YouTube视频', + + dateFormat: 'year-month-day' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/cs.js b/Html/js/SCEditor/languages/cs.js new file mode 100644 index 0000000..acc6577 --- /dev/null +++ b/Html/js/SCEditor/languages/cs.js @@ -0,0 +1,71 @@ +/** + * @author Daniel Vítek danielvitek1@gmail.com danvitek.cz + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['cs'] = { + 'Bold': 'Tučné', + 'Italic': 'Kurzíva', + 'Underline': 'Podtržené', + 'Strikethrough': 'Přeškrtnuté', + 'Subscript': 'Dolní index', + 'Superscript': 'Horní index', + 'Align left': 'Zarovnat vlevo', + 'Center': 'Zarovnat na střed', + 'Align right': 'Zarovnat vpravo', + 'Justify': 'Zarovnat do bloku', + 'Font Name': 'Výběr písma', + 'Font Size': 'Velikost písma', + 'Font Color': 'Barva písma', + 'Remove Formatting': 'Vymazat formátování', + 'Cut': 'Vyjmout', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Váš prohlížeč nepodporuje tento příkaz, použijte CTRL+X', + 'Copy': 'Kopírovat', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Váš prohlížeč nepodporuje tento příkaz, použijte CTRL+C', + 'Paste': 'Vložit', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Váš prohlížeč nepodporuje tento příkaz, použijte CTRL+V', + 'Paste your text inside the following box:': 'Vložte Váš text do následujícího pole', + 'Paste Text': 'Vložit text', + 'Bullet list': 'Seznam', + 'Numbered list': 'Číslovaný seznam', + 'Undo': 'Zpět', + 'Redo': 'Vpřed', + 'Rows:': 'Řádků', + 'Cols:': 'Buněk', + 'Insert a table': 'Vložit tabulku', + 'Insert a horizontal rule': 'Vložit vodorovnou čáru', + 'Code': 'Vložit kód', + 'Width (optional):': 'Šířka (volitelné)', + 'Height (optional):': 'Výška (volitelné)', + 'Insert an image': 'Vložit obrázek', + 'E-mail:': 'E-mailová adresa', + 'Insert an email': 'Vložit e-mail', + 'URL:': 'Adresa', + 'Insert a link': 'Vložit odkaz', + 'Unlink': 'Zrušit odkaz', + 'More': 'Více', + 'Insert an emoticon': 'Vložit smajlíka', + 'Video URL:': 'Adresa videa', + 'Insert': 'Vložit', + 'Insert a YouTube video': 'Vložte video z YouTube', + 'Insert current date': 'Vložte aktuální datum', + 'Insert current time': 'Vložte aktuální čas', + 'Print': 'Vytisknout', + 'View source': 'Zobrazit zdroj', + 'Description (optional):': 'Popis (volitelné)', + 'Enter the image URL:': 'Vložte adresu obrázku', + 'Enter the e-mail address:': 'Vložte e-mailovou adresu', + 'Enter the displayed text:': 'Vložte zobrazovaný text', + 'Enter URL:': 'Vložte adresu', + 'Enter the YouTube video URL or ID:': 'Vložte adresu YouTube videa nebo ID videa', + 'Insert a Quote':'Vložit citát', + 'Invalid YouTube video': 'Neplatné YouTube video', + 'Add indent': 'Posunout na další úroveň', + 'Remove one indent': 'Posunout na předchozí úroveň', + 'Maximize': 'Zobrazit přes celou obrazovku', + + dateFormat: 'day-month-year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/de.js b/Html/js/SCEditor/languages/de.js new file mode 100644 index 0000000..f9df114 --- /dev/null +++ b/Html/js/SCEditor/languages/de.js @@ -0,0 +1,59 @@ +(function ($) { + 'use strict'; + + $.sceditor.locale['de'] = { + 'Bold': 'Fett', + 'Italic': 'Kursiv', + 'Underline': 'Unterstrichen', + 'Strikethrough': 'Durchgestrichen', + 'Subscript': 'Tiefgestellt', + 'Superscript': 'Hochgestellt', + 'Align left': 'Linksbündig ausrichten', + 'Center': 'Zentrieren', + 'Align right': 'Rechtsbündig ausrichten', + 'Justify': 'Blocksatz', + 'Font Name': 'Schriftname', + 'Font Size': 'Schriftgröße', + 'Font Color': 'Schriftfarbe', + 'Remove Formatting': 'Formatierung entfernen', + 'Cut': 'Ausschneiden', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Ihr Browser erlaubt das Ausschneiden von Text nicht, bitte Nutzen Sie das Tastenkürzel Strg / Cmd-X', + 'Copy': 'Kopieren', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Ihr Browser erlaubt das Kopieren von Text nicht, bitte Nutzen Sie das Tastenkürzel Strg / Cmd-C', + 'Paste': 'Einfügen', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Ihr Browser erlaubt das Einfügen von Text nicht, bitte Nutzen Sie das Tastenkürzel Strg / Cmd-V', + 'Paste your text inside the following box:': 'Fügen Sie Ihren Text in die folgende Box ein', + 'Paste Text': 'Text einfügen', + 'Bullet list': 'Aufzählungsliste', + 'Numbered list': 'Nummerierte Liste', + 'Undo': 'Rückgängig machen', + 'Redo': 'Wiederherstellen', + 'Rows:': 'Zeilen', + 'Cols:': 'Spalten', + 'Insert a table': 'Tabelle einfügen', + 'Insert a horizontal rule': 'Horizontale Linie einfügen', + 'Code': 'Code', + 'Insert a Quote': 'Zitat einfügen', + 'Width (optional):': 'Breite (Optional)', + 'Height (optional):': 'Höhe (Optional)', + 'Insert an image': 'Ein Bild einfügen', + 'E-mail:': 'E-Mail', + 'Insert an email': 'E-Mail einfügen', + 'URL:': 'URL', + 'Insert a link': 'Link einfügen', + 'Unlink': 'Link entfernen', + 'More': 'Mehr', + 'Left-to-Right': 'Links nach rechts', + 'Right-to-Left': 'Rechts nach links', + 'Insert an emoticon': 'Emoticon einfügen', + 'Video URL:': 'Video URL', + 'Insert': 'Einfügen', + 'Insert a YouTube video': 'YouTube Video einfügen', + 'Insert current date': 'Aktuelles Datum einfügen', + 'Insert current time': 'Aktuelle Uhrzeit einfügen', + 'Print': 'Drucken', + 'Maximize': 'Maximieren', + 'View source': 'Quelltext ansehen', + dateFormat: 'day.month.year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/el.js b/Html/js/SCEditor/languages/el.js new file mode 100644 index 0000000..5be096f --- /dev/null +++ b/Html/js/SCEditor/languages/el.js @@ -0,0 +1,68 @@ +/** + * @author Nikos Aggelis nikosaggelis@hotmail.gr + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['el'] = { + 'Bold': 'Έντονα', + 'Italic': 'Πλάγια', + 'Underline': 'Υπογραμμισμένα', + 'Strikethrough': 'Διαγραμμισμένα', + 'Subscript': 'Δείκτης', + 'Superscript': 'Εκθέτης', + 'Align left': 'Αριστερή στοίχιση', + 'Center': 'Κεντραρισμένα', + 'Align right': 'Δεξιά στοίχιση', + 'Justify': 'Πλήρης στοίχιση', + 'Font Name': 'Γραμματοσειρά', + 'Font Size': 'Μέγεθος', + 'Font Color': 'Χρώμα', + 'Remove Formatting': 'Αφαίρεση μορφοποίησης', + 'Cut': 'Αποκοπή', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Ο περιηγητής σας δεν επιτρέπει την εντολή αποκοπής. Παρακαλούμε χρησιμοποιήστε τη συντόμευση πληκτρολογίου Ctrl/Cmd-X', + 'Copy': 'Αντιγραφή', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Ο περιηγητής σας δεν επιτρέπει την εντολή αντιγραφής. Παρακαλούμε χρησιμοποιήστε τη συντόμευση πληκτρολογίου Ctrl/Cmd-C', + 'Paste': 'Επικόλληση', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Ο περιηγητής σας δεν επιτρέπει την εντολή επικόλλησης. Παρακαλούμε χρησιμοποιήστε τη συντόμευση πληκτρολογίου Ctrl/Cmd-V', + 'Paste your text inside the following box:': 'Επικολλήστε το κείμενό σας μέσα στο ακόλουθο πλαίσιο:', + 'Paste Text': 'Επικόλληση κειμένου', + 'Bullet list': 'Λίστα με κουκίδες', + 'Numbered list': 'Λίστα με αρίθμηση', + 'Undo': 'Αναίρεση', + 'Redo': 'Επανάληψη', + 'Rows:': 'Γραμμές', + 'Cols:': 'Στήλες', + 'Insert a table': 'Εισαγωγή πίνακα', + 'Insert a horizontal rule': 'Εισαγωγή οριζόντιας γραμμής', + 'Code': 'Κώδικας', + 'Width (optional):': 'Πλάτος (Προαιρετικό)', + 'Height (optional):': 'Ύψος (Προαιρετικό)', + 'Insert an image': 'Εισαγωγή εικόνας', + 'E-mail:': 'Ηλεκτρονικό ταχυδρομείο', + 'Insert an email': 'Εισαγωγή email', + 'URL:': 'Ηλεκτρονική διεύθυνση', + 'Insert a link': 'Εισαγωγή συνδέσμου', + 'Unlink': 'Κατάργηση σύνδεσης', + 'More': 'Περισσότερα', + 'Insert an emoticon': 'Εισαγωγή φατσούλας', + 'Video URL:': 'Διεύθυνση βίντεο', + 'Insert': 'Εισαγωγή', + 'Insert a YouTube video': 'Εισαγωγή βίντεο YouTube', + 'Insert current date': 'Εισαγωγή τρέχουσας ημερομηνίας', + 'Insert current time': 'Εισαγωγή τρέχουσας ώρας', + 'Print': 'Εκτύπωση', + 'Maximize': 'Μεγιστοποίηση', + 'View source': 'Προβολή πηγαίου κώδικα', + 'Description (optional):': 'Περιγραφή (προαιρετικό)', + 'Enter the image URL:': 'Εισάγετε τη διεύθυνση εικόνας', + 'Enter the e-mail address:': 'Εισάγετε τη διεύθυνση e-mail', + 'Enter the displayed text:': 'Εισάγετε το εμφανιζόμενο κείμενο', + 'Enter URL:': 'Εισάγετε διεύθυνση', + 'Enter the YouTube video URL or ID:': 'Εισάγετε τη διεύθυνση του βίντεο YouTube ή το ID', + 'Insert a Quote': 'Εισαγωγή παράθεσης', + 'Invalid YouTube video': 'Μη έγκυρο βίντεο YouTube', + + dateFormat: 'day-month-year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/en-US.js b/Html/js/SCEditor/languages/en-US.js new file mode 100644 index 0000000..412b5a6 --- /dev/null +++ b/Html/js/SCEditor/languages/en-US.js @@ -0,0 +1,7 @@ +(function ($) { + 'use strict'; + + $.sceditor.locale['en-US'] = { + dateFormat: 'month/day/year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/en.js b/Html/js/SCEditor/languages/en.js new file mode 100644 index 0000000..1cb73d4 --- /dev/null +++ b/Html/js/SCEditor/languages/en.js @@ -0,0 +1,12 @@ +(function ($) { + 'use strict'; + + $.sceditor.locale['en-GB'] = { + 'Font Color': 'Font Colour', + 'Center': 'Centre', + dateFormat: 'day/month/year' + }; + + // set this as the default English locale + $.sceditor.locale['en'] = $.sceditor.locale['en-GB']; +})(jQuery); diff --git a/Html/js/SCEditor/languages/es.js b/Html/js/SCEditor/languages/es.js new file mode 100644 index 0000000..5a1e7e7 --- /dev/null +++ b/Html/js/SCEditor/languages/es.js @@ -0,0 +1,68 @@ +/** + * @author + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['es'] = { + 'Bold': 'Negrita', + 'Italic': 'Cursiva', + 'Underline': 'Subrayar', + 'Strikethrough': 'Tachar', + 'Subscript': 'Sub\u00edndice', + 'Superscript': 'Super\u00edndice', + 'Align left': 'Alinear a la Izquierda', + 'Center': 'Centrar', + 'Align right': 'Alinear a la Derecha', + 'Justify': 'Justificar', + 'Font Name': 'Tipo de Letra', + 'Font Size': 'Tama\u00f1o de Letra', + 'Font Color': 'Color de Fuente', + 'Remove Formatting': 'Quitar Formatos', + 'Cut': 'Cortar', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Su navegador no acepta el comando cortar. Por favor, use la combinaci\u00f3n Ctrl/Cmd-X', + 'Copy': 'Copiar', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Su navegador no acepta el comando copiar. Por favor, use la combinaci\u00f3n Ctrl/Cmd-C', + 'Paste': 'Pegar', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Su navegador no acepta el comando pegar. Por favor, use la combinaci\u00f3n Ctrl/Cmd-V', + 'Paste your text inside the following box:': 'Pega el texto dentro del siguiente recuadro', + 'Paste Text': 'Pegar Texto', + 'Bullet list': 'Lista de Vi\u00f1etas', + 'Numbered list': 'Lista Numerada', + 'Undo': 'Deshacer', + 'Redo': 'Rehacer', + 'Rows:': 'Filas', + 'Cols:': 'Columnas', + 'Insert a table': 'Insertar una Tabla', + 'Insert a horizontal rule': 'Insertar una Regla Horizontal', + 'Code': 'C\u00f3digo', + 'Width (optional):': 'Ancho (Opcional)', + 'Height (optional):': 'Altura (Opcional)', + 'Insert an image': 'Insertar una Imagen', + 'E-mail:': 'E-mail', + 'Insert an email': 'Insertar un Email', + 'URL:': 'URL', + 'Insert a link': 'Insertar un V\u00ednculo', + 'Unlink': 'Quitar V\u00ednculo', + 'More': 'M\u00e1s', + 'Insert an emoticon': 'Insertar un emoticon', + 'Video URL:': 'URL del V\u00eddeo', + 'Insert': 'Insertar', + 'Insert a YouTube video': 'Insertar un v\u00eddeo de YouTube', + 'Insert current date': 'Insertar fecha actual', + 'Insert current time': 'Insertar hora actual', + 'Print': 'Imprimir', + 'View source': 'Ver C\u00f3digo', + 'Description (optional):': 'Descripci\u00f3n (Opcional):', + 'Enter the image URL:': 'Ingresar la URL de la imagen:', + 'Enter the e-mail address:': 'Ingresar el correo electr\u00f3nico:', + 'Enter the displayed text:': 'Ingresar el texto mostrado:', + 'Enter URL:': 'Ingresar URL:', + 'Enter the YouTube video URL or ID:': 'Ingresar URL o ID de YouTube', + 'Insert a Quote': 'Insertar Cita', + 'Invalid YouTube video': 'Video de YouTube Inv\u00e1lido', + + dateFormat: 'day-month-year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/et.js b/Html/js/SCEditor/languages/et.js new file mode 100644 index 0000000..e513cad --- /dev/null +++ b/Html/js/SCEditor/languages/et.js @@ -0,0 +1,57 @@ +(function ($) { + 'use strict'; + + $.sceditor.locale['et'] = { + 'Bold': 'Rasvane', + 'Italic': 'Kaldkiri', + 'Underline': 'Allajoonitud', + 'Strikethrough': 'Läbijoonitud', + 'Subscript': 'Allindeks', + 'Superscript': 'Ülaindeks', + 'Align left': 'Joonad vasakule', + 'Center': 'Joonda keskele', + 'Align right': 'Joonda paremale', + 'Justify': 'Joondus mõlemale poole', + 'Font Name': 'Fondi nimi', + 'Font Size': 'Fondi suurus', + 'Font Color': 'Fondi värv', + 'Remove Formatting': 'Eemalda vormindus', + 'Cut': 'Lõika', + 'Sinu veebilehitseja ei luba lõikamise käsu kasutamist. Palun kasuta kiirklahvi Ctrl/Cmd-X': '... Ctrl / Cmd-X', + 'Copy': 'Kopeeri', + 'Sinu veebilehitseja ei luba kopeerimise käsu kasutamist. Palun kasuta kiirklahvi Ctrl/Cmd-C': '... Ctrl / Cmd-C', + 'Paste': 'Aseta', + 'Sinu veebilehitseja ei luba asetamise käsu kasutamist. Palun kasuta kiirklahvi Ctrl/Cmd-V': '... Ctrl / Cmd-V', + 'Paste your text inside the following box:': 'Aseta oma tekst järgneva tekstikasti sisse', + 'Paste Text': 'Aseta tekstina', + 'Bullet list': 'Nimekiri', + 'Numbered list': 'Nummerdatud nimekiri', + 'Undo': 'Samm tagasi', + 'Redo': 'Samm edasi', + 'Rows:': 'Read', + 'Cols:': 'Veerud', + 'Insert a table': 'Sisesta tabel', + 'Insert a horizontal rule': 'Sisesta horisontaalne joon', + 'Code': 'Kood', + 'Insert a Quote': 'Sisesta tsitaat', + 'Width (optional):': 'Laius (Valikuline)', + 'Height (optional):': 'Kõrgus (Valikuline)', + 'Insert an image': 'Sisesta pilt', + 'E-mail:': 'E-post', + 'Insert an email': 'Sisesta e-posti aadress', + 'URL:': 'Link', + 'Insert a link': 'Sisesta link', + 'Unlink': 'Eemalda link', + 'More': 'Veel', + 'Insert an emoticon': 'Sisesta emotikon', + 'Video URL:': 'Video link', + 'Insert': 'Sisesta', + 'Insert a YouTube video': 'Sisesta YouTube video', + 'Insert current date': 'Sisesta praegune kuupäev', + 'Insert current time': 'Sisesta praegune kellaaeg', + 'Print': 'Prindi', + 'View source': 'Vaata lähtekoodi', + + dateFormat: 'day.month.year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/fa.js b/Html/js/SCEditor/languages/fa.js new file mode 100644 index 0000000..a80824c --- /dev/null +++ b/Html/js/SCEditor/languages/fa.js @@ -0,0 +1,69 @@ +// add locale:'fa', to your config options. +// Translated By Ebad Ghafoory [info@ghafoory.com] +// 2013/05/01 +(function ($) { + 'use strict'; + + $.sceditor.locale['fa'] = { + 'Bold': 'تیره', + 'Italic': 'مورب', + 'Underline': 'زیرخط', + 'Strikethrough': 'خط خورده', + 'Subscript': 'زیرنویس', + 'Superscript': 'بالانویس', + 'Align left': 'چپ چین', + 'Center': 'وسط چین', + 'Align right': 'راست چین', + 'Justify': 'همخط', + 'Font Name': 'نام قلم', + 'Font Size': 'اندازه\u200cی نوشته', + 'Font Color': 'رنگ نوشته', + 'Remove Formatting': 'پاکسازی فرمت نوشته', + 'Cut': 'برش', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'مرورگر شما اجازه برش توسط نرم\u200cافزار را نمی\u200cدهد. لطفا از دکمه\u200cهای ترکیبی Ctrl / Cmd-X استفاده کنید', + 'Copy': 'کپی', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'مرورگر شما اجازه کپی کردن توسط نرم\u200cافزار را نمی\u200cدهد. لطفا از دکمه\u200cهای ترکیبی Ctrl / Cmd-C استفاده کنید', + 'Paste': 'چسباندن', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'مرورگر شما اجازه چسباندن توسط نرم\u200cافزار را نمی\u200cدهد. لطفا از دکمه\u200cهای ترکیبی Ctrl / Cmd-V استفاده کنید', + 'Paste your text inside the following box:': 'متن خود را در داخل کادر زیر بچسبانید', + 'Paste Text': 'چسباندن متن', + 'Bullet list': 'لیست', + 'Numbered list': 'لیست عددی', + 'Undo': 'حرکت قبل', + 'Redo': 'حرکت بعد', + 'Rows:': 'تعداد ردیف', + 'Cols:': 'تعداد ستون', + 'Insert a table': 'افزودن جدول', + 'Insert a horizontal rule': 'افزودن خط افقی', + 'Code': 'کد', + 'Insert a Quote': 'افزودن نقل قول', + 'Width (optional):': 'پهنا (دلخواه):', + 'Height (optional):': 'ارتفاع (دلخواه):', + 'Insert an image': 'افزودن عکس', + 'E-mail:': 'ایمیل', + 'Insert an email': 'افزودن ایمیل', + 'URL:': 'آدرس اینترنتی', + 'Insert a link': 'افزودن لینک', + 'Unlink': 'حذف لینک', + 'More': 'بیشتر', + 'Insert an emoticon': 'افزودن شکلک', + 'Video URL:': 'آدرس اینترنتی ویدیو', + 'Insert': 'افزودن', + 'Insert a YouTube video': 'افزودن فیلم از یوتوب', + 'Insert current date': 'افزودن تاریخ اکنون', + 'Insert current time': 'افزودن زمان اکنون', + 'Print': 'چاپ', + 'View source': 'مشاهده سورس', + 'Description (optional):': 'توضیحات (دلخواه):', + 'Enter the image URL:': 'آدرس اینترنتی عکس را وارد کنید:', + 'Enter the e-mail address:': 'آدرس ایمیل را وارد کنید:', + 'Enter the displayed text:': 'متن نمایش\u200cدهنده را وارد کنید:', + 'Enter URL:': 'آدرس اینترنتی را وارد کنید:', + 'Enter the YouTube video URL or ID:': 'آدرس اینترنتی فیلم یوتوب یا شناسه ویدیو را وارد کنید:', + 'Invalid YouTube video': 'فیلم یوتوب غیر معتبر است', + 'Right-to-Left': 'راست به چپ', + 'Left-to-Right': 'چپ به راست', + + dateFormat: 'year.month.day' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/fr.js b/Html/js/SCEditor/languages/fr.js new file mode 100644 index 0000000..418ecc0 --- /dev/null +++ b/Html/js/SCEditor/languages/fr.js @@ -0,0 +1,70 @@ + +// add locale:'fr', to your config options. + +(function ($) { + 'use strict'; + + $.sceditor.locale['fr-FR'] = { + 'Bold': 'Gras', + 'Italic': 'Italique', + 'Underline': 'Souligné', + 'Strikethrough': 'Barré', + 'Subscript': 'Indice', + 'Superscript': 'Exposant', + 'Align left': 'Aligner à gauche', + 'Center': 'Centrer', + 'Align right': 'Aligner à droite', + 'Justify': 'Justifier', + 'Font Name': 'Police', + 'Font Size': 'Taille de police', + 'Font Color': 'Couleur de police', + 'Remove Formatting': 'Enlever le formatage', + 'Cut': 'Couper', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Votre navigateur n\'autorise pas la commande \'Couper\'. Merci d\'utiliser le raccourcis clavier Ctrl/Cmd+X', + 'Copy': 'Copier', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Votre navigateur n\'autorise pas la commande \'Copier\'. Merci d\'utiliser le raccourcis clavier Ctrl/Cmd+C', + 'Paste': 'Coller', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Votre navigateur n\'autorise pas la commande \'Coller\'. Merci d\'utiliser le raccourcis clavier Ctrl/Cmd+V', + 'Paste your text inside the following box:': 'Collez votre texte à l\'intérieur de ce bloc', + 'Paste Text': 'Texte collé', + 'Bullet list': 'Liste à puce', + 'Numbered list': 'Liste numérotée', + 'Undo': 'Annuler', + 'Redo': 'Rétablir', + 'Rows:': 'Lignes', + 'Cols:': 'Colonnes', + 'Insert a table': 'Insérer un tableau', + 'Insert a horizontal rule': 'Insérer une ligne horizontale', + 'Code': 'Code', + 'Insert a Quote': 'Insérer une citation', + 'Width (optional):': 'Largeur (Optionelle)', + 'Height (optional):': 'Hauteur (Optionelle)', + 'Insert an image': 'Insérer une image', + 'E-mail:': 'Courriel', + 'Insert an email': 'Insérer un courriel', + 'URL:': 'URL', + 'Insert a link': 'Insérer un lien', + 'Unlink': 'Supprimer un lien', + 'More': 'Plus', + 'Insert an emoticon': 'Insérer une émoticône', + 'Video URL:': 'URL Vidéo', + 'Insert': 'Insérer', + 'Insert a YouTube video': 'Insérer une vidéo YouTube', + 'Insert current date': 'Insérer la date actuelle', + 'Insert current time': 'Insérer l\'heure actuelle', + 'Print': 'Imprimer', + 'View source': 'Afficher le texte brut', + 'Description (optional):': 'Description (Optionelle)', + 'Enter the image URL:': 'Entrez l\'URL de l\'image:', + 'Enter the e-mail address:': 'Entrez le courriel:', + 'Enter the displayed text:': 'Entrez le texte affiché:', + 'Enter URL:': 'Entrez une URL:', + 'Enter the YouTube video URL or ID:': 'Entrez l\'URL ou l\'ID de la vidéo YouTube:', + 'Invalid YouTube video': 'Vidéo YouTube invalide', + 'Right-to-Left': 'De droite à gauche', + 'Left-to-Right': 'De gauche à droite', + + dateFormat: 'day/month/year' + }; + $.sceditor.locale['fr'] = $.sceditor.locale['fr-FR']; +})(jQuery); diff --git a/Html/js/SCEditor/languages/gl.js b/Html/js/SCEditor/languages/gl.js new file mode 100644 index 0000000..90ce235 --- /dev/null +++ b/Html/js/SCEditor/languages/gl.js @@ -0,0 +1,68 @@ +/** + * @author Fran Sobrino + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['gl'] = { + 'Bold': 'Negrita', + 'Italic': 'Cursiva', + 'Underline': 'Subrayar', + 'Strikethrough': 'Riscar', + 'Subscript': 'Sub\u00edndice', + 'Superscript': 'Super\u00edndice', + 'Align left': 'Alinear á Esquerda', + 'Center': 'Centrar', + 'Align right': 'Alinear á Dereita', + 'Justify': 'Xustificar', + 'Font Name': 'Tipo de Letra', + 'Font Size': 'Tama\u00f1o de Letra', + 'Font Color': 'Cor de Fonte', + 'Remove Formatting': 'Quitar Formatos', + 'Cut': 'Cortar', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'O seu navegador non acepta o comando cortar. Por favor, empregue a combinaci\u00f3n Ctrl/Cmd-X', + 'Copy': 'Copiar', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'O seu navegador non acepta o comando cortar. Por favor, empregue a combinaci\u00f3n Ctrl/Cmd-C', + 'Paste': 'Pegar', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'O seu navegador non acepta o comando cortar. Por favor, empregue a combinaci\u00f3n Ctrl/Cmd-V', + 'Paste your text inside the following box:': 'Pega o texto dentro do seguinte recadro', + 'Paste Text': 'Pegar Texto', + 'Bullet list': 'Lista de Vi\u00f1etas', + 'Numbered list': 'Lista Numerada', + 'Undo': 'Desfacer', + 'Redo': 'Refacer', + 'Rows:': 'Ringleiras', + 'Cols:': 'Columnas', + 'Insert a table': 'Engadir unha Tabla', + 'Insert a horizontal rule': 'Engadir unha Regla Horizontal', + 'Code': 'C\u00f3digo', + 'Width (optional):': 'Ancho (Opcional)', + 'Height (optional):': 'Altura (Opcional)', + 'Insert an image': 'Engadir unha Imaxen', + 'E-mail:': 'E-mail', + 'Insert an email': 'Engadir un Email', + 'URL:': 'URL', + 'Insert a link': 'Engadir un V\u00ednculo', + 'Unlink': 'Quitar V\u00ednculo', + 'More': 'M\u00e1is', + 'Insert an emoticon': 'Engadir un emoticon', + 'Video URL:': 'URL do V\u00eddeo', + 'Insert': 'Engadir', + 'Insert a YouTube video': 'Engadir un v\u00eddeo de YouTube', + 'Insert current date': 'Engadir data actual', + 'Insert current time': 'Engadir hora actual', + 'Print': 'Imprimir', + 'View source': 'Ver C\u00f3digo', + 'Description (optional):': 'Descripci\u00f3n (Opcional):', + 'Enter the image URL:': 'Ingresar a URL da imaxen:', + 'Enter the e-mail address:': 'Ingresar o correo electr\u00f3nico:', + 'Enter the displayed text:': 'Ingresar o texto mostrado:', + 'Enter URL:': 'Ingresar URL:', + 'Enter the YouTube video URL or ID:': 'Ingresar URL ou ID de YouTube', + 'Insert a Quote': 'Engadir Cita', + 'Invalid YouTube video': 'V\u00eddeo de YouTube Inv\u00e1lido', + + dateFormat: 'day-month-year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/hu.js b/Html/js/SCEditor/languages/hu.js new file mode 100644 index 0000000..ae9f729 --- /dev/null +++ b/Html/js/SCEditor/languages/hu.js @@ -0,0 +1,69 @@ +/** + * @author Ángyán László + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + * @date 2013-08-11 + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['hu'] = { + 'Bold': 'Félkövér', + 'Italic': 'Dőlt', + 'Underline': 'Aláhúzva', + 'Strikethrough': 'Áthúzva', + 'Subscript': 'Alsó index', + 'Superscript': 'Felső index', + 'Align left': 'Balra zárt', + 'Center': 'Középre zárt', + 'Align right': 'Jobbra zárt', + 'Justify': 'Sorkizárt', + 'Font Name': 'Betűtípus', + 'Font Size': 'Betű méret', + 'Font Color': 'Betű szín', + 'Remove Formatting': 'Formázás törlése', + 'Cut': 'Kivágás', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'A böngésző biztonsági beállításai nem engedik a kivágást. Használd a Ctrl/Cmd+X billetyűket.', + 'Copy': 'Másolás', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'A böngésző biztonsági beállításai nem engedik a másolást. Használd a Ctrl/Cmd+C billetyűket.', + 'Paste': 'Beillesztés', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'A böngésző biztonsági beállításai nem engedik a beillesztést. Használd a Ctrl/Cmd+V billetyűket.', + 'Paste your text inside the following box:': 'Illeszd be a szöveget a dobozba:', + 'Paste Text': 'Szöveg beszúrása', + 'Bullet list': 'Felsorolás', + 'Numbered list': 'Sorszámozott felsorolás', + 'Undo': 'Vissza', + 'Redo': 'Mégis', + 'Rows:': 'Sorok', + 'Cols:': 'Oszlopok', + 'Insert a table': 'Táblázat beszúrása', + 'Insert a horizontal rule': 'Vízszintes vonal beszúrása', + 'Code': 'Kód', + 'Width (optional):': 'Szélesség (nem kötelező):', + 'Height (optional):': 'Magasság (nem kötelező):', + 'Insert an image': 'Illessz be egy képet', + 'E-mail:': 'Email:', + 'Insert an email': 'Illessz be egy email címet.', + 'URL:': 'Honlap', + 'Insert a link': 'Hivatkozás létrehozása', + 'Unlink': 'Hivatkozás megszüntetése', + 'More': 'Több', + 'Insert an emoticon': 'Smiley beszúrása', + 'Video URL:': 'Video link:', + 'Insert': 'Beszúrás', + 'Insert a YouTube video': 'Youtube video beszúrása', + 'Insert current date': 'Szúrd be az aktuális dátumot', + 'Insert current time': 'Szúrd be a jelenlegi időt', + 'Print': 'Nyomtatás', + 'View source': 'Forrás', + 'Description (optional):': 'Hivatkozás szövege (nem kötelező)', + 'Enter the image URL:': 'Kép URL beillesztése:', + 'Enter the e-mail address:': 'Írd be az email címet:', + 'Enter the displayed text:': 'Írd be a megjelenítendő szöveget:', + 'Enter URL:': 'Írd be a linket:', + 'Enter the YouTube video URL or ID:': 'Írd be a Youtube video URL-jét vagy azonosítóját', + 'Insert a Quote': 'Idézet beszúrása', + 'Invalid YouTube video': 'Érvénytelen Youtube link', + + dateFormat: 'year.month.day.' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/it.js b/Html/js/SCEditor/languages/it.js new file mode 100644 index 0000000..fcdc736 --- /dev/null +++ b/Html/js/SCEditor/languages/it.js @@ -0,0 +1,72 @@ +/** + * @author + * @author Gianluca Guazzo + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['it-IT'] = { + 'Bold': 'Grassetto', + 'Italic': 'Corsivo', + 'Underline': 'Sottolineato', + 'Strikethrough': 'Barrato', + 'Subscript': 'Pedice', + 'Superscript': 'Apice', + 'Align left': 'Allinea a sinistra', + 'Center': 'Centrato', + 'Align right': 'Allinea a destra', + 'Justify': 'Giustificato', + 'Font Name': 'Nome carattere', + 'Font Size': 'Dimensione carattere', + 'Font Color': 'Colore carattere', + 'Remove Formatting': 'Rimuovi formattazione', + 'Cut': 'Taglia', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Il tuo browser non permette il comando Taglia. Usa per favore la scorciatoia da tastiera Ctrl/Cmd-X', + 'Copy': 'Copia', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Il tuo browser non permette il comando Copia. Usa per favore la scorciatoia da tastiera Ctrl/Cmd-C', + 'Paste': 'Incolla', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Il tuo browser non permette il comando Incolla. Usa per favore la scorciatoia da tastiera Ctrl/Cmd-V', + 'Paste your text inside the following box:': 'Incolla il tuo testo dentro il seguente riquadro', + 'Paste Text': 'Incolla Testo', + 'Bullet list': 'Elenco puntato', + 'Numbered list': 'Elenco numerato', + 'Undo': 'Annulla', + 'Redo': 'Ripeti', + 'Rows:': 'Righe:', + 'Cols:': 'Colonne:', + 'Insert a table': 'Inserisci una tabella', + 'Insert a horizontal rule': 'Inserisci riga orizzontale', + 'Code': 'Codice', + 'Width (optional):': 'Larghezza(opzionale):', + 'Height (optional):': 'Altezza(opzionale):', + 'Insert an image': 'Inserisci un\'immagine', + 'E-mail:': 'E-mail:', + 'Insert an email': 'Inserisci una email', + 'URL:': 'URL:', + 'Insert a link': 'Inserisci collegamento(link):', + 'Unlink': 'Togli collegamento(link):', + 'More': 'Di più', + 'Insert an emoticon': 'Inserisci una emoticon', + 'Video URL:': 'URL del video', + 'Insert': 'Inserisci', + 'Insert a YouTube video': 'Inserisci un video YouTube', + 'Insert current date': 'Inserisci data corrente', + 'Insert current time': 'Inserisci ora corrente', + 'Print': 'Stampa', + 'View source': 'Vedi codice sorgente', + 'Description (optional):': 'Descrizione (opzionale):', + 'Enter the image URL:': 'Inserisci URL dell\'immagine', + 'Enter the e-mail address:': 'Inserisci indirizzo email', + 'Enter the displayed text:': 'Inserisci testo visualizzato', + 'Enter URL:': 'Inserisci URL', + 'Enter the YouTube video URL or ID:': 'Inserisci URL o ID video di YouTube', + 'Insert a Quote': 'Inserisci una citazione', + 'Invalid YouTube video': 'Video YouTube invalido', + + dateFormat: 'day-month-year' + }; + + // Set as the default Italian locale + $.sceditor.locale['it'] = $.sceditor.locale['it-IT']; +})(jQuery); diff --git a/Html/js/SCEditor/languages/ja.js b/Html/js/SCEditor/languages/ja.js new file mode 100644 index 0000000..2cc8ca0 --- /dev/null +++ b/Html/js/SCEditor/languages/ja.js @@ -0,0 +1,71 @@ +/** + * @author + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['ja'] = { + 'Bold': '太字', + 'Italic': '斜字', + 'Underline': '下線', + 'Strikethrough': '取り消し線', + 'Subscript': '下付き文字', + 'Superscript': '上付き文字', + 'Align left': '左揃え', + 'Center': '中央揃え', + 'Align right': '右揃え', + 'Justify': '均等揃え', + 'Font Name': 'フォント名', + 'Font Size': 'フォントサイズ', + 'Font Color': 'フォントの色', + 'Remove Formatting': '書式解除', + 'Cut': '切り取り', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'お使いのブラウザではカットコマンドを許可されていません。 キーボードショートカットの Ctrl/Cmd-X をお使いください。', + 'Copy': 'コピー', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'お使いのブラウザではコピーコマンドを許可されていません。 キーボードショートカットの Ctrl/Cmd-C をお使いください。', + 'Paste': '貼り付け', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'お使いのブラウザでは貼り付けコマンドを許可されていません。 キーボードショートカットの Ctrl/Cmd-V をお使いください。', + 'Paste your text inside the following box:': '以下にテキストを貼り付けてください。', + 'Paste Text': 'テキストを貼り付け', + 'Bullet list': '箇条書き', + 'Numbered list': '段落番号', + 'Undo': '元に戻す', + 'Redo': 'やり直す', + 'Rows:': '行数', + 'Cols:': '列数', + 'Insert a table': '表を挿入', + 'Insert a horizontal rule': '水平線を挿入', + 'Code': 'コード', + 'Width (optional):': '幅 (オプション)', + 'Height (optional):': '高さ (オプション)', + 'Insert an image': '画像を挿入', + 'E-mail:': 'メールアドレス', + 'Insert an email': 'メールアドレスを挿入', + //'URL:': ', + 'Insert a link': 'リンクを挿入', + 'Unlink': 'リンクを解除', + //'More': ', + 'Insert an emoticon': '顔文字を挿入', + 'Video URL:': '動画URL', + 'Insert': '挿入', + 'Insert a YouTube video': 'Youtubeを挿入', + 'Insert current date': '現在の日付を挿入', + 'Insert current time': '現在の時間を挿入', + 'Print': '印刷', + 'View source': 'ソースを表示', + 'Description (optional):': '説明 (オプション)', + 'Enter the image URL:': '画像URLを入力してください。', + 'Enter the e-mail address:': 'メールアドレスを入力してください。', + 'Enter the displayed text:': '表示テキストを入力してください。', + 'Enter URL:': 'URLを入力してください。', + 'Enter the YouTube video URL or ID:': 'Youtubeの動画URLまたはIDを入力してください。', + 'Insert a Quote': '引用を挿入', + 'Invalid YouTube video': '不正なYoutube動画', + 'Left-to-Right': '左から右へ', + 'Right-to-Left': '右から左へ', + 'Maximize': '最大化', + + dateFormat: 'year-month-day' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/lt.js b/Html/js/SCEditor/languages/lt.js new file mode 100644 index 0000000..91a2489 --- /dev/null +++ b/Html/js/SCEditor/languages/lt.js @@ -0,0 +1,68 @@ +/** + * @author Team from www.klaustukai.lt + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['lt'] = { + 'Bold': 'Paryškintas', + 'Italic': 'Pasvirasis', + 'Underline': 'Pabraukti', + 'Strikethrough': 'Perbraukti', + 'Subscript': 'Parašyti sumažintas raides po žodžio', + 'Superscript': 'Parašyti sumažintas raides virš žodžio', + 'Align left': 'Kairysis lygiavimas', + 'Center': 'Centrinis lygiavimas', + 'Align right': 'Dešinysis lygiavimas', + 'Justify': 'Išlygintas tekstas', + 'Font Name': 'Šrifto pavadinimas', + 'Font Size': 'Šrifto dydis', + 'Font Color': 'Šrifto spalva', + 'Remove Formatting': 'Panaikinti teksto formatavimą', + 'Cut': 'Iškirpti', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Jūsų paieškos sistema neleidžia atlikti šios funkcijos. Norėdami iškirpti spauskite Ctrl/Cmd-x', + 'Copy': 'Kopijuoti', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Jūsų paieškos sistema neleidžia atlikti šios komandos. Norėdami nukopijuoti spauskite Ctrl/Cmd - C', + 'Paste': 'Įklijuoti', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Jūsų paieškos sistema neleidžia atlikti šios komandos. Norėdami įklijuoti spauskite Ctrl/Cmd - V', + 'Paste your text inside the following box:': 'Įklijuokite tekstą nurodytoje vietoje', + 'Paste Text': 'Įklijuoti tekstą', + 'Bullet list': 'Sugrupuotas sąrašas', + 'Numbered list': 'Sunumeruotas sąrašas', + 'Undo': 'panaikinti', + 'Redo': 'atitaisyti', + 'Rows:': 'Eilutės', + 'Cols:': 'Stulpeliai', + 'Insert a table': 'Įterpti lentelę', + 'Insert a horizontal rule': 'Įterpti horizontalią liniją', + 'Code': 'Šalies kodas', + 'Width (optional):': 'plotis (laisvai pasirenkamas)', + 'Height (optional):': 'aukštis (laisvai pasirenkamas)', + 'Insert an image': 'Įterpti nuotrauką', + 'E-mail:': 'Elektroninis paštas', + 'Insert an email': 'Įterpti elktroninio pašto nuorodą', + 'URL:': 'Internetinės svetainės adresas:', + 'Insert a link': 'Įterpti nuorodą', + 'Unlink': 'Atjungti', + 'More': 'Daugiau', + 'Insert an emoticon': 'Įterpti šypsenėlę', + 'Video URL:': 'Vaizdo klipo nuoroda', + 'Insert': 'Įterpti', + 'Insert a YouTube video': 'Įterpti Youtube vaizdo klipą', + 'Insert current date': 'Įterpti esamą datą (diena-mėnuo-metai)', + 'Insert current time': 'Įterpti esamą laiką', + 'Print': 'Atspausdinti', + 'View source': 'Peržiūrėti šaltinį', + 'Description (optional):': 'Aprašymas (laisvai pasirenkamas)', + 'Enter the image URL:': 'Įterpti nuotraukos adresą', + 'Enter the e-mail address:': 'Įterpti elektroninio pašto adresą', + 'Enter the displayed text:': 'Įvesti pavaizduotą tekstą', + 'Enter URL:': 'Įvesti internetinį adresą', + 'Enter the YouTube video URL or ID:': 'Įrašykite Youtube vaizdo klipo nuorodą ar ID', + 'Insert a Quote': 'Įterpti citatą', + 'Invalid YouTube video': 'YouTube vaizdo įrašas neveikia', + + dateFormat: 'year-month-day' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/nb.js b/Html/js/SCEditor/languages/nb.js new file mode 100644 index 0000000..455ee0f --- /dev/null +++ b/Html/js/SCEditor/languages/nb.js @@ -0,0 +1,70 @@ +/** + * @author Katrine + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['nb-NO'] = { + 'Bold': 'Fet', + 'Italic': 'Kursiv', + 'Underline': 'Understrek', + 'Strikethrough': 'Gjennomstrek', + 'Subscript': 'Senket', + 'Superscript': 'Hevet', + 'Align left': 'Sidestill til venstre', + 'Center': 'Midstill', + 'Align right': 'Sidestill til høyre', + 'Justify': 'Normalt oppstilt', + 'Font Name': 'Skriftype', + 'Font Size': 'Skriftstørrelse', + 'Font Color': 'skriftfarge', + 'Remove Formatting': 'Fjern formatering', + 'Cut': 'Klipp', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Nettleseren din kan ikke utføre klippe kommandoen. Vennligst bruk hurtigtasten Ctrl / Cmd-X', + 'Copy': 'Kopier', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Nettleseren din kan ikke utføre kopier kommandoen. Vennligst bruk hurtigtasten Ctrl / Cmd-C', + 'Paste': 'Lim', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Nettleseren din kan ikke utføre lime kommandoen. Vennligst bruk hurtigtasten Ctrl / Cmd-V', + 'Paste your text inside the following box:': 'Lim inn teksten i den følgende boksen:', + 'Paste Text': 'Lim inn tekst', + 'Bullet list': 'Bullet liste', + 'Numbered list': 'Nummerert liste', + 'Undo': 'Angre', + 'Redo': 'Gjør på nytt', + 'Rows:': 'Rader', + 'Cols:': 'Kolonner', + 'Insert a table': 'Sett inn en tabell', + 'Insert a horizontal rule': 'Sett en horisontal regel', + 'Code': 'Kode', + 'Width (optional):': 'Bredde (valgfritt):', + 'Height (optional):': 'Høyde (valgfritt):', + 'Insert an image': 'Sett inn et bilde', + 'E-mail:': 'E-post', + 'Insert an email': 'Sett inn en e-post', + 'URL:': 'URL:', + 'Insert a link': 'Sett inn en lenke', + 'Unlink': 'Oppheve tilknytningen', + 'More': 'Mer', + 'Insert an emoticon': 'Sett inn et uttrykksikon', + 'Video URL:': 'Video URL', + 'Insert': 'Sett inn', + 'Insert a YouTube video': 'Sett inn en YouTube-video', + 'Insert current date': 'Sett inn gjeldende dato', + 'Insert current time': 'Sett inn gjeldende klokkeslett', + 'Print': 'Skriv ut', + 'View source': 'Vis kildekode', + 'Description (optional):': 'Beskrivelse (valgfritt):', + 'Enter the image URL:': 'Skriv inn bildet\'s URL:', + 'Enter the e-mail address:': 'Skriv inn e-postadresse:', + 'Enter the displayed text:': 'Skriv inn teksten som vises:', + 'Enter URL:': 'Skriv inn URL adresse:', + 'Enter the YouTube video URL or ID:': 'Angi YouTube video link eller ID:', + 'Insert a Quote': 'Sett inn sitat', + 'Invalid YouTube video': 'Ugyldig Youtube video', + + dateFormat: 'day.month.year' + }; + + $.sceditor.locale['nb'] = $.sceditor.locale['nb-NO']; +})(jQuery); diff --git a/Html/js/SCEditor/languages/nl.js b/Html/js/SCEditor/languages/nl.js new file mode 100644 index 0000000..48c89bb --- /dev/null +++ b/Html/js/SCEditor/languages/nl.js @@ -0,0 +1,57 @@ +(function ($) { + 'use strict'; + + $.sceditor.locale['nl'] = { + 'Bold': 'Vet', + 'Italic': 'Schuingedrukt', + 'Underline': 'Onderstreept', + 'Strikethrough': 'Doorhalen', + 'Subscript': 'Subscript', + 'Superscript': 'Superscript', + 'Align left': 'Links uitlijnen', + 'Center': 'Centreren', + 'Align right': 'Rechts uitlijnen', + 'Justify': 'Uitvullen', + 'Font Name': 'Fontnaam', + 'Font Size': 'Fontgrootte', + 'Font Color': 'Fontkleur', + 'Remove Formatting': 'Verwijder opmaak', + 'Cut': 'Knippen', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Je browser staat het knippen commando niet toe. Gebruik de toetsenbord sneltoets Ctrl / Cmd-X', + 'Copy': 'Kopiëren', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Je browser staat het kopieer commando niet toe. Gebruik de toetsenbord sneltoets Ctrl / Cmd-C', + 'Paste': 'Plakken', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Je browser staat het plakken commando niet toe. Gebruik de toetsenbord sneltoets Ctrl / Cmd-V', + 'Paste your text inside the following box:': 'Plak je tekst in de volgende locatie:', + 'Paste Text': 'Tekst plakken', + 'Bullet list': 'Opsomming', + 'Numbered list': 'Genummerde lijst', + 'Undo': 'Ongedaan maken', + 'Redo': 'Opnieuw uitvoeren', + 'Rows:': 'Rijen', + 'Cols:': 'Kolommen', + 'Insert a table': 'Tabel', + 'Insert a horizontal rule': 'Horizontale regel', + 'Code': 'Code', + 'Insert a Quote': 'Citeren', + 'Width (optional):': 'Breedte (optioneel):', + 'Height (optional):': 'Hoogte (optioneel):', + 'Insert an image': 'Afbeelding', + 'E-mail:': 'E-mail', + 'Insert an email': 'E-mail', + 'URL:': 'URL:', + 'Insert a link': 'Link', + 'Unlink': 'Link verwijderen', + 'More': 'Meer', + 'Insert an emoticon': 'Emoticon', + 'Video URL:': 'Video URL', + 'Insert': 'Invoegen', + 'Insert a YouTube video': 'YouTube-video', + 'Insert current date': 'Huidige datum', + 'Insert current time': 'Huidige tijd', + 'Print': 'Print', + 'View source': 'Bron bekijken', + + dateFormat: 'day.month.year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/pl.js b/Html/js/SCEditor/languages/pl.js new file mode 100644 index 0000000..09a4c06 --- /dev/null +++ b/Html/js/SCEditor/languages/pl.js @@ -0,0 +1,68 @@ +/** + * @author + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['pl'] = { + 'Bold': 'Pogrubienie', + 'Italic': 'Kursywa', + 'Underline': 'Podkreślenie', + 'Strikethrough': 'Przekreślenie', + 'Subscript': 'Indeks dolny', + 'Superscript': 'Indeks górny', + 'Align left': 'Do lewej', + 'Center': 'Do środka', + 'Align right': 'Do prawej', + 'Justify': 'Wyjustowanie', + 'Font Name': 'Krój czcionki', + 'Font Size': 'Rozmiar czcionki', + 'Font Color': 'Kolor czcionki', + 'Remove Formatting': 'Usuń formatowanie', + 'Cut': 'Wytnij', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Twoja przeglądarka nie obsługuje opcji wycinania. Użyj skrótu klawiszowego Cmd/Ctrl + X', + 'Copy': 'Skopiuj', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Twoja przeglądarka nie obsługuje opcji kopiowania. Użyj skrótu klawiszowego Cmd/Ctrl + C', + 'Paste': 'Wklej', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Twoja przeglądarka nie obsługuje opcji wklejania. Użyj skrótu klawiszowego Cmd/Ctrl + V', + 'Paste your text inside the following box:': 'Wklej swój tekst do tego pola:', + 'Paste Text': 'Wklej tekst', + 'Bullet list': 'Wypunktowanie', + 'Numbered list': 'Lista numerowana', + 'Undo': 'Cofnij', + 'Redo': 'Powtórz', + 'Rows:': 'Wiersze:', + 'Cols:': 'Kolumny:', + 'Insert a table': 'Wstaw tabelę', + 'Insert a horizontal rule': 'Wstaw linię poziomą', + 'Code': 'Kod', + 'Width (optional):': 'Szerokość (opcjonalnie)', + 'Height (optional):': 'Wysokość (opcjonalnie)', + 'Insert an image': 'Wstaw obrazek', + 'E-mail:': 'E-mail', + 'Insert an email': 'Wstaw e-mail', + 'URL:': 'URL', + 'Insert a link': 'Wstaw odnośnik', + 'Unlink': 'Usuń odnośnik', + 'More': 'Więcej', + 'Insert an emoticon': 'Wstaw emotikonę', + 'Video URL:': 'URL do filmu', + 'Insert': 'Wstaw', + 'Insert a YouTube video': 'Wstaw film YouTube', + 'Insert current date': 'Wstaw aktualną datę', + 'Insert current time': 'Wstaw aktualny czas', + 'Print': 'Drukuj', + 'View source': 'Pokaż źródło', + 'Description (optional):': 'Opis (opcjonalny)', + 'Enter the image URL:': 'Wstaw URL do obrazka', + 'Enter the e-mail address:': 'Wpisz adres e-mail', + 'Enter the displayed text:': 'Wpisz wyświetlony tekst', + 'Enter URL:': 'Wpisz adres URL', + 'Enter the YouTube video URL or ID:': 'Wpisz adres URL lub ID filmu na YouTube', + 'Insert a Quote': 'Wstaw cytat', + 'Invalid YouTube video': 'Nieprawidłowy film YouTube', + + dateFormat: 'day-month-year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/pt-BR.js b/Html/js/SCEditor/languages/pt-BR.js new file mode 100644 index 0000000..a279a1d --- /dev/null +++ b/Html/js/SCEditor/languages/pt-BR.js @@ -0,0 +1,67 @@ +/** +* @author martec +* @license [MIT](http://www.opensource.org/licenses/mit-license.php) +*/ +(function ($) { + 'use strict'; + + $.sceditor.locale['pt-BR'] = { + 'Bold': 'Negrito', + 'Italic': 'Itálico', + 'Underline': 'Sublinhado', + 'Strikethrough': 'Rasurado', + 'Subscript': 'Subscrito', + 'Superscript': 'Sobrescrito ', + 'Align left': 'Alinhar à esquerda', + 'Center': 'Centralizar', + 'Align right': 'Alinhar à direita', + 'Justify': 'Justificar', + 'Font Name': 'Nome da fonte', + 'Font Size': 'Tamanho da fonte', + 'Font Color': 'Cor da fonte', + 'Remove Formatting': 'Remover a formatação', + 'Cut': 'Recortar', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Seu navegador não permite o comando recortar. Favor use o atalho Ctrl/Cmd-X', + 'Copy': 'Copiar', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Seu navegador não permite o comando copiar. Favor use o atalho Ctrl/Cmd-C', + 'Paste': 'Colar', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Seu navegador não permite o comando colar. Favor use o atalho Ctrl/Cmd-V', + 'Paste your text inside the following box:': 'Cole o seu texto dentro da caixa de texto a seguir:', + 'Paste Text': 'Colar o texto', + 'Bullet list': 'Lista com marcadores', + 'Numbered list': 'Lista numérica', + 'Undo': 'Desfazer', + 'Redo': 'Refazer', + 'Rows:': 'Linhas:', + 'Cols:': 'Colunas:', + 'Insert a table': 'Inserir uma tabela', + 'Insert a horizontal rule': 'Inserir uma linha horizontal', + 'Code': 'Código', + 'Width (optional):': 'Largura (opcional):', + 'Height (optional):': 'Altura (opcional):', + 'Insert an image': 'Inserir uma imagem', + 'E-mail:': 'E-mail:', + 'Insert an email': 'Inserir um e-mail', + 'URL:': 'URL:', + 'Insert a link': 'Inserir um hiperlink', + 'Unlink': 'Remover o hiperlink', + 'More': 'Mais', + 'Insert an emoticon': 'Inserir um emoticon', + 'Video URL:': 'Video URL:', + 'Insert': 'Inserir', + 'Insert a YouTube video': 'Inserir YouTube video', + 'Insert current date': 'Inserir a data atual', + 'Insert current time': 'Inserir a hora atual', + 'Print': 'Imprimir', + 'View source': 'Fonte', + 'Description (optional):': 'Descrição (opcional):', + 'Enter the image URL:': 'Informe o endereço URL da imagem:', + 'Enter the e-mail address:': 'Informe o endereço de e-mail:', + 'Enter the displayed text:': 'Digite o texto exibido:', + 'Enter URL:': 'Informe o endereço URL:', + 'Enter the YouTube video URL or ID:': 'Informe o endereço URL ou ID do YouTube:', + 'Insert a Quote': 'Inserir uma citação', + 'Invalid YouTube video': 'Vídeo do YouTube inválido', + dateFormat: 'day-month-year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/pt.js b/Html/js/SCEditor/languages/pt.js new file mode 100644 index 0000000..1d3c2f8 --- /dev/null +++ b/Html/js/SCEditor/languages/pt.js @@ -0,0 +1,69 @@ +/** +* @author brunoais +* @license [MIT](http://www.opensource.org/licenses/mit-license.php) +*/ +(function ($) { + 'use strict'; + + $.sceditor.locale['pt-PT'] = { + 'Bold': 'Negrito', + 'Italic': 'Itálico', + 'Underline': 'Sublinhado', + 'Strikethrough': 'Rasurado', + 'Subscript': 'Subscrito', + 'Superscript': 'Sobrescrito ', + 'Align left': 'Alinhar à esquerda', + 'Center': 'Centrar', + 'Align right': 'Alinhar à direita', + 'Justify': 'Justificar', + 'Font Name': 'Nome da fonte', + 'Font Size': 'Tamanho da fonte', + 'Font Color': 'Cor da fonte', + 'Remove Formatting': 'Remover a formatação', + 'Cut': 'Cortar', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Seu navegador não permite o comando cortar. Por favor use o atalho Ctrl/Cmd-X', + 'Copy': 'Copiar', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Seu navegador não permite o comando copiar. Por favor use o atalho Ctrl/Cmd-C', + 'Paste': 'Colar', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Seu navegador não permite o comando colar. Por favor use o atalho Ctrl/Cmd-V', + 'Paste your text inside the following box:': 'Cole o seu texto dentro da caixa de texto a seguir:', + 'Paste Text': 'Colar o texto', + 'Bullet list': 'Lista com marcadores', + 'Numbered list': 'Lista numérica', + 'Undo': 'Desfazer', + 'Redo': 'Refazer', + 'Rows:': 'Linhas:', + 'Cols:': 'Colunas:', + 'Insert a table': 'Inserir uma tabela', + 'Insert a horizontal rule': 'Inserir uma linha horizontal', + 'Code': 'Código', + 'Width (optional):': 'Largura (opcional):', + 'Height (optional):': 'Altura (opcional):', + 'Insert an image': 'Inserir uma imagem', + 'E-mail:': 'E-mail:', + 'Insert an email': 'Inserir um e-mail', + 'URL:': 'URL:', + 'Insert a link': 'Inserir um hiperlink', + 'Unlink': 'Remover o hiperlink', + 'More': 'Mais', + 'Insert an emoticon': 'Inserir um emoticon', + 'Video URL:': 'Video URL:', + 'Insert': 'Inserir', + 'Insert a YouTube video': 'Inserir YouTube video', + 'Insert current date': 'Inserir a data atual', + 'Insert current time': 'Inserir a hora atual', + 'Print': 'Imprimir', + 'View source': 'Código fonte', + 'Description (optional):': 'Descrição (opcional):', + 'Enter the image URL:': 'Introduza o endereço URL da imagem:', + 'Enter the e-mail address:': 'Introduza o endereço de e-mail:', + 'Enter the displayed text:': 'Indique o texto exibido:', + 'Enter URL:': 'Introduza o endereço URL:', + 'Enter the YouTube video URL or ID:': 'Introduza o endereço URL ou o ID do video do YouTube:', + 'Insert a Quote': 'Inserir uma citação', + dateFormat: 'day/month/year' + }; + + // Set as the default Portuguese locale + $.sceditor.locale['pt'] = $.sceditor.locale['pt-PT']; +})(jQuery); diff --git a/Html/js/SCEditor/languages/ru.js b/Html/js/SCEditor/languages/ru.js new file mode 100644 index 0000000..32e0ed1 --- /dev/null +++ b/Html/js/SCEditor/languages/ru.js @@ -0,0 +1,57 @@ +(function ($) { + 'use strict'; + + $.sceditor.locale['ru'] = { + 'Bold': 'Жирный', + 'Italic': 'Курсив', + 'Underline': 'Подчёркнутый', + 'Strikethrough': 'Зачёркнутый', + 'Subscript': 'Нижний индекс', + 'Superscript': 'Верхний индекс', + 'Align left': 'Выравнивание по левому краю', + 'Center': 'Выравнивание по центру', + 'Align right': 'Выравнивание по правому краю', + 'Justify': 'Выравнивание по обоим краям', + 'Font Name': 'Шрифт', + 'Font Size': 'Размер шрифта', + 'Font Color': 'Цвет шрифта', + 'Remove Formatting': 'Удалить форматирование', + 'Cut': 'Вырезать', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Ваш браузер не позволяет выполнять эту команду. Пожалуйста, используйте сочетание клавиш Ctrl / Cmd-X', + 'Copy': 'Копировать', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Ваш браузер не позволяет выполнять эту команду. Пожалуйста, используйте сочетание клавиш Ctrl / Cmd-C', + 'Paste': 'Выставить', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Ваш браузер не позволяет выполнять эту команду. Пожалуйста, используйте сочетание клавиш Ctrl / Cmd-V', + 'Paste your text inside the following box:': 'Вставьте текст в следующее окно:', + 'Paste Text': 'Вставить текст', + 'Bullet list': 'Маркированный список', + 'Numbered list': 'Нумерованный список', + 'Undo': 'Отменить', + 'Redo': 'Повторить', + 'Rows:': 'Строки', + 'Cols:': 'Столбцы', + 'Insert a table': 'Таблица', + 'Insert a horizontal rule': 'Горизонтальная линия', + 'Code': 'Код', + 'Insert a Quote': 'Цитата', + 'Width (optional):': 'Ширина (необязательно):', + 'Height (optional):': 'Высота (необязательно):', + 'Insert an image': 'Изображение', + 'E-mail:': 'E-mail', + 'Insert an email': 'E-mail', + 'URL:': 'URL:', + 'Insert a link': 'Ссылка', + 'Unlink': 'Удалить ссылку', + 'More': 'Больше', + 'Insert an emoticon': 'Смайлы', + 'Video URL:': 'Видео URL', + 'Insert': 'Вставить', + 'Insert a YouTube video': 'YouTube-видео', + 'Insert current date': 'Текущая дата', + 'Insert current time': 'Текущее время', + 'Print': 'Распечатать', + 'View source': 'Показать код', + 'Maximize': 'Развернуть', + dateFormat: 'day.month.year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/sv.js b/Html/js/SCEditor/languages/sv.js new file mode 100644 index 0000000..cd4a9f7 --- /dev/null +++ b/Html/js/SCEditor/languages/sv.js @@ -0,0 +1,58 @@ +(function ($) { + 'use strict'; + + $.sceditor.locale['sv-SE'] = { + 'Bold': 'Fet', + 'Italic': 'Kursiv', + 'Underline': 'Understruken', + 'Strikethrough': 'Genomstruken', + 'Subscript': 'Nersänkt', + 'Superscript': 'Upphöjt', + 'Align left': 'Vänsterställ', + 'Center': 'Centrera', + 'Align right': 'Högerställ', + 'Justify': 'Normalt oppstilt', + 'Font Name': 'Teckensnitt', + 'Font Size': 'Teckenstorlek', + 'Font Color': 'Teckenfärg', + 'Remove Formatting': 'Ta bort formatering', + 'Cut': 'Klipp ut', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Din webbläsare kan inte utföra kommandot. Vänligen använd kortkommando Ctrl / Cmd-X', + 'Copy': 'Kopiera', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Din webbläsare kan inte utföra kommandot. Vänligen använd kortkommando Ctrl / Cmd-C', + 'Paste': 'Klista in', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Din webbläsare kan inte utföra kommandot. Vänligen använd kortkommando Ctrl / Cmd-V', + 'Paste your text inside the following box:': 'Klistra in din text i rutan:', + 'Paste Text': 'Klistra in text', + 'Bullet list': 'Lista', + 'Numbered list': 'Numrerad lista', + 'Undo': 'Ångra', + 'Redo': 'Gör om', + 'Rows:': 'Rader', + 'Cols:': 'Kolumner', + 'Insert a table': 'Infoga tabell', + 'Insert a horizontal rule': 'Infoga skiljestreck', + 'Code': 'Kod', + 'Width (optional):': 'Bredd (valfritt):', + 'Height (optional):': 'Höjd (valfritt):', + 'Insert an image': 'Infoga bild', + 'E-mail:': 'E-post', + 'Insert an email': 'Infoga e-post', + 'URL:': 'URL:', + 'Insert a link': 'Infoga länk', + 'Unlink': 'Ta bort länk', + 'More': 'Mer', + 'Insert an emoticon': 'Infoga smiley', + 'Video URL:': 'Video URL', + 'Insert': 'Infoga', + 'Insert a YouTube video': 'Infoga YouTube-video', + 'Insert current date': 'Infoga dagens datum', + 'Insert current time': 'Infoga nuvarande tid', + 'Print': 'Skriv ut', + 'View source': 'Visa källkod', + 'Description (optional):': 'Beskrivning (valfritt):', + dateFormat: 'year-month-day' + }; + + $.sceditor.locale['sv'] = $.sceditor.locale['sv-SE']; +})(jQuery); diff --git a/Html/js/SCEditor/languages/template.js b/Html/js/SCEditor/languages/template.js new file mode 100644 index 0000000..6f3cf0b --- /dev/null +++ b/Html/js/SCEditor/languages/template.js @@ -0,0 +1,74 @@ +/** + * @author + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + // Replace with the language code, e.g. no, fr, en, ect. + $.sceditor.locale[''] = { + + // Original string is on the left, place the translation between + // the quotes on the right + 'Bold': '', + 'Italic': '', + 'Underline': '', + 'Strikethrough': '', + 'Subscript': '', + 'Superscript': '', + 'Align left': '', + 'Center': '', + 'Align right': '', + 'Justify': '', + 'Font Name': '', + 'Font Size': '', + 'Font Color': '', + 'Remove Formatting': '', + 'Cut': '', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': '', + 'Copy': '', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': '', + 'Paste': '', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': '', + 'Paste your text inside the following box:': '', + 'Paste Text': '', + 'Bullet list': '', + 'Numbered list': '', + 'Undo': '', + 'Redo': '', + 'Rows:': '', + 'Cols:': '', + 'Insert a table': '', + 'Insert a horizontal rule': '', + 'Code': '', + 'Width (optional):': '', + 'Height (optional):': '', + 'Insert an image': '', + 'E-mail:': '', + 'Insert an email': '', + 'URL:': '', + 'Insert a link': '', + 'Unlink': '', + 'More': '', + 'Insert an emoticon': '', + 'Video URL:': '', + 'Insert': '', + 'Insert a YouTube video': '', + 'Insert current date': '', + 'Insert current time': '', + 'Print': '', + 'View source': '', + 'Description (optional):': '', + 'Enter the image URL:': '', + 'Enter the e-mail address:': '', + 'Enter the displayed text:': '', + 'Enter URL:': '', + 'Enter the YouTube video URL or ID:': '', + 'Insert a Quote': '', + 'Invalid YouTube video': '', + + // month format, replace - with the date format seperator and order in the + // order used + dateFormat: 'day-month-year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/tr.js b/Html/js/SCEditor/languages/tr.js new file mode 100644 index 0000000..9f58c12 --- /dev/null +++ b/Html/js/SCEditor/languages/tr.js @@ -0,0 +1,66 @@ +/** + * @author Mahmut Yaman - iletisim@/m-yaman.com + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + $.sceditor.locale['tr'] = { + 'Bold': 'Kalın', + 'Italic': 'İtalik', + 'Underline': 'Altı çizgili', + 'Strikethrough': 'Üstü çizgili', + 'Subscript': 'Simge', + 'Superscript': 'Üstsimge', + 'Align left': 'Sola yasla', + 'Center': 'Ortala', + 'Align right': 'Sağa yasla', + 'Justify': 'Satır uzunluğuna ayarla', + 'Font Name': 'Yazı tipi', + 'Font Size': 'Yazı boyutu', + 'Font Color': 'Yazı rengi', + 'Remove Formatting': 'Biçimlendirmeyi temizle', + 'Cut': 'Kes', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Tarayıcınız kesme komutuna izin vermiyor. Lütfen Ctrl/Cmd-X klavye kısayolunu kullanın.', + 'Copy': 'Kopyala', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Tarayıcınız kopyalama komutuna izin vermiyor. Lütfen Ctrl/Cmd-C klavye kısayolunu kullanın.', + 'Paste': 'Yapıştır', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Tarayıcınız yapıştırma komutuna izin vermiyor. Lütfen Ctrl/Cmd-V klavye kısayolunu kullanın.', + 'Paste your text inside the following box:': 'Yazınızı bu kutucuğa yapıştırın:', + 'Paste Text': 'Metin Yapıştır', + 'Bullet list': 'Madde işaretli liste', + 'Numbered list': 'Numaralı liste', + 'Undo': 'Geri al', + 'Redo': 'Yinele', + 'Rows:': 'Sütun:', + 'Cols:': 'Kolon:', + 'Insert a table': 'Tablo ekle', + 'Insert a horizontal rule': 'Yatay ayraç ekle', + 'Code': 'Kod', + 'Width (optional):': 'Genişlik (opsiyonel):', + 'Height (optional):': 'Yükseklik (opsiyonel):', + 'Insert an image': 'Resim ekle', + 'E-mail:': 'E-posta:', + 'Insert an email': 'E-posta ekle', + 'URL:': 'URL:', + 'Insert a link': 'Bağlantı ekle', + 'Unlink': 'Bağlantıyı kaldır', + 'More': 'Daha fazla', + 'Insert an emoticon': 'Yüz ifadesi ekle', + 'Video URL:': 'Video URL:', + 'Insert': 'Ekle', + 'Insert a YouTube video': 'YouTube videosu ekle', + 'Insert current date': 'Şuanki tarihi ekle', + 'Insert current time': 'Şuanki saati ekle', + 'Print': 'Yazdır', + 'View source': 'Kaynağı görüntüle', + 'Description (optional):': 'Açıklama (opsiyonel):', + 'Enter the image URL:': 'Resim URL\'sini girin:', + 'Enter the e-mail address:': 'E-posta adresini girin:', + 'Enter the displayed text:': 'Görünecek yazıyı girin:', + 'Enter URL:': 'URL\'yi girin:', + 'Enter the YouTube video URL or ID:': 'YouTube video URL\'sini yada ID\'sini girin:', + 'Insert a Quote': 'Alıntı ekle', + 'Invalid YouTube video': 'Geçersiz YouTube videosu', + dateFormat: 'day-month-year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/tw.js b/Html/js/SCEditor/languages/tw.js new file mode 100644 index 0000000..19305bb --- /dev/null +++ b/Html/js/SCEditor/languages/tw.js @@ -0,0 +1,68 @@ +/** + * @author + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['tw'] = { + 'Bold': '粗體', + 'Italic': '斜體', + 'Underline': '底線', + 'Strikethrough': '删除線', + 'Subscript': '下標', + 'Superscript': '上標', + 'Align left': '靠左對齊', + 'Center': '置中', + 'Align right': '靠右對齊', + 'Justify': '兩端對齊', + 'Font Name': '字形', + 'Font Size': '字體大小', + 'Font Color': '文字顏色', + 'Remove Formatting': '清除格式', + 'Cut': '剪下', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': '您的瀏覽器不支持剪下命令,請使用快速键 Ctrl/Cmd-X', + 'Copy': '拷貝', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': '您的瀏覽器不支持拷貝命令,請使用快速键 Ctrl/Cmd-C', + 'Paste': '貼上', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': '您的瀏覽器不支持貼上命令,請使用快速键 Ctrl/Cmd-V', + 'Paste your text inside the following box:': '請在下面貼上您的文字', + 'Paste Text': '貼上纯文字', + 'Bullet list': '符號列表', + 'Numbered list': '编號列表', + 'Undo': '復原', + 'Redo': '重做', + 'Rows:': '行數', + 'Cols:': '列數', + 'Insert a table': '插入表格', + 'Insert a horizontal rule': '插入分隔線', + 'Code': '原始碼', + 'Width (optional):': '寬度(選填)', + 'Height (optional):': '高度(選填)', + 'Insert an image': '插入圖片', + 'E-mail:': 'Email', + 'Insert an email': '插入Email', + 'URL:': '網址', + 'Insert a link': '插入超鏈結', + 'Unlink': '取消超鏈結', + 'More': '更多', + 'Insert an emoticon': '插入表情符號', + 'Video URL:': '影片網址', + 'Insert': '插入', + 'Insert a YouTube video': '插入 YouTube 影片', + 'Insert current date': '插入目前日期', + 'Insert current time': '插入目前時間', + 'Print': '列印', + 'View source': '查看原始碼', + 'Description (optional):': '描述(選填)', + 'Enter the image URL:': '輸入圖片網址', + 'Enter the e-mail address:': '輸入 Email', + 'Enter the displayed text:': '輸入顯示文字', + 'Enter URL:': '輸入網址', + 'Enter the YouTube video URL or ID:': '輸入 YouTube 網址或影片编號', + 'Insert a Quote': '插入引用', + 'Invalid YouTube video': '無效的YouTube影片', + + dateFormat: 'year-month-day' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/uk.js b/Html/js/SCEditor/languages/uk.js new file mode 100644 index 0000000..829ef23 --- /dev/null +++ b/Html/js/SCEditor/languages/uk.js @@ -0,0 +1,57 @@ +(function ($) { + 'use strict'; + + $.sceditor.locale['uk'] = { + 'Bold': 'Жирний', + 'Italic': 'Курсив', + 'Underline': 'Підкреслений', + 'Strikethrough': 'Закреслений', + 'Subscript': 'Нижній індекс', + 'Superscript': 'Верхній індекс', + 'Align left': 'Вирівняти по лівому краю', + 'Center': 'Вирівняти по центру', + 'Align right': 'Вирівняти по правому краю', + 'Justify': 'Вирівняти по ширині', + 'Font Name': 'Шрифт', + 'Font Size': 'Розмір шрифту', + 'Font Color': 'Колір шрифту', + 'Remove Formatting': 'Видалити форматування', + 'Cut': 'Вирізати', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Ваш браузер не дозволяє виконати цю команду. Будь ласка, використовуйте комбінацію клавіш Ctrl/Cmd-X', + 'Copy': 'Копіювати', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Ваш браузер не дозволяє виконати цю команду. Будь ласка, використовуйте комбінацію клавіш Ctrl/Cmd-C', + 'Paste': 'Вставити', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Ваш браузер не дозволяє виконати цю команду. Будь ласка, використовуйте комбінацію клавіш Ctrl/Cmd-V', + 'Paste your text inside the following box:': 'Вставте текст у наступне вікно:', + 'Paste Text': 'Вставити текст', + 'Bullet list': 'Маркований список', + 'Numbered list': 'Нумерований список', + 'Undo': 'Відмінити', + 'Redo': 'Повторити', + 'Rows:': 'Рядків:', + 'Cols:': 'Cтовпців:', + 'Insert a table': 'Додати таблицю', + 'Insert a horizontal rule': 'Додати горизонтальну лінію', + 'Code': 'Код', + 'Insert a Quote': 'Додати цитату', + 'Width (optional):': 'Ширина (необов\'язково):', + 'Height (optional):': 'Висота (необов\'язково):', + 'Insert an image': 'Додати зображення', + 'E-mail:': 'E-mail:', + 'Insert an email': 'Додати E-mail', + 'URL:': 'URL:', + 'Insert a link': 'Додати посилання', + 'Unlink': 'Видалити посилання', + 'More': 'Більше', + 'Insert an emoticon': 'Додати смайлик', + 'Video URL:': 'URL відео:', + 'Insert': 'Вставити', + 'Insert a YouTube video': 'Додати відео з YouTube', + 'Insert current date': 'Додати дату', + 'Insert current time': 'Додати час', + 'Print': 'Надрукувати', + 'View source': 'Показати код', + 'Maximize': 'Розгорнути редактор', + dateFormat: 'day.month.year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/languages/vi.js b/Html/js/SCEditor/languages/vi.js new file mode 100644 index 0000000..d554202 --- /dev/null +++ b/Html/js/SCEditor/languages/vi.js @@ -0,0 +1,68 @@ +/** + * @author Chien + * @license [MIT](http://www.opensource.org/licenses/mit-license.php) + */ +(function ($) { + 'use strict'; + + $.sceditor.locale['vi'] = { + 'Bold': 'Đậm', + 'Italic': 'Nghiêng', + 'Underline': 'Gạch chân', + 'Strikethrough': 'Gạch giữa', + 'Subscript': 'Hệ số', + 'Superscript': 'Mũ', + 'Align left': 'Căn trái', + 'Center': 'Căn giữa', + 'Align right': 'Căn phải', + 'Justify': 'Căn đều', + 'Font Name': 'Phông chữ', + 'Font Size': 'Cỡ chữ', + 'Font Color': 'Màu chữ', + 'Remove Formatting': 'Xóa định dạng', + 'Cut': 'Cắt', + 'Your browser does not allow the cut command. Please use the keyboard shortcut Ctrl/Cmd-X': 'Trình duyệt không cho phép sử dụng lệnh Cut. Vui lòng sử dụng phím tắt Ctrl/Cmd-X', + 'Copy': 'Sao chép', + 'Your browser does not allow the copy command. Please use the keyboard shortcut Ctrl/Cmd-C': 'Trình duyệt không cho phép sử dụng lệnh Copy. Vui lòng sử dụng phím tắt Ctrl/Cmd-C', + 'Paste': 'Chép vào', + 'Your browser does not allow the paste command. Please use the keyboard shortcut Ctrl/Cmd-V': 'Trình duyệt không cho phép sử dụng lệnh Paste. Vui lòng sử dụng phím tắt Ctrl/Cmd-V', + 'Paste your text inside the following box:': 'Chép nội dung text vào khung sau', + 'Paste Text': 'Chép nội dung text', + 'Bullet list': 'Danh sách kiểu nốt', + 'Numbered list': 'Danh sách kiểu số', + 'Undo': 'Hủy bỏ', + 'Redo': 'Trở lại bước trước', + 'Rows:': 'Số dòng', + 'Cols:': 'Số cột', + 'Insert a table': 'Thêm bảng', + 'Insert a horizontal rule': 'Thêm thước ngang', + 'Code': 'Mã code', + 'Width (optional):': 'Dài (không bắt buộc)', + 'Height (optional):': 'Rộng (không bắt buộc)', + 'Insert an image': 'Chèn hình ảnh', + 'E-mail:': 'E-mail', + 'Insert an email': 'Chèn email', + 'URL:': 'Liên kết', + 'Insert a link': 'Chèn liên kết', + 'Unlink': 'Bỏ liên kết', + 'More': 'Xem thêm', + 'Insert an emoticon': 'Chèn biểu tượng', + 'Video URL:': 'Đường dẫn của Video', + 'Insert': 'Thêm vào', + 'Insert a YouTube video': 'Chèn Youtube', + 'Insert current date': 'Chèn ngày hiện tại', + 'Insert current time': 'Chèn thời gian hiện tại', + 'Print': 'In ấn', + 'View source': 'Xem mã nguồn', + 'Description (optional):': 'Mô tả (không bắt buộc)', + 'Enter the image URL:': 'Nhập vào đường dẫn của hình ảnh', + 'Enter the e-mail address:': 'Nhập vào địa chỉ email', + 'Enter the displayed text:': 'Nhập vào nội dung hiển thị', + 'Enter URL:': 'Nhập vào liên kết', + 'Enter the YouTube video URL or ID:': 'Nhập vào liên kết của video hoặc ID trên Youtube', + 'Insert a Quote': 'Chèn trích dẫn', + 'Invalid YouTube video': 'Video Youtube không chính xác', + + dateFormat: 'day/month/year' + }; +})(jQuery); diff --git a/Html/js/SCEditor/plugins/bbcode.js b/Html/js/SCEditor/plugins/bbcode.js new file mode 100644 index 0000000..ef3d8dd --- /dev/null +++ b/Html/js/SCEditor/plugins/bbcode.js @@ -0,0 +1,2 @@ +/* SCEditor v1.5.1 | (C) 2016, Sam Clarke | sceditor.com/license */ +!function(a,b,c){"use strict";var d=a.sceditor,e=d.plugins,f=d.escapeEntities,g=d.escapeUriScheme,h=d.ie,i=h&&h<11,j=d.command.get,k={bold:{txtExec:["[b]","[/b]"]},italic:{txtExec:["[i]","[/i]"]},underline:{txtExec:["[u]","[/u]"]},strike:{txtExec:["[s]","[/s]"]},subscript:{txtExec:["[sub]","[/sub]"]},superscript:{txtExec:["[sup]","[/sup]"]},left:{txtExec:["[left]","[/left]"]},center:{txtExec:["[center]","[/center]"]},right:{txtExec:["[right]","[/right]"]},justify:{txtExec:["[justify]","[/justify]"]},font:{txtExec:function(a){var b=this;j("font")._dropDown(b,a,function(a){b.insertText("[font="+a+"]","[/font]")})}},size:{txtExec:function(a){var b=this;j("size")._dropDown(b,a,function(a){b.insertText("[size="+a+"]","[/size]")})}},color:{txtExec:function(a){var b=this;j("color")._dropDown(b,a,function(a){b.insertText("[color="+a+"]","[/color]")})}},bulletlist:{txtExec:function(b,c){var d="";a.each(c.split(/\r?\n/),function(){d+=(d?"\n":"")+"[li]"+this+"[/li]"}),this.insertText("[ul]\n"+d+"\n[/ul]")}},orderedlist:{txtExec:function(b,c){var d="";a.each(c.split(/\r?\n/),function(){d+=(d?"\n":"")+"[li]"+this+"[/li]"}),e.bbcode.bbcode.get(""),this.insertText("[ol]\n"+d+"\n[/ol]")}},table:{txtExec:["[table][tr][td]","[/td][/tr][/table]"]},horizontalrule:{txtExec:["[hr]"]},code:{txtExec:["[code]","[/code]"]},image:{txtExec:function(a,b){var c=this,d=prompt(c._("Enter the image URL:"),b);d&&c.insertText("[img]"+d+"[/img]")}},email:{txtExec:function(a,b){var c=this,d=b&&b.indexOf("@")>-1?null:b,e=prompt(c._("Enter the e-mail address:"),d?"":b),f=prompt(c._("Enter the displayed text:"),d||e)||e;e&&c.insertText("[email="+e+"]"+f+"[/email]")}},link:{txtExec:function(b,c){var d=this,e=/^[a-z]+:\/\//i.test(a.trim(c))?null:c,f=prompt(d._("Enter URL:"),e?"http://":a.trim(c)),g=prompt(d._("Enter the displayed text:"),e||f)||f;f&&d.insertText("[url="+f+"]"+g+"[/url]")}},quote:{txtExec:["[quote]","[/quote]"]},youtube:{txtExec:function(a){var b=this;j("youtube")._dropDown(b,a,function(a){b.insertText("[youtube]"+a+"[/youtube]")})}},rtl:{txtExec:["[rtl]","[/rtl]"]},ltr:{txtExec:["[ltr]","[/ltr]"]}},l=function(a){return a?a.replace(/\\(.)/g,"$1").replace(/^(["'])(.*?)\1$/,"$2"):a},m=function(){var a,b=arguments;return b[0].replace(/\{(\d+)\}/g,function(c,d){return b[d-0+1]!==a?b[d-0+1]:"{"+d+"}"})},n={OPEN:"open",CONTENT:"content",NEWLINE:"newline",CLOSE:"close"},o=function(a,b,c,d,e,f){var g=this;g.type=a,g.name=b,g.val=c,g.attrs=d||{},g.children=e||[],g.closing=f||null};o.prototype={clone:function(a){var b=this;return new o(b.type,b.name,b.val,b.attrs,a?b.children:[],b.closing?b.closing.clone():null)},splitAt:function(b){var c,d=this,e=0,f=d.children.length;if("number"!=typeof b&&(b=a.inArray(b,d.children)),b<0||b>f)return null;for(;f--;)f>=b?e++:f=0;return c=d.clone(),c.children=d.children.splice(b,e),c}};var p=function(b){if(!(this instanceof p))return new p(b);var d,g,j,k,m,q,r,s,t,u,v,w,x,y,z,A=this;d=function(){A.bbcodes=e.bbcode.bbcodes,A.opts=a.extend({},p.defaults,b)},A.tokenize=function(a){var b,c,d,e=[],f=[{type:n.CLOSE,regex:/^\[\/[^\[\]]+\]/},{type:n.OPEN,regex:/^\[[^\[\]]+\]/},{type:n.NEWLINE,regex:/^(\r\n|\r|\n)/},{type:n.CONTENT,regex:/^([^\[\r\n]+|\[)/}];f.reverse();a:for(;a.length;){for(d=f.length;d--;)if(c=f[d].type,(b=a.match(f[d].regex))&&b[0]){e.push(g(c,b[0])),a=a.substr(b[0].length);continue a}a.length&&e.push(g(n.CONTENT,a)),a=""}return e},g=function(b,c){var d,f,g,h=/\[([^\]\s=]+)(?:([^\]]+))?\]/,i=/\[\/([^\[\]]+)\]/;return b===n.OPEN&&(d=c.match(h))&&(g=y(d[1]),d[2]&&(d[2]=a.trim(d[2]))&&(f=j(d[2]))),b===n.CLOSE&&(d=c.match(i))&&(g=y(d[1])),b===n.NEWLINE&&(g="#newline"),g&&(b!==n.OPEN&&b!==n.CLOSE||e.bbcode.bbcodes[g])||(b=n.CONTENT,g="#"),new o(b,g,c,f)},j=function(a){var b,c=/([^\s=]+)=(?:(?:(["'])((?:\\\2|[^\2])*?)\2)|((?:.(?!\s\S+=))*.))/g,d={};if("="===a.charAt(0)&&a.indexOf("=",1)<0)d.defaultattr=l(a.substr(1));else for("="===a.charAt(0)&&(a="defaultattr"+a);b=c.exec(a);)d[y(b[1])]=l(b[3])||b[4];return d},A.parse=function(a,b){var c=k(A.tokenize(a)),d=A.opts;return d.fixInvalidChildren&&t(c),d.removeEmptyTags&&s(c),d.fixInvalidNesting&&q(c),m(c,null,b),d.removeEmptyTags&&s(c),c},w=function(a,b,c){for(var d=c.length;d--;)if(c[d].type===b&&c[d].name===a)return!0;return!1},r=function(b,c){var d=b?A.bbcodes[b.name]:{},e=d.allowedChildren;return!A.opts.fixInvalidChildren||!e||a.inArray(c.name||"#",e)>-1},k=function(b){for(var c,d,e,f,g,h,i,j=[],k=[],l=[],m=function(){return z(l)},o=function(a){m()?m().children.push(a):k.push(a)},p=function(b){return m()&&(d=A.bbcodes[m().name])&&d.closedBy&&a.inArray(b,d.closedBy)>-1};c=b.shift();){switch(i=b[0],c.type){case n.OPEN:p(c.name)&&l.pop(),o(c),d=A.bbcodes[c.name],d&&d.isSelfClosing||!d.closedBy&&!w(c.name,n.CLOSE,b)?d&&d.isSelfClosing||(c.type=n.CONTENT):l.push(c);break;case n.CLOSE:if(m()&&c.name!==m().name&&p("/"+c.name)&&l.pop(),m()&&c.name===m().name)m().closing=c,l.pop();else if(w(c.name,n.OPEN,l)){for(;e=l.pop();){if(e.name===c.name){e.closing=c;break}f=e.clone(),j.length>1&&f.children.push(z(j)),j.push(f)}for(o(z(j)),g=j.length;g--;)l.push(j[g]);j.length=0}else c.type=n.CONTENT,o(c);break;case n.NEWLINE:m()&&i&&p((i.type===n.CLOSE?"/":"")+i.name)&&(i.type===n.CLOSE&&i.name===m().name||(d=A.bbcodes[m().name],d&&d.breakAfter?l.pop():d&&d.isInline===!1&&A.opts.breakAfterBlock&&d.breakAfter!==!1&&l.pop())),o(c);break;default:o(c)}h=c}return k},m=function(a,b,c){var d,e,f,g,h,i,j,k,l=a.length;b&&(g=A.bbcodes[b.name]);for(var o=l;o--;)if(d=a[o])if(d.type===n.NEWLINE){if(e=o>0?a[o-1]:null,f=o1?c[c.length-2].children:e,i=a.inArray(h,j),i>-1))return k.children.splice(a.inArray(f,k.children),1),void j.splice(i+1,0,f,k);c.push(f),q(f.children,c,d||l(f),e),c.pop(f)}},t=function(a,b){for(var c,d,e=a.length;e--;)(c=a[e])&&(r(b,c)||(c.name=null,c.type=n.CONTENT,r(b,c)?(d=[e+1,0].concat(c.children),c.closing&&(c.closing.name=null,c.closing.type=n.CONTENT,d.push(c.closing)),e+=d.length-1,Array.prototype.splice.apply(a,d)):b.children.splice(e,1)),c.type===n.OPEN&&t(c.children,c))},s=function(b){for(var c,d,e=function(a){for(var b=a.length;b--;){var c=a[b].type;if(c===n.OPEN||c===n.CLOSE)return!1;if(c===n.CONTENT&&/\S|\u00A0/.test(a[b].val))return!1}return!0},f=b.length;f--;)(c=b[f])&&c.type===n.OPEN&&(d=A.bbcodes[c.name],s(c.children),e(c.children)&&d&&!d.isSelfClosing&&!d.allowsEmpty&&b.splice.apply(b,a.merge([f,1],c.children)))},A.toHTML=function(a,b){return u(A.parse(a,b),!0)},u=function(b,d){var g,j,k,l,m,o,p,q,r,s=[];for(q=function(a){return(!a||(a.isHtmlInline!==g?a.isHtmlInline:a.isInline))!==!1};b.length>0;)if(j=b.shift()){if(j.type===n.OPEN)r=j.children[j.children.length-1]||{},k=A.bbcodes[j.name],o=d&&q(k),l=u(j.children,!1),k&&k.html?(q(k)||!q(A.bbcodes[r.name])||k.isPreFormatted||k.skipLastLineBreak||i||(l+="
    "),a.isFunction(k.html)?m=k.html.call(A,j,j.attrs,l):(j.attrs[0]=l,m=e.bbcode.formatBBCodeString(k.html,j.attrs))):m=j.val+l+(j.closing?j.closing.val:"");else{if(j.type===n.NEWLINE){if(!d){s.push("
    ");continue}p||(s.push("

    "),(h<8||c.documentMode&&c.documentMode<8)&&s.push(" ")),i||s.push("
    "),b.length||s.push("
    "),s.push("
    \n"),p=!1;continue}o=d,m=f(j.val,!0)}o&&!p?(s.push("
    "),p=!0):!o&&p&&(s.push("
    \n"),p=!1),s.push(m)}return p&&s.push("
    \n"),s.join("")},A.toBBCode=function(a,b){return v(A.parse(a,b))},v=function(a){for(var b,c,d,e,f,g,h,i,j,k,l=[];a.length>0;)if(b=a.shift())if(d=A.bbcodes[b.name],e=!(!d||d.isInline!==!1),f=d&&d.isSelfClosing,h=e&&A.opts.breakBeforeBlock&&d.breakBefore!==!1||d&&d.breakBefore,i=e&&!f&&A.opts.breakStartBlock&&d.breakStart!==!1||d&&d.breakStart,j=e&&A.opts.breakEndBlock&&d.breakEnd!==!1||d&&d.breakEnd,k=e&&A.opts.breakAfterBlock&&d.breakAfter!==!1||d&&d.breakAfter,g=(d?d.quoteType:null)||A.opts.quoteType||p.QuoteType.auto,d||b.type!==n.OPEN)if(b.type===n.OPEN){if(h&&l.push("\n"),l.push("["+b.name),b.attrs){b.attrs.defaultattr&&(l.push("=",x(b.attrs.defaultattr,g,"defaultattr")),delete b.attrs.defaultattr);for(c in b.attrs)b.attrs.hasOwnProperty(c)&&l.push(" ",c,"=",x(b.attrs[c],g,c))}l.push("]"),i&&l.push("\n"),b.children&&l.push(v(b.children)),f||d.excludeClosing||(j&&l.push("\n"),l.push("[/"+b.name+"]")),k&&l.push("\n"),b.closing&&f&&l.push(b.closing.val)}else l.push(b.val);else l.push(b.val),b.children&&l.push(v(b.children)),b.closing&&l.push(b.closing.val);return l.join("")},x=function(b,c,d){var e=p.QuoteType,f=/\s|=/.test(b);return a.isFunction(c)?c(b,d):c===e.never||c===e.auto&&!f?b:'"'+b.replace("\\","\\\\").replace('"','\\"')+'"'},z=function(a){return a.length?a[a.length-1]:null},y=function(a){return a.toLowerCase()},d()};p.QuoteType={always:1,never:2,auto:3},p.defaults={breakBeforeBlock:!1,breakStartBlock:!1,breakEndBlock:!1,breakAfterBlock:!0,removeEmptyTags:!0,fixInvalidNesting:!0,fixInvalidChildren:!0,quoteType:p.QuoteType.auto},a.sceditorBBCodePlugin=e.bbcode=function(){var b,f,g,h,j=this;j.bbcodes=e.bbcode.bbcodes,j.stripQuotes=l;var n={},o={},q={ul:["li","ol","ul"],ol:["li","ol","ul"],table:["tr"],tr:["td","th"],code:["br","p","div"]};j.init=function(){j.opts=this.opts,b(),this.commands=a.extend(!0,{},k,this.commands),this.toBBCode=j.signalToSource,this.fromBBCode=j.signalToWysiwyg},b=function(){a.each(j.bbcodes,function(b){var c,d=j.bbcodes[b].tags,e=j.bbcodes[b].styles;d&&a.each(d,function(a,d){c=j.bbcodes[b].isInline===!1,n[a]=n[a]||{},n[a][c]=n[a][c]||{},n[a][c][b]=d}),e&&a.each(e,function(a,d){c=j.bbcodes[b].isInline===!1,o[c]=o[c]||{},o[c][a]=o[c][a]||{},o[c][a][b]=d})})},f=function(b,c,e){var f,g,h=d.dom.getStyle;return e=!!e,o[e]?(a.each(o[e],function(d,e){f=h(b[0],d),f&&h(b.parent()[0],d)!==f&&a.each(e,function(d,e){(!e||a.inArray(f.toString(),e)>-1)&&(g=j.bbcodes[d].format,c=a.isFunction(g)?g.call(j,b,c):m(g,c))})}),c):c},g=function(b,c,e){var f,g,h=b[0],k=h.nodeName.toLowerCase();e=!!e,n[k]&&n[k][e]&&a.each(n[k][e],function(d,e){e&&(f=!1,a.each(e,function(c,d){if(b.attr(c)&&!(d&&a.inArray(b.attr(c),d)<0))return f=!0,!1}),!f)||(g=j.bbcodes[d].format,c=a.isFunction(g)?g.call(j,b,c):m(g,c))});var l=d.dom.isInline;if(e&&(!l(h,!0)||"br"===k)){for(var o,p,q,r=h.previousSibling;r&&1===r.nodeType&&!a(r).is("br")&&l(r,!0)&&!r.firstChild;)r=r.previousSibling;do p=h.parentNode,q=p.lastChild,o=q===h,h=p;while(p&&o&&l(p,!0));(!o||"li"===k||"br"===k&&i)&&(c+="\n"),"br"!==k&&r&&!a(r).is("br")&&l(r,!0)&&(c="\n"+c)}return c},j.signalToSource=function(b,e){var f,g,h=new p(j.opts.parserOptions);return e||("string"==typeof b?(f=a("
    ").css("visibility","hidden").appendTo(c.body).html(b),e=f):e=a(b)),e&&e.jquery?(d.dom.removeWhiteSpace(e[0]),a(".sceditor-ignore",e).remove(),g=j.elementToBbcode(e),f&&f.remove(),g=h.toBBCode(g,!0),j.opts.bbcodeTrim&&(g=a.trim(g)),g):""},j.elementToBbcode=function(b){var c=function(b,e){var h="";return d.dom.traverse(b,function(b){var d=a(b),j="",k=b.nodeType,l=b.nodeName.toLowerCase(),m=q[l],n=b.firstChild,o=!0;if("object"==typeof e&&(o=a.inArray(l,e)>-1,d.is("img")&&d.data("sceditor-emoticon")&&(o=!0),o||(m=e)),3===k||1===k)if(1===k){if(d.hasClass("sceditor-nlf")&&(!n||!i&&1===b.childNodes.length&&/br/i.test(n.nodeName)))return;"iframe"!==l&&(j=c(b,m)),o?("code"!==l&&(j=f(d,j),j=g(d,j),j=f(d,j,!0)),h+=g(d,j,!0)):h+=j}else h+=b.nodeValue},!1,!0),h};return c(b[0])},j.signalToWysiwyg=function(b,c){var d=new p(j.opts.parserOptions),e=d.toHTML(j.opts.bbcodeTrim?a.trim(b):b);return c?h(e):e},h=function(b){var e,f,g,h=a("
    ").hide().appendTo(c.body),j=h[0];return g=function(b,e){if(!d.dom.hasStyling(b)){if(i||1!==b.childNodes.length||!a(b.firstChild).is("br"))for(;f=b.firstChild;)j.insertBefore(f,b);if(e){var g=j.lastChild;b!==g&&a(g).is("div")&&b.nextSibling===g&&j.insertBefore(c.createElement("br"),b)}j.removeChild(b)}},j.innerHTML=b.replace(/<\/div>\n/g,"
    "),(e=j.firstChild)&&a(e).is("div")&&g(e,!0),(e=j.lastChild)&&a(e).is("div")&&g(e),j=j.innerHTML,h.remove(),j}},e.bbcode.formatBBCodeString=function(a,b){return a.replace(/\{([^}]+)\}/g,function(a,c){var d,e=!0;return"!"===c.charAt(0)&&(e=!1,c=c.substring(1)),"0"===c&&(e=!1),b[c]===d?a:e?f(b[c],!0):b[c]})};var q=function(a){return a=parseInt(a,10),isNaN(a)?"00":(a=Math.max(0,Math.min(a,255)).toString(16),a.length<2?"0"+a:a)},r=function(a){var b;return a=a||"#000",(b=a.match(/rgb\((\d{1,3}),\s*?(\d{1,3}),\s*?(\d{1,3})\)/i))?"#"+q(b[1])+q(b[2]-0)+q(b[3]-0):(b=a.match(/#([0-f])([0-f])([0-f])\s*?$/i))?"#"+b[1]+b[1]+b[2]+b[2]+b[3]+b[3]:a},s={b:{tags:{b:null,strong:null},styles:{"font-weight":["bold","bolder","401","700","800","900"]},format:"[b]{0}[/b]",html:"{0}"},i:{tags:{i:null,em:null},styles:{"font-style":["italic","oblique"]},format:"[i]{0}[/i]",html:"{0}"},u:{tags:{u:null},styles:{"text-decoration":["underline"]},format:"[u]{0}[/u]",html:"{0}"},s:{tags:{s:null,strike:null},styles:{"text-decoration":["line-through"]},format:"[s]{0}[/s]",html:"{0}"},sub:{tags:{sub:null},format:"[sub]{0}[/sub]",html:"{0}"},sup:{tags:{sup:null},format:"[sup]{0}[/sup]",html:"{0}"},font:{tags:{font:{face:null}},styles:{"font-family":null},quoteType:p.QuoteType.never,format:function(a,b){var c;return a.is("font")&&(c=a.attr("face"))||(c=a.css("font-family")),"[font="+l(c)+"]"+b+"[/font]"},html:'{0}'},size:{tags:{font:{size:null}},styles:{"font-size":null},format:function(a,b){var c=a.attr("size"),d=2;return c||(c=a.css("fontSize")),c.indexOf("px")>-1?(c=c.replace("px","")-0,c<12&&(d=1),c>15&&(d=3),c>17&&(d=4),c>23&&(d=5),c>31&&(d=6),c>47&&(d=7)):d=c,"[size="+d+"]"+b+"[/size]"},html:'{!0}'},color:{tags:{font:{color:null}},styles:{color:null},quoteType:p.QuoteType.never,format:function(a,b){var c;return a.is("font")&&(c=a.attr("color"))||(c=a[0].style.color||a.css("color")),"[color="+r(c)+"]"+b+"[/color]"},html:function(a,b,c){return''+c+""}},ul:{tags:{ul:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[ul]{0}[/ul]",html:"
      {0}
    "},list:{breakStart:!0,isInline:!1,skipLastLineBreak:!0,html:"
      {0}
    "},ol:{tags:{ol:null},breakStart:!0,isInline:!1,skipLastLineBreak:!0,format:"[ol]{0}[/ol]",html:"
      {0}
    "},li:{tags:{li:null},isInline:!1,closedBy:["/ul","/ol","/list","*","li"],format:"[li]{0}[/li]",html:"
  • {0}
  • "},"*":{isInline:!1,closedBy:["/ul","/ol","/list","*","li"],html:"
  • {0}
  • "},table:{tags:{table:null},isInline:!1,isHtmlInline:!0,skipLastLineBreak:!0,format:"[table]{0}[/table]",html:"{0}
    "},tr:{tags:{tr:null},isInline:!1,skipLastLineBreak:!0,format:"[tr]{0}[/tr]",html:"{0}"},th:{tags:{th:null},allowsEmpty:!0,isInline:!1,format:"[th]{0}[/th]",html:"{0}"},td:{tags:{td:null},allowsEmpty:!0,isInline:!1,format:"[td]{0}[/td]",html:"{0}"},emoticon:{allowsEmpty:!0,tags:{img:{src:null,"data-sceditor-emoticon":null}},format:function(a,b){return a.data("sceditor-emoticon")+b},html:"{0}"},hr:{tags:{hr:null},allowsEmpty:!0,isSelfClosing:!0,isInline:!1,format:"[hr]{0}",html:"
    "},img:{allowsEmpty:!0,tags:{img:{src:null}},allowedChildren:["#"],quoteType:p.QuoteType.never,format:function(a,b){var c,d,e="",f=a[0],g=function(a){return f.style?f.style[a]:null};return a.attr("data-sceditor-emoticon")?b:(c=a.attr("width")||g("width"),d=a.attr("height")||g("height"),(f.complete&&(c||d)||c&&d)&&(e="="+a.width()+"x"+a.height()),"[img"+e+"]"+a.attr("src")+"[/img]")},html:function(a,b,c){var d,e,h,i,j="";return e=b.width,h=b.height,b.defaultattr&&(i=b.defaultattr.split(/x/i),e=i[0],h=2===i.length?i[1]:i[0]),e!==d&&(j+=' width="'+f(e,!0)+'"'),h!==d&&(j+=' height="'+f(h,!0)+'"'),"'}},url:{allowsEmpty:!0,tags:{a:{href:null}},quoteType:p.QuoteType.never,format:function(a,b){var c=a.attr("href");return"mailto:"===c.substr(0,7)?'[email="'+c.substr(7)+'"]'+b+"[/email]":"[url="+c+"]"+b+"[/url]"},html:function(a,b,c){return b.defaultattr=f(b.defaultattr,!0)||c,''+c+""}},email:{quoteType:p.QuoteType.never,html:function(a,b,c){return''+c+""}},quote:{tags:{blockquote:null},isInline:!1,quoteType:p.QuoteType.never,format:function(b,c){var d="",e=a(b),f=e.children("cite").first();return(1===f.length||e.data("author"))&&(d=f.text()||e.data("author"),e.data("author",d),f.remove(),c=this.elementToBbcode(a(b)),d="="+d.replace(/(^\s+|\s+$)/g,""),e.prepend(f)),"[quote"+d+"]"+c+"[/quote]"},html:function(a,b,c){return b.defaultattr&&(c=""+f(b.defaultattr)+""+c),"
    "+c+"
    "}},code:{tags:{code:null},isInline:!1,allowedChildren:["#","#newline"],format:"[code]{0}[/code]",html:"{0}"},left:{styles:{"text-align":["left","-webkit-left","-moz-left","-khtml-left"]},isInline:!1,format:"[left]{0}[/left]",html:'
    {0}
    '},center:{styles:{"text-align":["center","-webkit-center","-moz-center","-khtml-center"]},isInline:!1,format:"[center]{0}[/center]",html:'
    {0}
    '},right:{styles:{"text-align":["right","-webkit-right","-moz-right","-khtml-right"]},isInline:!1,format:"[right]{0}[/right]",html:'
    {0}
    '},justify:{styles:{"text-align":["justify","-webkit-justify","-moz-justify","-khtml-justify"]},isInline:!1,format:"[justify]{0}[/justify]",html:'
    {0}
    '},youtube:{allowsEmpty:!0,tags:{iframe:{"data-youtube-id":null}},format:function(a,b){return a=a.attr("data-youtube-id"),a?"[youtube]"+a+"[/youtube]":b},html:''},rtl:{styles:{direction:["rtl"]},format:"[rtl]{0}[/rtl]",html:'
    {0}
    '},ltr:{styles:{direction:["ltr"]},format:"[ltr]{0}[/ltr]",html:'
    {0}
    '},ignore:{}};e.bbcode.bbcode={get:function(a){return s[a]||null},set:function(b,c){return!(!b||!c)&&(c=a.extend(s[b]||{},c),c.remove=function(){delete s[b]},s[b]=c,this)},rename:function(a,b){return a in s&&(s[b]=s[a],delete s[a],this)},remove:function(a){return a in s&&delete s[a],this}},a.fn.sceditorBBCodePlugin=function(b){return b=b||{},a.isPlainObject(b)&&(b.plugins=(b.plugins||"")+"bbcode"),this.sceditor(b)},e.bbcode.normaliseColour=r,e.bbcode.formatString=m,e.bbcode.stripQuotes=l,e.bbcode.bbcodes=s,d.BBCodeParser=p}(jQuery,window,document); \ No newline at end of file diff --git a/Html/js/SCEditor/plugins/format.js b/Html/js/SCEditor/plugins/format.js new file mode 100644 index 0000000..05cf5d1 --- /dev/null +++ b/Html/js/SCEditor/plugins/format.js @@ -0,0 +1,2 @@ +/* SCEditor v1.5.1 | (C) 2016, Sam Clarke | sceditor.com/license */ +!function(a){"use strict";a.sceditor.plugins.format=function(){var b,c,d=this,e={p:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",address:"Address",pre:"Preformatted Text"};d.init=function(){var b=this.opts,d=b.paragraphformat;b.plugins&&b.plugins.indexOf("bbcode")>-1||(d&&(d.tags&&(e=d.tags),d.excludeTags&&a.each(d.excludeTags,function(a,b){delete e[b]})),this.commands.format||(this.commands.format={exec:c,txtExec:c,tooltip:"Format Paragraph"}),b.toolbar===a.sceditor.defaultOptions.toolbar&&(b.toolbar=b.toolbar.replace(",color,",",color,format,")))},b=function(a,b){a.sourceMode()?a.insert("<"+b+">",""):a.execCommand("formatblock","<"+b+">")},c=function(c){var d=this,f=a("
    ");a.each(e,function(c,e){a(''+(e.name||e)+"").click(function(){return d.closeDropDown(!0),e.exec?e.exec(d):b(d,c),!1}).appendTo(f)}),d.createDropDown(c,"format",f)}}}(jQuery); \ No newline at end of file diff --git a/Html/js/SCEditor/plugins/undo.js b/Html/js/SCEditor/plugins/undo.js new file mode 100644 index 0000000..aa8632b --- /dev/null +++ b/Html/js/SCEditor/plugins/undo.js @@ -0,0 +1,2 @@ +/* SCEditor v1.5.1 | (C) 2016, Sam Clarke | sceditor.com/license */ +!function(a){"use strict";a.sceditor.plugins.undo=function(){var a,b,c=this,d=0,e=50,f=[],g=[],h=!1,i=function(c){h=!0,b=c.value,a.sourceMode(c.sourceMode),a.val(c.value,!1),a.focus(),c.sourceMode?a.sourceEditorCaret(c.caret):a.getRangeHelper().restoreRange(),h=!1},j=function(a,b){var c,d,e,f,g=a.length,h=b.length,i=Math.max(g,h);for(c=0;c=0&&a.charAt(d-e)===b.charAt(d-f);d--);return d-c+1};c.init=function(){a=this,e=a.undoLimit||e,a.addShortcut("ctrl+z",c.undo),a.addShortcut("ctrl+shift+z",c.redo),a.addShortcut("ctrl+y",c.redo)},c.undo=function(){var b=g.pop(),c=a.val(null,!1);return b&&!f.length&&c===b.value&&(b=g.pop()),b&&(f.length||f.push({caret:a.sourceEditorCaret(),sourceMode:a.sourceMode(),value:c}),f.push(b),i(b)),!1},c.redo=function(){var a=f.pop();return g.length||(g.push(a),a=f.pop()),a&&(g.push(a),i(a)),!1},c.signalReady=function(){var c=a.val(null,!1);b=c,g.push({caret:this.sourceEditorCaret(),sourceMode:this.sourceMode(),value:c})},c.signalValuechangedEvent=function(c){var i=c.rawValue;e>0&&g.length>e&&g.shift(),!h&&b&&b!==i&&(f.length=0,d+=j(b,i),d<20||d<50&&!/\s$/g.test(c.rawValue)||(g.push({caret:a.sourceEditorCaret(),sourceMode:a.sourceMode(),value:i}),d=0,b=i))}}}(jQuery); \ No newline at end of file diff --git a/Html/js/SCEditor/plugins/xhtml.js b/Html/js/SCEditor/plugins/xhtml.js new file mode 100644 index 0000000..f81d76c --- /dev/null +++ b/Html/js/SCEditor/plugins/xhtml.js @@ -0,0 +1,2 @@ +/* SCEditor v1.5.1 | (C) 2016, Sam Clarke | sceditor.com/license */ +!function(a){"use strict";var b=a.sceditor,c=b.plugins,d=b.dom,e={bold:{txtExec:["",""]},italic:{txtExec:["",""]},underline:{txtExec:['',""]},strike:{txtExec:['',""]},subscript:{txtExec:["",""]},superscript:{txtExec:["",""]},left:{txtExec:['
    ',"
    "]},center:{txtExec:['
    ',"
    "]},right:{txtExec:['
    ',"
    "]},justify:{txtExec:['
    ',"
    "]},font:{txtExec:function(a){var c=this;b.command.get("font")._dropDown(c,a,function(a){c.insertText('',"")})}},size:{txtExec:function(a){var c=this;b.command.get("size")._dropDown(c,a,function(a){c.insertText('',"")})}},color:{txtExec:function(a){var c=this;b.command.get("color")._dropDown(c,a,function(a){c.insertText('',"")})}},bulletlist:{txtExec:["
    • ","
    "]},orderedlist:{txtExec:["
    1. ","
    "]},table:{txtExec:["
    ","
    "]},horizontalrule:{txtExec:["
    "]},code:{txtExec:["",""]},image:{txtExec:function(a,b){var c=prompt(this._("Enter the image URL:"),b);c&&this.insertText('')}},email:{txtExec:function(a,b){var c,d,e=b&&b.indexOf("@")>-1?null:b;c=prompt(this._("Enter the e-mail address:"),e?"":b),d=prompt(this._("Enter the displayed text:"),e||c)||c,c&&this.insertText(''+d+"")}},link:{txtExec:function(a,b){var c=b&&b.indexOf("http://")>-1?null:b,d=prompt(this._("Enter URL:"),c?"http://":b),e=prompt(this._("Enter the displayed text:"),c||d)||d;d&&this.insertText(''+e+"")}},quote:{txtExec:["
    ","
    "]},youtube:{txtExec:function(a){var c=this;b.command.get("youtube")._dropDown(c,a,function(a){c.insertText('')})}},rtl:{txtExec:['
    ',"
    "]},ltr:{txtExec:['
    ',"
    "]}};b.XHTMLSerializer=function(){var c,e,f,g,h,i,j,k,l,m,n=this,o={indentStr:"\t"},p=[],q=0;c=function(a){var b={"&":"&","<":"<",">":">",'"':"""};return a?a.replace(/[&<>"]/g,function(a){return b[a]||a}):""},e=function(a){return a.replace(/[\r\n]/," ").replace(/[^\S|\u00A0]+/g," ")},n.serialize=function(a,b){if(p=[],b)for(a=a.firstChild;a;)f(a),a=a.nextSibling;else f(a);return p.join("")},f=function(a,b){switch(a.nodeType){case 1:var c=a.nodeName.toLowerCase();"!"===c?j(a):h(a,b);break;case 3:k(a,b);break;case 4:i(a);break;case 8:j(a);break;case 9:case 11:g(a);break;case 2:case 5:case 6:case 7:case 10:case 12:}},g=function(a){for(var b=a.firstChild;b;)f(b),b=b.nextSibling},h=function(e,g){var h,i,j,k=e.nodeName.toLowerCase(),n="iframe"===k,o=e.attributes.length,p=e.firstChild,r=g||/pre(?:\-wrap)?$/i.test(a(e).css("whiteSpace")),s=!e.firstChild&&!d.canHaveChildren(e)&&!n;if(!a(e).hasClass("sceditor-ignore")){for(l("<"+k,!g&&m(e));o--;)i=e.attributes[o],(!b.ie||i.specified||"input"===k&&"value"===i.name)&&(j=b.ie<8&&/style/i.test(i.name)?e.style.cssText:i.value,l(" "+i.name.toLowerCase()+'="'+c(j)+'"',!1));for(l(s?" />":">",!1),n||(h=p);h;)q++,f(h,r),h=h.nextSibling,q--;s||l("",!r&&!n&&m(e)&&p&&m(p))}},i=function(a){l("")},j=function(a){l("")},k=function(a,b){var d=a.nodeValue;b||(d=e(d)),d&&l(c(d),!b&&m(a))},l=function(a,b){var c=q;if(b!==!1)for(p.length&&p.push("\n");c--;)p.push(o.indentStr);p.push(a)},m=function(a){var b=a.previousSibling;return 1!==a.nodeType&&b?!d.isInline(b):!b&&!d.isInline(a.parentNode)||!d.isInline(a)}},c.xhtml=function(){var f,g,h,i,j,k,l,m=this,n={},o={};m.init=function(){a.isEmptyObject(c.xhtml.converters||{})||a.each(c.xhtml.converters,function(b,c){a.each(c.tags,function(a){n[a]||(n[a]=[]),n[a].push(c)})}),this.commands=a.extend(!0,{},e,this.commands)},m.signalToSource=function(a,c){return c=c.jquery?c[0]:c,f(c),i(c),k(c),l(c),(new b.XHTMLSerializer).serialize(c,!0)},m.signalToWysiwyg=function(a){return a},m.convertTagTo=d.convertElement,g=function(c,d,e){n[c]&&a.each(n[c],function(f,g){g.tags[c]?a.each(g.tags[c],function(c,f){e.getAttributeNode&&(c=e.getAttributeNode(c),!c||b.ie<8&&!c.specified||f&&a.inArray(c.value,f)<0||g.conv.call(m,e,d))}):g.conv&&g.conv.call(m,e,d)})},f=function(b){d.traverse(b,function(b){var c=a(b),d=b.nodeName.toLowerCase();g("*",c,b),g(d,c,b)},!0)},h=function(b,c){var e=b.childNodes,f=b.nodeName.toLowerCase(),g=b.nodeValue,i=e.length;if(c&&"br"===f)return!0;if(a(b).hasClass("sceditor-ignore"))return!0;if(!d.canHaveChildren(b))return!1;if(g&&/\S|\u00A0/.test(g))return!1;for(;i--;)if(!h(e[i],c&&!b.previousSibling&&!b.nextSibling))return!1;return!0},i=function(b){d.traverse(b,function(e){var f,g=e.nodeName.toLowerCase(),i=e.parentNode,j=e.nodeType,k=!d.isInline(e),l=e.previousSibling,m=e.nextSibling,n=i===b,o=!l&&!m,p="iframe"!==g&&h(e,n&&o&&"br"!==g),q=e.ownerDocument,r=c.xhtml.allowedTags,s=c.xhtml.disallowedTags;if(3!==j&&(4===j?g="!cdata":"!"!==g&&8!==j||(g="!comment"),p?f=!0:r&&r.length?f=a.inArray(g,r)<0:s&&s.length&&(f=a.inArray(g,s)>-1),f)){if(!p){for(k&&l&&d.isInline(l)&&i.insertBefore(q.createTextNode(" "),e);e.firstChild;)i.insertBefore(e.firstChild,m);k&&m&&d.isInline(m)&&i.insertBefore(q.createTextNode(" "),m)}i.removeChild(e)}},!0)},j=function(b,c){var d={};return b&&a.extend(d,b),c?(a.each(c,function(b,c){a.isArray(c)?d[b]=a.merge(d[b]||[],c):d[b]||(d[b]=null)}),d):d},l=function(b){var c=[],e=function(){c.length&&(a("

    ",b.ownerDocument).insertBefore(c[0]).append(c),c=[])};d.removeWhiteSpace(b);for(var f=b.firstChild;f;)d.isInline(f)&&!a(f).is(".sceditor-ignore")?c.push(f):e(),f=f.nextSibling;e()},k=function(b){var e,f,g,h,i,k,l=c.xhtml.allowedAttribs,m=l&&!a.isEmptyObject(l),n=c.xhtml.disallowedAttribs,p=n&&!a.isEmptyObject(n);o={},d.traverse(b,function(b){if(b.attributes&&(e=b.nodeName.toLowerCase(),h=b.attributes.length))for(o[e]||(m?o[e]=j(l["*"],l[e]):o[e]=j(n["*"],n[e]));h--;)f=b.attributes[h],g=f.name,i=o[e][g],k=!1,m?k=null!==i&&(!a.isArray(i)||a.inArray(f.value,i)<0):p&&(k=null===i||a.isArray(i)&&a.inArray(f.value,i)>-1),k&&b.removeAttribute(g)})}},c.xhtml.converters=[{tags:{"*":{width:null}},conv:function(a,b){b.css("width",b.attr("width")).removeAttr("width")}},{tags:{"*":{height:null}},conv:function(a,b){b.css("height",b.attr("height")).removeAttr("height")}},{tags:{li:{value:null}},conv:function(a,c){b.ie<8?a.removeAttribute("value"):c.removeAttr("value")}},{tags:{"*":{text:null}},conv:function(a,b){b.css("color",b.attr("text")).removeAttr("text")}},{tags:{"*":{color:null}},conv:function(a,b){b.css("color",b.attr("color")).removeAttr("color")}},{tags:{"*":{face:null}},conv:function(a,b){b.css("fontFamily",b.attr("face")).removeAttr("face")}},{tags:{"*":{align:null}},conv:function(a,b){b.css("textAlign",b.attr("align")).removeAttr("align")}},{tags:{"*":{border:null}},conv:function(a,b){b.css("borderWidth",b.attr("border")).removeAttr("border")}},{tags:{applet:{name:null},img:{name:null},layer:{name:null},map:{name:null},object:{name:null},param:{name:null}},conv:function(a,b){b.attr("id")||b.attr("id",b.attr("name")),b.removeAttr("name")}},{tags:{"*":{vspace:null}},conv:function(a,b){b.css("marginTop",b.attr("vspace")-0).css("marginBottom",b.attr("vspace")-0).removeAttr("vspace")}},{tags:{"*":{hspace:null}},conv:function(a,b){b.css("marginLeft",b.attr("hspace")-0).css("marginRight",b.attr("hspace")-0).removeAttr("hspace")}},{tags:{hr:{noshade:null}},conv:function(a,b){b.css("borderStyle","solid").removeAttr("noshade")}},{tags:{"*":{nowrap:null}},conv:function(a,b){b.css("white-space","nowrap").removeAttr("nowrap")}},{tags:{big:null},conv:function(b){a(this.convertTagTo(b,"span")).css("fontSize","larger")}},{tags:{small:null},conv:function(b){a(this.convertTagTo(b,"span")).css("fontSize","smaller")}},{tags:{b:null},conv:function(b){a(this.convertTagTo(b,"strong"))}},{tags:{u:null},conv:function(b){a(this.convertTagTo(b,"span")).css("textDecoration","underline")}},{tags:{i:null},conv:function(b){a(this.convertTagTo(b,"em"))}},{tags:{s:null,strike:null},conv:function(b){a(this.convertTagTo(b,"span")).css("textDecoration","line-through")}},{tags:{dir:null},conv:function(a){this.convertTagTo(a,"ul")}},{tags:{center:null},conv:function(b){a(this.convertTagTo(b,"div")).css("textAlign","center")}},{tags:{font:{size:null}},conv:function(a,c){var d=c.css("fontSize"),e=d;"+0"!==e&&(b.ie<9&&(e=10,d>1&&(e=13),d>2&&(e=16),d>3&&(e=18),d>4&&(e=24),d>5&&(e=32),d>6&&(e=48)),c.css("fontSize",e)),c.removeAttr("size")}},{tags:{font:null},conv:function(a){this.convertTagTo(a,"span")}},{tags:{"*":{type:["_moz"]}},conv:function(a,b){b.removeAttr("type")}},{tags:{"*":{_moz_dirty:null}},conv:function(a,b){b.removeAttr("_moz_dirty")}},{tags:{"*":{_moz_editor_bogus_node:null}},conv:function(a,b){b.remove()}}],c.xhtml.allowedAttribs={},c.xhtml.disallowedAttribs={},c.xhtml.allowedTags=[],c.xhtml.disallowedTags=[]}(jQuery); \ No newline at end of file diff --git a/Html/js/SCEditor/themes/default.min.css b/Html/js/SCEditor/themes/default.min.css new file mode 100644 index 0000000..d3eaca6 --- /dev/null +++ b/Html/js/SCEditor/themes/default.min.css @@ -0,0 +1 @@ +/*! SCEditor | (C) 2011-2013, Sam Clarke | sceditor.com/license */.sceditor-button div,div.sceditor-grip{background-image:url(famfamfam.png);background-repeat:no-repeat;width:16px;height:16px}.sceditor-button-youtube div{background-position:0 0}.sceditor-button-link div{background-position:0 -16px}.sceditor-button-unlink div{background-position:0 -32px}.sceditor-button-underline div{background-position:0 -48px}.sceditor-button-time div{background-position:0 -64px}.sceditor-button-table div{background-position:0 -80px}.sceditor-button-superscript div{background-position:0 -96px}.sceditor-button-subscript div{background-position:0 -112px}.sceditor-button-strike div{background-position:0 -128px}.sceditor-button-source div{background-position:0 -144px}.sceditor-button-size div{background-position:0 -160px}.sceditor-button-rtl div{background-position:0 -176px}.sceditor-button-right div{background-position:0 -192px}.sceditor-button-removeformat div{background-position:0 -208px}.sceditor-button-quote div{background-position:0 -224px}.sceditor-button-print div{background-position:0 -240px}.sceditor-button-pastetext div{background-position:0 -256px}.sceditor-button-paste div{background-position:0 -272px}.sceditor-button-outdent div{background-position:0 -288px}.sceditor-button-orderedlist div{background-position:0 -304px}.sceditor-button-maximize div{background-position:0 -320px}.sceditor-button-ltr div{background-position:0 -336px}.sceditor-button-left div{background-position:0 -352px}.sceditor-button-justify div{background-position:0 -368px}.sceditor-button-italic div{background-position:0 -384px}.sceditor-button-indent div{background-position:0 -400px}.sceditor-button-image div{background-position:0 -416px}.sceditor-button-horizontalrule div{background-position:0 -432px}.sceditor-button-format div{background-position:0 -448px}.sceditor-button-font div{background-position:0 -464px}.sceditor-button-emoticon div{background-position:0 -480px}.sceditor-button-email div{background-position:0 -496px}.sceditor-button-date div{background-position:0 -512px}.sceditor-button-cut div{background-position:0 -528px}.sceditor-button-copy div{background-position:0 -544px}.sceditor-button-color div{background-position:0 -560px}.sceditor-button-code div{background-position:0 -576px}.sceditor-button-center div{background-position:0 -592px}.sceditor-button-bulletlist div{background-position:0 -608px}.sceditor-button-bold div{background-position:0 -624px}div.sceditor-grip{background-position:0 -640px}.rtl div.sceditor-grip{background-position:0 -650px;width:10px;height:10px}.sceditor-container{position:relative;background:#fff;border:1px solid #d9d9d9;font-size:13px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;color:#222;line-height:1;font-weight:700;border-radius:4px;background-clip:padding-box}.sceditor-container *,.sceditor-container :after,.sceditor-container :before{box-sizing:content-box}.sceditor-container,.sceditor-container div,div.sceditor-dropdown,div.sceditor-dropdown div{padding:0;margin:0;z-index:3}.sceditor-container iframe,.sceditor-container textarea{line-height:1;border:0;outline:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;color:#111;padding:0;margin:5px;resize:none;background:#fff;display:block}div.sceditor-resize-cover{position:absolute;top:0;left:0;background:#000;width:100%;height:100%;z-index:10;opacity:.3}.ie6 div.sceditor-resize-cover,.ie7 div.sceditor-resize-cover,.ie8 div.sceditor-resize-cover{background:#efefef}.sceditor-maximize,.sceditor-maximize div.sceditor-toolbar{border-radius:0;background-clip:padding-box}.sceditor-container.ie6{overflow:hidden}div.sceditor-grip{overflow:hidden;width:10px;height:10px;cursor:pointer;position:absolute;bottom:0;right:0;z-index:3}.sceditor-maximize{position:fixed;top:0;left:0;height:100%!important;width:100%!important;z-index:2000}body.sceditor-maximize,html.sceditor-maximize{height:100%;width:100%;padding:0;margin:0;overflow:hidden}.ie6.sceditor-maximize{position:absolute}.sceditor-maximize div.sceditor-grip{display:none}div.sceditor-dropdown{position:absolute;border:1px solid #ccc;background:#fff;color:#333;z-index:4000;padding:10px;line-height:1;border-radius:2px;background-clip:padding-box;box-shadow:1px 2px 4px rgba(0,0,0,.2)}div.sceditor-dropdown a,div.sceditor-dropdown a:link{color:#333}div.sceditor-dropdown form{margin:0}div.sceditor-dropdown label{display:block;font-weight:700;color:#3c3c3c;padding:4px 0}div.sceditor-dropdown input,div.sceditor-dropdown textarea{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;outline:0;padding:4px;border:1px solid #ccc;border-top-color:#888;margin:0 0 .75em;border-radius:1px;background-clip:padding-box}div.sceditor-dropdown textarea{padding:6px}div.sceditor-dropdown input:focus,div.sceditor-dropdown textarea:focus{border-color:#666 #aaa #aaa;box-shadow:inset 0 1px 5px rgba(0,0,0,.1)}div.sceditor-dropdown .button{font-weight:700;color:#444;padding:6px 12px;background:#ececec;border:1px solid #ccc;border-radius:2px;background-clip:padding-box;cursor:pointer;margin:.3em 0 0}div.sceditor-dropdown .button:hover{background:#f3f3f3;box-shadow:0 1px 1px rgba(0,0,0,.15)}div.sceditor-font-picker,div.sceditor-fontsize-picker,div.sceditor-format{padding:6px 0}div.sceditor-color-picker,div.sceditor-emoticons,div.sceditor-more-emoticons{padding:0}.sceditor-pastetext textarea{border:1px solid #bbb;width:20em}.sceditor-emoticons img,.sceditor-more-emoticons img{padding:0;cursor:pointer;margin:2px}.sceditor-more{border-top:1px solid #bbb;display:block;text-align:center;cursor:pointer;font-weight:700;padding:6px 0}.sceditor-dropdown a:hover{background:#eee}.sceditor-font-option,.sceditor-fontsize-option,.sceditor-format a{display:block;padding:7px 10px;cursor:pointer;text-decoration:none;color:#222}.sceditor-fontsize-option{padding:7px 13px}.sceditor-color-column{float:left}.sceditor-color-option{display:block;border:1px solid #fff;height:10px;width:10px;overflow:hidden}.sceditor-color-option:hover{border:1px solid #333}div.sceditor-toolbar{overflow:hidden;padding:3px 5px 2px;background:#f7f7f7;border-bottom:1px solid silver;line-height:0;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:3px 3px 0 0;background-clip:padding-box}div.sceditor-group{display:inline-block;background:#ddd;margin:1px 5px 1px 0;padding:1px;border-bottom:1px solid #aaa;border-radius:3px;background-clip:padding-box}.ie6 div.sceditor-group,.ie7 div.sceditor-group{display:inline;zoom:1}.sceditor-button{float:left;cursor:pointer;padding:3px 5px;width:16px;height:20px;border-radius:3px;background-clip:padding-box;text-indent:-9999px}.ie .sceditor-button{text-indent:0}.ie6 .sceditor-button,.ie7 .sceditor-button{float:none!important;display:inline;zoom:1}.ie6 .sceditor-button{padding:0}.ie6 .sceditor-button div{margin:5px}.ie7 .sceditor-button div{margin:5px 0}.sceditor-button.active,.sceditor-button:active,.sceditor-button:hover{background:#fff;box-shadow:inset 1px 1px 0 rgba(0,0,0,.3),inset -1px 0 rgba(0,0,0,.3),inset 0 -1px 0 rgba(0,0,0,.2)}.sceditor-button:active{background:#fff;box-shadow:inset 1px 1px 0 rgba(0,0,0,.3),inset -1px 0 rgba(0,0,0,.3),inset 0 -1px 0 rgba(0,0,0,.2),inset 0 0 8px rgba(0,0,0,.3)}.sceditor-button.disabled:hover{background:inherit;cursor:default;box-shadow:none}.sceditor-button,.sceditor-button div{display:block}.sceditor-button div{margin:2px 0;padding:0;overflow:hidden;line-height:0;font-size:0;color:transparent}.sceditor-button.disabled div{filter:alpha(opacity=30);opacity:.3}.sceditor-button.text,.sceditor-button.text div,.sceditor-button.text-icon,.sceditor-button.text-icon div,.text .sceditor-button,.text .sceditor-button div,.text-icon .sceditor-button,.text-icon .sceditor-button div{width:auto;overflow:visible;line-height:16px;font-size:1em;color:inherit;text-indent:0}.sceditor-button.text div,.text .sceditor-button div{padding:0 2px;background:0 0}.sceditor-button.text-icon div,.text-icon .sceditor-button div{padding:0 2px 0 20px}.rtl div.sceditor-toolbar{text-align:right}.rtl .sceditor-button{float:right}.rtl div.sceditor-grip{right:auto;left:0} \ No newline at end of file diff --git a/Html/js/SCEditor/themes/famfamfam.png b/Html/js/SCEditor/themes/famfamfam.png new file mode 100644 index 0000000..c95ef4a Binary files /dev/null and b/Html/js/SCEditor/themes/famfamfam.png differ diff --git a/Html/js/SCEditor/themes/modern.min.css b/Html/js/SCEditor/themes/modern.min.css new file mode 100644 index 0000000..170040d --- /dev/null +++ b/Html/js/SCEditor/themes/modern.min.css @@ -0,0 +1 @@ +/*! SCEditor | (C) 2011-2013, Sam Clarke | sceditor.com/license */.sceditor-button div,div.sceditor-grip{background-image:url(famfamfam.png);background-repeat:no-repeat;width:16px;height:16px}.sceditor-button-youtube div{background-position:0 0}.sceditor-button-link div{background-position:0 -16px}.sceditor-button-unlink div{background-position:0 -32px}.sceditor-button-underline div{background-position:0 -48px}.sceditor-button-time div{background-position:0 -64px}.sceditor-button-table div{background-position:0 -80px}.sceditor-button-superscript div{background-position:0 -96px}.sceditor-button-subscript div{background-position:0 -112px}.sceditor-button-strike div{background-position:0 -128px}.sceditor-button-source div{background-position:0 -144px}.sceditor-button-size div{background-position:0 -160px}.sceditor-button-rtl div{background-position:0 -176px}.sceditor-button-right div{background-position:0 -192px}.sceditor-button-removeformat div{background-position:0 -208px}.sceditor-button-quote div{background-position:0 -224px}.sceditor-button-print div{background-position:0 -240px}.sceditor-button-pastetext div{background-position:0 -256px}.sceditor-button-paste div{background-position:0 -272px}.sceditor-button-outdent div{background-position:0 -288px}.sceditor-button-orderedlist div{background-position:0 -304px}.sceditor-button-maximize div{background-position:0 -320px}.sceditor-button-ltr div{background-position:0 -336px}.sceditor-button-left div{background-position:0 -352px}.sceditor-button-justify div{background-position:0 -368px}.sceditor-button-italic div{background-position:0 -384px}.sceditor-button-indent div{background-position:0 -400px}.sceditor-button-image div{background-position:0 -416px}.sceditor-button-horizontalrule div{background-position:0 -432px}.sceditor-button-format div{background-position:0 -448px}.sceditor-button-font div{background-position:0 -464px}.sceditor-button-emoticon div{background-position:0 -480px}.sceditor-button-email div{background-position:0 -496px}.sceditor-button-date div{background-position:0 -512px}.sceditor-button-cut div{background-position:0 -528px}.sceditor-button-copy div{background-position:0 -544px}.sceditor-button-color div{background-position:0 -560px}.sceditor-button-code div{background-position:0 -576px}.sceditor-button-center div{background-position:0 -592px}.sceditor-button-bulletlist div{background-position:0 -608px}.sceditor-button-bold div{background-position:0 -624px}div.sceditor-grip{background-position:0 -640px}.rtl div.sceditor-grip{background-position:0 -650px;width:10px;height:10px}.sceditor-container{position:relative;background:#fff;font-size:13px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;color:#222;line-height:1;font-weight:700;border-radius:4px;background-clip:padding-box}.sceditor-container *,.sceditor-container :after,.sceditor-container :before{box-sizing:content-box}.sceditor-container,.sceditor-container div,div.sceditor-dropdown,div.sceditor-dropdown div{padding:0;margin:0;z-index:3}.sceditor-container iframe,.sceditor-container textarea{line-height:1;border:0;outline:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;color:#111;padding:0;margin:5px;resize:none;background:#fff;display:block}div.sceditor-resize-cover{position:absolute;top:0;left:0;background:#000;width:100%;height:100%;z-index:10;opacity:.3}.ie6 div.sceditor-resize-cover,.ie7 div.sceditor-resize-cover,.ie8 div.sceditor-resize-cover{background:#efefef}.sceditor-maximize,.sceditor-maximize div.sceditor-toolbar{border-radius:0;background-clip:padding-box}.sceditor-container.ie6{overflow:hidden}div.sceditor-grip{overflow:hidden;width:10px;height:10px;cursor:pointer;position:absolute;bottom:0;right:0;z-index:3}.sceditor-maximize{position:fixed;top:0;left:0;height:100%!important;width:100%!important;z-index:2000}body.sceditor-maximize,html.sceditor-maximize{height:100%;width:100%;padding:0;margin:0;overflow:hidden}.ie6.sceditor-maximize{position:absolute}.sceditor-maximize div.sceditor-grip{display:none}div.sceditor-dropdown{position:absolute;border:1px solid #ccc;background:#fff;color:#333;z-index:4000;padding:10px;line-height:1;border-radius:2px;background-clip:padding-box;box-shadow:1px 2px 4px rgba(0,0,0,.2)}div.sceditor-dropdown a,div.sceditor-dropdown a:link{color:#333}div.sceditor-dropdown form{margin:0}div.sceditor-dropdown label{display:block;font-weight:700;color:#3c3c3c;padding:4px 0}div.sceditor-dropdown input,div.sceditor-dropdown textarea{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;outline:0;padding:4px;border:1px solid #ccc;border-top-color:#888;margin:0 0 .75em;border-radius:1px;background-clip:padding-box}div.sceditor-dropdown textarea{padding:6px}div.sceditor-dropdown input:focus,div.sceditor-dropdown textarea:focus{border-color:#666 #aaa #aaa;box-shadow:inset 0 1px 5px rgba(0,0,0,.1)}div.sceditor-dropdown .button{font-weight:700;color:#444;padding:6px 12px;background:#ececec;border:1px solid #ccc;border-radius:2px;background-clip:padding-box;cursor:pointer;margin:.3em 0 0}div.sceditor-dropdown .button:hover{background:#f3f3f3;box-shadow:0 1px 1px rgba(0,0,0,.15)}div.sceditor-font-picker,div.sceditor-fontsize-picker,div.sceditor-format{padding:6px 0}div.sceditor-color-picker,div.sceditor-emoticons,div.sceditor-more-emoticons{padding:0}.sceditor-pastetext textarea{border:1px solid #bbb;width:20em}.sceditor-emoticons img,.sceditor-more-emoticons img{padding:0;cursor:pointer;margin:2px}.sceditor-more{border-top:1px solid #bbb;display:block;text-align:center;cursor:pointer;font-weight:700;padding:6px 0}.sceditor-dropdown a:hover{background:#eee}.sceditor-font-option,.sceditor-fontsize-option,.sceditor-format a{display:block;padding:7px 10px;cursor:pointer;text-decoration:none;color:#222}.sceditor-fontsize-option{padding:7px 13px}.sceditor-color-column{float:left}.sceditor-color-option{display:block;border:1px solid #fff;height:10px;width:10px;overflow:hidden}.sceditor-color-option:hover{border:1px solid #333}div.sceditor-toolbar{overflow:hidden;padding:3px 5px 2px;border-bottom:1px solid silver;line-height:0;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:3px 3px 0 0;background-clip:padding-box}div.sceditor-group{border-radius:3px;background-clip:padding-box}.ie6 div.sceditor-group,.ie7 div.sceditor-group{display:inline;zoom:1}.sceditor-button{float:left;cursor:pointer;width:16px;text-indent:-9999px}.ie .sceditor-button{text-indent:0}.ie6 .sceditor-button,.ie7 .sceditor-button{float:none!important;display:inline;zoom:1}.ie6 .sceditor-button{padding:0}.ie6 .sceditor-button div{margin:5px}.ie7 .sceditor-button div{margin:5px 0}.sceditor-button:active{background:#fff}.sceditor-button.disabled:hover{background:inherit;cursor:default;box-shadow:none}.sceditor-button,.sceditor-button div{display:block}.sceditor-button div{padding:0;overflow:hidden;line-height:0;font-size:0;color:transparent}.sceditor-button.disabled div{filter:alpha(opacity=30);opacity:.3}.sceditor-button.text,.sceditor-button.text div,.sceditor-button.text-icon,.sceditor-button.text-icon div,.text .sceditor-button,.text .sceditor-button div,.text-icon .sceditor-button,.text-icon .sceditor-button div{width:auto;overflow:visible;line-height:16px;font-size:1em;color:inherit;text-indent:0}.sceditor-button.text div,.text .sceditor-button div{padding:0 2px;background:0 0}.sceditor-button.text-icon div,.text-icon .sceditor-button div{padding:0 2px 0 20px}.rtl div.sceditor-toolbar{text-align:right}.rtl .sceditor-button{float:right}.rtl div.sceditor-grip{right:auto;left:0}.sceditor-container{border:1px solid #999}.sceditor-container textarea{font-family:Consolas,"Bitstream Vera Sans Mono","Andale Mono",Monaco,"DejaVu Sans Mono","Lucida Console",monospace;background:#2e3436;color:#fff;margin:0;padding:5px}div.sceditor-toolbar{background:#ccc;background:linear-gradient(to bottom,#ccc 0,#b2b2b2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#b2b2b2', GradientType=0)}.ie9 div.sceditor-toolbar{-webkit-filter:none;filter:none;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2NjY2NjYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNiMmIyYjIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)}div.sceditor-group{display:inline;background:0 0;margin:0;padding:0;border:0}.sceditor-button{padding:4px;margin:2px 1px 2px 3px;height:16px;border-radius:12px;background-clip:padding-box}.sceditor-button.active,.sceditor-button.active:hover,.sceditor-button:hover{box-shadow:none}.sceditor-button:hover{background:#fff;background:rgba(255,255,255,.75);margin:1px 0 1px 2px;border:1px solid #eee}.sceditor-button.disabled:hover{margin:2px 1px 2px 3px;border:0}.sceditor-button.active{background:#b1b1b1;background:rgba(0,0,0,.1);margin:1px 0 1px 2px;border:1px solid #999}.sceditor-button.active:hover{background:#fff;background:rgba(255,255,255,.25)}.sceditor-button.active:active,.sceditor-button:active{margin:1px 0 1px 2px;border:1px solid #999;box-shadow:inset 0 0 4px rgba(0,0,0,.5)}.sceditor-button div{margin:0} \ No newline at end of file diff --git a/Html/js/SCEditor/themes/monocons.min.css b/Html/js/SCEditor/themes/monocons.min.css new file mode 100644 index 0000000..4d024b6 --- /dev/null +++ b/Html/js/SCEditor/themes/monocons.min.css @@ -0,0 +1 @@ +@font-face{font-family:Monocons;src:url(monocons//monocons.eot);src:url(monocons//monocons.eot?#iefix) format('embedded-opentype'),url(monocons//monocons.ttf) format('truetype');font-weight:400;font-style:normal}.sceditor-button div:before,div.sceditor-grip{font-family:Monocons;font-size:16px;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased}.sceditor-button-youtube div:before{content:"\e000"}.sceditor-button-unlink div:before{content:"\e001"}.sceditor-button-underline div:before{content:"\e002"}.sceditor-button-time div:before{content:"\e003"}.sceditor-button-table div:before{content:"\e004"}.sceditor-button-superscript div:before{content:"\e005"}.sceditor-button-subscript div:before{content:"\e006"}.sceditor-button-strike div:before{content:"\e007"}.sceditor-button-source div:before{content:"\e008"}.sceditor-button-size div:before{content:"\e009"}.sceditor-button-rtl div:before{content:"\e00a"}.sceditor-button-right div:before{content:"\e00b"}.sceditor-button-removeformat div:before{content:"\e00c"}.sceditor-button-quote div:before{content:"\e00d"}.sceditor-button-print div:before{content:"\e00e"}.sceditor-button-pastetext div:before{content:"\e00f"}.sceditor-button-paste div:before{content:"\e010"}.sceditor-button-orderedlist div:before{content:"\e011"}.sceditor-button-maximize div:before{content:"\e012"}.sceditor-button-ltr div:before{content:"\e013"}.sceditor-button-link div:before{content:"\e014"}.sceditor-button-left div:before{content:"\e015"}.sceditor-button-justify div:before{content:"\e016"}.sceditor-button-italic div:before{content:"\e017"}.sceditor-button-image div:before{content:"\e018"}.sceditor-button-horizontalrule div:before{content:"\e019"}.sceditor-button-format div:before{content:"\e01c"}.sceditor-button-font div:before{content:"\e01d"}.sceditor-button-emoticon div:before{content:"\e01e"}.sceditor-button-email div:before{content:"\e01f"}.sceditor-button-bold div:before{content:"\e020"}.sceditor-button-date div:before{content:"\e021"}.sceditor-button-cut div:before{content:"\e022"}.sceditor-button-copy div:before{content:"\e023"}.sceditor-button-color div:before{content:"\e024"}.sceditor-button-code div:before{content:"\e025"}.sceditor-button-center div:before{content:"\e026"}.sceditor-button-bulletlist div:before{content:"\e027"}div.sceditor-grip:before{content:"\e01b"}.rtl div.sceditor-grip:before{content:"\e01a"}.sceditor-container{position:relative;background:#fff;border:1px solid #d9d9d9;font-size:13px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;color:#222;line-height:1;font-weight:700;border-radius:4px;background-clip:padding-box}.sceditor-container *,.sceditor-container :after,.sceditor-container :before{box-sizing:content-box}.sceditor-container,.sceditor-container div,div.sceditor-dropdown,div.sceditor-dropdown div{padding:0;margin:0;z-index:3}.sceditor-container iframe,.sceditor-container textarea{line-height:1;border:0;outline:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;color:#111;padding:0;margin:5px;resize:none;background:#fff;display:block}div.sceditor-resize-cover{position:absolute;top:0;left:0;background:#000;width:100%;height:100%;z-index:10;opacity:.3}.ie6 div.sceditor-resize-cover,.ie7 div.sceditor-resize-cover,.ie8 div.sceditor-resize-cover{background:#efefef}.sceditor-maximize,.sceditor-maximize div.sceditor-toolbar{border-radius:0;background-clip:padding-box}.sceditor-container.ie6{overflow:hidden}div.sceditor-grip{overflow:hidden;cursor:pointer;position:absolute;bottom:0;right:0;z-index:3}.sceditor-maximize{position:fixed;top:0;left:0;height:100%!important;width:100%!important;z-index:2000}body.sceditor-maximize,html.sceditor-maximize{height:100%;width:100%;padding:0;margin:0;overflow:hidden}.ie6.sceditor-maximize{position:absolute}.sceditor-maximize div.sceditor-grip{display:none}div.sceditor-dropdown{position:absolute;border:1px solid #ccc;background:#fff;color:#333;z-index:4000;padding:10px;line-height:1;border-radius:2px;background-clip:padding-box;box-shadow:1px 2px 4px rgba(0,0,0,.2)}div.sceditor-dropdown a,div.sceditor-dropdown a:link{color:#333}div.sceditor-dropdown form{margin:0}div.sceditor-dropdown label{display:block;font-weight:700;color:#3c3c3c;padding:4px 0}div.sceditor-dropdown input,div.sceditor-dropdown textarea{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;outline:0;padding:4px;border:1px solid #ccc;border-top-color:#888;margin:0 0 .75em;border-radius:1px;background-clip:padding-box}div.sceditor-dropdown textarea{padding:6px}div.sceditor-dropdown input:focus,div.sceditor-dropdown textarea:focus{border-color:#666 #aaa #aaa;box-shadow:inset 0 1px 5px rgba(0,0,0,.1)}div.sceditor-dropdown .button{font-weight:700;color:#444;padding:6px 12px;background:#ececec;border:1px solid #ccc;border-radius:2px;background-clip:padding-box;cursor:pointer;margin:.3em 0 0}div.sceditor-dropdown .button:hover{background:#f3f3f3;box-shadow:0 1px 1px rgba(0,0,0,.15)}div.sceditor-font-picker,div.sceditor-fontsize-picker,div.sceditor-format{padding:6px 0}div.sceditor-color-picker,div.sceditor-emoticons,div.sceditor-more-emoticons{padding:0}.sceditor-pastetext textarea{border:1px solid #bbb;width:20em}.sceditor-emoticons img,.sceditor-more-emoticons img{padding:0;cursor:pointer;margin:2px}.sceditor-more{border-top:1px solid #bbb;display:block;text-align:center;cursor:pointer;font-weight:700;padding:6px 0}.sceditor-dropdown a:hover{background:#eee}.sceditor-font-option,.sceditor-fontsize-option,.sceditor-format a{display:block;padding:7px 10px;cursor:pointer;text-decoration:none;color:#222}.sceditor-fontsize-option{padding:7px 13px}.sceditor-color-column{float:left}.sceditor-color-option{display:block;border:1px solid #fff;height:10px;width:10px;overflow:hidden}.sceditor-color-option:hover{border:1px solid #333}div.sceditor-toolbar{overflow:hidden;padding:3px 5px 2px;background:#f7f7f7;border-bottom:1px solid silver;line-height:0;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:3px 3px 0 0;background-clip:padding-box}div.sceditor-group{display:inline-block;background:#ddd;margin:1px 5px 1px 0;padding:1px;border-bottom:1px solid #aaa;border-radius:3px;background-clip:padding-box}.ie6 div.sceditor-group,.ie7 div.sceditor-group{display:inline;zoom:1}.sceditor-button{float:left;cursor:pointer;padding:3px 5px;width:16px;height:20px;border-radius:3px;background-clip:padding-box;text-indent:-9999px}.ie .sceditor-button{text-indent:0}.ie6 .sceditor-button,.ie7 .sceditor-button{float:none!important;display:inline;zoom:1}.ie6 .sceditor-button{padding:0}.ie6 .sceditor-button div{margin:5px}.ie7 .sceditor-button div{margin:5px 0}.sceditor-button.active,.sceditor-button:active,.sceditor-button:hover{background:#fff;box-shadow:inset 1px 1px 0 rgba(0,0,0,.3),inset -1px 0 rgba(0,0,0,.3),inset 0 -1px 0 rgba(0,0,0,.2)}.sceditor-button:active{background:#fff;box-shadow:inset 1px 1px 0 rgba(0,0,0,.3),inset -1px 0 rgba(0,0,0,.3),inset 0 -1px 0 rgba(0,0,0,.2),inset 0 0 8px rgba(0,0,0,.3)}.sceditor-button.disabled:hover{background:inherit;cursor:default;box-shadow:none}.sceditor-button,.sceditor-button div{display:block}.sceditor-button div{margin:2px 0;padding:0;overflow:hidden;line-height:0;font-size:0;color:transparent}.sceditor-button.disabled div{filter:alpha(opacity=30);opacity:.3}.sceditor-button.text,.sceditor-button.text div,.sceditor-button.text-icon,.sceditor-button.text-icon div,.text .sceditor-button,.text .sceditor-button div,.text-icon .sceditor-button,.text-icon .sceditor-button div{width:auto;overflow:visible;line-height:16px;font-size:1em;color:inherit;text-indent:0}.sceditor-button.text div,.text .sceditor-button div{padding:0 2px;background:0 0}.sceditor-button.text-icon div,.text-icon .sceditor-button div{padding:0 2px 0 20px}.rtl div.sceditor-toolbar{text-align:right}.rtl .sceditor-button{float:right}.rtl div.sceditor-grip{right:auto;left:0}.ie6 .sceditor-button div,.ie7 .sceditor-button div{font-family:Monocons;overflow:visible;font-size:16px;line-height:1;text-indent:0}div.sceditor-grip{height:16px;width:16px}.sceditor-button div:before,div.sceditor-grip:before{text-indent:0;line-height:17px;width:16px;height:16px;display:block;color:#333;text-shadow:0 1px #fff} \ No newline at end of file diff --git a/Html/js/SCEditor/themes/monocons/monocons.eot b/Html/js/SCEditor/themes/monocons/monocons.eot new file mode 100644 index 0000000..1db6547 Binary files /dev/null and b/Html/js/SCEditor/themes/monocons/monocons.eot differ diff --git a/Html/js/SCEditor/themes/monocons/monocons.ttf b/Html/js/SCEditor/themes/monocons/monocons.ttf new file mode 100644 index 0000000..d100abd Binary files /dev/null and b/Html/js/SCEditor/themes/monocons/monocons.ttf differ diff --git a/Html/js/SCEditor/themes/office-toolbar.min.css b/Html/js/SCEditor/themes/office-toolbar.min.css new file mode 100644 index 0000000..70811a2 --- /dev/null +++ b/Html/js/SCEditor/themes/office-toolbar.min.css @@ -0,0 +1 @@ +/*! SCEditor | (C) 2011-2013, Sam Clarke | sceditor.com/license */.sceditor-button div,div.sceditor-grip{background-image:url(famfamfam.png);background-repeat:no-repeat;width:16px;height:16px}.sceditor-button-youtube div{background-position:0 0}.sceditor-button-link div{background-position:0 -16px}.sceditor-button-unlink div{background-position:0 -32px}.sceditor-button-underline div{background-position:0 -48px}.sceditor-button-time div{background-position:0 -64px}.sceditor-button-table div{background-position:0 -80px}.sceditor-button-superscript div{background-position:0 -96px}.sceditor-button-subscript div{background-position:0 -112px}.sceditor-button-strike div{background-position:0 -128px}.sceditor-button-source div{background-position:0 -144px}.sceditor-button-size div{background-position:0 -160px}.sceditor-button-rtl div{background-position:0 -176px}.sceditor-button-right div{background-position:0 -192px}.sceditor-button-removeformat div{background-position:0 -208px}.sceditor-button-quote div{background-position:0 -224px}.sceditor-button-print div{background-position:0 -240px}.sceditor-button-pastetext div{background-position:0 -256px}.sceditor-button-paste div{background-position:0 -272px}.sceditor-button-outdent div{background-position:0 -288px}.sceditor-button-orderedlist div{background-position:0 -304px}.sceditor-button-maximize div{background-position:0 -320px}.sceditor-button-ltr div{background-position:0 -336px}.sceditor-button-left div{background-position:0 -352px}.sceditor-button-justify div{background-position:0 -368px}.sceditor-button-italic div{background-position:0 -384px}.sceditor-button-indent div{background-position:0 -400px}.sceditor-button-image div{background-position:0 -416px}.sceditor-button-horizontalrule div{background-position:0 -432px}.sceditor-button-format div{background-position:0 -448px}.sceditor-button-font div{background-position:0 -464px}.sceditor-button-emoticon div{background-position:0 -480px}.sceditor-button-email div{background-position:0 -496px}.sceditor-button-date div{background-position:0 -512px}.sceditor-button-cut div{background-position:0 -528px}.sceditor-button-copy div{background-position:0 -544px}.sceditor-button-color div{background-position:0 -560px}.sceditor-button-code div{background-position:0 -576px}.sceditor-button-center div{background-position:0 -592px}.sceditor-button-bulletlist div{background-position:0 -608px}.sceditor-button-bold div{background-position:0 -624px}div.sceditor-grip{background-position:0 -640px}.rtl div.sceditor-grip{background-position:0 -650px;width:10px;height:10px}.sceditor-container{position:relative;background:#fff;font-size:13px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;color:#222;line-height:1;font-weight:700;border-radius:4px;background-clip:padding-box}.sceditor-container *,.sceditor-container :after,.sceditor-container :before{box-sizing:content-box}.sceditor-container,.sceditor-container div,div.sceditor-dropdown,div.sceditor-dropdown div{padding:0;margin:0;z-index:3}.sceditor-container iframe,.sceditor-container textarea{line-height:1;border:0;outline:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;color:#111;padding:0;margin:5px;resize:none;background:#fff;display:block}div.sceditor-resize-cover{position:absolute;top:0;left:0;background:#000;width:100%;height:100%;z-index:10;opacity:.3}.ie6 div.sceditor-resize-cover,.ie7 div.sceditor-resize-cover,.ie8 div.sceditor-resize-cover{background:#efefef}.sceditor-maximize,.sceditor-maximize div.sceditor-toolbar{border-radius:0;background-clip:padding-box}.sceditor-container.ie6{overflow:hidden}div.sceditor-grip{overflow:hidden;width:10px;height:10px;cursor:pointer;position:absolute;bottom:0;right:0;z-index:3}.sceditor-maximize{position:fixed;top:0;left:0;height:100%!important;width:100%!important;z-index:2000}body.sceditor-maximize,html.sceditor-maximize{height:100%;width:100%;padding:0;margin:0;overflow:hidden}.ie6.sceditor-maximize{position:absolute}.sceditor-maximize div.sceditor-grip{display:none}div.sceditor-dropdown{position:absolute;border:1px solid #ccc;background:#fff;color:#333;z-index:4000;padding:10px;line-height:1;border-radius:2px;background-clip:padding-box;box-shadow:1px 2px 4px rgba(0,0,0,.2)}div.sceditor-dropdown a,div.sceditor-dropdown a:link{color:#333}div.sceditor-dropdown form{margin:0}div.sceditor-dropdown label{display:block;font-weight:700;color:#3c3c3c;padding:4px 0}div.sceditor-dropdown input,div.sceditor-dropdown textarea{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;outline:0;padding:4px;border:1px solid #ccc;border-top-color:#888;margin:0 0 .75em;border-radius:1px;background-clip:padding-box}div.sceditor-dropdown textarea{padding:6px}div.sceditor-dropdown input:focus,div.sceditor-dropdown textarea:focus{border-color:#666 #aaa #aaa;box-shadow:inset 0 1px 5px rgba(0,0,0,.1)}div.sceditor-dropdown .button{font-weight:700;color:#444;padding:6px 12px;background:#ececec;border:1px solid #ccc;border-radius:2px;background-clip:padding-box;cursor:pointer;margin:.3em 0 0}div.sceditor-dropdown .button:hover{background:#f3f3f3;box-shadow:0 1px 1px rgba(0,0,0,.15)}div.sceditor-font-picker,div.sceditor-fontsize-picker,div.sceditor-format{padding:6px 0}div.sceditor-color-picker,div.sceditor-emoticons,div.sceditor-more-emoticons{padding:0}.sceditor-pastetext textarea{border:1px solid #bbb;width:20em}.sceditor-emoticons img,.sceditor-more-emoticons img{padding:0;cursor:pointer;margin:2px}.sceditor-more{border-top:1px solid #bbb;display:block;text-align:center;cursor:pointer;font-weight:700;padding:6px 0}.sceditor-dropdown a:hover{background:#eee}.sceditor-font-option,.sceditor-fontsize-option,.sceditor-format a{display:block;padding:7px 10px;cursor:pointer;text-decoration:none;color:#222}.sceditor-fontsize-option{padding:7px 13px}.sceditor-color-column{float:left}.sceditor-color-option{display:block;border:1px solid #fff;height:10px;width:10px;overflow:hidden}.sceditor-color-option:hover{border:1px solid #333}div.sceditor-toolbar{overflow:hidden;padding:3px 5px 2px;line-height:0;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:3px 3px 0 0;background-clip:padding-box}div.sceditor-group{display:inline-block;margin:1px 5px 1px 0;border-radius:3px;background-clip:padding-box}.ie6 div.sceditor-group,.ie7 div.sceditor-group{display:inline;zoom:1}.sceditor-button{float:left;cursor:pointer;width:16px;text-indent:-9999px}.ie .sceditor-button{text-indent:0}.ie6 .sceditor-button,.ie7 .sceditor-button{float:none!important;display:inline;zoom:1}.ie6 .sceditor-button{padding:0}.ie6 .sceditor-button div{margin:5px}.ie7 .sceditor-button div{margin:5px 0}.sceditor-button.disabled:hover{background:inherit;cursor:default;box-shadow:none}.sceditor-button,.sceditor-button div{display:block}.sceditor-button div{padding:0;overflow:hidden;line-height:0;font-size:0;color:transparent;margin:0}.sceditor-button.disabled div{filter:alpha(opacity=30);opacity:.3}.sceditor-button.text,.sceditor-button.text div,.sceditor-button.text-icon,.sceditor-button.text-icon div,.text .sceditor-button,.text .sceditor-button div,.text-icon .sceditor-button,.text-icon .sceditor-button div{width:auto;overflow:visible;line-height:16px;font-size:1em;color:inherit;text-indent:0}.sceditor-button.text div,.text .sceditor-button div{padding:0 2px;background:0 0}.sceditor-button.text-icon div,.text-icon .sceditor-button div{padding:0 2px 0 20px}.rtl div.sceditor-toolbar{text-align:right}.rtl .sceditor-button{float:right}.rtl div.sceditor-grip{right:auto;left:0}.sceditor-container{border:1px solid #8db2e3}.sceditor-container textarea{font-family:Consolas,"Bitstream Vera Sans Mono","Andale Mono",Monaco,"DejaVu Sans Mono","Lucida Console",monospace}div.sceditor-toolbar{border-bottom:1px solid #95a9c3;background:#dee8f5;background:linear-gradient(to bottom,#dee8f5 0,#c7d8ed 29%,#ccdcee 61%,#c0d8ef 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dee8f5', endColorstr='#c0d8ef', GradientType=0)}.ie9 div.sceditor-toolbar{-webkit-filter:none;filter:none;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RlZThmNSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjI5JSIgc3RvcC1jb2xvcj0iI2M3ZDhlZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjYxJSIgc3RvcC1jb2xvcj0iI2NjZGNlZSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjMGQ4ZWYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)}div.sceditor-group{border:1px solid #7596bf;padding:0;background:#cadcf0;background:linear-gradient(to bottom,#cadcf0 24%,#bcd0e9 38%,#d0e1f7 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cadcf0', endColorstr='#d0e1f7', GradientType=0)}.ie9 div.sceditor-group{-webkit-filter:none;filter:none;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIyNCUiIHN0b3AtY29sb3I9IiNjYWRjZjAiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIzOCUiIHN0b3AtY29sb3I9IiNiY2QwZTkiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI5OSUiIHN0b3AtY29sb3I9IiNkMGUxZjciIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)}.sceditor-button{height:16px;padding:3px 4px;border-radius:0;background-clip:padding-box;box-shadow:inset 0 1px #d5e3f1,inset 0 -1px #e3edfb,inset 1px 0 #cddcef,inset -1px 0 #b8ceea}.sceditor-button:first-child{border-radius:4px 0 0 4px;background-clip:padding-box}.sceditor-button:last-child{border-radius:0 4px 4px 0;background-clip:padding-box}.ie9 .sceditor-button{-webkit-filter:none!important;filter:none!important}.sceditor-button.active{background:#fbdbb5;background:linear-gradient(to bottom,#fbdbb5 11%,#feb456 29%,#fdeb9f 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbdbb5', endColorstr='#fdeb9f', GradientType=0);box-shadow:inset 0 1px #ebd1b4,inset 0 -1px #ffe47f,inset -1px 0 #b8ceea}.ie9 .sceditor-button.active{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIxMSUiIHN0b3AtY29sb3I9IiNmYmRiYjUiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIyOSUiIHN0b3AtY29sb3I9IiNmZWI0NTYiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI5OSUiIHN0b3AtY29sb3I9IiNmZGZkOWYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)}.sceditor-button:hover{background:#fef7d5;background:linear-gradient(to bottom,#fef7d5 0,#fae5a9 42%,#ffd048 42%,#ffe59f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fef7d5', endColorstr='#ffe59f', GradientType=0);box-shadow:inset 0 1px #fffbe8,inset -1px 0 #ffefc4,inset 0 -1px #fff9cc}.ie9 .sceditor-button:hover{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZlZjdkNSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQyJSIgc3RvcC1jb2xvcj0iI2ZhZTVhOSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQyJSIgc3RvcC1jb2xvcj0iI2ZmZDA0OCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmU1OWYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)}.sceditor-button:active{background:#e7a66d;background:linear-gradient(to bottom,#e7a66d 0,#fcb16d 1%,#ff8d05 42%,#ffc450 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e7a66d', endColorstr='#ffc450', GradientType=0);box-shadow:inset 0 1px 1px #7b6645,inset 0 -1px #d19c33}.ie9 .sceditor-button:active{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U3YTY2ZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjElIiBzdG9wLWNvbG9yPSIjZmNiMTZkIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iNDIlIiBzdG9wLWNvbG9yPSIjZmY4ZDA1IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmYzQ1MCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=)}.sceditor-button.active:hover{background:#dba368;background:linear-gradient(to bottom,#dba368 0,#ffbd79 4%,#fea335 34%,#ffc64c 66%,#fee069 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dba368', endColorstr='#fee069', GradientType=0);box-shadow:inset 0 1px 1px #9e8255,inset 0 -1px #fcce6b}.ie9 .sceditor-button.active:hover{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RiYTM2OCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQlIiBzdG9wLWNvbG9yPSIjZmZiZDc5IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMzQlIiBzdG9wLWNvbG9yPSIjZmVhMzM1IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iNjYlIiBzdG9wLWNvbG9yPSIjZmZjNjRjIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZlZTA2OSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=)} \ No newline at end of file diff --git a/Html/js/SCEditor/themes/office.min.css b/Html/js/SCEditor/themes/office.min.css new file mode 100644 index 0000000..49d6873 --- /dev/null +++ b/Html/js/SCEditor/themes/office.min.css @@ -0,0 +1 @@ +/*! SCEditor | (C) 2011-2013, Sam Clarke | sceditor.com/license */.sceditor-button div,div.sceditor-grip{background-image:url(famfamfam.png);background-repeat:no-repeat;width:16px;height:16px}.sceditor-button-youtube div{background-position:0 0}.sceditor-button-link div{background-position:0 -16px}.sceditor-button-unlink div{background-position:0 -32px}.sceditor-button-underline div{background-position:0 -48px}.sceditor-button-time div{background-position:0 -64px}.sceditor-button-table div{background-position:0 -80px}.sceditor-button-superscript div{background-position:0 -96px}.sceditor-button-subscript div{background-position:0 -112px}.sceditor-button-strike div{background-position:0 -128px}.sceditor-button-source div{background-position:0 -144px}.sceditor-button-size div{background-position:0 -160px}.sceditor-button-rtl div{background-position:0 -176px}.sceditor-button-right div{background-position:0 -192px}.sceditor-button-removeformat div{background-position:0 -208px}.sceditor-button-quote div{background-position:0 -224px}.sceditor-button-print div{background-position:0 -240px}.sceditor-button-pastetext div{background-position:0 -256px}.sceditor-button-paste div{background-position:0 -272px}.sceditor-button-outdent div{background-position:0 -288px}.sceditor-button-orderedlist div{background-position:0 -304px}.sceditor-button-maximize div{background-position:0 -320px}.sceditor-button-ltr div{background-position:0 -336px}.sceditor-button-left div{background-position:0 -352px}.sceditor-button-justify div{background-position:0 -368px}.sceditor-button-italic div{background-position:0 -384px}.sceditor-button-indent div{background-position:0 -400px}.sceditor-button-image div{background-position:0 -416px}.sceditor-button-horizontalrule div{background-position:0 -432px}.sceditor-button-format div{background-position:0 -448px}.sceditor-button-font div{background-position:0 -464px}.sceditor-button-emoticon div{background-position:0 -480px}.sceditor-button-email div{background-position:0 -496px}.sceditor-button-date div{background-position:0 -512px}.sceditor-button-cut div{background-position:0 -528px}.sceditor-button-copy div{background-position:0 -544px}.sceditor-button-color div{background-position:0 -560px}.sceditor-button-code div{background-position:0 -576px}.sceditor-button-center div{background-position:0 -592px}.sceditor-button-bulletlist div{background-position:0 -608px}.sceditor-button-bold div{background-position:0 -624px}div.sceditor-grip{background-position:0 -640px}.rtl div.sceditor-grip{background-position:0 -650px;width:10px;height:10px}.sceditor-container{position:relative;font-size:13px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;color:#222;line-height:1;font-weight:700;border-radius:4px;background-clip:padding-box}.sceditor-container *,.sceditor-container :after,.sceditor-container :before{box-sizing:content-box}.sceditor-container,.sceditor-container div,div.sceditor-dropdown,div.sceditor-dropdown div{padding:0;margin:0;z-index:3}.sceditor-container iframe,.sceditor-container textarea{line-height:1;outline:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;color:#111;resize:none;display:block}div.sceditor-resize-cover{position:absolute;top:0;left:0;background:#000;width:100%;height:100%;z-index:10;opacity:.3}.ie6 div.sceditor-resize-cover,.ie7 div.sceditor-resize-cover,.ie8 div.sceditor-resize-cover{background:#efefef}.sceditor-maximize,.sceditor-maximize div.sceditor-toolbar{border-radius:0;background-clip:padding-box}.sceditor-container.ie6{overflow:hidden}div.sceditor-grip{overflow:hidden;width:10px;height:10px;cursor:pointer;position:absolute;bottom:0;right:0;z-index:3}.sceditor-maximize{position:fixed;top:0;left:0;height:100%!important;width:100%!important;z-index:2000}body.sceditor-maximize,html.sceditor-maximize{height:100%;width:100%;padding:0;margin:0;overflow:hidden}.ie6.sceditor-maximize{position:absolute}.sceditor-maximize div.sceditor-grip{display:none}div.sceditor-dropdown{position:absolute;border:1px solid #ccc;background:#fff;color:#333;z-index:4000;padding:10px;line-height:1;border-radius:2px;background-clip:padding-box;box-shadow:1px 2px 4px rgba(0,0,0,.2)}div.sceditor-dropdown a,div.sceditor-dropdown a:link{color:#333}div.sceditor-dropdown form{margin:0}div.sceditor-dropdown label{display:block;font-weight:700;color:#3c3c3c;padding:4px 0}div.sceditor-dropdown input,div.sceditor-dropdown textarea{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;outline:0;padding:4px;border:1px solid #ccc;border-top-color:#888;margin:0 0 .75em;border-radius:1px;background-clip:padding-box}div.sceditor-dropdown textarea{padding:6px}div.sceditor-dropdown input:focus,div.sceditor-dropdown textarea:focus{border-color:#666 #aaa #aaa;box-shadow:inset 0 1px 5px rgba(0,0,0,.1)}div.sceditor-dropdown .button{font-weight:700;color:#444;padding:6px 12px;background:#ececec;border:1px solid #ccc;border-radius:2px;background-clip:padding-box;cursor:pointer;margin:.3em 0 0}div.sceditor-dropdown .button:hover{background:#f3f3f3;box-shadow:0 1px 1px rgba(0,0,0,.15)}div.sceditor-font-picker,div.sceditor-fontsize-picker,div.sceditor-format{padding:6px 0}div.sceditor-color-picker,div.sceditor-emoticons,div.sceditor-more-emoticons{padding:0}.sceditor-pastetext textarea{border:1px solid #bbb;width:20em}.sceditor-emoticons img,.sceditor-more-emoticons img{padding:0;cursor:pointer;margin:2px}.sceditor-more{border-top:1px solid #bbb;display:block;text-align:center;cursor:pointer;font-weight:700;padding:6px 0}.sceditor-dropdown a:hover{background:#eee}.sceditor-font-option,.sceditor-fontsize-option,.sceditor-format a{display:block;padding:7px 10px;cursor:pointer;text-decoration:none;color:#222}.sceditor-fontsize-option{padding:7px 13px}.sceditor-color-column{float:left}.sceditor-color-option{display:block;border:1px solid #fff;height:10px;width:10px;overflow:hidden}.sceditor-color-option:hover{border:1px solid #333}div.sceditor-toolbar{overflow:hidden;padding:3px 5px 2px;line-height:0;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:3px 3px 0 0;background-clip:padding-box}div.sceditor-group{display:inline-block;margin:1px 5px 1px 0;border-radius:3px;background-clip:padding-box}.ie6 div.sceditor-group,.ie7 div.sceditor-group{display:inline;zoom:1}.sceditor-button{float:left;cursor:pointer;width:16px;text-indent:-9999px}.ie .sceditor-button{text-indent:0}.ie6 .sceditor-button,.ie7 .sceditor-button{float:none!important;display:inline;zoom:1}.ie6 .sceditor-button{padding:0}.ie6 .sceditor-button div{margin:5px}.ie7 .sceditor-button div{margin:5px 0}.sceditor-button.disabled:hover{background:inherit;cursor:default;box-shadow:none}.sceditor-button,.sceditor-button div{display:block}.sceditor-button div{padding:0;overflow:hidden;line-height:0;font-size:0;color:transparent;margin:0}.sceditor-button.disabled div{filter:alpha(opacity=30);opacity:.3}.sceditor-button.text,.sceditor-button.text div,.sceditor-button.text-icon,.sceditor-button.text-icon div,.text .sceditor-button,.text .sceditor-button div,.text-icon .sceditor-button,.text-icon .sceditor-button div{width:auto;overflow:visible;line-height:16px;font-size:1em;color:inherit;text-indent:0}.sceditor-button.text div,.text .sceditor-button div{padding:0 2px;background:0 0}.sceditor-button.text-icon div,.text-icon .sceditor-button div{padding:0 2px 0 20px}.rtl div.sceditor-toolbar{text-align:right}.rtl .sceditor-button{float:right}.rtl div.sceditor-grip{right:auto;left:0}.sceditor-container{border:1px solid #8db2e3}.sceditor-container textarea{font-family:Consolas,"Bitstream Vera Sans Mono","Andale Mono",Monaco,"DejaVu Sans Mono","Lucida Console",monospace}div.sceditor-toolbar{border-bottom:1px solid #95a9c3;background:#dee8f5;background:linear-gradient(to bottom,#dee8f5 0,#c7d8ed 29%,#ccdcee 61%,#c0d8ef 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dee8f5', endColorstr='#c0d8ef', GradientType=0)}.ie9 div.sceditor-toolbar{-webkit-filter:none;filter:none;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RlZThmNSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjI5JSIgc3RvcC1jb2xvcj0iI2M3ZDhlZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjYxJSIgc3RvcC1jb2xvcj0iI2NjZGNlZSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjMGQ4ZWYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)}div.sceditor-group{border:1px solid #7596bf;padding:0;background:#cadcf0;background:linear-gradient(to bottom,#cadcf0 24%,#bcd0e9 38%,#d0e1f7 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cadcf0', endColorstr='#d0e1f7', GradientType=0)}.ie9 div.sceditor-group{-webkit-filter:none;filter:none;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIyNCUiIHN0b3AtY29sb3I9IiNjYWRjZjAiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIzOCUiIHN0b3AtY29sb3I9IiNiY2QwZTkiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI5OSUiIHN0b3AtY29sb3I9IiNkMGUxZjciIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)}.sceditor-button{height:16px;padding:3px 4px;border-radius:0;background-clip:padding-box;box-shadow:inset 0 1px #d5e3f1,inset 0 -1px #e3edfb,inset 1px 0 #cddcef,inset -1px 0 #b8ceea}.sceditor-button:first-child{border-radius:4px 0 0 4px;background-clip:padding-box}.sceditor-button:last-child{border-radius:0 4px 4px 0;background-clip:padding-box}.ie9 .sceditor-button{-webkit-filter:none!important;filter:none!important}.sceditor-button.active{background:#fbdbb5;background:linear-gradient(to bottom,#fbdbb5 11%,#feb456 29%,#fdeb9f 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbdbb5', endColorstr='#fdeb9f', GradientType=0);box-shadow:inset 0 1px #ebd1b4,inset 0 -1px #ffe47f,inset -1px 0 #b8ceea}.ie9 .sceditor-button.active{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIxMSUiIHN0b3AtY29sb3I9IiNmYmRiYjUiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIyOSUiIHN0b3AtY29sb3I9IiNmZWI0NTYiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSI5OSUiIHN0b3AtY29sb3I9IiNmZGZkOWYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)}.sceditor-button:hover{background:#fef7d5;background:linear-gradient(to bottom,#fef7d5 0,#fae5a9 42%,#ffd048 42%,#ffe59f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fef7d5', endColorstr='#ffe59f', GradientType=0);box-shadow:inset 0 1px #fffbe8,inset -1px 0 #ffefc4,inset 0 -1px #fff9cc}.ie9 .sceditor-button:hover{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZlZjdkNSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQyJSIgc3RvcC1jb2xvcj0iI2ZhZTVhOSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQyJSIgc3RvcC1jb2xvcj0iI2ZmZDA0OCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmU1OWYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+)}.sceditor-button:active{background:#e7a66d;background:linear-gradient(to bottom,#e7a66d 0,#fcb16d 1%,#ff8d05 42%,#ffc450 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e7a66d', endColorstr='#ffc450', GradientType=0);box-shadow:inset 0 1px 1px #7b6645,inset 0 -1px #d19c33}.ie9 .sceditor-button:active{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U3YTY2ZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjElIiBzdG9wLWNvbG9yPSIjZmNiMTZkIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iNDIlIiBzdG9wLWNvbG9yPSIjZmY4ZDA1IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmYzQ1MCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=)}.sceditor-button.active:hover{background:#dba368;background:linear-gradient(to bottom,#dba368 0,#ffbd79 4%,#fea335 34%,#ffc64c 66%,#fee069 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dba368', endColorstr='#fee069', GradientType=0);box-shadow:inset 0 1px 1px #9e8255,inset 0 -1px #fcce6b}.ie9 .sceditor-button.active:hover{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RiYTM2OCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQlIiBzdG9wLWNvbG9yPSIjZmZiZDc5IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMzQlIiBzdG9wLWNvbG9yPSIjZmVhMzM1IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iNjYlIiBzdG9wLWNvbG9yPSIjZmZjNjRjIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZlZTA2OSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=)}.sceditor-container{background:#a3c2ea;background:linear-gradient(to bottom,#a3c2ea 0,#6d92c1 39%,#577fb3 64%,#6591cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#a3c2ea', endColorstr='#6591cc', GradientType=0)}.sceditor-container iframe,.sceditor-container textarea{border:1px solid #646464;background:#fff;margin:7px 40px;padding:20px;box-shadow:1px 1px 5px #293a52} \ No newline at end of file diff --git a/Html/js/SCEditor/themes/square.min.css b/Html/js/SCEditor/themes/square.min.css new file mode 100644 index 0000000..baa91de --- /dev/null +++ b/Html/js/SCEditor/themes/square.min.css @@ -0,0 +1 @@ +/*! SCEditor | (C) 2011-2013, Sam Clarke | sceditor.com/license */.sceditor-button div,div.sceditor-grip{background-image:url(famfamfam.png);background-repeat:no-repeat;width:16px;height:16px}.sceditor-button-youtube div{background-position:0 0}.sceditor-button-link div{background-position:0 -16px}.sceditor-button-unlink div{background-position:0 -32px}.sceditor-button-underline div{background-position:0 -48px}.sceditor-button-time div{background-position:0 -64px}.sceditor-button-table div{background-position:0 -80px}.sceditor-button-superscript div{background-position:0 -96px}.sceditor-button-subscript div{background-position:0 -112px}.sceditor-button-strike div{background-position:0 -128px}.sceditor-button-source div{background-position:0 -144px}.sceditor-button-size div{background-position:0 -160px}.sceditor-button-rtl div{background-position:0 -176px}.sceditor-button-right div{background-position:0 -192px}.sceditor-button-removeformat div{background-position:0 -208px}.sceditor-button-quote div{background-position:0 -224px}.sceditor-button-print div{background-position:0 -240px}.sceditor-button-pastetext div{background-position:0 -256px}.sceditor-button-paste div{background-position:0 -272px}.sceditor-button-outdent div{background-position:0 -288px}.sceditor-button-orderedlist div{background-position:0 -304px}.sceditor-button-maximize div{background-position:0 -320px}.sceditor-button-ltr div{background-position:0 -336px}.sceditor-button-left div{background-position:0 -352px}.sceditor-button-justify div{background-position:0 -368px}.sceditor-button-italic div{background-position:0 -384px}.sceditor-button-indent div{background-position:0 -400px}.sceditor-button-image div{background-position:0 -416px}.sceditor-button-horizontalrule div{background-position:0 -432px}.sceditor-button-format div{background-position:0 -448px}.sceditor-button-font div{background-position:0 -464px}.sceditor-button-emoticon div{background-position:0 -480px}.sceditor-button-email div{background-position:0 -496px}.sceditor-button-date div{background-position:0 -512px}.sceditor-button-cut div{background-position:0 -528px}.sceditor-button-copy div{background-position:0 -544px}.sceditor-button-color div{background-position:0 -560px}.sceditor-button-code div{background-position:0 -576px}.sceditor-button-center div{background-position:0 -592px}.sceditor-button-bulletlist div{background-position:0 -608px}.sceditor-button-bold div{background-position:0 -624px}div.sceditor-grip{background-position:0 -640px}.rtl div.sceditor-grip{background-position:0 -650px;width:10px;height:10px}.sceditor-container{position:relative;background:#fff;font-size:13px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;color:#222;line-height:1;font-weight:700}.sceditor-container *,.sceditor-container :after,.sceditor-container :before{box-sizing:content-box}.sceditor-container,.sceditor-container div,div.sceditor-dropdown,div.sceditor-dropdown div{padding:0;margin:0;z-index:3}.sceditor-container iframe,.sceditor-container textarea{line-height:1;border:0;outline:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;color:#111;padding:0;margin:5px;resize:none;background:#fff;display:block}div.sceditor-resize-cover{position:absolute;top:0;left:0;background:#000;width:100%;height:100%;z-index:10;opacity:.3}.ie6 div.sceditor-resize-cover,.ie7 div.sceditor-resize-cover,.ie8 div.sceditor-resize-cover{background:#efefef}.sceditor-maximize,.sceditor-maximize div.sceditor-toolbar{border-radius:0;background-clip:padding-box}.sceditor-container.ie6{overflow:hidden}div.sceditor-grip{overflow:hidden;width:10px;height:10px;cursor:pointer;position:absolute;bottom:0;right:0;z-index:3}.sceditor-maximize{position:fixed;top:0;left:0;height:100%!important;width:100%!important;z-index:2000}body.sceditor-maximize,html.sceditor-maximize{height:100%;width:100%;padding:0;margin:0;overflow:hidden}.ie6.sceditor-maximize{position:absolute}.sceditor-maximize div.sceditor-grip{display:none}div.sceditor-dropdown{position:absolute;border:1px solid #ccc;background:#fff;color:#333;z-index:4000;padding:10px;line-height:1;border-radius:2px;background-clip:padding-box;box-shadow:1px 2px 4px rgba(0,0,0,.2)}div.sceditor-dropdown a,div.sceditor-dropdown a:link{color:#333}div.sceditor-dropdown form{margin:0}div.sceditor-dropdown label{display:block;font-weight:700;color:#3c3c3c;padding:4px 0}div.sceditor-dropdown input,div.sceditor-dropdown textarea{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;outline:0;padding:4px;border:1px solid #ccc;border-top-color:#888;margin:0 0 .75em;border-radius:1px;background-clip:padding-box}div.sceditor-dropdown textarea{padding:6px}div.sceditor-dropdown input:focus,div.sceditor-dropdown textarea:focus{border-color:#666 #aaa #aaa;box-shadow:inset 0 1px 5px rgba(0,0,0,.1)}div.sceditor-dropdown .button{font-weight:700;color:#444;padding:6px 12px;background:#ececec;border:1px solid #ccc;border-radius:2px;background-clip:padding-box;cursor:pointer;margin:.3em 0 0}div.sceditor-dropdown .button:hover{background:#f3f3f3;box-shadow:0 1px 1px rgba(0,0,0,.15)}div.sceditor-font-picker,div.sceditor-fontsize-picker,div.sceditor-format{padding:6px 0}div.sceditor-color-picker,div.sceditor-emoticons,div.sceditor-more-emoticons{padding:0}.sceditor-pastetext textarea{border:1px solid #bbb;width:20em}.sceditor-emoticons img,.sceditor-more-emoticons img{padding:0;cursor:pointer;margin:2px}.sceditor-more{border-top:1px solid #bbb;display:block;text-align:center;cursor:pointer;font-weight:700;padding:6px 0}.sceditor-dropdown a:hover{background:#eee}.sceditor-font-option,.sceditor-fontsize-option,.sceditor-format a{display:block;padding:7px 10px;cursor:pointer;text-decoration:none;color:#222}.sceditor-fontsize-option{padding:7px 13px}.sceditor-color-column{float:left}.sceditor-color-option{display:block;border:1px solid #fff;height:10px;width:10px;overflow:hidden}.sceditor-color-option:hover{border:1px solid #333}div.sceditor-toolbar{overflow:hidden;line-height:0;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:3px 3px 0 0;background-clip:padding-box}div.sceditor-group{display:inline-block}.ie6 div.sceditor-group,.ie7 div.sceditor-group{display:inline;zoom:1}.sceditor-button{float:left;cursor:pointer;width:16px;text-indent:-9999px}.ie .sceditor-button{text-indent:0}.ie6 .sceditor-button,.ie7 .sceditor-button{float:none!important;display:inline;zoom:1}.ie6 .sceditor-button{padding:0}.ie6 .sceditor-button div{margin:5px}.ie7 .sceditor-button div{margin:5px 0}.sceditor-button.disabled:hover{background:inherit;cursor:default;box-shadow:none}.sceditor-button,.sceditor-button div{display:block}.sceditor-button div{padding:0;overflow:hidden;line-height:0;font-size:0;color:transparent}.sceditor-button.disabled div{filter:alpha(opacity=30);opacity:.3}.sceditor-button.text,.sceditor-button.text div,.sceditor-button.text-icon,.sceditor-button.text-icon div,.text .sceditor-button,.text .sceditor-button div,.text-icon .sceditor-button,.text-icon .sceditor-button div{width:auto;overflow:visible;line-height:16px;font-size:1em;color:inherit;text-indent:0}.sceditor-button.text div,.text .sceditor-button div{padding:0 2px;background:0 0}.sceditor-button.text-icon div,.text-icon .sceditor-button div{padding:0 2px 0 20px}.rtl div.sceditor-toolbar{text-align:right}.rtl .sceditor-button{float:right}.rtl div.sceditor-grip{right:auto;left:0}.sceditor-container{border:1px solid #d6d6d6;border-radius:0;background-clip:padding-box}.sceditor-container textarea{font-family:Consolas,"Bitstream Vera Sans Mono","Andale Mono",Monaco,"DejaVu Sans Mono","Lucida Console",monospace;background:#2e3436;color:#fff;margin:0;padding:5px}div.sceditor-group,div.sceditor-toolbar{background:#f2f2f2;background:linear-gradient(to bottom,#f2f2f2 0,#ddd 89%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2f2f2', endColorstr='#dddddd', GradientType=0)}div.sceditor-toolbar{padding:0;border-bottom:1px solid #bbb;background-size:100% 32px}div.sceditor-group{margin:0;padding:2px 4px;border:0;border-right:1px solid #ccc;border-left:1px solid #eaeaea;border-radius:0;background-clip:padding-box}div.sceditor-group:last-child{border-right:0}div.sceditor-group:first-child{border-left:0}.sceditor-button{height:16px;padding:5px;margin:1px;border-radius:0;background-clip:padding-box}.sceditor-button div{margin:0}.sceditor-button.active,.sceditor-button.active:hover,.sceditor-button:active,.sceditor-button:hover{margin:0;box-shadow:none}.sceditor-button.active{background:#f4f4f4;border:1px solid #ccc}.sceditor-button:hover{background:#fefefe;border:1px solid #ddd}.sceditor-button.disabled:hover{margin:1px;border:0}.sceditor-button:active{background:#eee;border:1px solid #ccc}.sceditor-button.active:hover{background:#f8f8f8;border:1px solid #ddd} \ No newline at end of file diff --git a/Html/js/fr_FR.js b/Html/js/fr_FR.js new file mode 100644 index 0000000..b74abd4 --- /dev/null +++ b/Html/js/fr_FR.js @@ -0,0 +1,219 @@ +tinymce.addI18n('fr_FR',{ +"Cut": "Couper", +"Heading 5": "En-t\u00eate 5", +"Header 2": "Titre 2", +"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Votre navigateur ne supporte pas la copie directe. Merci d'utiliser les touches Ctrl+X\/C\/V.", +"Heading 4": "En-t\u00eate 4", +"Div": "Div", +"Heading 2": "En-t\u00eate 2", +"Paste": "Coller", +"Close": "Fermer", +"Font Family": "Police", +"Pre": "Pre", +"Align right": "Aligner \u00e0 droite", +"New document": "Nouveau document", +"Blockquote": "Citation", +"Numbered list": "Num\u00e9rotation", +"Heading 1": "En-t\u00eate 1", +"Headings": "En-t\u00eates", +"Increase indent": "Augmenter le retrait", +"Formats": "Formats", +"Headers": "Titres", +"Select all": "Tout s\u00e9lectionner", +"Header 3": "Titre 3", +"Blocks": "Blocs", +"Undo": "Annuler", +"Strikethrough": "Barr\u00e9", +"Bullet list": "Puces", +"Header 1": "Titre 1", +"Superscript": "Exposant", +"Clear formatting": "Effacer la mise en forme", +"Font Sizes": "Taille de police", +"Subscript": "Indice", +"Header 6": "Titre 6", +"Redo": "R\u00e9tablir", +"Paragraph": "Paragraphe", +"Ok": "Ok", +"Bold": "Gras", +"Code": "Code", +"Italic": "Italique", +"Align center": "Centrer", +"Header 5": "Titre 5", +"Heading 6": "En-t\u00eate 6", +"Heading 3": "En-t\u00eate 3", +"Decrease indent": "Diminuer le retrait", +"Header 4": "Titre 4", +"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Le presse-papiers est maintenant en mode \"texte plein\". Les contenus seront coll\u00e9s sans retenir les formatages jusqu'\u00e0 ce que vous d\u00e9sactiviez cette option.", +"Underline": "Soulign\u00e9", +"Cancel": "Annuler", +"Justify": "Justifier", +"Inline": "En ligne", +"Copy": "Copier", +"Align left": "Aligner \u00e0 gauche", +"Visual aids": "Aides visuelle", +"Lower Greek": "Grec minuscule", +"Square": "Carr\u00e9", +"Default": "Par d\u00e9faut", +"Lower Alpha": "Alpha minuscule", +"Circle": "Cercle", +"Disc": "Disque", +"Upper Alpha": "Alpha majuscule", +"Upper Roman": "Romain majuscule", +"Lower Roman": "Romain minuscule", +"Name": "Nom", +"Anchor": "Ancre", +"You have unsaved changes are you sure you want to navigate away?": "Vous avez des modifications non enregistr\u00e9es, \u00eates-vous s\u00fbr de quitter la page?", +"Restore last draft": "Restaurer le dernier brouillon", +"Special character": "Caract\u00e8res sp\u00e9ciaux", +"Source code": "Code source", +"B": "B", +"R": "R", +"G": "V", +"Color": "Couleur", +"Right to left": "Droite \u00e0 gauche", +"Left to right": "Gauche \u00e0 droite", +"Emoticons": "Emotic\u00f4nes", +"Robots": "Robots", +"Document properties": "Propri\u00e9t\u00e9 du document", +"Title": "Titre", +"Keywords": "Mots-cl\u00e9s", +"Encoding": "Encodage", +"Description": "Description", +"Author": "Auteur", +"Fullscreen": "Plein \u00e9cran", +"Horizontal line": "Ligne horizontale", +"Horizontal space": "Espacement horizontal", +"Insert\/edit image": "Ins\u00e9rer\/modifier une image", +"General": "G\u00e9n\u00e9ral", +"Advanced": "Avanc\u00e9", +"Source": "Source", +"Border": "Bordure", +"Constrain proportions": "Conserver les proportions", +"Vertical space": "Espacement vertical", +"Image description": "Description de l'image", +"Style": "Style", +"Dimensions": "Dimensions", +"Insert image": "Ins\u00e9rer une image", +"Zoom in": "Zoomer", +"Contrast": "Contraste", +"Back": "Retour", +"Gamma": "Gamma", +"Flip horizontally": "Retournement horizontal", +"Resize": "Redimensionner", +"Sharpen": "Affiner", +"Zoom out": "D\u00e9zoomer", +"Image options": "Options de l'image", +"Apply": "Appliquer", +"Brightness": "Luminosit\u00e9", +"Rotate clockwise": "Rotation horaire", +"Rotate counterclockwise": "Rotation anti-horaire", +"Edit image": "Modifier l'image", +"Color levels": "Niveaux de couleur", +"Crop": "Rogner", +"Orientation": "Orientation", +"Flip vertically": "Retournement vertical", +"Invert": "Inverser", +"Insert date\/time": "Ins\u00e9rer date\/heure", +"Remove link": "Enlever le lien", +"Url": "Url", +"Text to display": "Texte \u00e0 afficher", +"Anchors": "Ancres", +"Insert link": "Ins\u00e9rer un lien", +"New window": "Nouvelle fen\u00eatre", +"None": "n\/a", +"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre un lien externe. Voulez-vous ajouter le pr\u00e9fixe http:\/\/ n\u00e9cessaire?", +"Target": "Cible", +"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre une adresse e-mail. Voulez-vous ajouter le pr\u00e9fixe mailto: n\u00e9cessaire?", +"Insert\/edit link": "Ins\u00e9rer\/modifier un lien", +"Insert\/edit video": "Ins\u00e9rer\/modifier une vid\u00e9o", +"Poster": "Publier", +"Alternative source": "Source alternative", +"Paste your embed code below:": "Collez votre code d'int\u00e9gration ci-dessous :", +"Insert video": "Ins\u00e9rer une vid\u00e9o", +"Embed": "Int\u00e9grer", +"Nonbreaking space": "Espace ins\u00e9cable", +"Page break": "Saut de page", +"Paste as text": "Coller comme texte", +"Preview": "Pr\u00e9visualiser", +"Print": "Imprimer", +"Save": "Enregistrer", +"Could not find the specified string.": "Impossible de trouver la cha\u00eene sp\u00e9cifi\u00e9e.", +"Replace": "Remplacer", +"Next": "Suiv", +"Whole words": "Mots entiers", +"Find and replace": "Trouver et remplacer", +"Replace with": "Remplacer par", +"Find": "Chercher", +"Replace all": "Tout remplacer", +"Match case": "Respecter la casse", +"Prev": "Pr\u00e9c ", +"Spellcheck": "V\u00e9rification orthographique", +"Finish": "Finie", +"Ignore all": "Tout ignorer", +"Ignore": "Ignorer", +"Add to Dictionary": "Ajouter au dictionnaire", +"Insert row before": "Ins\u00e9rer une ligne avant", +"Rows": "Lignes", +"Height": "Hauteur", +"Paste row after": "Coller la ligne apr\u00e8s", +"Alignment": "Alignement", +"Border color": "Couleur de la bordure", +"Column group": "Groupe de colonnes", +"Row": "Ligne", +"Insert column before": "Ins\u00e9rer une colonne avant", +"Split cell": "Diviser la cellule", +"Cell padding": "Espacement interne cellule", +"Cell spacing": "Espacement inter-cellulles", +"Row type": "Type de ligne", +"Insert table": "Ins\u00e9rer un tableau", +"Body": "Corps", +"Caption": "Titre", +"Footer": "Pied", +"Delete row": "Effacer la ligne", +"Paste row before": "Coller la ligne avant", +"Scope": "Etendue", +"Delete table": "Supprimer le tableau", +"H Align": "Alignement H", +"Top": "Haut", +"Header cell": "Cellule d'en-t\u00eate", +"Column": "Colonne", +"Row group": "Groupe de lignes", +"Cell": "Cellule", +"Middle": "Milieu", +"Cell type": "Type de cellule", +"Copy row": "Copier la ligne", +"Row properties": "Propri\u00e9t\u00e9s de la ligne", +"Table properties": "Propri\u00e9t\u00e9s du tableau", +"Bottom": "Bas", +"V Align": "Alignement V", +"Header": "En-t\u00eate", +"Right": "Droite", +"Insert column after": "Ins\u00e9rer une colonne apr\u00e8s", +"Cols": "Colonnes", +"Insert row after": "Ins\u00e9rer une ligne apr\u00e8s", +"Width": "Largeur", +"Cell properties": "Propri\u00e9t\u00e9s de la cellule", +"Left": "Gauche", +"Cut row": "Couper la ligne", +"Delete column": "Effacer la colonne", +"Center": "Centr\u00e9", +"Merge cells": "Fusionner les cellules", +"Insert template": "Ajouter un th\u00e8me", +"Templates": "Th\u00e8mes", +"Background color": "Couleur d'arri\u00e8re-plan", +"Custom...": "Personnalis\u00e9...", +"Custom color": "Couleur personnalis\u00e9e", +"No color": "Aucune couleur", +"Text color": "Couleur du texte", +"Show blocks": "Afficher les blocs", +"Show invisible characters": "Afficher les caract\u00e8res invisibles", +"Words: {0}": "Mots : {0}", +"Insert": "Ins\u00e9rer", +"File": "Fichier", +"Edit": "Editer", +"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Zone Texte Riche. Appuyer sur ALT-F9 pour le menu. Appuyer sur ALT-F10 pour la barre d'outils. Appuyer sur ALT-0 pour de l'aide.", +"Tools": "Outils", +"View": "Voir", +"Table": "Tableau", +"Format": "Format" +}); \ No newline at end of file diff --git a/Html/js/passwd.js b/Html/js/passwd.js new file mode 100644 index 0000000..8d79fd4 --- /dev/null +++ b/Html/js/passwd.js @@ -0,0 +1,81 @@ +// Password strength meter +// This jQuery plugin is written by firas kassem [2007.04.05] +// Firas Kassem phiras.wordpress.com || phiras at gmail {dot} com +// for more information : http://phiras.wordpress.com/2007/04/08/password-strength-meter-a-jquery-plugin/ + +var shortPass = 'Mot de passe très faible' +var badPass = 'Mot de passe faible' +var goodPass = 'Mot de passe bon' +var strongPass = 'Mot de passe très bon' + + + +function passwordStrength(password,username) +{ + score = 0 + + //password < 4 + if (password.length < 4 ) { return shortPass } + + //password == username + if (password.toLowerCase()==username.toLowerCase()) return badPass + + //password length + score += password.length * 4 + score += ( checkRepetition(1,password).length - password.length ) * 1 + score += ( checkRepetition(2,password).length - password.length ) * 1 + score += ( checkRepetition(3,password).length - password.length ) * 1 + score += ( checkRepetition(4,password).length - password.length ) * 1 + + //password has 3 numbers + if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) score += 5 + + //password has 2 sybols + if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) score += 5 + + //password has Upper and Lower chars + if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) score += 10 + + //password has number and chars + if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) score += 15 + // + //password has number and symbol + if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) score += 15 + + //password has char and symbol + if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) score += 15 + + //password is just a nubers or chars + if (password.match(/^\w+$/) || password.match(/^\d+$/) ) score -= 10 + + //verifing 0 < score < 100 + if ( score < 0 ) score = 0 + if ( score > 100 ) score = 100 + + if (score < 34 ) return badPass + if (score < 68 ) return goodPass + return strongPass +} + + +// checkRepetition(1,'aaaaaaabcbc') = 'abcbc' +// checkRepetition(2,'aaaaaaabcbc') = 'aabc' +// checkRepetition(2,'aaaaaaabcdbcd') = 'aabcd' + +function checkRepetition(pLen,str) { + res = "" + for ( i=0; iprepare('SELECT licenceID, licenceTitle FROM blog_licences WHERE licenceSlug = :licenceSlug'); +$stmt->bindValue(':licenceSlug', $_GET['id'], PDO::PARAM_INT); +$stmt->execute(); +$row = $stmt->fetch(); + +/* +//if post does not exists redirect user. +if($row['licenceID'] == ''){ + header('Location: ./'); + exit; +} +*/ +if (!isset($row['licenceID']) || empty($row['licenceID'])) { + header('Location: ./'); + exit(); +} + +elseif (!filter_var($row['licenceID'], FILTER_VALIDATE_INT)) { + header('Location: ./'); + exit(); +} + +$pagetitle = 'Licence : '.html($row['licenceTitle']); + +include_once('includes/header.php'); + +define("_BBC_PAGE_NAME", $pagetitle); +define("_BBCLONE_DIR", "bbclone/"); +define("COUNTER", _BBCLONE_DIR."mark_page.php"); +if (is_readable(COUNTER)) include_once(COUNTER); +?> + + +

    + + + +
    +
    + + + +
    + + + prepare('SELECT blog_posts_seo.postID FROM blog_posts_seo, blog_post_licences WHERE blog_posts_seo.postID = blog_post_licences.postID_BPL AND blog_post_licences.licenceID_BPL = :licenceID'); + $stmt->execute(array(':licenceID' => $row['licenceID'])); + + $count = $stmt->rowCount(); + + + //pass number of records to + $pages->set_total($stmt->rowCount()); + + $stmt = $db->prepare(' + SELECT + blog_posts_seo.postID, blog_posts_seo.postTitle, blog_posts_seo.postAuthor, blog_posts_seo.postSlug, blog_posts_seo.postDesc, blog_posts_seo.postDate + FROM + blog_posts_seo, + blog_post_licences + WHERE + blog_posts_seo.postID = blog_post_licences.postID_BPL + AND blog_post_licences.licenceID_BPL = :licenceID + ORDER BY + postID DESC + '.$pages->get_limit()); + $stmt->execute(array(':licenceID' => $row['licenceID'])); + + echo '

    '.$row['licenceTitle'].'

    '; + + if (empty($count)) { + echo '

    Aucun torrent pour cette licence.

    '; + } + + while($row1 = $stmt->fetch()){ + + echo '
    '; + echo ''.html($row1['postTitle']).''; + echo '
    Posté le '.date_fr('l j F Y à H:i:s', strtotime($row1['postDate'])).' par '; + + $stmt2 = $db->prepare('SELECT catTitle, catSlug FROM blog_cats, blog_post_cats WHERE blog_cats.catID = blog_post_cats.catID AND blog_post_cats.postID = :postID'); + $stmt2->execute(array(':postID' => $row1['postID'])); + $catRow = $stmt2->fetchAll(PDO::FETCH_ASSOC); + + echo html($row1['postAuthor']).' dans '; + + $links = array(); + foreach ($catRow as $cat) + { + $links[] = "".$cat['catTitle'].""; + } + echo implode(", ", $links); + + echo '
    '; + + } + + echo '

    '; + echo $pages->page_links('l-'.html($_GET['id']).'&'); + + } catch(PDOException $e) { + echo $e->getMessage(); + } + + ?> +
    + + + +
    +
    +
    + + + + + diff --git a/Html/mailer.php b/Html/mailer.php new file mode 100644 index 0000000..88230c9 --- /dev/null +++ b/Html/mailer.php @@ -0,0 +1,28 @@ + + diff --git a/Html/membres.php b/Html/membres.php new file mode 100644 index 0000000..a91ed3c --- /dev/null +++ b/Html/membres.php @@ -0,0 +1,161 @@ + + + + +
    + + + +
    +
    + + + + + Votre compte est en cours de création.
    Vous allez recevoir, par e-mail, un lien afin de l\'activer.
    '; + } + + if(isset($_GET['action']) && $_GET['action'] == 'noexistmember'){ + echo '
    Erreur : ce membre n\'existe pas.
    '; + } + ?> + +
    +
    +

    Rechercher un membre :

    +
    + + +
    +
    +
    + +
    +
    Liste des membres :
    +
    + + + + + + + + + + + query('SELECT memberID FROM blog_members'); + $pages->set_total($stmt->rowCount()); + + // On met en place le tri + if(isset($_GET['tri'])) { + $tri = html($_GET['tri']); + } + else { + $memberID_tri = 'memberID'; + $tri = html($memberID_tri); + } + + if(isset($_GET['ordre'])) { + $ordre = html($_GET['ordre']); + } + else { + $ordre_tri = 'DESC'; + $ordre = html($ordre_tri); + } + + // Protection du tri ------------------------- + if (!empty($_GET['tri']) && !in_array($_GET['tri'], array('memberID','username', 'memberDate', 'uploaded', 'downloaded'))) { + header('Location: index.php'); + exit(); + } + + if (!empty($_GET['ordre']) && !in_array($_GET['ordre'], array('asc','desc','ASC','DESC'))) { + header('Location: index.php'); + exit(); + } + + + // -------------------------------------------- + + $stmt = $db->query('SELECT * FROM blog_members,xbt_users WHERE blog_members.memberID=xbt_users.uid AND blog_members.username != "visiteur" AND blog_members.active = "yes" ORDER BY '.$tri.' '.$ordre.' '.$pages->get_limit()); + while($row = $stmt->fetch()){ + + echo ''; + + if (!empty($row['avatar'])) { + echo ''; + } + else { + echo ''; + } + + sscanf($row['memberDate'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde); + echo ''; + echo ''; + echo ''; + + if (intval($row["downloaded"])>0) { + $ratio=number_format($row["uploaded"]/$row["downloaded"],2); + } + else { + $ratio='∞'; + } + + echo ''; + echo ''; + + } + + + } catch(PDOException $e) { + echo $e->getMessage(); + } + ?> +
    PseudoInscription leEnvoyéTéléchargéRatio
    '.html($row['username']).''.html($row['username']).''.html($row['username']).''.html($row['username']).''.$jour.'-'.$mois.'-'.$annee.' à '.$heure.':'.$minute.':'.$seconde.''.makesize($row['uploaded']).''.makesize($row['downloaded']).''.$ratio.'
    + + page_links('?tri='.$tri.'&ordre='.$ordre.'&'); + ?> + +
    + + + +
    +
    +
    + + + + + diff --git a/Html/messages_envoyer.php b/Html/messages_envoyer.php new file mode 100644 index 0000000..153d12f --- /dev/null +++ b/Html/messages_envoyer.php @@ -0,0 +1,136 @@ +is_logged_in()) { + header('Location: login.php'); +} + +$pagetitle = 'Messagerie'; + +include_once('includes/header.php'); + +define("_BBC_PAGE_NAME", $pagetitle); +define("_BBCLONE_DIR", "stats/"); +define("COUNTER", _BBCLONE_DIR."mark_page.php"); +if (is_readable(COUNTER)) include_once(COUNTER); +?> + + + +
    + + + +
    + +
    + +prepare('INSERT INTO blog_messages (messages_id_expediteur,messages_id_destinataire,messages_date,messages_titre,messages_message) VALUES (:messages_id_expediteur,:messages_id_destinataire,:messages_date,:messages_titre,:messages_message)'); + $stmt->execute(array( + ':messages_id_expediteur' => html($_SESSION['userid']), + ':messages_id_destinataire' => html($_POST['destinataire']), + ':messages_date' => date("Y-m-d H:i:s"), + ':messages_titre' => html($_POST['titre']), + ':messages_message' => html($_POST['message']) + )); + + header('Location: '.SITEURL.'/admin/messagerie.php?membre='.html($_SESSION['username']).'&message=ok'); + $stmt->closeCursor(); + exit(); + } +} +?> + + +prepare('SELECT username as nom_destinataire, memberID as id_destinataire FROM blog_members WHERE memberID <> :session AND memberID != 32 ORDER BY username ASC'); +$desti->bindValue(':session', $_SESSION['userid'], PDO::PARAM_INT); +$desti->execute(); + +?> + +
    +Pour :
    + + '; + echo ''; + echo ''; + } + + else { + echo ''; + } + ?> +
    + +
    + +ERREUR : '.$error.'
    '; + } +} +?> + +Rechercher un membre +
    +
    + +Titre :
    + +

    +Message :
    + + + +closeCursor(); +?> + + +
    + + + +
    +
    +
    + + + + + diff --git a/Html/messages_lire.php b/Html/messages_lire.php new file mode 100644 index 0000000..c24c4fd --- /dev/null +++ b/Html/messages_lire.php @@ -0,0 +1,133 @@ +is_logged_in()) { + header('Location: admin/login.php'); +} + +$pagetitle = 'Messagerie'; + +include_once('includes/header.php'); + +define("_BBC_PAGE_NAME", $pagetitle); +define("_BBCLONE_DIR", "stats/"); +define("COUNTER", _BBCLONE_DIR."mark_page.php"); +if (is_readable(COUNTER)) include_once(COUNTER); +?> + + + +
    + + + +
    + +
    + + Accueil > '); + for($i=1; $i"; + } + else $prChunks[0]=$dChunks[$i] . ' > '; + echo('">'); + echo(str_replace("_" , " " , $prChunks[0])); + } +?> + +
    + + prepare('SELECT blog_messages.messages_titre, blog_messages.messages_date, blog_messages.messages_message, blog_members.memberID as memberid, blog_members.username as expediteur FROM blog_messages, blog_members WHERE blog_messages.messages_id_destinataire = :userid AND blog_messages.messages_id_expediteur = blog_members.memberID AND blog_messages.messages_id = :id_message'); + $stmtmess->execute(array( + ':userid' => html($_SESSION['userid']), + ':id_message' => html($_GET['id_message']) + )); + + $nb = $stmtmess->rowCount(); + + if ($nb == 0) { + $error[] = 'Ce message n\'existe pas...'; + } + else { + // si le message a été trouvé, on l'affiche + $data = $stmtmess->fetch(); + echo '
    '; + echo '

    Message de : '.html($data['expediteur']).'

    '; + echo '
    '; + echo '
    '; + sscanf($data['messages_date'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde); + echo 'Le : '.$jour.'-'.$mois.'-'.$annee.' à '.$heure.':'.$minute.':'.$seconde.'
    '; + echo '
    '; + echo '
    '; + echo 'Titre : '.html($data['messages_titre']).'
    '; + echo '
    '; + echo '
    '; + echo 'Message :
    '.nl2br(trim(bbcode($data['messages_message']))).'
    '; + echo '
    '; + + echo '

    '; + // on affiche un lien pour répondre au message + echo ' '; + // on affiche également un lien permettant de supprimer ce message de la boite de réception + echo ''; + echo '

    '; + } + $stmtmess->closeCursor(); + } + + // On met à jour le champ "messages_lu" de blog_messages à 1 pour signifier que le message a été lu + $stmt = $db->prepare('UPDATE blog_messages SET messages_lu = "1" WHERE messages_id = :messages_id'); + $stmt->execute(array( + ':messages_id' => $_GET['id_message'] + )); + + + //S'il y a des erreurs, on les affiche + if(isset($error)){ + foreach($error as $error){ + echo '

    ERREUR : '.$error.'

    '; + } + } + ?> + + + +
    + + + +
    +
    +
    + + + + + diff --git a/Html/messages_repondre.php b/Html/messages_repondre.php new file mode 100644 index 0000000..8df516b --- /dev/null +++ b/Html/messages_repondre.php @@ -0,0 +1,96 @@ +is_logged_in()) { + header('Location: login.php'); +} + +$pagetitle = 'Messagerie'; + +include_once('includes/header.php'); + +?> + + + +
    + + + +
    + +
    + +prepare('INSERT INTO blog_messages (messages_id_expediteur,messages_id_destinataire,messages_date,messages_titre,messages_message) VALUES (:messages_id_expediteur,:messages_id_destinataire,:messages_date,:messages_titre,:messages_message)'); + $stmt->execute(array( + ':messages_id_expediteur' => html($_SESSION['userid']), + ':messages_id_destinataire' => html($_POST['id_destinataire']), + ':messages_date' => date("Y-m-d H:i:s"), + ':messages_titre' => html($_POST['titre']), + ':messages_message' => html($_POST['message']) + )); + + header('Location: '.SITEURL.'/admin/profil.php?membre='.html($_SESSION['username']).'&message=ok'); + //$stmt->closeCursor(); + //exit(); + } +} + +//S'il y a des erreurs, on les affiche +if(isset($error)){ + foreach($error as $error){ + echo '
    ERREUR : '.$error.'
    '; + } +} +?> + +prepare('SELECT * FROM blog_messages LEFT JOIN blog_members ON blog_members.memberID = blog_messages.messages_id_expediteur WHERE messages_id = :message_id'); +$desti->execute(array( + ':message_id' => html($_GET['id_message']) +)); +$data = $desti->fetch(); +?> + +
    + + Répondre à : +

    + Titre : +

    + Message : + +
    + +
    + + + +
    +
    +
    + + + + + diff --git a/Html/messages_supprimer.php b/Html/messages_supprimer.php new file mode 100644 index 0000000..b35b935 --- /dev/null +++ b/Html/messages_supprimer.php @@ -0,0 +1,23 @@ +is_logged_in()) { + header('Location: login.php'); +} + +// on teste si l'id du message a bien été fourni en argument au script messages_envoyer.php +if (!isset($_GET['id_message']) || empty($_GET['id_message'])) { + header('Location: '.SITEURL.'/admin/messagerie.php?membre='.html($_SESSION['username'])); + exit(); +} +else { + $stmt = $db->prepare('DELETE FROM blog_messages WHERE messages_id = :messages_id AND messages_id_destinataire = :messages_id_destinataire'); + $stmt->execute(array( + ':messages_id' => html($_GET['id_message']), + ':messages_id_destinataire' => html($_SESSION['userid']) + )); + + header('Location: '.SITEURL.'/admin/messagerie.php?membre='.html($_SESSION['username']).'&action=messupprime'); + exit(); +} +?> diff --git a/Html/peers.php b/Html/peers.php new file mode 100644 index 0000000..9593551 --- /dev/null +++ b/Html/peers.php @@ -0,0 +1,270 @@ + + + + +
    + + + +
    +
    + + + +
    + + prepare('SELECT postTitle FROM blog_posts_seo WHERE postHash = :hash'); + $stmt->bindValue(':hash', $hash, PDO::PARAM_INT); + $stmt->execute(); + $row = $stmt->fetch(); + ?> + +

    Torrent :

    + + + + + + + + + + + + + + prepare(' + SELECT xal.id,xal.ipa,xal.port,xal.peer_id,xal.downloaded down,xal.uploaded up,xal.uid,xfu.mtime time,b.username, IF(xal.left0=0,"seeder","leecher") as status + FROM xbt_announce_log xal + LEFT JOIN blog_members b ON b.memberID = xal.uid + LEFT JOIN xbt_files xf ON xf.info_hash = xal.info_hash + LEFT JOIN blog_posts_seo bps ON bps.postID = xf.fid + LEFT JOIN xbt_files_users xfu ON xfu.fid = xf.fid + WHERE bps.postHash = :postHash AND xfu.active = 1 AND xal.mtime < (UNIX_TIMESTAMP() - 30) + GROUP BY xal.ipa + ORDER BY status DESC + '); + $stmt->bindValue(':postHash', $hash, PDO::PARAM_INT); + $stmt->execute(); + + while($row = $stmt->fetch()) { + + // on trouve le client bittorrent + $peer = substr($row['peer_id'], 1, 2); + + if($peer == 'AZ') { + $client = 'Azureus'; + } + if($peer == 'AX') { + $client = 'AnalogX'; + } + elseif($peer == 'AG') { + $client = 'Ares'; + } + if($peer == 'BB') { + $client = 'BitBuddy'; + } + elseif($peer == 'BC') { + $client = 'BitComet'; + } + elseif($peer == 'BP') { + $client = 'Bittorrent Pro'; + } + elseif($peer == 'BT') { + $client = 'BBtor'; + } + elseif($peer == 'DE') { + $client = 'Deluge Torrent'; + } + elseif($peer == 'FX') { + $client = 'Freebox BitTorrent'; + } + elseif($peer == 'HL') { + $client = 'Halite'; + } + elseif($peer == 'HM') { + $client = 'hMule'; + } + elseif($peer == 'IL') { + $client = 'iLivid'; + } + elseif($peer == 'JT') { + $client = 'JavaTorrent'; + } + elseif($peer == 'KT') { + $client = 'KTorrent'; + } + elseif($peer == 'KG') { + $client = 'KGet'; + } + elseif($peer == 'LT') { + $client = 'libTorrent'; + } + elseif($peer == 'lt') { + $client = 'rTorrent'; + } + elseif($peer == 'LP') { + $client = 'Lphant'; + } + elseif($peer == 'LW') { + $client = 'LimeWire'; + } + elseif($peer == 'MO') { + $client = 'MonoTorrent'; + } + elseif($peer == 'MT') { + $client = 'MoonlightTorrent'; + } + elseif($peer == 'NB') { + $client = 'Net::Bittorent'; + } + elseif($peer == 'NX') { + $client = 'Net Transport'; + } + elseif($peer == 'OS') { + $client = 'OneSwarm'; + } + elseif($peer == 'OT') { + $client = 'Omega Torrent'; + } + elseif($peer == 'PB') { + $client = 'Protocol::BitTorrent'; + } + elseif($peer == 'PT') { + $client = 'PHPTracker'; + } + elseif($peer == 'qB') { + $client = 'qBittorrent'; + } + elseif($peer == 'SP') { + $client = 'BitSpirit'; + } + elseif($peer == 'st') { + $client = 'Sharktorrent'; + } + elseif($peer == 'SZ') { + $client = 'Shareaza'; + } + elseif($peer == 'TB') { + $client = 'Torch'; + } + elseif($peer == 'TIX') { + $client = 'Tixati'; + } + elseif($peer == 'TL') { + $client = 'Tribler'; + } + elseif($peer == 'TR') { + $client = 'Transmission'; + } + elseif($peer == 'TS') { + $client = 'Torrentstorm'; + } + elseif($peer == 'UM') { + $client = 'µTorrent for MAC'; + } + elseif($peer == 'UT') { + $client = 'µTorrent'; + } + elseif($peer == 'WD') { + $client = 'WebTorrent Desktop'; + } + elseif($peer == 'WT') { + $client = 'BitLet'; + } + elseif($peer == 'WW') { + $client = 'WebTorrent'; + } + elseif($peer == 'WY') { + $client = 'FireTorrent'; + } + elseif($peer == 'XT') { + $client = 'XanTorrent'; + } + elseif($peer == 'XX') { + $client = 'Xtorrent'; + } + elseif($peer == 'ZT') { + $client = 'ZipTorrent'; + } + + else { + $client = 'Client inconnu'; + } + + echo ''; + echo ''; + + if ($row['status'] == 'leecher') { + echo ''; + } + elseif ($row['status'] == 'seeder') { + echo ''; + } + + echo ''; + echo ''; + echo ''; + echo ''; + + //Peer Ratio + if (intval($row["down"])>0) { + $ratio=number_format($row["up"]/$row["down"],2); + } + else { + $ratio='∞'; + } + echo ''; + echo ''; + echo ''; + } + ?> + +
    PseudoStatutClientPortTéléchargéUploadéRatioMis à jour
    '.html($row['username']).'leecherseeder'.$client.''.$row['port'].''.makesize($row['down']).''.makesize($row['up']).''.$ratio.''.get_elapsed_time($row['time']).'
    + +
    + + + +
    +
    +
    + + + + + + + diff --git a/Html/recherche-membres.php b/Html/recherche-membres.php new file mode 100644 index 0000000..54c62c1 --- /dev/null +++ b/Html/recherche-membres.php @@ -0,0 +1,103 @@ + + + + +
    + + + +
    +
    + + + +

    + + prepare('SELECT * FROM blog_members WHERE username LIKE :requete AND username != "Visiteur" ORDER BY memberID DESC'); + $req->execute(array('requete' => '%'.$requete.'%')); + + $nb_resultats = $req->rowCount(); + if($nb_resultats != 0) { + ?> +

    Résultats de votre recherche de membre

    +

    Nous avons trouvé 1) { echo ' résultats :'; } else { echo ' résultat :'; } + ?> +
    + +

      + fetch()) + { + ?> +
    • + + +
    + + + + + +

    Pas de résultat

    +

    Nous n'avons trouvé aucun pseudo de membre pour votre requête : "". +

    +

    + + closeCursor(); // on ferme mysql + } + else + { // formulaire html + ?> + +

    Vous allez faire une recherche sur notre site concernant les membres inscrits. Tapez une requête pour réaliser une recherche.

    +
    + + +
    + + + +
    + + + +
    +
    +
    + + + + + diff --git a/Html/recherche.php b/Html/recherche.php new file mode 100644 index 0000000..45ca4f6 --- /dev/null +++ b/Html/recherche.php @@ -0,0 +1,116 @@ + + + + +
    + + + +
    +
    + + + +
    + + prepare('SELECT * FROM blog_posts_seo WHERE postTitle LIKE :requete ORDER BY postDate DESC'); + $req->execute(array('requete' => '%'.$requete.'%')); + + $nb_resultats = $req->rowCount(); + if($nb_resultats != 0) { + ?> + Résultats de votre recherche de torrents +

    Nous avons trouvé + 1) { + echo ' résultats :'; + } + else { + echo ' résultat :'; + } + ?> +
    + + + + fetch()) + { + ?> + + + + + +
    Nom du torrent
    + + + + + +

    Aucun résultat ! ;(

    +

    Nous n'avons trouvé aucun résultat pour votre requête "". + +

    + + closeCursor(); // on ferme mysql + } + else + { // formulaire html + ?> + +

    Vous allez faire une recherche sur notre site concernant les noms des torrents. Tapez une requête pour réaliser une recherche.

    +
    + + +
    + + + + +
    + + + +
    +
    +
    + + + + + diff --git a/Html/robots.txt b/Html/robots.txt new file mode 100644 index 0000000..9aed807 --- /dev/null +++ b/Html/robots.txt @@ -0,0 +1,7 @@ +User-agent: * +Disallow: /admin +Disallow: /stats +Disallow: /js +Disallow: /classes +Disallow: /includes +Disallow: /bbclone diff --git a/Html/rss.php b/Html/rss.php new file mode 100644 index 0000000..2a002ec --- /dev/null +++ b/Html/rss.php @@ -0,0 +1,55 @@ +'; + +require_once("includes/config.php"); + +//Titre de la page +$pagetitle = 'Flux RSS'; + +//Stats : bbclone +define("_BBC_PAGE_NAME", $pagetitle); +define("_BBCLONE_DIR", "bbclone/"); +define("COUNTER", _BBCLONE_DIR."mark_page.php"); +if (is_readable(COUNTER)) include_once(COUNTER); +?> + + + + + + <?php echo SITEURL; ?> + fr + + + + + + + query("SELECT * FROM blog_posts_seo,xbt_files WHERE blog_posts_seo.postID = xbt_files.fid ORDER BY postDate DESC LIMIT 10"); + while($data = $stmt->fetch()) { + $id=html($data['postID']); + $filename = preg_replace(array('//', '/"/'), array('<', '>', '"'), $data['postTitle']); + $seeders = strip_tags($data['seeders']); + $leechers = strip_tags($data['leechers']); + $desc = nl2br(bbcode($data['postDesc'])); + $torrent = html($data['postTorrent']); + $f= rawurlencode(html($data['postTitle'])); + $taille = strip_tags($data['postTaille']); + + // on affiche dans le navigateur + echo "\n"; + echo "<![CDATA[$filename [seeders ($seeders)/leechers ($leechers)]]]>\n"; + echo "".SITEURL."/".$data['postSlug']."\n"; + echo "".SITEURL."/".$data['postSlug']."\n"; + echo "\n"; + echo ""; + echo "".$data["postDate"]." GMT\n"; + echo "\n"; + } + ?> + + diff --git a/Html/sidebar.php b/Html/sidebar.php new file mode 100644 index 0000000..76e889a --- /dev/null +++ b/Html/sidebar.php @@ -0,0 +1,441 @@ +'; + + + /**** compteur de visites ***/ + // ETAPE 1 : on vérifie si l'IP se trouve déjà dans la table + // Pour faire ça, on n'a qu'à compter le nombre d'entrées dont le champ "ip" est l'adresse ip du visiteur + $stmt5 = $db->prepare('SELECT COUNT(*) AS nbre_entrees FROM compteur WHERE ip = :adresseip'); + $stmt5->execute(array( + ':adresseip' => $_SERVER['REMOTE_ADDR'] + )); + $donnees2 = $stmt5->fetch(); + + if ($donnees2['nbre_entrees'] == 0) // L'ip ne se trouve pas dans la table, on va l'ajouter + { + $stmt6 = $db->prepare('INSERT INTO compteur VALUES (:adresseip, :time)'); + $stmt6->execute(array( + ':adresseip' => $_SERVER['REMOTE_ADDR'], + ':time' => time() + )); + } + + else // L'ip se trouve déjà dans la table, on met juste à jour le timestamp + { + $stmt7 = $db->prepare('UPDATE compteur SET timestamp = :timestamp WHERE ip = :adresseip'); + $stmt7->execute(array( + ':timestamp' => time(), + ':adresseip' => $_SERVER['REMOTE_ADDR'] + )); + } + + $jour = date('d'); + $mois = date('m'); + $annee = date('Y'); + $aujourd_hui = mktime(0, 0, 0, $mois, $jour, $annee); + + $stmt8 = $db->prepare('SELECT COUNT(*) AS nbre_entrees FROM compteur WHERE timestamp > :timestamp'); + $stmt8->execute(array( + ':timestamp' => $aujourd_hui + )); + $donnees3 = $stmt8->fetch(); + + echo '
  • Visites aujourd\'hui : '.$donnees3['nbre_entrees'].'
  • '; + + $stmt9 = $db->query('SELECT COUNT(*) AS nbre_entrees FROM compteur'); + $donnees4 = $stmt9->fetch(); + echo '
  • Visites totales : ' . $donnees4['nbre_entrees'].'
  • '; + + /**** Fin compteur de visites ****/ + ?> + + + + +
    + Tracker +
      + query('SELECT info_hash, sum(completed) completed, sum(leechers) leechers, sum(seeders) seeders, sum(leechers or seeders) torrents FROM xbt_files'); + $result = $stmt->fetch(); + + $result['peers'] = $result['leechers'] + $result['seeders']; + + echo ''; + + echo ''; + echo ''; + + if ($result['peers']) + { + printf(''); + printf(''); + } + + echo ''; + + //$nbr = mysql_query("SELECT id_torr FROM torrents"); + //$nbrtorrents = mysql_num_rows($nbr); + $stmt = $db->query('SELECT postID FROM blog_posts_seo'); + $nbrtorrents =$stmt->rowCount(); + + printf(''); + + //$res = mysql_query("select sum(downloaded) as down, sum(uploaded) as up from xbt_users"); + //$row = mysql_fetch_array($res); + $stmt = $db->query('SELECT sum(downloaded) as down, sum(uploaded) as up FROM xbt_users'); + $row = $stmt->fetch(); + + $dled=makesize($row['down']); + $upld=makesize($row['up']); + $traffic=makesize($row['down'] + $row['up']); + + printf(''); + printf(''); + printf(''); + + echo '
      Torrents téléchargés : '. $result['completed']. '
      Clients : '. $result['peers']. '
      Leechs : %d (%d %%)', $result['leechers'], $result['leechers'] * 100 / $result['peers'], '
      Seeds : %d (%d %%)', $result['seeders'], $result['seeders'] * 100 / $result['peers'], '
      Torrents actifs : '. $result['torrents']. '
      Torrents total : %d', $nbrtorrents ,'
      Download total : '. $dled. '
      Upload total : '. $upld. '
      Trafic total : '. $traffic. '
      '; + ?> +
    +
    + + + +
  • +
    +

    Liens web

    + +
    +
  • + + +
    diff --git a/Html/style/.htaccess b/Html/style/.htaccess new file mode 100644 index 0000000..5a928f6 --- /dev/null +++ b/Html/style/.htaccess @@ -0,0 +1 @@ +Options -Indexes diff --git a/Html/style/bootstrap.min.css b/Html/style/bootstrap.min.css new file mode 100644 index 0000000..d65c66b --- /dev/null +++ b/Html/style/bootstrap.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.33px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:3;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/Html/style/main.css b/Html/style/main.css new file mode 100644 index 0000000..a5b2599 --- /dev/null +++ b/Html/style/main.css @@ -0,0 +1,872 @@ +@charset "UTF-8"; + +@import url(https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,900,700italic,900italic); + +body { + background: #030200 url('../images/back3.png') center top fixed; + margin:0; + padding:0; + font-family: 'Roboto',sans-serif; + font-size: 14px; +} + +html,body { + height:100% +} + +* { + margin:0; + padding:0; +} + +/** element defaults **/ +table { + width: 100%; + text-align: left; +} + +th, td { + padding: 10px 10px; +} + +th { + color: #fff; + background: #E66000 none repeat-x scroll left top; +} + +td { + border-bottom: 1px solid #ccc; +} + +table tr { + font-family: sans-serif; + background-color: #fff; + padding-left:10px; + padding-right:10px; + vertical-align: middle; + font-size: 12px; +} + +table tr:nth-child(2n+2) { + font-family: sans-serif; + background-color: #e9e9e9; + padding-left:10px; + padding-right:10px; + vertical-align: middle; + font-size: 12px; +} + + +code, blockquote { + display: block; + border-left: 5px solid #222; + padding: 10px; + margin-bottom: 20px; +} + +code { + background-color: #222; + color:#ccc; + border: none; +} + +blockquote { + border-left: 5px solid #222; +} + + +blockquote p { + font-style: italic; + font-family: Georgia, "Times New Roman", Times, serif; + margin: 0; + color: #333; + height: 1%; +} + +p { + line-height: 1.9em; + margin-bottom: 20px; + font-size: 12px; +} + +a { + color: #D1700E; + text-decoration: none; +} + +a:hover { + color: #1F4F82; +} + +a:focus { + outline: none; +} + +fieldset { + display: block; + border: none; + border-top: 1px solid #ccc; +} + +fieldset legend { + font-weight: bold; + font-size: 13px; + padding-right: 10px; + color: #333; +} + +fieldset form { + padding-top: 15px; +} + +fieldset p label { + float: left; + width: 150px; +} + +form input, form select, form textarea { + padding: 5px; + color: #333333; + border: 1px solid #ddd; + border-right:1px solid #ccc; + border-bottom:1px solid #ccc; + background-color:#fff; + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; +} + +form input.formbutton { + border: none; + background: #333; + color: #ffffff; + font-weight: bold; + padding: 5px 10px; + font-size: 12px; + font-family: Tahoma, Geneva, sans-serif; + letter-spacing: 1px; + width: auto; + overflow: visible; +} + +.button { + border: none; + background: #333; + color: #ffffff; + font-weight: bold; + padding: 3px 10px; + font-size: 10px; + font-family: Tahoma, Geneva, sans-serif; + letter-spacing: 1px; + width: auto; + overflow: visible; +} + +.button_suite { + margin-bottom: 15px; + float: right; +} + +.button_suite a { + color: #3494A3; + background: #D0EDF1; + padding: 8px 14px; + font-size: 12px; + line-height: 12px; + display: inline-block; + text-decoration: none; + text-transform: none; +} + +.button_suite a:hover { + color: #fff; + background: #3494A3; + text-decoration: none; +} + +form.searchform p { + margin: 5px 0; +} + +/* +select { + width: 180px; + padding:5px; + margin: 0; + -webkit-border-radius:4px; + -moz-border-radius:4px; + border-radius:4px; + -webkit-box-shadow: 0 3px 0 #ccc, 0 -1px #fff inset; + -moz-box-shadow: 0 3px 0 #ccc, 0 -1px #fff inset; + box-shadow: 0 3px 0 #ccc, 0 -1px #fff inset; + background: #f8f8f8; + color:#888; + border:none; + outline:none; + display: inline-block; + -webkit-appearance:none; + -moz-appearance:none; + appearance:none; + cursor:pointer; +} +*/ + +.select select { + background: transparent; + width: 240px; + padding: 5px; + font-size: 14px; + border: 1px solid #ccc; + height: 34px; + -webkit-appearance: none; +} + +.select { + width: 215px; + height: 34px; + overflow: hidden; + background: url(../images/bottom-arrow.png) no-repeat 96% #ddd; +} + + +span.required { + color: #ff0000; +} + +h1 { + color: #000; + font-size: 35px; + font-family: Arial, Helvetica, sans-serif; +} + +h2 { + color: #000; + font-family: 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; + font-size: 22px; + letter-spacing: 0px; + font-weight: normal; + padding: 0 0 5px; + margin: 0; +} + +h3 { + color: #555; + font-size: 18px; + font-weight: bold; + margin-bottom: 10px; + font-family: Arial, Helvetica, sans-serif; +} + +h4 { + padding-bottom: 10px; + font-size: 15px; + color: #999; +} + +h5 { + padding-bottom: 10px; + font-size: 13px; + color: #999; +} + +/* Gradient transparent - color - transparent */ +hr.intro { + border: 0; + height: 1px; + background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); + background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); + background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); + background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); +} + +ul, ol { + margin: 0 0 35px 35px; +} + +li { + padding-bottom: 5px; +} + +li ol, li ul { + font-size: 1.0em; + margin-bottom: 0; + padding-top: 5px; +} + +/* Haut de page */ +#container { + width: 1248px; + margin: 0 auto; +} + +#header { + background:url(../images/header-bg.jpg) no-repeat; + background-size:cover; + background-position:center top; + color:#b3b3b3; + border-top:1px solid #012026; + border-bottom:1px solid #012026; + padding-top: 15px; + padding-bottom: 15px; +} + +#header h1 a { + margin: 0; + padding: 0; + color: #fff; + font-size: 48px; + font-weight: bold; + text-decoration: none; + letter-spacing: -3px; + float: left; +} + +#header h2 { + color: #FFE0CC; + float: left; + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 13px; + margin-left: 12px; + margin-top: 24px; + padding-left: 4px; + letter-spacing: 0; +} + +#navstats { + height: 45px; + width: 1250px; + background-color: #111; + color: #fff; +} + +#nav { + padding: 0; + position: relative; + height: 45px; + background-color: #111; + border-bottom: 2px solid #E66000; +} + +#nav ul { + list-style: none; + padding: 0; + margin: 0; + height: 45px; +} + +#nav ul li { + float: left; + display: block; + padding: 15px 0px; +} + +#nav ul li a { + color: #ddd; + display: block; + border-right: 1px solid #555; + font-size: 11px; + font-weight: bold; + text-transform: uppercase; + font-family: 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; + padding: 0 20px; + text-decoration: none; +} + +#nav ul li a:hover { + color: #fff; + text-decoration: underline; +} + +#body { + background: none; + margin:0 auto; + padding: 12px; + width: 1224px; + background-color: #ddd; +} + +#content { + float: left; + width: 920px; + margin: 0; + padding: 10px; + background-color: #fff; + border: 1px solid #ccc; + border-right-color: #c0c0c0; + border-bottom-color: #c0c0c0; +} + +.error { + padding: 0.75em; + margin: 0.75em; + border: 1px solid #990000; + /*max-width: 400px;*/ + color: #990000; + background-color: #FDF0EB; + -moz-border-radius: 0.5em; + -webkit-border-radius: 0.5em; +} + +.edito { + padding: 0.75em; + margin: 0.75em; + border: 1px solid #990000; + /*max-width: 560px;*/ + color: black; + background-color: #F7F2E0; + -moz-border-radius: 0.5em; + -webkit-border-radius: 0.5em; +} + +.commentaires { + border-left: 5px solid #222; + margin-bottom: 20px; + padding: 0.75em; + margin: 0.75em; + color: black; + background-color: #FBF8EF; + -moz-border-radius: 0.5em; + -webkit-border-radius: 0.5em; +} + +#adminmenu { + padding-left: 0; +} + +#adminmenu li { + float: left; + list-style: none; + margin-right: 20px; +} + +.post { + margin-bottom: 15px; + border: 1px solid #E4E4E4; + background: #F7F7F7; + padding: 10px 10px 0 10px; +} + +.title { + color: #333333; + margin: 0 0 10px 0; + padding: 0; + font-family: 'Oswald', sans-serif; + font-size: 20px; + line-height: 20px; + font-weight: normal; +} + +.title a { + color: #333333; + text-decoration: none; +} + +.title a:hover { + color: #FD5F26; + text-decoration: none; +} + +.viewpostcadre { + float: right; + border: 1px solid black; + padding: 5px; + margin-left: 25px; + display: inline-block; + vertical-align: top; +} + +.sidebar { + width: 270px; + padding: 0; + float: right; +} + +.sidebar ul { + margin: 0; + padding: 0; + list-style: none; +} + +.sidebar ul li { + margin-bottom: 20px; + line-height: 1.9em; + padding: 10px; + background-color: #fff; + border: 1px solid #ccc; + border-right-color: #c0c0c0; + border-bottom-color: #c0c0c0; +} + +.sidebar li ul { + +} + +.sidebar li ul li { + display: block; + border-top: none; + padding: 6px 2px; + margin: 0; + line-height: 1.5em; + font-size: 13px; + border: none; +} + +.sidebar li ul li a { + font-weight: normal; + color: #222; +} + +.sidebar li ul li a:hover { + color: #000; +} + +.sidebar li ul.blocklist li { + padding: 0; + display: inline; +} + +.sidebar li ul.blocklist li a { + display: block; + border-bottom:1px solid #e0e0e0; + padding: 6px 5px; + text-decoration: none; + font-family: Verdana, Geneva, sans-serif; + font-size: 12px; +} + +.sidebar h4 { + color: #222; + font-family: 'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif; + font-size: 17px; + letter-spacing: 1px; + margin: 0; + padding: 5px 0px; + font-weight: normal; +} + +.clear { + clear: both; +} + + +/* Alert Messages */ +.alert-msg{display:block; position:relative; margin:15px 0; padding:15px 40px 15px 20px; border:1px solid #F00000; color:inherit;} +.alert-msg a{background-color:transparent;} +.alert-msg.info{border-color:#A8A8A8;} +.alert-msg.warning{background-color:#FEE794; border-color:#FDC703;} +.alert-msg.success{background-color:#C2E4CD; border-color:#76C38F; font-weight:bold; font-size:1em;} +.alert-msg.error{background-color:#F3CBCC; border-color:#D54346; font-weight:bold; font-size:1em;} +.alert-msg.close{position:absolute; top:15px; right:20px; color:#999999; font-weight:bold; font-size:1.4em;} +.rnd8, .list.tagcloud.rnd8 a, form.rnd8 input, form.rnd8 textarea{-moz-border-radius:8px; -webkit-border-radius:8px; border-radius:8px;} + + +#footer { + margin:0 auto 0; + border-top: 2px solid #E66000; + width: 1248px; + background:url(../images/header-bg.jpg) no-repeat; + background-size:cover; + background-position:center top; +} + +#footer p { + text-align: justify; + color: #eee; + font-size: 11px; + font-family: Arial, Helvetica, sans-serif; + margin: 0; + padding: 0; +} + +#footer p a { + color: #fff; + font-weight: bold; +} + +.footer-content { + padding: 30px 5px 60px; + background: #444; + border-top: 10px solid #262626; +} + + +#footer .footer-content p { + color: #666; + position: relative; + top: 12px; + /*margin-left: 260px;*/ +} + +#footer .footer-content p a { + color: #ccc; +} + +#footer .footer-content p a:hover { + color: #fff; +} + +#footer .footer-content span.sitename { + font-family: Arial,Helvetica,sans-serif; + font-size: 30px; + font-weight: normal; + letter-spacing: -2px; + color: #fff; + float: left; +} + +.footer-width { + /*width: 1230px;*/ + margin-left: auto; + margin-right:auto; + background: #fff; +} + +#footer .footer-bottom { + padding: 15px 20px 10px 20px; +} + +#footer .footer-bottom p, #footer .footer-bottom p a { + color: #000; + margin-left: auto; + margin-right: auto; +} + + +/* Footer colonnes */ +#cl1,#cl2,#cl3,#cl4,#cl5,#cl6 { + float:left; + width: 292.5px; + height:310px; + background-color:black; + /*background-color: #F7F2E0;*/ + padding: 0 10px 10px 10px; + text-align: left; + font-size: 11px; +} + +.footer-col { + width: 280px; + padding: 0; + float: right; +} + +.footer-col ul { + margin: 0; + padding: 0; + list-style: none; +} + +.footer-col ul li { + margin-bottom: 8px; + line-height: 1.3em; + padding: 1px; + /*background-color: #fff; + border: 1px solid #ccc; + border-right-color: #c0c0c0; + border-bottom-color: #c0c0c0;*/ +} + + + + +/* Tableaux */ +.tableTitle { +font-family: Arial, sans-serif; +font-size: 14px; +color: #FFFFFF; +font-weight: bold; +background-color: #96a8bc; +height:23px; +padding-left:10px; +padding-right:10px; +vertical-align: middle; +} + +.tableRow1 { +font-family: Arial, sans-serif; +font-size: 12px; +/*color: #2c3137;*/ +background-color: #fff; +/*height:21px;*/ +padding-left:10px; +padding-right:10px; +vertical-align: middle; +} + +.tableRow2 { +font-family: Arial, sans-serif; +font-size: 12px; +/*color: #2c3137;*/ +background-color: #e9e9e9; +/*height:21px;*/ +padding-left:10px; +padding-right:10px; +vertical-align: middle; +} + +.pagination { + clear: both; + padding-bottom: 10px; + padding-top: 10px; +} + +.pagination a { + border: 1px solid #D5D5D5; + color: #666666; + font-size: 11px; + font-weight: bold; + height: 25px; + padding: 4px 8px; + text-decoration: none; + margin:2px; +} + +.pagination a:hover, .pagination a:active { + background:#efefef; +} + +.pagination span.current { + background-color: #687282; + border: 1px solid #D5D5D5; + color: #ffffff; + font-size: 11px; + font-weight: bold; + height: 25px; + padding: 4px 8px; + text-decoration: none; + margin:2px; +} + +.pagination span.disabled { + border: 1px solid #EEEEEE; + color: #DDDDDD; + margin: 2px; + padding: 2px 5px; +} + +#recherche{width:493px;margin-top:-63px;float:right;color:#000;font-size:12px;margin-right: 15px;} +#recherche .recherche{background:#fff;width:447px;height:31px;border-top-left-radius:5px;border-bottom-left-radius:5px;border:0px;float:left;text-indent:10px;font-size:16px;color:#000;} +#recherche .valider{background:url(../images/btn_recherche.gif);width:36px;height:41px;float:left;border:0px;cursor:pointer;} +#recherche a{color:#000;text-decoration:none;} +#recherche a:hover{color:#000;text-decoration:underline;} + +.ariane { + border-bottom:1px solid #dddddd; + background:#f7f7f7; + font-size:14px; + padding:5px 0 5px 0; + text-indent:10px; + text-decoration: none; +} + + + +table.table-style-two { + font-family: verdana, arial, sans-serif; + font-size: 10px; + color: #333333; + border-width: 1px; + border-color: #3A3A3A; + border-collapse: collapse; + } + + table.table-style-two th { + border-width: 1px; + padding: 8px; + border-style: solid; + border-color: #517994; + background-color: #B2CFD8; + } + + table.table-style-two tr:hover td { + background-color: #DFEBF1; + } + + table.table-style-two td { + font-family: verdana, arial, sans-serif; + font-size: 11px; + border-width: 1px; + padding: 1px; + border-style: solid; + border-color: #517994; + background-color: #ffffff; + } + + +#menu, #menu ul /* Liste */ +{ + padding : 0; /* pas de marge intérieure */ + margin : 0; /* ni extérieure */ + list-style : none; /* on supprime le style par défaut de la liste */ + line-height : 25px; /* on définit une hauteur pour chaque élément */ + text-align : center; /* on centre le texte qui se trouve dans la liste */ +} + +#menu /* Ensemble du menu */ +{ + font-weight : bold; /* on met le texte en gras */ + font-family : Arial; /* on utilise Arial, c'est plus beau ^^ */ + font-size : 13px; /* hauteur du texte : 13 pixels */ +} + +#menu a /* Contenu des listes */ +{ + display : block; /* on change le type d'élément, les liens deviennent des balises de type block */ + padding : 0; /* aucune marge intérieure */ + background : #000; /* couleur de fond */ + color : #fff; /* couleur du texte */ + text-decoration : none; /* on supprime le style par défaut des liens (la plupart du temps = souligné) */ + width : 152px; /* largeur */ +} + +#menu a:hover /* Lorsque la souris passe sur un des liens */ +{ + color: #000; /* On passe le texte en noir... */ + background: #E66000; /* ... et le fond en orange */ +} + +#menu li /* Elements des listes */ +{ + float : left; + /* pour IE qui ne reconnaît pas "transparent" */ + border-right : 1px solid #fff; /* on met une bordure blanche à droite de chaque élément */ +} + +/* IE ne reconnaissant pas le sélecteur ">" */ +html>body #menu li +{ + border-right: 1px solid transparent ; /* on met une bordure transparente à droite de chaque élément */ +} + +#menu li ul /* Sous-listes */ +{ + position: absolute; /* Position absolue */ + width: 144px; /* Largeur des sous-listes */ + left: -999em; /* Hop, on envoie loin du champ de vision */ +} + + +#menu li ul li /* Éléments de sous-listes */ +{ + /* pour IE qui ne reconnaît pas "transparent" (comme précédemment) */ + border-top : 1px solid #fff; /* on met une bordure blanche en haut de chaque élément d'une sous liste */ +} + +/* IE ne reconnaissant pas le sélecteur ">" */ +html>body #menu li ul li +{ + border-top : 1px solid transparent; /* on met une bordure transparente en haut de chaque élément */ +} + +#menu li ul ul +{ + margin : -22px 0 0 144px ; /* On décale les sous-sous-listes pour qu'elles ne soient pas au dessus des sous-listes */ + /* pour IE qui ne reconnaît pas "transparent" (comme précédemment) */ + border-left : 1px solid #fff ; /* Petite bordure à gauche pour ne pas coller ... */ +} + +/* IE ne reconnaissant pas le sélecteur ">" ... je me répète ;-) */ +html>body #menu li ul ul +{ + border-left : 1px solid transparent ; /* on met une bordure transparente sur la gauche de chaque élément */ +} + diff --git a/Html/style/normalize.css b/Html/style/normalize.css new file mode 100644 index 0000000..0aad0d5 --- /dev/null +++ b/Html/style/normalize.css @@ -0,0 +1,500 @@ +/*! normalize.css 2012-07-07T09:50 UTC - http://github.com/necolas/normalize.css */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + +/* + * Corrects `block` display not defined in IE6/7/8/9 & FF3. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section, +summary { + display: block; +} + +/* + * Corrects `inline-block` display not defined in IE6/7/8/9 & FF3. + */ + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +/* + * Prevents modern browsers from displaying `audio` without controls. + * Remove excess height in iOS5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/* + * Addresses styling for `hidden` attribute not present in IE7/8/9, FF3, S4. + * Known issue: no IE6 support. + */ + +[hidden] { + display: none; +} + +/* ========================================================================== + Base + ========================================================================== */ + +/* + * 1. Corrects text resizing oddly in IE6/7 when body `font-size` is set using + * `em` units. + * 2. Prevents iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-size: 100%; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + -ms-text-size-adjust: 100%; /* 2 */ +} + +/* + * Addresses `font-family` inconsistency between `textarea` and other form + * elements. + */ + +html, +button, +input, +select, +textarea { + font-family: sans-serif; +} + +/* + * Addresses margins handled incorrectly in IE6/7. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/* + * Addresses `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/* + * Improves readability when focused and also mouse hovered in all browsers. + * people.opera.com/patrickl/experiments/keyboard/test + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/* + * Addresses font sizes and margins set differently in IE6/7. + * Addresses font sizes within `section` and `article` in FF4+, Chrome, S5. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +h2 { + font-size: 1.5em; + margin: 0.83em 0; +} + +h3 { + font-size: 1.17em; + margin: 1em 0; +} + +h4 { + font-size: 1em; + margin: 1.33em 0; +} + +h5 { + font-size: 0.83em; + margin: 1.67em 0; +} + +h6 { + font-size: 0.75em; + margin: 2.33em 0; +} + +/* + * Addresses styling not present in IE7/8/9, S5, Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/* + * Addresses style set to `bolder` in FF3+, S4/5, Chrome. + */ + +b, +strong { + font-weight: bold; +} + +blockquote { + margin: 1em 40px; +} + +/* + * Addresses styling not present in S5, Chrome. + */ + +dfn { + font-style: italic; +} + +/* + * Addresses styling not present in IE6/7/8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/* + * Addresses margins set differently in IE6/7. + */ + +p, +pre { + margin: 1em 0; +} + +/* + * Corrects font family set oddly in IE6, S4/5, Chrome. + * en.wikipedia.org/wiki/User:Davidgothberg/Test59 + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + _font-family: 'courier new', monospace; + font-size: 1em; +} + +/* + * Improves readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +/* + * Addresses CSS quotes not supported in IE6/7. + */ + +q { + quotes: none; +} + +/* + * Addresses `quotes` property not supported in S4. + */ + +q:before, +q:after { + content: ''; + content: none; +} + +small { + font-size: 75%; +} + +/* + * Prevents `sub` and `sup` affecting `line-height` in all browsers. + * gist.github.com/413930 + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ========================================================================== + Lists + ========================================================================== */ + +/* + * Addresses margins set differently in IE6/7. + */ + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +/* + * Addresses paddings set differently in IE6/7. + */ + +menu, +ol, +ul { + padding: 0 0 0 40px; +} + +/* + * Corrects list images handled incorrectly in IE7. + */ + +nav ul, +nav ol { + list-style: none; + list-style-image: none; +} + +/* ========================================================================== + Embedded content + ========================================================================== */ + +/* + * 1. Removes border when inside `a` element in IE6/7/8/9, FF3. + * 2. Improves image quality when scaled in IE7. + * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ + */ + +img { + border: 0; /* 1 */ + -ms-interpolation-mode: bicubic; /* 2 */ +} + +/* + * Corrects overflow displayed oddly in IE9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* ========================================================================== + Figures + ========================================================================== */ + +/* + * Addresses margin not present in IE6/7/8/9, S5, O11. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/* + * Corrects margin displayed oddly in IE6/7. + */ + +form { + margin: 0; +} + +/* + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/* + * 1. Corrects color not being inherited in IE6/7/8/9. + * 2. Corrects text not wrapping in FF3. + * 3. Corrects alignment displayed oddly in IE6/7. + */ + +legend { + border: 0; /* 1 */ + padding: 0; + white-space: normal; /* 2 */ + *margin-left: -7px; /* 3 */ +} + +/* + * 1. Corrects font size not being inherited in all browsers. + * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome. + * 3. Improves appearance and consistency in all browsers. + */ + +button, +input, +select, +textarea { + font-size: 100%; /* 1 */ + margin: 0; /* 2 */ + vertical-align: baseline; /* 3 */ + *vertical-align: middle; /* 3 */ +} + +/* + * Addresses FF3/4 setting `line-height` on `input` using `!important` in the + * UA stylesheet. + */ + +button, +input { + line-height: normal; +} + +/* + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Corrects inability to style clickable `input` types in iOS. + * 3. Improves usability and consistency of cursor style between image-type + * `input` and others. + * 4. Removes inner spacing in IE7 without affecting normal text inputs. + * Known issue: inner spacing remains in IE6. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ + *overflow: visible; /* 4 */ +} + +/* + * Re-set default cursor for disabled elements. + */ + +button[disabled], +input[disabled] { + cursor: default; +} + +/* + * 1. Addresses box sizing set to content-box in IE8/9. + * 2. Removes excess padding in IE8/9. + * 3. Removes excess padding in IE7. + * Known issue: excess padding remains in IE6. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ + *height: 13px; /* 3 */ + *width: 13px; /* 3 */ +} + +/* + * 1. Addresses `appearance` set to `searchfield` in S5, Chrome. + * 2. Addresses `box-sizing` set to `border-box` in S5, Chrome (include `-moz` + * to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/* + * Removes inner padding and search cancel button in S5, Chrome on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* + * Removes inner padding and border in FF3+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/* + * 1. Removes default vertical scrollbar in IE6/7/8/9. + * 2. Improves readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/* + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git a/Html/style/strength.css b/Html/style/strength.css new file mode 100644 index 0000000..265968c --- /dev/null +++ b/Html/style/strength.css @@ -0,0 +1,34 @@ +@charset "utf-8"; +/* CSS Document */ + +.strength_meter{ + height:23px; +width: 154px; + background:silver; + +} +.strength_meter div{ + height:23px; + width:100%; + height:23px; + text-align:center; + color:black; + font-weight:bold; + line-height:23px; +} +.veryweak{ + background-color: #FFA0A0; +border-color: #F04040!important +} +.weak{ +background-color: #FFB78C; +border-color: #FF853C!important; +} +.medium{ +background-color: #FFEC8B; +border-color: #FC0!important; +} +.strong{ +background-color: #C3FF88; +border-color: #8DFF1C!important; +} \ No newline at end of file diff --git a/Html/torrents.php b/Html/torrents.php new file mode 100644 index 0000000..77b73c7 --- /dev/null +++ b/Html/torrents.php @@ -0,0 +1,182 @@ + + + + +
    + + + +
    +
    + + + +
    + +
    Liste des torrents :
    +
    + + Le torrent a été ajouté avec succès !
    '; + } + + // Pas d'accès direct à la page download sans file ID + if(isset($_GET['action']) && $_GET['action'] == 'nodirect') { + echo '
    ERREUR :
    Vous ne pouvez pas accéder directement à cette page sans préciser le torrent à télécharger...
    '; + } + + // Pas d'accès à la page download si le file ID n'existe pas + if(isset($_GET['action']) && $_GET['action'] == 'noexist') { + echo '
    ERREUR :
    Ce torrent n\'existe pas !
    '; + } + + //On affiche le message de suppression + if(isset($_GET['delpost'])){ + echo '
    Le torrent a été supprimé avec succès.
    '; + } + ?> + + + + + + + + + + + + + query('SELECT postHash FROM blog_posts_seo'); + $pages->set_total($stmt->rowCount()); + + + // On met en place le tri-------------------------------------------- + if(isset($_GET['tri'])) { + $tri = html($_GET['tri']); + } + else { + $post_tri = 'postDate'; + $tri = html($post_tri); + } + + if(isset($_GET['ordre'])) { + $ordre = html($_GET['ordre']); + } + else { + $ordre_tri = 'desc'; + $ordre = html($ordre_tri); + } + + // Protection du tri ----------------------------------------------- + if (!empty($_GET['tri']) && !in_array($_GET['tri'], array('postID','postHash', 'postTitle', 'postViews', 'postTaille', 'postDate', 'postAuthor', 'seeders', 'leechers', 'completed'))) { + header('Location: index.php'); + exit(); + } + if (!empty($_GET['ordre']) && !in_array($_GET['ordre'], array('asc','desc','ASC','DESC'))) { + header('Location: index.php'); + exit(); + } + + + $stmt = $db->query('SELECT * FROM blog_posts_seo b LEFT JOIN xbt_files x ON x.fid = b.postID ORDER BY '.$tri.' '.$ordre.' '.$pages->get_limit()); + + while($row = $stmt->fetch()){ + + $stmt2 = $db->prepare('SELECT catTitle, catSlug FROM blog_cats, blog_post_cats WHERE blog_cats.catID = blog_post_cats.catID AND blog_post_cats.postID = :postID ORDER BY catTitle ASC'); + $stmt2->execute(array(':postID' => $row['postID'])); + + $catRow = $stmt2->fetchAll(PDO::FETCH_ASSOC); + + echo ''; + echo ''; + echo ''; + + sscanf($row['postDate'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde); + echo ''; + + //echo ''; + + $links = array(); + foreach ($catRow as $cat) { + $links[] = ''.$cat['catTitle'].''; + } + + $max = 120; + $chaine = implode(", ", $links); + if (strlen($chaine) >= $max) { + $chaine = substr($chaine, 0, $max); + $espace = strrpos($chaine, ", "); + $chaine = substr($chaine, 0, $espace).' ...'; + } + + echo ''; + + $exa = '0x'; + $hash = $exa.$row['postHash']; + + $stmt3 = $db->prepare('SELECT * FROM blog_posts_seo,xbt_files WHERE blog_posts_seo.postHash = :postHash AND xbt_files.info_hash = '.$hash); + $stmt3->execute(array(':postHash' => $row['postHash'])); + $xbt = $stmt3->fetch(); + + echo ''; + echo ''; + echo ''; + + echo ''; + } + + + } catch(PDOException $e) { + echo $e->getMessage(); + } + ?> +
    NomTailleAjoutéCatégorie(s)SLT
    '.html($row['postTitle']).''; + echo ''; + echo html(makesize($row['postTaille'])); + echo ''.$jour.'-'.$mois.'-'.$annee.''.html($row['postAuthor']).''.$chaine.''.$xbt['seeders'].''.$xbt['leechers'].''.$xbt['completed'].'
    + +
    + + page_links('?tri='.$tri.'&ordre='.$ordre.'&'); ?> + +
    +

    Légende : S = Nb de Seeders, L = Nb de Leechers, T = Nb de Téléchargements

    + +
    + + + +
    +
    +
    + + + + + diff --git a/Html/torrents/.htaccess b/Html/torrents/.htaccess new file mode 100644 index 0000000..5a928f6 --- /dev/null +++ b/Html/torrents/.htaccess @@ -0,0 +1 @@ +Options -Indexes diff --git a/Html/verificationimage.php b/Html/verificationimage.php new file mode 100644 index 0000000..1678c89 --- /dev/null +++ b/Html/verificationimage.php @@ -0,0 +1,28 @@ + diff --git a/Html/viewpost.php b/Html/viewpost.php new file mode 100644 index 0000000..ff56033 --- /dev/null +++ b/Html/viewpost.php @@ -0,0 +1,415 @@ +prepare('SELECT postID,postHash,postTitle,postSlug,postAuthor,postLink,postDesc,postCont,postTaille,postDate,postTorrent,postImage FROM blog_posts_seo WHERE postSlug = :postSlug'); +$stmt->bindValue(':postSlug', $id, PDO::PARAM_STR); +$stmt->execute(); +$row = $stmt->fetch(); + +//Si le torrent est à supprimer ... +if(isset($_GET['deltorr'])) { + + $deltorr = (int) $_GET['deltorr']; + + if(isset($_SESSION['username']) && isset($_SESSION['userid'])) { + + if(($row['postAuthor'] == $_SESSION['username']) || ($_SESSION['userid'] == 1)) { + + // 1 - on supprime le fichier .torrent dans le répertoire /torrents + $stmt4 = $db->prepare('SELECT postID,postTorrent FROM blog_posts_seo WHERE postID = :postID') ; + $stmt4->bindValue(':postID', $deltorr, PDO::PARAM_INT); + $stmt4->execute(); + $efface = $stmt4->fetch(); + + $file = $REP_TORRENTS.$efface['postTorrent']; + if (file_exists($file)) { + unlink($file); + } + + // 2 - on supprime le torrent dans la base blog_posts_seo + $stmt = $db->prepare('DELETE FROM blog_posts_seo WHERE postID = :postID') ; + $stmt->bindValue(':postID', $deltorr, PDO::PARAM_INT); + $stmt->execute(); + + // 3 - on supprime sa référence de catégorie + $stmt1 = $db->prepare('DELETE FROM blog_post_cats WHERE postID = :postID'); + $stmt1->bindValue(':postID', $deltorr, PDO::PARAM_INT); + $stmt1->execute(); + + // 4 - on supprime sa référence de licence + $stmt2 = $db->prepare('DELETE FROM blog_post_licences WHERE postID_BPL = :postID_BPL'); + $stmt2->bindValue(':postID_BPL', $deltorr, PDO::PARAM_INT); + $stmt2->execute(); + + /* + // 5 - on supprime ses commentaires s'ils existent + $stmt22 = $db->prepare('SELECT cid_torrent FROM blog_posts_comments WHERE cid_torrent = :cid_torrent'); + $stmt22->bindValue(':cid_torrent', $deltorr, PDO::PARAM_INT); + $stmt22->execute(); + $commentaire = $stmt22->fetch(); + + if(!empty($commentaire)) { + $stmtsupcomm = $db->prepare('DELETE FROM blog_posts_comments WHERE cid_torrent = :cid_torrent'); + $stmtsupcomm->bindValue(':cid_torrent', $deltorr, PDO::PARAM_INT); + $stmtsupcomm->execute(); + } + */ + + // 6 - enfin, on supprime le torrent du tracker en mettant le champ "flag" à "1" dans l'enregistrement correspondant de la table xbt_files + $stmt3 = $db->prepare('UPDATE xbt_files SET flags = :flags WHERE fid = :fid') ; + $stmt3->bindValue(':flags', '1', PDO::PARAM_INT); + $stmt3->bindValue(':fid', $deltorr, PDO::PARAM_INT); + $stmt3->execute(); + + header('Location: torrents.php?action=supprime'); + //exit; + + } + + else { + // Alors comme ça vous n'avez pas le droit de supprimer ce torrent ?!! + header('Location: '. SITEURL); + exit(); + } + + } + +}//fin de if isset $_GET['deltorr'] + +/* +$id = html($_GET['id']); + +$stmt = $db->prepare('SELECT postID,postHash,postTitle,postSlug,postAuthor,postLink,postDesc,postCont,postTaille,postDate,postTorrent,postImage FROM blog_posts_seo WHERE postSlug = :postSlug'); +$stmt->bindValue(':postSlug', $id, PDO::PARAM_STR); +$stmt->execute(); +$row = $stmt->fetch(); +*/ + +//Si le post n'existe pas on redirige l'utilisateur +if($row['postID'] == ''){ + header('Location: ./'); + exit(); +} + +$pagetitle = html($row['postTitle']); + +//Stats : bbclone +define("_BBC_PAGE_NAME", $pagetitle); +define("_BBCLONE_DIR", "bbclone/"); +define("COUNTER", _BBCLONE_DIR."mark_page.php"); +if (is_readable(COUNTER)) include_once(COUNTER); + +include_once('includes/header.php'); +?> + + +
    + + + +
    +
    + + + +
    + +
    + + '.html($row['postTitle']).''; + + /* + if(isset($_SESSION['username']) && isset($_SESSION['userid'])) { + if(($row['postAuthor'] == $_SESSION['username']) || ($_SESSION['userid'] == 1)) { + echo ''; + ?> + + '; + echo 'Télécharger :  Download
    '; + echo '› Posté le : '.date_fr('d-m-Y à H:i:s', strtotime($row['postDate'])).'
    '; + echo '› Par : '.html($row['postAuthor']).'
    '; + echo '› Dans : '; + $stmt2 = $db->prepare('SELECT catTitle, catSlug FROM blog_cats, blog_post_cats WHERE blog_cats.catID = blog_post_cats.catID AND blog_post_cats.postID = :postID ORDER BY catTitle ASC'); + $stmt2->bindValue(':postID', $row['postID'], PDO::PARAM_INT); + $stmt2->execute(); + $catRow = $stmt2->fetchAll(PDO::FETCH_ASSOC); + $links = array(); + foreach ($catRow as $cat) { + $links[] = "".$cat['catTitle'].""; + } + echo implode(", ", $links); + + echo '
    '; + + echo '› Lien web du média : URL
    '; + echo '› Taille : '.makesize($row['postTaille']).'
    '; + + $filetorrent = $REP_TORRENTS.html($row['postTorrent']); + + //On décode le fichier torrent... + //$fd = fopen($_FILES["torrent"]["tmp_name"], "rb"); + //$length=filesize($_FILES["torrent"]["tmp_name"]); + $fd = fopen($filetorrent, "rb"); + $length = filesize($filetorrent); + + if ($length) { + $alltorrent = fread($fd, $length); + } + $array = BDecode($alltorrent); + $hash = sha1(BEncode($array["info"])); + fclose($fd); + + if (isset($array["info"]) && $array["info"]) { + $upfile=$array["info"]; + } + else { + $upfile = 0; + } + + if (isset($upfile["length"])) { + $size = (float)($upfile["length"]); + } + else if (isset($upfile["files"])) { + //Pour les torrents multifichiers (Lupin - Xbtit - Btiteam - 2005) + $size=0; + foreach ($upfile["files"] as $file) { + $size+=(float)($file["length"]); + } + } + else { + $size = "0"; + } + + $ffile=fopen($filetorrent,"rb"); + $content=fread($ffile,filesize($filetorrent)); + fclose($ffile); + + $content=BDecode($content); + $numfiles=0; + + if (isset($content["info"]) && $content["info"]) { + $thefile=$content["info"]; + if (isset($thefile["length"])) { + $dfiles[$numfiles]["filename"]=$thefile["name"]; + $dfiles[$numfiles]["size"]=makesize($thefile["length"]); + $numfiles++; + } + + elseif (isset($thefile["files"])) { + foreach($thefile["files"] as $singlefile) { + $dfiles[$numfiles]["filename"]=implode("/",$singlefile["path"]); + $dfiles[$numfiles]["size"]=makesize($singlefile["length"]); + $numfiles++; + } + } + + else { + // Impossible ... mais bon ... + } + + } + + //echo '› Nb de fichiers : '.$numfiles.'
    '; + + + $stmt3 = $db->prepare('SELECT * FROM blog_posts_seo,xbt_files WHERE blog_posts_seo.postID = :postID AND xbt_files.fid = blog_posts_seo.postID'); + $stmt3->bindValue(':postID', $row['postID'], PDO::PARAM_INT); + $stmt3->execute(); + $xbt = $stmt3->fetch(); + + //echo '› Hash : '.bin2hex($xbt['info_hash']).'
    '; + + echo '› Trafic : '; + echo 'S : '.$xbt['seeders'].' | '; + echo 'L : '.$xbt['leechers'].' | '; + + // on met à jour le nb de vues de l'article + $stmt33 = $db->query('UPDATE blog_posts_seo SET postViews = postViews+1 WHERE postID = '.$row['postID']); + + // on affiche le nombre de vue de l'article + $stmt333 = $db->prepare('SELECT postViews FROM blog_posts_seo WHERE postID = :postID'); + $stmt333->execute(array(':postID' => $row['postID'])); + $views = $stmt333->fetch(); + + echo 'T : '.$xbt['completed'].'
    '; + + echo '› Lu : '.$views['postViews'].' fois
    '; + echo '› Licence(s) : '; + + $stmt3 = $db->prepare('SELECT licenceID,licenceTitle FROM blog_licences, blog_post_licences WHERE blog_licences.licenceID = blog_post_licences.licenceID_BPL AND blog_post_licences.postID_BPL = :postID_BPL ORDER BY licenceTitle ASC'); + $stmt3->execute(array(':postID_BPL' => $row['postID'])); + $licenceRow = $stmt3->fetchALL(PDO::FETCH_ASSOC); + $liclist = array(); + foreach($licenceRow as $lic) { + $liclist[] = $lic['licenceTitle']; + } + echo implode(", ", $liclist); + + if(isset($_SESSION['username']) && isset($_SESSION['userid'])) { + if(($row['postAuthor'] == $_SESSION['username']) || ($_SESSION['userid'] == 1)) { + echo '

    '; + echo ''; + ?> + + '; + + echo '
    '; + + + //echo '
    '; + echo '

    '; + if (!empty($row['postImage']) && file_exists($REP_IMAGES_TORRENTS.$row['postImage'])) { + echo ''.html($row['postTitle']).''; + } + else { + echo 'Image'; + } + echo '

    '.nl2br(bbcode($row['postDesc'])).'

    '; + echo '

    '.nl2br(bbcode($row['postCont'])).'

    '; + + echo '
    '; + + if (isset($content['info']) && $content['info']) { + $thefile=$content['info']; + + /* + if (isset($thefile['length'])) { + $nbfilestorr = $thefile['name']; + } + + elseif (isset($thefile['files'])) { + foreach($thefile['files'] as $singlefile) { + $nbfilestorr = html(implode('/',$singlefile['path'])); + } + } + + else { + // rien + } + */ + + } + + + echo ''; + + if($numfiles == 1) { + echo ''; + } + else { + echo ''; + } + + if (isset($thefile['files'])) { + echo ''; + foreach($content['info']['files'] as $multiplefiles) { + echo ''; + } + } + else { + echo ''; + echo ''; + } + echo '
    Nb de fichier du torrent : '.$numfiles.'
    Nb de fichiers du torrent : '.$numfiles.'
    Fichiers du torrent :
    '.implode('/',$multiplefiles['path']).'
    Fichier du torrent :
    '.html($thefile['name']).'
    '; + + echo '
    '; + echo '

    '; + ?> + +
    + + +
    + + + +
    Social Network Mastodon + + + +
    + + +
    + + +
    + + + +
    + + + + + +
    +
    + + +
    + +
    + + +
    + + + +
    + + + +
    +
    +
    + + + + + -- cgit v1.2.1