/** * This function delegates the task at issue to the respective function. */ function profile_main($caveID, $meineHoehlen) { global $params; // initialize return value $result = ''; // get current task $task = $params->POST->task; // connect to login db $db_login = db_connectToLoginDB(); if (!$db_login) { page_dberror(); } switch ($task) { // show main page default: $result = profile_show($db_login); break; // change cave page // change cave page case 'change': $result = profile_change($db_login); break; } return $result; }
* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. */ include "util.inc.php"; include INC_DIR . "config.inc.php"; include INC_DIR . "db.inc.php"; include INC_DIR . "game_rules.php"; include INC_DIR . "time.inc.php"; include INC_DIR . "basic.lib.php"; echo "---------------------------------------------------------------------\n"; echo "- MULTI ROTATE LOG FILE --------------------------------------------\n"; echo " vom " . date("r") . "\n"; if (!($db_login = db_connectToLoginDB())) { echo "Rotate Multi : Failed to connect to login db.\n"; exit(1); } if (!($db_game = DbConnect())) { echo "Rotate Multi : Failed to connect to game db.\n"; exit(1); } //alte multies als gel�scht markieren $sql = $db_login->prepare("UPDATE Login \n SET deleted = 1 \n WHERE multi = 66 \n AND lastChange < NOW() - INTERVAL 14 DAY"); if (!$sql->execute()) { echo "Rotate Multi : Failed to mark old multis deleted.\n"; exit(1); } //multi mit stati 65 in den stati 66 packen und in den stamm multi packen $sql = $db_login->prepare("SELECT LoginID, user \n FROM Login \n WHERE multi = 65 \n AND deleted = 0");
if ('t' == $option[0]) { $time_intervall = $option[1]; } } } } /***** INIT *****/ // include necessary files include "util.inc.php"; include INC_DIR . "config.inc.php"; include INC_DIR . "db.inc.php"; include INC_DIR . "basic.lib.php"; // show header multiip_showHeader(); // connect to databases $db_login = db_connectToLoginDB(); /***** GET GOING *****/ // ** IP **/ // get distinct ip's $string = "ip"; multiip_showBetween($string); $ips = multiip_getDistinct_($string); // check each ip foreach ($ips as $ip) { $users = multiip_check_($ip, $string); if (sizeof($users) > 1) { multiip_log("%s: (%s)", $ip, implode(',', $users)); } } /**Passwords**/ //get distinct passwords