From 55e0adfa17e79bef30a8c8a80f504605769672e5 Mon Sep 17 00:00:00 2001 From: 3err0 Date: Sat, 18 May 2019 13:46:03 +0800 Subject: [PATCH] message --- 404.php | 30 + control.php | 56 + download.php | 72 + favicon.ico | Bin 0 -> 3638 bytes index.php | 108 ++ language/Russian/adminpanel.lng | 1654 +++++++++++++++++ language/Russian/adminpanel_repa.lng | 158 ++ language/Russian/chat.lng | 52 + language/Russian/friends.lng | 16 + language/Russian/help.lng | 62 + language/Russian/img.lng | 21 + language/Russian/rating.lng | 39 + language/Russian/table.lng | 131 ++ language/Russian/website.lng | 623 +++++++ language/Russian/website_repa.lng | 38 + out.php | 44 + rating.php | 141 ++ robots.txt | 31 + schema.sql | 917 +++++++++ system/ajax/addcomments.php | 75 + system/ajax/bbcode.php | 134 ++ system/ajax/bbcodes.js | 340 ++++ system/ajax/categajax.php | 46 + system/ajax/chat.php | 58 + system/ajax/clean.php | 246 +++ system/ajax/commentdelete.php | 51 + system/ajax/editcomments.php | 146 ++ system/ajax/favorites.php | 53 + system/ajax/find_relates.php | 38 + system/ajax/keywords.php | 35 + system/ajax/newsletter.php | 196 ++ system/ajax/newslist.php | 95 + system/ajax/poll.php | 162 ++ system/ajax/rating.php | 73 + system/ajax/rebuild.php | 124 ++ system/ajax/registration.php | 73 + system/ajax/reputation.php | 135 ++ system/ajax/subscribe.php | 50 + system/ajax/torrent.php | 41 + system/ajax/upload.form.php | 31 + system/ajax/upload.php | 254 +++ system/ajax/voted.php | 32 + system/classes/JSON.php | 800 ++++++++ system/classes/cache.class.php | 147 ++ system/classes/captcha.class.php | 211 +++ system/classes/comments.class.php | 277 +++ system/classes/download.class.php | 69 + system/classes/flashplayer/audio.txt | 1 + system/classes/flashplayer/uppod.swf | Bin 0 -> 170827 bytes system/classes/flashplayer/video.txt | 1 + system/classes/flashplayer/youtube.txt | 1 + system/classes/google.class.php | 179 ++ system/classes/mail.class.php | 261 +++ system/classes/mysql.php | 215 +++ system/classes/navigation.class.php | 125 ++ system/classes/parse.class.php | 1028 ++++++++++ system/classes/rss.class.php | 240 +++ system/classes/sphinx.api.php | 1611 ++++++++++++++++ system/classes/swfupload/cancelbutton.gif | Bin 0 -> 1221 bytes system/classes/swfupload/fileprogress.js | 151 ++ system/classes/swfupload/handlers.js | 200 ++ system/classes/swfupload/swfupload.js | 840 +++++++++ system/classes/swfupload/swfupload.queue.js | 77 + system/classes/swfupload/swfupload.swf | Bin 0 -> 9917 bytes system/classes/swfupload/swfupload_f8.swf | Bin 0 -> 7835 bytes system/classes/swfupload/swfupload_f9.swf | Bin 0 -> 9506 bytes system/classes/templates.class.php | 225 +++ system/classes/thumb.class.php | 258 +++ system/classes/torrent.class.php | 537 ++++++ system/cron.php | 38 + system/engine.php | 464 +++++ system/file.php | 62 + system/forum/action/addpost.php | 252 +++ system/forum/action/addtopic.php | 325 ++++ system/forum/action/forum.php | 158 ++ system/forum/action/moderation.php | 520 ++++++ system/forum/action/post.php | 515 +++++ system/forum/action/topic.php | 352 ++++ system/forum/ajax/addpost.php | 59 + system/forum/ajax/dle_forum.js | 208 +++ system/forum/ajax/editpost.php | 104 ++ system/forum/ajax/init.php | 130 ++ system/forum/ajax/poll.php | 148 ++ system/forum/ajax/post.preview.php | 38 + system/forum/ajax/uploads.form.php | 34 + system/forum/images/post_icons/icon1.gif | Bin 0 -> 672 bytes system/forum/images/post_icons/icon10.gif | Bin 0 -> 672 bytes system/forum/images/post_icons/icon11.gif | Bin 0 -> 689 bytes system/forum/images/post_icons/icon12.gif | Bin 0 -> 1067 bytes system/forum/images/post_icons/icon13.gif | Bin 0 -> 1104 bytes system/forum/images/post_icons/icon14.gif | Bin 0 -> 1104 bytes system/forum/images/post_icons/icon2.gif | Bin 0 -> 676 bytes system/forum/images/post_icons/icon3.gif | Bin 0 -> 673 bytes system/forum/images/post_icons/icon4.gif | Bin 0 -> 671 bytes system/forum/images/post_icons/icon5.gif | Bin 0 -> 672 bytes system/forum/images/post_icons/icon6.gif | Bin 0 -> 666 bytes system/forum/images/post_icons/icon7.gif | Bin 0 -> 672 bytes system/forum/images/post_icons/icon8.gif | Bin 0 -> 677 bytes system/forum/images/post_icons/icon9.gif | Bin 0 -> 888 bytes system/forum/language/English/admin.lng | 377 ++++ system/forum/language/English/forum.lng | 117 ++ system/forum/language/Russian/admin.lng | 413 ++++ system/forum/language/Russian/forum.lng | 123 ++ system/forum/main.php | 197 ++ system/forum/sources/category.php | 142 ++ .../forum/sources/components/attachment.php | 48 + system/forum/sources/components/bbcode.php | 179 ++ .../forum/sources/components/edit_options.php | 104 ++ system/forum/sources/components/functions.php | 777 ++++++++ system/forum/sources/components/init.php | 471 +++++ system/forum/sources/components/licence.odf | 1 + .../forum/sources/components/navigation.php | 159 ++ system/forum/sources/components/poll.php | 159 ++ system/forum/sources/components/text_skin.php | 124 ++ system/forum/sources/modules/getnew.php | 96 + system/forum/sources/modules/search.php | 250 +++ system/forum/sources/modules/stats.php | 113 ++ system/forum/sources/modules/subscription.php | 154 ++ system/forum/sources/modules/uploads.php | 375 ++++ .../sources/shapeshifter/forum_posts.php | 154 ++ .../forum/sources/shapeshifter/forum_rss.php | 112 ++ .../sources/shapeshifter/showallposts.php | 259 +++ system/forum/sources/showforum.php | 328 ++++ system/forum/sources/showposts.php | 223 +++ system/forum/sources/showtopic.php | 397 ++++ system/forum/sources/showtopics.php | 82 + system/forum/textscreen.css | 178 ++ system/forum/textversion.php | 428 +++++ system/images.php | 59 + system/inc/addnews.php | 398 ++++ system/inc/blockip.php | 192 ++ system/inc/categories.php | 518 ++++++ system/inc/chat.php | 476 +++++ system/inc/clean.php | 101 + system/inc/editnews.php | 1292 +++++++++++++ system/inc/editusers.php | 1287 +++++++++++++ system/inc/email.php | 188 ++ system/inc/files.php | 1498 +++++++++++++++ system/inc/forum.php | 5 + system/inc/forum/email.php | 82 + system/inc/forum/form.php | 367 ++++ system/inc/forum/forum.php | 1380 ++++++++++++++ system/inc/forum/functions.php | 261 +++ system/inc/forum/ico/Usergroup.png | Bin 0 -> 10056 bytes system/inc/forum/ico/category.png | Bin 0 -> 11407 bytes system/inc/forum/ico/content.png | Bin 0 -> 11427 bytes system/inc/forum/ico/discuss.png | Bin 0 -> 9819 bytes system/inc/forum/ico/dle_forum.png | 39 + system/inc/forum/ico/filebrowser_action.gif | Bin 0 -> 1714 bytes system/inc/forum/ico/filebrowser_action2.gif | Bin 0 -> 1578 bytes system/inc/forum/ico/forum.png | Bin 0 -> 5219 bytes system/inc/forum/ico/global.png | Bin 0 -> 3278 bytes system/inc/forum/ico/help.png | Bin 0 -> 10565 bytes system/inc/forum/ico/index.html | 1 + system/inc/forum/ico/licence.png | Bin 0 -> 3710 bytes system/inc/forum/ico/modules.png | Bin 0 -> 7486 bytes system/inc/forum/ico/mset.png | Bin 0 -> 7580 bytes system/inc/forum/ico/news.png | Bin 0 -> 1492 bytes system/inc/forum/ico/preventions.png | Bin 0 -> 4394 bytes system/inc/forum/ico/rank.png | Bin 0 -> 11375 bytes system/inc/forum/ico/safety.png | Bin 0 -> 4246 bytes system/inc/forum/ico/service.png | Bin 0 -> 10509 bytes system/inc/forum/ico/show.png | Bin 0 -> 2680 bytes system/inc/forum/ico/speed.png | Bin 0 -> 4003 bytes system/inc/forum/ico/tools.png | Bin 0 -> 10567 bytes system/inc/forum/ico/uploads.png | Bin 0 -> 7798 bytes system/inc/forum/ico/usersgroup.png | Bin 0 -> 2916 bytes system/inc/forum/init.class.php | 19 + system/inc/forum/service.php | 123 ++ system/inc/forum/table.php | 208 +++ system/inc/forum/tools.php | 268 +++ system/inc/forum/usergroup.php | 162 ++ system/inc/googlemap.php | 150 ++ system/inc/include/functions.inc.php | 620 ++++++ system/inc/include/init.php | 192 ++ system/inc/include/inserttag.php | 445 +++++ system/inc/iptools.php | 354 ++++ system/inc/main.php | 232 +++ system/inc/mass_static_actions.php | 225 +++ system/inc/mass_user_actions.php | 398 ++++ system/inc/massactions.php | 468 +++++ system/inc/newsimg/addimg.php | 79 + system/inc/newsimg/doaddimg.php | 72 + system/inc/newsimg/doeditimg.php | 73 + system/inc/newsimg/editimg.php | 116 ++ system/inc/newsletter.php | 509 +++++ system/inc/options.php | 705 +++++++ system/inc/preview.php | 243 +++ system/inc/rebuild.php | 439 +++++ system/inc/repa.php | 106 ++ system/inc/repa/repa_control.php | 183 ++ system/inc/repa/repa_delete.php | 90 + system/inc/repa/repa_edit.php | 114 ++ system/inc/repa/repa_main.php | 217 +++ system/inc/repa/repa_options.php | 244 +++ system/inc/repa/repa_save.php | 74 + system/inc/repa/repa_vminus.php | 59 + system/inc/repa/repa_vplus.php | 59 + system/inc/static.php | 1013 ++++++++++ system/inc/table.php | 1209 ++++++++++++ system/inc/usergroup.php | 646 +++++++ system/inc/wordfilter.php | 394 ++++ system/init.php | 182 ++ system/js/highslide.js | 97 + system/js/jquery.js | 174 ++ system/js/main.js | 407 ++++ system/modules/addcomments.php | 189 ++ system/modules/addimg.php | 71 + system/modules/addnews.php | 219 +++ system/modules/antibot.php | 235 +++ system/modules/banned.php | 56 + system/modules/bbcode.php | 94 + system/modules/chat/addmess.php | 45 + system/modules/chat/ajax.js | 280 +++ system/modules/chat/block.php | 38 + system/modules/chat/chat.class.php | 65 + system/modules/chat/modules.php | 77 + system/modules/comments-last.php | 37 + system/modules/favorites.php | 75 + system/modules/feedback.php | 124 ++ system/modules/fonts/eva.png | Bin 0 -> 3062 bytes system/modules/forum/show.last.php | 61 + system/modules/functions.php | 708 +++++++ system/modules/gzip.php | 63 + system/modules/lastcomments.php | 38 + system/modules/lostpassword.php | 113 ++ system/modules/newsimg.php | 77 + system/modules/newslist.php | 110 ++ system/modules/online.php | 158 ++ system/modules/pm.php | 395 ++++ system/modules/pm_alert.php | 29 + system/modules/poll.php | 163 ++ system/modules/profile.php | 327 ++++ system/modules/register.php | 327 ++++ system/modules/reputation.php | 104 ++ system/modules/rss.php | 80 + system/modules/search.php | 930 +++++++++ system/modules/show.full.php | 275 +++ system/modules/show.short.php | 289 +++ system/modules/sitelogin.php | 139 ++ system/modules/static.php | 56 + system/modules/stats.php | 111 ++ system/modules/table.php | 310 +++ system/modules/toptables.php | 51 + system/modules/torrent/list.php | 36 + system/modules/torrent/upload.php | 64 + system/modules/users.php | 141 ++ system/offline.php | 17 + system/opensearch.php | 25 + system/preview.php | 238 +++ system/skins/bbcodes/color.html | 126 ++ system/skins/bbcodes/images/b.gif | Bin 0 -> 1662 bytes system/skins/bbcodes/images/bg.gif | Bin 0 -> 820 bytes system/skins/bbcodes/images/brkspace.gif | Bin 0 -> 135 bytes system/skins/bbcodes/images/c.gif | Bin 0 -> 263 bytes system/skins/bbcodes/images/close.gif | Bin 0 -> 1736 bytes system/skins/bbcodes/images/code.gif | Bin 0 -> 2287 bytes system/skins/bbcodes/images/color.gif | Bin 0 -> 1400 bytes system/skins/bbcodes/images/email.gif | Bin 0 -> 2243 bytes system/skins/bbcodes/images/emo.gif | Bin 0 -> 1163 bytes system/skins/bbcodes/images/fast_hide.gif | Bin 0 -> 1227 bytes system/skins/bbcodes/images/fast_hide1.gif | Bin 0 -> 1227 bytes system/skins/bbcodes/images/flash.gif | Bin 0 -> 1826 bytes system/skins/bbcodes/images/hide.gif | Bin 0 -> 270 bytes system/skins/bbcodes/images/i.gif | Bin 0 -> 1488 bytes system/skins/bbcodes/images/image.gif | Bin 0 -> 693 bytes system/skins/bbcodes/images/l.gif | Bin 0 -> 271 bytes system/skins/bbcodes/images/leech.gif | Bin 0 -> 672 bytes system/skins/bbcodes/images/link.gif | Bin 0 -> 1779 bytes system/skins/bbcodes/images/mp.gif | Bin 0 -> 640 bytes system/skins/bbcodes/images/mp3.gif | Bin 0 -> 653 bytes system/skins/bbcodes/images/page.gif | Bin 0 -> 436 bytes system/skins/bbcodes/images/quote.gif | Bin 0 -> 2217 bytes system/skins/bbcodes/images/r.gif | Bin 0 -> 264 bytes system/skins/bbcodes/images/rating.gif | Bin 0 -> 1536 bytes system/skins/bbcodes/images/s.gif | Bin 0 -> 1716 bytes system/skins/bbcodes/images/screens.gif | Bin 0 -> 273 bytes system/skins/bbcodes/images/spoiler.gif | Bin 0 -> 1026 bytes system/skins/bbcodes/images/translit.gif | Bin 0 -> 187 bytes system/skins/bbcodes/images/typograf.gif | Bin 0 -> 627 bytes system/skins/bbcodes/images/u.gif | Bin 0 -> 1509 bytes system/skins/bbcodes/images/upload.gif | Bin 0 -> 2215 bytes system/skins/bbcodes/images/youtube.gif | Bin 0 -> 1044 bytes system/skins/bbcodes/rating.gif | Bin 0 -> 1536 bytes system/skins/calendar-blue.css | 234 +++ system/skins/calendar.js | 85 + system/skins/default.js | 152 ++ system/skins/default.skin.php | 107 ++ system/skins/images/ads.png | Bin 0 -> 4680 bytes system/skins/images/allnews.png | Bin 0 -> 5934 bytes system/skins/images/allset.png | Bin 0 -> 2684 bytes system/skins/images/banusers.png | Bin 0 -> 5383 bytes system/skins/images/block_birth.jpg | Bin 0 -> 898 bytes system/skins/images/block_new.jpg | Bin 0 -> 707 bytes system/skins/images/blockip.png | Bin 0 -> 5341 bytes system/skins/images/browser_action.gif | Bin 0 -> 742 bytes system/skins/images/bttn.gif | Bin 0 -> 145 bytes system/skins/images/cats.png | Bin 0 -> 7009 bytes system/skins/images/ch_pass.png | Bin 0 -> 5794 bytes system/skins/images/clean.png | Bin 0 -> 3244 bytes system/skins/images/close-pm.png | Bin 0 -> 3175 bytes system/skins/images/comments.png | Bin 0 -> 2369 bytes system/skins/images/conf_images.png | Bin 0 -> 2303 bytes system/skins/images/db_opt.png | Bin 0 -> 2352 bytes system/skins/images/db_optimize.gif | Bin 0 -> 2361 bytes system/skins/images/db_repair.gif | Bin 0 -> 2411 bytes system/skins/images/db_save.gif | Bin 0 -> 2356 bytes system/skins/images/dbset.png | Bin 0 -> 5515 bytes system/skins/images/dle_forum.PNG | Bin 0 -> 14239 bytes system/skins/images/dle_smf.gif | Bin 0 -> 911 bytes system/skins/images/email.png | Bin 0 -> 2339 bytes system/skins/images/error.png | Bin 0 -> 4725 bytes system/skins/images/finish.png | Bin 0 -> 930 bytes system/skins/images/folder.png | Bin 0 -> 2189 bytes system/skins/images/fset.png | Bin 0 -> 4868 bytes system/skins/images/general.png | Bin 0 -> 2414 bytes system/skins/images/googlemap.png | Bin 0 -> 4293 bytes system/skins/images/hide_img.png | Bin 0 -> 3417 bytes system/skins/images/img.gif | Bin 0 -> 223 bytes system/skins/images/info.png | Bin 0 -> 936 bytes system/skins/images/iptools.png | Bin 0 -> 4654 bytes system/skins/images/iset.png | Bin 0 -> 4747 bytes system/skins/images/key.png | Bin 0 -> 5635 bytes system/skins/images/lbg.gif | Bin 0 -> 604 bytes system/skins/images/led_gray.gif | Bin 0 -> 394 bytes system/skins/images/led_green.gif | Bin 0 -> 408 bytes system/skins/images/line.gif | Bin 0 -> 92 bytes system/skins/images/line_bg.gif | Bin 0 -> 97 bytes system/skins/images/link.jpg | Bin 0 -> 839 bytes system/skins/images/links.png | Bin 0 -> 4567 bytes system/skins/images/mail.png | Bin 0 -> 6674 bytes system/skins/images/mchat.png | Bin 0 -> 4582 bytes system/skins/images/mline.gif | Bin 0 -> 43 bytes system/skins/images/mset.png | Bin 0 -> 4291 bytes system/skins/images/news.png | Bin 0 -> 1492 bytes system/skins/images/next.png | Bin 0 -> 5330 bytes system/skins/images/noavatar.png | Bin 0 -> 5678 bytes system/skins/images/now.png | Bin 0 -> 896 bytes system/skins/images/nset.png | Bin 0 -> 3955 bytes system/skins/images/ok.png | Bin 0 -> 958 bytes system/skins/images/p1.gif | Bin 0 -> 51 bytes system/skins/images/pingationmod.png | Bin 0 -> 6550 bytes system/skins/images/post_template.png | Bin 0 -> 7172 bytes system/skins/images/preview.png | Bin 0 -> 617 bytes system/skins/images/pset.png | Bin 0 -> 4653 bytes system/skins/images/rating.png | Bin 0 -> 2352 bytes system/skins/images/rating/about.png | Bin 0 -> 4453 bytes system/skins/images/rating/color.png | Bin 0 -> 1399 bytes system/skins/images/rating/num.png | Bin 0 -> 2352 bytes system/skins/images/rating/options.png | Bin 0 -> 4199 bytes system/skins/images/rating/other.png | Bin 0 -> 2414 bytes system/skins/images/rating/rating.png | Bin 0 -> 2352 bytes system/skins/images/rating/txt.png | Bin 0 -> 2369 bytes system/skins/images/referer.png | Bin 0 -> 6090 bytes system/skins/images/rep.png | Bin 0 -> 5448 bytes system/skins/images/repa_a_opts.png | Bin 0 -> 4384 bytes system/skins/images/repa_b_opts.png | Bin 0 -> 4591 bytes system/skins/images/repa_control.png | Bin 0 -> 8849 bytes system/skins/images/repa_ct_opts.png | Bin 0 -> 5523 bytes system/skins/images/repa_g_opts.png | Bin 0 -> 7310 bytes system/skins/images/repa_general.png | Bin 0 -> 9882 bytes system/skins/images/repa_h_opts.png | Bin 0 -> 6426 bytes system/skins/images/repa_info.png | Bin 0 -> 5300 bytes system/skins/images/repa_logs.png | Bin 0 -> 8206 bytes system/skins/images/repa_m_opts.png | Bin 0 -> 4678 bytes system/skins/images/repa_opt.png | Bin 0 -> 5802 bytes system/skins/images/repa_p_opts.png | Bin 0 -> 6482 bytes system/skins/images/rss.gif | Bin 0 -> 2276 bytes system/skins/images/rules.png | Bin 0 -> 5062 bytes system/skins/images/send.png | Bin 0 -> 697 bytes system/skins/images/settings.jpg | Bin 0 -> 932 bytes system/skins/images/shield.png | Bin 0 -> 5452 bytes system/skins/images/smartphone.jpg | Bin 0 -> 3825 bytes system/skins/images/spset.png | Bin 0 -> 6359 bytes system/skins/images/sred.png | Bin 0 -> 3316 bytes system/skins/images/stop.png | Bin 0 -> 1036 bytes system/skins/images/table/big_alert.png | Bin 0 -> 2023 bytes system/skins/images/table/big_arrow-down.png | Bin 0 -> 2233 bytes system/skins/images/table/big_ok.png | Bin 0 -> 2338 bytes system/skins/images/table/big_remove.png | Bin 0 -> 2262 bytes system/skins/images/table/options.png | Bin 0 -> 4199 bytes system/skins/images/table/other.png | Bin 0 -> 2414 bytes system/skins/images/table/small_alert.png | Bin 0 -> 787 bytes .../skins/images/table/small_arrow-down.png | Bin 0 -> 838 bytes system/skins/images/table/small_ok.png | Bin 0 -> 888 bytes system/skins/images/table/small_remove.png | Bin 0 -> 864 bytes system/skins/images/tb_lb.gif | Bin 0 -> 49 bytes system/skins/images/tb_left.gif | Bin 0 -> 49 bytes system/skins/images/tb_lt.gif | Bin 0 -> 42 bytes system/skins/images/tb_rb.gif | Bin 0 -> 49 bytes system/skins/images/tb_right.gif | Bin 0 -> 47 bytes system/skins/images/tb_rt.gif | Bin 0 -> 42 bytes system/skins/images/tb_tb.gif | Bin 0 -> 58 bytes system/skins/images/tb_top.gif | Bin 0 -> 58 bytes system/skins/images/tl_active.gif | Bin 0 -> 177 bytes system/skins/images/tl_inactive.gif | Bin 0 -> 241 bytes system/skins/images/tl_lb.gif | Bin 0 -> 50 bytes system/skins/images/tl_lo.gif | Bin 0 -> 68 bytes system/skins/images/tl_lu.gif | Bin 0 -> 99 bytes system/skins/images/tl_oo.gif | Bin 0 -> 42 bytes system/skins/images/tl_rb.gif | Bin 0 -> 63 bytes system/skins/images/tl_ro.gif | Bin 0 -> 72 bytes system/skins/images/tl_ru.gif | Bin 0 -> 108 bytes system/skins/images/tl_ub.gif | Bin 0 -> 63 bytes system/skins/images/tmpl.png | Bin 0 -> 3712 bytes system/skins/images/tools.png | Bin 0 -> 4051 bytes system/skins/images/top10news.png | Bin 0 -> 4497 bytes system/skins/images/tr_active.gif | Bin 0 -> 103 bytes system/skins/images/tr_inactive.gif | Bin 0 -> 124 bytes system/skins/images/user_edit.png | Bin 0 -> 493 bytes system/skins/images/users.png | Bin 0 -> 2425 bytes system/skins/images/usersgroup.png | Bin 0 -> 5330 bytes system/skins/images/uset.png | Bin 0 -> 4941 bytes system/skins/images/video.png | Bin 0 -> 9375 bytes system/skins/images/votes.png | Bin 0 -> 4543 bytes system/skins/style.css | 351 ++++ system/skins/tabs.js | 148 ++ templates/banned.tpl | 60 + templates/default/addnews.tpl | 27 + templates/default/bbcodes/b.gif | Bin 0 -> 1662 bytes templates/default/bbcodes/bg.gif | Bin 0 -> 820 bytes templates/default/bbcodes/brkspace.gif | Bin 0 -> 135 bytes templates/default/bbcodes/c.gif | Bin 0 -> 263 bytes templates/default/bbcodes/close.gif | Bin 0 -> 1736 bytes templates/default/bbcodes/code.gif | Bin 0 -> 2287 bytes templates/default/bbcodes/color.gif | Bin 0 -> 1400 bytes templates/default/bbcodes/color.html | 116 ++ templates/default/bbcodes/email.gif | Bin 0 -> 2243 bytes templates/default/bbcodes/emo.gif | Bin 0 -> 1163 bytes templates/default/bbcodes/flash.gif | Bin 0 -> 1826 bytes templates/default/bbcodes/hide.gif | Bin 0 -> 270 bytes templates/default/bbcodes/hide1.gif | Bin 0 -> 1227 bytes templates/default/bbcodes/hidetext.gif | Bin 0 -> 270 bytes templates/default/bbcodes/i.gif | Bin 0 -> 1488 bytes templates/default/bbcodes/image.gif | Bin 0 -> 693 bytes templates/default/bbcodes/l.gif | Bin 0 -> 271 bytes templates/default/bbcodes/leech.gif | Bin 0 -> 1794 bytes templates/default/bbcodes/link.gif | Bin 0 -> 1779 bytes templates/default/bbcodes/mp.gif | Bin 0 -> 640 bytes templates/default/bbcodes/mp3.gif | Bin 0 -> 653 bytes templates/default/bbcodes/page.gif | Bin 0 -> 2277 bytes templates/default/bbcodes/pbreak.gif | Bin 0 -> 2253 bytes templates/default/bbcodes/quote.gif | Bin 0 -> 2217 bytes templates/default/bbcodes/r.gif | Bin 0 -> 264 bytes templates/default/bbcodes/rating.gif | Bin 0 -> 1536 bytes templates/default/bbcodes/s.gif | Bin 0 -> 1716 bytes templates/default/bbcodes/screens.gif | Bin 0 -> 273 bytes templates/default/bbcodes/spoiler.gif | Bin 0 -> 1026 bytes templates/default/bbcodes/tor.gif | Bin 0 -> 1096 bytes templates/default/bbcodes/translit.gif | Bin 0 -> 187 bytes templates/default/bbcodes/u.gif | Bin 0 -> 1509 bytes templates/default/bbcodes/upload.gif | Bin 0 -> 2215 bytes templates/default/bbcodes/youtube.gif | Bin 0 -> 1044 bytes templates/default/chat/block.tpl | 16 + templates/default/chat/message.tpl | 20 + templates/default/comments/addcomments.tpl | 4 + templates/default/comments/comments.tpl | 13 + templates/default/comments/info.tpl | 1 + templates/default/comments/main.tpl | 8 + templates/default/css/forum.css | 115 ++ templates/default/css/style.css | 241 +++ templates/default/fav/favorites.tpl | 10 + templates/default/fav/news.tpl | 8 + templates/default/feedback.tpl | 41 + templates/default/forum/addpost.tpl | 52 + templates/default/forum/addtopic.tpl | 125 ++ templates/default/forum/ajax_addpost.tpl | 46 + templates/default/forum/category.tpl | 16 + templates/default/forum/edittopic.tpl | 72 + templates/default/forum/forum.tpl | 73 + templates/default/forum/forums.tpl | 7 + templates/default/forum/images/Thumbs.db | Bin 0 -> 116224 bytes templates/default/forum/images/b_forum.gif | Bin 0 -> 323 bytes templates/default/forum/images/closed.gif | Bin 0 -> 1873 bytes .../default/forum/images/closed_topic.gif | Bin 0 -> 91 bytes .../default/forum/images/dlet_action_down.gif | Bin 0 -> 100 bytes .../default/forum/images/dlet_closed.gif | Bin 0 -> 91 bytes .../default/forum/images/dlet_delete.gif | Bin 0 -> 1781 bytes templates/default/forum/images/dlet_edit.gif | Bin 0 -> 1813 bytes .../default/forum/images/dlet_headerback.gif | Bin 0 -> 312 bytes templates/default/forum/images/dlet_hot.gif | Bin 0 -> 169 bytes .../default/forum/images/dlet_hot_no.gif | Bin 0 -> 169 bytes templates/default/forum/images/dlet_logo.gif | Bin 0 -> 4864 bytes .../default/forum/images/dlet_mq_add.gif | Bin 0 -> 1683 bytes templates/default/forum/images/dlet_norm.gif | Bin 0 -> 169 bytes .../default/forum/images/dlet_norm_no.gif | Bin 0 -> 169 bytes templates/default/forum/images/dlet_poll.gif | Bin 0 -> 169 bytes .../default/forum/images/dlet_poll_no.gif | Bin 0 -> 169 bytes templates/default/forum/images/dlet_quote.gif | Bin 0 -> 1734 bytes .../default/forum/images/dlet_report.gif | Bin 0 -> 1681 bytes templates/default/forum/images/dlet_stats.gif | Bin 0 -> 478 bytes templates/default/forum/images/dlet_sub.gif | Bin 0 -> 1581 bytes .../default/forum/images/dlet_tile_cat.gif | Bin 0 -> 2760 bytes templates/default/forum/images/dlet_up.gif | Bin 0 -> 695 bytes templates/default/forum/images/f_new.gif | Bin 0 -> 492 bytes templates/default/forum/images/f_nonew.gif | Bin 0 -> 489 bytes templates/default/forum/images/fc_new.gif | Bin 0 -> 508 bytes templates/default/forum/images/fc_nonew.gif | Bin 0 -> 547 bytes templates/default/forum/images/hidden.gif | Bin 0 -> 61 bytes templates/default/forum/images/hot_topic.gif | Bin 0 -> 169 bytes .../default/forum/images/hot_topic_no.gif | Bin 0 -> 169 bytes templates/default/forum/images/k.JPG | Bin 0 -> 1056 bytes templates/default/forum/images/lastpost.gif | Bin 0 -> 61 bytes templates/default/forum/images/logo.jpg | Bin 0 -> 23699 bytes templates/default/forum/images/nav.gif | Bin 0 -> 113 bytes templates/default/forum/images/nav_m.gif | Bin 0 -> 53 bytes templates/default/forum/images/new_topic.gif | Bin 0 -> 169 bytes templates/default/forum/images/options.gif | Bin 0 -> 1567 bytes templates/default/forum/images/p_delete.gif | Bin 0 -> 1781 bytes templates/default/forum/images/p_edit.gif | Bin 0 -> 1813 bytes templates/default/forum/images/p_mq_add.gif | Bin 0 -> 1683 bytes templates/default/forum/images/q.JPG | Bin 0 -> 1138 bytes templates/default/forum/images/rating.gif | Bin 0 -> 1134 bytes templates/default/forum/images/rep_m.gif | Bin 0 -> 136 bytes templates/default/forum/images/rep_minus.gif | Bin 0 -> 122 bytes templates/default/forum/images/rep_p.gif | Bin 0 -> 140 bytes templates/default/forum/images/rep_plus.gif | Bin 0 -> 143 bytes templates/default/forum/images/reply.gif | Bin 0 -> 1936 bytes templates/default/forum/images/s_reply.gif | Bin 0 -> 2318 bytes templates/default/forum/images/spacer.gif | Bin 0 -> 43 bytes templates/default/forum/images/stats.gif | Bin 0 -> 478 bytes templates/default/forum/images/t_new.gif | Bin 0 -> 2248 bytes templates/default/forum/images/t_pinned.gif | Bin 0 -> 85 bytes .../default/forum/images/to_post_off.gif | Bin 0 -> 64 bytes templates/default/forum/images/topic.gif | Bin 0 -> 169 bytes .../default/forum/images/topic_title.gif | Bin 0 -> 817 bytes templates/default/forum/images/warn0.gif | Bin 0 -> 213 bytes templates/default/forum/images/warn1.gif | Bin 0 -> 301 bytes templates/default/forum/images/warn2.gif | Bin 0 -> 315 bytes templates/default/forum/images/warn3.gif | Bin 0 -> 314 bytes templates/default/forum/images/warn4.gif | Bin 0 -> 302 bytes templates/default/forum/images/warn5.gif | Bin 0 -> 213 bytes templates/default/forum/images/warn_add.gif | Bin 0 -> 120 bytes templates/default/forum/images/warn_m.gif | Bin 0 -> 64 bytes templates/default/forum/images/warn_minus.gif | Bin 0 -> 121 bytes templates/default/forum/images/warn_p.gif | Bin 0 -> 72 bytes templates/default/forum/index.tpl | 42 + templates/default/forum/info.tpl | 1 + templates/default/forum/login.tpl | 93 + templates/default/forum/main.tpl | 22 + templates/default/forum/moveposts.tpl | 29 + templates/default/forum/movetopic.tpl | 29 + templates/default/forum/msg.tpl | 18 + templates/default/forum/navigation.tpl | 1 + templates/default/forum/poll.tpl | 34 + templates/default/forum/post.tpl | 24 + templates/default/forum/print/post.tpl | 1 + templates/default/forum/print/topic.tpl | 91 + templates/default/forum/report.tpl | 36 + templates/default/forum/search.tpl | 39 + templates/default/forum/send_frend.tpl | 48 + templates/default/forum/stats.tpl | 22 + templates/default/forum/topic.tpl | 50 + templates/default/forum/topics.tpl | 9 + templates/default/forum_last.tpl | 13 + templates/default/forum_last_list.tpl | 6 + templates/default/fullstory.tpl | 18 + templates/default/images/add_fav.png | Bin 0 -> 406 bytes templates/default/images/ajax-loader.gif | Bin 0 -> 723 bytes templates/default/images/asc.gif | Bin 0 -> 76 bytes templates/default/images/banner.gif | Bin 0 -> 10159 bytes templates/default/images/bg.jpg | Bin 0 -> 9740 bytes templates/default/images/bg_foot.gif | Bin 0 -> 423 bytes templates/default/images/bg_footer.gif | Bin 0 -> 262 bytes templates/default/images/bg_mb - .gif | Bin 0 -> 154 bytes templates/default/images/bg_mb.gif | Bin 0 -> 154 bytes templates/default/images/button_out.png | Bin 0 -> 1358 bytes templates/default/images/comm_down.gif | Bin 0 -> 197 bytes templates/default/images/comm_down_off.gif | Bin 0 -> 894 bytes templates/default/images/comm_up.gif | Bin 0 -> 139 bytes templates/default/images/comm_up_off.gif | Bin 0 -> 887 bytes templates/default/images/del_fav.png | Bin 0 -> 251 bytes templates/default/images/desc.gif | Bin 0 -> 76 bytes templates/default/images/dialog-icons.png | Bin 0 -> 3217 bytes templates/default/images/dialog-icons_h.png | Bin 0 -> 3217 bytes templates/default/images/dots.png | Bin 0 -> 3576 bytes templates/default/images/dow.gif | Bin 0 -> 811 bytes templates/default/images/down.gif | Bin 0 -> 836 bytes templates/default/images/down.png | Bin 0 -> 772 bytes templates/default/images/down_off.png | Bin 0 -> 1096 bytes templates/default/images/editstore.png | Bin 0 -> 543 bytes templates/default/images/fullexpand.gif | Bin 0 -> 1312 bytes templates/default/images/key.png | Bin 0 -> 3543 bytes templates/default/images/loader.big.black.gif | Bin 0 -> 4015 bytes templates/default/images/logo.png | Bin 0 -> 79896 bytes templates/default/images/logo_year.gif | Bin 0 -> 326875 bytes templates/default/images/newslist_minus.gif | Bin 0 -> 842 bytes templates/default/images/newslist_plus.gif | Bin 0 -> 843 bytes templates/default/images/noavatar.png | Bin 0 -> 10983 bytes templates/default/images/nophoto.png | Bin 0 -> 9479 bytes templates/default/images/outlines/beveled.png | Bin 0 -> 1898 bytes .../default/images/outlines/drop-shadow.png | Bin 0 -> 2022 bytes .../default/images/outlines/outer-glow.png | Bin 0 -> 5887 bytes .../default/images/outlines/rounded-black.png | Bin 0 -> 5764 bytes .../default/images/outlines/rounded-white.png | Bin 0 -> 2012 bytes templates/default/images/partner.gif | Bin 0 -> 287 bytes templates/default/images/poll1.gif | Bin 0 -> 809 bytes templates/default/images/poll2.gif | Bin 0 -> 809 bytes templates/default/images/poll3.gif | Bin 0 -> 809 bytes templates/default/images/poll4.gif | Bin 0 -> 809 bytes templates/default/images/poll5.gif | Bin 0 -> 809 bytes templates/default/images/read.gif | Bin 0 -> 555 bytes templates/default/images/repa_adm.png | Bin 0 -> 827 bytes templates/default/images/repa_adm_p.png | Bin 0 -> 774 bytes templates/default/images/repa_dn.gif | Bin 0 -> 136 bytes templates/default/images/repa_up.gif | Bin 0 -> 140 bytes templates/default/images/resize.gif | Bin 0 -> 70 bytes templates/default/images/rss_icon.gif | Bin 0 -> 401 bytes templates/default/images/send.gif | Bin 0 -> 590 bytes templates/default/images/send.png | Bin 0 -> 570 bytes templates/default/images/sload.gif | Bin 0 -> 1849 bytes templates/default/images/spoiler-minus.gif | Bin 0 -> 61 bytes templates/default/images/spoiler-plus.gif | Bin 0 -> 62 bytes templates/default/images/stripe.gif | Bin 0 -> 46 bytes templates/default/images/submit.png | Bin 0 -> 570 bytes templates/default/images/title_bg.gif | Bin 0 -> 154 bytes templates/default/images/topmenu_bgg.png | Bin 0 -> 167 bytes templates/default/images/topmenu_over_bgg.png | Bin 0 -> 169 bytes templates/default/images/torrow.gif | Bin 0 -> 532 bytes templates/default/images/unread.gif | Bin 0 -> 339 bytes templates/default/images/up.gif | Bin 0 -> 836 bytes templates/default/images/up.png | Bin 0 -> 750 bytes templates/default/images/up_off.png | Bin 0 -> 1090 bytes templates/default/images/watermark.png | Bin 0 -> 23166 bytes templates/default/info.tpl | 2 + templates/default/login.tpl | 47 + templates/default/lostpassword.tpl | 21 + templates/default/main.tpl | 76 + templates/default/navigation.tpl | 3 + templates/default/newslist/main.tpl | 20 + templates/default/newslist/newslist.tpl | 17 + templates/default/online.tpl | 6 + templates/default/pm.tpl | 37 + templates/default/poll.tpl | 20 + templates/default/preview.css | 401 ++++ templates/default/registration.tpl | 82 + templates/default/reputation.tpl | 6 + templates/default/search.tpl | 13 + templates/default/searchresult.tpl | 63 + templates/default/shortstory.tpl | 24 + templates/default/static.tpl | 4 + templates/default/stats.tpl | 41 + templates/default/table.tpl | 30 + templates/default/tableshow.tpl | 3 + templates/default/tableview.tpl | 4 + templates/default/torrent.tpl | 11 + templates/default/tracker.tpl | 16 + templates/default/userinfo.tpl | 57 + templates/default/users.tpl | 22 + templates/info.tpl | 7 + templates/login.tpl | 36 + templates/offline.tpl | 23 + templates/opensearch.tpl | 19 + templates/redirect.tpl | 20 + templates/smartphone/addcomments.tpl | 34 + templates/smartphone/addnews.tpl | 0 templates/smartphone/chat/block.tpl | 41 + templates/smartphone/chat/mchatblock.tpl | 48 + templates/smartphone/chat/message.tpl | 20 + templates/smartphone/comments.tpl | 10 + templates/smartphone/css/engine.css | 334 ++++ templates/smartphone/css/header.png | Bin 0 -> 171 bytes templates/smartphone/css/panel.png | Bin 0 -> 117 bytes templates/smartphone/css/rss_icon.gif | Bin 0 -> 401 bytes templates/smartphone/css/style.css | 139 ++ templates/smartphone/feedback.tpl | 42 + templates/smartphone/forum_last.tpl | 9 + templates/smartphone/forum_last_list.tpl | 6 + templates/smartphone/fullstory.tpl | 15 + templates/smartphone/images/asc.gif | Bin 0 -> 76 bytes templates/smartphone/images/desc.gif | Bin 0 -> 76 bytes templates/smartphone/images/fullexpand.gif | Bin 0 -> 209 bytes templates/smartphone/images/minus_fav.gif | Bin 0 -> 122 bytes templates/smartphone/images/no-icon.gif | Bin 0 -> 2040 bytes templates/smartphone/images/plus_fav.gif | Bin 0 -> 143 bytes templates/smartphone/images/poll1.gif | Bin 0 -> 809 bytes templates/smartphone/images/poll2.gif | Bin 0 -> 809 bytes templates/smartphone/images/poll3.gif | Bin 0 -> 809 bytes templates/smartphone/images/poll4.gif | Bin 0 -> 809 bytes templates/smartphone/images/poll5.gif | Bin 0 -> 809 bytes templates/smartphone/images/read.gif | Bin 0 -> 555 bytes templates/smartphone/images/resize.gif | Bin 0 -> 70 bytes templates/smartphone/images/send.gif | Bin 0 -> 590 bytes templates/smartphone/images/spacer.gif | Bin 0 -> 43 bytes templates/smartphone/images/unread.gif | Bin 0 -> 339 bytes templates/smartphone/info.tpl | 5 + templates/smartphone/login.tpl | 24 + templates/smartphone/lostpassword.tpl | 15 + templates/smartphone/main.tpl | 36 + templates/smartphone/navigation.tpl | 1 + templates/smartphone/online.tpl | 12 + templates/smartphone/pm.tpl | 62 + templates/smartphone/poll.tpl | 10 + templates/smartphone/registration.tpl | 75 + templates/smartphone/search.tpl | 9 + templates/smartphone/searchresult.tpl | 14 + templates/smartphone/shortstory.tpl | 10 + templates/smartphone/static.tpl | 5 + templates/smartphone/stats.tpl | 120 ++ templates/smartphone/tagscloud.tpl | 0 templates/smartphone/torrent.tpl | 11 + templates/smartphone/userinfo.tpl | 106 ++ templates/smartphone/vote.tpl | 0 uploads/rating/game.png | Bin 0 -> 4392 bytes uploads/rating/kinopoisk.png | Bin 0 -> 2016 bytes uploads/rating/rating.png | Bin 0 -> 5430 bytes uploads/rating/star.png | Bin 0 -> 2960 bytes 707 files changed, 55878 insertions(+) create mode 100644 404.php create mode 100644 control.php create mode 100644 download.php create mode 100644 favicon.ico create mode 100644 index.php create mode 100644 language/Russian/adminpanel.lng create mode 100644 language/Russian/adminpanel_repa.lng create mode 100644 language/Russian/chat.lng create mode 100644 language/Russian/friends.lng create mode 100644 language/Russian/help.lng create mode 100644 language/Russian/img.lng create mode 100644 language/Russian/rating.lng create mode 100644 language/Russian/table.lng create mode 100644 language/Russian/website.lng create mode 100644 language/Russian/website_repa.lng create mode 100644 out.php create mode 100644 rating.php create mode 100644 robots.txt create mode 100644 schema.sql create mode 100644 system/ajax/addcomments.php create mode 100644 system/ajax/bbcode.php create mode 100644 system/ajax/bbcodes.js create mode 100644 system/ajax/categajax.php create mode 100644 system/ajax/chat.php create mode 100644 system/ajax/clean.php create mode 100644 system/ajax/commentdelete.php create mode 100644 system/ajax/editcomments.php create mode 100644 system/ajax/favorites.php create mode 100644 system/ajax/find_relates.php create mode 100644 system/ajax/keywords.php create mode 100644 system/ajax/newsletter.php create mode 100644 system/ajax/newslist.php create mode 100644 system/ajax/poll.php create mode 100644 system/ajax/rating.php create mode 100644 system/ajax/rebuild.php create mode 100644 system/ajax/registration.php create mode 100644 system/ajax/reputation.php create mode 100644 system/ajax/subscribe.php create mode 100644 system/ajax/torrent.php create mode 100644 system/ajax/upload.form.php create mode 100644 system/ajax/upload.php create mode 100644 system/ajax/voted.php create mode 100644 system/classes/JSON.php create mode 100644 system/classes/cache.class.php create mode 100644 system/classes/captcha.class.php create mode 100644 system/classes/comments.class.php create mode 100644 system/classes/download.class.php create mode 100644 system/classes/flashplayer/audio.txt create mode 100644 system/classes/flashplayer/uppod.swf create mode 100644 system/classes/flashplayer/video.txt create mode 100644 system/classes/flashplayer/youtube.txt create mode 100644 system/classes/google.class.php create mode 100644 system/classes/mail.class.php create mode 100644 system/classes/mysql.php create mode 100644 system/classes/navigation.class.php create mode 100644 system/classes/parse.class.php create mode 100644 system/classes/rss.class.php create mode 100644 system/classes/sphinx.api.php create mode 100644 system/classes/swfupload/cancelbutton.gif create mode 100644 system/classes/swfupload/fileprogress.js create mode 100644 system/classes/swfupload/handlers.js create mode 100644 system/classes/swfupload/swfupload.js create mode 100644 system/classes/swfupload/swfupload.queue.js create mode 100644 system/classes/swfupload/swfupload.swf create mode 100644 system/classes/swfupload/swfupload_f8.swf create mode 100644 system/classes/swfupload/swfupload_f9.swf create mode 100644 system/classes/templates.class.php create mode 100644 system/classes/thumb.class.php create mode 100644 system/classes/torrent.class.php create mode 100644 system/cron.php create mode 100644 system/engine.php create mode 100644 system/file.php create mode 100644 system/forum/action/addpost.php create mode 100644 system/forum/action/addtopic.php create mode 100644 system/forum/action/forum.php create mode 100644 system/forum/action/moderation.php create mode 100644 system/forum/action/post.php create mode 100644 system/forum/action/topic.php create mode 100644 system/forum/ajax/addpost.php create mode 100644 system/forum/ajax/dle_forum.js create mode 100644 system/forum/ajax/editpost.php create mode 100644 system/forum/ajax/init.php create mode 100644 system/forum/ajax/poll.php create mode 100644 system/forum/ajax/post.preview.php create mode 100644 system/forum/ajax/uploads.form.php create mode 100644 system/forum/images/post_icons/icon1.gif create mode 100644 system/forum/images/post_icons/icon10.gif create mode 100644 system/forum/images/post_icons/icon11.gif create mode 100644 system/forum/images/post_icons/icon12.gif create mode 100644 system/forum/images/post_icons/icon13.gif create mode 100644 system/forum/images/post_icons/icon14.gif create mode 100644 system/forum/images/post_icons/icon2.gif create mode 100644 system/forum/images/post_icons/icon3.gif create mode 100644 system/forum/images/post_icons/icon4.gif create mode 100644 system/forum/images/post_icons/icon5.gif create mode 100644 system/forum/images/post_icons/icon6.gif create mode 100644 system/forum/images/post_icons/icon7.gif create mode 100644 system/forum/images/post_icons/icon8.gif create mode 100644 system/forum/images/post_icons/icon9.gif create mode 100644 system/forum/language/English/admin.lng create mode 100644 system/forum/language/English/forum.lng create mode 100644 system/forum/language/Russian/admin.lng create mode 100644 system/forum/language/Russian/forum.lng create mode 100644 system/forum/main.php create mode 100644 system/forum/sources/category.php create mode 100644 system/forum/sources/components/attachment.php create mode 100644 system/forum/sources/components/bbcode.php create mode 100644 system/forum/sources/components/edit_options.php create mode 100644 system/forum/sources/components/functions.php create mode 100644 system/forum/sources/components/init.php create mode 100644 system/forum/sources/components/licence.odf create mode 100644 system/forum/sources/components/navigation.php create mode 100644 system/forum/sources/components/poll.php create mode 100644 system/forum/sources/components/text_skin.php create mode 100644 system/forum/sources/modules/getnew.php create mode 100644 system/forum/sources/modules/search.php create mode 100644 system/forum/sources/modules/stats.php create mode 100644 system/forum/sources/modules/subscription.php create mode 100644 system/forum/sources/modules/uploads.php create mode 100644 system/forum/sources/shapeshifter/forum_posts.php create mode 100644 system/forum/sources/shapeshifter/forum_rss.php create mode 100644 system/forum/sources/shapeshifter/showallposts.php create mode 100644 system/forum/sources/showforum.php create mode 100644 system/forum/sources/showposts.php create mode 100644 system/forum/sources/showtopic.php create mode 100644 system/forum/sources/showtopics.php create mode 100644 system/forum/textscreen.css create mode 100644 system/forum/textversion.php create mode 100644 system/images.php create mode 100644 system/inc/addnews.php create mode 100644 system/inc/blockip.php create mode 100644 system/inc/categories.php create mode 100644 system/inc/chat.php create mode 100644 system/inc/clean.php create mode 100644 system/inc/editnews.php create mode 100644 system/inc/editusers.php create mode 100644 system/inc/email.php create mode 100644 system/inc/files.php create mode 100644 system/inc/forum.php create mode 100644 system/inc/forum/email.php create mode 100644 system/inc/forum/form.php create mode 100644 system/inc/forum/forum.php create mode 100644 system/inc/forum/functions.php create mode 100644 system/inc/forum/ico/Usergroup.png create mode 100644 system/inc/forum/ico/category.png create mode 100644 system/inc/forum/ico/content.png create mode 100644 system/inc/forum/ico/discuss.png create mode 100644 system/inc/forum/ico/dle_forum.png create mode 100644 system/inc/forum/ico/filebrowser_action.gif create mode 100644 system/inc/forum/ico/filebrowser_action2.gif create mode 100644 system/inc/forum/ico/forum.png create mode 100644 system/inc/forum/ico/global.png create mode 100644 system/inc/forum/ico/help.png create mode 100644 system/inc/forum/ico/index.html create mode 100644 system/inc/forum/ico/licence.png create mode 100644 system/inc/forum/ico/modules.png create mode 100644 system/inc/forum/ico/mset.png create mode 100644 system/inc/forum/ico/news.png create mode 100644 system/inc/forum/ico/preventions.png create mode 100644 system/inc/forum/ico/rank.png create mode 100644 system/inc/forum/ico/safety.png create mode 100644 system/inc/forum/ico/service.png create mode 100644 system/inc/forum/ico/show.png create mode 100644 system/inc/forum/ico/speed.png create mode 100644 system/inc/forum/ico/tools.png create mode 100644 system/inc/forum/ico/uploads.png create mode 100644 system/inc/forum/ico/usersgroup.png create mode 100644 system/inc/forum/init.class.php create mode 100644 system/inc/forum/service.php create mode 100644 system/inc/forum/table.php create mode 100644 system/inc/forum/tools.php create mode 100644 system/inc/forum/usergroup.php create mode 100644 system/inc/googlemap.php create mode 100644 system/inc/include/functions.inc.php create mode 100644 system/inc/include/init.php create mode 100644 system/inc/include/inserttag.php create mode 100644 system/inc/iptools.php create mode 100644 system/inc/main.php create mode 100644 system/inc/mass_static_actions.php create mode 100644 system/inc/mass_user_actions.php create mode 100644 system/inc/massactions.php create mode 100644 system/inc/newsimg/addimg.php create mode 100644 system/inc/newsimg/doaddimg.php create mode 100644 system/inc/newsimg/doeditimg.php create mode 100644 system/inc/newsimg/editimg.php create mode 100644 system/inc/newsletter.php create mode 100644 system/inc/options.php create mode 100644 system/inc/preview.php create mode 100644 system/inc/rebuild.php create mode 100644 system/inc/repa.php create mode 100644 system/inc/repa/repa_control.php create mode 100644 system/inc/repa/repa_delete.php create mode 100644 system/inc/repa/repa_edit.php create mode 100644 system/inc/repa/repa_main.php create mode 100644 system/inc/repa/repa_options.php create mode 100644 system/inc/repa/repa_save.php create mode 100644 system/inc/repa/repa_vminus.php create mode 100644 system/inc/repa/repa_vplus.php create mode 100644 system/inc/static.php create mode 100644 system/inc/table.php create mode 100644 system/inc/usergroup.php create mode 100644 system/inc/wordfilter.php create mode 100644 system/init.php create mode 100644 system/js/highslide.js create mode 100644 system/js/jquery.js create mode 100644 system/js/main.js create mode 100644 system/modules/addcomments.php create mode 100644 system/modules/addimg.php create mode 100644 system/modules/addnews.php create mode 100644 system/modules/antibot.php create mode 100644 system/modules/banned.php create mode 100644 system/modules/bbcode.php create mode 100644 system/modules/chat/addmess.php create mode 100644 system/modules/chat/ajax.js create mode 100644 system/modules/chat/block.php create mode 100644 system/modules/chat/chat.class.php create mode 100644 system/modules/chat/modules.php create mode 100644 system/modules/comments-last.php create mode 100644 system/modules/favorites.php create mode 100644 system/modules/feedback.php create mode 100644 system/modules/fonts/eva.png create mode 100644 system/modules/forum/show.last.php create mode 100644 system/modules/functions.php create mode 100644 system/modules/gzip.php create mode 100644 system/modules/lastcomments.php create mode 100644 system/modules/lostpassword.php create mode 100644 system/modules/newsimg.php create mode 100644 system/modules/newslist.php create mode 100644 system/modules/online.php create mode 100644 system/modules/pm.php create mode 100644 system/modules/pm_alert.php create mode 100644 system/modules/poll.php create mode 100644 system/modules/profile.php create mode 100644 system/modules/register.php create mode 100644 system/modules/reputation.php create mode 100644 system/modules/rss.php create mode 100644 system/modules/search.php create mode 100644 system/modules/show.full.php create mode 100644 system/modules/show.short.php create mode 100644 system/modules/sitelogin.php create mode 100644 system/modules/static.php create mode 100644 system/modules/stats.php create mode 100644 system/modules/table.php create mode 100644 system/modules/toptables.php create mode 100644 system/modules/torrent/list.php create mode 100644 system/modules/torrent/upload.php create mode 100644 system/modules/users.php create mode 100644 system/offline.php create mode 100644 system/opensearch.php create mode 100644 system/preview.php create mode 100644 system/skins/bbcodes/color.html create mode 100644 system/skins/bbcodes/images/b.gif create mode 100644 system/skins/bbcodes/images/bg.gif create mode 100644 system/skins/bbcodes/images/brkspace.gif create mode 100644 system/skins/bbcodes/images/c.gif create mode 100644 system/skins/bbcodes/images/close.gif create mode 100644 system/skins/bbcodes/images/code.gif create mode 100644 system/skins/bbcodes/images/color.gif create mode 100644 system/skins/bbcodes/images/email.gif create mode 100644 system/skins/bbcodes/images/emo.gif create mode 100644 system/skins/bbcodes/images/fast_hide.gif create mode 100644 system/skins/bbcodes/images/fast_hide1.gif create mode 100644 system/skins/bbcodes/images/flash.gif create mode 100644 system/skins/bbcodes/images/hide.gif create mode 100644 system/skins/bbcodes/images/i.gif create mode 100644 system/skins/bbcodes/images/image.gif create mode 100644 system/skins/bbcodes/images/l.gif create mode 100644 system/skins/bbcodes/images/leech.gif create mode 100644 system/skins/bbcodes/images/link.gif create mode 100644 system/skins/bbcodes/images/mp.gif create mode 100644 system/skins/bbcodes/images/mp3.gif create mode 100644 system/skins/bbcodes/images/page.gif create mode 100644 system/skins/bbcodes/images/quote.gif create mode 100644 system/skins/bbcodes/images/r.gif create mode 100644 system/skins/bbcodes/images/rating.gif create mode 100644 system/skins/bbcodes/images/s.gif create mode 100644 system/skins/bbcodes/images/screens.gif create mode 100644 system/skins/bbcodes/images/spoiler.gif create mode 100644 system/skins/bbcodes/images/translit.gif create mode 100644 system/skins/bbcodes/images/typograf.gif create mode 100644 system/skins/bbcodes/images/u.gif create mode 100644 system/skins/bbcodes/images/upload.gif create mode 100644 system/skins/bbcodes/images/youtube.gif create mode 100644 system/skins/bbcodes/rating.gif create mode 100644 system/skins/calendar-blue.css create mode 100644 system/skins/calendar.js create mode 100644 system/skins/default.js create mode 100644 system/skins/default.skin.php create mode 100644 system/skins/images/ads.png create mode 100644 system/skins/images/allnews.png create mode 100644 system/skins/images/allset.png create mode 100644 system/skins/images/banusers.png create mode 100644 system/skins/images/block_birth.jpg create mode 100644 system/skins/images/block_new.jpg create mode 100644 system/skins/images/blockip.png create mode 100644 system/skins/images/browser_action.gif create mode 100644 system/skins/images/bttn.gif create mode 100644 system/skins/images/cats.png create mode 100644 system/skins/images/ch_pass.png create mode 100644 system/skins/images/clean.png create mode 100644 system/skins/images/close-pm.png create mode 100644 system/skins/images/comments.png create mode 100644 system/skins/images/conf_images.png create mode 100644 system/skins/images/db_opt.png create mode 100644 system/skins/images/db_optimize.gif create mode 100644 system/skins/images/db_repair.gif create mode 100644 system/skins/images/db_save.gif create mode 100644 system/skins/images/dbset.png create mode 100644 system/skins/images/dle_forum.PNG create mode 100644 system/skins/images/dle_smf.gif create mode 100644 system/skins/images/email.png create mode 100644 system/skins/images/error.png create mode 100644 system/skins/images/finish.png create mode 100644 system/skins/images/folder.png create mode 100644 system/skins/images/fset.png create mode 100644 system/skins/images/general.png create mode 100644 system/skins/images/googlemap.png create mode 100644 system/skins/images/hide_img.png create mode 100644 system/skins/images/img.gif create mode 100644 system/skins/images/info.png create mode 100644 system/skins/images/iptools.png create mode 100644 system/skins/images/iset.png create mode 100644 system/skins/images/key.png create mode 100644 system/skins/images/lbg.gif create mode 100644 system/skins/images/led_gray.gif create mode 100644 system/skins/images/led_green.gif create mode 100644 system/skins/images/line.gif create mode 100644 system/skins/images/line_bg.gif create mode 100644 system/skins/images/link.jpg create mode 100644 system/skins/images/links.png create mode 100644 system/skins/images/mail.png create mode 100644 system/skins/images/mchat.png create mode 100644 system/skins/images/mline.gif create mode 100644 system/skins/images/mset.png create mode 100644 system/skins/images/news.png create mode 100644 system/skins/images/next.png create mode 100644 system/skins/images/noavatar.png create mode 100644 system/skins/images/now.png create mode 100644 system/skins/images/nset.png create mode 100644 system/skins/images/ok.png create mode 100644 system/skins/images/p1.gif create mode 100644 system/skins/images/pingationmod.png create mode 100644 system/skins/images/post_template.png create mode 100644 system/skins/images/preview.png create mode 100644 system/skins/images/pset.png create mode 100644 system/skins/images/rating.png create mode 100644 system/skins/images/rating/about.png create mode 100644 system/skins/images/rating/color.png create mode 100644 system/skins/images/rating/num.png create mode 100644 system/skins/images/rating/options.png create mode 100644 system/skins/images/rating/other.png create mode 100644 system/skins/images/rating/rating.png create mode 100644 system/skins/images/rating/txt.png create mode 100644 system/skins/images/referer.png create mode 100644 system/skins/images/rep.png create mode 100644 system/skins/images/repa_a_opts.png create mode 100644 system/skins/images/repa_b_opts.png create mode 100644 system/skins/images/repa_control.png create mode 100644 system/skins/images/repa_ct_opts.png create mode 100644 system/skins/images/repa_g_opts.png create mode 100644 system/skins/images/repa_general.png create mode 100644 system/skins/images/repa_h_opts.png create mode 100644 system/skins/images/repa_info.png create mode 100644 system/skins/images/repa_logs.png create mode 100644 system/skins/images/repa_m_opts.png create mode 100644 system/skins/images/repa_opt.png create mode 100644 system/skins/images/repa_p_opts.png create mode 100644 system/skins/images/rss.gif create mode 100644 system/skins/images/rules.png create mode 100644 system/skins/images/send.png create mode 100644 system/skins/images/settings.jpg create mode 100644 system/skins/images/shield.png create mode 100644 system/skins/images/smartphone.jpg create mode 100644 system/skins/images/spset.png create mode 100644 system/skins/images/sred.png create mode 100644 system/skins/images/stop.png create mode 100644 system/skins/images/table/big_alert.png create mode 100644 system/skins/images/table/big_arrow-down.png create mode 100644 system/skins/images/table/big_ok.png create mode 100644 system/skins/images/table/big_remove.png create mode 100644 system/skins/images/table/options.png create mode 100644 system/skins/images/table/other.png create mode 100644 system/skins/images/table/small_alert.png create mode 100644 system/skins/images/table/small_arrow-down.png create mode 100644 system/skins/images/table/small_ok.png create mode 100644 system/skins/images/table/small_remove.png create mode 100644 system/skins/images/tb_lb.gif create mode 100644 system/skins/images/tb_left.gif create mode 100644 system/skins/images/tb_lt.gif create mode 100644 system/skins/images/tb_rb.gif create mode 100644 system/skins/images/tb_right.gif create mode 100644 system/skins/images/tb_rt.gif create mode 100644 system/skins/images/tb_tb.gif create mode 100644 system/skins/images/tb_top.gif create mode 100644 system/skins/images/tl_active.gif create mode 100644 system/skins/images/tl_inactive.gif create mode 100644 system/skins/images/tl_lb.gif create mode 100644 system/skins/images/tl_lo.gif create mode 100644 system/skins/images/tl_lu.gif create mode 100644 system/skins/images/tl_oo.gif create mode 100644 system/skins/images/tl_rb.gif create mode 100644 system/skins/images/tl_ro.gif create mode 100644 system/skins/images/tl_ru.gif create mode 100644 system/skins/images/tl_ub.gif create mode 100644 system/skins/images/tmpl.png create mode 100644 system/skins/images/tools.png create mode 100644 system/skins/images/top10news.png create mode 100644 system/skins/images/tr_active.gif create mode 100644 system/skins/images/tr_inactive.gif create mode 100644 system/skins/images/user_edit.png create mode 100644 system/skins/images/users.png create mode 100644 system/skins/images/usersgroup.png create mode 100644 system/skins/images/uset.png create mode 100644 system/skins/images/video.png create mode 100644 system/skins/images/votes.png create mode 100644 system/skins/style.css create mode 100644 system/skins/tabs.js create mode 100644 templates/banned.tpl create mode 100644 templates/default/addnews.tpl create mode 100644 templates/default/bbcodes/b.gif create mode 100644 templates/default/bbcodes/bg.gif create mode 100644 templates/default/bbcodes/brkspace.gif create mode 100644 templates/default/bbcodes/c.gif create mode 100644 templates/default/bbcodes/close.gif create mode 100644 templates/default/bbcodes/code.gif create mode 100644 templates/default/bbcodes/color.gif create mode 100644 templates/default/bbcodes/color.html create mode 100644 templates/default/bbcodes/email.gif create mode 100644 templates/default/bbcodes/emo.gif create mode 100644 templates/default/bbcodes/flash.gif create mode 100644 templates/default/bbcodes/hide.gif create mode 100644 templates/default/bbcodes/hide1.gif create mode 100644 templates/default/bbcodes/hidetext.gif create mode 100644 templates/default/bbcodes/i.gif create mode 100644 templates/default/bbcodes/image.gif create mode 100644 templates/default/bbcodes/l.gif create mode 100644 templates/default/bbcodes/leech.gif create mode 100644 templates/default/bbcodes/link.gif create mode 100644 templates/default/bbcodes/mp.gif create mode 100644 templates/default/bbcodes/mp3.gif create mode 100644 templates/default/bbcodes/page.gif create mode 100644 templates/default/bbcodes/pbreak.gif create mode 100644 templates/default/bbcodes/quote.gif create mode 100644 templates/default/bbcodes/r.gif create mode 100644 templates/default/bbcodes/rating.gif create mode 100644 templates/default/bbcodes/s.gif create mode 100644 templates/default/bbcodes/screens.gif create mode 100644 templates/default/bbcodes/spoiler.gif create mode 100644 templates/default/bbcodes/tor.gif create mode 100644 templates/default/bbcodes/translit.gif create mode 100644 templates/default/bbcodes/u.gif create mode 100644 templates/default/bbcodes/upload.gif create mode 100644 templates/default/bbcodes/youtube.gif create mode 100644 templates/default/chat/block.tpl create mode 100644 templates/default/chat/message.tpl create mode 100644 templates/default/comments/addcomments.tpl create mode 100644 templates/default/comments/comments.tpl create mode 100644 templates/default/comments/info.tpl create mode 100644 templates/default/comments/main.tpl create mode 100644 templates/default/css/forum.css create mode 100644 templates/default/css/style.css create mode 100644 templates/default/fav/favorites.tpl create mode 100644 templates/default/fav/news.tpl create mode 100644 templates/default/feedback.tpl create mode 100644 templates/default/forum/addpost.tpl create mode 100644 templates/default/forum/addtopic.tpl create mode 100644 templates/default/forum/ajax_addpost.tpl create mode 100644 templates/default/forum/category.tpl create mode 100644 templates/default/forum/edittopic.tpl create mode 100644 templates/default/forum/forum.tpl create mode 100644 templates/default/forum/forums.tpl create mode 100644 templates/default/forum/images/Thumbs.db create mode 100644 templates/default/forum/images/b_forum.gif create mode 100644 templates/default/forum/images/closed.gif create mode 100644 templates/default/forum/images/closed_topic.gif create mode 100644 templates/default/forum/images/dlet_action_down.gif create mode 100644 templates/default/forum/images/dlet_closed.gif create mode 100644 templates/default/forum/images/dlet_delete.gif create mode 100644 templates/default/forum/images/dlet_edit.gif create mode 100644 templates/default/forum/images/dlet_headerback.gif create mode 100644 templates/default/forum/images/dlet_hot.gif create mode 100644 templates/default/forum/images/dlet_hot_no.gif create mode 100644 templates/default/forum/images/dlet_logo.gif create mode 100644 templates/default/forum/images/dlet_mq_add.gif create mode 100644 templates/default/forum/images/dlet_norm.gif create mode 100644 templates/default/forum/images/dlet_norm_no.gif create mode 100644 templates/default/forum/images/dlet_poll.gif create mode 100644 templates/default/forum/images/dlet_poll_no.gif create mode 100644 templates/default/forum/images/dlet_quote.gif create mode 100644 templates/default/forum/images/dlet_report.gif create mode 100644 templates/default/forum/images/dlet_stats.gif create mode 100644 templates/default/forum/images/dlet_sub.gif create mode 100644 templates/default/forum/images/dlet_tile_cat.gif create mode 100644 templates/default/forum/images/dlet_up.gif create mode 100644 templates/default/forum/images/f_new.gif create mode 100644 templates/default/forum/images/f_nonew.gif create mode 100644 templates/default/forum/images/fc_new.gif create mode 100644 templates/default/forum/images/fc_nonew.gif create mode 100644 templates/default/forum/images/hidden.gif create mode 100644 templates/default/forum/images/hot_topic.gif create mode 100644 templates/default/forum/images/hot_topic_no.gif create mode 100644 templates/default/forum/images/k.JPG create mode 100644 templates/default/forum/images/lastpost.gif create mode 100644 templates/default/forum/images/logo.jpg create mode 100644 templates/default/forum/images/nav.gif create mode 100644 templates/default/forum/images/nav_m.gif create mode 100644 templates/default/forum/images/new_topic.gif create mode 100644 templates/default/forum/images/options.gif create mode 100644 templates/default/forum/images/p_delete.gif create mode 100644 templates/default/forum/images/p_edit.gif create mode 100644 templates/default/forum/images/p_mq_add.gif create mode 100644 templates/default/forum/images/q.JPG create mode 100644 templates/default/forum/images/rating.gif create mode 100644 templates/default/forum/images/rep_m.gif create mode 100644 templates/default/forum/images/rep_minus.gif create mode 100644 templates/default/forum/images/rep_p.gif create mode 100644 templates/default/forum/images/rep_plus.gif create mode 100644 templates/default/forum/images/reply.gif create mode 100644 templates/default/forum/images/s_reply.gif create mode 100644 templates/default/forum/images/spacer.gif create mode 100644 templates/default/forum/images/stats.gif create mode 100644 templates/default/forum/images/t_new.gif create mode 100644 templates/default/forum/images/t_pinned.gif create mode 100644 templates/default/forum/images/to_post_off.gif create mode 100644 templates/default/forum/images/topic.gif create mode 100644 templates/default/forum/images/topic_title.gif create mode 100644 templates/default/forum/images/warn0.gif create mode 100644 templates/default/forum/images/warn1.gif create mode 100644 templates/default/forum/images/warn2.gif create mode 100644 templates/default/forum/images/warn3.gif create mode 100644 templates/default/forum/images/warn4.gif create mode 100644 templates/default/forum/images/warn5.gif create mode 100644 templates/default/forum/images/warn_add.gif create mode 100644 templates/default/forum/images/warn_m.gif create mode 100644 templates/default/forum/images/warn_minus.gif create mode 100644 templates/default/forum/images/warn_p.gif create mode 100644 templates/default/forum/index.tpl create mode 100644 templates/default/forum/info.tpl create mode 100644 templates/default/forum/login.tpl create mode 100644 templates/default/forum/main.tpl create mode 100644 templates/default/forum/moveposts.tpl create mode 100644 templates/default/forum/movetopic.tpl create mode 100644 templates/default/forum/msg.tpl create mode 100644 templates/default/forum/navigation.tpl create mode 100644 templates/default/forum/poll.tpl create mode 100644 templates/default/forum/post.tpl create mode 100644 templates/default/forum/print/post.tpl create mode 100644 templates/default/forum/print/topic.tpl create mode 100644 templates/default/forum/report.tpl create mode 100644 templates/default/forum/search.tpl create mode 100644 templates/default/forum/send_frend.tpl create mode 100644 templates/default/forum/stats.tpl create mode 100644 templates/default/forum/topic.tpl create mode 100644 templates/default/forum/topics.tpl create mode 100644 templates/default/forum_last.tpl create mode 100644 templates/default/forum_last_list.tpl create mode 100644 templates/default/fullstory.tpl create mode 100644 templates/default/images/add_fav.png create mode 100644 templates/default/images/ajax-loader.gif create mode 100644 templates/default/images/asc.gif create mode 100644 templates/default/images/banner.gif create mode 100644 templates/default/images/bg.jpg create mode 100644 templates/default/images/bg_foot.gif create mode 100644 templates/default/images/bg_footer.gif create mode 100644 templates/default/images/bg_mb - .gif create mode 100644 templates/default/images/bg_mb.gif create mode 100644 templates/default/images/button_out.png create mode 100644 templates/default/images/comm_down.gif create mode 100644 templates/default/images/comm_down_off.gif create mode 100644 templates/default/images/comm_up.gif create mode 100644 templates/default/images/comm_up_off.gif create mode 100644 templates/default/images/del_fav.png create mode 100644 templates/default/images/desc.gif create mode 100644 templates/default/images/dialog-icons.png create mode 100644 templates/default/images/dialog-icons_h.png create mode 100644 templates/default/images/dots.png create mode 100644 templates/default/images/dow.gif create mode 100644 templates/default/images/down.gif create mode 100644 templates/default/images/down.png create mode 100644 templates/default/images/down_off.png create mode 100644 templates/default/images/editstore.png create mode 100644 templates/default/images/fullexpand.gif create mode 100644 templates/default/images/key.png create mode 100644 templates/default/images/loader.big.black.gif create mode 100644 templates/default/images/logo.png create mode 100644 templates/default/images/logo_year.gif create mode 100644 templates/default/images/newslist_minus.gif create mode 100644 templates/default/images/newslist_plus.gif create mode 100644 templates/default/images/noavatar.png create mode 100644 templates/default/images/nophoto.png create mode 100644 templates/default/images/outlines/beveled.png create mode 100644 templates/default/images/outlines/drop-shadow.png create mode 100644 templates/default/images/outlines/outer-glow.png create mode 100644 templates/default/images/outlines/rounded-black.png create mode 100644 templates/default/images/outlines/rounded-white.png create mode 100644 templates/default/images/partner.gif create mode 100644 templates/default/images/poll1.gif create mode 100644 templates/default/images/poll2.gif create mode 100644 templates/default/images/poll3.gif create mode 100644 templates/default/images/poll4.gif create mode 100644 templates/default/images/poll5.gif create mode 100644 templates/default/images/read.gif create mode 100644 templates/default/images/repa_adm.png create mode 100644 templates/default/images/repa_adm_p.png create mode 100644 templates/default/images/repa_dn.gif create mode 100644 templates/default/images/repa_up.gif create mode 100644 templates/default/images/resize.gif create mode 100644 templates/default/images/rss_icon.gif create mode 100644 templates/default/images/send.gif create mode 100644 templates/default/images/send.png create mode 100644 templates/default/images/sload.gif create mode 100644 templates/default/images/spoiler-minus.gif create mode 100644 templates/default/images/spoiler-plus.gif create mode 100644 templates/default/images/stripe.gif create mode 100644 templates/default/images/submit.png create mode 100644 templates/default/images/title_bg.gif create mode 100644 templates/default/images/topmenu_bgg.png create mode 100644 templates/default/images/topmenu_over_bgg.png create mode 100644 templates/default/images/torrow.gif create mode 100644 templates/default/images/unread.gif create mode 100644 templates/default/images/up.gif create mode 100644 templates/default/images/up.png create mode 100644 templates/default/images/up_off.png create mode 100644 templates/default/images/watermark.png create mode 100644 templates/default/info.tpl create mode 100644 templates/default/login.tpl create mode 100644 templates/default/lostpassword.tpl create mode 100644 templates/default/main.tpl create mode 100644 templates/default/navigation.tpl create mode 100644 templates/default/newslist/main.tpl create mode 100644 templates/default/newslist/newslist.tpl create mode 100644 templates/default/online.tpl create mode 100644 templates/default/pm.tpl create mode 100644 templates/default/poll.tpl create mode 100644 templates/default/preview.css create mode 100644 templates/default/registration.tpl create mode 100644 templates/default/reputation.tpl create mode 100644 templates/default/search.tpl create mode 100644 templates/default/searchresult.tpl create mode 100644 templates/default/shortstory.tpl create mode 100644 templates/default/static.tpl create mode 100644 templates/default/stats.tpl create mode 100644 templates/default/table.tpl create mode 100644 templates/default/tableshow.tpl create mode 100644 templates/default/tableview.tpl create mode 100644 templates/default/torrent.tpl create mode 100644 templates/default/tracker.tpl create mode 100644 templates/default/userinfo.tpl create mode 100644 templates/default/users.tpl create mode 100644 templates/info.tpl create mode 100644 templates/login.tpl create mode 100644 templates/offline.tpl create mode 100644 templates/opensearch.tpl create mode 100644 templates/redirect.tpl create mode 100644 templates/smartphone/addcomments.tpl create mode 100644 templates/smartphone/addnews.tpl create mode 100644 templates/smartphone/chat/block.tpl create mode 100644 templates/smartphone/chat/mchatblock.tpl create mode 100644 templates/smartphone/chat/message.tpl create mode 100644 templates/smartphone/comments.tpl create mode 100644 templates/smartphone/css/engine.css create mode 100644 templates/smartphone/css/header.png create mode 100644 templates/smartphone/css/panel.png create mode 100644 templates/smartphone/css/rss_icon.gif create mode 100644 templates/smartphone/css/style.css create mode 100644 templates/smartphone/feedback.tpl create mode 100644 templates/smartphone/forum_last.tpl create mode 100644 templates/smartphone/forum_last_list.tpl create mode 100644 templates/smartphone/fullstory.tpl create mode 100644 templates/smartphone/images/asc.gif create mode 100644 templates/smartphone/images/desc.gif create mode 100644 templates/smartphone/images/fullexpand.gif create mode 100644 templates/smartphone/images/minus_fav.gif create mode 100644 templates/smartphone/images/no-icon.gif create mode 100644 templates/smartphone/images/plus_fav.gif create mode 100644 templates/smartphone/images/poll1.gif create mode 100644 templates/smartphone/images/poll2.gif create mode 100644 templates/smartphone/images/poll3.gif create mode 100644 templates/smartphone/images/poll4.gif create mode 100644 templates/smartphone/images/poll5.gif create mode 100644 templates/smartphone/images/read.gif create mode 100644 templates/smartphone/images/resize.gif create mode 100644 templates/smartphone/images/send.gif create mode 100644 templates/smartphone/images/spacer.gif create mode 100644 templates/smartphone/images/unread.gif create mode 100644 templates/smartphone/info.tpl create mode 100644 templates/smartphone/login.tpl create mode 100644 templates/smartphone/lostpassword.tpl create mode 100644 templates/smartphone/main.tpl create mode 100644 templates/smartphone/navigation.tpl create mode 100644 templates/smartphone/online.tpl create mode 100644 templates/smartphone/pm.tpl create mode 100644 templates/smartphone/poll.tpl create mode 100644 templates/smartphone/registration.tpl create mode 100644 templates/smartphone/search.tpl create mode 100644 templates/smartphone/searchresult.tpl create mode 100644 templates/smartphone/shortstory.tpl create mode 100644 templates/smartphone/static.tpl create mode 100644 templates/smartphone/stats.tpl create mode 100644 templates/smartphone/tagscloud.tpl create mode 100644 templates/smartphone/torrent.tpl create mode 100644 templates/smartphone/userinfo.tpl create mode 100644 templates/smartphone/vote.tpl create mode 100644 uploads/rating/game.png create mode 100644 uploads/rating/kinopoisk.png create mode 100644 uploads/rating/rating.png create mode 100644 uploads/rating/star.png diff --git a/404.php b/404.php new file mode 100644 index 0000000..8153121 --- /dev/null +++ b/404.php @@ -0,0 +1,30 @@ + +404 » {$config['home_title']} + + + + + + +
+

...

+

+

, .
, , .
+, , , , .

+
+ +HTML; + +?> \ No newline at end of file diff --git a/control.php b/control.php new file mode 100644 index 0000000..9bd39e5 --- /dev/null +++ b/control.php @@ -0,0 +1,56 @@ +close (); + msg ( "error", $lang['index_denied'], $lang['mod_not_found'] ); + } +} + +$db->close (); + +GzipOut (); +?> \ No newline at end of file diff --git a/download.php b/download.php new file mode 100644 index 0000000..4789e98 --- /dev/null +++ b/download.php @@ -0,0 +1,72 @@ +get ( "usergroup" ); +if (! $user_group) { + $user_group = array (); + $db->query ( "SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC" ); + while ( $row = $db->get_row () ) { + $user_group[$row['id']] = array (); + foreach ( $row as $key => $value ) { + $user_group[$row['id']][$key] = $value; + }} + $cache->set ( "usergroup", $user_group ); + $db->free (); +} + +if (! $is_logged) {$member_id['user_group'] = 5;} +if (! $user_group[$member_id['user_group']]['allow_files']) die ( "Access denied" ); + + $_SERVER['HTTP_REFERER'] = clean_url ( $_SERVER['HTTP_REFERER'] ); + $_SERVER['HTTP_HOST'] = clean_url ( $_SERVER['HTTP_HOST'] ); + if ($_SERVER['HTTP_HOST'] != $_SERVER['HTTP_REFERER']) { + @header ( 'Location: ' . $config['http_home_url'] ); + die ( "Access denied!!!

Please visit {$config['http_home_url']}" ); + } + +$id = intval ( $_REQUEST['id'] ); + +$d_time = time() + ($config['date_adjust'] * 60); +$row = $db->super_query ( "SELECT name, onserver, info_hash FROM " . PREFIX . "_torrents WHERE id ='$id'" ); + +if (! $row) die ( "Access denied" ); + +if(substr($row['name'], -8) == ".torrent") { + require_once( SYSTEM_DIR."/classes/torrent.class.php" ); + $tr_file = TORRENT_DIR.$row['onserver']; + $torrent = new Torrent($tr_file); + if($error = $torrent->errors()){ + } + else + { + $torrent->comment("http://".$_SERVER['HTTP_HOST']."/"); + + if (! $is_logged) { + $torrent->announce("http://".$_SERVER['HTTP_HOST'].":2710/announce"); // , +} else { + $tpv = $member_id['torrent_pass_version']; + $tppk = $db->super_query("SELECT value FROM xbt_config WHERE name='torrent_pass_private_key'" ); + $site_key = $tppk['value']; + $passkey = sprintf('%08x%s', $member_id['user_id'], substr(sha1(sprintf('%s %d %d %s', $site_key, $tpv, $member_id['user_id'], $row['info_hash'])), 0, 24)); + $torrent->announce("http://".$_SERVER['HTTP_HOST'].":2710/{$passkey}/announce"); // , + } + }} else die ( "Access denied" ); + +if ($config['files_count'] == "yes" and ! $file->range) $db->query ( "UPDATE " . PREFIX . "_torrents SET dcount=dcount+1 WHERE id ='$id'" ); + +$db->close (); + +$torrent->send($row['name']); +?> \ No newline at end of file diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..f08a128e49a52fc524b4529665a728a740544657 GIT binary patch literal 3638 zcmeHId0bOh7XCm)DVCx|t=0usR8$a`)@oZV1+{K%ajCU4t;Jm{L3FCtg|VX@m!e`? zXT~}fS0aiVi%UT(GJ@=32?rA!wpZR0vkKW(!zW2`k&b{~h z&b{v(zzy#3^##{fcLs*jm%o39o!AwKqp=ZWvM%hf8)%T)G&k<`)T6z<9qUJEacg@R zQsSE-%RGgIIe;|JjzdeEkas*9dU-KY&Y!@=Wdm?(ivj6rH;{e727QAIrAc3*K0h7S zMiq*0wIKV*r`SA6i&m=%Dv1M$OM2kgDg#8<;_<_G78sQh*qYn0Vt^XS`^?xEp+`lQ z9kr#cxO>`)=pZf9u3tloQHPTAyHTEe5UYo1;B0L}bCU}NsVxvJ?S&12TG(xEIIu{M zdXWQH4w@k=Y(;uXDsJzbft7 z^&_>2rhQaZ4%AmVuz#VR;$wX(*1r$@9)bU-2>3kN+1)FF6sZXQ+bDoX$AmdjW zn`hTip1ra@80XHO!}l>p6x`M$>zlQZWnJQOuAxqZJ@Xi(f7^`W;v$p?_CQzTz|CE= zk(qG^ANe*wB2;rZOjUB1@)867GCl4KEcjw71C>$@(RDr)Ldv_l^|%;07!rw?%bTJH zEs&Mxch7v7ZLHr*}is(1;(;Qtc8lNZe(@_E0TuZVyKa--wnLJFI3W z8s$RdUN^&Hu|OoM1aF)MwY4=!_}qX}p%7UDBMchyYh<9PR-nE(1IzlV5fjAL5f|#~ z>rhx&fVEUR3e#;^-dBT-K@2ucWMFAF!OXb0TF~0sN_EKzo7F~fF+#0YW2L_a7PAfa zlgv0ZuM?tzb=Wjci51?fnuj;oi^AsTENPuj*4KZgT$dn>F~D@;Zcj79^R znwp^3H-cdpx(hmJG;~hY)sV5AWm3qbQi#Qs6z2+*m6btQQi7twLKGAffJfSS#4VcM z8-p3r!^VN-*$yYgqLuct+wG*K1vb)Sv)O2G3u&;B2D)pc!(?K4u$|7#!1B=(A3dEN zaia5MD3&_nrXy}TEqkx16Gx3k4RwPW%6cX0>+0zIYbho*P$(3{Uk*9(mq}$5cPXl> zs_5U5Kq3~C7K(8tt4D+i(o{}oQc+It@^X}uzS2@5^->7w41{!-ii?X;TvYTp3j}(2 z1U|EI*s~p2ql`j7hg}Dvl@05)KQs2fJpevt`fQ@ae9<2C2p;x|>NZjwWjF_UF^w*%i1SuyrYFSdNk^I!h= zbg#wI<7*bhT*}G${AdsF;N__-KIcECPnEnfF+AsJ5=`++><=sS6}4+W50I{KR}QzIGTN* ze|Yx06)e6t=KOLmG$2#+=_Uc`FA~BzQbpfpfT?l3K*h-_&_kkpCl? z4HY@$73_%ozO+JANU+CasN;imxSUT8kqPAm9`t)YfpaTdW?4oiload_template('forum/index.tpl'); +else $tpl->load_template('main.tpl'); + +$tpl->set('{toporders}', $toporders); +$tpl->set ( '{login}', $tpl->result['login_panel'] ); +$tpl->set ( '{info}', "
" . $tpl->result['info'] . "
" ); +$tpl->set('{online}', $tpl->result['online']); +$tpl->set ( '{minichat}', $tpl->result['minichat'] ); +$tpl->set('{forum}', $tpl->result['forum_table']); +$tpl->set ( '{comments-last}', $commentslast ); +$tpl->set('{category_menu}', $cat_menu); + +if ($allow_active_news AND $do != "userinfo") {$tpl->set ( '[sort]', "" );$tpl->set ( '{sort}', news_sort ( $do ) );$tpl->set ( '[/sort]', "" );} else {$tpl->set_block ( "'\\[sort\\](.*?)\\[/sort\\]'si", "" );} +if ($dle_module == "showfull" ) {if (is_array($cat_list) AND count($cat_list) > 1 ) $category_id = implode(",", $cat_list);} + +if (strpos ( $tpl->copy_template, "[category=" ) !== false) {$tpl->copy_template = preg_replace ( "#\\[category=(.+?)\\](.*?)\\[/category\\]#ies", "check_category('\\1', '\\2', '{$category_id}')", $tpl->copy_template );} +if (strpos ( $tpl->copy_template, "[not-category=" ) !== false) {$tpl->copy_template = preg_replace ( "#\\[not-category=(.+?)\\](.*?)\\[/not-category\\]#ies", "check_category('\\1', '\\2', '{$category_id}', false)", $tpl->copy_template );} + +$config['http_home_url'] = explode ( "index.php", strtolower ( $_SERVER['PHP_SELF'] ) ); +$config['http_home_url'] = reset ( $config['http_home_url'] ); + +if (! $user_group[$member_id['user_group']]['allow_admin']) $config['admin_path'] = ""; + +$ajax .= << + + + + + +HTML; + +if (strpos ( $tpl->result['content'], "hs.expand" ) !== false or strpos ( $tpl->copy_template, "hs.expand" ) !== false or $pm_alert != "") { +$ajax .= << + +{$pm_alert} +HTML; +} +$tpl->set ( '{AJAX}', $ajax ); + +if(isset($_GET['category'])){ + $tpl->set('[newslist]',''); + $tpl->set('{newslist}', "/newslist/".$_GET['category']."/"); + $tpl->set('{news_pol}', $_GET['category']."/"); + $tpl->set('[/newslist]',''); +} else{$tpl->set_block("'\[newslist\](.*?)\[/newslist\]'si",""); $tpl->set('{news_pol}', "");} + +$tpl->set ( '{headers}', $metatags ); +$tpl->set ( '{content}', "
" . $tpl->result['content'] . "
" ); + +$tpl->compile ( 'main' ); +$tpl->result['main'] = str_replace ( '{THEME}', $config['http_home_url'] . 'templates/' . $config['skin'], $tpl->result['main'] ); +if ($replace_url) $tpl->result['main'] = str_replace ( $replace_url[0]."/", $replace_url[1]."/", $tpl->result['main'] ); +$tpl->result['main'] = str_replace("%username%", $is_logged?$member_id['name']:'Юзер', $tpl->result['main']); + +echo $tpl->result['main']; +$tpl->global_clear (); +$db->close (); + +GzipOut (); +?> diff --git a/language/Russian/adminpanel.lng b/language/Russian/adminpanel.lng new file mode 100644 index 0000000..ba2f03c --- /dev/null +++ b/language/Russian/adminpanel.lng @@ -0,0 +1,1654 @@ + "windows-1251", +'admin_logo' => "engine/skins/images/nav.jpg", +'wysiwyg_language' => "ru", +'opt_sys_regloginza' => " Loginza :", +'opt_sys_regloginzad' => " Loginza", +// 8.3 +'opt_sys_comb' => " ", +'opt_sys_combd' => " , . , , , , .", +'cat_in_none' => "- -", +'group_adds_html' => " HTML c ", +'hint_gaadhtml' => " HTML . , , WYSIWYG , BB .", +'group_pref' => " ", +'hint_gpref' => " , , . , : <span style='color:red'>", +'group_suf' => " ", +'hint_gsuf' => " , , . : </span>", +'opt_sys_subs' => " ", +'opt_sys_subsd' => " . , , , E-mail .", +'modul_offline_1' => ": , , .", +'btn_clearsubscribe' => " ", +'static_err_2' => " .", +'filter_action' => "", +'filter_action_0' => " ", +'filter_action_1' => " ", +'news_err_39' => " .", +'google_map_send' => " Google, ", +'confirm_action' => " , ? .", +// 8.3 + +'opt_srebuild' => " ", +'opt_srebuildc' => " , , , , .", +'rebuild_info' => " . , , . , . , .

: , .. , .", +'rebuild_count' => ":", +'rebuild_start' => " ", +'rebuild_status' => " , ...", +'rebuild_status_ok' => " ", +'rebuild_forw' => " ", +'opt_statrebuild' => " ", +'rebuild_stat_info' => " . , , . , . , .

: , .. , .", +'stat_allstaic' => " :", +'stat_secfault_4' => " :
{file} , . CHMOD 444.", +'opt_relrebuild' => " ", +'rebuild_rel_info' => " . , . , .

: , .. , .", + +// 8.2 +'bb_t_t' => "", +'stat_not_min' => "!
, :", +'opt_sys_dimm' => " ", +'opt_sys_dimmd' => " '', , .", +'opt_sys_gall' => " ", +'opt_sys_galld' => " '', , , ..", +'nl_info_1' => " {%user%}, , , . BCC , :", +'nl_info_2' => "", +'filter_search' => " ", +'filter_search_0' => "", +'filter_search_1' => ", ", +'filter_search_2' => ", ", +'upload_error_0' => " ", +'upload_error_1' => "", +'upload_error_2' => " .
(CHMOD 777)", +'opt_sys_mcommd' => " ", +'opt_sys_mcommdd' => " . , , . , 0.", +'edit_search_static' => " :", +'edit_static_act' => " ", +'edit_nostatic' => "- -", +'static_order' => " ", +'static_advanced_search'=> " ", +'mass_static_edit_date_tl' => " ", +'mass_static_edit_date_fr1' => " , , ", +'mass_static_confirm_2' => " ?", +'mass_static_confirm_3' => "?", +'mass_static_delete' => " ", +'static_per_page' => " :", +'templates_help' => " , :", +'mod_not_found' => " ", +'admin_other_section' => " ", +'static_br_html_1' => " ", +'static_br_html_2' => " HTML ", +'static_type' => " :", +'static_not_allowed' => " , ", +// 8.2 + +// 8.0 +'group_a_addnews' => " ", +'group_h_addnews' => " , , . , .. .", +'group_a_editnews' => " ", +'group_h_editnews' => " , , . , .. .", +'group_a_comments' => " ", +'group_h_comments' => " , , .", +'group_a_categories' => " ", +'group_h_categories' => " , , , .", +'group_a_editusers' => " ", +'group_h_editusers' => " , , .", +'edit_not_admin' => " .", +'admin_not_access' => " .", +'group_a_wordfilter' => " ", +'group_h_wordfilter' => " , , .", +'group_a_userfields' => " ", +'group_h_userfields' => " , , .", +'group_a_static' => " ", +'group_h_static' => " , , , .", +'group_a_editvote' => " ", +'group_h_editvote' => " , , , .", +'group_a_newsletter' => " ", +'group_h_newsletter' => " , , .", +'group_a_blockip' => " IP, E-Mail ", +'group_h_blockip' => " , , , IP, E-Mail.", +'group_a_banners' => " ", +'group_h_banners' => " , , , .", +'group_a_rss' => " RSS ", +'group_h_rss' => " , , RSS .", +'group_a_iptools' => " IP ", +'group_h_iptools' => " , , IP .", +'group_a_rssinform' => " RSS ", +'group_h_rssinform' => " , , RSS .", +'group_a_googlemap' => " Google ", +'group_h_googlemap' => " , , Google .", +'opt_all_rublik' => " ", +'opt_all_rublikc' => " .", +'ip_error_1' => " .", +'filter_register' => " ", +'mass_clear_count' => " ", +'mass_clear_count_1' => " , ", +'mass_clear_count_2' => " ", +'mass_clear_rating' => " ", +'mass_clear_rating_1' => " , ", +'mass_clear_rating_2' => " ", +'rss_clear' => " ", +'opt_sys_sm_iv' => " ", +'opt_sys_sm_ivd' => " '', , '', .", +'opt_sys_asp' => " ", +'opt_sys_aspd' => " '', .", +'opt_sys_asc' => " ", +'opt_sys_ascd' => " '', .", +'addnews_option' => " :", +'massusers_group' => " ", +'massusers_comments' => " ", +'massusers_banned' => " ", +'massusers_delete' => " ", +'massusers_denied' => " .", +'massusers_head' => " ", +'massusers_confirm' => " , ", +'massusers_confirm_1' => "", +'massusers_confirm_2' => " ", +'massusers_delok' => " !", +'massusers_head_1' => " ", +'massusers_confirm_3' => " , ", +'massusers_comok' => " .", +'massusers_head_2' => " ", +'massusers_confirm_4' => " ", +'massusers_groupok' => " :", +'massusers_head_3' => " ", +'massusers_confirm_5' => " ", +'massusers_banok' => " ", +'bb_flash' => " (, )", +'bb_flash_url' => " ", +'inset_flash_link' => " ", +'meta_title' => " title:", +'opt_sys_sm_fm' => " ", +'opt_sys_sm_fmd' => " '', , '', .", +'bb_t_yvideo' => " Youtube Rutube ", +// 8.0 + +// 7.5 +'preview_short' => " :", +'preview_full' => " :", +'preview_static' => " :", +'group_max_signature' => " ", +'hint_max_signature' => " , , 0.", +'group_max_info' => " ", +'hint_max_info' => " , , 0.", +'get_offline_key' => "

, , . :", +'get_key' => " .", +'key_activation' => " dle-news.ru , .", +'trial_act5' => " , .", +'find_rtags' => " ", +'opt_smartphone' => " ", +'opt_sys_smart' => " ", +'opt_sys_smartd' => " , . /templates/ smartphone.", +'opt_sys_sm_im' => " ", +'opt_sys_sm_imd' => " '', , '', .", +// 7.5 + +// 7.3 +'opt_sys_flvwd' => " '', , . //images/flv_watermark.png", +'opt_sys_adt' => " ", +'opt_sys_adtd' => " '', ", +'filter_type' => " ", +'filter_type_1' => " ", +'filter_type_2' => " ", +'opt_sys_afix' => " :", +'opt_sys_afixd' => " MySQL, ", +'spoiler_title' => " / ", +'upload_standart' => "", +'upload_mass' => "", +'upload_queue' => " ", +'upload_cancel' => " ", +'upload_waehlen' => " ", +'upload_mass_info' => " , . Ctrl.", +'opt_sys_maxfile' => " ( )", +'opt_sys_maxfiled' => " . , 2 , 2048. , 0.", +'opt_sys_maxfilec' => " ", +'opt_sys_maxfilecd' => " , . , 0.", +'files_too_big' => " ", +'files_max_info' => " ", +'files_max_info_1' => " ", +'files_max_info_2' => " ", +// 7.3 + +// 7.2 +'opt_sys_wdq' => " WYSIWYG :", +'opt_sys_addsec' => " ", +'opt_sys_addsecd' => " , .", +'hint_scode' => " , ", +'group_image' => " ", +'hint_group_image' => " .", +'restricted' => " :", +'restricted_none' => "", +'restricted_news' => "", +'restricted_comm' => "", +'restricted_all' => " ", +'restricted_date' => " :", +'hint_restricted' => " , . 0, ", +'restricted_clear' => " ", +'mail_info_6' => " E-Mail , ", +'mail_pm_info' => " :
{%username%} - ,
{%date%} -
{%fromusername%} -
{%title%} -
{%text%} - ", +'opt_sys_pmail' => " E-Mail ", +'opt_sys_pmaild' => " '', , E-Mail .", +'opt_sys_change_s' => " ", +'opt_sys_change_sd' => " '', , , .", +'edit_no_author' => " , . . .", +'opt_rules' => " ", +'opt_rulesc' => " . , http://site.ru/rules.html", +'rules_edit' => " ", +'rules_descr' => " '' '' {ACCEPT-DECLINE} .", +'rules_ok' => " .", +'rules_check' => " , .", +'opt_sys_rules' => " ", +'opt_sys_rulesd' => " '', , .", +'ip_type' => "IP, E-mail:", +'user_edit_found' => " , .. .", +'news_edit_date' => " ", +'news_edit_reason' => " :", +'allow_view_edit' => " ", +'addnews_tags' => " :", +'hint_tags' => " . . , ", +'opt_sys_tags' => " \" \"", +'opt_sys_tagsd' => " \" \", .", +'opt_sm_cl_1' => " ", +'opt_sm_cl_3' => " , ", +// 7.2 + +// 7.0 +'tabs_gr_all' => " ", +'tabs_gr_news' => "", +'tabs_gr_comments' => "", +'tabs_gr_admin' => "", +'stat_medit_link' => " ", +'group_signature' => " ", +'hint_signature' => " , .", +'group_url' => " ", +'hint_group_url' => " , .", +'images_all_insert' => " ", +'opt_sys_catsort' => " ", +'opt_sys_catsortd' => " ", +'opt_sys_catmsort' => " ", +'opt_sys_catmsortd' => " ", +'opt_sys_related_num' => " ", +'opt_sys_related_numd' => " , ", +'opt_sys_seotype' => " :", +'opt_sys_seotyped' => " 1 - http://site.ru/id- .html

2 - http://site.ru///id- .html

3 - http://site.ru/2008/04/02/ .html, ", +'opt_sys_seo_1' => " 1", +'opt_sys_seo_2' => " 2", +'opt_sys_seo_3' => " 3", +'b_find_related' => " ", +'mass_edit_date' => " ", +'mass_edit_date_tl' => " ", +'mass_edit_date_fr1' => " , , ", +'stat_os' => " :", +'opt_sys_max_mod' => " , ", +'opt_sys_max_modd' => " , , 0 .", +// 7.0 + + +// 6.7 +'nl_startfrom' => " :", +'nl_user' => " ( 0, )", +'nl_n_mail' => " :", +'nl_interval' => " :", +'opt_sys_maxc' => " ", +'opt_sys_maxcd' => " , ", +'opt_sys_reason' => " :", +'opt_sys_reasond' => " ", +'google_cat_priority' => " :", +'google_stat_priority' => " :", +'search_by_author' => " :", +'search_by_date' => " :", +'search_by_status' => " :", +'news_status_all' => " ", +'news_status_mod' => " ", +'news_status_approve' => " ", +'news_order' => " ", +'news_order_fixed' => "", +'news_advanced_search' => " ", +'inset_video_link' => " ", +'inset_audio_link' => " ", +// 6.7 + +// 6.5 +'opt_rsssys' => " RSS ", +'opt_sys_arss' => " RSS ", +'opt_sys_arssd' => " RSS .", +'opt_sys_nrss' => " ", +'opt_sys_nrssd' => " RSS .", +'opt_sys_crss' => " ", +'opt_sys_crssd' => " RSS .", +'opt_sys_frss' => " ", +'opt_sys_frssd' => " RSS .", + +'opt_sys_trss' => " RSS ", +'opt_sys_trssd' => " RSS http://dle-news.ru/rss.xml.", +'opt_sys_rss_type_0' => " ", +'opt_sys_rss_type_1' => " ", +'opt_sys_rss_type_2' => "", +'opt_sys_rss_type_3' => "", +'opt_sys_rss_type_4' => " ", +'img_orig_ins' => "", +'opt_sys_short_name' => " :", +'opt_sys_short_named' => " , 'speedbar', ", +'static_skin' => " :", +'hint_static_skin' => " , .", +'xf_not_notig' => "", +// 6.5 + +// 6.3 +'opt_sys_multiple' => " ", +'opt_sys_multipled' => " , , .", +'user_del_comments' => " ?", +'catalog_url' => " :", +'catalog_hint_url' => " , , a, : http:/site.ru/catalog/a/. ", +'edit_go_page' => " :", +'main_notice' => "", +'main_no_notice' => " .", +'rss_no_rss' => " , .", +'group_offline' => " ", +'hint_goffline' => " .", +'google_nnum' => " :", +'hint_g_num' => " , Google Sitemap. , .", +'google_priority' => " :", +'hint_g_priority' => " URL URL . 0.0 1.0. .", +'rssinform_del' => " RSS ?", +// 6.3 + +// 6.2 +'opt_sys_asrate' => " ", +'opt_sys_asrated' => " . '', , ", +'opt_sys_search' => " ", +'opt_sys_searchd' => " , .", +'opt_sys_simple' => "", +'opt_sys_advance' => "", +'a_rating' => " ", +'hint_garating' => " , , ", +'opt_google' => " Google Yandex", +'opt_googlec' => " Google Yandex.", +'google_info' => "1. Google Sitemaps Google.

2. \" \".

3. \"URL\" Sitemap \" URL\".

4. Google.", +'google_main' => " Google Sitemaps", +'google_map' => " (Google Sitemap)", +'google_create' => " / ", +'no_google_map' => " Google Sitemap .", +'google_map_info' => " Google Sitemap :", +'opt_sys_news_c' => " (CAPTCHA) ", +'opt_sys_news_cd' => " , ", +'cat_noparentid' => " !", +'opt_iptoolsname' => " IP , ", +'opt_iptoollast' => " IP :", +'opt_iptoolcall' => " IP :", +// 6.2 + +// 6.0 +'opt_sys_path' => " ", +'opt_sys_pathd' => " . admin.php, , , , .", +'opt_rssinform' => "RSS ", +'opt_rssinformc' => " RSS .", +'rssinform_title' => " RSS ", +'rssinform_ein' => " ", +'rssinform_on' => " ", +'rssinform_off' => " ", +'rssinform_create' => " ", +'rssinform_xname' => " RSS ", +'rssinform_xdescr' => " RSS ", +'rssinform_url' => "URL RSS ", +'rssinform_template' => " ", +'rssinform_max' => " ", +'rssinform_tmax' => " ", +'rssinform_dmax' => " ", +'hint_ri_max' => " ", +'hint_ri_tmax' => " , , 0, ", +'hint_ri_dmax' => " , , 0, ", +'opt_sys_inform' => " RSS ", +'opt_sys_informd' => " RSS , .", +'modul_offline' => ": , , .", +'opt_sys_cmod' => " ", +'opt_sys_cmodd' => " , , . MySQL .", +'group_modc' => " ", +'hint_modc' => " , .", +'stat_cmod' => " :", +'stat_cmod_link' => " ", +'bb_b_approve' => "", +'cmod_n_title' => ":", +'mass_acomm' => " , ", +'mass_approve_ok' => " !", +'st_views' => "", +'upload_t_size' => " :", +'upload_t_seite_1' => " ", +'upload_t_seite_2' => " ", +'upload_t_seite_3' => " ", +'bb_t_font' => "", +'bb_t_size' => "", +'opt_sys_maxside' => " ", +'opt_sys_maxsided' => " :

: . : 800.

: x . : 800x600

, , . 0, .", +'mass_edit_app' => " ", +'mass_edit_notapp' => " ", +'mass_edit_app_tl' => " ", +'mass_edit_app_fr1' => " , ", +'mass_edit_app_fr2' => " , ", +'mass_edit_comm' => " ", +'mass_edit_notcomm' => " ", +'mass_edit_comm_fr1' => " , ", +'mass_edit_comm_fr2' => " , ", +'mass_edit_com_tl' => " ", +'mass_edit_rate' => " ", +'mass_edit_notrate' => " ", +'mass_edit_rate_tl' => " ", +'mass_edit_rate_fr1' => " , ", +'mass_edit_rate_fr2' => " , ", +'mass_edit_main' => " ", +'mass_edit_notmain' => " ", +'mass_edit_main_tl' => " ", +'mass_edit_main_fr1' => " , ", +'mass_edit_main_fr2' => " , ", +'mass_edit_fix' => " ", +'mass_edit_notfix' => " ", +'mass_edit_fix_tl' => " ", +'mass_edit_fix_fr1' => " , ", +'mass_edit_fix_fr2' => " , ", +'mass_confirm_2' => "?", +'opt_sys_file4' => " ", +'opt_sys_file4d' => " , , .", +'opt_sys_file5' => " (kb/s)", +'opt_sys_file5d' => " . kb/s. , 0", +// 6.0 + +// 5.7 +'user_avatar' => " :", +'user_del_avatar' => " ?", +'opt_sfind' => " ", +'opt_sfindc' => " ", +'find_main' => " ", +'find_info' => " . , , ..

: , .. , . , .. .", +'find_ftable' => " :", +'find_ftext' => " :", +'find_rtext' => " :", +'find_rstart' => " ", +'find_rnews' => " ", +'find_rcomms' => " ", +'find_rpm' => " ", +'find_rstatic' => " ", +'find_done_h' => " ", +'find_done' => " .", +'mail_info_3' => " E-Mail , ", +'mail_news_info' => " :
{%title%} -
{%username%} - ,
{%date%} -
{%category%} - , ", +'mail_info_4' => " E-Mail , ", +'mail_comm_info' => " :
{%link%} -
{%username%} - ,
{%date%} -
{%ip%} - IP
{%text%} -
{%unsubscribe%} - ", +'opt_sys_nmail' => " E-Mail ", +'opt_sys_cmaild' => " '', , E-Mail .", +'bb_t_leech' => " ", +'opt_sys_nmaild' => " '', , , E-Mail .", +'opt_sys_cmail' => " E-Mail ", +'group_icon' => " ", +'hint_gicon' => " , . {THEME} ", +// 5.7 + +// 5.5 +'opt_sys_related' => " ", +'opt_sys_relatedd' => " , . MySQL ", +'anti_snap' => " ", +'anti_snapalert' => " , .", +'anti_modified' => " ", +'anti_not' => " ", +'anti_snap' => " ", +'anti_creates' => " ", +'ip_found_comments' => " IP ", +'static_tpl' => " ", +'hint_stpl' => " , , , static.tpl", +'opt_sys_nodate' => " ", +'opt_sys_nodated' => " , . , .", +'cat_s_tpl' => " ", +'cat_s_tpl_hit' => " , . , shortstory.tpl", +'cat_f_tpl' => " ", +'cat_f_tpl_hit' => " , . , fullstory.tpl", +// 5.5 + +// 5.3 +'bb_t_emo' => " ", +'bb_t_up' => " ", +'opt_sys_logextra' => " ", +'opt_sys_logextrad' => " , , , Cookies.
, PHP Apache, PHP ", +'opt_sys_stdm' => " ", +'opt_sys_extram' => " ", +'btn_clearcache' => " ", +'rss_info' => ":", +'stat_cache' => "!
engine/cache/ engine/cache/system/. CHMOD 777, CHMOD 666!", +'nl_amail' => " ,
", +'opt_sys_align' => " ", +'opt_sys_alignd' => " . .", +'opt_sys_left' => " ", +'opt_sys_center' => " ", +'opt_sys_right' => " ", +'opt_sys_none' => " ", +'opt_sys_ip' => " IP ", +'opt_sys_ipd' => " - IP

- IP ", +'opt_sys_ipn' => "", +'opt_sys_ipm' => " ", +'opt_sys_iph' => " ", +'opt_iptools' => "IP ", +'opt_iptoolsc' => " IP , IP ", +'opt_ipfe' => " : 192.48.25.71, : 129.42", +'ip_found_users' => " IP ", +'user_ban' => "", +'banned_info' => "", +'cache_c' => " ", +'cache_cd' => " '', . '', 4 . .", +// 5.3 + +// 5.2 +'static_br_html' => " ", +'opt_rss' => "RSS ", +'opt_rssc' => " , RSS ", +'rss_list' => " RSS ", +'rss_url' => "URL RSS ", +'rss_descr' => " ", +'rss_new' => " ", +'rss_news' => " ", +'rss_edit' => " ", +'rss_del' => " ", +'rss_hurl' => " RSS . http://dle-news.ru/rss.xml", +'rss_hdescr' => " RSS , 255 ", +'rss_full' => " ", +'rss_hfull' => " \'\', RSS . .", +'rss_date' => " ", +'rss_date_1' => " ", +'rss_date_2' => " ", +'rss_main' => " ", +'rss_rating' => " ", +'rss_comm' => " ", +'rss_text_type' => " ", +'rss_search' => " ", +'rss_hsearch' => " , :
{skip} -
{get} - ", +'rss_maxnews' => " ", +'rss_hmaxnews' => " , ", +'rss_cookie' => "Cookies ", +'rss_hcookie' => " . cookies , DataLife Engine

dle_user_id=id
dle_password=71820d7c524

cookies.", +'rss_password' => "", +'rss_ok1' => " RSS ", +'rss_ok2' => "RSS ", +'rss_err1' => "URL ", +'rss_dofull' => " ", +'rss_error' => " , , ", +'rss_addnews' => " ", +'rss_added' => " ", +'rss_notadded' => " ", +'opt_sys_sub' => " ", +'opt_sys_subd' => " '', . .", +'btn_descr' => " ", +'btn_keyword' => " ", +'clean_pm' => "

4.

. , , , . .", +'bb_t_hide' => " ", +'bb_t_video' => " ", +// 5.2 + +'opt_sys_sbar' => " 'speedbar'", +'opt_sys_sbard' => " , , ..", +'opt_sm_speed' => " 'speedbar'", +'opt_sm_speedd' => " , , ..", +'opt_secrsys' => " ", +'opt_sys_sxfield' => " ", +'opt_sys_sxfieldd' => " '' HTML .", +'add_metatags' => " ", +'xf_lat' => " ", +'static_new' => " ", +'poll_new' => " ", +'opt_sys_mail' => " E-Mail", +'opt_sys_mm' => " ", +'opt_sys_mmd' => " PHP mail() , SMTP", +'opt_sys_smtph' => "SMTP ", +'opt_sys_smtphd' => " localhost", +'opt_sys_smtpp' => "SMTP ", +'opt_sys_smtppd' => " 25", +'opt_sys_smtup' => "SMTP ", +'opt_sys_smtpud' => " , 'localhost'", +'opt_sys_smtupp' => "SMTP ", +'opt_sys_smtpupd' => " , 'localhost'", +'opt_sys_mbcc' => " BCC ", +'opt_sys_mbccd' => " '' , .", + +'b_select' => "", +'opt_sys_loghash' => " ?", +'opt_sys_loghashd' => " '', . , .", +'opt_sys_coded' => " , ", +'opt_sys_imw' => " ", +'opt_sys_imwd' => " [img] [/img], , . 0.", + +'group_main' => " ", +'group_main_hint' => " ", +'clean_title' => " ", +'clean_all' => " DataLife Engine. , . , , \" \". , : {datenbank}.", +'clean_skip' => " ", +'clean_news' => "

1.

, . , . , .", +'clean_comments' => "

2.

, . , .", +'clean_users' => "

3.

, , , , , . , .", +'clean_logs' => "

5.

. , , .", +'clean_finish' => "

. : {db-alt}, : {db-new}. : {db-compare}.", +'opt_sys_ajax' => " AJAX ", +'opt_sys_ajaxd' => " , AJAX. , .", +'opt_sys_ban' => " ", +'opt_sys_band' => " ", +'opt_clean' => " ", +'opt_cleanc' => " , ", +'opt_banner' => " ", +'opt_bannerc' => " , ", +'opt_s_acc' => " ", +'opt_s_tem' => " ", +'opt_s_fil' => "", +'opt_s_oth' => " ", + +'led_status' => "", +'vote_aus' => "", +'vote_ein' => " ", +'led_on_title' => " ", +'led_off_title' => " ", +'group_poll' => " , ", +'group_poll_hint' => " , ", +'templ_poll' => " ", +'templ_poll_i' => " .", +'btn_send' => "", +'btn_preview' => "", +'tabs_news' => "", +'tabs_vote' => "", +'tabs_extra' => "", +'tabs_perm' => "", +'date_expires' => " :", +'hint_expires' => " , . , .", +'hint_ftitle' => " .", +'v_ftitle' => " ", +'v_multi' => " ", +'v_info' => " , , .", +'tabs_g_info' => ": , , .", +'tabs_not' => " , ", + +'ng_group' => " ", +'ng_read' => " ", +'ng_all' => " ", +'ng_denied' => " ", + +'a_feed' => " ", +'a_search' => " ", +'hint_gasearch' => " ", +'hint_gafeed' => " , e-mail . , .", +'site_status' => " :", +'comm_view' => "", +'comm_del' => " ", +'comm_alldel' => " ", +'comm_alldelconfirm' => " , ?", +'comm_einfo' => " ", +'comm_ctext' => " ", +'bb_b_apply' => "", +'ajax_info' => ", ...", +'mass_dcomm' => " , ", +'mass_delokc' => " !", +'mod_anti' => "", +'anti_descr' => " , ", +'anti_title' => " ...", +'anti_box' => ", ...", +'anti_file' => " :", +'anti_path' => " :", +'anti_size' => ":", +'anti_global' => " ", +'anti_result' => " :", +'anti_notfound' => " .", +'comm_move' => " ", +'dle_version' => " DataLife Engine:", +'dle_udate' => " ", +'dle_updatebox' => " ...", +'no_update' => " , , . ...", +'stat_allow' => "
:", + +'licence_info' => " :", +'licence_trial' => " ", +'licence_full' => " ", +'trial_info' => "!
. . , . http://dle-news.ru/, , .", +'trial_login' => ":", +'trial_key' => " :", +'trial_act' => "", +'trial_limit' => " . .", +'trial_act1' => " DataLife Engine , . .", +'trial_act2' => " DataLife Engine , , .", +'trial_act3' => " . , !!! , E-Mail: support@dle-news.ru", +'trial_act4' => " . .", + +'sys_global' => " ", +'hint_news_number' => " , 0, .", +'opt_xprof' => " ", +'opt_xprofd' => " ", + +'ip_block' => ", IP , .", +'xp_reg' => " ?", +'xp_privat' => " ?", +'xp_edit' => " ?", +'xp_descr' => " ", +'xp_edith' => "", +'xp_privath' => "", +'xp_regh' => " ", +'xp_xlist' => " ", +'hint_metas' => " . .", + +'xp_reg_hint' => " \'\', .", +'xp_privat_hint' => " \'\', , . \'\', .", +'xp_edit_hint' => " \'\', , .", + +'mass_ddenied' => " ", +'skin_name' => " :", +'opt_sys_reggroup' => " :", +'opt_sys_reggroupd' => " ", +'user_gtlimit' => " :", +'opt_sys_file3' => " ", +'opt_sys_file3d' => " , ", +'group_notdel' => " ", +'group_move' => " ", +'group_err1' => " ", +'group_ok1' => " ", +'group_ok2' => " ", +'group_new' => " ", +'group_new1' => " ", +'group_edit' => " ", +'group_edit1' => " : ", +'group_name' => " ", +'group_ct' => " ", +'group_alct' => " ", +'group_aadm' => " ", +'group_shid' => " ", +'group_adds' => " c ", +'group_moder' => " ", +'group_edit2' => " ", +'group_edit3' => " ", +'group_addc' => " ", +'group_editc' => " ", +'group_delc' => " ", +'group_allc' => " ", +'group_dllc' => " ", +'group_hic' => " ", +'group_apm' => " PM", +'group_afil' => " ", +'group_tlim' => " ", +'group_rlim' => " ", +'group_mpm' => " PM", +'group_mfot' => " ", +'group_sel1' => "", +'group_sel2' => "", +'group_sel3' => " ", +'group_sel4' => "", +'group_sel5' => " ", +'group_fixed' => " ", + + +'group_del' => " ", +'group_list' => " ", +'hint_gtitle' => " 20 .", +'hint_gmod' => " , .", +'hint_gned' => " .", +'hint_gnaed' => " .", +'hint_ga' => " .", +'hint_ge' => " .", +'hint_gd' => " .", +'hint_gae' => " .", +'hint_gad' => " .", +'hint_gvhide' => " [HIDE] [/HIDE].", +'hint_gapm' => " .", +'hint_gafile' => " .", +'hint_gmpm' => " , .", +'hint_gmphoto' => " :

: . : 100

: x . : 100x100

0.", +'hint_gadmin' => " , .", +'hint_gaad' => " .", +'hint_gadc' => " , , , .", +'hint_gasr' => " , . , ", +'hint_glimit' => " , , ", +'hint_grid' => " ", +'hint_glhel' => " . ", +'hint_gfixed' => " ", + +'opt_group' => " ", +'opt_groupc' => " , ", +'opt_sys_alc' => " ", +'opt_sys_alcd' => " ", +'meta_descr' => " ", +'meta_descr_cat' => " ", +'meta_descr_max' => " 200 ", +'meta_keys' => " ", + +'opt_sys_descr' => " (Description) :", +'opt_sys_descrd' => " , 200 ", +'opt_sys_key' => " (Keywords) :", +'opt_sys_keyd' => " ", + +'opt_ipban' => " : IP, E-Mail", +'opt_ipbanc' => " IP, E-Mail ", +'ip_add' => " IP , E-Mail", +'ip_example' => " , IP , , . IP , IP , .

: * , IP (: 127.0.*.*, *@mail.ru, username*).", +'ip_list' => " IP , , E-Mail ", +'ip_empty' => " ", +'ip_error' => "IP ", +'ip_unblock' => "", +'opt_sys_wdst' => " WYSIWYG :", +'st_al_templ' => " ", +'opt_sm_static' => " ", +'opt_sm_statd' => " ", +'opt_filesys' => " ", +'opt_sys_file' => " ", +'opt_sys_filed' => " , ", +'opt_sys_file1' => " , ", +'opt_sys_file1d' => " , . , . , , .", +'opt_sys_file2' => " ", +'opt_sys_file2d' => " ", +'files_upok' => " ", +'stat_install' => "!
install.php - . , !", + +'opt_notcompress' => " ", +'b_method' => " :", +'b_save' => " ", +'b_restore' => " :", +'b_load' => " ", + + +'edit_regdate' => " :", +'edit_fdate' => "", +'edit_tdate' => "", +'edit_entedate' => " :", +'edit_newsnum' => " :", +'hint_newsnum' => " .", +'hint_comsnum' => " .", +'edit_comsnum' => " :", +'user_breset' => "", +'user_brestore' => "", +'user_coms' => ":", +'user_order' => " ", +'user_order_no' => "----", +'user_order_minus' => " ", +'user_order_plus' => " ", +'ban_date' => " :", +'ban_edate' => " :", +'ban_descr' => " :", +'hint_bandescr' => " , . 0, ", + + +'allow_br' => " ", +'stat_banned' => " :", +'cache_size' => " :", +'free_size' => " :", +'cat_posi' => " ", + +'main_quick' => " ", +'main_newsl' => " ", +'main_newslc' => " E-Mail , ", +'news_list' => " ", +'b_start' => "", +'vote_new' => "", +'vote_edit' => "", +'b_find' => "", +'b_create' => " ", +'m_login' => " ", +'b_login' => "", +'nl_main' => " ", +'nl_empf' => ":", +'nl_type' => " :", +'nl_pm' => "", +'nl_editor' => " :", +'nl_message' => " ", +'nl_seng' => " ", +'nl_info' => " , , ", +'nl_sendet' => " :", +'nl_status' => ":", +'nl_start' => " ", +'nl_sinfo' => " ...", +'nl_error' => " ", +'nl_finish' => " ", +'nl_mailerror' => " mail", +'news_clearcomments' => " ", +'db_confirmclear' => " , ?", +'extra_signature' => "", + +'opt_sys_chars' => " :", +'opt_sys_charsd' => " , ", + +'hint_title' => " 200 .", +'hint_url' => " URL . . .", +'hint_calendar' => " . , , .", +'hint_pass' => " .", +'hint_vtitle' => " .", +'hint_vcat' => " .", +'hint_stitle' => " . ", +'hint_sdesc' => " .", +'hint_user' => " . .", +'hint_banned' => " , .", +'hint_catname' => " . .", +'hint_cataltname' => " . . ", +'hint_caticon' => " , .", +'hint_cattempl' => " , .", +'hint_mail' => " E-Mail .", + + +// add v.2.7 +'opt_sys_cpm' => " ", +'opt_sys_cpmd' => " ", +'opt_sys_csort' => " ", +'opt_sys_csortd' => " ", +// add v.2.6 + +'opt_sys_sort' => " ", +'opt_sys_sortd' => " ", +'opt_sys_sdate' => " ", +'opt_sys_srate' => " ", +'opt_sys_sview' => " ", +'opt_sys_salph' => " ", +'opt_sys_msort' => " ", +'opt_sys_msortd' => " ", +'opt_sys_mminus' => " ", +'opt_sys_mplus' => " ", +'opt_sys_code' => " ", +'opt_sys_coded' => " ", +'edit_fix' => ":", +'edit_search_news' => " :", +'addnews_allow_rate' => " ", +'opt_newssys' => " ", +'opt_sys_offline' => " :", +'opt_sys_offlined' => " offline, ", +'opt_sm_offline' => " ", +'opt_sm_offd' => " ", +'extra_info' => " ", +'extra_minfo' => " :", + + +// end 2.6 + +'undefined' => "", + +'opt_ss_m' => " ", +'opt_ss_m1' => " ", +'opt_cr_err' => " ", + + +'images_add_tl' => " ", +'images_rem_tl' => " ", +'images_align' => "", +'images_left' => " ", +'images_right' => " ", +'images_center' => " ", +'images_water' => " ", +'images_big' => " ", + +'cat_parent' => " :", +'cat_skin' => " :", +'cat_skin_sel' => " ", +'cat_skin_t' => "", + +'opt_sys_sc' => " ", +'opt_sys_scd' => " , ", +'opt_r_v' => " ", +'opt_r_vd' => " ", + +'opt_sys_voc' => " ", +'opt_sys_vocd' => " ", +'opt_sys_toc' => " ", +'opt_sys_tocd' => " 1 ", +'opt_sys_newc' => " ", +'opt_sys_newd' => " , ", + +'opt_general_sys' => " ( )", +'opt_allsys' => " ", +'opt_commsys' => " ", +'opt_dbsys' => " ", +'opt_usersys' => " ", +'opt_imagesys' => " ", +'opt_sys_rn' => " ", +'opt_sys_rnd' => " ", +'opt_sys_wda' => " WYSIWYG :", +'opt_sys_wdad' => " '', WYSIWYG , '', BBCODES", +'opt_sys_wds' => " WYSIWYG ", +'opt_sys_wdsd' => " '', WYSIWYG , '', BBCODES", +'opt_sys_wdcom' => " WYSIWYG ", +'opt_sys_ncom' => " ", +'opt_sys_ncomd' => " , ", +'opt_sys_npro' => " ", +'opt_sys_nprod' => " ", +'opt_sys_npro_del' => "", +'opt_sys_npro_hid' => "", +'opt_sys_wdscomd' => " WYSIWYG , BBCODES", +'opt_sys_wdcom' => " WYSIWYG ", +'opt_sys_aiu' => " ", +'opt_sys_aiud' => " ", +'err_noupload' => " .", +'err_notlogged' => " ", +'opt_sys_cac' => " ", +'opt_sys_cad' => " , ", +'opt_sys_dim' => " ", +'opt_sys_dimd' => " ", +'opt_sys_maxsize' => " ", +'opt_sys_maxsized' => " ( )", +'opt_vote' => " ", +'opt_votec' => " ", +'vote_nodata' => " ", +'vote_count' => "", +'vote_action' => "", +'vote_confirm' => " ", +'vote_title' => "", +'vote_body' => " ", +'vote_str_1' => "

", +'vote_str_2' => " ", +'vote_str_3' => " ", +'vote_str_4' => " ", +'vote_clear' => " ", +'vote_clear1' => " ", +'vote_clear2' => "", +'vote_clear3' => " ", +'vote_alert' => " ", + +'last_comm' => " ", + +'skin_title' => " ", +'skin_main' => "", +'skin_view' => " ", +'skin_help' => "", +'skin_logout' => "", +'skin_addnews' => " ", +'skin_editnews' => " ", +'skin_option' => "", + +'xfield_title' => " ", +'xfield_xname' => " ", +'xfield_xdescr' => " ", +'xfield_xcat' => "", +'xfield_xall' => "", +'xfield_xtype' => " ", +'xfield_xstr' => " ", +'xfield_xarea' => " ", +'xfield_xsel' => "", +'xfield_xfaul' => " ", +'xfield_xw' => " ( c)", +'xfield_xlist' => " ", +'xfield_xwt' => " ", +'xfield_xnof' => " !", +'xfield_xact' => " ", +'xfield_xedit' => "", +'xfield_xdel' => "", +'xfield_xo' => " ", +'xfield_xu' => " ", +'xfield_xhelp' => " ?", +'xfield_xerr1' => " .", +'xfield_xerr2' => " , ", + +'safe_mode_on' => "", +'safe_mode_off' => "", + +'time_0' => " ,", +'time_1' => " ,", +'time_2' => " ,", +'time_3' => " ,", + +'stat_all' => " :", +'stat_allnews' => " :", +'stat_comments' => " :", +'stat_users' => " :", +'stat_mod' => " :", +'stat_auto' => " :", +'stat_php' => " PHP:", +'stat_mysql' => " MySQL:", +'stat_gd' => " GD:", +'stat_safemode' => " :", +'stat_maxmem' => " :", +'stat_func' => " :", +'stat_bd' => " :", +'stat_maxfile' => " :", +'stat_bild' => " Uploads:", + +'stat_phperror' => "!
php-, , . , php! .", +'stat_safeskin' => "!
. !
!", +'stat_nofree' => "!
, . . !", + +'addnews' => " ", +'addnews_denied' => " ", +'addnews_perm' => " ", +'addnews_alert' => " ", +'addnews_news' => " ", +'addnews_title' => " :", +'addnews_url' => " URL :", +'addnews_date' => ":", +'addnews_cat' => ":", +'addnews_short' => " :", +'addnews_bild' => " ", +'addnews_full' => " :", +'addnews_alt' => "", +'addnews_comm' => " ", +'addnews_main' => " ", +'addnews_mod' => " ", +'addnews_fix' => " ", +'addnews_error' => " !!!", +'addnews_erdate' => " .", +'addnews_ertitle' => " .", +'addnews_erstory' => " .", +'addnews_ermax' => " .", +'addnews_ok' => " ", +'addnews_ok_1' => "", +'addnews_ok_2' => " !", + +'cat_perm' => " ", +'cat_error' => " !!!", +'cat_ername' => " !", +'cat_erurl' => " !", +'cat_icon' => "( )", +'cat_eradd' => " !", +'cat_addok' => " ", +'cat_addok_1' => " !", +'cat_noid' => " ID !", +'cat_delok' => " ", +'cat_delok_1' => " !", +'cat_head' => "", +'cat_edit' => " ", +'cat_name' => ":", +'cat_url' => " :", +'cat_addicon' => ":", +'cat_noname' => " !", +'cat_editok' => " ", +'cat_editok_1' => " ", +'cat_add' => " ", +'cat_info' => " ?  ?", +'cat_ed' => "", +'cat_del' => "", +'cat_nocat' => "
, ", +'cat_list' => " ", +'cat_cat' => ":", +'cat_action' => ":", + +'db_denied' => " ", +'db_ok' => "e ", +'db_ok_1' => " ", +'db_prev' => " ", +'db_err' => " ", +'db_err_1' => " ", +'db_err_2' => " *.sql", +'db_err_3' => " , ", +'db_ok_2' => " ", +'db_ok_3' => " ", +'db_ok_4' => " ", +'db_ok_5' => " ", +'db_ok_6' => "", +'db_info' => " ", +'db_action' => " ", +'db_opt' => " ", +'db_opt_i' => " , , . .", +'db_re' => " ", +'db_re_i' => " MySQL , - , , .", +'db_back' => " ", +'db_load' => " ", +'db_load_a' => "", + +'edit_denied' => " ", +'edit_head' => " ", +'edit_act' => " ", +'edit_yes' => "", +'edit_no' => "", +'edit_stat' => " :", +'edit_stat_1' => " :", +'edit_cat' => ":", +'edit_opt' => "", +'edit_all' => "- -", +'edit_au' => ":", +'edit_page' => " :", +'edit_act_1' => "", +'edit_nonews' => "- -", +'edit_title' => "", +'edit_com' => "", +'edit_approve' => " ", +'edit_cl' => "", +'edit_autor' => "", +'edit_selall' => " ", +'edit_prev' => ".", +'edit_next' => "", +'edit_selact' => "-- --", +'edit_seldel' => "", +'edit_selcat' => " ", +'edit_nonews' => " !", +'edit_cdel' => " ?", +'edit_etitle' => " ", +'edit_info' => ":", +'edit_eau' => ":", +'edit_et' => ":", +'edit_alturl' => " URL :", +'edit_edate' => ":", +'edit_ecal' => " ", +'edit_ndate' => " ", +'edit_jdate' => " ", +'edit_ac' => " ", +'edit_amain' => " ", +'edit_allow' => " ", +'edit_afix' => " ", +'edit_dnews' => "", +'edit_delok' => " ", +'edit_delok_1' => " .
, ", +'edit_delok_2' => " .
!!!", +'edit_alleok' => " ", +'edit_alleok_1' => " ", +'edit_allerr' => " , - ", + +'user_denied' => " ", +'user_head' => "", +'user_auser' => " ", +'user_newlogin' => " :", +'user_deluser' => " , ?", +'user_name' => ":", +'user_pass' => ":", +'user_mail' => "E-mail:", +'user_acc' => ":", +'user_se' => " ", +'user_list' => " ", +'user_reg' => " :", +'user_news' => ":", +'user_action' => ":", +'user_last' => " :", +'user_edit' => "", +'user_del' => "", +'user_err' => " !!!", +'user_err_1' => " ", +'user_err_2' => " ''!", +'user_err_3' => " !", +'user_err_4' => " E-Mail !", +'user_addok' => " ", +'user_ok' => "", +'user_ok_1' => " ", +'user_edhead' => " ", +'user_newpass' => " :", +'user_banned' => ":", +'user_save' => "", +'user_can' => "", +'user_nouser' => " .", +'user_editok' => " ", +'user_undel' => " !", +'user_delok' => " ", +'user_delok_1' => " .", + +'images_head' => " ", +'images_renok' => " ", +'images_renerr' => " ", +'images_renerr_1' => " ", +'images_uperr' => " !!!", +'images_uperr_1' => " !!!", +'images_uperr_2' => " !!!", +'images_uperr_3' => " ", +'images_upok' => " ", +'images_thok' => " ", +'images_uptitle' => " ", +'images_uphard' => " :", +'images_upurl' => " (URL):", +'images_aren' => ", ?", +'images_nogd' => " !
GD2", +'images_ath' => " ", +'images_iln' => " ", +'images_view' => "", +'images_lgem' => " ( )", +'images_thn' => " ", +'images_rename' => "", +'images_del' => " ", +'images_size' => " :", +'images_listdir' => " :", +'images_foto' => " ", +'images_thumb' => " ", +'images_news' => " ", +'images_delerr' => " !", +'images_delerr_1' => " , !", +'images_delok' => " !", +'images_delok_1' => " .", + +'bb_url' => " URL ", +'bb_page' => " ", +'bb_url_name' => " ", +'bb_page_name' => " ", +'bb_image' => " URL ", +'bb_email' => " e-mail ", +'bb_code' => ": [CODE] .. [/CODE]", +'bb_quote' => ": [QUOTE] .. [/QUOTE]", +'bb_no_url' => " URL", +'bb_no_title' => " ", +'bb_no_email' => " e-mail ", +'bb_prompt_start' => " ", +'bb_img_title' => " (left, center, right)", +'bb_email_title' => " ()", +'bb_b_center' => " ", +'bb_b_quote' => " ", +'bb_b_left' => "", +'bb_b_right' => "", +'bb_bb_page' => "", +'bb_b_color' => "", +'bb_b_blue' => "", +'bb_b_red' => "", +'bb_b_purple' => "", +'bb_b_orange' => "", +'bb_b_yellow' => "Ƹ", +'bb_b_gray' => "", +'bb_b_green' => "", +'bb_b_seagreen' => " ", +'bb_b_lime' => "", +'bb_b_brown' => "", +'bb_b_pink' => "", +'bb_b_tomato' => "", +'bb_b_magenta' => "", +'bb_b_slategray' => "-", +'bb_b_navy' => "-", +'bb_b_deepskyblue' => "", +'bb_b_close' => " ", +'bb_b_url' => "", +'bb_b_img' => "", +'bb_b_mail' => "E-Mail", +'bb_b_break' => "", +'bb_b_page' => " ", +'bb_t_b' => "", +'bb_t_i' => " ", +'bb_t_h' => " c ", +'bb_t_u' => " ", +'bb_t_s' => " ", +'bb_t_l' => " ", +'bb_t_c' => " ", +'bb_t_r' => " ", +'bb_t_cl' => " ", +'bb_t_url' => " ", +'bb_t_img' => " ", +'bb_t_quote' => " ", +'bb_t_code' => " ", +'bb_t_m' => " email", +'bb_t_br' => " ", +'bb_t_p' => " ", + +'mass_error' => "!!!", +'mass_denied' => " ", +'mass_head' => " ", +'mass_confirm' => " , ", +'mass_confirm_1' => "?", +'mass_no' => "", +'mass_yes' => "", +'mass_sel' => " ", +'mass_delok' => " !", +'mass_notok' => " ( !!!)", +'mass_i' => "", +'mass_notok_1' => " ", +'mass_cat' => " ", +'mass_cat_1' => " ", +'mass_cat_2' => " ", +'mass_cat_3' => ":", +'mass_cat_ok' => " ", +'mass_cat_ok_1' => " ", +'mass_cat_notok' => " ( )", +'mass_cat_notok_1' => " ", +'mass_noact' => " ", +'mass_noact_1' => " ", + +'opt_head' => "", +'opt_priv' => " ", +'opt_privc' => " .", +'opt_all' => " ", +'opt_allc' => " , , ", +'opt_static' => " ", +'opt_staticd' => " , ", +'opt_t' => " ", +'opt_tc' => " , , ", +'opt_user' => " ", +'opt_userc' => " , ", +'opt_img' => " ", +'opt_imgc' => " ", +'opt_cat' => "", +'opt_catc' => " , ", +'opt_fil' => " ", +'opt_filc' => " , ", +'opt_email' => " E-Mail ", +'opt_emailc' => " E-Mail , , ..", +'opt_xfil' => " ", +'opt_xfilc' => " , ", +'opt_db' => " ", +'opt_dbc' => " , ", +'opt_hopt' => " ", +'opt_hprv' => " ", +'opt_fullname' => " :", +'opt_land' => " :", +'opt_icq' => " ICQ:", +'opt_altpassw' => " :", +'opt_hmail' => " ", +'opt_peok' => " ", +'opt_errpass' => " ", +'opt_denied' => " ", +'opt_errfo' => " /data/templates/", +'opt_newtemp' => " ", +'opt_newtemp_1' => " :", +'opt_msgnew' => " ", +'opt_error' => "!!!", +'opt_error_1' => " !", +'opt_error_2' => " !", +'opt_error_3' => " ", +'opt_error_4' => " , !", +'opt_error_5' => " ", +'opt_info' => " !", +'opt_info_1' => " ", +'opt_info_2' => " ", +'opt_info_3' => " ", +'opt_info_4' => " ", +'opt_yes' => ", ", +'opt_no' => "", +'opt_dellink' => " ", +'opt_theads' => ":", +'opt_edit_head' => " ", +'opt_newtepled' => " :", +'opt_temphelp' => " ?", +'opt_enewtepl' => " ", +'opt_edteil' => " :", +'opt_ss_h' => " ", +'opt_ss_d' => " ", +'opt_fs_h' => " ", +'opt_fs_d' => " ", +'opt_an_h' => " ", +'opt_an_d' => " , ", +'opt_c_h' => "", +'opt_c_d' => " ", +'opt_fc_h' => " ", +'opt_fc_d' => "
( HTML)", +'opt_n_h' => " ", +'opt_n_d' => " ", +'opt_u_h' => " ", +'opt_u_d' => "
( HTML)", +'opt_se_hf' => " ", +'opt_se_df' => " ", +'opt_se_h' => " ", +'opt_se_d' => " ", +'opt_se_h' => " ", +'opt_st_h' => " ", +'opt_st_d' => " ", +'opt_er_h' => " ", +'opt_er_d' => " ", +'opt_r_h' => " ", +'opt_r_d' => "
( HTML)", +'opt_pa_h' => " ", +'opt_pa_d' => " ", +'opt_pa_d_1' => "
", +'opt_sm_h' => " E-Mail ", +'opt_sm_d' => " E-Mail ", +'opt_pm_h' => " ", +'opt_pm_d' => " ", + +'opt_editok' => " ", +'opt_editok_1' => " ", +'opt_sysok' => " ", +'opt_sysok_1' => " ", + +'opt_sys_hth' => " ", +'opt_sys_ht' => " :", +'opt_sys_htd' => ": \" \"", +'opt_sys_hu' => " :", +'opt_sys_hud' => " . : http://yoursite.com/ , .", +'opt_sys_sd' => " :", +'opt_sys_sdd' => ": http://yoursite.com/news/", +'opt_sys_hp' => " :", +'opt_sys_hpd' => ": http://yoursite.com/print1.php", +'opt_sys_all' => " ", + +'opt_sys_amail' => "E-Mail :", +'opt_sys_amaild' => " E-Mail ", + +'opt_sys_al' => " :", +'opt_sys_ald' => " , ", +'opt_sys_as' => " :", +'opt_sys_asd' => " , ", +'opt_sys_aw' => " :", +'opt_sys_awd' => " ", +'opt_sys_af' => " :", +'opt_sys_afd' => " ; 0 = ", +'opt_sys_am' => ":", +'opt_sys_amd' => " (,)", +'opt_sys_at' => " :", +'opt_sys_atd' => " ; ..: 180=+3 ; -120=-2 . :", +'opt_sys_an' => " :", +'opt_sys_and' => " ", +'opt_sys_ag' => " gzip :", +'opt_sys_agd' => " , ", +'opt_sys_ad' => " :", +'opt_sys_add' => " , ", +'opt_sys_cch' => " ", +'opt_sys_ct' => " :", +'opt_sys_dch' => " ", +'opt_sys_dc' => " :", +'opt_sys_dcd' => "E '', URL, . http://site.ru/ .html", +'opt_sys_df' => " :", +'opt_sys_dfd' => " - , ", +'opt_sys_dk' => " :", +'opt_sys_dkd' => " -
- ", +'opt_sys_da' => " :", +'opt_sys_dad' => " -
- ", +'opt_sys_uch' => " ", +'opt_sys_ur' => " :", +'opt_sys_urd' => " ", +'opt_sys_ut' => " :", +'opt_sys_utd' => " ", +'opt_sys_um' => " :", +'opt_sys_umd' => "0 ", +'opt_sys_ud' => " :", +'opt_sys_udd' => " , 0 = ", +'opt_sys_ich' => " ", +'opt_sys_iw' => " :", +'opt_sys_iwd' => " , ", +'opt_sys_im' => " :", +'opt_sys_imd' => " , ", +'opt_sys_ia' => " :", +'opt_sys_iad' => " :

: . : 400

: x . : 100x100", +'opt_sys_ij' => " .jpg :", +'opt_sys_ijd' => " JPEG ", + +'opt_sys_yes' => "", +'opt_sys_no' => "", +'opt_sys_reg' => "", +'opt_sys_reg_1' => "", + +'word_head' => " ", +'word_error' => " !!!", +'word_word' => " ", +'word_del' => "", +'word_ar' => " !!!", +'word_nof' => " ", +'word_rep' => " ", +'word_blank' => " ", +'word_new' => " ", +'word_help' => " , .", +'word_help_1' => " . E , ", +'word_red' => ".", +'word_empty' => " ", +'word_worte' => "", +'word_lred' => " ", +'word_ledit' => "", +'word_ldel' => "", +'word_help_2' => " , \"\" . \"\" HTML , BB .", + +'mail_info' => " E-Mail , ", +'mail_reg_info' => " :
{%username%} -
{%validationlink%} -
{%password%} - , ", +'mail_info_1' => " E-Mail , ", +'mail_feed_info' => " :
{%username_to%} -
{%username_from%} -
{%text%} -
{%ip%} - IP ", +'mail_info_2' => " E-Mail , ", +'mail_lost_info' => " :
{%username%} -
{%lostlink%} - IP
{%ip%} - IP ", +'mail_addok' => " ", +'mail_addok_1' => " ", + +'static_head' => " ", +'static_title' => ":", +'static_descr' => ":", +'static_view' => " ", +'static_templ' => ":", +'static_edit' => " ", +'static_addok' => " ", +'static_addok_1' => " ", +'static_a' => " ", +'static_err' => "", +'static_err_1' => " ", +'static_del' => " ", +'static_del_1' => " ", +'static_confirm' => " ", + +'xfield_error' => " ", +'xfield_err_1' => " ", +'xfield_err_2' => " .", +'xfield_err_3' => " ", +'xfield_err_4' => " .", +'xfield_err_5' => " , !", +'xfield_err_6' => " ?", +'xfield_err_7' => " , !", +'xfield_err_8' => " , !", +'xfield_err_9' => "e !", +'xfield_err_10' => " , !", +'xfield_err_11' => " !", +'xfield_addh' => " ", +'xfield_edith' => "", +'xfield_fih' => "", +'xfield_afield' => " ", + +'index_msge' => "", +'index_exit' => " , ", +'index_errpass' => " !", +'index_inf' => " .", +'index_denied' => " ", + +'func_msg' => " ", + +); + + +//////////// +// +$langdate = array ( +'January' => "", +'February' => "", +'March' => "", +'April' => "", +'May' => "", +'June' => "", +'July' => "", +'August' => "", +'September' => "", +'October' => "", +'November' => "", +'December' => "", +'Jan' => "", +'Feb' => "", +'Mar' => "", +'Apr' => "", +'Jun' => "", +'Jul' => "", +'Aug' => "", +'Sep' => "", +'Oct' => "", +'Nov' => "", +'Dec' => "", + +'Sunday' => "", +'Monday' => "", +'Tuesday' => "", +'Wednesday' => "", +'Thursday' => "", +'Friday' => "", +'Saturday' => "", + +'Sun' => "", +'Mon' => "", +'Tue' => "", +'Wed' => "", +'Thu' => "", +'Fri' => "", +'Sat' => "", + +); + +@setlocale(LC_ALL, array("ru_RU.CP1251", "ru_SU.CP1251", "ru_RU.KOI8-r", "ru_RU", "russian", "ru_SU", "ru")); +?> \ No newline at end of file diff --git a/language/Russian/adminpanel_repa.lng b/language/Russian/adminpanel_repa.lng new file mode 100644 index 0000000..b938084 --- /dev/null +++ b/language/Russian/adminpanel_repa.lng @@ -0,0 +1,158 @@ + " :", +'repa_st_tot_p' => " :", +'repa_st_repa_off' => " :", +'repa_st_freeze' => ":", +'repa_adm_msg_lc' => " ", +'repa_adm_plus' => " ", +'repa_adm_plus_sub' => " ( ) , \" ..\"", +'repa_adm_sub' => " ( ) , \" ..\"", +'repa_robo_sub' => " ( \"\")", +'avt_plus' => " ", +'repa_adm_msg' => " ", +'repa_adm_plus_msg' => " ", +'repa_adm_plus_com' => " ", +'repa_msgs_adm_st' => " :", +'repa_msgs_adm_su' => " - ", +'repa_msg_adm_tpl' => " ", +'repa_msg_adm_tsu' => "
{%text%} - ", +'repa_stop_change_min' => " , ", +'repa_stop_change_min_sub' => " , .
, 0", +'repa_stop_change_sub' => " () .
( )", +'repa_msg_top' => "", +'repa_ban_desc' => " ", +'repa_ban_desc_sub' => " ", +'repa_msg_changed' => " ", +'repa_type0' => "", +'repa_type1' => "", +'repa_type2' => "", +'opt_type_repa' => " ", +'opt_type_repa_sub' => " .
- : - 10 +
- : - (13|3) +
- : - (13|10|3) +", +'repa_msgs_del_st' => " :", +'repa_msgs_del_su' => " - ", +'repa_msg_del_tpl' => " ", +'repa_msg_del_tsu' => "
{%kto%} -
{%ot_kogo%} -
{%text%} - ", +'repa_logs' => " ", +'repa_logs_sub' => " ", +'repa_skins' => " AJAX ? - , .", +'repa_skins_opt' => " AJAX ", +'repa_ban' => " ", +'repa_ban_sub' => " X X ", +'repa_ban_num' => "", +'repa_ban_num_sub' => " ", +'repa_ban_days' => "- ", +'repa_ban_days_sub' => " ", +'opt_repa_news' => " ", +'opt_repa_news_sub' => " / ", +'opt_repa' => "", +'opt_repa_sub' => "
© Inrus & ShapeShifter", +'repa_value' => ":", +'repa_on' => "", +'repa_off' => "", +'repa_stats' => " ", +'repa_st_on' => "", +'repa_st_off' => "", +'repa_st_vr' => " :", +'repa_st_st' => " :", +'repa_st_ca' => " :", +'repa_st_in' => ":", +'repa_st_es' => ":", +'repa_options' => "", +'repa_m_opts' => " ", +'repa_m_sub' => " ", +'repa_control' => " ", +'repa_con_sub' => " ", +'repa_info' => "", +'repa_i_sb' => " ", +'repa_opts' => " ", +'repa_h_op' => " ", +'repa_cts' => " ", +'repa_mop' => " ", +'repa_grs' => " ", +'repa_blp' => " ", +'repa_stop_change' => " ", +'repa_stp' => " ", +'opt_general_repa' => " ( )", +'opt_gen_st' => " :", +'opt_gen_st_sub' => "/ ", +'opt_gen_min_sub' => " ", +'opt_gen_max_sub' => " ", +'opt_gen_comms' => "", +'opt_gen_symb' => " ", +'opt_gen_symb_min' => " ", +'opt_gen_page' => " ", +'opt_gen_page_sub' => " ", +'opt_gen_break' => " :", +'opt_site_res' => " :", +'opt_cp_res' => " :", +'opt_gen_c_sub' => "/ ", +'opt_gen_symb_sub' => " , ", +'opt_gen_symb_sub_min' => " , ", +'opt_gen_break_sub' => " ", +'opt_comm_st_on' => "", +'opt_comm_st_off' => "", +'opt_site_sub' => " ", +'opt_cp_sub' => " ", +'repa_adm' => " ", +'repa_robot' => " ", +'repa_replace' => " ", +'repa_adm_com' => " ", +'repa_adm_rpm' => " , ", +'repa_msgs_st' => " :", +'repa_msgs_su' => " - ", +'repa_msg_tpl' => " ", +'repa_msg_tsu' => "
{%kto%} -
{%what%} - /
{%text%} - ", +'repa_rules' => " ", +'repa_rules_su' => " ", +'repa_rules_tpl' => "", +'repa_rules_tpl_su' => " .
bbcode.", +'repa_yes' => "", +'repa_no' => "", +'repa_gr_fr' => " ", +'repa_gr_sc' => " ", +'bl_period' => " ", +'bl_per_su' => " , , ", +'repa_st_page' => " :", +'repa_st_p_sub' => " -
:
", +'repa_page_kol' => " ", +'page_kolvo' => " , ", +'off_alt' => " , ", +'repa_save' => "", +'repa_msg_chd' => " ", +'repa_go_back' => " ", +'repa_cntrl' => " ", +'repa_comm_ed' => " :", +'repa_done' => "", +'repa_done_minus_1' => " ", +'repa_done_minus_2' => " ! ", +'repa_done_minus_2' => " !", +'delcom' => " ", +'deleted' => " ", +'opt_saved' => " !", +'avt_minus' => " ", +'full_del' => " ", +'delcom_done' => " ", +'edit_this' => " ", +'del_quest' => " ?", +'repa_nothing' => " .", +'repa_pages' => ":", +'repa_first_p' => " ", +'repa_last_p' => " ", +'repa_how_pl' => "", +'repa_how_mn' => "", +'repa_how_tm' => " ", +'repa_who' => " ()", +'repa_to' => " ()", +'repa_supp' => "", +'repa_commst' => "", +'r_mod_name' => " ", +'r_total' => " :", +'repa_do_freeze' => " ", +'freeze_info' => " , ", + +); + +?> \ No newline at end of file diff --git a/language/Russian/chat.lng b/language/Russian/chat.lng new file mode 100644 index 0000000..28458cc --- /dev/null +++ b/language/Russian/chat.lng @@ -0,0 +1,52 @@ + "windows-1251", + +'mchat' => "DLE mChat", +'mchatc' => " -.", +'mc_conf' => " -", +'mc_trun' => " -", +'mc_smiles' => "", +'mc_colornik' => " ", +'mc_colornikc' => " , ,
( \"Color Nik\")", +'mc_showdate' => " ", +'mc_showdatec' => " ", +'mc_limit' => " ", +'mc_limitc' => " ", +'mc_limitb' => " ", +'mc_limitbc' => " ", +'mc_guest' => " ", +'mc_guestc' => " '', . '', .", +'mc_timestamp' => " ", +'mc_timestampa' => " ", +'mc_refresh' => " ", +'mc_refreshc' => " , 0 - ", +'mc_dbrows' => " mhat", +'mc_dbrowsc' => " , 0 = ", +'mc_spam' => " ", +'mc_spamc' => " ; 0 = ", +'mc_sc' => " ", +'mc_scc' => " ", +'mc_trun' => " , ( )", +'mc_addmssa' => " ", +'mc_addmssok' => " ", +'mc_main' => " ", +'mc_mess_page' => "C :", +'mc_stat' => " :", +'mc_stat1' => " :", +'mc_mess_delok' => " !", +'mc_mess_notok' => " ( !!!)", +'mc_mess_notok_1' => " ", +'mc_color1' => " ", +'mc_color2' => " ", +'mc_color3' => " ", +'mc_version' => "- ", +'mc_ver_you' => " :", +'mc_ver_full' => " :", +'mc_load_verfull' => "C !", +'mc_smail' => " ", +'mc_smailb' => " 'engine/modules/mchat/smiles'", +); +?> diff --git a/language/Russian/friends.lng b/language/Russian/friends.lng new file mode 100644 index 0000000..e00070a --- /dev/null +++ b/language/Russian/friends.lng @@ -0,0 +1,16 @@ + " ", +'invite' => " ", +'is_friend' => " , ", +'friend_send' => " ", +'friend_subj' => " ", +'friend_act' => " ", +'err_act' => " ", + +); + + +?> \ No newline at end of file diff --git a/language/Russian/help.lng b/language/Russian/help.lng new file mode 100644 index 0000000..444b4a8 --- /dev/null +++ b/language/Russian/help.lng @@ -0,0 +1,62 @@ + + + + + +
+ . , . , " " , , " ", , "", ..

+ HTML, .. , , , , .. .
+ . {title} , {author} ..

+ . +HTML; + +$help_sections['date'] = << + + + + +
+ : +
    +
  • a - "am" "pm" +
  • A - "AM" "PM" +
  • B - Swatch Internet +
  • d - () , 2 , ; . . "01" "31" +
  • D - , , 3 ; , "Fri" +
  • F - , , long; , "January" +
  • g - , 12- ; .. "1" "12" +
  • G - , 24- ; .. "0" "23" +
  • h - , 12- ; .. "01" "12" +
  • H - , 24- ; .. "00" "23" +
  • i - ; .. "00" "59" +
  • I ( i) - "1", Daylight Savings Time, "0" - . +
  • j - () ; .. "1" "31" +
  • l ('L' ) - , , long; , "Friday" +
  • L - boolean, , ; .. "0" "1" +
  • m - ; .. "01" "12" +
  • M - , , 3 ; , "Jan" +
  • n - ; .. "1" "12" +
  • O - , ; , "+0200" +
  • r - RFC 822 ; , "Thu, 21 Dec 2000 16:01:07 +0200" ( PHP 4.0.4) +
  • s - ; .. "00" "59" +
  • S - () , 2 ; .. "st", "nd", "rd" "th" +
  • t - ; .. "28" "31" +
  • T - Timezone/ ; , "EST" +"MDT" +
  • U - Unix Epoch ( January 1 1970 00:00:00 GMT) +
  • w - , , .. "0" (Sunday) "6" (Saturday) +
  • W - ISO-8601 , /Monday +( PHP 4.1.0) +
  • Y - , 4 ; , "1999" +
  • y - , 2 ; , "99" +
  • z - ; .. "0" "365" +
  • Z - , (.. "-43200" "43200"). + UTC , + UTC - .
+HTML; + +?> \ No newline at end of file diff --git a/language/Russian/img.lng b/language/Russian/img.lng new file mode 100644 index 0000000..df3475f --- /dev/null +++ b/language/Russian/img.lng @@ -0,0 +1,21 @@ + "windows-1251", + +'img_heading' => " ", + +'img_off' => " ", +'img_gallery' => " ", +'img_server' => " ", +'img_width' => " ", +'img_taglimit' => " ", +'img_doeditcfg' => " ", +'opt_conok' => " ", +'opt_conok_1' => " ", + +'db_prev' => " ", +'func_msg' => " ", +); +?> diff --git a/language/Russian/rating.lng b/language/Russian/rating.lng new file mode 100644 index 0000000..025196c --- /dev/null +++ b/language/Russian/rating.lng @@ -0,0 +1,39 @@ + "windows-1251", +'options_p' => " ", +'opt_denied' => " ", +'info' => "", +'desc_about_p' => " ", +'desc_options_p'=> " ", +'navig' => " ", + +'about' => " ", +'name_mod' => "", +'ver_mod' => " ", +'autor' => "", +'site' => "", +'admin' => " .", +'admin_i' => " , . , ( .).", +'txt' => " ", +'txt_i' => " , , -.", +'yes' => "", +'no' => "", +'suc_save_1' => " ", +'suc_save' => " ", +'save' => "", +'func_msg' => " ", +'save_conf' => " !", + +'upd_01' => " , ", +'upd_02' => " , ", +'upd_03' => " , ", +'upd_04' => " , ", + +'last_ver' => " ", +'error_upd' => " . , .", + +); +?> \ No newline at end of file diff --git a/language/Russian/table.lng b/language/Russian/table.lng new file mode 100644 index 0000000..4176bf9 --- /dev/null +++ b/language/Russian/table.lng @@ -0,0 +1,131 @@ + ' ', +'main_control' => ' ', +'main_control_descr' => ' ', +'main_options' => ' ', +'main_options_descr' => ' ', + +'etitle' => ' ', +'edit_head' => ' ', +'orders_list' => ' ', +'orders_advanced_search' => ' ', +'edit_stat' => ' :', +'edit_stat_1' => ' :', +'edit_search_orderss' => ' :', +'edit_page' => ' :', +'search_by_date' => ' :', +'search_by_status' => ' :', +'orders_order' => ' ', +'edit_noorders' => ' !', +'edit_act' => ' ', +'edit_date' => '', +'edit_author' => '', +'edit_title' => '', +'edit_status' => '', +'edit_status1' => ':', +'edit_cat' => '', +'cat_in_none' => '- -', +'orders_status_all' => ' ', +'edit_status_0' => '', +'edit_status_1' => '', +'edit_status_2' => '', +'edit_status_3' => '', +'edit_runame' => ' (.):', +'edit_enname' => ' :', +'edit_category' => ' :', +'edit_fileyear' => ' :', +'edit_link' => ':', +'edit_answer' => ':
.
* , !', +'edit_cdel' => ' ?', +'edit_delok' => ' ', +'edit_delok_1' => ' .', +'edit_allerr' => ' , - ', +'addorders_alert' => ' ', +'btn_save' => '', +'go_page_orders' => ' ', +'mass_head' => " ", +'mass_confirm' => " , ", +'mass_confirm_1' => "?", +'mass_denied' => " ", +'mass_error' => "!!!", +'mass_no' => "", +'mass_yes' => "", +'mass_sel' => " ", +'mass_delok' => " !", +'mass_notok' => " ( !!!)", +'mass_i' => "", +'mass_notok_1' => " ", + +'opt_list' => ' ', +'opt_tab_offline' => ' " :"', +'opt_tab_offlined' => ' " " offline, ', +'opt_tab_category' => '', +'opt_tab_categoryd' => ' (,)', +'opt_tab_timeweek' => ', ', +'opt_tab_timeweekd' => ' ; 0 = ', +'opt_tab_auto_wrap' => ' :', +'opt_tab_auto_wrapd' => ' ', +'opt_tab_orders_number' => ' :', +'opt_tab_orders_numberd' => ' , ', +'opt_tab_msgs' => ' /E-Mail :', +'opt_tab_msgsd' => ' "", , /E-Mail .', +'opt_tab_msgs1' => ' /E-Mail :', +'opt_tab_msgsd1' => ' "", , /E-Mail .', +'opt_tab_msgs_type' => ' :', +'opt_tab_msgs_typed' => ' " ", , , E-Mail .', +'opt_tab_msgs_type1' => ' ', +'opt_tab_msgs_type2' => 'E-mail', +'opt_tab_an' => ' :', +'opt_tab_msort' => ' ', +'opt_tab_msortd' => ' ', +'opt_tab_toc' => ' ', +'opt_tab_tocd' => ' 1 ', +'opt_tab_toporders_number' => ' , :', +'opt_tab_toporders_numberd' => ' :', +'opt_tab_grouplevel' => ' , :', +'opt_tab_groupleveld' => ' , , .', +'opt_tab_mail_info1' => ' /E-Mail ', +'opt_tab_mail_info2' => ' /E-Mail , ', +'opt_tab_mail_info3' => ' /E-Mail , ', +'mail_pm_info1' => ' :
{%username_from%} -
{%category%} - ,
{%text%} -
{%date%} -
{%ip%} - IP ', +'mail_pm_info2' => ' :
{%username%} -
{%username_editor%} - ,
{%date%} -
{%status%} - ', +'key_info' => ' :', +'key_info1' => '! , . ..', +'key_trial' => ' . .', +'edit_denied' => ' ', +'trial_limit' => ' . .', +'not_user_id' => ' , user id ', +'opt_btn_save' => ' ', + +'offline' => ' .', +'description' => ' ', +'description2' => ' ', +'not_orders' => ' .', +'edit' => '[]', +'download' => '[]', +'err_name' => '
  • ', +'err_category' => '
  • ', +'err_year' => '
  • " "
  • ', +'err_year_type' => '
  • " "
  • ', +'err_link' => '
  • " "
  • ', +'orders_err_name' => ' " (.)",', +'orders_err_enname' => ' " (Eng.)",', +'orders_err_category' => ' ,', +'orders_err_year' => ' " ",', +'orders_err_year_type' => '" " ', +'not_logged' => ' , . .', +'one_orders' => ' , !
    , .
    ', +'cause0' => '

    : ', +'cause1' => '

    : .', +'downloadd' => '

    Download:
    ', + +'msgs_subject' => ' ', +'msgs_subject_usr' => ' ', +'msg_user_from' => '-', + +); + +?> \ No newline at end of file diff --git a/language/Russian/website.lng b/language/Russian/website.lng new file mode 100644 index 0000000..1dc25d5 --- /dev/null +++ b/language/Russian/website.lng @@ -0,0 +1,623 @@ + "windows-1251", +'dle_spam_agree' => " ?", +'pm_spamok' => " . ", +'pm_err_spam' => " . ", +'online_notusers' => ".", 'online_notbots' => ".", +'online_notlusers' => ".", +'online_notlbots' => ".", +'online_was' => ": ", +'online_back' => "", +'online_os' => ": ", +'online_browser' => ": ", +'online_country' => ": ", +'online_city' => ": ", +'online_group' => " : ", +'online_paddcomments' => " : ", +'online_preadnews' => " : ", +'online_pincategory' => " : ", +'online_pposin' => " : ", +'online_pmainpage' => " .", +'online_lpaddcomments' => " : ", +'online_lpreadnews' => " : ", +'online_lpincategory' => " : ", +'online_lpposin' => " : ", 'online_lpmainpage' => " .", +'online_robots' => " ", +'online_stamp01' => "", +'online_stamp02' => "", +'online_stamp03' => "", +'online_stamp11' => "", +'online_stamp12' => "", +'online_stamp13' => "", +'online_stamp21' => "", +'online_stamp22' => "", +'online_stamp23' => "", +'online_stamp31' => "", +'online_stamp32' => "", +'online_stamp33' => "", +'online_stamp41' => "", +'online_stamp42' => "", +'online_stamp43' => "", +'online_stamp51' => "", +'online_stamp52' => "", +'online_stamp53' => "", +'online_stamp61' => "", +'online_stamp62' => "", +'online_stamp63' => "", +'online_stamp71' => "", +'online_stamp72' => "", +'online_stamp73' => "", +'wysiwyg_language' => "ru", +'loginza_err1' => " Loginza", +'loginza_err2' => " .", +'loginza_err3' => " OpenID.", +'comr_self' => " ", +'comr_del' => " ", +'comr_hidden' => " ", +'comr_hide' => " ", +'comr_already' => " ", +'comr_login' => "", + +'add_ok_ok' => " ", +'add_ok_1_1' => " .", +'add_ok_2_1' => " . .", +'add_ok_3_1' => " . , , , .", + +// 8.3 +'lost_password' => " :", +'lost_ip' => " IP :", +'lost_clear_ip' => " IP ", +'lost_clear_ip_1' => " {username} IP .", +'lost_mfg' => " ,\n ", +'c_subscribe' => " ", +'admin' => "", +'news_err_37' => " .", +'news_err_38' => " .", +'news_err_39' => " .", +'unsubscribe_ok' => " .", +'unsubscribe_err' => " .", +'nav_trennen' => "...", +// 8.3 + +// 8.2 +'thumb_playtitle' => " ()", +'thumb_pausetitle' => "", +'thumb_previoustitle' => " ", +'thumb_nexttitle' => " ", +'thumb_movetitle' => "", +'thumb_closetitle' => " (Esc)", +'nl_info_2' => "", +'news_info_6' => " {days} .", +'search_s_go' => " ", +// 8.2 + +// 8.0 +'feed_err_8' => "

  • E-Mail .
  • ", +'bb_flash' => " (, )", +'bb_flash_url' => " ", +'inset_flash_link' => " ", +// 8.0 + +// 7.5 +'news_err_32' => "
  • .
  • ", +'not_allowed_sig' => "
  • !
  • ", +'news_err_33' => " .", +'news_err_34' => " .", +'tags_count' => " :", +'news_err_35' => "
  • !
  • ", +'news_err_36' => "
  • !
  • ", +// 7.5 + +// 7.3 +'reg_err_30' => " !", +'reg_err_31' => " 6 !", +'reg_err_32' => " !", +'reg_err_33' => " E-Mail !", +'rss_user' => " RSS", +'show_archive' => " ", +'no_message' => " ", +'spoiler_title' => " / ", +// 7.3 + +// 7.2 +'news_info_2' => " {date}. .", +'news_info_3' => " .", +'news_info_4' => " {date}. .", +'news_info_5' => " .", +'loading' => "...", +'mail_pm' => " ", +'sort_main' => " :", +'sort_by_date' => "", +'sort_by_rating' => "", +'sort_by_read' => "", +'sort_by_title' => "", +'sort_by_comm' => "", +'rules_accept' => "", +'rules_decline' => " ", +'reg_err_21' => "
  • {descr}
  • ", +'reg_err_22' => ", : {descr}", +'reg_err_23' => "
  • E-Mail {descr}
  • ", +'reason' => " :", +'tag_cloud' => " ", +'last_news' => " ", +'all_tags' => " ", +// 7.2 + +// 7.0 +'sig_not_allowed' => " , .. .", +'related_not_found' => " .", +'add_err_9' => " , . , . .", +// 7.0 + +// 6.7 +'news_delnews' => " ", +'news_del_ok' => " .", +// 6.7 + +// 6.5 +'time_heute' => "", +'time_gestern' => "", +'thumb_expandtitle' => " ", +'thumb_restore' => " , ", +'thumb_focustitle' => "", +'thumb_cancel' => " ", +'all_user_news' => " ", +'show_user_news' => " ", +'menu_fnews' => " ", +'reg_next' => " ", +'xf_not_notig' => "", +// 6.5 + +// 6.3 +'no_limit' => "", +'title_catalog' => "", +// 6.3 + +// 6.2 +'s_fsrelate' => " ", +// 6.2 + +// 6.0 +'reload_code' => ", ", +'news_err_31' => " . , .", +'bb_t_font' => "", +'bb_t_size' => "", +// 6.0 + +// 5.7 +'mail_news' => " ", +'mail_comments' => " ", +'bb_t_leech' => " ", +// 5.7 + +// 5.5 +'s_ffullstart' => " ", +'user_logged' => " .", +// 5.5 + +// 5.3 +'bb_t_emo' => " ", +'pm_to' => "", +'approve' => "( )", +'ip_info' => " IP ", +'ip_tools' => " ", +'ip_ban' => " ", +// 5.3 + +// 5.2 +'bb_t_code' => " ", +'title_last' => "", +'title_lost' => " ", +'title_search' => " ", +'bb_t_video' => " ", +'menu_profile' => " ", +'menu_fcomments' => " ", +'menu_send' => " ", +'menu_uedit' => "", +// 5.2 + +'fav_notfound' => " ", +'news_err_30' => " ", +'confirm_ok' => " E-Mail: {email} . : {login}. , .", +'s_allcat' => "- -", +'s_con' => " ", +'s_word' => " :", +'s_whint' => "


    1 OR 2 OR ...", +'s_ncom1' => " ", +'s_ncall' => " ", +'s_ncom' => " ", +'s_tnews' => " ", +'s_nid' => " ", +'s_static' => " ", +'s_mname' => " ", +'s_fall' => " ", +'s_fname' => " :", +'s_fgname' => " ", +'s_fart' => " ", +'s_fmin' => " ", +'s_fmax' => " ", +'s_wcomm' => "", +'s_fdaten' => " ", +'s_tall' => " ", +'s_tlast' => " ", +'s_tday' => " ", +'s_tweek' => " ", +'s_ttweek' => " 2 ", +'s_tmoth' => " ", +'s_tfmoth' => " 3 ", +'s_tsmoth' => " 6 ", +'s_tyear' => " ", +'s_fnew' => " ", +'s_falt' => " ", +'s_fsoft' => " ", +'s_fsdate' => " ", +'s_fstitle' => " ", +'s_fscnum' => " ", +'s_fsnnum' => " ", +'s_fsaut' => " ", +'s_fscat' => "", +'s_fsrate' => " ", +'s_fsdesc' => " ", +'s_fsasc' => " ", +'s_vlegend' => " ", +'s_vnum' => " :", +'s_vwie' => " ", +'s_vjump' => " :", +'s_vnews' => "", +'s_vtitle' => "", +'s_fcats' => " ", +'s_fstart' => " ", +'s_fstop' => "", +'s_freset' => "", +'static_denied' => " .", +'i_quote' => ":", +'feed_error' => ", \"{group}\", .", +'search_denied' => ", \"{group}\", .", +'news_err_id' => " .", +'comm_req_f' => " ", +'ip_block_login' => ", IP , .", +'mod_list_f' => " , , ", +'ip_block' => " IP ", +'pm_alert' => " {user} {num} .", +'pm_asub' => ":", +'pm_atitle' => " ", +'pm_mtitle' => " , ", +'pm_aread' => " ", +'pm_close' => " ", +'att_dcount' => "c:", +'att_denied' => " ", + +'banned_info' => ".", +'fav_error' => " ", + +'aj_allowbr' => " ", +'pm_selall' => " ", +'b_del' => " ", +'last_comm' => " ", +'err_last' => " ", + +'top_name' => "", +'top_status' => "", +'top_reg' => "", +'top_last' => " ", +'top_nnum' => "", +'top_cnum' => "", +'top_pm' => "", + +'use_ajax_edit' => " , ?", +'ajax_comm_edit' => " , ?", +'ajax_info' => ". , ...", +'menu_short' => " ", +'menu_full' => " ", + + +'addnews_allow_rate' => " ", +'sec_image' => " ", +'reg_err_19' => "
  • ", +'reg_err_20' => "
  • ", +'reg_ok_ajax' => " ", + +'news_page_err' => " , : , . , .", +'bb_t_up' => " ", +'bb_b_up' => "", +'next_moth' => " ", +'prev_moth' => " ", +'cal_post' => " ", +'title_users' => "", +'title_new' => "", +'title_date' => " ", +'title_stats' => " ", +'title_addnews' => " ", +'title_register' => " ", +'title_fav' => " ", +'title_pm' => " ", +'title_feed' => " ", +'title_year' => "", +'title_year1' => "", +'vote_set' => "", +'vote_result' => "", +'poll_failed' => " ", + +'excellent' => "", +'good' => "", +'fair' => "", +'poor' => "", +'useless' => "", +'rated' => " :", +'voten' => ":", +'yrate' => " :", +'entrat' => "", +'unorat' => " ", +'urated' => " ", + +'templ_err_1' => "", +'templ_err_2' => " ! !", + +'all_info' => "", +'all_prev' => " ", +'all_err' => " Javascript. .", +'all_err_1' => ", ", + +'reg_err_1' => "
  • !
  • ", +'reg_err_2' => "
  • 6 16!
  • ", +'reg_err_3' => "
  • 20 !
  • ", +'reg_err_4' => "
  • !
  • ", +'reg_err_5' => "
  • !
  • ", +'reg_err_6' => "
  • E-Mail !
  • ", +'reg_err_7' => "
  • !
  • ", +'reg_err_8' => "
  • E-Mail !
  • ", +'reg_err_9' => " .", +'reg_err_10' => " . .", +'reg_err_11' => " ", +'reg_err_12' => "
  • .
  • ", +'reg_err_13' => "
  • JPG PNG.
  • ", +'reg_err_14' => "
  • !
  • ", +'reg_err_15' => "
  • !
  • ", +'reg_err_16' => "
  • !
  • ", +'reg_err_17' => "
  • ICQ!
  • ", +'reg_err_18' => ", ", +'reg_ok' => " ", +'reg_ok_1' => " ! , .", + +'reg_subj' => " ", +'reg_vhead' => " ", +'reg_vtext' => " .

    E-mail . 10 ( ) . , . , E-Mail .
    ! E-mail .", + +'add_err_1' => "
  • ", +'add_err_2' => "
  • ", +'xfield_xerr1' => "
  • .
  • ", +'add_err_5' => "
  • ", +'add_err_6' => ", ", +'add_err_7' => " ", +'add_err_8' => " .
    Unfortunately you do not have the right to publish news on the site.


    Obtain the right to add news
    ", +'add_err_9' => " !", +'add_ok' => " ", +'add_ok_1' => " .", +'add_ok_2' => " . .", +'add_ok_3' => " . , , , .", +'add_noch' => " ", +'add_or' => "", +'add_al_com' => " ", +'add_al_m' => " ", +'add_al_ap' => " ", +'add_al_fix' => " ", + +'bb_url' => " URL ", +'bb_page' => " ", +'bb_url_name' => " ", +'bb_page_name' => " ", +'bb_image' => " URL ", +'bb_email' => " e-mail ", +'bb_code' => ": [CODE] .. [/CODE]", +'bb_quote' => ": [QUOTE] .. [/QUOTE]", +'bb_no_url' => " URL", +'bb_no_title' => " ", +'bb_no_email' => " e-mail ", +'bb_prompt_start' => " ", +'bb_img_title' => " (left, center, right)", +'bb_email_title' => " ()", +'bb_b_quote' => " ", +'bb_bb_page' => "", +'bb_b_close' => " ", +'bb_b_url' => "", +'bb_b_img' => "", +'bb_b_mail' => "E-Mail", +'bb_b_break' => "", +'bb_b_page' => " ", +'bb_t_b' => "", +'bb_t_i' => " ", +'bb_t_u' => " ", +'bb_t_s' => " ", +'bb_t_l' => " ", +'bb_t_c' => " ", +'bb_t_r' => " ", +'bb_t_cl' => " ", +'bb_t_url' => " ", +'bb_t_img' => " ", +'bb_t_hide' => " ", +'bb_t_quote' => " ", +'bb_t_translit' => " ", +'bb_t_m' => " E-Mail", +'bb_t_br' => " ", +'bb_t_p' => " ", +'bb_b_cancel' => "", +'bb_t_cancel' => " ", +'bb_b_apply' => " ", +'bb_t_apply' => " ", + +'comm_err_1' => " ", +'comm_err_2' => ", ", +'comm_err_3' => " .", +'comm_err_4' => " .", +'comm_err_5' => " .", + +'comm_ok' => " ", +'comm_ok_1' => " ", +'comm_ok_2' => " .", +'comm_title' => " ", + +'login_err' => " ", +'login_err_1' => ", . , .", + +'search_err_2' => " , . .", +'search_err_3' => " 4 , .", +'search_ok' => " ", +'search_ok_1' => "", +'search_ok_2' => " ", +'search_title' => " ", + +'lost_npass' => " ! . :", +'lost_login' => ":", +'lost_pass' => ":", +'lost_info' => " .", +'lost_gen' => " ", +'lost_err' => " , . e-mail . e-mail", +'lost_subj' => " ", +'lost_ms' => " ", +'lost_ms_1' => " ! , . E-Mail , , .", +'lost_err_1' => " E-Mail ", +'news_err_url' => "URL , \" \" !", +'news_err_0' => " .", +'news_err_1' => " .", +'news_err_2' => " E-Mail .", +'news_err_3' => " .", +'news_err_4' => " .", +'news_err_5' => " ", +'news_err_6' => "", +'news_err_7' => ", . , .", +'news_err_9' => " \"\" .", +'news_err_10' => ", E-Mail .", +'news_err_11' => " \"\" .", +'news_err_12' => " , , . , .", +'news_err_13' => "
  • !
  • ", +'news_err_14' => "
  • .
  • ", +'news_err_15' => "
  • JPG GIF.
  • ", +'news_err_16' => "
  • 100 Kb.
  • ", +'news_err_17' => "
  • !
  • ", +'news_err_18' => "
  • !
  • ", +'news_err_19' => "
  • 6 16!
  • ", +'news_err_20' => "
  • !
  • ", +'news_err_21' => "
  • E-Mail !
  • ", +'news_err_22' => "
  • !
  • ", +'news_err_23' => "
  • !
  • ", +'news_err_24' => "
  • !
  • ", +'news_err_25' => "
  • ICQ!
  • ", +'news_err_26' => " .", +'news_err_27' => " , ", +'news_err_28' => " .", +'news_err_29' => " ...", + +'feed_err_1' => "
  • .
  • ", +'feed_err_2' => "
  • E-mail.
  • ", +'feed_err_3' => "
  • E-mail.
  • ", +'feed_err_4' => "
  • .
  • ", +'feed_err_5' => "
  • .
  • ", +'feed_err_6' => " .", +'feed_err_7' => " , ", + +'feed_ok_1' => " ", +'feed_ok_2' => " ", +'feed_ok_3' => " .", +'feed_ok_4' => " .", + +'user_mem' => "", +'user_ed' => "", +'user_re' => "", +'user_adm' => "", +'user_ban' => "", + +'news_next' => " ", +'news_prev' => " ", +'news_site' => "", +'news_iz' => " ", +'news_delcom' => " ? ", +'news_regus' => "
    ! .
    .

    Attention! You can view this text.
    To see the hidden text you must register.
    ", +'news_info_1' => " .", +'news_mail' => " E-Mail", +'news_nomail' => " ", +'news_noamail' => " ", +'news_option' => " ", +'news_addfav' => " ", +'news_minfav' => " ", +'news_addcom' => " ", +'news_pmnew' => " ", + +'pm_err_1' => " , ", +'pm_err_2' => "
  • ", +'pm_err_3' => "
  • ", +'pm_err_4' => "
  • ", +'pm_err_8' => "
  • , .
  • ", +'pm_err_5' => " . , .", +'pm_err_6' => " ", +'pm_err_7' => " ", +'pm_err_9' => " . , .", + 'pm_err_10' => " !", +'pm_sendok' => " .", +'pm_confirm' => " ", +'pm_noch' => " ", +'pm_main' => " ", +'pm_or' => "", +'pm_delok' => " .", +'pm_subj' => " ", +'pm_from' => "", +'pm_date' => "", +'pm_action' => "?", +'pm_del' => "", + +); + +//////////// +// +$langdate = array ( +'January' => "", +'February' => "", +'March' => "", +'April' => "", +'May' => "", +'June' => "", +'July' => "", +'August' => "", +'September' => "", +'October' => "", +'November' => "", +'December' => "", +'Jan' => "", +'Feb' => "", +'Mar' => "", +'Apr' => "", +'Jun' => "", +'Jul' => "", +'Aug' => "", +'Sep' => "", +'Oct' => "", +'Nov' => "", +'Dec' => "", + +'Sunday' => "", +'Monday' => "", +'Tuesday' => "", +'Wednesday' => "", +'Thursday' => "", +'Friday' => "", +'Saturday' => "", + +'Sun' => "", +'Mon' => "", +'Tue' => "", +'Wed' => "", +'Thu' => "", +'Fri' => "", +'Sat' => "", + +); + +# +$f = array('', '', '', '', '', '', '', '', '', '', '', ''); +$r = array('', '', '', '', '', '', '', '', '', '', '', ''); +$langdateshortweekdays = array("","","","","","",""); + +@setlocale(LC_ALL, array("ru_RU.CP1251", "ru_SU.CP1251", "ru_RU.KOI8-r", "ru_RU", "russian", "ru_SU", "ru")); +?> \ No newline at end of file diff --git a/language/Russian/website_repa.lng b/language/Russian/website_repa.lng new file mode 100644 index 0000000..b5aca6e --- /dev/null +++ b/language/Russian/website_repa.lng @@ -0,0 +1,38 @@ + " .", +'repa_off' => " . .", +'repa_user_not_found' => " .", +'repa_error_act' => " .", +'repa_no_com' => " .", +'repa_min_com' => " .", +'repa_stop_otr' => " 0.", +'repa_edit_error' => " . , + -, .", +'repa_history' => " .", +'repa_not_logged' => " . .", +'repa_not_selected' => " .", +'repa_selected_not_found' => " .", +'repa_access_no' => " .", +'gen_status_off' => " ", +'title_repa' => " ", +'title_repa_top' => " ", +'repa_nothing' => " .", +'repa_first_p' => " ", +'repa_last_pa' => " ", +'repa_up' => "", +'repa_down' => "", +'repa_adm' => "", +'change_quest' => " ", +'repa_already' => " ", +'repa_group_stop' => " .", +'repa_user_stop' => " . ", +'repa_bl_msg' => " ", +'repa_days' => " ", +'repa_limit' => " ", +'repa_too_long' => " !", +'repa_msg_changed' => " ", + +); +?> \ No newline at end of file diff --git a/out.php b/out.php new file mode 100644 index 0000000..baae1d2 --- /dev/null +++ b/out.php @@ -0,0 +1,44 @@ +
    Please visit {$_SERVER['HTTP_HOST']}" ); +} + +$tpl = new dle_template; +$tpl->dir = ( ROOT_DIR.'/templates/'); + +$tpl->load_template('redirect.tpl'); +$tpl->set('{title}', $config['short_title']); +$tpl->set('{home_url}', $config['http_home_url']); +$tpl->set( '{url}', $url ); +$tpl->compile( 'redirect' ); +$tpl->clear(); + +echo $tpl->result['redirect']; +die(); + +//@header ( 'Location: ' . $url ); + +//die ( "Link Redirect:

    Please click here." ); +?> \ No newline at end of file diff --git a/rating.php b/rating.php new file mode 100644 index 0000000..7cfa4cc --- /dev/null +++ b/rating.php @@ -0,0 +1,141 @@ + 6) show_error_image("The request can have maximum 6 characters"); + +if($query == 'game'){ + function get_xml($url) + { + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_ENCODING, ""); + curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8"); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 120); + curl_setopt($ch, CURLOPT_TIMEOUT, 120); + + $content = curl_exec($ch); + curl_close($ch); + preg_match("!(.*?)!si", $content, $contens); + $content = $contens[1]; + return $content; + } + + $content = get_xml("http://www.igropoisk.com/rating/{$id}.xml"); + + $pic = imagecreatefrompng(RATING_DIR."game.png"); + $color = ImageColorAllocate($pic, 255, 255, 255); + imagealphablending($pic, true); + + imagestring($pic, 3, 6, 19, $content, $color); + +} elseif ($query == 'film'){ + function subX($dbl){ + switch ($dbl) { + case 1: + return 9; + break; + case 2: + return 8; + break; + case 3: + return 7; + break; + case 4: + return 6; + break; + case 5: + return 5; + break; + case 6: + return 4; + break; + case 7: + return 4; + break; + case 8: + return 3; + break; + case 9: + return 2; + break; + } + } + + $rating = file_get_contents("http://rating.kinopoisk.ru/{$id}.xml"); + + preg_match("/kp_rating num_vote=['\"](.+)['\"]>(.+)(.+) 0) ? imagecreatefrompng(RATING_DIR."rating.png") : imagecreatefrompng(RATING_DIR."kinopoisk.png"); + $star = imagecreatefrompng(RATING_DIR."star.png"); + $color = ImageColorAllocate($pic, 0, 0, 0); + $colorDown = ImageColorAllocate($pic, 120, 120, 120); + imagealphablending($pic, true); + + ($kino_rating > 10) ? $kino_rating = 10 : ""; + imagestring($pic, 3, 5, 19, $kino_rating, $color); + imagestring($pic, 1, 5+(strlen($kino_rating)+1)*6, 23, $kino_votes, $colorDown); + + if($imdb_rating > 0) { + ($imdb_rating > 10) ? $imdb_rating = 10 : ""; + imagestring($pic, 3, 191 - (strlen($imdb_rating)-1) * 7, 1, $imdb_rating, $color); + imagestring($pic, 1, 188 - (strlen($imdb_votes)-2) * 5, 17, $imdb_votes, $colorDown); + + for ($i = 0, $next = 0; $i != (int)$imdb_rating; $i++, $next = $next + 10) { + imagecopy($pic, $star, 109 + $next, 26, 0, 0, imagesx($star), imagesy($star)); + } + $imdb_rating = explode(".", $imdb_rating); + if(is_array($imdb_rating) and $imdb_rating[1] != 0) { + $dbl = (int)$imdb_rating[1]; + imagecopy($pic, $star, 109 + $next, 26, 0, 0, imagesx($star) - subX($dbl), imagesy($star)); + } + } +} + +imagesavealpha($pic, true); +imagepng($pic); +imagedestroy($pic); +$cache = ob_get_contents(); +ob_end_clean(); +echo $cache; +$fp = @fopen ($file, "w"); +@fwrite($fp, $cache); +@fclose($fp); +?> \ No newline at end of file diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..7d74417 --- /dev/null +++ b/robots.txt @@ -0,0 +1,31 @@ +User-agent: * +Allow: /$ +Allow: /index.php$ +Allow: /sitemap* +Allow: /rss* +Allow: /*.html +Allow: /news/* +Allow: /films/* +Allow: /video/* +Allow: /music/* +Allow: /games/* +Allow: /soft/* +Allow: /library/* +Allow: /wallpapers/* +Allow: /forum/$ +Allow: /forum/forum_ +Allow: /forum/topic_ +Disallow: / +Crawl-delay: 0.5 +Host: files-sib.net +Sitemap: http://files-sib.net/sitemap.xml + +User-agent: Adsbot-Google +User-agent: Googlebot-Image +User-agent: Googlebot-Mobile +User-agent: Mediapartners-Google +User-agent: msnbot +User-agent: msnbot-media +User-agent: Slurp +User-agent: Yahoo-MMCrawler +Disallow: / \ No newline at end of file diff --git a/schema.sql b/schema.sql new file mode 100644 index 0000000..8523571 --- /dev/null +++ b/schema.sql @@ -0,0 +1,917 @@ +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES cp1251 */; + +-- -------------------------------------------------------- + +-- +-- `cms_banned` +-- + +CREATE TABLE IF NOT EXISTS `cms_banned` ( + `id` smallint(5) NOT NULL AUTO_INCREMENT, + `users_id` mediumint(8) NOT NULL DEFAULT '0', + `descr` text NOT NULL, + `date` varchar(15) NOT NULL DEFAULT '', + `days` smallint(4) NOT NULL DEFAULT '0', + `ip` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `user_id` (`users_id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_category` +-- + +CREATE TABLE IF NOT EXISTS `cms_category` ( + `id` smallint(5) NOT NULL AUTO_INCREMENT, + `parentid` smallint(5) NOT NULL DEFAULT '0', + `posi` smallint(5) NOT NULL DEFAULT '1', + `name` varchar(50) NOT NULL DEFAULT '', + `alt_name` varchar(50) NOT NULL DEFAULT '', + `descr` varchar(200) NOT NULL DEFAULT '', + `keywords` text NOT NULL, + `news_sort` varchar(10) NOT NULL DEFAULT '', + `news_msort` varchar(4) NOT NULL DEFAULT '', + `news_number` smallint(5) NOT NULL DEFAULT '0', + `metatitle` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_chat` +-- + +CREATE TABLE IF NOT EXISTS `cms_chat` ( + `id` int(5) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL DEFAULT '', + `message` text NOT NULL, + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `ip` varchar(16) NOT NULL DEFAULT '', + `user_id` mediumint(8) NOT NULL DEFAULT '0', + `mgroup` tinyint(2) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_comments` +-- + +CREATE TABLE IF NOT EXISTS `cms_comments` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `post_id` int(11) NOT NULL DEFAULT '0', + `user_id` mediumint(8) NOT NULL DEFAULT '0', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `autor` varchar(40) NOT NULL DEFAULT '', + `email` varchar(40) NOT NULL DEFAULT '', + `text` text NOT NULL, + `ip` varchar(16) NOT NULL DEFAULT '', + `is_register` tinyint(1) NOT NULL DEFAULT '0', + `rating` smallint(5) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `user_id` (`user_id`), + FULLTEXT KEY `text` (`text`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_covers` +-- + +CREATE TABLE IF NOT EXISTS `cms_covers` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `newsid` int(10) NOT NULL, + `link` varchar(1000) NOT NULL, + `thumb` varchar(1000) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_email` +-- + +CREATE TABLE IF NOT EXISTS `cms_email` ( + `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(10) NOT NULL DEFAULT '', + `template` text NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_files` +-- + +CREATE TABLE IF NOT EXISTS `cms_files` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `news_id` int(10) NOT NULL DEFAULT '0', + `name` varchar(250) NOT NULL DEFAULT '', + `onserver` varchar(250) NOT NULL DEFAULT '', + `author` varchar(40) NOT NULL DEFAULT '', + `date` varchar(15) NOT NULL DEFAULT '', + `dcount` smallint(5) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `news_id` (`news_id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_category` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_category` ( + `sid` int(11) NOT NULL AUTO_INCREMENT, + `cat_name` varchar(128) NOT NULL DEFAULT '', + `posi` tinyint(3) NOT NULL DEFAULT '0', + KEY `sid` (`sid`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_email` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_email` ( + `id` int(11) NOT NULL DEFAULT '0', + `name` varchar(40) NOT NULL DEFAULT '', + `template` text NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_files` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_files` ( + `file_id` int(11) NOT NULL AUTO_INCREMENT, + `file_type` varchar(10) NOT NULL DEFAULT '', + `forum_id` int(11) NOT NULL DEFAULT '0', + `topic_id` int(11) NOT NULL DEFAULT '0', + `post_id` int(11) NOT NULL DEFAULT '0', + `file_attach` tinyint(1) NOT NULL DEFAULT '0', + `file_name` varchar(250) NOT NULL DEFAULT '', + `onserver` varchar(250) NOT NULL DEFAULT '', + `file_author` varchar(40) NOT NULL DEFAULT '', + `file_date` int(10) NOT NULL DEFAULT '0', + `file_size` int(11) NOT NULL DEFAULT '0', + `dcount` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`file_id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_forums` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_forums` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `parentid` int(11) NOT NULL DEFAULT '0', + `main_id` int(11) NOT NULL DEFAULT '0', + `topics` mediumint(6) NOT NULL DEFAULT '0', + `posts` mediumint(6) NOT NULL DEFAULT '0', + `name` varchar(128) NOT NULL DEFAULT '', + `description` text NOT NULL, + `position` tinyint(3) NOT NULL DEFAULT '0', + `status` tinyint(1) NOT NULL DEFAULT '1', + `access_read` varchar(150) NOT NULL DEFAULT '', + `access_write` varchar(150) NOT NULL DEFAULT '', + `access_mod` varchar(150) NOT NULL DEFAULT '', + `access_topic` varchar(150) NOT NULL DEFAULT '', + `access_upload` varchar(150) NOT NULL DEFAULT '', + `access_download` varchar(150) NOT NULL DEFAULT '', + `f_last_tid` smallint(5) NOT NULL DEFAULT '0', + `f_last_title` varchar(70) NOT NULL DEFAULT '', + `f_last_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `f_last_poster_name` varchar(40) NOT NULL DEFAULT '', + `password` varchar(32) NOT NULL DEFAULT '', + `rules_title` varchar(128) NOT NULL DEFAULT '', + `rules` text NOT NULL, + `icon` varchar(40) NOT NULL DEFAULT '', + `moderators` varchar(150) NOT NULL DEFAULT '', + `postcount` tinyint(1) NOT NULL DEFAULT '1', + `fixpost` tinyint(1) NOT NULL DEFAULT '0', + `last_post_id` int(11) NOT NULL DEFAULT '0', + `banner` text NOT NULL, + `q_reply` tinyint(1) NOT NULL DEFAULT '1', + `i_edit` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_moderators` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_moderators` ( + `mid` mediumint(8) NOT NULL AUTO_INCREMENT, + `forum_id` int(11) NOT NULL DEFAULT '0', + `member_name` varchar(32) NOT NULL DEFAULT '', + `member_id` mediumint(8) NOT NULL DEFAULT '0', + `edit_post` tinyint(1) DEFAULT NULL, + `edit_topic` tinyint(1) DEFAULT NULL, + `delete_post` tinyint(1) DEFAULT NULL, + `delete_topic` tinyint(1) DEFAULT NULL, + `open_topic` tinyint(1) NOT NULL DEFAULT '0', + `close_topic` tinyint(1) DEFAULT NULL, + `mass_prune` tinyint(1) DEFAULT NULL, + `move_topic` tinyint(1) DEFAULT NULL, + `pin_topic` tinyint(1) DEFAULT NULL, + `unpin_topic` tinyint(1) DEFAULT NULL, + `is_group` tinyint(1) DEFAULT '0', + `group_id` smallint(3) DEFAULT NULL, + `combining_post` tinyint(1) NOT NULL DEFAULT '0', + `move_post` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`mid`), + KEY `forum_id` (`forum_id`), + KEY `group_id` (`group_id`), + KEY `member_id` (`member_id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_poll_log` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_poll_log` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `topic_id` int(10) unsigned NOT NULL DEFAULT '0', + `member` varchar(30) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `news_id` (`topic_id`,`member`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_posts` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_posts` ( + `pid` int(11) NOT NULL AUTO_INCREMENT, + `topic_id` int(11) NOT NULL DEFAULT '0', + `post_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `post_author` varchar(40) NOT NULL DEFAULT '', + `post_text` text NOT NULL, + `post_ip` varchar(16) NOT NULL DEFAULT '', + `is_register` tinyint(1) NOT NULL DEFAULT '0', + `e_mail` varchar(40) NOT NULL DEFAULT '', + `edit_user` varchar(40) NOT NULL DEFAULT '0', + `edit_time` int(10) NOT NULL DEFAULT '0', + `hidden` tinyint(1) NOT NULL DEFAULT '0', + `is_count` tinyint(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`pid`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_sessions` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_sessions` ( + `id` varchar(60) NOT NULL DEFAULT '0', + `member_name` varchar(64) NOT NULL DEFAULT '', + `user_group` int(11) NOT NULL DEFAULT '5', + `member_id` mediumint(8) NOT NULL DEFAULT '0', + `ip` varchar(16) NOT NULL DEFAULT '', + `browser` varchar(200) NOT NULL DEFAULT '', + `running_time` int(10) NOT NULL DEFAULT '0', + `location` varchar(40) NOT NULL DEFAULT '', + `act_index` int(10) NOT NULL DEFAULT '0', + `act_forum` int(10) NOT NULL DEFAULT '0', + `act_topic` int(10) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `act_topic` (`act_topic`), + KEY `act_forum` (`act_forum`), + KEY `act_index` (`act_index`), + KEY `running_time` (`running_time`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_subscription` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_subscription` ( + `sid` int(11) NOT NULL AUTO_INCREMENT, + `user_id` mediumint(8) NOT NULL DEFAULT '0', + `topic_id` int(10) NOT NULL DEFAULT '0', + PRIMARY KEY (`sid`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_titles` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_titles` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `posts` int(11) NOT NULL DEFAULT '0', + `title` varchar(128) NOT NULL DEFAULT '', + `pips` varchar(128) NOT NULL DEFAULT '', + KEY `id` (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_topics` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_topics` ( + `tid` int(11) NOT NULL AUTO_INCREMENT, + `forum_id` int(11) NOT NULL DEFAULT '0', + `title` varchar(70) NOT NULL DEFAULT '', + `topic_descr` varchar(70) NOT NULL DEFAULT '', + `post` int(11) NOT NULL DEFAULT '0', + `views` int(11) NOT NULL DEFAULT '0', + `author_topic` varchar(40) NOT NULL DEFAULT '', + `start_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_poster_name` varchar(40) NOT NULL DEFAULT '', + `topic_status` int(1) NOT NULL DEFAULT '0', + `hidden` int(1) NOT NULL DEFAULT '0', + `fixed` int(1) NOT NULL DEFAULT '1', + `poll_title` varchar(200) NOT NULL DEFAULT '', + `frage` varchar(200) NOT NULL DEFAULT '', + `poll_body` text NOT NULL, + `poll_count` mediumint(8) NOT NULL DEFAULT '0', + `answer` varchar(150) NOT NULL DEFAULT '', + `multiple` tinyint(1) NOT NULL DEFAULT '0', + `meta_descr` varchar(200) DEFAULT NULL, + `meta_keywords` text, + `first_post` int(11) NOT NULL DEFAULT '0', + `last_post_id` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`tid`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_forum_views` +-- + +CREATE TABLE IF NOT EXISTS `cms_forum_views` ( + `topic_id` int(11) NOT NULL DEFAULT '0', + `forum_id` int(11) NOT NULL DEFAULT '0', + `user_id` mediumint(8) NOT NULL DEFAULT '0', + `time` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=cp1251; + +-- -------------------------------------------------------- + +-- +-- `cms_images` +-- + +CREATE TABLE IF NOT EXISTS `cms_images` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `images` text NOT NULL, + `news_id` int(10) NOT NULL DEFAULT '0', + `author` varchar(40) NOT NULL DEFAULT '', + `date` varchar(15) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `author` (`author`), + KEY `news_id` (`news_id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_lostdb` +-- + +CREATE TABLE IF NOT EXISTS `cms_lostdb` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `lostname` mediumint(8) NOT NULL DEFAULT '0', + `lostid` varchar(40) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `lostid` (`lostid`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_online` +-- + +CREATE TABLE IF NOT EXISTS `cms_online` ( + `uid` int(10) unsigned NOT NULL DEFAULT '0', + `session` char(32) NOT NULL, + `lastdate` int(10) unsigned NOT NULL DEFAULT '0', + `useragent` char(255) NOT NULL, + `ip` char(15) DEFAULT NULL, + PRIMARY KEY (`session`), + KEY `idx` (`uid`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251; + +-- -------------------------------------------------------- + +-- +-- `cms_pm` +-- + +CREATE TABLE IF NOT EXISTS `cms_pm` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `subj` varchar(255) NOT NULL DEFAULT '', + `text` text NOT NULL, + `user` mediumint(8) NOT NULL DEFAULT '0', + `user_from` varchar(50) NOT NULL DEFAULT '', + `date` varchar(15) NOT NULL DEFAULT '', + `pm_read` char(3) NOT NULL DEFAULT '', + `folder` varchar(10) NOT NULL DEFAULT '', + `reply` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `folder` (`folder`), + KEY `user` (`user`), + KEY `user_from` (`user_from`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_poll` +-- + +CREATE TABLE IF NOT EXISTS `cms_poll` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `news_id` int(10) unsigned NOT NULL DEFAULT '0', + `title` varchar(200) NOT NULL DEFAULT '', + `frage` varchar(200) NOT NULL DEFAULT '', + `body` text NOT NULL, + `votes` mediumint(8) NOT NULL DEFAULT '0', + `multiple` tinyint(1) NOT NULL DEFAULT '0', + `answer` varchar(150) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `news_id` (`news_id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_poll_log` +-- + +CREATE TABLE IF NOT EXISTS `cms_poll_log` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `news_id` int(10) unsigned NOT NULL DEFAULT '0', + `member` varchar(30) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `news_id` (`news_id`,`member`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_post` +-- + +CREATE TABLE IF NOT EXISTS `cms_post` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `autor` varchar(40) NOT NULL DEFAULT '', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `short_story` text NOT NULL, + `full_story` text NOT NULL, + `title` varchar(255) NOT NULL DEFAULT '', + `descr` varchar(200) NOT NULL DEFAULT '', + `keywords` text NOT NULL, + `category` varchar(200) NOT NULL DEFAULT '0', + `alt_name` varchar(200) NOT NULL DEFAULT '', + `comm_num` mediumint(8) unsigned NOT NULL DEFAULT '0', + `allow_comm` tinyint(1) NOT NULL DEFAULT '1', + `allow_main` tinyint(1) unsigned NOT NULL DEFAULT '1', + `allow_rate` tinyint(1) unsigned NOT NULL DEFAULT '1', + `approve` tinyint(1) NOT NULL DEFAULT '0', + `fixed` tinyint(1) NOT NULL DEFAULT '0', + `rating` smallint(5) NOT NULL DEFAULT '0', + `news_read` mediumint(8) unsigned NOT NULL DEFAULT '0', + `votes` tinyint(1) NOT NULL DEFAULT '0', + `access` varchar(150) NOT NULL DEFAULT '', + `remote_addr` varchar(255) NOT NULL, + `editdate` varchar(15) NOT NULL DEFAULT '', + `tags` varchar(255) NOT NULL DEFAULT '', + `metatitle` varchar(255) NOT NULL DEFAULT '', + `news_tid` smallint(5) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `autor` (`autor`), + KEY `alt_name` (`alt_name`), + KEY `category` (`category`), + KEY `approve` (`approve`), + KEY `allow_main` (`allow_main`), + KEY `date` (`date`), + KEY `comm_num` (`comm_num`), + KEY `tags` (`tags`), + FULLTEXT KEY `short_story` (`short_story`,`title`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_rate` +-- + +CREATE TABLE IF NOT EXISTS `cms_rate` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `type_id` int(10) NOT NULL DEFAULT '0', + `member` varchar(40) NOT NULL DEFAULT '', + `rating` int(1) NOT NULL DEFAULT '0', + `type` int(1) NOT NULL DEFAULT '1', + `date` varchar(15) NOT NULL, + `ip` varchar(16) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `news_id` (`type_id`), + KEY `member` (`member`), + KEY `ip` (`ip`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_reputation` +-- + +CREATE TABLE IF NOT EXISTS `cms_reputation` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `how` tinytext NOT NULL, + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `author` varchar(40) NOT NULL DEFAULT '', + `komu` varchar(40) NOT NULL DEFAULT '', + `text` text NOT NULL, + `url_page` text NOT NULL, + PRIMARY KEY (`id`), + FULLTEXT KEY `text` (`text`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_static` +-- + +CREATE TABLE IF NOT EXISTS `cms_static` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL DEFAULT '', + `descr` varchar(255) NOT NULL DEFAULT '', + `template` text NOT NULL, + `allow_br` tinyint(1) NOT NULL DEFAULT '0', + `grouplevel` varchar(100) NOT NULL DEFAULT 'all', + `metadescr` varchar(200) NOT NULL DEFAULT '', + `metakeys` text NOT NULL, + `views` mediumint(8) NOT NULL DEFAULT '0', + `date` varchar(15) NOT NULL DEFAULT '', + `metatitle` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `name` (`name`), + FULLTEXT KEY `template` (`template`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_static_files` +-- + +CREATE TABLE IF NOT EXISTS `cms_static_files` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `static_id` mediumint(8) NOT NULL DEFAULT '0', + `author` varchar(40) NOT NULL DEFAULT '', + `date` varchar(50) NOT NULL DEFAULT '', + `name` varchar(255) NOT NULL DEFAULT '', + `onserver` varchar(255) NOT NULL DEFAULT '', + `dcount` smallint(5) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `static_id` (`static_id`), + KEY `onserver` (`onserver`), + KEY `author` (`author`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_subscribe` +-- + +CREATE TABLE IF NOT EXISTS `cms_subscribe` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL DEFAULT '0', + `name` varchar(40) NOT NULL DEFAULT '', + `email` varchar(50) NOT NULL DEFAULT '', + `news_id` int(11) NOT NULL DEFAULT '0', + `hash` varchar(32) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `news_id` (`news_id`), + KEY `user_id` (`user_id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_table` +-- + +CREATE TABLE IF NOT EXISTS `cms_table` ( + `id` int(6) NOT NULL AUTO_INCREMENT, + `date` varchar(15) NOT NULL DEFAULT '', + `autor` varchar(40) NOT NULL DEFAULT '', + `runame` varchar(40) NOT NULL DEFAULT '', + `enname` varchar(40) NOT NULL DEFAULT '', + `fileyear` varchar(4) NOT NULL DEFAULT '0000', + `category` varchar(20) NOT NULL DEFAULT '', + `answer` text, + `status` tinyint(1) NOT NULL DEFAULT '0', + `editor` varchar(40) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `id` (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_tags` +-- + +CREATE TABLE IF NOT EXISTS `cms_tags` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `news_id` int(11) NOT NULL DEFAULT '0', + `tag` varchar(100) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `news_id` (`news_id`), + KEY `tag` (`tag`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_torrents` +-- + +CREATE TABLE IF NOT EXISTS `cms_torrents` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `news_id` int(10) NOT NULL DEFAULT '0', + `name` varchar(250) NOT NULL DEFAULT '', + `onserver` varchar(250) NOT NULL DEFAULT '', + `author` varchar(40) NOT NULL DEFAULT '', + `dcount` smallint(5) NOT NULL, + `info_hash` blob NOT NULL, + `size` bigint(20) NOT NULL, + `gold` tinyint(4) NOT NULL DEFAULT '0', + `leechers` int(11) NOT NULL DEFAULT '0', + `seeders` int(11) NOT NULL DEFAULT '0', + `completed` int(11) NOT NULL DEFAULT '0', + `flags` int(11) NOT NULL DEFAULT '0', + `mtime` int(11) NOT NULL, + `ctime` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `news_id` (`news_id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_usergroups` +-- + +CREATE TABLE IF NOT EXISTS `cms_usergroups` ( + `id` smallint(5) NOT NULL AUTO_INCREMENT, + `group_name` varchar(32) NOT NULL DEFAULT '', + `colour` varchar(40) NOT NULL, + `allow_cats` text NOT NULL, + `allow_adds` tinyint(1) NOT NULL DEFAULT '1', + `cat_add` text NOT NULL, + `allow_admin` tinyint(1) NOT NULL DEFAULT '0', + `allow_addc` tinyint(1) NOT NULL DEFAULT '0', + `allow_editc` tinyint(1) NOT NULL DEFAULT '0', + `allow_delc` tinyint(1) NOT NULL DEFAULT '0', + `edit_allc` tinyint(1) NOT NULL DEFAULT '0', + `del_allc` tinyint(1) NOT NULL DEFAULT '0', + `moderation` tinyint(1) NOT NULL DEFAULT '0', + `allow_all_edit` tinyint(1) NOT NULL DEFAULT '0', + `allow_edit` tinyint(1) NOT NULL DEFAULT '0', + `allow_pm` tinyint(1) NOT NULL DEFAULT '0', + `max_foto` varchar(10) NOT NULL DEFAULT '', + `allow_files` tinyint(1) NOT NULL DEFAULT '1', + `allow_hide` tinyint(1) NOT NULL DEFAULT '1', + `allow_short` tinyint(1) NOT NULL DEFAULT '0', + `allow_fixed` tinyint(1) NOT NULL DEFAULT '0', + `allow_feed` tinyint(1) NOT NULL DEFAULT '1', + `allow_search` tinyint(1) NOT NULL DEFAULT '1', + `allow_poll` tinyint(1) NOT NULL DEFAULT '1', + `allow_main` tinyint(1) NOT NULL DEFAULT '1', + `allow_rating` tinyint(1) NOT NULL DEFAULT '1', + `allow_offline` tinyint(1) NOT NULL DEFAULT '0', + `allow_image_upload` tinyint(1) NOT NULL DEFAULT '0', + `allow_file_upload` tinyint(1) NOT NULL DEFAULT '0', + `allow_tor_upload` tinyint(1) NOT NULL DEFAULT '0', + `allow_signature` tinyint(1) NOT NULL DEFAULT '0', + `allow_url` tinyint(1) NOT NULL DEFAULT '1', + `allow_image` tinyint(1) NOT NULL DEFAULT '0', + `max_signature` smallint(6) NOT NULL DEFAULT '0', + `max_info` smallint(6) NOT NULL DEFAULT '0', + `forum_post_edit` tinyint(1) NOT NULL DEFAULT '0', + `forum_post_del` tinyint(1) NOT NULL DEFAULT '0', + `forum_topic_set` tinyint(1) NOT NULL DEFAULT '0', + `forum_topic_edit` tinyint(1) NOT NULL DEFAULT '0', + `forum_topic_del` tinyint(1) NOT NULL DEFAULT '0', + `admin_addnews` tinyint(1) NOT NULL DEFAULT '0', + `admin_editnews` tinyint(1) NOT NULL DEFAULT '0', + `admin_categories` tinyint(1) NOT NULL DEFAULT '0', + `admin_editusers` tinyint(1) NOT NULL DEFAULT '0', + `admin_wordfilter` tinyint(1) NOT NULL DEFAULT '0', + `admin_static` tinyint(1) NOT NULL DEFAULT '0', + `admin_blockip` tinyint(1) NOT NULL DEFAULT '0', + `admin_iptools` tinyint(1) NOT NULL DEFAULT '0', + `admin_googlemap` tinyint(1) NOT NULL DEFAULT '0', + `admin_table` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_users` +-- + +CREATE TABLE IF NOT EXISTS `cms_users` ( + `email` varchar(50) NOT NULL DEFAULT '', + `password` varchar(32) NOT NULL DEFAULT '', + `name` varchar(40) NOT NULL DEFAULT '', + `user_id` mediumint(8) NOT NULL AUTO_INCREMENT, + `time_zone` int(11) NOT NULL DEFAULT '0', + `news_num` smallint(6) NOT NULL DEFAULT '0', + `comm_num` mediumint(8) NOT NULL DEFAULT '0', + `user_group` smallint(5) NOT NULL DEFAULT '4', + `status` varchar(50) NOT NULL, + `lastdate` varchar(20) DEFAULT NULL, + `reg_date` varchar(20) DEFAULT NULL, + `banned` varchar(5) NOT NULL DEFAULT '', + `allow_mail` tinyint(1) NOT NULL DEFAULT '1', + `info` text NOT NULL, + `signature` text NOT NULL, + `foto` varchar(30) NOT NULL DEFAULT '', + `fullname` varchar(100) NOT NULL DEFAULT '', + `land` varchar(100) NOT NULL DEFAULT '', + `icq` varchar(20) NOT NULL DEFAULT '', + `skype` varchar(32) NOT NULL, + `favorites` text NOT NULL, + `pm_all` smallint(5) NOT NULL DEFAULT '0', + `pm_unread` smallint(5) NOT NULL DEFAULT '0', + `allowed_ip` varchar(255) NOT NULL DEFAULT '', + `hash` varchar(32) NOT NULL DEFAULT '', + `logged_ip` varchar(16) NOT NULL DEFAULT '', + `restricted` tinyint(1) NOT NULL DEFAULT '0', + `restricted_days` smallint(4) NOT NULL DEFAULT '0', + `restricted_date` varchar(15) NOT NULL DEFAULT '', + `mail_lc` tinyint(1) NOT NULL DEFAULT '1', + `birthday` text NOT NULL, + `sex` int(1) NOT NULL, + `repa` mediumint(8) DEFAULT '0', + `repa_mod` varchar(20) NOT NULL DEFAULT '0|0', + `repa_off` tinyint(1) DEFAULT '0', + `r_freeze` varchar(5) NOT NULL, + `photo` varchar(30) NOT NULL, + `can_leech` tinyint(4) NOT NULL DEFAULT '1', + `wait_time` int(11) NOT NULL DEFAULT '0', + `torrent_pass_version` int(11) NOT NULL, + `downloaded` bigint(20) unsigned NOT NULL DEFAULT '0', + `uploaded` bigint(20) unsigned NOT NULL DEFAULT '0', + `forum_post` smallint(5) NOT NULL DEFAULT '0', + `forum_update` varchar(20) NOT NULL DEFAULT '0', + `forum_rank` varchar(40) NOT NULL DEFAULT '0', + `forum_pips` smallint(2) NOT NULL DEFAULT '0', + `forum_last` varchar(20) NOT NULL DEFAULT '0', + `forum_time` varchar(20) NOT NULL DEFAULT '0', + PRIMARY KEY (`user_id`), + UNIQUE KEY `name` (`name`), + UNIQUE KEY `email` (`email`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ; + +-- -------------------------------------------------------- + +-- +-- `cms_users_friends` +-- + +CREATE TABLE IF NOT EXISTS `cms_users_friends` ( + `user_id` mediumint(9) NOT NULL DEFAULT '0', + `friend_id` mediumint(9) NOT NULL DEFAULT '0', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `approve` tinyint(1) NOT NULL DEFAULT '0', + `porder` mediumint(2) NOT NULL DEFAULT '0', + KEY `approve` (`approve`), + KEY `user_id` (`user_id`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251; + +-- -------------------------------------------------------- + +-- +-- `xbt_config` +-- + +CREATE TABLE IF NOT EXISTS `xbt_config` ( + `name` varchar(255) NOT NULL, + `value` varchar(255) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=cp1251; + +-- +-- `xbt_config` +-- + +INSERT INTO `xbt_config` (`name`, `value`) VALUES +('announce_interval', '1800'), +('anonymous_announce', '1'), +('vip_group', '6'), +('anonymous_scrape', '0'), +('auto_register', '0'), +('clean_up_interval', '300'), +('column_files_completed', 'completed'), +('column_files_fid', 'id'), +('column_files_leechers', 'leechers'), +('column_files_seeders', 'seeders'), +('column_users_uid', 'user_id'), +('daemon', '1'), +('debug', '0'), +('full_scrape', '0'), +('freeday', '0'), +('gzip_scrape', '1'), +('listen_port', '2710'), +('log_access', '0'), +('log_announce', '0'), +('log_scrape', '0'), +('offline_message', ''), +('pid_file', '/var/run/xbt.pid'), +('query_log', ''), +('read_config_interval', '60'), +('read_db_interval', '60'), +('redirect_url', 'http://files-sib.net'), +('scrape_interval', '0'), +('table_files', 'cms_torrents'), +('table_users', 'cms_users'), +('write_db_interval', '15'), +('table_announce_log', 'xbt_announce_log'), +('cheaters', '0'), +('cheater_speed', '8388608'), +('freedaystart', '0'), +('freedaystop', '0'), +('torrent_pass_private_key', ''); + +-- -------------------------------------------------------- + +-- +-- `xbt_deny_from_hosts` +-- + +CREATE TABLE IF NOT EXISTS `xbt_deny_from_hosts` ( + `begin` int(10) unsigned NOT NULL, + `end` int(10) unsigned NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=cp1251; + +-- -------------------------------------------------------- + +-- +-- `xbt_files_users` +-- + +CREATE TABLE IF NOT EXISTS `xbt_files_users` ( + `fid` int(11) NOT NULL, + `uid` int(11) NOT NULL, + `active` tinyint(4) NOT NULL, + `announced` int(11) NOT NULL, + `completed` int(11) NOT NULL, + `downloaded` bigint(20) unsigned NOT NULL, + `left` bigint(20) unsigned NOT NULL, + `uploaded` bigint(20) unsigned NOT NULL, + `mtime` int(11) NOT NULL, + `timespent` int(11) NOT NULL, + `down_speed` int(11) NOT NULL, + `up_speed` int(11) NOT NULL, + `ipa` varchar(255) NOT NULL, + `port` int(11) NOT NULL, + `downloadedz` bigint(11) unsigned NOT NULL, + `uploadedz` bigint(11) unsigned NOT NULL, + UNIQUE KEY `fid` (`fid`,`uid`), + KEY `uid` (`uid`) +) ENGINE=MyISAM DEFAULT CHARSET=cp1251; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/system/ajax/addcomments.php b/system/ajax/addcomments.php new file mode 100644 index 0000000..892fa6f --- /dev/null +++ b/system/ajax/addcomments.php @@ -0,0 +1,75 @@ +get( "usergroup" ); +if( ! $user_group ) { + $user_group = array (); + $db->query( "SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC" ); + while ( $row = $db->get_row() ) {$user_group[$row['id']] = array (); + foreach ( $row as $key => $value ) {$user_group[$row['id']][$key] = stripslashes($value);} + } + $cache->set( "usergroup", $user_group ); + $db->free(); +} + +@include_once ROOT_DIR . '/language/' . $config['langs'] . '/website.lng'; +$config['charset'] = ($lang['charset'] != '') ? $lang['charset'] : $config['charset']; + +require_once SYSTEM_DIR . '/modules/sitelogin.php'; + +$tpl = new dle_template( ); +$tpl->dir = ROOT_DIR . '/templates/' . $_REQUEST['skin']; +define( 'TEMPLATE_DIR', $tpl->dir ); +$ajax_adds = true; + +$_POST['name'] = convert_unicode( $_POST['name'], $config['charset'] ); +$_POST['mail'] = convert_unicode( $_POST['mail'], $config['charset'] ); +$_POST['comments'] = convert_unicode( $_POST['comments'], $config['charset'] ); + +require_once SYSTEM_DIR . '/modules/addcomments.php'; + +if( $CN_HALT != TRUE ) { + include_once SYSTEM_DIR . '/classes/comments.class.php'; + $comments = new Comments( $db, 1, 1 ); + $comments->query = "SELECT " . PREFIX . "_comments.id, post_id, " . PREFIX . "_comments.user_id, date, autor as gast_name, " . PREFIX . "_comments.email as gast_email, text, ip, is_register, name, rating, " . USERPREFIX . "_users.email, news_num, comm_num, user_group, signature, foto, repa, repa_mod, repa_off FROM " . PREFIX . "_comments LEFT JOIN " . USERPREFIX . "_users ON " . PREFIX . "_comments.user_id=" . USERPREFIX . "_users.user_id WHERE " . PREFIX . "_comments.post_id = '$post_id' order by id DESC"; + $comments->build_comments('ajax'); +} $clear_value = "form.comments.value = '';"; + +if( $CN_HALT ) { + $stop = implode( '

    ', $stop ); + $tpl->result['content'] = ""; +} else { + $tpl->result['content'] = "
    ".$tpl->result['content']."
    "; + $tpl->result['content'] .= << + var timeval = new Date().getTime(); + var form = document.getElementById('dle-comments-form'); + {$clear_value} + +HTML; +} + +$tpl->result['content'] = str_replace( '{THEME}', $config['http_home_url'] . 'templates/' . $_REQUEST['skin'], $tpl->result['content'] ); +@header( "Content-type: text/html; charset=" . $config['charset'] ); +echo $tpl->result['content']; +?> \ No newline at end of file diff --git a/system/ajax/bbcode.php b/system/ajax/bbcode.php new file mode 100644 index 0000000..5f5b3ad --- /dev/null +++ b/system/ajax/bbcode.php @@ -0,0 +1,134 @@ + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
     
    +
    +
    +
    + +HTML; + +} +else { + + $addform = "document.ajaxcomments".$id; + $startform = "dleeditcomments".$id; + + if ($user_group[$member_id['user_group']]['allow_url']) + { + $url_link = "
    "; + } + else {$url_link = "";} + + if ($user_group[$member_id['user_group']]['allow_image']) + { + $image_link = "
    "; + } + else $image_link = ""; + +$code = << +
    +
    +
    +
    +
    +
    +
    +
    +
    +{$url_link} +{$image_link} +
    +
    +
    +
    +
    +
    +
    + + +HTML; +} + + +$script_code = @file_get_contents(SYSTEM_DIR."/ajax/bbcodes.js"); +$script_code .= << + +HTML; + + +$bb_code = << +C2%YvAszFo=l`25N<*%bNSe@#t314y$uqT zdmGA9InrE)%6yNVYu!iE1yo#mMNPkqJJ$O=s2z(YhqG9n)ZNkaD=K|$i{93UACdUB zsBy%?B5jY-R#D={%m#J}3VdRxpnGZAYe5m40``f3eMlouk~k^a=GBRK01P|m11bwZ z7%x^#@XV{UBh53@1$$8e1~%MW#JZo(0sovV=R#gTK!75$7f6e1U;TiUm6*QdtdA;QRZlAPs(_O(Aest{IZ)VHXIbymiGN)9$L(K@rKJl!+;U)XVegZl zP?2!Z&0tqwVGa~!GVW6JoeGrQO*;`N(>lC*$`ufT08=MjluBz}rMZ?TTu`{xf`Vqp z>U`fC8!s^Vx0|J`U8PmAlt5v1!fhc@fmNpZ{RO*fTnr82a2kLVOFShvkH0rE{RTGJ zQt2!);|a8QeRBdRs3)6f(>9F$4o98g5%^~${uzaU70p1H_9D=`ZtP}#IGlc8=o7uK zW)qd^nXYUin0^nwL+L$^Y{H%X0KV(fXH?jqexxR*KF&jH;44vU34Jn}p2I2E!dJp?3EdS-Q(YT$*lg@NVU7}x zzu7ogG`gia4XejD=pdqruD&r5OsVaYo0LS8=EzJ;HYJ)8?z*>&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this->get_categories(); + $map .= $this->get_news(); + $map .= $this->get_forum(); + $map .= ""; + return $map; + } + + function build_index( $count ) { + $map = "\n\n"; + $lastmod = date( "Y-m-d" ); + $map .= "\n{$this->home}uploads/sitemap1.xml\n{$lastmod}\n\n"; + for ($i =0; $i < $count; $i++) { + $t = $i+2; + $map .= "\n{$this->home}uploads/sitemap{$t}.xml\n{$lastmod}\n\n"; + } + $map .= ""; + return $map; + } + + function build_stat() { + $map = "\n\n"; + $map .= $this->get_static(); + $map .= $this->get_categories(); + $map .= ""; + return $map; + } + + function build_map_news( $n ) { + $map = "\n\n"; + $map .= $this->get_news( $n ); + $map .= ""; + return $map; + } + + function get_categories() { + global $db, $cache; + $cat_info = $cache->get( "category" ); + $this->priority = $this->cat_priority; + if( ! is_array( $cat_info ) ) { + $cat_info = array (); + $db->query( "SELECT * FROM " . PREFIX . "_category ORDER BY posi ASC" ); + while ( $row = $db->get_row() ) { + $cat_info[$row['id']] = array (); + foreach ( $row as $key => $value ) { + $cat_info[$row['id']][$key] = $value; + } + } + $cache->set( "category", $cat_info ); + $db->free(); + } + + $xml = ""; + $lastmod = date( "Y-m-d" ); + + foreach ( $cat_info as $cats ) { + $loc = $this->home . $this->get_url( $cats[id], $cat_info ) . "/"; + $xml .= $this->get_xml( $loc, $lastmod ); + } + return $xml; + } + + function get_news($page = false) { + global $db, $config; + + $xml = ""; + $this->priority = $this->news_priority; + + if ( $page ) { + $page = $page - 1; + $page = $page * 40000; + $this->limit = " LIMIT {$page},40000"; + } else { + if( $this->limit < 1 ) $this->limit = false; + if( $this->limit ) { + $this->limit = " LIMIT 0," . $this->limit; + } else { + $this->limit = ""; + } + } + + $thisdate = date( "Y-m-d H:i:s", (time() + ($config['date_adjust'] * 60)) ); + if( $config['no_date'] ) $where_date = " AND date < '" . $thisdate . "'"; + else $where_date = ""; + + $result = $db->query( "SELECT id, date, alt_name, editdate FROM " . PREFIX . "_post WHERE approve=1" . $where_date . " ORDER BY date DESC" . $this->limit ); + + while ( $row = $db->get_row( $result ) ) { + if ( $row['editdate'] ){$row['date'] = $row['editdate']; + } else {$row['date'] = strtotime($row['date']);} + $loc = $this->home . $row['id'] . "-" . $row['alt_name'] . ".html"; + $xml .= $this->get_xml( $loc, date( "Y-m-d", $row['date'] ) ); + } + return $xml; + } + + function get_static() { + global $db; + + $xml = ""; + $lastmod = date( "Y-m-d" ); + + $this->priority = $this->stat_priority; + + $result = $db->query( "SELECT name FROM " . PREFIX . "_static" ); + while ( $row = $db->get_row( $result ) ) { + if( $row['name'] == "dle-rules-page" ) continue; + $loc = $this->home . $row['name'] . ".html"; + $xml .= $this->get_xml( $loc, $lastmod ); + } + return $xml; + } + + function get_url($id, $cat_info) { + + if( ! $id ) return; + + $parent_id = $cat_info[$id]['parentid']; + + $url = $cat_info[$id]['alt_name']; + + while ( $parent_id ) { + + $url = $cat_info[$parent_id]['alt_name'] . "/" . $url; + + $parent_id = $cat_info[$parent_id]['parentid']; + + if( $cat_info[$parent_id]['parentid'] == $cat_info[$parent_id]['id'] ) break; + + } + + return $url; + } + + function get_forum() { + global $db; + + $xml = ""; + $lastmod=date("Y-m-d"); + + $this->priority = $this->stat_priority; + $result = $db->query("SELECT tid FROM " . PREFIX . "_forum_topics"); + while($row = $db->get_row($result)) { + $loc = $this->home."forum/topic_".$row['tid']; + $xml .= $this->get_xml($loc, $lastmod); + } + return $xml; + } + + function get_xml($loc, $lastmod) { + + $loc = htmlspecialchars( $loc ); + + $xml = "\t\n"; + $xml .= "\t\t$loc\n"; + $xml .= "\t\t$lastmod\n"; + $xml .= "\t\t" . $this->priority . "\n"; + $xml .= "\t\n"; + + return $xml; + } + +} + +?> \ No newline at end of file diff --git a/system/classes/mail.class.php b/system/classes/mail.class.php new file mode 100644 index 0000000..9f76ef8 --- /dev/null +++ b/system/classes/mail.class.php @@ -0,0 +1,261 @@ +mail_method = $config['mail_metod']; + + $this->from = $config['admin_mail']; + $this->charset = $config['charset']; + $this->site_name = $config['short_title']; + + $this->smtp_host = $config['smtp_host']; + $this->smtp_port = intval( $config['smtp_port'] ); + $this->smtp_user = $config['smtp_user']; + $this->smtp_pass = $config['smtp_pass']; + + $this->html_mail = $is_html; + } + + function compile_headers() { + + $this->subject = "=?" . $this->charset . "?b?" . base64_encode( $this->subject ) . "?="; + $from = "=?" . $this->charset . "?b?" . base64_encode( $this->site_name ) . "?="; + + if( $this->html_mail ) { + $this->mail_headers .= "MIME-Version: 1.0" . $this->eol; + $this->mail_headers .= "Content-type: text/html; charset=\"" . $this->charset . "\"" . $this->eol; + } else { + $this->mail_headers .= "MIME-Version: 1.0" . $this->eol; + $this->mail_headers .= "Content-type: text/plain; charset=\"" . $this->charset . "\"" . $this->eol; + } + + if( $this->mail_method != 'smtp' ) { + + if( count( $this->bcc ) ) { + $this->mail_headers .= "Bcc: " . implode( ",", $this->bcc ) . $this->eol; + } + + } else { + + $this->mail_headers .= "Subject: " . $this->subject . $this->eol; + + if( $this->to ) { + + $this->mail_headers .= "To: " . $this->to . $this->eol; + } + + } + + $this->mail_headers .= "From: \"" . $from . "\" <" . $this->from . ">" . $this->eol; + + $this->mail_headers .= "Return-Path: <" . $this->from . ">" . $this->eol; + $this->mail_headers .= "X-Priority: 3" . $this->eol; + $this->mail_headers .= "X-Mailer: Files-Sib PHP" . $this->eol; + + } + + function send($to, $subject, $message) { + $this->to = preg_replace( "/[ \t]+/", "", $to ); + $this->from = preg_replace( "/[ \t]+/", "", $this->from ); + + $this->to = preg_replace( "/,,/", ",", $this->to ); + $this->from = preg_replace( "/,,/", ",", $this->from ); + + if( $this->mail_method != 'smtp' ) + $this->to = preg_replace( "#\#\[\]'\"\(\):;/\$!%\^&\*\{\}#", "", $this->to ); + else + $this->to = '<' . preg_replace( "#\#\[\]'\"\(\):;/\$!%\^&\*\{\}#", "", $this->to ) . '>'; + + + $this->from = preg_replace( "#\#\[\]'\"\(\):;/\$!%\^&\*\{\}#", "", $this->from ); + + $this->subject = $subject; + $this->message = $message; + + $this->message = str_replace( "\r", "", $this->message ); + + $this->compile_headers(); + + if( ($this->to) and ($this->from) and ($this->subject) ) { + if( $this->mail_method != 'smtp' ) { + if( ! @mail( $this->to, $this->subject, $this->message, $this->mail_headers ) ) { + $this->smtp_msg = "PHP Mail Error."; + $this->send_error = true; + } + + } else { + $this->smtp_send(); + } + + } + + $this->mail_headers = ""; + + } + + function smtp_get_line() { + $this->smtp_msg = ""; + + while ( $line = fgets( $this->smtp_fp, 515 ) ) { + $this->smtp_msg .= $line; + + if( substr( $line, 3, 1 ) == " " ) { + break; + } + } + } + + function smtp_send() { + $this->smtp_fp = @fsockopen( $this->smtp_host, intval( $this->smtp_port ), $errno, $errstr, 30 ); + + if( ! $this->smtp_fp ) { + $this->smtp_error( "Could not open a socket to the SMTP server" ); + return; + } + + $this->smtp_get_line(); + + $this->smtp_code = substr( $this->smtp_msg, 0, 3 ); + + if( $this->smtp_code == 220 ) { + $data = $this->smtp_crlf_encode( $this->mail_headers . "\n" . $this->message ); + + $this->smtp_send_cmd( "HELO " . $this->smtp_host ); + + if( $this->smtp_code != 250 ) { + $this->smtp_error( "HELO" ); + return; + } + + if( $this->smtp_user and $this->smtp_pass ) { + $this->smtp_send_cmd( "AUTH LOGIN" ); + + if( $this->smtp_code == 334 ) { + $this->smtp_send_cmd( base64_encode( $this->smtp_user ) ); + + if( $this->smtp_code != 334 ) { + $this->smtp_error( "Username not accepted from the server" ); + return; + } + + $this->smtp_send_cmd( base64_encode( $this->smtp_pass ) ); + + if( $this->smtp_code != 235 ) { + $this->smtp_error( "Password not accepted from the SMTP server" ); + return; + } + } else { + $this->smtp_error( "This SMTP server does not support authorisation" ); + return; + } + } + + $this->smtp_send_cmd( "MAIL FROM:" . $this->from ); + + if( $this->smtp_code != 250 ) { + $this->smtp_error( "Incorrect FROM address: $this->from" ); + return; + } + + $to_arry = array ($this->to ); + + if( count( $this->bcc ) ) { + foreach ( $this->bcc as $bcc ) { + if( preg_match( "/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,4})(\]?)$/", str_replace( " ", "", $bcc ) ) ) { + $to_arry[] = $bcc; + } + } + } + + foreach ( $to_arry as $to_email ) { + $this->smtp_send_cmd( "RCPT TO:" . $to_email ); + + if( $this->smtp_code != 250 ) { + $this->smtp_error( "Incorrect email address: $to_email" ); + return; + break; + } + } + + $this->smtp_send_cmd( "DATA" ); + + if( $this->smtp_code == 354 ) { + fputs( $this->smtp_fp, $data . "\r\n" ); + } else { + $this->smtp_error( "Error on write to SMTP server" ); + return; + } + + $this->smtp_send_cmd( "." ); + + if( $this->smtp_code != 250 ) { + $this->smtp_error(); + return; + } + + $this->smtp_send_cmd( "quit" ); + + if( $this->smtp_code != 221 ) { + $this->smtp_error(); + return; + } + + @fclose( $this->smtp_fp ); + } else { + $this->smtp_error( "SMTP service unaviable" ); + return; + } + } + + function smtp_send_cmd($cmd) { + $this->smtp_msg = ""; + $this->smtp_code = ""; + + fputs( $this->smtp_fp, $cmd . "\r\n" ); + + $this->smtp_get_line(); + + $this->smtp_code = substr( $this->smtp_msg, 0, 3 ); + + return $this->smtp_code == "" ? FALSE : TRUE; + } + + function smtp_error($err = "") { + $this->smtp_msg = $err; + $this->send_error = true; + return; + } + + function smtp_crlf_encode($data) { + $data .= "\n"; + $data = str_replace( "\n", "\r\n", str_replace( "\r", "", $data ) ); + $data = str_replace( "\n.\r\n", "\n. \r\n", $data ); + + return $data; + } +} +?> \ No newline at end of file diff --git a/system/classes/mysql.php b/system/classes/mysql.php new file mode 100644 index 0000000..73bed7c --- /dev/null +++ b/system/classes/mysql.php @@ -0,0 +1,215 @@ +mysqli = true; + } + + function connect($db_user, $db_pass, $db_name, $db_location = 'localhost'){ + if ($this->mysqli) $this->db_id = @mysqli_connect ($db_location, $db_user, $db_pass, $db_name); + else $this->db_id = @mysql_connect ($db_location, $db_user, $db_pass); + + if (!$this->mysqli and !@mysql_select_db ($db_name, $this->db_id)) { + $this->display_error (mysql_error (), mysql_errno ()); + } + + if(!$this->db_id) { + if ($this->mysqli) $this->display_error (mysqli_connect_error (), 1); + else $this->display_error (mysql_error (), mysql_errno ()); + } + + if ($this->mysqli) $this->mysql_version = mysqli_get_server_info ($this->db_id); + else $this->mysql_version = mysql_get_server_info (); + + if(!defined('COLLATE')){define ("COLLATE", "cp1251");} + + if($this->mysqli) mysqli_query($this->db_id, "SET NAMES '" . COLLATE . "'"); + elseif (version_compare ($this->mysql_version, '4.1', '>=')) mysql_query("/*!40101 SET NAMES '" . COLLATE . "' */"); + + return true; + } + + function query($query) + { + $time_before = $this->get_real_time(); + + if(!$this->db_id) $this->connect(DBUSER, DBPASS, DBNAME, DBHOST); + + if($this->mysqli) $this->query_id = mysqli_query ($this->db_id, $query); + else $this->query_id = mysql_query ($query, $this->db_id); + + $this->query_num++; + + if (!$this->query_id) { + $this->mysql_error = mysqli_error ($this->db_id); + $this->mysql_error_num = mysqli_errno ($this->db_id); + $this->display_error ($this->mysql_error, $this->mysql_error_num, $query); + } + + $this->MySQL_time_taken += $this->get_real_time() - $time_before; + + return $this->query_id; + } + + function get_row($query_id = false) + { + if (!$query_id) $query_id = $this->query_id; + + if ($this->mysqli) $output = mysqli_fetch_assoc ($query_id); + else $output = mysql_fetch_assoc ($query_id); + + return $output; + } + + function get_affected_rows() + { + if($this->mysqli) return mysqli_affected_rows($this->db_id); + else return mysql_affected_rows($this->db_id); + } + + function get_array($query_id = false) + { + if (!$query_id) $query_id = $this->query_id; + + if($this->mysqli) return mysqli_fetch_array($query_id); + else return mysql_fetch_array($query_id); + } + + function super_query($query, $multi = false) + { + if(!$multi) { + $this->query($query); + $data = $this->get_row(); + $this->free(); + return $data; + } else { + $this->query($query); + $rows = array(); + while($row = $this->get_row()) {$rows[] = $row;} + $this->free(); + return $rows; + }} + + function num_rows($query_id = false) + { + if (!$query_id) $query_id = $this->query_id; + + if($this->mysqli) return mysqli_num_rows($query_id); + else return mysql_num_rows($query_id); + } + + function insert_id() + { + if($this->mysqli) return mysqli_insert_id($this->db_id); + else return mysql_insert_id($this->db_id); + } + + function get_result_fields($query_id = false) { + + if (!$query_id) $query_id = $this->query_id; + + if ($this->mysqli) { + while ($field = mysqli_fetch_field ($query_id)) + $fields[] = $field; + } else { + while ($field = mysql_fetch_field ($query_id)) + $fields[] = $field; + } + + return $fields; + } + + function safesql( $source ) + { + if(!$this->db_id) $this->connect(DBUSER, DBPASS, DBNAME, DBHOST); + + if ($this->mysqli and $this->db_id) $source = mysqli_real_escape_string ($this->db_id, $source); + elseif (!$this->mysqli and $this->db_id) $source = mysql_real_escape_string ($source, $this->db_id); + else $source = addslashes($source); + + return $source; + } + + function free( $query_id = false ) + { + if (!$query_id) $query_id = $this->query_id; + + if($this->mysqli)@mysqli_free_result($query_id); + else @mysql_free_result($query_id); + } + + function close() + { + if ($this->mysqli) @mysqli_close ($this->db_id); + else @mysql_close ($this->db_id); + } + + function get_real_time() + { + list($seconds, $microSeconds) = explode(' ', microtime()); + return ((float)$seconds + (float)$microSeconds); + } + + function display_error($error, $error_num, $query = false){ + if($this->show_error){ + if(!$query) { + // Safify query + $query = preg_replace("/([0-9a-f]){32}/", "********************************", $query); // Hides all hashes + $query_str = "$query"; + } + + echo ' + + + + MySQL Fatal Error + + + + + MySQL Error! +
    ------------------------
    +
    + + The Error returned was: +
    + '.$error.' + +

    + Error Number: +
    + '.$error_num.' +
    +
    + +
    + + + '; + + exit(); + } else return false; + } + +} +?> \ No newline at end of file diff --git a/system/classes/navigation.class.php b/system/classes/navigation.class.php new file mode 100644 index 0000000..a93320d --- /dev/null +++ b/system/classes/navigation.class.php @@ -0,0 +1,125 @@ +URL ); + if( $return == "url" ) return $link; + if( $title ) $page = $title; + return "{$page} "; + } + + // + function LPage( $start, $end ){ + + while( $start < $end ) + { + if( $start == $this->Page ) + $navigation .= "".$start."\n"; + else + $navigation .= $this->CNPage( $start ); + $start++; + } + + return $navigation; + } + + // + function BuildNavigation(){ + global $tpl; + + // , + if( $this->Total < 2 ) return; + + // + //$tpl->result[ $this->Compile ] = ""; + + // + if( $this->Page < 1 ) $this->Page = 1; + if( $this->Page > $this->Total ) $this->Page = $this->Total; + + $first = $this->Page - 4; // + $last = $this->Page + 5; // + $PPage = $this->CNPage( $this->Page - 1 , "", "url" ); // + $NPage = $this->CNPage( $this->Page + 1 , "", "url" ); // + $PageMin = 8; // + $PageMax = $this->Total - 8; // + $divider = "... "; // + + // + $tpl->load_template( $this->Tpl ); + + // + if( $this->Page > 1 ) + $tpl->set_block( "'\[prev-link\](.*?)\[/prev-link\]'si", "\\1" ); + else + $tpl->set_block( "'\[prev-link\](.*?)\[/prev-link\]'si", "\\1" ); + + // + if( $this->Page < $this->Total ) + $tpl->set_block( "'\[next-link\](.*?)\[/next-link\]'si", "\\1" ); + else + $tpl->set_block( "'\[next-link\](.*?)\[/next-link\]'si", "\\1" ); + + // 10 + if( $this->Total < 10 ) + { + $navigation = $this->LPage( 1, $this->Total + 1 ); + $navigation = $navigation; + } + else + { + // + if( ( $this->Page >= $PageMin - 2 ) and ( $this->Page <= $PageMax + 2 ) ) + { + $navigation = $this->LPage( $first, $last ); + $navigation = $this->CNPage( "1" ).$divider.$navigation.$divider.$this->CNPage( $this->Total ); + } + // 8 - + elseif( $this->Page < $PageMin ) + { + $navigation = $this->LPage( 1, $PageMin + 1 ); + $navigation = $navigation.$divider.$this->CNPage( $this->Total ); + } + // 8 - + elseif( $this->Page > $PageMax ) + { + $navigation = $this->LPage( $PageMax, $this->Total + 1 ); + $navigation = $this->CNPage( "1" ).$divider.$navigation; + } + } + + // + $tpl->set( "{pages}", $navigation ); + $tpl->set( "{page}", $this->Page ); + $tpl->set( "{count_page}", $this->Total ); + + if( $this->Total < 2 ) + { + $tpl->set_block( "'\[page\](.*?)\[/page\]'si", "" ); + } + else + { + $tpl->set( "[page]", "" ); + $tpl->set( "[/page]", "" ); + } + + // + $tpl->compile( $this->Compile ); + + // + $tpl->clear(); + + // + unset( $navigation ); + } +} + +?> \ No newline at end of file diff --git a/system/classes/parse.class.php b/system/classes/parse.class.php new file mode 100644 index 0000000..9d0d337 --- /dev/null +++ b/system/classes/parse.class.php @@ -0,0 +1,1028 @@ + '8', 2 => '10', 3 => '12', 4 => '14', 5 => '18', 6 => '24', 7 => '36' ); + + function ParseFilter($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1) { + for($i = 0; $i < count( $tagsArray ); $i ++) + $tagsArray[$i] = strtolower( $tagsArray[$i] ); + for($i = 0; $i < count( $attrArray ); $i ++) + $attrArray[$i] = strtolower( $attrArray[$i] ); + $this->tagsArray = ( array ) $tagsArray; + $this->attrArray = ( array ) $attrArray; + $this->tagsMethod = $tagsMethod; + $this->attrMethod = $attrMethod; + $this->xssAuto = $xssAuto; + } + + function process($source) { + if( function_exists( "get_magic_quotes_gpc" ) && get_magic_quotes_gpc() ) $source = stripslashes( $source ); + $source = $this->remove( $this->decode( $source ) ); + if( $this->code_count ) { + foreach ( $this->code_text as $key_find => $key_replace ) { + $find[] = $key_find; + $replace[] = $key_replace; + } + $source = str_replace( $find, $replace, $source ); + } + + $this->code_count = 0; + $this->code_text = array (); + $source = preg_replace( "#\{include#i", "{include", $source ); + + $source = preg_replace( "#", "?>", $source ); + + $source = addslashes( $source ); + return $source; + + } + + function remove($source) { + $loopCounter = 0; + while ( $source != $this->filterTags( $source ) ) { + $source = $this->filterTags( $source ); + $loopCounter ++; + } + return $source; + } + + function filterTags($source) { + $preTag = NULL; + $postTag = $source; + $tagOpen_start = strpos( $source, '<' ); + while ( $tagOpen_start !== FALSE ) { + $preTag .= substr( $postTag, 0, $tagOpen_start ); + $postTag = substr( $postTag, $tagOpen_start ); + $fromTagOpen = substr( $postTag, 1 ); + $tagOpen_end = strpos( $fromTagOpen, '>' ); + if( $tagOpen_end === false ) break; + $tagOpen_nested = strpos( $fromTagOpen, '<' ); + if( ($tagOpen_nested !== false) && ($tagOpen_nested < $tagOpen_end) ) { + $preTag .= substr( $postTag, 0, ($tagOpen_nested + 1) ); + $postTag = substr( $postTag, ($tagOpen_nested + 1) ); + $tagOpen_start = strpos( $postTag, '<' ); + continue; + } + $tagOpen_nested = (strpos( $fromTagOpen, '<' ) + $tagOpen_start + 1); + $currentTag = substr( $fromTagOpen, 0, $tagOpen_end ); + $tagLength = strlen( $currentTag ); + if( ! $tagOpen_end ) { + $preTag .= $postTag; + $tagOpen_start = strpos( $postTag, '<' ); + } + $tagLeft = $currentTag; + $attrSet = array (); + $currentSpace = strpos( $tagLeft, ' ' ); + if( substr( $currentTag, 0, 1 ) == "/" ) { + $isCloseTag = TRUE; + list ( $tagName ) = explode( ' ', $currentTag ); + $tagName = substr( $tagName, 1 ); + } else { + $isCloseTag = FALSE; + list ( $tagName ) = explode( ' ', $currentTag ); + } + if( (! preg_match( "/^[a-z][a-z0-9]*$/i", $tagName )) || (! $tagName) || ((in_array( strtolower( $tagName ), $this->tagBlacklist )) && ($this->xssAuto)) ) { + $postTag = substr( $postTag, ($tagLength + 2) ); + $tagOpen_start = strpos( $postTag, '<' ); + continue; + } + while ( $currentSpace !== FALSE ) { + $fromSpace = substr( $tagLeft, ($currentSpace + 1) ); + $nextSpace = strpos( $fromSpace, ' ' ); + $openQuotes = strpos( $fromSpace, '"' ); + $closeQuotes = strpos( substr( $fromSpace, ($openQuotes + 1) ), '"' ) + $openQuotes + 1; + if( strpos( $fromSpace, '=' ) !== FALSE ) { + if( ($openQuotes !== FALSE) && (strpos( substr( $fromSpace, ($openQuotes + 1) ), '"' ) !== FALSE) ) $attr = substr( $fromSpace, 0, ($closeQuotes + 1) ); + else $attr = substr( $fromSpace, 0, $nextSpace ); + } else + $attr = substr( $fromSpace, 0, $nextSpace ); + if( ! $attr ) $attr = $fromSpace; + $attrSet[] = $attr; + $tagLeft = substr( $fromSpace, strlen( $attr ) ); + $currentSpace = strpos( $tagLeft, ' ' ); + } + $tagFound = in_array( strtolower( $tagName ), $this->tagsArray ); + if( (! $tagFound && $this->tagsMethod) || ($tagFound && ! $this->tagsMethod) ) { + if( ! $isCloseTag ) { + $attrSet = $this->filterAttr( $attrSet, strtolower( $tagName ) ); + $preTag .= '<' . $tagName; + for($i = 0; $i < count( $attrSet ); $i ++) + $preTag .= ' ' . $attrSet[$i]; + if( strpos( $fromTagOpen, "'; + else $preTag .= ' />'; + } else + $preTag .= ''; + } + $postTag = substr( $postTag, ($tagLength + 2) ); + $tagOpen_start = strpos( $postTag, '<' ); + } + $preTag .= $postTag; + return $preTag; + } + + function filterAttr($attrSet, $tagName) { + + global $config; + + $newSet = array (); + for($i = 0; $i < count( $attrSet ); $i ++) { + if( ! $attrSet[$i] ) continue; + + $attrSet[$i] = trim( $attrSet[$i] ); + + $exp = strpos( $attrSet[$i], '=' ); + if( $exp === false ) $attrSubSet = Array ($attrSet[$i] ); + else { + $attrSubSet = Array (); + $attrSubSet[] = substr( $attrSet[$i], 0, $exp ); + $attrSubSet[] = substr( $attrSet[$i], $exp + 1 ); + } + $attrSubSet[1] = stripslashes( $attrSubSet[1] ); + + list ( $attrSubSet[0] ) = explode( ' ', $attrSubSet[0] ); + + $attrSubSet[0] = strtolower( $attrSubSet[0] ); + + if( (! preg_match( "/^[a-z]*$/i", $attrSubSet[0] )) || (($this->xssAuto) && ((in_array( $attrSubSet[0], $this->attrBlacklist )) || (substr( $attrSubSet[0], 0, 2 ) == 'on'))) ) continue; + if( $attrSubSet[1] ) { + $attrSubSet[1] = str_replace( '&#', '', $attrSubSet[1] ); + $attrSubSet[1] = preg_replace( '/\s+/', ' ', $attrSubSet[1] ); + $attrSubSet[1] = str_replace( '"', '', $attrSubSet[1] ); + if( (substr( $attrSubSet[1], 0, 1 ) == "'") && (substr( $attrSubSet[1], (strlen( $attrSubSet[1] ) - 1), 1 ) == "'") ) $attrSubSet[1] = substr( $attrSubSet[1], 1, (strlen( $attrSubSet[1] ) - 2) ); + } + + if( ((strpos( strtolower( $attrSubSet[1] ), 'expression' ) !== false) && ($attrSubSet[0] == 'style')) || (strpos( strtolower( $attrSubSet[1] ), 'javascript:' ) !== false) || (strpos( strtolower( $attrSubSet[1] ), 'behaviour:' ) !== false) || (strpos( strtolower( $attrSubSet[1] ), 'vbscript:' ) !== false) || (strpos( strtolower( $attrSubSet[1] ), 'mocha:' ) !== false) || (strpos( strtolower( $attrSubSet[1] ), 'data:' ) !== false and $attrSubSet[0] == "href") || (strpos( strtolower( $attrSubSet[1] ), 'data:' ) !== false and $attrSubSet[0] == "src") || ($attrSubSet[0] == "href" and strpos( strtolower( $attrSubSet[1] ), $config['admin_path'] ) !== false and preg_match( "/[?&%<\[\]]/", $attrSubSet[1] )) || (strpos( strtolower( $attrSubSet[1] ), 'livescript:' ) !== false) ) continue; + + $attrFound = in_array( $attrSubSet[0], $this->attrArray ); + if( (! $attrFound && $this->attrMethod) || ($attrFound && ! $this->attrMethod) ) { + if( $attrSubSet[1] ) $newSet[] = $attrSubSet[0] . '="' . $attrSubSet[1] . '"'; + elseif( $attrSubSet[1] == "0" ) $newSet[] = $attrSubSet[0] . '="0"'; + else $newSet[] = $attrSubSet[0] . '=""'; + } + } + ; + return $newSet; + } + + function decode($source) { + global $config; + + if( $this->allow_code ) + $source = preg_replace_callback( "#\[code\](.+?)\[/code\]#is", array( &$this, 'code_tag'), $source ); + + if( $this->safe_mode AND !$this->wysiwyg ) { + + $source = htmlspecialchars( $source, ENT_QUOTES, $config['charset'] ); + $source = str_replace( '&', '&', $source ); + + } else { + + $source = str_replace( "<>", "<>", str_replace( ">>", ">>", str_replace( "<<", "<<", $source ) ) ); + $source = str_replace( "\"$smile\""; + } + + $source = preg_replace( $find, $replace, $source ); + $source = preg_replace( "#allow_php ) { + $source = str_replace( "", "?>", $source ); + } + + //if ($config['parse_links']) { + // $source = preg_replace("#(^|\s|>)((http|https|ftp)://\w+[^\s\[\]\<]+)#i", '\\1[leech]\\2[/leech]', $source); + //} + + $count_start = substr_count ($source, "[quote"); + $count_end = substr_count ($source, "[/quote]"); + if ($count_start AND $count_start == $count_end) { + $source = preg_replace( "#\[quote\]#i", "
    ", $source ); + $source = preg_replace( "#\[quote=(.+?)\]#i", "
    {$lang['i_quote']} \\1
    ", $source ); + $source = preg_replace( "#\[/quote\]#i", "
    ", $source ); + } + + $count_start = substr_count ($source, "[screens"); + $count_end = substr_count ($source, "[/screens]"); + if ($count_start AND $count_start == $count_end) { + $source = preg_replace( "#\[screens\]#i", "
    ", $source ); + $source = preg_replace( "#\[/screens\]#i", "
    ", $source ); + } + + $count_start = substr_count ($source, "[spoiler"); + $count_end = substr_count ($source, "[/spoiler]"); + if ($count_start AND $count_start == $count_end) { + $source = preg_replace( "#\[spoiler\]#ie", "\$this->build_spoiler('')", $source ); + $source = preg_replace( "#\[spoiler=(.+?)\]#ie", "\$this->build_spoiler('\\1')", $source ); + $source = preg_replace( "#\[/spoiler\]#i", "
    ", $source ); + } + + $source = preg_replace( "#\[code\](.+?)\[/code\]#is", "
    \\1
    ", $source ); + $source = preg_replace( "#\[(left|right|center)\](.+?)\[/\\1\]#is", "
    \\2
    ", $source ); + + $source = preg_replace( "#\[b\](.+?)\[/b\]#is", "\\1", $source ); + $source = preg_replace( "#\[i\](.+?)\[/i\]#is", "\\1", $source ); + $source = preg_replace( "#\[u\](.+?)\[/u\]#is", "\\1", $source ); + $source = preg_replace( "#\[s\](.+?)\[/s\]#is", "\\1", $source ); + + $source = preg_replace( "#\[kp=(.+?)\]#is", "", $source ); + $source = preg_replace( "#\[game=(.+?)\]#is", "", $source ); + + if( $this->allow_url ) { + $source = preg_replace( "#\[url\](\S.+?)\[/url\]#ie", "\$this->build_url(array('html' => '\\1', 'show' => '\\1'))", $source ); + $source = preg_replace( "#\[url\s*=\s*\"\;\s*(\S+?)\s*\"\;\s*\](.*?)\[\/url\]#ie", "\$this->build_url(array('html' => '\\1', 'show' => '\\2'))", $source ); + $source = preg_replace( "#\[url\s*=\s*(\S.+?)\s*\](.*?)\[\/url\]#ie", "\$this->build_url(array('html' => '\\1', 'show' => '\\2'))", $source ); + $source = preg_replace( "#\[leech\](\S.+?)\[/leech\]#ie", "\$this->build_url(array('html' => '\\1', 'show' => '\\1', 'leech' => '1'))", $source ); + $source = preg_replace( "#\[leech\s*=\s*\"\;\s*(\S+?)\s*\"\;\s*\](.*?)\[\/leech\]#ie", "\$this->build_url(array('html' => '\\1', 'show' => '\\2', 'leech' => '1'))", $source ); + $source = preg_replace( "#\[leech\s*=\s*(\S.+?)\s*\](.*?)\[\/leech\]#ie", "\$this->build_url(array('html' => '\\1', 'show' => '\\2', 'leech' => '1'))", $source ); + } else { + if( stristr( $source, "[url" ) !== false ) $this->not_allowed_tags = true; + if( stristr( $source, "[leech" ) !== false ) $this->not_allowed_tags = true; + if( stristr( $source, "<a" ) !== false ) $this->not_allowed_tags = true; + } + + if( $this->allow_image ) { + $source = preg_replace( "#\[img\](.+?)\[/img\]#ie", "\$this->build_image('\\1')", $source ); + $source = preg_replace( "#\[img=(.+?)\](.+?)\[/img\]#ie", "\$this->build_image('\\2', '\\1')", $source ); + } else { + if( stristr( $source, "[img" ) !== false ) $this->not_allowed_tags = true; + if( stristr( $source, "<img" ) !== false ) $this->not_allowed_tags = true; + } + + $source = preg_replace( "#\[email\s*=\s*\"\;([\.\w\-]+\@[\.\w\-]+\.[\.\w\-]+)\s*\"\;\s*\](.*?)\[\/email\]#ie", "\$this->build_email(array('html' => '\\1', 'show' => '\\2'))", $source ); + $source = preg_replace( "#\[email\s*=\s*([\.\w\-]+\@[\.\w\-]+\.[\w\-]+)\s*\](.*?)\[\/email\]#ie", "\$this->build_email(array('html' => '\\1', 'show' => '\\2'))", $source ); + + if( ! $this->safe_mode ) { + $source = preg_replace( "'\[thumb\]([^\[]*)([/\\\\])(.*?)\[/thumb\]'ie", "\$this->build_thumb('\$1\$2\$3', '\$1\$2thumbs\$2\$3')", $source ); + $source = preg_replace( "'\[thumb=(.*?)\]([^\[]*)([/\\\\])(.*?)\[/thumb\]'ie", "\$this->build_thumb('\$2\$3\$4', '\$2\$3thumbs\$3\$4', '\$1')", $source ); + $source = preg_replace( "#\[video\s*=\s*(\S.+?)\s*\]#ie", "\$this->build_video('\\1')", $source ); + $source = preg_replace( "#\[audio\s*=\s*(\S.+?)\s*\]#ie", "\$this->build_audio('\\1')", $source ); + $source = preg_replace( "#\[flash=([^\]]+)\](.+?)\[/flash\]#ies", "\$this->build_flash('\\1', '\\2')", $source ); + $source = preg_replace( "#\[media=([^\]]+)\]#ies", "\$this->build_media('\\1')", $source ); + + $source = preg_replace( "#\[size=([^\]]+)\]#ie", "\$this->font_change(array('tag'=>'size','1'=>'\\1'))", $source ); + $source = preg_replace( "#\[font=([^\]]+)\]#ie", "\$this->font_change(array('tag'=>'font','1'=>'\\1'))", $source ); + $source = str_replace("[/size]", "", $source); + $source = str_replace("[/font]", "", $source); + } + + $source = preg_replace( "#\[color=([^\]]+)\]#ie", "\$this->font_change(array('tag'=>'color','1'=>'\\1'))", $source ); + $source = str_replace("[/color]", "", $source); + + $source = str_replace( "__CODENR__", "\r", $source ); + $source = str_replace( "__CODENN__", "\n", $source ); + + if( $this->filter_mode ) $source = $this->word_filter( $source ); + + return trim( $source ); + + } + + function decodeBBCodes($txt, $use_html = TRUE, $wysiwig = "no") { + global $config; + + $find = array (); + $result = array (); + $txt = stripslashes( $txt ); + if( $this->filter_mode ) $txt = $this->word_filter( $txt, false ); + + $txt = preg_replace( "#(.+?)#ie", "\$this->decode_thumb('\\1')", $txt ); + $txt = preg_replace( "#(.+?)#ie", "\$this->decode_newthumb('\\1')", $txt ); + + $txt = preg_replace( "#(.+?)#", '[screens]', $txt ); + $txt = preg_replace( "#(.+?)#", '[/screens]', $txt ); + + $txt = preg_replace( "#(.+?)#", '[quote]', $txt ); + $txt = preg_replace( "#(.+?)#", "[quote=\\1]", $txt ); + $txt = preg_replace( "#(.+?)#", '[/quote]', $txt ); + $txt = preg_replace( "#(.+?)#", '[code]', $txt ); + $txt = preg_replace( "#(.+?)#", '[/code]', $txt ); + $txt = preg_replace( "#(.+?)#ie", "\$this->decode_leech('\\1\\2', '\\3')", $txt ); + $txt = preg_replace( "#(.+?)src=\"(.+?)\"(.+?)#is", '[video=\\2]', $txt ); + $txt = preg_replace( "#(.+?)#is", '[video=\\1]', $txt ); + $txt = preg_replace( "#(.+?)#is", '[audio=\\1]', $txt ); + $txt = preg_replace( "#(.+?)#ies", "\$this->decode_dle_img('\\1')", $txt ); + $txt = preg_replace( "#(.+?)#is", '[media=\\1]', $txt ); + $txt = preg_replace( "#(.+?)#is", '[media=\\1]', $txt ); + $txt = preg_replace( "#(.+?)#ies", "\$this->decode_flash('\\1')", $txt ); + $txt = preg_replace( "#(.+?)#is", '[spoiler]', $txt ); + $txt = preg_replace( "#(.+?)#is", '[spoiler=\\1]', $txt ); + $txt = str_replace( "", '[/spoiler]', $txt ); + + $txt = preg_replace( "#(.+?)#is", "[kp=\\1]", $txt ); + $txt = preg_replace( "#(.+?)#is", "[game=\\1]", $txt ); + $txt = preg_replace( "#(.+?)#is", "[i]\\1[/i]", $txt ); + $txt = preg_replace( "#(.+?)#is", "[b]\\1[/b]", $txt ); + $txt = preg_replace( "#(.+?)#is", "[s]\\1[/s]", $txt ); + $txt = preg_replace( "#(.+?)#is", "[u]\\1[/u]", $txt ); + $txt = preg_replace( "#
    (.+?)
    #is", "[center]\\1[/center]", $txt ); + $txt = preg_replace( "##ie", "\$this->decode_img('\\1', '\\2')", $txt ); + + $txt = preg_replace( "#(.+?)#", "[email=\\1]\\2[/email]", $txt ); + $txt = preg_replace( "#(.+?)#ie", "\$this->decode_url('\\1\\2', '\\3')", $txt ); + $txt = preg_replace( "#(.+?)#ie", "\$this->decode_url('\\1\\2', '\\3')", $txt ); + + $txt = preg_replace( "#(.+?)#", "[size=\\1]", $txt ); + $txt = preg_replace( "#(.+?)#", "[color=\\1]", $txt ); + $txt = preg_replace( "#(.+?)#", "[font=\\1]", $txt ); + + $txt = str_replace( "", "[/size]", $txt ); + $txt = str_replace( "", "[/color]", $txt ); + $txt = str_replace( "", "[/font]", $txt ); + + while ( preg_match( "#
    (.+?)
    #is", $txt ) ) { + $txt = preg_replace( "#
    (.+?)
    #is", "[left]\\1[/left]", $txt ); + } + while ( preg_match( "#
    (.+?)
    #is", $txt ) ) { + $txt = preg_replace( "#
    (.+?)
    #is", "[right]\\1[/right]", $txt ); + } + while ( preg_match( "#
    (.+?)
    #is", $txt ) ) { + $txt = preg_replace( "#
    (.+?)
    #is", "[center]\\1[/center]", $txt ); + } + + $txt = preg_replace( "#(.+?)#is", ':\\1:', $txt ); + $smilies_arr = explode( ",", $config['smilies'] ); + foreach ( $smilies_arr as $smile ) { + $smile = trim( $smile ); + $replace[] = ":$smile:"; + $find[] = "#['\"]"#is"; + } + $txt = preg_replace( $find, $replace, $txt ); + + if( ! $use_html ) { + $txt = str_ireplace( "
    ", "\n", $txt ); + $txt = str_ireplace( "
    ", "\n", $txt ); + } + + if (!$this->safe_mode) $txt = htmlspecialchars( $txt, ENT_QUOTES ); + $txt = preg_replace( "#\[code\](.+?)\[/code\]#ies", "\$this->decode_code('\\1', '{$use_html}')", $txt ); + + return trim( $txt ); + } + + function font_change($tags) { + if( ! is_array( $tags ) ) {return;} + $style = $tags['1']; + $type = $tags['tag']; + $style = str_replace( '"', '', $style ); + $style = preg_replace( "/[&\(\)\.\%\[\]<>\'\"]/", "", preg_replace( "#^(.+?)(?:;|$)#", "\\1", $style ) ); + if( $type == 'size' ) { + $style = intval( $style ); + if( $this->font_sizes[$style] ) { + $real = $this->font_sizes[$style]; + } else {$real = 12;} + return ""; + } + if( $type == 'font' ) { + $style = preg_replace( "/[^\d\w\#\-\_\s]/s", "", $style ); + return ""; + } + $style = preg_replace( "/[^\d\w\#\s]/s", "", $style ); + return ""; + } + + function build_email($url = array()) { + $url['html'] = $this->clear_url( $url['html'] ); + $url['show'] = stripslashes( $url['show'] ); + return "{$url['show']}"; + } + + function build_flash($size, $url) { + $size = explode(",", $size); + $width = trim(intval($size[0])); + $height = trim(intval($size[1])); + if (!$width OR !$height) return "[flash=".implode(",",$size)."]".$url."[/flash]"; + $url = $this->clear_url( urldecode( $url ) ); + if( $url == "" ) return; + $type = explode( ".", $url ); + $type = strtolower( end( $type ) ); + if ( strtolower($type) != "swf" ){return "[flash=".implode(",",$size)."]".$url."[/flash]";} + return ""; + } + + function decode_flash($url) + { + $url = explode( "||", $url ); + return '[flash='.$url[0].','.$url[1].']'.$url[2].'[/flash]'; + } + + function build_media($url) { + $url = $this->clear_url( urldecode( $url ) ); + $url = str_replace("&","&", $url ); + + if( $url == "" ) return; + $source = @parse_url ( $url ); + + $source['host'] = str_replace( "www.", "", strtolower($source['host']) ); + + if ($source['host'] != "youtube.com" AND $source['host'] != "vk.com") return "[media=".$url."]"; + + if ($source['host'] == "youtube.com") { + $a = explode('&', $source['query']); + $i = 0; + + while ($i < count($a)) { + $b = explode('=', $a[$i]); + if ($b[0] == "v") $video_link = $b[1]; + $i++; + } + + return ''; + } + elseif ($source['host'] == "vk.com") { + return ''; + } + } + + function build_url($url = array()) { + global $config; + + $skip_it = 0; + + if( preg_match( "/([\.,\?]|!)$/", $url['show'], $match ) ) { + $url['end'] .= $match[1]; + $url['show'] = preg_replace( "/([\.,\?]|!)$/", "", $url['show'] ); + } + + $url['html'] = $this->clear_url( $url['html'] ); + $url['show'] = stripslashes( $url['show'] ); + + if( $this->safe_mode ) { + $url['show'] = str_replace( " ", " ", $url['show'] ); + if (strlen(trim($url['show'])) < 3 ) + return "[url=" . $url['html'] . "]" . $url['show'] . "[/url]"; + } + + if( strpos( $url['html'], $config['http_home_url'] ) !== false AND strpos( $url['html'], $config['admin_path'] ) !== false ) { + return "[url=" . $url['html'] . "]" . $url['show'] . "[/url]"; + } + + if( ! preg_match( "#^(http|news|https|ed2k|ftp|aim|mms)://|(magnet:?)#", $url['html'] ) AND $url['html'][0] != "/" AND $url['html'][0] != "#") { + $url['html'] = 'http://' . $url['html']; + } + + if ($url['html'] == 'http://' ) return "[url=" . $url['html'] . "]" . $url['show'] . "[/url]"; + + $url['show'] = str_replace( "&amp;", "&", $url['show'] ); + $url['show'] = preg_replace( "/javascript:/i", "javascript: ", $url['show'] ); + + if( preg_match( "/^check_home( $url['html'] ) OR $url['html'][0] == "/" OR $url['html'][0] == "#"){ + return "" . $show . "" . $url['end']; + }else{ + $url['html'] = $config['http_home_url'] . "out.php?url=" . rawurlencode( base64_encode( $url['html'] ) ); + return "" . $show . "" . $url['end']; + } + } + + function code_tag($txt = "") { + if( $txt == "" ) { + return; + } + $this->code_count ++; + $txt = str_replace( "&", "&", $txt ); + $txt = str_replace( "<", "<", $txt ); + $txt = str_replace( "'", "'", $txt ); + $txt = str_replace( ">", ">", $txt ); + $txt = str_replace( "<", "<", $txt ); + $txt = str_replace( ">", ">", $txt ); + $txt = str_replace( """, """, $txt ); + $txt = str_replace( "\\\"", """, $txt ); + $txt = str_replace( ":", ":", $txt ); + $txt = str_replace( "[", "[", $txt ); + $txt = str_replace( "]", "]", $txt ); + $txt = str_replace( ")", ")", $txt ); + $txt = str_replace( "(", "(", $txt ); + $txt = str_replace( "\r", "", $txt ); + $txt = str_replace( "\n", "
    ", $txt ); + $txt = preg_replace( "#\s{1};#", ";", $txt ); + $txt = preg_replace( "#\t#", "    ", $txt ); + $txt = preg_replace( "#\s{2}#", "  ", $txt ); + + $p = "[code]{" . $this->code_count . "}[/code]"; + + $this->code_text[$p] = "[code]{$txt}[/code]"; + + return $p; + } + + function decode_code($txt = "", $use_html) { + +// $txt = stripslashes( $txt ); + $txt = str_replace( "&", "&", $txt ); + + if( $use_html ) { + $txt = str_replace( "<br />", "\n", $txt ); + } + + return "[code]".$txt."[/code]"; + } + + function build_video($url) { + global $config; + + $option = explode( "|", trim( $url ) ); + + $url = $this->clear_url( urldecode( $option[0] ) ); + + $type = explode( ".", $url ); + $type = strtolower( end( $type ) ); + + if( preg_match( "/[?&;%<\[\]]/", $url ) ) { + + return "[video=" . $url . "]"; + + } + + if( $option[1] != "" ) { + + $option[1] = htmlspecialchars( strip_tags( stripslashes( $option[1] ) ), ENT_QUOTES ); + $decode_url = $url . "|" . $option[1]; + + } else + $decode_url = $url; + + if( $type == "flv" or $type == "f4v" or $type == "mp4" or $type == "mov" or $type == "m4a" or $type == "mp4v" or $type == "3gp" or $type == "3g2" ) { + $url = array (); + $url = implode( ", ", $url ); + return "
    "; + } elseif( $type == "avi" or $type == "divx" ) { + + return "video_config['width']}\" height=\"{$this->video_config['height']}\" codebase=\"http://go.divx.com/plugin/DivXBrowserPlugin.cab\"> + + + video_config['play']}\" /> + + + video_config['width']}\" height=\"{$this->video_config['height']}\" mode=\"zero\" autoPlay=\"{$this->video_config['play']}\" previewImage=\"{$option[1]}\" pluginspage=\"http://go.divx.com/plugin/download/\"> + + "; + + } else { + + return "video_config['width']}\" height=\"{$this->video_config['height']}\" classid=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\" standby=\"Loading Microsoft Windows Media Player components...\" type=\"application/x-oleobject\"> + + video_config['play']}\" /> + + + + + video_config['width']}\" height=\"{$this->video_config['height']}\" type=\"application/x-mplayer2\" autorewind=\"1\" showstatusbar=\"1\" showcontrols=\"1\" autostart=\"{$this->video_config['play']}\" allowchangedisplaysize=\"1\" volume=\"70\" stretchtofit=\"1\"> + "; + } + + } + + function build_audio($url) { + global $config; + + if( $url == "" ) return; + + if( preg_match( "/[?&;%<\[\]]/", $url ) ) { + + return "[audio=" . $url . "]"; + } + + $url = $this->clear_url( urldecode( $url ) ); + + $list = explode( ",", $url ); + $url = urlencode(trim($list[0])); + + $list = implode( ",", $list ); + $id_player = md5( microtime() ); + $color = array (); + + return ""; + } + + function build_image($url = "", $align = "") { + global $config; + + $url = trim( $url ); + $url = urldecode( $url ); + $option = explode( "|", trim( $align ) ); + $align = $option[0]; + + if( $align != "left" and $align != "right" ) $align = ''; + + if( preg_match( "/[?&;%<\[\]]/", $url ) ) { + if( $align != "" ) return "[img=" . $align . "]" . $url . "[/img]"; + else return "[img]" . $url . "[/img]"; + } + + $url = $this->clear_url( urldecode( $url ) ); + $info = $url; + $info = $info."|".$align; + if( $url == "" ) return; + + if( $option[1] != "" ) { + $alt = htmlspecialchars( strip_tags( stripslashes( $option[1] ) ), ENT_QUOTES ); + $info = $info."|".$alt; + $caption = "" . $alt . ""; + $alt = "alt=\"" . $alt . "\" title=\"" . $alt . "\" "; + } else { + $alt = htmlspecialchars( strip_tags( stripslashes( $_POST['title'] ) ), ENT_QUOTES ); + $caption = ""; + $alt = "alt=\"" . $alt . "\" title=\"" . $alt . "\" "; + } + + if( intval( $config['tag_img_width'] ) ) { + if (clean_url( $config['http_home_url'] ) != clean_url ( $url ) ) { + $img_info = @getimagesize( $url ); + if( $img_info[0] > $config['tag_img_width'] ) { + $out_heigh = ($img_info[1] / 100) * ($config['tag_img_width'] / ($img_info[0] / 100)); + $out_heigh = floor( $out_heigh ); + if( $align == '' ) return "{$caption}"; + else return "{$caption}"; + } + } + } + + + if( $align == '' ) return ""; + else return ""; + } + + function decode_dle_img($txt) { + $txt = stripslashes( $txt ); + $txt = explode("|", $txt ); + $url = $txt[0]; + $align = $txt[1]; + $alt = $txt[2]; + $extra = ""; + + if( ! $align and ! $alt ) return "[img]" . $url . "[/img]"; + + if( $align ) $extra = $align; + if( $alt ) { + + $alt = str_replace("'", "'", $alt); + $alt = str_replace(""", '"', $alt); + $alt = str_replace("&", '&', $alt); + $extra .= "|" . $alt; + } + return "[img=" . $extra . "]" . $url . "[/img]"; + } + + function build_thumb($gurl = "", $url = "", $align = "") { + $url = trim( $url ); + $gurl = trim( $gurl ); + $option = explode( "|", trim( $align ) ); + + $align = $option[0]; + + if( $align != "left" and $align != "right" ) $align = ''; + + if( preg_match( "/[?&;%<\[\]]/", $gurl ) ) { + if( $align != "" ) return "[thumb=" . $align . "]" . $gurl . "[/thumb]"; + else return "[thumb]" . $gurl . "[/thumb]"; + } + + $url = $this->clear_url( urldecode( $url ) ); + $gurl = $this->clear_url( urldecode( $gurl ) ); + + if( $gurl == "" or $url == "" ) return; + + if( $option[1] != "" ) { + $alt = htmlspecialchars( strip_tags( stripslashes( $option[1] ) ), ENT_QUOTES ); + $caption = "" . $alt . ""; + $alt = "alt=\"" . $alt . "\" title=\"" . $alt . "\" "; + } else { + $alt = htmlspecialchars( strip_tags( stripslashes( $_POST['title'] ) ), ENT_QUOTES ); + $alt = "alt='" . $alt . "' title='" . $alt . "' "; + $caption = ""; + } + + if( $align == '' ) return "{$caption}"; + else return "{$caption}"; + } + + function build_spoiler($title = "") { + global $lang; + + $title = trim( $title ); + + $title = stripslashes( $title ); + $title = str_replace( "&amp;", "&", $title ); + $title = preg_replace( "/javascript:/i", "javascript: ", $title ); + + $id_spoiler = "sp".md5( microtime() ); + + if( ! $title ) {return "
    \"\" " . $lang['spoiler_title'] . "
    "; + } else {return "
    \"\" " . $title . "
    ";} + } + + function clear_url($url) { + + $url = strip_tags( trim( stripslashes( $url ) ) ); + + $url = str_replace( '\"', '"', $url ); + $url = str_replace( "'", "", $url ); + $url = str_replace( '"', "", $url ); + + if( ! $this->safe_mode or $this->wysiwyg ) {$url = htmlspecialchars( $url, ENT_QUOTES );} + + $url = str_ireplace( "document.cookie", "document.cookie", $url ); + $url = str_replace( " ", "%20", $url ); + $url = str_replace( "<", "<", $url ); + $url = str_replace( ">", ">", $url ); + $url = preg_replace( "/javascript:/i", "javascript:", $url ); + $url = preg_replace( "/data:/i", "data:", $url ); + + return $url; + } + + function decode_leech($url = "", $show = "") { + + $show = stripslashes( $show ); + + if( $this->leech_mode ) return "[url=" . $url . "]" . $show . "[/url]"; + + $url = explode( "url=", $url ); + $url = end( $url ); + $url = rawurldecode( $url ); + $url = base64_decode( $url ); + $url = str_replace("&","&", $url ); + + return "[url=" . $url . "]" . $show . "[/url]"; + } + + function decode_url($url = "", $show = "") { + + $show = stripslashes( $show ); + + $url = str_replace("&","&", $url ); + + return "[url=" . $url . "]" . $show . "[/url]"; + } + + function decode_thumb($txt) { + $align = false; + $alt = false; + $extra = ""; + $txt = stripslashes( $txt ); + + $url = str_replace( "safe_mode ) $allow_find = false; + if ( $word_arr[5] == 2 AND !$this->safe_mode ) $allow_find = false; + + if ( $allow_find ) { + + if( $word_arr[3] ) { + + $find_text = "#(^|\b|\s|\
    )" . preg_quote( $word_arr[1], "#" ) . "(\b|!|\?|\.|,|$)#".$register; + + if( $word_arr[2] == "" ) $replace_text = "\\1"; + else $replace_text = "\\1" . $word_arr[2] . ""; + + } else { + + $find_text = "#(" . preg_quote( $word_arr[1], "#" ) . ")#".$register; + + if( $word_arr[2] == "" ) $replace_text = ""; + else $replace_text = "" . $word_arr[2] . ""; + + } + + if ( $word_arr[6] ) { + + if ( preg_match($find_text, $source) ) { + + $this->not_allowed_text = true; + return $source; + + } + + } else { + + $find[] = $find_text; + $replace[] = $replace_text; + } + + } + + } + + if( !count( $find ) ) return $source; + + $source = preg_split( '((>)|(<))', $source, - 1, PREG_SPLIT_DELIM_CAPTURE ); + $count = count( $source ); + + for($i = 0; $i < $count; $i ++) { + if( $source[$i] == "<" or $source[$i] == "[" ) { + $i ++; + continue; + } + + if( $source[$i] != "" ) $source[$i] = preg_replace( $find, $replace, $source[$i] ); + } + + $source = join( "", $source ); + + } else { + + $source = preg_replace( "#(.+?)#", "\\1", $source ); + + } + + return $source; + } + +} +?> \ No newline at end of file diff --git a/system/classes/rss.class.php b/system/classes/rss.class.php new file mode 100644 index 0000000..d265534 --- /dev/null +++ b/system/classes/rss.class.php @@ -0,0 +1,240 @@ +max_news = $max; + + $this->xml_parser = xml_parser_create(); + xml_set_object( $this->xml_parser, $this ); + xml_set_element_handler( $this->xml_parser, "startElement", "endElement" ); + xml_set_character_data_handler( $this->xml_parser, 'elementContent' ); + $this->rss_option = xml_parser_get_option( $this->xml_parser, XML_OPTION_TARGET_ENCODING ); + + if( ! ($data = $this->_get_contents( $file )) ) { + $this->content[0]['title'] = "Fatal Error"; + $this->content[0]['description'] = "Fatal Error: could not open XML input (" . $file . ")"; + $this->content[0]['link'] = "#"; + $this->content[0]['date'] = time(); + } + + preg_replace( "#encoding=\"(.+?)\"#ie", "\$this->get_charset('\\1')", $data ); + + if( ! xml_parse( $this->xml_parser, $data ) ) { + + $error_code = xml_get_error_code( $this->xml_parser ); + $error_line = xml_get_current_line_number( $this->xml_parser ); + + if( $error_code == 4 ) { + + $this->content = array (); + $this->index = 0; + $this->tag_open = false; + $this->tagname = ""; + + $this->xml_parser = xml_parser_create(); + xml_set_object( $this->xml_parser, $this ); + xml_set_element_handler( $this->xml_parser, "startElement", "endElement" ); + xml_set_character_data_handler( $this->xml_parser, 'elementContent' ); + $this->rss_option = xml_parser_get_option( $this->xml_parser, XML_OPTION_TARGET_ENCODING ); + + $data = iconv( $this->rss_charset, "utf-8", $data ); + + if( ! xml_parse( $this->xml_parser, $data ) ) { + + $this->content[0]['title'] = "XML error in File: " . $file; + $this->content[0]['description'] = sprintf( "XML error: %s at line %d", xml_error_string( xml_get_error_code( $this->xml_parser ) ), xml_get_current_line_number( $this->xml_parser ) ); + $this->content[0]['link'] = "#"; + $this->content[0]['date'] = time(); + + } + + } else { + + $this->content[0]['title'] = "XML error in File: " . $file; + $this->content[0]['description'] = sprintf( "XML error: %s at line %d", xml_error_string( $error_code ), $error_line ); + $this->content[0]['link'] = "#"; + $this->content[0]['date'] = time(); + + } + + } + + xml_parser_free( $this->xml_parser ); + } + + function _get_contents($file) { + + $data = false; + + if( function_exists( 'curl_init' ) ) { + + $ch = curl_init(); + curl_setopt( $ch, CURLOPT_URL, $file ); + curl_setopt( $ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] ); + @curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ); + curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); + curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 10 ); + + $data = curl_exec( $ch ); + curl_close( $ch ); + + } + + if( $data ) { + + return $data; + + } else { + + $data = @file_get_contents( $file ); + + if( $data ) return $data; + else return false; + + } + + } + + function pre_parse($date) { + + global $config; + + $i = 0; + + foreach ( $this->content as $content ) { + + $content_date = strtotime( $content['date'] ); + + if( $date ) { + $this->content[$i]['date'] = time() + ($config['date_adjust'] * 60); + } else { + $this->content[$i]['date'] = $content_date; + } + + if( ! $i ) $this->lastdate = $content_date; + + if( $i and $content_date > $this->lastdate ) $this->lastdate = $content_date; + + if( $this->pre_lastdate != "" and $this->pre_lastdate >= $content_date ) { + unset( $this->content[$i] ); + $i ++; + continue; + } + + $this->content[$i]['description'] = rtrim( $this->content[$i]['description'] ); + $this->content[$i]['content'] = rtrim( $this->content[$i]['content'] ); + + if( $this->content[$i]['content'] != '' ) { + $this->content[$i]['description'] = $this->content[$i]['content']; + } + unset( $this->content[$i]['content'] ); + + if( preg_match_all( "#
    #si", $this->content[$i]['description'], $out ) ) { + + $this->content[$i]['description'] = preg_replace( "#
    #si", "", $this->content[$i]['description'] ); + $this->content[$i]['description'] = substr( $this->content[$i]['description'], 0, - 6 ); + + } + + $i ++; + } + + } + + function startElement($parser, $name, $attrs) { + + if( $name == "ITEM" ) { + $this->tag_open = true; + } + + $this->tagname = $name; + } + + function endElement($parser, $name) { + + if( $name == "ITEM" ) { + $this->index ++; + $this->tag_open = false; + } + } + + function elementContent($parser, $data) { + + if( $this->tag_open and $this->index < $this->max_news ) { + + switch ($this->tagname) { + case 'TITLE' : + $this->content[$this->index]['title'] .= $data; + break; + case 'DESCRIPTION' : + $this->content[$this->index]['description'] .= $data; + break; + case 'CONTENT:ENCODED' : + $this->content[$this->index]['content'] .= $data; + break; + case 'LINK' : + $this->content[$this->index]['link'] .= $data; + break; + case 'PUBDATE' : + $this->content[$this->index]['date'] .= $data; + break; + case 'CATEGORY' : + $this->content[$this->index]['category'] .= $data; + break; + case 'DC:CREATOR' : + $this->content[$this->index]['author'] .= $data; + break; + + } + } + + } + + function get_charset($charset) { + + if( $this->rss_charset == '' ) $this->rss_charset = strtolower( $charset ); + + } + + function convert($from, $to) { + + if( $from == '' ) return; + + if( function_exists( 'iconv' ) ) { + $i = 0; + + foreach ( $this->content as $content ) { + + if( @iconv( $from, $to . "//IGNORE", $this->content[$i]['title'] ) ) $this->content[$i]['title'] = @iconv( $from, $to . "//IGNORE", $this->content[$i]['title'] ); + + if( @iconv( $from, $to . "//IGNORE", $this->content[$i]['description'] ) ) $this->content[$i]['description'] = @iconv( $from, $to . "//IGNORE", $this->content[$i]['description'] ); + + if( $this->content[$i]['content'] and @iconv( $from, $to . "//IGNORE", $this->content[$i]['content'] ) ) $this->content[$i]['content'] = @iconv( $from, $to . "//IGNORE", $this->content[$i]['content'] ); + + if( $this->content[$i]['category'] and @iconv( $from, $to . "//IGNORE", $this->content[$i]['category'] ) ) $this->content[$i]['category'] = @iconv( $from, $to . "//IGNORE", $this->content[$i]['category'] ); + + if( $this->content[$i]['author'] and @iconv( $from, $to . "//IGNORE", $this->content[$i]['author'] ) ) $this->content[$i]['author'] = @iconv( $from, $to . "//IGNORE", $this->content[$i]['author'] ); + + $i ++; + + } + } + } +} + +?> \ No newline at end of file diff --git a/system/classes/sphinx.api.php b/system/classes/sphinx.api.php new file mode 100644 index 0000000..e8ec772 --- /dev/null +++ b/system/classes/sphinx.api.php @@ -0,0 +1,1611 @@ +=8 ) + { + $v = (int)$v; + return pack ( "NN", $v>>32, $v&0xFFFFFFFF ); + } + + // x32, int + if ( is_int($v) ) + return pack ( "NN", $v < 0 ? -1 : 0, $v ); + + // x32, bcmath + if ( function_exists("bcmul") ) + { + if ( bccomp ( $v, 0 ) == -1 ) + $v = bcadd ( "18446744073709551616", $v ); + $h = bcdiv ( $v, "4294967296", 0 ); + $l = bcmod ( $v, "4294967296" ); + return pack ( "NN", (float)$h, (float)$l ); // conversion to float is intentional; int would lose 31st bit + } + + // x32, no-bcmath + $p = max(0, strlen($v) - 13); + $lo = abs((float)substr($v, $p)); + $hi = abs((float)substr($v, 0, $p)); + + $m = $lo + $hi*1316134912.0; // (10 ^ 13) % (1 << 32) = 1316134912 + $q = floor($m/4294967296.0); + $l = $m - ($q*4294967296.0); + $h = $hi*2328.0 + $q; // (10 ^ 13) / (1 << 32) = 2328 + + if ( $v<0 ) + { + if ( $l==0 ) + $h = 4294967296.0 - $h; + else + { + $h = 4294967295.0 - $h; + $l = 4294967296.0 - $l; + } + } + return pack ( "NN", $h, $l ); +} + +/// pack 64-bit unsigned +function sphPackU64 ( $v ) +{ + assert ( is_numeric($v) ); + + // x64 + if ( PHP_INT_SIZE>=8 ) + { + assert ( $v>=0 ); + + // x64, int + if ( is_int($v) ) + return pack ( "NN", $v>>32, $v&0xFFFFFFFF ); + + // x64, bcmath + if ( function_exists("bcmul") ) + { + $h = bcdiv ( $v, 4294967296, 0 ); + $l = bcmod ( $v, 4294967296 ); + return pack ( "NN", $h, $l ); + } + + // x64, no-bcmath + $p = max ( 0, strlen($v) - 13 ); + $lo = (int)substr ( $v, $p ); + $hi = (int)substr ( $v, 0, $p ); + + $m = $lo + $hi*1316134912; + $l = $m % 4294967296; + $h = $hi*2328 + (int)($m/4294967296); + + return pack ( "NN", $h, $l ); + } + + // x32, int + if ( is_int($v) ) + return pack ( "NN", 0, $v ); + + // x32, bcmath + if ( function_exists("bcmul") ) + { + $h = bcdiv ( $v, "4294967296", 0 ); + $l = bcmod ( $v, "4294967296" ); + return pack ( "NN", (float)$h, (float)$l ); // conversion to float is intentional; int would lose 31st bit + } + + // x32, no-bcmath + $p = max(0, strlen($v) - 13); + $lo = (float)substr($v, $p); + $hi = (float)substr($v, 0, $p); + + $m = $lo + $hi*1316134912.0; + $q = floor($m / 4294967296.0); + $l = $m - ($q * 4294967296.0); + $h = $hi*2328.0 + $q; + + return pack ( "NN", $h, $l ); +} + +// unpack 64-bit unsigned +function sphUnpackU64 ( $v ) +{ + list ( $hi, $lo ) = array_values ( unpack ( "N*N*", $v ) ); + + if ( PHP_INT_SIZE>=8 ) + { + if ( $hi<0 ) $hi += (1<<32); // because php 5.2.2 to 5.2.5 is totally fucked up again + if ( $lo<0 ) $lo += (1<<32); + + // x64, int + if ( $hi<=2147483647 ) + return ($hi<<32) + $lo; + + // x64, bcmath + if ( function_exists("bcmul") ) + return bcadd ( $lo, bcmul ( $hi, "4294967296" ) ); + + // x64, no-bcmath + $C = 100000; + $h = ((int)($hi / $C) << 32) + (int)($lo / $C); + $l = (($hi % $C) << 32) + ($lo % $C); + if ( $l>$C ) + { + $h += (int)($l / $C); + $l = $l % $C; + } + + if ( $h==0 ) + return $l; + return sprintf ( "%d%05d", $h, $l ); + } + + // x32, int + if ( $hi==0 ) + { + if ( $lo>0 ) + return $lo; + return sprintf ( "%u", $lo ); + } + + $hi = sprintf ( "%u", $hi ); + $lo = sprintf ( "%u", $lo ); + + // x32, bcmath + if ( function_exists("bcmul") ) + return bcadd ( $lo, bcmul ( $hi, "4294967296" ) ); + + // x32, no-bcmath + $hi = (float)$hi; + $lo = (float)$lo; + + $q = floor($hi/10000000.0); + $r = $hi - $q*10000000.0; + $m = $lo + $r*4967296.0; + $mq = floor($m/10000000.0); + $l = $m - $mq*10000000.0; + $h = $q*4294967296.0 + $r*429.0 + $mq; + + $h = sprintf ( "%.0f", $h ); + $l = sprintf ( "%07.0f", $l ); + if ( $h=="0" ) + return sprintf( "%.0f", (float)$l ); + return $h . $l; +} + +// unpack 64-bit signed +function sphUnpackI64 ( $v ) +{ + list ( $hi, $lo ) = array_values ( unpack ( "N*N*", $v ) ); + + // x64 + if ( PHP_INT_SIZE>=8 ) + { + if ( $hi<0 ) $hi += (1<<32); // because php 5.2.2 to 5.2.5 is totally fucked up again + if ( $lo<0 ) $lo += (1<<32); + + return ($hi<<32) + $lo; + } + + // x32, int + if ( $hi==0 ) + { + if ( $lo>0 ) + return $lo; + return sprintf ( "%u", $lo ); + } + // x32, int + elseif ( $hi==-1 ) + { + if ( $lo<0 ) + return $lo; + return sprintf ( "%.0f", $lo - 4294967296.0 ); + } + + $neg = ""; + $c = 0; + if ( $hi<0 ) + { + $hi = ~$hi; + $lo = ~$lo; + $c = 1; + $neg = "-"; + } + + $hi = sprintf ( "%u", $hi ); + $lo = sprintf ( "%u", $lo ); + + // x32, bcmath + if ( function_exists("bcmul") ) + return $neg . bcadd ( bcadd ( $lo, bcmul ( $hi, "4294967296" ) ), $c ); + + // x32, no-bcmath + $hi = (float)$hi; + $lo = (float)$lo; + + $q = floor($hi/10000000.0); + $r = $hi - $q*10000000.0; + $m = $lo + $r*4967296.0; + $mq = floor($m/10000000.0); + $l = $m - $mq*10000000.0 + $c; + $h = $q*4294967296.0 + $r*429.0 + $mq; + + $h = sprintf ( "%.0f", $h ); + $l = sprintf ( "%07.0f", $l ); + if ( $h=="0" ) + return $neg . sprintf( "%.0f", (float)$l ); + return $neg . $h . $l; +} + + +/// sphinx searchd client class +class SphinxClient +{ + var $_host; ///< searchd host (default is "localhost") + var $_port; ///< searchd port (default is 3312) + var $_offset; ///< how many records to seek from result-set start (default is 0) + var $_limit; ///< how many records to return from result-set starting at offset (default is 20) + var $_mode; ///< query matching mode (default is SPH_MATCH_ALL) + var $_weights; ///< per-field weights (default is 1 for all fields) + var $_sort; ///< match sorting mode (default is SPH_SORT_RELEVANCE) + var $_sortby; ///< attribute to sort by (defualt is "") + var $_min_id; ///< min ID to match (default is 0, which means no limit) + var $_max_id; ///< max ID to match (default is 0, which means no limit) + var $_filters; ///< search filters + var $_groupby; ///< group-by attribute name + var $_groupfunc; ///< group-by function (to pre-process group-by attribute value with) + var $_groupsort; ///< group-by sorting clause (to sort groups in result set with) + var $_groupdistinct;///< group-by count-distinct attribute + var $_maxmatches; ///< max matches to retrieve + var $_cutoff; ///< cutoff to stop searching at (default is 0) + var $_retrycount; ///< distributed retries count + var $_retrydelay; ///< distributed retries delay + var $_anchor; ///< geographical anchor point + var $_indexweights; ///< per-index weights + var $_ranker; ///< ranking mode (default is SPH_RANK_PROXIMITY_BM25) + var $_maxquerytime; ///< max query time, milliseconds (default is 0, do not limit) + var $_fieldweights; ///< per-field-name weights + var $_overrides; ///< per-query attribute values overrides + var $_select; ///< select-list (attributes or expressions, with optional aliases) + + var $_error; ///< last error message + var $_warning; ///< last warning message + var $_connerror; ///< connection error vs remote error flag + + var $_reqs; ///< requests array for multi-query + var $_mbenc; ///< stored mbstring encoding + var $_arrayresult; ///< whether $result["matches"] should be a hash or an array + var $_timeout; ///< connect timeout + + ///////////////////////////////////////////////////////////////////////////// + // common stuff + ///////////////////////////////////////////////////////////////////////////// + + /// create a new client object and fill defaults + function SphinxClient () + { + // per-client-object settings + $this->_host = "localhost"; + $this->_port = 3312; + $this->_path = false; + $this->_socket = false; + + // per-query settings + $this->_offset = 0; + $this->_limit = 20; + $this->_mode = SPH_MATCH_ALL; + $this->_weights = array (); + $this->_sort = SPH_SORT_RELEVANCE; + $this->_sortby = ""; + $this->_min_id = 0; + $this->_max_id = 0; + $this->_filters = array (); + $this->_groupby = ""; + $this->_groupfunc = SPH_GROUPBY_DAY; + $this->_groupsort = "@group desc"; + $this->_groupdistinct= ""; + $this->_maxmatches = 1000; + $this->_cutoff = 0; + $this->_retrycount = 0; + $this->_retrydelay = 0; + $this->_anchor = array (); + $this->_indexweights= array (); + $this->_ranker = SPH_RANK_PROXIMITY_BM25; + $this->_maxquerytime= 0; + $this->_fieldweights= array(); + $this->_overrides = array(); + $this->_select = "*"; + + $this->_error = ""; // per-reply fields (for single-query case) + $this->_warning = ""; + $this->_connerror = false; + + $this->_reqs = array (); // requests storage (for multi-query case) + $this->_mbenc = ""; + $this->_arrayresult = false; + $this->_timeout = 0; + } + + function __destruct() + { + if ( $this->_socket !== false ) + fclose ( $this->_socket ); + } + + /// get last error message (string) + function GetLastError () + { + return $this->_error; + } + + /// get last warning message (string) + function GetLastWarning () + { + return $this->_warning; + } + + /// get last error flag (to tell network connection errors from searchd errors or broken responses) + function IsConnectError() + { + return $this->_connerror; + } + + /// set searchd host name (string) and port (integer) + function SetServer ( $host, $port = 0 ) + { + assert ( is_string($host) ); + if ( $host[0] == '/') + { + $this->_path = 'unix://' . $host; + return; + } + if ( substr ( $host, 0, 7 )=="unix://" ) + { + $this->_path = $host; + return; + } + + assert ( is_int($port) ); + $this->_host = $host; + $this->_port = $port; + $this->_path = ''; + + } + + /// set server connection timeout (0 to remove) + function SetConnectTimeout ( $timeout ) + { + assert ( is_numeric($timeout) ); + $this->_timeout = $timeout; + } + + + function _Send ( $handle, $data, $length ) + { + if ( feof($handle) || fwrite ( $handle, $data, $length ) !== $length ) + { + $this->_error = 'connection unexpectedly closed (timed out?)'; + $this->_connerror = true; + return false; + } + return true; + } + + ///////////////////////////////////////////////////////////////////////////// + + /// enter mbstring workaround mode + function _MBPush () + { + $this->_mbenc = ""; + if ( ini_get ( "mbstring.func_overload" ) & 2 ) + { + $this->_mbenc = mb_internal_encoding(); + mb_internal_encoding ( "latin1" ); + } + } + + /// leave mbstring workaround mode + function _MBPop () + { + if ( $this->_mbenc ) + mb_internal_encoding ( $this->_mbenc ); + } + + /// connect to searchd server + function _Connect () + { + if ( $this->_socket !== false ) + return $this->_socket; + + $errno = 0; + $errstr = ""; + $this->_connerror = false; + + if ( $this->_path ) + { + $host = $this->_path; + $port = 0; + } + else + { + $host = $this->_host; + $port = $this->_port; + } + + if ( $this->_timeout<=0 ) + $fp = @fsockopen ( $host, $port, $errno, $errstr ); + else + $fp = @fsockopen ( $host, $port, $errno, $errstr, $this->_timeout ); + + if ( !$fp ) + { + if ( $this->_path ) + $location = $this->_path; + else + $location = "{$this->_host}:{$this->_port}"; + + $errstr = trim ( $errstr ); + $this->_error = "connection to $location failed (errno=$errno, msg=$errstr)"; + $this->_connerror = true; + return false; + } + + // send my version + // this is a subtle part. we must do it before (!) reading back from searchd. + // because otherwise under some conditions (reported on FreeBSD for instance) + // TCP stack could throttle write-write-read pattern because of Nagle. + if ( !$this->_Send ( $fp, pack ( "N", 1 ), 4 ) ) + { + fclose ( $fp ); + $this->_error = "failed to send client protocol version"; + return false; + } + + // check version + list(,$v) = unpack ( "N*", fread ( $fp, 4 ) ); + $v = (int)$v; + if ( $v<1 ) + { + fclose ( $fp ); + $this->_error = "expected searchd protocol version 1+, got version '$v'"; + return false; + } + + return $fp; + } + + /// get and check response packet from searchd server + function _GetResponse ( $fp, $client_ver ) + { + $response = ""; + $len = 0; + + $header = fread ( $fp, 8 ); + if ( strlen($header)==8 ) + { + list ( $status, $ver, $len ) = array_values ( unpack ( "n2a/Nb", $header ) ); + $left = $len; + while ( $left>0 && !feof($fp) ) + { + $chunk = fread ( $fp, $left ); + if ( $chunk ) + { + $response .= $chunk; + $left -= strlen($chunk); + } + } + } + if ( $this->_socket === false ) + fclose ( $fp ); + + // check response + $read = strlen ( $response ); + if ( !$response || $read!=$len ) + { + $this->_error = $len + ? "failed to read searchd response (status=$status, ver=$ver, len=$len, read=$read)" + : "received zero-sized searchd response"; + return false; + } + + // check status + if ( $status==SEARCHD_WARNING ) + { + list(,$wlen) = unpack ( "N*", substr ( $response, 0, 4 ) ); + $this->_warning = substr ( $response, 4, $wlen ); + return substr ( $response, 4+$wlen ); + } + if ( $status==SEARCHD_ERROR ) + { + $this->_error = "searchd error: " . substr ( $response, 4 ); + return false; + } + if ( $status==SEARCHD_RETRY ) + { + $this->_error = "temporary searchd error: " . substr ( $response, 4 ); + return false; + } + if ( $status!=SEARCHD_OK ) + { + $this->_error = "unknown status code '$status'"; + return false; + } + + // check version + if ( $ver<$client_ver ) + { + $this->_warning = sprintf ( "searchd command v.%d.%d older than client's v.%d.%d, some options might not work", + $ver>>8, $ver&0xff, $client_ver>>8, $client_ver&0xff ); + } + + return $response; + } + + ///////////////////////////////////////////////////////////////////////////// + // searching + ///////////////////////////////////////////////////////////////////////////// + + /// set offset and count into result set, + /// and optionally set max-matches and cutoff limits + function SetLimits ( $offset, $limit, $max=0, $cutoff=0 ) + { + assert ( is_int($offset) ); + assert ( is_int($limit) ); + assert ( $offset>=0 ); + assert ( $limit>0 ); + assert ( $max>=0 ); + $this->_offset = $offset; + $this->_limit = $limit; + if ( $max>0 ) + $this->_maxmatches = $max; + if ( $cutoff>0 ) + $this->_cutoff = $cutoff; + } + + /// set maximum query time, in milliseconds, per-index + /// integer, 0 means "do not limit" + function SetMaxQueryTime ( $max ) + { + assert ( is_int($max) ); + assert ( $max>=0 ); + $this->_maxquerytime = $max; + } + + /// set matching mode + function SetMatchMode ( $mode ) + { + assert ( $mode==SPH_MATCH_ALL + || $mode==SPH_MATCH_ANY + || $mode==SPH_MATCH_PHRASE + || $mode==SPH_MATCH_BOOLEAN + || $mode==SPH_MATCH_EXTENDED + || $mode==SPH_MATCH_FULLSCAN + || $mode==SPH_MATCH_EXTENDED2 ); + $this->_mode = $mode; + } + + /// set ranking mode + function SetRankingMode ( $ranker ) + { + assert ( $ranker>=0 && $ranker_ranker = $ranker; + } + + /// set matches sorting mode + function SetSortMode ( $mode, $sortby="" ) + { + assert ( + $mode==SPH_SORT_RELEVANCE || + $mode==SPH_SORT_ATTR_DESC || + $mode==SPH_SORT_ATTR_ASC || + $mode==SPH_SORT_TIME_SEGMENTS || + $mode==SPH_SORT_EXTENDED || + $mode==SPH_SORT_EXPR ); + assert ( is_string($sortby) ); + assert ( $mode==SPH_SORT_RELEVANCE || strlen($sortby)>0 ); + + $this->_sort = $mode; + $this->_sortby = $sortby; + } + + /// bind per-field weights by order + /// DEPRECATED; use SetFieldWeights() instead + function SetWeights ( $weights ) + { + assert ( is_array($weights) ); + foreach ( $weights as $weight ) + assert ( is_int($weight) ); + + $this->_weights = $weights; + } + + /// bind per-field weights by name + function SetFieldWeights ( $weights ) + { + assert ( is_array($weights) ); + foreach ( $weights as $name=>$weight ) + { + assert ( is_string($name) ); + assert ( is_int($weight) ); + } + $this->_fieldweights = $weights; + } + + /// bind per-index weights by name + function SetIndexWeights ( $weights ) + { + assert ( is_array($weights) ); + foreach ( $weights as $index=>$weight ) + { + assert ( is_string($index) ); + assert ( is_int($weight) ); + } + $this->_indexweights = $weights; + } + + /// set IDs range to match + /// only match records if document ID is beetwen $min and $max (inclusive) + function SetIDRange ( $min, $max ) + { + assert ( is_numeric($min) ); + assert ( is_numeric($max) ); + assert ( $min<=$max ); + $this->_min_id = $min; + $this->_max_id = $max; + } + + /// set values set filter + /// only match records where $attribute value is in given set + function SetFilter ( $attribute, $values, $exclude=false ) + { + assert ( is_string($attribute) ); + assert ( is_array($values) ); + assert ( count($values) ); + + if ( is_array($values) && count($values) ) + { + foreach ( $values as $value ) + assert ( is_numeric($value) ); + + $this->_filters[] = array ( "type"=>SPH_FILTER_VALUES, "attr"=>$attribute, "exclude"=>$exclude, "values"=>$values ); + } + } + + /// set range filter + /// only match records if $attribute value is beetwen $min and $max (inclusive) + function SetFilterRange ( $attribute, $min, $max, $exclude=false ) + { + assert ( is_string($attribute) ); + assert ( is_numeric($min) ); + assert ( is_numeric($max) ); + assert ( $min<=$max ); + + $this->_filters[] = array ( "type"=>SPH_FILTER_RANGE, "attr"=>$attribute, "exclude"=>$exclude, "min"=>$min, "max"=>$max ); + } + + /// set float range filter + /// only match records if $attribute value is beetwen $min and $max (inclusive) + function SetFilterFloatRange ( $attribute, $min, $max, $exclude=false ) + { + assert ( is_string($attribute) ); + assert ( is_float($min) ); + assert ( is_float($max) ); + assert ( $min<=$max ); + + $this->_filters[] = array ( "type"=>SPH_FILTER_FLOATRANGE, "attr"=>$attribute, "exclude"=>$exclude, "min"=>$min, "max"=>$max ); + } + + /// setup anchor point for geosphere distance calculations + /// required to use @geodist in filters and sorting + /// latitude and longitude must be in radians + function SetGeoAnchor ( $attrlat, $attrlong, $lat, $long ) + { + assert ( is_string($attrlat) ); + assert ( is_string($attrlong) ); + assert ( is_float($lat) ); + assert ( is_float($long) ); + + $this->_anchor = array ( "attrlat"=>$attrlat, "attrlong"=>$attrlong, "lat"=>$lat, "long"=>$long ); + } + + /// set grouping attribute and function + function SetGroupBy ( $attribute, $func, $groupsort="@group desc" ) + { + assert ( is_string($attribute) ); + assert ( is_string($groupsort) ); + assert ( $func==SPH_GROUPBY_DAY + || $func==SPH_GROUPBY_WEEK + || $func==SPH_GROUPBY_MONTH + || $func==SPH_GROUPBY_YEAR + || $func==SPH_GROUPBY_ATTR + || $func==SPH_GROUPBY_ATTRPAIR ); + + $this->_groupby = $attribute; + $this->_groupfunc = $func; + $this->_groupsort = $groupsort; + } + + /// set count-distinct attribute for group-by queries + function SetGroupDistinct ( $attribute ) + { + assert ( is_string($attribute) ); + $this->_groupdistinct = $attribute; + } + + /// set distributed retries count and delay + function SetRetries ( $count, $delay=0 ) + { + assert ( is_int($count) && $count>=0 ); + assert ( is_int($delay) && $delay>=0 ); + $this->_retrycount = $count; + $this->_retrydelay = $delay; + } + + /// set result set format (hash or array; hash by default) + /// PHP specific; needed for group-by-MVA result sets that may contain duplicate IDs + function SetArrayResult ( $arrayresult ) + { + assert ( is_bool($arrayresult) ); + $this->_arrayresult = $arrayresult; + } + + /// set attribute values override + /// there can be only one override per attribute + /// $values must be a hash that maps document IDs to attribute values + function SetOverride ( $attrname, $attrtype, $values ) + { + assert ( is_string ( $attrname ) ); + assert ( in_array ( $attrtype, array ( SPH_ATTR_INTEGER, SPH_ATTR_TIMESTAMP, SPH_ATTR_BOOL, SPH_ATTR_FLOAT, SPH_ATTR_BIGINT ) ) ); + assert ( is_array ( $values ) ); + + $this->_overrides[$attrname] = array ( "attr"=>$attrname, "type"=>$attrtype, "values"=>$values ); + } + + /// set select-list (attributes or expressions), SQL-like syntax + function SetSelect ( $select ) + { + assert ( is_string ( $select ) ); + $this->_select = $select; + } + + ////////////////////////////////////////////////////////////////////////////// + + /// clear all filters (for multi-queries) + function ResetFilters () + { + $this->_filters = array(); + $this->_anchor = array(); + } + + /// clear groupby settings (for multi-queries) + function ResetGroupBy () + { + $this->_groupby = ""; + $this->_groupfunc = SPH_GROUPBY_DAY; + $this->_groupsort = "@group desc"; + $this->_groupdistinct= ""; + } + + /// clear all attribute value overrides (for multi-queries) + function ResetOverrides () + { + $this->_overrides = array (); + } + + ////////////////////////////////////////////////////////////////////////////// + + /// connect to searchd server, run given search query through given indexes, + /// and return the search results + function Query ( $query, $index="*", $comment="" ) + { + assert ( empty($this->_reqs) ); + + $this->AddQuery ( $query, $index, $comment ); + $results = $this->RunQueries (); + $this->_reqs = array (); // just in case it failed too early + + if ( !is_array($results) ) + return false; // probably network error; error message should be already filled + + $this->_error = $results[0]["error"]; + $this->_warning = $results[0]["warning"]; + if ( $results[0]["status"]==SEARCHD_ERROR ) + return false; + else + return $results[0]; + } + + /// helper to pack floats in network byte order + function _PackFloat ( $f ) + { + $t1 = pack ( "f", $f ); // machine order + list(,$t2) = unpack ( "L*", $t1 ); // int in machine order + return pack ( "N", $t2 ); + } + + /// add query to multi-query batch + /// returns index into results array from RunQueries() call + function AddQuery ( $query, $index="*", $comment="" ) + { + // mbstring workaround + $this->_MBPush (); + + // build request + $req = pack ( "NNNNN", $this->_offset, $this->_limit, $this->_mode, $this->_ranker, $this->_sort ); // mode and limits + $req .= pack ( "N", strlen($this->_sortby) ) . $this->_sortby; + $req .= pack ( "N", strlen($query) ) . $query; // query itself + $req .= pack ( "N", count($this->_weights) ); // weights + foreach ( $this->_weights as $weight ) + $req .= pack ( "N", (int)$weight ); + $req .= pack ( "N", strlen($index) ) . $index; // indexes + $req .= pack ( "N", 1 ); // id64 range marker + $req .= sphPackU64 ( $this->_min_id ) . sphPackU64 ( $this->_max_id ); // id64 range + + // filters + $req .= pack ( "N", count($this->_filters) ); + foreach ( $this->_filters as $filter ) + { + $req .= pack ( "N", strlen($filter["attr"]) ) . $filter["attr"]; + $req .= pack ( "N", $filter["type"] ); + switch ( $filter["type"] ) + { + case SPH_FILTER_VALUES: + $req .= pack ( "N", count($filter["values"]) ); + foreach ( $filter["values"] as $value ) + $req .= sphPackI64 ( $value ); + break; + + case SPH_FILTER_RANGE: + $req .= sphPackI64 ( $filter["min"] ) . sphPackI64 ( $filter["max"] ); + break; + + case SPH_FILTER_FLOATRANGE: + $req .= $this->_PackFloat ( $filter["min"] ) . $this->_PackFloat ( $filter["max"] ); + break; + + default: + assert ( 0 && "internal error: unhandled filter type" ); + } + $req .= pack ( "N", $filter["exclude"] ); + } + + // group-by clause, max-matches count, group-sort clause, cutoff count + $req .= pack ( "NN", $this->_groupfunc, strlen($this->_groupby) ) . $this->_groupby; + $req .= pack ( "N", $this->_maxmatches ); + $req .= pack ( "N", strlen($this->_groupsort) ) . $this->_groupsort; + $req .= pack ( "NNN", $this->_cutoff, $this->_retrycount, $this->_retrydelay ); + $req .= pack ( "N", strlen($this->_groupdistinct) ) . $this->_groupdistinct; + + // anchor point + if ( empty($this->_anchor) ) + { + $req .= pack ( "N", 0 ); + } else + { + $a =& $this->_anchor; + $req .= pack ( "N", 1 ); + $req .= pack ( "N", strlen($a["attrlat"]) ) . $a["attrlat"]; + $req .= pack ( "N", strlen($a["attrlong"]) ) . $a["attrlong"]; + $req .= $this->_PackFloat ( $a["lat"] ) . $this->_PackFloat ( $a["long"] ); + } + + // per-index weights + $req .= pack ( "N", count($this->_indexweights) ); + foreach ( $this->_indexweights as $idx=>$weight ) + $req .= pack ( "N", strlen($idx) ) . $idx . pack ( "N", $weight ); + + // max query time + $req .= pack ( "N", $this->_maxquerytime ); + + // per-field weights + $req .= pack ( "N", count($this->_fieldweights) ); + foreach ( $this->_fieldweights as $field=>$weight ) + $req .= pack ( "N", strlen($field) ) . $field . pack ( "N", $weight ); + + // comment + $req .= pack ( "N", strlen($comment) ) . $comment; + + // attribute overrides + $req .= pack ( "N", count($this->_overrides) ); + foreach ( $this->_overrides as $key => $entry ) + { + $req .= pack ( "N", strlen($entry["attr"]) ) . $entry["attr"]; + $req .= pack ( "NN", $entry["type"], count($entry["values"]) ); + foreach ( $entry["values"] as $id=>$val ) + { + assert ( is_numeric($id) ); + assert ( is_numeric($val) ); + + $req .= sphPackU64 ( $id ); + switch ( $entry["type"] ) + { + case SPH_ATTR_FLOAT: $req .= $this->_PackFloat ( $val ); break; + case SPH_ATTR_BIGINT: $req .= sphPackI64 ( $val ); break; + default: $req .= pack ( "N", $val ); break; + } + } + } + + // select-list + $req .= pack ( "N", strlen($this->_select) ) . $this->_select; + + // mbstring workaround + $this->_MBPop (); + + // store request to requests array + $this->_reqs[] = $req; + return count($this->_reqs)-1; + } + + /// connect to searchd, run queries batch, and return an array of result sets + function RunQueries () + { + if ( empty($this->_reqs) ) + { + $this->_error = "no queries defined, issue AddQuery() first"; + return false; + } + + // mbstring workaround + $this->_MBPush (); + + if (!( $fp = $this->_Connect() )) + { + $this->_MBPop (); + return false; + } + + // send query, get response + $nreqs = count($this->_reqs); + $req = join ( "", $this->_reqs ); + $len = 4+strlen($req); + $req = pack ( "nnNN", SEARCHD_COMMAND_SEARCH, VER_COMMAND_SEARCH, $len, $nreqs ) . $req; // add header + + if ( !( $this->_Send ( $fp, $req, $len+8 ) ) || + !( $response = $this->_GetResponse ( $fp, VER_COMMAND_SEARCH ) ) ) + { + $this->_MBPop (); + return false; + } + + // query sent ok; we can reset reqs now + $this->_reqs = array (); + + // parse and return response + return $this->_ParseSearchResponse ( $response, $nreqs ); + } + + /// parse and return search query (or queries) response + function _ParseSearchResponse ( $response, $nreqs ) + { + $p = 0; // current position + $max = strlen($response); // max position for checks, to protect against broken responses + + $results = array (); + for ( $ires=0; $ires<$nreqs && $p<$max; $ires++ ) + { + $results[] = array(); + $result =& $results[$ires]; + + $result["error"] = ""; + $result["warning"] = ""; + + // extract status + list(,$status) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $result["status"] = $status; + if ( $status!=SEARCHD_OK ) + { + list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $message = substr ( $response, $p, $len ); $p += $len; + + if ( $status==SEARCHD_WARNING ) + { + $result["warning"] = $message; + } else + { + $result["error"] = $message; + continue; + } + } + + // read schema + $fields = array (); + $attrs = array (); + + list(,$nfields) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + while ( $nfields-->0 && $p<$max ) + { + list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $fields[] = substr ( $response, $p, $len ); $p += $len; + } + $result["fields"] = $fields; + + list(,$nattrs) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + while ( $nattrs-->0 && $p<$max ) + { + list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $attr = substr ( $response, $p, $len ); $p += $len; + list(,$type) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $attrs[$attr] = $type; + } + $result["attrs"] = $attrs; + + // read match count + list(,$count) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + list(,$id64) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + + // read matches + $idx = -1; + while ( $count-->0 && $p<$max ) + { + // index into result array + $idx++; + + // parse document id and weight + if ( $id64 ) + { + $doc = sphUnpackU64 ( substr ( $response, $p, 8 ) ); $p += 8; + list(,$weight) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + } + else + { + list ( $doc, $weight ) = array_values ( unpack ( "N*N*", + substr ( $response, $p, 8 ) ) ); + $p += 8; + + if ( PHP_INT_SIZE>=8 ) + { + // x64 route, workaround broken unpack() in 5.2.2+ + if ( $doc<0 ) $doc += (1<<32); + } else + { + // x32 route, workaround php signed/unsigned braindamage + $doc = sprintf ( "%u", $doc ); + } + } + $weight = sprintf ( "%u", $weight ); + + // create match entry + if ( $this->_arrayresult ) + $result["matches"][$idx] = array ( "id"=>$doc, "weight"=>$weight ); + else + $result["matches"][$doc]["weight"] = $weight; + + // parse and create attributes + $attrvals = array (); + foreach ( $attrs as $attr=>$type ) + { + // handle 64bit ints + if ( $type==SPH_ATTR_BIGINT ) + { + $attrvals[$attr] = sphUnpackI64 ( substr ( $response, $p, 8 ) ); $p += 8; + continue; + } + + // handle floats + if ( $type==SPH_ATTR_FLOAT ) + { + list(,$uval) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + list(,$fval) = unpack ( "f*", pack ( "L", $uval ) ); + $attrvals[$attr] = $fval; + continue; + } + + // handle everything else as unsigned ints + list(,$val) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + if ( $type & SPH_ATTR_MULTI ) + { + $attrvals[$attr] = array (); + $nvalues = $val; + while ( $nvalues-->0 && $p<$max ) + { + list(,$val) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $attrvals[$attr][] = sprintf ( "%u", $val ); + } + } else if ( $type==SPH_ATTR_STRING ) + { + $attrvals[$attr] = substr ( $response, $p, $val ); + $p += $val; + } else + { + $attrvals[$attr] = sprintf ( "%u", $val ); + } + } + + if ( $this->_arrayresult ) + $result["matches"][$idx]["attrs"] = $attrvals; + else + $result["matches"][$doc]["attrs"] = $attrvals; + } + + list ( $total, $total_found, $msecs, $words ) = + array_values ( unpack ( "N*N*N*N*", substr ( $response, $p, 16 ) ) ); + $result["total"] = sprintf ( "%u", $total ); + $result["total_found"] = sprintf ( "%u", $total_found ); + $result["time"] = sprintf ( "%.3f", $msecs/1000 ); + $p += 16; + + while ( $words-->0 && $p<$max ) + { + list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $word = substr ( $response, $p, $len ); $p += $len; + list ( $docs, $hits ) = array_values ( unpack ( "N*N*", substr ( $response, $p, 8 ) ) ); $p += 8; + $result["words"][$word] = array ( + "docs"=>sprintf ( "%u", $docs ), + "hits"=>sprintf ( "%u", $hits ) ); + } + } + + $this->_MBPop (); + return $results; + } + + ///////////////////////////////////////////////////////////////////////////// + // excerpts generation + ///////////////////////////////////////////////////////////////////////////// + + /// connect to searchd server, and generate exceprts (snippets) + /// of given documents for given query. returns false on failure, + /// an array of snippets on success + function BuildExcerpts ( $docs, $index, $words, $opts=array() ) + { + assert ( is_array($docs) ); + assert ( is_string($index) ); + assert ( is_string($words) ); + assert ( is_array($opts) ); + + $this->_MBPush (); + + if (!( $fp = $this->_Connect() )) + { + $this->_MBPop(); + return false; + } + + ///////////////// + // fixup options + ///////////////// + + if ( !isset($opts["before_match"]) ) $opts["before_match"] = ""; + if ( !isset($opts["after_match"]) ) $opts["after_match"] = ""; + if ( !isset($opts["chunk_separator"]) ) $opts["chunk_separator"] = " ... "; + if ( !isset($opts["limit"]) ) $opts["limit"] = 256; + if ( !isset($opts["around"]) ) $opts["around"] = 5; + if ( !isset($opts["exact_phrase"]) ) $opts["exact_phrase"] = false; + if ( !isset($opts["single_passage"]) ) $opts["single_passage"] = false; + if ( !isset($opts["use_boundaries"]) ) $opts["use_boundaries"] = false; + if ( !isset($opts["weight_order"]) ) $opts["weight_order"] = false; + if ( !isset($opts["query_mode"]) ) $opts["query_mode"] = false; + + ///////////////// + // build request + ///////////////// + + // v.1.0 req + $flags = 1; // remove spaces + if ( $opts["exact_phrase"] ) $flags |= 2; + if ( $opts["single_passage"] ) $flags |= 4; + if ( $opts["use_boundaries"] ) $flags |= 8; + if ( $opts["weight_order"] ) $flags |= 16; + if ( $opts["query_mode"] ) $flags |= 32; + $req = pack ( "NN", 0, $flags ); // mode=0, flags=$flags + $req .= pack ( "N", strlen($index) ) . $index; // req index + $req .= pack ( "N", strlen($words) ) . $words; // req words + + // options + $req .= pack ( "N", strlen($opts["before_match"]) ) . $opts["before_match"]; + $req .= pack ( "N", strlen($opts["after_match"]) ) . $opts["after_match"]; + $req .= pack ( "N", strlen($opts["chunk_separator"]) ) . $opts["chunk_separator"]; + $req .= pack ( "N", (int)$opts["limit"] ); + $req .= pack ( "N", (int)$opts["around"] ); + + // documents + $req .= pack ( "N", count($docs) ); + foreach ( $docs as $doc ) + { + assert ( is_string($doc) ); + $req .= pack ( "N", strlen($doc) ) . $doc; + } + + //////////////////////////// + // send query, get response + //////////////////////////// + + $len = strlen($req); + $req = pack ( "nnN", SEARCHD_COMMAND_EXCERPT, VER_COMMAND_EXCERPT, $len ) . $req; // add header + if ( !( $this->_Send ( $fp, $req, $len+8 ) ) || + !( $response = $this->_GetResponse ( $fp, VER_COMMAND_EXCERPT ) ) ) + { + $this->_MBPop (); + return false; + } + + ////////////////// + // parse response + ////////////////// + + $pos = 0; + $res = array (); + $rlen = strlen($response); + for ( $i=0; $i $rlen ) + { + $this->_error = "incomplete reply"; + $this->_MBPop (); + return false; + } + $res[] = $len ? substr ( $response, $pos, $len ) : ""; + $pos += $len; + } + + $this->_MBPop (); + return $res; + } + + + ///////////////////////////////////////////////////////////////////////////// + // keyword generation + ///////////////////////////////////////////////////////////////////////////// + + /// connect to searchd server, and generate keyword list for a given query + /// returns false on failure, + /// an array of words on success + function BuildKeywords ( $query, $index, $hits ) + { + assert ( is_string($query) ); + assert ( is_string($index) ); + assert ( is_bool($hits) ); + + $this->_MBPush (); + + if (!( $fp = $this->_Connect() )) + { + $this->_MBPop(); + return false; + } + + ///////////////// + // build request + ///////////////// + + // v.1.0 req + $req = pack ( "N", strlen($query) ) . $query; // req query + $req .= pack ( "N", strlen($index) ) . $index; // req index + $req .= pack ( "N", (int)$hits ); + + //////////////////////////// + // send query, get response + //////////////////////////// + + $len = strlen($req); + $req = pack ( "nnN", SEARCHD_COMMAND_KEYWORDS, VER_COMMAND_KEYWORDS, $len ) . $req; // add header + if ( !( $this->_Send ( $fp, $req, $len+8 ) ) || + !( $response = $this->_GetResponse ( $fp, VER_COMMAND_KEYWORDS ) ) ) + { + $this->_MBPop (); + return false; + } + + ////////////////// + // parse response + ////////////////// + + $pos = 0; + $res = array (); + $rlen = strlen($response); + list(,$nwords) = unpack ( "N*", substr ( $response, $pos, 4 ) ); + $pos += 4; + for ( $i=0; $i<$nwords; $i++ ) + { + list(,$len) = unpack ( "N*", substr ( $response, $pos, 4 ) ); $pos += 4; + $tokenized = $len ? substr ( $response, $pos, $len ) : ""; + $pos += $len; + + list(,$len) = unpack ( "N*", substr ( $response, $pos, 4 ) ); $pos += 4; + $normalized = $len ? substr ( $response, $pos, $len ) : ""; + $pos += $len; + + $res[] = array ( "tokenized"=>$tokenized, "normalized"=>$normalized ); + + if ( $hits ) + { + list($ndocs,$nhits) = array_values ( unpack ( "N*N*", substr ( $response, $pos, 8 ) ) ); + $pos += 8; + $res [$i]["docs"] = $ndocs; + $res [$i]["hits"] = $nhits; + } + + if ( $pos > $rlen ) + { + $this->_error = "incomplete reply"; + $this->_MBPop (); + return false; + } + } + + $this->_MBPop (); + return $res; + } + + function EscapeString ( $string ) + { + $from = array ( '\\', '(',')','|','-','!','@','~','"','&', '/', '^', '$', '=' ); + $to = array ( '\\\\', '\(','\)','\|','\-','\!','\@','\~','\"', '\&', '\/', '\^', '\$', '\=' ); + + return str_replace ( $from, $to, $string ); + } + + ///////////////////////////////////////////////////////////////////////////// + // attribute updates + ///////////////////////////////////////////////////////////////////////////// + + /// batch update given attributes in given rows in given indexes + /// returns amount of updated documents (0 or more) on success, or -1 on failure + function UpdateAttributes ( $index, $attrs, $values, $mva=false ) + { + // verify everything + assert ( is_string($index) ); + assert ( is_bool($mva) ); + + assert ( is_array($attrs) ); + foreach ( $attrs as $attr ) + assert ( is_string($attr) ); + + assert ( is_array($values) ); + foreach ( $values as $id=>$entry ) + { + assert ( is_numeric($id) ); + assert ( is_array($entry) ); + assert ( count($entry)==count($attrs) ); + foreach ( $entry as $v ) + { + if ( $mva ) + { + assert ( is_array($v) ); + foreach ( $v as $vv ) + assert ( is_int($vv) ); + } else + assert ( is_int($v) ); + } + } + + // build request + $req = pack ( "N", strlen($index) ) . $index; + + $req .= pack ( "N", count($attrs) ); + foreach ( $attrs as $attr ) + { + $req .= pack ( "N", strlen($attr) ) . $attr; + $req .= pack ( "N", $mva ? 1 : 0 ); + } + + $req .= pack ( "N", count($values) ); + foreach ( $values as $id=>$entry ) + { + $req .= sphPackU64 ( $id ); + foreach ( $entry as $v ) + { + $req .= pack ( "N", $mva ? count($v) : $v ); + if ( $mva ) + foreach ( $v as $vv ) + $req .= pack ( "N", $vv ); + } + } + + // connect, send query, get response + if (!( $fp = $this->_Connect() )) + return -1; + + $len = strlen($req); + $req = pack ( "nnN", SEARCHD_COMMAND_UPDATE, VER_COMMAND_UPDATE, $len ) . $req; // add header + if ( !$this->_Send ( $fp, $req, $len+8 ) ) + return -1; + + if (!( $response = $this->_GetResponse ( $fp, VER_COMMAND_UPDATE ) )) + return -1; + + // parse response + list(,$updated) = unpack ( "N*", substr ( $response, 0, 4 ) ); + return $updated; + } + + ///////////////////////////////////////////////////////////////////////////// + // persistent connections + ///////////////////////////////////////////////////////////////////////////// + + function Open() + { + if ( $this->_socket !== false ) + { + $this->_error = 'already connected'; + return false; + } + if ( !$fp = $this->_Connect() ) + return false; + + // command, command version = 0, body length = 4, body = 1 + $req = pack ( "nnNN", SEARCHD_COMMAND_PERSIST, 0, 4, 1 ); + if ( !$this->_Send ( $fp, $req, 12 ) ) + return false; + + $this->_socket = $fp; + return true; + } + + function Close() + { + if ( $this->_socket === false ) + { + $this->_error = 'not connected'; + return false; + } + + fclose ( $this->_socket ); + $this->_socket = false; + + return true; + } + + ////////////////////////////////////////////////////////////////////////// + // status + ////////////////////////////////////////////////////////////////////////// + + function Status () + { + $this->_MBPush (); + if (!( $fp = $this->_Connect() )) + { + $this->_MBPop(); + return false; + } + + $req = pack ( "nnNN", SEARCHD_COMMAND_STATUS, VER_COMMAND_STATUS, 4, 1 ); // len=4, body=1 + if ( !( $this->_Send ( $fp, $req, 12 ) ) || + !( $response = $this->_GetResponse ( $fp, VER_COMMAND_STATUS ) ) ) + { + $this->_MBPop (); + return false; + } + + $res = substr ( $response, 4 ); // just ignore length, error handling, etc + $p = 0; + list ( $rows, $cols ) = array_values ( unpack ( "N*N*", substr ( $response, $p, 8 ) ) ); $p += 8; + + $res = array(); + for ( $i=0; $i<$rows; $i++ ) + for ( $j=0; $j<$cols; $j++ ) + { + list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4; + $res[$i][] = substr ( $response, $p, $len ); $p += $len; + } + + $this->_MBPop (); + return $res; + } +} + +// +// $Id$ +// \ No newline at end of file diff --git a/system/classes/swfupload/cancelbutton.gif b/system/classes/swfupload/cancelbutton.gif new file mode 100644 index 0000000000000000000000000000000000000000..eab2a40c5efd92484ead7c05d1d31d555b5a3476 GIT binary patch literal 1221 zcmV;$1UmaiNk%w1VH^Ms0QUd@aX2${I5T%SICMZec}GEkJ2-iBL+CLqL~6K%PKB zo<&2NOG27WLYzxOolQWPQ(2mLaH2&-piV%jLPn}aOsYvpqE1n+Q$wOvS+GS#vPwv^ zNld*&N4-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<1k;7x?5QhM8-mvLJ%?1i-(ZnFp zf&fA!NL`qa!x2s3KtmsgxCcNRSHz$|4G#FALI^!z!5;=+5TXPTMJ(ZmAb=QR2qF;> z@B|bOFwnpbKNt~25=m$w04Eg;qDUf(Fw%%4JU)^FCYczJMHFS2aRwS{B$ 0) { + this.opacity -= reduceOpacityBy; + if (this.opacity < 0) { + this.opacity = 0; + } + + if (this.fileProgressWrapper.filters) { + try { + this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity = this.opacity; + } catch (e) { + // If it is not set initially, the browser will throw an error. This will set it if it is not set yet. + this.fileProgressWrapper.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + this.opacity + ")"; + } + } else { + this.fileProgressWrapper.style.opacity = this.opacity / 100; + } + } + + if (this.height > 0) { + this.height -= reduceHeightBy; + if (this.height < 0) { + this.height = 0; + } + + this.fileProgressWrapper.style.height = this.height + "px"; + } + + if (this.height > 0 || this.opacity > 0) { + var oSelf = this; + setTimeout(function () { + oSelf.disappear(); + }, rate); + } else { + this.fileProgressWrapper.style.display = "none"; + } +}; \ No newline at end of file diff --git a/system/classes/swfupload/handlers.js b/system/classes/swfupload/handlers.js new file mode 100644 index 0000000..d04a853 --- /dev/null +++ b/system/classes/swfupload/handlers.js @@ -0,0 +1,200 @@ +/* Demo Note: This demo uses a FileProgress class that handles the UI for displaying the file name and percent complete. +The FileProgress class is not part of SWFUpload. +*/ + + +/* ********************** + Event Handlers + These are my custom event handlers to make my + web application behave the way I went when SWFUpload + completes different tasks. These aren't part of the SWFUpload + package. They are part of my application. Without these none + of the actions SWFUpload makes will show up in my application. + ********************** */ +function fileQueued(file) { + try { + var progress = new FileProgress(file, this.customSettings.progressTarget); + progress.setStatus(" ..."); + progress.toggleCancel(true, this); + + } catch (ex) { + this.debug(ex); + } + +} + +function fileQueueError(file, errorCode, message) { + try { + if (errorCode === SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) { + alert(" .\n" + (message === 0 ? " ." : " " + (message > 1 ? " " + message + " ." : " ."))); + return; + } + + var progress = new FileProgress(file, this.customSettings.progressTarget); + progress.setError(); + progress.toggleCancel(false); + + switch (errorCode) { + case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT: + progress.setStatus(" ."); + this.debug("Error Code: File too big, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: + progress.setStatus(" ."); + this.debug("Error Code: Zero byte file, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE: + progress.setStatus(" ."); + this.debug("Error Code: Invalid File Type, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + default: + if (file !== null) { + progress.setStatus(" "); + } + this.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + } + } catch (ex) { + this.debug(ex); + } +} + +function fileDialogComplete(numFilesSelected, numFilesQueued) { + try { + if (numFilesSelected > 0) { + document.getElementById(this.customSettings.cancelButtonId).disabled = false; + } + + /* I want auto start the upload and I can do that here */ + + elements = document.getElementById("form").elements; + for(i=0; i < elements.length; i++) { + name = elements[i].name + if (name) { + value = ''; + switch(elements[i].type) { + case "select" : + value = elements[i].options[elements[i].selectedIndex].value + break; + case "radio": + case "checkbox": + value = elements[i].checked ? 1: 0; + break; + default: + value = elements[i].value; + break; + } + this.addPostParam(name, value); + } + } + + + this.startUpload(); + + } catch (ex) { + this.debug(ex); + } +} + +function uploadStart(file) { + try { + /* I don't want to do any file validation or anything, I'll just update the UI and + return true to indicate that the upload should start. + It's important to update the UI here because in Linux no uploadProgress events are called. The best + we can do is say we are uploading. + */ + var progress = new FileProgress(file, this.customSettings.progressTarget); + progress.setStatus("..."); + progress.toggleCancel(true, this); + } + catch (ex) {} + + return true; +} + +function uploadProgress(file, bytesLoaded, bytesTotal) { + try { + var percent = Math.ceil((bytesLoaded / bytesTotal) * 100); + + var progress = new FileProgress(file, this.customSettings.progressTarget); + progress.setProgress(percent); + progress.setStatus("..."); + } catch (ex) { + this.debug(ex); + } +} + +function uploadSuccess(file, serverData) { + try { + var progress = new FileProgress(file, this.customSettings.progressTarget); + progress.setComplete(); + progress.setStatus("."); + progress.toggleCancel(false); + + } catch (ex) { + this.debug(ex); + } +} + +function uploadError(file, errorCode, message) { + try { + var progress = new FileProgress(file, this.customSettings.progressTarget); + progress.setError(); + progress.toggleCancel(false); + + switch (errorCode) { + case SWFUpload.UPLOAD_ERROR.HTTP_ERROR: + progress.setStatus(": " + message); + this.debug("Error Code: HTTP Error, File name: " + file.name + ", Message: " + message); + break; + case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED: + progress.setStatus(" ."); + this.debug("Error Code: Upload Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + case SWFUpload.UPLOAD_ERROR.IO_ERROR: + progress.setStatus("Server (IO) Error"); + this.debug("Error Code: IO Error, File name: " + file.name + ", Message: " + message); + break; + case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR: + progress.setStatus(" "); + this.debug("Error Code: Security Error, File name: " + file.name + ", Message: " + message); + break; + case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED: + progress.setStatus(" ."); + this.debug("Error Code: Upload Limit Exceeded, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED: + progress.setStatus(" . ."); + this.debug("Error Code: File Validation Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED: + // If there aren't any files left (they were all cancelled) disable the cancel button + if (this.getStats().files_queued === 0) { + document.getElementById(this.customSettings.cancelButtonId).disabled = true; + } + progress.setStatus(""); + progress.setCancelled(); + break; + case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED: + progress.setStatus(""); + break; + default: + progress.setStatus(" : " + errorCode); + this.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message); + break; + } + } catch (ex) { + this.debug(ex); + } +} + +function uploadComplete(file) { + if (this.getStats().files_queued === 0) { + document.getElementById(this.customSettings.cancelButtonId).disabled = true; + } +} + +// This event comes from the Queue Plugin +function queueComplete(numFilesUploaded) { +setTimeout('location.replace( window.location )', 2000); +} diff --git a/system/classes/swfupload/swfupload.js b/system/classes/swfupload/swfupload.js new file mode 100644 index 0000000..7d309d6 --- /dev/null +++ b/system/classes/swfupload/swfupload.js @@ -0,0 +1,840 @@ +/** + * SWFUpload v2.1.0 by Jacob Roberts, Feb 2008, http://www.swfupload.org, http://swfupload.googlecode.com, http://www.swfupload.org + * -------- -------- -------- -------- -------- -------- -------- -------- + * SWFUpload is (c) 2006 Lars Huring, Olov Nilzn and Mammon Media and is released under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + * + * See Changelog.txt for version history + * + */ + + +/* *********** */ +/* Constructor */ +/* *********** */ + +var SWFUpload = function (settings) { + this.initSWFUpload(settings); +}; + +SWFUpload.prototype.initSWFUpload = function (settings) { + try { + this.customSettings = {}; // A container where developers can place their own settings associated with this instance. + this.settings = settings; + this.eventQueue = []; + this.movieName = "SWFUpload_" + SWFUpload.movieCount++; + this.movieElement = null; + + // Setup global control tracking + SWFUpload.instances[this.movieName] = this; + + // Load the settings. Load the Flash movie. + this.initSettings(); + this.loadFlash(); + this.displayDebugInfo(); + } catch (ex) { + delete SWFUpload.instances[this.movieName]; + throw ex; + } +}; + +/* *************** */ +/* Static Members */ +/* *************** */ +SWFUpload.instances = {}; +SWFUpload.movieCount = 0; +SWFUpload.version = "2.2.0 Alpha"; +SWFUpload.QUEUE_ERROR = { + QUEUE_LIMIT_EXCEEDED : -100, + FILE_EXCEEDS_SIZE_LIMIT : -110, + ZERO_BYTE_FILE : -120, + INVALID_FILETYPE : -130 +}; +SWFUpload.UPLOAD_ERROR = { + HTTP_ERROR : -200, + MISSING_UPLOAD_URL : -210, + IO_ERROR : -220, + SECURITY_ERROR : -230, + UPLOAD_LIMIT_EXCEEDED : -240, + UPLOAD_FAILED : -250, + SPECIFIED_FILE_ID_NOT_FOUND : -260, + FILE_VALIDATION_FAILED : -270, + FILE_CANCELLED : -280, + UPLOAD_STOPPED : -290 +}; +SWFUpload.FILE_STATUS = { + QUEUED : -1, + IN_PROGRESS : -2, + ERROR : -3, + COMPLETE : -4, + CANCELLED : -5 +}; +SWFUpload.BUTTON_ACTION = { + SELECT_FILE : -100, + SELECT_FILES : -110, + START_UPLOAD : -120 +}; + +/* ******************** */ +/* Instance Members */ +/* ******************** */ + +// Private: initSettings ensures that all the +// settings are set, getting a default value if one was not assigned. +SWFUpload.prototype.initSettings = function () { + this.ensureDefault = function (settingName, defaultValue) { + this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName]; + }; + + // Upload backend settings + this.ensureDefault("upload_url", ""); + this.ensureDefault("file_post_name", "Filedata"); + this.ensureDefault("post_params", {}); + this.ensureDefault("use_query_string", false); + this.ensureDefault("requeue_on_error", false); + + // File Settings + this.ensureDefault("file_types", "*.*"); + this.ensureDefault("file_types_description", "All Files"); + this.ensureDefault("file_size_limit", 0); // Default zero means "unlimited" + this.ensureDefault("file_upload_limit", 0); + this.ensureDefault("file_queue_limit", 0); + + // Flash Settings + this.ensureDefault("flash_url", "swfupload_f9.swf"); + this.ensureDefault("flash_color", "#FFFFFF"); + this.ensureDefault("flash_wmode", "transparent"); + this.ensureDefault("flash_container_id", null); + this.ensureDefault("flash_width", '100%'); + this.ensureDefault("flash_height", '100%'); + + // Button Settings + /* + this.ensureDefault("button_image_url", 0); + this.ensureDefault("button_width", 1); + this.ensureDefault("button_height", 1); + this.ensureDefault("button_text", ""); + this.ensureDefault("button_text_style", ""); + this.ensureDefault("button_action", SWFUpload.BUTTON_ACTION.SELECT_FILES); + this.ensureDefault("button_disabled", false); + this.ensureDefault("button_placeholder_id", null); + */ + + // Debug Settings + this.ensureDefault("debug", false); + this.settings.debug_enabled = this.settings.debug; // Here to maintain v2 API + + // Event Handlers + this.settings.return_upload_start_handler = this.returnUploadStart; + this.ensureDefault("swfupload_loaded_handler", null); + this.ensureDefault("file_dialog_start_handler", null); + this.ensureDefault("file_queued_handler", null); + this.ensureDefault("file_queue_error_handler", null); + this.ensureDefault("file_dialog_complete_handler", null); + + this.ensureDefault("upload_start_handler", null); + this.ensureDefault("upload_progress_handler", null); + this.ensureDefault("upload_error_handler", null); + this.ensureDefault("upload_success_handler", null); + this.ensureDefault("upload_complete_handler", null); + + this.ensureDefault("debug_handler", this.debugMessage); + + this.ensureDefault("custom_settings", {}); + + // Other settings + this.customSettings = this.settings.custom_settings; + + delete this.ensureDefault; +}; + +SWFUpload.prototype.loadFlash = function () { + this.insertFlash(); +}; + +// Private: appendFlash gets the HTML tag for the Flash +// It then appends the flash to the body +SWFUpload.prototype.appendFlash = function () { + var targetElement, container; + + // Make sure an element with the ID we are going to use doesn't already exist + if (document.getElementById(this.movieName) !== null) { + throw "ID " + this.movieName + " is already in use. The Flash Object could not be added"; + } + + // Get the body tag where we will be adding the flash movie + targetElement = document.getElementsByTagName("body")[0]; + + if (targetElement == undefined) { + throw "Could not find the 'body' element."; + } + + // Append the container and load the flash + container = document.createElement("div"); + container.style.width = "1px"; + container.style.height = "1px"; + + targetElement.appendChild(container); + container.innerHTML = this.getFlashHTML(); // Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers) +}; + +// Private: insertFlash inserts the flash movie into the container element. +SWFUpload.prototype.insertFlash = function () { + var targetElement, container; + + // Make sure an element with the ID we are going to use doesn't already exist + if (document.getElementById(this.movieName) !== null) { + throw "ID " + this.movieName + " is already in use. The Flash Object could not be added"; + } + + // Get the container elt into which we'll insert the flash movie + containerElement = document.getElementById(this.settings.flash_container_id); + + if (containerElement == undefined) { + throw "Could not find the container element."; + } + + // place flash embed inside the container element + containerElement.innerHTML = this.getFlashHTML(); +}; + +// Private: getFlashHTML generates the object tag needed to embed the flash in to the document +SWFUpload.prototype.getFlashHTML = function () { + // Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay + return ['', + '', + '', + '', + '', + '', + '', + '', + ''].join(""); +}; + +// Private: getFlashVars builds the parameter string that will be passed +// to flash in the flashvars param. +SWFUpload.prototype.getFlashVars = function () { + // Build a string from the post param object + var paramString = this.buildParamString(); + + // Build the parameter string + return ["movieName=", encodeURIComponent(this.movieName), + "&uploadURL=", encodeURIComponent(this.settings.upload_url), + "&useQueryString=", encodeURIComponent(this.settings.use_query_string), + "&requeueOnError=", encodeURIComponent(this.settings.requeue_on_error), + "&params=", encodeURIComponent(paramString), + "&filePostName=", encodeURIComponent(this.settings.file_post_name), + "&fileTypes=", encodeURIComponent(this.settings.file_types), + "&fileTypesDescription=", encodeURIComponent(this.settings.file_types_description), + "&fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit), + "&fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit), + "&fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit), + //"&buttonImage_url=", encodeURIComponent(this.settings.button_image_url), + //"&buttonWidth=", encodeURIComponent(this.settings.button_width), + //"&buttonHeight=", encodeURIComponent(this.settings.button_height), + //"&buttonText=", encodeURIComponent(this.settings.button_text), + //"&buttonTextStyle=", encodeURIComponent(this.settings.button_text_style), + //"&buttonAction=", encodeURIComponent(this.settings.button_action), + //"&buttonDisabled=", encodeURIComponent(this.settings.button_disabled) + ].join(""); +}; + +// Public: getMovieElement retrieves the DOM reference to the Flash element added by SWFUpload +// The element is cached after the first lookup +SWFUpload.prototype.getMovieElement = function () { + if (this.movieElement == undefined) { + this.movieElement = document.getElementById(this.movieName); + } + + if (this.movieElement === null) { + throw "Could not find Flash element"; + } + + return this.movieElement; +}; + +// Private: buildParamString takes the name/value pairs in the post_params setting object +// and joins them up in to a string formatted "name=value&name=value" +SWFUpload.prototype.buildParamString = function () { + var postParams = this.settings.post_params; + var paramStringPairs = []; + + if (typeof(postParams) === "object") { + for (var name in postParams) { + if (postParams.hasOwnProperty(name)) { + paramStringPairs.push(encodeURIComponent(name.toString()) + "=" + encodeURIComponent(postParams[name].toString())); + } + } + } + + return paramStringPairs.join("&"); +}; + +// Public: Used to remove a SWFUpload instance from the page. This method strives to remove +// all references to the SWF, and other objects so memory is properly freed. +// Returns true if everything was destroyed. Returns a false if a failure occurs leaving SWFUpload in an inconsistant state. +SWFUpload.prototype.destroy = function () { + try { + // Make sure Flash is done before we try to remove it + this.stopUpload(); + + // Remove the SWFUpload DOM nodes + var movieElement = null; + try { + movieElement = this.getMovieElement(); + } catch (ex) { + } + + if (movieElement != undefined && movieElement.parentNode != undefined && typeof(movieElement.parentNode.removeChild) === "function") { + var container = movieElement.parentNode; + if (container != undefined) { + container.removeChild(movieElement); + if (container.parentNode != undefined && typeof(container.parentNode.removeChild) === "function") { + container.parentNode.removeChild(container); + } + } + } + + // Destroy references + SWFUpload.instances[this.movieName] = null; + delete SWFUpload.instances[this.movieName]; + + delete this.movieElement; + delete this.settings; + delete this.customSettings; + delete this.eventQueue; + delete this.movieName; + + return true; + } catch (ex1) { + return false; + } +}; + +// Public: displayDebugInfo prints out settings and configuration +// information about this SWFUpload instance. +// This function (and any references to it) can be deleted when placing +// SWFUpload in production. +SWFUpload.prototype.displayDebugInfo = function () { + this.debug( + [ + "---SWFUpload Instance Info---\n", + "Version: ", SWFUpload.version, "\n", + "Movie Name: ", this.movieName, "\n", + "Settings:\n", + "\t", "upload_url: ", this.settings.upload_url, "\n", + "\t", "use_query_string: ", this.settings.use_query_string.toString(), "\n", + "\t", "file_post_name: ", this.settings.file_post_name, "\n", + "\t", "post_params: ", this.settings.post_params.toString(), "\n", + "\t", "file_types: ", this.settings.file_types, "\n", + "\t", "file_types_description: ", this.settings.file_types_description, "\n", + "\t", "file_size_limit: ", this.settings.file_size_limit, "\n", + "\t", "file_upload_limit: ", this.settings.file_upload_limit, "\n", + "\t", "file_queue_limit: ", this.settings.file_queue_limit, "\n", + "\t", "flash_url: ", this.settings.flash_url, "\n", + "\t", "flash_color: ", this.settings.flash_color, "\n", + "\t", "debug: ", this.settings.debug.toString(), "\n", + "\t", "custom_settings: ", this.settings.custom_settings.toString(), "\n", + "Event Handlers:\n", + "\t", "swfupload_loaded_handler assigned: ", (typeof(this.settings.swfupload_loaded_handler) === "function").toString(), "\n", + "\t", "file_dialog_start_handler assigned: ", (typeof(this.settings.file_dialog_start_handler) === "function").toString(), "\n", + "\t", "file_queued_handler assigned: ", (typeof(this.settings.file_queued_handler) === "function").toString(), "\n", + "\t", "file_queue_error_handler assigned: ", (typeof(this.settings.file_queue_error_handler) === "function").toString(), "\n", + "\t", "upload_start_handler assigned: ", (typeof(this.settings.upload_start_handler) === "function").toString(), "\n", + "\t", "upload_progress_handler assigned: ", (typeof(this.settings.upload_progress_handler) === "function").toString(), "\n", + "\t", "upload_error_handler assigned: ", (typeof(this.settings.upload_error_handler) === "function").toString(), "\n", + "\t", "upload_success_handler assigned: ", (typeof(this.settings.upload_success_handler) === "function").toString(), "\n", + "\t", "upload_complete_handler assigned: ", (typeof(this.settings.upload_complete_handler) === "function").toString(), "\n", + "\t", "debug_handler assigned: ", (typeof(this.settings.debug_handler) === "function").toString(), "\n" + ].join("") + ); +}; + +/* Note: addSetting and getSetting are no longer used by SWFUpload but are included + the maintain v2 API compatibility +*/ +// Public: (Deprecated) addSetting adds a setting value. If the value given is undefined or null then the default_value is used. +SWFUpload.prototype.addSetting = function (name, value, default_value) { + if (value == undefined) { + return (this.settings[name] = default_value); + } else { + return (this.settings[name] = value); + } +}; + +// Public: (Deprecated) getSetting gets a setting. Returns an empty string if the setting was not found. +SWFUpload.prototype.getSetting = function (name) { + if (this.settings[name] != undefined) { + return this.settings[name]; + } + + return ""; +}; + + + +// Private: callFlash handles function calls made to the Flash element. +// Calls are made with a setTimeout for some functions to work around +// bugs in the ExternalInterface library. +SWFUpload.prototype.callFlash = function (functionName, argumentArray) { + argumentArray = argumentArray || []; + + var self = this; + var callFunction = function () { + var movieElement = self.getMovieElement(); + var returnValue; + if (typeof(movieElement[functionName]) === "function") { + // We have to go through all this if/else stuff because the Flash functions don't have apply() and only accept the exact number of arguments. + if (argumentArray.length === 0) { + returnValue = movieElement[functionName](); + } else if (argumentArray.length === 1) { + returnValue = movieElement[functionName](argumentArray[0]); + } else if (argumentArray.length === 2) { + returnValue = movieElement[functionName](argumentArray[0], argumentArray[1]); + } else if (argumentArray.length === 3) { + returnValue = movieElement[functionName](argumentArray[0], argumentArray[1], argumentArray[2]); + } else { + throw "Too many arguments"; + } + + // Unescape file post param values + if (returnValue != undefined && typeof(returnValue.post) === "object") { + returnValue = self.unescapeFilePostParams(returnValue); + } + + return returnValue; + } else { + throw "Invalid function name"; + } + }; + + return callFunction(); +}; + + +/* ***************************** + -- Flash control methods -- + Your UI should use these + to operate SWFUpload + ***************************** */ + +// Public: selectFile causes a File Selection Dialog window to appear. This +// dialog only allows 1 file to be selected. WARNING: this function does not work in Flash Player 10 +SWFUpload.prototype.selectFile = function () { + this.callFlash("SelectFile"); +}; + +// Public: selectFiles causes a File Selection Dialog window to appear/ This +// dialog allows the user to select any number of files +// Flash Bug Warning: Flash limits the number of selectable files based on the combined length of the file names. +// If the selection name length is too long the dialog will fail in an unpredictable manner. There is no work-around +// for this bug. WARNING: this function does not work in Flash Player 10 +SWFUpload.prototype.selectFiles = function () { + this.callFlash("SelectFiles"); +}; + + +// Public: startUpload starts uploading the first file in the queue unless +// the optional parameter 'fileID' specifies the ID +SWFUpload.prototype.startUpload = function (fileID) { + this.callFlash("StartUpload", [fileID]); +}; + +/* Cancels a the file upload. You must specify a file_id */ +// Public: cancelUpload cancels any queued file. The fileID parameter +// must be specified. +SWFUpload.prototype.cancelUpload = function (fileID) { + this.callFlash("CancelUpload", [fileID]); +}; + +// Public: stopUpload stops the current upload and requeues the file at the beginning of the queue. +// If nothing is currently uploading then nothing happens. +SWFUpload.prototype.stopUpload = function () { + this.callFlash("StopUpload"); +}; + +/* ************************ + * Settings methods + * These methods change the SWFUpload settings. + * SWFUpload settings should not be changed directly on the settings object + * since many of the settings need to be passed to Flash in order to take + * effect. + * *********************** */ + +// Public: getStats gets the file statistics object. +SWFUpload.prototype.getStats = function () { + return this.callFlash("GetStats"); +}; + +// Public: setStats changes the SWFUpload statistics. You shouldn't need to +// change the statistics but you can. Changing the statistics does not +// affect SWFUpload accept for the successful_uploads count which is used +// by the upload_limit setting to determine how many files the user may upload. +SWFUpload.prototype.setStats = function (statsObject) { + this.callFlash("SetStats", [statsObject]); +}; + +// Public: getFile retrieves a File object by ID or Index. If the file is +// not found then 'null' is returned. +SWFUpload.prototype.getFile = function (fileID) { + if (typeof(fileID) === "number") { + return this.callFlash("GetFileByIndex", [fileID]); + } else { + return this.callFlash("GetFile", [fileID]); + } +}; + +// Public: addFileParam sets a name/value pair that will be posted with the +// file specified by the Files ID. If the name already exists then the +// exiting value will be overwritten. +SWFUpload.prototype.addFileParam = function (fileID, name, value) { + return this.callFlash("AddFileParam", [fileID, name, value]); +}; + +// Public: removeFileParam removes a previously set (by addFileParam) name/value +// pair from the specified file. +SWFUpload.prototype.removeFileParam = function (fileID, name) { + this.callFlash("RemoveFileParam", [fileID, name]); +}; + +// Public: setUploadUrl changes the upload_url setting. +SWFUpload.prototype.setUploadURL = function (url) { + this.settings.upload_url = url.toString(); + this.callFlash("SetUploadURL", [url]); +}; + +// Public: setPostParams changes the post_params setting +SWFUpload.prototype.setPostParams = function (paramsObject) { + this.settings.post_params = paramsObject; + this.callFlash("SetPostParams", [paramsObject]); +}; + +// Public: addPostParam adds post name/value pair. Each name can have only one value. +SWFUpload.prototype.addPostParam = function (name, value) { + this.settings.post_params[name] = value; + this.callFlash("SetPostParams", [this.settings.post_params]); +}; + +// Public: removePostParam deletes post name/value pair. +SWFUpload.prototype.removePostParam = function (name) { + delete this.settings.post_params[name]; + this.callFlash("SetPostParams", [this.settings.post_params]); +}; + +// Public: setFileTypes changes the file_types setting and the file_types_description setting +SWFUpload.prototype.setFileTypes = function (types, description) { + this.settings.file_types = types; + this.settings.file_types_description = description; + this.callFlash("SetFileTypes", [types, description]); +}; + +// Public: setFileSizeLimit changes the file_size_limit setting +SWFUpload.prototype.setFileSizeLimit = function (fileSizeLimit) { + this.settings.file_size_limit = fileSizeLimit; + this.callFlash("SetFileSizeLimit", [fileSizeLimit]); +}; + +// Public: setFileUploadLimit changes the file_upload_limit setting +SWFUpload.prototype.setFileUploadLimit = function (fileUploadLimit) { + this.settings.file_upload_limit = fileUploadLimit; + this.callFlash("SetFileUploadLimit", [fileUploadLimit]); +}; + +// Public: setFileQueueLimit changes the file_queue_limit setting +SWFUpload.prototype.setFileQueueLimit = function (fileQueueLimit) { + this.settings.file_queue_limit = fileQueueLimit; + this.callFlash("SetFileQueueLimit", [fileQueueLimit]); +}; + +// Public: setFilePostName changes the file_post_name setting +SWFUpload.prototype.setFilePostName = function (filePostName) { + this.settings.file_post_name = filePostName; + this.callFlash("SetFilePostName", [filePostName]); +}; + +// Public: setUseQueryString changes the use_query_string setting +SWFUpload.prototype.setUseQueryString = function (useQueryString) { + this.settings.use_query_string = useQueryString; + this.callFlash("SetUseQueryString", [useQueryString]); +}; + +// Public: setRequeueOnError changes the requeue_on_error setting +SWFUpload.prototype.setRequeueOnError = function (requeueOnError) { + this.settings.requeue_on_error = requeueOnError; + this.callFlash("SetRequeueOnError", [requeueOnError]); +}; + +// Public: setDebugEnabled changes the debug_enabled setting +SWFUpload.prototype.setDebugEnabled = function (debugEnabled) { + this.settings.debug_enabled = debugEnabled; + this.callFlash("SetDebugEnabled", [debugEnabled]); +}; + +// Public: setButtonImageURL loads a button image sprite +SWFUpload.prototype.setButtonImageURL = function (buttonImageURL) { + this.settings.button_image_url = buttonImageURL; + this.callFlash("SetButtonImageURL", [buttonImageURL]); +}; + +// Public: setButtonDimensions resizes the Flash Movie and button +SWFUpload.prototype.setButtonDimensions = function (width, height) { + this.settings.button_width = width; + this.settings.button_height = height; + + this.callFlash("SetButtonDimensions", [width, height]); +}; +// Public: setButtonText Changes the text overlaid on the button +SWFUpload.prototype.setButtonText = function (html) { + this.settings.button_text= html; + this.callFlash("SetButtonText", [html]); +}; +// Public: setButtonTextStyle changes the CSS used to style the HTML/Text overlaid on the button +SWFUpload.prototype.setButtonTextStyle = function (css) { + this.settings.button_text_style = css; + this.callFlash("SetButtonTextStyle", [css]); +}; +// Public: setButtonDisabled disables/enables the button +SWFUpload.prototype.setButtonDisabled = function (isDisabled) { + this.settings.button_disabled = isDisabled; + this.callFlash("SetButtonDisabled", [isDisabled]); +}; +// Public: setButtonAction sets the action that occurs when the button is clicked +SWFUpload.prototype.setButtonAction = function (buttonAction) { + this.settings.button_action = buttonAction; + this.callFlash("SetButtonAction", [buttonAction]); +}; + +/* ******************************* + Flash Event Interfaces + These functions are used by Flash to trigger the various + events. + + All these functions a Private. + + Because the ExternalInterface library is buggy the event calls + are added to a queue and the queue then executed by a setTimeout. + This ensures that events are executed in a determinate order and that + the ExternalInterface bugs are avoided. +******************************* */ + +SWFUpload.prototype.queueEvent = function (handlerName, argumentArray) { + // Warning: Don't call this.debug inside here or you'll create an infinite loop + + if (argumentArray == undefined) { + argumentArray = []; + } else if (!(argumentArray instanceof Array)) { + argumentArray = [argumentArray]; + } + + var self = this; + if (typeof(this.settings[handlerName]) === "function") { + // Queue the event + this.eventQueue.push(function () { + this.settings[handlerName].apply(this, argumentArray); + }); + + // Execute the next queued event + setTimeout(function () { + self.executeNextEvent(); + }, 0); + + } else if (this.settings[handlerName] !== null) { + throw "Event handler " + handlerName + " is unknown or is not a function"; + } +}; + +// Private: Causes the next event in the queue to be executed. Since events are queued using a setTimeout +// we must queue them in order to garentee that they are executed in order. +SWFUpload.prototype.executeNextEvent = function () { + // Warning: Don't call this.debug inside here or you'll create an infinite loop + + var f = this.eventQueue ? this.eventQueue.shift() : null; + if (typeof(f) === "function") { + f.apply(this); + } +}; + +// Private: unescapeFileParams is part of a workaround for a flash bug where objects passed through ExternalInterfance cannot have +// properties that contain characters that are not valid for JavaScript identifiers. To work around this +// the Flash Component escapes the parameter names and we must unescape again before passing them along. +SWFUpload.prototype.unescapeFilePostParams = function (file) { + var reg = /[$]([0-9a-f]{4})/i; + var unescapedPost = {}; + var uk; + + if (file != undefined) { + for (var k in file.post) { + if (file.post.hasOwnProperty(k)) { + uk = k; + var match; + while ((match = reg.exec(uk)) !== null) { + uk = uk.replace(match[0], String.fromCharCode(parseInt("0x"+match[1], 16))); + } + unescapedPost[uk] = file.post[k]; + } + } + + file.post = unescapedPost; + } + + return file; +}; + +SWFUpload.prototype.flashReady = function () { + // Check that the movie element is loaded correctly with its ExternalInterface methods defined + var movieElement = this.getMovieElement(); + if (typeof(movieElement.StartUpload) !== "function") { + throw "ExternalInterface methods failed to initialize."; + } + + this.queueEvent("swfupload_loaded_handler"); +}; + + +/* This is a chance to do something before the browse window opens */ +SWFUpload.prototype.fileDialogStart = function () { + this.queueEvent("file_dialog_start_handler"); +}; + + +/* Called when a file is successfully added to the queue. */ +SWFUpload.prototype.fileQueued = function (file) { + file = this.unescapeFilePostParams(file); + this.queueEvent("file_queued_handler", file); +}; + + +/* Handle errors that occur when an attempt to queue a file fails. */ +SWFUpload.prototype.fileQueueError = function (file, errorCode, message) { + file = this.unescapeFilePostParams(file); + this.queueEvent("file_queue_error_handler", [file, errorCode, message]); +}; + +/* Called after the file dialog has closed and the selected files have been queued. + You could call startUpload here if you want the queued files to begin uploading immediately. */ +SWFUpload.prototype.fileDialogComplete = function (numFilesSelected, numFilesQueued) { + this.queueEvent("file_dialog_complete_handler", [numFilesSelected, numFilesQueued]); +}; + +SWFUpload.prototype.uploadStart = function (file) { + file = this.unescapeFilePostParams(file); + this.queueEvent("return_upload_start_handler", file); +}; + +SWFUpload.prototype.returnUploadStart = function (file) { + var returnValue; + if (typeof(this.settings.upload_start_handler) === "function") { + file = this.unescapeFilePostParams(file); + returnValue = this.settings.upload_start_handler.call(this, file); + } else if (this.settings.upload_start_handler != undefined) { + throw "upload_start_handler must be a function"; + } + + // Convert undefined to true so if nothing is returned from the upload_start_handler it is + // interpretted as 'true'. + if (returnValue === undefined) { + returnValue = true; + } + + returnValue = !!returnValue; + + this.callFlash("ReturnUploadStart", [returnValue]); +}; + + + +SWFUpload.prototype.uploadProgress = function (file, bytesComplete, bytesTotal) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_progress_handler", [file, bytesComplete, bytesTotal]); +}; + +SWFUpload.prototype.uploadError = function (file, errorCode, message) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_error_handler", [file, errorCode, message]); +}; + +SWFUpload.prototype.uploadSuccess = function (file, serverData) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_success_handler", [file, serverData]); +}; + +SWFUpload.prototype.uploadComplete = function (file) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_complete_handler", file); +}; + +/* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the + internal debug console. You can override this event and have messages written where you want. */ +SWFUpload.prototype.debug = function (message) { + this.queueEvent("debug_handler", message); +}; + + +/* ********************************** + Debug Console + The debug console is a self contained, in page location + for debug message to be sent. The Debug Console adds + itself to the body if necessary. + + The console is automatically scrolled as messages appear. + + If you are using your own debug handler or when you deploy to production and + have debug disabled you can remove these functions to reduce the file size + and complexity. +********************************** */ + +// Private: debugMessage is the default debug_handler. If you want to print debug messages +// call the debug() function. When overriding the function your own function should +// check to see if the debug setting is true before outputting debug information. +SWFUpload.prototype.debugMessage = function (message) { + if (this.settings.debug) { + var exceptionMessage, exceptionValues = []; + + // Check for an exception object and print it nicely + if (typeof(message) === "object" && typeof(message.name) === "string" && typeof(message.message) === "string") { + for (var key in message) { + if (message.hasOwnProperty(key)) { + exceptionValues.push(key + ": " + message[key]); + } + } + exceptionMessage = exceptionValues.join("\n") || ""; + exceptionValues = exceptionMessage.split("\n"); + exceptionMessage = "EXCEPTION: " + exceptionValues.join("\nEXCEPTION: "); + SWFUpload.Console.writeLine(exceptionMessage); + } else { + SWFUpload.Console.writeLine(message); + } + } +}; + +SWFUpload.Console = {}; +SWFUpload.Console.writeLine = function (message) { + var console, documentForm; + + try { + console = document.getElementById("SWFUpload_Console"); + + if (!console) { + documentForm = document.createElement("form"); + document.getElementsByTagName("body")[0].appendChild(documentForm); + + console = document.createElement("textarea"); + console.id = "SWFUpload_Console"; + console.style.fontFamily = "monospace"; + console.setAttribute("wrap", "off"); + console.wrap = "off"; + console.style.overflow = "auto"; + console.style.width = "700px"; + console.style.height = "350px"; + console.style.margin = "5px"; + documentForm.appendChild(console); + } + + console.value += message + "\n"; + + console.scrollTop = console.scrollHeight - console.clientHeight; + } catch (ex) { + alert("Exception: " + ex.name + " Message: " + ex.message); + } +}; diff --git a/system/classes/swfupload/swfupload.queue.js b/system/classes/swfupload/swfupload.queue.js new file mode 100644 index 0000000..b04d87a --- /dev/null +++ b/system/classes/swfupload/swfupload.queue.js @@ -0,0 +1,77 @@ +/* + Queue Plug-in + + Features: + *Adds a cancelQueue() method for cancelling the entire queue. + *All queued files are uploaded when startUpload() is called. + *If false is returned from uploadComplete then the queue upload is stopped. + If false is not returned (strict comparison) then the queue upload is continued. + *Adds a QueueComplete event that is fired when all the queued files have finished uploading. + Set the event handler with the queue_complete_handler setting. + + */ + +var SWFUpload; +if (typeof(SWFUpload) === "function") { + SWFUpload.queue = {}; + + SWFUpload.prototype.initSettings = (function (oldInitSettings) { + return function () { + if (typeof(oldInitSettings) === "function") { + oldInitSettings.call(this); + } + + this.customSettings.queue_cancelled_flag = false; + this.customSettings.queue_upload_count = 0; + + this.settings.user_upload_complete_handler = this.settings.upload_complete_handler; + this.settings.upload_complete_handler = SWFUpload.queue.uploadCompleteHandler; + + this.settings.queue_complete_handler = this.settings.queue_complete_handler || null; + }; + })(SWFUpload.prototype.initSettings); + + SWFUpload.prototype.startUpload = function (fileID) { + this.customSettings.queue_cancelled_flag = false; + this.callFlash("StartUpload", false, [fileID]); + }; + + SWFUpload.prototype.cancelQueue = function () { + this.customSettings.queue_cancelled_flag = true; + this.stopUpload(); + + var stats = this.getStats(); + while (stats.files_queued > 0) { + this.cancelUpload(); + stats = this.getStats(); + } + }; + + SWFUpload.queue.uploadCompleteHandler = function (file) { + var user_upload_complete_handler = this.settings.user_upload_complete_handler; + var continueUpload; + + if (file.filestatus === SWFUpload.FILE_STATUS.COMPLETE) { + this.customSettings.queue_upload_count++; + } + + if (typeof(user_upload_complete_handler) === "function") { + continueUpload = (user_upload_complete_handler.call(this, file) === false) ? false : true; + } else { + continueUpload = true; + } + + if (continueUpload) { + var stats = this.getStats(); + if (stats.files_queued > 0 && this.customSettings.queue_cancelled_flag === false) { + this.startUpload(); + } else if (this.customSettings.queue_cancelled_flag === false) { + this.queueEvent("queue_complete_handler", [this.customSettings.queue_upload_count]); + this.customSettings.queue_upload_count = 0; + } else { + this.customSettings.queue_cancelled_flag = false; + this.customSettings.queue_upload_count = 0; + } + } + }; +} \ No newline at end of file diff --git a/system/classes/swfupload/swfupload.swf b/system/classes/swfupload/swfupload.swf new file mode 100644 index 0000000000000000000000000000000000000000..2b94b5d665879e6ba678aa74e12fa59d02d7521e GIT binary patch literal 9917 zcmV;uCPLXmS5pZBN&oQMd>hr#_`cnho>r1&Np^0MY=VgsN0yxs0x==PhvYaU zR%$yOAwE{pt|gEqqaz1LYZ4OfBOIZnv=~Y$CA84{p!eOTM}-YP#@o!lh1gm7KH1sun{sqRI>aT~L7t*x&sEbkjj zrE_fnUDBAy=f~SxTK4YU8{B(-Fq0i^S+ilohL+Z~Eo;{{14VOge>$)1Yfk6RZQR5d zbg8*mHaVV8X3{dkN;Ff*U((oUa*fAIOvek^6k{2WwWuj|Oikx=Eo*{nfKfcwre(5Y zN`8|vKAuX(6lB-3uQ`{<#ID_|>`|Mwl#)wqY$+4soP08$Qa827Gf`Czr__D&`Eq-C zKBG2BkT_mebW_DL6`UQ6WyV^@vzd4y20CfLicPMZf-J@h(Nr>*P_vr~>1)%Oy@rS~ z7HMKxRmo?nDJ&e0r<-b zU;{UCUEWuOja(-`Gc&WxDZmcfp$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class.php new file mode 100644 index 0000000..0072f4a --- /dev/null +++ b/system/classes/templates.class.php @@ -0,0 +1,225 @@ + '', 'vote' => '', 'speedbar' => '', 'content' => '' ); + var $allow_php_include = true; + + function set($name, $var) { + if( is_array( $var ) && count( $var ) ) { + foreach ( $var as $key => $key_var ) { + $this->set( $key, $key_var ); + } + } else + $this->data[$name] = $var; + } + + function set_block($name, $var) { + if( is_array( $var ) && count( $var ) ) { + foreach ( $var as $key => $key_var ) { + $this->set_block( $key, $key_var ); + } + } else + $this->block_data[$name] = $var; + } + + function load_template($tpl_name) { + + if( $this->CacheTemplate[ $tpl_name ] ){ + $this->copy_template = $this->CacheTemplate[ $tpl_name ]; + return true; + } + + if( $tpl_name == '' || ! file_exists( $this->dir . DIRECTORY_SEPARATOR . $tpl_name ) ) { + die( " : " . $tpl_name ); + return false; + } + + $this->template = file_get_contents( $this->dir . DIRECTORY_SEPARATOR . $tpl_name ); + + if (strpos ( $this->template, "[aviable=" ) !== false) {$this->template = preg_replace ( "#\\[aviable=(.+?)\\](.*?)\\[/aviable\\]#ies", "\$this->check_module('\\1', '\\2')", $this->template );} + if (strpos ( $this->template, "[not-aviable=" ) !== false) {$this->template = preg_replace ( "#\\[not-aviable=(.+?)\\](.*?)\\[/not-aviable\\]#ies", "\$this->check_module('\\1', '\\2', false)", $this->template );} + if (strpos ( $this->template, "[not-group=" ) !== false) {$this->template = preg_replace ( "#\\[not-group=(.+?)\\](.*?)\\[/not-group\\]#ies", "\$this->check_group('\\1', '\\2', false)", $this->template );} + if (strpos ( $this->template, "[group=" ) !== false) {$this->template = preg_replace ( "#\\[group=(.+?)\\](.*?)\\[/group\\]#ies", "\$this->check_group('\\1', '\\2')", $this->template );} + if (strpos ( $this->template, "{include file=" ) !== false ) {$this->template = preg_replace( "#\\{include file=['\"](.+?)['\"]\\}#ies", "\$this->load_file('\\1', 'tpl')", $this->template );} + + $this->copy_template = $this->template; + + $this->CacheTemplate[ $tpl_name ] = $this->template; + + return true; + } + + function load_file( $name, $include_file = "tpl" ) { + global $db, $is_logged, $member_id, $cat_info, $config, $user_group, $category_id, $_TIME, $lang, $smartphone_detected, $dle_module; + + $name = str_replace( '..', '', $name ); + + $url = @parse_url ($name); + $type = explode( ".", $url['path'] ); + $type = strtolower( end( $type ) ); + + if ($type == "tpl") {return $this->sub_load_template( $name );} + + if ($include_file == "php") { + + if ( !$this->allow_php_include ) return; + + if ($type != "php") return " .tpl .php"; + + if ($url['path']{0} == "/" )$file_path = dirname (ROOT_DIR.$url['path']); + else $file_path = dirname (ROOT_DIR."/".$url['path']); + + $file_name = pathinfo($url['path']); + $file_name = $file_name['basename']; + + if ( stristr ( php_uname( "s" ) , "windows" ) === false ) + $chmod_value = @decoct(@fileperms($file_path)) % 1000; + + if ($chmod_value == 777 ) return " {$url['path']} , (CHMOD 777). . , ."; + if ( !file_exists($file_path."/".$file_name) ) return " {$url['path']} , ."; + + if ( $url['query'] ) {parse_str( $url['query'] );} + + ob_start(); + $tpl = new dle_template( ); + $tpl->dir = TEMPLATE_DIR; + include $file_path."/".$file_name; + return ob_get_clean(); + } + return '{include file="'.$name.'"}'; + } + + function sub_load_template( $tpl_name ) { + + $tpl_name = totranslit( $tpl_name ); + + if( $tpl_name == '' || ! file_exists( $this->dir . DIRECTORY_SEPARATOR . $tpl_name ) ) { + return " : " . $tpl_name ; + return false; + } + $template = file_get_contents( $this->dir . DIRECTORY_SEPARATOR . $tpl_name ); + + if (strpos ( $template, "[aviable=" ) !== false) {$template = preg_replace ( "#\\[aviable=(.+?)\\](.*?)\\[/aviable\\]#ies", "\$this->check_module('\\1', '\\2')", $template );} + if (strpos ( $template, "[not-aviable=" ) !== false) {$template = preg_replace ( "#\\[not-aviable=(.+?)\\](.*?)\\[/not-aviable\\]#ies", "\$this->check_module('\\1', '\\2', false)", $template );} + if (strpos ( $template, "[not-group=" ) !== false) {$template = preg_replace ( "#\\[not-group=(.+?)\\](.*?)\\[/not-group\\]#ies", "\$this->check_group('\\1', '\\2', false)", $template );} + if (strpos ( $this->template, "{if " ) !== false) {$this->template = preg_replace ( "#{if (.+?)}(.*?){/if}#ies", "$this->check_else('1', '2', false)", $this->template );} + if (strpos ( $template, "[group=" ) !== false) {$template = preg_replace ( "#\\[group=(.+?)\\](.*?)\\[/group\\]#ies", "\$this->check_group('\\1', '\\2')", $template );} + + return $template; + } + + function check_module($aviable, $block, $action = true) { + global $dle_module; + + $aviable = explode( '|', $aviable ); + + $block = str_replace( '\"', '"', $block ); + + if( $action ) { + + if( ! (in_array( $dle_module, $aviable )) and ($aviable[0] != "global") ) return ""; + else return $block; + + } else { + + if( (in_array( $dle_module, $aviable )) ) return ""; + else return $block; + + } + + } + + function check_group($groups, $block, $action = true) { + global $member_id; + + $groups = explode( ',', $groups ); + + if( $action ) { + + if( ! in_array( $member_id['user_group'], $groups ) ) return ""; + + } else { + + if( in_array( $member_id['user_group'], $groups ) ) return ""; + + } + + $block = str_replace( '\"', '"', $block ); + + return $block; + + } + + function _clear() { + + $this->data = array (); + $this->block_data = array (); + $this->copy_template = $this->template; + + } + + function clear() { + + $this->data = array (); + $this->block_data = array (); + $this->copy_template = null; + $this->template = null; + + } + + function global_clear() { + + $this->data = array (); + $this->block_data = array (); + $this->result = array (); + $this->copy_template = null; + $this->template = null; + + } + + function compile($tpl) { + if( count( $this->block_data ) ) { + foreach ( $this->block_data as $key_find => $key_replace ) { + $find_preg[] = $key_find; + $replace_preg[] = $key_replace; + } + + $this->copy_template = preg_replace( $find_preg, $replace_preg, $this->copy_template ); + } + + foreach ( $this->data as $key_find => $key_replace ) { + $find[] = $key_find; + $replace[] = $key_replace; + } + + $this->copy_template = str_replace( $find, $replace, $this->copy_template ); + + if( strpos( $this->copy_template, "{include file=" ) !== false ) { + + $this->copy_template = preg_replace( "#\\{include file=['\"](.+?)['\"]\\}#ies", "\$this->load_file('\\1', 'php')", $this->copy_template ); + + } + + if( isset( $this->result[$tpl] ) ) $this->result[$tpl] .= $this->copy_template; + else $this->result[$tpl] = $this->copy_template; + + $this->_clear(); + } + + function check_else($condition, $block){ + global $GLOBALS; + extract($GLOBALS, EXTR_SKIP, ""); + if(is_array($matches=explode("{else}",$block))) { + $block=$matches[0]; + $else=$matches[1]; + } + if(eval(("return $condition;"))) return str_replace( '"', '"', $block ); + return str_replace( '"', '"', $else ); + } +} +?> \ No newline at end of file diff --git a/system/classes/thumb.class.php b/system/classes/thumb.class.php new file mode 100644 index 0000000..8893966 --- /dev/null +++ b/system/classes/thumb.class.php @@ -0,0 +1,258 @@ +img['format'] = "JPEG"; + $this->img['src'] = @imagecreatefromjpeg( $imgfile ); + } elseif( $info[2] == 3 ) { + $this->img['format'] = "PNG"; + $this->img['src'] = @imagecreatefrompng( $imgfile ); + } elseif( $info[2] == 1 ) { + $this->img['format'] = "GIF"; + $this->img['src'] = @imagecreatefromgif( $imgfile ); + } else { + echo "Not Supported File! Thumbnails can only be made from .jpg, gif and .png images!"; + @unlink( $imgfile ); + exit(); + } + + if( !$this->img['src'] ) { + echo "Not Supported File! Thumbnails can only be made from .jpg, gif and .png images!"; + @unlink( $imgfile ); + exit(); + + } + + $this->img['lebar'] = @imagesx( $this->img['src'] ); + $this->img['tinggi'] = @imagesy( $this->img['src'] ); + $this->img['lebar_thumb'] = $this->img['lebar']; + $this->img['tinggi_thumb'] = $this->img['tinggi']; + //default quality jpeg + $this->img['quality'] = 90; + } + + function size_auto($size = 100, $site = 0) { + + $size = explode ("x", $size); + + if ( count($size) == 2 ) { + $size[0] = intval($size[0]); + $size[1] = intval($size[1]); + return $this->crop( intval($size[0]), intval($size[1]) ); + + } else { + $size[0] = intval($size[0]); + return $this->scale( intval($size[0]), $site); + + } + + } + + function crop($nw, $nh) { + + $w = $this->img['lebar']; + $h = $this->img['tinggi']; + + if( $w <= $nw AND $h <= $nh ) { + $this->img['lebar_thumb'] = $w; + $this->img['tinggi_thumb'] = $h; + return 0; + } + + $nw = min($nw, $w); + $nh = min($nh, $h); + + $size_ratio = max($nw / $w, $nh / $h); + + $src_w = ceil($nw / $size_ratio); + $src_h = ceil($nh / $size_ratio); + + $sx = floor(($w - $src_w)/2); + $sy = floor(($h - $src_h)/2); + + $this->img['des'] = imagecreatetruecolor($nw, $nh); + + if ( $this->img['format'] == "PNG" ) { + imagealphablending( $this->img['des'], false); + imagesavealpha( $this->img['des'], true); + } + + imagecopyresampled($this->img['des'],$this->img['src'],0,0,$sx,$sy,$nw,$nh,$src_w,$src_h); + + $this->img['src'] = $this->img['des']; + return 1; + } + + function scale($size = 100, $site = 0) { + + $site = intval( $site ); + + if( $this->img['lebar'] <= $size and $this->img['tinggi'] <= $size ) { + $this->img['lebar_thumb'] = $this->img['lebar']; + $this->img['tinggi_thumb'] = $this->img['tinggi']; + return 0; + } + + switch ($site) { + + case "1" : + if( $this->img['lebar'] <= $size ) { + $this->img['lebar_thumb'] = $this->img['lebar']; + $this->img['tinggi_thumb'] = $this->img['tinggi']; + return 0; + } else { + $this->img['lebar_thumb'] = $size; + $this->img['tinggi_thumb'] = ($this->img['lebar_thumb'] / $this->img['lebar']) * $this->img['tinggi']; + } + + break; + + case "2" : + if( $this->img['tinggi'] <= $size ) { + $this->img['lebar_thumb'] = $this->img['lebar']; + $this->img['tinggi_thumb'] = $this->img['tinggi']; + return 0; + } else { + $this->img['tinggi_thumb'] = $size; + $this->img['lebar_thumb'] = ($this->img['tinggi_thumb'] / $this->img['tinggi']) * $this->img['lebar']; + } + + break; + + default : + + if( $this->img['lebar'] >= $this->img['tinggi'] ) { + $this->img['lebar_thumb'] = $size; + $this->img['tinggi_thumb'] = ($this->img['lebar_thumb'] / $this->img['lebar']) * $this->img['tinggi']; + + } else { + + $this->img['tinggi_thumb'] = $size; + $this->img['lebar_thumb'] = ($this->img['tinggi_thumb'] / $this->img['tinggi']) * $this->img['lebar']; + + } + + break; + } + if ($this->img['lebar_thumb'] < 1 ) $this->img['lebar_thumb'] = 1; + if ($this->img['tinggi_thumb'] < 1 ) $this->img['tinggi_thumb'] = 1; + $this->img['des'] = imagecreatetruecolor( $this->img['lebar_thumb'], $this->img['tinggi_thumb'] ); + + if ( $this->img['format'] == "PNG" ) { + imagealphablending( $this->img['des'], false); + imagesavealpha( $this->img['des'], true); + } + + @imagecopyresampled( $this->img['des'], $this->img['src'], 0, 0, 0, 0, $this->img['lebar_thumb'], $this->img['tinggi_thumb'], $this->img['lebar'], $this->img['tinggi'] ); + + $this->img['src'] = $this->img['des']; + return 1; + + } + + function jpeg_quality($quality = 90) { + //jpeg quality + $this->img['quality'] = $quality; + } + + function save($save = "") { + + if( $this->img['format'] == "JPG" || $this->img['format'] == "JPEG" ) { + //JPEG + imagejpeg( $this->img['src'], $save, $this->img['quality'] ); + } elseif( $this->img['format'] == "PNG" ) { + //PNG + imagealphablending( $this->img['src'], false); + imagesavealpha( $this->img['src'], true); + imagepng( $this->img['src'], $save ); + } elseif( $this->img['format'] == "GIF" ) { + //GIF + imagegif( $this->img['src'], $save ); + } + + imagedestroy( $this->img['src'] ); + } + + function show() { + if( $this->img['format'] == "JPG" || $this->img['format'] == "JPEG" ) { + //JPEG + imageJPEG( $this->img['src'], "", $this->img['quality'] ); + } elseif( $this->img['format'] == "PNG" ) { + //PNG + imagePNG( $this->img['src'] ); + } elseif( $this->img['format'] == "GIF" ) { + //GIF + imageGIF( $this->img['src'] ); + } + + imagedestroy( $this->img['src'] ); + } + + // ************************************************************************* + function insert_watermark($min_image) { + global $config; + $margin = 7; + + $this->watermark_image_light = ROOT_DIR . '/templates/' . $config['skin'] . '/images/watermark.png'; + $this->watermark_image_dark = ROOT_DIR . '/templates/' . $config['skin'] . '/images/watermark.png'; + + $image_width = imagesx( $this->img['src'] ); + $image_height = imagesy( $this->img['src'] ); + + list ( $watermark_width, $watermark_height ) = getimagesize( $this->watermark_image_light ); + + $watermark_x = $image_width - $margin - $watermark_width + $margin; + //$watermark_y = $image_height - $margin - $watermark_height; + $watermark_y = $image_height - $watermark_height; + + $watermark_x2 = $watermark_x + $watermark_width; + $watermark_y2 = $watermark_y + $watermark_height; + + if( $watermark_x < 0 or $watermark_y < 0 or $watermark_x2 > $image_width or $watermark_y2 > $image_height or $image_width < $min_image or $image_height < $min_image ) { + return; + } + + $test = imagecreatetruecolor( 1, 1 ); + imagecopyresampled( $test, $this->img['src'], 0, 0, $watermark_x, $watermark_y, 1, 1, $watermark_width, $watermark_height ); + $rgb = imagecolorat( $test, 0, 0 ); + + $r = ($rgb >> 16) & 0xFF; + $g = ($rgb >> 8) & 0xFF; + $b = $rgb & 0xFF; + + $max = min( $r, $g, $b ); + $min = max( $r, $g, $b ); + $lightness = ( double ) (($max + $min) / 510.0); + imagedestroy( $test ); + + $watermark_image = ($lightness < 0.5) ? $this->watermark_image_light : $this->watermark_image_dark; + + $watermark = imagecreatefrompng( $watermark_image ); + + imagealphablending( $this->img['src'], TRUE ); + imagealphablending( $watermark, TRUE ); + + if( $this->img['format'] == "PNG" ) { + $png8fix = imagecreatetruecolor( $image_width, $image_height ); + imagecopy( $png8fix, $this->img['src'], 0, 0, 0, 0, $image_width, $image_height ); + imagecopy( $png8fix, $watermark, $watermark_x, $watermark_y, 0, 0, $watermark_width, $watermark_height ); + imagecopy( $this->img['src'], $png8fix, 0, 0, 0, 0, $image_width, $image_height ); + imagedestroy( $png8fix ); + }else imagecopy( $this->img['src'], $watermark, $watermark_x, $watermark_y, 0, 0, $watermark_width, $watermark_height ); + + imagedestroy( $watermark ); + + } + +} +?> \ No newline at end of file diff --git a/system/classes/torrent.class.php b/system/classes/torrent.class.php new file mode 100644 index 0000000..e0a06ca --- /dev/null +++ b/system/classes/torrent.class.php @@ -0,0 +1,537 @@ + 4096 ) + return self::set_error( new Exception( 'Invalid piece lenth, must be between 32 and 4096' ) ); + if ( is_string( $meta ) ) + $meta = array( 'announce' => $meta ); + if ( $this->build( $data, $piece_length * 1024 ) ) + $this->touch(); + else + $meta = array_merge( $meta, $this->decode( $data ) ); + foreach( $meta as $key => $value ) + $this->{$key} = $value; + } + + public function __toString() { + return $this->encode( $this ); + } + + public function error() { + return empty( self::$_errors ) ? + false : + self::$_errors[0]->getMessage(); + } + + public function errors() { + return empty( self::$_errors ) ? + false : + self::$_errors; + } + + public function announce ( $announce = null ) { + if ( is_null( $announce ) ) + return ! isset( $this->{'announce-list'} ) ? + isset( $this->announce ) ? $this->announce : null : + $this->{'announce-list'}; + $this->touch(); + if ( is_string( $announce ) && isset( $this->announce ) ) + return $this->{'announce-list'} = self::announce_list( isset( $this->{'announce-list'} ) ? $this->{'announce-list'} : $this->announce, $announce ); + unset( $this->{'announce-list'} ); + if ( is_array( $announce ) || is_object( $announce ) ) + if ( ( $this->announce = self::first_announce( $announce ) ) && count( $announce ) > 1 ) + return $this->{'announce-list'} = self::announce_list( $announce ); + else + return $this->announce; + if ( ! isset( $this->announce ) && $announce ) + return $this->announce = (string) $announce; + unset( $this->announce ); + } + + public function comment ( $comment = null ) { + return is_null( $comment ) ? + isset( $this->comment ) ? $this->comment : null : + $this->touch( $this->comment = (string) $comment ); + } + + public function name ( $name = null ) { + return is_null( $name ) ? + isset( $this->info['name'] ) ? $this->info['name'] : null : + $this->touch( $this->info['name'] = (string) $name ); + } + + public function is_private ( $private = null ) { + return is_null( $private ) ? + ! empty( $this->info['private'] ) : + $this->touch( $this->info['private'] = $private ? 1 : 0 ); + } + + public function url_list ( $urls = null ) { + return is_null( $urls ) ? + isset( $this->{'url-list'} ) ? $this->{'url-list'} : null : + $this->touch( $this->{'url-list'} = is_string( $urls) ? $urls : (array) $urls ); + } + + public function httpseeds ( $urls = null ) { + return is_null( $urls ) ? + isset( $this->httpseeds ) ? $this->httpseeds : null : + $this->touch( $this->httpseeds = (array) $urls ); + } + + public function piece_length () { + return isset( $this->info['piece length'] ) ? + $this->info['piece length'] : + null; + } + + public function hash_info () { + return isset( $this->info ) ? + sha1( self::encode( $this->info ) ) : + null; + } + + public function content ( $precision = null ) { + $files = array(); + if ( isset( $this->info['files'] ) && is_array( $this->info['files'] ) ) + foreach ( $this->info['files'] as $file ) + $files[self::path( $file['path'], $this->info['name'] )] = $precision ? + self::format( $file['length'], $precision ) : + $file['length']; + elseif ( isset( $this->info['name'] ) ) + $files[$this->info['name']] = $precision ? + self::format( $this->info['length'], $precision ) : + $this->info['length']; + return $files; + } + + public function offset () { + $files = array(); + $size = 0; + if ( isset( $this->info['files'] ) && is_array( $this->info['files'] ) ) + foreach ( $this->info['files'] as $file ) + $files[self::path( $file['path'], $this->info['name'] )] = array( + 'startpiece' => floor( $size / $this->info['piece length'] ), + 'offset' => fmod( $size, $this->info['piece length'] ), + 'size' => $size += $file['length'], + 'endpiece' => floor( $size / $this->info['piece length'] ) + ); + elseif ( isset( $this->info['name'] ) ) + $files[$this->info['name']] = array( + 'startpiece' => 0, + 'offset' => 0, + 'size' => $this->info['length'], + 'endpiece' => floor( $this->info['length'] / $this->info['piece length'] ) + ); + return $files; + } + + public function size ( $precision = null ) { + $size = 0; + if ( isset( $this->info['files'] ) && is_array( $this->info['files'] ) ) + foreach ( $this->info['files'] as $file ) + $size += $file['length']; + elseif ( isset( $this->info['name'] ) ) + $size = $this->info['length']; + return is_null( $precision ) ? + $size : + self::format( $size, $precision ); + } + + public function scrape ( $announce = null, $hash_info = null, $timeout = self::timeout ) { + $packed_hash = urlencode( pack('H*', $hash_info ? $hash_info : $this->hash_info() ) ); + $handles = $scrape = array(); + if ( ! function_exists( 'curl_multi_init' ) ) + return self::set_error( new Exception( 'Install CURL with "curl_multi_init" enabled' ) ); + $curl = curl_multi_init(); + foreach ( (array) ($announce ? $announce : $this->announce()) as $tier ) + foreach ( (array) $tier as $tracker ) { + $tracker = str_ireplace( array( 'udp://', '/announce', ':80/' ), array( 'http://', '/scrape', '/' ), $tracker ); + if ( isset( $handles[$tracker] ) ) + continue; + $handles[$tracker] = curl_init( $tracker . '?info_hash=' . $packed_hash ); + curl_setopt( $handles[$tracker], CURLOPT_RETURNTRANSFER, true ); + curl_setopt( $handles[$tracker], CURLOPT_TIMEOUT, $timeout ); + curl_multi_add_handle( $curl, $handles[$tracker] ); + } + do { + while ( ( $state = curl_multi_exec( $curl, $running ) ) == CURLM_CALL_MULTI_PERFORM ); + if( $state != CURLM_OK ) + continue; + while ( $done = curl_multi_info_read( $curl ) ) { + $info = curl_getinfo( $done['handle'] ); + $tracker = explode( '?', $info['url'], 2 ); + $tracker = array_shift( $tracker ); + if ( empty( $info['http_code'] ) ) { + $scrape[$tracker] = self::set_error( new Exception( 'Tracker request timeout (' . $timeout . 's)' ), true ); + continue; + } elseif ( $info['http_code'] != 200 ) { + $scrape[$tracker] = self::set_error( new Exception( 'Tracker request failed (' . $info['http_code'] . ' code)' ), true ); + continue; + } + $data = curl_multi_getcontent( $done['handle'] ); + $stats = self::decode_data( $data ); + curl_multi_remove_handle( $curl, $done['handle'] ); + $scrape[$tracker] = empty( $stats['files'] ) ? + self::set_error( new Exception( 'Empty scrape data' ), true ) : + array_shift( $stats['files'] ) + ( empty( $stats['flags'] ) ? array() : $stats['flags'] ); + } + } while ( $running ); + curl_multi_close( $curl ); + return $scrape; + } + + public function save ( $filename = null ) { + return file_put_contents( is_null( $filename ) ? $this->info['name'] . '.torrent' : $filename, $this->encode( $this ) ); + } + + public function send ( $filename = null ) { + $data = $this->encode( $this ); + header( 'Content-type: application/x-bittorrent' ); + header( 'Content-Length: ' . strlen( $data ) ); + header( 'Content-Disposition: attachment; filename="[files-sib.net]' . ( is_null( $filename ) ? $this->info['name'] . '.torrent' : $filename ) . '"' ); + exit( $data ); + } + + public function magnet ( $html = true ) { + $ampersand = $html ? '&' : '&'; + return sprintf( 'magnet:?xt=urn:btih:%2$s%1$sdn=%3$s%1$sxl=%4$d%1$str=%5$s', $ampersand, $this->hash_info(), urlencode( $this->name() ), $this->size(), implode( $ampersand .'tr=', self::untier( $this->announce() ) ) ); + } + + static public function encode ( $mixed ) { + switch ( gettype( $mixed ) ) { + case 'integer': + case 'double': + return self::encode_integer( $mixed ); + case 'object': + $mixed = get_object_vars( $mixed ); + case 'array': + return self::encode_array( $mixed ); + default: + return self::encode_string( (string) $mixed ); + } + } + + static private function encode_string ( $string ) { + return strlen( $string ) . ':' . $string; + } + + static private function encode_integer ( $integer ) { + return 'i' . $integer . 'e'; + } + + static private function encode_array ( $array ) { + if ( self::is_list( $array ) ) { + $return = 'l'; + foreach ( $array as $value ) + $return .= self::encode( $value ); + } else { + ksort( $array, SORT_STRING ); + $return = 'd'; + foreach ( $array as $key => $value ) + $return .= self::encode( strval( $key ) ) . self::encode( $value ); + } + return $return . 'e'; + } + + static protected function decode ( $string ) { + $data = is_file( $string ) || self::url_exists( $string ) ? + self::file_get_contents( $string ) : + $string; + return (array) self::decode_data( $data ); + } + + static private function decode_data ( & $data ) { + switch( self::char( $data ) ) { + case 'i': + $data = substr( $data, 1 ); + return self::decode_integer( $data ); + case 'l': + $data = substr( $data, 1 ); + return self::decode_list( $data ); + case 'd': + $data = substr( $data, 1 ); + return self::decode_dictionary( $data ); + default: + return self::decode_string( $data ); + } + } + + static private function decode_dictionary ( & $data ) { + $dictionary = array(); + $previous = null; + while ( ( $char = self::char( $data ) ) != 'e' ) { + if ( $char === false ) + return self::set_error( new Exception( 'Unterminated dictionary' ) ); + if ( ! ctype_digit( $char ) ) + return self::set_error( new Exception( 'Invalid dictionary key' ) ); + $key = self::decode_string( $data ); + if ( isset( $dictionary[$key] ) ) + return self::set_error( new Exception( 'Duplicate dictionary key' ) ); + if ( $key < $previous ) + return self::set_error( new Exception( 'Missorted dictionary key' ) ); + $dictionary[$key] = self::decode_data( $data ); + $previous = $key; + } + $data = substr( $data, 1 ); + return $dictionary; + } + + static private function decode_list ( & $data ) { + $list = array(); + while ( ( $char = self::char( $data ) ) != 'e' ) { + if ( $char === false ) + return self::set_error( new Exception( 'Unterminated list' ) ); + $list[] = self::decode_data( $data ); + } + $data = substr( $data, 1 ); + return $list; + } + + static private function decode_string ( & $data ) { + if ( self::char( $data ) === '0' && substr( $data, 1, 1 ) != ':' ) + self::set_error( new Exception( 'Invalid string length, leading zero' ) ); + if ( ! $colon = @strpos( $data, ':' ) ) + return self::set_error( new Exception( 'Invalid string length, colon not found' ) ); + $length = intval( substr( $data, 0, $colon ) ); + if ( $length + $colon + 1 > strlen( $data ) ) + return self::set_error( new Exception( 'Invalid string, input too short for string length' ) ); + $string = substr( $data, $colon + 1, $length ); + $data = substr( $data, $colon + $length + 1 ); + return $string; + } + + static private function decode_integer ( & $data ) { + $start = 0; + $end = strpos( $data, 'e'); + if ( $end === 0 ) + self::set_error( new Exception( 'Empty integer' ) ); + if ( self::char( $data ) == '-' ) + $start++; + if ( substr( $data, $start, 1 ) == '0' && $end > $start + 1 ) + self::set_error( new Exception( 'Leading zero in integer' ) ); + if ( ! ctype_digit( substr( $data, $start, $start ? $end - 1 : $end ) ) ) + self::set_error( new Exception( 'Non-digit characters in integer' ) ); + $integer = substr( $data, 0, $end ); + $data = substr( $data, $end + 1 ); + + return 0 + $integer; + } + + protected function build ( $data, $piece_length ) { + if ( is_null( $data ) ) + return false; + elseif ( is_array( $data ) && self::is_list( $data ) ) + return $this->info = $this->files( $data, $piece_length ); + elseif ( is_dir( $data ) ) + return $this->info = $this->folder( $data, $piece_length ); + elseif ( ( is_file( $data ) || self::url_exists( $data ) ) && ! self::is_torrent( $data ) ) + return $this->info = $this->file( $data, $piece_length ); + else + return false; + } + + protected function touch ( $void = null ) { + $this->{'created by'} = 'Files-Sib.NET Tracker'; + $this->{'creation date'} = time(); + return $void; + } + + static protected function set_error ( $exception, $message = false ) { + return ( array_unshift( self::$_errors, $exception ) && $message ) ? $exception->getMessage() : false; + } + + static protected function announce_list( $announce, $merge = array() ) { + return array_map( create_function( '$a', 'return (array) $a;' ), array_merge( (array) $announce, (array) $merge ) ); + } + + static protected function first_announce( $announce ) { + while ( is_array( $announce ) ) + $announce = reset( $announce ); + return $announce; + } + + static protected function pack ( & $data ) { + return pack('H*', sha1( $data ) ) . ( $data = null ); + } + + static protected function path ( $path, $folder ) { + array_unshift( $path, $folder ); + return join( DIRECTORY_SEPARATOR, $path ); + } + + static protected function is_list ( $array ) { + foreach ( array_keys( $array ) as $key ) + if ( ! is_int( $key ) ) + return false; + return true; + } + + private function pieces ( $handle, $piece_length, $last = true ) { + static $piece, $length; + if ( empty( $length ) ) + $length = $piece_length; + $pieces = null; + while ( ! feof( $handle ) ) { + if ( ( $length = strlen( $piece .= fread( $handle, $length ) ) ) == $piece_length ) + $pieces .= self::pack( $piece ); + elseif ( ( $length = $piece_length - $length ) < 0 ) + return self::set_error( new Exception( 'Invalid piece length!' ) ); + } + fclose( $handle ); + return $pieces . ( $last && $piece ? self::pack( $piece ) : null); + } + + private function file ( $file, $piece_length ) { + if ( ! $handle = self::fopen( $file, $size = self::filesize( $file ) ) ) + return self::set_error( new Exception( 'Failed to open file: "' . $file . '"' ) ); + if ( self::is_url( $file ) ) + $this->url_list( $file ); + $path = explode( DIRECTORY_SEPARATOR, $file ); + return array( + 'length' => $size, + 'name' => end( $path ), + 'piece length' => $piece_length, + 'pieces' => $this->pieces( $handle, $piece_length ) + ); + } + + private function files ( $files, $piece_length ) { + if ( ! self::is_url( current( $files ) ) ) + $files = array_map( 'realpath', $files ); + sort( $files ); + usort( $files, create_function( '$a,$b', 'return strrpos($a,DIRECTORY_SEPARATOR)-strrpos($b,DIRECTORY_SEPARATOR);' ) ); + $first = current( $files ); + $root = dirname( $first ); + if ( $url = self::is_url( $first ) ) + $this->url_list( dirname( $root ) . DIRECTORY_SEPARATOR ); + $path = explode( DIRECTORY_SEPARATOR, dirname( $url ? $first : realpath( $first ) ) ); + $pieces = null; $info_files = array(); $count = count( $files ) - 1; + foreach ( $files as $i => $file ) { + if ( $path != array_intersect_assoc( $file_path = explode( DIRECTORY_SEPARATOR, $file ), $path ) ) { + self::set_error( new Exception( 'Files must be in the same folder: "' . $file . '" discarded' ) ); + continue; + } + if ( ! $handle = self::fopen( $file, $filesize = self::filesize( $file ) ) ) { + self::set_error( new Exception( 'Failed to open file: "' . $file . '" discarded' ) ); + continue; + } + $pieces .= $this->pieces( $handle, $piece_length, $count == $i ); + $info_files[] = array( + 'length' => $filesize, + 'path' => array_diff( $file_path, $path ) + ); + } + return array( + 'files' => $info_files, + 'name' => end( $path ), + 'piece length' => $piece_length, + 'pieces' => $pieces + ); + + } + + private function folder ( $dir, $piece_length ) { + return $this->files( self::scandir( $dir ), $piece_length ); + } + + static private function char ( $data ) { + return empty( $data ) ? + false : + substr( $data, 0, 1 ); + } + + static public function format ( $size, $precision = 2 ) { + $units = array ('octets', 'Kb', 'Mb', 'Gb', 'Tb'); + while( ( $next = next( $units ) ) && $size > 1024 ) + $size /= 1024; + return round( $size, $precision ) . ' ' . ( $next ? prev( $units ) : end( $units ) ); + } + + static public function filesize ( $file ) { + if ( is_file( $file ) ) + return (double) sprintf( '%u', @filesize( $file ) ); + else if ( $content_length = preg_grep( $pattern = '#^Content-Length:\s+(\d+)$#i', (array) @get_headers( $file ) ) ) + return (int) preg_replace( $pattern, '$1', reset( $content_length ) ); + } + + static public function fopen ( $file, $size = null ) { + if ( ( is_null( $size ) ? self::filesize( $file ) : $size ) <= 2 * pow( 1024, 3 ) ) + return fopen( $file, 'r' ); + elseif ( PHP_OS != 'Linux' ) + return self::set_error( new Exception( 'File size is greater than 2GB. This is only supported under Linux' ) ); + elseif ( ! is_readable( $file ) ) + return false; + else + return popen( 'cat ' . escapeshellarg( realpath( $file ) ), 'r' ); + } + + static public function scandir ( $dir ) { + $paths = array(); + foreach ( scandir( $dir ) as $item ) + if ( $item != '.' && $item != '..' ) + if ( is_dir( $path = realpath( $dir . DIRECTORY_SEPARATOR . $item ) ) ) + $paths = array_merge( self::scandir( $path ), $paths ); + else + $paths[] = $path; + return $paths; + } + + static public function is_url ( $url ) { + return preg_match( '#^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$#i', $url ); + } + + static public function url_exists ( $url ) { + return self::is_url( $url ) ? + (bool) self::filesize ( $url ) : + false; + } + + static public function is_torrent ( $file, $timeout = self::timeout ) { + return ( $start = self::file_get_contents( $file, $timeout, 0, 11 ) ) && $start === 'd8:announce' || $start === 'd10:created'; + } + + static public function file_get_contents ( $file, $timeout = self::timeout, $offset = null, $length = null ) { + if ( is_file( $file ) || ini_get( 'allow_url_fopen' ) ) { + $context = ! is_file( $file ) && $timeout ? + stream_context_create( array( 'http' => array( 'timeout' => $timeout ) ) ) : + null; + return ! is_null( $offset ) ? $length ? + @file_get_contents( $file, false, $context, $offset, $length ) : + @file_get_contents( $file, false, $context, $offset ) : + @file_get_contents( $file, false, $context ); + } elseif ( ! function_exists( 'curl_init' ) ) + return self::set_error( new Exception( 'Install CURL or enable "allow_url_fopen"' ) ); + $handle = curl_init( $file ); + if ( $timeout ) + curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout ); + if ( $offset || $length ) + curl_setopt( $handle, CURLOPT_RANGE, $offset . '-' . ( $length ? $offset + $length -1 : null ) ); + curl_setopt( $handle, CURLOPT_RETURNTRANSFER, 1 ); + $content = curl_exec( $handle ); + $size = curl_getinfo( $handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD ); + curl_close( $handle ); + return ( $offset && $size == -1 ) || ( $length && $length != $size ) ? $length ? + substr( $content, $offset, $length) : + substr( $content, $offset) : + $content; + } + + static public function untier( $announces ) { + $list = array(); + foreach ( (array) $announces as $tier ) { + is_array( $tier ) ? + $list = array_merge( $list, self::untier( $tier ) ) : + array_push( $list, $tier ); + } + return $list; + } + + public function upload($torrent){ + + } +} \ No newline at end of file diff --git a/system/cron.php b/system/cron.php new file mode 100644 index 0000000..7476a39 --- /dev/null +++ b/system/cron.php @@ -0,0 +1,38 @@ +get ( "cron" ); +if (date ( "Y-m-d", $cron_time ) != date ( "Y-m-d", $_TIME )) $cron = true; + +if($cron) { + $cache->set( "cron", $_TIME ); + + $db->query( "DELETE FROM " . USERPREFIX . "_banned WHERE days != '0' AND date < '$_TIME' AND users_id = '0'" ); + $cache->delete('banned.php' ); + + if( intval( $config['max_image_days'] ) ) { + $thisdate = $_TIME - ($config['max_image_days'] * 3600 * 24); + $db->query( "SELECT images FROM " . PREFIX . "_images where date < '$thisdate' AND news_id = '0'" ); + while ( $row = $db->get_row() ) { + $listimages = explode( "|||", $row['images'] ); + if( $row['images'] != "" ) foreach ( $listimages as $dataimages ) { + $url_image = explode( "/", $dataimages ); + if( count( $url_image ) == 2 ) { + $folder_prefix = $url_image[0] . "/"; + $dataimages = $url_image[1]; + } else { + $folder_prefix = ""; + $dataimages = $url_image[0]; + } + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . $dataimages ); + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . "thumbs/" . $dataimages ); + }} + $db->free(); + $db->query( "DELETE FROM " . PREFIX . "_images where date < '$thisdate' AND news_id = '0'" ); + } + $cache->clear(); +} +?> \ No newline at end of file diff --git a/system/engine.php b/system/engine.php new file mode 100644 index 0000000..07a8924 --- /dev/null +++ b/system/engine.php @@ -0,0 +1,464 @@ +:]]' AND "; + } else {$stop_list = "category IN ('" . implode ( "','", $allow_list ) . "') AND ";} + } else $stop_list = ""; + + if ($user_group[$member_id['user_group']]['allow_short']) $stop_list = ""; + + $sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, title, category, alt_name, comm_num, allow_comm, allow_main, allow_rate, fixed, rating, news_read, remote_addr, tags FROM " . PREFIX . "_post WHERE {$stop_list}approve AND allow_main" . $where_date . " ORDER BY " . $fixed . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number']; + $sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post WHERE {$stop_list}approve AND allow_main" . $where_date; + $sql_news = ""; + + // ################ ################# + if ($do == "cat" and $category != '' and $subaction == '') { + $newsmodule = true; + + if (! $category_id) $category_id = 'not detected'; + if ($allow_list[0] != "all") {if (! $user_group[$member_id['user_group']]['allow_short'] and ! in_array ( $category_id, $allow_list )) $category_id = 'not detected';} + + $get_cats = get_sub_cats ( $category_id ); + + if ($cat_info[$category_id]['news_sort'] != "") $news_sort_by = $cat_info[$category_id]['news_sort']; + if ($cat_info[$category_id]['news_msort'] != "") $news_direction_by = $cat_info[$category_id]['news_msort']; + if ($cat_info[$category_id]['news_number']) $config['news_number'] = $cat_info[$category_id]['news_number']; + + if ($cstart) { + $cstart = $cstart - 1; + $cstart = $cstart * $config['news_number']; + } + + $url_page = $config['http_home_url'] . get_url ( $category_id ); + $user_query = "do=cat&category=" . $cat_info[$category_id]['alt_name']; + + if ($config['allow_multi_category']) {$where_category = "category regexp '[[:<:]](" . $get_cats . ")[[:>:]]'"; + } else { + $get_cats = str_replace ( "|", "','", $get_cats ); + $where_category = "category IN ('" . $get_cats . "')"; + } + + if (isset ( $_SESSION['dle_sort_cat'] )) $news_sort_by = $_SESSION['dle_sort_cat']; + if (isset ( $_SESSION['dle_direction_cat'] )) $news_direction_by = $_SESSION['dle_direction_cat']; + + $sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, title, category, alt_name, comm_num, allow_comm, allow_main, allow_rate, fixed, rating, news_read, remote_addr, tags FROM " . PREFIX . "_post WHERE {$where_category} AND approve" . $where_date . " ORDER BY " . $fixed . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number']; + $sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post WHERE {$where_category} AND approve" . $where_date; + + } elseif ($do == 'lastnews') { + // ################ ################# + if ($cstart) { + $cstart = $cstart - 1; + $cstart = $cstart * $config['news_number']; + } + $newsmodule = true; + $url_page = $config['http_home_url'] . "lastnews"; + $user_query = "do=lastnews"; + + if (isset ( $_SESSION['dle_sort_lastnews'] )) $news_sort_by = $_SESSION['dle_sort_lastnews']; else $news_sort_by = "date"; + if (isset ( $_SESSION['dle_direction_lastnews'] )) $news_direction_by = $_SESSION['dle_direction_lastnews']; else $news_direction_by = "DESC"; + + $sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, title, category, alt_name, comm_num, allow_comm, allow_main, allow_rate, rating, news_read, approve, remote_addr, tags FROM " . PREFIX . "_post where {$stop_list}approve" . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number']; + $sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post where {$stop_list}approve" . $where_date; + + } elseif ($do == 'tags') { + // ################ ################# + if ($cstart) { + $cstart = $cstart - 1; + $cstart = $cstart * $config['news_number']; + } + + $newsmodule = true; + + $tag = $db->safesql ( htmlspecialchars ( strip_tags ( stripslashes ( trim ( urldecode ( $_GET['tag'] ) ) ) ), ENT_QUOTES ) ); + $url_page = $config['http_home_url'] . "tags/" . urlencode ( $tag ); + $user_query = "do=tags&tag=" . urlencode ( $tag ); + + if (isset ( $_SESSION['dle_sort_tags'] )) $news_sort_by = $_SESSION['dle_sort_tags']; + if (isset ( $_SESSION['dle_direction_tags'] )) $news_direction_by = $_SESSION['dle_direction_tags']; + + $db->query ( "SELECT news_id FROM " . PREFIX . "_tags WHERE tag='{$tag}'" ); + $tag_array = array (); + + while ( $row = $db->get_row () ) {$tag_array[] = $row['news_id'];} + + if (count ( $tag_array )) {$tag_array = "(" . implode ( ",", $tag_array ) . ")"; + } else {$tag_array = "('undefined')";} + + $db->free (); + + $sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, title, category, alt_name, comm_num, allow_comm, allow_main, allow_rate, rating, news_read, approve, remote_addr, tags FROM " . PREFIX . "_post where {$stop_list}id IN {$tag_array} AND approve" . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number']; + $sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post where {$stop_list}id IN {$tag_array} AND approve" . $where_date; + $allow_active_news = true; + + $tag_array = array (); + unset ( $tag_array ); + + } elseif ($subaction == 'userinfo') { + // ################ ################# + if ($cstart) { + $cstart = $cstart - 1; + $cstart = $cstart * $config['news_number']; + } + + $url_page = $config['http_home_url'] . "user/" . urlencode ( $user ); + $user_query = "subaction=userinfo&user=" . urlencode ( $user ); + + if ($member_id['name'] == $user or $user_group[$member_id['user_group']]['allow_all_edit']) { + if (isset ( $_SESSION['dle_sort_userinfo'] )) $news_sort_by = $_SESSION['dle_sort_userinfo']; + if (isset ( $_SESSION['dle_direction_userinfo'] )) $news_direction_by = $_SESSION['dle_direction_userinfo']; + + $sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, title, category, alt_name, comm_num, allow_comm, allow_main, allow_rate, approve, fixed, rating, news_read, remote_addr, tags FROM " . PREFIX . "_post WHERE autor = '$user' AND approve = '0' ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number']; + $sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post WHERE autor = '$user' AND approve = '0'"; + $allow_active_news = false; + } else {$allow_active_news = false;} + $cache->off(); + } elseif ($subaction == 'allnews') { + // ################ ################# + if ($cstart) { + $cstart = $cstart - 1; + $cstart = $cstart * $config['news_number']; + } + + $newsmodule = true; + $url_page = $config['http_home_url'] . "user/" . urlencode ( $user ) . "/news"; + $user_query = "subaction=allnews&user=" . urlencode ( $user ); + + if (isset ( $_SESSION['dle_sort_allnews'] )) $news_sort_by = $_SESSION['dle_sort_allnews']; + if (isset ( $_SESSION['dle_direction_allnews'] )) $news_direction_by = $_SESSION['dle_direction_allnews']; + + $sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, title, category, alt_name, comm_num, allow_comm, allow_main, allow_rate, rating, news_read, approve, remote_addr, tags FROM " . PREFIX . "_post where {$stop_list}autor = '$user' AND approve" . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number']; + $sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post where {$stop_list}autor = '$user' AND approve" . $where_date; + + $allow_active_news = true; + //$config['allow_cache'] = false; + + } elseif ($subaction == 'newposts') { + // ################ ################# + if ($cstart) { + $cstart = $cstart - 1; + $cstart = $cstart * $config['news_number']; + } + $newsmodule = true; + + $url_page = $config['http_home_url'] . "newposts"; + $user_query = "subaction=newposts"; + + $thistime = date ( "Y-m-d H:i:s", $_TIME ); + + if (isset ( $_SESSION['member_lasttime'] )) {$lasttime = date ( "Y-m-d H:i:s", $_SESSION['member_lasttime'] ); + } else {$lasttime = date ( "Y-m-d H:i:s", (time () + ($config['date_adjust'] * 60) - (3600 * 4)) );} + + if (isset ( $_SESSION['dle_sort_newposts'] )) $news_sort_by = $_SESSION['dle_sort_newposts']; + if (isset ( $_SESSION['dle_direction_newposts'] )) $news_direction_by = $_SESSION['dle_direction_newposts']; + + $sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, title, category, alt_name, comm_num, allow_comm, allow_main, allow_rate, rating, news_read, remote_addr, tags FROM " . PREFIX . "_post where {$stop_list}approve AND date between '$lasttime' and '$thistime' order by " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number']; + $sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post where {$stop_list}approve AND date between '$lasttime' and '$thistime'"; + + $cache->off(); + } else { + + // ################ ################# + if ($year == '' and $month == '' and $day == '') { + if ($cstart) { + $cstart = $cstart - 1; + $cstart = $cstart * $config['news_number']; + } + + $url_page = substr ( $config['http_home_url'], 0, strlen ( $config['http_home_url'] ) - 1 ); + $user_query = ""; + + if (isset ( $_SESSION['dle_sort_main'] )) $news_sort_by = $_SESSION['dle_sort_main']; + if (isset ( $_SESSION['dle_direction_main'] )) $news_direction_by = $_SESSION['dle_direction_main']; + $sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, title, category, alt_name, comm_num, allow_comm, allow_main, allow_rate, fixed, rating, news_read, remote_addr, tags FROM " . PREFIX . "_post WHERE {$stop_list}approve AND allow_main" . $where_date . " ORDER BY " . $fixed . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number']; + $sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post WHERE {$stop_list}approve AND allow_main" . $where_date; + } + + // ################ ################# + if ($year != '' and $month == '' and $day == '') { + if ($cstart) { + $cstart = $cstart - 1; + $cstart = $cstart * $config['news_number']; + } + + $newsmodule = true; + $url_page = $config['http_home_url'] . $year; + $user_query = "year=" . $year; + + if (isset ( $_SESSION['dle_sort_date'] )) $news_sort_by = $_SESSION['dle_sort_date']; + if (isset ( $_SESSION['dle_direction_date'] )) $news_direction_by = $_SESSION['dle_direction_date']; + $sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, title, category, alt_name, comm_num, allow_comm, allow_main, allow_rate, rating, news_read, remote_addr, tags FROM " . PREFIX . "_post where {$stop_list}date >= '{$year}-01-01'AND date < '{$year}-01-01' + INTERVAL 1 YEAR AND approve" . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number']; + $sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post where {$stop_list}date >= '{$year}-01-01'AND date < '{$year}-01-01' + INTERVAL 1 YEAR AND approve" . $where_date; + } + + // ################ ################# + if ($year != '' and $month != '' and $day == '') { + if ($cstart) { + $cstart = $cstart - 1; + $cstart = $cstart * $config['news_number']; + } + + $newsmodule = true; + $url_page = $config['http_home_url'] . $year . "/" . $month; + $user_query = "year=" . $year . "&month=" . $month; + + if (isset ( $_SESSION['dle_sort_date'] )) $news_sort_by = $_SESSION['dle_sort_date']; + if (isset ( $_SESSION['dle_direction_date'] )) $news_direction_by = $_SESSION['dle_direction_date']; + + $sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, title, category, alt_name, comm_num, allow_comm, allow_main, allow_rate, rating, news_read, remote_addr, tags FROM " . PREFIX . "_post where {$stop_list}date >= '{$year}-{$month}-01'AND date < '{$year}-{$month}-01' + INTERVAL 1 MONTH AND approve" . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number']; + $sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post where {$stop_list}date >= '{$year}-{$month}-01'AND date < '{$year}-{$month}-01' + INTERVAL 1 MONTH AND approve" . $where_date; + } + + // ################ ################# + if ($year != '' and $month != '' and $day != '' and $subaction == '') { + if ($cstart) { + $cstart = $cstart - 1; + $cstart = $cstart * $config['news_number']; + } + + $newsmodule = true; + $url_page = $config['http_home_url'] . $year . "/" . $month . "/" . $day; + $user_query = "year=" . $year . "&month=" . $month . "&day=" . $day; + + if (isset ( $_SESSION['dle_sort_date'] )) $news_sort_by = $_SESSION['dle_sort_date']; + if (isset ( $_SESSION['dle_direction_date'] )) $news_direction_by = $_SESSION['dle_direction_date']; + + $sql_select = "SELECT id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, title, category, alt_name, comm_num, allow_comm, allow_main, allow_rate, rating, news_read, remote_addr, tags FROM " . PREFIX . "_post where {$stop_list}date >= '{$year}-{$month}-{$day}' AND date < '{$year}-{$month}-{$day}' + INTERVAL 24 HOUR AND approve" . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number']; + $sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post where {$stop_list}date >= '{$year}-{$month}-{$day}' AND date < '{$year}-{$month}-{$day}' + INTERVAL 24 HOUR AND approve" . $where_date; + + } + + // ################ ################# + if ($subaction != '' or $newsid) { + if (! $newsid) $sql_news = "SELECT id, autor, date, short_story, full_story, title, category, descr, keywords, alt_name, comm_num, allow_comm, allow_rate, fixed, rating, news_read, approve, votes, access, remote_addr, tags, metatitle FROM " . PREFIX . "_post WHERE alt_name ='$news_name' AND date >= '{$year}-{$month}-{$day}' AND date < '{$year}-{$month}-{$day}' + INTERVAL 24 HOUR LIMIT 0,1"; + else $sql_news = "SELECT id, autor, date, short_story, full_story, title, category, descr, keywords, alt_name, comm_num, allow_comm, allow_rate, fixed, rating, news_read, approve, votes, access, remote_addr, tags, metatitle FROM " . PREFIX . "_post where id = '$newsid'"; + if ($subaction == '') $subaction = "showfull"; + }} + +// + if($category_id){ foreach($cat_info as $c) if($c['parentid']==$category_id) { + $cat_menu .= " ". $c['name'] . "
    "; } + if ($cat_menu !='') + $cat_menu = "
    ".$cat_menu."
    "; + } +//! + + if ( (intval($_GET['cstart']) == 1) && (strpos($_SERVER['REQUEST_URI'], '/page/1') !== false) ) { + $first_page_url = str_replace ( "/page/1", "", $_SERVER['REQUEST_URI'] ); + header("HTTP/1.0 301 Moved Permanently"); + header("Location: $first_page_url"); + die("Redirect"); + } + + if (($subaction == "showfull" or $subaction == "addcomment") and ((! isset ( $category ) or $category == ""))) { + + if ($_POST['subaction'] == "addcomment") { + $allow_add_comment = TRUE; + $allow_comments = TRUE; + $ajax_adds = false; + include_once (SYSTEM_DIR . '/modules/addcomments.php'); + } + + if ($subaction == "showfull") { + $allow_comments = TRUE; + include_once (SYSTEM_DIR . '/modules/show.full.php'); + } + + } else { + if ($subaction == 'userinfo') { + $allow_userinfo = TRUE; + include_once (SYSTEM_DIR . '/modules/profile.php'); + } else { + $allow_active_news = TRUE; + } + + //#################################################################################################################### + // + //#################################################################################################################### + + + $_SESSION['referrer'] = $_SERVER['REQUEST_URI']; + + if ($do == "lastnews") { + $cache_prefix = "_lastnews"; + } elseif ($subaction == 'allnews') { + $cache_prefix = "_allnews_". $user; + } elseif ($do == 'tags') { + $cache_prefix = "_tagscl_". $tag; + } else { + $cache_prefix = "_"; + if ($month) $cache_prefix .= "month_" . $month; + if ($year) $cache_prefix .= "year_" . $year; + if ($day) $cache_prefix .= "day_" . $day; + if ($category) $cache_prefix .= "category_" . $category; + } + $cache_prefix .= "_tempate_" . $config['skin']; + if ($is_logged and ($user_group[$member_id['user_group']]['allow_edit'] and ! $user_group[$member_id['user_group']]['allow_all_edit'])) $cache->off(); + if (isset($_SESSION['dle_no_cache']) AND $_SESSION['dle_no_cache']) $config['allow_cache'] = false; + if ($cstart) $cache_id = ($cstart / $config['news_number']) + 1; else $cache_id = "1"; + + if ($cache_id < 6 and ! isset ( $_POST['login'] )) $active = $cache->open( "news", $cache_id . $cache_prefix, true ); + else $active = false; + + if ($active) { + $tpl->result['content'] .= $active; + $active = null; + } else { + include_once (SYSTEM_DIR . '/modules/show.short.php'); + + if ($config['files_allow'] == "yes"){ + if (strpos ( $tpl->result['content'], "[file=" ) !== false) {$tpl->result['content'] = show_file ( $tpl->result['content'], $attachments );} + if (strpos ( $tpl->result['content'], "[torrent=" ) !== false) {$tpl->result['content'] = show_torrent ( $tpl->result['content'], $attachments );} + } + if ($news_found and $cache_id < 6) $cache->save( "news", $tpl->result['content'], $cache_id . $cache_prefix, true ); +}}} + +/* +===================================================== + +===================================================== +*/ +$titl_e = ''; +$nam_e = ''; + +if ($do == "cat" and $category != '' and $subaction == '') { + // , , + if( $category_id AND $view_template != "rss") { + $re_cat = get_url( $category_id ); + + if ($re_cat != $_GET['category'] OR substr ( $_SERVER['REQUEST_URI'], - 1, 1 ) != '/' ) { + $re_url = explode ( "index.php", strtolower ( $_SERVER['PHP_SELF'] ) ); + $re_url = reset ( $re_url ); + + header("HTTP/1.0 301 Moved Permanently"); + header("Location: {$re_url}{$re_cat}/"); + die("Redirect"); + } + } + // , , + + $metatags['description'] = ($cat_info[$category_id]['descr'] != '') ? $cat_info[$category_id]['descr'] : $metatags['description']; + $metatags['keywords'] = ($cat_info[$category_id]['keywords'] != '') ? $cat_info[$category_id]['keywords'] : $metatags['keywords']; + if ($cat_info[$category_id]['metatitle'] != '') $metatags['header_title'] = $cat_info[$category_id]['metatitle']; else $nam_e = stripslashes ( $cat_info[$category_id]['name'] ); + //$rss_url = $url_page . "/" . "rss.xml"; + +} +elseif ($subaction == "showfull") $rss_url = $config['http_home_url'] . "rss/comments/$newsid/"; +elseif ($subaction == 'userinfo')$nam_e = $user; +elseif ($subaction == 'allnews') $nam_e = $lang['show_user_news'] . ' ' . $user; +elseif ($subaction == 'newposts') $nam_e = $lang['title_new']; +elseif ($do == 'stats') $nam_e = $lang['title_stats']; +elseif ($do == 'addnews') $nam_e = $lang['title_addnews']; +elseif ($do == 'register') $nam_e = $lang['title_register']; +elseif ($do == 'favorites') $nam_e = $lang['title_fav']; +elseif ($do == 'pm') $nam_e = $lang['title_pm']; +elseif ($do == 'feedback') $nam_e = $lang['title_feed']; +elseif ($do == 'lastcomments') $nam_e = $lang['title_last']; +elseif ($do == 'lostpassword') $nam_e = $lang['title_lost']; +elseif ($do == 'search') $nam_e = $lang['title_search']; +elseif ($do == 'reputation') $nam_e = ' '.$user; +elseif ($do == 'static') $titl_e = $static_descr; +elseif ($do == 'chat_history') $titl_e = " -"; +elseif ($do == 'tracker') $titl_e = " "; +elseif ($do == 'lastnews') $nam_e = $lang['last_news']; +elseif ($do == 'tags') $nam_e = $tag; +elseif ($do == 'newslist') $metatags['title'] = $metatags['titles'].''.$cnt3.''.$cnt5.' '.$config['home_title']; +else { + if ($year != '' and $month == '' and $day == '') $nam_e = $lang['title_date'] . ' ' . $year . ' ' . $lang['title_year']; + if ($year != '' and $month != '' and $day == '') $nam_e = $lang['title_date'] . ' ' . $r[$month - 1] . ' ' . $year . ' ' . $lang['title_year1']; + if ($year != '' and $month != '' and $day != '' and $subaction == '') $nam_e = $lang['title_date'] . ' ' . $day . '.' . $month . '.' . $year; + if (($subaction != '' or $newsid != '') and $news_found) $titl_e = $metatags['title']; +} + +if (intval($_GET['cstart']) > 1 ){ + $page_extra = ' » '.$lang['news_site'].' '.intval($_GET['cstart']); +} else $page_extra = ''; + +if ($nam_e) { + $metatags['title'] = $nam_e . $page_extra . ' » ' . $metatags['title']; + $rss_title = $metatags['title']; +} elseif ($titl_e) { + $metatags['title'] = $titl_e . $page_extra . ' » ' . $config['home_title']; +} else $metatags['title'] .= $page_extra; + +if ( $metatags['header_title'] ) $metatags['title'] = stripslashes($metatags['header_title']) . $page_extra; + +if (! $rss_url) { + $rss_url = $config['http_home_url'] . "rss/"; + $rss_title = $config['home_title']; + //$rss_url .= $config['http_home_url'] . "comments.xml"; +} + +$metatags = <<{$metatags['title']} + + + + +\n +HTML; + +if ($config['allow_rss']) $metatags .= << +HTML; +?> \ No newline at end of file diff --git a/system/file.php b/system/file.php new file mode 100644 index 0000000..924a4ed --- /dev/null +++ b/system/file.php @@ -0,0 +1,62 @@ +get( "usergroup" ); +if( ! $user_group ) {$user_group = array (); + $db->query( "SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC" ); + while ( $row = $db->get_row() ) {$user_group[$row['id']] = array (); + foreach ( $row as $key => $value ) {$user_group[$row['id']][$key] = stripslashes($value);} + } + $cache->set( "usergroup", $user_group ); + $db->free(); +} + +if (! $is_logged) {$member_id['user_group'] = 5;} +if (! $user_group[$member_id['user_group']]['allow_files']) die ( "Access denied" ); + + $_SERVER['HTTP_REFERER'] = clean_url ( $_SERVER['HTTP_REFERER'] ); + $_SERVER['HTTP_HOST'] = clean_url ( $_SERVER['HTTP_HOST'] ); + if ($_SERVER['HTTP_HOST'] != $_SERVER['HTTP_REFERER']) { + @header ( 'Location: ' . $config['http_home_url'] ); + die ( "Access denied!!!

    Please visit {$config['http_home_url']}" ); + } + +$id = intval ( $_REQUEST['id'] ); + +if ($_REQUEST['area'] == "static") $row = $db->super_query ( "SELECT name, onserver FROM " . PREFIX . "_static_files WHERE id ='$id'" ); +else $row = $db->super_query ( "SELECT name, onserver FROM " . PREFIX . "_files WHERE id ='$id'" ); + +if (! $row) die ( "Access denied" ); + +$config['files_max_speed'] = intval ( $config['files_max_speed'] ); + +$file = new download ( FILE_DIR . $row['onserver'], $row['name'], $config['files_force'], $config['files_max_speed'] ); + +if ($_REQUEST['area'] == "static") { + if ($config['files_count'] == "yes" and ! $file->range) + $db->query ( "UPDATE " . PREFIX . "_static_files SET dcount=dcount+1 WHERE id ='$id'" ); +} else { + if ($config['files_count'] == "yes" and ! $file->range) + $db->query ( "UPDATE " . PREFIX . "_files SET dcount=dcount+1 WHERE id ='$id'" ); +} + +$db->close (); +$file->download_file (); +?> \ No newline at end of file diff --git a/system/forum/action/addpost.php b/system/forum/action/addpost.php new file mode 100644 index 0000000..ad18632 --- /dev/null +++ b/system/forum/action/addpost.php @@ -0,0 +1,252 @@ +process($post_text); + + $post_text = $db->safesql($parse->BB_Parse($post_text, FALSE)); + + $post_text = auto_wrap ($post_text); + + if (strlen($post_text) > $forum_config['post_maxlen']) + { + $post_maxlen = true; + } + else + { + $post_maxlen = false; + } + + $topic_title = $db->safesql(urldecode($topic_title)); + + if (!$is_logged) + { + $name = $db->safesql($parse->BB_Parse($parse->process($name), TRUE)); + + $mail = $db->safesql($parse->BB_Parse($parse->process($mail), TRUE)); + + $member_id['name'] = $name; + + if ($name) + { + $db->query("SELECT name from " . USERPREFIX . "_users where LOWER(name) = '".strtolower($name)."'"); + + if (!$db->num_rows()){ + $name_ok = true; + }else{ + $name_ok = false; + $stop .= $f_lang['err_name']; + } + $db->free(); + } + + if ($mail) + { + if(preg_match("/^[\.A-z0-9_\-]+[@][A-z0-9_\-]+([.][A-z0-9_\-]+)+[A-z]{1,4}$/", $mail)){ + $mail_ok = true; + }else{ + $mail_ok = false; + $stop .= $f_lang['err_mail']; + } + } + + if ($name_ok and $mail_ok) + { + $add_post_ok = true; + } + else + { + $add_post_ok = false; + } + } + else + { + $add_post_ok = true; + } + + $_TIME = time()+($config['date_adjust']*60); + + $topic_date = date ("Y-m-d H:i:s", $_TIME); + + $_IP = $db->safesql($_SERVER['REMOTE_ADDR']); + + if ($post_text and $topic_id and $forum_id and $add_post_ok and !$post_captcha and !$post_maxlen) + { + $postcount = intval ($forums_array[$forum_id]['postcount']); + + if ($forum_config['post_update']) + { + $row = $db->super_query("SELECT pid, topic_id, post_author, DATE_FORMAT(post_date,'%Y-%m-%d') as post_date, post_text, is_register, post_ip FROM " . PREFIX . "_forum_posts WHERE topic_id = '$topic_id' ORDER BY pid DESC LIMIT 0,1"); + + $post_id = $row['pid']; + + if ($row['post_author'] == $member_id['name'] AND $row['is_register']) $update_post = true; + elseif ($row['ip'] == $_IP AND !$row['is_register'] AND !$is_logged) $update_post = true; + + if ($row['post_date'] != date("Y-m-d", $_TIME)) $update_post = false; + + + } + + if (!$update_post){ + + $db->query("INSERT INTO " . PREFIX . "_forum_posts (topic_id, post_date, post_author, post_text, post_ip, is_register, e_mail, is_count) values ('$topic_id', '$topic_date', '$member_id[name]', '$post_text', '$_IP', '$is_logged', '$mail', '$postcount')"); + + $new_pid = $db->insert_id(); + + // update table // + + $db->query("UPDATE " . PREFIX . "_forum_topics SET post = post+1, last_date = '$topic_date', last_poster_name = '$member_id[name]', last_post_id = '$new_pid' WHERE tid = '$topic_id'"); + + $db->query("UPDATE " . PREFIX . "_forum_forums SET posts = posts+1, f_last_tid = '$topic_id', f_last_title = '$topic_title', f_last_date = '$topic_date', f_last_poster_name = '$member_id[name]', last_post_id = '$new_pid' WHERE id = '$forum_id'"); + + if ($is_logged) + { + if ($postcount) + { + $db->query("UPDATE " . PREFIX . "_users SET forum_post = forum_post+1 WHERE name = '$member_id[name]'"); + } + + $db->query("DELETE FROM " . PREFIX . "_forum_views WHERE topic_id = '$topic_id' and user_id != '$member_id[user_id]'"); + } + + if ($forum_config['set_sub_last_up'] and $is_parentid = $forums_array[$forum_id]['parentid']) + { + $db->query("UPDATE " . PREFIX . "_forum_forums SET f_last_tid = '$topic_id', f_last_title = '$topic_title', f_last_date ='$topic_date', f_last_poster_name = '$member_id[name]' WHERE id ='$is_parentid'"); + } + + } + else + { + $stop_subscription = true; + + $post_text = $db->safesql($row['post_text'] . "

    " . stripslashes($post_text)); + + $db->query("UPDATE " . PREFIX . "_forum_posts set post_text = '{$post_text}' WHERE pid = '{$post_id}'"); + + $new_pid = $post_id; + } + + if ($post_id) + { + if (stristr ($post_text, "[attachment=")) + { + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_files + WHERE topic_id = '$topic_id' and file_attach = '0'"); + + while ($att = $db->get_row($result)) + { + if (stristr ($post_text, "[attachment=".$att['file_id']."]") OR stristr ($post_text, "[attachment=".$att['file_id'].":url]")) + { + $update_id[] = $att['file_id']; + } + } + + if ($update_id) + { + $update_list = implode(',', $update_id); + + $db->query("UPDATE " . PREFIX . "_forum_files SET topic_id = '$topic_id', post_id = '$new_pid', file_attach = '1' WHERE file_id IN ({$update_list})"); + } + } + } + + $cache->clear ('forum_show_last'); + + $topic_location = $forum_url."/topic_{$topic_id}/{$page}#post-{$new_pid}"; + + if (!$ajax_adds) + { + header("Location: {$topic_location}"); + } + + if ($forum_config['subscription'] AND !$stop_subscription) + { + $all_subscr = $db->query("SELECT name, email FROM ". PREFIX ."_forum_subscription AS t1 INNER JOIN ". PREFIX ."_users AS t2 ON t1.user_id = t2.user_id WHERE t1.topic_id = $topic_id and t1.user_id != '{$member_id['user_id']}'"); + + if ($db->num_rows($all_subscr)) + { + include_once SYSTEM_DIR.'/classes/mail.class.php'; + + $mail = new dle_mail ($config); + + $topic_link = $a_forum_url."showtopic={$topic_id}&lastpost=1#reply"; + + $topic_link_del = $config['http_home_url']."?do=forum&act=subscription&code=del&selected_id={$topic_id}"; + + $mail_tpl = $db->super_query("SELECT template FROM " . PREFIX . "_forum_email where name='subscription_text' LIMIT 0,1"); + + $mail_tpl['template'] = stripslashes($mail_tpl['template']); + + while ($mail_row = $db->get_row($all_subscr)) + { + $mail_result = str_replace("{%username_to%}", $mail_row['name'], $mail_tpl['template']); + + $mail_result = str_replace("{%username_from%}", $member_id['name'], $mail_result); + + $mail_result = str_replace("{%topic_name%}", $topic_title, $mail_result); + + $mail_result = str_replace("{%topic_link%}", $topic_link, $mail_result); + + $mail_result = str_replace("{%topic_link_del%}", $topic_link_del, $mail_result); + + $mail_title = " "; + + $mail->send ($mail_row['email'], $mail_title, $mail_result); + } + + } + } + + $cache->clear ('forum_show_last'); + } + + else + { + if (!$add_post_ok) + { + forum_msg($f_lang['all_info'], $stop); + + $add_post_error = $stop; + } + + elseif ($post_captcha) + { + forum_msg($f_lang['all_info'], $f_lang['captcha_stop']); + + $add_post_error = $f_lang['ajax_stop_2']; + } + + elseif ($post_maxlen) + { + forum_msg($f_lang['all_info'], $f_lang['maxlen_stop']); + + $add_post_error = $f_lang['ajax_stop_4']; + } + + else + { + forum_msg($f_lang['all_info'], $f_lang['values_error']); + + $add_post_error = $f_lang['ajax_stop_3']; + } + } + +?> \ No newline at end of file diff --git a/system/forum/action/addtopic.php b/system/forum/action/addtopic.php new file mode 100644 index 0000000..65c71ff --- /dev/null +++ b/system/forum/action/addtopic.php @@ -0,0 +1,325 @@ += $forum_config['min_post'] OR $member_id['user_group'] < 2){ + $access_topic = check_access($forums_array[$forum_id]['access_topic']); + }else{ + $access_topic = false; + forum_msg($f_lang['all_info'], " ".$forum_config['min_post']." "); + } + // . + + if ($access_topic) + { + if (!$_REQUEST['subaction']) + { + $access_upload = check_access($forums_array[$forum_id]['access_upload']); + + $upload_var = array('area' => "topic", 'forum_id' => $forum_id, 'topic_id' => get_salt(),); + + $tpl->set('[not-wysywyg]', ""); + + $tpl->set('{wysiwyg}',''); + + $tpl->set('[/not-wysywyg]',""); + + include_once SYSTEM_DIR.'/forum/sources/components/bbcode.php'; + + $topic_action_add = $a_forum_url."act=add_topic&subaction=1"; + + $tpl->load_template($tpl_dir.'addtopic.tpl'); + + $tpl->set('{bbcode}',$bb_code); + $tpl->set('{topic_title}',""); + $tpl->set('{topic_descr}',""); + $tpl->set('{text}',""); + + if ($is_logged) + { + $tpl->set_block("'\\[not-logged\\](.*?)\\[/not-logged\\]'si",""); + } + else + { + $tpl->set('[not-logged]',''); + $tpl->set('[/not-logged]',''); + } + + if (check_access($forum_config['tools_poll'])) + { + $tpl->set('[poll]',''); + $tpl->set('[/poll]',''); + } + else + { + $tpl->set_block("'\\[poll\\](.*?)\\[/poll\\]'si",""); + } + + if (check_access($forum_config['topic_captcha'])) + { + $tpl->set('[sec_code]',""); + $tpl->set('[/sec_code]',""); + + $path = parse_url($config['http_home_url']); + $anti_bot = !defined('FORUM_SUB_DOMAIN') ? 'system/modules/' : ''; + + $tpl->set('{sec_code}',"\"${lang['sec_image']}\""); + } + else + { + $tpl->set('{sec_code}',""); + $tpl->set_block("'\\[sec_code\\](.*?)\\[/sec_code\\]'si",""); + } + + $tpl->copy_template = "
    ".$tpl->copy_template." + +
    +
    "; + + $tpl->compile('dle_forum'); + + $tpl->clear(); + } + + else + { + if (check_access($forum_config['topic_captcha'])) + { + if ($_REQUEST['sec_code'] !== $_SESSION['sec_code_session'] and isset($_SESSION['sec_code_session'])) + { + $topic_captcha = true; + + $_SESSION['sec_code_session'] = FALSE; + } + } + else + { + $topic_captcha = false; + } + + if (!$topic_captcha){ + + require_once SYSTEM_DIR.'/classes/parse.class.php'; + + $parse = new ParseFilter(Array(), Array(), 1, 1); + + if (!$is_logged) + { + $name = $db->safesql($parse->process(trim($_POST['name']))); + $mail = $db->safesql($parse->process(trim($_POST['mail']))); + + $member_id['name'] = $name; + + $db->query("SELECT name from " . USERPREFIX . "_users where LOWER(name) = '".strtolower($name)."'"); + + if (!$db->num_rows() > 0) + { + $name_ok = true; + } + else + { + $name_ok = false; + } + + $db->free(); + + if(preg_match("/^[\.A-z0-9_\-]+[@][A-z0-9_\-]+([.][A-z0-9_\-]+)+[A-z]{1,4}$/", $mail)) + { + $mail_ok = true; + } + else + { + $mail_ok = false; + } + + if ($name_ok and $mail_ok) + { + $access_add = true; + } + else + { + $access_add = false; + + if (!$name_ok) $stop .= $f_lang['err_name']; + + if (!$mail_ok) $stop .= $f_lang['err_mail']; + } + } + else + { + $access_add = true; + } + + $topic_title = $db->safesql($parse->process($_POST['topic_title'])); + $topic_descr = $db->safesql($parse->process($_POST['topic_descr'])); + + $topic_text = $parse->process($_POST['post_text']); + + $topic_text = $db->safesql($parse->BB_Parse($topic_text, FALSE)); + + $topic_text = auto_wrap ($topic_text); + + if (strlen($topic_text) > $forum_config['post_maxlen']) + { + $post_maxlen = true; + + $stop .= $f_lang['ajax_stop_4']; + } + else + { + $post_maxlen = false; + } + + if ($topic_title and $topic_text and $access_add and !$post_maxlen) + { + $_IP = $db->safesql($_SERVER['REMOTE_ADDR']); + + $vote_title = trim($db->safesql($parse->process($_POST['vote_title']))); + $frage = trim($db->safesql($parse->process($_POST['frage']))); + $vote_body = $db->safesql($parse->BB_Parse($parse->process($_POST['vote_body']), false)); + $poll_multiple = intval($_POST['poll_multiple']); + + $_TIME = time()+($config['date_adjust']*60); + $topic_date = date ("Y-m-d H:i:s", $_TIME); + + if ($forum_config['meta_topic']) + { + $meta = forum_metatags($topic_title . ' ' . $topic_descr . ': ' . $topic_text); + } + else{ $meta = ""; } + + $db->query("INSERT INTO " . PREFIX . "_forum_topics (forum_id, title, topic_descr, author_topic, start_date, last_date, last_poster_name, poll_title, frage, poll_body, multiple, meta_descr, meta_keywords) values ('$forum_id', '$topic_title', '$topic_descr', '$member_id[name]', '$topic_date', '$topic_date', '$member_id[name]', '$vote_title', '$frage', '$vote_body', '$poll_multiple', '$meta[description]', '$meta[keywords]')"); + + $topic_id = $db->insert_id(); + + $db->query("INSERT INTO " . PREFIX . "_forum_posts (topic_id, post_date, post_author, post_text, post_ip, is_register, e_mail, is_count) values ('$topic_id', '$topic_date', '$member_id[name]', '$topic_text', '$_IP', '$is_logged', '$mail', '$postcount')"); + + $new_pid = $db->insert_id(); + + set_first_post_id ($topic_id, $new_pid); + + $db->query("UPDATE " . PREFIX . "_forum_forums SET topics = topics+1, f_last_tid = '$topic_id', f_last_title = '$topic_title', f_last_date ='$topic_date', f_last_poster_name = '$member_id[name]' WHERE id ='$forum_id'"); + + if ($forum_config['set_topic_post'] and $postcount and $is_logged) + { + $db->query("UPDATE " . PREFIX . "_users SET forum_post = forum_post+1 WHERE name = '$member_id[name]'"); + } + + if ($forum_config['set_sub_last_up'] and $is_parentid = $forums_array[$forum_id]['parentid']) + { + $db->query("UPDATE " . PREFIX . "_forum_forums SET f_last_tid = '$topic_id', f_last_title = '$topic_title', f_last_date = '$topic_date', f_last_poster_name = '$member_id[name]', last_post_id = '$new_pid' WHERE id = '$is_parentid'"); + } + + if ($subscription and $is_logged) + { + $db->query("SELECT * FROM " . PREFIX . "_forum_subscription WHERE topic_id = '$topic_id' and user_id = '{$member_id['user_id']}'"); + + if (!$db->num_rows() and $topic_id) + { + $db->query("INSERT INTO " . PREFIX . "_forum_subscription (user_id, topic_id) values ('{$member_id['user_id']}', '$topic_id')"); + } + } + + if ($_REQUEST['add_tid']) + { + if (stristr ($topic_text, "[attachment=")) + { + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_files + WHERE topic_id = '{$_REQUEST['add_tid']}' and file_attach = '0'"); + + while ($att = $db->get_row($result)) + { + if (stristr($topic_text, "[attachment={$att['file_id']}]") OR stristr($topic_text, "/forum/files/{$att['onserver']}")) + { + $update_id[] = $att['file_id']; + } + } + + if ($update_id) + { + $update_list = implode(',', $update_id); + + $db->query("UPDATE " . PREFIX . "_forum_files SET topic_id = '$topic_id', post_id = '$new_pid', file_attach = '1' WHERE file_id IN ({$update_list})"); + } + } + } + + if ($forum_config['topic_email']) + { + $topic_link = $config['http_home_url']."?do=forum&showtopic={$topic_id}"; + + include_once SYSTEM_DIR.'/classes/mail.class.php'; + + $mail = new dle_mail ($config); + + $mail_tpl = $db->super_query("SELECT template FROM " . PREFIX . "_forum_email where name='new_topic' LIMIT 0,1"); + + $mail_tpl['template'] = stripslashes($mail_tpl['template']); + + $mail_result = str_replace("{%username%}", $member_id[name], $mail_tpl['template']); + + $mail_result = str_replace("{%date%}", $topic_date, $mail_result); + + $mail_result = str_replace("{%title%}", $topic_title, $mail_result); + + $mail_result = str_replace("{%link%}", $topic_link, $mail_result); + + $mail->send ($config['admin_mail'], "DLE Forum - NEW TOPIC", $mail_result); + } + + if ($forum_config['mod_rewrite']) + { + $topic_location = $forum_url."/topic_".$topic_id; + } + else + { + $topic_location = $forum_url."showtopic=".$topic_id; + } + + $cache->clear('forum_show_last'); + + header("Location: $topic_location"); + } + + else + { + forum_msg($f_lang['f_msg'], $f_lang['topic_add_stop'], 'stop', "
    ".$stop); + } + + } + + else + { + if ($topic_captcha) + { + forum_msg($f_lang['all_info'], $f_lang['captcha_stop']); + } + } + } + } + + else + { + $group_name = $user_group[$member_id['user_group']]['group_name']; + + forum_msg($f_lang['f_msg'], $f_lang['topic_add_ndeny'], 'user_group', $group_name); + } + + if ($forum_config['forum_bar']) + { + $bbr_fid = $forum_id; + $bbr_fname = $forums_array[$forum_id]['name']; + + $category_id = $forums_array[$forum_id]['main_id']; + + $bbr_cid = $category_id; + $bbr_name = $cats_array[$category_id]['cat_name']; + + $bbr_app = $f_lang['app_newtopic']; + } + +?> \ No newline at end of file diff --git a/system/forum/action/forum.php b/system/forum/action/forum.php new file mode 100644 index 0000000..66731b5 --- /dev/null +++ b/system/forum/action/forum.php @@ -0,0 +1,158 @@ +query("SELECT tid FROM " . PREFIX . "_forum_topics WHERE forum_id = '$fid'"); + + while ($row = $db->get_row($result_topics)) + { + $forum_topic++; + + $p_count = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_forum_posts WHERE topic_id = '$row[tid]'"); + $posts_in_forum = ($posts_in_forum + $p_count['count']); + } + + if (!$forum_config['set_topic_post']) + { + $posts_in_forum = ($posts_in_forum - $forum_topic); + } + + if ($forum_config['topic_sort']) $sort_type = "last_date"; + else $sort_type = "tid"; + + $row1 = $db->super_query("SELECT * FROM ". PREFIX ."_forum_topics WHERE forum_id = '$fid' ORDER by $sort_type DESC"); + + $db->query("UPDATE " . PREFIX . "_forum_forums SET posts = '$posts_in_forum', topics = '$forum_topic', f_last_tid = '$row1[tid]', f_last_title = '$row1[title]', f_last_date ='$row1[last_date]', f_last_poster_name = '$row1[last_poster_name]' WHERE id = '$fid'"); + + header("Location: $_SERVER[HTTP_REFERER]"); + } + + else + { + header("Location: $_SERVER[HTTP_REFERER]"); + } + + break; + +// ******************************************************************************** +// USER +// ******************************************************************************** + case "user": + + $mname = $db->safesql($_REQUEST['mname']); + + if ($mname) + { + $get_count = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_forum_topics WHERE author_topic = '$mname' and hidden = 0"); + + $count_all = $get_count['count']; + } + + if ($count_all){ + + if ($cstart) + { + $cstart = $cstart - 1; + $cstart = $cstart * $forum_config['topic_inpage']; + } + + if ($forum_config['topic_sort']) + { + $sort_type = "last_date"; + } + + else + { + $sort_type = "tid"; + } + +// ******************************************************************************** +// TOPIC VIEWS +// ******************************************************************************** + if ($is_logged) + { + $row_views = $db->query("SELECT topic_id FROM " . PREFIX . "_forum_views WHERE user_id = '$member_id[user_id]' and time > '$topic_a_time'"); + + $topic_views = array(); + + while ($row = $db->get_row($row_views)) + { + $topic_views[$row['topic_id']] = '1'; + } + } + + else + { + $row_views = explode(",", $_COOKIE['dle_forum_views']); + + foreach ($row_views as $value) + { + $topic_views[$value] = '1'; + } + } + + $config_inpage = $forum_config['topic_inpage']; + + $result_topics = $db->query("SELECT * FROM " . PREFIX . "_forum_topics WHERE author_topic = '$mname' and hidden = 0 ORDER BY fixed, ".$sort_type." DESC LIMIT ".$cstart.",".$forum_config['topic_inpage'].""); + + require_once SYSTEM_DIR.'/forum/sources/showtopics.php'; + + $icat = $forum_url."act=getforum&code=user&mname={$mname}&cstart="; + + require_once SYSTEM_DIR.'/forum/sources/components/navigation.php'; + + $tpl->load_template($tpl_dir.'forum.tpl'); + + $tpl->set('{forum}', $f_lang['app_user_topic'].': '.$mname); + + $tpl->set('{subforums}',''); + + $tpl->set('{topics}', $tpl->result['topics']); + + $tpl->set('{info}', $msg_info); + + $tpl->set('{navigation}', $tpl->result['navigation']); + + $tpl->set_block("'\\[options\\](.*?)\\[/options\\]'si",""); + + $tpl->set_block("'\\[rules\\](.*?)\\[/rules\\]'si",""); + + $tpl->set_block("'\\[new_topic\\](.*?)\\[/new_topic\\]'si",""); + + $tpl->set_block("'\\[selected\\](.*?)\\[/selected\\]'si",""); + + $tpl->set_block("'\\[fast-search\\](.*?)\\[/fast-search\\]'si",""); + + $tpl->set_block("'\\[moderation\\](.*?)\\[/moderation\\]'si",""); + + $tpl->set_block("'\\[online\\](.*?)\\[/online\\]'si",""); + + $tpl->compile('dle_forum'); + + $tpl->clear(); + + } + + else + { + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + } + + $bbr_app = $f_lang['app_user_topic']; + + break; + } + +?> \ No newline at end of file diff --git a/system/forum/action/moderation.php b/system/forum/action/moderation.php new file mode 100644 index 0000000..c9a6c7b --- /dev/null +++ b/system/forum/action/moderation.php @@ -0,0 +1,520 @@ +query("UPDATE " . PREFIX . "_forum_topics SET topic_status = '0' WHERE tid = '$topic_id'"); + + $db->query("UPDATE " . PREFIX . "_forum_posts SET hidden = '0' WHERE topic_id = '$topic_id' and hidden NOT IN (1,6)"); + } + + header("Location: $_SERVER[HTTP_REFERER]"); + } + + else + { + die("Hacking attempt!"); + } + + break; + +// ******************************************************************************** +// CLOSE TOPIC +// ******************************************************************************** + case "02": + + if ($selectedtids and is_moderation(0, $selectedtids, 0) OR group_moderation($selectedtids, 'forum_topic_set')) + { + if (!moderator_value('close_topic', $forum_id, $m_member) AND !group_moderation($selectedtids, 'forum_topic_set')) die(); + + $selectedtids = explode(",",$selectedtids); + + foreach($selectedtids as $topic_id) + { + $topic_id = intval($topic_id); + if ( $topic_id == 0 ) continue; + $db->query("UPDATE " . PREFIX . "_forum_topics SET topic_status = '1' WHERE tid = '$topic_id'"); + + $db->query("UPDATE " . PREFIX . "_forum_posts SET hidden = '2' WHERE topic_id = '$topic_id' and hidden NOT IN (1,6)"); + } + + header("Location: {$_SERVER['HTTP_REFERER']}"); + } + + else + { + die("Hacking attempt!"); + } + + break; + +// ******************************************************************************** +// DEL TOPIC +// ******************************************************************************** + case "03": + + if ($selectedtids and is_moderation(0, $selectedtids, 0) OR group_moderation($selectedtids, 'forum_topic_del')) + { + if (!moderator_value('delete_topic', $forum_id, $m_member) AND !group_moderation($selectedtids, 'forum_topic_del')) die(); + + $selectedtids = explode(",",$selectedtids); + + foreach($selectedtids as $topic_id) + { + $topic_id = intval($topic_id); + if ( $topic_id == 0 ) continue; + $row_topic = $db->super_query("SELECT * FROM " . PREFIX . "_forum_topics WHERE tid = '$topic_id'"); + + $topic_id = $row_topic['tid']; + + $forum_id = $row_topic['forum_id']; + + $post_all = $row_topic['post']; + + if (!$forum_config['set_topic_post']) + { + $post_all = ($post_all - 1); + } + + if ($topic_id) + { + // user converting // + if ($forum_config['set_post_num_up']) + { + $query = $db->query("SELECT distinct post_author FROM " . PREFIX . "_forum_posts WHERE topic_id = '$topic_id'"); + + while ($row = $db->get_row($query)) + { + if ($forum_config['set_topic_post']) + { + $topic = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_forum_topics WHERE author_topic = '$row[post_author]'"); + + $topic_num = $topic['count']; + } + + $post = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_forum_posts WHERE post_author = '$row[post_author]'"); + + $post_num = $post['count']; + + $update = ($topic_num + $post_num); + + $db->query("UPDATE " . PREFIX . "_users SET forum_post = '$update' WHERE name ='$row[post_author]'"); + } + } + +// + +$result = $db->query("SELECT * FROM " . PREFIX . "_forum_files WHERE topic_id = '" . $topic_id . "'"); + +while ($row = $db->get_row($result)) { + +if ($row['file_type'] == "file") { + +unlink(UPLOAD_DIR."files/" . $row['onserver']); + +} elseif ($row['file_type'] == "thumb") { + +unlink(UPLOAD_DIR."thumbs/" . $row['onserver']); + +unlink(UPLOAD_DIR."images/" . $row['onserver']); + +} else { + +unlink(UPLOAD_DIR."images/" . $row['onserver']); + +} + +} + +$db->query("DELETE FROM " . PREFIX . "_forum_files WHERE topic_id = '" . $topic_id . "'"); + +// + + $db->query("DELETE FROM " . PREFIX . "_forum_posts WHERE topic_id = '$topic_id'"); + + $db->query("DELETE FROM " . PREFIX . "_forum_topics WHERE `tid` = '$topic_id'"); + + $new_result = $db->super_query("SELECT * FROM ". PREFIX ."_forum_topics WHERE forum_id = '$forum_id' ORDER by start_date DESC"); + + $db->query("UPDATE " . PREFIX . "_forum_forums SET topics = topics-1, posts = posts-$post_all, f_last_tid = '$new_result[tid]', f_last_title = '$new_result[title]', f_last_date = '$new_result[last_date]', f_last_poster_name = '$new_result[last_poster_name]' WHERE id ='$forum_id'"); + + $db->query("DELETE FROM " . PREFIX . "_forum_poll_log WHERE topic_id = '$topic_id'"); + + // del discuss id // + $db->query("UPDATE " . PREFIX . "_post SET news_tid = '0' WHERE news_tid = '$topic_id'"); + + // del attachment // + $db->query("SELECT * FROM " . PREFIX . "_forum_files WHERE topic_id = '$topic_id'"); // and file_attach='1' + + while($row = $db->get_row()) + { + if ($row['file_type'] == "image") + { + @unlink(UPLOAD_DIR."images/".$row['onserver']); + } + + elseif ($row['file_type'] == "thumb") + { + @unlink(UPLOAD_DIR."thumbs/".$row['onserver']); + + @unlink(UPLOAD_DIR."images/".$row['onserver']); + } + + else + { + @unlink(UPLOAD_DIR."files/".$row['onserver']); + } + + $db->query("DELETE FROM " . PREFIX . "_forum_files WHERE file_id = '$row[file_id]'"); + } // end - del attachment // + } + } + + if ($forum_config['mod_rewrite']) + { + $forum_location = "{$forum_url}/forum_{$forum_id}"; + } + else + { + $forum_location = "{$forum_url}showforum={$forum_id}"; + } + + header("Location: {$forum_location}"); + } + + else + { + die("Hacking attempt!"); + } + + break; + +// ******************************************************************************** +// EDIT TOPIC TITLE +// ******************************************************************************** + case "04": + + $selectedtids = intval($selectedtids); + + if (!$subaction and is_moderation(0, $selectedtids, 0) OR !$subaction and group_moderation($selectedtids, 'forum_topic_edit')) + { + if (!moderator_value('edit_topic', $forum_id, $m_member) AND !group_moderation($selectedtids, 'forum_topic_edit')) die(); + + $row = $db->super_query("SELECT * FROM " . PREFIX . "_forum_topics WHERE tid = '{$selectedtids}'"); + + $topic_action_add = $a_forum_url."act=moderation&code=04&subaction=save&selected_id={$selectedtids}"; + + require_once SYSTEM_DIR.'/classes/parse.class.php'; + + $parse = new ParseFilter(); + + $parse->safe_mode = true; + + $topic_title = $parse->decodeBBCodes($row['title'], false); + $topic_descr = $parse->decodeBBCodes($row['topic_descr'], false); + + $tpl->load_template($tpl_dir.'edittopic.tpl'); + + $tpl->set('{topic_title}', $topic_title); + $tpl->set('{topic_descr}', $topic_descr); + + if (check_access($forum_config['tools_poll'])) + { + $tpl->set('[poll]',''); + $tpl->set('[/poll]',''); + + $tpl->set('{vote_title}', $parse->decodeBBCodes($row['poll_title'], false)); + $tpl->set('{frage}', $parse->decodeBBCodes($row['frage'], false)); + $tpl->set('{vote_body}', $parse->decodeBBCodes($row['poll_body'], false)); + } + else + { + $tpl->set_block("'\\[poll\\](.*?)\\[/poll\\]'si",""); + } + + $tpl->copy_template = "
    ".$tpl->copy_template."
    "; + + $tpl->compile('dle_forum'); + $tpl->clear(); + } + + if ($subaction == "save" and is_moderation(0, $selectedtids, 0) OR $subaction == "save" and group_moderation($selectedtids, 'forum_topic_edit')) + { + if (!moderator_value('edit_topic', $forum_id, $m_member) AND !group_moderation($selectedtids, 'forum_topic_edit')) die(); + + require_once SYSTEM_DIR.'/classes/parse.class.php'; + + $parse->safe_mode = true; + + $parse = new ParseFilter(Array(), Array(), 1, 1); + + $topic_title = $db->safesql($parse->process($_POST['topic_title'])); + $topic_descr = $db->safesql($parse->process($_POST['topic_descr'])); + $vote_title = trim($db->safesql($parse->process($_POST['vote_title']))); + $frage = trim($db->safesql($parse->process($_POST['frage']))); + $vote_body = $db->safesql($parse->BB_Parse($parse->process($_POST['vote_body']), false)); + $poll_multiple = intval($_POST['poll_multiple']); + + $db->query("UPDATE " . PREFIX . "_forum_topics SET title = '$topic_title', topic_descr = '$topic_descr', poll_title = '$vote_title', frage = '$frage', poll_body = '$vote_body', multiple = '$poll_multiple' WHERE tid = '$selectedtids'"); + + if ($forum_config['mod_rewrite']) + { + $topic_location = "{$forum_url}/topic_$selectedtids"; + } else + { + $topic_location = "{$forum_url}showtopic=$selectedtids"; + } + + header("Location: $topic_location"); + } + + $bbr_app = " "; + + break; + +// ******************************************************************************** +// MOVE TOPIC +// ******************************************************************************** + case "05": + + if ($selectedtids and is_moderation(0, $selectedtids, 0)) + { + if (!moderator_value('move_topic', $is_mod['forum_id'], $m_member)) die(); + + $move_fid = $_REQUEST['move_fid']; + + if (!$subaction) + { + $topic_action_add = "{$a_forum_url}act=moderation&code=05&subaction=move&selected_id=$selectedtids"; + + $tpl->load_template($tpl_dir.'movetopic.tpl'); + + $tpl->set('{topic_title}', $topic_title); + $tpl->set('{forum}', $is_forum_name); + $tpl->set('{forum_list}', forum_list()); + + $tpl->copy_template = "
    ".$tpl->copy_template."
    "; + + $tpl->compile('dle_forum'); + $tpl->clear(); + } + + if ($subaction == "move" and $selectedtids and $move_fid) + { + $tid = $selectedtids; + + $selectedtids = explode(",",$selectedtids); + + $new_post_count = 0; + + $postcount = intval ($forums_array[$move_fid]['postcount']); + + foreach ($selectedtids as $topic_id) + { + $topic_id = intval($topic_id); + if ( $topic_id == 0 ) continue; + $db->query("UPDATE " . PREFIX . "_forum_topics SET forum_id = '$move_fid' WHERE tid = '$topic_id'"); + $tid_count++; + + $post = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_forum_posts WHERE topic_id = '$topic_id'"); + + $post_count = $post_count + $post['count']; + + $db->query("UPDATE " . PREFIX . "_forum_posts SET is_count = '$postcount' WHERE topic_id = '$topic_id'"); + } + + $post_count = $post_count - $tid_count; + + if ($forum_config['topic_sort']) $sort_type = "last_date"; + else $sort_type = "tid"; + + $row1 = $db->super_query("SELECT * FROM ". PREFIX ."_forum_topics WHERE forum_id = '{$is_mod['forum_id']}' ORDER by $sort_type DESC"); + + $row2 = $db->super_query("SELECT * FROM ". PREFIX ."_forum_topics WHERE forum_id = '$move_fid' ORDER by $sort_type DESC"); + + $db->query("UPDATE " . PREFIX . "_forum_forums SET posts = posts-$post_count, topics = topics-$tid_count, f_last_tid = '$row1[tid]', f_last_title = '$row1[title]', f_last_date ='$row1[last_date]', f_last_poster_name = '$row1[last_poster_name]' WHERE id = '{$is_mod['forum_id']}'"); + + $db->query("UPDATE " . PREFIX . "_forum_forums SET posts = posts+$post_count, topics = topics+$tid_count, f_last_tid = '$row2[tid]', f_last_title = '$row2[title]', f_last_date ='$row2[last_date]', f_last_poster_name = '$row2[last_poster_name]' WHERE id = '$move_fid'"); + + if ($forum_config['mod_rewrite']) + { + $topic_location = "{$forum_url}/topic_$tid"; + + $forum_location = "{$forum_url}/forum_$move_fid"; + } + else + { + $topic_location = "{$forum_url}showtopic=$tid"; + + $forum_location = "{$forum_url}showforum=$move_fid"; + } + + if ($tid_count > 1) + { + header("Location: $forum_location"); + } + else + { + header("Location: $topic_location"); + } + } + + $bbr_app = " "; + } + + break; + +// ******************************************************************************** +// HIDDEN TOPIC +// ******************************************************************************** + case "06": + + if ($selectedtids and is_moderation(0, $selectedtids, 0)) + { + $selectedtids = explode(",",$selectedtids); + + foreach($selectedtids as $topic_id) + { + $topic_id = intval($topic_id); + if ( $topic_id == 0 ) continue; + $db->query("UPDATE " . PREFIX . "_forum_topics SET hidden = '1' WHERE tid = '$topic_id'"); + + $db->query("UPDATE " . PREFIX . "_forum_posts SET hidden = '6' WHERE topic_id = '$topic_id' and hidden NOT IN (1,2)"); + } + + header("Location: {$_SERVER['HTTP_REFERER']}"); + } + + break; + +// ******************************************************************************** +// NOT HIDDEN TOPIC +// ******************************************************************************** + case "07": + + if ($selectedtids and is_moderation(0, $selectedtids, 0)) + { + $selectedtids = explode(",",$selectedtids); + + foreach($selectedtids as $topic_id) + { + $topic_id = intval($topic_id); + if ( $topic_id == 0 ) continue; + $db->query("UPDATE " . PREFIX . "_forum_topics SET hidden = '0' WHERE tid = '$topic_id'"); + + $db->query("UPDATE " . PREFIX . "_forum_posts SET hidden = '0' WHERE topic_id = '$topic_id' and hidden NOT IN (1,2)"); + } + + header("Location: {$_SERVER['HTTP_REFERER']}"); + } + + break; + +// ******************************************************************************** +// FIXED TOPIC +// ******************************************************************************** + case "08": + + if ($selectedtids and is_moderation(0, $selectedtids, 0)) + { + if (!moderator_value('pin_topic', $forum_id, $m_member)) die(); + + $selectedtids = explode(",",$selectedtids); + + foreach($selectedtids as $topic_id) + { + $topic_id = intval($topic_id); + if ( $topic_id == 0 ) continue; + $db->query("UPDATE " . PREFIX . "_forum_topics SET fixed = '0' WHERE tid = '$topic_id'"); + } + + header("Location: {$_SERVER['HTTP_REFERER']}"); + } + + break; + +// ******************************************************************************** +// NOT FIXED TOPIC +// ******************************************************************************** + case "09": + + if ($selectedtids and is_moderation(0, $selectedtids, 0)) + { + if (!moderator_value('unpin_topic', $forum_id, $m_member)) die(); + + $selectedtids = explode(",",$selectedtids); + + foreach($selectedtids as $topic_id) + { + $topic_id = intval($topic_id); + if ( $topic_id == 0 ) continue; + $db->query("UPDATE " . PREFIX . "_forum_topics SET fixed = '1' WHERE tid = '$topic_id'"); + } + + header("Location: {$_SERVER['HTTP_REFERER']}"); + } + + break; + +// ******************************************************************************** +// CALC +// ******************************************************************************** + case "10": + + $topic_id = intval($_REQUEST['tid']); + + if ($topic_id and is_moderation(0, $topic_id, 0)) + { + calk_topic_del ($topic_id); + + header("Location: {$_SERVER['HTTP_REFERER']}"); + } + + break; + +// ******************************************************************************** +// Default +// ******************************************************************************** + default: + + header("Location: {$_SERVER['HTTP_REFERER']}"); + + break; + } + +?> \ No newline at end of file diff --git a/system/forum/action/post.php b/system/forum/action/post.php new file mode 100644 index 0000000..fa7c135 --- /dev/null +++ b/system/forum/action/post.php @@ -0,0 +1,515 @@ +safesql($_POST['post_id']); + + $topic_title = $_POST['topic_ti']; + + $post_text = $_POST['post_text']; + + $name = $_POST['name']; + $mail = $_POST['mail']; + + $check_write = check_access($forums_array[$forum_id]['access_write']); + + if ($check_write) + { + require_once SYSTEM_DIR.'/forum/action/addpost.php'; + } + + else + { + $group_name = $user_group[$member_id['user_group']]['group_name']; + + forum_msg($f_lang['all_info'], $f_lang['topic_write'], 'user_group', $group_name); + } + + break; + +// ******************************************************************************** +// EDIT POST +// ******************************************************************************** + case "02": + + $pid = intval($_REQUEST['pid']); + + $page = intval($_REQUEST['p']); + + $post_n = intval($_REQUEST['pn']); + + if ($pid) + { + if (is_moderation(0, 0, $pid, 'forum_post_edit')) + { + include_once SYSTEM_DIR.'/classes/parse.class.php'; + + $parse = new ParseFilter(Array(), Array(), 1, 1); + + $row = $db->super_query("SELECT * FROM " . PREFIX . "_forum_posts WHERE `pid` = '$pid'"); + + $post_text = $parse->decodeBBCodes($row['post_text'], false); + + $topic_id = $row['topic_id']; + + $fid = $db->super_query("SELECT forum_id FROM " . PREFIX . "_forum_topics WHERE tid = '$topic_id'"); + + $forum_id = $fid['forum_id']; + + $access_upload = check_access($forums_array[$forum_id]['access_upload']); + + $upload_var = array('area'=>"post", 'forum_id'=>$forum_id, 'topic_id'=>$topic_id, 'post_id'=>$pid); + + if ($row['pid']) + { + $edit_post_action = $a_forum_url."act=post&code=03&pid=$pid&topic_id=$topic_id&p=$page&pn=$post_n"; + + $tpl->load_template($tpl_dir.'addpost.tpl'); + + $tpl->set('{title}', $f_lang['app_post_edit']); + + $tpl->set('[not-wysywyg]', ""); + + $tpl->set('{wysiwyg}',''); + + $tpl->set('[/not-wysywyg]',""); + + include_once SYSTEM_DIR.'/forum/sources/components/bbcode.php'; + + if (!$is_logged) + { + $tpl->set('[not-logged]',''); + $tpl->set('[/not-logged]',''); + } + + else + { + $tpl->set_block("'\\[not-logged\\](.*?)\\[/not-logged\\]'si",""); + } + + $tpl->set_block("'\\[sec_code\\](.*?)\\[/sec_code\\]'si",""); + + $tpl->set('{bbcode}',$bb_code); + $tpl->set('{text}',$post_text); + + $tpl->copy_template = "
    ".$tpl->copy_template."
    "; + + $tpl->compile('dle_forum'); + $tpl->clear(); + } + } + + else + { + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + } + } + + else + { + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + } + + break; + +// ******************************************************************************** +// SAVE POST +// ******************************************************************************** + case "03": + + $pid = intval($_REQUEST['pid']); + + $topic_id = intval($_REQUEST['topic_id']); + + $page = intval($_REQUEST['p']); + + $post_n = intval($_REQUEST['pn']); + + if (is_moderation(0, 0, $pid, 'forum_post_edit')) + { + include_once SYSTEM_DIR.'/classes/parse.class.php'; + + $parse = new ParseFilter(Array(), Array(), 1, 1); + + $post_text = $parse->process($_POST['post_text']); + + $post_text = $db->safesql($parse->BB_Parse($post_text, FALSE)); + + $post_text = auto_wrap ($post_text); + + if (strlen($post_text) > $forum_config['post_maxlen']) + { + $post_maxlen = true; + } + else + { + $post_maxlen = false; + } + + if ($post_text and !$post_maxlen) + { + $_TIME = time()+($config['date_adjust']*60); + + $edit_info = ", edit_user = '{$member_id[name]}', edit_time = '{$_TIME}'"; + + $db->query("UPDATE " . PREFIX . "_forum_posts SET post_text = '$post_text' {$edit_info} WHERE pid = '$pid'"); + + check_attachment($pid, $post_text); + + if ($forum_config['mod_rewrite']) + { + $topic_location = $forum_url."/topic_{$topic_id}/$page#post-$post_n"; + } + else + { + $topic_location = $forum_url."showtopic=$topic_id&cstart=$page#post-$post_n"; + } + + header("Location: $topic_location"); + } + + else + { + if ($post_maxlen) + { + forum_msg($f_lang['f_msg'], $f_lang['maxlen_stop']); + } + else + { + forum_msg($f_lang['f_msg'], $f_lang['topic_add_stop'], 'stop', ''); + } + + } + } + + else + { + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + } + + break; + +// ******************************************************************************** +// DEL POST +// ******************************************************************************** + case "04": + + if (is_moderation(0, 0, $selected_id, 'forum_post_del')) + { + $selected_id = explode(",", $selected_id); + + foreach ($selected_id as $post_id) + { + $db->query("DELETE FROM " . PREFIX . "_forum_posts WHERE pid = '$post_id'"); + +// + +$result = $db->query("SELECT * FROM " . PREFIX . "_forum_files WHERE post_id = '" . $post_id . "'"); + +while ($row = $db->get_row($result)) { + +if ($row['file_type'] == "file") { + +unlink(UPLOAD_DIR."files/" . $row['onserver']); + +} elseif ($row['file_type'] == "thumb") { + +unlink(UPLOAD_DIR."thumbs/" . $row['onserver']); + +unlink(UPLOAD_DIR."images/" . $row['onserver']); + +} else { + +unlink(UPLOAD_DIR."images/" . $row['onserver']); + +} + +} + +$db->query("DELETE FROM " . PREFIX . "_forum_files WHERE post_id = '" . $post_id . "'"); + +// + + $update_id[] = $post_id; + + $del_count++; + } + + if ($update_id) + { + $update_list = implode(',', $update_id); + + $db->query("UPDATE " . PREFIX . "_forum_files SET file_attach = '0' WHERE post_id IN ({$update_list})"); + } + + if ($is_mod['topic_id'] and $del_count) + { + calk_topic_del ($is_mod['topic_id'], $del_count); + } + + if ($forum_config['mod_rewrite']) $topic_location = $forum_url."/topic_".$is_mod['topic_id']; + + else $topic_location = $forum_url."showtopic=".$is_mod['topic_id']; + + header("Location: $topic_location"); + } + + else break; + + break; + +// ******************************************************************************** +// UN HIDDEN POST +// ******************************************************************************** + case "05": + + if ($selected_id and is_moderation(0, 0, $selected_id)) + { + $selected_id = explode(",", $selected_id); + + foreach ($selected_id as $post_id) + { + $db->query("UPDATE " . PREFIX . "_forum_posts SET hidden = '0' WHERE pid = '$post_id'"); + } + + header("Location: $_SERVER[HTTP_REFERER]"); + } + + else break; + + break; + +// ******************************************************************************** +// HIDDEN POST +// ******************************************************************************** + case "06": + + if ($selected_id and is_moderation(0, 0, $selected_id)) + { + $selected_id = explode(",", $selected_id); + + foreach ($selected_id as $post_id) + { + $db->query("UPDATE " . PREFIX . "_forum_posts SET hidden = '1' WHERE pid = '$post_id'"); + } + + header("Location: $_SERVER[HTTP_REFERER]"); + } + + else break; + + break; + +// ******************************************************************************** +// Combining POST +// ******************************************************************************** + case "07": + + if ($selected_id and is_moderation(0, 0, $selected_id, 'combining_post')) + { + $pid_list = $db->safesql($selected_id); + + $db->query("SELECT * FROM " . PREFIX . "_forum_posts WHERE pid IN ($pid_list)"); + + $join_posts_error = false; + + $post_author = array(); + + $posts_text = array(); + + $selected_id = array(); + + $topic_id = 0; + + while ($row = $db->get_row()) + { + $count++; + + $selected_id[] = $row['pid']; + + if ($count == 1) + { + $topic_id = $row['topic_id']; + } + + if (!in_array($row['post_author'], $post_author)) + { + $post_author[] = $row['post_author']; + } + + if ($row['topic_id'] !== $topic_id) + { + $join_posts_error = true; + } + + $posts_text[] = $row['post_text']; + } + + if ($count > 1 and !$join_posts_error) + { + $new_post = implode("

    ", $posts_text); + + $new_post = $db->safesql($new_post); + + foreach ($selected_id as $key => $value_pid) + { + $pid_count++; + + if ($pid_count == 1) + { + $edit_info = ", edit_user = '{$member_id[name]}', edit_time = '{$_TIME}'"; + + $db->query("UPDATE " . PREFIX . "_forum_posts SET post_text = '$new_post' {$edit_info} WHERE pid = '$value_pid'"); + } + else + { + $db->query("DELETE FROM " . PREFIX . "_forum_posts WHERE pid = '$value_pid'"); + + $del_count++; + } + } + + $del_count = $del_count + 1; + + calk_topic_del ($topic_id, $del_count); + + if ($forum_config['mod_rewrite']) $topic_location = $forum_url . "/topic_" . $topic_id; + + else $topic_location = $forum_url . "showtopic=" . $topic_id; + + header("Location: $topic_location"); + } + } + + break; + +// ******************************************************************************** +// Move POST +// ******************************************************************************** + case "08": + + $new_topic = $_REQUEST['new_topic']; + + $new_topic_id = 0; + + if (intval($new_topic) != 0) + { + $new_topic_id = intval ($new_topic); + } + else + { + preg_match_all("#topic_([0-9]{1,10})#", $new_topic, $matches); + + $new_topic_id = intval ($matches[1][0]); + + if (!$new_topic_id) + { + preg_match_all("#showtopic=([0-9]{1,10})#", $new_topic, $matches); + + $new_topic_id = intval ($matches[1][0]); + } + } + + if ($selected_id and is_moderation(0, 0, $selected_id, 'move_post')) + { + if (!$subaction) + { + $action_moveposts = $a_forum_url."act=post&code=08&subaction=move&selected_id={$selected_id}"; + + $tpl->load_template($tpl_dir.'moveposts.tpl'); + + $tpl->copy_template = "
    ".$tpl->copy_template."
    "; + + $tpl->compile('dle_forum'); + $tpl->clear(); + } + else + { + if ($new_topic_id) + { + $row = $db->super_query("SELECT * FROM " . PREFIX . "_forum_topics WHERE tid = $new_topic_id"); + + $new_forum_id = $row['forum_id']; + + if ($row['tid']) + { + // get info // + $post_id = intval($selected_id); + $row_post = $db->super_query("SELECT * FROM " . PREFIX . "_forum_posts WHERE pid = $post_id"); + $old_topic_id = $row_post['topic_id']; + + $row2 = $db->super_query("SELECT * FROM " . PREFIX . "_forum_topics WHERE tid = $old_topic_id"); + $old_forum_id = $row2['forum_id']; + // - // + + if ($old_topic_id == $new_topic_id) + { + die("error"); + } + + $in_post_id = array(); + + $selected_id = explode(",", $selected_id); + + foreach ($selected_id as $post_id) + { + $post_count++; + + $in_post_id[] = $post_id; + } + + $post_id_list = implode(',', $in_post_id); + + $db->query("UPDATE " . PREFIX . "_forum_posts SET topic_id = $new_topic_id WHERE pid IN ({$post_id_list})"); + + if ($old_forum_id == $new_forum_id) + { + unset ($post_count); + } + + calk_topic_del ($new_topic_id, $post_count, '+'); + + calk_topic_del ($old_topic_id, $post_count, '-'); + + if ($forum_config['mod_rewrite']) $topic_location = $forum_url . "/topic_" . $new_topic_id; + + else $topic_location = $forum_url . "showtopic=" . $new_topic_id; + + header("Location: $topic_location"); + } + } + } + } + + break; + +// ******************************************************************************** +// ERROR +// ******************************************************************************** + default: + + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + + break; + } +?> \ No newline at end of file diff --git a/system/forum/action/topic.php b/system/forum/action/topic.php new file mode 100644 index 0000000..52490ad --- /dev/null +++ b/system/forum/action/topic.php @@ -0,0 +1,352 @@ +super_query("SELECT * FROM " . PREFIX . "_forum_topics WHERE tid = '$tid'"); + + $forum_id = $row_topic['forum_id']; + + $topic_title = stripslashes($row_topic['title']); + + $topic_title_last = urlencode($topic_title); + + $check_moderator = check_moderator($forums_array[$forum_id]['access_mod'], $forums_array[$forum_id]['moderators']); + + $check_write = check_access($forums_array[$forum_id]['access_write']); + + $page_n = @ceil(($row_topic['post'] + 1) / $forum_config['post_inpage']); + + if ($row_topic['topic_status'] and !$check_moderator) + { + $topic_status = false; + } + + else + { + $topic_status = true; + } + + if ($check_write and $topic_status) + { + $access_upload = check_access($forums_array[$forum_id]['access_upload']); + + $upload_var = array('area'=>"post", 'forum_id'=>$forum_id, 'topic_id'=>$tid, 'post_id'=>get_salt()); + + $tpl->load_template($tpl_dir.'addpost.tpl'); + + $tpl->set('{title}', $f_lang['app_reply']); + + $tpl->set('[not-wysywyg]', ""); + + $tpl->set('{wysiwyg}',''); + + $tpl->set('[/not-wysywyg]',""); + + include_once SYSTEM_DIR.'/forum/sources/components/bbcode.php'; + + if (!$is_logged) + { + $tpl->set('[not-logged]',''); + $tpl->set('[/not-logged]',''); + } + + else + { + $tpl->set_block("'\\[not-logged\\](.*?)\\[/not-logged\\]'si",""); + } + + if (check_access($forum_config['post_captcha'])) + { + $tpl->set('[sec_code]',""); + $tpl->set('[/sec_code]',""); + + $path = parse_url($config['http_home_url']); + $anti_bot = !defined('FORUM_SUB_DOMAIN') ? 'system/modules/' : ''; + + $tpl->set('{sec_code}',"\"${lang['sec_image']}\""); + } + else + { + $tpl->set('{sec_code}',""); + $tpl->set_block("'\\[sec_code\\](.*?)\\[/sec_code\\]'si",""); + } + + $tpl->set('{bbcode}',$bb_code); + $tpl->set('{text}',""); + + $add_post_action = $a_forum_url."act=post&code=add&page={$page_n}"; + + $tpl->copy_template = "
    ".$tpl->copy_template." + + + +
    +
    "; + + $tpl->compile('dle_forum'); + $tpl->clear(); + } + + else + { + $group_name = $user_group[$member_id['user_group']]['group_name']; + + forum_msg($f_lang['all_info'], $f_lang['topic_write'], 'user_group', $group_name); + } + + if ($forum_config['forum_bar']) + { + $bbr_fid = $forum_id; + $bbr_fname = $forums_array[$forum_id]['name']; + + $category_id = $forums_array[$forum_id]['main_id']; + + $bbr_cid = $category_id; + $bbr_name = $cats_array[$category_id]['cat_name']; + + $bbr_tid = $tid; + $bbr_tname = $topic_title; + + $bbr_app = $f_lang['app_reply']; + } + + break; + +// ******************************************************************************** +// FORWARD +// ******************************************************************************** + case "forward": + + if ($is_logged) + { + if (!$subaction) + { + $result = $db->super_query("SELECT * FROM " . PREFIX . "_forum_topics WHERE tid = '$tid'"); + + if ($result['tid']) + { + $topic_action_add = $a_forum_url."act=_topic&code=forward&subaction=send&tid={$tid}"; + + $tpl->load_template($tpl_dir.'send_frend.tpl'); + + $topic_link = $a_forum_url."showtopic={$tid}"; + + $tpl->set('{topic_title}', $result['title']); + $tpl->set('{topic_link}', $topic_link); + $tpl->set('{user_name}', $member_id['name']); + + $tpl->copy_template = "
    ".$tpl->copy_template."
    "; + + $tpl->compile('dle_forum'); + $tpl->clear(); + } + + else + { + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + } + } + + else + { + $frend_name = strip_tags(stripslashes($_REQUEST['frend_name'])); + $frend_mail = strip_tags(stripslashes($_REQUEST['frend_mail'])); + $frend_title = strip_tags(stripslashes($_REQUEST['frend_title'])); + $frend_text = strip_tags(stripslashes($_REQUEST['frend_text'])); + + if ($frend_name and $frend_mail and $frend_title and $frend_text) + { + $mail_tpl = $db->super_query("SELECT template FROM " . PREFIX . "_forum_email where name='frend_text' LIMIT 0,1"); + + $mail_tpl['template'] = stripslashes($mail_tpl['template']); + + $mail_result = str_replace("{%username_from%}", $member_id['name'], $mail_tpl['template']); + + $mail_result = str_replace("{%username_to%}", $frend_name, $mail_result); + + $mail_result = str_replace("{%text%}", $frend_text, $mail_result); + + include_once SYSTEM_DIR.'/classes/mail.class.php'; + + $mail = new dle_mail ($config); + + $mail->send ($frend_mail, $frend_title, $mail_result); + + $topic_link = $a_forum_url."showtopic={$tid}"; + + forum_msg($f_lang['f_msg'], $f_lang['mail_send'], "link", $topic_link); + } + + else + { + forum_msg($f_lang['f_msg'], $f_lang['values_error']); + } + } + } + + else + { + $group_name = $user_group[$member_id['user_group']]['group_name']; + + forum_msg($f_lang['f_msg'], $f_lang['page_deny'], "user_group", $group_name); + } + + $bbr_app = $f_lang['title_forward']; + + break; + +// ******************************************************************************** +// PRINT +// ******************************************************************************** + case "print": + + $row_topic = $db->super_query("SELECT * FROM " . PREFIX . "_forum_topics WHERE tid = '$tid'"); + + $forum_id = $row_topic['forum_id']; + + $check_read = check_access($forums_array[$forum_id]['access_read']); + + if ($check_read) + { + if ($row_topic['topic_descr']) + { + $row_topic['title'] = $row_topic['title'].', '.$row_topic['topic_descr']; + } + + $result_posts = $db->query("SELECT p.*, u.* FROM " . PREFIX . "_forum_posts AS p LEFT JOIN " . USERPREFIX . "_users AS u ON p.post_author=u.name WHERE p.topic_id = '$tid' and p.hidden = '0' ORDER by pid"); + + while ($row = $db->get_row($result_posts)) + { + $row['post_date'] = strtotime($row['post_date']); + + $tpl->load_template($tpl_dir.'print/post.tpl'); + + $tpl->set('{author}', $row['post_author']); + + $tpl->set('{post-date}', show_date($row['post_date'])); + + $tpl->set('{text}', $row['post_text']); + + if ($member_id['forum_post'] >= $forum_config['post_hide']) + { + $tpl->set_block("'\[hide\](.*?)\[/hide\]'si","\\1"); + } + else + { + $hide_info = "! , . $forum_config[post_hide] ."; + + $tpl->set_block("'\\[hide\\](.*?)\\[/hide\\]'si","
    ".$hide_info."
    "); + } + + $tpl->compile('posts'); + $tpl->clear(); + } + + if (stristr ($tpl->result['posts'], "[attachment=")) + { + require_once SYSTEM_DIR.'/forum/sources/components/attachment.php'; + } + + $tpl->load_template($tpl_dir.'print/topic.tpl'); + + $tpl->set('{topic_link}', $a_forum_url."showtopic=".$row_topic['tid']); + + $tpl->set('{topic_title}', $row_topic['title']); + + $tpl->set('{post_list}', $tpl->result['posts']); + + $tpl->compile('topic_print'); + $tpl->clear(); + + die ($tpl->result['topic_print']); + } + + else + { + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + } + + break; + +// ******************************************************************************** +// POST REPORT +// ******************************************************************************** + case "report": + + if ($is_logged AND !$forum_config['mod_report']) + { + if (!$subaction) + { + $report_action_add = $a_forum_url."act=_topic&code=report&subaction=add&tid={$tid}&pid={$pid}"; + + $tpl->load_template($tpl_dir.'report.tpl'); + + $tpl->copy_template = "
    ".$tpl->copy_template."
    "; + + $tpl->compile('dle_forum'); + $tpl->clear(); + } + + else + { + $report = strip_tags(stripslashes($_REQUEST['report'])); + + if ($tid AND $pid AND $report) + { + $mail_tpl = $db->super_query("SELECT template FROM " . PREFIX . "_forum_email where name='report_text' LIMIT 0,1"); + + $mail_tpl['template'] = stripslashes($mail_tpl['template']); + + $topic_link = $a_forum_url."showtopic={$tid}"; + + $mail_result = str_replace("{%username_from%}", $member_id['name'], $mail_tpl['template']); + + $mail_result = str_replace("{%text%}", $report, $mail_result); + + $mail_result = str_replace("{%topic_link%}", $topic_link, $mail_result); + + $mail_result = str_replace("{%post_id%}", $pid, $mail_result); + + include_once SYSTEM_DIR.'/classes/mail.class.php'; + + $mail = new dle_mail ($config); + + $mail->send ($config['admin_mail'], "DLE Forum - REPORT", $mail_result); + + forum_msg($f_lang['f_msg'], $f_lang['report_send'], "link", $topic_link); + } + + else + { + forum_msg($f_lang['f_msg'], $f_lang['values_error']); + } + } + } + + else + { + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + } + + break; + + default: + + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + + break; + } + +?> \ No newline at end of file diff --git a/system/forum/ajax/addpost.php b/system/forum/ajax/addpost.php new file mode 100644 index 0000000..c8eebff --- /dev/null +++ b/system/forum/ajax/addpost.php @@ -0,0 +1,59 @@ +dir = ROOT_DIR.'/templates/'.$_REQUEST['skin']; +define('TEMPLATE_DIR', $tpl->dir); + +$name = convert_unicode($_POST['name'], $config['charset']); +$mail = convert_unicode($_POST['mail'], $config['charset']); + +$post_text = trim(convert_unicode($_POST['post_text'], $config['charset'])); + +$topic_title = convert_unicode($_POST['topic_title'], $config['charset']); + +$topic_id = intval($_POST['topic_id']); + +$forum_id = intval($_POST['forum_id']); + +$post_id = $_POST['post_id']; + +$ajax_adds = TRUE; + +$access_mod = array(1); + +require_once SYSTEM_DIR.'/forum/action/addpost.php'; + +$clear_value = "form.post_text.value = '';"; + +if(!$add_post_error){ + +$result_posts = $db->query("SELECT * FROM " . PREFIX . "_forum_posts LEFT JOIN " . USERPREFIX . "_users ON " . PREFIX . "_forum_posts.post_author=" . USERPREFIX . "_users.name WHERE " . PREFIX . "_forum_posts.topic_id = '$topic_id' ORDER BY pid DESC LIMIT 1"); + +$tid = $topic_id; + +require_once SYSTEM_DIR.'/forum/sources/showposts.php'; + +$tpl->result['content'] = "
    ".$tpl->result['posts']."
    "; +$tpl->result['content'] = str_replace('{THEME}', $config['http_home_url'].'templates/'.$_REQUEST['skin'], $tpl->result['content']); + +$tpl->result['content'] .= << +var timeval = new Date().getTime(); +var form = document.getElementById('forum-post-form'); +{$clear_value} + +HTML; + +} + +else +{ + $tpl->result['content'] = ""; +} + +@header("Content-type: text/html; charset=".$config['charset']); +echo $tpl->result['content']; +?> \ No newline at end of file diff --git a/system/forum/ajax/dle_forum.js b/system/forum/ajax/dle_forum.js new file mode 100644 index 0000000..b64f3e5 --- /dev/null +++ b/system/forum/ajax/dle_forum.js @@ -0,0 +1,208 @@ +function ajax_post_edit ( p_id ){ + if ( ! c_cache[ p_id ] || c_cache[ p_id ] == '' ){ + c_cache[ p_id ] = $('#post-id-'+p_id).html(); + } + ShowLoading(''); + $.get( forum_ajax + "editpost.php", { id: p_id, action: "edit" }, function(data){ + HideLoading(''); + RunAjaxJS('post-id-'+p_id, data); + setTimeout(function() { + $("html:not(:animated)"+( ! $.browser.opera ? ",body:not(:animated)" : "")).animate({scrollTop: $("#post-id-" + p_id).offset().top - 70}, 700); + }, 100); + }); + return false; +}; +function ajax_cancel_post_edit( p_id ){ + if ( c_cache[ p_id ] != "" ) + {$("#post-id-"+p_id).html(c_cache[ p_id ]);} + return false; +}; +function ajax_save_post_edit( c_id ){ + var post_txt = ''; + comm_edit_id = c_id; + post_txt = $('#forum_post_'+c_id).val(); + ShowLoading(''); + $.post(forum_ajax + "editpost.php", { id: c_id, post_text: post_txt, action: "save" }, function(data){ + HideLoading(''); + $("#post-id-"+c_id).html(data); + }); + return false; +}; +function doAddPost(){ + var form = document.getElementById('forum-post-form'); + if (form.post_text.value == '' || form.post_text.value == ''){alert ( dle_req_field );return false;} + ShowLoading(''); + $.post(forum_ajax + "addpost.php", { topic_id: form.topic_id.value, forum_id: form.forum_id.value, post_id: form.post_id.value, topic_title: form.topic_title.value, name: form.name.value, mail: form.mail.value, post_text: form.post_text.value, skin: dle_skin }, function(data){ + HideLoading(''); + RunAjaxJS('ajax-post', data); + if (data != 'error' && document.getElementById('blind-animation')) { + $("html"+( ! $.browser.opera ? ",body" : "")).animate({scrollTop: $("#ajax-post").offset().top - 70}, 1100); + setTimeout(function() { $('#blind-animation').show('blind',{},0)}, 0); + } + }); +}; +function postDelete(url){ + var agree=confirm( ' ?' ); + if (agree) + document.location=url; +}; +function topicDelete(url){ + var agree=confirm( ' ?' ); + if (agree) + document.location=url; +}; +function rowDelete(url){ + var agree=confirm( ' ?' ); + if (agree) + document.location=url; +}; +function TopicMenu( tid, forum_url, moderation ){ +var menu=new Array(); +if (moderation) +{ + menu[0]=' '; +} +menu[1]=' '; +menu[2]=' '; +menu[3]=' '; +return menu; +}; +function ForumMenu( fid, moderation, forum_url ){ +var menu=new Array(); +if (moderation){ +menu[0]=' '; +menu[1]=' '; +} +menu[3]=' '; +menu[4]=' '; +return menu; +}; +function PostEditMenu( pid, forum_url, page, post_n ){ +var menu=new Array(); +menu[0]='' + menu_short + ''; +menu[1]='' + menu_full + ''; +return menu; +}; +function FUserMenu( url, m_id, group, forum_url ){ +var menu=new Array(); + menu[0]='' + menu_profile + ''; + menu[1]='' + menu_send + ''; + menu[2]=' '; + if (group == '1') { + menu[3]='' + menu_uedit + ''; + } +return menu; +}; +function navigation(pages_count, url){ + var page = prompt(" ", ""); + if (page) + { + if (pages_count >= page) + { + window.location.href = url + page; + } + } +}; +function PostLink(link){ + url = window.location; + var enterCause = prompt(" ", url + "#post-" + link); +}; +function select_id( sid ){ + var saved = new Array(); + var clean = new Array(); + var add = 1; + tmp = document.modform.selected_id.value; + if( tmp != "" ) + { + saved = tmp.split(","); + } + for( i = 0 ; i < saved.length; i++ ) + { + if ( saved[i] != "" ) + { + if ( saved[i] == sid ) + { + add = 0; + } + else + { + clean[clean.length] = saved[i]; + } + } + } + + if ( add ) + { + clean[ clean.length ] = sid; + } + + newvalue = clean.join(','); + document.modform.selected_id.value = newvalue; +}; +function ShowHide( name, open ){ + if (document.getElementById( name ).style.display != "none") + { + document.getElementById( name ).style.display = "none"; + } + else + { + document.getElementById( name ).style.display = ""; + } + + if (open) + { + document.getElementById( name ).style.display = ""; + } +}; +function PostPreviewCompleted(){ + var post_main_obj = document.getElementById( 'post-preview' ); + var post_box_top = _get_obj_toppos( post_main_obj ); + if ( post_box_top ) + { + scroll( 0, post_box_top - 70 ); + } +}; +function PostPreview(){ + var post_text = ""; + post_text = document.getElementById('forum-post-form').post_text.value; + if (post_text == ''){alert(' ');return false} + ShowLoading(''); + $.post(forum_ajax + "post.preview.php", { post_text: post_text, skin: dle_skin}, function(data){ + HideLoading(''); + $("#post-preview").html(data); + }); +}; +function uploadsform(open_url){ + $("#uploads-form").remove(); + ShowLoading(''); + $.post(forum_ajax + "uploads.form.php", {open_url: open_url}, function(data){ + HideLoading(''); + $("body").append( data ); + $('#uploads-form').dialog({ + autoOpen: true, + width: 470, + buttons: { + "": function() { + $(this).dialog("close"); + $("#uploads-form").remove(); + }}}); + }); + return false; +}; +function forum_ins(name){ + var input = document.getElementById('forum-post-form').post_text; + if (dle_txt!= "") + { + input.value += dle_txt; + } + else + { + input.value += "[b]"+name+"[/b],"+"\n"; + } +}; +function CtrlEnter(event, form){ + if((event.ctrlKey) && ((event.keyCode == 0xA)||(event.keyCode == 0xD))) + { + form.submit.click(); + } +}; \ No newline at end of file diff --git a/system/forum/ajax/editpost.php b/system/forum/ajax/editpost.php new file mode 100644 index 0000000..063715d --- /dev/null +++ b/system/forum/ajax/editpost.php @@ -0,0 +1,104 @@ +super_query("SELECT * FROM " . PREFIX . "_forum_posts WHERE pid = $id"); + + if ($id != $row['pid']) die ("error"); + + $topic_id = $row['topic_id']; + + $upload_var = array('area'=>"post", 'forum_id'=>$forum_id, 'topic_id'=>$topic_id, 'post_id'=>$id); + + $ajax_post_id = $id; + + $upload_var['reply'] = "reply"; + + $post_text = $parse->decodeBBCodes($row['post_text'], false); + + $upload_var['bb_width'] = '99%'; + + include_once SYSTEM_DIR.'/forum/sources/components/bbcode.php'; + + $bb_code = str_replace ("{THEME}", $config['http_home_url']."templates/".$config['skin'], $bb_code); + + + $buffer = << +
    {$bb_code}
    +
    +
    + +
    + +HTML; +} + +// ******************************************************************************** +// SAVE POST +// ******************************************************************************** +elseif ($_REQUEST['action'] == "save") +{ + $post_text = trim(convert_unicode($_POST['post_text'], $config['charset'])); + + $post_text = $parse->process($post_text); + + $post_text = $parse->BB_Parse($post_text, FALSE); + + if (!$post_text) die ("error"); + + $post_text = auto_wrap ($post_text); + + if (strlen($post_text) > $forum_config['post_maxlen']) + { + die (""); + } + + $edit_info = ", edit_user = '{$member_id[name]}', edit_time = '{$_TIME}'"; + + $post_text = $db->safesql($post_text); + + $db->query("UPDATE " . PREFIX . "_forum_posts SET post_text = '$post_text' {$edit_info} WHERE pid = $id"); + + $post_text = preg_replace ("'\[hide\](.*?)\[/hide\]'si","\\1", $post_text); + + check_attachment($pid, $post_text); + + if (stristr ($post_text, "[attachment=")) + { + $row = $db->super_query("SELECT * FROM " . PREFIX . "_forum_posts WHERE pid = $id"); + + $tid = $row['topic_id']; + + $ajax_edit_attach = TRUE; + + require_once SYSTEM_DIR.'/forum/sources/components/attachment.php'; + } + + $buffer = stripslashes($post_text); + + $buffer = stripslashes($buffer); +} + +else die ("error"); + +@header("Content-type: text/html; charset=".$config['charset']); +echo $buffer; +?> \ No newline at end of file diff --git a/system/forum/ajax/init.php b/system/forum/ajax/init.php new file mode 100644 index 0000000..061cb38 --- /dev/null +++ b/system/forum/ajax/init.php @@ -0,0 +1,130 @@ +get ("usergroup"); + +if (!$user_group) +{ + $user_group = array (); + + $db->query("SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC"); + + while ($row = $db->get_row()) + { + $user_group[$row['id']] = array (); + + foreach ($row as $key => $value) + { + $user_group[$row['id']][$key] = $value; + } + } + + $cache->set ("usergroup", $user_group); + + $db->free(); +} + +$config['charset'] = ($lang['charset'] != '') ? $lang['charset'] : $config['charset']; + +require_once SYSTEM_DIR . '/modules/sitelogin.php'; + +if (!$is_logged) +{ + $member_id['user_group'] = 5; +} + +if ($member_id['banned']) +{ + die ("Hacking attempt!"); +} + +if (!function_exists('convert_unicode')) +{ + function decode_to_utf8 ($int=0) + { + $t = ''; + + if ( $int < 0 ) + { + return chr(0); + } + else if ( $int <= 0x007f ) + { + $t .= chr($int); + } + else if ( $int <= 0x07ff ) + { + $t .= chr(0xc0 | ($int >> 6)); + $t .= chr(0x80 | ($int & 0x003f)); + } + else if ( $int <= 0xffff ) + { + $t .= chr(0xe0 | ($int >> 12)); + $t .= chr(0x80 | (($int >> 6) & 0x003f)); + $t .= chr(0x80 | ($int & 0x003f)); + } + else if ( $int <= 0x10ffff ) + { + $t .= chr(0xf0 | ($int >> 18)); + $t .= chr(0x80 | (($int >> 12) & 0x3f)); + $t .= chr(0x80 | (($int >> 6) & 0x3f)); + $t .= chr(0x80 | ($int & 0x3f)); + } + else + { + return chr(0); + } + + return $t; + } + + function convert_unicode ($t, $to = 'windows-1251') + { + $to = strtolower($to); + + if ($to == 'utf-8') { + + $t = preg_replace( '#%u([0-9A-F]{1,4})#ie', "decode_to_utf8(hexdec('\\1'))", utf8_encode($t) ); + $t = urldecode ($t); + + } else { + + $t = preg_replace( '#%u([0-9A-F]{1,4})#ie', "'&#' . hexdec('\\1') . ';'", $t ); + $t = urldecode ($t); + $t = @html_entity_decode($t, ENT_NOQUOTES, $to); + + } + + return $t; + } +} + +$tpl_dir = 'forum/'; + +?> \ No newline at end of file diff --git a/system/forum/ajax/poll.php b/system/forum/ajax/poll.php new file mode 100644 index 0000000..5ba85a8 --- /dev/null +++ b/system/forum/ajax/poll.php @@ -0,0 +1,148 @@ + $value) { + $alldata[] = intval($key).":".intval($value); + } + + $alldata = implode("|", $alldata); + + return $alldata; +} + +function get_votes ($all) { + + $data = array(); + + if ($all != "") { + $all = explode("|", $all); + + foreach ($all as $vote) { + list($answerid, $answervalue) = explode(":", $vote); + $data[$answerid] = intval($answervalue); + } + } + + return $data; +} + + $topic_id = intval($_REQUEST['topic_id']); + $answers = explode(" ", trim($_REQUEST['answer'])); + + $buffer = ""; + $vote_skin = strip_tags($_REQUEST['vote_skin']); + $_IP = $db->safesql($_SERVER['REMOTE_ADDR']); + + if ($is_logged) + $log_id = intval($member_id['user_id']); + else + $log_id = $_IP; + + $poll = $db->super_query("SELECT * FROM " . PREFIX . "_forum_topics WHERE tid = '{$topic_id}'"); + $log = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_forum_poll_log WHERE topic_id = '{$topic_id}' AND member ='{$log_id}'"); + + if ($log['count'] AND $_REQUEST['action'] != "list") $_REQUEST['action'] = "results"; + $votes = ""; + + if ($_REQUEST['action'] == "vote") { + + $votes = votes ($poll['answer'], $answers); + $db->query("UPDATE ".PREFIX."_forum_topics set answer='$votes', poll_count=poll_count+".count($answers)." WHERE tid = '{$topic_id}'"); + $db->query("INSERT INTO ".PREFIX."_forum_poll_log (topic_id, member) VALUES('{$topic_id}', '$log_id')"); + + $_REQUEST['action'] = "results"; + } + + if ($_REQUEST['action'] == "results") { + + if ($votes == "") {$votes = $poll['answer']; $allcount = $poll['poll_count'];} else { $allcount = count($answers) + $poll['poll_count']; } + + $answer = get_votes ($votes); + $body = explode("
    ", stripslashes($poll['poll_body'])); + $pn = 0; + + for ($i = 0; $i < sizeof($body); $i++) { + + $num = $answer[$i]; + + if (!$num) $num = 0; + + ++$pn; if ($pn > 5) $pn = 1; + + if ($allcount != 0) $proc = (100 * $num) / $allcount; + else $proc = 0; + + $proc = round($proc, 0); + +$buffer .= << +
    +HTML; + + + } + + } + elseif ($_REQUEST['action'] == "list") { + + $body = explode("
    ", stripslashes($poll['poll_body'])); + + if (!$poll['multiple']){ + + for ($v = 0; $v < sizeof($body); $v++) { + if (!$v) $sel = "checked"; else $sel = ""; + +$buffer .= <<
    +HTML; + + } + } else { + + for ($v = 0; $v < sizeof($body); $v++) { + +$buffer .= <<
    +HTML; + + } + + } + + + } else die("error"); + + +@header("Content-type: text/css; charset=".$config['charset']); +echo $buffer; +?> \ No newline at end of file diff --git a/system/forum/ajax/post.preview.php b/system/forum/ajax/post.preview.php new file mode 100644 index 0000000..35988c7 --- /dev/null +++ b/system/forum/ajax/post.preview.php @@ -0,0 +1,38 @@ +dir = ROOT_DIR.'/templates/'.$_REQUEST['skin']; +define('TEMPLATE_DIR', $tpl->dir); + +$config['charset'] = ($lang['charset'] != '') ? $lang['charset'] : $config['charset']; + +$_POST['post_text'] = convert_unicode($_POST['post_text'], $config['charset']); + +$parse = new ParseFilter(Array(), Array(), 1, 1); + +$post_text = $parse->process($_POST['post_text']); + +$post_text = $parse->BB_Parse($post_text, FALSE); + +if( function_exists( "get_magic_quotes_gpc" ) && get_magic_quotes_gpc() ) $post_text = stripslashes( $post_text ); + +$tpl->load_template('forum/msg.tpl'); + +$tpl->set('{title}', "Preview"); +$tpl->set('{msg}', $post_text); + +$tpl->compile('content'); +$tpl->clear(); + +$tpl->result['content'] = str_replace('{THEME}', $config['http_home_url'].'templates/'.$_REQUEST['skin'], $tpl->result['content']); + +@header("Content-type: text/css; charset=".$config['charset']); + +echo $tpl->result['content']; + +?> \ No newline at end of file diff --git a/system/forum/ajax/uploads.form.php b/system/forum/ajax/uploads.form.php new file mode 100644 index 0000000..e47cf34 --- /dev/null +++ b/system/forum/ajax/uploads.form.php @@ -0,0 +1,34 @@ + + $('#uploads-form').dialog({ + autoOpen: true, + width: 470, + buttons: { + "Close": function() { + $(this).dialog("close"); + $("#uploads-form").remove(); + } + } + }); + +HTML; + +$content = << +HTML; + +@header("Content-type: text/html; charset=".$config['charset']); +@header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); +@header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . " GMT" ); +@header( "Cache-Control: no-store, no-cache, must-revalidate" ); +@header( "Cache-Control: post-check=0, pre-check=0", false ); +@header( "Pragma: no-cache" ); + +echo ""; + +?> \ No newline at end of file diff --git a/system/forum/images/post_icons/icon1.gif b/system/forum/images/post_icons/icon1.gif new file mode 100644 index 0000000000000000000000000000000000000000..cbfdc6566820efa56e3a31a83fe8d2bcb4eb127d GIT binary patch literal 672 zcmZ?wbhEHb6lM@+c$UlX|Cy4riNL=niofp3KiDkz@cG-nj}$XPRes))|8Q2SEY7w-an{uy@ioZT4erpxq-rbwFZd~$shw$oJj+=KM{CT9fqKZ8$ zTz$*N#ouqpZfN29c3rkS-S)TN&Uw7q?9X;^i>FdiY1fCq0{Cr9J>O$^^`^1yIIUj8kda_HTHj2HiGVJgY z(JNcUdkXlj-@dzP-Ta&g^+XSjoM5g^Yv-L=C7R^U@#U(_(_>NzZX6%ZNxeBH(VW5i z@x1hg4xaiX?hEV1PS4``cwVY8p0h5RJ=v3EV<*q`TXzokaa@|u{raS2rXS~;E`gIX zc@n(Ew@u{VFiGgd6s|8mBbO=@RXy z%fs4gAZnH+ug#$?&o3C4sx3gAFqi!?9yb%=~=5T#8Nh zwgPO&7>_fu$#Sy%KNxZm93FA)K;bao_%5eC!Nf}k_N2s%1EPC(Z#s7Lz~vPJuaAoF*t+WaQl4+uWw&lz66YcOc&Bhy zxcZ7J_8WKZPwmdXb?;$$y6vAwio18NyLtD)mW_-5|Nmc=<+Qq%WApljU#`epS-}0{ zw%n~%d=H+!zOq&P*krDr0=^SdxDwnr4)<|9+$Wyo!I9uC{`#2siG>1ZR*5!e@E%+& z+FB8MdKS<1TX!1cIg`CPKb(`gG@rX6j&tuUp|;Af4U>eP>=L@&xQ`3Cx<0B zv~WE=CiU^W^u|t}r@KYo9Fy3zZvKV!V!!Un|9`4f8^!+bsnVCLGLNDT)pTxbU zOJLhX{v>yflQVe|JvefLxsp9OHm#jEr%Cwx4cVLs_0BAwx@h*#m!z*Q%L| zIaqkOp^1%IO2dFbp_`TOT+-H=3=bQb)%jKlZZJ4}dcEVK12&2a7`xb*bV3Ryd|V}< jD&RchOMvj>7EyuuD!mFD864SIxIKC%9QhWYz+epk)@%t* literal 0 HcmV?d00001 diff --git a/system/forum/images/post_icons/icon11.gif b/system/forum/images/post_icons/icon11.gif new file mode 100644 index 0000000000000000000000000000000000000000..5177427b89f88b727aedc7b64b02853f97353288 GIT binary patch literal 689 zcmV;i0#5x$Nk%w1VG{ro0Oo!GLo^Wo<|6*&A^P4Q;Ik3o=j~`!B>CJQ^3fZ|$HDj6 z9_YXohk983;vw+O8tus#c4a&C+#&157qqdXwXvjkXFap8q2T4~+NuuYxD&g%uB&|r z#>K$c+~25r2bGI&u!IU~S10t;9Q@)T*QE^F-r=~ls=d3i_SYTLs1SN;LfPHmUPu$` z#uwwc6V#v!_}d=v&Kl6K7Ua4VeOd?c&l>vOAFzlF;l3A;d>7Z++-Xh;wvi9>)E%&r z60w{bV@nChlnSSk8h%>`|K%e1;2~m12+NubjBpOfvK?$#CxKrH_t+hYY7E1q6;(wN zr7Gp$oBz48fxn^w%C>MhHwi5r1L}@y{F5p9{v53f{*bVn_(( zyA*(43D?`*^wk{0jtFX2B;vLbVMqw`(i@U}7v;tp&$k_HQwq$g6@_?JU`rQrBQ_!uDRLZxV@h=c0s#RiGbBST!?vAq26AVGf@@b!y&qfin+BHG}$c z^!Vl_pr1EU(hx%jfXWYM3ovYu=Z8)cDP#sT5OC)Sn*kzP5O^^}oF5%#?6g3j;6NTd z3RayV;Q?B#9Vr$(aKOdEg9QXglri#akSH`(2)GF2f&hjW9?vR0QR zg%q!?AQMl8A+$~Q_exN~Oxhkmc}m(DL?6EU=L+mw9!mwmo}m%i^bX}rFP4MW`cS4H zIa`<^%zW%xEkp`+!8ONYOrEn>H`|K$?o1mFuf z?D3#XWJ__<^eJuNS}$FuBEIop<&E>_S{fTKhM{;Gnord}xc_L#J2o5(hrRQ~64=5~ zYS12ST;Ust#qPNpQ+r)+QLk5ROb9l*S3Z97 zoJ^q;iI{vJlWCybY39_Wx0|o+lEI|mi_|=AU}=|pbTQ~-saFeYBrfbPBjfaT9UiIC z=jfv}?9r+IN=2;_4;SHiB4|A`5{JQOFRVPym6x7S;Ga#f&%<}|aO+T0m`lbWtGT2s zO+U5_H=}Vj7_M$7rHgD$U(;4@#DKH2@mPZr{d*4kPYpc028`?BcHO77!d4XqRG`(2 zv#W=4<(;d|+QMM{!cYO4fY71pa z+MBO$ksx2C?CZJLs)Ktu=o7`$k>Bt?|0xjqMkoNRP`x#8p8!ip;S?*H>e|X#F2*CP z{E`VQPp_L6F$WLYqi#Vh(2dZ>z6K`X<@Q1TF@f@G(MOvXKG+lp70;3?rnVkS( z+>uhYJN+3G#0Xs9j2G7F%T%#yF5Sd+S4@#H8T;1NwPD6bMMjCXts_jM5N4dQu&a&< zH%<DN0!I~^i7;V=x2$j>NVGU=4jPF`)L<$Wv3>uyVjwtH{7XAk literal 0 HcmV?d00001 diff --git a/system/forum/images/post_icons/icon13.gif b/system/forum/images/post_icons/icon13.gif new file mode 100644 index 0000000000000000000000000000000000000000..1d62373d3bf28aff40d8130f9d3790e13788e7ec GIT binary patch literal 1104 zcmeH`e@{~f7)GC#+O@zKwLsgfv$qPQGccziK@sIr8Nb2^Srl=JrgRKDV6jeDWh3L> zHk7soL70Hr)hjC^8s&myndqit3r6Fz2&}6~w{_Z0G|>=eG(_XO@fG&>o)2)6bCRc| zta$CZS~b*o+6x+6z9}b}&gf{AA<;m?8ansd10FF4=yTABfsQUYA3Q>%%c(DJSQpN;%>XLdF;eRFzddWMG6s6Xz`y?K87Mmm-9YxFNi<;u%niL*9D z_TlaTb7C9Dg8iSY!$k||MAEY(5VxSK7<5|0vzXa~2`e7Aqpu9ly3xdHBOfEsq+aL% zR{%OD4~4?kRp={6XAznTG{L=E8cJ!-N9dPZ_gnDIXX^bmsb9NZJyVMq50Cj@wU;Nh z;c~m)&EjGsI*W0zK5e)L-Vfdmx8fm>3p?<_j{}WWmJ;=@O?nzLKIp*TZo~uw^-7Oc zBJv>yKGM>lx?w{KeW4`3^05aLNO;i?M=p+4qo)E-y!g2RT{caq0f!s4Kkf$|mfGJk zII2^9<)GlwK>MEI&G5aadH+q&Q0iO@cCG>W71lTK{1EEPRZkCqjwi(KKf?d}uLXmR==RX#gDZk}Sa1r~c5Q#9ps znew=WDl6-KWqo?bJ#IiqkhjO1Y%pE%OC2UjZPY3FO7bg2iIB+|)qC}`mY`E`XG!IN zXyOEkbY+J3%UY%<)0UVM_GNH=a(S{UZ>iVE>T_$7!|_*&xm+kjE|!@X$Jbr2`!gYW zy;^L3?k`(m?+8dg)$PitiY5gL+GOU}rDjgDB>o4P$I3#nwqB}J)fhc4r7oCbUURM7 ztxR$=bMF*J6&WvOrQ1d=*PLm}tWuU;aaF;m7ggN+V~&+6RY{w(3z?y-%T(#|ss2%Z mGR;t#qH2EBHtE)_PPCTpzWrTWktW}6j@LHTF@+Kd*8c--e@C_e literal 0 HcmV?d00001 diff --git a/system/forum/images/post_icons/icon14.gif b/system/forum/images/post_icons/icon14.gif new file mode 100644 index 0000000000000000000000000000000000000000..e0424ed9353f5c6a45de7559aa21fa9ea9b46e8b GIT binary patch literal 1104 zcmZ?wbhEHb6lM@+_};_daOFRPbLfNT?**4$G(Gd(?CcMj_+q2{#;qr>*j@T3v*C_k z(L~M)IRi9dDl~g?T?I3ezCdyk73eY(Un(?j(uYAPrGve1w&9)%EW~{aiuC# zx9T2wf9c+Hu>~i1=AF2B_u2HV2MterwmbiG^NGtQr@xsLG;z#1VNu+=bpNTTn-477 zb7Jn!qcgT1y8HAkL*Yb*_H_(}la#hS;ttLbTXl_j`eBPRKNw1;$t9LBOxP*5_>53a zt3b&FhK8l;bM{Wzv|oJnbRi{)nOodr{yc;GmWVACxmomDB%Wb;LkW_1T z<-bqkMBB69<&w&H6Ux;W9MU@Yh9SH_b^3OOxC*J-nG$PmFibfh(=?xV@~$VZJ~4~} z+Ju1OPZmZ7h8_kTknx~A!NBpKL6TF(W5a@jjpAV`76}g=+C;_qjD#8(j&{3xcf6R< z#LmjZ$QrxFzwz8?%PsR_=IuJoyy YazpV56SJ|z1_usVkCX?FjEoG{04#PzYXATM literal 0 HcmV?d00001 diff --git a/system/forum/images/post_icons/icon2.gif b/system/forum/images/post_icons/icon2.gif new file mode 100644 index 0000000000000000000000000000000000000000..8881e76b8012c46fda616b1eec66098916cafcc4 GIT binary patch literal 676 zcmZ?wbhEHb6lM@+c$Uxb|C!RiCyKxB$rr?nJlHJw@cG-HcjP}^l+FlMaW)Y+e*ECy zM~dHX%Dp%sT9#_vUKR27q{N4_Qm>DS@7=xW`cj^)8<$*Jz&*7)|MfBPZ`WlX?-agy z_rdoYva4%3{yb7VcJ#o%r%IdGFT8c{;fgBu4J};d>9)IfuKRLDX3NIKRas71;p%Z7 z!Z+^R-?4So;~m03Zp+ew+jsNhM3Ox@KAxA} zJ4>iJgZIg+PYfgi#h)yU3=H`UIv{k8YHRDrZ34ZWM-+mpjp@^mPw9ryPToAka4zrbEbO|6C=a1V~kAf zyb*jlO}5cI+{{<6F=xpLu*4`fWjL@Macp8xVA2sNU}9$E_T01g zV__Rl8#9j(hrxk_t0G*=bBAFbKiDkz_mSem=WjnbuCAEy6xkg!mp2s@7TKP$^!1ayEpCL zx$f2~zRl|w{<u?`OPXS-DCr6S8$HB#- zZIxlCXYrg^DDY^T(1&wUm*#U{zjf!|Q>E65&?I+`HC+PNZ{Kas;Qe@Bx-p*f>O$@- zTgA_;65X_R-j}N~C#G<1m?U&^CeM>yA{#n*aw62<9Fs_J<4Eupe|=JN)4KUjk4fbO zb0vCkY@5jc`I7X<^HNWDiyU4edSSg-LmX#k7SG;ULK{1I{y$ZEa#*r1nmyBxGb>Ex z$*WHcWC6vWEQ|~cxePiW-Jm#OVE@;U+tl3B+SV+oEyl~iE2b^kp3BB1;t`k}>FZ`9 z!o}9AFKlG3B*ZDC#4Z?TrLmw{D<+y*o^iXpo~)pOrD(Hzs1GwE!?9zG%$N~zT>C&wjNf_(%d;yHhxNRXk>6^5|Oy@kfl*1YsXf>L&uJH zGIKvtjo9$2y^Z%=(%Qz43{1@`JPI}n3m&>njBj=+wRAq$-Iagv^!4Qx0@rWf-8)ODr+{x`C(oHxqT43&*G03pR)l8yalSbw z@o1aSrgihbT$MRJi|243M^>21$MaH~*3NrEC#G=KCvjh0$o=7*)c>bS5BG^T#Bt_CsGpq4^W}<6 zV?5`RSDzS22Z}#g7#SGy7<52dL2<&s{-+_Yskx=KtyxP=goBMkL`|zbkCj_KCdl8# zEGb2vo3+(IC^1k;mt9whm(M&-b3wCmNCdM4({>5{96rNP(PpEpU}h$UW5<}7d3jtp z^qOo<_&FIEuU)++CBTv^*W?+_&ct~9_+vp~NvX_=KfVRKqHxGPL7Tn~7xI e6v@L(r`r4{S+oQs9B5)>RkZMks@4!-um%9q?+6_L literal 0 HcmV?d00001 diff --git a/system/forum/images/post_icons/icon5.gif b/system/forum/images/post_icons/icon5.gif new file mode 100644 index 0000000000000000000000000000000000000000..2067f5b820c8b5f51692e3a564c380f63baffc32 GIT binary patch literal 672 zcmZ?wbhEHb6lM@+c$UlX|Cy4riNL=niVvT^eXv>Z*FE{4cjW&*Qp^ZdIez@$r;E~M zsn+dP5#Mjhy*?`b_N2szvr;b(h(6vad}RUm^`$&hyYp||d$@W1!Y@~3%F}K4?%tFY zuD)gC;y;fRZ{B^dp@nNj75nO1j&IjxZ``?GmF0Bo=z;%C3|luYdAvjT)+)X@58)kK zSMA=p?)5S8AGhUx-Iagv^!4Qx0$;AmBzTMOoh6hL%vGPneP)&DvB_L(x&)r=5^1dn zy}FQlLkG|4Sv-gPINB=1YNOcS9FyqG;<+@RyDpmj^-0N1>*gO`BKqX8WnyZE9|5ZEF_O5#{FK7S$1J&t>LR@%7JiGq*HT z;bd+#P*2ZL(qq$8;^GU6(q7OkWtzw;%d}lqUxLptRJGYJJcX5sfsv8n7$cXUEw^%$ zdoVBiv6I)?8TnZv#G4#E*p8k&ag2#gKtrCViNljM`TA2vFa1=jFzF_(fJfK=Kffe6 z^P(Qt*7_UMat<$Cf0j=wremVD*aC*lB8oS*el&9F=wV`K3E*j1$l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u%C6)cqPw73JlUODlWDuAj)s!Hhg7q5Y7R3K!?9yb%Im&SD1``XftUPBEM<#RVjcZpub e6jWxJB{W~9^27v&gDfnZMimo|d<#%uum%9_Neu}A literal 0 HcmV?d00001 diff --git a/system/forum/images/post_icons/icon8.gif b/system/forum/images/post_icons/icon8.gif new file mode 100644 index 0000000000000000000000000000000000000000..b66c9f1026b04bff0b080da69a61217a2d8b5af3 GIT binary patch literal 677 zcmZ?wbhEHb6lM@+c$Uqe>?|%Wpi}tQ?n8tSZ>FaH$_b)rJ)_pdIW;t8PT8^39=NZ&-C>OGdCa^Z$=a$}##Z~^`ULo(L%#O2}kJBB#VMc7E}g=D;m(~I z+vm1E640+>FT2RAlcQ9Ah1YpDQ`{CFkHyUXOSn81F^6{ri^j7(dG(2b0-*Slg^__F zn?VO;1}IJ#*#9?VH#N7kwlymlYjd%2X&WoFXS4FlTBO@2JDHfu^0T%YO2mYzO7lsp zdWbmc=`U#3iVk4*W!S!5Q$#AlsM*uSi&>O`iRtKZVQvF1r6zMb6`m8vj~(Y_@zHI{ zOyv_ex?}rsc1}5tCbmRoTgFE_92DI%)SJZE?=$}T%_!jdG-%zD)k?nd4YdpsE(gq( z-kYTpRmNldV%;HzR1Lia(T`bsTJ)JE8oHSh9Jn}Hd;)H6Th=WhEu`k6@iIZJRZ+*n zq&wB+a1$H5lT5~j1_o|*s~TRRr%Y^(EdD|Q4v9_8v%*_7YEL{oct*%byrSlZisoSs U7B(FT2Lq+%CEMGXm>3zX0S&mQfjn_xTzul1iaa-=eX2D&7LI zwhLWZDG=`^cI)25$2)|t%;!#Y=Xifc^7S$CEgKf?-np)`Hl{Mu@#fu!JGZZ%+?i96 zZg+p9;P;zyDL$N2I&+geId0s!pX|x;{f6wb<5FvT1dc8jy|t3>?MaE+SdRKc?sd&v z5B5uZI48BDioG<|YWqa~LrX+&t>Qb<&(W05yL*P<#txqAOL^*J*mrhuuB_&`vVeO} zAJ^Lx5^s)6R7bFH?BtnO!m+55>+w$E>q~hLE)+R3iK{%#X44d*jvU?>2Sl$fJ&6WYnj%5aQN4KANA|h|C*2HVWo&I$D@$G4GiM&m+B99oK{N;Qe zZMBB^a+5MGMYMC7&;lcdm*Y=K}N9vjp1fs0~)0Y3}Ggw3>NOD zPR8zTCZVpL9v0)Ki9Jl584R "Welcome to admincp of DLE Forum", +'m_stats' => "Main forum stats", +'m_new_cat' => "Category", +'m_new_cat2' => "Create new category", +'m_new_forum' => "Forum", +'m_new_forum2' => "New forum title", +'m_content' => "Management", +'m_content2' => "Editing, list category and forums", +'m_rank' => "Rank", +'m_rank2' => "Create and edit users rank", +'m_tools' => "Settings", +'m_tools2' => "Settings of main forum function", +'m_discuss' => "Discuss", +'m_discuss2' => "Settings of button - Discuss on forum", +'m_email' => "System Messages", +'m_email2' => "Manage system messages.", +'m_service' => "Service", +'m_service2' => "Forum servise tools", +'m_usergroup' => "User group settings", +'m_usergroup2' => "Manage user group", +'m_help' => "Help", +'m_help2' => "Forum Help", + +'forum_version' => "Version DLE Forum:", +'licence_info' => "Licence type:", +'forum_status' => "Forum_status:", +'forum_topic' => "Forum topics:", +'forum_posts' => "Forum Posts:", +'forum_online' => "Online", +'forum_offline' => "Offline", +'forum_db_size' => "Database size:", +'forum_files' => "Files size:", +'forum_cache' => "Cache size:", +'clear_cache' => "Clear cache", +'check_updates' => "Check for updates", +'msg_updates' => "check updates", +'no_update' => "Cannot connect to the server. Try again later.", + +'cat_new' => "Create Category", +'cat_edit' => "Edit Category", +'cat_name' => "Category title", +'cat_ok_add1' => "Category was created", +'cat_ok_add2' => "Category was successfully created!", +'cat_ok_edit1' => "Category was edited", +'cat_ok_edit2' => "Category was successfully edited!", +'cat_err_name' => "Enter category title!", +'cat_button' => "Create category", + + +'forum_new' => "Create new forum", +'forum_mset' => "Main settings", +'forum_name' => "Forum title", +'forum_descr' => "Forum description", +'forum_cat' => "Category", +'forum_for' => "Subforum ?", +'password' => "Password", +'forum_icon' => "Forum Icon", +'forum_icon_hint' => "Icon prefix.
    f_new_X.gif
    f_nonew_X.gif
    fc_new_X.gif
    fc_nonew_X.gif
    where X prefix.", +'forum_rules' => "Rules", +'forum_rules1' => "Title", +'forum_rules2' => "Text", +'forum_access' => "Access settings", +'forum_ok_add1' => "Forum was created", +'forum_ok_add2' => "Forum was successfully created!", +'forum_err_name' => "Enter forum title", +'forum_button' => "Create forum", + +'forum_edit' => "Edit forum", +'forum_ok_edit1' => "Forum was edited", +'forum_ok_edit2' => "Forum was successfully edited!", + +'java_add_forum' => "Add forum", +'java_sort' => "Sort", +'java_sort_f' => "Sort forums", +'java_edit' => "Edit", +'java_ssort' => "Subforums", +'java_access' => "Access", +'java_moderator' => "Add moderator", +'java_del' => "Delete", + +'access_for_f' => "New access for all forums of this category", + +'access_forum_group' => "Group", +'access_forum_mod' => "Moderation", +'access_forum_topic' => "Topic creation", +'access_forum_write' => "Topic write", +'access_forum_read' => "Topic read", +'access_forum_upload' => "Upload files", +'access_forum_download' => "Download files", + +'titles_main' => "Users rank", +'titles_name' => "User rank", +'titles_pots' => "Required messages", +'titles_pips' => "Stars", +'titles_action' => "Action", +'titles_add' => "Add rank", +'titles_nname' => "Rank title", +'titles_npost' => "Minimum messages", +'titles_npips' => "Total stars", +'titles_edit' => "Edit rank", +'titles_uadd' => "Add rank to user", +'titles_uname' => "User name", +'titles_urname' => "User Rank", +'titles_error_name' => "User with this name not found!", + +'button_add' => "Add", +'button_edit' => "Edit", +'button_save' => "Save", +'button_sort' => "Sort", +'error' => "Error", +'error_x' => "Full all Fields!", +'label_edit' => "edit", +'label_del' => "delete", +'db_prev' => "go back", + +'tools_menu' => "Forum settings", + +'tools_global' => "Forum global settings", +'tools_name' => "Forum Title:", +'tools_name_' => "Example: \"Forum DLE Files Group\"", +'tools_url' => "URL with folder of forum:", +'tools_url_' => "Example: http://forum.dle-files.ru", +'tools_mrewrite' => "Enable search engine friendly URLs?", + +'tools_wysiwyg' => "Enable WYSIWYG editor", +'tools_offline' => "Disable Forum", +'tools_offline_' => "Enable or disable access to your forum.", +'tools_timestamp' => "Time zone offset:", +'tools_timestamp2' => "help on this function", +'tools_sessions' => "register sessions?", +'tools_sessions_' => "It is necessary for modules «Online», «who view forum», «who read topic»...", +'tools_ses_time' => "Time without any action of user", +'tools_ses_time_' => "After this time user status will be set as offline? (in minutes)", +'tools_stats' => "Enable block with statistic of forum?", + +'tools_online' => "Show Online?", +'tools_online_' => "shows online users.", + +'tools_forum_bar' => "Enable Forumbar?", +'tools_forum_bar_' => "shows user's current location on the forum e.g. category, topic...", + +'tools_show' => "Topics and messages", +'tools_topics' => "Topics limit, in list of forum", +'tools_topics_' => "Default 25", +'tools_hot' => "Limit of messages in topic", +'tools_hot_' => "Default 30", +'tools_posts' => "Limit of messages, per topic page", +'tools_posts_' => "Default 20", + +'tools_mhide' => "Number of messages to view hiden text", +'tools_mhide_' => "To view text between tags [HIDE] [/HIDE].", + +'tools_abc_topic' => "Maximum title simbols", + +'tools_post_update' => "mix messages?", +'tools_post_update2' => "If author of last or new message is the same the new message will be mix with old message and shows like one post .", +'tools_last_plink' => "Link to last topic page", +'tools_last_plink_' => "shows link to last topic page in block last post.", +'tools_hide_forum' => "Hide forums?", +'tools_hide_forum_' => "Hide forums for for one or another group.", +'tools_topic_sort' => "Sort topics by date?", +'tools_topic_sort_' => "Topics will be sort by date of last post.", +'tools_topic_email' => "E-mail notification of new topic creation", + +'tools_pr_imp' => "Pinned Topics prefix", +'tools_pr_vote' => "Topics with vote prefix", +'tools_pr_modr' => "Topics without moderation prefix", +'tools_pr_sub_f' => "Subforum prefix", + + +'tools_safety' => "Safety settings", +'tools_complaint' => "Disable module «Report»?", +'tools_flood' => "Flood control", +'tools_flood_' => "Number of seconds user must wait before being able to post another message. +leave empty to disable.", +'tools_search_captcha' => "Enable security code for search", + +'tools_preventions' => "Warn system", +'tools_prevntn_on' => "Warn", +'tools_prevntn_on_' => "Enable warn system?", +'tools_prevntn_max' => "Maximum warns", +'tools_prevntn_max_' => "Maximun number of warn to block user.", +'tools_prevntn_group' => "Group with disable warn", + +'tools_prevntn_g_show' => "Moderators", +'tools_prevntn_g_show_' => "Usergroup with access to view users warn magazine.", +'tools_prevntn_show' => "Access to user to view warn?", +'tools_prevntn_show_' => "With module enable user cant view warn status.", +'tools_prevntn_show_all' => "Acces to users to view all users warn status?", +'tools_prevntn_show_all_' => "With module enable user cant view all users warn status .", +'tools_prevntn_show_gr' => "Show warn status in group with disable warn?", + +'tools_warn_day' => "Warn limit to one user", +'tools_warn_day2' => "number of warn by moderator in one day.", + +'tools_modules' => "Modules tools", +'tools_mod_icq' => "ICQ status", +'tools_mod_icq_' => "module shows ICQ icon.", +'tools_mod_rank' => "Rank", +'tools_mod_rank_' => "module shows user rank by number of messages.", +'tools_subscr' => "Subscrition", +'tools_subscr_' => "after answer in topic user will receive e-mail.", +'tools_reputation' => "Reputation", +'tools_reputation_' => "Enable users reputation.", +'tools_poll' => "Poll", +'tools_poll_' => "usergroup with access to poll in topics.", +'tools_ses_forum' => "Show who view forum?", + +'tools_ses_topic' => "Show who read topic?", + +'tools_discuss' => "Button 'Discuss in forum'", +'tools_disc_on' => "Enable module", +'tools_disc_on_' => "Enable module «Discuss in forum».", +'tools_disc_title' => "Topic title", +'tools_disc_title_' => "Topic title, what will be created by presing on the button.", +'tools_disc_opt_1' => "News title", +'tools_disc_opt_2' => "Title by template", +'tools_disc_t_tpl' => "Template title", +'tools_disc_t_tpl_' => "example: article: {post_title}", +'tools_disc_post' => "Topic Description", +'tools_disc_post_' => "Topic Description, what will be created by presing on the button.", +'tools_disc_opt_3' => "Short news", +'tools_disc_opt_4' => "Full news", +'tools_disc_opt_5' => "Template", +'tools_disc_p_tpl' => "Template of topic description", +'tools_disc_p_tpl_' => "example: [url={post_link}]{post_title}[/url]
    If field is fill,when wthat text will be main description.", + +'tools_speed' => "Speed tools", +'tools_t_as_p' => "Created topic as user message?", +'tools_t_as_p_' => "if yes, when if user create topic it will be count as message post in user status.", +'tools_sp_num' => "Count number of messages?", +'tools_sp_num_' => "if yes, example, with deleted user topic or message will be recount number of post in user status. if no,when user messages will be count in known time.", +'tools_sp_num_date' => "messages count days", +'tools_sp_num_date_' => "example: one every day.", +'tools_new_t_day' => "Time of active topic", +'tools_new_t_day_' => "After this time without any answer in topic the topic will be old. example: 5 days.", +'tools_sp_sublast' => "Refresh forum with answer in subforums?", +'tools_sp_sublast_' => "shows last post in forum with answer in subforum.", + +'tools_uploads' => "Upload files on server settings", +'tools_upload' => "Enable file uploads on server", +'tools_upload_' => "Usergroup with access to upload any file.", +'tools_upload_type' => "File types to upload", +'tools_upload_type_' => "Enter file types separated by comma.", +'tools_img_upl' => "allow to users upload images", + +'tools_img_max_size' => "Maximum image size", +'tools_img_max_size_' => "Enter maximum image size in kb", +'tools_thumb_size' => "Auto resize large images:", +'tools_thumb_size_' => "Auto resize large images on upload (in Pixels).", +'tools_jpeg_quality' => "JPEG image compression:", +'tools_jpeg_quality_' => "Compression is applied to all uploaded JPEG images.", +'tools_img_width' => "Auto resize linked images", +'tools_img_width_' => "Enter maximum image size for tag [img] [/img], to disable this function enter 0.", + +'tools_licence' => "Licence", +'tools_licence_key' => "Licence key", +'tools_licence_key_' => "Enter Licence key.", +'tools_copyright' => "CopyRight", +'tools_copyright2' => "Show CopyRight?", +'tools_licence_name' => "Show «Registered to...»", +'tools_licence_name_' => "Example: DLE Files Group 2008", + +'t_f_save' => "Settings are saved", +'t_f_save1' => "Settings are successfully saved", + +'mail_subscr' => "E-Mail messages settings, For sibscrition", +'mail_subscr_' => "{%username_to%} - Name
    {%username_from%} - From
    {%topic_name%} - Topic title
    {%topic_link%} - Topic link
    {%topic_link_del%} - Subscrition link", +'mail_frend' => "E-Mail messages settings, Send to friend", +'mail_frend_' => "{%username_to%} - Name
    {%username_from%} - From
    {%text%} - message text", +'mail_report' => "E-Mail messages settings, For reports", +'mail_report_' => "{%username_from%} - Name
    {%text%} - message text
    {%topic_link%} - topic link
    {%post_id%} - message ID
    ", +'mail_new_topic' => "E-Mail messages settings, New topic created", +'mail_new_topic_' => "{%username%} - Topic author
    {%date%} - date of creation
    {%title%} - tpic title
    {%link%} - topic link", + +'email_ok' => "Settings are saved", +'email_ok2' => "Settings are successfully saved!", + +'trial_info' => "Warring!
    You using not activated version of script with limits you must enter the licence key.
    Activation of script on http://dle-files.ru", +'trial_login' => "Login:", +'trial_key' => "Key:", +'trial_act' => "Activate", +'licence_trial' => "Free version", +'licence_full' => "Licence activated", +'trial_limit' => "This trial version of Dle Forum has expired.", + +'group_list' => "Usergroup list", +'group_name' => "Group Name", +'group_users' => "Users", +'group_sel1' => "Edit", +'group_sel2' => "Delete", +'group_sel3' => "Cannot delete", +'group_edit' => "Edit group:", + +'group_colour' => "Group color", +'group_colour_' => "Usergroup color. (example: #CC0000)", + +'group_offline' => "Allow to view offline forum", +'group_post_edit' => "Can edit own posts?", +'group_post_del' => "Can delete own posts?", +'group_topic_set' => "Can open/close own topics?", +'group_topic_edit' => "Can edit own topics?", +'group_topic_del' => "Can delete own topics?", +'group_vote' => "Can poll?", +'group_flood' => "Enable Flood-control to this group?", +'group_html' => "Allow HTML in messages?", +'group_filter' => "Enable to this group word filter?", +'group_moderation' => "Moderation settings", + +'group_edit_ok' => "Edit group", +'group_edit_ok2' => "Group was edited!", + +'mod_edit_topic' => "Can change topics title?", +'mod_del_topic' => "Can delete topics/polls?", +'mod_edit_post' => "Can edit messages?", +'mod_del_post' => "Can delete messages", +'mod_open_topic' => "Can open topics?", +'mod_close_topic' => "Can close topics?", +'mod_move_topic' => "Can move topics?", +'mod_fixed_topic' => "Can pin topics?", +'mod_defixed_topic' => "Can unpin topics?", +'mod_warn_users' => "Can use warn user?", +'mod_multi_moderation' => "Can use multi moderation?", + +'mod_search_user' => "User search", +'mod_search_name' => "Enter username:", +'mod_config_set' => "Moderation settings", + +'mod_add' => "Moderator was added", +'mod_add2' => "Moderator was successfully added!", +'mod_edit_ok' => "Moderator was changed", +'mod_edit_ok2' => "Moderator was successfully changed!", + +'button_search' => "Search", + +'discuss_name' => "Category settings", +'discuss_cat_id' => "Category ID", +'discuss_category' => "Category", +'discuss_forum_id' => "Forum ID", +'discuss_forum' => "Forum", +'discuss_config' => "Topic description settings", +'discuss_t_text' => "Description", + +'svce_full' => "(Leave empty if you want to clean all)", + +'yes' => "Yes", +'no' => "No", + +'button_start' => "Start", + +'activation_send' => "Sending ...", +'trial_act1' => "Cannot connect to the server. Try again later.", +'trial_act2' => "Entered data not correspond to necessary.", +'trial_act3' => "Thank you! Your script was activated", +'trial_act4' => "Server fault Try again later.", + +// add for 2.3 // + +'tools_abc_last' => "The maximum length of the title of the topic in the block Last Post", +'tools_abc_last1' => "The maximum permitted length of the title of the topic in the block Last Post", +'tools_topic_captcha' => "Security code for a new topic", +'tools_topic_captcha1' => "User groups to which you want to include security code (CAPTCHA). You can select more than one group.", +'tools_post_captcha' => "Security code for new posts", +'tools_post_captcha1' => "User groups to which you want to include security code (CAPTCHA). You can select more than one group.", +'rep_edit_group' => "Moderators reputation", +'rep_edit_group2' => "Groups of users who may log Moderate reputation. You can select more than one group.", +'tools_post_maxlen' => "The maximum number of characters in the message", +'tools_post_maxlen2' => "Specify the maximum number of characters that can polzvatel to use when writing messages in the forum", +'tools_auto_wrap' => "Automatic distribution of long words", +'tools_auto_wrap2' => "In case of exceeding a specified number of characters", + +); + +?> \ No newline at end of file diff --git a/system/forum/language/English/forum.lng b/system/forum/language/English/forum.lng new file mode 100644 index 0000000..4951a8a --- /dev/null +++ b/system/forum/language/English/forum.lng @@ -0,0 +1,117 @@ + "Forum message", +'f_404' => "Reference, is dead or deleted. go back", +'page_deny' => "Members, of group {user_group}, cannot view this page.", + +'all_info' => "Information", + +'values_error' => "All fields are required! go back", + +'subforums' => " - ", + +'forum_read' => "Members, of group {user_group}, cannot view this forum.", +'topic_read' => "Members, of group {user_group}, cannot view this topic.", +'topic_write' => "Members, of group {user_group}, cannot leave post on this forum.", +'forum_down' => "Members, of group {user_group}, cannot download files on this forum.", + +'is_topics' => "
    Not found. it is poseble that in this forum not exist any topic, or the topic are to old and was deleted.
    ", + +'search_nresult' => "The search did not return any results. search again?", +'search_error' => " You have entered less than 4 characters!. search again?", + +'topic_yes' => "With answers", +'topic_no' => "Without answers", +'topic_closed' => "Topic closed", +'last_post' => "Last. post:", + +'mtf_op' => "Option", +'mtf_01' => " - Open", +'mtf_02' => " - Close", +'mtf_03' => " - Delete", +'mtf_05' => " - Move", +'mtf_06' => " - Hide", +'mtf_07' => " - Publish", +'mtf_08' => " - Pin", +'mtf_09' => " - Unpin", + +'time_heute' => "Today", +'time_gestern' => "Yesterday", + +'fs_new' => "There are new messages", +'fs_nonew' => "There are not new messages", + +'fl_topic' => "
    Topic:", +'fl_author' => "
    Author:", +'fl_nopost' => "There are not messages", +'fl_c_forum' => "Closed forum", + +'err_mail' => "E-mail address is incorrect!.", +'err_name' => "You have entered the name of a registered user. If you are this user you must login first.", + +'topic_add_stop' => "Fill out all required fields! {stop} go back", +'topic_add_ndeny' => "Members, of group {user_group}, cannot open topics on this forum.", + +'app_warn' => "Warn", +'app_rep' => "Reputation", +'app_subscr' => "Subscrition", +'app_getnew' => "New Messages", +'app_newtopic' => "New Topic", +'app_reply' => "Reply", +'app_user_topic' => "User topics", +'app_post_edit' => "Edit message", +'app_search' => "Search", + +'search_result' => "Search result", + +'u_log_empty' => "
    User magazine is empty.
    ", + +'f_reply' => "Fast reply", + +'getnew_title' => "Messages sice you last visited", +'all_read_link' => "Read all", + +'subscr_not' => "
    you dont have Subscrition on any topic.
    ", + +'search_result' => "Search result", +'search_topic' => "The search did not return any results. go back", + +'report_send' => "report was successfully send. go back", + +'mail_send' => "mail was successfully send go back", + +'title_forward' => "Send mail to friend", + +'edit_info' => "Message was edited by", + +'err_name' => "
  • Check spelling entered name!
  • ", +'err_mail' => "
  • Check spelling entered e-mail!
  • ", + +'h_post' => "Message hiden", + +'flood_stop' => "Flood protection is active, write your message in {time} seconds. go back", + +'discuss_no_cat' => " choise forum for this category of news. go back", +'discuss_off' => "This function is turned of. to create forum login forum. go back", + +// add for 2.3 // + +'captcha_stop' => "Security code does not match the display! ", +'maxlen_stop' => "The length of the message exceeds the limit! ", +'ajax_stop_1' => "He was activated flood control!", +'ajax_stop_2' => "Security code does not match the display!", +'ajax_stop_3' => " !", +'ajax_stop_4' => "The length of the message exceeds the limit!", +'topic_last_p' => "By the last report:", +'last_visit' => "Since returning, the last time you were here", +'reg_name' => "
    Registered to ", + +); + +?> \ No newline at end of file diff --git a/system/forum/language/Russian/admin.lng b/system/forum/language/Russian/admin.lng new file mode 100644 index 0000000..aa2e9cb --- /dev/null +++ b/system/forum/language/Russian/admin.lng @@ -0,0 +1,413 @@ + " DLE Forum", +'m_stats' => " ", +'m_new_cat' => "", +'m_new_cat2' => " ", +'m_new_forum' => "", +'m_new_forum2' => " ", +'m_content' => "", +'m_content2' => ", ", +'m_rank' => "", +'m_rank2' => " ", +'m_tools' => "", +'m_tools2' => " ", +'m_discuss' => "", +'m_discuss2' => " - ", +'m_email' => " E-Mail ", +'m_email2' => " E-Mail , .", +'m_service' => "", +'m_service2' => " ", +'m_usergroup' => " ", +'m_usergroup2' => " , ", +'m_help' => "", +'m_help2' => " ", + +'forum_version' => " DLE Forum:", +'licence_info' => " :", +'forum_status' => " :", +'forum_topic' => " :", +'forum_posts' => " :", +'forum_online' => "", +'forum_offline' => "", +'forum_db_size' => " :", +'forum_files' => " :", +'forum_cache' => " :", +'clear_cache' => " ", +'check_updates' => " ", +'msg_updates' => " ", +'no_update' => " .", + +'cat_new' => " ", +'cat_edit' => " ", +'cat_name' => " ", +'cat_ok_add1' => " ", +'cat_ok_add2' => " !", +'cat_ok_edit1' => " ", +'cat_ok_edit2' => " !", +'cat_err_name' => " !", +'cat_button' => " ", + + +'forum_new' => " ", +'forum_mset' => " ", +'forum_name' => " ", +'forum_descr' => " ", +'forum_cat' => "", +'forum_for' => " ?", +'password' => "", +'forum_icon' => " ", +'forum_icon_hint' => " .
    f_new_X.gif
    f_nonew_X.gif
    fc_new_X.gif
    fc_nonew_X.gif
    X .", +'forum_rules' => "", +'forum_rules1' => "", +'forum_rules2' => "", +'forum_access' => " ", +'forum_ok_add1' => " ", +'forum_ok_add2' => " !", +'forum_err_name' => " !", +'forum_button' => " ", + +'forum_edit' => " ", +'forum_ok_edit1' => " ", +'forum_ok_edit2' => " !", + +'java_add_forum' => " ", +'java_sort' => "", +'java_sort_f' => " ", +'java_edit' => "", +'java_ssort' => "", +'java_access' => " ", +'java_moderator' => " ", +'java_del' => "", + +'access_for_f' => " ", + +'access_forum_group' => "", +'access_forum_mod' => "", +'access_forum_topic' => " ", +'access_forum_write' => " ", +'access_forum_read' => " ", +'access_forum_upload' => " ", +'access_forum_download' => " ", + +'titles_main' => " ", +'titles_name' => " ", +'titles_pots' => " ", +'titles_pips' => "", +'titles_action' => "", +'titles_add' => " ", +'titles_nname' => " ", +'titles_npost' => " ", +'titles_npips' => " ", +'titles_edit' => " ", +'titles_uadd' => " ", +'titles_uname' => " ", +'titles_urname' => " ", +'titles_error_name' => " !", + +'button_add' => "", +'button_edit' => "", +'button_save' => "", +'button_sort' => "", +'error' => "", +'error_x' => " !", +'label_edit' => "", +'label_del' => "", +'db_prev' => " ", + +'tools_menu' => " ", + +'tools_global' => " ", +'tools_name' => " :", +'tools_name_' => ": \" DLE Files Group\"", +'tools_url' => "URL :", +'tools_url_' => ": http://forum.dle-files.ru ( )", +'tools_mrewrite' => " ?", +'tools_mrewrite_' => " '', http://yourdomain.com/forum/topic_1", +'tools_wysiwyg' => " WYSIWYG ", +'tools_wysiwyg2' => " WYSIWYG , BBCODES", +'tools_offline' => " ", +'tools_offline_' => " offline, .", +'tools_timestamp' => " :", +'tools_timestamp2' => " ", +'tools_sessions' => " ?", +'tools_sessions_' => " 1-2 . «Online», « », « »...", +'tools_ses_time' => " ", +'tools_ses_time_' => " offline? ( )", +'tools_stats' => " ?", +'tools_stats_' => " .", + +'tools_online' => " Online?", +'tools_online_' => " .", + +'tools_forum_bar' => " ?", +'tools_forum_bar_' => " , ", + +'tools_show' => " ", +'tools_topics' => " , ", +'tools_topics_' => " 25", +'tools_hot' => " , ?", +'tools_hot_' => " 30", +'tools_posts' => " , ", +'tools_posts_' => " 20", + +'tools_mhide' => "- ", +'tools_mhide_' => " [HIDE] [/HIDE].", + +'tools_abc_topic' => " ", +'tools_abc_topic_' => " .", +'tools_post_update' => " ?", +'tools_post_update2' => " , .", +'tools_last_plink' => " ", +'tools_last_plink_' => " .", +'tools_hide_forum' => " ?", +'tools_hide_forum_' => " .", +'tools_topic_sort' => " ?", +'tools_topic_sort_' => " .", +'tools_topic_email' => " E-Mail ", +'tools_topic_email_' => " '', , E-Mail .", + +'tools_pr_imp' => " ", +'tools_pr_imp_' => ", . .", +'tools_pr_vote' => " ", +'tools_pr_vote_' => ", . , , .", +'tools_pr_modr' => " ", +'tools_pr_modr_' => ", . , , .", +'tools_pr_sub_f' => " ", +'tools_pr_sub_f_' => ", .", + +'tools_safety' => " ", +'tools_complaint' => " «»?", +'tools_complaint_' => " .", +'tools_flood' => "- ", +'tools_flood_' => ", . + -.", +'tools_search_captcha' => " ", +'tools_search_captcha_' => " (CAPTCHA). .", + +'tools_preventions' => " ", +'tools_prevntn_on' => "", +'tools_prevntn_on_' => " ?", +'tools_prevntn_max' => " ", +'tools_prevntn_max_' => " .", +'tools_prevntn_group' => " ", +'tools_prevntn_group_' => " , . + .", +'tools_prevntn_g_show' => "", +'tools_prevntn_g_show_' => " , . .", +'tools_prevntn_show' => " ?", +'tools_prevntn_show_' => " , .", +'tools_prevntn_show_all' => " ?", +'tools_prevntn_show_all_' => " , .", +'tools_prevntn_show_gr' => " ?", +'tools_prevntn_show_gr_' => " , .", +'tools_warn_day' => " ", +'tools_warn_day2' => " ?", + +'tools_modules' => " ", +'tools_mod_icq' => " ICQ", +'tools_mod_icq_' => " - ICQ.", +'tools_mod_rank' => " Rank", +'tools_mod_rank_' => " , - .", +'tools_subscr' => " ", +'tools_subscr_' => " , e-mail.", +'tools_reputation' => "", +'tools_reputation_' => " .", +'tools_poll' => "", +'tools_poll_' => " , . .", +'tools_ses_forum' => ", ?", +'tools_ses_forum_' => " 1 .", +'tools_ses_topic' => ", ?", +'tools_ses_topic_' => " 1 .", + +'tools_discuss' => " ' '", +'tools_disc_on' => " ", +'tools_disc_on_' => " « ».", +'tools_disc_title' => " ", +'tools_disc_title_' => " , .", +'tools_disc_opt_1' => " ", +'tools_disc_opt_2' => " ", +'tools_disc_t_tpl' => " ", +'tools_disc_t_tpl_' => ": : {post_title}", +'tools_disc_post' => " ", +'tools_disc_post_' => " , .", +'tools_disc_opt_3' => " ", +'tools_disc_opt_4' => " ", +'tools_disc_opt_5' => "", +'tools_disc_p_tpl' => " ", +'tools_disc_p_tpl_' => ": [url={post_link}]{post_title}[/url]
    , .", + +'tools_speed' => " ", +'tools_t_as_p' => " ?", +'tools_t_as_p_' => " , , .", +'tools_sp_num' => " - ?", +'tools_sp_num_' => " , , - . , - .", +'tools_sp_num_date' => " ", +'tools_sp_num_date_' => " - . : .", +'tools_new_t_day' => " ", +'tools_new_t_day_' => " , . : 5 .", +'tools_sp_sublast' => " ?", +'tools_sp_sublast_' => " , .", + +'tools_uploads' => " ", +'tools_upload' => " ", +'tools_upload_' => " , , .", +'tools_upload_type' => " , ", +'tools_upload_type_' => " , .", +'tools_img_upl' => " ", +'tools_img_upl_' => " .", +'tools_img_max_size' => " ", +'tools_img_max_size_' => " ( )", +'tools_thumb_size' => " :", +'tools_thumb_size_' => " .", +'tools_jpeg_quality' => " .jpg :", +'tools_jpeg_quality_' => " JPEG .", +'tools_img_width' => " ", +'tools_img_width_' => " [img] [/img], , . 0.", + +'tools_licence' => "", +'tools_licence_key' => " ", +'tools_licence_key_' => " .", +'tools_copyright' => "CopyRight", +'tools_copyright2' => " CopyRight?", +'tools_licence_name' => " « ...»", +'tools_licence_name_' => ": DLE Files Group 2008", + +'t_f_save' => " ", +'t_f_save1' => " ", + +'mail_subscr' => " E-Mail , ", +'mail_subscr_' => "{%username_to%} -
    {%username_from%} -
    {%topic_name%} -
    {%topic_link%} -
    {%topic_link_del%} - ", +'mail_frend' => " E-Mail , ", +'mail_frend_' => "{%username_to%} -
    {%username_from%} -
    {%text%} - ", +'mail_report' => " E-Mail , ", +'mail_report_' => "{%username_from%} -
    {%text%} -
    {%topic_link%} -
    {%post_id%} - ID
    ", +'mail_new_topic' => " E-Mail , ", +'mail_new_topic_' => "{%username%} -
    {%date%} -
    {%title%} -
    {%link%} - ", + +'email_ok' => " ", +'email_ok2' => " !", + +'trial_info' => "!
    , .
    http://dle-files.ru", +'trial_login' => ":", +'trial_key' => ":", +'trial_act' => "", +'licence_trial' => " ", +'licence_full' => " ", +'trial_limit' => " . .", + +'group_list' => " ", +'group_name' => " ", +'group_users' => "", +'group_sel1' => "", +'group_sel2' => "", +'group_sel3' => " ", +'group_edit' => " :", + +'group_colour' => " ", +'group_colour_' => " . (: #CC0000)", + +'group_offline' => " ?", +'group_post_edit' => " ?", +'group_post_del' => " ?", +'group_topic_set' => " / ?", +'group_topic_edit' => " ?", +'group_topic_del' => " ?", +'group_vote' => " ( )?", +'group_flood' => " -?", +'group_html' => " HTML ?", +'group_filter' => " ?", +'group_moderation' => " ", + +'group_edit_ok' => " ", +'group_edit_ok2' => " !", + +'mod_edit_topic' => " ?", +'mod_del_topic' => " /?", +'mod_edit_post' => " ?", +'mod_del_post' => " ?", +'mod_open_topic' => " ?", +'mod_close_topic' => " ?", +'mod_move_topic' => " ?", +'mod_fixed_topic' => " ?", +'mod_defixed_topic' => " ?", +'mod_warn_users' => " ?", +'mod_multi_moderation' => " -?", + +'mod_search_user' => " ", +'mod_search_name' => " :", +'mod_config_set' => " ", + +'mod_add' => " ", +'mod_add2' => " !", +'mod_edit_ok' => " ", +'mod_edit_ok2' => " !", + +'button_search' => "", + +'discuss_name' => " ", +'discuss_cat_id' => "ID ", +'discuss_category' => "", +'discuss_forum_id' => "ID ", +'discuss_forum' => "", +'discuss_config' => " ", +'discuss_t_text' => "", + +'svce_full' => "( , )", + +'yes' => "", +'no' => "", + +'button_start' => "", + +'activation_send' => " ...", +'trial_act1' => " .", +'trial_act2' => " .", +'trial_act3' => " !", +'trial_act4' => " . .", + +// add for 2.3 // + +'tools_abc_last' => " ", +'tools_abc_last1' => " ", +'tools_topic_captcha' => " ", +'tools_topic_captcha1' => " (CAPTCHA). .", +'tools_post_captcha' => " ", +'tools_post_captcha1' => " (CAPTCHA). .", +'rep_edit_group' => " ", +'rep_edit_group2' => " . .", +'tools_post_maxlen' => " ", +'tools_post_maxlen2' => " , ", +'tools_auto_wrap' => " ", +'tools_auto_wrap2' => " ", + +// add for 2.4 // +'forum_posts_conf' => " ", +'forum_postcount' => " ?", +'forum_fixpost' => " ?", +'meta_description' => " (Description) :", +'meta_description2' => " , 200 ", +'meta_keywords' => " (Keywords) :", +'meta_keywords2' => " ", +'meta_topic' => " :", +'meta_topic2' => " ", +'check_updates' => " ", +'check_updates_start' => " ...", + +// add for 2.5 // +'group_youtube' => " youtub?", +'group_youtube2' => " youtube.com rutube.ru.", +'group_flash' => " flash?", +'group_flash2' => " swf.", +'mod_combining_post' => " ?", +'mod_move_post' => " ?", +'forum_banner' => " ", +'forum_banner2' => " ", +'tools_bot_agent' => " ?", +'tools_bot_agent2' => " .", +'forum_q_reply' => " ?", +'forum_i_edit' => " ?", +); + +?> \ No newline at end of file diff --git a/system/forum/language/Russian/forum.lng b/system/forum/language/Russian/forum.lng new file mode 100644 index 0000000..ab5ce49 --- /dev/null +++ b/system/forum/language/Russian/forum.lng @@ -0,0 +1,123 @@ + " ", +'f_404' => ", . ", +'page_deny' => ", {user_group}, .", + +'all_info' => "", + +'values_error' => " ! ", + +'subforums' => " - ", + +'forum_read' => ", {user_group}, .", +'topic_read' => ", {user_group}, .", +'topic_write' => ", {user_group}, .", +'forum_down' => ", {user_group}, .", + +'is_topics' => "
    . , .
    ", + +'search_nresult' => " , .
    , . ?", +'search_error' => " 4 , . ?", + +'topic_yes' => " ", +'topic_no' => " ", +'topic_closed' => " ", +'last_post' => ". :", + +'mtf_op' => "", +'mtf_01' => " - ", +'mtf_02' => " - ", +'mtf_03' => " - ", +'mtf_05' => " - ", +'mtf_06' => " - ", +'mtf_07' => " - ", +'mtf_08' => " - ", +'mtf_09' => " - ", + +'time_heute' => "", +'time_gestern' => "", + +'fs_new' => " ", +'fs_nonew' => " ", + +'fl_topic' => "
    :", +'fl_author' => "
    :", +'fl_nopost' => " ", +'fl_c_forum' => " ", + +'err_mail' => " E-Mail .", +'err_name' => " . , .", + +'topic_add_stop' => " ! {stop} ", +'topic_add_ndeny' => ", {user_group}, .", + +'app_warn' => "", +'app_rep' => "", +'app_subscr' => " ", +'app_getnew' => " ", +'app_newtopic' => " ", +'app_reply' => "", +'app_user_topic' => " ", +'app_post_edit' => " ", +'app_search' => "", + +'search_result' => " ", + +'u_log_empty' => "
    .
    ", + +'f_reply' => " ", + +'getnew_title' => " ", +'all_read_link' => "", + +'subscr_not' => "
    .
    ", + +'search_result' => " ", +'search_topic' => " , . ", + +'report_send' => " . ", + +'mail_send' => " ", + +'title_forward' => " ", + +'edit_info' => " ", + +'err_name' => "
  • !
  • ", +'err_mail' => "
  • e-mail!
  • ", + +'h_post' => " ", + +'flood_stop' => " -, {time} . ", + +'discuss_no_cat' => " . ", +'discuss_off' => " . . ", + +// add for 2.3 // + +'captcha_stop' => " ! ", +'maxlen_stop' => " ! ", +'ajax_stop_1' => " -!", +'ajax_stop_2' => " !", +'ajax_stop_3' => " !", +'ajax_stop_4' => " !", +'topic_last_p' => " :", +'last_visit' => " , :", +'reg_name' => "
    ", + +// add for 2.4 // + +'moderators' => ":", +'spoiler_title' => " / ", +'i_quote' => ":", + +); + +?> \ No newline at end of file diff --git a/system/forum/main.php b/system/forum/main.php new file mode 100644 index 0000000..c488a20 --- /dev/null +++ b/system/forum/main.php @@ -0,0 +1,197 @@ +:]]'"; + }else{ + $access_hide = ""; + } + + $result_content = $db->query("SELECT * FROM " . PREFIX . "_forum_category LEFT JOIN ". PREFIX ."_forum_forums ON ". PREFIX ."_forum_category.sid= ". PREFIX ."_forum_forums.main_id WHERE parentid = '0' {$access_hide} ORDER BY posi, position"); + + for ($i = 0; $row = $db->get_row($result_content); $i = $row['sid']) + { + if ($row['name']) + { + if (!$fcache->open('sub-'.$row['id'])) + { + if ($sub_forums_array != 'empty') + { + foreach ($sub_forums_array as $value) + { + if ($row['id'] == $value['parentid']) + { + $symbol_count++; + + if ($symbol_count > 1) $symbol = ", "; + + $sub_forums .= link_forum($value['id'], $value['name'], $symbol); + } + } + } + + $fcache->save('sub-'.$row['id'], $sub_forums); + } + else { $sub_forums = $fcache->open('sub-'.$row['id']); } + + if (!$fcache->open('moder-'.$row['id'])) + { + foreach ($forum_moderators as $moderators) + { + if ($moderators['forum_id'] == $row['id'] and $moderators['member_name']) + { + $mod_count++; + + if ($mod_count > 1) $mod_symbol = ", "; + + $moderators_list .= $mod_symbol . link_user($moderators['member_name']); + } + } + + $fcache->save('moder-'.$row['id'], $moderators_list); + } + else { $moderators_list = $fcache->open('moder-'.$row['id']); } + + $forum_link = link_forum($row['id'], $row['name']); + + $tpl->load_template($tpl_dir.'forums.tpl'); + + $tpl->set('{forum_id_rss}', $forum_url."/rss/forum_".$row['id'].".xml"); + $tpl->set('{status}', forum_status ($row['f_last_date'], $row['password'], $row['icon'])); + $tpl->set('{name}', $forum_link); + $tpl->set('{description}', stripslashes($row['description'])); + + if ($sub_forums){$tpl->set('{forums}', '
    ' . $forum_config['forum_pr_sub'].' '.$sub_forums); + } else {$tpl->set('{forums}', '');} + if ($moderators_list){$tpl->set('{moderators}', '
    ' . $f_lang['moderators'] . ' ' . $moderators_list); + } else {$tpl->set('{moderators}', '');} + + $tpl->set('{topics}', $row['topics']); + $tpl->set('{post}', $row['posts']); + $tpl->set('{last}', forum_last ($row['f_last_tid'], $row['f_last_title'], $row['f_last_poster_name'], $row['f_last_date'], $row['password'], $row['id'], $row['access_read'], $row['last_post_id'])); + + $tpl->compile("forums_{$row['main_id']}"); + $tpl->clear(); + + unset ($sub_forums); + unset ($symbol_count); + unset ($symbol); + unset ($moderators_list); + unset ($mod_count); + unset ($mod_symbol); + } + + if ($row['sid'] != $start_id){ + $category_link = link_category($start_id, $start_name); + $tpl->load_template($tpl_dir.'category.tpl'); + $tpl->set('{category}', $category_link); + $tpl->set('{forums}', $tpl->result["forums_{$start_id}"]); + $tpl->compile('dle_forum'); + $tpl->clear(); + } + + $start_id = $row['sid']; + $start_name = stripslashes($row['cat_name']); + } + + $category_link = link_category($start_id, $start_name); + + $tpl->load_template($tpl_dir.'category.tpl'); + + $tpl->set('{category}', $category_link); + $tpl->set('{forums}', $tpl->result["forums_{$start_id}"]); + + $tpl->compile('dle_forum'); + $tpl->clear(); + + if ($forum_config['stats']){require_once SYSTEM_DIR.'/forum/sources/modules/stats.php';} + + break; + + case "category": require_once SYSTEM_DIR.'/forum/sources/category.php'; break; + case "forum": require_once SYSTEM_DIR.'/forum/sources/showforum.php'; break; + case "topic": require_once SYSTEM_DIR.'/forum/sources/showtopic.php'; break; + case "add_topic": require_once SYSTEM_DIR.'/forum/action/addtopic.php'; break; + case "getforum": require_once SYSTEM_DIR.'/forum/action/forum.php'; break; + case "getnew": require_once SYSTEM_DIR.'/forum/sources/modules/getnew.php'; break; + case "search": require_once SYSTEM_DIR.'/forum/sources/modules/search.php'; break; + case "subscription": require_once SYSTEM_DIR.'/forum/sources/modules/subscription.php'; break; + case "moderation": require_once SYSTEM_DIR.'/forum/action/moderation.php'; break; + case "post": require_once SYSTEM_DIR.'/forum/action/post.php'; break; + case "_topic": require_once SYSTEM_DIR.'/forum/action/topic.php'; break; + case "user_posts": require_once SYSTEM_DIR.'/forum/sources/shapeshifter/forum_posts.php'; break; + +// ******************************************************************************** +// ATTACHMENT +// ******************************************************************************** + case "attachment": + $file_id = intval($_REQUEST['id']); + if ($file_id) + { + $row = $db->super_query("SELECT * FROM " . PREFIX . "_forum_files WHERE file_id = '$file_id'"); + + if ($row['file_id']) + { + if (count($forums_array)) + { + $access_download = $forums_array[$row['forum_id']]['access_download']; + + if (check_access($access_download)) + { + if ($row['file_type'] == "file"){ + $FILE_DIR = "files"; + } else { + $FILE_DIR = "images"; + } + + $db->query("UPDATE " . PREFIX . "_forum_files SET dcount = dcount+1 WHERE file_id = '$file_id'"); + @header("Location: {$config['http_home_url']}uploads/forum/{$FILE_DIR}/{$row['onserver']}"); + } + else + { + $group_name = $user_group[$member_id['user_group']]['group_name']; + forum_msg($f_lang['f_msg'], $f_lang['forum_down'], 'user_group', $group_name); + } + } + } + else + { + @header("HTTP/1.0 404 Not Found"); + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + } + } + + else + { + @header("HTTP/1.0 404 Not Found"); + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + } + break; + } + + if ($forum_config['forum_bar']) + { + $forum_bar = "".$forum_config['forum_title'].""; + if ($bbr_cid and $bbr_name){$forum_bar .= " » ".link_category($bbr_cid, $bbr_name);} + if ($bbr_fname and $bbr_fid){$forum_bar .= " » ".link_forum($bbr_fid, $bbr_fname);} + if ($bbr_tname and $bbr_tid){$forum_bar .= " » ".link_topic($bbr_tid, $bbr_tname);} + if ($bbr_app){$forum_bar .= " » ".$bbr_app."";} + $forum_bar = stripslashes($forum_bar); + } + + if (!defined('FORUM_SUB_DOMAIN')){require_once SYSTEM_DIR . $compile_php;} + + if ($forum_config['meta_descr'] and !$meta_topic){$metatags['description'] = $forum_config['meta_descr'];} + if ($forum_config['meta_keywords'] and !$meta_topic){$metatags['keywords'] = $forum_config['meta_keywords'];} +?> \ No newline at end of file diff --git a/system/forum/sources/category.php b/system/forum/sources/category.php new file mode 100644 index 0000000..4942559 --- /dev/null +++ b/system/forum/sources/category.php @@ -0,0 +1,142 @@ +:]]'"; + } + else + { + $access_hide = ""; + } + + $category_name = stripslashes($cats_array[$cid]['cat_name']); + + if ($category_name) + { + $result = $db->query("SELECT * FROM ". PREFIX ."_forum_forums WHERE main_id = $cid and parentid = 0 {$access_hide} ORDER by position"); + + while ($row = $db->get_row($result)) + { + if (!$fcache->open('sub-'.$row['id'])) + { + if ($sub_forums_array != 'empty') + { + foreach ($sub_forums_array as $value) + { + if ($row['id'] == $value['parentid']) + { + $symbol_count++; + + if ($symbol_count > 1) $symbol = ", "; + + $sub_forums .= link_forum($value['id'], $value['name'], $symbol); + } + } + } + + $fcache->save('sub-'.$row['id'], $sub_forums); + } + else { $sub_forums = $fcache->open('sub-'.$row['id']); } + + if (!$fcache->open('moder-'.$row['id'])) + { + foreach ($forum_moderators as $moderators) + { + if ($moderators['forum_id'] == $row['id'] and $moderators['member_name']) + { + $mod_count++; + + if ($mod_count > 1) $mod_symbol = ", "; + + $moderators_list .= $mod_symbol . link_user($moderators['member_name']); + } + } + + $fcache->save('moder-'.$row['id'], $moderators_list); + } + else { $moderators_list = $fcache->open('moder-'.$row['id']); } + + $tpl->load_template($tpl_dir.'forums.tpl'); + + $tpl->set('{status}', forum_status ($row['f_last_date'], $row['password'], $row['icon'])); + + $tpl->set('{name}', link_forum($row['id'], $row['name'])); + + $tpl->set('{description}', stripslashes($row['description'])); + + if ($sub_forums) + { + $tpl->set('{forums}', '
    '.$forum_config['forum_pr_sub'].' '.$sub_forums); + } + else { $tpl->set('{forums}', ''); } + + if ($moderators_list) + { + $tpl->set('{moderators}', '
    ' . $f_lang['moderators'] . ' ' . $moderators_list); + } + else { $tpl->set('{moderators}', ''); } + + $tpl->set('{topics}', $row['topics']); + + $tpl->set('{post}', $row['posts']); + + $tpl->set('{forum_id_rss}', $forum_url."/rss/forum_".$row['id'].".xml"); + + $tpl->set('{last}', forum_last ($row['f_last_tid'], $row['f_last_title'], $row['f_last_poster_name'], $row['f_last_date'], $row['password'], $row['id'], $row['access_read'], $row['last_post_id'])); + + $tpl->compile('forums'); + + $tpl->clear(); + + unset ($sub_forums); + + unset ($symbol_count); + + unset ($symbol); + + unset ($moderators_list); + + unset ($mod_count); + + unset ($mod_symbol); + } + + $tpl->load_template($tpl_dir.'category.tpl'); + + $tpl->set('{category}', $category_name); + + $tpl->set('{forums}', $tpl->result['forums']); + + $tpl->compile('dle_forum'); + + $tpl->clear(); + + $metatags['title'] = $forum_config['forum_title'].' » '.$category_name; + + if ($forum_config['forum_bar']) + { + $bbr_cid = $cid; + $bbr_name = $category_name; + } + } + + else + { + @header("HTTP/1.0 404 Not Found"); + + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + } + } + + else + { + @header("HTTP/1.0 404 Not Found"); + + forum_msg($f_lang['f_msg'], $f_lang['f_404']); + } +?> \ No newline at end of file diff --git a/system/forum/sources/components/attachment.php b/system/forum/sources/components/attachment.php new file mode 100644 index 0000000..1343180 --- /dev/null +++ b/system/forum/sources/components/attachment.php @@ -0,0 +1,48 @@ +query("SELECT * FROM " . PREFIX . "_forum_files WHERE topic_id = '$tid' and file_attach = '1'"); + + while ($row = $db->get_row($get_attachment)) + { + if ($row['file_type'] == "image") + { + $img_full = $config['http_home_url'].'uploads/forum/images/'.$row['onserver']; + + $attachment = ""; + } + + elseif ($row['file_type'] == "thumb") + { + $img_full = $config['http_home_url'].'uploads/forum/images/'.$row['onserver']; + + $img_thumb = $config['http_home_url'].'uploads/forum/thumbs/'.$row['onserver']; + + $hs_expand = "onClick=\"return hs.expand(this)\""; + + $attachment = ""; + } + + else + { + $attachment_down = $a_forum_url."act=attachment&id=".$row['file_id']; + + $attachment = "{$row['file_name']} ({$row['dcount']} | ".mksize($row['file_size']).")"; + + //$onserver_url = "{$config['http_home_url']}uploads/forum/files/{$row['onserver']}"; + } + + if (!$ajax_edit_attach){ + $tpl->result['posts'] = str_replace('[attachment='.$row['file_id'].']', $attachment, $tpl->result['posts']); + //$tpl->result['posts'] = preg_replace("#\[attachment={$row['file_id']}:(.*)\]#i", $onserver_url, $tpl->result['posts']); + } + else{ + $post_text = str_replace('[attachment='.$row['file_id'].']', $attachment, $post_text); + //$post_text = preg_replace("#\[attachment={$row['file_id']}:(.*)\]#i", $onserver_url, $post_text); + } + } + +?> \ No newline at end of file diff --git a/system/forum/sources/components/bbcode.php b/system/forum/sources/components/bbcode.php new file mode 100644 index 0000000..b0e4c47 --- /dev/null +++ b/system/forum/sources/components/bbcode.php @@ -0,0 +1,179 @@ +"; + + $smilies = explode(",", $config['smilies']); + foreach($smilies as $smile) + { + $i++; $smile = trim($smile); + + $output .= "\"$smile\""; + + if ($i%3 == 0) $output .= ""; + + } + + $output .= ""; + + if ($ajax_post_id) + { + $ajax_post_id = '_'.$ajax_post_id; + + $addform = "document.forum_post_form".$ajax_post_id; + } + else + { + $addform = "document.getElementById( 'forum-post-form' )"; + } + + $startform = "post_text".$ajax_post_id; + + $add_id = false; + + if ($access_upload AND $forum_config['tools_upload'] OR $access_upload AND $forum_config['img_upload']) + { + $tag_upload = "
    "; + } + +if (!$upload_var['reply']){ + +$code = << +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +{$tag_upload} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +HTML; + +} + +else { + +$code = << +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +{$tag_upload} +
    +
    +
    +
    +
    +
    + + +HTML; + +} + +if ( stristr( $_SERVER['REQUEST_URI'], "pages.php" ) ) { + +$script_code = @file_get_contents(SYSTEM_DIR."/ajax/bbcodes.js"); +$script_code .= << + +HTML; + +} else { + +$script_code = << + + +HTML; + +} + +$bb_code = << + + + + + +
    + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    +
    + + +HTML; + + echo << + + + + + + + + + + + + + + + + + + + + +
    {$lang['v_ftitle']}[?]
    {$lang['vote_title']}[?]
    $lang[vote_body]
    $lang[vote_str_1]
    +
      {$lang['v_multi']}
    + +
    + + + + + + +HTML; + + echo << +   + + + + + +
    +
    + +HTML; + + echofooter(); + +} // ******************************************************************************** +// Do add News +// ******************************************************************************** +elseif( $action == "doaddnews" ) { + include_once SYSTEM_DIR . '/classes/parse.class.php'; + $parse = new ParseFilter( Array (), Array (), 1, 1 ); + + $allow_comm = isset( $_POST['allow_comm'] ) ? intval( $_POST['allow_comm'] ) : 0; + $allow_main = isset( $_POST['allow_main'] ) ? intval( $_POST['allow_main'] ) : 0; + $approve = isset( $_POST['approve'] ) ? intval( $_POST['approve'] ) : 0; + $allow_rating = isset( $_POST['allow_rating'] ) ? intval( $_POST['allow_rating'] ) : 0; + $news_fixed = isset( $_POST['news_fixed'] ) ? intval( $_POST['news_fixed'] ) : 0; + $category = $_POST['category']; + if( ! count( $category ) ) { + $category = array (); + $category[] = '0'; + } + $category_list = array(); + foreach ( $category as $value ) {$category_list[] = intval($value);} + $category_list = $db->safesql( implode( ',', $category ) ); + $allow_list = explode( ',', $user_group[$member_id['user_group']]['cat_add'] ); + foreach ( $category as $selected ) { + if( $allow_list[0] != "all" and ! in_array( $selected, $allow_list ) and $member_id['user_group'] != "1" ) $approve = 0; + } + + if( !$user_group[$member_id['user_group']]['moderation'] ) $approve = 0; + $title = $parse->process( trim( strip_tags ($_POST['title']) ) ); + + $full_story = $parse->process( $_POST['full_story'] ); + $short_story = $parse->process( $_POST['short_story'] ); + $full_story = $db->safesql( $parse->BB_Parse( $full_story, false ) ); + $short_story = $db->safesql( $parse->BB_Parse( $short_story, false ) ); + + if( $parse->not_allowed_text ) { + msg( "error", $lang['addnews_error'], $lang['news_err_39'], "javascript:history.go(-1)" ); + } + + $alt_name = $_POST['alt_name']; + $remote_addr = $_POST['remote_addr']; + + if( trim( $alt_name ) == "" or ! $alt_name ) $alt_name = totranslit( stripslashes( $title ), true, false ); + else $alt_name = totranslit( stripslashes( $alt_name ), true, false ); + + $title = $db->safesql( $title ); + + $metatags = create_metatags( $short_story . $full_story ); + + if( preg_match( "/[\||\'|\<|\>|\"|\!|\?|\$|\@|\/|\\\|\&\~\*\+]/", $_POST['tags'] ) ) $_POST['tags'] = ""; + else $_POST['tags'] = $db->safesql( htmlspecialchars( strip_tags( stripslashes( trim( $_POST['tags'] ) ) ), ENT_QUOTES ) ); + + if ( $_POST['tags'] ) { + $temp_array = array(); + $tags_array = array(); + $temp_array = explode (",", $_POST['tags']); + if (count($temp_array)) {foreach ( $temp_array as $value ) {if( trim($value) ) $tags_array[] = trim( $value );}} + if ( count($tags_array) ) $_POST['tags'] = implode(", ", $tags_array); else $_POST['tags'] = ""; + } + + // + if( trim( $_POST['vote_title'] != "" ) ) { + $add_vote = 1; + $vote_title = trim( $db->safesql( $parse->process( $_POST['vote_title'] ) ) ); + $frage = trim( $db->safesql( $parse->process( $_POST['frage'] ) ) ); + $vote_body = $db->safesql( $parse->BB_Parse( $parse->process( $_POST['vote_body'] ), false ) ); + $allow_m_vote = intval( $_POST['allow_m_vote'] ); + } else $add_vote = 0; + + // + if( $member_id['user_group'] < 3 ) { + $group_regel = array (); + foreach ( $_POST['group_extra'] as $key => $value ) {if( $value ) $group_regel[] = intval( $key ) . ':' . intval( $value );} + if( count( $group_regel ) ) $group_regel = implode( "||", $group_regel ); + else $group_regel = ""; + } else $group_regel = ''; + + // + $added_time = time() + ($config['date_adjust'] * 60); + $newdate = $_POST['newdate']; + + if( $_POST['allow_date'] != "yes" ) { + if( (($newsdate = strtotime( $newdate )) === - 1) or !$newsdate ) {msg( "error", $lang['addnews_error'], $lang['addnews_erdate'], "javascript:history.go(-1)" ); + } else {$thistime = date( "Y-m-d H:i:s", $newsdate );} + if( ! intval( $config['no_date'] ) and $newsdate > $added_time ) {$thistime = date( "Y-m-d H:i:s", $added_time );} + } else $thistime = date( "Y-m-d H:i:s", $added_time ); + //////////////////////////// + + + if( trim( $title ) == "") {msg( "error", $lang['addnews_error'], $lang['addnews_alert'], "javascript:history.go(-1)" );} + if( strlen( $title ) > 255 ) {msg( "error", $lang['addnews_error'], $lang['addnews_error'], "javascript:history.go(-1)" );} + + $db->query( "INSERT INTO " . PREFIX . "_post (date, autor, short_story, full_story, title, descr, keywords, category, alt_name, allow_comm, approve, allow_main, fixed, allow_rate, votes, access, remote_addr, tags, metatitle) values ('$thistime', '{$member_id['name']}', '$short_story', '$full_story', '$title', '{$metatags['description']}', '{$metatags['keywords']}', '$category_list', '$alt_name', '$allow_comm', '$approve', '$allow_main', '$news_fixed', '$allow_rating', '$add_vote', '$group_regel', '$remote_addr', '{$_POST['tags']}', '{$metatags['title']}')" ); + + $row = $db->insert_id(); + + include (system_DIR . '/inc/newsimg/doaddimg.php'); + + if( $add_vote ) { + $db->query( "INSERT INTO " . PREFIX . "_poll (news_id, title, frage, body, votes, multiple) VALUES('{$row}', '$vote_title', '$frage', '$vote_body', 0, '$allow_m_vote')" ); + } + + if( $_POST['tags'] != "" and $approve ) { + $tags = array (); + $_POST['tags'] = explode( ",", $_POST['tags'] ); + foreach ( $_POST['tags'] as $value ) {$tags[] = "('" . $row . "', '" . trim( $value ) . "')";} + $tags = implode( ", ", $tags ); + $db->query( "INSERT INTO " . PREFIX . "_tags (news_id, tag) VALUES " . $tags ); + } + + $db->query( "UPDATE " . PREFIX . "_images set news_id='{$row}' where author = '{$member_id['name']}' AND news_id = '0'" ); + $db->query( "UPDATE " . PREFIX . "_torrents set news_id='{$row}' where author = '{$member_id['name']}' AND news_id = '0'" ); + $db->query( "UPDATE " . PREFIX . "_files set news_id='{$row}' where author = '{$member_id['name']}' AND news_id = '0'" ); + $db->query( "UPDATE " . USERPREFIX . "_users set news_num=news_num+1 where user_id='{$member_id['user_id']}'" ); + + $cache->clear(); + + msg( "info", $lang['addnews_ok'], $lang['addnews_ok_1'] . " \"" . stripslashes( stripslashes( $title ) ) . "\" " . $lang['addnews_ok_2'] ); +} +?> \ No newline at end of file diff --git a/system/inc/blockip.php b/system/inc/blockip.php new file mode 100644 index 0000000..1617fe5 --- /dev/null +++ b/system/inc/blockip.php @@ -0,0 +1,192 @@ +safesql( htmlspecialchars( strip_tags( trim( $_REQUEST['ip_add'] ) ) ) ); else $ip_add = ""; +if( isset( $_REQUEST['ip'] ) ) $ip = htmlspecialchars( strip_tags( trim( $_REQUEST['ip'] ) ) ); else $ip = ""; +if( isset( $_REQUEST['id'] ) ) $id = intval( $_REQUEST['id'] ); else $id = 0; + +if( $action == "add" ) { + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" );} + include_once SYSTEM_DIR . '/classes/parse.class.php'; + + $parse = new ParseFilter( ); + $parse->safe_mode = true; + $banned_descr = $db->safesql( $parse->BB_Parse( $parse->process( $_POST['descr'] ), false ) ); + + if( (trim( $_POST['date'] ) == "") or (($_POST['date'] = strtotime( $_POST['date'] )) === - 1) ) { + $this_time = 0; + $days = 0; + } else { + $this_time = $_POST['date']; + $days = 1; + } + + if( ! $ip_add ) {msg( "error", $lang['ip_error'], $lang['ip_error'], "$PHP_SELF?mod=blockip" );} + + $row = $db->super_query( "SELECT id FROM " . PREFIX . "_banned WHERE ip ='$ip_add'" ); + + if ( $row['id'] ) {msg( "error", $lang['ip_error_1'], $lang['ip_error_1'], "$PHP_SELF?mod=blockip" );} + $db->query( "INSERT INTO " . USERPREFIX . "_banned (descr, date, days, ip) values ('$banned_descr', '$this_time', '$days', '$ip_add')" ); + $cache->delete('banned.php'); + +} elseif( $action == "delete" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" );} + + if( ! $id ) {msg( "error", $lang['ip_error'], $lang['ip_error'], "$PHP_SELF?mod=blockip" );} + + $db->query( "DELETE FROM " . USERPREFIX . "_banned WHERE id = '$id'" ); + $cache->delete('banned.php' ); +} + +echoheader( "", "" ); + +echo << + +
    +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang['ip_example']}
    {$lang['ip_type']}
    {$lang['ban_date']} + +
    {$lang['ban_descr']}{$lang['ip_add_descr']}
     
    +
    +
    + + +
    +HTML; + +echo << + + + + + + + + + "; + $bg = ""; $i++; + } + +function makemcDropDown($options, $name, $selected) { + $output = "
    + + + + +
    +
    + + + + + + + + +HTML; + +$db->query( "SELECT * FROM " . USERPREFIX . "_banned WHERE users_id = '0' ORDER BY id DESC" ); + +$i = 0; +while ( $row = $db->get_row() ) { + $i ++; + + if( $row['date'] ) $endban = langdate( "j M Y H:i", $row['date'] ); + else $endban = $lang['banned_info']; + + echo " + + + + + + + + "; +} + +if( $i == 0 ) { + echo " + "; +} + +echo << + + + + + + + + +
     {$lang['ban_date']}{$lang['ban_descr']} 
    + {$row['ip']} + + {$endban} + + " . stripslashes( $row['descr'] ) . " + + [{$lang['ip_unblock']}]
    +


    $lang[ip_empty]

    +

    + +HTML; + +echofooter(); +?> \ No newline at end of file diff --git a/system/inc/categories.php b/system/inc/categories.php new file mode 100644 index 0000000..245a020 --- /dev/null +++ b/system/inc/categories.php @@ -0,0 +1,518 @@ + $posi ) { + if( $posi != "" ) { + $posi = intval( $posi ); + $id = intval( $id ); + $db->query( "UPDATE " . PREFIX . "_category SET posi='{$posi}' WHERE id = '{$id}'" ); + } + } + $cache->delete('category.php'); + header( "Location:$PHP_SELF?mod=categories" ); +} + +// ******************************************************************************** +// +// ******************************************************************************** +if( $action == "add" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" );} + + $quotes = array ("\x27", "\x22", "\x60", "\t", "\n", "\r" ); + + $cat_name = $db->safesql( htmlspecialchars( strip_tags( stripslashes($_POST['cat_name'] ) ), ENT_QUOTES) ); + $alt_cat_name = totranslit( stripslashes( $_POST['alt_cat_name'] ), true, false ); + + if( ! $cat_name ) {msg( "error", $lang['cat_error'], $lang['cat_ername'], "javascript:history.go(-1)" );} + if( ! $alt_cat_name ) {msg( "error", $lang['cat_error'], $lang['cat_erurl'], "javascript:history.go(-1)" );} + + if ( in_array($_POST['news_sort'], array("date", "rating", "news_read", "title")) ) { + $news_sort = $db->safesql( $_POST['news_sort'] ); + } else $news_sort = ""; + + if ( in_array($_POST['news_msort'], array("ASC", "DESC")) ) { + $news_msort = $db->safesql( $_POST['news_msort'] ); + } else $news_msort = ""; + + if ( $_POST['news_number'] > 0) $news_number = intval( $_POST['news_number'] ); else $news_number = 0; + if ( $_POST['category'] > 0) $category = intval( $_POST['category'] ); else $category = 0; + + $meta_title = $db->safesql( htmlspecialchars ( strip_tags( stripslashes( $_POST['meta_title'] ) ) ) ); + $description = $db->safesql( substr( strip_tags( stripslashes( $_POST['descr'] ) ), 0, 200 ) ); + $keywords = $db->safesql( str_replace( $quotes, " ", strip_tags( stripslashes( $_POST['keywords'] ) ) ) ); + + $row = $db->super_query( "SELECT alt_name FROM " . PREFIX . "_category WHERE alt_name ='{$alt_cat_name}'" ); + if( $row['alt_name'] ) {msg( "error", $lang['cat_error'], $lang['cat_eradd'], "?mod=categories" );} + + $db->query( "INSERT INTO " . PREFIX . "_category (parentid, name, alt_name, descr, keywords, news_sort, news_msort, news_number, metatitle) values ('$category', '$cat_name', '$alt_cat_name', '$description', '$keywords', '$news_sort', '$news_msort', '$news_number', '$meta_title')" ); + + $cache->delete('category.php'); + $cache->clear(); + + msg( "info", $lang['cat_addok'], $lang['cat_addok_1'], "?mod=categories" ); + +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "remove" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" );} + + function DeleteSubcategories($parentid) { + global $db; + + $subcategories = $db->query( "SELECT id FROM " . PREFIX . "_category WHERE parentid = '$parentid'" ); + while ( $subcategory = $db->get_row( $subcategories ) ) { + DeleteSubcategories( $subcategory['id'] ); + $db->query( "DELETE FROM " . PREFIX . "_category WHERE id = '" . $subcategory['id'] . "'" ); + } + } + + if( ! $catid ) { + msg( "error", $lang['cat_error'], $lang['cat_noid'], "$PHP_SELF?mod=categories" ); + } + + $row = $db->super_query( "SELECT count(*) as count FROM " . PREFIX . "_post WHERE category regexp '[[:<:]]($catid)[[:>:]]'" ); + + if( $row['count'] ) { + if( is_array( $_REQUEST['new_category'] ) ) { + if( ! in_array( $catid, $new_category ) ) { + $category_list = $db->safesql( htmlspecialchars( strip_tags( stripslashes( implode( ',', $_REQUEST['new_category']))), ENT_QUOTES ) ); + $db->query( "UPDATE " . PREFIX . "_post set category='$category_list' WHERE category regexp '[[:<:]]($catid)[[:>:]]'" ); + $db->query( "DELETE FROM " . PREFIX . "_category WHERE id='$catid'" ); + DeleteSubcategories( $catid ); + $cache->delete('category.php'); + $cache->clear(); + msg( "info", $lang['cat_delok'], $lang['cat_delok_1'], "?mod=categories" ); + } + } + msg( "info", $lang['all_info'], "
    {$lang['comm_move']}
    ", "$PHP_SELF?mod=categories" ); + } else { + + $db->query( "DELETE FROM " . PREFIX . "_category WHERE id='$catid'" ); + DeleteSubcategories( $catid ); + $cache->delete('category.php' ); + $cache->clear(); + msg( "info", $lang['cat_delok'], $lang['cat_delok_1'], "?mod=categories" ); + } +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "edit" ) { + echoheader( "options", $lang['cat_head'] ); + + $catid = intval( $_GET['catid'] ); + + if( ! $catid ) {msg( "error", $lang['cat_error'], $lang['cat_noid'], "$PHP_SELF?mod=categories" );} + $row = $db->super_query( "SELECT * FROM " . PREFIX . "_category WHERE id = '$catid'" ); + if( ! $row['id'] ) msg( "error", $lang['cat_error'], $lang['cat_noid'], "$PHP_SELF?mod=categories" ); + + $categorylist = CategoryNewsSelection( $row['parentid'], 0 ); + + $row['name'] = stripslashes( preg_replace( array ("'\"'", "'\''" ), array (""", "'" ), $row['name'] ) ); + $row['metatitle'] = stripslashes( preg_replace( array ("'\"'", "'\''" ), array (""", "'" ), $row['metatitle'] ) ); + $row['descr'] = stripslashes( preg_replace( array ("'\"'", "'\''" ), array (""", "'" ), $row['descr'] ) ); + $row['keywords'] = stripslashes( preg_replace( array ("'\"'", "'\''" ), array (""", "'" ), $row['keywords'] ) ); + + $row['news_sort'] = makeDropDown( array ("" => $lang['sys_global'], "date" => $lang['opt_sys_sdate'], "rating" => $lang['opt_sys_srate'], "news_read" => $lang['opt_sys_sview'], "title" => $lang['opt_sys_salph'] ), "news_sort", $row['news_sort'] ); + $row['news_msort'] = makeDropDown( array ("" => $lang['sys_global'], "DESC" => $lang['opt_sys_mminus'], "ASC" => $lang['opt_sys_mplus'] ), "news_msort", $row['news_msort'] ); + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang['cat_name']}[?]
    {$lang['cat_url']}[?]
    {$lang['meta_title']} ({$lang['meta_descr_max']})
    {$lang['meta_descr_cat']} ({$lang['meta_descr_max']})
    {$lang['meta_keys']}
    {$lang['cat_parent']}
    {$lang['opt_sys_sort']}{$row['news_sort']}
    {$lang['opt_sys_msort']}{$row['news_msort']}
    {$lang['opt_sys_newc']}[?]
      + + + +
    +
    +
    +HTML; + + echofooter(); + die(); + +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "doedit" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" );} + + $quotes = array ("\x27", "\x22", "\x60", "\t", "\n", "\r", '"' ); + + $cat_name = $db->safesql( htmlspecialchars( strip_tags( stripslashes($_POST['cat_name'] ) ), ENT_QUOTES) ); + $alt_cat_name = totranslit( stripslashes( $_POST['alt_cat_name'] ), true, false ); + + $catid = intval( $_POST['catid'] ); + $parentid = intval( $_POST['parentid'] ); + + $meta_title = $db->safesql( htmlspecialchars ( strip_tags( stripslashes( $_POST['meta_title'] ) ) ) ); + $description = $db->safesql( substr( strip_tags( stripslashes( $_POST['descr'] ) ), 0, 200 ) ); + $keywords = $db->safesql( str_replace( $quotes, " ", strip_tags( stripslashes( $_POST['keywords'] ) ) ) ); + + if ( in_array($_POST['news_sort'], array("date", "rating", "news_read", "title")) ) { + $news_sort = $db->safesql( $_POST['news_sort'] ); + } else $news_sort = ""; + + if ( in_array($_POST['news_msort'], array("ASC", "DESC")) ) { + $news_msort = $db->safesql( $_POST['news_msort'] ); + } else $news_msort = ""; + + if ( $_POST['news_number'] > 0)$news_number = intval( $_POST['news_number'] ); else $news_number = 0; + if( ! $catid ) {msg( "error", $lang['cat_error'], $lang['cat_noid'], "$PHP_SELF?mod=categories" );} + if( $cat_name == "" ) {msg( "error", $lang['cat_error'], $lang['cat_noname'], "javascript:history.go(-1)" );} + + $row = $db->super_query( "SELECT id, alt_name FROM " . PREFIX . "_category WHERE alt_name = '$alt_cat_name'" ); + + if( $row['id'] and $row['id'] != $catid ) { + msg( "error", $lang['cat_error'], $lang['cat_eradd'], "javascript:history.go(-1)" ); + } + + if( in_array( $parentid, get_sub_cats( $catid ) ) ) { + msg( "error", $lang['cat_error'], $lang['cat_noparentid'], "$PHP_SELF?mod=categories" ); + } + + $db->query( "UPDATE " . PREFIX . "_category set parentid='$parentid', name='$cat_name', alt_name='$alt_cat_name', descr='$description', keywords='$keywords', news_sort='$news_sort', news_msort='$news_msort', news_number='$news_number', metatitle='$meta_title' WHERE id='$catid'" ); + + $cache->delete('category.php' ); + $cache->clear(); + + msg( "info", $lang['cat_editok'], $lang['cat_editok_1'], "$PHP_SELF?mod=categories" ); +} +// ******************************************************************************** +// List all Categories +// ******************************************************************************** +echoheader( "options", $lang['cat_head'] ); + +$categorylist = CategoryNewsSelection( 0, 0 ); + +echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang['cat_name']}[?]
    {$lang['cat_url']}[?]
    {$lang['meta_title']} ({$lang['meta_descr_max']})
    {$lang['meta_descr_cat']} ({$lang['meta_descr_max']})
    {$lang['meta_keys']}
    {$lang['cat_parent']}
    {$lang['opt_sys_sort']}
    {$lang['opt_sys_msort']}
    {$lang['opt_sys_newc']}[?]
      + + +
    +
    +
    +HTML; + +if( ! count( $cat_info ) ) { + + echo << + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + +
    {$lang['cat_nocat']}
    +
    + +HTML; + +} else { + + function DisplayCategories($parentid = 0, $sublevelmarker = '') { + global $lang, $cat_info, $config, $dle_login_hash; + + // start table + if( $parentid == 0 ) { + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + +HTML; + + } else { + $sublevelmarker .= '--'; + } + + if( count( $cat_info ) ) { + + foreach ( $cat_info as $cats ) { + if( $cats['parentid'] == $parentid ) $root_category[] = $cats['id']; + } + + if( count( $root_category ) ) { + + foreach ( $root_category as $id ) { + + $category_name = $cat[$id]; + + if( $config['allow_alt_url'] == "yes" ) $link = "" . stripslashes( $cat_info[$id]['name'] ) . ""; + else $link = "" . stripslashes( $cat_info[$id]['name'] ) . ""; + + echo " + + + + + + + "; + + DisplayCategories( $id, $sublevelmarker ); + } + } + } + + // end table + if( $parentid == 0 ) { + + echo << + + +
    IDPosition{$lang['cat_cat']}{$lang['cat_url']}{$lang['cat_action']}
     " . $cat_info[$id]['id'] . " $sublevelmarker " . $link . ""; + if( $cat_info[$id]['alt_name'] != "" ) { + echo $cat_info[$id]['alt_name']; + } else { + echo "---"; + } + echo "[$lang[cat_ed]] [$lang[cat_del]]
    +
    +
    +HTML; + + } + } + + DisplayCategories(); +} + +echofooter(); +?> \ No newline at end of file diff --git a/system/inc/chat.php b/system/inc/chat.php new file mode 100644 index 0000000..cb7f5ad --- /dev/null +++ b/system/inc/chat.php @@ -0,0 +1,476 @@ + +
    + $title
    $description +
    + $field +
    + + + + + + + + + +
    + +
    +
    + + + + + + +
    Color
    +HTML; +} + +if (isset($url)) { + $url = rawurldecode($_GET['url']); + $url = @base64_decode($url); + $url = str_replace("&" , "&", $url); + + $_SERVER['HTTP_REFERER'] = reset_url($_SERVER['HTTP_REFERER']); + $_SERVER['HTTP_HOST'] = reset_url($_SERVER['HTTP_HOST']); + + if (($_SERVER['HTTP_HOST'] != $_SERVER['HTTP_REFERER']) OR $url == "") { @header('Location: /index.php'); die ("Access denied!!!

    Please visit {$_SERVER['HTTP_HOST']}"); } + @header('Location: '.$url); + die ("Link Redirect:

    Please click here."); +} + +if ($action == ""){ +echoheader("chat", $lang['opt_mchatc']); +chatmenu (); +if(!intval($chat_per_page)){ $chat_per_page = 30; } + +if (!isset($start_from)) $start_from = 0; + +if(!$user_group[$member_db[1]]['allow_all_edit'] AND $member_db[1] != 1) $author = $member_db[2]; + +$sql = "SELECT * FROM " . PREFIX . "_chat ORDER BY date DESC LIMIT $start_from,$chat_per_page"; +$db->query($sql); + if($start_from == "0"){ $start_from = ""; } + $i = $start_from; + $entries_showed = 0; +$entries = ""; +while($row = $db->get_array()){ $i++; + +$itemdate = date($chatconfig['timestampa'],strtotime($row['date'])); +$row['message'] = $parse->BB_Parse($parse->process(urldecode(stripcslashes($row['message'])))); + +$entries .= "$itemdate - "; +$entries .= "".$row['message'].""; +$entries .= "".$row['name']." + + "; +$entries_showed ++; +if($i >= $chat_per_page + $start_from){ break; } +} +$query_count = "SELECT COUNT(*) as count from " . PREFIX . "_chat"; +$result_count = $db->super_query($query_count); +$all_count = $result_count['count']; + +echo << + + +JSCRIPT; + +echo<< +
    + + + + + + + + + + "; + $entries_showed ++; + + if( $i >= $news_per_page + $start_from ) { + break; + } + } + + + // End prelisting + $result_count = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_post" . $where ); + + $all_count_news = $result_count['count']; + + /////////////////////////////////////////// + // Options Bar + $category_list = CategoryNewsSelection( $search_cat, 0, false ); + + echo << + + + + + + +
    + +
    + + + + + +
    + +{$entries} + +HTML; + +$npp_nav =""; + +if($start_from > 0) +{ + $previous = $start_from - $chat_per_page; + $npp_nav .= "<< $lang[edit_prev]"; +} +if($all_count > $chat_per_page){ + $npp_nav .= " [ "; + $enpages_count = @ceil($all_count/$chat_per_page); + $enpages_start_from = 0; + $enpages = ""; + for($j=1;$j<=$enpages_count;$j++){ + if($enpages_start_from != $start_from){ $enpages .= "$j "; } + else{ $enpages .= " $j "; } + $enpages_start_from += $chat_per_page; + } + $npp_nav .= $enpages; + $npp_nav .= " ] "; + } +if($all_count > $i) +{ + $how_next = $all_count - $i; + if($how_next > $chat_per_page){ $how_next = $chat_per_page; } + $npp_nav .= "$lang[edit_next] $how_next >>"; +} +if($entries_showed != 0){ +echo<< +HTML; +} + +echo<< +
       + {$lang['edit_autor']} + +
    $npp_nav + + + +
    +HTML; + +echo << +
    + + + + + + + + +
    + +
    + + +
    {$lang_mc['mc_mess_page']}
    +
    +HTML; +echofooter(); +///--- ---/// +}elseif ($action == "configs"){ +echoheader("chat", $lang_mc['mc_conf']); +chatmenu (); +echo << +
    + + + + + + + + + + + + +
    + + +
    +
    + +HTML; + + showmcRow($lang_mc['mc_guest'], $lang_mc['mc_guestc'], makemcDropDown(array("yes"=>$lang['opt_sys_yes'],"no"=>$lang['opt_sys_no']), "save_con[guest]", "{$chatconfig['guest']}")); + showmcRow($lang_mc['mc_showdate'], $lang_mc['mc_showdatec'], makemcDropDown(array("yes"=>$lang['opt_sys_yes'],"no"=>$lang['opt_sys_no']), "save_con[show_date]", "{$chatconfig['show_date']}")); + showmcRow($lang_mc['mc_limitb'], $lang_mc['mc_limitbc'], ""); + showmcRow($lang_mc['mc_limit'], $lang_mc['mc_limitc'], ""); + showmcRow($lang_mc['mc_sc'], $lang_mc['mc_sc'], ""); + showmcRow($lang_mc['mc_timestamp'], "$lang[opt_sys_and]", ""); + showmcRow($lang_mc['mc_timestampa'], "$lang[opt_sys_and]", ""); + showmcRow($lang_mc['mc_smail'], $lang_mc['mc_smailb'], ""); + showmcRow($lang_mc['mc_refresh'], $lang_mc['mc_refreshc'], ""); + showmcRow($lang['opt_sys_aw'], $lang['opt_sys_awd'], ""); + showmcRow($lang_mc['mc_colornik'], $lang_mc['mc_colornikc'], makemcDropDown(array("yes"=>$lang['opt_sys_yes'],"no"=>$lang['opt_sys_no']), "save_con[color_nik]", "{$chatconfig['color_nik']}")); + +echo << +
    + + +
    +HTML; +echofooter(); +///--- end ---/// + +///--- ---/// +}elseif ($action == "trun"){ +echoheader("chat", $lang_mc['mc_trun']); +chatmenu (); +echo << +
    + + + + + + + + + + + + +
    + + +
    +
    + + + + + +
    {$lang_mc['mc_trun']}
    +   + +
    +HTML; +echofooter(); +} +///--- end ---/// + +elseif($action == "mess_del"){ +echoheader("chat", $lang_mc['chatc']); +echo << +
    + + + + + + + + + + +
    + +
    +
    {$lang_mc['mass_confirm']} +HTML; + +echo "(".count($selected_mess).")

    +   + +"; +foreach($selected_mess as $id){ +echo "\n"; +} + +echo <<
    +HTML; +echofooter(); +exit; +///--- Add Message end ---/// +}elseif($action == "messedit"){ +echoheader("chat", $lang_mc['chatc']); +chatmenu (); +$row = $db->super_query("SELECT * FROM " . PREFIX . "_chat WHERE id = '$id'"); +$messtext = $parse->decodeBBCodes($row['message']); +echo << +
    + + + + + + + + +
    + +
    +HTML; + +include(SYSTEM_DIR.'/inc/include/inserttag.php'); + +echo << +HTML; + +echo <<
    {$bb_code}
    + + + +

    +
    +HTML; +echofooter(); +}elseif($action == "color"){ +echoheader("chat", $lang_mc['chatc']); +chatmenu (); +echo << +
    + + + + + + + + + + + + +
    + + +
    +
    + +HTML; + + showmcRow('1:', $lang_mc['mc_color1'], "", ""); + showmcRow('2:', $lang_mc['mc_color2'], "", ""); + showmcRow('3:', $lang_mc['mc_color3'], "", ""); + +echo << +
    + + + +
    +HTML; +echofooter(); +}elseif($action == "do_mess_edit"){ +$aeditmess = $db->safesql($parse->BB_Parse(parse_mcsmiles($parse->process($_POST['aeditmess'])))); +$result = $db->query("UPDATE " . PREFIX . "_chat SET message='$aeditmess' WHERE id='$id'"); +@header("Location: $PHP_SELF?mod=chat"); +}elseif($action == "do_mess_del"){ +$deleted_message = 0; +foreach ($selected_mess as $id){ +$id = intval($id); +$db->query("DELETE FROM " . PREFIX . "_chat WHERE id='$id'"); +$deleted_message ++; +$db->free(); } +if(count($selected_mess) == $deleted_message){ msg("info", $lang['word_ldel'], $lang_mc['mc_mess_delok'], "$PHP_SELF?mod=chat"); } +else{ msg("error", $lang_mc['mc_mess_notok'], "$deleted_message $lang[mass_i] ".count($selected_mess)." $lang[mass_notok_1]", "$PHP_SELF?mod=chat"); } +}elseif($action == "doaddmess") { +$amess = $db->safesql($parse->BB_Parse(parse_mcsmiles($parse->process($_POST['amess'])))); +$name = "Admin"; +$ip = $db->safesql($_SERVER['REMOTE_ADDR']); +$date = date ("Y-m-d H:i:s", time()+($config['date_adjust']*60)); + +if ($amess == "") msg("error",$lang['static_err'],$lang['static_err_1'], "javascript:history.go(-1)"); + +$db->query("INSERT INTO ".PREFIX."_chat (name, message, date, ip, `mgroup`, user_id) VALUES ('$name', '$amess', '$date', '$ip', '', '')"); +header("Location: $PHP_SELF?mod=chat&action=doaddmessok"); +}elseif($action == "doaddmessok"){ +msg("info", $lang_mc['mc_addmssok'], "$lang[mc_addmssok]

    $lang[db_prev]"); +}elseif($action == "dotrun") { +$db->query("TRUNCATE " . PREFIX . "_chat"); +header("Location: $PHP_SELF?mod=chat"); +}elseif($action == "dosaveconfigs") +{ + $find[] = "'\r'"; + $replace[] = ""; + $find[] = "'\n'"; + $replace[] = ""; + + $save_con = $save_con + $chatconfig; + + if($member_id['user_group'] != 1){ msg("error", $lang_p['opt_denied'], $lang_p['opt_denied']); } + $handler = fopen(SYSTEM_DIR.'/data/chat.config.php', "w"); + fwrite($handler, " $value) + { + $value=trim(stripslashes ($value)); + $value=htmlspecialchars ($value, ENT_QUOTES); + $value = preg_replace($find,$replace,$value); + fwrite($handler, "'{$name}' => \"{$value}\",\n\n"); + } + fwrite($handler, ");\n\n?>"); + fclose($handler); + + $cache->clear(); + msg("info", $lang['opt_sysok'], "$lang[opt_sysok_1]

    $lang[db_prev]"); +} +?> diff --git a/system/inc/clean.php b/system/inc/clean.php new file mode 100644 index 0000000..e665970 --- /dev/null +++ b/system/inc/clean.php @@ -0,0 +1,101 @@ +query("SHOW TABLE STATUS FROM `".DBNAME."`"); + $mysql_size = 0; + while ($r = $db->get_array()) { + if (strpos($r['Name'], PREFIX."_") !== false) + $mysql_size += $r['Data_length'] + $r['Index_length'] ; + } +$db->free(); + +$lang['clean_all'] = str_replace ('{datenbank}', ''.mksize($mysql_size).'', $lang['clean_all']); + +echoheader("", ""); + +echo << + + + + + +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + +
    +

    {$lang['clean_all']}



    + +
    +
    +
    +
    +HTML; + + +echofooter(); +?> \ No newline at end of file diff --git a/system/inc/editnews.php b/system/inc/editnews.php new file mode 100644 index 0000000..3b26cdb --- /dev/null +++ b/system/inc/editnews.php @@ -0,0 +1,1292 @@ +safesql( trim( htmlspecialchars( $_REQUEST['author'] ) ) ); else $author = ""; +if( isset( $_REQUEST['ifdelete'] ) ) $ifdelete = $_REQUEST['ifdelete']; else $ifdelete = ""; +if( isset( $_REQUEST['news_fixed'] ) ) $news_fixed = $_REQUEST['news_fixed']; else $news_fixed = ""; +if( isset( $_REQUEST['search_cat'] ) ) $search_cat = intval( $_REQUEST['search_cat'] ); else $search_cat = ""; + +include_once SYSTEM_DIR . '/classes/parse.class.php'; + +$parse = new ParseFilter( Array (), Array (), 1, 1 ); + +if( $action == "list" ) { + + $_SESSION['admin_referrer'] = $_SERVER['REQUEST_URI']; + echoheader( "editnews", $lang['edit_head'] ); + + $search_field = $db->safesql( trim( htmlspecialchars( stripslashes( urldecode( $_REQUEST['search_field'] ) ), ENT_QUOTES ) ) ); + $search_author = $db->safesql( trim( htmlspecialchars( stripslashes( urldecode( $_REQUEST['search_author'] ) ), ENT_QUOTES ) ) ); + $fromnewsdate = $db->safesql( trim( htmlspecialchars( stripslashes( $_REQUEST['fromnewsdate'] ), ENT_QUOTES ) ) ); + $tonewsdate = $db->safesql( trim( htmlspecialchars( stripslashes( $_REQUEST['tonewsdate'] ), ENT_QUOTES ) ) ); + + $start_from = intval( $_REQUEST['start_from'] ); + $news_per_page = intval( $_REQUEST['news_per_page'] ); + $gopage = intval( $_REQUEST['gopage'] ); + + $_REQUEST['news_status'] = intval( $_REQUEST['news_status'] ); + $news_status_sel = array ('0' => '', '1' => '', '2' => '' ); + $news_status_sel[$_REQUEST['news_status']] = 'selected="selected"'; + + if( ! $news_per_page or $news_per_page < 1 ) { + $news_per_page = 50; + } + if( $gopage ) $start_from = ($gopage - 1) * $news_per_page; + + if( $start_from < 0 ) $start_from = 0; + + $where = array (); + + if( ! $user_group[$member_id['user_group']]['allow_all_edit'] and $member_id['user_group'] != 1 ) { + $where[] = "autor = '{$member_id['name']}'"; + } + + if( $search_field != "" ) { + $where[] = "(short_story like '%$search_field%' OR title like '%$search_field%' OR full_story like '%$search_field%')"; + } + + if( $search_author != "" ) { + $where[] = "autor like '$search_author%'"; + } + + if( $search_cat != "" ) { + if ($search_cat == -1) $where[] = "category = '' OR category = '0'"; + else $where[] = "category regexp '[[:<:]]($search_cat)[[:>:]]'"; + } + + if( $fromnewsdate != "" ) { + $where[] = "date >= '$fromnewsdate'"; + } + + if( $tonewsdate != "" ) { + $where[] = "date <= '$tonewsdate'"; + } + + if( $_REQUEST['news_status'] == 1 ) $where[] = "approve = '1'"; + elseif( $_REQUEST['news_status'] == 2 ) $where[] = "approve = '0'"; + + if( count( $where ) ) { + $where = implode( " AND ", $where ); + $where = " WHERE " . $where; + } else { + $where = ""; + } + + $order_by = array (); + + if( $_REQUEST['search_order_f'] == "asc" or $_REQUEST['search_order_f'] == "desc" ) $search_order_f = $_REQUEST['search_order_f']; + else $search_order_f = ""; + if( $_REQUEST['search_order_m'] == "asc" or $_REQUEST['search_order_m'] == "desc" ) $search_order_m = $_REQUEST['search_order_m']; + else $search_order_m = ""; + if( $_REQUEST['search_order_d'] == "asc" or $_REQUEST['search_order_d'] == "desc" ) $search_order_d = $_REQUEST['search_order_d']; + else $search_order_d = ""; + if( $_REQUEST['search_order_t'] == "asc" or $_REQUEST['search_order_t'] == "desc" ) $search_order_t = $_REQUEST['search_order_t']; + else $search_order_t = ""; + + if( ! empty( $search_order_f ) ) { + $order_by[] = "fixed $search_order_f"; + } + if( ! empty( $search_order_m ) ) { + $order_by[] = "approve $search_order_m"; + } + if( ! empty( $search_order_d ) ) { + $order_by[] = "date $search_order_d"; + } + if( ! empty( $search_order_t ) ) { + $order_by[] = "title $search_order_t"; + } + + $order_by = implode( ", ", $order_by ); + if( ! $order_by ) $order_by = "fixed desc, approve asc, date desc"; + + $search_order_fixed = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( isset( $_REQUEST['search_order_f'] ) ) { + $search_order_fixed[$search_order_f] = 'selected'; + } else { + $search_order_fixed['desc'] = 'selected'; + } + $search_order_mod = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( isset( $_REQUEST['search_order_m'] ) ) { + $search_order_mod[$search_order_m] = 'selected'; + } else { + $search_order_mod['asc'] = 'selected'; + } + $search_order_date = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( isset( $_REQUEST['search_order_d'] ) ) { + $search_order_date[$search_order_d] = 'selected'; + } else { + $search_order_date['desc'] = 'selected'; + } + $search_order_title = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( ! empty( $search_order_t ) ) { + $search_order_title[$search_order_t] = 'selected'; + } else { + $search_order_title['----'] = 'selected'; + } + + $db->query( "SELECT id, date, title, category, autor, alt_name, comm_num, approve, fixed, news_read, remote_addr FROM " . PREFIX . "_post" . $where . " ORDER BY " . $order_by . " LIMIT $start_from,$news_per_page" ); + + // Prelist Entries + if( $start_from == "0" ) { + $start_from = ""; + } + $i = $start_from; + $entries_showed = 0; + + $entries = ""; + + while ( $row = $db->get_array() ) { + + $i ++; + + $itemdate = date( "d.m.Y", strtotime( $row['date'] ) ); + + if( strlen( $row['title'] ) > 65 ) $title = substr( $row['title'], 0, 65 ) . " ..."; + else $title = $row['title']; + + $title = htmlspecialchars( stripslashes( $title ), ENT_QUOTES ); + $title = str_replace("&","&", $title ); + + $entries .= "
    + $itemdate - "; + + if( $row['fixed'] == '1' ) $entries .= "$lang[edit_fix] "; + + if( $row['comm_num'] > 0 ) { + + $full_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html"; + + $comm_link = "{$row['comm_num']}"; + + } else { + $comm_link = $row['comm_num']; + } + + $entries .= "$title + {$row['news_read']}" . $comm_link; + + $entries .= ""; + + if( $row['approve'] ) $erlaub = "$lang[edit_yes]"; + else $erlaub = "$lang[edit_no]"; + $entries .= $erlaub; + + $entries .= ""; + + if( ! $row['category'] ) $my_cat = "---"; + else { + + $my_cat = array (); + $cat_list = explode( ',', $row['category'] ); + + foreach ( $cat_list as $element ) { + if( $element ) $my_cat[] = $cat[$element]; + } + $my_cat = implode( ',
    ', $my_cat ); + } + + $entries .= "$my_cat
    " . $row['autor'] . " + + + +
    + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang['edit_search_news']}{$lang['search_by_author']}
    {$lang['edit_cat']}{$lang['search_by_date']}{$lang['edit_fdate']} + + {$lang['edit_tdate']} + +
    {$lang['search_by_status']}{$lang['edit_page']}
    {$lang['news_order']}
    {$lang['news_order_fixed']}{$lang['edit_approve']}{$lang['search_by_date']}{$lang['edit_et']}
    + + + +
      + +
    +
    +
    + +HTML; + // End Options Bar + + + echo << + + +JSCRIPT; + + if( $entries_showed == 0 ) { + + echo << + + + + + + + + + + + + + + + + +
    + + + + + +
    {$lang['news_advanced_search']}
    +
    + + + + +
    {$lang['edit_nonews']}
    +
    +
    +HTML; + + } else { + + echo << + +
    +
    + + + + + + + + + +
    + + + + + +
    {$lang['news_advanced_search']}
    +
    + + + + + + + + + + +
    + + + + + {$entries} + +HTML; + + // pagination + + $npp_nav = "
    "; + + if( $start_from > 0 ) { + $previous = $start_from - $news_per_page; + $npp_nav .= "<< "; + } + + if( $all_count_news > $news_per_page ) { + + $enpages_count = @ceil( $all_count_news / $news_per_page ); + $enpages_start_from = 0; + $enpages = ""; + + if( $enpages_count <= 10 ) { + + for($j = 1; $j <= $enpages_count; $j ++) { + + if( $enpages_start_from != $start_from ) { + + $enpages .= "$j "; + + } else { + + $enpages .= "$j "; + } + + $enpages_start_from += $news_per_page; + } + + $npp_nav .= $enpages; + + } else { + + $start = 1; + $end = 10; + + if( $start_from > 0 ) { + + if( ($start_from / $news_per_page) > 4 ) { + + $start = @ceil( $start_from / $news_per_page ) - 3; + $end = $start + 9; + + if( $end > $enpages_count ) { + $start = $enpages_count - 10; + $end = $enpages_count - 1; + } + + $enpages_start_from = ($start - 1) * $news_per_page; + + } + + } + + if( $start > 2 ) { + + $enpages .= "1 ... "; + + } + + for($j = $start; $j <= $end; $j ++) { + + if( $enpages_start_from != $start_from ) { + + $enpages .= "$j "; + + } else { + + $enpages .= "$j "; + } + + $enpages_start_from += $news_per_page; + } + + $enpages_start_from = ($enpages_count - 1) * $news_per_page; + $enpages .= "... $enpages_count "; + + $npp_nav .= $enpages; + + } + + } + + if( $all_count_news > $i ) { + $how_next = $all_count_news - $i; + if( $how_next > $news_per_page ) { + $how_next = $news_per_page; + } + $npp_nav .= ">>"; + } + + $npp_nav .= "
    "; + + // pagination + + + if( $entries_showed != 0 ) { + echo << + +HTML; + + if( $all_count_news > $news_per_page ) { + + echo << +HTML; + + } + + } + + echo << + + +
      {$lang['edit_title']} +  {$lang['st_views']}  +  {$lang['edit_com']}  + {$lang['edit_approve']} + {$lang['edit_cl']} + {$lang['edit_autor']} + +
    {$npp_nav}
    + + + + +
    +{$lang['edit_go_page']} +
    +
    + +HTML; + + } + + echofooter(); +} + +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "editnews" ) { + $id = intval( $_GET['id'] ); + $row = $db->super_query( "SELECT * FROM " . PREFIX . "_post where id = '$id'" ); + + $found = FALSE; + + if( $id == $row['id'] ) $found = TRUE; + if( ! $found ) {msg( "error", $lang['cat_error'], $lang['edit_nonews'] );} + + $cat_list = explode( ',', $row['category'] ); + + $have_perm = 0; + + if( $user_group[$member_id['user_group']]['allow_edit'] and $row['autor'] == $member_id['name'] ) { + $have_perm = 1; + } + + if( $user_group[$member_id['user_group']]['allow_all_edit'] ) { + $have_perm = 1; + $allow_list = explode( ',', $user_group[$member_id['user_group']]['cat_add'] ); + + foreach ( $cat_list as $selected ) { + if( $allow_list[0] != "all" and !in_array( $selected, $allow_list ) AND $row['approve']) $have_perm = 0; + } + } + + if( ($member_id['user_group'] == 1) ) { + $have_perm = 1; + } + + if( ! $have_perm ) { + msg( "error", $lang['addnews_denied'], $lang['edit_denied'], "$PHP_SELF?mod=editnews&action=list" ); + } + + $row['title'] = $parse->decodeBBCodes( $row['title'], false ); + $row['title'] = str_replace("&","&", $row['title'] ); + $row['descr'] = $parse->decodeBBCodes( $row['descr'], false ); + $row['keywords'] = $parse->decodeBBCodes( $row['keywords'], false ); + $row['metatitle'] = stripslashes( $row['metatitle'] ); + + $row['short_story'] = $parse->decodeBBCodes( $row['short_story'], false ); + $row['full_story'] = $parse->decodeBBCodes( $row['full_story'], false ); + + $access = permload( $row['access'] ); + + if( $row['votes'] ) { + $poll = $db->super_query( "SELECT * FROM " . PREFIX . "_poll where news_id = '{$row['id']}'" ); + $poll['title'] = $parse->decodeBBCodes( $poll['title'], false ); + $poll['frage'] = $parse->decodeBBCodes( $poll['frage'], false ); + $poll['body'] = $parse->decodeBBCodes( $poll['body'], false ); + $poll['multiple'] = $poll['multiple'] ? "checked" : ""; + } + + echoheader( "editnews", $lang['edit_head'] ); + + echo " + "; + + echo "
    "; + + $categories_list = CategoryNewsSelection( $cat_list, 0 ); + if( $config['allow_multi_category'] ) $category_multiple = "class=\"cat_select\" multiple"; + else $category_multiple = ""; + + if( $member_id['user_group'] == 1 ) { + $author_info = ""; + } else { + $author_info = "{$row['autor']}"; + } + + + if ( $user_group[$member_id['user_group']]['admin_editusers'] ) { + $author_info .= " "; + } + + + echo << + + + + +
    + + + + + + + + + + + + + + + +
    + + + + +
    +
    +
    + +HTML; + + echo << + + + + + + + + + + + + + + + + + + + + +
    {$lang['v_ftitle']}[?]
    {$lang['vote_title']}[?]
    $lang[vote_body]
    $lang[vote_str_1]
    +
      {$lang['v_multi']}
    + +
    + + + + +
    +   +   + + + + + +
    +HTML; + + echo << +
    +
    +HTML; + + echofooter(); +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "doeditnews" ) { + + $id = intval( $_GET['id'] ); + + $allow_comm = isset( $_POST['allow_comm'] ) ? intval( $_POST['allow_comm'] ) : 0; + $allow_main = isset( $_POST['allow_main'] ) ? intval( $_POST['allow_main'] ) : 0; + $approve = isset( $_POST['approve'] ) ? intval( $_POST['approve'] ) : 0; + $allow_rating = isset( $_POST['allow_rating'] ) ? intval( $_POST['allow_rating'] ) : 0; + $news_fixed = isset( $_POST['news_fixed'] ) ? intval( $_POST['news_fixed'] ) : 0; + $category = $_POST['category']; + if( ! count( $category ) ) { + $category = array (); + $category[] = '0'; + } + $category_list = array(); + foreach ( $category as $value ) {$category_list[] = intval($value);} + $category_list = $db->safesql( implode( ',', $category ) ); + + $allow_list = explode( ',', $user_group[$member_id['user_group']]['cat_add'] ); + foreach ( $category as $selected ) {if( $allow_list[0] != "all" and ! in_array( $selected, $allow_list ) and $member_id['user_group'] != 1 ) $approve = 0;} + + if( !$user_group[$member_id['user_group']]['moderation'] ) $approve = 0; + + $title = $parse->process( trim( strip_tags ($_POST['title']) ) ); + + $full_story = $parse->process( $_POST['full_story'] ); + $short_story = $parse->process( $_POST['short_story'] ); + + $full_story = $db->safesql( $parse->BB_Parse( $full_story, false ) ); + $short_story = $db->safesql( $parse->BB_Parse( $short_story, false ) ); + + if( $parse->not_allowed_text ) { + msg( "error", $lang['addnews_error'], $lang['news_err_39'], "javascript:history.go(-1)" ); + } + + if( trim( $title ) == "" and $ifdelete != "yes" ) msg( "error", $lang['cat_error'], $lang['addnews_ertitle'], "javascript:history.go(-1)" ); + if( strlen( $title ) > 255 ) {msg( "error", $lang['cat_error'], $lang['addnews_ermax'], "javascript:history.go(-1)" );} + + if( trim( $_POST['alt_name'] ) == "" or ! $_POST['alt_name'] ) $alt_name = totranslit( stripslashes( $title ) ); + else $alt_name = totranslit( stripslashes( $_POST['alt_name'] ) ); + + $remote_addr = $_POST['remote_addr']; + + $title = $db->safesql( $title ); + $metatags = create_metatags( $short_story . $full_story ); + + $catalog_url = $db->safesql( substr( htmlspecialchars( strip_tags( stripslashes( trim( $_POST['catalog_url'] ) ) ) ), 0, 3 ) ); + + if( preg_match( "/[\||\'|\<|\>|\"|\!|\?|\$|\@|\/|\\\|\&\~\*\+]/", $_POST['tags'] ) ) $_POST['tags'] = ""; + else $_POST['tags'] = $db->safesql( htmlspecialchars( strip_tags( stripslashes( trim( $_POST['tags'] ) ) ), ENT_QUOTES ) ); + + if ( $_POST['tags'] ) { + $temp_array = array(); + $tags_array = array(); + $temp_array = explode (",", $_POST['tags']); + if (count($temp_array)) { + foreach ( $temp_array as $value ) { + if( trim($value) ) $tags_array[] = trim( $value ); + }} + if ( count($tags_array) ) $_POST['tags'] = implode(", ", $tags_array); else $_POST['tags'] = ""; + } + + // + if( trim( $_POST['vote_title'] != "" ) ) { + $add_vote = 1; + $vote_title = trim( $db->safesql( $parse->process( $_POST['vote_title'] ) ) ); + $frage = trim( $db->safesql( $parse->process( $_POST['frage'] ) ) ); + $vote_body = $db->safesql( $parse->BB_Parse( $parse->process( $_POST['vote_body'] ), false ) ); + $allow_m_vote = intval( $_POST['allow_m_vote'] ); + } else $add_vote = 0; + + // + if( $member_id['user_group'] < 3 and $ifdelete != "yes" ) { + $group_regel = array (); + foreach ( $_POST['group_extra'] as $key => $value ) { + if( $value ) $group_regel[] = intval( $key ) . ':' . intval( $value ); + } + if( count( $group_regel ) ) $group_regel = implode( "||", $group_regel ); + else $group_regel = ""; + } else $group_regel = ''; + + $no_permission = FALSE; + $okdeleted = FALSE; + $okchanges = FALSE; + + $db->query( "SELECT id, title, autor, category, approve, tags FROM " . PREFIX . "_post where id = '$id'" ); + + while ( $row = $db->get_row() ) { + $item_db[0] = $row['id']; + $item_db[1] = $row['autor']; + $item_db[2] = $row['tags']; + $item_db[3] = $row['approve']; + $item_db[4] = $db->safesql( $row['title'] ); + $item_db[5] = explode( ',', $row['category'] ); + } + + $db->free(); + + if( $item_db[0] ) { + $have_perm = 0; + if( $user_group[$member_id['user_group']]['allow_all_edit'] ) $have_perm = 1; + if( $user_group[$member_id['user_group']]['allow_edit'] and $item_db[1] == $member_id['name'] ) {$have_perm = 1;} + + if( $ifdelete == "yes" ) { + $allow_list = explode( ',', $user_group[$member_id['user_group']]['cat_add'] ); + foreach ( $item_db[5] as $selected ) {if( $allow_list[0] != "all" AND !in_array($selected, $allow_list) ) $have_perm = 0;} + if( !$user_group[$member_id['user_group']]['moderation']) {$have_perm = 0; + }} + + if( ($member_id['user_group'] == 1) ) {$have_perm = 1;} + + if( $have_perm ) { + + if( $ifdelete != "yes" ) { + $okchanges = TRUE; + + // + $added_time = time() + ($config['date_adjust'] * 60); + $newdate = $_POST['newdate']; + + if( $_POST['allow_date'] != "yes" ) { + if( $_POST['allow_now'] == "yes" ) $thistime = date( "Y-m-d H:i:s", $added_time ); + elseif( (($newsdate = strtotime( $newdate )) === - 1) or !$newsdate ) { + msg( "error", $lang['cat_error'], $lang['addnews_erdate'], "javascript:history.go(-1)" ); + } else { + $thistime = date( "Y-m-d H:i:s", $newsdate ); + + if( ! intval( $config['no_date'] ) and $newsdate > $added_time ) { + $thistime = date( "Y-m-d H:i:s", $added_time ); + } + } + + $result = $db->query( "UPDATE " . PREFIX . "_post set title='$title', date='$thistime', short_story='$short_story', full_story='$full_story', descr='{$metatags['description']}', keywords='{$metatags['keywords']}', category='$category_list', alt_name='$alt_name', allow_comm='$allow_comm', approve='$approve', allow_main='$allow_main', allow_rate='$allow_rating', fixed='$news_fixed', votes='$add_vote', access='$group_regel', remote_addr='$remote_addr', editdate='$added_time', tags='{$_POST['tags']}', metatitle='{$metatags['title']}' WHERE id='$item_db[0]'" ); + } else { + $result = $db->query( "UPDATE " . PREFIX . "_post set title='$title', short_story='$short_story', full_story='$full_story', descr='{$metatags['description']}', keywords='{$metatags['keywords']}', category='$category_list', alt_name='$alt_name', allow_comm='$allow_comm', approve='$approve', allow_main='$allow_main', allow_rate='$allow_rating', fixed='$news_fixed', votes='$add_vote', access='$group_regel', remote_addr='$remote_addr', editdate='$added_time', tags='{$_POST['tags']}', metatitle='{$metatags['title']}' WHERE id='$item_db[0]'" ); + } + + include (SYSTEM_DIR . '/inc/newsimg/doeditimg.php'); + + if( $add_vote ) { + $count = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_poll WHERE news_id = '$item_db[0]'" ); + if( $count['count'] ) $db->query( "UPDATE " . PREFIX . "_poll set title='$vote_title', frage='$frage', body='$vote_body', multiple='$allow_m_vote' WHERE news_id = '$item_db[0]'" ); + else $db->query( "INSERT INTO " . PREFIX . "_poll (news_id, title, frage, body, votes, multiple) VALUES('$item_db[0]', '$vote_title', '$frage', '$vote_body', 0, '$allow_m_vote')" ); + } else { + $db->query( "DELETE FROM " . PREFIX . "_poll WHERE news_id='$item_db[0]'" ); + $db->query( "DELETE FROM " . PREFIX . "_poll_log WHERE news_id='$item_db[0]'" ); + } + + // + if( $member_id['user_group'] == 1 and $_POST['new_author'] != $_POST['old_author'] ) { + $_POST['new_author'] = $db->safesql( $_POST['new_author'] ); + $row = $db->super_query( "SELECT user_id FROM " . USERPREFIX . "_users WHERE name = '{$_POST['new_author']}'" ); + if( $row['user_id'] ) { + + $db->query( "UPDATE " . PREFIX . "_post SET autor='{$_POST['new_author']}' WHERE id='$item_db[0]'" ); + $db->query( "UPDATE " . PREFIX . "_images SET author='{$_POST['new_author']}' WHERE news_id='$item_db[0]'" ); + $db->query( "UPDATE " . PREFIX . "_files SET author='{$_POST['new_author']}' WHERE news_id='$item_db[0]'" ); + $db->query( "UPDATE " . PREFIX . "_torrents SET author='{$_POST['new_author']}' WHERE news_id='$item_db[0]'" ); + + $db->query( "UPDATE " . USERPREFIX . "_users SET news_num=news_num+1 where user_id='{$row['user_id']}'" ); + $db->query( "UPDATE " . USERPREFIX . "_users SET news_num=news_num-1 where name='$item_db[1]'" ); + } else { + msg( "error", $lang['addnews_error'], $lang['edit_no_author'], "javascript:history.go(-1)" ); + } + } + + // + if( $_POST['tags'] != $item_db[2] or $approve != $item_db[3] ) { + $db->query( "DELETE FROM " . PREFIX . "_tags WHERE news_id = '$item_db[0]'" ); + if( $_POST['tags'] != "" and $approve ) { + $tags = array (); + $_POST['tags'] = explode( ",", $_POST['tags'] ); + foreach ( $_POST['tags'] as $value ) { + $tags[] = "('" . $item_db[0] . "', '" . trim( $value ) . "')"; + } + $tags = implode( ", ", $tags ); + $db->query( "INSERT INTO " . PREFIX . "_tags (news_id, tag) VALUES " . $tags ); + } + } + + } else { + + $db->query( "DELETE FROM " . PREFIX . "_post WHERE id='$item_db[0]'" ); + $db->query( "DELETE FROM " . PREFIX . "_comments WHERE post_id='$item_db[0]'" ); + $db->query( "DELETE FROM " . PREFIX . "_poll WHERE news_id='$item_db[0]'" ); + $db->query( "DELETE FROM " . PREFIX . "_poll_log WHERE news_id='$item_db[0]'" ); + $db->query( "DELETE FROM " . PREFIX . "_rate WHERE type_id='$item_db[0]' AND type=1" ); + $db->query( "DELETE FROM " . PREFIX . "_tags WHERE news_id = '$item_db[0]'" ); + $db->query( "UPDATE " . USERPREFIX . "_users set news_num=news_num-1 where name='$item_db[1]'" ); + + $okdeleted = TRUE; + + $db->query("SELECT id, link, thumb FROM " . PREFIX . "_covers WHERE newsid = '$item_db[0]'"); + + while($row_covers = $db->get_row()){ + + @unlink(ROOT_DIR."/uploads".$row_covers['link']); + @unlink(ROOT_DIR."/uploads".$row_covers['thumb']); + + } + + $db->query("DELETE FROM " . PREFIX . "_covers WHERE newsid = '$item_db[0]'"); + + $row = $db->super_query( "SELECT images FROM " . PREFIX . "_images where news_id = '$item_db[0]'" ); + + $listimages = explode( "|||", $row['images'] ); + + if( $row['images'] != "" ) foreach ( $listimages as $dataimages ) { + $url_image = explode( "/", $dataimages ); + + if( count( $url_image ) == 2 ) { + + $folder_prefix = $url_image[0] . "/"; + $dataimages = $url_image[1]; + + } else { + + $folder_prefix = ""; + $dataimages = $url_image[0]; + + } + + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . $dataimages ); + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . "thumbs/" . $dataimages ); + } + + $db->query( "DELETE FROM " . PREFIX . "_images WHERE news_id = '$item_db[0]'" ); + + $db->query("SELECT id, onserver FROM " . PREFIX . "_torrents WHERE news_id = '$item_db[0]'"); + + while($row_torrents = $db->get_row()){ + @unlink(ROOT_DIR."/uploads/torrents/".$row_torrents['onserver']); + } + + //$db->query("DELETE FROM " . PREFIX . "_torrents WHERE news_id = '$item_db[0]'"); + $db->query( "UPDATE " . PREFIX . "_torrents SET flags=1 where news_id='$item_db[0]'" ); + + $db->query( "SELECT id, onserver FROM " . PREFIX . "_files WHERE news_id = '$item_db[0]'" ); + + while ( $row = $db->get_row() ) { + + @unlink( ROOT_DIR . "/uploads/files/" . $row['onserver'] ); + } + $db->query( "DELETE FROM " . PREFIX . "_files WHERE news_id = '$item_db[0]'" ); + } + } else + $no_permission = TRUE; + } + + $cache->clear(); + + if( ! $_SESSION['admin_referrer'] ) { + + $_SESSION['admin_referrer'] = "?mod=editnews&action=list"; + + } + if( $no_permission ) { + msg( "error", $lang['addnews_error'], $lang['edit_denied'], $_SESSION['admin_referrer'] ); + } elseif( $okdeleted ) { + msg( "info", $lang['edit_delok'], $lang['edit_delok_1'], $_SESSION['admin_referrer'] ); + } elseif( $okchanges ) { + msg( "info", $lang['edit_alleok'], $lang['edit_alleok_1'], $_SESSION['admin_referrer'] ); + } else { + msg( "error", $lang['addnews_error'], $lang['edit_allerr'], $_SESSION['admin_referrer'] ); + } +} +?> \ No newline at end of file diff --git a/system/inc/editusers.php b/system/inc/editusers.php new file mode 100644 index 0000000..c5986a7 --- /dev/null +++ b/system/inc/editusers.php @@ -0,0 +1,1287 @@ + + + '; + + $grouplist = get_groups( 4 ); + + $search_name = $db->safesql( trim( htmlspecialchars( strip_tags( $_REQUEST['search_name'] ) ) ) ); + $search_mail = $db->safesql( trim( htmlspecialchars( strip_tags( $_REQUEST['search_mail'] ) ) ) ); + + echo << + + +
    +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    {$lang['user_name']}
    {$lang['user_pass']}
    {$lang['user_mail']}
    {$lang['user_acc']} +
      + + +
    +
    +
    +HTML; + + if( $search_reglevel ) $group_list = get_groups( $search_reglevel ); + else $group_list = get_groups(); + + if( $search_banned == "yes" ) $ifch = "checked"; + + $search_order_user = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( ! empty( $search_order_u ) ) { + $search_order_user[$search_order_u] = 'selected'; + } else { + $search_order_user['----'] = 'selected'; + } + $search_order_reg = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( ! empty( $search_order_r ) ) { + $search_order_reg[$search_order_r] = 'selected'; + } else { + $search_order_reg['----'] = 'selected'; + } + $search_order_last = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( ! empty( $search_order_l ) ) { + $search_order_last[$search_order_l] = 'selected'; + } else { + $search_order_last['----'] = 'selected'; + } + $search_order_news = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( ! empty( $search_order_n ) ) { + $search_order_news[$search_order_n] = 'selected'; + } else { + $search_order_news['----'] = 'selected'; + } + $search_order_coms = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( ! empty( $search_order_c ) ) { + $search_order_coms[$search_order_c] = 'selected'; + } else { + $search_order_coms['----'] = 'selected'; + } + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang['user_name']}[?]{$lang['edit_regdate']}{$lang['edit_fdate']} + +{$lang['edit_tdate']} + +
    {$lang['user_mail']}[?]{$lang['edit_entedate']}{$lang['edit_fdate']} + +{$lang['edit_tdate']} + +
    {$lang['user_banned']}{$lang['edit_newsnum']}{$lang['edit_fdate']}[?]{$lang['edit_tdate']}[?]
    {$lang['user_acc']} + {$lang['edit_comsnum']}{$lang['edit_fdate']}[?]{$lang['edit_tdate']}[?]
    {$lang['user_order']}
    {$lang['user_name']}{$lang['user_reg']}{$lang['user_last']}{$lang['user_news']}{$lang['user_coms']}
    + + + + +
      + + + + + +
    +
    +
    +HTML; + + $where = array (); + + if( ! empty( $search ) ) { + $where[] = "name like '$search_name%'"; + } + if( ! empty( $search_mail ) ) { + $where[] = "email='$search_mail'"; + } + if( ! empty( $search_banned ) ) { + $search_banned = $db->safesql( $search_banned ); + $where[] = "banned='$search_banned'"; + } + if( ! empty( $fromregdate ) ) { + $where[] = "reg_date>='" . strtotime( $fromregdate ) . "'"; + } + if( ! empty( $toregdate ) ) { + $where[] = "reg_date<='" . strtotime( $toregdate ) . "'"; + } + if( ! empty( $fromentdate ) ) { + $where[] = "lastdate>='" . strtotime( $fromentdate ) . "'"; + } + if( ! empty( $toentdate ) ) { + $where[] = "lastdate<='" . strtotime( $toentdate ) . "'"; + } + if( ! empty( $search_news_f ) ) { + $search_news_f = intval( $search_news_f ); + $where[] = "news_num>='$search_news_f'"; + } + if( ! empty( $search_news_t ) ) { + $search_news_t = intval( $search_news_t ); + $where[] = "news_num<'$search_news_t'"; + } + if( ! empty( $search_coms_f ) ) { + $search_coms_f = intval( $search_coms_f ); + $where[] = "comm_num>='$search_coms_f'"; + } + if( ! empty( $search_coms_t ) ) { + $search_coms_t = intval( $search_coms_t ); + $where[] = "comm_num<'$search_coms_t'"; + } + if( $search_reglevel ) { + $search_reglevel = intval( $search_reglevel ); + $where[] = "user_group='$search_reglevel'"; + } + + $where = implode( " AND ", $where ); + if( ! $where ) $where = "user_group < '4'"; + + $order_by = array (); + + if( ! empty( $search_order_u ) ) { + $order_by[] = "name $search_order_u"; + } + if( ! empty( $search_order_r ) ) { + $order_by[] = "reg_date $search_order_r"; + } + if( ! empty( $search_order_l ) ) { + $order_by[] = "lastdate $search_order_l"; + } + if( ! empty( $search_order_n ) ) { + $order_by[] = "news_num $search_order_n"; + } + if( ! empty( $search_order_c ) ) { + $order_by[] = "comm_num $search_order_c"; + } + + $order_by = implode( ", ", $order_by ); + if( ! $order_by ) $order_by = "reg_date asc"; + + // ------ + $query_count = "SELECT COUNT(*) as count FROM " . USERPREFIX . "_users WHERE $where"; + $result_count = $db->super_query( $query_count ); + $all_count_news = $result_count['count']; + + echo << + + +
    +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + +HTML; + + $news_per_page = 50; + $start_from = intval( $start_from ); + $i = $start_from; + + // ------ + $db->query( "SELECT user_id, name, user_group, reg_date, lastdate, news_num, comm_num, banned, r_freeze FROM " . USERPREFIX . "_users WHERE {$where} ORDER BY {$order_by} LIMIT {$start_from},{$news_per_page}" ); + + while ( $row = $db->get_row() ) { + $i ++; + + $last_login = langdate( 'd/m/Y - H:i', $row['lastdate'] ); + $user_name = "" . $row[name] . ""; + if( $row[news_num] == 0 ) { + $news_link = "$row[news_num]"; + } else { + $news_link = "[" . $row[news_num] . "]"; + } + if( $row[comm_num] == 0 ) { + $comms_link = $row['comm_num']; + } else { + $comms_link = "[" . $row[comm_num] . "]"; + } + $user_delete = "[" . $lang[user_del] . "]"; + + if( $row['banned'] == 'yes' ) $user_level = "" . $lang['user_ban'] . ""; + else $user_level = $user_group[$row['user_group']]['group_name']; + + if( $row['user_group'] == 1 ) $user_delete = ""; + + echo " + + + + + + + + "; + } + $db->free(); + + $npp_nav = ""; + + if( $start_from > 0 ) { + $previous = $start_from - $news_per_page; + $npp_nav .= "<< $lang[edit_prev]"; + } + + // pagination + + + if( $all_count_news > $news_per_page ) { + $npp_nav .= " [ "; + $enpages_count = @ceil( $all_count_news / $news_per_page ); + $enpages_start_from = 0; + $enpages = ""; + for($j = 1; $j <= $enpages_count; $j ++) { + if( $enpages_start_from != $start_from ) { + $enpages .= "$j "; + } else { + $enpages .= " $j "; + } + $enpages_start_from += $news_per_page; + } + $npp_nav .= $enpages; + $npp_nav .= " ] "; + } + + // pagination + + + if( $all_count_news > $i ) { + $how_next = $all_count_news - $i; + if( $how_next > $news_per_page ) { + $how_next = $news_per_page; + } + $npp_nav .= "$lang[edit_next] $how_next >>"; + } + + echo << + +
    {$lang['user_name']}{$lang['user_reg']} {$lang['user_last']} {$lang['user_news']}{$lang['user_coms']}{$lang['user_acc']}{$lang['user_action']}
    +  $user_name"; + echo (langdate( "d/m/Y - H:i", $row['reg_date'] )); + echo "  + $last_login  + $news_link + $comms_link +  $user_level + [$lang[user_edit]] $user_delete [$lang[bb_b_mail]] [$lang[nl_pm]] +
    {$npp_nav}
    +
    + + + + +
    +
    +
    +HTML; + + echofooter(); +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "adduser" ) { + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" );} + + if( ! $_POST['regusername'] ) {msg( "error", $lang['user_err'], $lang['user_err_1'], "javascript:history.go(-1)" );} + + if( preg_match( "/[\||\'|\<|\>|\"|\!|\$|\@|\&\~\*\+]/", $_POST['regusername'] ) ) msg( "error", $lang['user_err'], $lang['user_err_1'], "javascript:history.go(-1)" ); + + if( ! $_POST['regpassword'] ) {msg( "error", $lang['user_err'], $lang['user_err_2'], "javascript:history.go(-1)" );} + if( empty( $_POST['regemail'] ) OR @count(explode("@", $_POST['regemail'])) != 2) {msg( "error", $lang['user_err_1'], $lang['user_err_1'], "javascript:history.go(-1)" );} + + $not_allow_symbol = array ("\x22", "\x60", "\t", '\n', '\r', "\n", "\r", '\\', ",", "/", "", "#", ";", ":", "~", "[", "]", "{", "}", ")", "(", "*", "^", "%", "$", "<", ">", "?", "!", '"', "'", " " ); + $regemail = $db->safesql(trim( str_replace( $not_allow_symbol, '', strip_tags( stripslashes( $_POST['regemail'] ) ) ) ) ); + + $row = $db->super_query( "SELECT name, email FROM " . USERPREFIX . "_users WHERE name = '$regusername' OR email = '$regemail'" ); + + if( $row['name'] ) {msg( "error", $lang['user_err'], $lang['user_err_3'], "javascript:history.go(-1)" );} + if( $row['email'] ) {msg( "error", $lang['user_err'], $lang['user_err_4'], "javascript:history.go(-1)" );} + + $add_time = time() + ($config['date_adjust'] * 60); + $regpassword = md5( md5( $_POST['regpassword'] ) ); + + $reglevel = intval( $_POST['reglevel'] ); + + if ( $member_id['user_group'] != 1 AND $reglevel < 2 ) $reglevel = 4; + + $db->query( "INSERT INTO " . USERPREFIX . "_users (name, password, email, user_group, reg_date, lastdate, info, signature, favorites) values ('$regusername', '$regpassword', '$regemail', '$reglevel', '$add_time', '$add_time','','','')" ); + + msg( "info", $lang['user_addok'], "$lang[user_ok] $regusername $lang[user_ok_1] {$user_group[$reglevel]['group_name']}", "$PHP_SELF?mod=editusers&action=list" ); +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "edituser" ) { + + if( isset( $_REQUEST['user'] ) ) { + $user = $db->safesql( strip_tags( urldecode( $_GET['user'] ) ) ); + + if( $user != "" ) { + $row = $db->super_query( "SELECT user_id FROM " . USERPREFIX . "_users WHERE name = '$user'" ); + if( ! $row['user_id'] ) die( "User not found" ); + header( "Location: ?mod=editusers&action=edituser&id=" . $row['user_id'] ); + die( "User not found" ); + } + } + + $row = $db->super_query( "SELECT " . USERPREFIX . "_users.*, " . USERPREFIX . "_banned.days, " . USERPREFIX . "_banned.descr, " . USERPREFIX . "_banned.date as banned_date FROM " . USERPREFIX . "_users LEFT JOIN " . USERPREFIX . "_banned ON " . USERPREFIX . "_users.user_id=" . USERPREFIX . "_banned.users_id WHERE user_id = '$id'" ); + + if( ! $row['user_id'] ) die( "User not found" ); + + if ($row['user_id'] != 1) $delete_link = ""; else $delete_link = ""; + + if ($member_id['user_group'] != 1 AND $row['user_group'] == 1 ) + die( $lang['edit_not_admin'] ); + + include_once SYSTEM_DIR . '/classes/parse.class.php'; + + $parse = new ParseFilter( ); + + $row['fullname'] = $parse->decodeBBCodes( $row['fullname'], false ); + $row['icq'] = $parse->decodeBBCodes( $row['icq'], false ); + $row['skype'] = $parse->decodeBBCodes( $row['skype'], false ); + $row['land'] = $parse->decodeBBCodes( $row['land'], false ); + $row['info'] = $parse->decodeBBCodes( $row['info'], false ); + $row['signature'] = $parse->decodeBBCodes( $row['signature'], false ); + $row['descr'] = $parse->decodeBBCodes( $row['descr'], false ); + $row['status'] = $parse->decodeBBCodes( $row['status'], false ); + + echo << + + +{$lang['user_edhead']} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +HTML; + + $last_date = langdate( "j F Y - H:i", $row['lastdate'] ); + $reg_date = langdate( "j F Y - H:i", $row['reg_date'] ); + + if( $row['foto'] ) { + $avatar = $config['http_home_url'] . "uploads/fotos/" . $row['foto']; + } else { + $avatar = 'http://gravatar.com/avatar/' . md5( stripslashes( $row['email'] ) ) . "?s=100&r=g&d=" . $config['http_home_url'] . 'templates/' . $config['skin'] . '/images/noavatar.png'; + } + + echo << + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {$output} + + + +
    IP:{$row['logged_ip']}
    {$lang['user_news']}{$row['news_num']}
    {$lang['user_last']}{$last_date}
    {$lang['user_reg']}{$reg_date}
    {$lang['user_mail']}
    {$lang['user_newlogin']}
    {$lang['user_newpass']}
    {$lang['user_acc']}
    {$lang['user_banned']}[?]
    {$lang['ban_date']}[?] {$endban}
    {$lang['ban_descr']}
    {$lang['restricted']}
    {$lang['restricted_date']}[?] {$end_restricted}
    {$lang['user_del_comments']}
    {$lang['opt_fullname']}
    {$lang['opt_icq']}
    Skype:
    {$lang['opt_land']}
    {$lang['repa_value']}
    {$lang['repa_do_freeze']}[?]
    {$lang['user_avatar']}
    {$lang['user_del_avatar']}
    {$lang['extra_minfo']}
    {$lang['extra_signature']}
          {$delete_link} + + + + +
    + +HTML; + + echo << +
    + + + +HTML; + +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "doedituser" ) { + + if( ! $id ) {die( $lang['user_nouser'] );} + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" );} + + $row = $db->super_query( "SELECT user_id, user_group FROM " . USERPREFIX . "_users WHERE user_id = '$id'" ); + + if( ! $row['user_id'] ) die( "User not found" ); + + if ($member_id['user_group'] != 1 AND $row['user_group'] == 1 ) + die( $lang['edit_not_admin'] ); + + $editlevel = intval( $_POST['editlevel'] ); + + if ($member_id['user_group'] != 1 AND $editlevel < 2 ) + die( $lang['admin_not_access'] ); + + include_once SYSTEM_DIR . '/classes/parse.class.php'; + + $parse = new ParseFilter( ); + + $editlogin = $db->safesql( $parse->process( $_POST['editlogin'] ) ); + $editfullname = $db->safesql( $parse->process( $_POST['editfullname'] ) ); + + if ($_POST['editicq']) $editicq = intval( $_POST['editicq'] ); else $editicq = ""; + $editskype = $db->safesql( $parse->process( $_POST['editskype'] ) ); + + $editland = $db->safesql( $parse->process( $_POST['editland'] ) ); + $editrepa = $db->safesql($parse->process($_POST['editrepa'])); + $editinfo = $db->safesql( $parse->BB_Parse( $parse->process( $_POST['editinfo'] ), false ) ); + $editsignature = $db->safesql( $parse->BB_Parse( $parse->process( $_POST['editsignature'] ), false ) ); + $editmail = $db->safesql( $parse->process( $_POST['editmail'] ) ); + $editstatus = $db->safesql( $parse->process( $_POST['editstatus'] ) ); + + if ( $_POST['banned'] ) $banned = "yes"; + + $image = $_FILES['image']['tmp_name']; + $image_name = $_FILES['image']['name']; + $image_size = $_FILES['image']['size']; + $img_name_arr = explode( ".", $image_name ); + $type = end( $img_name_arr ); + + if( $image_name != "" ) $image_name = totranslit( stripslashes( $img_name_arr[0] ) ) . "." . totranslit( $type ); + + if( is_uploaded_file( $image ) ) { + + if( $image_size < 100000 ) { + + $allowed_extensions = array ("jpg", "png", "jpe", "jpeg", "gif" ); + + if( (in_array( $type, $allowed_extensions ) or in_array( strtolower( $type ), $allowed_extensions )) and $image_name ) { + include_once SYSTEM_DIR . '/classes/thumb.class.php'; + + $res = @move_uploaded_file( $image, ROOT_DIR . "/uploads/fotos/" . $id . "." . $type ); + + if( $res ) { + + @chmod( ROOT_DIR . "/uploads/fotos/" . $id . "." . $type, 0666 ); + $thumb = new thumbnail( ROOT_DIR . "/uploads/fotos/" . $id . "." . $type ); + + if( $thumb->size_auto( $user_group[$member_id['user_group']]['max_foto'] ) ) { + $thumb->jpeg_quality( $config['jpeg_quality'] ); + $thumb->save( ROOT_DIR . "/uploads/fotos/foto_" . $id . "." . $type ); + } else { + @rename( ROOT_DIR . "/uploads/fotos/" . $id . "." . $type, ROOT_DIR . "/uploads/fotos/foto_" . $id . "." . $type ); + } + + @chmod( ROOT_DIR . "/uploads/fotos/foto_" . $id . "." . $type, 0666 ); + $foto_name = "foto_" . $id . "." . $type; + + $db->query( "UPDATE " . USERPREFIX . "_users set foto='$foto_name' WHERE user_id='$id'" ); + + } + } + + } + + @unlink( ROOT_DIR . "/uploads/fotos/" . $id . "." . $type ); + } + + if( $_POST['del_foto'] == "yes" ) { + $row = $db->super_query( "SELECT foto FROM " . USERPREFIX . "_users WHERE user_id='$id'" ); + $db->query( "UPDATE " . USERPREFIX . "_users set foto='' WHERE user_id='$id'" ); + + @unlink( ROOT_DIR . "/uploads/fotos/" . $row['foto'] ); + } + + $sql_update = "UPDATE " . USERPREFIX . "_users set user_group='$editlevel', status='$editstatus', banned='$banned', r_freeze='$r_freeze', icq='$editicq', skype='$editskype', repa=$editrepa, land='$editland', info='$editinfo', signature='$editsignature', email='$editmail', fullname='$editfullname'"; + +if ($row['user_group'] != $editlevel) +{ + $cache->delete('user_color.php'); +} + + if( trim( $editlogin ) != "" ) { + + $row = $db->super_query( "SELECT user_id FROM " . USERPREFIX . "_users WHERE name='$editlogin'" ); + + if( ! $row['user_id'] ) { + + $row = $db->super_query( "SELECT name FROM " . USERPREFIX . "_users WHERE user_id='$id'" ); + $db->query( "UPDATE " . PREFIX . "_post SET autor='$editlogin' WHERE autor='{$row['name']}'" ); + $db->query( "UPDATE " . PREFIX . "_comments SET autor='$editlogin' WHERE autor='{$row['name']}' AND is_register='1'" ); + $db->query( "UPDATE " . USERPREFIX . "_pm SET user_from='$editlogin' WHERE user_from='{$row['name']}'" ); + $db->query( "UPDATE " . PREFIX . "_images SET author='$editlogin' WHERE author='{$row['name']}'" ); + + $db->query("UPDATE " . PREFIX . "_forum_files SET file_author='$editlogin' WHERE file_author='{$row['name']}'"); + $db->query("UPDATE " . PREFIX . "_forum_forums SET f_last_poster_name='$editlogin' WHERE f_last_poster_name='{$row['name']}'"); + $db->query("UPDATE " . PREFIX . "_forum_poll_log SET member='$editlogin' WHERE member='{$row['name']}'"); + $db->query("UPDATE " . PREFIX . "_forum_posts SET post_author='$editlogin' WHERE post_author='{$row['name']}'"); + $db->query("UPDATE " . PREFIX . "_forum_sessions SET member_name='$editlogin' WHERE member_name='{$row['name']}'"); + $db->query("UPDATE " . PREFIX . "_forum_topics SET author_topic='$editlogin' WHERE author_topic='{$row['name']}'"); + $db->query("UPDATE " . PREFIX . "_forum_topics SET last_poster_name='$editlogin' WHERE last_poster_name='{$row['name']}'"); + +$db->query("UPDATE " . USERPREFIX . "_reputation set author='$editlogin' WHERE author='{$row['name']}'"); +$db->query("UPDATE " . USERPREFIX . "_reputation set komu='$editlogin' WHERE komu='{$row['name']}'"); + + $sql_update .= ", name='$editlogin'"; + } else + msg( "error", $lang['addnews_error'], $lang['user_edit_found'], "javascript:history.go(-1)" ); + } + + if( $_POST['restricted'] ) { + + $restricted = intval( $_POST['restricted'] ); + $restricted_days = intval( $_POST['restricted_days'] ); + + $sql_update .= ", restricted='$restricted'"; + + if( $restricted_days != $_POST['prev_restricted'] ) { + + $restricted_date = time() + ($config['date_adjust'] * 60); + $restricted_date = $restricted_days ? $restricted_date + ($restricted_days * 60 * 60 * 24) : ''; + + $sql_update .= ", restricted_days='$restricted_days', restricted_date='$restricted_date'"; + + } + + } else { + + $sql_update .= ", restricted='0', restricted_days='0', restricted_date=''"; + + } + + if( trim( $editpass ) != "" ) { + $editpass = md5( md5( $_POST['editpass'] ) ); + $sql_update .= ", password='$editpass'"; + } + + $sql_update .= " WHERE user_id='$id'"; + + $db->query( $sql_update ); + + if( $banned ) { + $banned_descr = $db->safesql( $parse->BB_Parse( $parse->process( $_POST['banned_descr'] ), false ) ); + $this_time = time() + ($config['date_adjust'] * 60); + $banned_date = intval( $_POST['banned_date'] ); + $this_time = $banned_date ? $this_time + ($banned_date * 60 * 60 * 24) : 0; + + $row = $db->super_query( "SELECT users_id, days FROM " . USERPREFIX . "_banned WHERE users_id = '$id'" ); + + if( ! $row['users_id'] ) $db->query( "INSERT INTO " . USERPREFIX . "_banned (users_id, descr, date, days) values ('$id', '$banned_descr', '$this_time', '$banned_date')" ); + else { + + if( $row['days'] != $banned_date ) $db->query( "UPDATE " . USERPREFIX . "_banned set descr='$banned_descr', days='$banned_date', date='$this_time' WHERE users_id = '$id'" ); + else $db->query( "UPDATE " . USERPREFIX . "_banned set descr='$banned_descr' WHERE users_id = '$id'" ); + + } + + $cache->delete('banned.php' ); + + } else { + + $db->query( "DELETE FROM " . USERPREFIX . "_banned WHERE users_id = '$id'" ); + $cache->delete('banned.php' ); + + } + + if( $_POST['del_comments'] ) { + + $result = $db->query( "SELECT COUNT(*) as count, post_id FROM " . PREFIX . "_comments WHERE user_id='$id' AND is_register='1' GROUP BY post_id" ); + + while ( $row = $db->get_array( $result ) ) { + + $db->query( "UPDATE " . PREFIX . "_post SET comm_num=comm_num-{$row['count']} where id='{$row['post_id']}'" ); + + } + $db->free( $result ); + + $db->query( "UPDATE " . USERPREFIX . "_users set comm_num='0' where user_id ='$id'" ); + $db->query( "DELETE FROM " . PREFIX . "_comments WHERE user_id='$id' AND is_register='1'" ); + + } + + header( "Location: {$_SERVER['REQUEST_URI']}" ); + +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "dodeleteuser" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { + + die( "Hacking attempt! User not found" ); + + } + + if( ! $id ) { + die( $lang['user_nouser'] ); + } + + if( $id == 1 ) { + die( $lang['user_undel'] ); + } + + + $row = $db->super_query( "SELECT user_id, user_group, name, foto FROM " . USERPREFIX . "_users WHERE user_id='$id'" ); + + if( ! $row['user_id'] ) die( "User not found" ); + + if ($member_id['user_group'] != 1 AND $row['user_group'] == 1 ) + die( $lang['user_undel'] ); + + + $db->query( "DELETE FROM " . USERPREFIX . "_pm WHERE user_from = '{$row['name']}' AND folder = 'outbox'" ); + + @unlink( ROOT_DIR . "/uploads/fotos/" . $row['foto'] ); + + $db->query( "delete FROM " . USERPREFIX . "_users WHERE user_id='$id'" ); + $db->query( "delete FROM " . USERPREFIX . "_banned WHERE users_id='$id'" ); + $db->query( "delete FROM " . USERPREFIX . "_pm WHERE user='$id'" ); + + if ($_GET['popup'] == "yes") { + + die( "".$lang[user_ok]." ".$lang[user_delok_1]."" ); + + } else { + + msg( "info", $lang['user_delok'], "$lang[user_ok] $user $lang[user_delok_1]", "$PHP_SELF?mod=editusers&action=list" ); + + } + +} elseif( $action == "dodelcomments" ) { + if( ! $id ) { + die( $lang['user_nouser'] ); + } + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { + + die( "Hacking attempt! User not found" ); + + } + + $result = $db->query( "SELECT COUNT(*) as count, post_id FROM " . PREFIX . "_comments WHERE user_id='$id' AND is_register='1' GROUP BY post_id" ); + + while ( $row = $db->get_array( $result ) ) { + + $db->query( "UPDATE " . PREFIX . "_post set comm_num=comm_num-{$row['count']} where id='{$row['post_id']}'" ); + + } + $db->free( $result ); + + $db->query( "UPDATE " . USERPREFIX . "_users set comm_num='0' where user_id ='$id'" ); + $db->query( "DELETE FROM " . PREFIX . "_comments WHERE user_id='$id' AND is_register='1'" ); + + msg( "info", $lang['user_delok'], $lang['comm_alldel'], "$PHP_SELF?mod=editusers&action=list" ); +} +?> \ No newline at end of file diff --git a/system/inc/email.php b/system/inc/email.php new file mode 100644 index 0000000..7f3c2ee --- /dev/null +++ b/system/inc/email.php @@ -0,0 +1,188 @@ +'" ); + $replace = array ("<", ">" ); + + $reg_mail_text = preg_replace( $find, $replace, $db->safesql( $_POST['reg_mail_text'] ) ); + $feed_mail_text = preg_replace( $find, $replace, $db->safesql( $_POST['feed_mail_text'] ) ); + $lost_mail_text = preg_replace( $find, $replace, $db->safesql( $_POST['lost_mail_text'] ) ); + $new_news_text = preg_replace( $find, $replace, $db->safesql( $_POST['new_news_text'] ) ); + $news_mailv_text = preg_replace( $find,$replace, $db->safesql( $_POST['news_mailv_text'] ) ); + $news_mailn_text = preg_replace( $find,$replace, $db->safesql( $_POST['news_mailn_text'] ) ); + $new_comments_text = preg_replace( $find, $replace, $db->safesql( $_POST['new_comments_text'] ) ); + + $db->query( "UPDATE " . PREFIX . "_email set template='$reg_mail_text' where name='reg_mail'" ); + $db->query( "UPDATE " . PREFIX . "_email set template='$feed_mail_text' where name='feed_mail'" ); + $db->query( "UPDATE " . PREFIX . "_email set template='$lost_mail_text' where name='lost_mail'" ); + $db->query( "UPDATE " . PREFIX . "_email set template='$new_news_text' where name='new_news'" ); + $db->query( "UPDATE " . PREFIX . "_email set template='$news_mailv_text' where name='news_mailv'" ); + $db->query( "UPDATE " . PREFIX . "_email set template='$news_mailn_text' where name='news_mailn'" ); + $db->query( "UPDATE " . PREFIX . "_email set template='$new_comments_text' where name='comments'" ); + $db->query( "UPDATE " . PREFIX . "_email set template='$new_pm_text' where name='pm'" ); + + msg( "info", $lang['mail_addok'], $lang['mail_addok_1'], "?mod=email" ); + +} else { + + echoheader( "home", $lang['db_info'] ); + + $db->query( "SELECT name, template FROM " . PREFIX . "_email" ); + + while ( $row = $db->get_row() ) { + $$row['name'] = stripslashes( $row['template'] ); + } + $db->free(); + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + +
    {$lang['mail_reg_info']}
    + + + + +
    +
    + + + + + + + +
    {$lang['mail_feed_info']}
    + + + + +
    +
    + + + + + + + +
    {$lang['mail_lost_info']}
    +
    + + + + + +
    +
    + + + + + + + +
    BB - HTML
    +
    + + + + + +
    +
    + + + + + + + +
    BB - HTML
    +
    + + + + + + +
    +
    + + + + + + + +
    {$lang['mail_comm_info']}
    +
    + + + + + + +
    +
    + + + + + + + +
    {$lang['mail_pm_info']}
    +

      
    + +
    + +
    +HTML; + + echofooter(); +} +?> \ No newline at end of file diff --git a/system/inc/files.php b/system/inc/files.php new file mode 100644 index 0000000..f6f7f40 --- /dev/null +++ b/system/inc/files.php @@ -0,0 +1,1498 @@ +safesql( strip_tags( urldecode( $_REQUEST['author'] ) ) ); else $author = ""; +if( intval( $_REQUEST['news_id'] ) ) $news_id = intval( $_REQUEST['news_id'] ); else $news_id = 0; + + +$config_path_image_upload = ROOT_DIR . "/uploads/" . $userdir . $sub_dir; + +$config['max_image'] = $_POST['t_size'] ? $_POST['t_size'] : $config['max_image']; + +$thumb_size = $config['max_image']; +$thumb_size = explode ("x", $thumb_size); + +if ( count($thumb_size) == 2) {$thumb_size = intval($thumb_size[0]) . "x" . intval($thumb_size[1]); +} else {$thumb_size = intval( $thumb_size[0] );} + +$config['max_image'] = $thumb_size; + +if( ! @is_dir( $config_path_image_upload ) ) msg( "error", $lang['addnews_denied'], "Directory {$userdir} not found" ); + +if( $action == "doimagedelete" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" );} + if( ! isset( $_POST['images'] ) ) {msg( "info", $lang['images_delerr'], $lang['images_delerr_1'], "$PHP_SELF?mod=files" );} + + foreach ( $_POST['images'] as $image ) { + @unlink( $config_path_image_upload . $image ); + @unlink( $config_path_image_upload . "thumbs/" . $image ); + } + $action = ""; +} + +if( $action == "quick" ) { + header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); + header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . " GMT" ); + header( "Cache-Control: no-store, no-cache, must-revalidate" ); + header( "Cache-Control: post-check=0, pre-check=0", false ); + header( "Pragma: no-cache" ); + + $sess_id = session_id(); + + if( $user_group[$member_id['user_group']]['allow_file_upload'] or $user_group[$member_id['user_group']]['allow_tor_upload'] ) { + if( ! $config['max_file_size'] ) $max_file_size = 0; + elseif( $config['max_file_size'] > $config['max_up_size'] ) $max_file_size = ( int ) $config['max_file_size']; + else $max_file_size = ( int ) $config['max_up_size']; + if( $max_file_size ) $max_file_size = $max_file_size . " KB"; + } else { + $max_file_size = $config['max_up_size'] . " KB"; + } + $config['max_file_count'] = intval( $config['max_file_count'] ); + + echo << + + + +Upload + + + + + + + + + + + + + + + + + + + + + + + + + +
    +HTML; + + echo << + + +JSCRIPT; + + echo ""; +} + +else { + echoheader( "files", $lang['images_head'] ); + + echo << + + + + + + + + + + + + + + + +
    +HTML; +} + +if( $_REQUEST['subaction'] == "deluploads" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" );} + + $row = $db->super_query( "SELECT images FROM " . PREFIX . "_images where author = '$author' AND news_id = '$news_id'" ); + + $listimages = explode( "|||", $row['images'] ); + + if( isset( $_POST['images'] ) ) foreach ( $_POST['images'] as $image ) { + + $i = 0; + + sort( $listimages ); + reset( $listimages ); + + foreach ( $listimages as $dataimages ) { + + if( $dataimages == $image ) { + $url_image = explode( "/", $image ); + if( count( $url_image ) == 2 ) { + $folder_prefix = $url_image[0] . "/"; + $image = $url_image[1]; + } else { + $folder_prefix = ""; + $image = $url_image[0]; + } + unset( $listimages[$i] ); + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . $image ); + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . "thumbs/" . $image ); + } + $i ++; + } + } + + if( count( $listimages ) ) $row['images'] = implode( "|||", $listimages ); + else $row['images'] = ""; + + $db->query( "UPDATE " . PREFIX . "_images set images='$row[images]' where author = '$author' AND news_id = '$news_id'" ); + + if( count( $_POST['static_files'] ) ) { + + foreach ( $_POST['static_files'] as $file ) { + + $file = intval( $file ); + + $row = $db->super_query( "SELECT id, name, onserver FROM " . PREFIX . "_static_files WHERE author = '$author' AND static_id = '$news_id' AND id='$file'" ); + + if( $row['id'] and $row['onserver'] ) { + + @unlink( ROOT_DIR . "/uploads/files/" . $row['onserver'] ); + $db->query( "DELETE FROM " . PREFIX . "_static_files WHERE id='{$row['id']}'" ); + + } else { + + if( $row['id'] ) { + $url_image = explode( "/", $row['name'] ); + + if( count( $url_image ) == 2 ) { + + $folder_prefix = $url_image[0] . "/"; + $image = $url_image[1]; + + } else { + + $folder_prefix = ""; + $image = $url_image[0]; + + } + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . $image ); + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . "thumbs/" . $image ); + $db->query( "DELETE FROM " . PREFIX . "_static_files WHERE id='{$row['id']}'" ); + } + } + } + } + + if( count( $_POST['files'] ) ) { + foreach ( $_POST['files'] as $file ) { + $file = intval( $file ); + $row = $db->super_query( "SELECT id, onserver FROM " . PREFIX . "_files where author = '$author' AND news_id = '$news_id' AND id='$file'" ); + @unlink( ROOT_DIR . "/uploads/files/" . $row['onserver'] ); + $db->query( "DELETE FROM " . PREFIX . "_files WHERE id='{$row['id']}'" ); + } + } + + if( count( $_POST['torrents'] ) ) { + foreach ( $_POST['torrents'] as $file ) { + $file = intval( $file ); + $row = $db->super_query( "SELECT id, onserver FROM " . PREFIX . "_torrents where author = '$author' AND news_id = '$news_id' AND id='$file' AND flags='0'" ); + @unlink( ROOT_DIR . "/uploads/torrents/" . $row['onserver'] ); + $db->query( "UPDATE " . PREFIX . "_torrents SET flags='1' where id='{$row['id']}'" ); + } + } +} + +if( $_REQUEST['subaction'] == "upload" ) { + $images_number = intval($_POST['images_number']); + + if( $action == "quick" ) { + + $userdir = "posts/"; + + if( ! is_dir( ROOT_DIR . "/uploads/posts/" . FOLDER_PREFIX ) ) { + @mkdir( ROOT_DIR . "/uploads/posts/" . FOLDER_PREFIX, 0777 ); + @chmod( ROOT_DIR . "/uploads/posts/" . FOLDER_PREFIX, 0777 ); + @mkdir( ROOT_DIR . "/uploads/posts/" . FOLDER_PREFIX . "/thumbs", 0777 ); + @chmod( ROOT_DIR . "/uploads/posts/" . FOLDER_PREFIX . "/thumbs", 0777 ); + } + + if( ! is_dir( ROOT_DIR . "/uploads/posts/" . FOLDER_PREFIX ) ) {msg( "error", $lang['opt_error'], $lang['upload_error_0']." /uploads/posts/" . FOLDER_PREFIX . "/" );} + if( ! is_writable( ROOT_DIR . "/uploads/posts/" . FOLDER_PREFIX ) ) {msg( "error", $lang['opt_error'], $lang['upload_error_1']." /uploads/posts/" . FOLDER_PREFIX . "/ ".$lang['upload_error_2'] );} + if( ! is_writable( ROOT_DIR . "/uploads/posts/" . FOLDER_PREFIX . "/thumbs" ) ) {msg( "error", $lang['opt_error'], $lang['upload_error_1']." /uploads/posts/" . FOLDER_PREFIX . "/thumbs/ ".$lang['upload_error_2'] );} + + $config_path_image_upload = ROOT_DIR . "/uploads/posts/" . FOLDER_PREFIX . "/"; + } + + for($image_i = 1; $image_i < ($images_number + 1); $image_i ++) { + + $file_prefix = time() + rand( 1, 100 ); + $file_prefix .= "_"; + + $current_image = 'file_' . $image_i; + $image = $_FILES[$current_image]['tmp_name']; + $image_name = $_FILES[$current_image]['name']; + $image_size = $_FILES[$current_image]['size']; + $error_code = $_FILES[$current_image]['error']; + + if ($error_code !== UPLOAD_ERR_OK) { + switch ($error_code) { + case UPLOAD_ERR_INI_SIZE: + $error_code = 'PHP Error: The uploaded file exceeds the upload_max_filesize directive in php.ini'; break; + case UPLOAD_ERR_FORM_SIZE: + $error_code = 'PHP Error: The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'; break; + case UPLOAD_ERR_PARTIAL: + $error_code = 'PHP Error: The uploaded file was only partially uploaded'; break; + case UPLOAD_ERR_NO_FILE: + $error_code = 'PHP Error: No file was uploaded'; break; + case UPLOAD_ERR_NO_TMP_DIR: + $error_code = 'PHP Error: Missing a PHP temporary folder'; break; + case UPLOAD_ERR_CANT_WRITE: + $error_code = 'PHP Error: Failed to write file to disk'; break; + case UPLOAD_ERR_EXTENSION: + $error_code = 'PHP Error: File upload stopped by extension'; break; + default: + $error_code = 'Unknown upload error'; break; + }} + + $img_name_arr = explode( ".", $image_name ); + $type = totranslit( end( $img_name_arr ) ); + + if( $image_name != "" ) { + + $curr_key = key( $img_name_arr ); + unset( $img_name_arr[$curr_key] ); + + $image_name = totranslit( implode( ".", $img_name_arr ) ) . "." . $type; + } + + if( $config['files_allow'] == "yes" and $user_group[$member_id['user_group']]['allow_file_upload'] and $_REQUEST['action'] == "quick" and (in_array( strtolower( $type ), $allowed_files )) ) { +/* +===================================================== + , +===================================================== +*/ + +if( ! is_dir( ROOT_DIR . "/uploads/files/" . FOLDER_PREFIX ) ){ +mkdir( ROOT_DIR . "/uploads/files/" . FOLDER_PREFIX, 0777 ); +chmod( ROOT_DIR . "/uploads/files/" . FOLDER_PREFIX, 0777 ); +} + +$file_prefix = FOLDER_PREFIX.'/'.$file_prefix; + + @move_uploaded_file( $image, ROOT_DIR . "/uploads/files/" . $file_prefix . $image_name ) or $img_result = "
    {$lang['images_uperr_3']}

    {$error_code}
    "; + + if( @file_exists( ROOT_DIR . "/uploads/files/" . $file_prefix . $image_name ) ) { + + if( intval( $config['max_file_size'] ) and @filesize( ROOT_DIR . "/uploads/files/" . $file_prefix . $image_name ) > ($config['max_file_size'] * 1024) ) { + @unlink( ROOT_DIR . "/uploads/files/" . $file_prefix . $image_name ); + $img_result .= "
    $image_name -> $lang[files_too_big]
    "; + } else { + @chmod( ROOT_DIR . "/uploads/files/" . $file_prefix . $image_name, 0666 ); + $img_result .= "
    $image_name -> $lang[files_upok]
    "; + + $added_time = time() + ($config['date_adjust'] * 60); + + if( $area == "template" ) { + $db->query( "INSERT INTO " . PREFIX . "_static_files (static_id, author, date, name, onserver) values ('$news_id', '$author', '$added_time', '$image_name', '{$file_prefix}{$image_name}')" ); + } else { + $db->query( "INSERT INTO " . PREFIX . "_files (news_id, name, onserver, author, date) values ('$news_id', '$image_name', '{$file_prefix}{$image_name}', '$author', '$added_time')" ); + } + } + } + } elseif( $image_name == "" ) { + $img_result .= "
    $current_image -> $lang[images_uperr]
    "; + } elseif( ! isset( $overwrite ) and file_exists( $config_path_image_upload . $image_name ) ) { + $img_result .= "
    $current_image -> $lang[images_uperr_1]
    "; + } elseif( ! (in_array( $type, $allowed_extensions ) or in_array( strtolower( $type ), $allowed_extensions )) ) { + $img_result .= "
    $current_image -> $lang[images_uperr_2]
    "; + } elseif( $image_size > ($config['max_up_size'] * 1024) and ! $config['max_up_side'] ) { + $img_result .= "
    $current_image -> $lang[images_big]
    "; + } else { +/* +===================================================== + , +===================================================== +*/ + @move_uploaded_file( $image, $config_path_image_upload . $file_prefix . $image_name ) or $img_result = "
    {$lang['images_uperr_3']}

    {$error_code}
    "; + + if( @file_exists( $config_path_image_upload . $file_prefix . $image_name ) ) { + + @chmod( $config_path_image_upload . $file_prefix . $image_name, 0666 ); + + $img_result .= "
    $image_name -> $lang[images_upok]
    "; + + if( $action == "quick" and $area != "template" ) { + + $row = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_images where author = '$author' AND news_id = '$news_id'" ); + + if( ! $row['count'] ) { + + $added_time = time() + ($config['date_adjust'] * 60); + $inserts = FOLDER_PREFIX . "/" . $file_prefix . $image_name; + $db->query( "INSERT INTO " . PREFIX . "_images (images, author, news_id, date) values ('$inserts', '$author', '$news_id', '$added_time')" ); + + } else { + + $row = $db->super_query( "SELECT images FROM " . PREFIX . "_images where author = '$author' AND news_id = '$news_id'" ); + + if( $row['images'] == "" ) $listimages = array (); + else $listimages = explode( "|||", $row['images'] ); + + foreach ( $listimages as $dataimages ) { + + if( $dataimages == FOLDER_PREFIX . "/" . $file_prefix . $image_name ) $error_image = "stop"; + + } + + if( $error_image != "stop" ) { + + $listimages[] = FOLDER_PREFIX . "/" . $file_prefix . $image_name; + $row['images'] = implode( "|||", $listimages ); + + $db->query( "UPDATE " . PREFIX . "_images set images='{$row['images']}' where author = '$author' AND news_id = '$news_id'" ); + + } + } + } + + if( $area == "template" and $action == "quick" ) { + + $added_time = time() + ($config['date_adjust'] * 60); + $inserts = FOLDER_PREFIX . "/" . $file_prefix . $image_name; + $db->query( "INSERT INTO " . PREFIX . "_static_files (static_id, author, date, name) values ('$news_id', '$author', '$added_time', '$inserts')" ); + + } + + include_once SYSTEM_DIR . '/classes/thumb.class.php'; + if( $member_id['user_group'] > 3 ) { + $_POST['make_thumb'] = true; + $_POST['make_watermark'] = $config['allow_watermark']; + } + + if( isset( $_POST['make_thumb'] ) ) { + + $thumb = new thumbnail( $config_path_image_upload . $file_prefix . $image_name ); + + if( $thumb->size_auto( $config['max_image'], $_POST['t_seite'] ) ) { + + $thumb->jpeg_quality( $config['jpeg_quality'] ); + + if( $config['allow_watermark'] == "yes" and $_POST['make_watermark'] == "yes" ) $thumb->insert_watermark( $config['max_watermark'] ); + + $thumb->save( $config_path_image_upload . "thumbs/" . $file_prefix . $image_name ); + } + + if( @file_exists( $config_path_image_upload . "thumbs/" . $file_prefix . $image_name ) ) $img_result_th .= "
    $image_name -> $lang[images_thok]
    "; + + @chmod( $config_path_image_upload . "thumbs/" . $file_prefix . $image_name, 0666 ); + } + + + if( ($config['allow_watermark'] == "yes" and $_POST['make_watermark'] == "yes") or $config['max_up_side'] ) { + $thumb = new thumbnail( $config_path_image_upload . $file_prefix . $image_name ); + $thumb->jpeg_quality( $config['jpeg_quality'] ); + + if( $config['max_up_side'] ) $thumb->size_auto( $config['max_up_side'] ); + + if( $config['allow_watermark'] == "yes" and $_POST['make_watermark'] == "yes" ) $thumb->insert_watermark( $config['max_watermark'] ); + + $thumb->save( $config_path_image_upload . $file_prefix . $image_name ); + } + + } //if file is uploaded succesfully + + } + } + +/* +===================================================== + , +===================================================== +*/ + + $image = $_FILES["torfile"]['tmp_name']; + $image_name = $_FILES["torfile"]['name']; + $image_size = $_FILES["torfile"]['size']; + $error_code = $_FILES["torfile"]['error']; + if (!empty ($image)) + { + $img_name_arr = explode( ".", $image_name ); + $type = totranslit( end( $img_name_arr ) ); + if( $image_name != "" ) { + $curr_key = key( $img_name_arr ); + unset( $img_name_arr[$curr_key] ); + $image_name = totranslit( implode( ".", $img_name_arr ) ) . "." . $type; + } + + $tfile_prefix = FOLDER_PREFIX.'/'.$file_prefix; + +if(substr($image_name, -8) == ".torrent") { + if( ! is_dir( ROOT_DIR . "/uploads/torrents/" . FOLDER_PREFIX ) ){ + mkdir( ROOT_DIR . "/uploads/torrents/" . FOLDER_PREFIX, 0777 ); + chmod( ROOT_DIR . "/uploads/torrents/" . FOLDER_PREFIX, 0777 ); + } + + @move_uploaded_file( $image, ROOT_DIR . "/uploads/torrents/" . $tfile_prefix . $image_name ); + if( @file_exists( ROOT_DIR . "/uploads/torrents/" . $tfile_prefix . $image_name ) ) + { + @chmod( ROOT_DIR . "/uploads/torrents/" . $tfile_prefix . $image_name, 0666 ); + $img_result .= "
    $image_name -> $lang[files_upok]
    "; + +//********* Tracker by MSW *** start *********// + require_once( ROOT_DIR."/system/classes/torrent.class.php" ); + $tr_file = ROOT_DIR."/uploads/torrents/".$tfile_prefix.$image_name; + + $torrent = new Torrent($tr_file); + if($error = $torrent->errors()){ + + }else{ + $files_size = $torrent->size(); + $hash = $torrent->hash_info(); + + $e_hash = addslashes(pack("H*", $hash)); + $tr_fild = ", info_hash, size, ctime"; + $tr_info = ", '{$e_hash}', '{$files_size}', '".time()."'"; +//********* Tracker by MSW *** stop *********// + + $db->query( "INSERT INTO " . PREFIX . "_torrents (news_id, name, onserver, author {$tr_fild}) values ('$news_id', '$image_name', '{$tfile_prefix}{$image_name}', '$author' {$tr_info})" ); + } + } + } + } +} + +echo ""; +echo << + + + + + + + + +
    +
    +HTML; + +if( $action == "quick" ) { + + echo << + +
    + +HTML; + + echofooter(); + +} else { + echo << +
    + + + +HTML; +} +?> \ No newline at end of file diff --git a/system/inc/forum.php b/system/inc/forum.php new file mode 100644 index 0000000..50526aa --- /dev/null +++ b/system/inc/forum.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/system/inc/forum/email.php b/system/inc/forum/email.php new file mode 100644 index 0000000..4ba91dc --- /dev/null +++ b/system/inc/forum/email.php @@ -0,0 +1,82 @@ +'",); + + $replace = array("<", ">",); + + $subscription_text = preg_replace($find,$replace, $db->safesql($_POST['subscription_text'])); + + $db->query("UPDATE " . PREFIX . "_forum_email set template='$subscription_text' where name='subscription_text'"); + + $frend_text = preg_replace($find,$replace, $db->safesql($_POST['frend_text'])); + + $db->query("UPDATE " . PREFIX . "_forum_email set template='$frend_text' where name='frend_text'"); + + + $report_text = preg_replace($find,$replace, $db->safesql($_POST['report_text'])); + + $db->query("UPDATE " . PREFIX . "_forum_email set template='$report_text' where name='report_text'"); + + $new_topic = preg_replace($find,$replace, $db->safesql($_POST['new_topic'])); + + $db->query("UPDATE " . PREFIX . "_forum_email set template='$new_topic' where name='new_topic'"); + + + msg("info",$f_lg['email_ok'], $f_lg['email_ok2'], "?mod=forum"); + } + + else + { + $db->query("SELECT name, template FROM " . PREFIX . "_forum_email"); + + while($row = $db->get_row()) + { + $$row['name'] = stripslashes($row['template']); + } + + $db->free(); + + echo_top(); + + echo "
    "; + + echo_title($f_lg['mail_subscr']); + + echo_mail("subscription_text", $subscription_text, $f_lg['mail_subscr_']); + + echo_title($f_lg['mail_new_topic']); + + echo_mail("new_topic", $new_topic, $f_lg['mail_new_topic_']); + + echo_title($f_lg['mail_frend']); + + echo_mail("frend_text", $frend_text, $f_lg['mail_frend_']); + + echo_title($f_lg['mail_report']); + + echo_mail("report_text", $report_text, $f_lg['mail_report_']); + + echo "
    "; + + echo_bottom(); + } + +?> \ No newline at end of file diff --git a/system/inc/forum/form.php b/system/inc/forum/form.php new file mode 100644 index 0000000..df16591 --- /dev/null +++ b/system/inc/forum/form.php @@ -0,0 +1,367 @@ + + + + + + + + + +
    {$f_lg['cat_name']}
     
    "; +} + +function echo_forum($type, $id = false, $sub_id = false){ + global $db, $f_lg, $user_group, $category_list, $forum_list, $sub_id; + + if ($type == "new") + { + $act = "forum_add"; + + $button = $f_lg['button_add']; + + category_list($id); + + forum_list($sub_id); + + $access_forum = access_forum($user_group, '0'); + + $f_form['postcount'] = 1; + } + + if ($type == "edit") + { + include(SYSTEM_DIR.'/classes/parse.class.php'); + + $parse = new ParseFilter(); + + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_forums WHERE id = '$id'"); + + while ($row = $db->get_row($result)) + { + $f_form['name'] = stripslashes(preg_replace(array("'\"'", "'\''"), array(""", "'"),$row['name'])); + $f_form['description'] = stripslashes(preg_replace(array("'\"'", "'\''"), array(""", "'"),$row['description'])); + $f_form['password'] = stripslashes(preg_replace(array("'\"'", "'\''"), array(""", "'"),$row['password'])); + + $f_form['rules_name'] = stripslashes(preg_replace(array("'\"'", "'\''"), array(""", "'"),$row['rules_title'])); + + $f_form['rules'] = $parse->decodeBBCodes($row['rules'], false); + + $f_form['icon'] = stripslashes(preg_replace(array("'\"'", "'\''"), array(""", "'"),$row['icon'])); + + $sel_id = $row['main_id']; + + $forum_id = $row['id']; + + $parentid = $row['parentid']; + + $f_form['postcount'] = $row['postcount']; + + $f_form['fixpost'] = $row['fixpost']; + + $f_form['banner'] = stripslashes($row['banner']); + + $f_form['q_reply'] = intval($row['q_reply']); + + $f_form['i_edit'] = intval($row['i_edit']); + } + + $act = "forum_save&id=$forum_id"; + + $button = $f_lg['button_edit']; + + category_list($sel_id); + + forum_list($parentid); + + $access_forum = access_forum($user_group, $forum_id); + } + + echo "
    +
    {$f_lg['forum_mset']}
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$f_lg['forum_name']}
    {$f_lg['forum_descr']}
    {$f_lg['forum_icon']}[?]
    {$f_lg['password']}
    {$f_lg['forum_cat']}
    {$f_lg['forum_for']}

    + +
    {$f_lg['forum_posts_conf']}
    + + + + + + + + + + + + + + + + + +
    {$f_lg['forum_postcount']}".makeDropDown(array("1"=>$f_lg['yes'],"0"=>$f_lg['no']), "postcount", $f_form['postcount'])."
    {$f_lg['forum_fixpost']}".makeDropDown(array("1"=>$f_lg['yes'],"0"=>$f_lg['no']), "fixpost", $f_form['fixpost'])."
    {$f_lg['forum_q_reply']}".makeDropDown(array("1"=>$f_lg['yes'],"0"=>$f_lg['no']), "q_reply", $f_form['q_reply'])."
    {$f_lg['forum_i_edit']}".makeDropDown(array("1"=>$f_lg['yes'],"0"=>$f_lg['no']), "i_edit", $f_form['i_edit'])."
    +

    + +
    {$f_lg['forum_rules']}
    + + + + + + + + + +
    {$f_lg['forum_rules1']}
    {$f_lg['forum_rules2']}
    +

    + +
    {$f_lg['forum_banner']}
    + + + + + +
    {$f_lg['forum_banner2']}
    +

    + +
    {$f_lg['forum_access']}
    {$access_forum}
    + + + + + +
     
    "; +} + + +function echo_rank($type, $id = false){ + global $db, $f_lg; + + if ($type == "new") + { + $act = "rank_add"; + $button = $f_lg['button_add']; + } + + if ($type == "edit") + { + $act = "rank_save&id=$id"; + $button = $f_lg['button_edit']; + + $result = $db->super_query("SELECT * FROM " . PREFIX . "_forum_titles WHERE id = '$id'"); + + $t_name = $result['title']; + + $t_posts = $result['posts']; + + $t_pips = $result['pips']; + } + + echo "
    + + + + + + + + + + + + + + +
    {$f_lg['titles_nname']}
    {$f_lg['titles_npost']}
    {$f_lg['titles_npips']}
     
    "; +} + +if(!defined('DLE_FORUM')){ exit; } + +function echo_mail($name, $text, $description) +{ + echo " + + + + + + +
    {$description}
    "; +} + +function echo_rank_style () +{ + global $config; + $style = << +.rank { + + width: 85px; + + height: 16px; + +} + +.unit-rank { + + list-style: none; + + margin: 0px; + + padding: 0px; + + width: 85px; + + height: 16px; + + position: relative; + + background-image: url('{THEME}/forum/images/rating.gif'); + + background-position: top left; + + background-repeat: repeat-x; + +} + +.unit-rank li { + + text-indent: -90000px; + + padding: 0px; + + margin: 0px; + + float: left; + +} + +.unit-rank li a { + + display: block; + + width: 17px; + + height: 16px; + + text-decoration: none; + + text-indent: -9000px; + + z-index: 17; + + position: absolute; + + padding: 0px; + +} + +.unit-rank li a:hover { + + background-image: url('{THEME}/forum/images/rating.gif'); + + background-position: left center; + + z-index: 2; + + left: 0px; + +} + +.unit-rank a.r1-unit { left: 0px; } + +.unit-rank a.r1-unit:hover { width: 17px; } + +.unit-rank a.r2-unit { left: 17px; } + +.unit-rank a.r2-unit:hover { width: 34px; } + +.unit-rank a.r3-unit { left: 34px; } + +.unit-rank a.r3-unit:hover { width: 51px; } + +.unit-rank a.r4-unit { left: 51px; } + +.unit-rank a.r4-unit:hover { width: 68px; } + +.unit-rank a.r5-unit { left: 68px; } + +.unit-rank a.r5-unit:hover { width: 85px; } + +.unit-rank li.current-rank { + + background-image: url('{THEME}/forum/images/rating.gif'); + + background-position: left bottom; + + position: absolute; + + height: 16px; + + display: block; + + text-indent: -9000px; + + z-index: 1; + +} + +HTML; + +echo str_replace('{THEME}', $config['http_home_url'].'templates/'.$config['skin'], $style); + +} + +?> \ No newline at end of file diff --git a/system/inc/forum/forum.php b/system/inc/forum/forum.php new file mode 100644 index 0000000..c01ba98 --- /dev/null +++ b/system/inc/forum/forum.php @@ -0,0 +1,1380 @@ +init_admin(); + + $fcache = new cache($dir = ROOT_DIR . '/cache/forum'); + + $action = $_REQUEST['action']; + + switch ($action) + { +// ******************************************************************************** +// MAIN +// ******************************************************************************** + case "": + + $count_options = count($options); + + for($i=0; $i<$count_options; $i++) + { + if($member_db[1] > $options[$i]['access'] AND $options[$i]['access'] != "all") + { + unset($options[$i]); + } + } + + $forum_stats = array(); + + $row = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_forum_posts"); + $forum_stats['posts'] = $row['count']; + + $row = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_forum_topics"); + $forum_stats['topics'] = $row['count']; + + $forum_stats['licence'] = ($l_full) ? $f_lg['licence_trial'] : $f_lg['licence_full']; + + $sum_size = $db->super_query("SELECT SUM(file_size) AS sum FROM " . PREFIX . "_forum_files"); + + $forum_stats['sum_size'] = mksize($sum_size['sum']); + + if (!$forum_config['offline']) $forum_stats['line'] = $f_lg['forum_online']; + else $forum_stats['line'] = $f_lg['forum_offline']; + + $forum_stats['cache'] = mksize($fcache->size()); + + $forum_mysql = $db->query("SHOW TABLE STATUS FROM `".DBNAME."`"); + + while ($row = $db->get_array($forum_mysql)) + { + if (strpos($row['Name'], PREFIX."_forum_") !== false) + + $forum_db_size += $row['Data_length'] + $row['Index_length'] ; + } + + $db->free($forum_mysql); + + $forum_stats['db_size'] = mksize($forum_db_size); + + echo_top(); + echo_title($f_lg['m_forum']); + + echo ""; + + foreach($options as $option) + { + if ($i > 1) {echo ""; $i=0;} + + $i++; + + echo ""; + } + + echo "
    "; + + echo_bottom(w); + + echo "
    "; + + echo_top(w); echo_title($f_lg['check_updates']); echo "
    "; echo_bottom(w); + + echo "
    "; + + echo_top(w); + + echo_title($f_lg['m_stats']); + + echo_stats($forum_config, $forum_stats); + + echo_bottom(); + + break; + +// ******************************************************************************** +// CATEGORY +// ******************************************************************************** + case "category": + + echo_top(); + + echo_title($f_lg['cat_new']); + + echo_category('new'); + + echo_bottom(); + + break; + +// ******************************************************************************** +// CATEGORY ADD +// ******************************************************************************** + case "category_add": + + if ($name) + { + $result_posi = $db->super_query("SELECT * FROM " . PREFIX . "_forum_category ORDER BY posi DESC LIMIT 1"); + + $posi = $result_posi['posi']; + + if (!$posi) $posi = '1'; else $posi = ($posi+1); + + $name = $db->safesql($_POST['name']); + + $db->query("INSERT INTO " . PREFIX . "_forum_category (cat_name, posi) values ('$name', '$posi')"); + + $fcache->delete('start_id'); + $fcache->delete('cats_array'); + + msg("info",$f_lg['cat_ok_add1'], $f_lg['cat_ok_add2'], "?mod=forum"); + } + + else msg("error",$f_lg['error'],$f_lg['cat_err_name'], "?mod=forum&action=category"); + + break; + +// ******************************************************************************** +// CATEGORY EDIT +// ******************************************************************************** + case "category_edit": + + $row = $db->super_query("SELECT * FROM " . PREFIX . "_forum_category WHERE sid = '$sid'"); + + $name = stripslashes(preg_replace(array("'\"'", "'\''"), array(""", "'"),$row['cat_name'])); + + $sid = $row['sid']; + + echo_top(); + + echo_title($f_lg['cat_edit']); + + echo_category('edit', $name, $sid); + + echo_bottom(); + + break; + +// ******************************************************************************** +// CATEGORY SAVE +// ******************************************************************************** + case "category_save": + + $name = $db->safesql($_POST['name']); + + if (!$name) + { + msg("error",$f_lg['error'],$f_lg['cat_err_name'], "javascript:history.go(-1)"); + } + + $db->query("UPDATE " . PREFIX . "_forum_category SET cat_name = '$name' WHERE sid = '$sid'"); + + $fcache->delete('start_id'); + $fcache->delete('cats_array'); + + msg("info",$f_lg['cat_ok_edit1'], $f_lg['cat_ok_edit2'], "?mod=forum&action=content"); + + break; + +// ******************************************************************************** +// CATEGORY DEL +// ******************************************************************************** + case "category_del": + + $category_result = $db->query("SELECT * FROM " . PREFIX . "_forum_forums WHERE main_id = '$sid'"); + + while ($myrow = $db->get_row($category_result)) + { + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_topics WHERE forum_id = '$myrow[id]'"); + + while ($row = $db->get_row($result)) + { + $db->query("DELETE FROM " . PREFIX . "_forum_posts WHERE topic_id = '$row[tid]'"); + } + + $db->query("DELETE FROM " . PREFIX . "_forum_topics WHERE forum_id = '$myrow[id]'"); + + $db->query("DELETE FROM " . PREFIX . "_forum_forums WHERE id = '$myrow[id]'"); + +// + +$result = $db->query("SELECT * FROM " . PREFIX . "_forum_files WHERE forum_id = '" . $myrow['id'] . "'"); + +while ($row = $db->get_row($result)) { + +if ($row['file_type'] == "file") { + +unlink(UPLOAD_DIR."files/" . $row['onserver']); + +} elseif ($row['file_type'] == "thumb") { + +unlink(UPLOAD_DIR."thumbs/" . $row['onserver']); + +unlink(UPLOAD_DIR."images/" . $row['onserver']); + +} else { + +unlink(UPLOAD_DIR."images/" . $row['onserver']); + +} + +} + +$db->query("DELETE FROM " . PREFIX . "_forum_files WHERE forum_id = '" . $myrow['id'] . "'"); + +// + } + + $db->query("DELETE FROM " . PREFIX . "_forum_category WHERE sid = '$sid'"); + + $fcache->delete('start_id'); + $fcache->delete('cats_array'); + $fcache->delete('forums_array'); + $fcache->delete('sub_forums_array'); + $fcache->delete('sub_parentid'); + + $fcache->clear(); + + header("Location: ?mod=forum&action=content"); + + break; + +// ******************************************************************************** +// CATEGORY SORT +// ******************************************************************************** + case "category_sort": + + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_category"); + + while ($row = $db->get_row($result)) + { + $db->query("UPDATE " . PREFIX . "_forum_category SET posi = '".$cat_posi[$row['sid']]."' WHERE sid = '$row[sid]'"); + } + + $fcache->delete('start_id'); + $fcache->delete('cats_array'); + + header("Location: ?mod=forum&action=content"); + + break; + +// ******************************************************************************** +// CATEGORY ACCESS for forums +// ******************************************************************************** + case "access": + + $access_forum = access_forum($user_group, '0'); + + echo_top(); + + echo_title($f_lg['access_for_f']); + + echo "
    "; + + echo $access_forum; + + echo "
    "; + + echo "
    "; + + echo_bottom(); + + break; + +// ******************************************************************************** +// CATEGORY ACCESS for forums ADD +// ******************************************************************************** + case "access_add": + + if (!count($access_read)) {$access_read = array (); $access_read[] = '0';} + $access_read_mysql = $db->safesql(implode(':', $access_read)); + + if (!count($access_write)) {$access_write = array (); $access_write[] = '0';} + $access_write_mysql = $db->safesql(implode(':', $access_write)); + + if (!count($access_mod)) {$access_mod = array (); $access_mod[] = '0';} + $access_mod_mysql = $db->safesql(implode(':', $access_mod)); + + if (!count($access_topic)) {$access_topic = array (); $access_topic[] = '0';} + $access_topic_mysql = $db->safesql(implode(':', $access_topic)); + + if (!count($access_upload)) {$access_upload = array (); $access_upload[] = '0';} + $access_upload_mysql = $db->safesql(implode(':', $access_upload)); + + if (!count($access_download)) {$access_download = array (); $access_download[] = '0';} + $access_download_mysql = $db->safesql(implode(':', $access_download)); + + $db->query("UPDATE " . PREFIX . "_forum_forums SET access_read = '$access_read_mysql', access_write = '$access_write_mysql', access_mod = '$access_mod_mysql', access_topic = '$access_topic_mysql', access_upload = '$access_upload_mysql', access_download = '$access_download_mysql' WHERE main_id = '$sid'"); + + $fcache->delete('forums_array'); + + header("Location: ?mod=forum&action=content"); + + break; + +// ******************************************************************************** +// FORUM +// ******************************************************************************** + case "forum": + + echo_top(); + + echo_title($f_lg['forum_new']); + + echo_forum('new', $sid); + + echo_bottom(); + + break; + +// ******************************************************************************** +// FORUM ADD +// ******************************************************************************** + case "forum_add": + + $main_id = $db->safesql($_POST['main_id']); + + $parentid = $db->safesql($_POST['parentid']); + + if ($parentid){ + + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_forums WHERE main_id = '$main_id' and parentid = 0"); + + while ($row = $db->get_row($result)) + { + if ($row['id'] == $parentid) $test_parentid = TRUE; + } + + } + + else $test_parentid = TRUE; + + if ($_POST['name'] AND $test_parentid) + { + $result_position = $db->super_query("SELECT * FROM " . PREFIX . "_forum_forums WHERE main_id = '$main_id' ORDER BY position DESC LIMIT 1"); + + $position = $result_position['position']; + + if (!$position) $position = '1'; else $position = ($position+1); + + $name = $db->safesql($_POST['name']); + + $description = $db->safesql($_POST['description']); + + $password = $db->safesql($_POST['password']); + + $rules_name = $db->safesql($_POST['rules_name']); + + $icon = $db->safesql($_POST['icon']); + + $postcount = intval($_POST['postcount']); + + $fixpost = intval($_REQUEST['fixpost']); + + $banner = $db->safesql($_POST['banner']); + + $q_reply = intval($_POST['q_reply']); + + $i_edit = intval($_POST['i_edit']); + + include(SYSTEM_DIR.'/classes/parse.class.php'); + + $parse = new ParseFilter(Array(), Array(), 1, 1); + + $rules = $db->safesql($parse->BB_Parse($parse->process($_POST['rules']), false)); + + // ACCESS // + if (!count($access_read)) {$access_read = array (); $access_read[] = '0';} + $access_read_mysql = $db->safesql(implode(':', $access_read)); + + if (!count($access_write)) {$access_write = array (); $access_write[] = '0';} + $access_write_mysql = $db->safesql(implode(':', $access_write)); + + if (!count($access_mod)) {$access_mod = array (); $access_mod[] = '0';} + $access_mod_mysql = $db->safesql(implode(':', $access_mod)); + + if (!count($access_topic)) {$access_topic = array (); $access_topic[] = '0';} + $access_topic_mysql = $db->safesql(implode(':', $access_topic)); + + if (!count($access_upload)) {$access_upload = array (); $access_upload[] = '0';} + $access_upload_mysql = $db->safesql(implode(':', $access_upload)); + + if (!count($access_download)) {$access_download = array (); $access_download[] = '0';} + $access_download_mysql = $db->safesql(implode(':', $access_download)); + + $db->query("INSERT INTO " . PREFIX . "_forum_forums (parentid, main_id, name, description, position, access_read, access_write, access_mod, access_topic, access_upload, access_download, password, rules_title, rules, icon, postcount, fixpost, banner, q_reply, i_edit) values ('$parentid', '$main_id', '$name', '$description', '$position', '$access_read_mysql', '$access_write_mysql', '$access_mod_mysql', '$access_topic_mysql', '$access_upload_mysql', '$access_download_mysql', '$password', '$rules_name', '$rules', '$icon', '$postcount', '$fixpost', '$banner', '$q_reply', '$i_edit')"); + + $fcache->delete('forums_array'); + $fcache->delete('sub_forums_array'); + $fcache->delete('sub_parentid'); + + $fcache->clear(); + + msg("info",$f_lg['forum_ok_add1'], $f_lg['forum_ok_add2'], "?mod=forum"); + } + + else msg("error",$f_lg['error'],$f_lg['forum_err_name'], "?mod=forum&action=forum"); + + break; + +// ******************************************************************************** +// FORUM EDIT +// ******************************************************************************** + case "forum_edit": + + echo_top(); + + echo_title($f_lg['forum_edit']); + + echo_forum('edit', $id); + + echo_bottom(); + + break; + +// ******************************************************************************** +// FORUM SAVE +// ******************************************************************************** + case "forum_save": + + $main_id = $db->safesql($_POST['main_id']); + + $parentid = $db->safesql($_POST['parentid']); + + if ($parentid){ + + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_forums WHERE main_id = '$main_id' and parentid = 0"); + + while ($row = $db->get_row($result)) + { + if ($row['id'] == $parentid) $test_parentid = TRUE; + } + + } + + else $test_parentid = TRUE; + + if ($_POST['name'] AND $test_parentid) + { + $name = $db->safesql($_POST['name']); + + $description = $db->safesql($_POST['description']); + + $password = $db->safesql($_POST['password']); + + $rules_name = $db->safesql($_POST['rules_name']); + + $banner = $db->safesql($_POST['banner']); + + $q_reply = intval($_POST['q_reply']); + + $i_edit = intval($_POST['i_edit']); + + include(SYSTEM_DIR.'/classes/parse.class.php'); + + $parse = new ParseFilter(Array(), Array(), 1, 1); + + $rules = $db->safesql($parse->BB_Parse($parse->process($_POST['rules']), false)); + + $icon = $db->safesql($_POST['icon']); + + $postcount = intval($_POST['postcount']); + + $fixpost = intval($_REQUEST['fixpost']); + + // ACCESS // + if (!count($access_read)) {$access_read = array (); $access_read[] = '0';} + $access_read_mysql = $db->safesql(implode(':', $access_read)); + + if (!count($access_write)) {$access_write = array (); $access_write[] = '0';} + $access_write_mysql = $db->safesql(implode(':', $access_write)); + + if (!count($access_mod)) {$access_mod = array (); $access_mod[] = '0';} + $access_mod_mysql = $db->safesql(implode(':', $access_mod)); + + if (!count($access_topic)) {$access_topic = array (); $access_topic[] = '0';} + $access_topic_mysql = $db->safesql(implode(':', $access_topic)); + + if (!count($access_upload)) {$access_upload = array (); $access_upload[] = '0';} + $access_upload_mysql = $db->safesql(implode(':', $access_upload)); + + if (!count($access_download)) {$access_download = array (); $access_download[] = '0';} + $access_download_mysql = $db->safesql(implode(':', $access_download)); + + $db->query("UPDATE " . PREFIX . "_forum_forums SET parentid = '$parentid', main_id = '$main_id', name = '$name', description = '$description', access_read = '$access_read_mysql', access_write = '$access_write_mysql', access_mod = '$access_mod_mysql', access_topic = '$access_topic_mysql', access_upload = '$access_upload_mysql', access_download = '$access_download_mysql', password = '$password', rules_title = '$rules_name', rules = '$rules', icon= '$icon', postcount = '$postcount', fixpost = '$fixpost', banner = '$banner', q_reply = '$q_reply', i_edit = '$i_edit' WHERE id = '$id'"); + + $fcache->delete('forums_array'); + $fcache->delete('sub_forums_array'); + $fcache->delete('sub_parentid'); + + $fcache->clear(); + + msg("info",$f_lg['forum_ok_edit1'], $f_lg['forum_ok_edit2'], "?mod=forum&action=content"); + } + + else msg("error",$f_lg['error'],$f_lg['forum_err_name'], "?mod=forum&action=forum"); + + break; + +// ******************************************************************************** +// FORUM DEL +// ******************************************************************************** + case "forum_del": + + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_topics WHERE forum_id = '$id'"); + + while ($row = $db->get_row($result)) + { + $db->query("DELETE FROM " . PREFIX . "_forum_posts WHERE topic_id = '$row[tid]'"); + } + + $db->query("DELETE FROM " . PREFIX . "_forum_topics WHERE forum_id = '$id'"); + + $db->query("DELETE FROM " . PREFIX . "_forum_forums WHERE id = '$id'"); + +// + +$result = $db->query("SELECT * FROM " . PREFIX . "_forum_files WHERE forum_id = '" . $id . "'"); + +while ($row = $db->get_row($result)) { + +if ($row['file_type'] == "file") { + +unlink(UPLOAD_DIR."files/" . $row['onserver']); + +} elseif ($row['file_type'] == "thumb") { + +unlink(UPLOAD_DIR."thumbs/" . $row['onserver']); + +unlink(UPLOAD_DIR."images/" . $row['onserver']); + +} else { + +unlink(UPLOAD_DIR."images/" . $row['onserver']); + +} + +} + +$db->query("DELETE FROM " . PREFIX . "_forum_files WHERE forum_id = '" . $id . "'"); + +// + + $db->query("UPDATE " . PREFIX . "_forum_forums SET parentid = 0 WHERE parentid = '$id'"); + + $fcache->delete('forums_array'); + $fcache->delete('sub_forums_array'); + $fcache->delete('sub_parentid'); + + $fcache->clear(); + + header("Location: ?mod=forum&action=content"); + + break; + +// ******************************************************************************** +// FORUM SORT +// ******************************************************************************** + case "forum_sort": + + $in_cid = intval($_REQUEST['in_cid']); + + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_forums WHERE main_id = $in_cid"); + + while ($row = $db->get_row($result)) + { + $db->query("UPDATE " . PREFIX . "_forum_forums SET position = '".$cat_posi[$row['id']]."' WHERE id = '$row[id]'"); + } + + $fcache->delete('forums_array'); + $fcache->delete('sub_forums_array'); + $fcache->delete('sub_parentid'); + + $fcache->clear(); + + header("Location: ?mod=forum&action=content"); + + break; + +// ******************************************************************************** +// CONTENT +// ******************************************************************************** + case "content": + + echo_top(); + + $sub_forums = $db->query("SELECT * FROM ". PREFIX ."_forum_forums WHERE parentid ORDER by position"); + + while ($row = $db->get_row($get_sub_forums)) + { + $sub_forum[$row['id']]['id'] = $row['id']; + $sub_forum[$row['id']]['parentid'] = $row['parentid']; + $sub_forum[$row['id']]['name'] = $row['name']; + } + + $mod_forums = $db->query("SELECT mid, forum_id, member_name, member_id FROM ". PREFIX ."_forum_moderators"); + + while ($row = $db->get_row($mod_forums)) + { + $moderators_array[$row['mid']]['mid'] = $row['mid']; + $moderators_array[$row['mid']]['forum_id'] = $row['forum_id']; + $moderators_array[$row['mid']]['member_name'] = $row['member_name']; + $moderators_array[$row['mid']]['member_id'] = $row['member_id']; + } + + $result_posi = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_forum_category"); + $result_posi = $result_posi['count']; + + $content = $db->query("SELECT c.*, f.* FROM " . PREFIX . "_forum_category AS c LEFT OUTER JOIN ". PREFIX ."_forum_forums AS f ON f.main_id=c.sid AND f.parentid = 0 ORDER BY c.posi, f.position"); + + forum_menu(); + + echo "
    "; + + for ($i = 0; $row = $db->get_row($result_content); $i = $row['sid']) + { + if ($row['sid'] != $i) + { + $ch_close++; + + if ($ch_close != 1) echo_bottom('cat'); + + echo_top('cat'); + + $category_menu = ""; + + $category_posi = category_posi($row['posi'], $row['sid'], $result_posi); + + $row['cat_name'] = stripcslashes($row['cat_name']); + + echo " + + + + + +
    "; + } + + $row['name'] = stripcslashes($row['name']); + + if ($row['name']) + { + if ($sub_forum) + { + + foreach ($sub_forum as $value) + { + if ($row['id'] == $value['parentid']) + { + $symbol_count++; + + if ($symbol_count > 1) $symbol = ", "; + + $value['name'] = stripcslashes($value['name']); + + $subforum .= $symbol."{$value['name']}"; + } + } + } + + if ($subforum) + { + $subforum = "
     - : ".$subforum; + } + + if ($row['moderators'] and $moderators_array) + { + $moderators_id = explode(":",$row['moderators']); + + foreach ($moderators_id as $u_id) + { + foreach ($moderators_array as $key => $value) + { + if ($moderators_array[$key]['member_id'] == $u_id and $moderators_array[$key]['forum_id'] == $row['id']) + { + $moderators .= "{$moderators_array[$key]['member_name']} "; + } + } + } + } + + if ($moderators) + { + $moderators = "
     : ".$moderators; + } + + $forum_menu = ""; + + if ($row['description']) + { + $row['description'] = stripcslashes($row['description']); + + $description = "
    ".$row['description'].""; + } + else + { + $description = ''; + } + + echo " + + + + + + +
    {$row[name]}{$description}{$subforum}{$moderators}{$forum_menu} 
    "; + + unset ($subforum); + + unset ($moderators); + + unset ($symbol_count); + + unset ($symbol); + } + + } + + echo_bottom('cat'); + + echo_top('action'); + + echo "
     
    "; + + echo "
    "; + + echo_bottom('action'); + echo_bottom(); + + break; + +// ******************************************************************************** +// CONTENT -> FORUMS +// ******************************************************************************** + case "content_forums": + + $sub_forums = $db->query("SELECT id, parentid, name, description FROM ". PREFIX ."_forum_forums WHERE parentid ORDER by position"); + + $sub_forum = array(); + + while ($row = $db->get_row($get_sub_forums)) + { + $sub_forum[$row['id']] = array (); + + foreach ($row as $key => $value) + { + $sub_forum[$row['id']][$key] = $value; + } + } + + $result_posi = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_forum_forums WHERE main_id = '$sid' AND parentid = 0"); + + $result_posi = $result_posi['count']; + + $content = $db->query("SELECT * FROM " . PREFIX . "_forum_category LEFT JOIN ". PREFIX ."_forum_forums ON ". PREFIX ."_forum_category.sid=". PREFIX ."_forum_forums.main_id WHERE parentid = 0 AND main_id = '$sid' ORDER BY posi, position"); + + echo_top(); + + forum_menu(); + + echo "
    "; + + echo_top('content'); + + for ($i = 0; $row = $db->get_row($content); $i = $row['sid']) + { + if ($row['sid'] != $i) + { + $row['cat_name'] = stripcslashes($row['cat_name']); + + echo_title($row['cat_name']); + } + + if ($row['name']) + { + foreach ($sub_forum as $value) + { + if ($row['id'] == $value['parentid']) + { + $value['name'] = stripcslashes($value['name']); + + $subforum .= "{$value['name']}, "; + } + } + + if ($subforum) + { + $subforum = "
     - : ".$subforum; + } + + $forum_posi = category_posi($row['position'], $row['id'], $result_posi); + + $forum_menu = ""; + + if ($row['description']) + { + $row['description'] = stripcslashes($row['description']); + + $description = "
    ".$row['description'].""; + } + + $row['name'] = stripcslashes($row['name']); + + echo " + + + + + + +
    {$row['name']}{$description}{$subforum}{$forum_posi}{$forum_menu} 
    "; + } + } + + echo_bottom('content'); + + echo_top('action'); + + echo "
     
    "; + + echo "
    "; + + echo_bottom('action'); + + echo_bottom(); + + break; + +// ******************************************************************************** +// FORUM -> SUB FORUMS +// ******************************************************************************** + case "content_sub_forums": + + $forum_row = $db->super_query("SELECT * FROM ". PREFIX ."_forum_forums WHERE id = '$id'"); + + $sid = $forum_row['main_id']; + + $sub_forums = $db->query("SELECT * FROM ". PREFIX ."_forum_forums WHERE parentid = '$id' ORDER by position"); + + $result_posi = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_forum_forums WHERE parentid = '$id'"); + + $result_posi = $result_posi['count']; + + echo_top(); + + echo_top('content'); + + forum_menu(); + + echo "
    "; + + $forum_row['name'] = stripcslashes($forum_row['name']); + + echo_title($forum_row['name']); + + while ($row = $db->get_row($sub_forums)) + { + $forum_posi = category_posi($row['position'], $row['id'], $result_posi); + + $forum_menu = ""; + + if ($row['description']) + { + $row['description'] = stripcslashes($row['description']); + + $description = "
    ".$row['description'].""; + } + + $row['name'] = stripcslashes($row['name']); + + echo " + + + + + + +
    {$row['name']}{$description}{$subforum}{$forum_posi}{$forum_menu} 
    "; + } + + echo_bottom('content'); + + echo_top('action'); + + echo "
     
    "; + + echo "
    "; + + echo_bottom('action'); + + echo_bottom(); + + break; + +// ******************************************************************************** +// TOOLS +// ******************************************************************************** + case "tools": + + echo_top(); + + echo "
    "; + + require_once SYSTEM_DIR.'/inc/forum/tools.php'; + + echo_top('tools_save'); + + echo "
    "; + + echo_bottom('tools_save'); + + echo_bottom(); + + break; + +// ******************************************************************************** +// TOOLS SAVE +// ******************************************************************************** + case "tools_save": + + if (!count($search_captcha)) {$search_captcha = array (); $search_captcha[] = '0';} + $save_con[search_captcha] = $db->safesql(implode(':', $search_captcha)); + + if (!count($topic_captcha)) {$topic_captcha = array (); $topic_captcha[] = '0';} + $save_con[topic_captcha] = $db->safesql(implode(':', $topic_captcha)); + + if (!count($post_captcha)) {$post_captcha = array (); $post_captcha[] = '0';} + $save_con[post_captcha] = $db->safesql(implode(':', $post_captcha)); + + if (!count($tools_upload)) {$tools_upload = array (); $tools_upload[] = '0';} + $save_con[tools_upload] = $db->safesql(implode(':', $tools_upload)); + + if (!count($tools_poll)) {$tools_poll = array (); $tools_poll[] = '0';} + $save_con[tools_poll] = $db->safesql(implode(':', $tools_poll)); + + $find[] = "'\r'"; + $replace[] = ""; + $find[] = "'\n'"; + $replace[] = ""; + + $save_con = $save_con + $forum_config; + + $handler = fopen(SYSTEM_DIR.'/data/forum_config.php', "w"); + + fwrite($handler, " $value) + { + $value=trim(stripslashes ($value)); + $value=htmlspecialchars ($value, ENT_QUOTES); + $value = preg_replace($find,$replace,$value); + fwrite($handler, "'{$name}' => \"{$value}\",\n\n"); + } + + fwrite($handler, ");\n\n?>"); + fclose($handler); + + msg("info", $f_lg['t_f_save'], "$f_lg[t_f_save1]

    $f_lg[db_prev]"); + + break; + +// ******************************************************************************** +// RANK +// ******************************************************************************** + case "rank": + + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_titles"); + + echo_top(); + + echo_title($f_lg['titles_main']); + + echo_rank_style (); + + echo " + + + + +
    {$f_lg['titles_name']}
    {$f_lg['titles_pots']}
    {$f_lg['titles_pips']}
    {$f_lg['titles_action']}
    "; + + while ($row = $db->get_row($result)) + { + $t_action = "[{$f_lg['label_edit']}]"." [{$f_lg['label_del']}]"; + + $rating = $row['pips'] * 17; + + $rank_image = "
    +
      +
    • {$rating}
    • +
    +
    "; + + echo " + + + + + "; + } + + echo "
    {$row['title']}
    {$row['posts']}
    {$rank_image}
    {$t_action}
    "; + + echo_bottom('w'); + + echo_top('w'); + + echo_title($f_lg['titles_uadd']); + + echo "
    + + + + + + + + + + + + + + +
    {$f_lg['titles_uname']}
    {$f_lg['titles_urname']}
    {$f_lg['titles_npips']}
     
    "; + + echo_bottom('w'); + + echo_top('w'); + + echo_title($f_lg['titles_add']); + + echo_rank('new'); + + echo_bottom(); + + break; + + case "rank_add": + + if ($t_name) + { + $db->query("INSERT INTO " . PREFIX . "_forum_titles (posts, title, pips) values ('$t_posts', '$t_name', '$t_pips')"); + + $fcache->delete('rank_array'); + + header("Location: ?mod=forum&action=rank"); + } + + break; + + case "rank_edit": + + echo_top(); + + echo_title($f_lg['titles_edit']); + + echo_rank('edit', $id); + + echo_bottom(); + + break; + + case "rank_save": + + if ($t_name and $id) + { + $db->query("UPDATE " . PREFIX . "_forum_titles SET title = '$t_name', posts = '$t_posts', pips = '$t_pips' WHERE id = '$id'"); + + $fcache->delete('rank_array'); + + header("Location: ?mod=forum&action=rank"); + } + + break; + + case "rank_del": + + $db->query("DELETE FROM " . PREFIX . "_forum_titles WHERE id = '$id' LIMIT 1"); + + $fcache->delete('rank_array'); + + header("Location: ?mod=forum&action=rank"); + + break; + + case "rank_user": + + $user_pips = intval($user_pips); + + $db->query("SELECT * FROM " . USERPREFIX . "_users where name = '$user_name'"); + + if ($db->num_rows()) + { + $db->query("UPDATE " . PREFIX . "_users SET forum_rank = '$user_rank', forum_pips = '$user_pips' WHERE name = '$user_name'"); + + header("Location: ?mod=forum&action=rank"); + } else + { + msg("info",$f_lg['error'], $f_lg['titles_error_name'], "javascript:history.go(-1)"); + } + + break; + +// ******************************************************************************** +// NEW MODERATOR +// ******************************************************************************** + case "moderator_new": + + if ($user_found) + { + $user_found = $db->super_query("SELECT * FROM " . USERPREFIX . "_users WHERE name = '$user_found'"); + + $uid = $user_found['user_id']; + } + + if ($user_found['name']) + { + echo_top(); + + echo_title($f_lg['mod_config_set']); + + echo "
    "; + + echo ""; + + require_once SYSTEM_DIR.'/forum/admin/moderation.php'; + + echo "
    "; + + echo "
    "; + + echo "
    "; + + echo_bottom(); + } + + else + { + echo_top(); + + echo_title($f_lg['mod_search_user']); + + echo "
    "; + + echo " + + + + + + +
    {$f_lg['mod_search_name']}
     
    "; + + echo "
    "; + + echo_bottom(); + } + + break; + + case "moderator_add": + + $user_found = $db->super_query("SELECT * FROM " . USERPREFIX . "_users WHERE user_id = '$uid'"); + + if ($user_found['user_id'] and $fid) + { + $row = $db->super_query("SELECT * FROM " . PREFIX . "_forum_moderators WHERE member_id = '$uid' and forum_id = '$fid'"); + + $moderator_id = $row['mid']; + + if (!$moderator_id) + { + $db->query("INSERT INTO " . PREFIX . "_forum_moderators (member_id, member_name, forum_id) values ('$uid', '$user_found[name]', '$fid')"); + + $moderator_id = $db->insert_id(); + } + + $db->query("UPDATE " . PREFIX . "_forum_moderators SET edit_post = '$save[edit_post]', delete_topic = '$save[delete_topic]', edit_topic = '$save[edit_topic]', edit_post = '$save[edit_post]', delete_post = '$save[delete_post]', open_topic = '$save[open_topic]', close_topic = '$save[close_topic]', delete_post = '$save[delete_post]', move_topic = '$save[move_topic]', pin_topic = '$save[pin_topic]', delete_topic = '$save[delete_topic]', unpin_topic = '$save[unpin_topic]', mass_prune = '$save[mass_prune]', combining_post = '$save[combining_post]', move_post = '$save[move_post]' WHERE mid = '$moderator_id'"); + + $new_row = $db->query("SELECT mid, member_id FROM " . PREFIX . "_forum_moderators WHERE forum_id = '$fid'"); + + while ($row = $db->get_row($new_row)) + { + $update_uid[$row['member_id']] = $row['member_id']; + } + + $update_uid = implode(':', $update_uid); + + $db->query("UPDATE " . PREFIX . "_forum_forums SET moderators = '$update_uid' WHERE id = '$fid'"); + + $fcache->delete('forum_moderators'); + $fcache->delete('forums_array'); + + msg("info",$f_lg['mod_add'], $f_lg['mod_add2'], "?mod=forum&action=content"); + } + + break; + + case "moderator_edit": + + if (intval($id)) + { + $row = $db->super_query("SELECT * FROM " . PREFIX . "_forum_moderators WHERE mid = '$id'"); + + $moderator_edit = true; + + echo_top(); + + echo_title($f_lg['mod_config_set']); + + echo "
    "; + + echo ""; + + require_once SYSTEM_DIR.'/forum/admin/moderation.php'; + + echo "
    "; + + echo "
    "; + + echo "
    "; + + echo_bottom(); + } + + break; + + case "moderator_save": + + if ($id) + { + $db->query("UPDATE " . PREFIX . "_forum_moderators SET edit_post = '$save[edit_post]', delete_topic = '$save[delete_topic]', edit_topic = '$save[edit_topic]', edit_post = '$save[edit_post]', delete_post = '$save[delete_post]', open_topic = '$save[open_topic]', close_topic = '$save[close_topic]', delete_post = '$save[delete_post]', move_topic = '$save[move_topic]', pin_topic = '$save[pin_topic]', delete_topic = '$save[delete_topic]', unpin_topic = '$save[unpin_topic]', mass_prune = '$save[mass_prune]' WHERE mid = '$id'"); + + $fcache->delete('forum_moderators'); + + msg("info",$f_lg['mod_edit_ok'], $f_lg['mod_edit_ok2'], "?mod=forum&action=content"); + } + + break; + + case "moderator_del": + + if ($id) + { + $row = $db->super_query("SELECT * FROM " . PREFIX . "_forum_moderators WHERE mid = '$id'"); + + $fid = $row['forum_id']; + + if ($row['member_id']) + { + $db->query("DELETE FROM " . PREFIX . "_forum_moderators WHERE mid = '$id'"); + + $row_forum = $db->super_query("SELECT moderators FROM " . PREFIX . "_forum_forums WHERE id = '$fid'"); + + $new_row = $db->query("SELECT mid, member_id FROM " . PREFIX . "_forum_moderators WHERE forum_id = '$fid'"); + + while ($row = $db->get_row($new_row)) + { + $update_uid[$row['member_id']] = $row['member_id']; + } + + $update_uid = implode(':', $update_uid); + + $db->query("UPDATE " . PREFIX . "_forum_forums SET moderators = '$update_uid' WHERE id = '$fid'"); + + $fcache->delete('forum_moderators'); + $fcache->delete('forums_array'); + + header("Location: ?mod=forum&action=content"); + } + } + + break; + +// ******************************************************************************** +// HELP +// ******************************************************************************** + case "help": + + echoheader("", ""); + + echo_top('about'); + + echo_title("DLE Forum Version 2.4 Build 1"); + + $licence_file = @file_get_contents(SYSTEM_DIR.'/forum/sources/components/licence.odf'); + + echo "
    ".urldecode($licence_file)."
    "; + + echo_bottom('about'); + + echo_top('authors'); + + echo_title("Developers"); + + echo "
    "; + + echo "Author & Developer:  Vadim Shestakov [ShVad]

    "; + + echo "

    "; + + echo "
    WebMoney:   R164056126473    Z217028877385    E194208009125    U374273141801

    Copyright 2008 © DLE Files Group. All rights reserved.
    "; + + echo "
    "; + + echo_bottom('authors'); + + echofooter(); + + break; + +// ******************************************************************************** +// EMAIL +// ******************************************************************************** + case "email": + + require_once SYSTEM_DIR.'/inc/forum/email.php'; + + break; + +// ******************************************************************************** +// USER GROUP +// ******************************************************************************** + case "usergroup": + + require_once SYSTEM_DIR.'/inc/forum/usergroup.php'; + + break; + +// ******************************************************************************** +// SERVICE +// ******************************************************************************** + case "service": + + require_once SYSTEM_DIR.'/inc/forum/service.php'; + + break; + +// ******************************************************************************** +// CLEAR CACHE +// ******************************************************************************** + case "clear": + + $fcache->delete(); + + $fcache->clear(); + + header("Location: ?mod=forum"); + + break; + } + +?> \ No newline at end of file diff --git a/system/inc/forum/functions.php b/system/inc/forum/functions.php new file mode 100644 index 0000000..bff7917 --- /dev/null +++ b/system/inc/forum/functions.php @@ -0,0 +1,261 @@ + + +function access_check( id, value ) +{ + if (value == 'y'){ value = 1; } else { value = 0; } + + document.getElementById( 'access_mod' + '[' + id + ']' ).checked = value; + + document.getElementById( 'access_topic' + '[' + id + ']' ).checked = value; + + document.getElementById( 'access_write' + '[' + id + ']' ).checked = value; + + document.getElementById( 'access_read' + '[' + id + ']' ).checked = value; + + document.getElementById( 'access_upload' + '[' + id + ']' ).checked = value; + + document.getElementById( 'access_download' + '[' + id + ']' ).checked = value; +} + + +HTML; + + if ($forum_id) + { + $access_result = $db->query("SELECT * FROM " . PREFIX . "_forum_forums WHERE id = '$forum_id'"); + + while ($row = $db->get_row($access_result)) + { + $access_mod = $row['access_mod']; + + $access_topic = $row['access_topic']; + + $access_write = $row['access_write']; + + $access_read = $row['access_read']; + + $access_upload = $row['access_upload']; + + $access_download = $row['access_download']; + } + } + + $access_forum .= " + + + + + + + +
    {$f_lg['access_forum_group']}
    {$f_lg['access_forum_mod']}
    {$f_lg['access_forum_topic']}
    {$f_lg['access_forum_write']}
    {$f_lg['access_forum_read']}
    {$f_lg['access_forum_upload']}
    {$f_lg['access_forum_download']}
    +
    "; + + $access_forum .= ""; + + foreach($user_group as $id => $group_name) + { + if ($forum_id) + { + $access_mod_array = explode(":",$access_mod); + if (in_array($id, $access_mod_array)){$checked1 = "checked";}else{$checked1 = "";} + + $access_topic_array = explode(":",$access_topic); + if (in_array($id, $access_topic_array)){$checked2 = "checked";}else{$checked2 = "";} + + $access_write_array = explode(":",$access_write); + if (in_array($id, $access_write_array)){$checked3 = "checked";}else{$checked3 = "";} + + $access_read_array = explode(":",$access_read); + if (in_array($id, $access_read_array)){$checked4 = "checked";}else{$checked4 = "";} + + $access_upload_array = explode(":",$access_upload); + if (in_array($id, $access_upload_array)){$checked5 = "checked";}else{$checked5 = "";} + + $access_download_array = explode(":",$access_download); + if (in_array($id, $access_download_array)){$checked6 = "checked";}else{$checked6 = "";} + } + + $access_forum .= " + + + + + + + + "; + } + + $access_forum .= "
    + {$group_name[group_name]} [+ | + -] + +
    +
    +
    +
    +
    +
    "; + + return($access_forum); +} + +// ******************************************************************************** +// Category list +// ******************************************************************************** +function category_list($select_id){ + global $db, $category_list; + + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_category"); + + while ($row = $db->get_row($result)){ + + if ($row['sid'] == $select_id){$sel = "selected";} + + else {$sel = "";} + + $row['cat_name'] = stripcslashes($row['cat_name']); + + $category_list .= ""; + } + + return($category_list); +} + +// ******************************************************************************** +// Forum list +// ******************************************************************************** +function forum_list($select_id){ + global $db, $forum_list; + + $forum_list .= ""; + + $result = $db->query("SELECT * FROM " . PREFIX . "_forum_category LEFT JOIN ". PREFIX ."_forum_forums ON ". PREFIX ."_forum_category.sid=". PREFIX ."_forum_forums.main_id ORDER BY posi, position"); + + for ($i = 0; $row = $db->get_row($result_content); $i = $row['sid']){ + + if ($row['sid'] != $i) + { + $row['cat_name'] = stripcslashes($row['cat_name']); + + $forum_list .= ""; + } + + if ($row['name']) + { + if ($row['id'] == $select_id){$sel = "selected";} + + else {$sel = "";} + + $row['name'] = stripcslashes($row['name']); + + $forum_list .= ""; + } + + } + + return($forum_list); +} + +// ******************************************************************************** +// Category and Forum POSITION +// ******************************************************************************** +function category_posi($category_posi, $category_id, $result_posi){ + global $db; + + $cat_posi = array(); + + $select_posi = ""; + + return ($select_posi); +} + +// ******************************************************************************** +// SELECT USER GROUP +// ******************************************************************************** +function warn_group($warn_group = false){ + global $db; + + if ($warn_group) + { + $warn_list = explode (':', $warn_group); + } + + $db->query("SELECT * FROM " . USERPREFIX . "_usergroups GROUP BY id"); + + $group_list .= ""; + + while($row = $db->get_row()) + { + if ($warn_group) + { + if (in_array($row['id'], $warn_list)) + { + $selected = "selected"; + } else + { + $selected = ""; + } + } + + $group_list .= ""; + } + + return ($group_list); +} + +?> \ No newline at end of file diff --git a/system/inc/forum/ico/Usergroup.png b/system/inc/forum/ico/Usergroup.png new file mode 100644 index 0000000000000000000000000000000000000000..fd8a037c8c485a70a9c17df18ce979c08ee9d072 GIT binary patch literal 10056 zcmV-OC%4#%P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvp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git a/system/inc/forum/ico/category.png b/system/inc/forum/ico/category.png new file mode 100644 index 0000000000000000000000000000000000000000..375a7c5a291398162d67255f4d57f07d87b1503f GIT binary patch literal 11407 zcmW-n1yCDZ8-;@hrxYs=#fn2|i#rr36i9I?R@}9?ySuv8h3{W6(TLGNAP}aslsE*~OaAu(BLiDo)=ht4hiW6GZVv*Xzy0q6 z2TDyR0)f!vOvS_$6ilogtnE##Z78M1#3*g-tc^@93_&30rHmiH)#7dm1lMj2u~kGD z&Z?6vd_dIi%fLf8>bW?vAU%H^T;cwJU^Epx{5R=R%6-1GXi^!$o7oIa#v-A?8ez&> z+$R((MfD!8r^m;S^N($?blB6l%LKOf8(g}W-CQ#e4@s0$R>ZCfIB)d^&ad#^?MNV}NVRBeVO@}SiYW6ah>{x~Bu4&r41rP> zA)9@=bG=x{CZI_Q4%7ur7)$y#{SmJzVUqaw#o78M)n<=HwWuE92OJ~RZR+%-wD)hN zU=6M7B`m*eL2C_{RPATuo^Lw_{vvR6{M8cqmq8wJYu=g*60bb9MAEq|Bsc*Dk#|a6ybFl+RS3k{Z&EjK>bg0&F=6Yt zT0Vz1gvh!?nLR{pfvAWgL*Tc1RJ_4&^dlFj$H9atk%-iKQe3g#`IP&?c#72hLw5P_ z#iC|0+EVW?SnTk4BD91bqL+s#IYXa9+rDzd`_w2R{DpTEZvI0-96FF~KjpxMt?iwd zYd%F>M=s#qkXtnMZO_pGazSy5ipV zIqUOQN2^Je(Vb9{Q)SZrq{n)z6DLK3H5|MB9gT`Mno}BG+FWW`iY5O?zTh;DX}T=k zVYKD&zin`hcNt|;Ok*^5w0!L2aPM{_9&dl}rYveM4J1DvSLTzU&<e3rb~$y8Hg(_0g^eTNp*RX=ixq{*ad z^F5S(*uLM@Zw$;pOus=XeTH}D@7&%M5jDPJOOY)^nn_9-QevOyBuOz&#!j|YR%5(j zbjObw!A;;zP)YDifR!jI+bavrx|Eum{JXua(v*!Lt z)(Pp6#EH#K_J^2#iBXwRj8Vp}?HC-^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9`LFpE>jD#_rv_b+6ZBW>!K7BZOcf1S_T3^E?iMfL+(+AP7XEP)N_8 zKfmzA6HjbD|NQgMGV>R|bMoco>4S&3)ovp#6n^9g_a{+pGJqCZIp+NA~UCci*uS$M3%5=p6_4?Acw`Mx)(sWA@rrNFh535z0qp5x}N8mcDo%&DcNxx@;r}x-xtMV5rsm*I*wxt zg@OVQKKI;n*B*cT@zo0#E_@TfmjPVwD>v*rN{Zj>YdH*{1K?bmrsrQj`})^kKl}QG z<2XmAXQuBxe)oxc?!5EPgHuzxtIUjcyN&BNZh&YG<#HMIfjX*{3I+xSV68zE^>d^o zO_64ONF)d+Po7+rLS|tYvJirb#iA&cO0rg~$x5XH-}hN5WeSCY6Gc($$tRz@`ot4Y zEG{lCJ_g_s0P8<-N$@@_2G9d=ATM z`5TunT^{}77ruCSYHI49<9DC9_r!@4x9#4&t0ARCtJTKJ@+y`Vmry7aF*sO9wN^v9 zTt=(aMi_?K$nXdzCnsrOU_ewV73urFbQ}jlh`dxPxtA|rUV7}Y$7WxA@x?1q6nzE2 zivW_J>N}C|M8XH)s9gE9LaFhZ;SSe*16awD6cP|Qsf^r;3F|#(tgpT9*Cr_SSe*E#rmtK4Awb%1J ze+a;<0Q67&Wzl!J5&+kj`P$r#xo^(hm>c=Zm%nmge0==w6^wd;v7#tniXlT!Ails1YY_qpeuTX^D$CzdZ=x^&7I^LGF)y!Zay zPY2A~R|;Sbz}({E;r@8yadHKXLcn9~l`Lsh@rA?DG8lyjDudPN&mdU0t1TwOTI#cmcrX`*|@x zOJKfB%mrWxz|#8q#`BLp^61|X(WI2Jtoq^?KS`1ffE(K|)A#!VepbPJFQgS_UeQ`Z xYc0@!&&qCZAIPGge@E31UO)e0ogcFP-vGU%K&f%m&6@xK002ovPDHLkV1n)k7`*@h literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/discuss.png b/system/inc/forum/ico/discuss.png new file mode 100644 index 0000000000000000000000000000000000000000..1b4894d92ad8ddd3e96c7f942b88a398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4fYM`?NP9ljjeALVNPF;fpT{rF%BQVtv zFjw4EHyFy;TxnU{74i9Tul0N+^>6bYcV39vIvCl%Dr)nqZ1i0)=(e9WWl=R>q~* zRM^b!fcY(@ybh7$I~#|W5q)n{fT5zSK5yL^OB=yC4rRWwC+UjBibUj@(e zGfTyrr}#`|fl|pJ3bXuNC5lfPs1AtU7yTgxLCp{1$xXt z>Z_xU%_e!m3tG3J$9&^Q+FI8T0duQDEPS&&+q_A8j;iaFYUuETj_(*<*Kr?>-@KJQ zbukUWl!l4`rCv3<`pm$a4*`|vGzi)6@EKhLK?s{ja(JRd=YbHuRdsiks%uTHgMG^P zH?{}Nu_OKr`d{avs|RgnNg7-=>nGAqFsbl5EB$;|9fK$>81|3L9pdePY9s_g9bpM8 z$b0uX$FlfGHAb&I_RUED%q|5 z4k$gJviHe%^}O;B2a`fH2uKa=`bbR+mH#xb%Q{HTOHpd{IAuQ`cjVYW9M9I4oOya$ z$T%a}vxG_X)c(3~+G>P3b4)n}sFucH^QP}bwWs3)?Q!#ZTs{RU&(}Ru7r$4w$ZYV2QYK!a6Znd8=*dOoV8(?6upd1Wj(#oz17SmE2D^HquSRZcqv zt(gAX|9UZA*F~o=WaKNN_gGyI$G;9!EJ$#^1gCTi9%r5_H2x0c#jWP zs4meHqa%KNT<2mXXt|h458`|*WW8Cc(zsFe@TLV_8K4XT4h6+K8 zsuz79Zl5Oe!zZFdq*kv9ZfL!N@0aZ!Ash+z6jJZ zXS~N7{`xAcfEB*dSIDor^zU6CvhH2&r;&8E)0!rp=<;M1`u{Jx{=5BJ`taBE{v82u Yc$forum_bar, + '{last_visit}'=>$dle_forum_last_visit, + '{now_time}'=>langdate($forum_config['timestamp'],$_TIME), + '{STATS}'=>$tpl->result['forum_stats'], + '[search-link]'=>"", + '[/search-link]'=> '', + '[getnew-link]'=>"", + '[/getnew-link]'=> '', + '[subscription-link]'=>"", + '[/subscription-link]'=>'', + '[textversion]'=>"", + '[/textversion]'=>'',); + $f_set="set"; + $compile="compile"; + $f_get="get"; + + if(!defined('FORUM_SUB_DOMAIN')) + { + $forum_ajax="\r\n\r\n"; + $tpl->load_template($tpl_dir.'main.tpl'); + $tpl->copy_template = "{$forum_ajax}".$tpl->copy_template; + } + $tpl->$f_set('{BOARD}',$tpl->result['dle_forum']); + $tpl->$f_set('', $forum_content); + $copyrigt=true; + + $f_file_get_contents="file_get_contents"; + + $f_clear="clear"; + $tpl->$compile("content"); + $tpl->$f_clear(); +?> \ No newline at end of file diff --git a/system/inc/forum/ico/filebrowser_action.gif b/system/inc/forum/ico/filebrowser_action.gif new file mode 100644 index 0000000000000000000000000000000000000000..6fe91c180f6a8489ff62aaf439484d4b43c39fc2 GIT binary patch literal 1714 zcmb`G`BPH|0>@uMhye`7qYDblLeaKZ)`Gf7T-PQ+LmZC{t<%ySI}NkQ*p;>6m@3FD zA%xQyPA{YwMF9uo>?*DY2~Y?SAO}#$@$!O+7K;Tzke4rC zE-fvstgI-N%H`$d*49?NUN4i$rl+S76uEu-wnQSicI}#6E_dR%&*z<=pZB;uR;#t5 zq5_6t%z+IK4vvqH_x1J7%*+f747fe+H*en5)z#S$q^+&Z=k;Z0XPZnWrxQ1uEhvIy zWo3!QVh4udPABGYw70jzuyuHN*z5K6_V&V7>(J0pM@NShhTpz@J25eV}WP(P};lO5RXI(D$ty{NnC+_umi;IgbX7l9aq}%Pe zbLWl|!}NMxNlA&#hFD>%R;zve`gLh(>FVlgUS3{TS65F@&(o(*M@L5=Ja|xFU!R|! zpPZcRz#M9|YHDig?%lgaqrnE-oExQ`nBC#XyqIY)8nqftPEL+Sqfx8Xg@uJ)pAW}f zBO@bYim`%%0vC>ZJYL-8GDFa#M~^z%+cC`X>eVaMZij6)onB`#TXcH8#bUNvEKba+ zH|P<>HaGWkcXxMR-;a8oZg6m@v$GRLP?buhoKUh@tgg;ZjYg|dP2aqE)8%$arP7%h z?c>Lf4F;oPOko5;n+?`#v~G__HLb#3IJkk{1lsMWNF+j0Wd7&*rlzLm=4QQ4KcQ4E z=oT6q8*6H6s;a6$&{$bniP}+*+dVfsJEPTJzI+)pZbX_E7IZIOytsPxs>uX-J)URJ zp5^A|&d)C(2)g0V&dxy_W0)a@Lb0~C*3!~)80PVK zHt>19-t*_ryWMV=Yl9HJxVV^+k+HtM4*Z`KwMHTU01CwZmiOBy0LnTrof4BX+9)qZ z24l`Cy3-Oxv}iD<&U|iL`aW*1e*T{Tfk+JJhn?t!Ih%+_gCRxlp1_dI+={rBCmEBH z$mb;&Xwuf{dsG(xIu~kBd^22nfQiuY&-=@E^aB ze0Mw@`sg!Jqj>M{4@1?=vLtE_yomjpAY&G9f6Do3OvV~2jX(8E_s)^crPs;9|Ln=P(4&!LxQt0vyYii$g-sf`wL!RN!x;a2fO?_0h)z!&7;3 zKX!d|C6OrBju5!)fZ#)$MLpvYQaFu9I`{qa>xm?i?C*j5NO9D>Z)y*mpp zwm?p}u%lY`!<7$sDpJ9luciR*%NkbIr{uimE3vn|?6}GFrQzm#1`WmUy<9mXq$-Zb zB{gPa)M$z*s_6aj%IcEB&-k*WfIa0kyMw-xt_uXIN3U4?0N^1J*wN2Y2La?Kk$9k$ zl5)yFK(xr9|07dY5n!VUE)x6;x@8H;=eT3LfsZ05_nZ!WARwv_szt<;4=<`{_?dVX zB^BU_<0kT>8T8_ow2^=hS9xQ8Pz8_;DML3zl6A(f(g#_wB8Lo^ahdw+_f?(tELI4=z@YWrXqr~b@0LEsjAPNX6 z5nHY&b_k@xL=f;J+V={)OlsH#%cjJL%q8J|%PFR0_xGxICENO+Nv{TdqE9Jn_}i5w z;U*}R`7Y=$%iMR~@^XH82($VKn6PY4(63k_wkd&K_a&32x|dW$jXPFfon-$w{lC9R LQut>Wz@PsIkg1(o literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/filebrowser_action2.gif b/system/inc/forum/ico/filebrowser_action2.gif new file mode 100644 index 0000000000000000000000000000000000000000..e068f6f7080ea4c2d41fb4fa7d72cc387ca707d0 GIT binary patch literal 1578 zcmc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L!lC*tKq3XUHQI3M}hnixR@_ztZd&NMqZdK8P< z#`_d9%xGAH6|qV)01Qh=;$glKQX!0&kU!vXh%?2k0SxmM~2y;6Q JIXeLX{{rd(2j>6) literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/forum.png b/system/inc/forum/ico/forum.png new file mode 100644 index 0000000000000000000000000000000000000000..2cba9ee6657a82270e58803df6e675e5c9f30a7a GIT binary patch literal 5219 zcmV-p6rAgcP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2H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odAqj1m+TYc)@oR=05)quEscCWXycbbJ3NqDaMFJ#ee$SK%3PDcq~&t?Prv-xPqH*SETkw`%f}KhBDEg%!w{Ea%?I`JiSs=FjF9SG zDP;+$T^xu3#9$=AH3|%f28rktfXO<+4D*0_R+mq=^rp8`~v?{#m#a`IVZ&WdWR0!e1AdF`yeET|5MR;xX d?-jNG4*(U_fMP*M|TA literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/global.png b/system/inc/forum/ico/global.png new file mode 100644 index 0000000000000000000000000000000000000000..a5714feaf944bd4d05267a5d8037f3058d409664 GIT binary patch literal 3278 zcmWkxc_5VeAAT`0xfi)|OqykuaU`K>2oWP^6o!~`hDF$Mg+W;CuuaJ^B*!Fa99g+? zl*BY{T)7s>^>hEe`^Wo!|9ZdQ@AG_~=lOizG&>t}A%0nY2!e!g7N*z1s`cLk z=LK&k?%h<KEY)pHhc1B%K{|{+jx&*z8YU_17&YMK@`vX3hu8 z*O~U_?u<8Rj+l2w3Cgm>I=`$(Mwl^Gcz%fQT2(&2?Ujt?n}uU&bA3P`zJtL5Yqj-UDiddt8!Rr4FWk~vIvTl{g{ z^yga7KDK{-*W%)0vNHXi)2{+r+S(;CTWqKO)RdH?4}rRC(d%7O7ebo~(yo?H-%1gn zAk7{zW+#Ao54EPv5L-kyz0W%UXntVdDudK@w}9z~T^Y|D|e4=u3kL@WBYMFTRwE2K*kd{pE8D3b0h0^58(vmV&-{9yK+!8fUca-eKI~RA*|uC>+-Id-qJB z1J~Z(-qYCKxtwkaW7bsZVPn&&#Q9wUNUtx(Re^#`C_%X(#qRd@_TG;Z z+4s(zsiMDn^&(Jr>>M)-VyhypSn>DKoiqDr_-) zZ}`c%3z;(}Nl8hUW#r^^m~){P6j-uJLWn-P&>&{psWFz+;PB9!!wJ!U6^bdm(h{+z zdwJ(en60&y)vJ4QI}Q}2hosqnFoOHpUJVoqX;E20^?34lON6Vza z_%WEX31A+6lZbZQoLt@zEU$2P5ytHMIxWsn^BM*;B0#-p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gE<@n=f`$yiVBP}!dfLz~=O zD;z&tDW890Q+_PjaRTD584%I27b9^%uH4g?vkj6=fOL-yKtDxfTN)SJ5h5d{T284fqzjsOxNIgCiLxuvGZqW-=olD zh--9ol(;tDGE(8FYG3`I+Yvai=g*%%h?t0)m#V9)ix)v`F;t3rUpl_rxgbl^0i8;$|f+^;Y#FM7v&*Ye@qN297_26B}Io>oIdq<5x_3v1;E&QS8Bb zw`?8fz!oHP-^RgSXVu8Rs0U!miEf?90Rx>-B7!s@1;m=ioRfv~CV6}dZK8W8gI=vP zQte@zVp7cH1a3z})|}3~-3b9;+XwUPdvq&ww8k2xn$vT4h2={6B9AR7(H= literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/help.png b/system/inc/forum/ico/help.png new file mode 100644 index 0000000000000000000000000000000000000000..777b3b05672a9f9f6f7bd833839f9eea2598882c GIT binary patch literal 10565 zcmWkzbzGBe6nzN+VT5!`OqfWQbfBJ@?#m&Ks?+Dvygzi48#zuA+jBCU}?o|AmDC{yMY&4g+rwofHgQAqa=){}&2` z%piv#Y&BbHX?1lQM>j`T8%HNPMQLd|Cl^O6TRTe#@|w@ovewqxAr(FU^-oGED(Hif zqb3O!ou*W55OE?C3;jca7g6-Nb0iv_k7Q-hsrquF(Bk5P-jQgq!eX$0Vy@HY#f5&3 ziW#_G_5J*IrsaHd_^x(VY^(Gnvt|^t0}Ga-z@xzz1S^uFeY6tV`@Ls%on0ar8}0-V zVAWXAyWTRQKoagOfV)9)DLV%?KqZ45h;@Q9ubRh!~Ra ziId8QB;-(nGCwhCK{@D<+2HF}Ymhn{WX2r0ISB=2UZnY=K!zXaNlh8` z7%Cmrjgf`)IU!;zrSF2!Pd12CQO`;Ns;q}PMhI}KAuJfgsSy?a6hilf%=#D^y`Zo( zh*<8gp2+dDa)K=uP^q+Pkw&3E@J!iu+cEALUcFko+ZZizl7OI9w}A0GR*o9VAYqIk z`@6g+hv+sYI63a;u~yai617my&b;1<)Bm-R%}r>Wo7-4l|M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`9%Mf$}2zwPG@@!yg!q`}08xX1xE;j2&l}4b( z+)4JIPNMegn2caWkm=(DJW{V@unn$h)gm{ykUuN-Hwy9tqy9!nzw`GoDqST`ORAH8 z&T1ujL5Tq7$04;>DB1raNCZiJjbYkOtcwVNE@qUzf`>yJ0b(ABJ_lOYkuQIW-+AjD cAKc?Y%WU75Gc}l_z DLE Forum

    403: DLE Forum -> Forbidden


    You have reached this Page in error, please use your back button to return to DLE Forum.
    DleKey.cn \ No newline at end of file diff --git a/system/inc/forum/ico/licence.png b/system/inc/forum/ico/licence.png new file mode 100644 index 0000000000000000000000000000000000000000..4d4c73f7d5880e48d6530699e329f4fc14b547d5 GIT binary patch literal 3710 zcmWkx2{@Ep7#*3AJ%nsYlReqVu51%CA$zigkbN5_TVxrMELp~uDaxpkQDJPAh%7_O zWS1q&n1t*j|NXz``|f?7Z@ce3@44r^7h{PugdZ9nZtAzdP6DhCBTC2O}Un}|uB<8(IkN3?s-JcajmmeMIkvHQN7^mCQ#v6i; zLhjt52C4i12tM$ScgE7VTogDsIJUG=zv)}0sHr^_V=I1w)7zCHfA#V4@87@c-nhe3 zzg2N`_V@GhIP~Y0?=`5XR+j=i9<(J$sSj?!=<#;}HQM0tzE$DK{MvW83L&f!7*kCo zhL*|qM(K!w*GL2vUENG~!SINP!#L{5t2>Z6Z%VNmyz`H)uCDe?!s9hdkrRO$ zIO&{zZ+NA((NilUDk##%sdI z%tDW{3Ud0FV*U)=o|ya#>CIQOwzB%^7Z|9py0St#eON1M5Eiys9x&AsZ7sC2O*)aU%t1w zcm&-&^{CAXLNW3Lr3y?#BowuN3lI0TqVWV@l!SToq=8#jb$G}`>af>O|w zPWVkJ?iVwgWaLmRsi3N}cXV_Aj^>64A0OY$dXxjv6aHa-etxDWSL#}95QJaBdH2)E zs~aeO0fFA*$B%<76G!ETeDXY%;V6{G!OohLSXRAvzYs{t`Sa%st1x){4_c&-7}v$$ z=#$1)mVC(u;t9UkAO7loettq+XY^vE`7?~$1t4l_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uYQECa(qA>TZRpiW z)O4(RDY7B-I1w8F@xiK3OiqgW`uUM4YdhoNu_?FMJ6?CeD=fROR!7{t{g1vkou-`1 zDT*Bf>Cq35jBJCJFeq!_dNYwSnZcS9+FDw81=qHig$0WXEXS}_N@{A!{oc1cJQ9zy z@dGhuSXy5G*{?CZik{2VC=)$%MjzrlBWp|9VStDOB2T=cqWf{i87t@EM3McCXZ?!o zcsw2ma?IZ$Q?$8xul^bB$W?(+|Lt>b`;sH=z7R;=#di9JKOEj8`u6SH$^={C&mKyu zi2A~Q$CF%Pxg^H@2Isw1HO z2F2)6M_cScoET>+SI8+3l1mW>#9Q{Ukcfzgg}SP$YV%}ZNN_NB0@$(i0fueI?*2@T zuc7WgHwfh)IY{XnsbxY-^JxilrnUltHz1J6uhY}|8w1*F^vR~M#cjx;^I6eV)a-F_*X6l%1-Ny|B;_KLsOgg84bblBiEjIhSAOMc$+3@7}!uk;KoQJ!ezI_ F{{V=Y8sGo` literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/modules.png b/system/inc/forum/ico/modules.png new file mode 100644 index 0000000000000000000000000000000000000000..9433e52abb9db49c1bf7c3af15cb5e874bea4179 GIT binary patch literal 7486 zcmV-E9l_#>P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqI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SMn>{(VNH5ym*Aj3HI`#*YYsy=sSk*&_|v zjD^(PautGnI%P2E(QY+pG+XsKe= z3hn(2jB}()F;0?fbo%tO+h@)^`v=z8a_i>R#)S*#e|U3q9Z6K}0KB825jU(#r;ICbh&_{J;W__yzU z?Y)=wKD85_`N<#sYa9EQf4a!4kFOqG|H#Ib&FOEy@cG|-_0@C#@dvgRUw-+&fBxLL zc+GoZy*JW(k5U??l;@5oF?ami!F?}dD&@T=iejgf_8^=PBIJ4Q&!0apyWQ@`d%gaj zZftJ64B(6{5xi2G;+0-+z=e0;ZvFZH`U5-M?@#}KywU$R0LJ{^+)tJZ`2YX_07*qo IM6N<$f;Ky8B>(^b literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/mset.png b/system/inc/forum/ico/mset.png new file mode 100644 index 0000000000000000000000000000000000000000..3aaabf003d4973ff13cc2146e4457c0104aab6c1 GIT binary patch literal 7580 zcmV;N9b@8&P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3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`5@TSe%b~T#a4#QrbVtJX`raAP)DuxdoC5}o|t%lG!s0@+hh@=Kd z4l*T54ML-(rm`Mm1I`AV3Ak#-Ouz^5QD6&0F<+s#?WX(sSL2g}n548fY#`)yoSEk@ zKKD+pP z1J^I`r5m4Nq9Aw(KHzP@8jq_ic4V-_3Nsv0^$Mz9fvp_0yVUmWrE%3|Fg1aTg65hT z)^FcV(&^xUqmSQH-S+37dhh&Fao2NbJ?o3DF>SoPxig+#-^=2 zm=bS2y`>(DCr&b2nkP7iP7{>U$QZ%6@rg6U@za@D879$)JR@p_j{$EjAjsMsniG>W z+fDLXhR8BRnsNH*{rtggANlyl@A&$!04L8T@?5VL!|BD*gZF&v-V+yZtX*@#h1+vf zP7IbTOKDB5qPcpOtUHBFGlCFU0X|KM%{sAFCpPMYW}VQe5%P?XXk?a?wO|$QoAHVv2KlQG+{pj45%T+NF zEX|+h%#kBh#WG5I(kvmX*QhmGq?n8&3T>5*?GoSo?vXl~-*}7rk4e$Pm>)!R+AG+>}Mti+Hd3>4v z@*=?w@Kq0Q2Lv-DxDtUt$OIu1q{@&wN9j6JHAwRoQ){}Ux#8RQ?LYjnPu}^dJHPhu zCm83CtMe80Lei``uwm<5`&Dng{)!*D^3t6zT{FFA6)38zqAUiuYOn$zL1?5(P%0zM zYUEjlRDwa#ukL^N(F33R^8P!&`i(>X;2Z~l0T7;#m=~HS7C;89YGmr7-P>m_+q-ja z&xLcVw``c{uE|n0Aw)=H6yrA=LVD*y|McSE^r0iC4Dk;K)74P7dz_jsU~w zEByNfcxF*6FioJVHLGfA+L4m%sS3g4P4NAy^7D*OlYL;scyB+iWZv1zi~47emHyO< keQ)1>#a@u7|KFDX1mTDE$jK(pw*UYD07*qoM6N<$f>i}cV*mgE literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/rank.png b/system/inc/forum/ico/rank.png new file mode 100644 index 0000000000000000000000000000000000000000..13747f724e87abaebfff25aa732d1e29bcbef91c GIT binary patch literal 11375 zcmV-#ERfT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*1(hOLsA`a+rgJ03dr7AHBU2*rS;%R5G7zWB}=AWWrak%l-4(GyAVF5lavTtvm21kIJ9S>iv&T zBoAjNw`~@!Gt;eVtqx9)?|o$FL;v#Q$zu~ipiECCR^7f|5U%T!GU@+{^_&# zQX;G=Q=Yp~6#BkvRkF_M=%%?KxnS5k?+eEj`R8&_TncKWiO!O_0Xo`IsDFXH(=j+^zuQ&TuTx2F|J91({BVY5!7Iv>`` zQ**Nu2lgF1`1GTbhxXhb1&zmnxiq`r4ZFaj2b-lMl-sAP>Iv;r?x1}}DEqed}002ovPDHLkV1hM+BJThI literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/safety.png b/system/inc/forum/ico/safety.png new file mode 100644 index 0000000000000000000000000000000000000000..3f0c8f3bd13d8bc124fd7bc86125048960dd7d56 GIT binary patch literal 4246 zcmV;H5NYp;P)L*=k^zOaqe!uhWXW;+k`OAm)@~Tf=#m**Q zdk6;TRaUP{uf3FbU@tOpYxh_5*Y%?v#}X|@rhH(k7`d~QdVH&&|EL6uu2US$K3UqY%|QQhZ)Xq=63kNhjq z{nthQ(1reDuzKtbfA}9)9yrdiUkSjMu1&w~@?rm7Mc)iNQ3JZVK9w8Xf$H8!obE+s zd$9P3m%+^3i|f?z249bqw}CYv0uJotUDzljs8pG}{o@Z@^^rSXd*mc@FDt-nHgdtY z-d8*zHumFOFaGAsP^-5hK?x^mL_F-`QEY7t-Lo4PP9Q-JfRk;|~SwN+$U?VUsFm1#%F)qidYG!y>d9?qAyOwW$SpeR7 zp}zV9SNMO`>EBLp{;Lr$1;&C-gLBx$!>Duxf*4iW4qg$W7T6Sa{t@idL5SO^$__A{ zr!QwZ5H&H<#kT(Ng7vvm(M|U??|i8N(l@@h@b9H{>-yBry&xW-FsBbAK>?NPL-O6Y z);N;y!_M3fttH~)-$iok(S28-dUm6G_dwLZ#Z6q)N+9A6#4Ru_jH+_}s<~Is%*~A) z91S0P$pAinP2q!Yx@yPonQfPYufQo>9D^S~YZ}S*A!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z9z&VaxVW_vwh9o$kp#Jm5$A9wf;dV7IF+R_F^WW?{kOZL&!4Kfu@?dW5Vt~i?8dw1 zA09|Y8!zZJYg2ve=-;yk(`j?`+c#66I6+}>9YM7p@in%&jBC^hbe42!5MAg+(tw_W z_yoigxbQTXMX=4}e8?Gy3@D8*bP+qDdHe{ij?_MLYwNnDHZw020Kgc>_&4vXJ{2){Nzf0rT5kv`oWffkv4^`|!JPlC?*IdRno48g45jYco z3BYP_7M07PtE)J9-$C-W#=XbXk8XOf^F>xN(2D^$15q2Bjt+hK?uA2UVWF_Yjjqqw zx=yd%M$ewT6o-b0W=^v3z@5|{xRch{W0>WIWE#un(OuoBt|}^5MCA*pAdLh*l1ibA zCH%fMES;L+`2O1&?9K3nJHjvBe>~d%OeJ3M|Hz&t9x$|}-~08CzOnp{x4dH2?&79R zn!b%tED<*sXpKKf>-ZByb5ppmjTZ!{OdgdfpbHheQWc%=LS^&dXR#=jPEPUIO+O%K z=Gc5r)m;9!bFX{!l)2^Q05~H#VEEj@;L2++&%ORF7nd*IFx*q3XEo%C;0Y$I6W8a6 zYcs^P1>)spY$w7-2ImxrqR|xQ7A&WyLY#p;dnz2A)`ws5cQda6re02fXM*%sGWz_z z+f$dlaaZ<|JsWeIhWhiBbXOMAUUJf5+t{#yF)_}>SZlDx5H$^r#hAvTA(ir3yP?4Q zK0W&npSz>+=gx9nAV%U-^iRZ4t7 zyW}z!(>9p4CCGU^`c(VmC4W72bu;47uNvT);*lJQ6o4|&oe$_4>hT7;^SXb>fZw;K z;;pV^q}pHBxl&f8an6m+M6;jRxAeJ(C+zjCG;se@0B8HQCb3cgWLK^Xi3?^(GTkh2 s0$6^oMgF%*(p&swT3qSy{*TIk18BdB4OYw)eEnMY5C8xG literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/service.png b/system/inc/forum/ico/service.png new file mode 100644 index 0000000000000000000000000000000000000000..1592c71112f30c0f3b2efe111bb7744ef0447044 GIT binary patch literal 10509 zcmV+oDe~5dP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ql)zWonA z{Cj`$g_dI&&o{v9t-z}fqTt9ispjGTyVCZwk17AyEc9Omi z_1=ZWmGhg?c#jb?msL%QaWMRBdR(*tAp3)>kXZa!~Yuq7VrWLJI&EN P00000NkvXXu0mjf8~J(@ literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/show.png b/system/inc/forum/ico/show.png new file mode 100644 index 0000000000000000000000000000000000000000..37913e19be6f76bf2c4602c10fb56c8d2270fb2c GIT binary patch literal 2680 zcmV-;3WxQHP)YFQi(= zHz-i(l%XOIsnTf&hqeKMkvd{AFrC&~#sHB(!b2br8i_za9!o-$Bm~JWd2{!1_r8Dq zgX|hYl1%~>XUccx%--F5?>V2}`JFxY`@6tx-PUdWpj9&a#f6n`&0l*DaQ96eC_6iw z&CbqdZ)BfShu)Lw{>R@hUf#M@eq;E33p=}p>1*c+2?=qtX3hHZz<~o(tX6Bke*OA! zx~@YI1c~D~m56+rrUg`072Ixji=rq^Ua$9Jb#=9S_wL9^yHiXQ?X^_4lSY15{qZrir)Vq;??oj-q`Dl03grly8OQ6xoCC>RVpJ4%;$SwL!Eqcojsp>)s;UZgb#>4* zjpaBlZp@f5KOH%8WO7bU&Ncu>`~K(78vn#QZ?DLXz2k2C;RX*bO92!LjR&*7IkyZz z%k>0c-n41c%B4$}t|B5{Q4|nSxG@X^K@dPhh>eW}0QmiWxLhs>f&h!ff~cq{a2yB2 zFyM4LlbufIojZ5#+!Y$&H?vYRK3e_i7Qr85-+!47>27es2&C2 zbUN?O&(HtY(@#JBnxZJsbv=BJVHhwB1Cz-FmSy4d`M~o$R8_^fbLU_f2JCh_qN1W; zu~@+KJUEVn$z(!GO3EWqQBg{9adF9<8RIfOTJ`c4=$f5vJ&yX49XMWj>Fb@l_Af9r z?JzoIDm<%^;HOTV`pB9!YyLTO=ujsBm`o;^&E{+1&1Q2Lyt%mFvw>yV@OiV@ z9R3~(c=oU6tr#*uiJzVkI~}s$E;oM%sc1VquDYYSd+ALLI1E7Vim%&UXu*O7Ggh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1_aNzU#c>n$PKi;}^>$4*xBfkR101u$TRW3B4P{@Aj)Tx;V zAAIn>tgI|OaES#{q*85gu@G67si>$xuh-vjv8IAGJ3Gtt^fV5KBlhN-Zywyed-u=g z=jTrVlR#+k-(2-dIWsde*4x|bd*qQv+A}gTgcQ-si+ZtuNF+iy97d8bV{~*h@a(hCzSz;xu~U+yQ^0xPip4(fPOMH%O^xQ~=dWsQZLLW? z3i+%qvN!|rcpQ(%LwY1daxBcbm-8D($dnphK7c6Q53JR#bRQq87UYHGC4WP^5x4h7z~%(6)q z>FMclyzs&cyL)?k-&IxhG~fUtT#Wpe7XUCnKYw;`aM1nGLk~Tim6fGYRrQkgy12Eb z-jih+yWNgnuV?AfrHG=4BuUK9&f;>p@OV6QbaV`C+qP}{)YQ}wV3>=Rk*m`4~0sv`rbaW^^J-vL>rcJeJX=#^qrp5D1>UW|jB8nn2Gc)Ao=Hm1D z=<4cnJpcUjFAWY3?$_yb!_jEe0fd3%jgbE$0ssLD79;`Mq7g+dGr42dwYA;y?ggYHf`GUoG6O-0HuI|iy0UA z6C$62;qk{G|9LPNRQvk+)Ezr^*sWIU_kjk$!tV+H$q`?SrB6QjNk!9HqIQfk6_fH*Kz{pMd4}j~z{{a~Vv5FFl$f5uM002ov JPDHLkV1g8e%m@Gg literal 0 HcmV?d00001 diff --git a/system/inc/forum/ico/tools.png b/system/inc/forum/ico/tools.png new file mode 100644 index 0000000000000000000000000000000000000000..11b8deb79970f4b7c8a79cb24a4d9dd540e9a3d4 GIT binary patch literal 10567 zcmV-NDY({&P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0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-C0YP9Vc>sHYCfMiO3 R^q-pq^t6zgRd?+o{s&1@9Dx7; literal 0 HcmV?d00001 diff --git a/system/inc/forum/init.class.php b/system/inc/forum/init.class.php new file mode 100644 index 0000000..bce18cb --- /dev/null +++ b/system/inc/forum/init.class.php @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/system/inc/forum/service.php b/system/inc/forum/service.php new file mode 100644 index 0000000..7c884ea --- /dev/null +++ b/system/inc/forum/service.php @@ -0,0 +1,123 @@ + + + + + + + + + +
    {$f_lg['titles_uname']} {$f_lg['svce_full']}
     
    "; + + echo_bottom('1'); + + echo_top('1'); + + echo_top('1'); + + echo_title(' '); + + echo "
    + . . + + + + + + +
     
    "; + + echo_bottom('1'); + + echo_top('1'); + + echo_title(' '); + + echo "
    + , . + + + + + + +
     
    "; + + echo_bottom('1'); + + echo_bottom(); + + break; + +// ******************************************************************************** +// SUBSCRIPTION +// ******************************************************************************** + case "subscription": + + $user_name = $db->safesql($_REQUEST['user_name']); + + if ($user_name) + { + $row = $db->super_query("SELECT user_id FROM " . PREFIX . "_users WHERE name = '{$user_name}'"); + } + + if ($row['user_id']) + { + $db->query("DELETE FROM " . PREFIX . "_forum_subscription WHERE user_id = '{$row['user_id']}'"); + } + + if (!$user_name) + { + $db->query("TRUNCATE TABLE " . PREFIX . "_forum_subscription"); + } + + header("Location: ?mod=forum&action=service"); + + break; + +// ******************************************************************************** +// VIEWS LOG +// ******************************************************************************** + case "views": + + $db->query("TRUNCATE TABLE " . PREFIX . "_forum_views"); + + $db->query("UPDATE " . PREFIX . "_users SET forum_last = '".time()."', forum_time = '".time()."'"); + + $_SESSION['member_lasttime'] = time(); + + header("Location: ?mod=forum&action=service"); + + break; + +// ******************************************************************************** +// POLL LOG +// ******************************************************************************** + case "poll": + + $db->query("TRUNCATE TABLE " . PREFIX . "_forum_poll_log"); + + header("Location: ?mod=forum&action=service"); + + break; + + } + +?> \ No newline at end of file diff --git a/system/inc/forum/table.php b/system/inc/forum/table.php new file mode 100644 index 0000000..f9fa283 --- /dev/null +++ b/system/inc/forum/table.php @@ -0,0 +1,208 @@ +DLE Forum"; + echo echo_bottom (x); + } +} + +echo << + + + + + + + + + + + + + + + +
    +HTML; +} + +function echo_bottom($echofooter = false) +{ +echo << +
    + +HTML; + +if (!$echofooter) echofooter(); +} + +function echo_title($title) +{ +echo <<
    +
    +HTML; +} + +function echo_stats($forum_config, $forum_stats) +{ +global $f_lg; + +echo " + + + + + + + + + + + + + + + + + + +
    {$f_lg['forum_status']}{$forum_stats['line']}
    {$f_lg['forum_topic']}{$forum_stats['topics']}
    {$f_lg['forum_posts']}{$forum_stats['posts']}
    {$f_lg['forum_db_size']}{$forum_stats['db_size']}
    {$f_lg['forum_files']}{$forum_stats['sum_size']}
    {$f_lg['forum_cache']}{$forum_stats['cache']}
    +
    +"; +} + +if(!defined('DLE_FORUM')){ exit; } + +function forum_menu() +{ +global $f_lg; + +echo << + +function MenuCategory( m_id ){ + +var menu=new Array() +var lang_action = ""; + +menu[0]='{$f_lg['java_add_forum']}'; +menu[1]='{$f_lg['java_sort_f']}'; +menu[2]='{$f_lg['java_access']}'; +menu[3]='{$f_lg['java_edit']}'; +menu[4]='{$f_lg['java_del']}'; + +return menu; +} + +function MenuForum( m_id, sub ){ + +var menu=new Array() + +menu[1]='{$f_lg['java_moderator']}'; + +menu[2]='{$f_lg['java_edit']}'; + +if (!sub){ +menu[3]='{$f_lg['java_ssort']}'; +} + +menu[4]='{$f_lg['java_del']}'; + +return menu; +} + +function Moderators( m_id ){ + +var menu=new Array() + +menu[1]='{$f_lg['java_edit']}'; + +menu[2]='{$f_lg['java_del']}'; + +return menu; +} + + + +HTML; +} + +$options = array( + array( + 'name' => $f_lg['m_new_cat'], + 'url' => "$PHP_SELF?mod=forum&action=category", + 'descr' => $f_lg['m_new_cat2'], + 'image' => "category.png", + 'access' => "1", + ), + + array( + 'name' => $f_lg['m_new_forum'], + 'url' => "$PHP_SELF?mod=forum&action=forum", + 'descr' => $f_lg['m_new_forum2'], + 'image' => "forum.png", + 'access' => "1", + ), + + array( + 'name' => $f_lg['m_content'], + 'url' => "$PHP_SELF?mod=forum&action=content", + 'descr' => $f_lg['m_content2'], + 'image' => "content.png", + 'access' => "1", + ), + + array( + 'name' => $f_lg['m_usergroup'], + 'url' => "$PHP_SELF?mod=forum&action=usergroup", + 'descr' => $f_lg['m_usergroup2'], + 'image' => "usersgroup.png", + 'access' => "1", + ), + + array( + 'name' => $f_lg['m_rank'], + 'url' => "$PHP_SELF?mod=forum&action=rank", + 'descr' => $f_lg['m_rank2'], + 'image' => "rank.png", + 'access' => "1", + ), + + array( + 'name' => $f_lg['m_tools'], + 'url' => "$PHP_SELF?mod=forum&action=tools", + 'descr' => $f_lg['m_tools2'], + 'image' => "tools.png", + 'access' => "1", + ), + + array( + 'name' => $f_lg['m_service'], + 'url' => "$PHP_SELF?mod=forum&action=service", + 'descr' => $f_lg['m_service2'], + 'image' => "service.png", + 'access' => "1", + ), + + array( + 'name' => $f_lg['m_email'], + 'url' => "$PHP_SELF?mod=forum&action=email", + 'descr' => $f_lg['m_email2'], + 'image' => "mset.png", + 'access' => "1", + ), + + ); + +?> \ No newline at end of file diff --git a/system/inc/forum/tools.php b/system/inc/forum/tools.php new file mode 100644 index 0000000..be75bad --- /dev/null +++ b/system/inc/forum/tools.php @@ -0,0 +1,268 @@ + + + function ChangeOption(selectedOption) { + + document.getElementById('global').style.display = "none"; + document.getElementById('show').style.display = "none"; + document.getElementById('safety').style.display = "none"; + document.getElementById('modules').style.display = "none"; + document.getElementById('speed').style.display = "none"; + document.getElementById('uploads').style.display = "none"; + + if(selectedOption == 'global') {document.getElementById('global').style.display = "";} + if(selectedOption == 'show') {document.getElementById('show').style.display = "";} + if(selectedOption == 'safety') {document.getElementById('safety').style.display = "";} + if(selectedOption == 'modules') {document.getElementById('modules').style.display = "";} + if(selectedOption == 'speed') {document.getElementById('speed').style.display = "";} + if(selectedOption == 'uploads') {document.getElementById('uploads').style.display = "";} + + } + + +HTML; + + // TOOLS MENU // + + echo_top('tools_menu'); + + echo_title($f_lg['tools_menu']); + +echo << + + + + + +
    + + + + + + +
    + + + +HTML; + + echo_bottom('tools_menu'); + +// ******************************************************************************** +// TOOLS +// ******************************************************************************** + + // globals tools + + echo "
    "; + + echo_top('tools_global'); + + echo_title($f_lg['tools_global']); + + echo ""; + + showRow($f_lg['tools_name'], $f_lg['tools_name_'], ""); + + showRow($f_lg['tools_url'], $f_lg['tools_url_'], ""); + + showRow($f_lg['meta_description'], $f_lg['meta_description2'], ""); + + showRow($f_lg['meta_keywords'], $f_lg['meta_keywords2'], ""); + + showRow($f_lg['meta_topic'], $f_lg['meta_topic2'], makeDropDown(array("1"=>$lang['opt_sys_yes'],"0"=>$lang['opt_sys_no']), "save_con[meta_topic]", "{$forum_config['meta_topic']}")); + + showRow($f_lg['tools_abc_last'], $f_lg['tools_abc_last1'], ""); + + showRow($f_lg['tools_mrewrite'], $f_lg['tools_mrewrite_'], makeDropDown(array("1"=>$lang['opt_sys_yes'],"0"=>$lang['opt_sys_no']), "save_con[mod_rewrite]", "{$forum_config['mod_rewrite']}")); + + showRow($f_lg['tools_offline'], $f_lg['tools_offline_'], makeDropDown(array("1"=>$lang['opt_sys_yes'],"0"=>$lang['opt_sys_no']), "save_con[offline]", "{$forum_config['offline']}")); + + showRow($f_lg['tools_timestamp'], $f_lg['tools_timestamp2'], ""); + + showRow($f_lg['tools_sessions'], $f_lg['tools_sessions_'], makeDropDown(array("1"=>$lang['opt_sys_yes'],"0"=>$lang['opt_sys_no']), "save_con[sessions_log]", "{$forum_config['sessions_log']}")); + + showRow($f_lg['tools_ses_time'], $f_lg['tools_ses_time_'], ""); + + showRow($f_lg['tools_stats'], $f_lg['tools_stats_'], makeDropDown(array("1"=>$lang['opt_sys_yes'],"0"=>$lang['opt_sys_no']), "save_con[stats]", "{$forum_config['stats']}")); + + showRow($f_lg['tools_online'], $f_lg['tools_online_'], makeDropDown(array("1"=>$lang['opt_sys_yes'],"0"=>$lang['opt_sys_no']), "save_con[online]", "{$forum_config['online']}")); + + showRow($f_lg['tools_forum_bar'], $f_lg['tools_forum_bar_'], makeDropDown(array("1"=>$lang['opt_sys_yes'],"0"=>$lang['opt_sys_no']), "save_con[forum_bar]", "{$forum_config['forum_bar']}")); + + echo "
    "; + + echo_bottom('tools_global'); + + echo "
    "; + + // topics, posts + + echo ""; + + // safety + + echo ""; + + // modules + + echo ""; + + // speed + + echo ""; + + // uploads + + echo ""; +?> \ No newline at end of file diff --git a/system/inc/forum/usergroup.php b/system/inc/forum/usergroup.php new file mode 100644 index 0000000..3b5b8e3 --- /dev/null +++ b/system/inc/forum/usergroup.php @@ -0,0 +1,162 @@ +query("SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC"); + + while ($row = $db->get_row()) + { + $user_group[$row['id']] = array (); + + foreach ($row as $key => $value) + { + $user_group[$row['id']][$key] = $value; + } + } + + $db->free(); + + switch ($subaction) + { + case "": + + $db->query("SELECT user_group, count(*) as count FROM " . USERPREFIX . "_users GROUP BY user_group"); + + while($row = $db->get_row()) + { + $count_list[$row['user_group']] = $row['count']; + } + + $db->free(); + + foreach ($user_group as $group) + { + $count = intval ($count_list[$group['id']]); + + $entries .= " + +   {$group['id']} + {$group['group_name']} + $count + + + "; + } + + echo_top(); + +echo << + + +HTML; + + echo_title($f_lg['group_list']); + + echo " + + + + + + + "; + + echo $entries."
      ID{$f_lg['group_name']}{$f_lg['group_users']} 
    "; + + echo_bottom(); + + break; + + case "edit": + + if ($id) + { + $row = $db->super_query("SELECT * FROM " . PREFIX . "_forum_moderators WHERE group_id = '$id'"); + + echo_top(); + + echo_title ($f_lg['group_moderation']." ".$user_group[$id]['group_name']); + + echo "
    "; + + echo ""; + + showRadio($f_lg['mod_edit_topic'], $f_lg[''], "edit_topic", $row); + + showRadio($f_lg['mod_del_topic'], $f_lg[''], "delete_topic", $row); + + showRadio($f_lg['mod_edit_post'], $f_lg[''], "edit_post", $row); + + showRadio($f_lg['mod_del_post'], $f_lg[''], "delete_post", $row); + + showRadio($f_lg['mod_open_topic'], $f_lg[''], "open_topic", $row); + + showRadio($f_lg['mod_close_topic'], $f_lg[''], "close_topic", $row); + + showRadio($f_lg['mod_move_topic'], $f_lg[''], "move_topic", $row); + + showRadio($f_lg['mod_fixed_topic'], $f_lg[''], "pin_topic", $row); + + showRadio($f_lg['mod_defixed_topic'], $f_lg[''], "unpin_topic", $row); + + showRadio($f_lg['mod_multi_moderation'], $f_lg[''], "mass_prune", $row); + + showRadio($f_lg['mod_combining_post'], $f_lg[''], "combining_post", $row); + + showRadio($f_lg['mod_move_post'], $f_lg[''], "move_post", $row); + + echo "
    "; + + echo_bottom('bottom'); + + echo_top('top'); + + echo "
    "; + + echo_bottom(); + } + + break; + + case "doedit": + + if ($id) + { + $m_group = $db->super_query("SELECT group_id FROM " . PREFIX . "_forum_moderators WHERE group_id = '$id'"); + + if (!$m_group['group_id']) + { + $db->query("INSERT INTO " . PREFIX . "_forum_moderators (group_id) values ('$id')"); + } + + $db->query("UPDATE " . PREFIX . "_forum_moderators SET edit_post = '$save[edit_post]', delete_topic = '$save[delete_topic]', edit_topic = '$save[edit_topic]', edit_post = '$save[edit_post]', delete_post = '$save[delete_post]', open_topic = '$save[open_topic]', close_topic = '$save[close_topic]', delete_post = '$save[delete_post]', move_topic = '$save[move_topic]', pin_topic = '$save[pin_topic]', delete_topic = '$save[delete_topic]', unpin_topic = '$save[unpin_topic]', mass_prune = '$save[mass_prune]', combining_post = '$save[combining_post]', move_post = '$save[move_post]' WHERE group_id = '$id'"); + } + + $fcache->delete('forum_moderators.php'); + + msg("info",$f_lg['group_edit_ok'], $f_lg['group_edit_ok2'], "?mod=forum"); + + break; + } +?> \ No newline at end of file diff --git a/system/inc/googlemap.php b/system/inc/googlemap.php new file mode 100644 index 0000000..c34fb6f --- /dev/null +++ b/system/inc/googlemap.php @@ -0,0 +1,150 @@ +limit = intval($_POST['limit']); + $map->news_priority = strip_tags(stripslashes($_POST['priority'])); + $map->stat_priority = strip_tags(stripslashes($_POST['stat_priority'])); + $map->cat_priority = strip_tags(stripslashes($_POST['cat_priority'])); + + $row = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_post" ); + if ( !$map->limit ) $map->limit = $row['count']; + + if ( $map->limit > 45000 ) { + + $pages_count = @ceil( $row['count'] / 40000 ); + + $sitemap = $map->build_index( $pages_count ); + + $handler = fopen(ROOT_DIR. "/uploads/sitemap.xml", "wb+"); + fwrite($handler, $sitemap); + fclose($handler); + + @chmod(ROOT_DIR. "/uploads/sitemap.xml", 0666); + + $sitemap = $map->build_stat(); + + $handler = fopen(ROOT_DIR. "/uploads/sitemap1.xml", "wb+"); + fwrite($handler, $sitemap); + fclose($handler); + + @chmod(ROOT_DIR. "/uploads/sitemap1.xml", 0666); + + for ($i =0; $i < $pages_count; $i++) { + $t = $i+2; + $n = $n+1; + + $sitemap = $map->build_map_news( $n ); + + $handler = fopen(ROOT_DIR. "/uploads/sitemap{$t}.xml", "wb+"); + fwrite($handler, $sitemap); + fclose($handler); + + @chmod(ROOT_DIR. "/uploads/sitemap{$t}.xml", 0666); + + } + + + } else { + + $sitemap = $map->build_map(); + + $handler = fopen(ROOT_DIR. "/uploads/sitemap.xml", "wb+"); + fwrite($handler, $sitemap); + fclose($handler); + + @chmod(ROOT_DIR. "/uploads/sitemap.xml", 0666); + } +} + +echoheader("", ""); + + +echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
    +HTML; + + if(!@file_exists(ROOT_DIR. "/uploads/sitemap.xml")){ + echo $lang['no_google_map']; + } else { + + $file_date = date("d.m.Y H:i", filectime(ROOT_DIR. "/uploads/sitemap.xml")); + $map_link = $config['http_home_url']."sitemap.xml"; + echo "
    ".$file_date.""; + echo "

    Google | Yahoo | Bing | Ask
    "; + } + + +echo << +
     
    {$lang['google_nnum']}[?]
    {$lang['google_stat_priority']}[?]
    {$lang['google_priority']}
    {$lang['google_cat_priority']}
     
    +
    +
    +HTML; +echofooter(); +?> \ No newline at end of file diff --git a/system/inc/include/functions.inc.php b/system/inc/include/functions.inc.php new file mode 100644 index 0000000..889bab0 --- /dev/null +++ b/system/inc/include/functions.inc.php @@ -0,0 +1,620 @@ + 0) { + $uptimeString .= $days; + $uptimeString .= (($days == 1) ? " day" : " days"); + } + if ($hours > 0) { + $uptimeString .= (($days > 0) ? ", " : "") . $hours; + $uptimeString .= (($hours == 1) ? " hour" : " hours"); + } + if ($mins > 0) { + $uptimeString .= (($days > 0 || $hours > 0) ? ", " : "") . $mins; + $uptimeString .= (($mins == 1) ? " minute" : " minutes"); + } + if ($secs > 0) { + $uptimeString .= (($days > 0 || $hours > 0 || $mins > 0) ? ", " : "") . $secs; + $uptimeString .= (($secs == 1) ? " second" : " seconds"); + } + return $uptimeString; +} + +function dirsize($directory) { + if( ! is_dir( $directory ) ) return - 1; + $size = 0; + if( $DIR = opendir( $directory ) ) { + while ( ($dirfile = readdir( $DIR )) !== false ) { + if( @is_link( $directory . '/' . $dirfile ) || $dirfile == '.' || $dirfile == '..' ) continue; + if( @is_file( $directory . '/' . $dirfile ) ) $size += filesize( $directory . '/' . $dirfile ); + else if( @is_dir( $directory . '/' . $dirfile ) ) { + $dirSize = dirsize( $directory . '/' . $dirfile ); + if( $dirSize >= 0 ) $size += $dirSize; + else return - 1; + } + } + closedir( $DIR ); + } + return $size; +} + +function check_login($username, $md5_password, $post = true) { + global $member_id, $db, $user_group, $lang, $_IP, $_TIME, $config; + + if( $username == "" OR $md5_password == "" ) return false; + $result = false; + + if( $post ) { + $username = $db->safesql( $username ); + $md5_password = md5( $md5_password ); + + if ( preg_match( "/[\||\'|\<|\>|\"|\!|\?|\$|\@|\/|\\\|\&\~\*\+]/", $username) ) return false; $where_name = "name='{$username}'"; + + $member_id = $db->super_query( "SELECT * FROM " . USERPREFIX . "_users WHERE {$where_name} AND password='{$md5_password}'" ); + + if( $member_id['user_id'] and $user_group[$member_id['user_group']]['allow_admin'] and $member_id['banned'] != 'yes' ) $result = TRUE; + else $member_id = array (); + } else { + + $username = intval( $username ); + $md5_password = md5( $md5_password ); + + $member_id = $db->super_query( "SELECT * FROM " . USERPREFIX . "_users WHERE user_id='$username'" ); + + if( $member_id['user_id'] AND $member_id['password'] AND $member_id['password'] == $md5_password AND $user_group[$member_id['user_group']]['allow_admin'] AND $member_id['banned'] != 'yes' ) $result = TRUE; + else $member_id = array (); + } + + if( $result ) { + if( !allowed_ip( $row['allowed_ip'] ) ) { + $member_id = array (); + $result = false; + set_cookie( "dle_user_id", "", 0 ); + set_cookie( "dle_name", "", 0 ); + set_cookie( "dle_password", "", 0 ); + set_cookie( "dle_hash", "", 0 ); + @session_destroy(); + @session_unset(); + set_cookie( session_name(), "", 0 ); + + msg( "info", $lang['index_msge'], $lang['ip_block'] ); + } + } + return $result; +} + +function mksize($bytes) { + if ($bytes < 1000) + return $bytes. " b"; + if ($bytes < 1000 * 1024) + return number_format($bytes / 1024, 2) . " Kb"; + if ($bytes < 1000 * 1048576) + return number_format($bytes / 1048576, 2) . " Mb"; + if ($bytes < 1000 * 1073741824) + return number_format($bytes / 1073741824, 2) . " Gb"; + if ($bytes < 1000 * 1099511627776) + return number_format($bytes / 1099511627776, 2) . " Tb"; + if ($bytes < 1000 * 1125899906842620) + return number_format($bytes / 1125899906842620, 2) . " Pb"; + if ($bytes < 1000 * 1152921504606850000) + return number_format($bytes / 1152921504606850000, 2) . " Eb"; +} + +function CheckCanGzip() { + + if( headers_sent() || connection_aborted() || ! function_exists( 'ob_gzhandler' ) || ini_get( 'zlib.output_compression' ) ) return 0; + + if( strpos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip' ) !== false ) return "x-gzip"; + if( strpos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) !== false ) return "gzip"; + + return 0; +} + +function GzipOut() { + global $Timer, $db; + + $ENCODING = CheckCanGzip(); + + if( $ENCODING ) { + $Contents = ob_get_contents(); + ob_end_clean(); + + header( "Content-Encoding: $ENCODING" ); + + $Contents = gzencode( $Contents, 1, FORCE_GZIP ); + echo $Contents; + + exit(); + } else { + // ob_end_flush(); + exit(); + } +} + +class microTimer { + function start() { + global $starttime; + $mtime = microtime(); + $mtime = explode( ' ', $mtime ); + $mtime = $mtime[1] + $mtime[0]; + $starttime = $mtime; + } + function stop() { + global $starttime; + $mtime = microtime(); + $mtime = explode( ' ', $mtime ); + $mtime = $mtime[1] + $mtime[0]; + $endtime = $mtime; + $totaltime = round( ($endtime - $starttime), 5 ); + return $totaltime; + } +} + +function allowed_ip($ip_array) { + $ip_array = trim( $ip_array ); + + if( $ip_array == "" ) { + return true; + } + + $ip_array = explode( "|", $ip_array ); + $db_ip_split = explode( ".", $_SERVER['REMOTE_ADDR'] ); + + foreach ( $ip_array as $ip ) { + + $ip_check_matches = 0; + $this_ip_split = explode( ".", trim( $ip ) ); + + for($i_i = 0; $i_i < 4; $i_i ++) { + if( $this_ip_split[$i_i] == $db_ip_split[$i_i] or $this_ip_split[$i_i] == '*' ) { + $ip_check_matches += 1; + } + + } + if( $ip_check_matches == 4 ) return true; + } + return FALSE; +} + +//////////////////////////////////////////////////////// +// Function: msg +// Description: Displays message to user + + +function msg($type, $title, $text, $back = FALSE) { + global $lang; + + if( $back ) { + $back = "

    $lang[func_msg]"; + } + + echoheader( $type, $title ); + + echo << + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + +
    {$text} {$back}
    +
    +
    +HTML; + + echofooter(); + exit(); +} + +function echoheader($image, $header_text) { + global $PHP_SELF, $skin_header, $member_id, $user_group; + + $skin_header = str_replace( "{header-text}", $header_text, $skin_header ); + $skin_header = str_replace( "{user}", $member_id['name'], $skin_header ); + $skin_header = str_replace( "{group}", $user_group[$member_id['user_group']]['group_name'], $skin_header ); + + echo $skin_header; +} + +function echofooter() { + + global $PHP_SELF, $is_loged_in, $skin_footer; + + echo $skin_footer; + +} + +function listdir($dir) { + + $current_dir = opendir( $dir ); + while ( $entryname = readdir( $current_dir ) ) { + if( is_dir( "$dir/$entryname" ) and ($entryname != "." and $entryname != "..") ) { + listdir( "${dir}/${entryname}" ); + } elseif( $entryname != "." and $entryname != ".." ) { + unlink( "${dir}/${entryname}" ); + } + } + @closedir( $current_dir ); + rmdir( ${dir} ); +} + + +function totranslit( $var, $lower = true, $punkt = true ) { + global $langtranslit; + + if ( is_array($var) ) return ""; + if (!is_array ( $langtranslit ) OR !count( $langtranslit ) ) { + $langtranslit = array('' => 'a', '' => 'b', '' => 'v', '' => 'g', '' => 'd', '' => 'e', '' => 'e', '' => 'zh', '' => 'z', '' => 'i', '' => 'y', '' => 'k', '' => 'l', '' => 'm', '' => 'n', '' => 'o', '' => 'p', '' => 'r', '' => 's', '' => 't', '' => 'u', '' => 'f', '' => 'h', '' => 'c', '' => 'ch', '' => 'sh', '' => 'sch', '' => '', '' => 'y', '' => '', '' => 'e', '' => 'yu', '' => 'ya', "" => "yi", "" => "ye", + '' => 'A', '' => 'B', '' => 'V', '' => 'G', '' => 'D', '' => 'E', '' => 'E', '' => 'Zh', '' => 'Z', '' => 'I', '' => 'Y', '' => 'K', '' => 'L', '' => 'M', '' => 'N', '' => 'O', '' => 'P', '' => 'R', '' => 'S', '' => 'T', '' => 'U', '' => 'F', '' => 'H', '' => 'C', '' => 'Ch', '' => 'Sh', '' => 'Sch', '' => '', '' => 'Y', '' => '', '' => 'E', '' => 'Yu', '' => 'Ya', "" => "yi", "" => "ye",); + } + + $var = trim( strip_tags( $var ) ); + $var = preg_replace( "/\s+/ms", "-", $var ); + $var = str_replace( "/", "-", $var ); + + $var = strtr($var, $langtranslit); + + if( $punkt ) {$var = preg_replace( "/[^a-z0-9\_\-.]+/mi", "", $var );}else{$var = preg_replace( "/[^a-z0-9\_\-]+/mi", "", $var );} + + $var = preg_replace( '#[\-]+#i', '-', $var ); + + if( $lower ) {$var = strtolower( $var );} + + $var = str_ireplace( ".php", "", $var ); + $var = str_ireplace( ".php", ".ppp", $var ); + + if( strlen( $var ) > 50 ) { + $var = substr( $var, 0, 50 ); + if( ($temp_max = strrpos( $var, '-' )) ) $var = substr( $var, 0, $temp_max ); + } + return $var; +} + +// ******************************************************************************** +// Show Radio +// ******************************************************************************** +function showRadio($title = "", $description = "", $allow_name = "", $row = false){ + global $f_lg; + + if ($row[$allow_name]) + { + $o_value = "checked"; + + $t_value = ""; + } + + else + { + $o_value = ""; + + $t_value = "checked"; + } + + echo" + + {$title}
    {$description} + + {$f_lg['yes']} + {$f_lg['no']} + "; + } + +// ******************************************************************************** +// showRow +// ******************************************************************************** + function showRow($title="", $description="", $field="") + { + echo" + + $title
    $description + $field + "; + $bg = ""; $i++; + } + +// ******************************************************************************** +// makeDropDown +// ******************************************************************************** + function makeDropDown($options, $name, $selected) + { + $output = "
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +HTML; +?> \ No newline at end of file diff --git a/system/inc/iptools.php b/system/inc/iptools.php new file mode 100644 index 0000000..93bc306 --- /dev/null +++ b/system/inc/iptools.php @@ -0,0 +1,354 @@ +safesql( htmlspecialchars( strip_tags( trim( $_REQUEST['ip'] ) ) ) ); else $ip = ""; +if( isset( $_REQUEST['name'] ) ) $name = $db->safesql( htmlspecialchars( strip_tags( trim( $_REQUEST['name'] ) ) ) ); else $name = ""; + +if( $_REQUEST['doaction'] == "dodelcomments" AND $_REQUEST['id']) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { + + die( "Hacking attempt! User not found" ); + + } + + $id = intval( $_REQUEST['id'] ); + + $result = $db->query( "SELECT COUNT(*) as count, post_id FROM " . PREFIX . "_comments WHERE user_id='$id' AND is_register='1' GROUP BY post_id" ); + + while ( $row = $db->get_array( $result ) ) { + $db->query( "UPDATE " . PREFIX . "_post set comm_num=comm_num-{$row['count']} where id='{$row['post_id']}'" ); + } + $db->free( $result ); + + $db->query( "UPDATE " . USERPREFIX . "_users set comm_num='0' WHERE user_id ='$id'" ); + $db->query( "DELETE FROM " . PREFIX . "_comments WHERE user_id='$id' AND is_register='1'" ); +} + +echoheader( "", "" ); + +echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + +
    {$lang['opt_iptoolsc']}
       
    {$lang['opt_ipfe']}
    {$lang['opt_iptoolsname']}
       
    +
    +
    + + + +HTML; + +if( $_REQUEST['action'] == "find" and $ip != "" ) { + + echo << + +
    + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + +HTML; + + $db->query( "SELECT * FROM " . USERPREFIX . "_users WHERE logged_ip LIKE '{$ip}%'" ); + + $i = 0; + while ( $row = $db->get_array() ) { + $i ++; + + if( $row[news_num] == 0 ) { + $news_link = "$row[news_num]"; + } else { + $news_link = "[" . $row[news_num] . "]"; + } + if( $row[comm_num] == 0 ) { + $comms_link = $row['comm_num']; + } else { + $comms_link = "[" . $row[comm_num] . "]"; + } + + if( $row['banned'] == 'yes' ) $group = "" . $lang['user_ban'] . ""; + else $group = $user_group[$row['user_group']]['group_name']; + + echo " + + + + + + + + + + + "; + } + + if( $i == 0 ) { + echo " + "; + } + + echo << + + + + + + + + +
    {$lang['user_name']}IP{$lang['user_reg']}{$lang['user_last']}{$lang['user_news']}{$lang['user_coms']}{$lang['user_acc']}
    + {$row['name']} + + " . $row['logged_ip'] . " + " . langdate( "d/m/Y - H:i", $row['reg_date'] ) . " + " . langdate( 'd/m/Y - H:i', $row['lastdate'] ) . " + " . $news_link . " + " . $comms_link . " + " . $group . "
    +


    $lang[ip_empty]

    +

    + +
    + + + + + + + + + + + +HTML; + +#### IMG + +?> \ No newline at end of file diff --git a/system/inc/newsimg/doaddimg.php b/system/inc/newsimg/doaddimg.php new file mode 100644 index 0000000..2229e25 --- /dev/null +++ b/system/inc/newsimg/doaddimg.php @@ -0,0 +1,72 @@ +size_auto( $config['poster_width'], 0 ) ) { + $thumb->jpeg_quality( $config['jpeg_quality'] ); + if( $config['allow_watermark'] == "yes" ) $thumb->insert_watermark( $config['max_watermark'] ); + $thumb->save( ROOT_DIR . "/uploads/covers/thumbs/" . $file_prefix . $image_name ); + } + @chmod( ROOT_DIR . "/uploads/covers/thumbs/" . $file_prefix . $image_name, 0666 ); + if( @file_exists( ROOT_DIR . "/uploads/covers/thumbs/" . $file_prefix . $image_name ) ) { + $th = '/covers/thumbs/' . $file_prefix . $image_name; + } + if( ($config['allow_watermark'] == "yes" ) or $config['max_up_side'] ) { + $thumb = new thumbnail( ROOT_DIR . "/uploads/covers/" . $file_prefix . $image_name ); + $thumb->jpeg_quality( $config['jpeg_quality'] ); + if( $config['max_up_side'] ) $thumb->size_auto( $config['max_up_side'] ); + if( $config['allow_watermark'] == "yes" ) $thumb->insert_watermark( $config['max_watermark'] ); + $thumb->save( ROOT_DIR . "/uploads/covers/" . $file_prefix . $image_name ); + }} + if ($url != '') {$db->query("INSERT INTO ".PREFIX."_covers VALUES ('0', '$row', '$url', '$th')");} +} +?> \ No newline at end of file diff --git a/system/inc/newsimg/doeditimg.php b/system/inc/newsimg/doeditimg.php new file mode 100644 index 0000000..27667d3 --- /dev/null +++ b/system/inc/newsimg/doeditimg.php @@ -0,0 +1,73 @@ +size_auto( $config['poster_width'], 0 ) ) { + $thumb->jpeg_quality( $config['jpeg_quality'] ); + if( $config['allow_watermark'] == "yes" ) $thumb->insert_watermark( $config['max_watermark'] ); + $thumb->save( ROOT_DIR . "/uploads/covers/thumbs/" . $file_prefix . $image_name ); + } + @chmod( ROOT_DIR . "/uploads/covers/thumbs/" . $file_prefix . $image_name, 0666 ); + if( @file_exists( ROOT_DIR . "/uploads/covers/thumbs/" . $file_prefix . $image_name ) ) {$th = '/covers/thumbs/' . $file_prefix . $image_name;} + if( ($config['allow_watermark'] == "yes" ) or $config['max_up_side'] ) { + $thumb = new thumbnail( ROOT_DIR . "/uploads/covers/" . $file_prefix . $image_name ); + $thumb->jpeg_quality( $config['jpeg_quality'] ); + if( $config['max_up_side'] ) $thumb->size_auto( $config['max_up_side'] ); + if( $config['allow_watermark'] == "yes" ) $thumb->insert_watermark( $config['max_watermark'] ); + $thumb->save( ROOT_DIR . "/uploads/covers/" . $file_prefix . $image_name ); + }} + if ($url != '') { + $newsid = $_GET['id']; + $db->query("INSERT INTO ".PREFIX."_covers VALUES ('0', '$newsid', '$url', '$th')"); + } +} +?> \ No newline at end of file diff --git a/system/inc/newsimg/editimg.php b/system/inc/newsimg/editimg.php new file mode 100644 index 0000000..93a508a --- /dev/null +++ b/system/inc/newsimg/editimg.php @@ -0,0 +1,116 @@ + + +'; + +if ($_GET['img']){ + $db->query("SELECT link, thumb FROM " . PREFIX . "_covers WHERE id = '".$_GET['img']."'"); + + while($row_covers = $db->get_row()){ + + @unlink(ROOT_DIR."/uploads".$row_covers['link']); + @unlink(ROOT_DIR."/uploads".$row_covers['thumb']); + + } +$db->query("DELETE FROM ".PREFIX."_covers WHERE id='".$_GET['img']."'"); +$ms = ""; +header("Location: /control.php?mod=editnews&action=editnews&id={$_GET['id']}"); +} + + +echo ""; +echo << + + +HTML; + +#### IMG + + +?> \ No newline at end of file diff --git a/system/inc/newsletter.php b/system/inc/newsletter.php new file mode 100644 index 0000000..b6b4d91 --- /dev/null +++ b/system/inc/newsletter.php @@ -0,0 +1,509 @@ +process($_POST['title']))); + $message = stripslashes($parse->process($_POST['message'])); + $start_from = intval($_GET['start_from']); + $limit = intval($_GET['limit']); + $interval = intval($_GET['interval']) * 1000; + + if ($limit < 1) { + + $limit = 20; + + } + + $message = $parse->BB_Parse($message, false); + + $where = array(); + + if ($empfanger != "all") $where[] = "user_group = '{$empfanger}'"; + if ($a_mail) $where[] = "allow_mail = '1'"; + + if (count($where)) $where = " WHERE ".implode (" AND ", $where); + else $where = ""; + + $row = $db->super_query("SELECT COUNT(*) as count FROM " . USERPREFIX . "_users".$where); + + if ($start_from > $row['count'] OR $start_from < 0) $start_from = 0; + + if ($type == "email") + $type_send = $lang['bb_b_mail']; + else + $type_send = $lang['nl_pm']; + +echo << + + +{$lang['nl_seng']} + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + +HTML; + + $db->query( "SELECT " . PREFIX . "_comments.user_id, " . PREFIX . "_comments.ip, " . USERPREFIX . "_users.comm_num, banned, user_group, reg_date, lastdate, " . USERPREFIX . "_users.name, " . USERPREFIX . "_users.news_num FROM " . PREFIX . "_comments LEFT JOIN " . USERPREFIX . "_users ON " . PREFIX . "_comments.user_id=" . USERPREFIX . "_users.user_id WHERE " . PREFIX . "_comments.ip LIKE '{$ip}%' AND " . PREFIX . "_comments.is_register = '1' AND " . USERPREFIX . "_users.name != '' GROUP BY " . PREFIX . "_comments.user_id" ); + + $i = 0; + while ( $row = $db->get_array() ) { + $i ++; + + if( $row[news_num] == 0 ) { + $news_link = "$row[news_num]"; + } else { + $news_link = "[" . $row[news_num] . "]"; + } + if( $row[comm_num] == 0 ) { + $comms_link = $row['comm_num']; + } else { + $comms_link = "[" . $row[comm_num] . "]"; + } + + if( $row['banned'] == 'yes' ) $group = "" . $lang['user_ban'] . ""; + else $group = $user_group[$row['user_group']]['group_name']; + + echo " + + + + + + + + + + + "; + } + + if( $i == 0 ) { + echo " + "; + } + + echo << + + + + + + + + +
    {$lang['user_name']}IP{$lang['user_reg']}{$lang['user_last']}{$lang['user_news']}{$lang['user_coms']}{$lang['user_acc']}
    + {$row['name']} + + " . $row['ip'] . " + " . langdate( "d/m/Y - H:i", $row['reg_date'] ) . " + " . langdate( 'd/m/Y - H:i', $row['lastdate'] ) . " + " . $news_link . " + " . $comms_link . " + " . $group . "
    +


    $lang[ip_empty]

    +

    + +HTML; + +} + +if( $name != "" ) { + + echo << + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + +
    +HTML; + + $row = $db->super_query( "SELECT user_id, name, logged_ip FROM " . USERPREFIX . "_users WHERE name='" . $name . "'" ); + + if( ! $row['user_id'] ) { + + echo "
    " . $lang['user_nouser'] . "
    "; + + } else { + + echo $lang['user_name'] . " " . $row['name'] . "

    " . $lang['opt_iptoollast'] . " " . $row['logged_ip'] . "

    " . $lang['opt_iptoolcall'] . " "; + + $db->query( "SELECT ip FROM " . PREFIX . "_comments WHERE user_id = '{$row['user_id']}' GROUP BY ip" ); + + $ip_list = array (); + + while ( $row = $db->get_array() ) { + $ip_list[] = "" . $row['ip'] . ""; + } + + echo implode( ", ", $ip_list ); + } + + echo <<
    +
    + +HTML; + +} + +echofooter(); +?> \ No newline at end of file diff --git a/system/inc/main.php b/system/inc/main.php new file mode 100644 index 0000000..814feed --- /dev/null +++ b/system/inc/main.php @@ -0,0 +1,232 @@ +query("TRUNCATE TABLE " . PREFIX . "_subscribe"); +} + +if( $_GET['action'] == "clear" ) { + $cache->delete('usergroup.php' ); + $cache->delete('category.php' ); + $cache->delete('banned.php' ); + $cache->delete('cron.php' ); + $cache->clear(); +} + +$row = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_post" ); +$stats_news = $row['count']; + +$row = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_subscribe" ); +$count_subscribe = $row['count']; + +$row = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_comments" ); +$count_comments = $row['count']; + +$row = $db->super_query( "SELECT COUNT(*) as count FROM " . USERPREFIX . "_users" ); +$stats_users = $row['count']; + +$row = $db->super_query( "SELECT COUNT(*) as count FROM " . USERPREFIX . "_users where banned='yes'" ); +$stats_banned = $row['count']; +if ($stats_banned) $stats_banned = "( {$stats_banned} )"; +else $stats_banned = ""; + +$row = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_post where approve = '0'" ); +$approve = $row['count']; + +if( $approve and $user_group[$member_id['user_group']]['allow_all_edit'] ) { + $approve = "( " .$approve . " ) [ {$lang['stat_medit_link']} ]"; +} else {$approve = "";} + +$db->query( "SHOW TABLE STATUS FROM `" . DBNAME . "`" ); +$mysql_size = 0; +while ( $r = $db->get_array() ) { + if( strpos( $r['Name'], PREFIX . "_" ) !== false ) $mysql_size += $r['Data_length'] + $r['Index_length']; +} +$db->free(); + +$mysql_size = mksize( $mysql_size ); +$cache_size = mksize( $cache->size() ); + +$dts = @disk_total_space("."); +$dfs = @disk_free_space("."); +$totalspace = mksize($dts); +$freespace = mksize($dfs); + +if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $winstats = shell_exec("net statistics server"); + preg_match("(\d{1,2}/\d{1,2}/\d{4}\s+\d{1,2}\:\d{2}\s+\w{2})", $winstats, $matches); + $uptimeSecs = time() - strtotime($matches[0]); + $uptime = format_uptime($uptimeSecs); +} else { + /*$data = shell_exec('uptime'); + $uptime = explode(' up ', $data); + $uptime = explode(',', $uptime[1]); + $uptime = $uptime[0].', '.$uptime[1];*/ + $uptime = exec("cat /proc/uptime"); + $uptime = split(" ",$uptime); + $uptimeSecs = $uptime[0]; + $uptime = format_uptime($uptimeSecs); +} + +if( $member_id['user_group'] == 1 ) { + + echo << + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +HTML; + +} else { + +// + +} + +echo << + + + + + + + + + + + + + + + + +
    + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :{$uptime}
    {$lang['stat_allnews']}{$stats_news} {$approve}
    {$lang['stat_comments']}{$count_comments} [ {$lang['last_comm']} ]
    {$lang['stat_users']}{$stats_users} {$stats_banned} [ ]
    {$lang['stat_bd']}{$mysql_size}
    :{$cache_size}
    {$lang['free_size']}{$freespace} ({$totalspace})
    +HTML; + +if( ! is_writable( ROOT_DIR . "/cache/" ) or ! is_writable( ROOT_DIR . "/cache/system/" ) ) { + echo "
    + $lang[stat_cache] +
     
    "; + +} + +if( $member_id['user_group'] == 1 ) { + + echo "
    "; + + if ($count_subscribe) echo " "; + + echo "
    "; +} + +echo << +
    + +HTML; + +echofooter(); +?> \ No newline at end of file diff --git a/system/inc/mass_static_actions.php b/system/inc/mass_static_actions.php new file mode 100644 index 0000000..8753504 --- /dev/null +++ b/system/inc/mass_static_actions.php @@ -0,0 +1,225 @@ +query( "UPDATE " . PREFIX . "_static SET {$field}='{$value}' WHERE id='{$id}'" ); + } + msg( "info", $lang['db_ok'], $lang['db_ok_1'].$t1, $_SESSION['admin_referrer'] ); +} + +if( $k_mass ) { + + echoheader( "options", $lang['mass_head'] ); + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    {$lang['mass_confirm']} +HTML; + + echo " (" . count( $selected_news ) . ") $lang[mass_confirm_1]

    +   + + + +"; + foreach ( $selected_news as $newsid ) { + $newsid = intval($newsid); + echo "\n"; + } + + echo << +
    +
    +
    +HTML; + + echofooter(); + exit(); + +} +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +if( $action == "mass_delete" ) { + + echoheader( "options", $lang['mass_head'] ); + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    {$lang['mass_confirm']} +HTML; + + echo "(" . count( $selected_news ) . ") $lang[mass_static_confirm_3]

    +   + + +"; + foreach ( $selected_news as $newsid ) { + $newsid = intval($newsid); + echo "\n"; + } + + echo << +
    +
    +
    +HTML; + + echofooter(); + exit(); + +} +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +elseif( $action == "do_mass_delete" ) { + + $deleted_articles = 0; + + foreach ( $selected_news as $id ) { + + $id = intval( $id ); + + $deleted_articles ++; + + $db->query( "DELETE FROM " . PREFIX . "_static WHERE id='$id'" ); + + $db->query( "SELECT name, onserver FROM " . PREFIX . "_static_files WHERE static_id = '$id'" ); + + while ( $row = $db->get_row() ) { + if( $row['onserver'] ) { + @unlink( ROOT_DIR . "/uploads/files/" . $row['onserver'] ); + } else { + $url_image = explode( "/", $row['name'] ); + if( count( $url_image ) == 2 ) { + $folder_prefix = $url_image[0] . "/"; + $dataimages = $url_image[1]; + } else { + $folder_prefix = ""; + $dataimages = $url_image[0]; + } + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . $dataimages ); + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . "thumbs/" . $dataimages ); + } + } + + $db->query( "DELETE FROM " . PREFIX . "_static_files WHERE static_id = '$id'" ); + + } + + if( count( $selected_news ) == $deleted_articles ) { + msg( "info", $lang['mass_static_delete'], $lang['mass_delok'], $_SESSION['admin_referrer'] ); + } else { + msg( "error", $lang['mass_notok'], "$deleted_articles $lang[mass_i] " . count( $selected_news ) . " $lang[mass_notok_1]", $_SESSION['admin_referrer'] ); + } +} +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +else { + + msg( "info", $lang['mass_noact'], $lang['mass_noact_1'], $_SESSION['admin_referrer'] ); + +} +?> \ No newline at end of file diff --git a/system/inc/mass_user_actions.php b/system/inc/mass_user_actions.php new file mode 100644 index 0000000..a3293a7 --- /dev/null +++ b/system/inc/mass_user_actions.php @@ -0,0 +1,398 @@ + +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    {$lang['massusers_confirm']} +HTML; + + echo " (" . count( $selected_users ) . ") $lang[massusers_confirm_1]

    +   + + +"; + foreach ( $selected_users as $userid ) { + $userid = intval($userid); + echo "\n"; + } + + echo << +
    +
    +
    +HTML; + + + echofooter(); + exit(); + +} elseif ($_POST['action'] == "do_mass_delete") { + + $deleted = 0; + + foreach ( $selected_users as $id ) { + + $id = intval( $id ); + + if( $id == 1 ) { + msg( "error", $lang['mass_error'], $lang['user_undel'], "?mod=editusers&action=list" ); + } + + $row = $db->super_query( "SELECT user_id, user_group, name, foto FROM " . USERPREFIX . "_users WHERE user_id='$id'" ); + + if( ! $row['user_id'] ) msg( "error", $lang['mass_error'], $lang['user_undel'], "?mod=editusers&action=list" ); + + if ($member_id['user_group'] != 1 AND $row['user_group'] == 1 ) + msg( "error", $lang['mass_error'], $lang['user_undel'], "?mod=editusers&action=list" ); + + $db->query( "DELETE FROM " . USERPREFIX . "_pm WHERE user_from = '{$row['name']}' AND folder = 'outbox'" ); + $db->query( "delete FROM " . USERPREFIX . "_users WHERE user_id='$id'" ); + $db->query( "delete FROM " . USERPREFIX . "_banned WHERE users_id='$id'" ); + $db->query( "delete FROM " . USERPREFIX . "_pm WHERE user='$id'" ); + + @unlink( ROOT_DIR . "/uploads/fotos/" . $row['foto'] ); + + $deleted ++; + } + + $cache->clear(); + $cache->delete('banned.php' ); + + if( count( $selected_users ) == $deleted ) { + msg( "info", $lang['massusers_head'], $lang['massusers_delok'], "?mod=editusers&action=list" ); + } else { + msg( "error", $lang['mass_error'], "$deleted $lang[mass_i] " . count( $selected_users ) . " $lang[massusers_confirm_2]", "?mod=editusers&action=list" ); + } + +} elseif ($_POST['action'] == "mass_delete_comments") { + + echoheader( "options", $lang['mass_head'] ); + + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    {$lang['massusers_confirm_3']} +HTML; + + echo " (" . count( $selected_users ) . ") $lang[massusers_confirm_1]

    +   + + +"; + foreach ( $selected_users as $userid ) { + $userid = intval($userid); + echo "\n"; + } + + echo << +
    +
    +
    +HTML; + + echofooter(); + exit(); + +} elseif ($_POST['action'] == "do_mass_delete_comments") { + + foreach ( $selected_users as $id ) { + + $id = intval( $id ); + + $result = $db->query( "SELECT COUNT(*) as count, post_id FROM " . PREFIX . "_comments WHERE user_id='$id' AND is_register='1' GROUP BY post_id" ); + + while ( $row = $db->get_array( $result ) ) { + + $db->query( "UPDATE " . PREFIX . "_post set comm_num=comm_num-{$row['count']} where id='{$row['post_id']}'" ); + + } + $db->free( $result ); + + $db->query( "UPDATE " . USERPREFIX . "_users set comm_num='0' WHERE user_id ='$id'" ); + $db->query( "DELETE FROM " . PREFIX . "_comments WHERE user_id='$id' AND is_register='1'" ); + + } + + $cache->clear(); + msg( "info", $lang['massusers_head_1'], $lang['massusers_comok'], "?mod=editusers&action=list" ); + +} elseif ($_POST['action'] == "mass_move_to_group") { + + + echoheader( "options", $lang['mass_head'] ); + + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    {$lang['massusers_confirm_4']} +HTML; + + echo " (" . count( $selected_users ) . ") $lang[massusers_confirm_1]

    +{$lang['user_acc']} {$lang['user_gtlimit']} [?] +

    +   + + +"; + foreach ( $selected_users as $userid ) { + $userid = intval($userid); + echo "\n"; + } + + echo << +
    +
    +
    + + + + + + +HTML; + + echofooter(); + exit(); + +} elseif ($_POST['action'] == "do_mass_move_to_group") { + + $editlevel = intval( $_POST['editlevel'] ); + + if ($member_id['user_group'] != 1 AND $editlevel < 2 ) + msg( "error", $lang['mass_error'], $lang['admin_not_access'], "?mod=editusers&action=list" ); + + foreach ( $selected_users as $id ) { + + $id = intval( $id ); + + $row = $db->super_query( "SELECT user_group FROM " . USERPREFIX . "_users WHERE user_id='$id'" ); + + if ($member_id['user_group'] != 1 AND $row['user_group'] == 1 ) + msg( "error", $lang['mass_error'], $lang['edit_not_admin'], "?mod=editusers&action=list" ); + + } + + $cache->clear(); + msg( "info", $lang['massusers_head_2'], $lang['massusers_groupok']." ".$user_group[$editlevel]['group_name']."", "?mod=editusers&action=list" ); + +} elseif ($_POST['action'] == "mass_move_to_ban") { + + echoheader( "options", $lang['mass_head'] ); + + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    {$lang['massusers_confirm_5']} +HTML; + + echo " (" . count( $selected_users ) . ") $lang[massusers_confirm_1]

    +
    {$lang['ban_date']} [?] +

    {$lang['ban_descr']}
    +

    +   + + +"; + foreach ( $selected_users as $userid ) { + $userid = intval($userid); + echo "\n"; + } + + echo << +
    +
    +
    +HTML; + + echofooter(); + exit(); + +} elseif ($_POST['action'] == "do_mass_move_to_ban") { + + + include_once SYSTEM_DIR . '/classes/parse.class.php'; + $parse = new ParseFilter( ); + + foreach ( $selected_users as $id ) { + + $id = intval( $id ); + + $row = $db->super_query( "SELECT user_group FROM " . USERPREFIX . "_users WHERE user_id='$id'" ); + + if ($member_id['user_group'] != 1 AND $row['user_group'] == 1 ) + msg( "error", $lang['mass_error'], $lang['edit_not_admin'], "?mod=editusers&action=list" ); + + + $banned_descr = $db->safesql( $parse->BB_Parse( $parse->process( $_POST['banned_descr'] ), false ) ); + $this_time = time() + ($config['date_adjust'] * 60); + $banned_date = intval( $_POST['banned_date'] ); + $this_time = $banned_date ? $this_time + ($banned_date * 60 * 60 * 24) : 0; + + $row = $db->super_query( "SELECT users_id, days FROM " . USERPREFIX . "_banned WHERE users_id = '$id'" ); + + if( ! $row['users_id'] ) $db->query( "INSERT INTO " . USERPREFIX . "_banned (users_id, descr, date, days) values ('$id', '$banned_descr', '$this_time', '$banned_date')" ); + else { + + if( $row['days'] != $banned_date ) $db->query( "UPDATE " . USERPREFIX . "_banned SET descr='$banned_descr', days='$banned_date', date='$this_time' WHERE users_id = '$id'" ); + else $db->query( "UPDATE " . USERPREFIX . "_banned set descr='$banned_descr' WHERE users_id = '$id'" ); + + } + + $cache->delete('banned.php' ); + + $db->query( "UPDATE " . USERPREFIX . "_users SET banned='yes' WHERE user_id ='$id'" ); + + + } + + $cache->clear(); + msg( "info", $lang['massusers_head_3'], $lang['massusers_banok'], "?mod=editusers&action=list" ); + + +} else { + + msg( "info", $lang['mass_noact'], $lang['mass_noact_1'], "?mod=editusers&action=list" ); + +} +?> \ No newline at end of file diff --git a/system/inc/massactions.php b/system/inc/massactions.php new file mode 100644 index 0000000..e9711a2 --- /dev/null +++ b/system/inc/massactions.php @@ -0,0 +1,468 @@ +query( "UPDATE " . PREFIX . "_post SET {$field}='{$value}' WHERE id='{$id}'" ); + + if( $field == "approve" ) { + + if( $value ) { + + $db->query( "DELETE FROM " . PREFIX . "_tags WHERE news_id = '{$id}'" ); + $row = $db->super_query( "SELECT tags FROM " . PREFIX . "_post where id = '{$id}'" ); + + if( $row['tags'] ) { + + $tags = array (); + + $row['tags'] = explode( ",", $row['tags'] ); + + foreach ( $row['tags'] as $tags_value ) { + + $tags[] = "('" . $id . "', '" . trim( $tags_value ) . "')"; + } + + $tags = implode( ", ", $tags ); + $db->query( "INSERT INTO " . PREFIX . "_tags (news_id, tag) VALUES " . $tags ); + + } + + } else { + + $db->query( "DELETE FROM " . PREFIX . "_tags WHERE news_id = '{$id}'" ); + + } + + } + + if ( $field == "rating" ) { + + $db->query( "DELETE FROM " . PREFIX . "_rate WHERE type_id = '{$id}' AND type=1" ); + + } + + } + + $cache->clear(); + + msg( "info", $lang['db_ok'], $lang['db_ok_1'], $_SESSION['admin_referrer'] ); +} + +if( $k_mass ) { + + echoheader( "options", $lang['mass_head'] ); + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    {$lang['mass_confirm']} +HTML; + + echo " (" . count( $selected_news ) . ") $lang[mass_confirm_1]

    +   + + + +"; + foreach ( $selected_news as $newsid ) { + $newsid = intval($newsid); + echo "\n"; + } + + echo << +
    +
    +
    +HTML; + + echofooter(); + exit(); + +} +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +if( $action == "mass_delete" ) { + + echoheader( "options", $lang['mass_head'] ); + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    {$lang['mass_confirm']} +HTML; + + echo "(" . count( $selected_news ) . ") $lang[mass_confirm_1]

    +   + + +"; + foreach ( $selected_news as $newsid ) { + $newsid = intval($newsid); + echo "\n"; + } + + echo << +
    +
    +
    +HTML; + + echofooter(); + exit(); + +} +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +elseif( $action == "do_mass_delete" ) { + + $deleted_articles = 0; + + foreach ( $selected_news as $id ) { + + $id = intval( $id ); + $row = $db->super_query( "SELECT autor FROM " . PREFIX . "_post where id = '$id'" ); + + $db->query( "UPDATE " . USERPREFIX . "_users set news_num=news_num-1 where name='{$row['autor']}'" ); + + $deleted_articles ++; + + $db->query( "DELETE FROM " . PREFIX . "_post WHERE id='$id'" ); + + $db->query( "DELETE FROM " . PREFIX . "_comments WHERE post_id='$id'" ); + + $db->query( "SELECT onserver FROM " . PREFIX . "_files WHERE news_id = '$id'" ); + while ( $row = $db->get_row() ) { + @unlink( ROOT_DIR . "/uploads/files/" . $row['onserver'] ); + } + + $db->query("SELECT id, link, thumb FROM " . PREFIX . "_covers WHERE newsid = '$id'"); + + while($row_covers = $db->get_row()){ + + @unlink(ROOT_DIR."/uploads".$row_covers['link']); + @unlink(ROOT_DIR."/uploads".$row_covers['thumb']); + + } + + $db->query("DELETE FROM " . PREFIX . "_covers WHERE newsid = '$id'"); + + $db->query("SELECT id, onserver FROM " . PREFIX . "_torrents WHERE news_id = '$id'"); + + while($row_torrents = $db->get_row()){ + + @unlink(ROOT_DIR."/uploads/torrents/".$row_torrents['onserver']); + + } + + $db->query( "UPDATE " . PREFIX . "_torrents SET flags=1 where news_id='$id'" ); + $db->free(); + + $db->query( "DELETE FROM " . PREFIX . "_files WHERE news_id = '$id'" ); + $db->query( "DELETE FROM " . PREFIX . "_poll WHERE news_id = '$id'" ); + $db->query( "DELETE FROM " . PREFIX . "_poll_log WHERE news_id = '$id'" ); + $db->query( "DELETE FROM " . PREFIX . "_rate WHERE type_id = '$id' AND type=1" ); + $db->query( "DELETE FROM " . PREFIX . "_tags WHERE news_id = '$id'" ); + + $row = $db->super_query( "SELECT images FROM " . PREFIX . "_images where news_id = '$id'" ); + + $listimages = explode( "|||", $row['images'] ); + + if( $row['images'] != "" ) foreach ( $listimages as $dataimages ) { + $url_image = explode( "/", $dataimages ); + + if( count( $url_image ) == 2 ) { + + $folder_prefix = $url_image[0] . "/"; + $dataimages = $url_image[1]; + + } else { + + $folder_prefix = ""; + $dataimages = $url_image[0]; + + } + + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . $dataimages ); + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . "thumbs/" . $dataimages ); + } + + $db->query( "DELETE FROM " . PREFIX . "_images WHERE news_id = '$id'" ); + } + + $cache->clear(); + + if( count( $selected_news ) == $deleted_articles ) { + msg( "info", $lang['mass_head'], $lang['mass_delok'], $_SESSION['admin_referrer'] ); + } else { + msg( "error", $lang['mass_notok'], "$deleted_articles $lang[mass_i] " . count( $selected_news ) . " $lang[mass_notok_1]", $_SESSION['admin_referrer'] ); + } +} +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +elseif( $action == "mass_move_to_cat" ) { + + echoheader( "options", $lang['mass_cat'] ); + + $count = count( $selected_news ); + if( $config['allow_multi_category'] ) $category_multiple = "class=\"cat_select\" multiple"; + else $category_multiple = ""; + + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + +
    {$lang['mass_cat_2']} ({$count}) {$lang['mass_cat_3']} +"; + + foreach ( $selected_news as $newsid ) { + $newsid = intval($newsid); + echo ""; + } + + echo << 
    +
    +
    +HTML; + + echofooter(); + exit(); +} +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +elseif( $action == "do_mass_move_to_cat" ) { + + $moved_articles = 0; + + $move_to_category = $db->safesql( implode( ',', $_REQUEST['move_to_category'] ) ); + + foreach ( $selected_news as $id ) { + $moved_articles ++; + $id = intval( $id ); + + $db->query( "UPDATE " . PREFIX . "_post set category='$move_to_category' WHERE id='$id'" ); + } + + $cache->clear(); + + if( count( $selected_news ) == $moved_articles ) { + msg( "info", $lang['mass_cat_ok'], "$lang[mass_cat_ok] ($moved_articles)", $_SESSION['admin_referrer'] ); + } else { + msg( "error", $lang['mass_cat_notok'], $lang['mass_cat_notok_1'], $_SESSION['admin_referrer'] ); + } +} +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +else { + + msg( "info", $lang['mass_noact'], $lang['mass_noact_1'], $_SESSION['admin_referrer'] ); + +} +?> \ No newline at end of file diff --git a/system/inc/newsimg/addimg.php b/system/inc/newsimg/addimg.php new file mode 100644 index 0000000..88a72cd --- /dev/null +++ b/system/inc/newsimg/addimg.php @@ -0,0 +1,79 @@ + + function ShowOrHideEx(id, show) { + var item = null; + if (document.getElementById) { + item = document.getElementById(id); + } else if (document.all) { + item = document.all[id]; + } else if (document.layers){ + item = document.layers[id]; + } + if (item && item.style) { + item.style.display = show ? \"\" : \"none\"; + } + } + + var total_allow_rows = {$config['max_file_count']}; + + function AddImages() { + var tbl = document.getElementById('tblSample'); + var lastRow = tbl.rows.length; + + if (total_allow_rows && lastRow == total_allow_rows ) return; + + // if there's no header row in the table, then iteration = lastRow + 1 + var iteration = lastRow+1; + var row = tbl.insertRow(lastRow); + + var cellRight = row.insertCell(0); + var el = document.createElement('input'); + el.setAttribute('type', 'file'); + el.setAttribute('name', 'addimg_' + iteration); + el.setAttribute('size', '41'); + el.setAttribute('value', iteration); + cellRight.appendChild(el); + + document.getElementById('images_number').value = iteration; + } + + function RemoveImages() { + var tbl = document.getElementById('tblSample'); + var lastRow = tbl.rows.length; + if (lastRow > 1){ + tbl.deleteRow(lastRow - 1); + document.getElementById('images_number').value = document.getElementById('images_number').value - 1; + } + } + "; +echo <<
    {$lang['images_uphard']} + +
    + + + + +
    + +
    + +   +
    + +
    + + +HTML; +} + +echo '
    +HTML; + +$newsimg_query = $db->query("SELECT * FROM ".PREFIX."_covers WHERE newsid='".$_GET['id']."' ORDER BY id DESC"); +while ($newsimg = $db->get_row($newsimg_query)) { +echo << +
    {$lang['images_uphard']} + +
    + + + + +
    + +
    + +   +
    + +
    + + + + + + + + + + +
    +HTML; + +echo << +
    +
    + + + + + + + + + + + + +
    {$lang['nl_empf']}{$row['count']}
    {$lang['nl_type']}{$type_send}
    + + + + + + + + + + +
    {$lang['nl_sendet']} {$start_from} {$lang['mass_i']} {$row['count']} {$lang['nl_status']}

    +HTML; + +$message = stripslashes($message); + +echo << +
    + + + + + +HTML; + +} +elseif ($action=="preview") +{ +include_once SYSTEM_DIR.'/classes/parse.class.php'; + +$parse = new ParseFilter(Array(), Array(), 1, 1); + +$title = strip_tags(stripslashes($parse->process($_POST['title']))); +$message = stripslashes($parse->process($_POST['message'])); + +$message = $parse->BB_Parse($message, false); + +echo <<{$title} + + + +HTML; + +echo "
    {$title} {$message}
    "; + + +} +elseif ($action=="message") { + echoheader("newsletter", ""); + + + echo " + "; + + echo " + "; + +echo << + +
    +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + +HTML; + +include(SYSTEM_DIR.'/inc/include/inserttag.php'); + +echo << + + +HTML; + +$start_from = intval($_GET['start_from']); + +echo << + + + +
    {$lang['edit_title']}
    {$lang['nl_message']} + +
    {$bb_code} +

    {$lang['nl_info_1']} {$lang['nl_info_2']}
    +
      + + + + + + +
      +
    +
    +
    +HTML; + + echofooter(); +} +else { + + echoheader("newsletter", ""); + $group_list = get_groups (); + +echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang['nl_empf']}
    {$lang['nl_type']}
    {$lang['nl_startfrom']} {$lang['nl_user']}
    {$lang['nl_n_mail']}
    {$lang['nl_interval']}
    {$lang['nl_amail']}
     
    +
    +
    +HTML; + echofooter(); +} +?> \ No newline at end of file diff --git a/system/inc/options.php b/system/inc/options.php new file mode 100644 index 0000000..5234068 --- /dev/null +++ b/system/inc/options.php @@ -0,0 +1,705 @@ + $lang['opt_all'], + 'url' => "$PHP_SELF?mod=options&action=syscon", + 'descr' => $lang['opt_allc'], + 'image' => "tools.png", + 'access' => "admin" + ), + array ( + 'name' => $lang['opt_cat'], + 'url' => "$PHP_SELF?mod=categories", + 'descr' => $lang['opt_catc'], + 'image' => "cats.png", + 'access' => $user_group[$member_id['user_group']]['admin_categories'] + ) + ); + + $options['user'] = array ( + + array ( + 'name' => $lang['opt_user'], + 'url' => "$PHP_SELF?mod=editusers&action=list", + 'descr' => $lang['opt_userc'], + 'image' => "uset.png", + 'access' => $user_group[$member_id['user_group']]['admin_editusers'] + ), + + array ( + 'name' => $lang['opt_group'], + 'url' => "$PHP_SELF?mod=usergroup", + 'descr' => $lang['opt_groupc'], + 'image' => "usersgroup.png", + 'access' => "admin" + ) + ); + + $options['filter'] = array ( + + array ( + 'name' => $lang['opt_fil'], + 'url' => "$PHP_SELF?mod=wordfilter", + 'descr' => $lang['opt_filc'], + 'image' => "fset.png", + 'access' => $user_group[$member_id['user_group']]['admin_wordfilter'] + ), + + array ( + 'name' => $lang['opt_ipban'], + 'url' => "$PHP_SELF?mod=blockip", + 'descr' => $lang['opt_ipbanc'], + 'image' => "blockip.png", + 'access' => $user_group[$member_id['user_group']]['admin_blockip'] + ) + ); + + + + $options['others'] = array ( + + array ( + 'name' => $lang['opt_email'], + 'url' => "$PHP_SELF?mod=email", + 'descr' => $lang['opt_emailc'], + 'image' => "mset.png", + 'access' => "admin" + ), + + array ( + 'name' => $lang['opt_static'], + 'url' => "$PHP_SELF?mod=static", + 'descr' => $lang['opt_staticd'], + 'image' => "spset.png", + 'access' => $user_group[$member_id['user_group']]['admin_static'] + ), + + array ( + 'name' => $lang['opt_clean'], + 'url' => "$PHP_SELF?mod=clean", + 'descr' => $lang['opt_cleanc'], + 'image' => "clean.png", + 'access' => "admin" + ), + + array ( + 'name' => $lang['main_newsl'], + 'url' => "$PHP_SELF?mod=newsletter", + 'descr' => $lang['main_newslc'], + 'image' => "nset.png", + 'access' => "admin" + ), + + array ( + 'name' => $lang['opt_img'], + 'url' => "$PHP_SELF?mod=files", + 'descr' => $lang['opt_imgc'], + 'image' => "iset.png", + 'access' => "admin" + ), + + array ( + 'name' => ' ', + 'url' => "$PHP_SELF?mod=table", + 'descr' => ' ', + 'image' => "fset.png", + 'access' => $user_group[$member_id['user_group']]['admin_table'] + ), + + array ( + 'name' => $lang['opt_google'], + 'url' => "$PHP_SELF?mod=googlemap", + 'descr' => $lang['opt_googlec'], + 'image' => "googlemap.png", + 'access' => $user_group[$member_id['user_group']]['admin_googlemap'] + ), + array( + 'name' => "Mini Chat", + 'url' => "$PHP_SELF?mod=chat", + 'descr' => " ", + 'image' => "mchat.png", + 'access' => "admin" + ), + + array( + 'name' => "", + 'url' => "$PHP_SELF?mod=repa", + 'descr' => " ", + 'image' => "rep.png", + 'access' => "admin" + ), + array( + 'name' => "Forum", + 'url' => "$PHP_SELF?mod=forum", + 'descr' => " ", + 'image' => "dle_forum.PNG", + 'access' => "admin", + ) + + ); + + + + //------------------------------------------------ + // Cut the options for wich we don't have access + //------------------------------------------------ + foreach ( $options as $sub_options => $value ) { + $count_options = count( $value ); + + for($i = 0; $i < $count_options; $i ++) { + + if ($member_id['user_group'] == 1 ) continue; + + if ($member_id['user_group'] != 1 AND $value[$i]['access'] == "admin") unset( $options[$sub_options][$i] ); + + if ( !$value[$i]['access'] ) unset( $options[$sub_options][$i] ); + } + } + + $subs = 0; + + foreach ( $options as $sub_options ) { + + if( $subs == 1 ) $lang['opt_hopt'] = $lang['opt_s_acc']; + if( $subs == 2 ) $lang['opt_hopt'] = $lang['opt_s_tem']; + if( $subs == 3 ) $lang['opt_hopt'] = $lang['opt_s_fil']; + if( $subs == 4 ) $lang['opt_hopt'] = $lang['opt_s_oth']; + + $subs ++; + + if( ! count( $sub_options ) ) continue; + + echo << + + + + + + + + + +HTML; + + } + + echo <<
    + + + + +
    +
    +HTML; + + $i = 0; + + foreach ( $sub_options as $option ) { + + if( $i > 1 ) { + echo ""; + $i = 0; + } + + $i ++; + + echo << +
    + + + + +
    +
    + + + + + + + + + +
    +HTML; + + } + + echofooter(); +} + +// ******************************************************************************** +// Íàñòðîéêè ñêðèïòà +// ******************************************************************************** +elseif( $action == "syscon" ) { + + if( $member_id['user_group'] != 1 ) { + msg( "error", $lang['opt_denied'], $lang['opt_denied'] ); + } + + include_once SYSTEM_DIR . '/classes/parse.class.php'; + $parse = new ParseFilter( Array (), Array (), 1, 1 ); + + $config['offline_reason'] = str_replace( '"', '"', $config['offline_reason'] ); + + $config['offline_reason'] = $parse->decodeBBCodes( $config['offline_reason'], false ); + if( $auto_detect_config ) $config['http_home_url'] = ""; + + echoheader( "options", $lang['opt_all'] ); + + if( ! $handle = opendir( "./templates" ) ) { + die( "Íåâîçìîæíî îòêðûòü äèðåêòîðèþ ./templates" ); + } + while ( false !== ($file = readdir( $handle )) ) { + if( is_dir( ROOT_DIR . "/templates/$file" ) and ($file != "." and $file != "..") ) { + $sys_con_skins_arr[$file] = $file; + } + } + closedir( $handle ); + + if( ! $handle = opendir( "./language" ) ) { + die( "Íåâîçìîæíî îòêðûòü äèðåêòîðèþ ./data/language/" ); + } + while ( false !== ($file = readdir( $handle )) ) { + if( is_dir( ROOT_DIR . "/language/$file" ) and ($file != "." and $file != "..") ) { + $sys_con_langs_arr[$file] = $file; + } + } + closedir( $handle ); + + foreach ( $user_group as $group ) + $sys_group_arr[$group['id']] = $group['group_name']; + + echo << + + function ChangeOption(selectedOption) { + + document.getElementById('general').style.display = "none"; + document.getElementById('security').style.display = "none"; + document.getElementById('news').style.display = "none"; + document.getElementById('comments').style.display = "none"; + document.getElementById('optimisation').style.display = "none"; + document.getElementById('files').style.display = "none"; + document.getElementById('mail').style.display = "none"; + document.getElementById('users').style.display = "none"; + document.getElementById('imagesconf').style.display = "none"; + document.getElementById('rss').style.display = "none"; + document.getElementById('smartphone').style.display = "none"; + + if(selectedOption == 'general') {document.getElementById('general').style.display = "";} + if(selectedOption == 'security') {document.getElementById('security').style.display = "";} + if(selectedOption == 'news') {document.getElementById('news').style.display = "";} + if(selectedOption == 'comments') {document.getElementById('comments').style.display = "";} + if(selectedOption == 'optimisation') {document.getElementById('optimisation').style.display = "";} + if(selectedOption == 'files') {document.getElementById('files').style.display = "";} + if(selectedOption == 'mail') {document.getElementById('mail').style.display = "";} + if(selectedOption == 'users') {document.getElementById('users').style.display = "";} + if(selectedOption == 'imagesconf') {document.getElementById('imagesconf').style.display = "";} + if(selectedOption == 'smartphone') {document.getElementById('smartphone').style.display = "";} + if(selectedOption == 'rss') {document.getElementById('rss').style.display = "";} + + + } + + +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + +
    + + + +
    + + + + + + + + + + + +
    +
    +
    +
    +HTML; + + echo << +
    + + + + + + + + + + + + + + + + +
    + +HTML; + + echo <<"; + + echo <<"; + + echo <<"; + + echo <<"; + + echo <<"; + + echo <<"; + + echo <<"; + + echo <<"; + + echo <<"; + + + echo <<"; + + + echo <<"; + + echo << + + +
    + + + + +
    +
    +HTML; + + showRow( $lang['opt_sys_ht'], $lang['opt_sys_htd'], "" ); + showRow( $lang['opt_sys_hu'], $lang['opt_sys_hud'], "" ); + + showRow( $lang['opt_sys_chars'], $lang['opt_sys_charsd'], "" ); + + showRow( $lang['opt_sys_descr'], $lang['opt_sys_descrd'], "" ); + showRow( $lang['opt_sys_key'], $lang['opt_sys_keyd'], "" ); + showRow( $lang['opt_sys_short_name'], $lang['opt_sys_short_named'], "" ); + + showRow( $lang['opt_sys_at'], $lang['opt_sys_atd']." ".date ( "d.m.Y, H:i", time () + ($config['date_adjust'] * 60) ), "" ); + + showRow( $lang['opt_sys_dc'], $lang['opt_sys_dcd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_alt_url]", "{$config['allow_alt_url']}" ) ); + + showRow( $lang['opt_sys_al'], $lang['opt_sys_ald'], makeDropDown( $sys_con_langs_arr, "save_con[langs]", "{$config['langs']}" ) ); + showRow( $lang['opt_sys_as'], $lang['opt_sys_asd'], makeDropDown( $sys_con_skins_arr, "save_con[skin]", "{$config['skin']}" ) ); + + showRow( $lang['opt_sys_ag'], $lang['opt_sys_agd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_gzip]", "{$config['allow_gzip']}" ) ); + showRow( $lang['opt_sys_cac'], $lang['opt_sys_cad'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_cache]", "{$config['allow_cache']}" ) ); + showRow( " ", "Files - , MemCache - ", makeDropDown( array ("0" => "Files", "1" => "Memcache" ), "save_con[cache_type]", "{$config['cache_type']}" ) ); + + showRow( $lang['opt_sys_offline'], $lang['opt_sys_offlined'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[site_offline]", "{$config['site_offline']}" ) ); + showRow( $lang['opt_sys_reason'], $lang['opt_sys_reasond'], "" ); + + echo "
    + + + + +
    +
    +HTML; + + showRow( $lang['opt_sys_path'], $lang['opt_sys_pathd'], "" ); + + showRow( $lang['opt_sys_ip'], $lang['opt_sys_ipd'], makeDropDown( array ("0" => $lang['opt_sys_ipn'], "1" => $lang['opt_sys_ipm'], "2" => $lang['opt_sys_iph'] ), "save_con[ip_control]", "{$config['ip_control']}" ) ); + + showRow( $lang['opt_sys_loghash'], $lang['opt_sys_loghashd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[log_hash]", "{$config['log_hash']}" ) ); + + echo "
    + + + + +
    +
    +HTML; + + showRow( $lang['opt_sys_newc'], $lang['opt_sys_newd'], "" ); + showRow( " ", " ", "" ); + showRow( $lang['opt_sys_related_num'], $lang['opt_sys_related_numd'], "" ); + showRow( ' ', ' ', "" ); + showRow( $lang['opt_sys_am'], $lang['opt_sys_amd'], "" ); + showRow( $lang['opt_sys_an'], "$lang[opt_sys_and]", "" ); + showRow( $lang['opt_sys_sort'], $lang['opt_sys_sortd'], makeDropDown( array ("date" => $lang['opt_sys_sdate'], "rating" => $lang['opt_sys_srate'], "news_read" => $lang['opt_sys_sview'], "title" => $lang['opt_sys_salph'] ), "save_con[news_sort]", "{$config['news_sort']}" ) ); + showRow( $lang['opt_sys_msort'], $lang['opt_sys_msortd'], makeDropDown( array ("DESC" => $lang['opt_sys_mminus'], "ASC" => $lang['opt_sys_mplus'] ), "save_con[news_msort]", "{$config['news_msort']}" ) ); + showRow( $lang['opt_sys_catsort'], $lang['opt_sys_catsortd'], makeDropDown( array ("date" => $lang['opt_sys_sdate'], "rating" => $lang['opt_sys_srate'], "news_read" => $lang['opt_sys_sview'], "title" => $lang['opt_sys_salph'] ), "save_con[catalog_sort]", "{$config['catalog_sort']}" ) ); + showRow( $lang['opt_sys_catmsort'], $lang['opt_sys_catmsortd'], makeDropDown( array ("DESC" => $lang['opt_sys_mminus'], "ASC" => $lang['opt_sys_mplus'] ), "save_con[catalog_msort]", "{$config['catalog_msort']}" ) ); + showRow( $lang['opt_sys_align'], $lang['opt_sys_alignd'], makeDropDown( array ("" => $lang['opt_sys_none'], "left" => $lang['opt_sys_left'], "center" => $lang['opt_sys_center'], "right" => $lang['opt_sys_right'] ), "save_con[image_align]", "{$config['image_align']}" ) ); + + showRow( $lang['opt_sys_adt'], $lang['opt_sys_adtd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_add_tags]", "{$config['allow_add_tags']}" ) ); + + echo "
    + + + + +
    +
    +HTML; + showRow( $lang['opt_sys_alc'], $lang['opt_sys_alcd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_comments]", "{$config['allow_comments']}" ) ); + showRow( $lang['opt_sys_maxc'], $lang['opt_sys_maxcd'], "" ); + showRow( $lang['opt_sys_cpm'], $lang['opt_sys_cpmd'], "" ); + showRow( $lang['opt_sys_csort'], $lang['opt_sys_csortd'], makeDropDown( array ("DESC" => $lang['opt_sys_mminus'], "ASC" => $lang['opt_sys_mplus'] ), "save_con[comm_msort]", "{$config['comm_msort']}" ) ); + showRow( $lang['opt_sys_aw'], $lang['opt_sys_awd'], "" ); + showRow( $lang['opt_sys_ct'], "$lang[opt_sys_and]", "" ); + echo "
    + + + + +
    +
    +HTML; + + showRow( $lang['opt_sys_search'], $lang['opt_sys_searchd'], makeDropDown( array ("1" => $lang['opt_sys_advance'], "0" => $lang['opt_sys_simple'] ), "save_con[full_search]", "{$config['full_search']}" ) ); + showRow( $lang['opt_sys_multiple'], $lang['opt_sys_multipled'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_multi_category]", "{$config['allow_multi_category']}" ) ); + showRow( $lang['opt_sys_nodate'], $lang['opt_sys_nodated'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[no_date]", "{$config['no_date']}" ) ); + showRow( $lang['opt_sys_ajax'], $lang['opt_sys_ajaxd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[ajax]", "{$config['ajax']}" ) ); + + echo "
    + + + + +
    +
    +HTML; + + showRow( $lang['opt_sys_file'], $lang['opt_sys_filed'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[files_allow]", "{$config['files_allow']}" ) ); + showRow( $lang['opt_sys_file1'], $lang['opt_sys_file1d'], "" ); + + showRow( $lang['opt_sys_maxfile'], $lang['opt_sys_maxfiled'], "" ); + showRow( $lang['opt_sys_maxfilec'], $lang['opt_sys_maxfilecd'], "" ); + + showRow( $lang['opt_sys_file4'], $lang['opt_sys_file4d'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[files_force]", "{$config['files_force']}" ) ); + showRow( $lang['opt_sys_file5'], $lang['opt_sys_file5d'], "" ); + showRow( $lang['opt_sys_file2'], $lang['opt_sys_file2d'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[files_count]", "{$config['files_count']}" ) ); + + echo "
    + + + + +
    +
    +HTML; + showRow( $lang['opt_sys_amail'], $lang['opt_sys_amaild'], "" ); + + showRow( $lang['opt_sys_mm'], $lang['opt_sys_mmd'], makeDropDown( array ("php" => "PHP Mail()", "smtp" => "SMTP" ), "save_con[mail_metod]", "{$config['mail_metod']}" ) ); + + showRow( $lang['opt_sys_smtph'], $lang['opt_sys_smtphd'], "" ); + showRow( $lang['opt_sys_smtpp'], $lang['opt_sys_smtppd'], "" ); + showRow( $lang['opt_sys_smtup'], $lang['opt_sys_smtpud'], "" ); + showRow( $lang['opt_sys_smtupp'], $lang['opt_sys_smtpupd'], "" ); + + showRow( $lang['opt_sys_mbcc'], $lang['opt_sys_mbccd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[mail_bcc]", "{$config['mail_bcc']}" ) ); + + echo "
    + + + + +
    +
    +HTML; + showRow( $lang['opt_sys_reggroup'], $lang['opt_sys_reggroupd'], makeDropDown( $sys_group_arr, "save_con[reg_group]", $config['reg_group'] ) ); + + showRow( $lang['opt_sys_ut'], $lang['opt_sys_utd'], makeDropDown( array ("0" => $lang['opt_sys_reg'], "1" => $lang['opt_sys_reg_1'] ), "save_con[registration_type]", "{$config['registration_type']}" ) ); + + showRow( $lang['opt_sys_code'], $lang['opt_sys_coded'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_sec_code]", "{$config['allow_sec_code']}" ) ); + showRow( $lang['opt_sys_sc'], $lang['opt_sys_scd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_skin_change]", "{$config['allow_skin_change']}" ) ); + showRow( $lang['opt_sys_pmail'], $lang['opt_sys_pmaild'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[mail_pm]", "{$config['mail_pm']}" ) ); + showRow( " ", " ", "" ); + + echo "
    + + + + +
    +
    +HTML; + + showRow( $lang['opt_sys_maxside'], $lang['opt_sys_maxsided'], "" ); + showRow( $lang['opt_sys_maxsize'], $lang['opt_sys_maxsized'], "" ); + showRow( $lang['opt_sys_dim'], $lang['opt_sys_dimd'], "" ); + showRow( $lang['opt_sys_iw'], $lang['opt_sys_iwd'], makeDropDown( array ("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no'] ), "save_con[allow_watermark]", "{$config['allow_watermark']}" ) ); + showRow( $lang['opt_sys_im'], $lang['opt_sys_imd'], "" ); + showRow( $lang['opt_sys_ia'], $lang['opt_sys_iad'], "1- 2- 3-" ); + showRow( " ", "1 - 2 - ", "1- 2-" ); + showRow( $lang['opt_sys_ij'], $lang['opt_sys_ijd'], "" ); + showRow( $lang['opt_sys_imw'], $lang['opt_sys_imwd'], "" ); + showRow( " ", " , .", "" ); + showRow( " ", " ", "" ); + echo "
    + + + + +
    +
    +HTML; + + showRow( $lang['opt_sys_sm_im'], $lang['opt_sys_sm_imd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_smart_images]", "{$config['allow_smart_images']}" ) ); + showRow( $lang['opt_sys_sm_iv'], $lang['opt_sys_sm_ivd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_smart_video]", "{$config['allow_smart_video']}" ) ); + showRow( $lang['opt_sys_sm_fm'], $lang['opt_sys_sm_fmd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_smart_format]", "{$config['allow_smart_format']}" ) ); + + echo "
    + + + + +
    +
    +HTML; + + showRow( $lang['opt_sys_arss'], $lang['opt_sys_arssd'], makeDropDown( array ("1" => $lang['opt_sys_yes'], "0" => $lang['opt_sys_no'] ), "save_con[allow_rss]", "{$config['allow_rss']}" ) ); + showRow( $lang['opt_sys_trss'], $lang['opt_sys_trssd'], makeDropDown( array ("0" => $lang['opt_sys_rss_type_0'], "1" => $lang['opt_sys_rss_type_1'] ), "save_con[rss_mtype]", "{$config['rss_mtype']}" ) ); + showRow( $lang['opt_sys_nrss'], $lang['opt_sys_nrssd'], "" ); + showRow( $lang['opt_sys_crss'], $lang['opt_sys_crssd'], "" ); + showRow( $lang['opt_sys_frss'], $lang['opt_sys_frssd'], "" ); + + echo "
    +
    +
    +
    +HTML; + + echofooter(); +} // ******************************************************************************** +// Çàïèñü íàñòðîåê +// ******************************************************************************** +elseif( $action == "dosavesyscon" ) { + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" ); } + + if( $member_id['user_group'] != 1 ) {msg( "error", $lang['opt_denied'], $lang['opt_denied'] );} + + $save_con = $_POST['save_con']; + + include_once SYSTEM_DIR . '/classes/parse.class.php'; + $parse = new ParseFilter( Array (), Array (), 1, 1 ); + + $save_con['offline_reason'] = $parse->process( stripslashes( trim( $save_con['offline_reason'] ) ) ); + $save_con['offline_reason'] = str_replace( '"', '"', $parse->BB_Parse( $save_con['offline_reason'], false ) ); + + $find[] = "'\r'"; + $replace[] = ""; + $find[] = "'\n'"; + $replace[] = ""; + + if( $auto_detect_config ) $config['http_home_url'] = ""; + + $save_con = $save_con + $config; + + if( $member_id['user_group'] != 1 ) { + msg( "error", $lang['opt_denied'], $lang['opt_denied'] ); + } + + $handler = fopen( SYSTEM_DIR . '/data/config.php', "w" ); + + fwrite( $handler, " $value ) { + + if( $name != "offline_reason" ) { + + $value = trim( stripslashes( $value ) ); + $value = htmlspecialchars( $value); + $value = preg_replace( $find, $replace, $value ); + + $name = trim( stripslashes( $name ) ); + $name = htmlspecialchars( $name, ENT_QUOTES ); + $name = preg_replace( $find, $replace, $name ); + } + + $value = str_replace( "$", "$", $value ); + $value = str_replace( "{", "{", $value ); + $value = str_replace( "}", "}", $value ); + + $name = str_replace( "$", "$", $name ); + $name = str_replace( "{", "{", $name ); + $name = str_replace( "}", "}", $name ); + + fwrite( $handler, "'{$name}' => \"{$value}\",\n\n" ); + + } + fwrite( $handler, ");\n\n?>" ); + fclose( $handler ); + + $cache->clear(); + msg( "info", $lang['opt_sysok'], "$lang[opt_sysok_1]

    $lang[db_prev]" ); +} + +?> \ No newline at end of file diff --git a/system/inc/preview.php b/system/inc/preview.php new file mode 100644 index 0000000..bc50f57 --- /dev/null +++ b/system/inc/preview.php @@ -0,0 +1,243 @@ +allow_php_include = false; +$dle_module = "main"; + + if ($_POST['preview_mode'] == "static" AND $_POST['skin_name']) + { + if (@is_dir(ROOT_DIR.'/templates/'.$_POST['skin_name'])) + { + $config['skin'] = $_POST['skin_name']; + } + } + +$tpl->dir = ROOT_DIR.'/templates/'.$config['skin']; +$tpl->load_template('preview.css'); + +echo << + + + + + +HTML; + +$tpl->clear(); + +echo << + + +HTML; + +include_once SYSTEM_DIR.'/classes/parse.class.php'; + +$parse = new ParseFilter(Array(), Array(), 1, 1); + + +if ($_POST['preview_mode'] == "static" ) { + + $allow_br = intval( $_POST['allow_br'] ); + if ($member_id['user_group'] != 1 AND $allow_br > 1 ) $allow_br = 1; + + if ($allow_br == 2) { + + if( function_exists( "get_magic_quotes_gpc" ) && get_magic_quotes_gpc() ) $_POST['template'] = stripslashes( $_POST['template'] ); + + $template = trim( addslashes( $_POST['template'] ) ); + + } else { + + $template = $parse->process( $_POST['template'] ); + + $template = $parse->BB_Parse( $template ); + + } + + $descr = trim(htmlspecialchars(stripslashes($_POST['description']))); + + $dle_module = "static"; + + $tpl->load_template('static.tpl'); + + $tpl->set('{static}', stripslashes( $template ) ); + $tpl->set('{description}', $descr); + $tpl->set('{views}', "0"); + $tpl->set('{pages}', ""); + $tpl->set('{date}', "--"); + $tpl->copy_template = preg_replace ( "#\{date=(.+?)\}#ie", "", $tpl->copy_template ); + + $tpl->copy_template = "
    {$lang['preview_static']} ".$tpl->copy_template."
    "; + $tpl->compile('template'); + $tpl->result['template'] = preg_replace( "'\[hide\](.*?)\[/hide\]'si", "\\1", $tpl->result['template']); + $tpl->result['template'] = str_replace ( '{THEME}', $config['http_home_url'] . 'templates/' . $config['skin'], $tpl->result['template'] ); + + echo $tpl->result['template']; + +} else { + +$title = stripslashes($parse->process($_POST['title'])); + +$full_story = $parse->process($_POST['full_story']); +$short_story = $parse->process($_POST['short_story']); + +$full_story = $parse->BB_Parse($full_story, false); +$short_story = $parse->BB_Parse($short_story, false); + + if (!count($category)) { $my_cat = "---"; $my_cat_link = "---";} else { + + $my_cat = array (); $my_cat_link = array (); + + foreach ($category as $element) { + if ($element) { $my_cat[] = $cat[$element]; + $my_cat_link[] = "{$cat[$element]}"; + } + } + $my_cat = stripslashes(implode (', ', $my_cat)); + $my_cat_link = stripslashes(implode (', ', $my_cat_link)); + } + + $dle_module = "main"; + $tpl->load_template('shortstory.tpl'); + + if ( $parse->not_allowed_text ) $tpl->copy_template = $lang['news_err_39']; + + $tpl->set('{title}', $title); + $tpl->set('{views}', 0); + $date = time(); + $tpl->set( '{date}', langdate( $config['timestamp_active'], $date ) ); + $tpl->copy_template = preg_replace ( "#\{date=(.+?)\}#ie", "langdate('\\1', '{$date}')", $tpl->copy_template ); + $tpl->set('[link]',""); + $tpl->set('[/link]',""); + $tpl->set('{comments-num}', 0); + $tpl->set('[full-link]', ""); + $tpl->set('[/full-link]', ""); + $tpl->set('[day-news]', ""); + $tpl->set('[/day-news]', ""); + $tpl->set('[com-link]', ""); + $tpl->set('[/com-link]', ""); + $tpl->set('{rating}', ""); + $tpl->set('{approve}', ""); + $tpl->set('{author}', "--"); + $tpl->set('{category}', $my_cat); + $tpl->set('{favorites}', ''); + $tpl->set('{link-category}', $my_cat_link); + $tpl->set_block("'\\[tags\\](.*?)\\[/tags\\]'si",""); + $tpl->set('{tags}', ""); + $tpl->copy_template = preg_replace ( "#\{date=(.+?)\}#ie", "", $tpl->copy_template ); + + $tpl->set('[mail]',""); + $tpl->set('[/mail]',""); + $tpl->set('{news-id}', "ID Unknown"); + $tpl->set('{php-self}', $PHP_SELF); + + $tpl->copy_template = preg_replace( "#\\[category=(.+?)\\](.*?)\\[/category\\]#is","\\2", $tpl->copy_template); + + $tpl->set_block("'\\[edit\\].*?\\[/edit\\]'si",""); + + $tpl->set('{short-story}', stripslashes($short_story)); + $tpl->set('{full-story}', stripslashes($full_story)); + + + $tpl->copy_template = "
    {$lang['preview_short']} ".$tpl->copy_template."
    "; + $tpl->compile('shortstory'); + + $tpl->result['shortstory'] = preg_replace( "'\[hide\](.*?)\[/hide\]'si", "\\1", $tpl->result['shortstory']); + $tpl->result['shortstory'] = str_replace ( '{THEME}', $config['http_home_url'] . 'templates/' . $config['skin'], $tpl->result['shortstory'] ); + + echo $tpl->result['shortstory']; + + $dle_module = "showfull"; + $tpl->load_template('fullstory.tpl'); + + if ( $parse->not_allowed_text ) $tpl->copy_template = $lang['news_err_39']; + + if( strlen( $full_story ) < 13 AND strpos( $tpl->copy_template, "{short-story}" ) === false ) { $full_story = $short_story; } + + $tpl->set('{title}', $title); + $tpl->set('{views}', 0); + $tpl->set( '{date}', langdate( $config['timestamp_active'], $date ) ); + $tpl->copy_template = preg_replace ( "#\{date=(.+?)\}#ie", "langdate('\\1', '{$date}')", $tpl->copy_template ); + $tpl->set('[link]',""); + $tpl->set('[/link]',""); + $tpl->set('{comments-num}', 0); + $tpl->set('[full-link]', ""); + $tpl->set('[/full-link]', ""); + $tpl->set('[com-link]', ""); + $tpl->set('[/com-link]', ""); + $tpl->set('[day-news]', ""); + $tpl->set('[/day-news]', ""); + $tpl->set('{rating}', ""); + $tpl->set('{author}', "--"); + $tpl->copy_template = preg_replace ( "#\{date=(.+?)\}#ie", "", $tpl->copy_template ); + $tpl->set('{category}', $my_cat); + $tpl->set('{link-category}', $my_cat_link); + $tpl->set('{related-news}', ""); + + $tpl->set('{pages}', ''); + $tpl->set('{favorites}', ''); + $tpl->set('[mail]',""); + $tpl->set('[/mail]',""); + $tpl->set('{poll}', ''); + $tpl->set('{news-id}', "ID Unknown"); + $tpl->set('{php-self}', $PHP_SELF); + + $tpl->copy_template = preg_replace( "#\\[category=(.+?)\\](.*?)\\[/category\\]#is","\\2", $tpl->copy_template); + + $tpl->set_block("'\\[edit\\].*?\\[/edit\\]'si",""); + $tpl->set_block("'\\[tags\\](.*?)\\[/tags\\]'si",""); + $tpl->set('{tags}', ""); + + $tpl->set('{short-story}', stripslashes($short_story)); + $tpl->set('{full-story}', stripslashes($full_story)); + +$tpl->copy_template = "
    {$lang['preview_full']} ".$tpl->copy_template."
    "; +$tpl->compile('fullstory'); +$tpl->result['fullstory'] = preg_replace( "'\[hide\](.*?)\[/hide\]'si", "\\1", $tpl->result['fullstory']); +$tpl->result['fullstory'] = str_replace ( '{THEME}', $config['http_home_url'] . 'templates/' . $config['skin'], $tpl->result['fullstory'] ); + +echo $tpl->result['fullstory']; + +} + +?> + \ No newline at end of file diff --git a/system/inc/rebuild.php b/system/inc/rebuild.php new file mode 100644 index 0000000..7439a66 --- /dev/null +++ b/system/inc/rebuild.php @@ -0,0 +1,439 @@ +super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_post" ); +echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + +
    {$lang['stat_allnews']} {$row['count']}, {$lang['rebuild_count']} 0 
     
    +
    +
    + +HTML; + + +$row = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_static" ); +echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + +
    {$lang['stat_allstaic']} {$row['count']}, {$lang['rebuild_count']} 0 
     
    +
    +
    + +HTML; + +$row2 = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_comments" ); +echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + +
     {$row2['count']}, {$lang['rebuild_count']} 0 
     
    +
    +
    + +HTML; + +$row3 = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_forum_posts" ); +echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + +
     {$row3['count']}, {$lang['rebuild_count']} 0 
     
    +
    +
    + +HTML; + +echofooter(); +?> \ No newline at end of file diff --git a/system/inc/repa.php b/system/inc/repa.php new file mode 100644 index 0000000..7bcd1cd --- /dev/null +++ b/system/inc/repa.php @@ -0,0 +1,106 @@ + + + + + + + + + +HTML; +} + +function closetable() +{ +echo << + + + + + + + + +HTML; +} + +function tableheader($value) +{ +echo << + + + + +HTML; + unterline(); +} +function unterline() { +echo << +HTML; +} + +if($action == "options" or $action == '') +{ + include_once 'repa/repa_main.php'; +} +elseif($action == "opt") +{ + include_once 'repa/repa_options.php'; +} +elseif ($action == "edit") +{ + include_once 'repa/repa_edit.php'; +} +elseif ($action == "vminus") +{ + include_once 'repa/repa_vminus.php'; +} +elseif ($action == "vplus") +{ + include_once 'repa/repa_vplus.php'; +} +elseif ($action == "delcom") +{ + $change_com = $repa_cf['ch_com']; + $db->query("UPDATE `".USERPREFIX."_reputation` SET `text`='$change_com' WHERE `id`='$id'"); + msg("info", $lang['delcom'], "{$lang_repa['deleted']}

    ", ""); +} +elseif ($action == "delete") +{ + include_once 'repa/repa_delete.php'; +} +elseif ($action == "save") +{ + include_once 'repa/repa_save.php'; +} +elseif($action == 'control') +{ + include_once 'repa/repa_control.php'; +} +else +{ + msg("error", $lang['addnews_denied'], $lang['db_denied']); +} + +?> \ No newline at end of file diff --git a/system/inc/repa/repa_control.php b/system/inc/repa/repa_control.php new file mode 100644 index 0000000..04d0546 --- /dev/null +++ b/system/inc/repa/repa_control.php @@ -0,0 +1,183 @@ + + + + + + + + + + + + + +
    +
    + + +HTML; +echo ""; +echo << + + + +
    + + + + + + + + + + +HTML; + +opentable(); +tableheader($lang_repa['repa_cntrl']); + +echo << + +HTML; + +$query_count = "SELECT COUNT(*) as count from " . USERPREFIX . "_reputation"; +$result_count = $db->super_query($query_count); +if ($result_count['count'] == 0) + echo "

    {$lang_repa['repa_nothing']}


    "; +else +{ + $all_count_results = $result_count['count']; + $N = 30; + if ( isset($_GET['page']) ) + { + $page = intval($_GET['page']); + if ( $page < 1 ) $page = 1; + } + else + { + $page = 1; + } + + $cnt_pages = ceil( $result_count['count'] / $N ); + if ( $page > $cnt_pages ) $page = $cnt_pages; + $start = ( $page - 1 ) * $N; + $query = $db->query("SELECT * FROM `" . USERPREFIX . "_reputation` ORDER BY `date` DESC LIMIT $start, $N"); + + if ( $cnt_pages > 1 ) + { + echo '
     '.$lang_repa['repa_pages']; + if ( $page > 3 ) + $startpage = '<< ... '; + else + $startpage = ''; + if ( $page < ($cnt_pages - 2) ) + $endpage = ' ... >>'; + else + $endpage = ''; + if ( $page - 2 > 0 ) + $page2left = ' '.($page - 2).''; + else + $page2left = ''; + if ( $page - 1 > 0 ) + $page1left = ' '.($page - 1).' '; + else + $page1left = ''; + if ( $page + 2 <= $cnt_pages ) + $page2right = ' '.($page + 2).' '; + else + $page2right = ''; + if ( $page + 1 <= $cnt_pages ) + $page1right = ' '.($page + 1).' '; + else + $page1right = ''; + echo $startpage.$page2left.$page1left.''.$page.''.$page1right.$page2right.$endpage."\n"; + echo '
    '; + echo '
    '.$lang_repa['r_total'].' '. $result_count['count'].'
    '; + + } + while ($row = $db->get_row()) + { + $res_id = $row['id']; + if ($row['how'] > 0) + $how = "\"{$lang_repa['repa_how_pl']}\""; + if ($row['how'] < 0) + $how = "\"{$lang_repa['repa_how_mn']}\""; + if ($row['how'] == "totalminus") + $how = "\"{$lang_repa['repa_how_tm']}\""; + if ($row['how'] == "totalplus") + $how = "\"{$lang_repa['repa_how_tm']}\""; + $results .= " + + ".$row[author]." +   ".$row[komu]." + $row[date] + $how + $row[text] + + + "; + } + $db->free(); + + echo << + + {$lang_repa['repa_who']} + {$lang_repa['repa_to']} + + {$lang_repa['repa_supp']} + {$lang_repa['repa_commst']} + {$lang_repa[vote_action]} + +
    + {$results} + + + +HTML; +} + +closetable(); +echofooter(); +closetable(); + +?> \ No newline at end of file diff --git a/system/inc/repa/repa_delete.php b/system/inc/repa/repa_delete.php new file mode 100644 index 0000000..e833045 --- /dev/null +++ b/system/inc/repa/repa_delete.php @@ -0,0 +1,90 @@ +super_query("SELECT `how`, `komu`, `author`, `text` FROM `" . USERPREFIX . "_reputation` WHERE `id`='$id'" ); +$author_log = $db->super_query("SELECT `user_id`, `name`, `repa`, `repa_mod` FROM `" . USERPREFIX . "_users` WHERE `name`='$result[author]'" ); +$to_log = $db->super_query("SELECT `user_id`, `name`, `repa`, `repa_mod` FROM `" . USERPREFIX . "_users` WHERE `name`='$result[komu]'" ); + +$target = $db->safesql( $result['komu'] ); +$how_text = $db->safesql( $result['text'] ); + +$repa_mod_mas = explode ("|", $to_log['repa_mod']); +$user_repa = $to_log['repa']; +$repa_delete = false; + +if ($author_log['name'] == "") + $author_log['name'] = $repa_cf['robot']; + +if ($result['how'] < 0) +{ + $user_repa = $user_repa + 1; + $repa_mod_mas[1] = $repa_mod_mas[1] - 1; + $user_repa_mod = $repa_mod_mas[0]."|".$repa_mod_mas[1]; + $db->query("UPDATE " . USERPREFIX . "_users SET repa = '$user_repa', repa_mod = '$user_repa_mod' WHERE name = '{$target}'"); + + $db->query("DELETE FROM `".USERPREFIX."_reputation` WHERE `id`='$id' LIMIT 1"); + + $repa_delete = true; +} +elseif ($result['how'] > 0) +{ + $user_repa = $user_repa - 1; + $repa_mod_mas[0] = $repa_mod_mas[0] - 1; + $user_repa_mod = $repa_mod_mas[0]."|".$repa_mod_mas[1]; + $db->query("UPDATE " . USERPREFIX . "_users SET repa = '$user_repa', repa_mod = '$user_repa_mod' WHERE name = '{$target}'"); + + $db->query("DELETE FROM `".USERPREFIX."_reputation` WHERE `id`='$id' LIMIT 1"); + + $repa_delete = true; +} +elseif ($result['how'] == 'totalminus') +{ + $user_repa = $user_repa - $vminus_autor; + $repa_mod_mas[1] = $repa_mod_mas[1] - $vminus_autor; + $user_repa_mod = $repa_mod_mas[0]."|".$repa_mod_mas[1]; + $db->query("UPDATE `".USERPREFIX."_users` SET `repa`='$user_repa', `repa_mod`='$user_repa_mod' WHERE `name`='$target'"); + + $db->query("DELETE FROM `".USERPREFIX."_reputation` WHERE `id`='$id' LIMIT 1"); + + $repa_delete = true; +} +elseif ($result['how'] == 'totalplus') +{ + $user_repa = $user_repa - $repa_cf['adm_plus']; + $repa_mod_mas[0] = $repa_mod_mas[0] - $vplus_autor; + $user_repa_mod = $repa_mod_mas[0]."|".$repa_mod_mas[1]; + $db->query("UPDATE `".USERPREFIX."_users` SET `repa`='$user_repa', `repa_mod`='$user_repa_mod' WHERE `name`='$target'"); + + $db->query("DELETE FROM `".USERPREFIX."_reputation` WHERE `id`='$id' LIMIT 1"); + + $repa_delete = true; +} +else + msg("info", $langms['sea_info'], " .

    ", ""); + +if ($repa_cf['msgs_del_status'] == "yes" AND $repa_delete) +{ + if($config['allow_alt_url'] == "yes") + $whois = "$member_id[name]"; + else + $whois = "$member_id[name]"; + $izvestie = $repa_cf['msgs_del_template']; + $izvestie = str_replace('{%kto%}', $whois, $izvestie); + $izvestie = str_replace('{%ot_kogo%}', $author_log[name], $izvestie); + $izvestie = str_replace('{%text%}', $how_text, $izvestie); + $time = time()+($config['date_adjust']*60); + $db->query("INSERT INTO " . USERPREFIX . "_pm (subj, text, user, user_from, date, pm_read, folder) values ('$lang_repa[repa_msg_changed]', '$izvestie', '$to_log[user_id]', '$member_id[name]', '$time', 'no', 'inbox')"); + $db->query("UPDATE " . USERPREFIX . "_users set pm_all=pm_all+1, pm_unread=pm_unread+1 where user_id='$to_log[user_id]'"); +} +if ($repa_delete) +{ + msg("info", $langms['sea_info'], "{$lang_repa['repa_done_minus_1']} {$to_log[name]} {$lang_repa['repa_done_minus_2']}

    ", ""); +} + +?> \ No newline at end of file diff --git a/system/inc/repa/repa_edit.php b/system/inc/repa/repa_edit.php new file mode 100644 index 0000000..a2d6825 --- /dev/null +++ b/system/inc/repa/repa_edit.php @@ -0,0 +1,114 @@ +
    ", ""); +else +{ + include_once SYSTEM_DIR.'/classes/parse.class.php'; + $parse = new ParseFilter(); + include_once SYSTEM_DIR . '/ajax/bbcode.php'; + + if ($_POST['submit']) + { + $new = $db->safesql( $parse->BB_Parse( $parse->process( $_POST['reason'] ), false )); + $db->query("UPDATE `".USERPREFIX."_reputation` SET `text`='$new' WHERE `id`='$id'"); + msg("info", $langms['sea_info'], "{$lang_repa['repa_msg_chd']}

    ", ""); + } + else + { + echoheader("",""); + +echo << +function ins_smile ( text ){ + doInsert(' ' + text + ' ', '', false); + + document.getElementById('dle_emo').style.visibility = "hidden"; + document.getElementById('dle_emo').style.display = "none"; + ie_range_cache = null; +}; + + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +HTML; +echo ""; +echo << + + + +
    +
    + +HTML; + + opentable(); + tableheader($lang_repa['repa_cntrl']); + + $res = $db->super_query("SELECT * FROM ".PREFIX."_reputation where id = '$id'"); + if ($res['id'] == $id) + { + + $text = $parse->decodeBBCodes( $res['text'], false ); + +echo << + + + + + + + + + +
    {$lang_repa['repa_comm_ed']}{$bb_code}
      + + +
    +HTML; + + } + else + { + @header("Location: $PHP_SELF?mod=repa&action=control"); + } + closetable(); + echofooter(); + closetable(); + } +} + +?> \ No newline at end of file diff --git a/system/inc/repa/repa_main.php b/system/inc/repa/repa_main.php new file mode 100644 index 0000000..0827d98 --- /dev/null +++ b/system/inc/repa/repa_main.php @@ -0,0 +1,217 @@ +super_query("SELECT COUNT(*) as count FROM ".PREFIX."_reputation"); +$stats['changes'] = $row['count']; +$row = $db->super_query("SELECT COUNT(*) as count FROM ".PREFIX."_reputation WHERE how > '0'"); +$stats['incr'] = $row['count']; +$row = $db->super_query("SELECT COUNT(*) as count FROM ".PREFIX."_reputation WHERE how < '0'"); +$stats['decr'] = $row['count']; +$row = $db->super_query("SELECT COUNT(*) as count FROM ".PREFIX."_reputation WHERE how = 'totalminus'"); +$stats['tot_m'] = $row['count']; +$row = $db->super_query("SELECT COUNT(*) as count FROM ".PREFIX."_reputation WHERE how = 'totalplus'"); +$stats['tot_p'] = $row['count']; +$row = $db->super_query("SELECT COUNT(*) as count FROM ".USERPREFIX."_users WHERE repa_off='1'"); +$stats['repa_off'] = $row['count']; +$row = $db->super_query("SELECT COUNT(*) as count FROM ".USERPREFIX."_users WHERE r_freeze='1'"); +$stats['r_freeze'] = $row['count']; + +function show_stats() { +global $repa_cf, $stats, $lang, $lang_repa; + +if ($repa_cf['status'] == 'yes') $repastatus = ''.$lang_repa['repa_st_on'].''; +else $repastatus = ''.$lang_repa['repa_st_off'].''; +echo " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang_repa['repa_st_st']}{$repastatus}
    {$lang_repa['repa_st_ca']}{$stats['changes']}
    {$lang_repa['repa_st_in']}{$stats['incr']}
    {$lang_repa['repa_st_tot_p']}{$stats['tot_p']}
    {$lang_repa['repa_st_es']}{$stats['decr']}
    {$lang_repa['repa_st_tot_m']}{$stats['tot_m']}
    {$lang_repa['repa_st_repa_off']}{$stats['repa_off']}
    {$lang_repa['repa_st_freeze']}{$stats['r_freeze']}
    +
    + + +
    +"; +} + echoheader("options", $lang_repa['repa_options']); + + $options = array(); + + $options['menu'] = array( + + array( + 'name' => $lang_repa['repa_m_opts'], + 'url' => "$PHP_SELF?mod=repa&action=opt", + 'descr' => $lang_repa['repa_m_sub'], + 'image' => "repa_opt.png", + 'access' => "1", + ), + + array( + 'name' => $lang_repa['repa_control'], + 'url' => "$PHP_SELF?mod=repa&action=control", + 'descr' => $lang_repa['repa_con_sub'], + 'image' => "repa_control.png", + 'access' => "1", + ), + + + ); + +foreach($options as $sub_options => $value) +{ + $count_options = count($value); + + for($i=0; $i < $count_options; $i++){ + if($member_db[1] > $value[$i]['access'] AND $value[$i]['access'] != "all"){ + unset($options[$sub_options][$i]); + } + } +} + +$subs = 0; + +foreach($options as $sub_options) +{ + +if (!count($sub_options)) continue; + +echo << + + + + + + + + + +HTML; + +} + +echo <<
    + + + + +
    +
    +HTML; + +$i=0; + +foreach($sub_options as $option) +{ + +if ($i > 1) {echo ""; $i=0;} + +$i++; + +echo << +
    + + + + +
    +
    + + + + + + + + + + +HTML; + +} + + +if ($_REQUEST['save_moderation']) +{ + include_once SYSTEM_DIR.'/data/repa.php'; + $user = $db->query("SELECT user_id, name, repa FROM ".PREFIX."_users"); + while ($row = $db->get_row($user)) + { + $repa_plus = 0; + $repa_minus = 0; + $repa_pereschet = $db->query("SELECT * FROM " . PREFIX . "_reputation WHERE komu = '$row[name]'"); + while ($row_min = $db->get_row($repa_pereschet)) + { + if ($row_min['how'] < 0 OR $row_min['how'] == "totalminus") + { + if ($row_min['how'] == "totalminus") + $repa_minus = $repa_minus + $repa_cf['adm_minus']; + else + $repa_minus = $repa_minus + $row_min['how']; + } + else + { + if ($row_min['how'] == "totalplus") + $repa_plus = $repa_plus + $repa_cf['adm_plus']; + else + $repa_plus = $repa_plus + $row_min['how']; + } + } + $db->free($repa_pereschet); + $repa_sum = $repa_plus + $repa_minus; + $repa_mod = $repa_plus."|".$repa_minus; + + $db->query("UPDATE " . USERPREFIX . "_users set repa='$repa_sum' WHERE user_id = '$row[user_id]'"); + $db->query("UPDATE " . USERPREFIX . "_users set repa_mod='$repa_mod' WHERE user_id = '$row[user_id]'"); + } + $db->free($user); + header( "Location: {$_SERVER['REQUEST_URI']}" ); +} + +// ******************************************************************************** +// +// ******************************************************************************** + opentable(); + tableheader($lang_repa['repa_stats']); + show_stats(); + closetable(); + echofooter(); + +?> \ No newline at end of file diff --git a/system/inc/repa/repa_options.php b/system/inc/repa/repa_options.php new file mode 100644 index 0000000..b5aceb9 --- /dev/null +++ b/system/inc/repa/repa_options.php @@ -0,0 +1,244 @@ + + + + + + + + + + + + + +
    +
    + + +HTML; + echo ""; + echo << + + + +
    + + + + + + + + + + +HTML; + +echo << + + function ChangeOption(selectedOption) { + + document.getElementById('general').style.display = "none"; + document.getElementById('controls').style.display = "none"; + document.getElementById('mail').style.display = "none"; + document.getElementById('ban').style.display = "none"; + + if(selectedOption == 'general') {document.getElementById('general').style.display = "";} + if(selectedOption == 'controls') {document.getElementById('controls').style.display = "";} + if(selectedOption == 'mail') {document.getElementById('mail').style.display = "";} + if(selectedOption == 'ban') {document.getElementById('ban').style.display = "";} + + } + + +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + +
    + + + +
    + + + +
    +
    +
    +
    +HTML; + +echo << +
    + + + + + + + + + + + + + + + + +
    + +HTML; + +echo <<"; + +echo <<"; + +echo <<"; + + +echo <<"; + +echo << + + +
    + + + + +
    +
    +HTML; + +showRow($lang_repa['opt_gen_st'], $lang_repa['opt_gen_st_sub'], makeDropDown(array("yes"=>$lang_repa['repa_on'],"no"=>$lang_repa['repa_off']), "save_config[status]", "{$repa_cf['status']}", ""), ""); +showRow($lang_repa['bl_period'], $lang_repa['bl_per_su'], ""); +showRow($lang_repa['repa_stop_change_min'], $lang_repa['repa_stop_change_min_sub'], ""); +showRow($lang_repa['opt_gen_page'], $lang_repa['opt_gen_page_sub'], makeDropDown(array("1"=>$lang_repa['repa_yes'],"0"=>$lang_repa['repa_no']), "save_config[comm_page]", "{$repa_cf['comm_page']}", ""), ""); +showRow($lang_repa['opt_site_res'], $lang_repa['opt_site_sub'], "", ""); +showRow($lang_repa['opt_cp_res'], $lang_repa['opt_cp_sub'], "", ""); +showRow(" :", " ", ""); + +$groups = get_groups(); +$groups = get_groups(explode(',', $repa_cf['move_grouplevel'])); + +showRow(" :", " N ", ""); + +echo "
    + + + + +
    +
    +HTML; +showRow($lang_repa['repa_adm'], $lang_repa['repa_adm_sub'], "", ""); +showRow($lang_repa['repa_adm_plus'], $lang_repa['repa_adm_plus_sub'], "", ""); +showRow($lang_repa['repa_robot'], $lang_repa['repa_robo_sub'], "", ""); +showRow($lang_repa['repa_adm_msg'], $lang_repa['repa_adm_com'], "",""); +showRow($lang_repa['repa_adm_plus_msg'], $lang_repa['repa_adm_plus_com'], "",""); +showRow($lang_repa['repa_replace'], $lang_repa['repa_adm_rpm'], ""); + + echo "
    + + + + +
    +
    +HTML; + +$repa_rules = $parse->decodeBBCodes( $repa_cf['repa_rules_tpl_tsu'], false ); + +showRow($lang_repa['repa_msgs_st'], $lang_repa['repa_msgs_su'], makeDropDown(array("yes"=>$lang_repa['repa_yes'],"no"=>$lang_repa['repa_no']), "save_config[msgs_status]", "{$repa_cf['msgs_status']}", ""), ""); +showRow($lang_repa['repa_msg_tpl'], $lang_repa['repa_msg_tsu'], "", ""); +showRow($lang_repa['repa_rules'], $lang_repa['repa_rules_su'], makeDropDown(array("1"=>$lang_repa['repa_yes'],"0"=>$lang_repa['repa_no']), "save_config[repa_rules]", "{$repa_cf['repa_rules']}", ""), ""); +showRow($lang_repa['repa_rules_tpl'], $lang_repa['repa_rules_tpl_su'], "", ""); +showRow($lang_repa['repa_msgs_del_st'], $lang_repa['repa_msgs_del_su'], makeDropDown(array("yes"=>$lang_repa['repa_yes'],"no"=>$lang_repa['repa_no']), "save_config[msgs_del_status]", "{$repa_cf['msgs_del_status']}", ""), ""); +showRow($lang_repa['repa_msg_del_tpl'], $lang_repa['repa_msg_del_tsu'], "", ""); +showRow($lang_repa['repa_msgs_adm_st'], $lang_repa['repa_msgs_adm_su'], makeDropDown(array("yes"=>$lang_repa['repa_yes'],"no"=>$lang_repa['repa_no']), "save_config[msgs_status_adm]", "{$repa_cf['msgs_status_adm']}", ""), ""); +showRow($lang_repa['repa_msg_adm_tpl'], $lang_repa['repa_msg_adm_tsu'], "", ""); + + echo "
    + + + + +
    +
    +HTML; + +$repa_ban_desc = $parse->decodeBBCodes( $repa_cf['repa_ban_desc'], false ); +showRow($lang_repa['repa_ban'], $lang_repa['repa_ban_sub'], makeDropDown(array("1"=>$lang_repa['repa_on'],"0"=>$lang_repa['repa_off']), "save_config[repa_ban]", "{$repa_cf['repa_ban']}", ""), ""); +showRow($lang_repa['repa_ban_num'], $lang_repa['repa_ban_num_sub'], ""); +showRow($lang_repa['repa_ban_days'], $lang_repa['repa_ban_days_sub'], ""); +showRow($lang_repa['repa_ban_desc'], $lang_repa['repa_ban_desc_sub'], "", ""); + echo "
    + + + +
    +
    +
    +HTML; + + echofooter(); + +?> \ No newline at end of file diff --git a/system/inc/repa/repa_save.php b/system/inc/repa/repa_save.php new file mode 100644 index 0000000..8de1534 --- /dev/null +++ b/system/inc/repa/repa_save.php @@ -0,0 +1,74 @@ + $value) + { + if ($name == "repa_rules_tpl_tsu" OR $name == "repa_ban_desc") + { + include_once SYSTEM_DIR.'/classes/parse.class.php'; + $parse = new ParseFilter(); + $value = $db->safesql( $parse->BB_Parse( $parse->process( $value ), false )); + $value = preg_split( '((>)|(<))', $value, - 1, PREG_SPLIT_DELIM_CAPTURE ); + $n = count( $value ); + for($i = 0; $i < $n; $i ++) + { + if( $value[$i] == "<" ) + { + $i ++; + continue; + } + $value[$i] = preg_replace( "#([^\s\n\r]{" . intval( 50 ) . "})#i", "\\1
    ", $value[$i] ); + } + $value = join( "", $value ); + } + elseif ($name == "bl_period" OR $name == "res_site" OR $name == "res_cp" OR $name == "sp_num") + { + $value = intval($value); + } + elseif ($name == "adm_minus" OR $name == "repa_stop_change_min") + { + $value = intval($value); + if ($value > 0 AND $value != 0) + $value = 0 - $value; + } + elseif ($name == "adm_plus") + { + $value = intval($value); + if ($value < 0 AND $value != 0) + $value = 0 - $value; + } + else + { + $value = stripslashes ($value); + $value = addslashes($value); + $value = preg_replace($find, $replace, $value); + } + fwrite($handler, "'{$name}' => \"{$value}\",\r\n"); + } + + fwrite($handler, ");\r\n?>"); + fclose($handler); + + $cache->clear(); + msg("info", $langms['sea_info'], "{$lang_repa['opt_saved']}

    ", ""); +} + +?> \ No newline at end of file diff --git a/system/inc/repa/repa_vminus.php b/system/inc/repa/repa_vminus.php new file mode 100644 index 0000000..537752a --- /dev/null +++ b/system/inc/repa/repa_vminus.php @@ -0,0 +1,59 @@ +
    ", ""); +else +{ + $result = $db->super_query("SELECT author, id FROM " . PREFIX . "_reputation WHERE id='$id' AND author <> '$repa_cf[robot]'"); + if ($result['id'] == $id) + { + $row2 = $db->super_query("SELECT name, user_id, repa, repa_mod, banned, user_group FROM " . USERPREFIX . "_users WHERE name='$result[author]'"); + $target = $result['author']; + $date = date ("Y-m-d H:i:s"); + $robot = $repa_cf['robot']; + $adm_msg = $repa_cf['adm_msg']; + $admin = 'totalminus'; + + $how = $row2['repa'] + $vminus_autor; + $repa_mod_mas = explode ("|", $row2['repa_mod']); + $repa_mod_mas[1] = $repa_mod_mas[1] + $vminus_autor; + $repa_mod = $repa_mod_mas[0]."|".$repa_mod_mas[1]; + + $db->query("INSERT INTO " . USERPREFIX . "_reputation (how, date, author, komu, text) values ('$admin', '$date', '$robot', '$target', '$adm_msg')"); + $db->query("UPDATE `".USERPREFIX."_users` SET `repa` = '$how', `repa_mod` = '$repa_mod' WHERE `name`='$target'"); + + $_TIME = time()+($config['date_adjust']*60); + if ($repa_cf['repa_ban'] AND $row2['banned'] != "yes" AND $repa_cf['group_'.$row2[user_group]] != 1) + { + if (($row2['repa'] + $vminus_autor) <= $repa_cf['repa_ban_num'] OR $row2['repa'] == $repa_cf['repa_ban_num']) + { + $this_time = $repa_cf['repa_ban_days'] ? $_TIME + ($repa_cf['repa_ban_days'] * 60 * 60 * 24) : 0; + $db->query( "UPDATE " . USERPREFIX . "_users SET banned='yes' WHERE user_id = '{$row2[user_id]}'" ); + $db->query( "INSERT INTO " . USERPREFIX . "_banned (users_id, descr, date, days, ip) values ('$row2[user_id]', '$repa_cf[repa_ban_desc]', '$this_time', '$repa_cf[repa_ban_days]', '')" ); + $cache->delete('banned.php' ); + } + } + + if($repa_cf['msgs_status_adm'] == 'yes') + { + $what = $repa_cf['adm_msg']; + $izvestie = $repa_cf['msgs_template_adm']; + $izvestie = str_replace('{%text%}', $what, $izvestie); + $db->query("INSERT INTO " . USERPREFIX . "_pm (subj, text, user, user_from, date, pm_read, folder) values ('$lang_repa[repa_adm_msg_lc]', '$izvestie', '$row2[user_id]', '$robot', '$_TIME', 'no', 'inbox')"); + $db->query("UPDATE " . USERPREFIX . "_users set pm_all=pm_all+1, pm_unread=pm_unread+1 where user_id='$row2[user_id]'"); + } + + msg("info", $langms['sea_info'], "{$lang_repa['repa_done_minus_1']} $target {$lang_repa['repa_done_minus_2']} $vminus_autor

    ", ""); + } + else + msg("info", $langms['sea_info'], " .

    ", ""); +} + +?> \ No newline at end of file diff --git a/system/inc/repa/repa_vplus.php b/system/inc/repa/repa_vplus.php new file mode 100644 index 0000000..6048e19 --- /dev/null +++ b/system/inc/repa/repa_vplus.php @@ -0,0 +1,59 @@ +
    ", ""); +else +{ + $result = $db->super_query("SELECT author, id FROM " . PREFIX . "_reputation WHERE id='$id' AND author <> '$repa_cf[robot]'"); + if ($result['id'] == $id) + { + $row2 = $db->super_query("SELECT name, user_id, repa, repa_mod, banned, user_group FROM " . USERPREFIX . "_users WHERE name='$result[author]'"); + $target = $result['author']; + $date = date ("Y-m-d H:i:s"); + $robot = $repa_cf['robot']; + $adm_msg = $repa_cf['adm_msg_plus']; + $admin = 'totalplus'; + + $how = $row2['repa'] + $vplus_autor; + $repa_mod_mas = explode ("|", $row2['repa_mod']); + $repa_mod_mas[0] = $repa_mod_mas[0] + $vplus_autor; + $repa_mod = $repa_mod_mas[0]."|".$repa_mod_mas[1]; + + $db->query("INSERT INTO " . USERPREFIX . "_reputation (how, date, author, komu, text) values ('$admin', '$date', '$robot', '$target', '$adm_msg')"); + $db->query("UPDATE `".USERPREFIX."_users` SET `repa` = '$how', `repa_mod` = '$repa_mod' WHERE `name`='$target'"); + + $_TIME = time()+($config['date_adjust']*60); + if ($repa_cf['repa_ban'] AND $row2['banned'] != "yes" AND $repa_cf['group_'.$row2[user_group]] != 1) + { + if (($row2['repa'] + $vplus_autor) <= $repa_cf['repa_ban_num'] OR $row2['repa'] == $repa_cf['repa_ban_num']) + { + $this_time = $repa_cf['repa_ban_days'] ? $_TIME + ($repa_cf['repa_ban_days'] * 60 * 60 * 24) : 0; + $db->query( "UPDATE " . USERPREFIX . "_users SET banned='yes' WHERE user_id = '{$row2[user_id]}'" ); + $db->query( "INSERT INTO " . USERPREFIX . "_banned (users_id, descr, date, days, ip) values ('$row2[user_id]', '$repa_cf[repa_ban_desc]', '$this_time', '$repa_cf[repa_ban_days]', '')" ); + $cache->delete('banned.php' ); + } + } + + if($repa_cf['msgs_status_adm'] == 'yes') + { + $what = $repa_cf['adm_msg_plus']; + $izvestie = $repa_cf['msgs_template_adm']; + $izvestie = str_replace('{%text%}', $what, $izvestie); + $db->query("INSERT INTO " . USERPREFIX . "_pm (subj, text, user, user_from, date, pm_read, folder) values ('$lang_repa[repa_adm_msg_lc]', '$izvestie', '$row2[user_id]', '$robot', '$_TIME', 'no', 'inbox')"); + $db->query("UPDATE " . USERPREFIX . "_users set pm_all=pm_all+1, pm_unread=pm_unread+1 where user_id='$row2[user_id]'"); + } + + msg("info", $langms['sea_info'], "{$lang_repa['repa_done_minus_1']} $target {$lang_repa['repa_done_minus_2']} $vplus_autor

    ", ""); + } + else + msg("info", $langms['sea_info'], " .

    ", ""); +} + +?> \ No newline at end of file diff --git a/system/inc/static.php b/system/inc/static.php new file mode 100644 index 0000000..c598701 --- /dev/null +++ b/system/inc/static.php @@ -0,0 +1,1013 @@ +allow_php = true; + +if( !$action ) $action = "list"; + +if( $action == "list" ) { + $_SESSION['admin_referrer'] = $_SERVER['REQUEST_URI']; + echoheader( "static", "static" ); + + $search_field = $db->safesql( trim( htmlspecialchars( stripslashes( urldecode( $_GET['search_field'] ) ), ENT_QUOTES ) ) ); + if ($_GET['fromnewsdate']) $fromnewsdate = strtotime( $_GET['fromnewsdate'] ); else $fromnewsdate = ""; + if ($_GET['tonewsdate']) $tonewsdate = strtotime( $_GET['tonewsdate'] ); else $tonewsdate = ""; + + if ($fromnewsdate === -1 OR !$fromnewsdate) $fromnewsdate = ""; + if ($tonewsdate === -1 OR !$tonewsdate) $tonewsdate = ""; + + $start_from = intval( $_GET['start_from'] ); + $news_per_page = intval( $_GET['news_per_page'] ); + $gopage = intval( $_REQUEST['gopage'] ); + + if( ! $news_per_page or $news_per_page < 1 ) { + $news_per_page = 50; + } + if( $gopage ) $start_from = ($gopage - 1) * $news_per_page; + + if( $start_from < 0 ) $start_from = 0; + + $where = array (); + + if( $search_field != "" ) { + + $where[] = "(template like '%$search_field%' OR descr like '%$search_field%')"; + + } + + if( $fromnewsdate != "" ) { + + $where[] = "date >= '$fromnewsdate'"; + + } + + if( $tonewsdate != "" ) { + + $where[] = "date <= '$tonewsdate'"; + + } + + if( count( $where ) ) { + + $where = implode( " AND ", $where ); + $where = " WHERE " . $where; + + } else { + $where = ""; + } + + $order_by = array (); + + if( $_REQUEST['search_order_t'] == "asc" or $_REQUEST['search_order_t'] == "desc" ) $search_order_t = $_REQUEST['search_order_t']; + else $search_order_t = ""; + if( $_REQUEST['search_order_d'] == "asc" or $_REQUEST['search_order_d'] == "desc" ) $search_order_d = $_REQUEST['search_order_d']; + else $search_order_d = ""; + + if( ! empty( $search_order_t ) ) {$order_by[] = "name $search_order_t";} + if( ! empty( $search_order_d ) ) {$order_by[] = "date $search_order_d";} + + $order_by = implode( ", ", $order_by ); + if( ! $order_by ) $order_by = "date desc"; + + $search_order_date = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( isset( $_REQUEST['search_order_d'] ) ) { + $search_order_date[$search_order_d] = 'selected'; + } else { + $search_order_date['desc'] = 'selected'; + } + $search_order_title = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( ! empty( $search_order_t ) ) { + $search_order_title[$search_order_t] = 'selected'; + } else { + $search_order_title['----'] = 'selected'; + } + + $db->query( "SELECT id, name, descr, template, views, date FROM " . PREFIX . "_static" . $where . " ORDER BY " . $order_by . " LIMIT $start_from,$news_per_page" ); + + // Prelist Entries + if( $start_from == "0" ) { + $start_from = ""; + } + $i = $start_from; + $entries_showed = 0; + + $entries = ""; + + while ( $row = $db->get_array() ) { + + $i ++; + + $itemdate = @date( "d.m.Y H:i", $row['date'] ); + + $title = htmlspecialchars( stripslashes( $row['name'] ), ENT_QUOTES ); + $descr = stripslashes($row['descr']); + $vlink = $config['http_home_url'] . $row['name'] . ".html"; + + $entries .= " + + + $itemdate - $title + $descr + {$row['views']} + + + "; + + $entries_showed ++; + + if( $i >= $news_per_page + $start_from ) { + break; + } + } + + // End prelisting + $result_count = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_static" . $where ); + + $all_count_news = $result_count['count']; + if ( $fromnewsdate ) $fromnewsdate = date("Y-m-d", $fromnewsdate ); + if ( $tonewsdate ) $tonewsdate = date("Y-m-d", $tonewsdate ); + + + /////////////////////////////////////////// + // Options Bar + echo << + + + +
    + + + +
    +HTML; + // End Options Bar + + + echo << + + +JSCRIPT; + + if( $entries_showed == 0 ) { + + echo << + + + + + + + + + + + + + + + + +
    + + + + + +
    {$lang['static_advanced_search']}
    +
    + + + + +


    {$lang['edit_nostatic']}
    +

       
    +
    + +HTML; + + } else { + + echo << +
    + + + + + + + + + + +HTML; + + if( $all_count_news > $news_per_page ) { + + echo << +HTML; + + } + + } + + echo << +
    + + + + + + +
    {$lang['static_advanced_search']}
    +
    + + + + + + + + + {$entries} + +
    {$lang['static_title']}{$lang['static_descr']} {$lang['st_views']} 
    +HTML; + + // pagination + + $npp_nav = "
    "; + + if( $start_from > 0 ) { + $previous = $start_from - $news_per_page; + $npp_nav .= "<< "; + } + + if( $all_count_news > $news_per_page ) { + + $enpages_count = @ceil( $all_count_news / $news_per_page ); + $enpages_start_from = 0; + $enpages = ""; + + if( $enpages_count <= 10 ) { + + for($j = 1; $j <= $enpages_count; $j ++) { + + if( $enpages_start_from != $start_from ) { + + $enpages .= "$j "; + + } else { + + $enpages .= "$j "; + } + + $enpages_start_from += $news_per_page; + } + + $npp_nav .= $enpages; + + } else { + + $start = 1; + $end = 10; + + if( $start_from > 0 ) { + + if( ($start_from / $news_per_page) > 4 ) { + + $start = @ceil( $start_from / $news_per_page ) - 3; + $end = $start + 9; + + if( $end > $enpages_count ) { + $start = $enpages_count - 10; + $end = $enpages_count - 1; + } + + $enpages_start_from = ($start - 1) * $news_per_page; + + } + + } + + if( $start > 2 ) { + + $enpages .= "1 ... "; + + } + + for($j = $start; $j <= $end; $j ++) { + + if( $enpages_start_from != $start_from ) { + + $enpages .= "$j "; + + } else { + + $enpages .= "$j "; + } + + $enpages_start_from += $news_per_page; + } + + $enpages_start_from = ($enpages_count - 1) * $news_per_page; + $enpages .= "... $enpages_count "; + + $npp_nav .= $enpages; + + } + + } + + if( $all_count_news > $i ) { + $how_next = $all_count_news - $i; + if( $how_next > $news_per_page ) { + $how_next = $news_per_page; + } + $npp_nav .= ">>"; + } + + $npp_nav .= "
    "; + + // pagination + + + if( $entries_showed != 0 ) { + echo << +
    {$npp_nav}
    + + + + +
    +{$lang['edit_go_page']} +
    +    +
    + + + + + + + + + + +
    +HTML; + + } + + echofooter(); + +} elseif( $action == "addnew" ) { + + echoheader( "static", "static" ); + + echo " + "; + + echo "
    "; + + echo << + + + + +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + +HTML; + + include (SYSTEM_DIR . '/inc/include/inserttag.php'); + + echo << + + + +HTML; + + $fix_br = " {$lang['static_br_html']}
    {$lang['static_br_html_1']}"; + + if ($member_id['user_group'] == 1 ) $fix_br .= "
    {$lang['static_br_html_2']}"; + + $groups = get_groups(); + + echo << + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang['static_title']}[?]
    {$lang['static_descr']}[?]
    {$lang['edit_edate']} +  {$lang['edit_jdate']} +
    {$lang['static_templ']}{$bb_code}
    {$lang['static_type']}{$fix_br}
     {$lang['add_metatags']}[?]
    {$lang['meta_title']}
    {$lang['meta_descr']} ({$lang['meta_descr_max']})
    {$lang['meta_keys']}
    +   + +
    {$lang['stat_allow']}
     

        + + + + +

    +
    +
    +HTML; + + echofooter(); +} elseif( $action == "dosavenew" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { + die( "Hacking attempt! User not found" ); + } + + $allow_br = intval( $_POST['allow_br'] ); + if ($member_id['user_group'] != 1 AND $allow_br > 1 ) $allow_br = 1; + + if ($allow_br == 2) { + if( function_exists( "get_magic_quotes_gpc" ) && get_magic_quotes_gpc() ) $_POST['template'] = stripslashes( $_POST['template'] ); + $template = trim( addslashes( $_POST['template'] ) ); + } else { + $template = $parse->process( $_POST['template'] ); + $template = $parse->BB_Parse( $template, false ); + } + + $metatags = create_metatags( $template ); + $name = trim( totranslit( $_POST['name'], true, false ) ); + $descr = trim( $db->safesql( htmlspecialchars( $_POST['description'] ) ) ); + $template = $db->safesql( $template ); + $newdate = $_POST['newdate']; + if( isset( $_POST['allow_now'] ) ) $allow_now = $_POST['allow_now']; else $allow_now = ""; + + $name = str_replace( "-", "_", $name ); + + if( ! count( $_POST['grouplevel'] ) ) $_POST['grouplevel'] = array ("all" ); + $grouplevel = $db->safesql( implode( ',', $_POST['grouplevel'] ) ); + + // + $added_time = time() + ($config['date_adjust'] * 60); + $newsdate = strtotime( $newdate ); + + if( ($allow_now == "yes") or ($newsdate === - 1) or (trim( $newdate ) == "") ) { + $thistime = $added_time; + } else { + $thistime = $newsdate; + if( ! intval( $config['no_date'] ) and $newsdate > $added_time ) $thistime = $added_time; + } + + if( $name == "" or $descr == "" or $template == "" ) msg( "error", $lang['static_err'], $lang['static_err_1'], "javascript:history.go(-1)" ); + + $static_count = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_static WHERE name='$name'" ); + + if ($static_count['count']) msg( "error", $lang['static_err'], $lang['static_err_2'], "javascript:history.go(-1)" ); + + $db->query( "INSERT INTO " . PREFIX . "_static (name, descr, template, allow_br, grouplevel, metadescr, metakeys, date, metatitle) values ('$name', '$descr', '$template', '$allow_br', '$grouplevel', '{$metatags['description']}', '{$metatags['keywords']}', '{$thistime}', '{$metatags['title']}')" ); + $row = $db->insert_id(); + $db->query( "UPDATE " . PREFIX . "_static_files SET static_id='{$row}' WHERE author = '{$member_id['name']}' AND static_id = '0'" ); + + msg( "info", $lang['static_addok'], $lang['static_addok_1'], "?mod=static" ); + +} elseif( $action == "doedit" ) { + $id = intval( $_GET['id'] ); + $row = $db->super_query( "SELECT * FROM " . PREFIX . "_static where id='$id'" ); + if ($row['allow_br'] == 2) { + if ($member_id['user_group'] != 1) msg( "error", $lang['index_denied'], $lang['static_not_allowed'] ); + $row['template'] = htmlspecialchars( stripslashes( $row['template'] ) ); + } else { + $row['template'] = $parse->decodeBBCodes( $row['template'], false ); + } + + $row['descr'] = stripslashes($row['descr']); + $row['metatitle'] = stripslashes( $row['metatitle'] ); + $itemdate = @date( "Y-m-d H:i", $row['date'] ); + + echoheader( "static", "static" ); + + echo << + + + + +HTML; + + echo " + "; + + echo "
    "; + + echo <<
    {$lang['ajax_info']}

    +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + +HTML; + +echo << + + + + + + + +HTML; + + echo << + + + +HTML; + + + include (SYSTEM_DIR . '/inc/include/inserttag.php'); + + echo << + + + +HTML; + + $check = array(); + + $check[$row['allow_br']] = "checked=\"checked\""; + + $fix_br = " {$lang['static_br_html']}
    {$lang['static_br_html_1']}"; + + if ($member_id['user_group'] == 1 ) $fix_br .= "
    {$lang['static_br_html_2']}"; + + $groups = get_groups( explode( ',', $row['grouplevel'] ) ); + if( $row['grouplevel'] == "all" ) $check_all = "selected"; + else $check_all = ""; + + echo << + + + + + + + + + + + + + + + + + + +HTML; + + echo << + + + +
    {$lang['static_title']}[?]
    {$lang['static_descr']}[?]
    {$lang['edit_edate']} +  {$lang['edit_ndate']}  {$lang['edit_jdate']} +
    {$lang['static_templ']}{$bb_code}
    {$lang['static_type']}{$fix_br}
     {$lang['add_metatags']}[?]
    {$lang['meta_title']}
    {$lang['meta_descr']} ({$lang['meta_descr_max']})
    {$lang['meta_keys']}
    +   + +
     
            + + + + + + +

    +
    +
    +HTML; + + echofooter(); +} elseif( $action == "dosaveedit" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { + + die( "Hacking attempt! User not found" ); + + } + + $allow_br = intval( $_POST['allow_br'] ); + if ($member_id['user_group'] != 1 AND $allow_br > 1 ) $allow_br = 1; + + if ($allow_br == 2) { + + if( function_exists( "get_magic_quotes_gpc" ) && get_magic_quotes_gpc() ) $_POST['template'] = stripslashes( $_POST['template'] ); + + $template = trim( addslashes( $_POST['template'] ) ); + + } else { + + $template = $parse->process( $_POST['template'] ); + + $template = $parse->BB_Parse( $template, false ); + + } + + $metatags = create_metatags( $template ); + + $name = trim( $db->safesql( htmlspecialchars( $_POST['name'] ) ) ); + $descr = trim( $db->safesql( htmlspecialchars( $_POST['description'] ) ) ); + + if( ! count( $_POST['grouplevel'] ) ) $_POST['grouplevel'] = array ("all" ); + $grouplevel = $db->safesql( implode( ',', $_POST['grouplevel'] ) ); + + $name = str_replace( "-", "_", $name ); + + $template = $db->safesql( $template ); + $newdate = $_POST['newdate']; + if( isset( $_POST['allow_date'] ) ) $allow_date = $_POST['allow_date']; else $allow_date = ""; + if( isset( $_POST['allow_now'] ) ) $allow_now = $_POST['allow_now']; else $allow_now = ""; + + // + $added_time = time() + ($config['date_adjust'] * 60); + $newsdate = strtotime( $newdate ); + + if( $allow_date != "yes" ) { + + if( $allow_now == "yes" ) $thistime = $added_time; + elseif( ($newsdate === - 1) or (trim( $newdate ) == "") ) { + $thistime = $added_time; + } else { + + $thistime = $newsdate; + + if( ! intval( $config['no_date'] ) and $newsdate > $added_time ) { + $thistime = $added_time; + } + + } + + } else { + $thistime = intval( $_POST['static_date'] ); + } + +$id = intval( $_GET['id'] ); + if( $name == "" or $descr == "" or $template == "" ) msg( "error", $lang['static_err'], $lang['static_err_1'], "javascript:history.go(-1)" ); + + $db->query( "UPDATE " . PREFIX . "_static set name='$name', descr='$descr', template='$template', allow_br='$allow_br', grouplevel='$grouplevel', metadescr='{$metatags['description']}', metakeys='{$metatags['keywords']}', date='{$thistime}', metatitle='{$metatags['title']}' WHERE id='$id'" ); + + msg( "info", $lang['static_addok'], $lang['static_addok_1'], "?mod=static" ); + + msg( "info", $lang['static_addok'], $lang['static_addok_1'], "?mod=static" ); + +} elseif( $action == "dodelete" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { + + die( "Hacking attempt! User not found" ); + + } + + $id = intval( $_GET['id'] ); + + $db->query( "DELETE FROM " . PREFIX . "_static WHERE id='$id'" ); + + $db->query( "SELECT name, onserver FROM " . PREFIX . "_static_files WHERE static_id = '$id'" ); + + while ( $row = $db->get_row() ) { + + if( $row['onserver'] ) { + + @unlink( ROOT_DIR . "/uploads/files/" . $row['onserver'] ); + + } else { + + $url_image = explode( "/", $row['name'] ); + + if( count( $url_image ) == 2 ) { + + $folder_prefix = $url_image[0] . "/"; + $dataimages = $url_image[1]; + + } else { + + $folder_prefix = ""; + $dataimages = $url_image[0]; + + } + + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . $dataimages ); + @unlink( ROOT_DIR . "/uploads/posts/" . $folder_prefix . "thumbs/" . $dataimages ); + } + + } + + $db->query( "DELETE FROM " . PREFIX . "_static_files WHERE static_id = '$id'" ); + + msg( "info", $lang['static_del'], $lang['static_del_1'], "$PHP_SELF?mod=static" ); + +} +?> \ No newline at end of file diff --git a/system/inc/table.php b/system/inc/table.php new file mode 100644 index 0000000..2025262 --- /dev/null +++ b/system/inc/table.php @@ -0,0 +1,1209 @@ +" . $lang_table['edit_status_0'] . ""; + break; + + case "1": + $status = "" . $lang_table['edit_status_1'] . ""; + break; + + case "2": + $status = "" . $lang_table['edit_status_2'] . ""; + break; + + case "3": + $status = "" . $lang_table['edit_status_3'] . ""; + break; + } + return $status; +} + +function menu() { + global $lang_table; + echo <<< HTML + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + +
    + +
    +
    +HTML; +} + +if( isset( $_REQUEST['author'] ) ) $author = $db->safesql( trim( htmlspecialchars( $_REQUEST['author'] ) ) ); else $author = ""; +if( isset( $_REQUEST['ifdelete'] ) ) $ifdelete = $_REQUEST['ifdelete']; else $ifdelete = ""; +if( isset( $_REQUEST['search_cat'] ) ) $search_cat = $db->safesql( trim( htmlspecialchars( $_REQUEST['search_cat'] ) ) ); else $search_cat = ""; + +if( $action == "list" ) { + + $_SESSION['admin_referrer'] = $_SERVER['REQUEST_URI']; + + echoheader( "table", $lang_table['edit_head'] ); + + $search_field = $db->safesql( trim( htmlspecialchars( stripslashes( urldecode( $_REQUEST['search_field'] ) ), ENT_QUOTES ) ) ); + $search_author = $db->safesql( trim( htmlspecialchars( stripslashes( urldecode( $_REQUEST['search_author'] ) ), ENT_QUOTES ) ) ); + $fromordersdate = $db->safesql( trim( htmlspecialchars( stripslashes( $_REQUEST['fromordersdate'] ), ENT_QUOTES ) ) ); + $toordersdate = $db->safesql( trim( htmlspecialchars( stripslashes( $_REQUEST['toordersdate'] ), ENT_QUOTES ) ) ); + + $start_from = intval( $_REQUEST['start_from'] ); + $news_per_page = intval( $_REQUEST['news_per_page'] ); + $gopage = intval( $_REQUEST['gopage'] ); + + $_REQUEST['orders_status'] = intval ($_REQUEST['orders_status']); + $orders_status_sel = array ('1'=>'','2'=>'','3'=>'','4'=>'','5'=>''); + $orders_status_sel[$_REQUEST['orders_status']] = 'selected="selected"'; + + if( ! $news_per_page or $news_per_page < 1 ) { + $news_per_page = 50; + } + if( $gopage ) $start_from = ($gopage - 1) * $news_per_page; + + if( $start_from < 0 ) $start_from = 0; + + $where = array (); + + if( $search_field != "" ) { + $where[] = "(runame like '%$search_field%' OR enname like '%$search_field%' OR link like '%$search_field%')"; + } + + if( $search_author != "" ) { + $where[] = "autor like '$search_author%'"; + } + + if( $search_cat != "" ) { + $where[] = "category regexp '[[:<:]]($search_cat)[[:>:]]'"; + } + + if( $fromordersdate != "" ) { + $fromdate = strtotime( $fromordersdate ); + $where[] = "date >= '$fromdate'"; + } + + if( $toordersdate != "" ) { + $todate = strtotime( $toordersdate ); + $where[] = "date <= '$todate'"; + } + + if ($_REQUEST['orders_status'] == 1) $where[] = "status NOT IN (5)"; + elseif ($_REQUEST['orders_status'] == 2) $where[] = "status = '0'"; + elseif ($_REQUEST['orders_status'] == 3) $where[] = "status = '1'"; + elseif ($_REQUEST['orders_status'] == 4) $where[] = "status = '2'"; + elseif ($_REQUEST['orders_status'] == 5) $where[] = "status = '3'"; + + if( count( $where ) ) { + + $where = implode( " AND ", $where ); + $where = " WHERE " . $where; + + } else { + $where = ""; + } + + $order_by = array (); + + if( $_REQUEST['search_order_m'] == "asc" or $_REQUEST['search_order_m'] == "desc" ) $search_order_m = $_REQUEST['search_order_m']; + else $search_order_m = ""; + if( $_REQUEST['search_order_d'] == "asc" or $_REQUEST['search_order_d'] == "desc" ) $search_order_d = $_REQUEST['search_order_d']; + else $search_order_d = ""; + if( $_REQUEST['search_order_t'] == "asc" or $_REQUEST['search_order_t'] == "desc" ) $search_order_t = $_REQUEST['search_order_t']; + else $search_order_t = ""; + + if( ! empty( $search_order_m ) ) { + $order_by[] = "status $search_order_m"; + } + if( ! empty( $search_order_d ) ) { + $order_by[] = "date $search_order_d"; + } + if( ! empty( $search_order_t ) ) { + $order_by[] = "runame $search_order_t"; + } + + $order_by = implode( ", ", $order_by ); + if( ! $order_by ) $order_by = "date desc"; + + $search_order_mod = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( isset( $_REQUEST['search_order_m'] ) ) { + $search_order_mod[$search_order_m] = 'selected'; + } else { + $search_order_mod['----'] = 'selected'; + } + $search_order_date = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( isset( $_REQUEST['search_order_d'] ) ) { + $search_order_date[$search_order_d] = 'selected'; + } else { + $search_order_date['desc'] = 'selected'; + } + $search_order_title = array ('----' => '', 'asc' => '', 'desc' => '' ); + if( ! empty( $search_order_t ) ) { + $search_order_title[$search_order_t] = 'selected'; + } else { + $search_order_title['----'] = 'selected'; + } + + $db->query( "SELECT * FROM " . PREFIX . "_table" . $where . " ORDER BY " . $order_by . " LIMIT $start_from,$news_per_page" ); + + // Prelist Entries + if( $start_from == "0" ) { + $start_from = ""; + } + $i = $start_from; + $entries_showed = 0; + + $entries = ""; + + while ( $row = $db->get_array() ) { + + $i ++; + + $itemdate = date( "d.m.Y G:i", $row['date'] ); + if(strlen($row['runame']) > 65) $runame = substr($row['runame'],0,65)." ..."; else $runame = $row['runame']; + if(strlen($row['enname']) > 65) $enname = substr($row['enname'],0,65)." ..."; else $enname = $row['enname']; + + $runame = htmlspecialchars( stripslashes( $runame ), ENT_QUOTES ); + $enname = htmlspecialchars( stripslashes( $enname ), ENT_QUOTES ); + + $runame = str_replace("&","&", $runame ); + $enname = str_replace("&","&", $enname ); + + $name = htmlspecialchars( stripslashes( $row['name'] ), ENT_QUOTES ); + $fileyear = stripslashes( $row['fileyear'] ); + + $statusd = showStatus( $row['status'] ); + + $entries .= "$itemdate - "; + + $entries .= "$runame / $enname ( $fileyear ) + "; + + $entries .= ""; + + $entries .= "$statusd"; + + if (!$row['category']) $my_cat = "---"; else { + $my_cat = htmlspecialchars( stripslashes($row['category'])); + } + + $entries .= "$my_cat" . $row['autor'] . " +"; + $entries_showed ++; + + if( $i >= $news_per_page + $start_from ) { + break; + } + } + + // End prelisting + $result_count = $db->super_query( "SELECT COUNT(*) as count FROM " . PREFIX . "_table" . $where ); + + $all_count_news = $result_count['count']; + + if( $member_id['user_group'] == 1 ) { //DLE >= 7.5 + menu(); +} + /////////////////////////////////////////// + // Options Bar + $category_s = explode(",", stripslashes($table_config['category'])); + //$category_list = " + + + +HTML; + // End Options Bar + + echo << + + +JSCRIPT; + + if( $entries_showed == 0 ) { + + echo << + + + + + + + + + + + + + + + + +
    + + + + + +
    {$lang_table['orders_advanced_search']}
    +
    + + + + +
    {$lang_table['edit_noorders']}
    +
    + +HTML; + + } else { + + echo << +
    +
    + + + + + + + + + + + + + + + + +
    + + + + + +
    {$lang_table['orders_advanced_search']}
    +
    + + + + + + + + + + +
    + + + + + {$entries} + +HTML; + + // pagination + + $npp_nav = "
    "; + + if( $start_from > 0 ) { + $previous = $start_from - $news_per_page; + $npp_nav .= "<< "; + } + + if( $all_count_news > $news_per_page ) { + + $enpages_count = @ceil( $all_count_news / $news_per_page ); + $enpages_start_from = 0; + $enpages = ""; + + if( $enpages_count <= 10 ) { + + for($j = 1; $j <= $enpages_count; $j ++) { + + if( $enpages_start_from != $start_from ) { + + $enpages .= "$j "; + + } else { + + $enpages .= "$j "; + } + + $enpages_start_from += $news_per_page; + } + + $npp_nav .= $enpages; + + } else { + + $start = 1; + $end = 10; + + if( $start_from > 0 ) { + + if( ($start_from / $news_per_page) > 4 ) { + + $start = @ceil( $start_from / $news_per_page ) - 3; + $end = $start + 9; + + if( $end > $enpages_count ) { + $start = $enpages_count - 10; + $end = $enpages_count - 1; + } + + $enpages_start_from = ($start - 1) * $news_per_page; + + } + + } + + if( $start > 2 ) { + + $enpages .= "1 ... "; + + } + + for($j = $start; $j <= $end; $j ++) { + + if( $enpages_start_from != $start_from ) { + + $enpages .= "$j "; + + } else { + + $enpages .= "$j "; + } + + $enpages_start_from += $news_per_page; + } + + $enpages_start_from = ($enpages_count - 1) * $news_per_page; + $enpages .= "... $enpages_count "; + + $npp_nav .= $enpages; + + } + + } + + if( $all_count_news > $i ) { + $how_next = $all_count_news - $i; + if( $how_next > $news_per_page ) { + $how_next = $news_per_page; + } + $npp_nav .= ">>"; + } + + $npp_nav .= "
    "; + + // pagination + if( $entries_showed != 0 ) { + echo << + +HTML; + + if( $all_count_news > $news_per_page ) { + + echo << +HTML; + } + + } + + echo << + + +
      {$lang_table['edit_date']}                      {$lang_table['edit_title']} +    +    + {$lang_table['edit_status']} + {$lang_table['edit_cat']} + {$lang_table['edit_author']} + +
    {$npp_nav}
    + + + + + +
    +{$lang['edit_go_page']} +
    +
    + +HTML; + } + + echofooter(); +} + +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "edit" ) { + + $id = intval( $_GET['id'] ); + $row = $db->super_query( "SELECT * FROM " . PREFIX . "_table where id = '$id'" ); + $found = FALSE; + + if( ! empty($id) AND $id == $row['id'] ) $found = TRUE; + if( ! $found ) { + msg( "error", $lang['cat_error'], $lang_table['edit_noorders'], "javascript:history.go(-1)" ); + } + + $cat_list = explode( ',', $row['category'] ); + + $type_list = explode( ',', $row['type'] ); + + $row['date'] = date("d-m-Y G:i", $row['date']); + $row['runame'] = htmlspecialchars(stripslashes($row['runame'])); + $row['enname'] = htmlspecialchars(stripslashes($row['enname'])); + $row['category'] = htmlspecialchars(stripslashes($row['category'])); + $row['fileyear'] = htmlspecialchars(stripslashes($row['fileyear'])); + $row['answer'] = htmlspecialchars(stripslashes($row['answer'])); + $row['status'] = intval($row['status']); + + $doaction = "doedit"; + + echoheader( "table", $lang_table['edit_head'] ); + +echo ""; + +echo "
    "; + + $category_s = explode(",", stripslashes($table_config['category'])); + //$categories_list = " + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang['edit_info']}ID={$row['id']}, {$lang['edit_eau']} {$author_info}
    {$lang_table['edit_runame']}
    {$lang_table['edit_enname']}
    {$lang['edit_edate']}
    {$lang_table['edit_category']} +
    {$lang_table['edit_fileyear']}
    {$lang_table['edit_answer']}
    {$lang_table['edit_status']} +HTML; + +echo makeDropDown(array("0" => $lang_table['edit_status_0'], "1" => $lang_table['edit_status_1'], "2" => $lang_table['edit_status_2'], "3" => $lang_table['edit_status_3']), "status", $row['status']); + +echo <<
    +
    +
    +  + + + + + + + +
    +HTML; + +echo << +
    +
    +HTML; + + echofooter(); +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "doedit" ) { + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { + die( "Hacking attempt! User not found" ); + } + $id = intval( $_GET['id'] ); + $okdeleted = FALSE; + + if( $ifdelete != "yes" ) { + $okchanges = TRUE; + + $runame = $db->safesql( trim( htmlspecialchars( $_POST['runame'] ) ) ) ; + $enname = $db->safesql( trim( htmlspecialchars( $_POST['enname'] ) ) ) ; + $fileyear = $db->safesql( trim( htmlspecialchars( $_POST['fileyear'] ) ) ) ; + $category = $db->safesql( trim( htmlspecialchars( $_POST['category'] ) ) ) ; + + if ( trim( $runame ) != "" or $runame ){ $name = $runame; } + if ( trim( $enname ) != "" or $enname ){ $name = $enname; } + if( !$name ){msg( "error", $lang['cat_error'], $lang_table['orders_err_name'], "javascript:history.go(-1)" );} + + if( strlen( $fileyear ) > 4 ) { + msg( "error", $lang['cat_error'], $lang_table['orders_err_year'], "javascript:history.go(-1)" ); + } + if( strlen( $category ) > 20 ) { + msg( "error", $lang['cat_error'], $lang_table['addorders_err_category'], "javascript:history.go(-1)" ); + } + if (!is_numeric($fileyear)) { + msg( "error", $lang['cat_error'], $lang_table['orders_err_year_type'], "javascript:history.go(-1)" ); + } + + $answer = $db->safesql(strip_tags(trim($_POST['answer']))); + $editor = $db->safesql( trim( htmlspecialchars( $member_id['name'] ) ) ) ; //DLE > 7.5 + $status = intval($_POST['status']); + $StatusSend = showStatus(intval($_POST['status'])); + + if ( $table_config['msgs_usr'] == "yes" ) { + $result = $db->super_query("SELECT " . USERPREFIX . "_users.name, " . USERPREFIX . "_users.email, " . PREFIX . "_table.autor, " . USERPREFIX . "_users.user_id FROM " . USERPREFIX . "_users INNER JOIN " . PREFIX . "_table ON (" . USERPREFIX . "_users.name = " . PREFIX . "_table.autor) WHERE id='$id'"); + $path = $config['http_home_url']; + $subject = $lang_table['msgs_subject_usr']; + $user_from = $lang_table['msg_user_from']; + $time_send = time()+($config['date_adjust']*60); + + $editors = "" . $editor . ""; + + $table_config['msgs_type1'] = stripslashes( html_entity_decode( $table_config['msgs_type1'] ) ); + $table_config['msgs_type1'] = str_replace( "{%id%}", $id, $table_config['msgs_type1'] ); + $table_config['msgs_type1'] = str_replace( "{%username%}", $result['name'], $table_config['msgs_type1'] ); + $table_config['msgs_type1'] = str_replace( "{%username_editor%}", $editors, $table_config['msgs_type1'] ); + $table_config['msgs_type1'] = str_replace( "{%date%}", date("d.m.Y H:i:s", $time_send), $table_config['msgs_type1'] ); + $table_config['msgs_type1'] = str_replace( "{%status%}", $StatusSend, $table_config['msgs_type1'] ); + + if ( $table_config['msgs_type'] == "0" ) { + + if( ! $result['user_id'] ) { + msg( "error", $lang['cat_error'], $lang_table['not_user_id'], "javascript:history.go(-1)" ); + exit(); + } + + $db->query("INSERT INTO " . USERPREFIX . "_pm (subj, text, user, user_from, date, pm_read, folder) values ('$subject', '$table_config[msgs_type1]', '$result[user_id]', '$user_from', '$time_send', 'no', 'inbox')"); + $db->query("UPDATE " . USERPREFIX . "_users set pm_all=pm_all+1, pm_unread=pm_unread+1 WHERE user_id='$result[user_id]'"); + + } else { + include_once SYSTEM_DIR . '/classes/mail.class.php'; + $mail = new dle_mail( $config, true ); + $mail->from = $config['admin_mail']; + $mail->send( $result['email'], $subject, $table_config['msgs_type1'] ); + + if( $mail->send_error ) msg( "info", $lang['all_info'], $mail->smtp_msg ); + } + $db->free($result); + } + + $db->query("UPDATE " . PREFIX . "_table SET runame = '$runame', enname = '$enname', fileyear='$fileyear', category = '$category', answer='$answer', status='$status', editor='$editor' WHERE id='$id'"); + header("Location: http://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"] . "?mod=table"); + } else + { + $db->query( "DELETE FROM " . PREFIX . "_table WHERE id='$id'" ); + $okdeleted = TRUE; + } + + if( ! $_SESSION['admin_referrer'] ) { + $_SESSION['admin_referrer'] = "?mod=table&action=list"; + } + + if( $okdeleted ) { + msg( "info", $lang_table['edit_delok'], $lang_table['edit_delok_1'], $_SESSION['admin_referrer'] ); + } elseif( $okchanges ) { + msg( "info", $lang['edit_alleok'], $lang['edit_alleok_1'], $_SESSION['admin_referrer'] ); + } else { + msg( "error", $lang['word_error'], $lang_table['edit_allerr'], $_SESSION['admin_referrer'] ); + } + $cache->clear(); +} + +// ******************************************************************************** +// Options +// ******************************************************************************** +elseif ($_REQUEST['action'] == 'options') { + if( $member_id['user_group'] != 1 ){ msg( "error", $lang['opt_denied'], $lang['opt_denied'] ); } //DLE >= 7.5 + include_once SYSTEM_DIR . '/classes/parse.class.php'; + $parse = new ParseFilter( Array (), Array (), 1, 1 ); + + //$table_config['msgs_type0'] = str_replace( '"', '"', $table_config['msgs_type0'] ); + //$table_config['msgs_type0'] = $parse->decodeBBCodes( $table_config['msgs_type0'], false ); + + //$table_config['msgs_type1'] = str_replace( '"', '"', $table_config['msgs_type1'] ); + //$table_config['msgs_type1'] = $parse->decodeBBCodes( $table_config['msgs_type1'], false ); + +echoheader( "options", $lang['opt_all'] ); + + if( $member_id['user_group'] == 1 ) { //DLE >= 7.5 + menu(); + } + +echo <<< HTML +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +HTML; +/* Nulld by DtNt */ + echo ''; + + showRow( $lang_table['opt_tab_offline'], $lang_table['opt_tab_offlined'], makeDropDown(array("no" => $lang['opt_sys_no'], "yes" => $lang['opt_sys_yes']), "save_con[table_offline]", "{$table_config['table_offline']}")); + showRow( $lang_table['opt_tab_category'], $lang_table['opt_tab_categoryd'], ""); + + showRow( $lang_table['opt_tab_an'], "$lang[opt_sys_and]", "" ); + showRow( $lang_table['opt_tab_msort'], $lang_table['opt_tab_msortd'], makeDropDown( array ("DESC" => $lang['opt_sys_mminus'], "ASC" => $lang['opt_sys_mplus'] ), "save_con[orders_msort]", "{$table_config['orders_msort']}" ) ); + showRow( $lang_table['opt_tab_orders_number'], $lang_table['opt_tab_orders_numberd'], ""); + + showRow( $lang_table['opt_tab_timeweek'], $lang_table['opt_tab_timeweekd'], ""); + showRow( $lang_table['opt_tab_auto_wrap'], $lang_table['opt_tab_auto_wrapd'], ""); + + showRow( $lang_table['opt_tab_msgs'], $lang_table['opt_tab_msgsd'], makeDropDown(array("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no']), "save_con[msgs_adm]", "{$table_config['msgs_adm']}")); + showRow( $lang_table['opt_tab_msgs1'], $lang_table['opt_tab_msgsd1'], makeDropDown(array("yes" => $lang['opt_sys_yes'], "no" => $lang['opt_sys_no']), "save_con[msgs_usr]", "{$table_config['msgs_usr']}")); + showRow( $lang_table['opt_tab_msgs_type'], $lang_table['opt_tab_msgs_typed'], makeDropDown(array("0" => $lang_table['opt_tab_msgs_type1'], "1" => $lang_table['opt_tab_msgs_type2']), "save_con[msgs_type]", "{$table_config['msgs_type']}")); + + $tr_hidden = " style='display:none'"; + +echo << + function ShowOrHide(d1, d2) { + if (d1 != '') DoDiv(d1); + if (d2 != '') DoDiv(d2); + } + function DoDiv(id) { + var item = null; + if (document.getElementById) { + item = document.getElementById(id); + } else if (document.all){ + item = document.all[id]; + } else if (document.layers){ + item = document.layers[id]; + } + if (!item) { + } + else if (item.style) { + if (item.style.display == "none"){ item.style.display = ""; } + else {item.style.display = "none"; } + }else{ item.visibility = "show"; } + } + +HTML; + +echo ' + + + + + + + + '; + +echo ' + + + + + + + + '; + + $groups = get_groups(); + $groups = get_groups(explode(',', $table_config['grouplevel'])); + + echo << +HTML; + + echo <<< HTML + +
    + ' . $lang_table['opt_tab_mail_info1'] . ' +
    ' . $lang_table['opt_tab_mail_info2'] .'
    ' . $lang_table['mail_pm_info1'] . '
    + +
    + ' . $lang_table['opt_tab_mail_info1'] . ' +
    ' . $lang_table['opt_tab_mail_info3'] .'
    ' . $lang_table['mail_pm_info2'] . '
    + +
    +{$lang_table['opt_tab_grouplevel']}
    {$lang_table['opt_tab_groupleveld']} +
    + +
    +
    +HTML; + +echofooter(); + echo <<< HTML +
    +HTML; +} + +elseif( $action == "massactions" ) { + +if( ! $_SESSION['admin_referrer'] ) { + $_SESSION['admin_referrer'] = "?mod=table&action=list"; +} + + if( $member_id['user_group'] !=1 ) { //DLE >= 7.5 + msg( "error", $lang['mass_error'], $lang['mass_ddenied'], $_SESSION['admin_referrer'] ); + } + +$selected_orders = $_REQUEST['selected_orders']; + +if( ! $selected_orders ) { + msg( "error", $lang['mass_error'], $lang_table['mass_denied'], $_SESSION['admin_referrer'] ); +} + +if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { + die( "Hacking attempt! User not found" ); +} + +$s_action = htmlspecialchars( strip_tags( stripslashes( $_POST['s_action'] ) ) ); + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +if( $s_action == "mass_delete" ) { + echoheader( "options", $lang_table['mass_head'] ); + echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + +
    {$lang_table['mass_confirm']} +HTML; + /* Nulled by N2C-TEAM(DotNet) */ + echo "(" . count( $selected_orders ) . ") $lang_table[mass_confirm_1]

    +   + + + +"; + foreach ( $selected_orders as $ordersid ) { + $ordersid = intval($ordersid); + echo "\n"; + } + + echo << +
    +
    +
    +HTML; + + echofooter(); + exit(); +} +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +elseif( $s_action == "do_mass_delete" ) { + $deleted_articles = 0; + + foreach ( $selected_orders as $id ) { + $id = intval( $id ); + $deleted_articles ++; + $db->query( "DELETE FROM " . PREFIX . "_table WHERE id='$id'" ); + } + + if( count( $selected_orders ) == $deleted_articles ) { + msg( "info", $lang_table['mass_head'], $lang_table['mass_delok'], $_SESSION['admin_referrer'] ); + } else { + msg( "error", $lang['mass_notok'], "$deleted_articles $lang[mass_i] " . count( $selected_orders ) . " $lang[mass_notok_1]", $_SESSION['admin_referrer'] ); + } +} +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +else { + msg( "info", $lang['mass_noact'], $lang['mass_noact_1'], $_SESSION['admin_referrer'] ); +} +} + +// ******************************************************************************** +// Write options +// ******************************************************************************** +if( $action == "save" ) { + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { + die( "Hacking attempt! User not found" ); + } + + $save_con = $_POST['save_con']; + + include_once SYSTEM_DIR . '/classes/parse.class.php'; + $parse = new ParseFilter( Array (), Array (), 1, 1 ); + + $save_con['msgs_type0'] = $parse->process( stripslashes( trim( $save_con['msgs_type0'] ) ) ); + $save_con['msgs_type0'] = str_replace( '"', '"', $parse->BB_Parse( $save_con['msgs_type0'], false ) ); + + $save_con['msgs_type1'] = $parse->process( stripslashes( trim( $save_con['msgs_type1'] ) ) ); + $save_con['msgs_type1'] = str_replace( '"', '"', $parse->BB_Parse( $save_con['msgs_type1'], false ) ); + + $find[] = "'\r'"; + $replace[] = ""; + $find[] = "'\n'"; + $replace[] = ""; + + $save_con['version_id'] = "2.5"; + $save_con = $save_con + $table_config; + + if( $member_id['user_group'] != 1 ){ msg( "error", $lang['opt_denied'], $lang['opt_denied'] ); } //DLE >= 7.5 + + $handler = fopen( SYSTEM_DIR . '/data/tableconfig.php', "w" ); + + fwrite( $handler, " $value ) { + + if( $name != "msgs_type0" OR $name != "msgs_type1") { + $value = trim( stripslashes( $value ) ); + $value = htmlspecialchars( $value, ENT_QUOTES); + $value = preg_replace( $find, $replace, $value ); + + $name = trim( stripslashes( $name ) ); + $name = htmlspecialchars( $name, ENT_QUOTES ); + $name = preg_replace( $find, $replace, $name ); + } + + $value = str_replace( "$", "$", $value ); + $value = str_replace( "{", "{", $value ); + $value = str_replace( "}", "}", $value ); + + $name = str_replace( "$", "$", $name ); + $name = str_replace( "{", "{", $name ); + $name = str_replace( "}", "}", $name ); + + fwrite( $handler, "'{$name}' => \"{$value}\",\n\n" ); + + } + fwrite( $handler, ");\n\n?>" ); + fclose( $handler ); + + $cache->clear(); + msg( "info", $lang['opt_sysok'], "$lang[opt_sysok_1]

    $lang[db_prev]" ); +} + +?> \ No newline at end of file diff --git a/system/inc/usergroup.php b/system/inc/usergroup.php new file mode 100644 index 0000000..4733335 --- /dev/null +++ b/system/inc/usergroup.php @@ -0,0 +1,646 @@ +super_query( "SELECT count(*) as count FROM " . USERPREFIX . "_users WHERE user_group='$id'" ); + + if( ! $row['count'] ) { + $db->query( "DELETE FROM " . USERPREFIX . "_usergroups WHERE id = '$id'" ); + $cache->delete('usergroup.php'); + $cache->clear(); + msg( "info", $lang['all_info'], $lang['group_del'], "$PHP_SELF?mod=usergroup" ); + } else { + if( $grouplevel and $grouplevel != $id ) { + $db->query( "UPDATE " . USERPREFIX . "_users set user_group='$grouplevel' WHERE user_group='$id'" ); + $db->query( "DELETE FROM " . USERPREFIX . "_usergroups WHERE id = '$id'" ); + $cache->delete('usergroup.php' ); + $cache->clear(); + msg( "info", $lang['all_info'], $lang['group_del'], "$PHP_SELF?mod=usergroup" ); + } else + msg( "info", $lang['all_info'], "
    {$lang['group_move']}
    ", "$PHP_SELF?mod=usergroup" ); + } + +} elseif( $action == "doadd" or $action == "doedit" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" );} + + if( ! count( $_REQUEST['allow_cats'] ) ) $_REQUEST['allow_cats'][] = "all"; + if( ! count( $_REQUEST['cat_add'] ) ) $_REQUEST['cat_add'][] = "all"; + + $group_name = $db->safesql( strip_tags( $_REQUEST['group_name'] ) ); + $group_color = $db->safesql( strip_tags( $_REQUEST['group_color'] ) ); + + $allow_cats = $db->safesql( implode( ',', $_REQUEST['allow_cats'] ) ); + $cat_add = $db->safesql( implode( ',', $_REQUEST['cat_add'] ) ); + + $allow_admin = intval( $_REQUEST['allow_admin'] ); + $allow_offline = intval( $_REQUEST['allow_offline'] ); + $allow_main = intval( $_REQUEST['allow_main'] ); + $allow_adds = intval( $_REQUEST['allow_adds'] ); + $moderation = intval( $_REQUEST['moderation'] ); + $allow_edit = intval( $_REQUEST['allow_edit'] ); + $allow_all_edit = intval( $_REQUEST['allow_all_edit'] ); + $allow_addc = intval( $_REQUEST['allow_addc'] ); + $allow_editc = intval( $_REQUEST['allow_editc'] ); + $allow_delc = intval( $_REQUEST['allow_delc'] ); + $edit_allc = intval( $_REQUEST['edit_allc'] ); + $del_allc = intval( $_REQUEST['del_allc'] ); + $allow_hide = intval( $_REQUEST['allow_hide'] ); + $allow_pm = intval( $_REQUEST['allow_pm'] ); + $allow_files = intval( $_REQUEST['allow_files'] ); + $allow_feed = intval( $_REQUEST['allow_feed'] ); + $allow_search = intval( $_REQUEST['allow_search'] ); + $allow_rating = intval( $_REQUEST['allow_rating'] ); + $max_foto = $db->safesql( $_REQUEST['max_foto'] ); + $allow_short = intval( $_REQUEST['allow_short'] ); + $allow_fixed = intval( $_REQUEST['allow_fixed'] ); + $allow_poll = intval( $_REQUEST['allow_poll'] ); + $max_signature = intval( $_REQUEST['max_signature'] ); + $max_info = intval( $_REQUEST['max_info'] ); + + $forum_post_edit = intval( $_REQUEST['forum_post_edit']); + $forum_post_del = intval( $_REQUEST['forum_post_del']); + $forum_topic_set = intval( $_REQUEST['forum_topic_set']); + $forum_topic_edit = intval( $_REQUEST['forum_topic_edit']); + $forum_topic_del = intval( $_REQUEST['forum_topic_del']); + + $admin_addnews = intval( $_REQUEST['admin_addnews'] ); + $admin_editnews = intval( $_REQUEST['admin_editnews'] ); + $admin_categories = intval( $_REQUEST['admin_categories'] ); + $admin_editusers = intval( $_REQUEST['admin_editusers'] ); + $admin_wordfilter = intval( $_REQUEST['admin_wordfilter'] ); + $admin_static = intval( $_REQUEST['admin_static'] ); + $admin_blockip = intval( $_REQUEST['admin_blockip'] ); + $admin_iptools = intval( $_REQUEST['admin_iptools'] ); + $admin_googlemap = intval( $_REQUEST['admin_googlemap'] ); + $admin_table = intval( $_REQUEST['admin_table'] ); + + $allow_image_upload = intval( $_REQUEST['allow_image_upload'] ); + $allow_file_upload = intval( $_REQUEST['allow_file_upload'] ); + $allow_tor_upload = intval( $_REQUEST['allow_tor_upload'] ); + $allow_signature = intval( $_REQUEST['allow_signature'] ); + $allow_url = intval( $_REQUEST['allow_url'] ); + $allow_image = intval( $_REQUEST['allow_image'] ); + + if( $group_name == "" ) msg( "error", $lang['addnews_error'], $lang['group_err1'], "$PHP_SELF?mod=usergroup&action=add" ); + + $cache->delete('usergroup.php' ); + +if( $action == "doadd" ) { + $db->query( "INSERT INTO " . USERPREFIX . "_usergroups (group_name, colour, allow_cats, allow_adds, cat_add, allow_admin, allow_addc, allow_editc, allow_delc, edit_allc, del_allc, moderation, allow_all_edit, allow_edit, allow_pm, max_foto, allow_files, allow_hide, allow_short, allow_fixed, allow_feed, allow_search, allow_poll, allow_main, allow_rating, allow_offline, allow_image_upload, allow_file_upload, allow_tor_upload, allow_signature, allow_url, allow_image, max_signature, max_info, forum_post_edit, forum_post_del, forum_topic_set, forum_topic_edit, forum_topic_del, admin_addnews, admin_editnews, admin_categories, admin_editusers, admin_wordfilter, admin_static, admin_blockip, admin_iptools, admin_googlemap, admin_table) values ('$group_name', '$group_color', '$allow_cats', '$allow_adds', '$cat_add', '$allow_admin', '$allow_addc', '$allow_editc', '$allow_delc', '$edit_allc', '$del_allc', '$moderation', '$allow_all_edit', '$allow_edit', '$allow_pm', '$max_foto', '$allow_files', '$allow_hide', '$allow_short', '$allow_fixed', '$allow_feed', '$allow_search', '$allow_poll', '$allow_main', '$allow_rating', '$allow_offline', '$allow_image_upload', '$allow_file_upload', '$allow_tor_upload', '$allow_signature', '$allow_url', '$allow_image', '$max_signature', '$max_info', '$forum_post_edit', '$forum_post_del', '$forum_topic_set', '$forum_topic_edit', '$forum_topic_del', '$admin_addnews', '$admin_editnews', '$admin_categories', '$admin_editusers', '$admin_wordfilter', '$admin_static', '$admin_blockip', '$admin_iptools', '$admin_googlemap', '$admin_table')" ); + msg( "info", $lang['all_info'], $lang['group_ok1'], "$PHP_SELF?mod=usergroup" ); + } else { + $id = intval( $_REQUEST['id'] ); + $db->query( "UPDATE " . USERPREFIX . "_usergroups set group_name='$group_name', colour='$group_color', allow_cats='$allow_cats', allow_adds='$allow_adds', cat_add='$cat_add', allow_admin='$allow_admin', allow_addc='$allow_addc', allow_editc='$allow_editc', allow_delc='$allow_delc', edit_allc='$edit_allc', del_allc='$del_allc', moderation='$moderation', allow_all_edit='$allow_all_edit', allow_edit='$allow_edit', allow_pm='$allow_pm', max_foto='$max_foto', allow_files='$allow_files', allow_hide='$allow_hide', allow_short='$allow_short', allow_fixed='$allow_fixed', allow_feed='$allow_feed', allow_search='$allow_search', allow_poll='$allow_poll', allow_main='$allow_main', allow_rating='$allow_rating', allow_offline='$allow_offline', allow_image_upload='$allow_image_upload', allow_file_upload='$allow_file_upload', allow_tor_upload='$allow_tor_upload', allow_signature='$allow_signature', allow_url='$allow_url', allow_image='$allow_image', max_signature='$max_signature', max_info='$max_info', forum_post_edit='$forum_post_edit', forum_post_del='$forum_post_del', forum_topic_set='$forum_topic_set', forum_topic_edit='$forum_topic_edit', forum_topic_del='$forum_topic_del', admin_addnews='$admin_addnews', admin_editnews='$admin_editnews', admin_categories='$admin_categories', admin_editusers='$admin_editusers', admin_wordfilter='$admin_wordfilter', admin_static='$admin_static', admin_blockip='$admin_blockip', admin_iptools='$admin_iptools', admin_googlemap='$admin_googlemap', admin_table='$admin_table' WHERE id='{$id}'" ); + msg( "info", $lang['all_info'], $lang['group_ok2'], "$PHP_SELF?mod=usergroup" ); + } + $cache->clear(); +} elseif( $action == "add" or $action == "edit" ) { + echoheader( "", "" ); + + if( $action == "add" ) { + + $group_name_value = ""; + $group_color_value = ""; + + $allow_admin_no = "checked"; + $allow_offline_no = "checked"; + $allow_adds_yes = "checked"; + $allow_short_yes = "checked"; + $moderation_no = "checked"; + $allow_edit_no = "checked"; + $allow_all_edit_no = "checked"; + $allow_image_upload_yes = "checked"; + $allow_file_upload_yes = "checked"; + $allow_tor_upload_yes = "checked"; + + $allow_addc_yes = "checked"; + $allow_editc_yes = "checked"; + $allow_delc_yes = "checked"; + $edit_allc_no = "checked"; + $del_allc_no = "checked"; + $allow_hide_yes = "checked"; + $allow_pm_yes = "checked"; + $allow_files_yes = "checked"; + $allow_feed_yes = "checked"; + $allow_search_yes = "checked"; + $allow_rating_yes = "checked"; + $allow_fixed_no = "checked"; + $allow_poll_yes = "checked"; + $allow_main_yes = "checked"; + $allow_signature_yes = "checked"; + $allow_url_yes = "checked"; + $allow_image_no = "checked"; + + $forum_post_edit_no = "checked"; + $forum_post_del_no = "checked"; + $forum_topic_set_no = "checked"; + $forum_topic_edit_no = "checked"; + $forum_topic_del_no = "checked"; + + $admin_addnews_no = "checked"; + $admin_editnews_no = "checked"; + $admin_categories_no = "checked"; + $admin_editusers_no = "checked"; + $admin_wordfilter_no = "checked"; + $admin_static_no = "checked"; + $admin_blockip_no = "checked"; + $admin_iptools_no = "checked"; + $admin_googlemap_no = "checked"; + $admin_table_no = "checked"; + + $max_foto_value = "100"; + $max_signature_value = "500"; + $max_info_value = "1000"; + $submit_value = $lang['group_new']; + $form_title = $lang['group_new1']; + $form_action = "$PHP_SELF?mod=usergroup&action=doadd"; + $group_list = get_groups( 4 ); + + $cat_add_value = "selected"; + $allow_cats_value = "selected"; + $categories_list = CategoryNewsSelection( 0, 0, false ); + $cat_add_list = CategoryNewsSelection( 0, 0, false ); + + } else { + + $id = intval( $_REQUEST['id'] ); + $group_name_value = htmlspecialchars( stripslashes( $user_group[$id]['group_name'] ) ); + $group_color_value = htmlspecialchars( stripslashes( $user_group[$id]['colour'] ) ); + + if( $user_group[$id]['allow_offline'] ) $allow_offline_yes = "checked"; else $allow_offline_no = "checked"; + if( $user_group[$id]['allow_admin'] ) $allow_admin_yes = "checked"; else $allow_admin_no = "checked"; + if( $user_group[$id]['allow_adds'] ) $allow_adds_yes = "checked"; else $allow_adds_no = "checked"; + if( $user_group[$id]['moderation'] ) $moderation_yes = "checked"; else $moderation_no = "checked"; + if( $user_group[$id]['allow_edit'] ) $allow_edit_yes = "checked"; else $allow_edit_no = "checked"; + if( $user_group[$id]['allow_all_edit'] ) $allow_all_edit_yes = "checked"; else $allow_all_edit_no = "checked"; + if( $user_group[$id]['allow_addc'] ) $allow_addc_yes = "checked"; else $allow_addc_no = "checked"; + if( $user_group[$id]['allow_editc'] ) $allow_editc_yes = "checked"; else $allow_editc_no = "checked"; + if( $user_group[$id]['allow_delc'] ) $allow_delc_yes = "checked"; else $allow_delc_no = "checked"; + if( $user_group[$id]['edit_allc'] ) $edit_allc_yes = "checked"; else $edit_allc_no = "checked"; + if( $user_group[$id]['del_allc'] ) $del_allc_yes = "checked"; else $del_allc_no = "checked"; + if( $user_group[$id]['allow_hide'] ) $allow_hide_yes = "checked"; else $allow_hide_no = "checked"; + if( $user_group[$id]['allow_pm'] ) $allow_pm_yes = "checked"; else $allow_pm_no = "checked"; + if( $user_group[$id]['allow_files'] ) $allow_files_yes = "checked"; else $allow_files_no = "checked"; + if( $user_group[$id]['allow_feed'] ) $allow_feed_yes = "checked"; else $allow_feed_no = "checked"; + if( $user_group[$id]['allow_search'] ) $allow_search_yes = "checked"; else $allow_search_no = "checked"; + if( $user_group[$id]['allow_rating'] ) $allow_rating_yes = "checked"; else $allow_rating_no = "checked"; + if( $user_group[$id]['allow_short'] ) $allow_short_yes = "checked"; else $allow_short_no = "checked"; + if( $user_group[$id]['allow_fixed'] ) $allow_fixed_yes = "checked"; else $allow_fixed_no = "checked"; + if( $user_group[$id]['allow_poll'] ) $allow_poll_yes = "checked"; else $allow_poll_no = "checked"; + if( $user_group[$id]['allow_main'] ) $allow_main_yes = "checked"; else $allow_main_no = "checked"; + if( $user_group[$id]['allow_image_upload'] ) $allow_image_upload_yes = "checked"; else $allow_image_upload_no = "checked"; + if( $user_group[$id]['allow_file_upload'] ) $allow_file_upload_yes = "checked"; else $allow_file_upload_no = "checked"; + if( $user_group[$id]['allow_tor_upload'] ) $allow_tor_upload_yes = "checked"; else $allow_tor_upload_no = "checked"; + if( $user_group[$id]['allow_signature'] ) $allow_signature_yes = "checked"; else $allow_signature_no = "checked"; + if( $user_group[$id]['allow_url'] ) $allow_url_yes = "checked"; else $allow_url_no = "checked"; + if( $user_group[$id]['allow_image'] ) $allow_image_yes = "checked"; else $allow_image_no = "checked"; + + if( $user_group[$id]['forum_post_edit'] ) $forum_post_edit_yes = "checked"; else $forum_post_edit_no = "checked"; + if( $user_group[$id]['forum_post_del'] ) $forum_post_del_yes = "checked"; else $forum_post_del_no = "checked"; + if( $user_group[$id]['forum_topic_set'] ) $forum_topic_set_yes = "checked"; else $forum_topic_set_no = "checked"; + if( $user_group[$id]['forum_topic_edit'] ) $forum_topic_edit_yes = "checked"; else $forum_topic_edit_no = "checked"; + if( $user_group[$id]['forum_topic_del'] ) $forum_topic_del_yes = "checked"; else $forum_topic_del_no = "checked"; + + if( $user_group[$id]['admin_addnews'] ) $admin_addnews_yes = "checked"; else $admin_addnews_no = "checked"; + if( $user_group[$id]['admin_editnews'] ) $admin_editnews_yes = "checked"; else $admin_editnews_no = "checked"; + if( $user_group[$id]['admin_categories'] ) $admin_categories_yes = "checked"; else $admin_categories_no = "checked"; + if( $user_group[$id]['admin_editusers'] ) $admin_editusers_yes = "checked"; else $admin_editusers_no = "checked"; + if( $user_group[$id]['admin_wordfilter'] ) $admin_wordfilter_yes = "checked"; else $admin_wordfilter_no = "checked"; + if( $user_group[$id]['admin_static'] ) $admin_static_yes = "checked"; else $admin_static_no = "checked"; + if( $user_group[$id]['admin_blockip'] ) $admin_blockip_yes = "checked"; else $admin_blockip_no = "checked"; + if( $user_group[$id]['admin_iptools'] ) $admin_iptools_yes = "checked"; else $admin_iptools_no = "checked"; + if( $user_group[$id]['admin_googlemap'] ) $admin_googlemap_yes = "checked"; else $admin_googlemap_no = "checked"; + if( $user_group[$id]['admin_table'] ) $admin_table_yes = "checked"; else $admin_table_no = "checked"; + + if( $id == 1 ) $admingroup = "disabled"; + if( $id == 5 ) $gastgroup = "disabled"; + + if( $user_group[$id]['allow_cats'] == "all" ) $allow_cats_value = "selected"; + $categories_list = CategoryNewsSelection( explode( ',', $user_group[$id]['allow_cats'] ), 0, false ); + + if( $user_group[$id]['cat_add'] == "all" ) $cat_add_value = "selected"; + $cat_add_list = CategoryNewsSelection( explode( ',', $user_group[$id]['cat_add'] ), 0, false ); + + $max_foto_value = $user_group[$id]['max_foto']; + $max_signature_value = $user_group[$id]['max_signature']; + $max_info_value = $user_group[$id]['max_info']; + $submit_value = $lang['group_edit']; + $form_title = $lang['group_edit1'] . $group_name_value; + $form_action = "$PHP_SELF?mod=usergroup&action=doedit&id=" . $id; + + } + + echo << +
    + +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + +
    + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    +
    +
    + +HTML; + + echofooter(); +} else { + echoheader( "", "" ); + + $db->query( "SELECT user_group, count(*) as count FROM " . USERPREFIX . "_users GROUP BY user_group" ); + while ( $row = $db->get_row() ) + $count_list[$row['user_group']] = $row['count']; + $db->free(); + foreach ( $user_group as $group ) { + $count = intval( $count_list[$group['id']] ); + $entries .= " + +   {$group['id']} + {$group['group_name']} + $count + + + "; + } + + echo << + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + +
    + + + + + + + + + {$entries} + + +
      ID{$lang['group_name']}{$lang['group_sel4']} 
    +
    +
    + + +HTML; + + echofooter(); +} +?> \ No newline at end of file diff --git a/system/inc/wordfilter.php b/system/inc/wordfilter.php new file mode 100644 index 0000000..d8e1937 --- /dev/null +++ b/system/inc/wordfilter.php @@ -0,0 +1,394 @@ +filter_mode = false; + +// ******************************************************************************** +// +// ******************************************************************************** +if( $action == "add" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {die( "Hacking attempt! User not found" );} + + $word_find = trim( strip_tags( stripslashes( $_POST['word_find'] ) ) ); + + if( $word_find == "" ) { + msg( "error", $lang['word_error'], $lang['word_word'], "?mod=wordfilter" ); + } + + if( $word_replace == "($lang[word_del])" ) { + $word_replace = ""; + } + + $word_replace = stripslashes( $parse->BB_Parse( $parse->process( $_POST['word_replace'] ), false ) ); + + $word_id = time(); + + $all_items = file( SYSTEM_DIR . '/data/wordfilter.db.php' ); + foreach ( $all_items as $item_line ) { + $item_arr = explode( "|", $item_line ); + if( $item_arr[0] == $word_id ) { + $word_id ++; + } + } + + foreach ( $all_items as $word_line ) { + $word_arr = explode( "|", $word_line ); + if( $word_arr[1] == $word_find ) { + msg( "error", $lang['word_error'], $lang['word_ar'], "?mod=wordfilter" ); + } + } + + $new_words = fopen( SYSTEM_DIR . '/data/wordfilter.db.php', "a" ); + $word_find = str_replace( "|", "|", $word_find ); + $word_replace = str_replace( "|", "|", $word_replace ); + + $word_find = str_replace( "$", "$", $word_find ); + $word_find = str_replace( "{", "{", $word_find ); + $word_find = str_replace( "}", "}", $word_find ); + + $word_replace = str_replace( "$", "$", $word_replace ); + $word_replace = str_replace( "{", "{", $word_replace ); + $word_replace = str_replace( "}", "}", $word_replace ); + + fwrite( $new_words, "$word_id|$word_find|$word_replace|" . intval( $_POST['type'] ) . "|". intval( $_POST['register'] ) ."|". intval( $_POST['filter_search'] ) ."|". intval( $_POST['filter_action'] ) ."||\n" ); + fclose( $new_words ); +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "remove" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { + + die( "Hacking attempt! User not found" ); + + } + + if( ! $word_id ) { + msg( "error", $lang['word_error'], $lang['word_nof'], "$PHP_SELF?mod=wordfilter" ); + } + + $old_words = file( SYSTEM_DIR . '/data/wordfilter.db.php' ); + $new_words = fopen( SYSTEM_DIR . '/data/wordfilter.db.php', "w" ); + + foreach ( $old_words as $old_words_line ) { + $word_arr = explode( "|", $old_words_line ); + if( $word_arr[0] != $word_id ) { + fwrite( $new_words, $old_words_line ); + } + } + fclose( $new_words ); +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "edit" ) { + + // Check if Filter was specified + if( ! $word_id ) { + msg( "error", $lang['word_error'], $lang['word_nof'], "$PHP_SELF?mod=wordfilter" ); + } + + // Search & Load filter in to the Form + $all_words = file( SYSTEM_DIR . '/data/wordfilter.db.php' ); + foreach ( $all_words as $word_line ) { + $word_arr = explode( "|", $word_line ); + if( $word_arr[0] == $word_id ) { + + $word_arr[1] = $parse->decodeBBCodes( $word_arr[1], false ); + $word_arr[2] = $parse->decodeBBCodes( $word_arr[2], false ); + + if( $word_arr[3] ) $selected = "selected"; + else $selected = ""; + + if( $word_arr[4] ) $selected_1 = "selected"; + else $selected_1 = ""; + + $selected_2[$word_arr[5]] = "selected"; + $selected_3[$word_arr[6]] = "selected"; + + $msg = " +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang['word_word']}
    {$lang['word_rep']}
    {$lang['filter_type']}
    {$lang['filter_register']}
    {$lang['filter_search']}
    {$lang['filter_action']}
     
    + + + + + +
    "; + + // Messages + msg( "wordfilter", $lang['word_head'], $msg ); + + } + } +} +// ******************************************************************************** +// +// ******************************************************************************** +elseif( $action == "doedit" ) { + + if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) { + + die( "Hacking attempt! User not found" ); + + } + + $word_find = trim( strip_tags( stripslashes( $_POST['word_find'] ) ) ); + + if( $word_find == "" ) { + msg( "error", $lang['word_error'], $lang['word_word'], "javascript:history.go(-1)" ); + } + + $word_replace = stripslashes( $parse->BB_Parse( $parse->process( $_POST['word_replace'] ), false ) ); + + $word_find = str_replace( "|", "|", $word_find ); + $word_replace = str_replace( "|", "|", $word_replace ); + + $word_find = str_replace( "$", "$", $word_find ); + $word_find = str_replace( "{", "{", $word_find ); + $word_find = str_replace( "}", "}", $word_find ); + + $word_replace = str_replace( "$", "$", $word_replace ); + $word_replace = str_replace( "{", "{", $word_replace ); + $word_replace = str_replace( "}", "}", $word_replace ); + + $old_words = file( SYSTEM_DIR . '/data/wordfilter.db.php' ); + $new_words = fopen( SYSTEM_DIR . '/data/wordfilter.db.php', "w" ); + + foreach ( $old_words as $word_line ) { + $word_arr = explode( "|", $word_line ); + if( $word_arr[0] == $word_id ) { + fwrite( $new_words, "$word_id|$word_find|$word_replace|" . intval( $_POST['type'] ) . "|". intval( $_POST['register'] ) ."|". intval( $_POST['filter_search'] ) ."|". intval( $_POST['filter_action'] ) ."||\n" ); + } else { + fwrite( $new_words, $word_line ); + } + } + + fclose( $new_words ); +} +// ******************************************************************************** +// +// ******************************************************************************** +echoheader( "wordfilter", $lang['word_head'] ); + +echo << +
    + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {$lang['word_word']}
    {$lang['word_rep']}
    {$lang['filter_type']}
    {$lang['filter_register']}
    {$lang['filter_search']}
    {$lang['filter_action']}
     
    +
    +
    + + + + +
    + + + + + + + + + ",""],legend:[1,"
    ","
    "],thead:[1,"
    + + + + +
    +
    + +HTML; + +$all_words = file( SYSTEM_DIR . '/data/wordfilter.db.php' ); +$count_words = 0; + +usort( $all_words, "compare_filter" ); + +foreach ( $all_words as $word_line ) { + $word_arr = explode( "|", $word_line ); + + $result .= " + + "; + $count_words ++; +} + +if( $count_words == 0 ) { + echo " + + "; +} else { + + echo " + + + "; + + echo $result; + +} + +echo " +"; + +echo << + + + + + + + + +
    + $word_arr[1] + "; + + if( $word_arr[2] == "" ) { + $result .= "$lang[word_del]"; + } else { + $result .= "$word_arr[2]"; + } + + $type = ($word_arr[3]) ? $lang['filter_type_2'] : $lang['filter_type_1']; + $register = ($word_arr[4]) ? $lang['opt_sys_yes'] : $lang['opt_sys_no']; + + + $result .= "{$register}{$type}{$lang['filter_search_'.$word_arr[5]]}{$lang['filter_action_'.$word_arr[6]]} + [ {$lang[word_ledit]} ] + + [ $lang[word_ldel] ] +
    +


    $lang[word_empty] +

    + $lang[word_worte] + + $lang[word_lred] + + $lang[filter_register] + + $lang[filter_type] + + $lang[filter_search] + + $lang[filter_action] + +   + +   +

    {$lang['word_help_2']} +
    + +HTML; + +echofooter(); +?> \ No newline at end of file diff --git a/system/init.php b/system/init.php new file mode 100644 index 0000000..7308d70 --- /dev/null +++ b/system/init.php @@ -0,0 +1,182 @@ +start (); +check_xss (); + +if (isset ( $_REQUEST['year'] )) $year = intval ( $_GET['year'] ); else $year = ''; +if (isset ( $_REQUEST['month'] )) $month = @$db->safesql ( strip_tags ( str_replace ( '/', '', $_GET['month'] ) ) ); else $month = ''; +if (isset ( $_REQUEST['day'] )) $day = @$db->safesql ( strip_tags ( str_replace ( '/', '', $_GET['day'] ) ) ); else $day = ''; +if (isset ( $_REQUEST['user'] )) $user = @$db->safesql ( strip_tags ( str_replace ( '/', '', urldecode ( $_GET['user'] ) ) ) ); else $user = ''; +if (isset ( $_REQUEST['news_name'] )) $news_name = @$db->safesql ( strip_tags ( str_replace ( '/', '', $_GET['news_name'] ) ) ); else $news_name = ''; +if (isset ( $_REQUEST['newsid'] )) $newsid = intval ( $_GET['newsid'] ); else $newsid = 0; +if (isset ( $_REQUEST['cstart'] )) $cstart = intval ( $_GET['cstart'] ); else $cstart = 0; +if (isset ( $_REQUEST['news_page'] )) $news_page = intval ( $_GET['news_page'] ); else $news_page = 0; + +if (isset ( $_REQUEST['category'] )) { + if (substr ( $_GET['category'], - 1, 1 ) == '/') $_GET['category'] = substr ( $_GET['category'], 0, - 1 ); + $category = explode ( '/', $_GET['category'] ); + $category = end ( $category ); + $category = $db->safesql ( strip_tags ( $category ) ); +} else $category = ''; + +$PHP_SELF = $config['http_home_url'] . "index.php"; +$pm_alert = ""; +$ajax = ""; +$_DOCUMENT_DATE = false; +$user_query = ""; + +$metatags = array ( + 'title' => $config['home_title'], + 'description' => $config['description'], + 'keywords' => $config['keywords'], + 'header_title' => "" ); + +$user_color = $cache->get ( "user_color" ); +if (! $user_color){ + $user_color = array (); + $db->query ( "SELECT user_id, name, user_group FROM " . USERPREFIX . "_users WHERE user_group <> '4' " ); + while ( $row = $db->get_row () ){ + $user_color[$row['name']] = array (); + foreach ( $row as $key => $value ) { + $user_color[$row['name']][$key] = $value; + }} + $cache->set ( "user_color", $user_color ); + $db->free (); +} + +$user_group = $cache->get ( "usergroup" ); +if (! $user_group) { + $user_group = array (); + $db->query ( "SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC" ); + while ( $row = $db->get_row () ) { + $user_group[$row['id']] = array (); + foreach ( $row as $key => $value ) {$user_group[$row['id']][$key] = stripslashes($value);} + } + $cache->set ( "usergroup", $user_group ); + $db->free (); +} + +$cat_info = $cache->get ( "category" ); +if (! is_array ( $cat_info )) { + $cat_info = array (); + $db->query ( "SELECT * FROM " . PREFIX . "_category ORDER BY posi ASC" ); + while ( $row = $db->get_row () ) { + $cat_info[$row['id']] = array (); + foreach ( $row as $key => $value ) {$cat_info[$row['id']][$key] = stripslashes ( $value );} + } + $cache->set ( "category", $cat_info ); + $db->free (); +} + +$banned_info = $cache->get ( "banned" ); +if (! is_array ( $banned_info )) { + $banned_info = array (); + $db->query ( "SELECT * FROM " . USERPREFIX . "_banned" ); + while ( $row = $db->get_row () ) { + if ($row['users_id']) {$banned_info['users_id'][$row['users_id']] = array ('users_id' => $row['users_id'], 'descr' => stripslashes ( $row['descr'] ), 'date' => $row['date'] ); + } else {if (count ( explode ( ".", $row['ip'] ) ) == 4) $banned_info['ip'][$row['ip']] = array ('ip' => $row['ip'], 'descr' => stripslashes ( $row['descr'] ), 'date' => $row['date']); + elseif (strpos ( $row['ip'], "@" ) !== false) $banned_info['email'][$row['ip']] = array ('email' => $row['ip'], 'descr' => stripslashes ( $row['descr'] ), 'date' => $row['date'] ); + else $banned_info['name'][$row['ip']] = array ('name' => $row['ip'], 'descr' => stripslashes ( $row['descr'] ), 'date' => $row['date'] ); + }} + $cache->set ( "banned", $banned_info ); + $db->free (); +} + +if ($category != '') $category_id = get_ID ( $cat_info, $category ); +else $category_id = false; + +include_once ROOT_DIR . '/language/' . $config['langs'] . '/website.lng'; +$config['charset'] = ($lang['charset'] != '') ? $lang['charset'] : $config['charset']; + +$smartphone_detected = false; +if( isset( $_REQUEST['action'] ) and $_REQUEST['action'] == "mobiledisable" ) $_SESSION['mobile_disable'] = 1; +if( isset( $_REQUEST['action'] ) and $_REQUEST['action'] == "mobile" ) { $_SESSION['mobile_enable'] = 1; $_SESSION['mobile_disable'] = 0;} +if( !isset( $_SESSION['mobile_disable'] ) ) $_SESSION['mobile_disable'] = 0; +if( !isset( $_SESSION['mobile_enable'] ) ) $_SESSION['mobile_enable'] = 0; +if ( !$_SESSION['mobile_disable'] ) { + if ( check_smartphone() ) { + if ( @is_dir ( ROOT_DIR . '/templates/smartphone' ) ) { + $config['skin'] = "smartphone"; + $smartphone_detected = true; + $config['ajax'] = false; +}}} + +require_once SYSTEM_DIR . '/classes/templates.class.php'; + +$tpl = new dle_template ( ); +$tpl->dir = ROOT_DIR . '/templates/' . $config['skin']; +define ( 'TEMPLATE_DIR', $tpl->dir ); + +if (isset ( $_POST['set_new_sort'] )) { + $allowed_sort = array ('date', 'rating', 'news_read', 'comm_num', 'title' ); + $find_sort = str_replace ( ".", "", totranslit ( $_POST['set_new_sort'] ) ); + $direction_sort = str_replace ( ".", "", totranslit ( $_POST['set_direction_sort'] ) ); + + if (in_array ( $_POST['dlenewssortby'], $allowed_sort )) { + if ($_POST['dledirection'] == "desc" or $_POST['dledirection'] == "asc") { + $_SESSION[$find_sort] = $_POST['dlenewssortby']; + $_SESSION[$direction_sort] = $_POST['dledirection']; + $_SESSION['dle_no_cache'] = "1"; +}}} + +if ($_POST['dle_comm_sort'] == "DESC" or $_POST['dle_comm_sort'] == "ASC"){ + set_cookie("dle_comm_sort", $_POST['dle_comm_sort'], 365); + $dle_comm_sort = $_POST['dle_comm_sort']; + $_SESSION['dle_comm_sort'] = $_POST['dle_comm_sort']; + $_SESSION['dle_no_cache'] = "1"; +// }elseif ($_COOKIE['dle_comm_sort'] == "DESC" or $_COOKIE['dle_comm_sort'] == "ASC"){ + }elseif ($_SESSION['dle_comm_sort'] == "DESC" or $_SESSION['dle_comm_sort'] == "ASC"){ + //$dle_comm_sort = $_COOKIE['dle_comm_sort']; + $dle_comm_sort = $_SESSION['dle_comm_sort']; + $_SESSION['dle_no_cache'] = "1"; + }else{$dle_comm_sort = $config['comm_msort'];} + + include_once SYSTEM_DIR . '/modules/sitelogin.php'; + + //Проверяем забанен ли пользователь + if ( isset( $banned_info['ip'] ) ) $blockip = check_ip ( $banned_info['ip'] ); else $blockip = false; + if (($is_logged and $member_id['banned'] == "yes") or $blockip) include_once SYSTEM_DIR . '/modules/banned.php'; + + if ($is_logged) { + set_cookie ( "dle_newpm", $member_id['pm_unread'], 365 ); + if ($member_id['pm_unread'] > intval ( $_COOKIE['dle_newpm'] ) AND !$smartphone_detected) { + include_once SYSTEM_DIR . '/modules/pm_alert.php'; + }} + + $tpl->load_template('login.tpl'); + if ($is_logged) { + $tpl->set('{profile_name}', $member_id['name']); + $tpl->set('{profile_link}', $config['http_home_url'] . "user/" . urlencode ( $member_id['name'] ) . "/"); + $tpl->set('{addnews_link}', $config['http_home_url'] . "addnews.html"); + $tpl->set('{newsposts_link}', $config['http_home_url'] . "newposts/"); + $tpl->set('{fav_link}', $config['http_home_url'] . "favorites/"); + $tpl->set('{pm_link}', $PHP_SELF . "?do=pm"); + $tpl->set('{logout_link}', $PHP_SELF . "?action=logout"); + $tpl->set('{admin_link}', $config['http_home_url'] . $config['admin_path'] . "?mod=main"); + if ($member_id['favorites']) {$fav = count(explode("," ,$member_id['favorites']));} else $fav = '0'; + $tpl->set('{fav_count}', $fav); + $tpl->set( '{new-pm}', $member_id['pm_unread'] ); + $tpl->set( '{all-pm}', $member_id['pm_all'] ); + } + $tpl->set('{reg_link}', $PHP_SELF . "?do=register"); + $tpl->set('{lost_link}', $PHP_SELF . "?do=lostpassword"); + $tpl->compile('login_panel'); + $tpl->clear(); + +include_once SYSTEM_DIR . '/offline.php'; +require_once ROOT_DIR . '/system/engine.php'; +require_once SYSTEM_DIR.'/modules/online.php'; +include_once SYSTEM_DIR . '/modules/toptables.php'; +include_once SYSTEM_DIR . '/modules/chat/block.php'; +include_once SYSTEM_DIR . '/modules/comments-last.php'; +?> \ No newline at end of file diff --git a/system/js/highslide.js b/system/js/highslide.js new file mode 100644 index 0000000..00778d1 --- /dev/null +++ b/system/js/highslide.js @@ -0,0 +1,97 @@ +/** + * Name: Highslide JS + * Version: 4.1.12 (2011-03-28) + * Config: default -preloading -hideelements +slideshow +positioning +transitions +viewport + * Author: Torstein Hønsi + * Support: www.highslide.com/support + * License: www.highslide.com/#license + */ +if(!hs){var hs={lang:{cssDirection:"ltr",loadingText:"Loading...",loadingTitle:"Click to cancel",focusTitle:"Click to bring to front",fullExpandTitle:"Expand to actual size (f)",creditsText:"Powered by Highslide JS",creditsTitle:"Go to the Highslide JS homepage",previousText:"Previous",nextText:"Next",moveText:"Move",closeText:"Close",closeTitle:"Close (esc)",resizeTitle:"Resize",playText:"Play",playTitle:"Play slideshow (spacebar)",pauseText:"Pause",pauseTitle:"Pause slideshow (spacebar)", +previousTitle:"Previous (arrow left)",nextTitle:"Next (arrow right)",moveTitle:"Move",fullExpandText:"1:1",number:"Image %1 of %2",restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous."},graphicsDir:"highslide/graphics/",expandCursor:"zoomin.cur",restoreCursor:"zoomout.cur",expandDuration:250,restoreDuration:250,marginLeft:15,marginRight:15,marginTop:15,marginBottom:15,zIndexCounter:1001,loadingOpacity:0.75,allowMultipleInstances:true,outlineWhileAnimating:2, +outlineStartOffset:3,padToMinWidth:false,fullExpandPosition:"bottom right",fullExpandOpacity:1,showCredits:true,creditsHref:"http://highslide.com/",creditsTarget:"_self",enableKeyListener:true,openerTagNames:["a"],transitions:[],transitionDuration:250,dimmingOpacity:0,dimmingDuration:50,anchor:"auto",align:"auto",targetX:null,targetY:null,dragByHeading:true,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"drop-shadow",skin:{controls:''}, +expanders:[],overrides:"allowSizeReduction,useBox,anchor,align,targetX,targetY,outlineType,outlineWhileAnimating,captionId,captionText,captionEval,captionOverlay,headingId,headingText,headingEval,headingOverlay,creditsPosition,dragByHeading,autoplay,numberPosition,transitions,dimmingOpacity,width,height,wrapperClassName,minWidth,minHeight,maxWidth,maxHeight,pageOrigin,slideshowGroup,easing,easingClose,fadeInOut,src".split(","),overlays:[],idCounter:0,oPos:{x:["leftpanel","left","center","right","rightpanel"], +y:["above","top","middle","bottom","below"]},mouse:{},headingOverlay:{},captionOverlay:{},timers:[],slideshows:[],pendingOutlines:{},clones:{},onReady:[],uaVersion:/Trident\/4\.0/.test(navigator.userAgent)?8:parseFloat((navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1]),ie:document.all&&!window.opera,safari:/Safari/.test(navigator.userAgent),geckoMac:/Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),$:function(a){if(a)return document.getElementById(a)}, +push:function(a,b){a[a.length]=b},createElement:function(a,b,c,d,e){a=document.createElement(a);b&&hs.extend(a,b);e&&hs.setStyles(a,{padding:0,border:"none",margin:0});c&&hs.setStyles(a,c);d&&d.appendChild(a);return a},extend:function(a,b){for(var c in b)a[c]=b[c];return a},setStyles:function(a,b){for(var c in b)hs.ieLt9&&c=="opacity"?b[c]>0.99?a.style.removeAttribute("filter"):a.style.filter="alpha(opacity="+b[c]*100+")":a.style[c]=b[c]},animate:function(a,b,c){var d,e,f;if(typeof c!="object"||c=== +null)d=arguments,c={duration:d[2],easing:d[3],complete:d[4]};if(typeof c.duration!="number")c.duration=250;c.easing=Math[c.easing]||Math.easeInQuad;c.curAnim=hs.extend({},b);for(var g in b){var i=new hs.fx(a,c,g);d=parseFloat(hs.css(a,g))||0;e=parseFloat(b[g]);f=g!="opacity"?"px":"";i.custom(d,e,f)}},css:function(a,b){if(a.style[b])return a.style[b];else if(document.defaultView)return document.defaultView.getComputedStyle(a,null).getPropertyValue(b);else{b=="opacity"&&(b="filter");var c=a.currentStyle[b.replace(/\-(\w)/g, +function(a,b){return b.toUpperCase()})];b=="filter"&&(c=c.replace(/alpha\(opacity=([0-9]+)\)/,function(a,b){return b/100}));return c===""?1:c}},getPageSize:function(){var a=document,b=a.compatMode&&a.compatMode!="BackCompat"?a.documentElement:a.body;hs.page={width:hs.ieLt9?b.clientWidth:a.documentElement.clientWidth||self.innerWidth,height:hs.ieLt9?b.clientHeight:self.innerHeight,scrollLeft:hs.ieLt9?b.scrollLeft:window.pageXOffset,scrollTop:hs.ieLt9?b.scrollTop:window.pageYOffset};return hs.page}, +getPosition:function(a){for(var b={x:a.offsetLeft,y:a.offsetTop};a.offsetParent;)a=a.offsetParent,b.x+=a.offsetLeft,b.y+=a.offsetTop,a!=document.body&&a!=document.documentElement&&(b.x-=a.scrollLeft,b.y-=a.scrollTop);return b},expand:function(a,b,c){a||(a=hs.createElement("a",null,{display:"none"},hs.container));if(typeof a.getParams=="function")return b;try{return new hs.Expander(a,b,c),false}catch(d){return true}},getElementByClass:function(a,b,c){a=a.getElementsByTagName(b);for(b=0;ba)a=d,b=e;b==-1?hs.focusKey=-1:c[b].focus()},getParam:function(a,b){a.getParams=a.onclick;var c=a.getParams?a.getParams():null;a.getParams=null;return c&& +typeof c[b]!="undefined"?c[b]:typeof hs[b]!="undefined"?hs[b]:null},getSrc:function(a){var b=hs.getParam(a,"src");return b?b:a.href},getNode:function(a){var b=hs.$(a),c=hs.clones[a];return!b&&!c?null:c?c.cloneNode(true):(c=b.cloneNode(true),c.id="",hs.clones[a]=c,b)},discardElement:function(a){a&&hs.garbageBin.appendChild(a);hs.garbageBin.innerHTML=""},dim:function(a){if(!hs.dimmer)b=true,hs.dimmer=hs.createElement("div",{className:"highslide-dimming highslide-viewport-size",owner:"",onclick:function(){hs.close()}}, +{visibility:"visible",opacity:0},hs.container,true);hs.dimmer.style.display="";var b=hs.dimmer.owner=="";hs.dimmer.owner+="|"+a.key;b&&(hs.geckoMac&&hs.dimmingGeckoFix?hs.setStyles(hs.dimmer,{background:"url("+hs.graphicsDir+"geckodimmer.png)",opacity:1}):hs.animate(hs.dimmer,{opacity:a.dimmingOpacity},hs.dimmingDuration))},undim:function(a){if(hs.dimmer){if(typeof a!="undefined")hs.dimmer.owner=hs.dimmer.owner.replace("|"+a,"");if(!(typeof a!="undefined"&&hs.dimmer.owner!=""||hs.upcoming&&hs.getParam(hs.upcoming, +"dimmingOpacity")))hs.geckoMac&&hs.dimmingGeckoFix?hs.dimmer.style.display="none":hs.animate(hs.dimmer,{opacity:0},hs.dimmingDuration,null,function(){hs.dimmer.style.display="none"})}},transit:function(a,b){var c=b||hs.getExpander(),b=c;if(hs.upcoming)return false;else hs.last=c;hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);try{hs.upcoming=a,a.onclick()}catch(d){hs.last=hs.upcoming=null}try{(!a||b.transitions[1]!="crossfade")&&b.close()}catch(e){}return false},previousOrNext:function(a, +b){var c=hs.getExpander(a);return c?hs.transit(c.getAdjacentAnchor(b),c):false},previous:function(a){return hs.previousOrNext(a,-1)},next:function(a){return hs.previousOrNext(a,1)},keyHandler:function(a){if(!a)a=window.event;if(!a.target)a.target=a.srcElement;if(typeof a.target.form!="undefined")return true;var b=hs.getExpander(),c=null;switch(a.keyCode){case 70:return b&&b.doFullExpand(),true;case 32:c=2;break;case 34:case 39:case 40:c=1;break;case 8:case 33:case 37:case 38:c=-1;break;case 27:case 13:c= +0}if(c!==null){hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);if(!hs.enableKeyListener)return true;a.preventDefault?a.preventDefault():a.returnValue=false;if(b)return c==0?b.close():c==2?b.slideshow&&b.slideshow.hitSpace():(b.slideshow&&b.slideshow.pause(),hs.previousOrNext(b.key,c)),false}return true},registerOverlay:function(a){hs.push(hs.overlays,hs.extend(a,{hsId:"hsId"+hs.idCounter++}))},addSlideshow:function(a){var b=a.slideshowGroup;if(typeof b=="object")for(var c= +0;c1)return true; +if(!a.target)a.target=a.srcElement;for(var b=a.target;b.parentNode&&!/highslide-(image|move|html|resize)/.test(b.className);)b=b.parentNode;var c=hs.getExpander(b);if(c&&(c.isClosing||!c.isExpanded))return true;if(c&&a.type=="mousedown"){if(a.target.form)return true;if(b=b.className.match(/highslide-(image|move|resize)/))if(hs.dragArgs={exp:c,type:b[1],left:c.x.pos,width:c.x.size,top:c.y.pos,height:c.y.size,clickX:a.clientX,clickY:a.clientY},hs.addEventListener(document,"mousemove",hs.dragHandler), +a.preventDefault&&a.preventDefault(),/highslide-(image|html)-blur/.test(c.content.className))c.focus(),hs.hasFocused=true}else if(a.type=="mouseup")if(hs.removeEventListener(document,"mousemove",hs.dragHandler),hs.dragArgs){if(hs.styleRestoreCursor&&hs.dragArgs.type=="image")hs.dragArgs.exp.content.style.cursor=hs.styleRestoreCursor;!hs.dragArgs.hasDragged&&!hs.hasFocused&&!/(move|resize)/.test(hs.dragArgs.type)&&c.close();hs.hasFocused=false;hs.dragArgs=null}else if(/highslide-image-blur/.test(b.className))b.style.cursor= +hs.styleRestoreCursor;return false},dragHandler:function(a){if(!hs.dragArgs)return true;if(!a)a=window.event;var b=hs.dragArgs,c=b.exp;b.dX=a.clientX-b.clickX;b.dY=a.clientY-b.clickY;var d=Math.sqrt(Math.pow(b.dX,2)+Math.pow(b.dY,2));if(!b.hasDragged)b.hasDragged=b.type!="image"&&d>0||d>(hs.dragSensitivity||5);if(b.hasDragged&&a.clientX>5&&a.clientY>5)if(b.type=="resize")c.resize(b);else if(c.moveTo(b.left+b.dX,b.top+b.dY),b.type=="image")c.content.style.cursor="move";return false},wrapperMouseHandler:function(a){try{if(!a)a= +window.event;var b=/mouseover/i.test(a.type);if(!a.target)a.target=a.srcElement;if(!a.relatedTarget)a.relatedTarget=b?a.fromElement:a.toElement;var c=hs.getExpander(a.target);if(c.isExpanded&&c&&a.relatedTarget&&!(hs.getExpander(a.relatedTarget,true)==c||hs.dragArgs))for(a=0;a=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();var a=this.options.curAnim[this.prop]=true,c;for(c in this.options.curAnim)this.options.curAnim[c]!==true&&(a=false);a&&this.options.complete&&this.options.complete.call(this.elem);return false}else c=b-this.startTime,this.state=c/this.options.duration,this.pos=this.options.easing(c,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos, +this.update();return true}};hs.extend(hs.fx,{step:{opacity:function(a){hs.setStyles(a.elem,{opacity:a.now})},_default:function(a){try{a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}catch(b){}}}});hs.Outline=function(a,b){this.onLoad=b;this.outlineType=a;var c;this.hasAlphaImageLoader=hs.ie&&hs.uaVersion<7;if(a){hs.init();this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",borderCollapse:"collapse",width:0},hs.container, +true);var d=hs.createElement("tbody",null,null,this.table,1);this.td=[];for(var e=0;e<=8;e++)e%3==0&&(c=hs.createElement("tr",null,{height:"auto"},d,true)),this.td[e]=hs.createElement("td",null,null,c,true),hs.setStyles(this.td[e],e!=4?{lineHeight:0,fontSize:0}:{position:"relative"});this.td[4].className=a+" highslide-outline";this.preloadGraphic()}else b&&b()};hs.Outline.prototype={preloadGraphic:function(){var a=hs.graphicsDir+(hs.outlinesDir||"outlines/")+this.outlineType+".png";this.graphic=hs.createElement("img", +null,{position:"absolute",top:"-9999px"},hs.safari&&hs.uaVersion<525?hs.container:null,true);var b=this;this.graphic.onload=function(){b.onGraphicLoad()};this.graphic.src=a},onGraphicLoad:function(){for(var a=this.offset=this.graphic.width/4,b=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],c={height:2*a+"px",width:2*a+"px"},d=0;d<=8;d++)if(b[d]){if(this.hasAlphaImageLoader){var e=d==1||d==7?"100%":this.graphic.width+"px",f=hs.createElement("div",null,{width:"100%",height:"100%",position:"relative", +overflow:"hidden"},this.td[d],true);hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:"absolute",width:e,height:this.graphic.height+"px",left:b[d][0]*a+"px",top:b[d][1]*a+"px"},f,true)}else hs.setStyles(this.td[d],{background:"url("+this.graphic.src+") "+b[d][0]*a+"px "+b[d][1]*a+"px"});window.opera&&(d==3||d==5)&&hs.createElement("div",null,c,this.td[d],true);hs.setStyles(this.td[d],c)}this.graphic=null; +hs.pendingOutlines[this.outlineType]&&hs.pendingOutlines[this.outlineType].destroy();hs.pendingOutlines[this.outlineType]=this;if(this.onLoad)this.onLoad()},setPosition:function(a,b,c){var d=this.exp,b=b||0,a=a||{x:d.x.pos+b,y:d.y.pos+b,w:d.x.get("wsize")-2*b,h:d.y.get("wsize")-2*b};if(c)this.table.style.visibility=a.h>=4*this.offset?"visible":"hidden";hs.setStyles(this.table,{left:a.x-this.offset+"px",top:a.y-this.offset+"px",width:a.w+2*this.offset+"px"});a.w-=2*this.offset;a.h-=2*this.offset;hs.setStyles(this.td[4], +{width:a.w>=0?a.w+"px":0,height:a.h>=0?a.h+"px":0});if(this.hasAlphaImageLoader)this.td[3].style.height=this.td[5].style.height=this.td[4].style.height},destroy:function(a){a?this.table.style.visibility="hidden":hs.discardElement(this.table)}};hs.Dimension=function(a,b){this.exp=a;this.dim=b;this.ucwh=b=="x"?"Width":"Height";this.wh=this.ucwh.toLowerCase();this.uclt=b=="x"?"Left":"Top";this.lt=this.uclt.toLowerCase();this.ucrb=b=="x"?"Right":"Bottom";this.rb=this.ucrb.toLowerCase();this.p1=this.p2= +0};hs.Dimension.prototype={get:function(a){switch(a){case "loadingPos":return this.tpos+this.tb+(this.t-hs.loading["offset"+this.ucwh])/2;case "loadingPosXfade":return this.pos+this.cb+this.p1+(this.size-hs.loading["offset"+this.ucwh])/2;case "wsize":return this.size+2*this.cb+this.p1+this.p2;case "fitsize":return this.clientSize-this.marginMin-this.marginMax;case "maxsize":return this.get("fitsize")-2*this.cb-this.p1-this.p2;case "opos":return this.pos-(this.exp.outline?this.exp.outline.offset:0); +case "osize":return this.get("wsize")+(this.exp.outline?2*this.exp.outline.offset:0);case "imgPad":return this.imgSize?Math.round((this.size-this.imgSize)/2):0}},calcBorders:function(){this.cb=(this.exp.content["offset"+this.ucwh]-this.t)/2;this.marginMax=hs["margin"+this.ucrb]},calcThumb:function(){this.t=this.exp.el[this.wh]?parseInt(this.exp.el[this.wh]):this.exp.el["offset"+this.ucwh];this.tpos=this.exp.tpos[this.dim];this.tb=(this.exp.el["offset"+this.ucwh]-this.t)/2;if(this.tpos==0||this.tpos== +-1)this.tpos=hs.page[this.wh]/2+hs.page["scroll"+this.uclt]},calcExpanded:function(){var a=this.exp;this.justify="auto";if(a.align=="center")this.justify="center";else if(RegExp(this.lt).test(a.anchor))this.justify=null;else if(RegExp(this.rb).test(a.anchor))this.justify="max";this.pos=this.tpos-this.cb+this.tb;if(this.maxHeight&&this.dim=="x")a.maxWidth=Math.min(a.maxWidth||this.full,a.maxHeight*this.full/a.y.full);this.size=Math.min(this.full,a["max"+this.ucwh]||this.full);this.minSize=a.allowSizeReduction? +Math.min(a["min"+this.ucwh],this.full):this.full;if(a.isImage&&a.useBox)this.size=a[this.wh],this.imgSize=this.full;if(this.dim=="x"&&hs.padToMinWidth)this.minSize=a.minWidth;this.target=a["target"+this.dim.toUpperCase()];this.marginMin=hs["margin"+this.uclt];this.scroll=hs.page["scroll"+this.uclt];this.clientSize=hs.page[this.wh]},setSize:function(a){var b=this.exp;b.isImage&&(b.useBox||hs.padToMinWidth)?(this.imgSize=a,this.size=Math.max(this.size,this.imgSize),b.content.style[this.lt]=this.get("imgPad")+ +"px"):this.size=a;b.content.style[this.wh]=a+"px";b.wrapper.style[this.wh]=this.get("wsize")+"px";b.outline&&b.outline.setPosition();this.dim=="x"&&b.overlayBox&&b.sizeOverlayBox(true);this.dim=="x"&&b.slideshow&&b.isImage&&(a==this.full?b.slideshow.disable("full-expand"):b.slideshow.enable("full-expand"))},setPos:function(a){this.pos=a;this.exp.wrapper.style[this.lt]=a+"px";this.exp.outline&&this.exp.outline.setPosition()}};hs.Expander=function(a,b,c,d){var h;if(document.readyState&&hs.ie&&!hs.isReady)hs.addEventListener(document, +"ready",function(){new hs.Expander(a,b,c,d)});else{this.a=a;this.custom=c;this.contentType=d||"image";this.isImage=!this.isHtml;this.overlays=[];this.last=hs.last;hs.last=null;hs.init();for(var e=this.key=hs.expanders.length,f=0;ff.scroll+f.clientSize-f.marginMax)f.pos=f.scroll+f.clientSize-f.size-f.marginMin-f.marginMax-f.p1-f.p2;if(f.pos(this.x.imgSize||this.x.size))this.createFullExpand(),this.overlays.length==1&&this.sizeOverlayBox()}this.show()}}catch(i){this.error(i)}},justify:function(a,b){var c,d= +a.target,e=a==this.x?"x":"y";d&&d.match(/ /)&&(c=d.split(" "),d=c[0]);if(d&&hs.$(d)){if(a.pos=hs.getPosition(hs.$(d))[e],c&&c[1]&&c[1].match(/^[-]?[0-9]+px$/)&&(a.pos+=parseInt(c[1])),a.sizea.scroll+a.clientSize-a.marginMax)if(!b&&c&&f)a.size=Math.min(a.size,a.get(e=="y"?"fitsize":"maxsize"));else if(a.get("wsize")a){e=f*a;if(ethis.minHeight&&c.size>this.minWidth&&d.get("wsize")>d.get("fitsize");){d.size-=10;if(a)c.size=d.size*a;this.sizeOverlayBox(0,1);b=true}return b},show:function(){var a=this.x,b=this.y;this.changeSize(1,{wrapper:{width:a.get("wsize"),height:b.get("wsize"),left:a.pos, +top:b.pos},content:{left:a.p1+a.get("imgPad"),top:b.p1+b.get("imgPad"),width:a.imgSize||a.size,height:b.imgSize||b.size}},hs.expandDuration)},changeSize:function(a,b,c){var d=this.transitions,e=a?this.last?this.last.a:null:hs.upcoming,d=d[1]&&e&&hs.getParam(e,"transitions")[1]==d[1]?d[1]:d[0];if(this[d]&&d!="expand")this[d](a,b);else{this.outline&&!this.outlineWhileAnimating&&(a?this.outline.setPosition():this.outline.destroy());a||this.destroyOverlays();var f=this,g=f.x,i=f.y,d=this.easing;a||(d= +this.easingClose||d);e=a?function(){if(f.outline)f.outline.table.style.visibility="visible";setTimeout(function(){f.afterExpand()},50)}:function(){f.afterClose()};a&&hs.setStyles(this.wrapper,{width:g.t+"px",height:i.t+"px"});this.fadeInOut&&(hs.setStyles(this.wrapper,{opacity:a?0:1}),hs.extend(b.wrapper,{opacity:a}));hs.animate(this.wrapper,b.wrapper,{duration:c,easing:d,step:function(b,c){if(f.outline&&f.outlineWhileAnimating&&c.prop=="top"){var d=a?c.pos:1-c.pos,d={w:g.t+(g.get("wsize")-g.t)*d, +h:i.t+(i.get("wsize")-i.t)*d,x:g.tpos+(g.pos-g.tpos)*d,y:i.tpos+(i.pos-i.tpos)*d};f.outline.setPosition(d,0,1)}}});hs.animate(this.content,b.content,c,d,e);if(a)this.wrapper.style.visibility="visible",this.content.style.visibility="visible",this.a.className+=" highslide-active-anchor"}},fade:function(a,b){this.outlineWhileAnimating=false;var c=this,d=a?hs.expandDuration:0;if(a)hs.animate(this.wrapper,b.wrapper,0),hs.setStyles(this.wrapper,{opacity:0,visibility:"visible"}),hs.animate(this.content, +b.content,0),this.content.style.visibility="visible",hs.animate(this.wrapper,{opacity:1},d,null,function(){c.afterExpand()});if(this.outline){this.outline.table.style.zIndex=this.wrapper.style.zIndex;for(var e=a||-1,f=this.outline.offset,g=a?3:f,i=a?f:3,j=g;e*j<=e*i;j+=e,d+=25)(function(){var b=a?i-j:g-j;setTimeout(function(){c.outline.setPosition(0,b,1)},d)})()}a||setTimeout(function(){c.outline&&c.outline.destroy(c.preserveContent);c.destroyOverlays();hs.animate(c.wrapper,{opacity:0},hs.restoreDuration, +null,function(){c.afterClose()})},d)},crossfade:function(a){if(a){var b=this,c=this.last,d=this.x,e=this.y,f=c.x,g=c.y,i=this.wrapper,j=this.content,l=this.overlayBox;hs.removeEventListener(document,"mousemove",hs.dragHandler);hs.setStyles(j,{width:(d.imgSize||d.size)+"px",height:(e.imgSize||e.size)+"px"});if(l)l.style.overflow="visible";if(this.outline=c.outline)this.outline.exp=b;c.outline=null;var p=hs.createElement("div",{className:"highslide-"+this.contentType},{position:"absolute",zIndex:4, +overflow:"hidden",display:"none"}),a={oldImg:c,newImg:this},m;for(m in a)this[m]=a[m].content.cloneNode(1),hs.setStyles(this[m],{position:"absolute",border:0,visibility:"visible"}),p.appendChild(this[m]);i.appendChild(p);if(l)l.className="",i.appendChild(l);p.style.display="";c.content.style.display="none";if(hs.safari&&hs.uaVersion<525)this.wrapper.style.visibility="visible";hs.animate(i,{width:d.size},{duration:hs.transitionDuration,step:function(a,m){var k=m.pos,o=1-k,n,h={},q=["pos","size","p1", +"p2"],r;for(r in q)n=q[r],h["x"+n]=Math.round(o*f[n]+k*d[n]),h["y"+n]=Math.round(o*g[n]+k*e[n]),h.ximgSize=Math.round(o*(f.imgSize||f.size)+k*(d.imgSize||d.size)),h.ximgPad=Math.round(o*f.get("imgPad")+k*d.get("imgPad")),h.yimgSize=Math.round(o*(g.imgSize||g.size)+k*(e.imgSize||e.size)),h.yimgPad=Math.round(o*g.get("imgPad")+k*e.get("imgPad"));b.outline&&b.outline.setPosition({x:h.xpos,y:h.ypos,w:h.xsize+h.xp1+h.xp2+2*d.cb,h:h.ysize+h.yp1+h.yp2+2*e.cb});c.wrapper.style.clip="rect("+(h.ypos-g.pos)+ +"px, "+(h.xsize+h.xp1+h.xp2+h.xpos+2*f.cb-f.pos)+"px, "+(h.ysize+h.yp1+h.yp2+h.ypos+2*g.cb-g.pos)+"px, "+(h.xpos-f.pos)+"px)";hs.setStyles(j,{top:h.yp1+e.get("imgPad")+"px",left:h.xp1+d.get("imgPad")+"px",marginTop:e.pos-h.ypos+"px",marginLeft:d.pos-h.xpos+"px"});hs.setStyles(i,{top:h.ypos+"px",left:h.xpos+"px",width:h.xp1+h.xp2+h.xsize+2*d.cb+"px",height:h.yp1+h.yp2+h.ysize+2*e.cb+"px"});hs.setStyles(p,{width:(h.ximgSize||h.xsize)+"px",height:(h.yimgSize||h.ysize)+"px",left:h.xp1+h.ximgPad+"px", +top:h.yp1+h.yimgPad+"px",visibility:"visible"});hs.setStyles(b.oldImg,{top:g.pos-h.ypos+g.p1-h.yp1+g.get("imgPad")-h.yimgPad+"px",left:f.pos-h.xpos+f.p1-h.xp1+f.get("imgPad")-h.ximgPad+"px"});hs.setStyles(b.newImg,{opacity:k,top:e.pos-h.ypos+e.p1-h.yp1+e.get("imgPad")-h.yimgPad+"px",left:d.pos-h.xpos+d.p1-h.xp1+d.get("imgPad")-h.ximgPad+"px"});l&&hs.setStyles(l,{width:h.xsize+"px",height:h.ysize+"px",left:h.xp1+d.cb+"px",top:h.yp1+e.cb+"px"})},complete:function(){i.style.visibility=j.style.visibility= +"visible";j.style.display="block";hs.discardElement(p);b.afterExpand();c.afterClose();b.last=null}})}},reuseOverlay:function(a){if(!this.last)return false;for(var b=0;b'+hs.lang.number.replace("%1",this.getAnchorIndex()+1).replace("%2",a.length)+""+this[this.numberPosition].innerHTML}}, +initSlideshow:function(){if(this.last)this.slideshow=this.last.slideshow;else for(var a=0;aa.parentNode.offsetWidth)a.style.width="100%"}else a.parentNode!=this.overlayBox&& +this.overlayBox.appendChild(a);if(/left$/.test(b))a.style.left=d+"px";/center$/.test(b)&&hs.setStyles(a,{left:"50%",marginLeft:d-Math.round(a.offsetWidth/2)+"px"});if(/right$/.test(b))a.style.right=-d+"px";if(/^leftpanel$/.test(b))hs.setStyles(a,{right:"100%",marginRight:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"}),this.x.p1=a.offsetWidth;else if(/^rightpanel$/.test(b))hs.setStyles(a,{left:"100%",marginLeft:this.x.cb+"px",top:-this.y.cb+"px",bottom:-this.y.cb+"px",overflow:"auto"}), +this.x.p2=a.offsetWidth;d=a.parentNode.offsetHeight;a.style.height="auto";if(c&&a.offsetHeight>d)a.style.height=hs.ieLt7?d+"px":"100%";if(/^top/.test(b))a.style.top=e+"px";/^middle/.test(b)&&hs.setStyles(a,{top:"50%",marginTop:e-Math.round(a.offsetHeight/2)+"px"});if(/^bottom/.test(b))a.style.bottom=-e+"px";if(/^above$/.test(b))hs.setStyles(a,{left:-this.x.p1-this.x.cb+"px",right:-this.x.p2-this.x.cb+"px",bottom:"100%",marginBottom:this.y.cb+"px",width:"auto"}),this.y.p1=a.offsetHeight;else if(/^below$/.test(b))hs.setStyles(a, +{position:"relative",left:-this.x.p1-this.x.cb+"px",right:-this.x.p2-this.x.cb+"px",top:"100%",marginTop:this.y.cb+"px",width:"auto"}),this.y.p2=a.offsetHeight,a.style.position="absolute"},getOverlays:function(){this.getInline(["heading","caption"],true);this.getNumber();this.heading&&this.dragByHeading&&(this.heading.className+=" highslide-move");hs.showCredits&&this.writeCredits();for(var a=0;a").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
    a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
    "+""+"
    ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
    t
    ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
    ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/
    ","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
    ","
    "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
    ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); + +/*! + * jQuery UI 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16", +keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d= +this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this, +"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart": +"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight, +outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a, +"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&& +a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= +false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +; + +(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, +left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= +k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= +m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= +d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= +a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), +g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); +; + +(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== +"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= +this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;if(b.iframeFix)d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options; +this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}); +this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true}, +_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b= +false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration, +10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle|| +!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&& +a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent= +this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"), +10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"), +10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top, +(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!= +"hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"), +10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+ +this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&& +!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.leftg[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.topg[3])?h:!(h-this.offset.click.topg[2])?e:!(e-this.offset.click.left=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,d=[];if(e.primary||e.secondary){if(this.options.text)d.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary"));e.primary&&a.prepend("");e.secondary&&a.append("");if(!this.options.text){d.push(f?"ui-button-icons-only": +"ui-button-icon-only");this.hasTitle||a.attr("title",c)}}else d.push("ui-button-text-only");a.addClass(d.join(" "))}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,c){a==="disabled"&&this.buttons.button("option",a,c);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var a=this.element.css("direction")=== +"ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(a?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"); +b.Widget.prototype.destroy.call(this)}})})(jQuery); +; + +(function(c,l){var m={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},n={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},o=c.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false, +position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("
    ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+ +b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("
    ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g), +h=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("").addClass("ui-dialog-title").attr("id", +e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); +a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!== +b.uiDialog[0]){e=c(this).css("z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()};c.ui.dialog.maxZ+=1; +d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target=== +f[0]&&e.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("
    ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("
    ").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a, +function(){return!(d=true)});if(d){c.each(a,function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;var i=c('').click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.each(h,function(j,k){if(j!=="click")j in o?i[j](k):i.attr(j,k)});c.fn.button&&i.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close", +handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition, +originalSize:f.originalSize,position:f.position,size:f.size}}a=a===l?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize", +f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "): +[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f); +if(g in m)e=true;if(g in n)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"): +e.removeClass("ui-dialog-disabled");break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a= +this.options,b,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height- +b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "), +create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()
    ").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&& +c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); +this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* +this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.16"})})(jQuery); +; + +jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], +16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, +a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= +a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", +"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, +0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, +211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, +d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})}; +f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this, +[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.16",save:function(c,a){for(var b=0;b").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}), +d=document.activeElement;c.wrap(b);if(c[0]===d||f.contains(c[0],d))f(d).focus();b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(e,g){a[g]=c.css(g);if(isNaN(parseInt(a[g],10)))a[g]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){var a,b=document.activeElement; +if(c.parent().is(".ui-effects-wrapper")){a=c.parent().replaceWith(c);if(c[0]===b||f.contains(c[0],b))f(b).focus();return a}return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)}); +return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this, +arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/ +2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b, +d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c, +a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b, +d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h(.|[\r\n])*?<\/script>/ig; + + var js_str = js_reg.exec(data); + if (js_str != null) { + + var js_arr = new Array(js_str.shift()); + var jsfound = true; + + while(js_str) { + js_str = js_reg.exec(data); + if (js_str != null) js_arr.push(js_str.shift()); + } + + for(var i=0; i
    + + + +
       
    +HTML; + +$tpl->set( '{addimg}', $addim ); + +#### IMG + +?> \ No newline at end of file diff --git a/system/modules/addnews.php b/system/modules/addnews.php new file mode 100644 index 0000000..a30d084 --- /dev/null +++ b/system/modules/addnews.php @@ -0,0 +1,219 @@ +query( "UPDATE LOW_PRIORITY " . USERPREFIX . "_users SET restricted='0', restricted_days='0', restricted_date='' WHERE user_id='{$member_id['user_id']}'" ); +} + +if( $member_id['restricted'] == 1 or $member_id['restricted'] == 3 ) { + if( $member_id['restricted_days'] ) { + $lang['news_info_4'] = str_replace( '{date}', langdate( "j M Y H:i", $member_id['restricted_date'] ), $lang['news_info_4'] ); + $lang['add_err_9'] = $lang['news_info_4']; + } else {$lang['add_err_9'] = $lang['news_info_5'];} + $allow_addnews = false; +} + +if( ! $allow_addnews ) {msgbox( $lang['all_info'], $lang['add_err_9'] . "

    $lang[all_prev]" ); +} else { + if( isset( $_REQUEST['mod'] ) and $_REQUEST['mod'] == "addnews" and $is_logged and $user_group[$member_id['user_group']]['allow_adds'] ) { + $stop = ""; + $allow_comm = intval( $_POST['allow_comm'] ); + if( $user_group[$member_id['user_group']]['allow_main'] ) $allow_main = intval( $_POST['allow_main'] ); else $allow_main = 0; + $approve = intval( $_POST['approve'] ); + $allow_rating = intval( $_POST['allow_rating'] ); + if( $user_group[$member_id['user_group']]['allow_fixed'] ) $news_fixed = intval( $_POST['news_fixed'] ); else $news_fixed = 0; + if( ! count( $_REQUEST['catlist'] ) ) {$catlist = array (); $catlist[] = '0';} else $catlist = $_REQUEST['catlist']; $category_list = $db->safesql( implode( ',', $catlist ) ); + if( ! $config['allow_add_tags'] ) $_POST['tags'] = ""; elseif( @preg_match( "/[\||\'|\<|\>|\"|\!|\?|\$|\@|\/|\\\|\&\~\*\+]/", $_POST['tags'] ) ) $_POST['tags'] = ""; else $_POST['tags'] = $db->safesql( htmlspecialchars( strip_tags( stripslashes( trim( $_POST['tags'] ) ) ), ENT_QUOTES ) ); + if ( $_POST['tags'] ) { + $temp_array = array(); + $tags_array = array(); + $temp_array = explode (",", $_POST['tags']); + if (count($temp_array)) { + foreach ( $temp_array as $value ) { + if( trim($value) ) $tags_array[] = trim( $value ); + }} + if ( count($tags_array) ) $_POST['tags'] = implode(", ", $tags_array); else $_POST['tags'] = ""; + } + if( ! $user_group[$member_id['user_group']]['moderation'] ) {$approve = 0;$allow_comm = 1;$allow_main = 0;$allow_rating = 1;$news_fixed = 0;} + if( $approve ) $msg = $lang['add_ok_1']; else $msg = $lang['add_ok_2']; + $allow_list = explode( ',', $user_group[$member_id['user_group']]['cat_add'] ); + + if( $user_group[$member_id['user_group']]['moderation'] ) { + foreach ( $catlist as $selected ) { + if( $allow_list[0] != "all" and ! in_array( $selected, $allow_list ) and $member_id['user_group'] != "1" ) { + $approve = 0; + $msg = $lang['add_ok_3']; + }}} + + $full_story = $db->safesql( $parse->BB_Parse( $parse->process( $_POST['full_story'] ), false ) ); + $short_story = $db->safesql( $parse->BB_Parse( $parse->process( $_POST['short_story'] ), false ) ); + + if( $parse->not_allowed_text ) {$stop .= "
  • " . $lang['news_err_39'] . "
  • ";} + + $parse->ParseFilter(); + $title = $db->safesql( $parse->process( trim( strip_tags ($_POST['title']) ) ) ); + $alt_name = trim( $parse->process( stripslashes( $_POST['alt_name'] ) ) ); + if( $alt_name == "" or ! $alt_name ) $alt_name = totranslit( stripslashes( $title ), true, false ); else $alt_name = totranslit( $alt_name, true, false ); + if( $title == "" or ! $title ) $stop .= $lang['add_err_1']; + if( strlen( $title ) > 200 ) $stop .= $lang['add_err_2']; + if( trim( $short_story ) == "" or ! $short_story ) $stop .= $lang['add_err_5']; + if( $stop ) {$stop = "
      " . $stop . "
    $lang[all_prev]"; msgbox( $lang['add_err_6'], $stop );} + + if( ! $stop ) { + $id = (isset( $_REQUEST['id'] )) ? intval( $_REQUEST['id'] ) : 0; $found = false; + if( $id ) {$row = $db->super_query( "SELECT * FROM " . PREFIX . "_post where id = '$id' and approve = '0'" ); if( $id == $row['id'] and ($member_id['name'] == $row['autor'] or $user_group[$member_id['user_group']]['allow_all_edit']) ) $found = true; else $found = false;} + + if( $found ) { + $db->query( "UPDATE " . PREFIX . "_post set title='$title', short_story='$short_story', full_story='$full_story', category='$category_list', alt_name='$alt_name', allow_comm='$allow_comm', approve='$approve', allow_main='$allow_main', allow_rate='$allow_rating', fixed='$news_fixed', tags='" . $_POST['tags'] . "' WHERE id='$id'" ); + + // + if( $_POST['tags'] != $row['tags'] or $approve ) {$db->query( "DELETE FROM " . PREFIX . "_tags WHERE news_id = '{$row['id']}'" ); + if( $_POST['tags'] != "" and $approve ) { + $tags = array (); + $_POST['tags'] = explode( ",", $_POST['tags'] ); + foreach ( $_POST['tags'] as $value ) {$tags[] = "('" . $row['id'] . "', '" . trim( $value ) . "')";} + $tags = implode( ", ", $tags ); + $db->query( "INSERT INTO " . PREFIX . "_tags (news_id, tag) VALUES " . $tags ); + }}} else { + $added_time = time() + ($config['date_adjust'] * 60); + $thistime = date( "Y-m-d H:i:s", $added_time ); + $db->query( "INSERT INTO " . PREFIX . "_post (date, autor, short_story, full_story, title, keywords, category, alt_name, allow_comm, approve, allow_main, fixed, allow_rate, tags) values ('$thistime', '$member_id[name]', '$short_story', '$full_story', '$title', '', '$category_list', '$alt_name', '$allow_comm', '$approve', '$allow_main', '$news_fixed', '$allow_rating', '" . $_POST['tags'] . "')" ); + $row['id'] = $db->insert_id(); + $member_id['name'] = $db->safesql($member_id['name']); + +// +if (isset($_FILES['tor_add']) && $_FILES['tor_add']!='') {include_once SYSTEM_DIR . '/modules/torrent/upload.php';} +//! + + $db->query( "UPDATE " . PREFIX . "_images set news_id='{$row['id']}' where author = '{$member_id['name']}' AND news_id = '0'" ); + $db->query( "UPDATE " . PREFIX . "_files set news_id='{$row['id']}' where author = '{$member_id['name']}' AND news_id = '0'" ); + $db->query( "UPDATE " . PREFIX . "_torrents set news_id='{$row['id']}' where author = '{$member_id['name']}' AND news_id = '0'" ); + $db->query( "UPDATE " . USERPREFIX . "_users set news_num=news_num+1 where user_id='$member_id[user_id]'" ); + + $row = $row['id']; + include_once SYSTEM_DIR . '/inc/newsimg/doaddimg.php'; + + if( $_POST['tags'] != "" and $approve ) { + $tags = array (); + $_POST['tags'] = explode( ",", $_POST['tags'] ); + foreach ( $_POST['tags'] as $value ) {$tags[] = "('" . $row['id'] . "', '" . trim( $value ) . "')";} + $tags = implode( ", ", $tags ); + $db->query( "INSERT INTO " . PREFIX . "_tags (news_id, tag) VALUES " . $tags ); + }} + msgbox( $lang['add_ok'], "{$msg} $lang[add_noch] $lang[add_or] $lang[all_prev]" ); + if( $approve ) $cache->clear(); + } + } elseif( $is_logged and $user_group[$member_id['user_group']]['allow_adds'] ) { + $tpl->load_template( 'addnews.tpl' ); + $addtype = "addnews"; + include_once SYSTEM_DIR . '/modules/bbcode.php'; + + $tpl->set( '{shortarea}', '' ); + $tpl->set( '{fullarea}', '' ); + + $id = (isset( $_REQUEST['id'] )) ? intval( $_REQUEST['id'] ) : 0; + $found = false; + + if( $id ) {$row = $db->super_query( "SELECT * FROM " . PREFIX . "_post where id = '$id' and approve = '0'" ); if( $id == $row['id'] and ($member_id['name'] == $row['autor'] or $user_group[$member_id['user_group']]['allow_all_edit']) ) $found = true; else $found = false;} + + if( $found ) { + + $cat_list = explode( ',', $row['category'] ); + $categories_list = CategoryNewsSelection( $cat_list, 0 ); + $tpl->set( '{title}', $parse->decodeBBCodes( $row['title'], false ) ); + $tpl->set( '{alt-name}', $row['alt_name'] ); + + $row['short_story'] = $parse->decodeBBCodes( $row['short_story'], false ); + $row['full_story'] = $parse->decodeBBCodes( $row['full_story'], false ); + + $tpl->set( '{short-story}', $row['short_story'] ); + $tpl->set( '{full-story}', $row['full_story'] ); + $tpl->set( '{tags}', $row['tags'] ); + + } else { +// 27.02.2011 + $categories_list = CategoryNewsSelectioh(); +// 27.02.2011 +// $categories_list = CategoryNewsSelection( 0, 0 ); + $tpl->set( '{title}', '' ); + $tpl->set( '{alt-name}', '' ); + $tpl->set( '{short-story}', '' ); + $tpl->set( '{full-story}', '' ); + $tpl->set( '{tags}', '' ); + + } + + +// $cats = " + +HTML; +// 27.02.2011 + $cats .= $categories_list; + $cats .= ""; + + $tpl->set( '{bbcode}', $bb_code ); + $tpl->set( '{category}', $cats ); + + include_once SYSTEM_DIR . '/modules/addimg.php'; + if( $user_group[$member_id['user_group']]['moderation'] ) { + $admintag = ""; + if( $user_group[$member_id['user_group']]['allow_main'] ) $admintag .= "    "; + $admintag .= "

    "; + if( $user_group[$member_id['user_group']]['allow_fixed'] ) $admintag .= "
    "; + $tpl->set( '{admintag}', $admintag );} else $tpl->set( '{admintag}', '' ); + $torpole = " :"; + $tpl->set('{toradd}', $torpole); + + if( $is_logged and $member_id['user_group'] < 3 ) { + $tpl->set( '[urltag]', '' ); + $tpl->set( '[/urltag]', '' );} else $tpl->set_block( "'\\[urltag\\].*?\\[/urltag\\]'si", "" ); + + $script = " + +HTML; + + $script .= "
    "; + $tpl->copy_template = $categoryfilter . $script . $tpl->copy_template . "
    "; + + $tpl->compile( 'content' ); + $tpl->clear(); + + } else + msgbox( $lang['all_info'], "$lang[add_err_8]
    $lang[all_prev]" ); +} +?> \ No newline at end of file diff --git a/system/modules/antibot.php b/system/modules/antibot.php new file mode 100644 index 0000000..a1f518f --- /dev/null +++ b/system/modules/antibot.php @@ -0,0 +1,235 @@ +length_min, $this->length_max ); + $this->length = $length; + $this->keystring = ''; + for ($i = 0; $i < $length ; $i++) { + // 1 + $this->keystring .= $this->allowed_symbols{ mt_rand( 0, strlen( $this->allowed_symbols ) -1 ) }; + }} + + function genimage() { + $foreground_color = array( 100, 130, 200 ); + $background_color = array( 255, 255, 255 ); + $fonts = array(); + $fontsdir_absolute = dirname( __FILE__ ).'/'.$this->fontsdir; // + if ($handle = opendir( $fontsdir_absolute )) { // + while (false !== ($file = readdir( $handle ))) { + if (preg_match( '/\.png$/i', $file )) { + $fonts[] = $fontsdir_absolute.'/'.$file; + }} + closedir( $handle ); + } + + $alphabet_length = strlen( $this->alphabet ); + + while (true) { + $font_file = $fonts[mt_rand( 0, count( $fonts ) - 1 )]; + $font = imagecreatefrompng( $font_file ); + $black = imagecolorallocate( $font, 0, 0, 0 ); + $fontfile_width = imagesx( $font ); + $fontfile_height = imagesy( $font ) - 1; + $font_metrics = array(); + $symbol = 0; + $reading_symbol = false; + + // + for ($i = 0; $i < $fontfile_width && $symbol < $alphabet_length; $i++) { + $transparent = (imagecolorat( $font, $i, 0 ) >> 24) == 127; + + if (!$reading_symbol && !$transparent) { + $font_metrics[$this->alphabet{$symbol}] = array( 'start' => $i ); + $reading_symbol = true; + continue; + } + + if ($reading_symbol && $transparent) { + $font_metrics[$this->alphabet{$symbol}]['end'] = $i; + $reading_symbol = false; + $symbol++; + continue; + } + } + + $img = imagecreatetruecolor( $this->width, $this->height ); + + $white = imagecolorallocate( $img, 100, 130, 200 ); + $black = imagecolorallocate( $img, 100, 130, 200 ); + + imagefilledrectangle( $img, 0, 0, $this->width - 1, $this->height - 1, $white ); + + // + $x = 1; + $shift = 0; + + for ($i = 0; $i < $this->length; $i++) { + $m = $font_metrics[$this->keystring{$i}]; + $y = mt_rand( -$this->fluctuation_amplitude, $this->fluctuation_amplitude ) + ($this->height - $fontfile_height) / 2 + 2; + + if ($this->no_spaces) { + $shift = 0; + if ($i > 0) { + $shift = 1000; + for ($sy = 1; $sy < $fontfile_height - 15; $sy += 2) { + for ($sx = $m['start'] - 1; $sx < $m['end']; $sx++) { + $rgb = imagecolorat( $font, $sx, $sy ); + $opacity = $rgb >> 24; + if ($opacity < 127) { + $left = $sx - $m['start'] + $x; + $py = $sy + $y; + for ($px = min( $left, $this->width - 1 ); $px > $left - 20 && $px >= 0; $px--) { + $color = imagecolorat( $img, $px, $py ) & 0xff; + if ($color + $opacity < 190) { + if ($shift > $left-$px) { + $shift = $left - $px; + } + break; + } + } + break; + } + } + } + } + } else {$shift = 1;} + imagecopy( $img, $font, $x - $shift, $y, $m['start'], 1, $m['end'] - $m['start'], $fontfile_height ); + $x += $m['end'] - $m['start'] - $shift; + } + if ($x < $this->width - 10) break; // fit in canvas + } + $center = $x/2; + + $img2=imagecreatetruecolor($this->width, $this->height); + $foreground=imagecolorallocate($img2, $foreground_color[0], $foreground_color[1], $foreground_color[2]); + $background=imagecolorallocate($img2, $background_color[0], $background_color[1], $background_color[2]); + imagefilledrectangle($img2, 0, $this->height, $this->width, $this->height+12, $foreground); + + // + $rand1 = 0; + $rand2 = 0; + $rand3 = 0; + $rand4 = 0; + // + $rand5 = 0; + $rand6 = 0; + $rand7 = 0; + $rand8 = 0; + // + $rand9 = 0; + $rand10 = 0; + + // + for ($x = 0; $x < $this->width; $x++) { + for ($y = 0; $y < $this->height; $y++) { + $sx = $x + (sin( $x * $rand1 + $rand5 ) + sin( $y * $rand3 + $rand6 )) * $rand9 - $this->width / 2 + $center + 1; + $sy = $y + (sin( $x * $rand2 + $rand7 ) + sin( $y * $rand4 + $rand8 )) * $rand10; + + if ($sx < 0 || $sy < 0 || $sx >= $this->width - 1 || $sy >= $this->height - 1) { + $color = 200; + $color_x = 200; + $color_y = 200; + $color_xy = 200; + } else { + $color = imagecolorat( $img, $sx, $sy ) & 0xFF; + $color_x = imagecolorat( $img, $sx + 1, $sy ) & 0xFF; + $color_y = imagecolorat( $img, $sx, $sy + 1 ) & 0xFF; + $color_xy = imagecolorat( $img, $sx + 1, $sy + 1 ) & 0xFF; + } + + if ($color == 0 && $color_x == 0 && $color_y == 0 && $color_xy == 0) { + $newred = $foreground_color[0]; + $newgreen = $foreground_color[1]; + $newblue = $foreground_color[2]; + } else if ($color == 255 && $color_x == 255 && $color_y == 255 && $color_xy == 255) { + $newred = $background_color[0]; + $newgreen = $background_color[1]; + $newblue = $background_color[2]; + } else { + $frsx = $sx - floor( $sx ); + $frsy = $sy - floor( $sy ); + $frsx1 = 1 - $frsx; + $frsy1 = 1 - $frsy; + $newcolor = ( + $color * $frsx1 * $frsy1 + + $color_x * $frsx * $frsy1 + + $color_y * $frsx1 * $frsy + + $color_xy * $frsx * $frsy); + + if ($newcolor > 255) $newcolor = 255; + $newcolor = $newcolor / 255; + $newcolor0 = 1 - $newcolor; + + $newred = $newcolor0 * $foreground_color[0] + $newcolor * $background_color[0]; + $newgreen = $newcolor0 * $foreground_color[1] + $newcolor * $background_color[1]; + $newblue = $newcolor0 * $foreground_color[2] + $newcolor * $background_color[2]; + } + imagesetpixel( $img2, $x, $y, imagecolorallocate( $img2, $newred, $newgreen, $newblue ) ); + }} + + # + imageline( $img2, 0, 0, $this->width, 0, $foreground ); + imageline( $img2, 0, 0, 0, $this->height, $foreground ); + + imageline( $img2, 0, $this->height-1, $this->width, $this->height-1, $foreground ); + imageline( $img2, $this->width-1, 0, $this->width-1, $this->height, $foreground); + + header( "Expires: Tue, 11 Jun 1985 05:00:00 GMT" ); + header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . " GMT" ); + header( "Cache-Control: no-store, no-cache, must-revalidate" ); + header( "Cache-Control: post-check=0, pre-check=0", false ); + header( "Pragma: no-cache" ); + + if (function_exists ('imagepng')) { + header ('Content-type: image/png'); + imagepng ($img2, null); + } elseif (function_exists ('imagegif')) { + header ('Content-type: image/gif'); + imagegif ($img2, null); + } elseif (function_exists('imagejpeg')) { + header( "Content-Type: image/jpeg" ); + imagejpeg($img2, null, $this->jpeg_quality); + } + + imagedestroy($img2); + + } +} + +session_start(); +$im = new genrandomimage(); +$im->genstring(); +$_SESSION['sec_code_session'] = $im->keystring; +$im->genimage(); +?> \ No newline at end of file diff --git a/system/modules/banned.php b/system/modules/banned.php new file mode 100644 index 0000000..99183f9 --- /dev/null +++ b/system/modules/banned.php @@ -0,0 +1,56 @@ +query( "SELECT users_id FROM " . USERPREFIX . "_banned WHERE days != '0' AND date < '$this_time'" ); + +$del = false; +$blocked = false; + +while ( $row = $db->get_row( $sel_banned ) ) { + $del = true; + + if( $row['users_id'] ){ + if ($repa_cf['repa_ban']){ + $db->query( "UPDATE " . USERPREFIX . "_users SET banned='', repa='0' WHERE user_id = '{$row['users_id']}'" ); + $row2 = $db->super_query("SELECT user_id, name, repa FROM " . USERPREFIX . "_users where user_id = '{$row['users_id']}'"); + $db->query( "DELETE FROM " . USERPREFIX . "_reputation WHERE komu = '$row2[name]'" ); + } else + $db->query( "UPDATE " . USERPREFIX . "_users SET banned='' WHERE user_id = '{$row['users_id']}'" ); + } +} +$db->free( $sel_banned ); + +if( $del ) { + $db->query( "DELETE FROM " . USERPREFIX . "_banned WHERE days != '0' AND date < '$this_time'" ); + $cache->delete('banned.php' ); +} + +if( $blockip ) { + $blocked = true; + if( $banned_info['ip'][$blockip]['date'] ) { + if( $banned_info['ip'][$blockip]['date'] > $this_time ) $endban = langdate( "j M Y H:i", $banned_info['ip'][$blockip]['date'] ); + else $blocked = false; + } else $endban = $lang['banned_info']; + $descr = $lang['ip_block'] . "

    " . $banned_info['ip'][$blockip]['descr']; +} elseif( $banned_info['users_id'][$member_id['user_id']]['users_id'] ) { + $blocked = true; + if( $banned_info['users_id'][$member_id['user_id']]['date'] ) { + if( $banned_info['users_id'][$member_id['user_id']]['date'] > $this_time ) $endban = langdate( "j M Y H:i", $banned_info['users_id'][$member_id['user_id']]['date'] ); + else $blocked = false; + } else $endban = $lang['banned_info']; + $descr = $banned_info['users_id'][$member_id['user_id']]['descr']; +} + +if( $blocked ) { + $tpl->dir = ROOT_DIR . '/templates'; + + $tpl->load_template( 'banned.tpl' ); + $tpl->set('{title}', $config['short_title']); + $tpl->set( '{description}', $descr ); + $tpl->set( '{end}', $endban ); + $tpl->compile( 'content' ); + echo $tpl->result['content']; + die(); +} +?> \ No newline at end of file diff --git a/system/modules/bbcode.php b/system/modules/bbcode.php new file mode 100644 index 0000000..6cbfdb4 --- /dev/null +++ b/system/modules/bbcode.php @@ -0,0 +1,94 @@ +\"\"
    "; + }else {$image_upload = "";} + + $add_id = (isset($_REQUEST['id'])) ? intval($_REQUEST['id']) : ''; + +$code = << +
    +
    +
    +
    +
    +
    +{$image_upload} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
      
    +
    +
    + + +HTML; + +} +else { + $startform = "comments"; + $addform = "document.getElementById( 'dle-comments-form' )"; + $add_id = false; + +$code = <<{text} +HTML; +} + +$bb_code = << + + +{$code} +HTML; +?> \ No newline at end of file diff --git a/system/modules/chat/addmess.php b/system/modules/chat/addmess.php new file mode 100644 index 0000000..f8cd744 --- /dev/null +++ b/system/modules/chat/addmess.php @@ -0,0 +1,45 @@ +safe_mode = true; +$_TIME = time()+($config['date_adjust']*60); + + if ($is_logged) {$name = $db->safesql($member_id['name']);} else {$CN_HALT = TRUE;} + + $_IP = $db->safesql($_SERVER['REMOTE_ADDR']); + $time = date ("Y-m-d H:i:s", $_TIME); + + $message = $db->safesql($parse->BB_Parse($parse->process($mcadd['message'])), false); + + if( strlen($message) > 3000) $CN_HALT = TRUE; + if ($message =='' OR $member_id['banned'] == "yes") $CN_HALT = TRUE; + + $message = preg_replace("#(^|\s|>)((http|https|ftp)://\w+[^\s\[\]\<]+)#i", '\\1URL', $message); + +//* + if(intval($chatconfig['auto_wrap'])){ + $message = preg_split('((>)|(<))', $message, -1, PREG_SPLIT_DELIM_CAPTURE); + $n = count($message); + + for ($i = 0; $i < $n; $i++) { + if ($message[$i] == "<") { + $i++; continue; + } + $message[$i] = preg_replace("#([^\s<>'\"/\.\\-\?&\n\r\%]{".intval($chatconfig['auto_wrap'])."})#i", "\\1
    ", $message[$i]); + } + $message = join("", $message); + } + $data['skin'] = strtolower($_REQUEST['skin']); +// + if ($CN_HALT) { + } else { + $db->query("INSERT INTO ".PREFIX."_chat (name, message, date, ip, `mgroup`, user_id) VALUES ('$name', '$message', '$time', '$_IP', '$member_id[user_group]', '$member_id[user_id]')"); + $cache->del('minichat'); +} +?> diff --git a/system/modules/chat/ajax.js b/system/modules/chat/ajax.js new file mode 100644 index 0000000..83a1878 --- /dev/null +++ b/system/modules/chat/ajax.js @@ -0,0 +1,280 @@ +var DMC_selField = "message"; +var DMC_fombj = document.getElementById( 'chat-form' ); + +function Chat_UserMenu(a, b, c, d, e, f) { + var g = new Array(); + g[0] = ''; + g[1] = '' + menu_profile + ''; + g[2] = '' + menu_send + ''; + if (c == '1' || c == '2') { + g[3] = '' + } + return g +} +function Chat_GastMenu(a, b, c, d, e) { + var f = new Array(); + f[0] = ''; + f[1] = '' + menu_send + ''; + if (b == '1' || b == '2') { + f[2] = '' + } + return f +} + +function Chat_MessDel(b) { + $.post(dle_root + "system/ajax/chat.php", { mdelete: b, refresh: 1, skin: dle_skin}, function(data){ + $("#chat").html(data); + }); +} +function Chat_Refresh() { + $.post(dle_root + "system/ajax/chat.php", { skin: dle_skin}, function(data){ + $("#chat").html(data); + }); +} +function Chat_QuoteName(a) { + document.getElementById('message').value += "[b]" + a + "[/b]:"; + $("#message").focus() +} +function Chat_AddSmile(a, b, c) { + document.getElementById(b).value += ":" + a + ":"; + $("#" + c).fadeOut("slow"); + $("#" + b).focus() +} +function Chat_Display(a, b) { + if ($("#" + a).css("display") === "none") { + $("#" + a).show(b) + } else { + $("#" + a).hide(b) + } +} +function AWclear(a, b) { + var c = a.value; + if (c == b) { + a.value = "" + } + $(a).attr('onblur', "if(this.value=='')this.value='" + b + "';") +} + +function SendMessage(){ + if($.trim(document.chat_form.message.value) == ''){ + alert(' !'); + return false; + }; + + var message = document.getElementById('message').value; + + $.post(dle_root + "system/ajax/chat.php", { message: message, skin: dle_skin}, function(data){ + $("#chat").html(data); + $('#message').attr('value', ''); + }); + return false; +}; + +//BBCOdes + +var uagent = navigator.userAgent.toLowerCase(); +var is_safari = ( (uagent.indexOf('safari') != -1) || (navigator.vendor == "Apple Computer, Inc.") ); +var is_ie = ( (uagent.indexOf('msie') != -1) && (!is_opera) && (!is_safari) && (!is_webtv) ); +var is_ie4 = ( (is_ie) && (uagent.indexOf("msie 4.") != -1) ); +var is_moz = (navigator.product == 'Gecko'); +var is_ns = ( (uagent.indexOf('compatible') == -1) && (uagent.indexOf('mozilla') != -1) && (!is_opera) && (!is_webtv) && (!is_safari) ); +var is_ns4 = ( (is_ns) && (parseInt(navigator.appVersion) == 4) ); +var is_opera = (uagent.indexOf('opera') != -1); +var is_kon = (uagent.indexOf('konqueror') != -1); +var is_webtv = (uagent.indexOf('webtv') != -1); + +var is_win = ( (uagent.indexOf("win") != -1) || (uagent.indexOf("16bit") !=- 1) ); +var is_mac = ( (uagent.indexOf("mac") != -1) || (navigator.vendor == "Apple Computer, Inc.") ); +var ua_vers = parseInt(navigator.appVersion); + +var b_open = 0; +var i_open = 0; +var u_open = 0; +var s_open = 0; +var quote_open = 0; +var code_open = 0; +var sql_open = 0; +var html_open = 0; +var left_open = 0; +var center_open = 0; +var right_open = 0; +var hide_open = 0; +var color_open = 0; +var ie_range_cache = ''; +var DMC_bbtags = new Array(); + +function DMC_stacksize(thearray) +{ + for (i = 0; i < thearray.length; i++ ) + { + if ( (thearray[i] == "") || (thearray[i] == null) || (thearray == 'undefined') ) + { + return i; + } + } + + return thearray.length; +}; + +function cstat() +{ + var c = DMC_stacksize(DMC_bbtags); + + if ( (c < 1) || (c == null) ) { + c = 0; + } + + if ( ! DMC_bbtags[0] ) { + c = 0; + } + + +}; + +function DMC_simpletag(thetag) +{ + var tagOpen = eval(thetag + "_open"); + + + if (tagOpen == 0) + { + if(DMC_doInsert("[" + thetag + "]", "[/" + thetag + "]", true)) + { + eval(thetag + "_open = 1"); + document.getElementById( 'b_' + thetag ).className = 'editor_buttoncl'; + + pushstack(DMC_bbtags, thetag); + cstat(); + + } + } + else + { + lastindex = 0; + + for (i = 0 ; i < DMC_bbtags.length; i++ ) + { + if ( DMC_bbtags[i] == thetag ) + { + lastindex = i; + } + } + + while (DMC_bbtags[lastindex]) + { + tagRemove = popstack(DMC_bbtags); + DMC_doInsert("[/" + tagRemove + "]", "", false); + + + if ( (tagRemove != 'font') && (tagRemove != 'size') ) + { + eval(tagRemove + "_open = 0"); + document.getElementById( 'b_' + tagRemove ).className = 'editor_button'; + } + } + + cstat(); + } + +}; + + + +function DMC_doInsert(ibTag, ibClsTag, isSingle) +{ + var isClose = false; + var obj_ta = eval('DMC_fombj.'+ DMC_selField); + + if ( (ua_vers >= 4) && is_ie && is_win) + { + if (obj_ta.isTextEdit) + { + obj_ta.focus(); + var sel = document.selection; + var rng = ie_range_cache ? ie_range_cache : sel.createRange(); + rng.colapse; + if((sel.type == "Text" || sel.type == "None") && rng != null) + { + if(ibClsTag != "" && rng.text.length > 0) + ibTag += rng.text + ibClsTag; + else if(isSingle) + ibTag += rng.text + ibClsTag; + + rng.text = ibTag; + } + } + else + { + obj_ta.value += ibTag + ibClsTag; + + } + rng.select(); + ie_range_cache = null; + + } + else if ( obj_ta.selectionEnd ) + { + var ss = obj_ta.selectionStart; + var st = obj_ta.scrollTop; + var es = obj_ta.selectionEnd; + + if (es <= 2) + { + es = obj_ta.textLength; + } + + var start = (obj_ta.value).substring(0, ss); + var middle = (obj_ta.value).substring(ss, es); + var end = (obj_ta.value).substring(es, obj_ta.textLength); + + if (obj_ta.selectionEnd - obj_ta.selectionStart > 0) + { + middle = ibTag + middle + ibClsTag; + } + else + { + middle = ibTag + middle + ibClsTag; + } + + obj_ta.value = start + middle + end; + + var cpos = ss + (middle.length); + + obj_ta.selectionStart = cpos; + obj_ta.selectionEnd = cpos; + obj_ta.scrollTop = st; + + + } + else + { + obj_ta.value += ibTag + ibClsTag; + } + + obj_ta.focus(); + return isClose; +}; + +function getOffsetTop(obj) +{ + var top = obj.offsetTop; + + while( (obj = obj.offsetParent) != null ) + { + top += obj.offsetTop; + } + + return top; +}; + +function getOffsetLeft(obj) +{ + var top = obj.offsetLeft; + + while( (obj = obj.offsetParent) != null ) + { + top += obj.offsetLeft; + } + + return top; +}; diff --git a/system/modules/chat/block.php b/system/modules/chat/block.php new file mode 100644 index 0000000..45994ee --- /dev/null +++ b/system/modules/chat/block.php @@ -0,0 +1,38 @@ +load_template('chat/block.tpl'); +$tpl->copy_template .= ' + +'; + + if ($is_logged){ + $tpl->set('[isloged]',""); + $tpl->set('[/isloged]',""); + $tpl->set_block("'\\[notloged\\].*?\\[/notloged\\]'si",""); + } else { + $tpl->set_block("'\\[isloged\\].*?\\[/isloged\\]'si",""); + $tpl->set('[notloged]',""); + $tpl->set('[/notloged]',""); + } + + $tpl->set('[historylink]',""); + $tpl->set('[/historylink]',""); + +$tpl->set('{chatmsg}', $chat->GetContent($chatconfig, $member_id, $config)); + +$tpl->copy_template = "
    ".$tpl->copy_template." +
    "; + +$tpl->compile('minichat'); +$tpl->clear(); + +return $tpl->result['minichat']; +?> \ No newline at end of file diff --git a/system/modules/chat/chat.class.php b/system/modules/chat/chat.class.php new file mode 100644 index 0000000..0266b92 --- /dev/null +++ b/system/modules/chat/chat.class.php @@ -0,0 +1,65 @@ +open('minichat')) $flag = true; + elseif(!$moder) $flag = false; + + if ($flag){ + $html = ""; + require_once SYSTEM_DIR.'/classes/parse.class.php'; + $parse = new ParseFilter(); + $parse->safe_mode = true; + + $result = $this->query("SELECT id, name as gast_name, message, date, ip, user_id, mgroup FROM ".PREFIX."_chat m ORDER BY date DESC LIMIT 0,".$chatconfig['limit'].""); + + if (!$moder){$m_group = 4;} + + $PHP_SELF = $config['http_home_url']; + while ($row = $this->get_row($result)){ + + $lang['mchat_mess'] = ""; + $row['date'] = strtotime($row['date']); + $row['name'] = stripslashes($row['gast_name']); + + $go_page = "href=\"".$config['http_home_url']."user/".urlencode($row['name'])."/\""; + + $go_page .= "onClick=\"return dropdownmenu(this, event, Chat_UserMenu('".htmlspecialchars($go_page)."', '".$row['user_id']."', ".$m_group.", '".$row['id']."', '".$row['name']."', '".$lang['mchat_mess']."'), '170px')\""; + + $color = $user_group[$row['mgroup']]['colour']; + + $author = "".$row['name'].""; + + $date = mcdate($chatconfig['timestamp'],$row['date']); + + $message = stripslashes($row['message']); + + $html .= "
    ".$author."
    ".$date."

    ".$message."
    "; + } + + $this->free(); + if (!$moder) $cache->save('minichat', $html); + } + else $html = $cache->open('minichat'); + return $html; + } + } +?> diff --git a/system/modules/chat/modules.php b/system/modules/chat/modules.php new file mode 100644 index 0000000..8a6a7ed --- /dev/null +++ b/system/modules/chat/modules.php @@ -0,0 +1,77 @@ +safe_mode = true; + +include(SYSTEM_DIR.'/data/chat.config.php'); +if ($action == "mess_del") { +$db->query("DELETE FROM " . PREFIX . "_chat WHERE id = '$id'"); +msgbox ($lang['all_info'], " . ..."); +} else { + +$tpl->load_template('chat/message.tpl'); +$limit = intval($chatconfig['messlimit']); +$sql_count = $db->super_query("SELECT COUNT(*) as count FROM " . PREFIX . "_chat"); +$count_all = $sql_count['count']; + + $page = intval( $_REQUEST['cstart'] ); + $total = intval( ( ( $count_all - 1 ) / $limit ) + 1 ); + if( $page <= 0 ) $page = 1; + if( $page > $total ) $page = $total; + $start = $page * $limit - $limit; + $i = $start; $s = 0; + +$result = $db->query("SELECT id, name as gast_name, message, date, ip, user_id, mgroup FROM " . PREFIX . "_chat ORDER BY date DESC LIMIT $start,".$limit); + +while($row = $db->get_array($result)){ $i++;$s++; +$row['date'] = strtotime($row['date']); + +$row['name'] = stripslashes($row['gast_name']); + + $tpl->set('{author}', "".$row['name'].""); + + if ($is_logged AND $member_id['user_group'] == '1') + $tpl->set('{ip}', "IP: {$row['ip']} ::"); + else + $tpl->set('{ip}', ''); + if ($config['comm_msort'] == "ASC") + $tpl->set('{mess-id}', $cstart+$i); + else + $tpl->set('{mess-id}', $comments_num-$cstart-$i+1); + +if (($is_logged AND ($member_id['user_id'] == $row['userid'] AND ($row['is_reg'] == 1) AND $user_group[$member_id['user_group']]['allow_editc'])) OR $user_group[$member_id['user_group']]['edit_allc']){ + $tpl->set('[mes-edit]',""); + $tpl->set('[/mes-edit]',""); + } else $tpl->set_block("'\\[mes-edit\\](.*?)\\[/mes-edit\\]'si",""); + +if ($is_logged AND (($member_id['user_id'] == $row['userid'] AND ($row['is_reg'] == 1) AND $user_group[$member_id['user_group']]['allow_delc'] AND ($row['date'] == $date_max['MAX(date)'])) OR $member_id['user_group'] == '1' OR $user_group[$member_id['user_group']]['del_allc'])){ + $tpl->set('[mes-del]',""); + $tpl->set('[/mes-del]',""); + } else $tpl->set_block("'\\[mes-del\\](.*?)\\[/mes-del\\]'si",""); + + $message = stripslashes($row['message']); + + if (date(Ymd, $row['date']) == date(Ymd, $_TIME)) { + + $tpl->set('{date}', $lang['time_heute'].langdate(", H:i", $row['date'])); + + } elseif (date(Ymd, $row['date']) == date(Ymd, ($_TIME - 86400))) { + + $tpl->set('{date}', $lang['time_gestern'].langdate(", H:i", $row['date'])); + + } else { + + $tpl->set('{date}', langdate($config['timestamp_comment'], $row['date'])); + + } +$tpl->set('{message}', $message); +$tpl->compile('content'); +} + +$nav = "/chat/history/page/{page}/"; +CreateNavigation( $nav, $page, $total ); +}; + +?> diff --git a/system/modules/comments-last.php b/system/modules/comments-last.php new file mode 100644 index 0000000..34973f2 --- /dev/null +++ b/system/modules/comments-last.php @@ -0,0 +1,37 @@ +open( "comments-last", $config['skin'] ); +if( ! $commentslast ) { + + $sql = $db->query( "SELECT + comments.id AS comment_id, comments.post_id, comments.autor, post.title, post.alt_name, post.comm_num, comments.date + FROM " . PREFIX . "_post AS post + RIGHT JOIN + (SELECT * + FROM " . PREFIX . "_comments AS c + WHERE 1=1 + ORDER BY c.date DESC) AS comments + ON post.id = comments.post_id AND post.approve=1 + GROUP BY post.id ORDER BY comments.date DESC LIMIT 0, 15"); + + while( $row = $db->get_row() ) { + if( strlen( $row['autor']) > 10 ) + $user = substr( $row['autor'], 0, 10 ); + else $user = $row['autor']; + if( strlen( $row['title']) > 15 ) + $title = substr( $row['title'], 0, 15 ) . "..."; + else $title = $row['title']; + + $autor = "" . $user . ""; + $full_link = $config['http_home_url'] . $row['post_id'] . "-" . $row['alt_name'] . ".html"; + $post = "" . stripslashes( $title ) . "" ; + + $lcomm .= "
  • {$row['comm_num']}{$autor} - {$post}
  • "; + } + $commentslast= "
      ".$lcomm."
    "; + + $db->free(); + $cache->save( "comments-last", $commentslast, $config['skin'] ); +} +?> \ No newline at end of file diff --git a/system/modules/favorites.php b/system/modules/favorites.php new file mode 100644 index 0000000..3b0e93b --- /dev/null +++ b/system/modules/favorites.php @@ -0,0 +1,75 @@ +:]]' AND "; + } else {$stop_list = "category IN ('" . implode( "','", $allow_list ) . "') AND ";} + } else + $stop_list = ""; +if( $user_group[$member_id['user_group']]['allow_short'] ) $stop_list = ""; + +if (isset ( $_SESSION['dle_sort_favorites'] )) $news_sort_by = $_SESSION['dle_sort_favorites']; else $news_sort_by = $config['news_sort']; +if (isset ( $_SESSION['dle_direction_favorites'] )) $news_direction_by = $_SESSION['dle_direction_favorites']; else $news_direction_by = $config['news_msort']; + +$sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post where {$stop_list}id in {$favorites}"; +$temp = $db->super_query($sql_count); +$posts = $temp['count']; + +if($posts){ + $page = intval( $cstart ); + $total = intval( ( ( $posts - 1 ) / $limit ) + 1 ); + if( $page <= 0 ) $page = 1; + if( $page > $total ) $page = $total; + $start = $page * $limit - $limit; + $i = $start; + + $sql_select = "SELECT id, autor, date, title, category, alt_name, comm_num, rating, news_read FROM " . PREFIX . "_post where {$stop_list}id in $favorites ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $start . "," . $limit; + $result = $db->query($sql_select); + $tpl->load_template('fav/news.tpl'); + + while($row = $db->get_row($result)){ + $i++; + if (strlen($row['title']) > $word) $title = stripcslashes(substr ($row['title'], 0, $word))." ..."; else $title = stripcslashes($row['title']); + $fav_arr = explode( ',', $member_id['favorites'] ); + if( ! in_array( $row['id'], $fav_arr ) or $config['allow_cache'] == "yes" ) $tpl->set( '{favorites}', "\"\"" ); + else $tpl->set( '{favorites}', "\"\"" ); + + $set = array( + '{category}' => "".$cat_info[$row['category']]['name']."", + '{date}' => date("d.m.Y",strtotime($row['date'])), + '{title}' => $title, + '{link}' => $config['http_home_url'].$row['id']."-".$row['alt_name'].".html", + '{id}' => $row['id'], + ); + + $tpl->set('', $set); + $tpl->compile('fileslist'); + } + $list = $tpl->result['fileslist']; + $tpl->load_template('fav/favorites.tpl'); + + $tpl->set('{list}', $list); + $tpl->set ( '{sort}', news_sort ( $do ) ); + + $tpl->compile('content'); + $tpl->clear(); + + $nav = "/favorites/page/{page}/"; + CreateNavigation( $nav, $page, $total ); +} else { + $tpl->load_template('info.tpl'); + $tpl->set('{error}', " ."); + $tpl->set('{title}', ""); + $tpl->compile('content'); + $tpl->clear(); +} +?> \ No newline at end of file diff --git a/system/modules/feedback.php b/system/modules/feedback.php new file mode 100644 index 0000000..f19fadb --- /dev/null +++ b/system/modules/feedback.php @@ -0,0 +1,124 @@ +safesql( strip_tags( $_POST['name'] ) ); + $not_allow_symbol = array ("\x22", "\x60", "\t", '\n', '\r', "\n", "\r", '\\', ",", "/", "", "#", ";", ":", "~", "[", "]", "{", "}", ")", "(", "*", "^", "%", "$", "<", ">", "?", "!", '"', "'" ); + $email = $db->safesql(trim( str_replace( $not_allow_symbol, '', strip_tags( stripslashes( $_POST['email'] ) ) ) ) ); + + $db->query( "SELECT name from " . USERPREFIX . "_users where LOWER(name) = '" . strtolower( $name ) . "' OR LOWER(email) = '" . strtolower( $email ) . "'" ); + + if( $db->num_rows() > 0 ) {$stop = $lang['news_err_7'];} + + $name = strip_tags( stripslashes( $_POST['name'] ) ); + } + + $subject = strip_tags( stripslashes( $_POST['subject'] ) ); + $message = stripslashes( $_POST['message'] ); + $recip = intval( $_POST['recip'] ); + + if( !$user_group[$member_id['user_group']]['allow_feed'] ) {$recipient = $db->super_query( "SELECT name, email, fullname FROM " . USERPREFIX . "_users WHERE user_id='" . $recip . "' AND user_group = '1'" ); + } else {$recipient = $db->super_query( "SELECT name, email, fullname FROM " . USERPREFIX . "_users WHERE user_id='" . $recip . "' AND allow_mail = '1'" );} + + if( empty( $recipient['fullname'] ) ) $recipient['fullname'] = $recipient['name']; + if (!$recipient['name']) $stop .= $lang['feed_err_8']; + + if( empty( $name ) OR strlen( $name ) > 100 ) {$stop .= $lang['feed_err_1'];} + if( empty( $email ) OR strlen($email) > 50 OR @count(explode("@", $email)) != 2) {$stop .= $lang['feed_err_2'];} + if( empty( $subject ) OR strlen($subject) > 200 ) {$stop .= $lang['feed_err_4'];} + if( empty( $message ) OR strlen($message) > 20000 ) {$stop .= $lang['feed_err_5'];} + + if( $_POST['sec_code'] != $_SESSION['sec_code_session'] OR ! $_SESSION['sec_code_session'] ) {$stop .= $lang['reg_err_19'];} + $_SESSION['sec_code_session'] = false; + + if( $stop ) {msgbox( $lang['all_err_1'], "$stop

    $lang[all_prev]" ); + } else { + include_once SYSTEM_DIR . '/classes/mail.class.php'; + $mail = new dle_mail( $config ); + + $row = $db->super_query( "SELECT template FROM " . PREFIX . "_email where name='feed_mail' LIMIT 0,1" ); + + $row['template'] = stripslashes( $row['template'] ); + $row['template'] = str_replace( "{%username_to%}", $recipient['fullname'], $row['template'] ); + $row['template'] = str_replace( "{%username_from%}", $name, $row['template'] ); + $row['template'] = str_replace( "{%text%}", $message, $row['template'] ); + $row['template'] = str_replace( "{%ip%}", $_SERVER['REMOTE_ADDR'], $row['template'] ); + + $mail->from = $email; + $mail->send( $recipient['email'], $subject, $row['template'] ); + + if( $mail->send_error ) msgbox( $lang['all_info'], $mail->smtp_msg ); + else msgbox( $lang['feed_ok_1'], "$lang[feed_ok_2] " . $recipient['name'] . " $lang[feed_ok_3] $lang[feed_ok_4]" ); + }} else { + if( ! $user_group[$member_id['user_group']]['allow_feed'] ) { + $group = 2; + $user = false; + if ($_GET['user']) { + $lang['feed_error'] = str_replace( '{group}', $user_group[$member_id['user_group']]['group_name'], $lang['feed_error'] ); + msgbox( $lang['all_info'], $lang['feed_error'] ); + }} else { + $user = intval( $_GET['user'] ); + $group = 3; + } + if( ! $user ) $db->query( "SELECT name, user_group, user_id FROM " . USERPREFIX . "_users WHERE user_group < '$group' AND allow_mail = '1' ORDER BY user_group" ); + else $db->query( "SELECT name, user_group, user_id FROM " . USERPREFIX . "_users WHERE user_id = '$user' AND allow_mail = '1'" ); + if( $db->num_rows() ) { + $empf = ""; + + $db->free(); + + $tpl->load_template( 'feedback.tpl' ); + + $path = parse_url( $config['http_home_url'] ); + $tpl->set( '{recipient}', $empf ); + $tpl->set( '{code}', "\"{$lang['sec_image']}\"" ); + + if( ! $is_logged ) { + $tpl->set( '[not-logged]', "" ); + $tpl->set( '[/not-logged]', "" ); + } else + $tpl->set_block( "'\\[not-logged\\](.*?)\\[/not-logged\\]'si", "" ); + + $tpl->copy_template = "
    \n" . $tpl->copy_template . " + +
    "; + + $tpl->copy_template .= << + + +HTML; + + $tpl->compile( 'content' ); + $tpl->clear(); + + } else { + msgbox( $lang['all_err_1'], $lang['feed_err_7'] ); + } + } + +?> \ No newline at end of file diff --git a/system/modules/fonts/eva.png b/system/modules/fonts/eva.png new file mode 100644 index 0000000000000000000000000000000000000000..87bc9f5789700331ffbb0eb961985c4cb24c2ea3 GIT binary patch literal 3062 zcmVKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_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Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}0003INkl+WTj{vV6MsT`P{u$Sgg^{Oopen('forum_show_last_' . $member_id['user_group']); + if (!$forum_table) + { + if ($forum_config['hide_forum']){$access_hide = "WHERE ". PREFIX ."_forum_forums.access_read regexp '[[:<:]](".$member_id['user_group'].")[[:>:]]'";} + else { $access_hide = ""; } + + $result = $db->query("SELECT topics.tid, topics.forum_id, topics.title, topics.author_topic, topics.last_poster_name, topics.post, topics.last_date, users.foto + FROM " . PREFIX . "_forum_topics as topics + LEFT JOIN ". PREFIX ."_users as users ON users.name = topics.last_poster_name + LEFT JOIN ". PREFIX ."_forum_forums ON topics.forum_id = ". PREFIX ."_forum_forums.id {$access_hide} + GROUP BY topics.last_date DESC LIMIT ".$forum_config['site_inpage'].""); + + while ($row = $db->get_row ($result)) + { + $author_topic = urlencode ($row['author_topic']); + $last_poster_name = urlencode ($row['last_poster_name']); + $row['last_date'] = strtotime($row['last_date']); + + if (date(Ymd, $row['last_date']) == date(Ymd, $_TIME)){ + $show_date = $lang['time_heute'].langdate(", H:i", $row['last_date']); + }elseif (date(Ymd, $row['last_date']) == date(Ymd, ($_TIME - 86400))){ + $show_date = $lang['time_gestern'].langdate(", H:i", $row['last_date']); + }else{$show_date = langdate($forum_config['timestamp'], $row['last_date']); + } + + if( $row['foto'] and (file_exists( ROOT_DIR . "/uploads/fotos/" . $row['foto'] )) ) $fotos = $config['http_home_url'] . "uploads/fotos/" . $row['foto']; + else $fotos = $config['http_home_url'] . "{THEME}/images/noavatar.png"; + $tpl->set('{foto}', $fotos); + + $tpl->load_template('forum_last_list.tpl'); + $tpl->set('{fl_forum}', "{$row['name']}"); + $tpl->set('{fl_topic}', "{$row['title']}"); + $tpl->set('{fl_post}', $row['post']); + //$tpl->set('{fl_views}', $row['views']); + //$tpl->set('{fl_author}', "{$row['author_topic']}"); + $tpl->set('{fl_last_date}', $show_date); + $tpl->set('{fl_last_poster}', "{$row['last_poster_name']}"); + + $tpl->compile('forum_last_list'); + $tpl->clear(); + } + + $tpl->load_template('forum_last.tpl'); + $tpl->set('{last_list}', $tpl->result["forum_last_list"]); + $tpl->compile('forum_table'); + $tpl->clear(); + $cache->save('forum_show_last_' . $member_id['user_group'], $tpl->result['forum_table']); + }else{ + $tpl->result['forum_table'] = $forum_table; + } +} + +?> \ No newline at end of file diff --git a/system/modules/functions.php b/system/modules/functions.php new file mode 100644 index 0000000..9e9b145 --- /dev/null +++ b/system/modules/functions.php @@ -0,0 +1,708 @@ + 'a', '' => 'b', '' => 'v', '' => 'g', '' => 'd', '' => 'e', '' => 'e', '' => 'zh', '' => 'z', '' => 'i', '' => 'y', '' => 'k', '' => 'l', '' => 'm', '' => 'n', '' => 'o', '' => 'p', '' => 'r', '' => 's', '' => 't', '' => 'u', '' => 'f', '' => 'h', '' => 'c', '' => 'ch', '' => 'sh', '' => 'sch', '' => '', '' => 'y', '' => '', '' => 'e', '' => 'yu', '' => 'ya', "" => "yi", "" => "ye", + '' => 'A', '' => 'B', '' => 'V', '' => 'G', '' => 'D', '' => 'E', '' => 'E', '' => 'Zh', '' => 'Z', '' => 'I', '' => 'Y', '' => 'K', '' => 'L', '' => 'M', '' => 'N', '' => 'O', '' => 'P', '' => 'R', '' => 'S', '' => 'T', '' => 'U', '' => 'F', '' => 'H', '' => 'C', '' => 'Ch', '' => 'Sh', '' => 'Sch', '' => '', '' => 'Y', '' => '', '' => 'E', '' => 'Yu', '' => 'Ya', "" => "yi", "" => "ye",); + } + + $var = trim( strip_tags( $var ) ); + $var = preg_replace( "/\s+/ms", "-", $var ); + $var = str_replace( "/", "-", $var ); + + $var = strtr($var, $langtranslit); + + if( $punkt ) {$var = preg_replace( "/[^a-z0-9\_\-.]+/mi", "", $var );}else{$var = preg_replace( "/[^a-z0-9\_\-]+/mi", "", $var );} + + $var = preg_replace( '#[\-]+#i', '-', $var ); + + if( $lower ) {$var = strtolower( $var );} + + $var = str_ireplace( ".php", "", $var ); + $var = str_ireplace( ".php", ".ppp", $var ); + + if( strlen( $var ) > 50 ) { + $var = substr( $var, 0, 50 ); + if( ($temp_max = strrpos( $var, '-' )) ) $var = substr( $var, 0, $temp_max ); + } + return $var; +} + +function langdate($format, $stamp) { + global $langdate; + return strtr( @date( $format, $stamp ), $langdate ); +} + +function mcdate($format, $stamp) { + global $langdate, $config; + $today = strtotime(date("Y-m-d.", time()+ ($config['date_adjust']*60))); + if ($stamp > $today) return "" . date ("H:i:s", $stamp); + elseif ($stamp > ($today - 86400)) return "". date ("H:i:s", $stamp); + else return strtr(date($format, $stamp), $langdate); +} + +function msgbox($title, $text) { + global $tpl; + $tpl_2 = new dle_template( ); + $tpl_2->dir = TEMPLATE_DIR; + $tpl_2->load_template( 'info.tpl' ); + $tpl_2->set( '{error}', $text ); + $tpl_2->set( '{title}', $title ); + $tpl_2->compile( 'info' ); + $tpl_2->clear(); + $tpl->result['info'] .= $tpl_2->result['info']; +} + +function ShortRating($id, $rating, $allow = true) { + global $config, $lang; + + if ($rating) $rating = round($rating, 0); else $rating = 0; +if ($rating > 0) $rating = "".$rating.""; elseif ($rating == 0) $rating="".$rating.""; else $rating = "".$rating.""; + + if (!$allow) { + $rated = << +  (-) + {$rating} + (+) + +HTML; + return $rated; +} + +$rated = ""; +$rated .= << + +  (-) + + {$rating} + + (+) + + +HTML; + +$rated .= ""; + return $rated; +} + +function CommRating ($id, $commrating, $allow = true){ +global $is_logged, $member_id, $config, $lang, $db; + +if ($commrating) $commrating = round($commrating, 0); else $commrating = 0; + +switch($commrating) { +case ($commrating >= 0): +$commrating = '+'.$commrating.''; +break; +case ($commrating <= 0): +$commrating = ''.$commrating.''; +break; +case($commrating == 0): +$commrating = ''.$commrating.''; +break; +} +if (!$allow) { + +$commrated = << + +{$commrating} + + +HTML; + +return $commrated; +} + +$commrated .= << + +{$commrating} + + +HTML; + +return $commrated; +} + +function CategoryNewsSelection($categoryid = 0, $parentid = 0, $nocat = TRUE, $sublevelmarker = '', $returnstring = '') { + global $cat_info, $user_group, $member_id; + + $allow_list = explode( ',', $user_group[$member_id['user_group']]['allow_cats'] ); + $spec_list = explode( ',', $user_group[$member_id['user_group']]['cat_add'] ); + + $root_category = array (); + + if( $parentid == 0 ) {if( $nocat ) $returnstring .= ''; + } else {$sublevelmarker .= '   ';} + + if( count( $cat_info ) ) { + + foreach ( $cat_info as $cats ) {if( $cats['parentid'] == $parentid ) $root_category[] = $cats['id'];} + + if( count( $root_category ) ) { + foreach ( $root_category as $id ) { + + if( $allow_list[0] == "all" or in_array( $id, $allow_list ) ) { + + if( $spec_list[0] == "all" or in_array( $id, $spec_list ) ) $color = "black"; else $color = "red"; + + $returnstring .= "