".PW_MISMATCH.""; } else { $oldpass = mysql_escape_string(stripslashes($_POST['oldpass'])); $newpass1 = mysql_escape_string(stripslashes($_POST['newpass1'])); $newpass2 = mysql_escape_string(stripslashes($_POST['newpass2'])); $stylepath = mysql_escape_string(stripslashes($_POST['stylepath'])); $ingameusername = mysql_escape_string(stripslashes($_POST['ingameusername'])); $allytag = mysql_escape_string(stripslashes($_POST['allytag'])); $email = mysql_escape_string(stripslashes($_POST['email'])); $timezone = mysql_real_escape_string(stripslashes($_POST['timezone'])); // Entries per page $statspage = strip_tags(stripslashes($_POST['statspage'])); // Query $query = "UPDATE $utablename SET "; if ($newpass1 == $newpass2 && !empty($newpass1)) { $query .= "userpass=md5('$newpass1'),"; } $query .= "timezone_offset='$timezone',stylepath='$stylepath',ingame='$ingameusername',allytag='$allytag',email='$email',statspage='$statspage'"; $query .= " WHERE id='".$_SESSION['s_userid']."'"; if (($newpass1 == $newpass2 && !empty($newpass1)) || ($email != mysql_escape_string(stripslashes($_POST['old_email'])))) { $query .= " AND userpass=md5('$oldpass')"; } $res = mysql_query($query) or die(mysql_error()); $rows = mysql_affected_rows(); if (mysql_affected_rows() < 1) { echo "
".PW_ERROR."
"; } else { // update session vars $_SESSION['s_statspage'] = $statspage; $_SESSION['s_timezone_offset'] = $timezone; echo "
".PW_DONE."
"; } } } elseif (isset($_POST['submitbutton2'])) { // second tab - user defined links $links = strip_tags(stripslashes($_POST['links'])); // Query $query = "UPDATE $utablename SET links='$links' WHERE id='".$_SESSION['s_userid']."'"; $res = mysql_query($query) or die(mysql_error()); if ($res === false) { echo "
".USER_ERROR."
"; } else { echo "
".PW_DONE."
"; $addinonal_links_lines = explode("\n",$links); $_SESSION['s_additional_links'] = array(); foreach ($addinonal_links_lines as $link_line) { $line_parts = explode(";",$link_line); if (count($line_parts) == 2) { if (trim($line_parts[1]) == "") { array_push($_SESSION['s_additional_links'],array(trim($line_parts[0]))); } else { if (substr($line_parts[1],0,7) != "http://" && substr($line_parts[1],0,8) != "https://") { $line_parts[1] = "http://".$line_parts[1]; } array_push($_SESSION['s_additional_links'],array(trim($line_parts[0]),trim($line_parts[1]))); } } } unset($addinonal_links_lines); unset($line_parts); unset($link_line); } } elseif (isset($_POST['submitbutton3'])) { // third tab - BB Codes $bb_coordinates = mysql_escape_string(stripslashes($_POST['bb_coordinates'])); $bb_moon = mysql_escape_string(stripslashes($_POST['bb_moon'])); $bb_debris = mysql_escape_string(stripslashes($_POST['bb_debris'])); $bb_ally = mysql_escape_string(stripslashes($_POST['bb_ally'])); $bb_allydetails = mysql_escape_string(stripslashes($_POST['bb_allydetails'])); $bb_playername = mysql_escape_string(stripslashes($_POST['bb_playername'])); $bb_banned = mysql_escape_string(stripslashes($_POST['bb_banned'])); $bb_vacation = mysql_escape_string(stripslashes($_POST['bb_vacation'])); $bb_noob = mysql_escape_string(stripslashes($_POST['bb_noob'])); $bb_inactive = mysql_escape_string(stripslashes($_POST['bb_inactive'])); $bb_longinactive = mysql_escape_string(stripslashes($_POST['bb_longinactive'])); // Query $query = "UPDATE $utablename SET "; $query .= "bb_coordinates='$bb_coordinates', bb_moon='$bb_moon', bb_debris='$bb_debris', bb_ally='$bb_ally',"; $query .= "bb_allydetails='$bb_allydetails', bb_playername='$bb_playername', bb_banned='$bb_banned',"; $query .= "bb_vacation='$bb_vacation', bb_noob='$bb_noob', bb_inactive='$bb_inactive', bb_longinactive='$bb_longinactive'"; $query .= " WHERE id='".$_SESSION['s_userid']."'"; $res = mysql_query($query) or die(mysql_error()); if ($res === false) { echo "
".USER_ERROR."
"; } else { echo "
".PW_DONE."
"; // colors $_SESSION['s_bb_coordinates'] = $bb_coordinates; $_SESSION['s_bb_moon'] = $bb_moon; $_SESSION['s_bb_debris'] = $bb_debris; $_SESSION['s_bb_ally'] = $bb_ally; $_SESSION['s_bb_allydetails'] = $bb_allydetails; $_SESSION['s_bb_playername'] = $bb_playername; $_SESSION['s_bb_banned'] = $bb_banned; $_SESSION['s_bb_vacation'] = $bb_vacation; $_SESSION['s_bb_noob'] = $bb_noob; $_SESSION['s_bb_inactive'] = $bb_inactive; $_SESSION['s_bb_longinactive'] = $bb_longinactive; } } elseif (isset($_POST['email'])) { // first tab, but invalid email address echo '
'.USER_ERROR1.'
'; } // styles path holen $query = "SELECT * FROM $utablename WHERE id='".$_SESSION['s_userid']."'"; $res = mysql_query($query) or die(mysql_error()); $line = mysql_fetch_object($res); $stylepath = $line->stylepath; $email = $line->email; $ingameusername = $line->ingame; $allytag = $line->allytag; $link = $line->links; $is_admin = $line->is_admin; $cansearch = $line->cansearch; $caninsert = $line->caninsert; $statusview = $line->statusview; $probeview = $line->probeview; $userman = $line->userman; $stylepath = $line->stylepath; $allyhistory = $line->allyhistory; $diplomatic = $line->diplomatic; // general options ob_start(); echo ''; ?>
'; } ?>
:
:
:
:
:
:
:
'.DELETE_ACCOUNT.'
'; ?>

'; ?>
: ".USER_YES.""; else echo "".USER_NO.""; ?>
: ".USER_YES.""; else echo "".USER_NO.""; ?>
: ".USER_YES.""; else echo "".USER_NO.""; ?>
: ".USER_YES.""; else echo "".USER_NO.""; ?>
: ".USER_YES.""; else echo "".USER_NO.""; ?>
: ".USER_YES.""; else echo "".USER_NO.""; ?>
: ".USER_YES.""; else echo "".USER_NO.""; ?>
: ".USER_YES.""; else echo "".USER_NO.""; ?>
MENU_USEROPTIONS2, "content"=>$tab1_content), array("name"=>USER_LINKS, "content"=>$tab2_content), array("name"=>USER_EXPORT_TITLE, "content"=>$tab3_content), array("name"=>CH_PASSWD_AUTHORIZATION,"content"=>$tab4_content) ); echo "
"; $tab_plugin->create_tabs($tab_array); echo "
"; makefooter(); ?>