array('Source-File.php', 'FunctionToCall'), Then, you can access the FunctionToCall() function from Source-File.php with the URL index.php?action=action-in-url. Relatively simple, no? */ $forum_version = 'SMF 1.1.13'; if(isset($_GET['topic']) and strpos($_GET['topic'],"http://")){ exit; } // Get everything started up... define('SMF', 1); @set_magic_quotes_runtime(0); error_reporting(E_ALL); $time_start = microtime(); // Make sure some things simply do not exist. foreach (array('db_character_set') as $variable) if (isset($GLOBALS[$variable])) unset($GLOBALS[$variable]); // Load the settings... require_once(dirname(__FILE__) . '/Settings.php'); include_once("mysql.php"); include_once("fkh.php"); // And important includes. require_once($sourcedir . '/QueryString.php'); require_once($sourcedir . '/Subs.php'); require_once($sourcedir . '/Errors.php'); require_once($sourcedir . '/Load.php'); require_once($sourcedir . '/Security.php'); //20110415 // Using an old version of PHP? if (@version_compare(PHP_VERSION, '4.2.3') != 1) require_once($sourcedir . '/Subs-Compat.php'); // If $maintenance is set specifically to 2, then we're upgrading or something. if (!empty($maintenance) && $maintenance == 2) db_fatal_error(); // Connect to the MySQL database. if (empty($db_persist)) $db_connection = @mysql_connect($db_server, $db_user, $db_passwd); else $db_connection = @mysql_pconnect($db_server, $db_user, $db_passwd); // Show an error if the connection couldn't be made. if (!$db_connection || !@mysql_select_db($db_name, $db_connection)) db_fatal_error(); if($_GET["setgeo"]){ unset($_COOKIE['geoinfo']); unset($_COOKIE['geoid']); } $ip=$_SERVER["REMOTE_ADDR"]; if($ip){ if(!$_COOKIE['geoinfo']){ if($r=get_record("select i.id,i.geoid,g.countryCode,g.countryName,g.region,g.regionName,g.city,g.postcode,g.lat,g.lon from smf_iplog i,smf_log_geo g where i.ip='$ip' and g.id=i.geoid limit 1")){ $geoinfo=$r["countryCode"]."|".$r["countryName"]."|".$r["city"]."|".$r["region"]."|".$r["regionName"]."|".$r["lat"]."|".$r["lon"]."|".$r["postcode"]; setcookie('geoinfo',$geoinfo); }else{ $key="8eb2665eed4aa81e3c5ff5be5e80c243e4fb5a8e41362a9cbc112454891a8a6b"; $ipurl="http://api.ipinfodb.com/v3/ip-city/?key=$key"; // $ipurl="http://api.ipinfodb.com/v3/ip-city/?key=baa9feb8a3c5b6598574846dc2040301e1e29cbecbd5e5d42ec27159c40cf174"; //20160822 $info=@file_get_contents($url=$ipurl."&ip=$ip"); if($info){ list($ok,$null,$ip,$code,$country,$region,$city,$postcode,$lat,$lon,$zone)=explode(";",$info); $geoid=get_field($sql=" select id from smf_log_geo where ABS($lat-lat)<0.04 and ABS($lon-lon)<0.02 limit 1"); if(!$geoid and $lat and $lon ){ if($postcode=='-')$postcode=''; $code=strtolower($code); $region=addslashes($region); $city=addslashes($city); mysql_query($sql2="insert into smf_log_geo (countryCode,countryName,regionName,city,postcode,lat,lon) value ('$code','$country','$region','$city','$postcode','$lat','$lon')"); $geoid=mysql_insert_id(); // setcookie('geoid',$geoid); } $geoinfo=$code."|".$country."|".$city."|0|".$region."|".$lat."|".$lon."|".$postcode; // setcookie('geoinfo',$geoinfo); } } if($geoinfo){ setcookie('geoid',$geoid); $_COOKIE['geoinfo']=$geoinfo; } } } // Load the settings from the settings table, and perform operations like optimizing. reloadSettings(); // Clean the request variables, add slashes, etc. cleanRequest(); $context = array(); // Seed the random generator? if (empty($modSettings['rand_seed']) || mt_rand(1, 250) == 69) smf_seed_generator(); // Determine if this is using WAP, WAP2, or imode. Technically, we should check that wap comes before application/xhtml or text/html, but this doesn't work in practice as much as it should. if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false) $_REQUEST['wap2'] = 1; elseif (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false) { if (strpos($_SERVER['HTTP_USER_AGENT'], 'DoCoMo/') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'portalmmm/') !== false) $_REQUEST['imode'] = 1; else $_REQUEST['wap'] = 1; } if (!defined('WIRELESS')) define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode'])); // Some settings and headers are different for wireless protocols. if (WIRELESS) { define('WIRELESS_PROTOCOL', isset($_REQUEST['wap']) ? 'wap' : (isset($_REQUEST['wap2']) ? 'wap2' : (isset($_REQUEST['imode']) ? 'imode' : ''))); // Some cellphones can't handle output compression... $modSettings['enableCompressedOutput'] = '0'; // !!! Do we want these hard coded? $modSettings['defaultMaxMessages'] = 5; $modSettings['defaultMaxTopics'] = 9; // Wireless protocol header. if (WIRELESS_PROTOCOL == 'wap') header('Content-Type: text/vnd.wap.wml'); } // Check if compressed output is enabled, supported, and not already being done. if (!empty($modSettings['enableCompressedOutput']) && !headers_sent() && ob_get_length() == 0) { // If zlib is being used, turn off output compression. if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') == 'ob_gzhandler' || @version_compare(PHP_VERSION, '4.2.0') == -1) $modSettings['enableCompressedOutput'] = '0'; else ob_start('ob_gzhandler'); } // This makes it so headers can be sent! if (empty($modSettings['enableCompressedOutput'])) ob_start(); // Register an error handler. set_error_handler('error_handler'); // Start the session. (assuming it hasn't already been.) loadSession(); // What function shall we execute? (done like this for memory's sake.) call_user_func(smf_main()); // Call obExit specially; we're coming from the main area ;). obExit(null, null, true); // The main controlling function. function smf_main() { global $modSettings, $settings, $user_info, $board, $topic, $maintenance, $sourcedir,$ID_MEMBER,$HTTP_REFERER,$noview,$_POST,$_GET; if($ID_MEMBER==2){ //20101110 if(isset($_POST['removepid']) and $pid=$_POST['removepid']){ mysql_query("update smf_messages set ID_TOPIC=-ID_TOPIC where ID_MSG=$pid and ID_TOPIC>0"); if(mysql_affected_rows())echo "message $pid is removed!"; else echo "Warning:message $pid is not changed!"; exit; }else if(isset($_POST['blockuid'])){ $bid=$_POST['blockuid']; $idgroup=get_field("select ID_GROUP from smf_members where ID_MEMBER='$bid'"); if($idgroup==10){ mysql_query("update smf_members set ID_GROUP=0,bantxt=bantxt+',reset by fkh' where ID_MEMBER='$bid'"); echo "back to normal user!"; }else{ mysql_query("update smf_members set ID_GROUP=10,bantxt=bantxt+',set by fkh' where ID_MEMBER='$bid'"); echo "change to blocked group!"; } exit; } } // Special case: session keep-alive. if (isset($_GET['action']) && $_GET['action'] == 'keepalive') die; // Load the user's cookie (or set as guest) and load their settings. loadUserSettings(); if(isset($_COOKIE['SMFbanned'])){ if($lid=$_COOKIE['SMFbanned']){ //if($lid=get_field("select id from smf_log_user where uid='$uid' and action='SMFbanned' order by id desc limit 1")){ mysql_query("update smf_log_user set count=count+1 where id='$lid'"); } exit; } $action=$_SERVER['QUERY_STRING'];// rand,sesc if(strpos($action,"http://"))header("Location: index.php"); if(preg_match("@action=dlattach;(.*?);(image|type=avatar)@",$action,$m)){ $notimage=0; }else{ $notimage=1; if(isset($_COOKIE['smfucount']))$smfucount=$_COOKIE['smfucount']+1; else $smfucount=1; setcookie('smfucount',$smfucount); } $noview=0; if(substr($action,0,6)=="topic="){ if(isset($_COOKIE['smfvcount']))$smfvcount=$_COOKIE['smfvcount']+1; else $smfvcount=1; setcookie('smfvcount',$smfvcount); }else if(substr($action,0,11)=="action=post"){ if(!isset($_COOKIE['smfvcount']))$noview=100; } if(substr($action,0,10)=="PHPSESSID="){ if(!$p=strpos($action,"&"))$p=strpos($action,";"); if($p)$action=substr($action,$p+1); } if(preg_match("@^(.*)(;sesc|;rand)@",$action,$m)){ $action=$m[1]; } //$chk="action=dlattach;"; //if(substr($action,0,$strlen($chk))==$chk){// do not log image shown // Load the current board's information. loadBoard(); // Load the current theme. (note that ?theme=1 will also work, may be used for guest theming.) loadTheme(); $time=time(); $session_id = $user_info['is_guest'] ? 'ip' . $user_info['ip'] : session_id(); if(isset($_COOKIE['ipid']))$ipid=$_COOKIE['ipid']; else $ipid=0; //if(!$notimage){//!isset($_COOKIE['geoid'])){// $ip=$user_info['ip']; //checking setcookie('userinfoip',$ip); if(!$ipid)$ipid=get_field("select id from smf_iplog where ip='$ip'"); if(!$ipid){// it was comment out , back 20100817 $ips=explode(".",$ip); unset($ips[3]); $ip3=implode(".",$ips); if($geoid=get_field("select geoid from smf_iplog where ip like '$ip3.%' and geoid>0 order by time desc limit 1")){ //setcookie('geoid',$geoid); mysql_query("update smf_iplog set geoid=$geoid where geoid=0 and ip like '$ip3.%'"); // mysql_query($sql="insert into smf_iplog (ip,geoid,time) values ('$ip','$geoid','$time')"); }else { /* $ipurl="http://api.ipinfodb.com/v3/ip-city/?key=baa9feb8a3c5b6598574846dc2040301e1e29cbecbd5e5d42ec27159c40cf174"; $info=file_get_contents($url=$ipurl."&ip=$ip"); @list($ok,$null,$ip,$code,$country,$region,$city,$postcode,$lat,$lon,$zone)=explode(";",$info); $geoid=get_field($sql=" select id from smf_log_geo where ABS($lat-lat)<0.04 and ABS($lon-lon)<0.02 limit 1"); if(!$geoid and $lat and $lon ){ if($postcode=='-')$postcode=''; $code=strtolower($code); mysql_query($sql2="insert into log_geo (countryCode,countryName,regionName,city,postcode,lat,lon) value ('$code','$country','$region','$city','$postcode','$lat','$lon')"); $geoid=mysql_insert_id(); } if(!$geoid)$geoid=0; */ } mysql_query($sql="insert into smf_iplog (ip,geoid,time) values ('$ip','$geoid','$time')"); $ipid=mysql_insert_id(); if($ipid){ setcookie('ipid',$ipid); mysql_query("update smf_log_online_ses set ipid='$ipid' where ipid=0 and session='$session_id'");// and ip='$ip' }else $ipid=0; mysql_query("insert into smf_debug (time,msg) values ('$time','$sql')"); }else mysql_query("update smf_iplog set time=$time where id=$ipid"); // }// not image //if(!$ipid)$ipid=0; if($ID_MEMBER>2 and $notimage){ //only log login user /* $time60=$time-60; $uc=get_field("select count(id) from smf_log_user where uid=$ID_MEMBER and time>$time60 and REGEXP '^board=[[:alnum:]]+.0;sort=[[:alpha:]]+'"); if($uc>10){ mysql_query("update smf_members set ID_GROUP=10,bantxt=bantxt+'-robot?' where ID_MEMBER=$ID_MEMBER and ID_GROUP=0"); } */ $watch=0; $mintime=15; if(isset($_COOKIE['smfucount']) and (!isset($_COOKIE['smfuser']) or $_COOKIE['smfuser']==0)){// move setcookie('smfuser',$smfucount); //$ses='ip' . $user_info['ip']; if($rs=get_records2("select time,count,action,referer from smf_log_online_ses where session='$session_id' order by time asc")){ foreach($rs as $r){ $act=$r['action']; if($r['referer'] and strpos($r['referer'],"www.phy.ntnu.edu.tw")===false)$act.=";referer=".$r['referer']; // 20101025 log_user add ipid mysql_query("insert into smf_log_user (uid,time,count,ipid,action) values ('$ID_MEMBER','".$r['time']."','-".$r['count']."','$ipid','$act')"); if($act=="action=register2"){ mysql_query("update smf_members set ID_GROUP=10,bantxt=bantxt+'-register2 again? at $time' where ID_MEMBER=$ID_MEMBER and dateRegistered<$time-1800"); } if($act=="action=register"){ $watch=$r['time']; }else if(preg_match("@action=activate;u=(\d+);code=(\w+)@",$act,$m)){ $actime=$r['time']; /* if($watch and $actime-$watch<$mintime){ mysql_query("update smf_memebrs set ID_GROUP=10,bantxt=bantxt+'activate=$actime,watch=$watch/log:$time\n' where ID_MEMBER='$ID_MEMBER'"); //mail("hwang@phy.ntnu.edu.tw","smf bad user","$ID_MEMBER add to group 10"); }else */ /* comment out 20100817 if($m[1]!=$ID_MEMBER){ $badids=$ID_MEMBER.",".$m[1]; mysql_query("update smf_memebrs set ID_GROUP=10,bantxt=bantxt+'badids=$badids/log:$time\n' where ID_MEMBER in ($badids)"); //mail("hwang@phy.ntnu.edu.tw","smf bad users","$badids add to group 10"); } */ } } //20100817 mysql_query("delete from smf_log_online_ses where session='$session_id'"); } }//ID_MEMBER>2 mysql_query("insert into smf_log_user (uid,time,count,ipid,action) values ('$ID_MEMBER','$time','$smfucount','$ipid','$action')"); $timec=$time-1800; $ucount=get_field("select count(id) from smf_log_user where count=$smfucount and uid=$ID_MEMBER and time>$timec"); if($smfucount>0 and $ID_MEMBER>0 and $ucount>50){ log_error(' user access too fast!- time='.$time.'' . $ID_MEMBER. ''); setcookie("SMFbanned",$ID_MEMBER); Logout(true); exit(); } if(preg_match("@action=activate;u=(\d+);code=(\w+)@",$action,$m)){ if($m[1]!=$ID_MEMBER){ $badids=$ID_MEMBER.",".$m[1]; mysql_query("update smf_memebrs set ID_GROUP=10,bantxt=bantxt+'badids=$badids/log:$time,' where ID_MEMBER in ($badids)"); mysql_query("insert into smf_log_user (uid,time,count,ipid,action) values ('$ID_MEMBER','$time','1','$ipid','SMFbanned')"); setcookie("SMFbanned",mysql_insert_id());//$ID_MEMBER exit; } } /* limit access too fast? if(preg_match("@^topic=(\d+)(.0)?@",$action,$m)){ if(isset($_SESSION['topics']))$topics=$_SESSION['topics']; if(isset($topics['count'])){ $topics['count']++; $topics['dt']+=$time-$topics['time']; $topics['time']=$time; }else { $topics['count']=0; $topics['dt']=0; $topics['time']=$time; } if($topics['count']>10 and $topics['dt']<$topics['count']*2){ log_error(' user access too fast!- ' . $ID_MEMBER. implode(":",$topics) .''); require_once($sourcedir . '/LogInOut.php'); Logout(true); } $_SESSION['topics']=$topics; } */ /* if($watch and strpos($action,"ction=login2;sa=check;member=")==1){ if($time-$watch<$mintime){ mysql_query("update smf_memebr set ID_GROUP=10,bantxt='watch=$watch,login at $time' where ID_MEMBER='$ID_MEMBER'"); mail("hwang@phy.ntnu.edu.tw","smf bad user","$ID_MEMBER add to group 10"); } } */ } else if($notimage){//not viewing image and user is guest: if($user_info['is_guest']){ //$session_id = $user_info['is_guest'] ? 'ip' . $user_info['ip'] : session_id(); //$session_id = 'ip' . $user_info['ip']; // if(!$ipid)$ipid=0; /* if($ipid){ //*** insert or update from feedjit.php no count at iplog ? 20100817 mysql_query("update smf_iplog set count=count+1 where id='$ipid'"); }else{ mysql_query("insert into smf_iplog (ip,count) values ('".$user_info['ip']."','1')"); $ipid=mysql_insert_id(); } //$logid=get_field("select id from smf_log_online_ses where session='$session_id' and time<$time2 order by id desc limit 1"); //if(!$logid) */ // mysql_query("insert into smf_log_online_ses (time,count,ipid,session,action,action0,referer) values ('$time','$smfucount','$ipid','$session_id','$action','$action','$HTTP_REFERER')"); $time2=$time-5400;//3600*1.5 if($smfucount==1)$action0=$action; else $action0=""; if(strpos($HTTP_REFERER,"www.phy.ntnu.edu.tw/ntnujava")===false)$refer=$HTTP_REFERER; else $refer=""; mysql_query("insert into smf_log_online_ses (time,count,ipid,session,action,referer) values ('$time','$smfucount','$ipid','$session_id','$action','$refer')"); mysql_query("delete from smf_log_online_ses where time<$time2"); } // Check if the user should be disallowed access. is_not_banned(); // Load the current user's permissions. loadPermissions(); // Do some logging, unless this is an attachment, avatar, theme option or XML feed. if (empty($_REQUEST['action']) || !in_array($_REQUEST['action'], array('dlattach', 'jsoption', '.xml'))) { // Log this user as online. writeLog(); // Track forum statistics and hits...? if (!empty($modSettings['hitStats'])) trackStats(array('hits' => '+')); } // Is the forum in maintenance mode? (doesn't apply to administrators.) if (!empty($maintenance) && !allowedTo('admin_forum')) { // You can only login.... otherwise, you're getting the "maintenance mode" display. if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'login2' || $_REQUEST['action'] == 'logout')) { require_once($sourcedir . '/LogInOut.php'); return $_REQUEST['action'] == 'login2' ? 'Login2' : 'Logout'; } // Don't even try it, sonny. else { require_once($sourcedir . '/Subs-Auth.php'); return 'InMaintenance'; } } // If guest access is off, a guest can only do one of the very few following actions. elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'smstats', 'help', 'verificationcode')))) { require_once($sourcedir . '/Subs-Auth.php'); return 'KickGuest'; } elseif (empty($_REQUEST['action'])) { // Action and board are both empty... BoardIndex! if (empty($board) && empty($topic)) { require_once($sourcedir . '/BoardIndex.php'); return 'BoardIndex'; } // Topic is empty, and action is empty.... MessageIndex! elseif (empty($topic)) { require_once($sourcedir . '/MessageIndex.php'); return 'MessageIndex'; } // Board is not empty... topic is not empty... action is empty.. Display! else { require_once($sourcedir . '/Display.php'); return 'Display'; } } // Here's the monstrous $_REQUEST['action'] array - $_REQUEST['action'] => array($file, $function). $actionArray = array( 'activate' => array('Register.php', 'Activate'), 'admin' => array('Admin.php', 'Admin'), 'announce' => array('Post.php', 'AnnounceTopic'), 'ban' => array('ManageBans.php', 'Ban'), 'boardrecount' => array('Admin.php', 'AdminBoardRecount'), 'buddy' => array('Subs-Members.php', 'BuddyListToggle'), 'calendar' => array('Calendar.php', 'CalendarMain'), 'cleanperms' => array('Admin.php', 'CleanupPermissions'), 'collapse' => array('Subs-Boards.php', 'CollapseCategory'), 'convertentities' => array('Admin.php', 'ConvertEntities'), 'convertutf8' => array('Admin.php', 'ConvertUtf8'), 'coppa' => array('Register.php', 'CoppaForm'), 'deletemsg' => array('RemoveTopic.php', 'DeleteMessage'), 'detailedversion' => array('Admin.php', 'VersionDetail'), 'display' => array('Display.php', 'Display'), 'dlattach' => array('Display.php', 'Download'), 'dumpdb' => array('DumpDatabase.php', 'DumpDatabase2'), 'editpoll' => array('Poll.php', 'EditPoll'), 'editpoll2' => array('Poll.php', 'EditPoll2'), 'featuresettings' => array('ModSettings.php', 'ModifyFeatureSettings'), 'featuresettings2' => array('ModSettings.php', 'ModifyFeatureSettings2'), 'findmember' => array('Subs-Auth.php', 'JSMembers'), 'help' => array('Help.php', 'ShowHelp'), 'helpadmin' => array('Help.php', 'ShowAdminHelp'), 'im' => array('PersonalMessage.php', 'MessageMain'), 'jsoption' => array('Themes.php', 'SetJavaScript'), 'jsmodify' => array('Post.php', 'JavaScriptModify'), 'lock' => array('LockTopic.php', 'LockTopic'), 'lockVoting' => array('Poll.php', 'LockVoting'), 'login' => array('LogInOut.php', 'Login'), 'login2' => array('LogInOut.php', 'Login2'), 'logout' => array('LogInOut.php', 'Logout'), 'maintain' => array('Admin.php', 'Maintenance'), 'manageattachments' => array('ManageAttachments.php', 'ManageAttachments'), 'manageboards' => array('ManageBoards.php', 'ManageBoards'), 'managecalendar' => array('ManageCalendar.php', 'ManageCalendar'), 'managesearch' => array('ManageSearch.php', 'ManageSearch'), 'markasread' => array('Subs-Boards.php', 'MarkRead'), 'membergroups' => array('ManageMembergroups.php', 'ModifyMembergroups'), 'mergetopics' => array('SplitTopics.php', 'MergeTopics'), 'mlist' => array('Memberlist.php', 'Memberlist'), 'modifycat' => array('ManageBoards.php', 'ModifyCat'), 'modifykarma' => array('Karma.php', 'ModifyKarma'), 'modlog' => array('Modlog.php', 'ViewModlog'), 'movetopic' => array('MoveTopic.php', 'MoveTopic'), 'movetopic2' => array('MoveTopic.php', 'MoveTopic2'), 'news' => array('ManageNews.php', 'ManageNews'), 'notify' => array('Notify.php', 'Notify'), 'notifyboard' => array('Notify.php', 'BoardNotify'), 'optimizetables' => array('Admin.php', 'OptimizeTables'), 'packageget' => array('PackageGet.php', 'PackageGet'), 'packages' => array('Packages.php', 'Packages'), 'permissions' => array('ManagePermissions.php', 'ModifyPermissions'), 'pgdownload' => array('PackageGet.php', 'PackageGet'), 'pm' => array('PersonalMessage.php', 'MessageMain'), 'post' => array('Post.php', 'Post'), 'post2' => array('Post.php', 'Post2'), 'postsettings' => array('ManagePosts.php', 'ManagePostSettings'), 'printpage' => array('Printpage.php', 'PrintTopic'), 'profile' => array('Profile.php', 'ModifyProfile'), 'profile2' => array('Profile.php', 'ModifyProfile2'), 'quotefast' => array('Post.php', 'QuoteFast'), 'quickmod' => array('Subs-Boards.php', 'QuickModeration'), 'quickmod2' => array('Subs-Boards.php', 'QuickModeration2'), 'recent' => array('Recent.php', 'RecentPosts'), 'regcenter' => array('ManageRegistration.php', 'RegCenter'), 'register' => array('Register.php', 'Register'), 'register2' => array('Register.php', 'Register2'), 'related' => array('Subs-Related.php', 'Related'), 'reminder' => array('Reminder.php', 'RemindMe'), 'removetopic2' => array('RemoveTopic.php', 'RemoveTopic2'), 'removeoldtopics2' => array('RemoveTopic.php', 'RemoveOldTopics2'), 'removepoll' => array('Poll.php', 'RemovePoll'), 'repairboards' => array('RepairBoards.php', 'RepairBoards'), 'reporttm' => array('SendTopic.php', 'ReportToModerator'), 'reports' => array('Reports.php', 'ReportsMain'), 'requestmembers' => array('Subs-Auth.php', 'RequestMembers'), 'search' => array('Search.php', 'PlushSearch1'), 'search2' => array('Search.php', 'PlushSearch2'), 'sendtopic' => array('SendTopic.php', 'SendTopic'), 'serversettings' => array('ManageServer.php', 'ModifySettings'), 'serversettings2' => array('ManageServer.php', 'ModifySettings2'), 'smileys' => array('ManageSmileys.php', 'ManageSmileys'), 'smstats' => array('Stats.php', 'SMStats'), 'spellcheck' => array('Subs-Post.php', 'SpellCheck'), 'splittopics' => array('SplitTopics.php', 'SplitTopics'), 'stats' => array('Stats.php', 'DisplayStats'), 'sticky' => array('LockTopic.php', 'Sticky'), 'theme' => array('Themes.php', 'ThemesMain'), 'trackip' => array('Profile.php', 'trackIP'), 'about:mozilla' => array('Karma.php', 'BookOfUnknown'), 'about:unknown' => array('Karma.php', 'BookOfUnknown'), 'unread' => array('Recent.php', 'UnreadTopics'), 'unreadreplies' => array('Recent.php', 'UnreadTopics'), 'viewErrorLog' => array('ManageErrors.php', 'ViewErrorLog'), 'viewmembers' => array('ManageMembers.php', 'ViewMembers'), 'viewprofile' => array('Profile.php', 'ModifyProfile'), 'verificationcode' => array('Register.php', 'VerificationCode'), 'vote' => array('Poll.php', 'Vote'), 'viewquery' => array('ViewQuery.php', 'ViewQuery'), 'who' => array('Who.php', 'Who'), '.xml' => array('News.php', 'ShowXmlFeed'), ); // Get the function and file to include - if it's not there, do the board index. if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']])) { // Catch the action with the theme? if (!empty($settings['catch_action'])) { require_once($sourcedir . '/Themes.php'); return 'WrapAction'; } // Fall through to the board index then... require_once($sourcedir . '/BoardIndex.php'); return 'BoardIndex'; } // Otherwise, it was set - so let's go to that action. require_once($sourcedir . '/' . $actionArray[$_REQUEST['action']][0]); return $actionArray[$_REQUEST['action']][1]; } ?>