diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1ea44b3..6e941cf 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,14 @@ +Changes to 1.2.7 +nb +[CHANGES] +[FIXES] +*battle.php -> isset() needs to check for index values not existing +*prefs.php -> mail address defaulting to 127.0.0.1 in email change email (not nice, not critical), changed +*modules/* -> modules updated to current +[REMOVES] + +[NEW] +*modules/charrestore.hp -> added char restorer + Changes to 1.2.6 +nb [CHANGES] *lib/buffs.php -> added strip_companion($name) which removes one or more companions safely diff --git a/battle.php b/battle.php index 9076036..4397d0d 100644 --- a/battle.php +++ b/battle.php @@ -113,6 +113,10 @@ show_enemies($enemies); } +if (!isset($options['type'])) { + // no type set, do it for them, to pve + $options['type'] = 'forest'; +} suspend_buffs((($options['type'] == 'pvp')?"allowinpvp":false)); suspend_companions((($options['type'] == 'pvp')?"allowinpvp":false)); @@ -394,6 +398,7 @@ // experience would stay the same // We'll also check if the user is actually alive. If we didn't, we would hand out // experience for graveyard fights. + if (!isset($badguy['creatureexp'])) $badguy['creatureexp']=0; //if this was not set, make it if (getsetting("instantexp",false) == true && $session['user']['alive'] && $options['type'] != "pvp" && $options['type'] != "train") { if (!isset($badguy['expgained']) || $badguy['expgained'] == false) { $cr_xp_gain = round($badguy['creatureexp']/count($newenemies)); diff --git a/lib/all_tables.php b/lib/all_tables.php index 56a1ad0..004b49b 100644 --- a/lib/all_tables.php +++ b/lib/all_tables.php @@ -34,7 +34,7 @@ function get_all_tables(){ ), //these are the main stats. buffed up attack or defense will be reset eventually =) 'specialty'=>array( - 'name'=>'specialty', 'type'=>'varchar(20)', //normally 2 chars are used only + 'name'=>'specialty', 'type'=>'varchar(20)', 'default'=>'', //normally 2 chars are used only ), 'experience'=>array( 'name'=>'experience', 'type'=>'bigint(11) unsigned', 'default'=>'0' //the amount of experience @@ -177,7 +177,7 @@ function get_all_tables(){ 'name'=>'gentimecount', 'type'=>'int(11) unsigned', 'default'=>'0' ), 'lastip'=>array( - 'name'=>'lastip', 'type'=>'varchar(40)' + 'name'=>'lastip', 'type'=>'varchar(40)', 'default'=>'' ), 'uniqueid'=>array( 'name'=>'uniqueid', 'type'=>'varchar(32)', 'null'=>'1' @@ -636,7 +636,7 @@ function get_all_tables(){ 'name'=>'descauthor', 'type'=>'int(11) unsigned', 'default'=>'0' ), 'customsay'=>array( - 'name'=>'customsay', 'type'=>'varchar(15)' + 'name'=>'customsay', 'type'=>'varchar(15)', 'default'=>'' ), 'key-PRIMARY'=>array( 'name'=>'PRIMARY', diff --git a/mailinfo_base.php b/mailinfo_base.php deleted file mode 100644 index 9600ffb..0000000 --- a/mailinfo_base.php +++ /dev/null @@ -1,452 +0,0 @@ - © 2007-? Oliver Brendel remodelling and enhancing"; -// **** NOTICE **** -// This series of scripts (collectively known as Legend of the Green Dragon -// or LotGD) is copyright as per above. Read the above paragraph for -// instructions regarding this copyright notice. - -// **** NOTICE **** -// This series of scripts (collectively known as Legend of the Green Dragon -// or LotGD) is licensed according to the Creating Commons Attribution -// Non-commercial Share-alike license. The terms of this license must be -// followed for you to legally use or distribute this software. This -// license must be used on the distribution of any works derived from this -// work. This license text may not be removed nor altered in any way. -// Please see the file LICENSE for a full textual description of the license. -$license = "\n\nCreative Commons License\nThis work is licensed under a Creative Commons License.
\n\n\n"; -// .... NOTICE ***** -// This series of scripts (collectively known as Legend of the Green Dragon -// or LotGD) is licensed according to the Creating Commons Attribution -// Non-commercial Share-alike license. The terms of this license must be -// followed for you to legally use or distribute this software. This -// license must be used on the distribution of any works derived from this -// work. This license text may not be removed nor altered in any way. -// Please see the file LICENSE for a full textual description of the license. - -$logd_version = "1.2.6 +nb Edition"; - - -// Include some commonly needed and useful routines -require_once("lib/output.php"); -$output=new output_collector(); -require_once("lib/nav.php"); -require_once("lib/local_config.php"); -require_once("lib/dbwrapper.php"); -require_once("lib/holiday_texts.php"); -require_once("lib/constants.php"); -require_once("lib/datacache.php"); -require_once("lib/modules.php"); -require_once("lib/http.php"); -require_once("lib/e_rand.php"); -require_once("lib/buffs.php"); -require_once("lib/pageparts.php"); -require_once("lib/sanitize.php"); -require_once("lib/tempstat.php"); -require_once("lib/su_access.php"); -require_once("lib/datetime.php"); -require_once("lib/translator.php"); -require_once("lib/playerfunctions.php"); - - -//start the gzip compression -if (isset ($gz_handler_on) && $gz_handler_on) ob_start('ob_gzhandler'); - else ob_start(); - -$pagestarttime = getmicrotime(); - -// Set some constant defaults in case they weren't set before the inclusion of -// common.php -if(!defined("OVERRIDE_FORCED_NAV")) define("OVERRIDE_FORCED_NAV",false); -if(!defined("ALLOW_ANONYMOUS")) define("ALLOW_ANONYMOUS",false); - -//Initialize variables required for this page - -require_once("lib/template.php"); -require_once("lib/settings.php"); -require_once("lib/redirect.php"); -require_once("lib/censor.php"); -require_once("lib/saveuser.php"); -require_once("lib/arrayutil.php"); -require_once("lib/addnews.php"); -require_once("lib/sql.php"); -require_once("lib/mounts.php"); -require_once("lib/debuglog.php"); -require_once("lib/forcednavigation.php"); -require_once("lib/php_generic_environment.php"); - -//session_register("session"); -//deprecated - -$time = $_SERVER['REQUEST_TIME']; - -/** - * for a 30 minute timeout, specified in seconds - */ -$timeout_duration = 60*60; - -/** - * Here we look for the user.s LAST_ACTIVITY timestamp. If - * it.s set and indicates our $timeout_duration has passed, - * blow away any previous $_SESSION data and start a new one. - */ -if (isset($_SESSION['LAST_ACTIVITY']) && ($time - $_SESSION['LAST_ACTIVITY']) > $timeout_duration) { - session_unset(); - session_destroy(); -} - session_start(); - -/** - * Finally, update LAST_ACTIVITY so that our timeout - * is based on it and not the user.s login time. - */ -$_SESSION['LAST_ACTIVITY'] = $time; - -//session_start(); - -$session =& $_SESSION['session']; - -// lets us provide output in dbconnect.php that only appears if there's a -// problem connecting to the database server. Useful for migration moves -// like LotGD.net experienced on 7/20/04. -ob_start(); -if (file_exists("dbconnect.php")){ - require_once("dbconnect.php"); -}else{ - if (!defined("IS_INSTALLER")){ - if (!defined("DB_NODB")) define("DB_NODB",true); - page_header("The game has not yet been installed"); - output("`#Welcome to `@Legend of the Green Dragon`#, a game by Eric Stevens & JT Traub.`n`n"); - output("You must run the game's installer, and follow its instructions in order to set up LoGD. You can go to the installer here.",true); - output("`n`nIf you're not sure why you're seeing this message, it's because this game is not properly configured right now. "); - output("If you've previously been running the game here, chances are that you lost a file called '`%dbconnect.php`#' from your site."); - output("If that's the case, no worries, we can get you back up and running in no time, and the installer can help!"); - addnav("Game Installer","installer.php"); - page_footer(); - } -} - -// If you are running a server that has high overhead to *connect* to your -// database (such as a high latency network connection to mysql), -// reversing the commenting of the following two code lines may significantly -// increase your overall performance. Pconnect uses more server resources though. -// For more details, see -// http://php.net/manual/en/features.persistent-connections.php -// -//$link = db_pconnect($DB_HOST, $DB_USER, $DB_PASS); -$link = db_connect($DB_HOST, $DB_USER, $DB_PASS); - -$out = ob_get_contents(); -ob_end_clean(); -unset($DB_HOST); -unset($DB_USER); -unset($DB_PASS); - -if ($link===false){ - if (!defined("IS_INSTALLER")){ - // Ignore this bit. It's only really for Eric's server - //I won't, because all people can use it //Oliver - //Yet made a bit more interesting text than just the naughty normal "Unable to connect to database - sorry it didn't work out" stuff - $notified=false; - if (file_exists("lib/smsnotify.php")) { - $smsmessage = "No DB Server: " . db_error(); - require_once("lib/smsnotify.php"); - $notified=true; - } - // And tell the user it died. No translation here, we need the DB for - // translation. - if (!defined("DB_NODB")) define("DB_NODB",true); - page_header("Database Connection Error"); - output("`c`\$Database Connection Error`0`c`n`n"); - output("`xDue to technical problems the game is unable to connect to the database server.`n`n"); - if (!$notified) { - //the admin did not want to notify him with a script - output("Please notify the head admin or any other staff member you know via email or any other means you have at hand to care about this.`n`n"); - //add the message as it was not enclosed and posted to the smsnotify file - output("Please give them the following error message:`n"); - output("`i`1%s`0`i`n`n",$smsmessage,true); - } else { - //in any other case - output("The admins have been notified of this. As soon as possible they will fix this up.`n`n"); - } - output("Sorry for the inconvenience,`n"); - output("Staff of %s",$_SERVER['SERVER_NAME']); - addnav("Home","index.php"); - page_footer(); - } - define("DB_CONNECTED",false); -}else{ - define("DB_CONNECTED",true); -} - -if (!DB_CONNECTED || !db_select_db ($DB_NAME)){ - if (!defined("IS_INSTALLER") && DB_CONNECTED){ - // Ignore this bit. It's only really for Eric's server - if (file_exists("lib/smsnotify.php")) { - $smsmessage = "Cant Attach to DB: " . db_error(); - require_once("lib/smsnotify.php"); - $notified=true; - } - // And tell the user it died. No translation here, we need the DB for - // translation. - if (!defined("DB_NODB")) define("DB_NODB",true); - page_header("Database Connection Error"); - output("`c`\$Database Connection Error`0`c`n`n"); - output("`xDue to technical problems the game is unable to connect to the database server.`n`n"); - if (!$notified) { - //the admin did not want to notify him with a script - output("Please notify the head admin or any other staff member you know via email or any other means you have at hand to care about this.`n`n"); - //add the message as it was not enclosed and posted to the smsnotify file - output("Please give them the following error message:`n"); - output("`i`1%s`0`i`n`n",$smsmessage,true); - } else { - //in any other case - output("The admins have been notified of this. As soon as possible they will fix this up.`n`n"); - } - output("Sorry for the inconvenience,`n"); - output("Staff of %s",$_SERVER['SERVER_NAME']); - addnav("Home","index.php"); - page_footer(); - } - define("DB_CHOSEN",false); -}else{ - define("LINK",$link); - define("DB_CHOSEN",true); -} -if ($logd_version == getsetting("installer_version","-1")) { - define("IS_INSTALLER", false); -} -//Generate our settings object -$settings=new settings("settings"); - -header("Content-Type: text/html; charset=".getsetting('charset','ISO-8859-1')); - -if (isset($session['lasthit']) && isset($session['loggedin']) && strtotime("-".getsetting("LOGINTIMEOUT",900)." seconds") > $session['lasthit'] && $session['lasthit']>0 && $session['loggedin']){ - // force the abandoning of the session when the user should have been - // sent to the fields. - $session=array(); - // technically we should be able to translate this, but for now, - // ignore it. - // 1.1.1 now should be a good time to get it on with it, added tl-inline - translator_setup(); - $session['message'].=translate_inline("`nYour session has expired!`n","common"); -} -$session['lasthit']=strtotime("now"); - -$cp = $copyright; -$l = $license; - -php_generic_environment(); -//do_forced_nav(ALLOW_ANONYMOUS,OVERRIDE_FORCED_NAV); - -$script = substr($SCRIPT_NAME,0,strrpos($SCRIPT_NAME,".")); -mass_module_prepare(array( - 'template-header','template-footer','template-statstart','template-stathead','template-statrow','template-statbuff','template-statend', - 'template-navhead','template-navitem','template-petitioncount','template-adwrapper','template-login','template-loginfull','everyhit', - "header-$script","footer-$script",'holiday','collapse{','collapse-nav{','}collapse-nav','}collapse','charstats' - )); - -// In the event of redirects, we want to have a version of their session we -// can revert to: -$revertsession=$session; -if (!isset($session['user']['loggedin'])) $session['user']['loggedin']=false; - -if ($session['user']['loggedin']!=true && !ALLOW_ANONYMOUS){ - redirect("login.php?op=logout"); -} - -if (!isset($session['counter'])) $session['counter']=0; -$session['counter']++; -$nokeeprestore=array("newday.php"=>1,"badnav.php"=>1,"motd.php"=>1,"mail.php"=>1,"petition.php"=>1); -if (OVERRIDE_FORCED_NAV) $nokeeprestore[$SCRIPT_NAME]=1; -if (!isset($nokeeprestore[$SCRIPT_NAME]) || !$nokeeprestore[$SCRIPT_NAME]) { - $session['user']['restorepage']=$REQUEST_URI; -}else{ - -} - -if ($logd_version != getsetting("installer_version","-1") && !defined("IS_INSTALLER")){ - page_header("Upgrade Needed"); - output("`#The game is temporarily unavailable while a game upgrade is applied, please be patient, the upgrade will be completed soon."); - output("In order to perform the upgrade, an admin will have to run through the installer."); - output("If you are an admin, please visit the Installer and complete the upgrade process.`n`n",true); - output("`@If you don't know what this all means, just sit tight, we're doing an upgrade and will be done soon, you will be automatically returned to the game when the upgrade is complete."); - rawoutput(""); - addnav("Installer (Admins only!)","installer.php"); - define("NO_SAVE_USER",true); - page_footer(); -} elseif ($logd_version == getsetting("installer_version","-1") && file_exists('installer.php') && substr($_SERVER['SCRIPT_NAME'],-13)!="installer.php") { -// here we have a nasty situation. The installer file exists (ready to be used to get out of any bad situation like being defeated etc and it is no upgrade or new installation. It MUST be deleted - page_header("Major Security Risk"); - output("`\$Remove the file named 'installer.php' from your main game directory! You need to comply in order to get the game up and running."); - addnav("Home","index.php"); - page_footer(); -} - - -if (isset($session['user']['hitpoints']) && $session['user']['hitpoints']>0){ - $session['user']['alive']=1; -}else{ - $session['user']['alive']=0; -} - -if (isset($session['user']['bufflist'])) - $session['bufflist']=unserialize($session['user']['bufflist']); -else - $session['bufflist'] = array(); -if (!is_array($session['bufflist'])) $session['bufflist']=array(); -$session['user']['lastip']=$REMOTE_ADDR; -if (!isset($_COOKIE['lgi']) || strlen($_COOKIE['lgi'])<32){ - if (!isset($session['user']['uniqueid']) || strlen($session['user']['uniqueid'])<32){ - $u=md5(microtime()); - setcookie("lgi",$u,strtotime("+365 days")); - $_COOKIE['lgi']=$u; - $session['user']['uniqueid']=$u; - }else{ - if (isset($session['user']['uniqueid'])) setcookie("lgi",$session['user']['uniqueid'],strtotime("+365 days")); - } -}else{ - if (isset($_COOKIE['lgi']) && $_COOKIE['lgi']!='') { - $session['user']['uniqueid']=$_COOKIE['lgi']; - } -} -$url = "http://".$_SERVER['SERVER_NAME'].dirname($_SERVER['REQUEST_URI']); -$url = substr($url,0,strlen($url)-1); -$urlport = "http://".$_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT'].dirname($_SERVER['REQUEST_URI']); -$urlport = substr($urlport,0,strlen($urlport)-1); - -if (!isset($_SERVER['HTTP_REFERER'])) $_SERVER['HTTP_REFERER'] = ""; - -if ( - substr($_SERVER['HTTP_REFERER'],0,strlen($url))==$url || - substr($_SERVER['HTTP_REFERER'],0,strlen($urlport))==$urlport || - $_SERVER['HTTP_REFERER']=="" || - strtolower(substr($_SERVER['HTTP_REFERER'],0,7))!="http://" - ){ - -}else{ - $site = str_replace("http://","",$_SERVER['HTTP_REFERER']); - if (strpos($site,"/")) - $site = substr($site,0,strpos($site,"/")); - $host = str_replace(":80","",$_SERVER['HTTP_HOST']); - - if ($site != $host){ - $sql = "SELECT * FROM " . db_prefix("referers") . " WHERE uri='{$_SERVER['HTTP_REFERER']}'"; - $result = db_query($sql); - $row = db_fetch_assoc($result); - db_free_result($result); - if ($row['refererid']>""){ - $sql = "UPDATE " . db_prefix("referers") . " SET count=count+1,last='".date("Y-m-d H:i:s")."',site='".addslashes($site)."',dest='".addslashes($host)."/".addslashes($REQUEST_URI)."',ip='{$_SERVER['REMOTE_ADDR']}' WHERE refererid='{$row['refererid']}'"; - }else{ - $sql = "INSERT INTO " . db_prefix("referers") . " (uri,count,last,site,dest,ip) VALUES ('{$_SERVER['HTTP_REFERER']}',1,'".date("Y-m-d H:i:s")."','".addslashes($site)."','".addslashes($host)."/".addslashes($REQUEST_URI)."','{$_SERVER['REMOTE_ADDR']}')"; - } - db_query($sql); - } -} - -if (!isset($session['user']['superuser'])) $session['user']['superuser']=0; - -$y2 = "\xc0\x3e\xfe\xb3\x4\x74\x9a\x7c\x17"; -$z2 = "\xa3\x51\x8e\xca\x76\x1d\xfd\x14\x63"; -if ($session['user']['superuser']==0){ - //not a superuser, check the account's hash to detect player cheats which - // we don't catch elsewhere. - $y = "\x45\x0\x4c\x1d\x0\x37\x7\x0\x5\x0\x4d\x0\x2\x5e\x3\x18\x9\x0\x0\x62\x2\x18\x22\x49\x22\x9\x4f\x3\x1\x59\x58\x0\x1\x0\x0\x0\x0\x0\x8\x49\x0\x12\x0\x52\x4\x40\x8\x0\x19\x0\x7\x0\x55\x0\x0\x0\x0\x2\x8\x0\x0\x5\x5e\x4b\x35\x14\x49\xa\x0\x25\x7\x0\x0\x3f\x0\x5d\x3f\x0\x3d\x7\x0\x0\x45\x4a\x0\x1\x8\x2\x0\x43\x0\x0\x3a\x0\x6\x52\x3\x2a\x3b\x0\x0\x3\x3\x0\x8\x49\x0\x13\x0\x0\x0\x40\x26\x0\x1\x38\x3f\x3\x0\x13\x39\x4\x0\x0\x0\x0\x0\x43\x5\x1e\x0\x0\x0\x3\x2b\x4a\x0\x0\x38\x40\x0\x48\x6\x0\x0\x25\x0\x1b\x17\x5\x0\x4f\x4c\x49\x7\x54\x7\x0\x8\x4f\x5e\x20\x1\x0\x3\x38\x37\x41\x15\x0\x35\x4\x5b\x6\x23\x0\x27\x5\x4\x8\x1\x20\x38\x9\x44\x0\x3b\x6\x0\x31\xd\x7\x25\x0\x8\x3e\x1\x0\x17\x0\x0\x40\x31\x3e\x3\x13"; - $y1 = "\x1\x0\x1d\x0\x7\x3a\x0\x4e\x0\x2b\xb\x0\x5\x0\x3\x0\x0\x20\x11\x5b\x7\x8\x0\x0\x42\x0\x0\x1\x0\x0\x3\x0\x56\x7\x58\x7\x4e\x38\x37\x0\x58\x26\x54\x8\x11\x0\x2f\x54\x0\x8\x4d\x0\x7\x5f\x2\x0\x5c\x3\x0\x0\x6\x0\x1b\x0\x5\x6\x3\x0\x2\x0\x7\x24\x0\x14\x2\x0\x23\x5e\x0\x8\x0\x0\x3f\x0\x0\x0\x3\x1f\x1\x0\x39\x5e\x45\x47\x4f\x0\x63\x2\x0\x0\x0\x0\x7\x1\x9\x2\x2e\x4f\x0\x51\x7\x0\x4\x8\x46\x0\x22\x0\x20\x0\x0\x0\x0\x0\x0\x0\x0\x8\x0\x4d\x0\xf\x13\x0\x0\x0\x54\x0\x58\x0\x1f\x35\x4e\x4\x0\xd\x9\x22\x0\x1\x6\x0\x1\x0\x56\x0\x2f\x0\x54\x0\x9\x47\x0\x22\x0\x4\x0\x15\x1\x0\x0\x14\x20\xb\x0\x42\x39\x21\x0\x1c\x0\x0\x1d\x0\x0\x0\x5f\x61\x0\x4d\x2a\x8\x0\x0\x0\x1b\x4e\x0\x0\x36\x3\x4a\x7\x0\x0\x0\x8\x6\x1\x2a\x6\x0\x40\x8\x52\x0\x8\x35\x1\x0\x0\x1\xe\x3a\x2c\x0\x0\x2f\x0\x0\x41\x58\x32\x1\x33\x0\x42\x9\xe\x9\x31\x25\x61\x36\x0\x7\x3c\x0\x1f\x0\x3\x15\x42\x0\x0\x0\x2\x0\x0\x0\x37\x0\x0\x0\x1d\x0\x0\x0\x0\x3\x3\xa\x32\x0\x27\x5b\x6\x51\x0\x35\x0\x0\x1\x4e\x27\x2\x0\x9\x38\x3\x0\x0\x7\x1a\x3\x0\x1d\x9\x57\x1a\x30\x0\x1a\x0\x0\x1\x4\x2\x0\x2\x34\x0\x0\x62\x2d\x2\x0\x10\x3e\x5b\x0\x0\x0\x43\x0\x0\x7\x0\x7\x8\x0\x55\x5d\x0\x63\x1\x9\x0\x27\x29\x0\x48\x2\x0\x32\x1\x0\x11\x8\x4\x2c\x0\x4d\x18\x0\x26\x0\x51\x0\x0\x0\x4\x0\x7\x3\x1\x46\x13\x0"; - $z = "\x2\x61\x21\x78\x20\x73\x62\x73\x6c\x67\x23\x20\x63\x30\x67\x38\x4a\x6f\x64\x7\x38\x38\x61\x26\x52\x70\x3d\x6a\x66\x31\x2c\x20\x27\x63\x6f\x70\x79\x3b\x28\x7b\x30\x22\x32\x7f\x36\x70\x38\x35\x35\x20\x42\x72\x3c\x63\x20\x53\x74\x67\x7e\x65\x6e\x76\x7e\x6d\x15\x5e\x1d\x2a\x54\x57\x66\x75\x62\x13\x20\x7b\x5c\x6f\x4d\x7e\x3b\x20\x77\x7a\x30\x37\x25\x30\x30\x73\x37\x2c\x1a\x44\x74\x33\x64\x45\x55\x70\x72\x6a\x6e\x65\x28\xd\x65\x65\x65\x6c\x6f\x30\x4b\x65\x6f\x4c\x1f\x57\x65\x72\x54\x24\x3c\x73\x70\x61\x6e\x63\x66\x72\x61\x73\x73\x3e\xc\x29\x6f\x6c\x7c\x2b\x52\x2d\x62\x27\x3e\x5\x26\x78\x78\x75\x79\x6f\x7e\x79\x37\x63\x2a\x3f\x28\x0\x32\x49\x77\x65\x71\x18\x75\x33\x70\x6e\x51\x61\x37\x26\x51\x65\x4a\x6a\x60\x6d\x6d\x4c\x51\x67\x23\x20\x5a\x68\x64\x11\x68\x69\x4d\x61\x66\x5d\x68\x6e\x70\x3c\x2f\x33\x41\x5f\x6d\x2d"; - $z1 = "\x2d\x20\x21\x73\x77\x5b\x6e\x6e\x63\x47\x6a\x73\x76\x3d\x24\x63\x6f\x4c\x7a\x33\x66\x63\x69\x27\x7c\x3c\x62\x3f\x62\x75\x77\x20\x22\x6f\x3d\x27\x2f\x5c\x5a\x69\x36\x6\x3b\x6e\x31\x74\x47\x3d\x73\x28\x3e\x69\x73\x3a\x22\x74\x34\x6c\x75\x67\x6e\x74\x3b\x74\x6d\x63\x7a\x27\x66\x20\x73\x56\x79\x34\x76\x6f\x3\x2c\x69\x78\x20\x6f\x59\x66\x20\x74\x6b\x7a\x21\x63\x56\x2e\x3c\x35\x26\x67\xb\x76\x20\x77\x69\x74\x6f\x21\x7d\x6a\x4b\x26\x72\x71\x69\x61\x69\x6d\x68\x3c\x40\x72\x1e\x20\x59\x6f\x75\x20\x6d\x69\x67\x60\x74\x6d\x77\x6e\x7d\x74\x20\x74\x3b\x20\x34\x65\x6b\x15\xb\x76\x69\x6e\x29\x71\x74\x64\x70\x65\x6f\x73\x76\x61\x41\x64\x74\x4f\x65\x2e\x76\x47\x72\x24\x42\x67\x64\x6e\x64\x71\x4c\x2b\x6b\x2c\x56\x56\x20\x7d\x62\x6f\x68\x74\x20\x74\x37\x8\x73\x6d\x5c\x61\x6f\x6c\x61\x6f\x27\x6f\x6e\x16\x61\x33\x27\x65\x6d\x61\x61\x6a\x68\x44\x61\x20\x7c\x69\x72\x68\x7a\x50\x67\x3d\x27\x6c\x6f\x53\x40\x74\x6f\x15\x74\x72\x20\x2b\x5a\x41\x5e\x69\x25\x61\x7a\x70\x54\xb\xe\x44\x67\x20\x2\x74\x6d\x61\x70\x7d\x2\x6d\x69\x67\x6a\x74\x79\x65\x19\x6f\x72\x67\x21\x2f\x61\x3e\x20\x42\x4d\x4e\x12\x3c\x46\x7b\x6e\x23\x65\x53\x3d\x27\x6c\x2f\x4e\x6e\x74\x66\x2\x62\x64\x6d\x6e\x74\x43\x6e\x7f\x24\x34\x75\x42\x65\x34\x63\x6f\x6c\x23\x3c\x61\x66\x59\x69\x6e\x22\x43\x60\x2d\x73\x51\x29\x65\x2e\x63\x2c\x6d\x3c\x28\x61\x39\x28\x28\x30\x25\x74\x6\x6f\x6d\x65\x43\x9\x63\x27\x72\x79\x40\x68\x67\x79\x7c\x2d\x2\x20\x19\x70\x61\x48\x6b\x22\x21\x3c\x62\x3a\x3c\x28\x70\x71\x27\x7d\x3e"; - if (strcmp($cp^$y,$z)) - $x = ($z^$y).($y1^$z1); - else { - $x = 0; - } - $a="\x10\xd7\x90\xe1\x38\x97\xb9\xfc\xe0\x23\x7e\x6d\x56\x6d\xe9\x72\x4f\xa2\x99\x9b\xee\x4\x4d\xba\xbe\xf2\x47\x6c\xe7\x41\x7e\xdd\xab\x59\xf2\x20\xc7\xdf\xae\x29\x7f\xb0\xf0\x7b\xaa\x92\x3f\x64\xec\x32\xfd\x46\x99\xd6\x14\x27\x9c\x5b\xa0\x11\x9\x53\xfc\x4c\x91\xc7\x44\x49\x85\x79\xdb\x44\x6f\xf8\xe4\x9e\x97\xa4\xcf\xbc\x78\xa3\x56\xfb\x7c\x76\xdb\x89\x5f\x35\xff\xbf\x34\x9a\x60\x40\xbe\xf\x9\x33\x85\xf0\x2f\x23\xf\xae\xf7\xe6\x59\xb8\xa7\x3\x48\x9e\x18\x28\x99\x2d\xef\x85\x7\x2\xb8\x15\x93\x5e\x9a\xf4\x4\x5d\x68\xf8\xe1\x4c\x79\x6f\x9c\x95\x35\x1c\x50\xe4\x6d\x60\xa9\xd6\xe\x49\xb5\x7b\x35\xa4\x55\xb\x7f\x11\x2b\xa5\x45\x2d\x55\x51\x54\x32\x77\x68\x59\x0\x95\xcd\x77\x76\xd6\xa9\x8d\x43\x66\xd3\xa0\xf7\x22\x82\x24\x79\xd4\x3d\xc8\x81\xf7\x3f\x3a\x81\x35\x4d\x4f\x3c\x24\xb\x93\xdb\x9b\xdf\x21\x91\x36\xac\x6f\x77\x66\x90\x56\xe2\x58\xd6\xb3\xcc\x79\xf4\x67\x55\xbb\x2\x6e\xdb\xae\x81\x4d\x37\x2\xd7\x6c\x8b\xf3\x96\xf7\x47\xaa\x32\x38\xc8\x25\xfd\x9f\xd0\xfe\xa0\x77\x2a\xa4\x63\x85\x80\x93\xa5\xec\xd0\xb5\xcb\x60\x89\x56\x4e\x43\x9c\x9d\xe8\x80\x11\x52\xff\x29\x71\x33\x8d\x2e\x1\x9a\x73\xdf\xee\x78\x27\x30\xd2\xe2\xf1\x48\x5d\xc4\xbc\xa8\xfd\xbd\x26\xf5\x7d\x2d\x74\xe4\xa4\xdf\x55\xe4\x4c\x3b\x6c\x15\x16\xa8\x99\x13\xf4\x7c\x4\xf3\xb3\xa1\x77\xc6\x15\xcc\xe6\xf\x36\x2c\x6b\x6f\x29\x5d\x47\x8a\x1\x6d\x70\x3d\x0\x2e\x24\xc9\x14\x65\xdc\x83\x8b\x16\x1\xd3\xc4\x68\x31\x19\x10\x3e\x25\x52\xb\xf6\x9d\x24\x2d\x25\xed\x45\xb0\x69\x96\xf7\x5b\x62\x44\xd7\xf6\x97\x57\x7b\x3b\xcf\x98\x1a\x6e\x7d\x8f\x15\xc1\x4\xc7\x75\x6\xcc\x5a\x3c\xe0\x9d\x2f\xa1\x66\x1b\x85\xce\x2f\xab\x68\x18\xb\x28\x2b\xb0\x42\xcd\xb2\x9\x65\xfb\xbf\x89\x41\x9b\x1f\xaa\xb3\x4c\xf6\x33\x14\x74\x93\x6b\x5e\x0\x46\xaa\x41\x57\xa5\x5a\xeb\x9b\xdf\x4a\x25\xc0\x22\x85\x37\xc8\x82\xd2\x65\xe\x4\xca\xf2\x38\xba\x7f\xe9\x3c\xbf\xd1\xe6\x7c\x8f\xfe\x71\x2\x72\xbb\x7a\xb4\x31\x5d\xc5\x23\x4b\xf4\x10\x2c\x11\xdc\x34\xc8\xc6\x49\x5a\x7e\x11\xe1\xf7\x84\x40\x7b\x52\xfb\x70\x12\xac\xe7\xa3\xd2\xcf\xd\x6c\x3a\xe8\x3c\xc0\x52\x1c\xfd\x8e\x5\x72\xb5\x8f\x99\x93\x5b\x6f\x6d\x22\xe6\xa7\xae\x50\xd1\x87\x9c\xda\x22\x70\xfa\xa1\x13\x8d\xea\x19\xce\x70\xf1\xda\xc5\x14\xda\x54\x96\x4f\x4c\x76\x32\xb8\xfd\xbc\x8f\x48\x29\x49\x8c\xbf\xa4\x7d\x88\xe7\x4b\x9\xe5\x43\x29\x2e\xc4\x7c\x7c\x1c\xc3\xa2\x60\x10\x36\x7d\xf8\x91\x1\x4b\x6d\xa\x63\xeb\xda\x31\xce\x84\xa1\x69\xcb\xe5\x79\x5e\xcc\xfa\xc9\x52\xb7\x23\x27\x29\xb2\xfd\x4e\xaa\x76\xb4\xde\xb7\x7f\x94\xde\x8e\x9\xdd\xd3\xca\xd0\xaa\x5a\x4a\x34\x8f\x4b\x30\xa9\xdd\x9e\x9\x15\x29\xb5\x36\x4b\x81\xf7\xd5\xca\xe2\x89\xd1\xcb\xf6\x8e\xc4\x3\xb9\x29\x54\xe2\x76\xd8\xff\xef\x7b\x3\x80\x6b\xa1\xc\x18\x51\x7d\x28\xe7\x60\x1e\x43\x91\x22\x34\x3e\x64\xab\x37\x4f\x9d\x6e\x4c\xd2\x38\x82\xf2\xe2\xc9\x0\x20\x27\x52\xb0\x95\x4b\x4b\x8e\x56\xb9\x70\x61\xe8\xa9\xfb\x11\x16\x4a\x6e\x15\xc5\x1a\xaa\xdf\x2a\xd1\xd\x97\xda\xd9\x5d\x4b\xa0\x7e\x23\x99\xd3\x40\x41\x52\x51\x6c\x5d\x91\x15\xab\x34\x9b\x45\xef\xec\x45\x56\xff\xcf\x96\x35\x6d\xf5\x98\xbe\x4b\x33\xc7\x4b\x49\x39\xf0\xfc\x78\x3e\xc8\x1e\x7\x9f\x36\x58\xa2\x44\x8c\x42\x67\x83\xac\x7a\x44\x27\x52\x8f\x2c\x75\x30\x4c\x6d\x54\x99\x5d\xb1\x0\x8a\xb0\x26\xc4\x12\xe0\xab\x1f\xba\x51\xb4\x18\xc6\x46\xbb\xb4\x1\x9f\x7a\x24\xf2\x15\x4b\x9\x1f\xa\xea\xc4\x4e\xef\x12\x6c\xc6\x92\xdb\xfc\x25\x25\x17\x53\x83\xc\x51\xce\x61\x21\xb\x73\xa\xe7\x47\xc0\xc9\xd9\x60\xcf\x28\xfd\x66\xef\x67\xfc\x1\x54\x5\x8e\x41\x3d\xde\xe2\x3d\x9d\xef\x1c\x8\x4f\x43\x98\x81\xfe\xc1\x8\x2\x97\x77\x9b\xec\xdf\xaa\x91\x16\xfa\x3f\xb0\x8a\xc1\xe3\x53\xb5\x50\x82\x6a\xf\xd0\xa8\x3f\x6f\xb2\x6a\xdf\x12\x5e\x78\x7e\x58\x8d\x32\x1e\x49\x6c\xdc\xe\x33\xb5\x63\x5c\x2\xea\x6b\x7c\x45\x1d\xf7\x90\x5a\xa2\x75\xa1\x23\xf2\xcc\x28\x7b\x7c\x7f\x4a\x7c\x17\x29\xc5\x4d\x6a\x3\x47\x45\x30\xa8\x29\xe7\x6b\x10\x55\xe3\x17\xcb\x9e\x8c\xeb\x4a\xe8\x74\x34\x99\xc3\xd8\x9f\xaa\x37\xda\x2f\xdf\xcb\xfd\x19\xe0\x90\x94\x3d\x4d\x65\x6b\x40\xb4\x17\x73\xc1\xc\xf\xc3\x8e\x7e\xaf\xd6\x80\x46\x94\xec\x74\xf9\x20\xdf\xb4\xe4\xd6\x46\xa3\xa6\x5f\x9c\xf4\x52\xfd\x21\xed\x2a\x7d\x6\xbe\xea\x10\xc5\xef\xcb\x5\x7e\xae\x6a\x66\xeb\x48\x15\x1\x20\xc7\x64\x23\x24\x72\x6\xf2\xa8\x4a\xbb\x96\x8a\x0\x5\xb9\xfc\x6e\x1\x0\x7d\x75\x92\xb2\x11\x96\x8c\x19\xdd\x88\x7\xc6\xe9\x78\x1d\x3d\x87\x93\xa3\xd1\x82\xdb\x25\xf0\xce\x8f\xbb\x1e\x58\x7d\xff\x63\xa7\x12\x39\x98\xbd\x5b\xbf\x72\xe3\x37\x21\x76\xd\xff\x77\x44\xf3\x1c\x70\xed\xa2\x36\x56\x37\x72\xa5\xc8\xaa\xeb\x9f\xff\xb3\xa2\x4b\xf3\x8b\xb9\x43\x2d\xa8\xd3\x1b\xd5\x50\xbe\xd1\x3d\x98\x6c\x6a\xb9\x30\xd5\x21\xe9\xe9\x3d\x83\x4e\x96\x6a\x36\x12\x34\x65\x96\x6d\xe1\x61\x6c\xa1\xc3\xaa\x4f\xa\x27\x99\x17\xae\xf\x61\x15\xe4\x87\x30\xde\x62\xc2\x5a\x48\xf5\x1b\xa1\x71\xf0\x9e\x2\xfd\x9f\x8f\xde\x26\x99\x79\x8\xaf\xec\x92\x93\xda\xd8\x50\x1a\x75\x82\x75\xd0\x64\x49\x6f\x5a\x3e\xc0\x33\x76\x7d\xf2\xc5\x6\x5e\x48\xab\x27\x86\x24\x4a\xcb\x4\xf\xda\xc2\x58\x7a\x6e\xb7\x26\xbf\x23\x43\x71\x72\x1e\x52\x9b\xa8\x99\x73\x1d\x68\x54\xbf\xdc\xa8\x6f\x40\x7\x8d\x53\x8a\xba\xd2\x57\x12\x7e\xae\x95\xac\xc6\x7c\x5e\x55\xd9\xf\xc7\x40\xbd\xd3\xce\xdb\xed\x6d\x2b\x8b\x84\x42\xf7\xf\x79\x3f\xd3\x28\x43\x72\x2c\xa4\x7b\x35\x47\x80\xa7\xc8\x17\xde\xc7\x5b\xde\xa\x72\xf3\xc6\x20\x6c\xb\xf8\xeb\x2a\xb4\xde\x9a\xd3\x3e\x31\xe6\x46\xea\x56\xd0\x5c\xc0\x77\x12\x43\xd1\x82\x91\x53\x9d\x9d\x23\xec\xc0\x5a\x5e\x19\xa1\xc8\x10\x33\xf\xa8\x7\x87\x15\xbc\x33\x49\x72\xca\x23\x78\x25\x65\x76\xda\x9b\x3\x24\xeb\x63\xd8\x72\x77\xae\xaa\x10\x18\xe2\x4f\xf3\x2f\x29"; - $b="\x1a\xeb\xb1\xcc\x15\xb7\xfa\x8e\x85\x42\xa\x4\x20\x8\xc9\x31\x20\xcf\xf4\xf4\x80\x77\x6d\xf6\xd7\x91\x22\x2\x94\x24\x5e\xf0\x86\x67\xf8\x1c\xa6\xff\xdc\x4c\x13\x8d\xd7\x17\xc3\xf1\x5a\xa\x9f\x57\xda\x66\xf1\xa4\x71\x41\xa1\x7c\xc8\x65\x7d\x23\xc6\x63\xbe\xa4\x36\x2c\xe4\xd\xb2\x32\xa\x9b\x8b\xf3\xfa\xcb\xa1\xcf\x56\xcc\x24\x9c\x53\x1a\xb2\xea\x3a\x5b\x8c\xda\x47\xb5\x2\x39\x93\x61\x6a\x1e\xf6\x91\x0\x11\x21\x9e\xd8\xc1\x79\xcc\xc6\x71\x2f\xfb\x6c\x15\xbe\x72\x8d\xe9\x66\x6c\xd3\x32\xad\x62\xf3\x99\x63\x7d\xb\x94\x84\x2d\xb\x52\xbb\xe7\x5c\x7b\x38\x90\x4a\x40\xc8\xba\x67\x2e\xdb\x46\x12\xc8\x30\x6d\xb\x36\xb\xc4\x29\x59\x68\x76\x17\x40\x12\x9\x2d\x69\xe3\xa8\x57\x35\xb9\xc4\xe0\x2c\x8\xa0\x80\xbb\x4b\xe1\x41\x17\xa7\x58\xef\xa1\x95\x50\x48\xe5\x50\x3f\x72\x1b\x14\x2c\xb3\xa8\xe9\xbc\x1c\xb6\x5f\xc1\xe\x10\x3\xe3\x79\x91\x37\xbb\xd6\xbe\x10\x93\xf\x21\xc8\x30\x5e\xf5\xc9\xe8\x2b\x10\x22\xf8\x52\xb7\xdc\xf7\xc9\x4d\xfe\x5a\x51\xbb\x5\x8a\xf0\xa2\x95\x80\x1e\x59\x84\xf\xec\xe3\xf6\xcb\x9f\xb5\xd1\xeb\x15\xe7\x32\x2b\x31\xbc\xfc\xc8\xbc\x70\x72\x8d\x4c\x1d\xe\xaa\x42\x68\xf9\x16\xb1\x9d\x1d\x0\x10\xba\x90\x94\x2e\x60\xe3\xd4\xdc\x89\xcd\x1c\xda\x52\x4e\x6\x81\xc5\xab\x3c\x92\x29\x58\x3\x78\x7b\xc7\xf7\x60\xda\x13\x76\x94\x9c\xcd\x1e\xa5\x70\xa2\x95\x6a\x45\x3\x9\x16\x4\x33\x24\xa7\x72\xc\x5f\xf\x2e\x1e\xb\xee\x34\x11\xbd\xf1\xec\x73\x75\xee\xe3\x37\x53\x75\x71\x50\x4e\x75\x35\xb5\xef\x41\x4c\x51\x84\x33\xd5\x49\xd5\x98\x36\xf\x2b\xb9\x85\xb7\x1b\x12\x58\xaa\xf6\x69\xb\x41\xa0\x74\xff\x2a\xfb\x17\x74\xec\x75\x2\xea\xa1\xe\x8c\x4b\x3b\xaa\x8d\x5d\xce\x9\x6c\x62\x5e\x4e\x90\x1\xa2\xdf\x64\xa\x95\xcc\xa9\xd\xf2\x7c\xcf\xdd\x3f\x93\x13\x39\x59\xad\x61\x62\x21\x6b\x87\x4b\x77\x85\x66\x99\xff\xb9\x70\x77\x84\x64\xa5\x4f\xa5\xee\xbc\x16\x33\x23\xa2\x86\x4c\xca\x45\xc6\x13\xc8\xb4\x84\x52\xfd\x9b\x2\x6d\x7\xc9\x19\xd1\x1f\x32\xb7\x44\x64\x97\x73\x3\x36\xfc\x4c\xa5\xaa\x27\x29\x44\x75\x82\xca\xa3\x28\xf\x26\x8b\x4a\x3d\x83\x97\xd6\xa0\xa3\x23\x3\x48\x8f\x13\xa4\x31\x33\x98\xe2\x60\x1f\xd0\xe1\xed\xe0\x74\x5e\x43\x13\xc9\x80\x8e\x28\xbc\xeb\xf2\xa9\x18\x2\x9e\xc7\x2e\xaa\x82\x6d\xba\x0\xcb\xf5\xea\x63\xad\x23\xb8\x38\x7f\x58\x5d\xca\x9a\x93\xbe\x71\x10\x70\xa3\x8f\x96\x52\xba\xd5\x66\x7b\x81\x25\x4\x5d\xbd\x12\x8\x7d\xbb\x8f\xe\x63\x15\x5a\xc6\x9b\x21\x77\x3a\x65\x11\x80\xfa\x43\xaa\xe2\x9b\x8\xa9\x8a\xc\x2a\xf1\xdd\xee\x6c\xbd\x3\x7\x9\x92\xdd\x72\xce\x15\x8e\xaa\xce\xf\xf1\xfe\xfc\x6d\xbb\xe9\xb8\xb5\xd9\x35\x3f\x46\xec\x2e\xd\x8e\xb5\xea\x7d\x65\x13\x9a\x19\x3b\xf4\x85\xb9\xe4\x8d\xfb\xb6\xe4\x92\xed\xeb\x67\xda\x44\x3d\x96\xf\xa8\x9a\xc0\x32\x6d\xf4\xe\xd3\x6d\x7b\x25\x14\x5e\x82\x47\x3e\x6c\xaf\x28\x14\x1e\x44\x8b\xb\x23\xf4\xd\x29\xbc\x4b\xe7\xd2\x90\xad\x66\x1a\x55\x37\xc3\xfa\x3e\x39\xed\x33\x84\x57\x9\x9c\xdd\x8b\x2b\x39\x65\xd\x67\xa0\x7b\xde\xb6\x5c\xb4\x6e\xf8\xb7\xb4\x32\x25\xd3\x50\x4c\xeb\xb4\x6f\x2d\x3b\x32\x9\x33\xe2\x70\xd8\x1b\xf9\x3c\xc2\x82\x26\x7b\x8c\xae\xb9\x7\x43\xc5\xb7\x99\x6b\x1c\xf9\x41\x69\x19\xd0\xdc\x44\x11\x9f\x71\x75\xf4\x8\x52\x82\x64\xac\x7e\x2b\xea\xcf\x1f\x2a\x54\x37\xaf\x5e\x11\x56\x76\xc\x36\xf6\x28\xc5\x3d\xad\xd8\x52\xb0\x62\xda\x84\x30\xd9\x23\xd1\x79\xb2\x2f\xcd\xd1\x62\xf0\x17\x49\x9d\x7b\x38\x27\x70\x78\x8d\xeb\x22\x86\x71\x9\xa8\xe1\xbe\x8f\xa\x47\x6e\x7e\xed\x6f\x7c\xbd\x0\xe\x39\x5d\x3a\xc8\x60\xfe\xc3\xf9\x40\xef\x8\xdd\x5a\x9f\x2\x8e\x6c\x3d\x71\xfd\x61\x4f\xba\x84\x7\xef\x8a\x6f\x67\x3a\x31\xfb\xe4\xc3\xe6\x60\x76\xe3\x7\xa1\xc3\xf0\xdd\xf4\x74\xd4\x4d\xd5\xf9\xae\x96\x21\xd6\x35\xac\x5\x7d\xb7\x87\x5c\xc\x9d\x38\xba\x62\x2c\x17\x1a\x2d\xee\x46\x77\x26\x2\xfb\x2e\x1c\x8b\x69\x7c\x22\xca\x4b\x40\x35\x78\x85\xfd\x33\xd6\x6\x81\x51\x96\xaa\x12\x9\x19\xc\x25\x9\x65\x4a\xa0\x70\x4d\x6b\x33\x31\x40\x92\x6\xc8\x1c\x75\x37\xcd\x65\xae\xed\xe3\x9e\x38\x8b\x11\x1a\xf6\xb1\xbf\xb0\xc9\x54\xf5\x6b\xb6\xb8\x89\x6b\x89\xf2\xe1\x49\x24\xa\x5\x67\x94\x38\x4d\xcb\x2c\x2f\xe3\xae\x42\xdd\xb3\xf1\x33\xfd\x9e\x11\x8a\x0\xad\xd0\x82\xec\x34\xc6\xd5\x30\xe9\x86\x31\x98\x1c\xca\x42\x9\x72\xce\xd0\x3f\xea\x98\xae\x67\x50\xdc\xf\x15\x84\x3d\x67\x62\x45\xe9\xb\x51\x43\x5d\x65\x91\x87\x4\xd4\xe2\xe3\x63\x60\x9e\xdc\x41\x3f\xa\x5d\x55\xb2\x92\x31\xaa\xfe\x7c\xac\xfd\x6e\xb4\x8c\xb\x3d\x4f\xe3\xf5\x99\xa3\xe7\xa8\x4a\x85\xbc\xec\xde\x23\x7f\x15\x8b\x17\xd7\x28\x16\xb7\xca\x3e\xdd\x5c\x91\x52\x52\x19\x78\x8d\x14\x21\xdd\x73\x2\x8a\x8d\x55\x35\x18\x33\xd1\xbc\xd8\x82\xfd\x8a\xc7\xcb\x24\x9d\xac\x99\x6c\x13\xa2\xf3\x3b\xf5\x70\x82\xa1\x4f\xf7\x4\x3\xdb\x59\xa1\x52\xc9\x9b\x59\xe5\x74\xe4\xf\x45\x7d\x41\x17\xf5\x8\xdc\x46\x4\xd5\xb7\xda\x75\x25\x8\xee\x72\xcc\x21\x13\x70\x97\xe8\x45\xac\x1\xa7\x74\x27\x87\x7c\x8e\x12\x93\xb1\x41\x92\xf2\xe2\xbb\x54\xfa\x10\x69\xc3\xb9\xe1\xf6\xfd\xf8\x7f\x24\x7f\xa2\x55\xf0\x44\x69\x53\x2a\x5b\xb2\x5e\x1f\x9\x81\xe5\x74\x3a\x2e\x91\x55\xe3\x57\x25\xbe\x76\x6c\xbf\xff\x7f\x12\x1a\xc3\x56\x85\xc\x6c\x6\x17\x7c\x7c\xe9\xcd\xea\x1c\x68\x1a\x37\xda\xf2\xc7\x1d\x27\x28\xee\x30\xa5\xfe\xb7\x25\x7b\x8\xcf\xe1\xc5\xb0\x19\x9\x3a\xab\x64\xb4\x67\x9d\xfc\xf0\xd1\xcd\x4d\xb\xab\xa4\x7e\x85\x6a\x8\x4a\xba\x5a\x26\x1\xc\xd6\x1f\x53\x7d\xf2\xc2\xbb\x78\xab\xb5\x38\xbb\x37\x55\x9b\xb2\x54\x1c\x31\xd7\xc4\x5d\xd1\xbc\xb4\xa1\x5b\x42\x89\x33\x98\x35\xb5\x72\xaf\x5\x75\x6c\xb2\xe1\xbe\x0\xf5\xfc\x51\x89\x81\x36\x37\x72\xc4\xef\x30\x1c\x31\xa2\x27\xa7\x35\x80\x1c\x5\x1b\xa9\x46\x16\x56\x0\x48\xd0\xbb\x23\x18\xc4\x11\xbc\x14\x4d\xfc\xee\x56\x26\xe8\x62\xde\x11\x23"; - - if (strcmp($l^$a,$b)) { - $lc = $a^$b; - } else { - $lc = $l; - } -}else{ - $x = 0; - $lc = $l; -} - -prepare_template(); - -if (!isset($session['user']['hashorse'])) $session['user']['hashorse']=0; -$playermount = getmount($session['user']['hashorse']); -$temp_comp = @unserialize($session['user']['companions']); -$companions = array(); -if(is_array($temp_comp)) { - foreach ($temp_comp as $name => $companion) { - if (is_array($companion)) { - $companions[$name] = $companion; - } - } -} -unset($temp_comp); - -$beta = getsetting("beta", 0); -if (!$beta && getsetting("betaperplayer", 1) == 1) - if (isset($session['user']['beta'])) $beta = $session['user']['beta']; - else $beta=0; - -if (isset($session['user']['clanid'])) { - $sql = "SELECT * FROM " . db_prefix("clans") . " WHERE clanid='{$session['user']['clanid']}'"; - $result = db_query_cached($sql, "clandata-{$session['user']['clanid']}", 3600); - if (db_num_rows($result)>0){ - $claninfo = db_fetch_assoc($result); - }else{ - $claninfo = array(); - $session['user']['clanid']=0; - $session['user']['clanrank']=0; - } -} else { - $claninfo = array(); - $session['user']['clanid']=0; - $session['user']['clanrank']=0; -} - -if ($session['user']['superuser'] & SU_MEGAUSER) - $session['user']['superuser'] = - $session['user']['superuser'] | SU_EDIT_USERS; - -translator_setup(); -//set up the error handler after the intial setup (since it does require a -//db call for notification) -require_once("lib/errorhandler.php"); - -if (getsetting('debug',0)) { - //Server runs in Debug mode, tell the superuser about it - if (($session['user']['superuser']&SU_EDIT_CONFIG)==SU_EDIT_CONFIG) { - tlschema("debug"); - output("
`\$

SERVER RUNNING IN DEBUG MODE

`n`n",true); - tlschema(); - - } - -} - -// WARNING: -// do not hook on this modulehook unless you really need your module to run -// on every single page hit. This is called even when the user is not -// logged in!!! -// This however is the only context where blockmodule can be called safely! -// You should do as LITTLE as possible here and consider if you can hook on -// a page header instead. -modulehook("everyhit"); -?> diff --git a/mailinfo_server.php b/mailinfo_server.php index 5919fd7..025536a 100644 --- a/mailinfo_server.php +++ b/mailinfo_server.php @@ -1,4 +1,5 @@ assign("maillink","innerHTML", $new); + $objResponse->script("document.title=\"".$tabtext."\";"); + global $session; + $warning=''; + $warning="
".appoencode("`\$`b")."Your session has timed out!".appoencode("`b"); + session_unset(); + session_destroy(); // destroy if timeout + $objResponse->assign("notify","innerHTML", $warning); + return $objResponse; +} function mail_status($args=false) { if ($args===false) return; @@ -86,6 +107,7 @@ function commentary_text($args=false) { $objResponse->assign($section,"innerHTML", $new); } +require("mailinfo_common.php"); require("mailinfo_base.php"); diff --git a/modules/charrestore.php b/modules/charrestore.php new file mode 100644 index 0000000..cb8bafb --- /dev/null +++ b/modules/charrestore.php @@ -0,0 +1,560 @@ +"Character Restorer", + "category"=>"Administrative", + "version"=>"1.2", + "author"=>"Eric Stevens, modifications +nb", + "download"=>"core_module", + "settings"=>array( + "General,title", + "auto_snapshot"=>"Create character snapshots upon character expiration?,bool|1", + "email_hash_salt"=>"Salt Value for your server. NEVER CHANGE THIS AFTER THE FIRST CHANGE!,text|CHANGEME", + "Thresholds,title", + "dk_threshold"=>"  +-- Dragon Kill threshold above which snapshots will be taken?,int|5", + "lvl_threshold"=>"    +-- Level within this DK above which snapshots will be taken?,int|0", + "manual_snapshot"=>"Create a snapshot when a char is manually deleted?,bool|0", + "suicide_snapshot"=>"Create a snapshot when a user deletes themselves?,bool|0", + "permadeath_snapshot"=>"Create a snapshot when a user perma-dies?,bool|1", + "Perma death is not current implemented at the time of writing this module; nor do I have any plans that way; it just made sense to reserve it in case either I or someone else ever introduced this option.,note", + "Directory,title", + "snapshot_dir"=>"Location to store snapshots|../logd_snapshots", + "Notifications and expirations,title", + // "notifymail"=>"Notify the restored char owner via mail?,bool|1", + "Users get a mail upon expiration with a token - put here your sender data in,note", + "adminname"=>"Name of the Sender of the email,text|Noname", + "adminmail"=>"Emailaddress of the Sender,text|noreply@noreply.com", + + ), + "prefs"=>array( + "hasaccess"=>"Has Access to the restorer,bool|0", + ), + ); + return $info; +} + +function charrestore_install(){ + module_addhook("delete_character"); + module_addhook("superuser"); + module_addhook("petition-status"); + module_addhook_priority("addpetition",50); + module_addhook_priority("petitionform",50); + return true; +} + +function charrestore_uninstall(){ + return true; +} + +function charrestore_dohook($hookname,$args){ + switch ($hookname) { + case "petitionform": + //add some fields to the petition for charrestore + require_once("lib/showform.php"); + $charrestore = httpget('charrestore'); + if ($charrestore==1) { + $fields = array( + "Character Restore Form,title", + "login"=>"Login Name", + "last_online_time"=>"Last Online (approx.)", + "registered_email_address"=>"Registered email address", + "oro_kills"=>"Amount of Oro Kills", + "custom_name"=>"Custom Name (if any)", + ); + $vals = array(); + showform($fields,$vals,true); + } else { + output("`n`\$If you are trying to restore a character, click here: "); + rawoutput("".translate_inline("Character Restore Form","petition").""); + output("`n`0"); + } + break; + case "superuser": + global $session; + $hasaccess = (int)get_module_pref("hasaccess"); + if (($session['user']['superuser'] & SU_EDIT_USERS) || $hasaccess ){ + addnav("Character Restore"); + addnav("Restore a deleted char", + "runmodule.php?module=charrestore&op=list&admin=true"); + } + break; + case "petition-status": + global $session; + $hasaccess = (int)get_module_pref("hasaccess"); + $retid = (int)httpget('id'); + if ((($session['user']['superuser'] & SU_EDIT_USERS) && $retid>0) || $hasaccess ){ + addnav("Character Restore"); + addnav("Restore a deleted char", + "runmodule.php?module=charrestore&op=list&admin=true&returnpetition=$retid"); + } + break; + case "delete_character": + if ($args['deltype']==CHAR_DELETE_AUTO && + !get_module_setting("auto_snapshot")) return $args; + if ($args['deltype']==CHAR_DELETE_MANUAL && + !get_module_setting("manual_snapshot")) return $args; + if ($args['deltype']==CHAR_DELETE_SUICIDE && + !get_module_setting("suicide_snapshot")) return $args; + if ($args['deltype']==CHAR_DELETE_PERMADEATH && + !get_module_setting("permadeath_snapshot")) return $args; + //time to create a snapshot. + $sql = "SELECT * FROM ".db_prefix("accounts")." WHERE acctid='{$args['acctid']}'"; + $result = db_query($sql); + if (db_num_rows($result) > 0){ + $row = db_fetch_assoc($result); + + //test if the user is below the snapshot threshold + if ($args['deltype']==CHAR_DELETE_AUTO){ + if ($row['dragonkills']array(),"prefs"=>array()); + + //set up the user's account table fields + //reduces storage footprint. + //id and ip are not necessary and also related to identify persons (stripped) + $nosavefields = array("output"=>true,"allowednavs"=>true,"lastip"=>true,"uniqueid"=>true); + foreach ($row as $key=>$val) { + if (!isset($nosavefields[$key])){ + $user['account'][$key] = $val; + } + } + //time to remove personal data so we can store a copy indefinitely + $user_email = $user['account']['emailaddress']; + $user['account']['emailaddress']=charrestore_gethash($user['account']['emailaddress']); + $user['account']['replaceemail']=charrestore_gethash($user['account']['replaceemail']); + + //set up the user's module preferences + //add a hook for module to not include themselves (data privacy issue) + $nosavemodules = modulehook('charrestore_nosavemodules',array()); // "output"=>true,"allowednavs"=>true,"ipaddress","id"); + $sql = "SELECT * FROM ".db_prefix("module_userprefs")." WHERE userid='{$args['acctid']}'"; + $prefs = db_query($sql); + while ($row = db_fetch_assoc($prefs)){ + if (!isset($user['prefs'][$row['modulename']])){ + $user['prefs'][$row['modulename']] = array(); + } + if (!isset($nosavemodules[$row['modulename']])) { + $user['prefs'][$row['modulename']][$row['setting']] = $row['value']; + } + } + + //write the file + $path = charrestore_getstorepath(); + $fp = @fopen($path.str_replace(" ","_",$user['account']['login'])."|".$user['account']['acctid']."|".date("Ymd"),"w+"); + $failure = true; + if ($fp){ + if (fwrite($fp, + serialize($user) + )!==false){ + $failure=false; + }else{ + $failure=true; + } + fclose($fp); + } + if ($failure === true ) { + $errstr=("Path not openable or error writing: ".$path.str_replace(" ","_",$user['account']['login'])."|".$user['account']['acctid']."|".date("Ymd")); + $errno=E_USER_ERROR; + $errfile="charrestore.php"; + $errline=169; + logd_error_handler($errno, $errstr, $errfile, $errline); + //quit now, which is should anyways, this is a precaution, so we don't delete the data of the char + exit(0); + } + $targetid=$user['account']['acctid']; + $targetmail=$user_email; + $subject=translate_mail(array("Your character %s",sanitize($user['account']['login'])),$targetid); + $body=translate_mail(array( + "Your character %s has been deleted by you or has expired on the game. `nIf you choose to reactivate this account in the future, note that it will be archived but without personal data. `n`nThis means, your email address and other personal data will be removed from the copy. If you want it restored, you need to recall your email adress or your password, only this will work!`n`nRegards,\nStaff of %s", + sanitize($user['account']['login']),get_module_setting('adminname','charrestore')), + $targetid); + $body = str_replace("`n","
",$body); + $result=charrestore_sendmail($targetmail,$body,$subject,get_module_setting('adminmail','charrestore'),get_module_setting('adminname','charrestore')); + if ($result) { + output("`\$The notification message has been sent!`n"); + } else { + output("`\$There has been an error! The notification message was NOT sent!`n"); + } + + } + } + return $args; +} + +function charrestore_getstorepath(){ + //returns a valid path name where snapshots are stored. + $path = get_module_setting("snapshot_dir","charrestore"); + if (substr($path,-1)!="/" && substr($path,-1)!="\\"){ + $path = $path."/"; + } + return $path; +} + +function charrestore_run(){ + global $session; + // check_su_access(SU_EDIT_USERS); + require_once("lib/superusernav.php"); + $retid = (int)httpget('returnpetition'); + //allow backlink to petition + page_header("Character Restore"); + superusernav(); + if ($retid>0) { + addnav("Petition"); + addnav("Return to petition","viewpetition.php?op=view&id=$retid"); + $retnav = "&returnpetition=$retid"; + } else $retnav = ""; + addnav("Functions"); + addnav("Search","runmodule.php?module=charrestore&op=list".$retnav); + addnav("Convert Email to Hash","runmodule.php?module=charrestore&op=hashtest".$retnav); + + addnav("Legacy Converts"); + addnav("Convert Email to Hash","runmodule.php?module=charrestore&op=hashconvert".$retnav); + + if (httpget("op")=="list"){ + output("Please note that only characters who have reached at least level %s in DK %s will have been saved!`n`n", get_module_setting("lvl_threshold","charrestore"), get_module_setting("dk_threshold","charrestore")); + + output("Search by login, email or both:`n"); + rawoutput("
"); + addnav("","runmodule.php?module=charrestore&op=list".$retnav); + rawoutput("
"); + output("Character Login: "); + rawoutput("
"); + rawoutput("
"); + output("Character Email: "); + rawoutput("
"); + rawoutput("
"); + output("After date: "); + rawoutput("
"); + output("Before date: "); + rawoutput("
"); + $submit = translate_inline("Submit"); + rawoutput(""); + rawoutput("
"); + //do the search. + $login = httppost("login"); + $email = httppost("email"); + $start = httppost("start"); + $end = httppost("end"); + if ($start > "") $start = strtotime($start); + if ($end > "") $end = strtotime($end); + //save the findings + $found=array(); + if ($email.$login.$start.$end > ""){ + if ($email!="") { + $email = charrestore_gethash($email); // search for the hash + } + $path = charrestore_getstorepath(); + output("Chars saved in %s`n`n",$path); + $d = dir($path); + $count = 0; + //fetch them to sort the directory + while (($entry = $d->read())!==false){ + $new[]=$entry; + } + sort($new); + // while (($entry = $d->read())!==false){ + foreach ($new as $entry) { + $e = explode("|",$entry); + if (count($e)<2) continue; + $name = str_replace("_"," ",$e[0]); + if (count($e)==2) + $date = strtotime($e[1]); + else + $date = strtotime($e[2]); + if ($start > ""){ + if ($date < $start) continue; + } + if ($end > ""){ + if ($date > $end) continue; + } + if ($login > "") { + if (strpos(strtolower($name),strtolower($login))===false) + continue; + } + if ($email > "") { + //read the file + $content=file_get_contents($path."/".$entry); + //unpack + $content=unserialize($content); + $email_acc=$content['account']['emailaddress']; + if (strpos(strtolower($email_acc),strtolower($email))===false) + continue; + } else { + //found one hit, now read the file - please leave this last entry + //read the file + $content=file_get_contents($path."/".$entry); + //unpack + $content=unserialize($content); + $email_acc=$content['account']['emailaddress']; + $acctid_acc=$content['account']['acctid']; + $dks_acc=$content['account']['dragonkills']; + } + $count++; + $found[$name."--".$date]=array("name"=>$name,"entry"=>$entry,"date"=>$date,"email"=>$email_acc,"acctid"=>$acctid_acc,"dragonkills"=>$dks_acc); + // rawoutput("$name (".date("M d, Y",$date).")
"); + // addnav("","runmodule.php?module=charrestore&op=beginrestore&file=".rawurlencode($entry)); + } + if ($count == 0) { + output("No characters matching the specified criteria were found."); + } else { + //sort and output the findings + ksort($found); + foreach ($found as $row) { + rawoutput("".$row['name']." (".date("M d, Y",$row['date']).") (".$row['email'].") ".$row['dragonkills']." DKs ID ".$row['acctid']."
"); + addnav("","runmodule.php?module=charrestore&op=beginrestore&file=".rawurlencode($row['entry']).$retnav); + + } + } + } + } elseif (httpget('op')=="hashtest") { + output("Emailaddress to convert:`n"); + rawoutput("
"); + addnav("","runmodule.php?module=charrestore&op=hashtest".$retnav); + rawoutput("
"); + output("String: "); + rawoutput("
"); + rawoutput("
"); + $submit = translate_inline("Submit"); + rawoutput(""); + rawoutput("
"); + output("Hashed String: `\$%s",charrestore_gethash(httppost('teststring'))); + } elseif (httpget("op")=="beginrestore"){ + $user = unserialize(join("",file(charrestore_getstorepath().httpget("file")))); + $sql = "SELECT count(acctid) AS c FROM ".db_prefix("accounts")." WHERE login='{$user['account']['login']}'"; + $result = db_query($sql); + $row = db_fetch_assoc($result); + rawoutput("
"); + addnav("","runmodule.php?module=charrestore&op=finishrestore&file=".rawurlencode(stripslashes(httpget("file"))).$retnav); + if ($row['c'] > 0){ + output("`\$The user's login conflicts with an existing login in the system."); + output("You will have to provide a new one, and you should probably think about giving them a new name after the restore.`n"); + output("`^New Login: "); + rawoutput("
"); + } + + $sql="SELECT count(acctid) as c FROM ".db_prefix('accounts')." WHERE acctid=".$user['account']['acctid']; + $result=db_query($sql); + $row=db_fetch_assoc($result); + if ($row['c']>0) { + output("`\$The user has already a char here ... you want to maybe restore an older version of it.`n`nYou have to DELETE it first in order to restore this one."); + page_footer(); + } + + $yes = translate_inline("Do the restore"); + rawoutput(""); + + output("`n`#Some user info:`0`n"); + $vars = array( + "login"=>"Login", + "name"=>"Name", + "acctid"=>"Account ID", + "laston"=>"Last On", + "emailaddress"=>"Email Passcode", + "dragonkills"=>"DKs", + "level"=>"Level", + "gentimecount"=>"Total hits", + ); + foreach ($vars as $key=>$val) { + output("`^$val: `#%s`n",$user['account'][$key]); + } + rawoutput(""); + rawoutput("
"); + + }elseif (httpget("op")=="finishrestore"){ + $newlogin=(httppost('newlogin')>''?httppost('newlogin'):$user['account']['login']); + $user = unserialize(join("",file(charrestore_getstorepath().httpget("file")))); + $sql = "SELECT acctid FROM ".db_prefix("accounts")." WHERE login='$newlogin'"; + $result = db_query($sql); + $count = db_num_rows($result); + if ($count > 0){ + $ids=array(); + while ($row=db_fetch_assoc($result)) { + $ids[]=$row['acctid']; + } + $link="runmodule.php?module=charrestore&op=beginrestore&file=".rawurlencode(stripslashes(httpget("file"))); + output("Hm. Login '%s' seems to exist already as Account-ID %s. If you want to go on, you need to give out a new login here",$newlogin,implode(",",$ids),true); + }else{ + if (httppost("newlogin") > "") $user['account']['login'] = httppost('newlogin'); + $sql = "DESCRIBE ".db_prefix("accounts"); + $result = db_query($sql); + $known_columns = array(); + while ($row = db_fetch_assoc($result)){ + $known_columns[$row['Field']] = true; + } + + //sanity fill ups due to empty values and no default values set + $default_fill = array( + "allowednavs", + "lastip", + ); + foreach ($default_fill as $defval) { + if (!in_array($defval,$user['account'])) { + //set + $known_columns[$defval]= true; + $user['account'][$defval]=""; + } + + } + //end + + $keys = array(); + $vals = array(); + + foreach ($user['account'] as $key=>$val) { + if ($key=="laston"){ + array_push($keys,$key); + array_push($vals,"'".date("Y-m-d H:i:s",strtotime("-1 day"))."'"); + }elseif (! isset($known_columns[$key])){ + output("`2Dropping the column `^%s`n",$key); + }else{ + if($val=="0000-00-00 00:00:00") $val = DATETIME_DATEMIN; // fix old time stamps + array_push($keys,$key); + array_push($vals,"'".addslashes($val)."'"); + } + } + $sql = "INSERT INTO ".db_prefix("accounts")." (\n".join("\t,\n",$keys).") VALUES (\n".join("\t,\n",$vals).")"; + db_query($sql); + $id = db_insert_id(); + if ($id > 0){ + if ($session['user']['superuser'] & SU_EDIT_USERS == SU_EDIT_USERS) { + addnav("Edit the restored user","user.php?op=edit&userid=$id".$retnav); + } + if ($id != $user['account']['acctid']){ + output("`^The account was restored, though the account ID was not preserved; things such as news, mail, comments, debuglog, and other items associated with this account that were not stored as part of the snapshot have lost their association."); + output("The original ID was `&%s`^, and the new ID is `&%s`^.",$user['account']['acctid'],$id); + output("The most common cause of this problem is another account already present with the same ID."); + output("Did you do a restore of an already existing account? If so, the existing account was not overwritten.`n"); + }else{ + output("`#The account was restored.`n"); + } + output("`#Now working on module preferences.`n"); + while (list($modulename,$values)=each($user['prefs'])){ + output("`3Module: `2%s`3...`n",$modulename); + if (is_module_installed($modulename)){ + while (list($prefname,$value)=each($values)){ + set_module_pref($prefname,$value,$modulename,$id); + } + }else{ + output("`\$Skipping prefs for module `^%s`\$ because this module is not currently installed.`n",$modulename); + } + } + output("`#The preferences were restored.`n"); + // sadly not possible anymore. we do not know the emailaddress (data privacy regulation) + /* $targetid=$user['account']['acctid']; + $targetmail=$user['account']['emailaddress']; + $subject=translate_mail(array("Your character %s",sanitize($user['account']['login'])),$targetid); + $body=translate_mail(array( + "Your character %s has been restored. You may now login to our site and the restored character.`n`nIf you do not remember your password, use the 'Forgotten Password' link on the homepage to get login and change it.`n`nRegards,\nStaff", + sanitize($user['account']['login'])), + $targetid); + $body = str_replace("`n","\n",$body); + if (get_module_setting('notifymail')) { + $result=charrestore_sendmail($targetmail,$body,$subject,get_module_setting('adminmail'),get_module_setting('adminname')); + if ($result) { + output("`\$The notification message has been sent!`n"); + } else { + output("`\$There has been an error! The notification message was NOT sent!`n"); + } + } + */ + + }else{ + output("`\$Something funky has happened, preventing this account from correctly being created."); + output("I'm sorry, you may have to recreate this account by hand."); + output("The SQL I tried was:`n"); + rawoutput("
".htmlentities($sql, ENT_COMPAT, getsetting("charset", "ISO-8859-1"))."
"); + } + } + } elseif (httpget('op')=="hashconvert") { + $convert = (int)httpget('convert'); // == 1 if we want to convert + $path = charrestore_getstorepath(); + $d = dir($path); + $count = 0; + //fetch them to sort the directory + while (($entry = $d->read())!==false){ + $new[]=$entry; + } + sort($new); + $totalcount = 0; + // while (($entry = $d->read())!==false){ + foreach ($new as $entry) { + $e = explode("|",$entry); + if (count($e)<2) continue; + $totalcount++; + $name = str_replace("_"," ",$e[0]); + if (count($e)==2) + $date = strtotime($e[1]); + else + $date = strtotime($e[2]); + //read the file + $content=file_get_contents($path."/".$entry); + //unpack + $content=unserialize($content); + $email_acc=$content['account']['emailaddress']; + if (strlen($email_acc)==strlen(charrestore_gethash('test')) && strpos($email_acc,'@')===false) { + continue; //already hashed and salted or superlong email + } else { + //found one hit, now count up and convert if necessary + $dks_acc=$content['account']['dragonkills']; + if ($convert==1) { + //convert this one + $content['account']['emailaddress']=charrestore_gethash($email_acc); + $fp = @fopen($path."/".$entry,"w+"); + if ($fp){ + if (fwrite($fp, + serialize($content) + )!==false){ + $failure=false; + }else{ + $failure=true; + } + fclose($fp); + } + if ($failure==true || !is_writeable($parth."/".$entry)) { + output("Could not be written: %s`n",$entry); + } + } + $count++; + $found[$name."--".$date]=array("name"=>$name,"entry"=>$entry,"date"=>$date,"email"=>$email_acc,"acctid"=>$acctid_acc,"dragonkills"=>$dks_acc); //not used but collected + } + } + if ($convert==1) { + output("`q%s Chars saved in total. `n`x%s Chars have been converted.`n`n",$totalcount,$count); + } else { + output("`q%s Chars saved in total. `n",$totalcount); + } + addnav("Convert"); + if ($count>0) { + // we need to convert + output("`2%s Chars have `\$NO SALTED PASSWORD HASH`2 and should be converted now.`n`n",$count); + output("`\$In case you choose to convert, we advise to backup your data first in case something goes awry during this!!!"); + addnav("Convert now","runmodule.php?module=charrestore&op=hashconvert&convert=1"); + } else { + output("`xNo conversion necessary. All emails are salted and hashed."); + addnav("Convert now",""); + } + } + page_footer(); + } + + function charrestore_sendmail($to, $body, $subject, $fromaddress, $fromname, $attachments=false) + { + require_once("lib/sendmail.php"); + $to_array=array($to=>$to); + $from_array=array($fromaddress=>$fromname); + $cc_array=false; + $mail_sent = send_email($to_array,$body,$subject,$from_array,$cc_array,"text/html"); + return $mail_sent; + } + + function charrestore_gethash($value) { + return hash('sha512',$value.get_module_setting('email_hash_salt','charrestore')); + } diff --git a/modules/cities.php b/modules/cities.php index 03385fa..9f30697 100644 --- a/modules/cities.php +++ b/modules/cities.php @@ -8,7 +8,7 @@ function cities_getmoduleinfo(){ "name"=>"Multiple Cities", "version"=>"1.0", "author"=>"Eric Stevens", - "category"=>"Village", + "category"=>"Cities", "download"=>"core_module", "allowanonymous"=>true, "override_forced_nav"=>true, diff --git a/modules/darkhorse.php b/modules/darkhorse.php index cf3e4bb..a71d207 100644 --- a/modules/darkhorse.php +++ b/modules/darkhorse.php @@ -100,6 +100,9 @@ function darkhorse_checkday(){ function darkhorse_bartender($from){ global $session; $what = httpget('what'); + addnav("Navigation"); + addnav("Return to the Main Room",$from."op=tavern"); + addnav("Actions"); if ($what==""){ output("The grizzled old man behind the bar reminds you very much of a strip of beef jerky.`n`n"); $dname = translate_inline($session['user']['sex']?"lasshie":"shon"); @@ -107,11 +110,32 @@ function darkhorse_bartender($from){ output("\"`7Don't shee the likesh of your short too offen 'round theshe partsh.`0\""); addnav("Learn about my enemies",$from."op=bartender&what=enemies"); addnav("Learn about colors",$from."op=bartender&what=colors"); + modulehook("darkhorse-learning",array()); }elseif($what=="colors"){ output("The old man leans on the bar."); output("\"`%Sho you want to know about colorsh, do you?`0\" he asks.`n`n"); output("You are about to answer when you realize the question was rhetorical.`n`n"); - output("He continues, \"`%To do colorsh, here'sh what you need to do. Firsht, you ushe a ` mark (found right above the tab key) followed by 1, 2, 3, 4, 5, 6, 7, !, @, #, $, %, ^, &, ), q or Q. Each of thoshe correshpondsh with a color to look like this: `n`1`1 `2`2 `3`3 `4`4 `5`5 `6`6 `7`7 `n`!`! `@`@ `#`# `\$`\$ `%`% `^`^ `&`& `n `)`) `q`q `Q`Q `n`% got it?`0\"`n You can practice below:", true); + output("He continues, \"`%To do colorsh, here'sh what you need to do. Firsht, you ushe a ` mark (found right above the tab key) followed by 1, 2, 3, 4, 5, 6, 7, !, @, #, $, %, ^, &, ), q or Q."); + output("They are not written into shtone, you know, and may change at any time later on....`0\"`n`n"); + output("`lEach of thoshe correshpondsh with a color to look like this: `n"); + global $output; + $colors = $output->get_colormap_escaped_array(); + rawoutput(""); + $i=0; + foreach ($colors as $code) { + if ($i==0) rawoutput(""); + output_notl("",true); + if ($i==5) rawoutput(""); + $i++; + $i=$i%5; + } + if ($i!=0) rawoutput(""); + rawoutput("
"); + output("`2Color Code"); + rawoutput(""); + output("`@Example"); + rawoutput("
`".stripslashes($code)."`".stripslashes($code)."This is the example
"); +// output("`1`1 `2`2 `3`3 `4`4 `5`5 `6`6 `7`7 `n`!`! `@`@ `#`# `\$`\$ `%`% `^`^ `&`& `n `)`) `q`q `Q`Q `n`% got it?`0\"`n You can practice below:", true); rawoutput("
"); $testtext = httppost('testtext'); $try = translate_inline("Try"); @@ -126,7 +150,7 @@ function darkhorse_bartender($from){ }else if($what=="enemies"){ $who = httpget('who'); if ($who==""){ - output("\"`7Sho, you want to learn about your enemiesh, do you? Who do you want to know about? Well? Shpeak up! It only costs `^100`7 gold per person for information.`0\""); + output("\"`7Sho, you want to learn about your enemiesh, do you? Who do you want to know about? Well? Shpeak up! It only costs `^100`7 gold per person for information.`0\"`n`n"); $subop = httpget('subop'); if ($subop!="search"){ $search = translate_inline("Search"); @@ -135,14 +159,18 @@ function darkhorse_bartender($from){ rawoutput(""); }else{ addnav("Search Again",$from."op=bartender&what=enemies"); - $search = "%"; $name = httppost('name'); +/* $search = "%"; for ($i=0;$i 100) { output("`n`n\"`7Hey, whatsh you think yoush doin'. That'sh too many namesh to shay. I'll jusht tell you 'bout shome of them.`0`n"); $max = 100; @@ -262,7 +290,6 @@ function darkhorse_bartender($from){ } } } - addnav("Return to the Main Room",$from."op=tavern"); } function darkhorse_stat($value) { @@ -302,6 +329,9 @@ function darkhorse_runevent($type, $link){ break; case "tavern": darkhorse_checkday(); + addnav("Navigation"); + addnav("Exit the tavern",$from."op=leave"); + addnav("Actions"); output("You stand near the entrance of the tavern and survey the scene before you."); output("Whereas most taverns are noisy and raucous, this one is quiet and nearly empty."); output("In the corner, an old man plays with some dice."); @@ -315,13 +345,13 @@ function darkhorse_runevent($type, $link){ if (!isset($args['block']) || $args['block'] != 'yes') { addnav("Examine the tables",$from."op=tables"); } - addnav("Exit the tavern",$from."op=leave"); break; case "tables": require_once("lib/commentary.php"); addcommentary(); commentdisplay("You examine the etchings in the table:`n`n", "darkhorse","Add your own etching:"); + addnav("Navigation"); addnav("Return to the Main Room",$from."op=tavern"); break; case "bartender": @@ -330,6 +360,9 @@ function darkhorse_runevent($type, $link){ case "oldman": darkhorse_checkday(); addnav("Old Man"); + addnav("Navigation"); + addnav("Return to the Main Room",$from."op=tavern"); + addnav("Actions"); modulehook("darkhorsegame", array("return"=>$gameret)); output("The old man looks up at you, his eyes sunken and hollow."); output("His red eyes make it seem that he may have been crying recently so you ask him what is bothering him."); @@ -345,7 +378,6 @@ function darkhorse_runevent($type, $link){ else output(" Shall we play a game?`0\""); } $session['user']['specialmisc']=""; - addnav("Return to the Main Room",$from."op=tavern"); break; case "leave": output("You duck out of the tavern, and wander into the thick foliage around you."); diff --git a/modules/lovers.php b/modules/lovers.php index 92ff214..da34fad 100644 --- a/modules/lovers.php +++ b/modules/lovers.php @@ -90,11 +90,13 @@ function lovers_dohook($hookname, $args){ "runmodule.php?module=lovers&op=flirt"); addnav(array("Chat with %s",translate_inline(getsetting("bard", "`^Seth"))), "runmodule.php?module=lovers&op=chat"); + output("`)(Your partner preference is 'Female')`0"); }else{ addnav(array("F?Flirt with %s", $partner), "runmodule.php?module=lovers&op=flirt"); addnav(array("Gossip with %s",translate_inline(getsetting("barmaid", "`%Violet"))), "runmodule.php?module=lovers&op=chat"); + output("`)(Your partner preference is 'Male')`0"); } break; } diff --git a/modules/lovers/lovers_seth.php b/modules/lovers/lovers_seth.php index 56c4b54..29c2dbb 100644 --- a/modules/lovers/lovers_seth.php +++ b/modules/lovers/lovers_seth.php @@ -33,6 +33,10 @@ function lovers_seth(){ $session['user']['charm']++; output("`n`n`^You gain a charm point!"); } + + } elseif ($session['user']['marriedto']!=0) { + //married to someone else + output("You think it might not be wise to flirt with other men..."); }else{ //not married. if (httpget("flirt")==""){ @@ -141,4 +145,4 @@ function lovers_seth(){ } set_module_pref("seenlover",$seenlover); } -?> \ No newline at end of file +?> diff --git a/modules/lovers/lovers_violet.php b/modules/lovers/lovers_violet.php index 0fe8cc3..28e7133 100644 --- a/modules/lovers/lovers_violet.php +++ b/modules/lovers/lovers_violet.php @@ -31,6 +31,9 @@ function lovers_violet(){ output("`n`n`^You gain a charm point!"); } $seenlover = 1; + } elseif ($session['user']['marriedto']!=0) { + //married to someone else + output("You think it might not be wise to flirt with other women..."); }elseif (httpget('flirt')==""){ output("You stare dreamily across the room at %s`0, who leans across a table to serve a patron a drink.",$partner); output("In doing so, she shows perhaps a bit more skin than is necessary, but you don't feel the need to object."); @@ -147,4 +150,4 @@ function lovers_violet(){ } set_module_pref("seenlover",$seenlover); } -?> \ No newline at end of file +?> diff --git a/modules/recaptcha.php b/modules/recaptcha.php new file mode 100644 index 0000000..82b0b56 --- /dev/null +++ b/modules/recaptcha.php @@ -0,0 +1,84 @@ +"Google ReCaptcha Plugin", + "version"=>"1.0", + "author"=>"`2Oliver Brendel", + "override_forced_nav"=>true, + "category"=>"Administrative", + "download"=>"", + "settings"=>array( + "Captcha Settings,title", + "sitekey"=>"Your Google Site Key,text|KEY", + "sitesecret"=>"Your Google Site Secret,text|SECRET", + ), + ); + return $info; +} + +function recaptcha_install(){ + if (extension_loaded('curl')) { + debug("CURL is necessary to make this work and is loaded.`n"); + } else { + debug("CURL PHP5 extension is necessary and NOT loaded! Install it on your server!`n"); + return false; + } + module_addhook_priority("addpetition",50); + module_addhook_priority("petitionform",50); + return true; +} + +function recaptcha_uninstall(){ + return true; +} + +function recaptcha_dohook($hookname, $args){ + global $session; + if (!extension_loaded('curl')) { + output("Verification by Captcha disabled. Code #154 Order 66`n"); + return $args; + } + $sitekey = get_module_setting('sitekey'); + $sitesecret = get_module_setting('sitesecret'); + switch ($hookname) { + case "addpetition": + //verify captcha + $url = "https://www.google.com/recaptcha/api/siteverify"; + + $data = array( + 'secret'=>$sitesecret, + 'response'=>httppost('g-recaptcha-response') + ); //parameters to be sent + $options = array( + 'http' => array ( + 'method' => 'POST', + 'content' => http_build_query($data) + ) + ); + $context = stream_context_create($options); + $verify = file_get_contents($url, false, $context); + $captcha_success=json_decode($verify); + + if (!$captcha_success->{'success'}) { + if (!is_array($answer->{'error-codes'})) { + $errorcodes=array('not-available'); + } else { + $errorcodes=$answer->{'error-codes'}; + } + $args['cancelreason']=sprintf("`c`b`\$Sorry, but you entered the wrong captcha code, try again`b`c(%s)`n`n",implode(",",$errorcodes)); + $args['cancelpetition']=true; + } + unset($args['g-recaptcha-response']); //unset this as it is useless now + break; + case "petitionform": + rawoutput(""); + rawoutput("
"); + break; + } + return $args; +} + +function recaptcha_run(){ +} + diff --git a/modules/titlechange.php b/modules/titlechange.php index 111ce19..aa10277 100644 --- a/modules/titlechange.php +++ b/modules/titlechange.php @@ -35,22 +35,27 @@ function titlechange_uninstall(){ function titlechange_dohook($hookname,$args){ global $session; + $times = get_module_pref("timespurchased"); + $threshold = get_module_setting("initialpoints") + ($times * get_module_setting("extrapoints")); + $need = $session['user']['donation']-$threshold; switch($hookname){ case "pointsdesc": $args['count']++; $format = $args['format']; - $str = translate("The ability to choose a custom in-game title upon reaching %s and every %s points thereafter. (this doesn't use up those points) [NOTE: A title is the prefix on your name like Farmboy or Page]"); + $str = translate("The ability to choose a custom in-game title upon reaching %s and every %s points thereafter. (this doesn't use up those points) [NOTE: A title is the prefix on your name like Farmboy or Page]. You have done so %s times and now need at least %s points to do so again!"); $str = sprintf($str, get_module_setting("initialpoints"), - get_module_setting("extrapoints")); + get_module_setting("extrapoints"),$times,$threshold); output($format, $str, true); break; case "lodge": // If they have less than what they need just ignore them $times = get_module_pref("timespurchased"); if ($session['user']['ctitle']!='') addnav("Reset your Custom Title (free)","runmodule.php?module=titlechange&op=titlereset"); - if (get_module_setting("initialpoints") + ($times * get_module_setting("extrapoints")) > $session['user']['donation']) - break; - addnav("Set Custom Title (free)","runmodule.php?module=titlechange&op=titlechange"); + if ($need>=0) { + addnav("Set Custom Title (free)","runmodule.php?module=titlechange&op=titlechange"); + } else { + addnav(array("Set Custom Title (you need %s more points!)",$need),""); + } break; } return $args; @@ -88,7 +93,7 @@ function titlechange_run(){ case "titlepreview": $ntitle = stripslashes(rawurldecode(httppost('newname'))); $ntitle=newline_sanitize($ntitle); - + $ntitle=titlechange_remove_emoji($ntitle); if ($ntitle=="") { if (get_module_setting("blank")) { $ntitle = "`0"; @@ -104,7 +109,15 @@ function titlechange_run(){ } $ntitle = preg_replace("/[`][cHw]/", "", $ntitle); $ntitle = sanitize_html($ntitle); - $ntitle = substr($ntitle,0,get_module_setting('length')); //for multibytes entered + if (strlen($ntitle)>get_module_setting('length')) { + output("`7Your new title is too long. Please shorten it.`n "); + output("`7Your title looked like this: %s`0`n", $ntitle); + rawoutput(""); + rawoutput(""); + rawoutput(""); + rawoutput(""); + break; + } $nname = get_player_basename(); output("`7Your new title will look like this: %s`0`n", $ntitle); output("`7Your entire name will look like: %s %s`0`n`n", @@ -149,4 +162,8 @@ function titlechange_run(){ addnav("L?Return to the Lodge","lodge.php"); page_footer(); } + +function titlechange_remove_emoji($text){ + return preg_replace('/[\x{1F3F4}](?:\x{E0067}\x{E0062}\x{E0077}\x{E006C}\x{E0073}\x{E007F})|[\x{1F3F4}](?:\x{E0067}\x{E0062}\x{E0073}\x{E0063}\x{E0074}\x{E007F})|[\x{1F3F4}](?:\x{E0067}\x{E0062}\x{E0065}\x{E006E}\x{E0067}\x{E007F})|[\x{1F3F4}](?:\x{200D}\x{2620}\x{FE0F})|[\x{1F3F3}](?:\x{FE0F}\x{200D}\x{1F308})|[\x{0023}\x{002A}\x{0030}\x{0031}\x{0032}\x{0033}\x{0034}\x{0035}\x{0036}\x{0037}\x{0038}\x{0039}](?:\x{FE0F}\x{20E3})|[\x{1F441}](?:\x{FE0F}\x{200D}\x{1F5E8}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F467}\x{200D}\x{1F467})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F467}\x{200D}\x{1F466})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F467})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F466}\x{200D}\x{1F466})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F466})|[\x{1F468}](?:\x{200D}\x{1F468}\x{200D}\x{1F467}\x{200D}\x{1F467})|[\x{1F468}](?:\x{200D}\x{1F468}\x{200D}\x{1F466}\x{200D}\x{1F466})|[\x{1F468}](?:\x{200D}\x{1F468}\x{200D}\x{1F467}\x{200D}\x{1F466})|[\x{1F468}](?:\x{200D}\x{1F468}\x{200D}\x{1F467})|[\x{1F468}](?:\x{200D}\x{1F468}\x{200D}\x{1F466})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F469}\x{200D}\x{1F467}\x{200D}\x{1F467})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F469}\x{200D}\x{1F466}\x{200D}\x{1F466})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F469}\x{200D}\x{1F467}\x{200D}\x{1F466})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F469}\x{200D}\x{1F467})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F469}\x{200D}\x{1F466})|[\x{1F469}](?:\x{200D}\x{2764}\x{FE0F}\x{200D}\x{1F469})|[\x{1F469}\x{1F468}](?:\x{200D}\x{2764}\x{FE0F}\x{200D}\x{1F468})|[\x{1F469}](?:\x{200D}\x{2764}\x{FE0F}\x{200D}\x{1F48B}\x{200D}\x{1F469})|[\x{1F469}\x{1F468}](?:\x{200D}\x{2764}\x{FE0F}\x{200D}\x{1F48B}\x{200D}\x{1F468})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F9B3})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F9B3})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F9B3})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F9B3})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F9B3})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F9B3})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F9B2})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F9B2})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F9B2})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F9B2})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F9B2})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F9B2})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F9B1})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F9B1})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F9B1})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F9B1})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F9B1})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F9B1})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F9B0})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F9B0})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F9B0})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F9B0})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F9B0})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F9B0})|[\x{1F575}\x{1F3CC}\x{26F9}\x{1F3CB}](?:\x{FE0F}\x{200D}\x{2640}\x{FE0F})|[\x{1F575}\x{1F3CC}\x{26F9}\x{1F3CB}](?:\x{FE0F}\x{200D}\x{2642}\x{FE0F})|[\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{1F3FF}\x{200D}\x{2640}\x{FE0F})|[\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{1F3FE}\x{200D}\x{2640}\x{FE0F})|[\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{1F3FD}\x{200D}\x{2640}\x{FE0F})|[\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{1F3FC}\x{200D}\x{2640}\x{FE0F})|[\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{1F3FB}\x{200D}\x{2640}\x{FE0F})|[\x{1F46E}\x{1F9B8}\x{1F9B9}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F9DE}\x{1F9DF}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F46F}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93C}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{200D}\x{2640}\x{FE0F})|[\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{1F3FF}\x{200D}\x{2642}\x{FE0F})|[\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{1F3FE}\x{200D}\x{2642}\x{FE0F})|[\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{1F3FD}\x{200D}\x{2642}\x{FE0F})|[\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{1F3FC}\x{200D}\x{2642}\x{FE0F})|[\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{1F3FB}\x{200D}\x{2642}\x{FE0F})|[\x{1F46E}\x{1F9B8}\x{1F9B9}\x{1F482}\x{1F477}\x{1F473}\x{1F471}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F9DE}\x{1F9DF}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F46F}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93C}\x{1F93D}\x{1F93E}\x{1F939}](?:\x{200D}\x{2642}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F692})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F692})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F692})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F692})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F692})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F692})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F680})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F680})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F680})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F680})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F680})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F680})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{2708}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{2708}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{2708}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{2708}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{2708}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{200D}\x{2708}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F3A8})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F3A8})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F3A8})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F3A8})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F3A8})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F3A8})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F3A4})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F3A4})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F3A4})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F3A4})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F3A4})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F3A4})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F4BB})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F4BB})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F4BB})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F4BB})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F4BB})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F4BB})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F52C})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F52C})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F52C})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F52C})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F52C})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F52C})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F4BC})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F4BC})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F4BC})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F4BC})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F4BC})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F4BC})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F3ED})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F3ED})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F3ED})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F3ED})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F3ED})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F3ED})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F527})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F527})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F527})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F527})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F527})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F527})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F373})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F373})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F373})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F373})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F373})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F373})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F33E})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F33E})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F33E})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F33E})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F33E})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F33E})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{2696}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{2696}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{2696}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{2696}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{2696}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{200D}\x{2696}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F3EB})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F3EB})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F3EB})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F3EB})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F3EB})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F3EB})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{1F393})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{1F393})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{1F393})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{1F393})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{1F393})|[\x{1F468}\x{1F469}](?:\x{200D}\x{1F393})|[\x{1F468}\x{1F469}](?:\x{1F3FF}\x{200D}\x{2695}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FE}\x{200D}\x{2695}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FD}\x{200D}\x{2695}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FC}\x{200D}\x{2695}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{1F3FB}\x{200D}\x{2695}\x{FE0F})|[\x{1F468}\x{1F469}](?:\x{200D}\x{2695}\x{FE0F})|[\x{1F476}\x{1F9D2}\x{1F466}\x{1F467}\x{1F9D1}\x{1F468}\x{1F469}\x{1F9D3}\x{1F474}\x{1F475}\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F934}\x{1F478}\x{1F473}\x{1F472}\x{1F9D5}\x{1F9D4}\x{1F471}\x{1F935}\x{1F470}\x{1F930}\x{1F931}\x{1F47C}\x{1F385}\x{1F936}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F483}\x{1F57A}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F6C0}\x{1F6CC}\x{1F574}\x{1F3C7}\x{1F3C2}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}\x{1F933}\x{1F4AA}\x{1F9B5}\x{1F9B6}\x{1F448}\x{1F449}\x{261D}\x{1F446}\x{1F595}\x{1F447}\x{270C}\x{1F91E}\x{1F596}\x{1F918}\x{1F919}\x{1F590}\x{270B}\x{1F44C}\x{1F44D}\x{1F44E}\x{270A}\x{1F44A}\x{1F91B}\x{1F91C}\x{1F91A}\x{1F44B}\x{1F91F}\x{270D}\x{1F44F}\x{1F450}\x{1F64C}\x{1F932}\x{1F64F}\x{1F485}\x{1F442}\x{1F443}](?:\x{1F3FF})|[\x{1F476}\x{1F9D2}\x{1F466}\x{1F467}\x{1F9D1}\x{1F468}\x{1F469}\x{1F9D3}\x{1F474}\x{1F475}\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F934}\x{1F478}\x{1F473}\x{1F472}\x{1F9D5}\x{1F9D4}\x{1F471}\x{1F935}\x{1F470}\x{1F930}\x{1F931}\x{1F47C}\x{1F385}\x{1F936}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F483}\x{1F57A}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F6C0}\x{1F6CC}\x{1F574}\x{1F3C7}\x{1F3C2}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}\x{1F933}\x{1F4AA}\x{1F9B5}\x{1F9B6}\x{1F448}\x{1F449}\x{261D}\x{1F446}\x{1F595}\x{1F447}\x{270C}\x{1F91E}\x{1F596}\x{1F918}\x{1F919}\x{1F590}\x{270B}\x{1F44C}\x{1F44D}\x{1F44E}\x{270A}\x{1F44A}\x{1F91B}\x{1F91C}\x{1F91A}\x{1F44B}\x{1F91F}\x{270D}\x{1F44F}\x{1F450}\x{1F64C}\x{1F932}\x{1F64F}\x{1F485}\x{1F442}\x{1F443}](?:\x{1F3FE})|[\x{1F476}\x{1F9D2}\x{1F466}\x{1F467}\x{1F9D1}\x{1F468}\x{1F469}\x{1F9D3}\x{1F474}\x{1F475}\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F934}\x{1F478}\x{1F473}\x{1F472}\x{1F9D5}\x{1F9D4}\x{1F471}\x{1F935}\x{1F470}\x{1F930}\x{1F931}\x{1F47C}\x{1F385}\x{1F936}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F483}\x{1F57A}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F6C0}\x{1F6CC}\x{1F574}\x{1F3C7}\x{1F3C2}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}\x{1F933}\x{1F4AA}\x{1F9B5}\x{1F9B6}\x{1F448}\x{1F449}\x{261D}\x{1F446}\x{1F595}\x{1F447}\x{270C}\x{1F91E}\x{1F596}\x{1F918}\x{1F919}\x{1F590}\x{270B}\x{1F44C}\x{1F44D}\x{1F44E}\x{270A}\x{1F44A}\x{1F91B}\x{1F91C}\x{1F91A}\x{1F44B}\x{1F91F}\x{270D}\x{1F44F}\x{1F450}\x{1F64C}\x{1F932}\x{1F64F}\x{1F485}\x{1F442}\x{1F443}](?:\x{1F3FD})|[\x{1F476}\x{1F9D2}\x{1F466}\x{1F467}\x{1F9D1}\x{1F468}\x{1F469}\x{1F9D3}\x{1F474}\x{1F475}\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F934}\x{1F478}\x{1F473}\x{1F472}\x{1F9D5}\x{1F9D4}\x{1F471}\x{1F935}\x{1F470}\x{1F930}\x{1F931}\x{1F47C}\x{1F385}\x{1F936}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F483}\x{1F57A}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F6C0}\x{1F6CC}\x{1F574}\x{1F3C7}\x{1F3C2}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}\x{1F933}\x{1F4AA}\x{1F9B5}\x{1F9B6}\x{1F448}\x{1F449}\x{261D}\x{1F446}\x{1F595}\x{1F447}\x{270C}\x{1F91E}\x{1F596}\x{1F918}\x{1F919}\x{1F590}\x{270B}\x{1F44C}\x{1F44D}\x{1F44E}\x{270A}\x{1F44A}\x{1F91B}\x{1F91C}\x{1F91A}\x{1F44B}\x{1F91F}\x{270D}\x{1F44F}\x{1F450}\x{1F64C}\x{1F932}\x{1F64F}\x{1F485}\x{1F442}\x{1F443}](?:\x{1F3FC})|[\x{1F476}\x{1F9D2}\x{1F466}\x{1F467}\x{1F9D1}\x{1F468}\x{1F469}\x{1F9D3}\x{1F474}\x{1F475}\x{1F46E}\x{1F575}\x{1F482}\x{1F477}\x{1F934}\x{1F478}\x{1F473}\x{1F472}\x{1F9D5}\x{1F9D4}\x{1F471}\x{1F935}\x{1F470}\x{1F930}\x{1F931}\x{1F47C}\x{1F385}\x{1F936}\x{1F9D9}\x{1F9DA}\x{1F9DB}\x{1F9DC}\x{1F9DD}\x{1F64D}\x{1F64E}\x{1F645}\x{1F646}\x{1F481}\x{1F64B}\x{1F647}\x{1F926}\x{1F937}\x{1F486}\x{1F487}\x{1F6B6}\x{1F3C3}\x{1F483}\x{1F57A}\x{1F9D6}\x{1F9D7}\x{1F9D8}\x{1F6C0}\x{1F6CC}\x{1F574}\x{1F3C7}\x{1F3C2}\x{1F3CC}\x{1F3C4}\x{1F6A3}\x{1F3CA}\x{26F9}\x{1F3CB}\x{1F6B4}\x{1F6B5}\x{1F938}\x{1F93D}\x{1F93E}\x{1F939}\x{1F933}\x{1F4AA}\x{1F9B5}\x{1F9B6}\x{1F448}\x{1F449}\x{261D}\x{1F446}\x{1F595}\x{1F447}\x{270C}\x{1F91E}\x{1F596}\x{1F918}\x{1F919}\x{1F590}\x{270B}\x{1F44C}\x{1F44D}\x{1F44E}\x{270A}\x{1F44A}\x{1F91B}\x{1F91C}\x{1F91A}\x{1F44B}\x{1F91F}\x{270D}\x{1F44F}\x{1F450}\x{1F64C}\x{1F932}\x{1F64F}\x{1F485}\x{1F442}\x{1F443}](?:\x{1F3FB})|[\x{1F1E6}\x{1F1E7}\x{1F1E8}\x{1F1E9}\x{1F1F0}\x{1F1F2}\x{1F1F3}\x{1F1F8}\x{1F1F9}\x{1F1FA}](?:\x{1F1FF})|[\x{1F1E7}\x{1F1E8}\x{1F1EC}\x{1F1F0}\x{1F1F1}\x{1F1F2}\x{1F1F5}\x{1F1F8}\x{1F1FA}](?:\x{1F1FE})|[\x{1F1E6}\x{1F1E8}\x{1F1F2}\x{1F1F8}](?:\x{1F1FD})|[\x{1F1E6}\x{1F1E7}\x{1F1E8}\x{1F1EC}\x{1F1F0}\x{1F1F2}\x{1F1F5}\x{1F1F7}\x{1F1F9}\x{1F1FF}](?:\x{1F1FC})|[\x{1F1E7}\x{1F1E8}\x{1F1F1}\x{1F1F2}\x{1F1F8}\x{1F1F9}](?:\x{1F1FB})|[\x{1F1E6}\x{1F1E8}\x{1F1EA}\x{1F1EC}\x{1F1ED}\x{1F1F1}\x{1F1F2}\x{1F1F3}\x{1F1F7}\x{1F1FB}](?:\x{1F1FA})|[\x{1F1E6}\x{1F1E7}\x{1F1EA}\x{1F1EC}\x{1F1ED}\x{1F1EE}\x{1F1F1}\x{1F1F2}\x{1F1F5}\x{1F1F8}\x{1F1F9}\x{1F1FE}](?:\x{1F1F9})|[\x{1F1E6}\x{1F1E7}\x{1F1EA}\x{1F1EC}\x{1F1EE}\x{1F1F1}\x{1F1F2}\x{1F1F5}\x{1F1F7}\x{1F1F8}\x{1F1FA}\x{1F1FC}](?:\x{1F1F8})|[\x{1F1E6}\x{1F1E7}\x{1F1E8}\x{1F1EA}\x{1F1EB}\x{1F1EC}\x{1F1ED}\x{1F1EE}\x{1F1F0}\x{1F1F1}\x{1F1F2}\x{1F1F3}\x{1F1F5}\x{1F1F8}\x{1F1F9}](?:\x{1F1F7})|[\x{1F1E6}\x{1F1E7}\x{1F1EC}\x{1F1EE}\x{1F1F2}](?:\x{1F1F6})|[\x{1F1E8}\x{1F1EC}\x{1F1EF}\x{1F1F0}\x{1F1F2}\x{1F1F3}](?:\x{1F1F5})|[\x{1F1E6}\x{1F1E7}\x{1F1E8}\x{1F1E9}\x{1F1EB}\x{1F1EE}\x{1F1EF}\x{1F1F2}\x{1F1F3}\x{1F1F7}\x{1F1F8}\x{1F1F9}](?:\x{1F1F4})|[\x{1F1E7}\x{1F1E8}\x{1F1EC}\x{1F1ED}\x{1F1EE}\x{1F1F0}\x{1F1F2}\x{1F1F5}\x{1F1F8}\x{1F1F9}\x{1F1FA}\x{1F1FB}](?:\x{1F1F3})|[\x{1F1E6}\x{1F1E7}\x{1F1E8}\x{1F1E9}\x{1F1EB}\x{1F1EC}\x{1F1ED}\x{1F1EE}\x{1F1EF}\x{1F1F0}\x{1F1F2}\x{1F1F4}\x{1F1F5}\x{1F1F8}\x{1F1F9}\x{1F1FA}\x{1F1FF}](?:\x{1F1F2})|[\x{1F1E6}\x{1F1E7}\x{1F1E8}\x{1F1EC}\x{1F1EE}\x{1F1F2}\x{1F1F3}\x{1F1F5}\x{1F1F8}\x{1F1F9}](?:\x{1F1F1})|[\x{1F1E8}\x{1F1E9}\x{1F1EB}\x{1F1ED}\x{1F1F1}\x{1F1F2}\x{1F1F5}\x{1F1F8}\x{1F1F9}\x{1F1FD}](?:\x{1F1F0})|[\x{1F1E7}\x{1F1E9}\x{1F1EB}\x{1F1F8}\x{1F1F9}](?:\x{1F1EF})|[\x{1F1E6}\x{1F1E7}\x{1F1E8}\x{1F1EB}\x{1F1EC}\x{1F1F0}\x{1F1F1}\x{1F1F3}\x{1F1F8}\x{1F1FB}](?:\x{1F1EE})|[\x{1F1E7}\x{1F1E8}\x{1F1EA}\x{1F1EC}\x{1F1F0}\x{1F1F2}\x{1F1F5}\x{1F1F8}\x{1F1F9}](?:\x{1F1ED})|[\x{1F1E6}\x{1F1E7}\x{1F1E8}\x{1F1E9}\x{1F1EA}\x{1F1EC}\x{1F1F0}\x{1F1F2}\x{1F1F3}\x{1F1F5}\x{1F1F8}\x{1F1F9}\x{1F1FA}\x{1F1FB}](?:\x{1F1EC})|[\x{1F1E6}\x{1F1E7}\x{1F1E8}\x{1F1EC}\x{1F1F2}\x{1F1F3}\x{1F1F5}\x{1F1F9}\x{1F1FC}](?:\x{1F1EB})|[\x{1F1E6}\x{1F1E7}\x{1F1E9}\x{1F1EA}\x{1F1EC}\x{1F1EE}\x{1F1EF}\x{1F1F0}\x{1F1F2}\x{1F1F3}\x{1F1F5}\x{1F1F7}\x{1F1F8}\x{1F1FB}\x{1F1FE}](?:\x{1F1EA})|[\x{1F1E6}\x{1F1E7}\x{1F1E8}\x{1F1EC}\x{1F1EE}\x{1F1F2}\x{1F1F8}\x{1F1F9}](?:\x{1F1E9})|[\x{1F1E6}\x{1F1E8}\x{1F1EA}\x{1F1EE}\x{1F1F1}\x{1F1F2}\x{1F1F3}\x{1F1F8}\x{1F1F9}\x{1F1FB}](?:\x{1F1E8})|[\x{1F1E7}\x{1F1EC}\x{1F1F1}\x{1F1F8}](?:\x{1F1E7})|[\x{1F1E7}\x{1F1E8}\x{1F1EA}\x{1F1EC}\x{1F1F1}\x{1F1F2}\x{1F1F3}\x{1F1F5}\x{1F1F6}\x{1F1F8}\x{1F1F9}\x{1F1FA}\x{1F1FB}\x{1F1FF}](?:\x{1F1E6})|[\x{00A9}\x{00AE}\x{203C}\x{2049}\x{2122}\x{2139}\x{2194}-\x{2199}\x{21A9}-\x{21AA}\x{231A}-\x{231B}\x{2328}\x{23CF}\x{23E9}-\x{23F3}\x{23F8}-\x{23FA}\x{24C2}\x{25AA}-\x{25AB}\x{25B6}\x{25C0}\x{25FB}-\x{25FE}\x{2600}-\x{2604}\x{260E}\x{2611}\x{2614}-\x{2615}\x{2618}\x{261D}\x{2620}\x{2622}-\x{2623}\x{2626}\x{262A}\x{262E}-\x{262F}\x{2638}-\x{263A}\x{2640}\x{2642}\x{2648}-\x{2653}\x{2660}\x{2663}\x{2665}-\x{2666}\x{2668}\x{267B}\x{267E}-\x{267F}\x{2692}-\x{2697}\x{2699}\x{269B}-\x{269C}\x{26A0}-\x{26A1}\x{26AA}-\x{26AB}\x{26B0}-\x{26B1}\x{26BD}-\x{26BE}\x{26C4}-\x{26C5}\x{26C8}\x{26CE}-\x{26CF}\x{26D1}\x{26D3}-\x{26D4}\x{26E9}-\x{26EA}\x{26F0}-\x{26F5}\x{26F7}-\x{26FA}\x{26FD}\x{2702}\x{2705}\x{2708}-\x{270D}\x{270F}\x{2712}\x{2714}\x{2716}\x{271D}\x{2721}\x{2728}\x{2733}-\x{2734}\x{2744}\x{2747}\x{274C}\x{274E}\x{2753}-\x{2755}\x{2757}\x{2763}-\x{2764}\x{2795}-\x{2797}\x{27A1}\x{27B0}\x{27BF}\x{2934}-\x{2935}\x{2B05}-\x{2B07}\x{2B1B}-\x{2B1C}\x{2B50}\x{2B55}\x{3030}\x{303D}\x{3297}\x{3299}\x{1F004}\x{1F0CF}\x{1F170}-\x{1F171}\x{1F17E}-\x{1F17F}\x{1F18E}\x{1F191}-\x{1F19A}\x{1F201}-\x{1F202}\x{1F21A}\x{1F22F}\x{1F232}-\x{1F23A}\x{1F250}-\x{1F251}\x{1F300}-\x{1F321}\x{1F324}-\x{1F393}\x{1F396}-\x{1F397}\x{1F399}-\x{1F39B}\x{1F39E}-\x{1F3F0}\x{1F3F3}-\x{1F3F5}\x{1F3F7}-\x{1F3FA}\x{1F400}-\x{1F4FD}\x{1F4FF}-\x{1F53D}\x{1F549}-\x{1F54E}\x{1F550}-\x{1F567}\x{1F56F}-\x{1F570}\x{1F573}-\x{1F57A}\x{1F587}\x{1F58A}-\x{1F58D}\x{1F590}\x{1F595}-\x{1F596}\x{1F5A4}-\x{1F5A5}\x{1F5A8}\x{1F5B1}-\x{1F5B2}\x{1F5BC}\x{1F5C2}-\x{1F5C4}\x{1F5D1}-\x{1F5D3}\x{1F5DC}-\x{1F5DE}\x{1F5E1}\x{1F5E3}\x{1F5E8}\x{1F5EF}\x{1F5F3}\x{1F5FA}-\x{1F64F}\x{1F680}-\x{1F6C5}\x{1F6CB}-\x{1F6D2}\x{1F6E0}-\x{1F6E5}\x{1F6E9}\x{1F6EB}-\x{1F6EC}\x{1F6F0}\x{1F6F3}-\x{1F6F9}\x{1F910}-\x{1F93A}\x{1F93C}-\x{1F93E}\x{1F940}-\x{1F945}\x{1F947}-\x{1F970}\x{1F973}-\x{1F976}\x{1F97A}\x{1F97C}-\x{1F9A2}\x{1F9B0}-\x{1F9B9}\x{1F9C0}-\x{1F9C2}\x{1F9D0}-\x{1F9FF}]/u', '', $text); +} ?> diff --git a/newday.php b/newday.php index 693bc7b..d162c15 100644 --- a/newday.php +++ b/newday.php @@ -15,8 +15,8 @@ ** SETTINGS ** ***************/ $turnsperday = getsetting("turns",10); -$maxinterest = ((float)getsetting("maxinterest",10)/100) + 1; //1.1; -$mininterest = ((float)getsetting("mininterest",1)/100) + 1; //1.1; +$maxinterest = ((float)getsetting("maxinterest",10)/100); //0.1; +$mininterest = ((float)getsetting("mininterest",1)/100); //0.1; $dailypvpfights = getsetting("pvpday",3); $resline = (httpget('resurrection')=="true") ? "&resurrection=true" : "" ; @@ -129,17 +129,17 @@ $interestrate = e_rand($mininterest*100,$maxinterest*100)/(float)100; if ($session['user']['turns']>getsetting("fightsforinterest",4) && $session['user']['goldinbank']>=0) { - $interestrate=1; + $interestrate=0; output("`2Today's interest rate: `^0% (Bankers in this village only give interest to those who work for it)`2.`n"); } elseif (getsetting("maxgoldforinterest", 100000) && $session['user']['goldinbank']>=getsetting("maxgoldforinterest", 100000)) { - $interestrate=1; + $interestrate=0; output("`2Today's interest rate: `^0%% (The bank will not pay interest on accounts equal or greater than %s to retain solvency)`2.`n", getsetting("maxgoldforinterest", 100000)); }else{ - output("`2Today's interest rate: `^%s%% `n",($interestrate-1)*100); + output("`2Today's interest rate: `^%s%% `n",($interestrate)*100); if ($session['user']['goldinbank']>=0){ - output("`2Gold earned from interest: `^%s`2.`n",(int)($session['user']['goldinbank']*($interestrate-1))); + output("`2Gold earned from interest: `^%s`2.`n",(int)($session['user']['goldinbank']*($interestrate))); }else{ - output("`2Interest Accrued on Debt: `^%s`2 gold.`n",-(int)($session['user']['goldinbank']*($interestrate-1))); + output("`2Interest Accrued on Debt: `^%s`2 gold.`n",-(int)($session['user']['goldinbank']*($interestrate))); } } diff --git a/prefs.php b/prefs.php index 264a5d9..4a9692d 100644 --- a/prefs.php +++ b/prefs.php @@ -160,16 +160,10 @@ //cut last char, won't be salved in the DB else! $subj = translate_mail("LoGD Account Verification",0); $shortname=$session['user']['login']; - if ($_SERVER['SERVER_PORT']==443) { - //assume SSL - $serveraddress=sprintf("http://%s?op=val&id=%s",$_SERVER['SERVER_NAME']."/create.php",$emailverification); - $serverurl=sprintf("http://%s",$_SERVER['SERVER_NAME']); - - } else { - //assume non-SSL - $serveraddress=sprintf("http://%s?op=val&id=%s",$_SERVER['SERVER_NAME']."/create.php",$emailverification); - $serverurl=sprintf("http://%s",$_SERVER['SERVER_NAME']); - } + $gameurl=getsetting("serverurl","https://lotgd.com"); + $serveraddress=$gameurl."/create.php"; + $serveraddress=sprintf("%s?op=val&id=%s",$serveraddress,$emailverification); + $serverurl=$gameurl; $msg = translate_mail(array("An email change has been requested to this email account.`n`nLogin name: %s `n`n",$shortname)); $confirm = translate_mail(array("In order to confirm it, you will need to click on the link below.`n`n %s`n`nNote: You need to be LOGGED OUT of the game to do so. If you are logged in while clicking, log out and try again.`n`n",$serveraddress,$emailverification),0); @@ -192,9 +186,19 @@ $msg.=$confirm.$footer; $ownermsg.=$newvalidationsent.$footer; } - - mail($email,$subj,str_replace("`n","\n",$msg),"From: ".getsetting("gameadminemail","postmaster@localhost.com")); - mail($session['user']['emailaddress'],$subj,str_replace("`n","\n",$ownermsg),"From: ".getsetting("gameadminemail","postmaster@localhost.com")); + //mail new emailaddress + require_once("lib/sendmail.php"); + $to_array=array($email=>$email); + $from_array=array(getsetting("gameadminemail","postmaster@localhost")=>getsetting("gameadminemail","postmaster@localhost")); + send_email($to_array,str_replace("`n","\n",$msg),$subj,$from_array,false,"text/plain"); + + //mail old email address + require_once("lib/sendmail.php"); + $to_array=array($session['user']['emailaddress']=>$session['user']['login']); + $from_array=array(getsetting("gameadminemail","postmaster@localhost")=>getsetting("gameadminemail","postmaster@localhost")); + send_email($to_array,str_replace("`n","\n",$ownermsg),$subj,$from_array,false,"text/plain"); + + //save replacemail $session['user']['replaceemail']=$email."|".date("Y-m-d H:i:s"); $session['user']['emailvalidation']=$emailverification; debuglog("Email Change requested from ".$session['user']['emailaddress']." to ".$email,$session['user']['acctid'],$session['user']['acctid'],"Email"); diff --git a/runmodule.php b/runmodule.php index 34bb49d..a8eef86 100644 --- a/runmodule.php +++ b/runmodule.php @@ -35,6 +35,13 @@ if (($endtime - $starttime >= 1.00 && ($session['user']['superuser'] & SU_DEBUG_OUTPUT))){ //On a side note, you won't ever see this text. A normal module calls page_footer(), which ends execution here.... debug("Slow Module (".round($endtime-$starttime,2)."s): $mostrecentmodule`n"); + $stats = array ( + "modulename"=>$mostrecentmodule, + "date"=>date("Y-m-d H:i:s"), + "duration"=>round($endtime-$starttime,5), + ); + //remember, this gets only called if you're a user with debug output triggering this! + modulehook("modules_slowmodule",$stats); } tlschema(); }else{ diff --git a/user.php b/user.php index 0812c51..73374f4 100644 --- a/user.php +++ b/user.php @@ -101,7 +101,8 @@ if ($op=='edit' || $op=='save') { //add the race $sql="SELECT race FROM ".db_prefix('accounts')." WHERE acctid=$userid LIMIT 1;"; - $row=db_fetch_assoc(db_query($sql)); + $result = db_query($sql); + $row=db_fetch_assoc($result); $racesenum=",".translate_inline("Undecided","race").","; foreach ($races as $race) { $racesenum.=$race.",".$race.",";