from the site, where this extra is included! // -> use absolute path if you have it included in files with different directories! // (e.g. /home/www/htdocs/mysite.com/vwar/) // -> if included in your _header.php/_footer.php, it is normally: './' // -> if not, use: './../' $vwar_xroot = "./../"; // relative or absolut path from this file to your main vwar directory $svwar_root = "./../"; // relative or absolute path to redirect a user after login. to return back to the site, // where the login/logout was, insert 'back' (e.g. http://www.mysite.com/vwar/calendar.php) $pathtosite = "back"; // relative or absolute path from the site, the panel is included, to the extra/ directory. // use absolute path if you have the panel included in 2 or more files! (e.g. /html/vwar/extra/) $pathtoextra = "extra/"; // include header- & footer-information (1=enabled / 0=disabled) $include = 0; // ## CONTROL CENTER (this is only displayed to logged in members, use html to display what you want!) // --------------------------------------------------------------------------------------------------- // variables you can use: // $member[name] = member's name // $urltovwar = url to vwar // $GPC[vwarid] = member's id of vwar (e.g. important for a "modify your profile"-link) // NOTE: strings like $xyz, $xyz[xyz] or {$xyz} will be replaced by this script! $controlcenter = '
»  Logged in as: $member[name]
» Own VWar Profile
» Admin Control Panel
[ Logout ]
'; // ############################################################################################ // ########################################### start ########################################## if ( $HTTP_GET_VARS["action"] == "login" ) { $vwar_root = $svwar_root; } // check, if we need to get some global vars or if we need to include them if( !defined ("VWAR_COMMON_INCLUDED") ) { $vwar_root = $vwar_xroot; require_once ( $vwar_root . "includes/functions_common.php" ); } if ( $include == 1 ) { include_once ( $vwar_root . "_header.php" ); } // #################################### make login / logout ################################### //function to return to the site, where the user came from if ( !function_exists("goback") ) { function goback() { global $pathtosite, $GPC; if(isset($GPC['from'])) { if($pathtosite == "back") { $pathtosite = $GPC["from"]; } } header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); header("Location: " . $pathtosite); } } //login if ($GPC["action"] == "login") { $result = $vwardb->query_first(" SELECT memberid, name, password FROM vwar".$n."_member WHERE password = '".md5($GPC["loginpassword"])."' AND memberid = '".$GPC["memberid"]."' "); if ($result["memberid"] && $result["name"]) { SetVWarCookie("vwarid", $result["memberid"]); SetVWarCookie("vwarpassword", md5(md5($GPC["loginpassword"]))); } // disappear.... goback(); } // ################################ controlcenter / loginpanel ############################## ?>
query_first (" SELECT name FROM vwar".$n."_member WHERE memberid = '" . $GPC["vwarid"] . "' "); dbSelect ($member); eval("\$controlcenter = \"" . addslashes($controlcenter) . "\";"); echo $controlcenter; } else { $result = $vwardb->query(" SELECT memberid,name FROM vwar".$n."_member WHERE ismember = 1 ORDER BY memberid ASC "); while($row = $vwardb->fetch_array($result)) { dbSelectForm ($row); $memberlist .= "\n"; } ?> " method="post" target="_self"> ">
Name: 
Password: