Index: include/auth.php =================================================================== --- include/auth.php (revision 23) +++ include/auth.php (working copy) @@ -1,10 +1,10 @@ \ No newline at end of file Index: panel.php =================================================================== --- panel.php (revision 23) +++ panel.php (working copy) @@ -1,4 +1,4 @@ -'; echo ''; @@ -8,10 +8,10 @@ echo ''; echo ''.$ServerName.''; echo ''; -echo ' '; +echo ' '; echo '

'; if (!isset($_SESSION['user_id']) or ($_SESSION['ip'] != $_SERVER['REMOTE_ADDR'])) require $modules['login'][0]; -else +else { $rip = ''; $r_connect = mysql_connect($r_ip, $r_userdb, $r_pw); @@ -22,7 +22,7 @@ if ($row0 = mysql_fetch_assoc($res0)) $rip = $row0['ip']; $query = "SELECT * FROM `account` WHERE `id`=".$_SESSION['user_id']." LIMIT 1"; $res = mysql_query($query) or trigger_error(mysql_error().$query); - if ($row = mysql_fetch_assoc($res)) + if ($row = mysql_fetch_assoc($res)) { $ra_id = $row['id']; $ra_username = $row['username']; @@ -36,7 +36,7 @@ $ra_expansion = getExpansion($row['expansion']); $ra_locale = getlocale($row['locale']); } - if (strtoupper($_SESSION['slovo']) != strtoupper($row['sha_pass_hash']) ) + if (strtoupper($_SESSION['slovo']) != strtoupper($row['sha_pass_hash']) ) { session_destroy(); echo ''; @@ -46,7 +46,7 @@ ReturnMainForm(40); return; } - $r_connect = mysql_connect($r_ip, $r_userdb, $r_pw); + $r_connect = mysql_connect($r_ip, $r_userdb, $r_pw); mysql_select_db($r_db, $r_connect); mysql_query("SET NAMES '$encoding'"); $query2 = "SELECT `active` FROM `account_banned` WHERE `id`='".$ra_id."' LIMIT 1"; @@ -58,7 +58,7 @@ echo ''; echo ''; - if ($ShowIdAcc == 1) + if ($ShowIdAcc == 1) { echo ''; echo ''; echo ''; - echo '
'.$txt[1].'
'; echo ''.$ra_username.'
'; echo $txt[214]; @@ -79,15 +79,15 @@ echo $txt[32]; echo '
'; - if (!eregi("^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,4}$", $ra_email)) + if (!mb_eregi("^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,4}$", $ra_email)) { echo $txt[66]; - if ( $ra_email <> '') + if ( $ra_email <> '') { mysql_query('update `account` set `email` = "" where `id` = '.$ra_id.';'); - $ra_email= ''; + $ra_email= ''; } - } + } else echo $ra_email; echo '
'; @@ -128,22 +128,22 @@ if ($ra_locked==0) echo $txt[42]; else echo $txt[41]; echo '


'; + echo '

'; echo ''; $c_connect = mysql_connect($c_ip, $c_userdb, $c_pw); mysql_select_db($c_db, $c_connect); - mysql_query("SET NAMES '$encoding'"); + mysql_query("SET NAMES '$encoding'"); $c_query = "SELECT `name`, `class`, `guid`, `race`, `online`, `gender`, `level`, `money` FROM `characters` WHERE `account` = $ra_id order by `guid`;"; $res = mysql_query($c_query); - $kol=1; + $kol=1; echo ''; - echo ''; -if (mysql_num_rows($res) > 0) +if (mysql_num_rows($res) > 0) while ($cres = mysql_fetch_array($res)) { $money = $cres['money']; - echo ''; + echo ''; echo ''; $kol++; } - echo ''; - echo '
'.$txt[248].'
 '; + echo '
 '; echo '
'; echo " "; echo " "; @@ -160,8 +160,8 @@ echo '
 

'.$d; + echo ' '; + echo '
'.$d; } ?> Index: modules/accedit.php =================================================================== --- modules/accedit.php (revision 23) +++ modules/accedit.php (working copy) @@ -1,4 +1,4 @@ -' .$txt[20].'' .$txt[50].'

'; } - else { + else { $mail_code = generate(40); $k_connect = mysql_connect($k_ip, $k_userdb, $k_pw); mysql_select_db($k_db, $k_connect); @@ -51,7 +51,7 @@ else $mail_body = $txt[112]; $mail_body2 = ''.$http_mail.''; $post_mail = $_POST['new_email']; - require("include/mailsend.php"); + require("include/mailsend.php"); $log_account = $ra_id; $log_character = 0; @@ -61,9 +61,9 @@ $log_note = $mail_code; $log_old_data = ''; require('include/log.php'); - + ReturnMainForm(60); - return; + return; } } if (($ra_email == '') AND (isset($_POST['id'])) AND ($_POST['id'] == 2)) { @@ -87,7 +87,7 @@ '; return; - } + } if (isset($_POST['id']) AND (($_POST['id'] == 1) OR (($_POST['id'] == 2) AND ($AccountEmailChange == 1))) AND ($ra_email != '')) { //if (isset($_POST['id']) AND ($_POST['id'] == 1) AND ($ra_email != '')) { $mail_code = generate(40); @@ -113,10 +113,10 @@ $log_resultat = ''; $log_note = $mail_code; $log_old_data = ''; - require('include/log.php'); - + require('include/log.php'); + ReturnMainForm(60); - return; + return; } if (isset($_POST['id']) AND ($_POST['id'] == 3)) {//type select echo ''.$txt[8].'

  

'; @@ -156,8 +156,8 @@ $mail_body = $txt[111]; $mail_body2 = ''.$http_mail.''; $post_mail = $ra_email; - require("include/mailsend.php"); - + require("include/mailsend.php"); + ReturnMainForm(60); return; } } Index: modules/remember.php =================================================================== --- modules/remember.php (revision 23) +++ modules/remember.php (working copy) @@ -4,12 +4,12 @@ $r_connect = mysql_connect($r_ip, $r_userdb, $r_pw); mysql_select_db($r_db, $r_connect); mysql_query("SET NAMES '$encoding'"); -$rip = 'no'; +$rip = 'no'; $query = "SELECT `ip` FROM `ip_banned` WHERE `ip`='".$_SERVER['REMOTE_ADDR']."' LIMIT 1"; $res = mysql_query($query) or trigger_error(mysql_error().$query); if ($row = mysql_fetch_assoc($res)) { $rip = $row['ip']; - } + } if ($rip == $_SERVER['REMOTE_ADDR']) { echo $txt[14]; return; @@ -17,14 +17,14 @@ if (isset($_POST['email']) AND ($_POST['email'] != '') and (!isset($_POST['id']) OR ($_POST['id'] == ''))) { $phase=1; $_POST['email'] = mysql_real_escape_string($_POST['email']); - if (!eregi("^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,4}$",$_POST['email'])) { + if (!mb_eregi("^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,4}$",$_POST['email'])) { echo '
'.$txt[20].'
'.$txt[50].'
'; } - else { + else { $query = "SELECT * FROM `account` WHERE `email` like '".$_POST['email']."';"; $res = mysql_query($query) or trigger_error(mysql_error().$query); - $kol=1; + $kol=1; echo ''; echo ''; while ($row = mysql_fetch_array($res)){ @@ -33,12 +33,12 @@ $ra_last_ip = $row['last_ip']; $ra_locked = $row['locked']; $ra_online = $row['online']; - + echo ''; echo '
'.$txt[57].'
 '; $query2 = "SELECT `active` FROM `account_banned` WHERE `id`='".$ra_id."' LIMIT 1"; $res2 = mysql_query($query2) or trigger_error(mysql_error().$query2); - if ($row2 = mysql_fetch_assoc($res2)) {$r_act = $row2['active'];} else {$r_act = '0';} + if ($row2 = mysql_fetch_assoc($res2)) {$r_act = $row2['active'];} else {$r_act = '0';} if ($r_act == '1') {echo " ";} elseif ($ra_online == '1') { echo " ";} // elseif (($_SERVER['REMOTE_ADDR'] != $ra_last_ip) AND ($ra_locked == '1')) {echo " ";} @@ -55,13 +55,13 @@ if ($kol == 1) echo '
  '.$txt[56].'  
'; - else { + else { $phase=2; - echo '
'; + echo '
'; } echo '
'; } - } + } if (isset($_POST['id']) AND ($_POST['id'] > 0)) { if (isset($_POST['email']) AND ($_POST['email'] != '')) $_POST['email'] = mysql_real_escape_string($_POST['email']); $mail_code = generate(40); @@ -77,7 +77,7 @@ $mail_body2 = ''.$http_mail.''; $post_mail = $_POST['email']; require("include/mailsend.php"); - + $log_account = (int)$_POST['id']; $log_character = 0; $log_mode = 2; @@ -106,7 +106,7 @@         - '; + '; } else echo $txt[138].'
'; ?> \ No newline at end of file Index: modules/reg.php =================================================================== --- modules/reg.php (revision 23) +++ modules/reg.php (working copy) @@ -3,7 +3,7 @@ $r_connect = mysql_connect($r_ip, $r_userdb, $r_pw); mysql_select_db($r_db, $r_connect); mysql_query("SET NAMES '$encoding'"); -$rip = 'no'; +$rip = 'no'; $query = "SELECT `ip` FROM `ip_banned` WHERE `ip`='".$_SERVER['REMOTE_ADDR']."' LIMIT 1"; $res = mysql_query($query); if ($row = mysql_fetch_assoc($res)) $rip = $row['ip']; @@ -13,7 +13,7 @@ } if ($AccIpLimit > 0) { $query = "SELECT COUNT(`id`) AS kol FROM `account` WHERE `last_ip`='".$_SERVER['REMOTE_ADDR']."'"; - $resk = mysql_query($query); + $resk = mysql_query($query); $rowk = mysql_fetch_assoc($resk); $ripk = $rowk['kol']; if ($ripk >= $AccIpLimit){ @@ -24,7 +24,7 @@ if (isset($_POST['reg']) AND ($_POST['reg'] == '1')) { $er = 0; $er_txt = ''; - if (!eregi("^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,4}$",$_POST['email'])) { + if (!mb_eregi("^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,4}$",$_POST['email'])) { $er = 1; $er_txt = $txt['50']; } @@ -44,11 +44,11 @@ $er = 1; $er_txt = $txt['53']; } - } + } if ($er == 0) { mysql_query("INSERT INTO `account` (`username`,`sha_pass_hash`,`email`,`last_ip`,`locked`,`expansion`) VALUES (UPPER('" .$_POST['new_acc']."'),SHA1(CONCAT(UPPER('".$_POST['new_acc']."'),':',UPPER('".$_POST['pass1']."'))),'" - .$_POST['email']."','".$_SERVER['REMOTE_ADDR']."','0','".$def_exp_acc."')"); + .$_POST['email']."','".$_SERVER['REMOTE_ADDR']."','0','".$def_exp_acc."')"); echo ' '.$txt['55'].'


'.$txt[12].'
'; $query2 = "SELECT * FROM `account` WHERE `username`='".strtoupper($_POST['new_acc'])."' AND sha_pass_hash ='".SHA1(strtoupper($_POST['new_acc']).':'.strtoupper($_POST['pass1']))."'"; $res2 = mysql_query($query2); @@ -60,7 +60,7 @@ $_SESSION['slovo'] = strtoupper(SHA1(strtoupper($_POST['new_acc']).':'.strtoupper($_POST['pass1']))); $_SESSION['gnom'] = $row2['gmlevel']; $_SESSION['modul'] = 'news'; - $_SESSION['acpskin'] = $acpskin; + $_SESSION['acpskin'] = $acpskin; $log_account = $_SESSION['user_id']; $log_character = 0; $log_mode = 1; @@ -68,15 +68,15 @@ $log_resultat = ''; $log_note = $_SESSION['kito']; $log_old_data = ''; - require('include/log.php'); + require('include/log.php'); } ReturnMainForm(40); return; - } + } if ($er == 1) { echo ''; echo '
'.$txt[20]; - echo '
'.$er_txt.'
'; + echo ''.$er_txt.''; } } if ($er == 0) { @@ -84,7 +84,7 @@ echo ''.$txt[4].''; echo ' '; echo '
'.$txt[54].'
'; - echo ' '; + echo ' '; } // form begin echo '
'; @@ -95,7 +95,7 @@ echo ''; -// password 1 +// password 1 echo ''.$txt[2].''; echo ' '; echo ''; Index: modules/mail.php =================================================================== --- modules/mail.php (revision 23) +++ modules/mail.php (working copy) @@ -1,16 +1,16 @@
'; echo ''; @@ -24,7 +24,7 @@ $res = mysql_query("SELECT * FROM `mail` WHERE `random` = '".$_GET['id']."' LIMIT 1"); if ($row = mysql_fetch_assoc($res)) { if (isset($_POST['id']) AND ($_POST['id'] == 13)) { - if (eregi("^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,4}$", $_POST['new_email'])) { + if (mb_eregi("^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]{2,4}$", $_POST['new_email'])) { $r_connect = mysql_connect($r_ip, $r_userdb, $r_pw); mysql_select_db($r_db, $r_connect); mysql_query("SET NAMES '$encoding'"); @@ -60,16 +60,16 @@ mysql_query("UPDATE `account` set `sha_pass_hash` = '".$new_hash."', `s` = null, `v` = null, `sessionkey` = null WHERE `id` = ".$row['account']); $mail_event = 'standart'; $mail_body = $txt[117]; - $mail_body2 = $txt[1].': '.$r3['username'].'

'.$txt[118].': '.$new_pass.''; + $mail_body2 = $txt[1].': '.$r3['username'].'

'.$txt[118].': '.$new_pass.''; $post_mail = $row['email']; - require("include/mailsend.php"); + require("include/mailsend.php"); echo ' '.$txt[116].'
'; $log_account = $row['account']; $log_character = 0; $log_mode = 3; $log_email = $row['email']; - $log_resultat = $new_hash; + $log_resultat = $new_hash; if ($LogSavePass == 1) $log_note = $new_pass; else $log_note = ''; $log_old_data = $r3['sha_pass_hash']; Index: modules/bans.php =================================================================== --- modules/bans.php (revision 23) +++ modules/bans.php (working copy) @@ -5,7 +5,7 @@ mysql_query("UPDATE `account_banned` SET `active` = 0 WHERE (`bandate` < `unbandate`) and (`unbandate` < UNIX_TIMESTAMP())"); mysql_query("DELETE FROM `ip_banned` WHERE (`bandate` < `unbandate`) and (`unbandate` < UNIX_TIMESTAMP())"); if (isset($_SESSION['gnom']) and ($_SESSION['gnom'] >= $UnBanLevel)) { - if (isset($_GET['ui']) and ereg("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$",$_GET['ui'])) { + if (isset($_GET['ui']) and mb_ereg("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$",$_GET['ui'])) { mysql_query("DELETE FROM `ip_banned` WHERE `ip` = '".$_GET['ui']."'"); $log_account = $_SESSION['user_id']; $log_character = 0; @@ -55,7 +55,7 @@ if (isset($_SESSION['gnom']) and ($_SESSION['gnom'] >= $UnBanLevel)) { echo ''; echo '   '; - } + } if ($_SESSION['user_id'] == $mres['idd']) echo ''.$mres['username'].''; else echo $mres['username']; echo ''; @@ -91,7 +91,7 @@ if (isset($_SESSION['gnom']) and ($_SESSION['gnom'] >= $UnBanLevel)) { echo ''; echo '   '; - } + } if ($mres['ip'] == $_SERVER['REMOTE_ADDR']) echo ''.$mres['ip'].''; else echo $mres['ip']; echo ''; @@ -140,6 +140,6 @@ echo '
'.$txt[108].'
'; } echo ''; -//if (isset($_SESSION['gnom']) and ($_SESSION['gnom'] >= $UnBanLevel)) +//if (isset($_SESSION['gnom']) and ($_SESSION['gnom'] >= $UnBanLevel)) echo "
"; ?> \ No newline at end of file