function awc_admin_lang_cls($action = '') { global $wgRequest, $wgOut; $this->lang_code = $wgRequest->getVal('lang_code'); $this->lang_txt = $wgRequest->getVal('lang_txt'); Set_AWC_Forum_BreadCrumbs(get_awcsforum_word('admin_get_lang')); $spl = explode("/", $action); $todo = isset($spl[1]) ? str_replace("todo_", "", $spl[2]) : $wgRequest->getVal('what'); # die($todo); switch ($todo) { case 'do_raw_lang': $this->do_raw_lang(); break; case 'display_lang_options': $this->display_lang_options(); break; case 'get_edit_lang': $this->get_edit_lang(); break; case 'update_lang_file': $this->lang_update_lang_file(); $info['msg'] = 'lang_file_has_been_updated'; $info['url'] = awc_url . "admin/awc_lang/display_lang_options"; return awcf_redirect($info); #$wgOut->redirect( awc_url . "admin/awc_lang/display_lang_options" ); break; case 'export_lang': $this->lang_do_export_lang(); $wgOut->redirect(awc_url . "admin/awc_lang/download_lang_file/"); break; case 'import_lang': $this->lang_do_import_lang(); awcsforum_funcs::get_page_lang(array('lang_txt_redirects')); // get lang difinitions... $info['msg'] = 'lang_file_has_been_imported'; $info['url'] = awc_url . "admin/awc_lang/display_lang_options"; return awcf_redirect($info); break; case 'add_new_lang': $this->lang_add_new_lang($wgRequest->getVal('lang_code')); #$wgOut->redirect( awc_url . "admin/awc_lang/get_awclangfile" ); break; case 'save_lang_file': $this->lang_save_lang_file(); break; case 'download_lang_file': $this->lang_download_lang_file(); break; case 'do_delete_lang': $this->lang_do_delete(); $wgOut->redirect(awc_url . "admin/awc_lang/get_awclangfile"); break; case 'delete_lang_export_file': // $this->lang_delete_lang_export_file($wgRequest->getVal('todo')); $this->lang_delete_lang_export_file($spl[3]); $wgOut->redirect(awc_url . "admin/awc_lang/download_lang_file"); break; } }
/** * Enter Admin, choose what to do in SWITCH * * URL command lines<br /> * Special:AWCforum/admin/threads_to_wiki<br /> * Special:AWCforum/admin/wfInitStats (runs wiki /maintenance/initStats.inc)<br /> * Special:AWCforum/admin/re_forum_stats<br /> * Special:AWCforum/admin/user_recount_all<br /> * @parameter string $action * @uses awc_admin_skin * @since Version 2.5.8 */ function enterAdmin($action) { global $wgRequest, $ADskin, $awc, $wgOut, $awc_admin_lang, $wgUser, $WhoWhere, $action_url, $awc_ver; $WhoWhere['type'] = 'forum'; $WhoWhere['where'] = 'admin||awc-split||admin'; require_once awc_dir . 'dBase.php'; require awc_dir . 'includes/admin/admin_funk.php'; require awc_dir . 'skins/admin_skin.php'; $ADskin = new awc_admin_skin(); if (version_compare(awcs_forum_ver_current, awcs_forum_ver, '=')) { Set_AWC_Forum_SubTitle(get_awcsforum_word('admin_setPagetitle'), get_awcsforum_word('admin_setSubtitle')); Set_AWC_Forum_BreadCrumbs('<a href="' . awc_url . 'admin' . '">' . get_awcsforum_word('admin_word') . '</a>'); } $spl = explode("/", $action); $todo = isset($spl[1]) ? str_replace("todo_", "", $spl[1]) : $wgRequest->getVal('todo'); $id = isset($spl[2]) ? str_replace("id", "", $spl[2]) : $wgRequest->getVal('id'); $move_id = $wgRequest->getVal('move_id'); define('what_page', $todo); switch ($todo) { // url commands case 'threads_to_wiki': if (!in_array('bureaucrat', $wgUser->getGroups())) { die("need to be a bureaucrat"); } if (!isset($spl[2]) or !is_numeric($spl[2])) { return $wgOut->addHTML("<br><br><center>Need a count-number<br><br>"); } self::threads_to_wiki($spl[2]); break; case 'wfInitStats': if (!in_array('bureaucrat', $wgUser->getGroups())) { die("need to be a bureaucrat"); } global $IP; require $IP . '/maintenance/initStats.inc'; wfInitStats(); break; case 'dev': if (!in_array('bureaucrat', $wgUser->getGroups())) { die("need to be a bureaucrat"); } require awc_dir . 'includes/admin/admin_dev.php'; return awcs_forum_dev_func(); break; case 're_forum_stats': if (!in_array('bureaucrat', $wgUser->getGroups())) { die("need to be a bureaucrat"); } return self::re_forum_stats(); break; case 'user_recount_all': if (!in_array('bureaucrat', $wgUser->getGroups())) { die("need to be a bureaucrat"); } self::user_recount_all(); break; // END url commands.. // END url commands.. case 'tplt': require awc_dir . 'includes/admin/admin_tplt.php'; awcs_forum_admin_tplt($action); break; case 'theme': require awc_dir . 'includes/admin/admin_theme.php'; awcsforum_admin_theme_func(); break; case 'awc_lang': require awc_dir . 'includes/admin/admin_lang_funk.php'; $awc_lang_class = new awc_admin_lang_cls($action); unset($awc_lang_class); #$awc_lang_class->awc_admin_lang_cls(); break; case 'css': require awc_dir . 'includes/admin/admin_css_funk.php'; awcs_forum_admin_css($action); break; case 'cat': require awc_dir . 'includes/admin/admin_cat.php'; awcsf_admin_categories_func(); break; case 'forum': require awc_dir . 'includes/admin/admin_forum.php'; awcsf_admin_forum_func(); break; case 'mem_title': require awc_dir . 'includes/admin/admin_memtitle.php'; awcsf_admin_membertitle_func(); break; case 'maintenance': self::get_maintenance(); break; case 'do_prune': if (in_array('bureaucrat', $wgUser->getGroups())) { $this->do_prune(); } break; case 'do_Trecount': self::do_Trecount(); break; case 'do_Precount': self::do_Precount(); break; case 'config_forum': self::do_config_forum(); break; case 'admin_get_config': self::do_get_config($id); break; case 'mem_lookup': awcsforum_funcs::get_page_lang(array('lang_txt_mem')); self::mem_lookup(); break; case 'save_sig': case 'CheckAvatraSize': case 'miscusersettings': self::save_userinfo($todo); break; case 'user_recount': self::user_recount(); break; case 'delete_file': self::delete_file($wgRequest->getVal('todo')); break; case 'get_updates': self::get_updates(); break; case 'forum_update': self::forum_update(); break; case 'forum_autoupdate': self::forum_autoupdate(); break; case 'get_autoupdate': self::get_autoupdate(); break; case 'autoupdate_unpack_and_update': self::autoupdate_unpack_and_update(); break; case 'get_emotions': self::emotions_get(); break; case 'edit_emotions': self::emotions_edit(); break; case 'add_emotions': self::emotions_add(); break; default: self::main(); break; } }
awcs_forum_tplt_disaply_post(); awcs_forum_tplt_post_box(); $tplt->add_tplts(array("'thread_list_header'", "'thread_list_rows'", "'bottom_page_jumps'", "'top_page_jumps'", "'bottom_blocks'", "'top_blocks'", "'thread_list_header_menu'", "'forum:start_new_thread'", "'forum:subscrib_to_forum'", "'postblocks_threadlisting'", "'col_5_isSearch_forum_name'", "'close_table'")); $tplt->add_tplts(array("'subscrib_links'", "'options_dropdown'", "'top_page_jumps'", "'bottom_page_jumps'", "'thread_header'", "'top_blocks'", "'bottom_blocks'", "'mod_thread_dropdown'", "'mod_thread_dropdown_ann'", "'post_date_link'", "'close_table'")); break; case 'todo_new_t': awcs_forum_tplt_post_box(); break; case 'sub': case 'submit_poll': case 'create_cat_do': case 'fsub': case 'close_poll': case 'delete_poll': case 'reopen_poll': awcsforum_funcs::get_page_lang(array('lang_txt_redirects')); // get lang difinitions... $tplt->add_tplts(array("'redirect'", "'close_table'"), true); break; case 'todo_add_thread': case 'todo_add_post': // need a preview check... awcs_forum_tplt_disaply_post(); awcs_forum_tplt_post_box(); $tplt->add_tplts(array("'redirect'", "'close_table'")); break; case 'edithistory': // need a preview check... awcs_forum_tplt_disaply_post(); break; }
function load_awcs_forum() { # $START = processing_time(); // Used for testing speed... $RESULT at bottom... global $wgRequest, $wgOut, $wgScriptPath; global $awc, $awcUser, $awc_tables, $awc_ver, $ForumStat, $awcs_forum_config, $WhoWhere, $action_url, $tplt; global $awc_url, $wiki_url, $style_path, $button_path, $awc__url; require_once awc_dir . "includes/funcs.php"; require_once awc_dir . "includes/gen_funk.php"; require_once awc_dir . "includes/gen_class.php"; // awcs_forum_config, awcs_forum_user, awcs_forum_stats, $WhoWhere = null; define('awc_path', $wgScriptPath . awcForumPath); define('emo_path', awc_path . 'images/emotions/default/'); define('button_path', awc_path . 'images/buttons/default/'); $style_path = awc_path . 'skins/'; // used in awcs_forum_skin_templetes::phase() for "find and replace" $button_path = button_path; // used in awcs_forum_skin_templetes::phase() for "find and replace" $wiki_url = awcsf_wiki_url; // used in awcs_forum_skin_templetes::phase() for "find and replace" $awc_url = awc_url; // used in awcs_forum_skin_templetes::phase() function for "find and replace" $awc__url = $awc_url; if (!isset($awcUser)) { $awcUser = new awcs_forum_user(); } $wgRequest->action = null; $clean_todo = null; $clean_todo_arr = $wgRequest->getVal('title'); $clean_todo_arr = rawurldecode($clean_todo_arr); $clean_todo_arr = explode('/', $clean_todo_arr); if (isset($clean_todo_arr[1]) and (!isset($_GET['action']) or !isset($_POST['action']))) { $count_to = count($clean_todo_arr) - 1; for ($i = 1; $i <= $count_to; ++$i) { $clean_todo .= $clean_todo_arr[$i] . "/"; } $wgRequest->action = $clean_todo; } $action = $wgRequest->getVal('action'); if ($action == null) { $action = $clean_todo; } else { $action = str_replace('%2F', '/', $action); $wgRequest->action = $action; } $action_spl = explode("/", $action); #$todo = $action_spl[0]; $action_url = array(); $action_url['all'] = $action; $action_url['what_file'] = $action_spl[0]; if (isset($action_spl[1])) { if (strstr($action_spl[1], "id")) { $action_url['id'] = str_replace(array('_', 'id', 'id_'), '', $action_spl[1]); } else { $action_url['section'] = $action_spl[1]; $action_url['id'] = $wgRequest->getVal('id'); } } else { $action_url['id'] = $wgRequest->getVal('id'); } if (isset($action_spl[2])) { $action_url['todo'] = $action_spl[2]; } foreach ($action_spl as $act) { if (strstr($act, "id_")) { $action_url['id'] = str_replace(array('_', 'id', 'id_'), '', $act); } else { $action_url[] = $act; } } if ($wgRequest->action == "install_forum" and in_array('sysop', $awcUser->mGroups)) { require awc_dir . "updates/install/install_forum.php"; return; } if (!isset($awcs_forum_config)) { $awcs_forum_config = new awcs_forum_config(); // gen_class.php } if ($awcs_forum_config->get_config() === false) { $out = $awcs_forum_config->get_install(); $wgOut->addHTML($out); return; } # die("k,h"); // Note: // This needs to be after the awcs_forum_config() // for some reason the unserialize() gets messed with the default CSS and cant read it correctly if (awcs_forum_convert_latin) { $dbw = wfGetDB(DB_MASTER); $dbw->query("SET NAMES latin1"); unset($dbw); } /* // Check to see if forum is installed by checking of the Dbase config table is there... if(!$awcs_forum_config->installed){ $out = $awcs_forum_config->get_install() ; $wgOut->addHTML($out); return ; } */ // ckeck forum version... if (version_compare(awcs_forum_ver_current, awcs_forum_ver, '<')) { global $wgRequest; if (!strstr($wgRequest->action, "admin/forum_update") and !strstr($wgRequest->action, "admin/get_updates")) { if (!in_array('sysop', $awcUser->mGroups)) { awcs_forum_wfLoadExtensionMessages('AWCforum_genral_forum'); $wgOut->addHTML("<center>" . wfMsg('awcsf_updating') . "<br /> <b>" . wfMsg('awcsf_sysops_login') . "</b></center>"); return; } die(header('Location: ' . awc_url . 'admin/forum_update')); } } if (isset($awcs_forum_config->cf_header_import) and !empty($awcs_forum_config->cf_header_import)) { $header = awc_wikipase($awcs_forum_config->cf_header_import, $wgOut); $wgOut->addHTML($header); } // load this after config_config require awc_dir . "includes/load/load_skin_tplts.php"; if (!isset($tplt)) { require awc_dir . 'admin.php'; awcsforum_funcs::get_table_names(array('awc_f_cats'), true); // Get all the forums d-base table names, check for table pre-fix awcsforum_funcs::get_page_lang(array('lang_txt_forum', 'lang_txt_search', 'lang_txt_admin')); // get lang difinitions... $admin = new awcforum_forumAdmin(); $admin->enterAdmin($action); return; } // load lang difinistions and get sql table names switch ($action_url['what_file']) { case 'search': require awc_dir . 'search.php'; awcsforum_funcs::get_table_names(array('awc_f_threads', 'awc_f_posts', 'awc_f_forums', 'awc_f_cats')); // Get all the forums d-base table names, check for table pre-fix awcsforum_funcs::get_page_lang(array('lang_txt_forum', 'lang_txt_search')); // get lang difinitions... break; case 'post': require awc_dir . 'post.php'; awcsforum_funcs::get_table_names(array('awc_f_polls', 'awc_f_posts', 'awc_f_forums', 'awc_f_threads', 'awc_f_watchthreads', 'awc_f_watchforums')); // Get all the forums d-base table names, check for table pre-fix awcsforum_funcs::get_page_lang(array('lang_txt_forum', 'lang_txt_search', 'lang_txt_thread', 'lang_txt_redirects')); // get lang difinitions... break; case 'st': case 'sp': case 'last_post': case 'delete_post': case 'delete_thread': require awc_dir . 'thread.php'; awcsforum_funcs::get_table_names(array('awc_f_posts', 'awc_f_threads', 'awc_f_polls', 'awc_f_forums', 'awc_f_member_titles', 'awc_f_cats')); // Get all the forums d-base table names, check for table pre-fix awcsforum_funcs::get_page_lang(array('lang_txt_forum', 'lang_txt_search', 'lang_txt_thread')); // get lang difinitions... break; case 'member_options': require awc_dir . 'members.php'; awcsforum_funcs::get_table_names(array('awc_f_watchthreads', 'awc_f_watchforums', 'awc_f_threads', 'awc_f_pms_info', 'awc_f_pms', 'awc_f_mems', 'awc_f_threads')); // Get all the forums d-base table names, check for table pre-fix awcsforum_funcs::get_page_lang(array('lang_txt_forum', 'lang_txt_search', 'lang_txt_mem', 'lang_txt_redirects')); // get lang difinitions... break; case 'admin': require awc_dir . 'admin.php'; awcsforum_funcs::get_table_names(array('awc_f_cats'), true); // Get all the forums d-base table names, check for table pre-fix awcsforum_funcs::get_page_lang(array('lang_txt_forum', 'lang_txt_search', 'lang_txt_admin', 'lang_txt_redirects')); // get lang difinitions... break; case 'pm': require awc_dir . 'pm.php'; awcsforum_funcs::get_table_names(array('awc_f_mems')); // Get all the forums d-base table names, check for table pre-fix awcsforum_funcs::get_page_lang(array('lang_txt_forum', 'lang_txt_search', 'lang_txt_mem')); // get lang difinitions... break; case 'mem_profile': case 'credits': case 'whoshere': require awc_dir . 'misc.php'; awcsforum_funcs::get_table_names(array('awc_f_langs', 'awc_f_sessions')); // Get all the forums d-base table names, check for table pre-fix awcsforum_funcs::get_page_lang(array('lang_txt_forum', 'lang_txt_search', 'lang_txt_mem')); // get lang difinitions... break; case 'mod': awcsforum_funcs::get_page_lang(array('lang_txt_forum', 'lang_txt_search', 'lang_txt_thread', 'lang_txt_redirects')); // get lang difinitions... break; case 'sc': case 'sf': case 'subf': default: require awc_dir . 'forum.php'; awcsforum_funcs::get_table_names(array('awc_f_cats', 'awc_f_forums', 'awc_f_anns', 'awc_f_threads')); // Get all the forums d-base table names, check for table pre-fix awcsforum_funcs::get_page_lang(array('lang_txt_forum', 'lang_txt_search')); // get lang difinitions... break; } $awcs_forum_config->ver = isset($awcs_forum_config->cf_forumversion) ? $awcs_forum_config->cf_forumversion : '2.x.x'; $awcs_forum_config->ver = str_replace('.', '', $awcs_forum_config->ver); // need a check, some servers will drop the last zero from the version, version needs to be three digets #strlen($awc_ver) == 2 ? $awc_ver = $awc_ver . '0' : $awc_ver = $awc_ver ; $awcs_forum_config->ver = !isset($awcs_forum_config->ver[2]) ? $awcs_forum_config->ver . '0' : $awcs_forum_config->ver; $awc_ver = $awcs_forum_config->ver; $info['url'] = awc_url; // Need a check here for Admin Setting.... if (isset($awcs_forum_config->cf_use_forum_stats) and $awcs_forum_config->cf_use_forum_stats == '1') { $ForumStat = new awcs_forum_stats(); $ForumStat->get_stats(); } // need to do something here.... // PM check, display pop-up or not, set MemCP text for top menu if ($awcUser->mId != '0') { $awcUser->get_mem_forum_options(); // set if (isset($awcUser->m_pmunread)) { $info['user_title'] = $awcUser->m_pmunread == 0 || $awcUser->m_pmunread == '' ? get_awcsforum_word('word_MemOpts') . '' : get_awcsforum_word('word_MemOpts') . ' <b>' . $awcUser->m_pmunread . '</b> ' . get_awcsforum_word('word_unreadpms'); $pms = $awcUser->m_pmunread . ' ' . get_awcsforum_word('word_unreadpms'); } else { $info['user_title'] = get_awcsforum_word('word_MemOpts'); $pms = ''; } $info['user_name'] = urlencode($awcUser->mName) . '/' . $awcUser->mId; $word['word_recent_posts'] = get_awcsforum_word('word_recent_posts'); $word['word_gotomempc'] = get_awcsforum_word('word_gotomempc'); $word['word_gotopms'] = get_awcsforum_word('word_gotopms'); $word['word_gotosig'] = get_awcsforum_word('word_gotosig'); $word['word_gotoavatar'] = get_awcsforum_word('word_gotoavatar'); $word['word_subscribe_email'] = get_awcsforum_word('word_subscribe_email'); $word['word_subscribe_memcp'] = get_awcsforum_word('word_subscribe_memcp'); $word['word_threads'] = get_awcsforum_word('word_threads'); $word['word_posts'] = get_awcsforum_word('word_posts'); $word['word_MemClearIndicators'] = get_awcsforum_word('word_MemClearIndicators'); $info['mem_links'] = $tplt->phase($word, $info, 'top_menu_user_links'); } else { $pms = ''; $mem_title = null; $info['mem_links'] = null; } $tplt->kill('top_menu_user_links'); $awcs_forum_config->get_css(); //$wgOut->addScript('<script type="text/javascript" src="'. awc_path . 'awc.js"></script>'); $wgOut->mScripts .= '<script type="text/javascript" src="' . awc_path . 'awc.js"></script>'; if (UserPerm == 10) { $word['word_AdminCP'] = get_awcsforum_word('word_AdminCP'); $word['word_AdminCP'] = strlen($word['word_AdminCP']) < 2 ? "Admin Control Panel" : $word['word_AdminCP']; $info['admin_link'] = $tplt->phase($word, '', 'top_menu_admin_link'); } else { $info['admin_link'] = null; } $tplt->kill('top_menu_admin_link'); if (CanSearch()) { $word['search'] = get_awcsforum_word('search_search'); $info['search_link'] = $tplt->phase($word, '', 'top_menu_search_link'); } else { $info['search_link'] = null; } $tplt->kill('top_menu_search_link'); $word['word_todays_posts'] = get_awcsforum_word('word_todays_posts'); $info['todays_posts'] = $tplt->phase($word, '', 'top_menu_todays_posts_link', true); $word['word_credits'] = get_awcsforum_word('word_credits'); $top_menu_links = $tplt->phase($word, $info, 'top_menu_top', true); $wgOut->addHTML($top_menu_links); if ($awcUser->mId != '0') { if (isset($awcUser->m_pmpop) and isset($awcUser->m_pmoptions['m_pmpop'])) { if ($awcUser->m_pmpop == '1' and $awcUser->m_pmoptions['m_pmpop'] == '1' and $action_url['what_file'] != 'member_options') { $wgOut->addHTML('<script type= "text/javascript"> alert("' . get_awcsforum_word('word_newpm') . '"); </script>'); } } } # $wgOut->addHTML('<hr>'); global $wgSitename; $awcs_forum_config->forum_name = !empty($awcs_forum_config->cf__forumname) ? str_replace('|$|', ' ' . $wgSitename . ' ', $awcs_forum_config->cf__forumname) : $wgSitename . ' ' . get_awcsforum_word('word_forum'); $awcs_forum_config->forum_subtitle = isset($awcs_forum_config->cf__forumsubtitle) ? $awcs_forum_config->cf__forumsubtitle : ''; if (!$awcUser->canRead and $action_url['what_file'] != 'credits') { global $wgSitename; $Tforum_name = str_replace('|$|', ' ' . $wgSitename . ' ', $awcs_forum_config->cf__forumname); Set_AWC_Forum_SubTitle($awcs_forum_config->forum_name, $awcs_forum_config->forum_name); $wgOut->loginToUse(); get_awcsforum_word('word_standalongforumextension') == '' ? $awc_info = 'Stand Alone Forum Extension' : ($awc_info = get_awcsforum_word('word_standalongforumextension')); $wgOut->addHTML("\r" . '<br /><hr><center> <a href="http://wiki.anotherwebcom.com" target="_blank" title="PHP, Visual Basic scripts and programs">AWC\'s</a>: <b>' . $awcs_forum_config->cf_forumversion . '</b> MediaWiki - ' . $awc_info . '</center>' . "\r"); return; } # switch ($action_url['what_file']) { case 'mod': require awc_dir . 'includes/mod_post.php'; awcs_forum_mod_options(); break; case 'whoshere': //$WhoWhere = 'whoshere' ; $WhoWhere['type'] = 'forum'; $WhoWhere['where'] = 'whoshere||awc-split||whoshere'; $whoshere = new awcforum_misc(); $whoshere->whoshere(); break; case 'search': awcs_forum_search(); #$search = new awcforum_search(); #$search->enter_search($action); break; case 'post': awcs_forum_post(); #$post=new awcsforum_post_cls(); #$post->enter_post($action); break; case 'st': case 'sp': case 'last_post': case 'delete_post': case 'delete_thread': awcs_forum_threads($action); break; case 'member_options': awcs_forum_members($action); break; case 'admin': $admin = new awcforum_forumAdmin(); $admin->enterAdmin($action); break; case 'pm': $pm = new awcforum_pm(); $pm->enter_pm($action); break; case 'mem_profile': case 'credits': $pm = new awcforum_misc(); $pm->enter_misc($action); break; case 'feed': //awc_pdie($action_url); $title = str_replace('feed/', '', $action_url['all']); $rss = new FeedItem($title, 'Description', awc_url . $title); awc_pdie($rss); break; case 'sc': case 'sf': case 'subf': case 'fpw': default: awcs_forum_listing(); break; } $awc_info = get_awcsforum_word('word_standalongforumextension') == '' ? 'Stand Alone Forum Extension' : get_awcsforum_word('word_standalongforumextension'); // admin check needed if (isset($awcs_forum_config->cf_show_whoes_here) and $awcs_forum_config->cf_show_whoes_here == '1') { $whos_here = new awcs_forum_whos_here(); $whos_here->load_ses($action); $word = array('word_forum_stats_whos_here' => get_awcsforum_word('word_forum_stats_whos_here'), 'members' => get_awcsforum_word('word_members'), 'guests' => get_awcsforum_word('word_guests'), 'word_forum_stats_bots' => get_awcsforum_word('word_forum_stats_bots')); $info['names'] = substr($whos_here->whos_here['names'], 0, -2); $info['num_mems'] = $whos_here->whos_here['mems']; $info['num_guests'] = $whos_here->whos_here['guests']; $info['num_bots'] = $whos_here->whos_here['bots']; $footer_whoshere = $tplt->phase($word, $info, 'footer_whoshere', true); $wgOut->addHTML($footer_whoshere); unset($word, $info); } #require(awc_dir . 'dBase.php'); #$dBase = new awcforum_cls_dBase(); # die("done"); /* * top poster, replier, most posts in thread, most viewed thrread. */ global $css_ver_info; if ($css_ver_info != null) { $css_ver_info = get_awcsforum_word('word_css_style_by') . " {$css_ver_info}"; } // Read the top please... http://google.com/search?q=Special:AWCforum will bring up your site sooner or later... $wgOut->addHTML('<br /><hr> <center> <a href="http://wiki.anotherwebcom.com" target="_blank" title="PHP, Visual Basic scripts and programs">AWC\'s</a>: <b>' . $awcs_forum_config->cf_forumversion . '</b> MediaWiki - ' . $awc_info . '<br />' . $css_ver_info . '</center>'); $wgOut->setRobotpolicy($awcs_forum_config->cf_setRobotpolicy); if (isset($ForumStat)) { $ForumStat->doUpdate(); } if ($awcUser->mId != '0') { $now = awcsforum_funcs::wikidate(wfTimestampNow()); if (isset($awcs_forum_config->cf_save_recent_in_dabase) and $awcs_forum_config->cf_save_recent_in_dabase == '1') { $dbw = wfGetDB(DB_MASTER); $dbw->update('awc_f_mems', array('m_lasttouch' => wfTimestampNow(), 'm_lasthere' => $now), array('m_id' => $awcUser->mId), ''); } else { global $wgCookieExpiration, $wgCookiePath, $wgCookieDomain; $exp = time() + $wgCookieExpiration; setcookie('awc_startTime', $now, $exp, $wgCookiePath, $wgCookieDomain); } } # $wgOut->setSubtitle( 'Time Test: ' . processing_time($START) . ' Memory Peek= ' . memory_get_peak_usage(true) . ' memory_get_usage= ' . memory_get_usage() ) ; # testing }
function clearIndicators() { global $wgOut, $tplt; awcsforum_funcs::clear_session(); awcsforum_funcs::clear_awcsforum_cookie(); awcsforum_funcs::set_session(wfTimestampNow()); awcsforum_funcs::get_page_lang(array('lang_txt_redirects')); // get lang difinitions... $tplt->add_tplts(array("'redirect'"), true); $info['msg'] = 'clearIndicators'; $info['url'] = $_SERVER['HTTP_REFERER']; return awcf_redirect($info); // member_options/clearIndicators // $wgOut->redirect( $_SERVER['HTTP_REFERER']); }
function splitmerge_get($id) { global $wgOut, $tplt, $awc_tables; if (UserPerm < 2) { return $wgOut->loginToUse(); } $id = $id[0]; awcsforum_funcs::get_page_lang(array('lang_txt_thread')); // get lang difinitions... Set_AWC_Forum_SubTitle(get_awcsforum_word('word_split_merge'), ''); Set_AWC_Forum_BreadCrumbs(get_awcsforum_word('word_split_merge'), true); $dbr = wfGetDB(DB_SLAVE); $r = $dbr->selectRow('awc_f_posts', array('p_title'), "p_id={$id}", __METHOD__, array('OFFSET' => 0, 'LIMIT' => 1)); $title = $r->p_title; unset($r); $sql = "SELECT f_id, f_name FROM {$awc_tables['awc_f_forums']} WHERE f_perm <= '" . UserPerm . "' ORDER BY f_order ASC "; $info['forums_dropdown'] = '<select name="fID">'; $res = $dbr->query($sql); while ($r = $dbr->fetchObject($res)) { $info['forums_dropdown'] .= '<option value="' . $r->f_id . '">' . $r->f_name . '</option>'; } $dbr->freeResult($res); unset($dbr, $r, $res); $info['forums_dropdown'] .= '</select>'; $info['pID'] = $id; $word['word_create_new_thread'] = get_awcsforum_word('word_create_new_thread'); $word['word_thread_title_for_new_thread'] = get_awcsforum_word('word_thread_title_for_new_thread'); $word['submit'] = get_awcsforum_word('submit'); $word['word_merge_this_post_to_this_thread'] = get_awcsforum_word('word_merge_this_post_to_this_thread'); $tplt->add_tplts(array("'split_and_merge'"), true); $out = $tplt->phase($word, $info, 'split_and_merge', true); $wgOut->addHTML($out); }
function awcs_forum_error($err) { global $wgOut, $awcs_forum_config, $wgSitename, $tplt; awcsforum_funcs::get_page_lang(array('lang_txt_errormsg')); // get lang difinitions... $tplt->add_tplts(array("'error_table'"), true); $Tforum_name = str_replace('|$|', ' ' . $wgSitename . ' ', $awcs_forum_config->name); Set_AWC_Forum_SubTitle($Tforum_name, get_awcsforum_word('word_Error')); Set_AWC_Forum_BreadCrumbs(get_awcsforum_word('word_Error'), true); $error = get_awcsforum_word($err); if ($error == '') { $error = $err; } $info['error'] = $error; $word['word_Error'] = get_awcsforum_word('word_Error'); $html = $tplt->phase($word, $info, 'error_table', true); $wgOut->addHTML($html); }