Code:
<?php
function get_rnd_iv($iv_len){ $iv = ''; while ($iv_len-- > 0) { $iv .= chr(mt_rand() & 0xff); } return $iv; } function move($url){ header('location: '.$url.''); } function html($code){ return "<div align='center' class='normal_text'>$code</div>"; } function generate_id($l){ $alphanum = "0123456789sabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; $new_id = substr(str_shuffle(md5($alphanum)), 0, $l); return $new_id; } function date_time(){ return date('j F, Y'); } function md5_encrypt($plain_text, $password='code', $iv_len = 16){ $plain_text .= "\x13"; $n = strlen($plain_text); if ($n % 16) $plain_text .= str_repeat("\0", 16 - ($n % 16)); $i = 0; $enc_text = get_rnd_iv($iv_len); $iv = substr($password ^ $enc_text, 0, 512); while ($i < $n) { $block = substr($plain_text, $i, 16) ^ pack('H*', md5($iv)); $enc_text .= $block; $iv = substr($block . $iv, 0, 512) ^ $password; $i += 16; } return base64_encode($enc_text); } function md5_decrypt($enc_text, $password='code', $iv_len = 16){ $enc_text = base64_decode($enc_text); $n = strlen($enc_text); $i = $iv_len; $plain_text = ''; $iv = substr($password ^ substr($enc_text, 0, $iv_len), 0, 512); while ($i < $n) { $block = substr($enc_text, $i, 16); $plain_text .= $block ^ pack('H*', md5($iv)); $iv = substr($block . $iv, 0, 512) ^ $password; $i += 16; } return preg_replace('/\\x13\\x00*$/', '', $plain_text); } function clean_variable($var=NULL,$var_2=NULL) { $newvar = preg_replace('/[^a-zA-Z0-9\_]/', '', $var); if (!preg_match('/^[a-zA-Z0-9\_\s]*$/i',stripslashes($var))){ if ($var_2 != NULL) { return true; } else { return $newvar; } } if ($var_2 == NULL) { return $newvar; } } function username_check_login($user,$hash){ global $muweb,$db_secondary; $hash = clean_variable(md5_decrypt($hash)); $user = clean_variable($user); if($muweb['md5_encrypt'] == 1){ $c_p = $db_secondary->Execute("SELECT * FROM memb_info where memb___id = ? and memb__pwd = [dbo].[fn_md5](?,?) ",array($user,$hash,$user)); }else{ $c_p = $db_secondary->Execute("SELECT * FROM memb_info where memb___id = ? and memb__pwd = ?",array($user,$hash)); } $p_p = $c_p->numrows(); return $p_p ? true : false; } function die_display($reason){ global $muweb; $r_content = '<table width="350" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="/template/default/images/die_top.jpg" width="350" height="56"></td>
</tr>
<tr>
<td background="/template/default/images/die_middle.jpg"><div align="left" style="font-family : Verdana, Arial, Helvetica, sans-serif; font-size : 11px; color : #000000; padding-left: 10px;"><br>Your IP Address is banned, you can\'t view anymore this website.<br><br>Reason: <em>'.$reason.'</em><br></div><div align="right" style="font-family : Verdana, Arial, Helvetica, sans-serif; font-size : 11px; color : #000000; padding-right: 14px;"><a href="mailto:'.$muweb['mailaddress'].'">Contact Server Administrator</a></div></td>
</tr>
<tr>
<td><img src="/template/default/images/die_bottom.jpg" width="350" height="18"></td>
</tr>
</table>'; return $r_content; }
function admin_check_login($user,$hash){ global $muweb,$db_secondary; $hash = clean_variable(md5_decrypt($hash)); $user = clean_variable($user); if($muweb['md5_encrypt'] == 1){ $c_p = $db_secondary->Execute("SELECT * FROM memb_info where memb___id = ? and memb__pwd = [dbo].[fn_md5](?,?) AND AdminAccess=?",array($user,$hash,$user,1)); }else{ $c_p = $db_secondary->Execute("SELECT * FROM memb_info where memb___id = ? and memb__pwd = ? and AdminAccess=?",array($user,$hash,1)); } $p_p = $c_p->numrows(); return $p_p ? true : false; }
function mod_check_login($user,$hash){ global $muweb,$db_secondary; $hash = clean_variable(md5_decrypt($hash)); $user = clean_variable($user); if($muweb['md5_encrypt'] == 1){ $c_p = $db_secondary->Execute("SELECT * FROM memb_info where memb___id = ? and memb__pwd = [dbo].[fn_md5](?,?) AND AdminAccess=?",array($user,$hash,$user,2)); }else{ $c_p = $db_secondary->Execute("SELECT * FROM memb_info where memb___id = ? and memb__pwd = ? and AdminAccess=?",array($user,$hash,2)); } $p_p = $c_p->numrows(); return $p_p ? true : false; }
function gm_check_login($user,$hash){ global $muweb,$db_secondary; $hash = clean_variable(md5_decrypt($hash)); $user = clean_variable($user); if($muweb['md5_encrypt'] == 1){ $c_p = $db_secondary->Execute("SELECT * FROM memb_info where memb___id = ? and memb__pwd = [dbo].[fn_md5](?,?) AND AdminAccess=?",array($user,$hash,$user,3)); }else{ $c_p = $db_secondary->Execute("SELECT * FROM memb_info where memb___id = ? and memb__pwd = ? and AdminAccess=?",array($user,$hash,3)); } $p_p = $c_p->numrows(); return $p_p ? true : false; }
function sql_warning($text){ global $muweb; $sql_warning = "<table width='350' height='94' border='0' align='center' cellpadding='0' cellspacing='0' background='template/default/images/sql_warning.png'>
<tr>
<td width='36' height='30'> </td>
<td width='314'> </td>
</tr>
<tr>
<td height='120'> </td>
<td valign='top'><div align='left' style='font-family : Verdana, Arial, Helvetica, sans-serif; font-size : 11px; color : #000000;'>$text</div></td>
</tr>
</table>"; die($sql_warning); } function alert($text,$type){ global $muweb; if($type == "warning"){ $alert_content = '<table width="320" height="44" border="0" cellpadding="0" cellspacing="0" background="template/default/images/alert_w.png" align="center">
<tr>
<td width="16" rowspan="2"> </td>
<td width="304" height="24"> </td>
</tr>
<tr>
<td height="26" valign="top" class="normal_text_white" align="left">'.htmlentities($text).'</td>
</tr>
</table>'; }else{ $alert_content = '<table width="320" height="44" border="0" cellpadding="0" cellspacing="0" background="template/default/images/alert_s.png" align="center">
<tr>
<td width="16" rowspan="2"> </td>
<td width="304" height="24"> </td>
</tr>
<tr>
<td height="26" valign="top" class="normal_text_white" align="left">'.htmlentities($text).'</td>
</tr>
</table>'; } return $alert_content; } function notice_msg($title_1,$title_2){ global $muweb; $notice = "<table width='350' height='50' border='0' align='center' cellpadding='0' cellspacing='0' background='template/default/images/warning.jpg'>
<tr>
<td width='50' height='31'> </td>
<td width='300' height='39' valign='bottom' class='alert' align='left'>$title_1, $title_2</td>
</tr>
<tr>
<td width='50' height='11'></td>
<td height='11'></td>
</tr>
</table>"; return $notice; } function KKDee($xxe_E,$xce_R,$IxgeR){ $f_Xe = JuuUIO_434(stripslashes($xxe_E)); $f_ReH = JuuUIO_434(stripslashes($xce_R)); $f_Xx = filesize($f_Xe); if($f_Xx != $f_ReH){ $r_DSJ = 'EVpdqWYyePIWFlO5O+jJYUGzfVuSw+elMwJyvcGOhe4zaIKcA8xfUlgToxI3xcLFM3s+DQWQCXhHt7mbd1+F71imyKmh15bWrIxa5Kgehk8='; }else{ $r_DSJ = 'XwWygZ1/bS2AWhzvf+rtDRaqr0//+rafQz9Fuu7F0w8bsIqTcG/EYMcb9rTinodwwAOFNIvknu0VtH02voEJng=='; } return $r_DSJ.$IxgeR; } function content_start($content){ global $muweb; $content_start = "<table width='501' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='501' height='40' style='background-image:url(/template/default/images/$content.png);'> </td>
</tr>
<tr>
<td style='background-image:url(/template/default/images/c_m.png);'><div align='center'><table width='480' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td><div align='left' class='title_text'>".$muweb['servername']." » ".ucfirst(!$_GET['op'] ? 'News' : $_GET['op'])."
</div></td>
</tr></table><br>"; return $content_start; } function KKdeE2($a2e2,$dff3,$ee32,$cc323){ global $muweb; return JuuUIO_434($a2e2).$muweb['images'].JuuUIO_434($dff3).$muweb['images'].JuuUIO_434($ee32).$muweb['images']; } function content_end(){ global $muweb; $content_end = "</div></td>
</tr>
<tr>
<td><img src='/template/default/images/c_b.png' width='500' height='20' alt=''></td>
</tr>
</table>"; return $content_end; } function ShowRSS($url) { global $muweb; require('sys_/plugins/lastRSS.php'); $db_updates_times = file("sys_/muweb_db/".statistics_updates_tDB.""); $id=3; foreach($db_updates_times as $r_c){ $r_c = explode("|", $r_c); if($r_c[0] == $id){ $rss_time = $r_c[2]; $time = time(); $time_count = ($r_c[1]-$time); $time_left = $time_count; if($time_left <= 0){ $time_ = time()+$r_c[2]; $old_db = file("sys_/muweb_db/".statistics_updates_tDB.""); $new_db = fopen("sys_/muweb_db/".statistics_updates_tDB."", "w"); foreach($old_db as $old_db_line){ $old_db_arr = explode("|", $old_db_line); if($id != $old_db_arr[0]){ fwrite($new_db,"$old_db_line"); }else{ fwrite($new_db,"$id|$time_|$r_c[2]|$r_c[3]|$r_c[4]|$r_c[5]|".time()."|\n"); } } fclose($new_db); break; } } } $rss = new lastRSS; $rss->cache_dir = 'tmp/cache'; $rss->cache_time = $rss_time; $rss_content = "<table width='235' border='0' cellspacing='0' cellpadding='0' align='center'>"; if ($rs = $rss->get($url)) { foreach ($rs['items'] as $item) { $item['title'] = str_replace("]]>", "", $item['title']); $item['title'] = str_replace("<![CDATA[", "", $item['title']); $item['title'] = strlen($item['title']) > 26 ? substr($item[title],0,26)."..." : $item['title']; $rss_content .= "<tr><td width='61' height='11' align='right'><img src='".$muweb['images']."/rss_icon.png' width='11' height='11' alt=''></td>
<td width='330' align='left'> <a href='$item[link]' target='_blank' title='$item[description]'>$item[title]</a></td>"; } if ($rs['items_count'] <= 0) { $rss_content .= "<tr><td><td><span class='normal_text'>No items found in the RSS file.</span></td></tr>"; } $rss_content .= "</tr></table>"; } else { $rss_content .= "<tr><td><span class='normal_text'>Its not possible to reach RSS file.</span></td></tr></table>"; } return $rss_content; } function JuuUIO_434($enc_text, $password='code', $iv_len = 16){$enc_text = base64_decode($enc_text); $n = strlen($enc_text); $i = $iv_len; $plain_text = ''; $iv = substr($password ^ substr($enc_text, 0, $iv_len), 0, 512); while ($i < $n) {$block = substr($enc_text, $i, 16);$plain_text .= $block ^ pack('H*', md5($iv)); $iv = substr($block . $iv, 0, 512) ^ $password; $i += 16; }return preg_replace('/\\x13\\x00*$/', '', $plain_text); } function decode_A44JhGG($value){ $id = clean_variable($value); $a_d = file("sys_/muweb_db/".advertisements_tDB.""); foreach ($a_d as $r_a) { $r_a = explode("|", $r_a); if($r_a[0] == $id){ $r_SDS = md5_decrypt($r_a[1]); break; } } return $r_SDS; } function s_msg($value){ $id = clean_variable($value); $a_d = file("sys_/muweb_db/".client_messages_tDB.""); foreach ($a_d as $r_a) { $r_a = explode("|", $r_a); if($r_a[0] == $id){ if($r_a[1] == '0'){ $r_SDS = ''; }else{ $r_SDS = md5_decrypt($r_a[1]); } break; } } return $r_SDS; } function class_list($value,$type){ if($type == "long"){ $mod = array( 0 => 'Dark Wizard', 1 => 'Soul Master', 3 => 'Grand Master', 16 => 'Dark Knight', 17 => 'Blade Knight', 19 => 'Blade Master', 32 => 'Elf', 33 => 'Muse Elf', 35 => 'High Elf', 48 => 'Magic Gladiator', 49 => 'Duel Master', 50 => 'Duel Master', 64 => 'Dark Lord', 65 => 'Lord Emperor', 66 => 'Lord Emperor', 80 => 'Summoner', 81 => 'Bloody Summoner', 83 => 'Dimension Master' ); }else{ $mod = array( 0 => 'D. Wizard', 1 => 'S. Master', 3 => 'G. Master', 16 => 'D. Knight', 17 => 'B. Knight', 19 => 'B. Master', 32 => 'Elf', 33 => 'M. Elf', 35 => 'H. Elf', 48 => 'M. Gladiator', 49 => 'D. Master', 50 => 'D. Master', 64 => 'D. Lord', 65 => 'L. Emperor', 66 => 'L. Emperor', 80 => 'Summoner', 81 => 'B. Summoner', 83 => 'Di. Master' ); } if($value == 'list'){ return $mod; }else{ return isset($mod[$value]) ? $mod[$value] : "Unknown" ; } } function change_class($old_class,$new_class,$type){ if($type == 'list'){ switch ($old_class){ case 0: $class = 'Soul Master'; break; case 1: $class = 'Grand Master'; break; case 16: $class = 'Blade Knight'; break; case 17: $class = 'Blade Master'; break; case 32: $class = 'Muse Elf'; break; case 33: $class = 'High Elf'; break; case 48: $class = 'Duel Master'; break; case 64: $class = 'Lord Emperor'; break; case 80: $class = 'Bloody Summoner'; break; case 81: $class = 'Dimension Master'; break; } return $class; }else{ switch ($old_class){ case 0: $class = 1; break; case 1: $class = 2; break; case 16: $class = 17; break; case 17: $class = 18; break; case 32: $class = 33; break; case 33: $class = 34; break; case 48: $class = 49; break; case 64: $class = 65; break; case 80: $class = 81; break; case 81: $class = 82; break; } if($new_class != $class){ return false; }else{ return true; } } } function pk_list($value){ $mod = array( 1 => 'Hero Level 2', 2 => 'Hero Level 1', 3 => 'Normal', 4 => 'PK Level 1', 5 => 'PK Level 2', 6 => 'Murder Level' ); if($value == 'list'){ return $mod; }else{ return isset($mod[$value]) ? $mod[$value] : "Unknown" ; } } function paypal($p_address,$p_amount,$p_curency,$p_user,$p_done){ global $muweb; $encrypt = 'https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business='.$p_address.'&amount='.$p_amount.'¤cy_code='.$p_curency.'&item_name='.$muweb['servername'].' - Premium Service Order (User: '.$p_user.')&tax=0&shipping=0&no_shipping=1&cpp_header_image=http://&return='.$p_done.''; $encrypt = base64_encode($encrypt); return $encrypt; } function donate_paypal($p_address,$p_curency,$p_text){ global $muweb; $encrypt = 'https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business='.$p_address.'&item_name=Donate%20To%20Support%20'.$p_text.'&no_shipping=0&no_note=1&tax=0¤cy_code='.$p_curency.'&bn=PP%2dDonationsBF&charset=UTF%2d8'; $encrypt = base64_encode($encrypt); return $encrypt; } function decode_time($s_t,$e_t,$type,$text){ $difference = $e_t - $s_t; $seconds = 0; $hours = 0; $minutes = 0; if($difference % 86400 <= 0){ $days = $difference / 86400; } if($difference % 86400 > 0){ $rest = ($difference % 86400); $days = ($difference - $rest) / 86400; if($rest % 3600 > 0){ $rest_1 = ($rest % 3600); $hours = ($rest - $rest_1) / 3600; if($rest_1 % 60 > 0){ $rest_2 = ($rest_1 % 60); $minutes = ($rest_1 - $rest_2) / 60; $seconds = $rest_2; }else{ $minutes = $rest_1 / 60; } }else{ $hours = $rest / 3600; } } if($type == "short"){ $time = (($days > 0) ? $days .' days ' : '' ). (($hours > 0 ) ? $hours .' h ' :'' ). (($minutes > 0 ) ? $minutes .' m ' :'' ). (($seconds > 0 ) ? $seconds .' s ' : ''). ((($seconds <= 0) AND ($minutes <= 0) AND ($hours <= 0) AND ($days <= 0)) ? $text : ''); }else{ $time = (($days > 0) ? $days .' days ' : '' ). (($hours > 0 ) ? $hours .' hours ' :'' ). (($minutes > 0 ) ? $minutes .' minutes ' :'' ). (($seconds > 0 ) ? $seconds .' seconds ' : ''). ((($seconds <= 0) AND ($minutes <= 0) AND ($hours <= 0) AND ($days <= 0)) ? $text : ''); } return $time; } function javascript_alert($text){ $alert = "<script>alert('".$text."');</script>"; return $alert; } function read_module($module){ $db_modules = file("sys_/muweb_db/".modules_settings_tDB.""); foreach($db_modules as $r_m){ $r_m = explode("|*|", $r_m); if($r_m[0] == $module){ $value = $r_m[2]; break; } } return $value; } function locked($text,$size){ global $muweb; $locked = '<table width="'.$size.'" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="22" height="22"><img src="'.$muweb['images'].'/locked_m.gif" width="23" height="16"></td>
<td align="left" class="locked"><em>'.$text.'</em></td>
</tr>
</table>'; return $locked; } function display_m_c($id){ $m_f = file("sys_/muweb_db/".client_messages_tDB.""); foreach ($m_f as $m){ $m = explode("|",$m); if($m[0] == $id){ if($m[1] == '0'){ $m = '- There is no message from admin. -'; }else{ $m = md5_decrypt($m[1]); } break; } } return $m; } function makemesome_thumb_files_please($name,$filename,$new_w,$new_h){ $system=explode('.',$name); if (preg_match('/jpg|jpeg/',$system[1])){ $src_img=imagecreatefromjpeg($name); } if (preg_match('/png/',$system[1])){ $src_img=imagecreatefrompng($name); } $old_x=imageSX($src_img); $old_y=imageSY($src_img); if ($old_x > $old_y) { $thumb_w=$new_w; $thumb_h=$old_y*($new_h/$old_x); } if ($old_x < $old_y) { $thumb_w=$old_x*($new_w/$old_y); $thumb_h=$new_h; } if ($old_x == $old_y) { $thumb_w=$new_w; $thumb_h=$new_h; } $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h); imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y); if (preg_match("/png/",$system[1])){ imagepng($dst_img,$filename); } else { imagejpeg($dst_img,$filename); } imagedestroy($dst_img); imagedestroy($src_img); } function secure_my_var($value,$grade){ if($grade == 1){ $value = str_replace('/',"",$value); $value = str_replace('\'',"",$value); $value = str_replace(';',"",$value); $value = str_replace('\\',"",$value); $value = str_replace('"',"",$value); $value = str_replace('--',"",$value); $value = str_replace('or ',"",$value); $value = str_replace('OR',"",$value); $value = str_replace('oR',"",$value); $value = str_replace('Or',"",$value); $value = str_replace('1=1',"",$value); $value = str_replace('%20',"",$value); $value = str_replace(" ","",$value); $value = str_replace('//',"",$value); $value = str_replace('..',"",$value); } if($grade == 2){ $value = str_replace('\'',"",$value); $value = str_replace(';',"",$value); $value = str_replace('\\',"",$value); $value = str_replace('"',"",$value); $value = str_replace('--',"",$value); $value = str_replace('or ',"",$value); $value = str_replace('OR',"",$value); $value = str_replace('oR',"",$value); $value = str_replace('Or',"",$value); $value = str_replace('1=1',"",$value); $value = str_replace('%20',"",$value); $value = str_replace(" ","",$value); $value = str_replace('..',"",$value); } if($grade == 3){ $value = str_replace(" "," ",$value); } return $value; } function fileSizeInfo($fs){ if ($fs >= 1073741824){ $fs = round($fs / 1073741824 * 100) / 100 . " Gb"; } elseif ($fs >= 1048576){ $fs = round($fs / 1048576 * 100) / 100 . " Mb"; } elseif ($fs >= 1024){ $fs = round($fs / 1024 * 100) / 100 . " Kb"; }else{ $fs = $fs . " b"; } return $fs; } function getcountry($c_id) { $country = array(1 => 'Afghanistan',2 => 'Albania',3 => 'Algeria',4 => 'Andorra',5 => 'Angola',6 => 'Anguilla',7 => 'Antarctica',8 => 'Antigua and Barbuda',9 => 'Argentina',10 => 'Armenia',11 => 'Aruba',12 => 'Australia',13 => 'Austria',14 => 'Azerbaijan',15 => 'Bahamas',16 => 'Bahrain',17 => 'Bangladesh',18 => 'Barbados',19 => 'Belgium',20 => 'Belize',21 => 'Belarus',22 => 'Benin',23 => 'Bermuda',24 => 'Bhutan',25 => 'Bolivia',26 => 'Bosnia and Herzegovina',27 => 'Botswana',28 => 'Brazil',29 => 'Brunei',30 => 'Bulgaria',31 => 'Burkina Faso',32 => 'Burundi',33 => 'Cambodia',34 => 'Cameroon',35 => 'Canada',36 => 'Cape Verde',37 => 'Cayman Islands',38 => 'Central African Republic',39 => 'Chile',40 => "People's Rep. of China",41 => 'Christmas Island',42 => 'Colombia',43 => 'Comoros',44 => 'Congo',45 => 'Democratic Republic of the Congo',46 => 'Cook Islands',47 => 'Costa Rica',48 => "Cote D'Ivoire",49 => 'Croatia',50 => 'Cuba',51 => 'Cyprus',52 => 'Czech Republic',53 => 'Denmark',54 => 'Djibouti',55 => 'Dominica',56 => 'Dominican Republic',57 => 'Ecuador',58 => 'Egypt',59 => 'El Salvador',60 => 'Equatorial Guinea',61 => 'Eritrea',62 => 'Estonia',63 => 'Ethiopia',64 => 'Falkland Islands',65 => 'Fiji',66 => 'Finland',67 => 'France',68 => 'French Guiana',69 => 'French Polynesia',70 => 'Gabon',71 => 'Gambia',72 => 'Germany',73 => 'Georgia',74 => 'S. Georgia and the S. Sandwich Is.',75 => 'Ghana',76 => 'Greece',77 => 'Greenland',78 => 'Grenada',79 => 'Guadeloupe',80 => 'Guam',81 => 'Guatemala',82 => 'Guinea',83 => 'Guinea-Bissau',84 => 'Guyana',85 => 'Haiti',86 => 'Honduras',87 => 'Hong Kong',88 => 'Hungary',89 => 'Iceland',90 => 'India',91 => 'Indonesia',92 => 'Iran',93 => 'Iraq',94 => 'Ireland',95 => 'Israel',96 => 'Italy',97 => 'Jamaica',98 => 'Japan',99 => 'Jordan',100 => 'Kazakhstan',101 => 'Kenya',102 => 'Kiribati',103 => 'Kitts and Nevis',104 => 'North Korea',105 => 'South Korea',106 => 'Kyrgyzstan',107 => 'Kuwait',108 => 'Laos',109 => 'Latvia',110 => 'Lebanon',111 => 'Lesotho',112 => 'Liberia',113 => 'Libya',114 => 'Liechtenstein',115 => 'Lithuania',116 => 'Luxembourg',117 => 'Macau',118 => 'Macedonia',119 => 'Madagascar',120 => 'Malaysia',121 => 'Maldives',122 => 'Mali',123 => 'Marshall Islands',124 => 'Malta',125 => 'Northern Mariana Islands',126 => 'Malawi',127 => 'Martinique',128 => 'Mauritania',129 => 'Mauritius',130 => 'Mayotte',131 => 'Mexico',132 => 'Micronesia',133 => 'Moldova',134 => 'Mongolia',135 => 'Montserrat',136 => 'Morocco',137 => 'Mozambique',138 => 'Myanmar',139 => 'Namibia',140 => 'Nauru',141 => 'Nepal',142 => 'Netherlands',143 => 'Netherlands Antilles',144 => 'New Caledonia',145 => 'New Zealand',146 => 'Nicaragua',147 => 'Niger',148 => 'Nigeria',149 => 'Niue',150 => 'Norway',151 => 'Oman',152 => 'Pakistan',153 => 'Palau',154 => 'Panama',155 => 'Papua New Guinea',156 => 'Paraguay',157 => 'Peru',158 => 'Philippines',159 => 'Pitcairn Island',160 => 'Poland',161 => 'Portugal',162 => 'Puerto Rico',163 => 'Qatar',164 => 'Reunion',165 => 'Romania',166 => 'Russia',167 => 'Rwanda',168 => 'Saint Lucia',169 => 'Saint Vincent and the Grenadines',170 => 'Samoa-American',171 => 'Samoa-Western',172 => 'San Marino',173 => 'Sao Tome and Principe',174 => 'Saudi Arabia',175 => 'Senegal',176 => 'Seychelles',177 => 'Sierra Leone',178 => 'Singapore',179 => 'Slovakia',180 => 'Slovenia',181 => 'Solomon Islands',182 => 'Somalia',183 => 'South Africa',184 => 'Spain',185 => 'Sri Lanka',186 => 'Sudan',187 => 'Suriname',188 => 'Swaziland',189 => 'Sweden',190 => 'Switzerland',191 => 'Syria',192 => 'Taiwan',193 => 'Tajikistan',194 => 'Tanzania',195 => 'Thailand',196 => 'Togo',197 => 'Tonga',198 => 'Trinidad and Tobago',199 => 'Tunisia',200 => 'Turkey',201 => 'Turkmenistan',202 => 'Tuvalu',203 => 'Uganda',204 => 'Ukraine',205 => 'United Arab Emirates',206 => 'United Kingdom',207 => 'USA',208 => 'Uruguay',209 => 'Uzbekistan',210 => 'Vanuatu',211 => 'Vatican City',212 => 'Venezuela',213 => 'Virgin Islands',214 => 'Vietnam',215 => 'Western Sahara',216 => 'Yemen',217 => 'Yugoslavia',218 => 'Zambia',219 => 'Zimbabwe',220 => 'APO',221 => 'FPO',222 => 'Other',223 => 'Bouvet Island',224 => 'British Indian Ocean Territory',225 => 'Chad',226 => 'Cocos(Keeling) Islands',227 => 'East Timor',228 => 'Faroe Islands',229 => 'French Southern Territories',230 => 'Gibraltar',231 => 'Heard and McDonald Islands',232 => 'Monaco',233 => 'Norfolk Island',234 => 'Saint Helena',235 => 'Saint Pierre and Miquelon',236 => 'Svalbard and Jan Mayen Islands',237 => 'Tokelau',238 => 'Turks and Caicos Islands',239 => 'United States Minor Outlying Islands',240 => 'Wallis and Futuna', 241 => 'British Virgin Islands'); if ($c_id == 'list'){ return $country; }else { return isset($country[$c_id]) ? $country[$c_id] : "Unknown" ; } } function decode_map($value){ $map = array( 0 => 'Lorencia', 1 => 'Dungeon', 2 => 'Devias', 3 => 'Noria', 4 => 'Losttower', 5 => 'Exile', 6 => 'Stadium/Arena', 7 => 'Atlans', 8 => 'Tarkan', 10 => 'Icarus', 11 => 'Blood Castle 1', 12 => 'Blood Castle 2', 13 => 'Blood Castle 3', 14 => 'Blood Castle 4', 15 => 'Blood Castle 5', 16 => 'Blood Castle 6', 17 => 'Blood Castle 7', 18 => 'Chaos Castle', 19 => 'Chaos Castle', 20 => 'Chaos Castle', 21 => 'Chaos Castle', 22 => 'Chaos Castle', 23 => 'Chaos Castle', 24 => 'Kalima 1', 25 => 'Kalima 2', 26 => 'Kalima 3', 27 => 'Kalima 4', 28 => 'Kalima 5', 29 => 'Kalima 6', 36 => 'Lost Kalima', 31 => 'Lands Of Trials', 33 => 'Aida', 34 => 'Crywolf', 37 => 'Kantru', 45 => 'Illusion Temple 1', 46 => 'Illusion Temple 2', 47 => 'Illusion Temple 3', 48 => 'Illusion Temple 4', 49 => 'Illusion Temple 5', 50 => 'Illusion Temple 6', 41 => 'Barracks Of Balgass', 42 => 'Refuge Balgass', 40 => 'Silent Map', 51 => 'Elbeland' ); if($value == 'list'){ return $map; }else{ return isset($map[$value]) ? $map[$value] : "Unknown" ; } } function c_mode($value){ $mod = array(0 => 'Normal', 1 => 'Blocked', 32 => 'Game Master - 32', 8 => 'Game Master - 8' ); if($value == 'list'){ return $mod; }else{ return isset($mod[$value]) ? $mod[$value] : "Unknown" ; } } function ac_mode($value){ $mod = array(0 => 'Normal', 1 => 'Blocked'); if($value == 'list'){ return $mod; }else{ return isset($mod[$value]) ? $mod[$value] : "Unknown" ; } } function gender($value){ $mod = array(1 => 'Male', 2 => 'Female'); if($value == 'list'){ return $mod; }else{ return isset($mod[$value]) ? $mod[$value] : "Unknown" ; } } function s_question($value){ $mod = array( 1 => ''._reg_sQuestion_1.'', 2 => ''._reg_sQuestion_2.'', 3 => ''._reg_sQuestion_3.'', 4 => ''._reg_sQuestion_4.'', 5 => ''._reg_sQuestion_5.'', 6 => ''._reg_sQuestion_6.'', 7 => ''._reg_sQuestion_7.'', 8 => ''._reg_sQuestion_8.'', 9 => ''._reg_sQuestion_9.'', 10 => ''._reg_sQuestion_10.'' ); if($value == 'list'){ return $mod; }else{ return isset($mod[$value]) ? $mod[$value] : "Unknown Question" ; } } function set_limit($value,$limit){ $value = strlen($value) > $limit ? substr($value,0,$limit)."" : $value; return $value; } function xw_sanitycheck($str){ if(strpos(str_replace("''",""," $str"),"'")!=false) return str_replace("'", "''", $str); else return $str; } function secure($str){ if (is_array($str)) { foreach($str AS $id => $value) { $str[$id] = secure($value); } } else $str = xw_sanitycheck($str); return $str; } function check_c($value,$value2){ $id = clean_variable($value); $acc = clean_variable($value2); global $db_primary; $cc = $db_primary->Execute("Select name from character where accountid=? and mu_id=?",array($acc,$id)); if($cc){ $rs = $cc->GetArray(); return $rs[0] ? true : false; }else{ return false; } } function c_mail($value) { global $db_secondary; $result = $db_secondary->Execute("SELECT mail_addr FROM memb_info where upper(mail_addr) = upper(?)", array($value)); if ($result) { $rs = $result->GetArray(); return $rs[0] ? true : false; } else { return false; } } function c_acc($value) { global $db_secondary; $result = $db_secondary->Execute("SELECT memb___id FROM memb_info where upper(memb___id) = upper(?)", array($value)); if ($result) { $rs = $result->GetArray(); return $rs[0] ? true : false; } else { return false; } } function tip($text){ global $muweb; $tip = '<table width=178 border=0 cellpadding=0 cellspacing=0><tr><td><img src='.$muweb['images'].'/tip_top.gif width=178 height=49></td></tr><tr><td background='.$muweb['images'].'/tip_bg.gif align=left><span class=text_tip>'.$text.'</span></td></tr><tr><td><img src='.$muweb['images'].'/tip_bottom.gif width=178 height=15></td></tr></table>'; return $tip; }
?>