示例#1
0
 function sendLoginDetails($email)
 {
     global $sitename;
     global $logo;
     $query = MYSQL_QUERY("SELECT `Username`,`Password` FROM `ChallengeMembers` WHERE `Email` = '" . $email . "' ") or die(MYSQL_ERROR());
     if ($query) {
         if (MYSQL_NUM_ROWS($query)) {
             while ($row = MYSQL_FETCH_ARRAY($query)) {
                 $userpassword = $row['Password'];
                 $username = $row['Username'];
             }
             /*send email*/
             include 'email_class.php';
             $em = new EmailTemplate();
             $subject = ucfirst($sitename) . " Login Details";
             $headers = "From: " . ucwords($sitename) . " <*****@*****.**> \r\n" . 'X-Mailer: PHP/' . phpversion();
             $headers .= 'MIME-Version: 1.0' . "\r\n";
             $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
             $email_message = $username . ",<br /><br /> Thank you for your interest in joining our challenges.\n\t\t\t\t\t\t\t\t\t<br /><br />\n\t\t\t\t\t\t\t\t\tThe following are your login data:\n\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\tUsername : <b>" . $username . "</b><br />\n\t\t\t\t\t\t\t\t\tPassword : <b>" . $userpassword . "</b>\n\t\t\t\t\t\t\t\t\t<br /><br />\n\t\t\t\t\t\t\t\t\tThank you.<br />\n\t\t\t\t\t\t\t\t\t<b>" . $sitename . "</b>";
             $emailmessage = $em->get($logo, $sitename, $email_message);
             /*first send to guest */
             $sentmail = mail($email, $subject, $emailmessage, $headers);
             /*end of send email*/
             return "OK";
         } else {
             return $email . "not found in database.";
         }
     } else {
         return "Email not found in database.";
     }
 }
示例#2
0
 function set_addition($class, $classid, $column, $value)
 {
     $queryaddition = MYSQL_QUERY("SELECT classid FROM flobase_addition WHERE class='{$class}' AND classid='" . mysql_real_escape_string($classid) . "'");
     if (!($addition = MYSQL_FETCH_ARRAY($queryaddition))) {
         return MYSQL_QUERY("INSERT INTO flobase_addition (class, classid, {$column}) VALUES('{$class}', '" . mysql_real_escape_string($classid) . "', '" . mysql_real_escape_string($value) . "')");
     }
     return MYSQL_QUERY("UPDATE flobase_addition SET {$column}='" . mysql_real_escape_string($value) . "' WHERE class='{$class}' AND classid='" . mysql_real_escape_string($classid) . "'");
 }
function signencode($sign)
{
    MYSQL_QUERY("CREATE TABLE IF NOT EXISTS `cache_languagesigns` (\n\t\t`id` int(11) NOT NULL auto_increment,\n\t\t`signs` text NOT NULL,\n\t\tPRIMARY KEY  (`id`)\n\t\t)");
    MYSQL_QUERY("INSERT INTO cache_languagesigns (signs) VALUES('" . mysql_real_escape_string($sign) . "')");
    $signs = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT signs FROM cache_languagesigns ORDER BY id DESC LIMIT 1"));
    MYSQL_QUERY("TRUNCATE TABLE cache_languagesigns");
    return $signs['signs'];
}
示例#4
0
	function getTotalMonetarySponsorship($challenger_id){
		$total_sponsorship = 0;
		$query = MYSQL_QUERY("SELECT SUM(Amount) AS total_sponsorship FROM SponsorContact WHERE SponsorId = '".$challenger_id."'");
			if($row = MYSQL_FETCH_ARRAY($query)){
				$total_sponsorship = $row['total_sponsorship'];
			}
		return $total_sponsorship;
	}
示例#5
0
 function get_valid_languages()
 {
     global $florensia;
     $queryquesttexttables = MYSQL_QUERY("SHOW TABLES FROM {$florensia->dbname} LIKE 'server_questtext_%'");
     while ($questtexttables = MYSQL_FETCH_ARRAY($queryquesttexttables)) {
         //if (strtr($questtexttables[0], array('server_questtext_'=>''))=="TR") continue;
         $this->languagearray[strtr($questtexttables[0], array('server_questtext_' => ''))] = strtr($questtexttables[0], array('server_questtext_' => ''));
     }
 }
function displayCollapseListKeyed($id = '0', $idFull = '0', $note = null, $pageName = 'main', $key = null, $htmlXtra = null)
{
    // Find this $key object
    $sql = "SELECT *, objects.id AS objectsId FROM wires, objects ";
    $sql .= "WHERE wires.fromid = {$id} AND wires.toid = objects.id ";
    $sql .= "AND objects.name1 LIKE '{$key}' ";
    $sql .= "AND wires.active=1 AND objects.active=1 ";
    $sql .= "LIMIT 1";
    $result = MYSQL_QUERY($sql);
    // Find connected objects
    if ($myrow = MYSQL_FETCH_ARRAY($result)) {
        $foundObjectId = $myrow['objectsId'];
        $sql = "SELECT *, objects.id AS objectsId FROM wires, objects ";
        $sql .= "WHERE wires.fromid = {$foundObjectId} AND wires.toid = objects.id ";
        $sql .= "AND wires.active=1 AND objects.active=1 ";
        $sql .= "ORDER BY rank ASC";
        $result = MYSQL_QUERY($sql);
        // Output collapseList
        $i = 0;
        $notes = explode(",", $note);
        echo "\n\t<!-- collapseList -->";
        echo "\n\n\t<ul class = 'ieFix'>";
        while ($myrow = MYSQL_FETCH_ARRAY($result)) {
            $name = $myrow["name1"];
            if (substr($name, 0, 1) != "." && substr($name, 0, 1) != "_") {
                for ($ii = 0; $ii < count($notes); $ii++) {
                    if ($notes[$ii] == $myrow['objectsId']) {
                        $notesOut[$ii] = null;
                    } else {
                        $notesOut[$ii] = $notes[$ii];
                    }
                }
                $notesOutFiltered = array_filter($notesOut);
                $noteOut = implode(",", $notesOutFiltered);
                $noteOutStub = $noteOut ? $noteOut . "," : "";
                echo in_array($myrow['objectsId'], $notes) ? "\n\t\t<li class = 'collapseListOpen'>\n\t\t\t\t\t\t\t- <a href='" . $pageName . ".html?id=" . $idFull . "&amp;note=" . $noteOut . "'>" . $myrow["name1"] . "</a>" : "\n\t\t<li class = 'collapseListClosed'>\n\t\t\t\t\t\t\t+ <a href='" . $pageName . ".html?id=" . $idFull . "&amp;note=" . $noteOutStub . $myrow['objectsId'] . "'>" . $myrow["name1"] . "</a>";
                if ($htmlXtra) {
                    // Hack for Objectif
                    // $htmlXtra  = "Download the complete <a href='MEDIA/PDF/Deball.pdf' target='_new'>PDF here</a>.<br/>";
                    $htmlXtra = "Download the <a href=\"javascript: windowPop('" . $myrow['url'] . "','poppdf', '450', '550')\">PDF</a>.<br/>";
                    $htmlXtra .= "View the <a href=\"javascript: windowPop('popimage.html?id=" . $myrow['objectsId'] . "','popimage', '800', '533')\">installation images</a>.<br/>";
                    $htmlXtra .= "Read the <a href=\"javascript: windowPop('poptext.html?id=" . $myrow['objectsId'] . "','poptext', '450', '800')\">exhibition text</a>.<br/><br/>";
                    //echo "\n	<br /><br />".$myrow["deck"]."<br/>" . $htmlXtra . "</li>";
                    echo nl2br("\n\t<br />" . $myrow["deck"] . "<br/><br />" . $htmlXtra . "</li>");
                    // End hack
                } else {
                    echo nl2br("\n\t<br />" . $myrow["deck"] . "<br/><br /></li>");
                }
                $i++;
            }
        }
        echo "\n\t</ul>";
    }
}
示例#7
0
 function CheckIfVerified($code)
 {
     $query = MYSQL_QUERY("SELECT `ChallengeMemberId` FROM `ChallengeMembers` WHERE VerificationCode = '" . $code . "' ") or die(MYSQL_ERROR());
     if (MYSQL_NUM_ROWS($query) > 0) {
         while ($row = MYSQL_FETCH_ARRAY($query)) {
             $member_id = $row['ChallengeMemberId'];
             $result = MYSQL_QUERY("UPDATE `ChallengeMembers` SET `Verified` = '1' WHERE `ChallengeMemberId` = '" . $member_id . "' ") or die(MYSQL_ERROR());
         }
         return true;
     } else {
         return false;
     }
 }
示例#8
0
function systemCommand()
{
    //  Get ".System" object
    $sql = "SELECT objects.id AS objectsId FROM wires, objects ";
    $sql .= "WHERE wires.fromid = 0 AND wires.toid = objects.id AND objects.name1 LIKE '.System' ";
    $sql .= "AND wires.active = 1 AND objects.active = 1 ";
    $sql .= "ORDER BY objects.modified DESC LIMIT 1";
    $res = MYSQL_QUERY($sql);
    $row = MYSQL_FETCH_ARRAY($res);
    global $systemObjectId;
    $systemObjectId = $row["objectsId"];
    //  Get "documentBase"
    $sql = "SELECT * FROM wires, objects ";
    $sql .= "WHERE wires.fromid = {$systemObjectId} AND wires.toid = objects.id AND objects.name1 LIKE 'documentBase' ";
    $sql .= "AND wires.active = 1 AND objects.active = 1 ";
    $sql .= "ORDER BY objects.modified DESC LIMIT 1";
    $res = MYSQL_QUERY($sql);
    $row = MYSQL_FETCH_ARRAY($res);
    global $documentBase;
    $documentBase = $row['body'];
    // echo $documentBase;
    //  Establish page
    global $pageName;
    $pageName = basename($PHP_SELF, ".html");
    if (!$pageName) {
        $pageName = "index";
    }
    //  Set document title
    global $documentTitle;
    $documentTitle = $documentTitle ? $documentBase . " | " . $documentTitle : $documentBase;
    //  Parse object commands
    global $objects;
    global $object;
    global $id;
    $objects = explode(",", $id);
    $object = $objects[sizeof($objects) - 1];
    if (!$object) {
        $object = 0;
    }
    if (sizeof($objects) == 1 && empty($objects[sizeof($objects) - 1])) {
        unset($objects);
    }
}
示例#9
0
 function exportfile($filename, $langid)
 {
     global $florensia;
     $langfile = $florensia->language_abs . "/{$langid}/{$filename}.lang.php";
     if (!rename($langfile, $langfile . '_backup_' . date("Y.m.d-H.i.s"))) {
         $florensia->notice("Cannot rename old file for backup. Please verify your chmod settings!", "warning");
         return false;
     }
     if (!($newfile = fopen($langfile, 'a'))) {
         $florensia->notice("Cannot create new file. Please verify your chmod settings!", "warning");
         return false;
     }
     $newlangfile = new SimpleXMLElement("<{$filename} createdate=\"" . date("Y-m-d H:i:s / U") . "\"></{$filename}>");
     $querylangvar = MYSQL_QUERY("SELECT varname, lang_{$langid} FROM flobase_languagefiles WHERE filename='" . mysql_real_escape_string($filename) . "'");
     while ($langvar = MYSQL_FETCH_ARRAY($querylangvar)) {
         $newlangfile->{$langvar}['varname'] = $langvar['lang_' . $langid];
     }
     $newlangfile->asXML($langfile);
     $florensia->notice("Language file and backup for {$langid}/{$filename} successfully created", "successful");
     return true;
 }
示例#10
0
function displayCollapseList($id = '0', $idFull = '0', $note = null, $pageName = 'main')
{
    // Find this .Notes object
    $sql = "SELECT *, objects.id AS objectsId FROM wires, objects ";
    $sql .= "WHERE wires.fromid = {$id} AND wires.toid = objects.id ";
    $sql .= "AND objects.name1 LIKE '.Notes' ";
    $sql .= "AND wires.active=1 AND objects.active=1 ";
    $sql .= "LIMIT 1";
    $result = MYSQL_QUERY($sql);
    // Find connected objects
    if ($myrow = MYSQL_FETCH_ARRAY($result)) {
        $foundObjectId = $myrow['objectsId'];
        $sql = "SELECT *, objects.id AS objectsId FROM wires, objects ";
        $sql .= "WHERE wires.fromid = {$foundObjectId} AND wires.toid = objects.id ";
        $sql .= "AND wires.active=1 AND objects.active=1 ";
        $sql .= "ORDER BY rank ASC";
        $result = MYSQL_QUERY($sql);
        // Output collapseList
        $i = 0;
        $notes = explode(",", $note);
        echo "\n\t<!-- collapseList -->";
        echo "\n\n\t<ul class = 'ieFix'>";
        while ($myrow = MYSQL_FETCH_ARRAY($result)) {
            for ($ii = 0; $ii < count($notes); $ii++) {
                if ($notes[$ii] == $myrow['objectsId']) {
                    $notesOut[$ii] = null;
                } else {
                    $notesOut[$ii] = $notes[$ii];
                }
            }
            $notesOutFiltered = array_filter($notesOut);
            $noteOut = implode(",", $notesOutFiltered);
            $noteOutStub = $noteOut ? $noteOut . "," : "";
            echo in_array($myrow['objectsId'], $notes) ? "\n\t\t<li class = 'collapseListOpen'>\n\t\t\t\t\t\t- <a href='" . $pageName . ".html?id=" . $idFull . "&amp;note=" . $noteOut . "'>" . $myrow["name1"] . "</a>" : "\n\t\t<li class = 'collapseListClosed'>\n\t\t\t\t\t\t+ <a href='" . $pageName . ".html?id=" . $idFull . "&amp;note=" . $noteOutStub . $myrow['objectsId'] . "'>" . $myrow["name1"] . "</a>";
            echo "\n\t<br /><br />" . $myrow["body"] . "<br/></li>";
            $i++;
        }
        echo "\n\t</ul>";
    }
}
示例#11
0
 function get_maplist_source($parentmap = "init", $substring = FALSE)
 {
     global $flocache;
     if ($parentmap == "init") {
         $parentmapquery = MYSQL_QUERY("SELECT mappicture, LTWH, mapid FROM server_map WHERE parentmap=''");
     } else {
         $parentmapquery = MYSQL_QUERY("SELECT mappicture, LTWH, mapid FROM server_map WHERE parentmap='{$parentmap}'");
     }
     while ($map = MYSQL_FETCH_ARRAY($parentmapquery)) {
         if ($map['mapid'] == "BARRACK_000" or $map['mapid'] == "XC0_DK_000" or $map['mapid'] == "DOCK_000" or $map['mapid'] == "LOGIN_000") {
             continue;
         }
         if (!$substring) {
             $cachesubstring = $map['mapid'];
         } else {
             $cachesubstring = "{$substring},submaps,{$map['mapid']}";
         }
         $flocache->write_cache("maplist,{$cachesubstring},mapid", $map['mapid']);
         $flocache->write_cache("maplist,{$cachesubstring},mappicture", $map['mappicture']);
         $flocache->write_cache("maplist,{$cachesubstring},LTWH", $map['LTWH']);
         $trashvar = $this->get_maplist_source($map['mapid'], $cachesubstring);
     }
 }
示例#12
0
     $tabbar['droplist']['desc'] = $classdroplist->get_tabdesc($item->data[$florensia->get_columnname("itemid", "item")], "item");
 } else {
     unset($tabbar['droplist']);
 }
 //usernotes
 $usernotes = $classusernote->display($item->data[$florensia->get_columnname("itemid", "item")], "item");
 $tabbar['usernotes']['desc'] = $classusernote->get_tabdesc($item->data[$florensia->get_columnname("itemid", "item")], "item");
 //market
 //set var first because add/delete is performed while functions run. so it need to runs first
 $marketquickform = $classusermarket->quickform($item->data[$florensia->get_columnname("itemid", "item")]);
 $sellers = 0;
 $buyers = 0;
 $querytradelist = MYSQL_QUERY("SELECT userid, createtime, charname, timeout, itemid, itemamount, server, exchangetype, exchange, exchangegelt, marketlanguage FROM flobase_usermarket as m, flobase_character as c WHERE itemid='" . mysql_real_escape_string($item->data[$florensia->get_columnname("itemid", "item")]) . "' AND m.characterid=c.characterid ORDER BY createtime");
 while ($tradelist = MYSQL_FETCH_ARRAY($querytradelist)) {
     $queryforumuser = MYSQL_QUERY("SELECT username FROM forum_users WHERE uid='" . $tradelist['userid'] . "'");
     if (!($forumuser = MYSQL_FETCH_ARRAY($queryforumuser))) {
         continue;
     }
     unset($marketlanguage);
     $marketlanguagelist = explode(",", $tradelist['marketlanguage']);
     foreach ($marketlanguagelist as $languageid) {
         $marketlanguage .= "<img src='{$florensia->layer_rel}/flags/png/" . $flolang->lang[$languageid]->flagid . ".png' alt='" . $flolang->lang[$languageid]->languagename . "' title='" . $flolang->lang[$languageid]->languagename . "' border='0'> ";
     }
     if ($tradelist['exchange'] != "") {
         $tradelist['exchange'] = "<tr><td>{$flolang->market_details_info_exchange}</td><td>" . $parser->parse_message($tradelist['exchange'], array("allow_mycode" => 1, "filter_badwords" => 1)) . "</td></tr>";
     } else {
         unset($tradelist['exchange']);
     }
     if ($tradelist['exchangegelt']) {
         $tradelist['exchangegelt'] = "<tr><td>Gelt:</td><td>" . get_geltstring($tradelist['exchangegelt'], $tradelist['itemamount']) . " Gelt</td></tr>";
     } else {
示例#13
0
                    $details[$columns['code_korean']] = $details[$columns['code_korean']] * 100;
                    $write = write($columns['name_' . $flolang->language], $details[$columns['code_korean']] . $columns['endvalue'], $columns['code_english']);
                    break;
                default:
                    $write = write($columns['name_' . $flolang->language], $details[$columns['code_korean']] . $columns['endvalue'], $columns['code_english']);
                    break;
            }
        }
    }
    //Additional infos for skillbooks
    if (isset($itemtable['tableid']) && $itemtable['tableid'] == "skillbookitem") {
        //for ($i=1; $i<3; $i++) {
        //	if ($i==1) $querydescription = MYSQL_QUERY("SELECT * FROM server_skill WHERE ".$florensia->get_columnname("bookid", "skill")."='".$details[$florensia->get_columnname("description", "item")]."' ORDER BY ".$florensia->get_columnname("skillid", "skill")."");
        //	else $querydescription = MYSQL_QUERY("SELECT * FROM server_spell WHERE ".$florensia->get_columnname("bookid", "skill")."='".$details[$florensia->get_columnname("description", "item")]."' ORDER BY ".$florensia->get_columnname("skillid", "skill")."");
        $querydescription = MYSQL_QUERY("SELECT " . $florensia->get_columnname("masterlevel", "skill") . "," . $florensia->get_columnname("classid", "skill") . " FROM server_skill WHERE " . $florensia->get_columnname("bookid", "skill") . "='" . $details[$florensia->get_columnname("description", "item")] . "' ORDER BY " . $florensia->get_columnname("skillid", "skill") . "");
        if ($description = MYSQL_FETCH_ARRAY($querydescription)) {
            foreach ($florensia->get_classname($description[$florensia->get_columnname("classid", "skill")], "land") as $key => $classid) {
                $write = write("Class", $classid, "skillclass");
            }
            foreach ($florensia->get_classname($description[$florensia->get_columnname("classid", "skill")], "sea") as $key => $classid) {
                $write = write("Class", $classid, "skillclass");
            }
            $write = write("Max. Level", $description[$florensia->get_columnname("masterlevel", "skill")], "skillmasterlevel");
            //break;
        }
        //}
    }
} else {
    $columnall_y += $steps;
    $column['Error'] = "Error: No details were found.";
}
示例#14
0
    } else {
        // No, retrieve discreet information
        $sql = "SELECT * \n\t\t\t\tFROM objects \n\t\t\t\tWHERE \n\t\t\t\t\tobjects.id = {$object} AND \n\t\t\t\t\tobjects.active = 1 \n\t\t\t\tLIMIT 1;";
        $result = MYSQL_QUERY($sql);
    }
    // Display table format
    $html = "<table cellpadding='10' border='1' width='900px'>";
    // Column headers
    $html .= "<tr style='background-color:#CCCCCC;'>";
    $html .= "<td width='200px'>NAME</td>";
    $html .= "<td width='300px'>ADDRESS</td>";
    $html .= "<td width='300px'>EMAIL</td>";
    $html .= "<td width='100px'>BEGIN / END</td>";
    $html .= "</tr>";
    // Data
    while ($myrow = MYSQL_FETCH_ARRAY($result)) {
        $html .= "<tr style='background-color:#" . ($rowcolor % 2 ? "E9E9E9" : "EFEFEF") . ";'>";
        $html .= "<td>" . $myrow['name1'] . " " . $myrow['name2'] . "</td>";
        $html .= "<td>" . $myrow['address1'] . "<br />" . $myrow['city'] . " " . $myrow['state'] . " " . $myrow['zip'] . "<br />" . $myrow['country'] . "</td>";
        $html .= "<td>" . $myrow['email'] . "</td>";
        $html .= "<td>" . date("Y M j", strToTime($myrow['begin'])) . "<br />" . date("Y M j", strToTime($myrow['end'])) . "</td>";
        $html .= "</tr>";
        $rowcolor++;
        $rownumber++;
    }
    $html .= "</table>";
    $html .= "<br />{$rownumber} total results found.";
    echo $html;
}
echo "<br /><br />";
if ($report) {
示例#15
0
}
if (!$flouser->get_permission("access_admincp") or !$flouser->get_permission("mod_changelog")) {
    $florensia->output_page($flouser->noaccess());
}
$florensia->sitetitle("AdminCP");
$florensia->sitetitle("Version History");
$historylimit = 5;
if ($_POST['create_history']) {
    $createtime = mktime(0, 0, 0, $_POST['new_create_month'], $_POST['new_create_day'], $_POST['new_create_year']);
    MYSQL_QUERY("INSERT INTO flobase_versionhistory (date, changes) VALUES('{$createtime}', '" . mysql_real_escape_string($_POST['new_changes']) . "')");
} elseif ($_POST['update_history']) {
    $queryhistory = MYSQL_QUERY("SELECT id FROM flobase_versionhistory ORDER BY date DESC, id DESC LIMIT {$historylimit}");
    while ($history = MYSQL_FETCH_ARRAY($queryhistory)) {
        $updatetime = mktime(0, 0, 0, $_POST[$history['id'] . '_create_month'], $_POST[$history['id'] . '_create_day'], $_POST[$history['id'] . '_create_year']);
        MYSQL_QUERY("UPDATE flobase_versionhistory SET date='{$updatetime}', changes='" . mysql_real_escape_string($_POST[$history['id'] . '_changes']) . "' WHERE id='" . $history['id'] . "'");
    }
} elseif ($_POST['delete_history']) {
    $queryhistory = MYSQL_QUERY("SELECT id FROM flobase_versionhistory ORDER BY date DESC, id DESC LIMIT {$historylimit}");
    while ($history = MYSQL_FETCH_ARRAY($queryhistory)) {
        if ($_POST[$history['id'] . '_delete'] != 1) {
            continue;
        }
        MYSQL_QUERY("DELETE FROM flobase_versionhistory WHERE id='" . $history['id'] . "'");
    }
}
$queryhistory = MYSQL_QUERY("SELECT id, date, changes FROM flobase_versionhistory ORDER BY date DESC, id DESC LIMIT {$historylimit}");
while ($history = MYSQL_FETCH_ARRAY($queryhistory)) {
    $historylist .= "\n\t\t<div class='shortinfo_" . $florensia->change() . "' style='margin-bottom:15px;'>\n\t\t\t<table style='width:100%;'>\n\t\t\t\t<tr><td style='font-weight:bold; border-bottom:1px solid;'><input type='text' name='{$history['id']}_create_month' value='" . date("m", $history['date']) . "' maxlength='2' style='width:20px'>.<input type='text' name='{$history['id']}_create_day' value='" . date("d", $history['date']) . "' maxlength='2' style='width:20px'>.<input type='text' name='{$history['id']}_create_year' value='" . date("Y", $history['date']) . "' maxlength='4' style='width:30px'></td><td style='text-align:right; border-bottom:1px solid;'><input type='checkbox' name='{$history['id']}_delete' value='1'><input type='submit' name='delete_history' value='Delete selected versions'><input type='submit' name='update_history' value='Update all versions'></td></tr>\n\t\t\t\t<tr><td style='height:7px' colspan='2'></td></tr>\n\t\t\t\t<tr><td class='small' colspan='2'><textarea name='{$history['id']}_changes' style='width:100%; height:200px;'>" . $florensia->escape($history['changes']) . "</textarea></td></tr>\n\t\t\t</table>\n\t\t</div>\n\t";
}
$content = "\n<form action='{$florensia->root}/adminhistory.php' method='post'>\n\t\t<div class='subtitle' style='margin-bottom:15px;'>\n\t\t\t<table style='width:100%;'>\n\t\t\t\t<tr><td style='font-weight:bold; border-bottom:1px solid;'><input type='text' name='new_create_month' value='" . date("m") . "' maxlength='2' style='width:20px'>.<input type='text' name='new_create_day' maxlength='2' value='" . date("d") . "' style='width:20px'>.<input type='text' name='new_create_year' value='" . date("Y") . "' maxlength='4' style='width:30px'></td><td style='text-align:right; border-bottom:1px solid;'><input type='submit' name='create_history' value='Create new version'></td></tr>\n\t\t\t\t<tr><td style='height:7px' colspan='2'></td></tr>\n\t\t\t\t<tr><td class='small' colspan='2'><textarea name='new_changes' style='width:100%; height:200px;'></textarea></td></tr>\n\t\t\t</table>\n\t\t</div>\n{$historylist}\n</form>\n";
$florensia->output_page($content);
示例#16
0
switch ($tool) {
    case "npcflags":
        $florensia->sitetitle("NPC Flags");
        $pagebar[] = "NPC Flags";
        $pageselectlinkoptions = array();
        if (!in_array($_GET['show'], array("notimplemented", "event", "removed"))) {
            $dbwhere[] = "(flobase_addition.entrystatus='0' OR flobase_addition.entrystatus is NULL)";
        } else {
            $pageselectlinkoptions['show'] = $_GET['show'];
            $dbwhere[] = "flobase_addition.entrystatus LIKE '{$_GET['show']},%'";
        }
        if ($dbwhere) {
            $dbwhere = "WHERE " . join(" AND ", $dbwhere);
        }
        $querynpcstring = "FROM server_npc LEFT JOIN flobase_addition ON flobase_addition.classid=server_npc." . $florensia->get_columnname("npcid", "npc") . " AND class='npc' {$dbwhere} ORDER BY name_{$stringtable->language}";
        list($amount) = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT COUNT(*) " . $querynpcstring));
        $pageselect = $florensia->pageselect($amount, array("admintools", "npcflags"), $pageselectlinkoptions);
        $querynpc = MYSQL_QUERY("SELECT * {$querynpcstring} LIMIT " . $pageselect['pagestart'] . "," . $florensia->pageentrylimit);
        while ($npc = MYSQL_FETCH_ARRAY($querynpc)) {
            $npc = new floclass_npc($npc);
            $npclist .= "\n\t\t\t\t<div class='shortinfo_" . $florensia->change() . "'>\n\t\t\t\t\t" . $npc->shortinfo() . "\n\t\t\t\t</div>\n\t\t\t";
        }
        $preselect[$_GET['show']] = "selected='selected'";
        $npcselect = "\n\t\t\t<select name='show'>\n\t\t\t\t<option value='0'>Normal</option>\n\t\t\t\t<option value='event' {$preselect['event']}>Event</option>\n\t\t\t\t<option value='notimplemented' {$preselect['notimplemented']}>Not Implemented</option>\n\t\t\t\t<option value='removed' {$preselect['removed']}>Removed</option>\n\t\t\t</select>\t\t\t\n\t\t";
        $content = "\n\t\t\t<div class='subtitle'>" . $florensia->quick_select("admintools", array("tool" => "npcflags"), array("Show" => $npcselect)) . "</div>\n\t\t\t<div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n\t\t\t{$npclist}\n\t\t\t<div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n\t\t";
        break;
    default:
        $content = "\n\t\t<div>\n\t\t\t<a href='" . $florensia->outlink(array("admintools", "npcflags")) . "'>NPC-Flags</a>\n\t\t</div>\n\t\t";
}
$content = "\n\t<div class='subtitle' style='margin-bottom:10px;'>" . join(" &gt; ", $pagebar) . "</div>\n\t{$content}\n";
$florensia->output_page($content);
示例#17
0
 function load_splitcache($splitid)
 {
     if ($cache = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT cachedata FROM cache_main WHERE cacheid='{$this->splitted}:{$splitid}' LIMIT 1"))) {
         $splitcache = simplexml_load_string($cache['cachedata']);
         if (!$splitcache) {
             $splitcache = new SimpleXMLElement("<Cache></Cache>");
         }
     } else {
         $splitcache = new SimpleXMLElement("<Cache></Cache>");
         MYSQL_QUERY("INSERT INTO cache_main (cacheid, cachedata, lastchanged) VALUES('{$this->splitted}:{$splitid}', '" . mysql_real_escape_string($splitcache->asXML()) . "', '" . date("U") . "')");
     }
     $this->cache[$splitid] = $splitcache;
 }
示例#18
0
<?php

require_once "./init.php";
if (!defined('is_florensia')) {
    die('Hacking attempt');
}
$flolang->load("team");
$querymember = MYSQL_QUERY("SELECT userid, title, inactive FROM flobase_user, forum_users WHERE userid=uid AND rank >= 0 ORDER BY inactive, rank, forum_users.username");
while ($member = MYSQL_FETCH_ARRAY($querymember)) {
    $member['title'] = preg_replace('/\\[([a-z]{2})\\]/', "<img src='{\$florensia->layer_rel}/flags/png/\".\$flolang->lang['\\1']->flagid.\".png' alt='\".\$flolang->lang['\\1']->languagename.\"' title='\".\$flolang->lang['\\1']->languagename.\"' border='0'>", $member['title']);
    eval("\$member['title'] = \"{$member['title']}\";");
    $member['username'] = $flouserdata->get_username($member['userid']);
    $memberlist[$member['inactive']] .= "\n\t\t\t<div style='vertical-align:top' class='shortinfo_" . $florensia->change() . "'>\n\t\t\t\t<table style='width:100%;'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style='font-weight:bold; width:30%;'>" . $member['username'] . "</td>\n\t\t\t\t\t\t<td class='small'>{$member['title']}</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t";
}
$content = "\n\t\t<div class='bordered' style='margin-bottom:20px;'>{$flolang->team_notice}</div>\n\t\t<div class='subtitle'>{$flolang->team_active_members_title}</div>\n\t\t" . $memberlist[0] . "\n\t\t<div class='subtitle' style='margin-top:20px;'>{$flolang->team_inactive_members_title}</div>\n\t\t" . $memberlist[1] . "\n\t";
$florensia->sitetitle("Team");
$florensia->output_page($content);
示例#19
0
    $florensia->sitetitle("Characterverification");
    $florensia->sitetitle($florensia->escape($_GET['verify']));
    $florensia->output_page($content);
}
//$florensia->notice("<div class='warning' style='margin-bottom:10px;'>{$flolang->signature_api_failnotice}</div>");
if (!is_file("{$florensia->charapi}/ranking.keepup2date.pid")) {
    $running = "<div class='warning subtitle' style='padding:2px;'>{$flolang->character_api_notice_notrunning}</div>";
    $forcedupdated = "<div class='warning' style='padding:2px;'>{$flolang->character_api_notice_notrunning}</div>";
} else {
    $running = "<div class='successful subtitle' style='padding:2px;'>{$flolang->character_api_notice_running}</div>";
    $queryforced = MYSQL_QUERY("SELECT charname FROM flobase_character WHERE forceupdate='1' ORDER BY lastupdate DESC LIMIT 15");
    for ($i = 1; $forced = MYSQL_FETCH_ARRAY($queryforced); $i++) {
        $forcedupdated .= "<a href='" . $florensia->outlink(array('characterdetails', $forced['charname'])) . "'>" . $florensia->escape($forced['charname']) . "</a><br />";
        if ($i >= 15) {
            $forcedupdated .= "...";
        }
    }
    if (!$forcedupdated) {
        $forcedupdated = $flolang->character_api_notice_forcedupdatechars_noentry;
    }
}
$faqs = array('de' => 5604, 'en' => 5605, 'fr' => 5610, 'es' => 5624, 'pt' => 5714);
foreach ($faqs as $lang => $tid) {
    $tid = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT tid, subject FROM forum_threads WHERE tid={$tid}"));
    if (!$tid) {
        continue;
    }
    $faqlist .= "<div><img src='{$florensia->layer_rel}/flags/png/" . $flolang->lang[$lang]->flagid . ".png' alt='" . $flolang->lang[$lang]->languagename . "' title='" . $flolang->lang[$lang]->languagename . "' border='0'> - <a href='{$florensia->forumurl}/thread-{$tid['tid']}.html' target='_blank'>{$tid['subject']}</a></div>";
}
$content = "\n    <div class='small'>\n        {$running}\n        <div style='height:10px;'></div>\n        <div class='bordered' style='float:right; width:200px; padding:6px; margin:0px 0px 10px 10px;'>\n            <b>{$flolang->character_api_title_forcedupdatechars}</b><br />\n            {$forcedupdated}\n        </div>\n        {$faqlist}\n    </div>\n        \n";
$florensia->output_page($content);
示例#20
0
    $tabbar['usernotes']['desc'] = $flolang->sprintf($flolang->contributed_tabbar_desc_usernotes, $amountnotes);
    $pageselect = $florensia->pageselect($amountnotes, array("contributed", $userid, $username), array('anchor' => 'usernotes'), 10);
    $querynotes = MYSQL_QUERY($querystring . " ORDER BY section, dateline DESC LIMIT " . $pageselect['pagestart'] . ",10");
    while ($notes = MYSQL_FETCH_ARRAY($querynotes)) {
        $noteslistcontent .= $classusernote->get_entry($notes['id']);
    }
    $noteslistcontent = "\n        <a name='usernotes'></a>\n        <div name='usernotes' class='small'>\n            <div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n            {$noteslistcontent}\n            <div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n        </div>\n    ";
}
if ($userid == $flouser->userid or $flouser->get_permission("watch_log")) {
    $querystring = "SELECT class, classid FROM flobase_addition WHERE entrystatus LIKE '%,{$userid},%'";
    $flagsquery = MYSQL_QUERY($querystring);
    $amountflags = MYSQL_NUM_ROWS($flagsquery);
    $tabbar['flags']['desc'] = $flolang->sprintf($flolang->contributed_tabbar_desc_flags, $amountflags);
    $pageselect = $florensia->pageselect($amountflags, array("contributed", $userid, $username), array('anchor' => 'flags'), 20);
    $flagsquery = MYSQL_QUERY($querystring . " ORDER BY class LIMIT " . $pageselect['pagestart'] . ",20");
    while ($flags = MYSQL_FETCH_ARRAY($flagsquery)) {
        switch ($flags['class']) {
            case "npc":
                $npc = new floclass_npc($flags['classid']);
                $flagscontent .= "<div class='shortinfo_" . $florensia->change() . "'>" . $npc->shortinfo() . "</div>";
                break;
            case "item":
                $item = new floclass_item($flags['classid']);
                $flagscontent .= "<div class='shortinfo_" . $florensia->change() . "'>" . $item->shortinfo() . "</div>";
                break;
            case "quest":
                $flagscontent .= "<div class='shortinfo_" . $florensia->change() . "'>" . $classquest->get_shortinfo($flags['classid']) . "</div>";
                break;
        }
    }
    $flagscontent = "\n        <a name='flags'></a>\n        <div name='flags'>\n            <div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n            {$flagscontent}\n            <div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n        </div>\n    ";
示例#21
0
     $querystring = "SELECT itemid FROM server_item_idtable WHERE tableid!='cloakitem' AND tableid!='hatitem' AND tableid!='upgradehelpitem' AND tableid!='sealhelpbreakitem' AND " . join(" AND ", $searchstring) . " ORDER BY name_{$stringtable->language}";
     $formlink = $florensia->outlink(array("npcdetails", $_GET['npcid'], $stringtable->get_string($_GET['npcid'])), array(), array("anchor" => "droplist"));
     $dropentryaddtolist = "\n\t\t\t<input type='hidden' value='" . $florensia->escape($_GET['npcid']) . "' name='npcid'>\n\t\t\t<input type='submit' value='{$flolang->droplist_search_item}'>\n\t\t";
 }
 $querystringlist = MYSQL_QUERY($querystring);
 for ($i = 1; $entrylist = MYSQL_FETCH_ARRAY($querystringlist); $i++) {
     if ($_GET['itemid']) {
         list($amount) = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT COUNT(d.dropid) FROM flobase_droplist as d, flobase_droplist_ratings as r WHERE d.dropid=r.dropid AND d.npcid='" . $entrylist[$florensia->get_columnname("npcid", "npc")] . "' AND d.itemid='" . mysql_real_escape_string($_GET['itemid']) . "' AND r.userid='{$flouser->userid}'"));
         if ($amount) {
             continue;
         }
         $npc = new floclass_npc($entrylist[$florensia->get_columnname("npcid", "npc")]);
         $entryshortinfo = $npc->shortinfo();
         $checkbox = "droplist_thumpsup_" . $florensia->escape($_GET['itemid']) . "_" . $entrylist[$florensia->get_columnname("npcid", "npc")] . "_x";
     } else {
         list($amount) = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT COUNT(d.dropid) FROM flobase_droplist as d, flobase_droplist_ratings as r WHERE d.dropid=r.dropid AND d.npcid='" . mysql_real_escape_string($_GET['npcid']) . "' AND d.itemid='" . $entrylist['itemid'] . "' AND r.userid='{$flouser->userid}'"));
         if ($amount) {
             continue;
         }
         $item = new floclass_item($entrylist['itemid']);
         $entryshortinfo = $item->shortinfo();
         $checkbox = "droplist_thumpsup_" . $entrylist['itemid'] . "_" . $florensia->escape($_GET['npcid']) . "_x";
     }
     $content .= $florensia->adsense(10);
     $colorchange = $florensia->change();
     $content .= "\n\t\t\t\t\t<div style='margin-bottom:5px;'>\n\t\t\t\t\t\t<table style='width:100%' class='small'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='shortinfo_{$colorchange}' style='text-align:center; vertical-align:middle; width:50px;'>\n\t\t\t\t\t\t\t\t\t<input type='checkbox' value='1' name='{$checkbox}'>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td style='width:10px;'></td>\n\t\t\t\t\t\t\t\t<td class='shortinfo_{$colorchange}' style='vertical-align:top;'>\n\t\t\t\t\t\t\t\t\t{$entryshortinfo}\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\t\t\t";
     if ($i > 30) {
         $content .= "<div style='text-align:center' class='warning'>{$flolang->droplist_addform_toomanyresults}</div>";
         break;
     }
 }
示例#22
0
function systemMapper($objects = "0", $limit = null, $x = 50, $y = 50, $step = 0, $color = "999999", $thisPageName = "stub")
{
    //  Handle recursion
    $limitNext = $limit === null ? null : $limit - 1;
    $obj = explode(",", $objects);
    $depth = count($obj) - 1;
    $first = $obj[0];
    $final = $obj[$depth];
    //  Calulate position
    $radius = $depth ? 48 / pow(2, $depth) : 0;
    $radians = -1 * 6.28318 * $step;
    $degrees = round(abs($radians * (-180 / 3.14159)));
    $left = round($x + $radius * cos($radians));
    $top = round($y + $radius * sin($radians));
    $opacity = round(100 / pow(2, $depth));
    if ($degrees >= 0 && $degrees < 60) {
        $red = 255;
        $green = 0;
        $blue = 255 - round(abs(60 - $degrees) * 4.25);
    }
    if ($degrees >= 60 && $degrees < 120) {
        $red = 255 - round(abs(60 - $degrees) * 4.25);
        $green = 0;
        $blue = 255;
    }
    if ($degrees >= 120 && $degrees < 180) {
        $red = 0;
        $green = 255 - round(abs(180 - $degrees) * 4.25);
        $blue = 255;
    }
    if ($degrees >= 180 && $degrees < 240) {
        $red = 0;
        $green = 255;
        $blue = 255 - round(abs(180 - $degrees) * 4.25);
    }
    if ($degrees >= 240 && $degrees < 300) {
        $red = 255 - round(abs(300 - $degrees) * 4.25);
        $green = 255;
        $blue = 0;
    }
    if ($degrees >= 300 && $degrees < 360) {
        $red = 255;
        $green = 255 - round(abs(300 - $degrees) * 4.25);
        $blue = 0;
    }
    $colorTemp = systemColorBuild($red, $green, $blue);
    // child's initial color
    if ($depth > 1) {
        $colorTemp = systemColorBlend($color, $colorTemp, 0.7);
    }
    // blend color with parent
    if ($depth > 1) {
        $colorTemp = systemColorBlend($colorTemp, "FFFFFF", $depth * 0.2);
    }
    // blend color with parent
    $color = $colorTemp;
    //  Here is where the radius should blend the color!!
    //  need to add that, here's a hack instead
    if ($radius == 0) {
        $color = "FF0000";
    }
    //  Pull from current node
    $sql = "\n\t\tSELECT * FROM objects \n\t\tWHERE id = '{$final}' \n\t\tAND active = 1 \n\t\tLIMIT 1\n\t\t";
    $res = MYSQL_QUERY($sql);
    $row = MYSQL_FETCH_ARRAY($res);
    $name = strip_tags($row["name1"]);
    if (!$final) {
        $name = "&times;&nbsp;Object-Relation-Grouper";
    }
    if (!$name) {
        $name = "Untitled";
    }
    //  Translate $objects trail to page.html?id=objects
    if ($first == 1) {
        $page = "object";
    }
    if ($first == 13) {
        $page = "read";
    }
    if ($first == 14) {
        $page = "read";
    }
    if ($first == 15) {
        $page = "read";
    }
    if ($first == 16) {
        $page = "read";
    }
    if ($first == 17) {
        $page = "read";
    }
    if ($first == 18) {
        $page = "read";
    }
    if (!$page) {
        $page = "object";
    }
    $id = null;
    for ($i = 2; $i < count($obj); $i++) {
        if ($i > 2) {
            $id .= ",";
        }
        $id .= $obj[$i];
    }
    //  Update Array
    global $flat;
    $node = $final;
    if (!isset($flat[$depth])) {
        $flat[$depth] = array();
    }
    if (!isset($flat[$depth][$node])) {
        $flat[$depth][$node] = array();
        $flat[$depth][$node]["node"] = $final;
        $flat[$depth][$node]["name"] = nl2br($name);
        $flat[$depth][$node]["top"] = $top;
        $flat[$depth][$node]["left"] = $left;
        $flat[$depth][$node]["opacity"] = $opacity;
        $flat[$depth][$node]["color"] = $color;
        $flat[$depth][$node]["url"] = $thisPageName . ".html?node=" . $node;
        if ($depth == 0) {
            if ($flat[$depth][$node]["name"] == '&times;&nbsp;Object-Relation-Grouper') {
                $flat[$depth][$node]["name"] .= "<br /><br /><br />Click any box to navigate . . .";
            } else {
                $flat[$depth][$node]["name"] .= "<br /><br /><br />Click here to visit page.";
            }
            $flat[$depth][$node]["url"] = $page . ".html?id=" . $node;
        }
    }
    //  Find children of current node
    if ($limit > 0 || $limit === null) {
        $sql = "\n\t\t\tSELECT objects.id AS objectsId FROM wires, objects \n\t\t\tWHERE wires.fromid = '{$final}' AND wires.toid = objects.id \n\t\t\tAND wires.active = 1 AND objects.active = 1 \n\t\t\tORDER BY weight DESC, rank, end DESC, begin DESC, name1, name2, objects.modified DESC, objects.created DESC\n\t\t\t";
        $res = MYSQL_QUERY($sql);
        $num = MYSQL_NUM_ROWS($res);
        $i = 0;
        while ($row = MYSQL_FETCH_ARRAY($res)) {
            $nodeNext = $objects . "," . $row["objectsId"];
            $stepNext = $i / $num;
            $i++;
            systemMapper($nodeNext, $limitNext, $left, $top, $stepNext, $color, $thisPageName);
        }
    }
}
示例#23
0
        break;
}
if (count($dbwhere)) {
    $dbwhere = "AND " . join(" AND ", $dbwhere);
} else {
    unset($dbwhere);
}
if (intval($_GET['page'])) {
    $startpage = $_GET['page'] * 70 - 70;
} else {
    $startpage = 0;
}
$querycharacter = MYSQL_QUERY("SELECT SQL_CALC_FOUND_ROWS charname, levelland, levelsea, levelsum, guild, guildid, guildgrade, jobclass, gender, server, lastupdate  FROM flobase_character_data AS d, flobase_character AS c WHERE d.characterid = c.characterid {$dbwhere} {$dborderby} LIMIT {$startpage}, 70");
list($foundrows) = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT FOUND_ROWS()"));
$pageselect = $florensia->pageselect($foundrows, array("ranking"), array("order" => $_GET['order'], "class" => $_GET['class'], "server" => $_GET['server']), 70);
for ($i = $pageselect['pagestart'] + 1; $character = MYSQL_FETCH_ARRAY($querycharacter); $i++) {
    if ($character['gender'] == "m") {
        $gender = "<img src='{$florensia->layer_rel}/gender_male.gif' border='0' alt='male' style='height:12px;'>";
    } else {
        $gender = "<img src='{$florensia->layer_rel}/gender_female.gif' border='0' alt='female' style='height:12px;'>";
    }
    if (strlen($character['guild'])) {
        if ($character['guildid']) {
            $guild = "<a href='" . $florensia->outlink(array('guilddetails', $character['guildid'], $character['server'], $character['guild'])) . "'>" . $florensia->escape($character['guild']) . "</a>";
        } else {
            $guild = $florensia->escape($character['guild']);
        }
        if ($character['guildgrade']) {
            $guild = class_character::guildgrade($character['guildgrade']) . " " . $guild;
        }
    } else {
示例#24
0
<?php

require_once "./init.php";
if (!defined('is_florensia')) {
    die('Hacking attempt');
}
$flolang->load("hundredfloor");
$pageselect = $florensia->pageselect(100, array("100floor"), array(), 10);
$count = $pageselect['pagestart'] + 1;
$queryfloor = MYSQL_QUERY("SELECT * FROM server_100floor LIMIT " . $pageselect['pagestart'] . ",10");
while ($floor = MYSQL_FETCH_ARRAY($queryfloor)) {
    $floorcontent .= $florensia->adsense(5);
    $floorcontent .= "<div class='subtitle' style='margin-top:20px;'>" . $flolang->sprintf($flolang->tower_floortitle, $count) . "</div>";
    for ($i = 1; $i <= 10; $i++) {
        if ($floor[$florensia->get_columnname("server_100floor_npcid{$i}", "misc")] == "#") {
            continue;
        }
        $npc = new floclass_npc($floor[$florensia->get_columnname("server_100floor_npcid{$i}", "misc")]);
        $floorcontent .= "<div class='shortinfo_" . $florensia->change() . "'>" . $npc->shortinfo(array(), array($flolang->tower_shortview_amount => $floor[$florensia->get_columnname("server_100floor_npcamount{$i}", "misc")])) . "</div>";
    }
    $count++;
}
$content = "\n\t\t<div style='text-align:center; margin-bottom:5px;'>" . $florensia->quick_select('100floor', array('page' => $_GET['page']), array(), array('namesselect' => 1)) . "</div>\n\t\t<div style='margin-bottom:5px;' class='subtitle'><a href='{$florensia->root}/misc.php'>{$flolang->mainmenu_misc}</a> &gt; 100 Floor Tower</div>\n\t\t<div style='margin-bottom:10px;'>" . $pageselect['selectbar'] . "</div>\n\t\t{$floorcontent}\n\t\t<div style='margin-bottom:10px;'>" . $pageselect['selectbar'] . "</div>\n\t";
$florensia->sitetitle("100 Floor Tower");
$florensia->output_page($content);
示例#25
0
 function get_title($questlistid)
 {
     if (!strlen($questlistid)) {
         return;
     }
     global $classquesttext, $flolang;
     $queryquest = MYSQL_QUERY("SELECT questtitle_" . $classquesttext->language . " FROM server_questlist WHERE questlistid = '{$questlistid}' LIMIT 1");
     if ($quest = MYSQL_FETCH_ARRAY($queryquest)) {
         return $quest['questtitle_' . $classquesttext->language];
     }
     #$flolang->load("quest");
     #$flolang->questnotitle
     return "-???-";
 }
示例#26
0
            $marketsitetitle = "<div style='margin-bottom:5px;' class='subtitle'><a href='" . $florensia->outlink(array("market")) . "'>{$flolang->market_title_main}</a> &gt; {$flolang->market_title_sell} {$serversitetitle}</div>";
        }
    } else {
        $marketsitetitle = "<div style='margin-bottom:5px;' class='subtitle'><a href='" . $florensia->outlink(array("market")) . "'>{$flolang->market_title_main}</a> &gt; {$flolang->market_title_all} {$serversitetitle}</div>";
        unset($exchangetype, $exchangedb);
    }
    $selectexchangetypeform = "\n\t\t<select name='cat'>\n\t\t\t<option value='all'>{$flolang->market_title_all}</option>\n\t\t\t<option value='sell' " . $selectexchangetype['sell'] . ">{$flolang->market_title_sell}</option>\n\t\t\t<option value='buy' " . $selectexchangetype['buy'] . ">{$flolang->market_title_buy}</option>\n\t\t</select>\n\t";
    if ($_GET['search']) {
        foreach (explode(" ", $_GET['search']) as $keyword) {
            $searchstring[] = "server_item_idtable.name_{$stringtable->language} LIKE '%" . get_searchstring($keyword, 0) . "%'";
        }
        $searchstring = join(" AND ", $searchstring) . " AND";
        $marketsitetitle = "<div style='margin-bottom:5px;' class='subtitle'><a href='" . $florensia->outlink(array("market")) . "'>{$flolang->market_title_main}</a> &gt; " . $flolang->sprintf($flolang->market_title_searching, $florensia->escape($_GET['search'])) . "  {$serversitetitle}</div>";
    }
    $query = "SELECT flobase_usermarket.id as marketid, flobase_usermarket.itemid as itemid FROM server_item_idtable, flobase_usermarket WHERE {$searchstring} server_item_idtable.itemid=flobase_usermarket.itemid {$exchangedb} {$serverdb} ORDER BY flobase_usermarket.createtime DESC";
    $querystringlist = MYSQL_QUERY($query);
    $entries = MYSQL_NUM_ROWS($querystringlist);
    $pageselect = $florensia->pageselect($entries, array("market", $exchangetype), array($serverlink));
    $querystringlist = MYSQL_QUERY($query . " LIMIT " . $pageselect['pagestart'] . "," . $florensia->pageentrylimit);
    while ($itemlist = MYSQL_FETCH_ARRAY($querystringlist)) {
        $content .= $florensia->adsense(8);
        $item = new floclass_item($itemlist['itemid']);
        $content .= "<div class='shortinfo_" . $florensia->change() . "'>" . $item->shortinfo(array("marketid" => $itemlist['marketid'])) . "</div>";
    }
    if (!$content) {
        $content = "<div style='text-align:center' class='warning'>{$flolang->market_noentries}</div>";
    }
    $content = "\n\t\t{$marketsitetitle}\n\t\t<div style='text-align:center; margin-bottom:5px;'>" . $florensia->quick_select('marketsearch', array('cat' => $exchangetype, 'search' => $_GET['search']), array($flolang->market_title_listitems => $selectexchangetypeform), $settings = array('namesselect' => 1, 'serverselect' => 1)) . "</div>\n\t\t<div style='margin-bottom:10px;'>" . $pageselect['selectbar'] . "</div>\n\t\t{$content}\n\t\t<div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n\t";
}
$content = "<div style='text-align:center; margin-bottom:15px;''>" . $florensia->quicksearch(array('language' => true)) . "</div>\n\t\t{$content}\n\t";
$florensia->output_page($content);
示例#27
0
        if ($line[$x + 1] == 0) {
            continue;
        }
        if (!preg_match('/^svop([0-9]+)$/', $line[$x], $effectid)) {
            continue;
        }
        $effectquery = MYSQL_QUERY("SELECT name_" . $flolang->language . " FROM flobase_item_effect WHERE effectid='" . intval($effectid[1]) . "'");
        $effect = MYSQL_FETCH_ARRAY($effectquery);
        $attributestable[$i]['list'] .= "<tr><td class='small' style='width:150px;'>" . $effect['name_' . $flolang->language] . "</td><td class='small' style='text-align:right;'>" . bcdiv($line[$x + 1], 100) . "%</td></tr>";
    }
}
for ($x = 0; $x <= $i; $x = $x + 2) {
    $sealoptiontable .= "\n\t\t\t<tr><td style='width:50%;'>" . $attributestable[$x]['title'] . "</td><td style='width:50%;'>" . $attributestable[$x + 1]['title'] . "</td></tr>\n\t\t\t<tr><td><table style='border-collapse:0px; border-spacing:0px; padding:0px;'>" . $attributestable[$x]['list'] . "</table></td><td><table style='border-collapse:0px; border-spacing:0px; padding:0px;'>" . $attributestable[$x + 1]['list'] . "</table></td></tr>\n\t\t";
}
$seallistquery = MYSQL_QUERY("SELECT * FROM server_seal_breakcost");
while ($seallist = MYSQL_FETCH_ARRAY($seallistquery)) {
    unset($needitem, $comma, $viewcount);
    for ($i = 1; $i <= 5; $i++) {
        if ($seallist['needitem' . $i] != "#") {
            $needitem .= $comma . $seallist['needitem' . $i . 'count'] . " <a href='" . $florensia->outlink(array("itemdetails", $seallist['needitem' . $i], $stringtable->get_string($seallist['needitem' . $i]))) . "'>" . $stringtable->get_string($seallist['needitem' . $i], array('protectionlink' => 1, 'protectionsmall' => 1)) . "</a>";
            $comma = ", ";
            $viewcount++;
            if ($viewcount == 3) {
                $viewcount = 0;
                $needitem .= "<br />";
                unset($comma);
            }
        }
    }
    $costtable .= "<div class='shortinfo_" . $florensia->change() . " small'><table style='width:100%;'><tr><td style='width:60px;'><b>Level: " . $seallist['itemlevel'] . "</b></td><td style='width:70px; text-align:right; padding-right:20px;'>" . number_format($seallist['cost'], 0, '.', ',') . " Gelt</td><td>{$needitem}</td></tr></table></div>";
}
示例#28
0
if (intval($_GET['flagged'])) {
    $dbwhere[] = "flagged='1'";
    $linkoption['flagged'] = 1;
}
if ($dbwhere) {
    $dbwhere = "WHERE " . join(" AND ", $dbwhere);
}
if (intval($_GET['page'])) {
    $startpage = $_GET['page'] * 50 - 50;
} else {
    $startpage = 0;
}
$querylog = MYSQL_QUERY("SELECT SQL_CALC_FOUND_ROWS id, section, timestamp, currentuser, currentip, logvalue, flagged FROM flobase_log {$dbwhere} ORDER BY timestamp DESC LIMIT {$startpage},50");
list($entries) = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT FOUND_ROWS()"));
$pageselect = $florensia->pageselect($entries, array("adminlog"), $linkoption, 50);
while ($log = MYSQL_FETCH_ARRAY($querylog)) {
    //change flags?
    if ($_POST['do_adminlog_flag'] && $_POST['adminlog_flagged_' . $log['id']] && !$log['flagged']) {
        $dbaddflag[] = "id='{$log['id']}'";
        $dbaddflagids[] = "{log:{$log['id']}}";
        $log['flagged'] = 1;
    } elseif ($_POST['do_adminlog_flag'] && !$_POST['adminlog_flagged_' . $log['id']] && $log['flagged']) {
        $dbremoveflag[] = "id='{$log['id']}'";
        $dbremoveflagids[] = "{log:{$log['id']}}";
        $log['flagged'] = 0;
    }
    if ($log['flagged']) {
        $checkedflagged = "checked='checked'";
        $flaggedclass = "warning";
    } else {
        $flaggedclass = "shortinfo_" . $florensia->change();
示例#29
0
 function get_entry($noteid)
 {
     global $flouser, $flouserdata, $stringtable, $classquest, $florensia, $flolang, $parser, $flolog;
     $noteid = intval($noteid);
     $querynotes = MYSQL_QUERY("SELECT id, section, sectionid, userid, language, dateline, writeip, moderated, commenttext, lastupdate FROM flobase_usernotes WHERE id={$noteid}");
     if ($notes = MYSQL_FETCH_ARRAY($querynotes)) {
         if ($flouser->get_permission("mod_usernotes", $notes['language']) && !($_POST['do_update_' . $noteid] && $_POST['delete_usernote_' . $noteid] && $_POST['delete_usernote_' . $noteid . '_verify'])) {
             //check first if something has changes... moderated
             if ($_POST['do_update_' . $noteid] && $_POST['moderated_usernote_' . $noteid]) {
                 if (!MYSQL_QUERY("UPDATE flobase_usernotes SET moderated='{$flouser->userid}," . date("U") . "' WHERE id='{$notes['id']}'")) {
                     $flolog->add("error:usernote", "MySQL-Update-Error while set {usernote:{$notes['id']}} from {user:{$notes['userid']}} written on {timestamp:{$notes['dateline']}} as moderated on {{$notes['section']}:{$notes['sectionid']}}");
                     $florensia->notice("An error occurred while set note ({$notes['id']}) to moderated", "warning");
                 } else {
                     $flolog->add("usernote:moderate", "{user:{$flouser->userid}} set {usernote:{$notes['id']}} from {user:{$notes['userid']}} written on {timestamp:{$notes['dateline']}} as moderated on {{$notes['section']}:{$notes['sectionid']}}");
                     $florensia->notice("Successful set note ({$notes['id']}) to moderated", "successful");
                     //set changed variables
                     $notes['moderated'] = "{$flouser->userid}," . date("U");
                 }
             }
             if ($flouser->get_permission("watch_log")) {
                 $adminipadress = " (<a href='{$florensia->root}/adminlog?currentip={$notes['writeip']}' target='_blank'>{$notes['writeip']}</a>)";
             } else {
                 $adminipadress = " ({$notes['writeip']})";
             }
             if (!$notes['moderated']) {
                 $adminquickmod = "\n\t\t\t\t\t\t<span style='margin-left:10px;'>{$flolang->usernotes_moderate_title}: <input type='checkbox' name='moderated_usernote_" . $notes['id'] . "' value='1' style='vertical-align:middle; padding:0px; margin:0px;'></span>\n\t\t\t\t\t";
             } else {
                 list($moduser, $modtime) = explode(",", $notes['moderated']);
                 $adminquickmod = "<span style='margin-left:10px;'>{$flolang->usernotes_moderate_title} " . date("m.d.y", $modtime) . " (" . $flouserdata->get_username($moduser) . ")</span>";
             }
         }
         if ($notes['userid'] == $flouser->userid or $flouser->get_permission("mod_usernotes", $notes['language'])) {
             //check first if something has changes... delete, update
             if ($_POST['do_update_' . $noteid] && $_POST['delete_usernote_' . $noteid] && $_POST['delete_usernote_' . $noteid . '_verify']) {
                 if (!MYSQL_QUERY("DELETE FROM flobase_usernotes WHERE id='{$notes['id']}'")) {
                     $flolog->add("error:usernote", "MySQL-Delete-Error while delete {usernote:{$notes['id']}} from {user:{$notes['userid']}} written on {timestamp:{$notes['dateline']}} on {{$notes['section']}:{$notes['sectionid']}}");
                     $florensia->notice($flolang->usernotes_delete_error_notice, "warning");
                 } else {
                     $flolog->add("usernote:delete", "{user:{$flouser->userid}} deleted {usernote:{$notes['id']}} from {user:{$notes['userid']}} written on {timestamp:{$notes['dateline']}} on {{$notes['section']}:{$notes['sectionid']}}");
                     $florensia->notice($flolang->usernotes_delete_successful_notice, "successful");
                     //break and return nothing
                     return;
                 }
             }
             if ($_POST['do_update_' . $noteid] && strlen(trim($_POST['commenttext_update_' . $noteid])) && $flolang->lang[$_POST['noteslanguage']] && ($_POST['commenttext_update_' . $noteid] != $notes['commenttext'] or $_POST['noteslanguage'] != $notes['language'])) {
                 if (!MYSQL_QUERY("UPDATE flobase_usernotes SET language='{$_POST['noteslanguage']}', lastupdate='{$flouser->userid}," . date("U") . "', commenttext='" . mysql_real_escape_string($_POST['commenttext_update_' . $noteid]) . "' WHERE id='{$notes['id']}'")) {
                     $flolog->add("error:usernote", "MySQL-Update-Error while update {usernote:{$notes['id']}} from {user:{$notes['userid']}} written on {timestamp:{$notes['dateline']}} on {{$notes['section']}:{$notes['sectionid']}}");
                     $florensia->notice($flolang->usernotes_edit_error_notice, "warning");
                 } else {
                     $flolog->add("usernote:update", "{user:{$flouser->userid}} updated {usernote:{$notes['id']}} from {user:{$notes['userid']}} written on {timestamp:{$notes['dateline']}} on {{$notes['section']}:{$notes['sectionid']}}");
                     $florensia->notice($flolang->usernotes_edit_successful_notice, "successful");
                     //set changed variables
                     $notes['language'] = $_POST['noteslanguage'];
                     $notes['lastupdate'] = "{$flouser->userid}," . date("U");
                     $notes['commenttext'] = $_POST['commenttext_update_' . $noteid];
                 }
             }
             //----
             $editlink = "<a href='javascript:switchlayer(\"usernotetext_{$noteid},usernotetext_{$noteid}_edit\", \"usernotetext_{$noteid}_edit\")'>[{$flolang->usernotes_editlink}]</a>";
             $editform = "\n\t\t\t\t\t<div class='small' id='usernotetext_{$noteid}_edit' style='display:none;'>\n\t\t\t\t\t\t<div>" . $this->language_select($notes['language']) . " <span style='margin-left:10px;'>{$flolang->usernotes_delete_title}: <input type='checkbox' name='delete_usernote_" . $notes['id'] . "' value='1' style='vertical-align:middle; padding:0px; margin:0px 3px 0px 0px;'><input type='checkbox' name='delete_usernote_" . $notes['id'] . "_verify' value='1' style='vertical-align:middle; padding:0px; margin:0px;'></span>{$adminquickmod}</div>\n\t\t\t\t\t\t<div style='text-align:center;'>\n\t\t\t\t\t\t\t<textarea name='commenttext_update_{$noteid}' style='width:99%; height:100px;'>" . $florensia->escape($notes['commenttext']) . "</textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div><table style='width:100%;'><tr>\n\t\t\t\t\t\t\t<td><input type='submit' name='do_update_{$noteid}' value='{$flolang->usernotes_savechanges_submit}'></td>\n\t\t\t\t\t\t\t<td style='text-align:right; font-weight:bold;'><a href='javascript:switchlayer(\"usernotetext_{$noteid},usernotetext_{$noteid}_edit\", \"usernotetext_{$noteid}\")'>[{$flolang->usernotes_cancellink}]</a></td>\n\t\t\t\t\t\t</tr></table></div>\n\t\t\t\t\t</div>\n\t\t\t\t";
         }
         if ($flouser->get_permission("mod_usernotes", $notes['language'])) {
             switch ($notes['section']) {
                 case "quest":
                     $usernotelink = "Quest: <a href='" . $florensia->outlink(array("questdetails", $notes['sectionid'], $classquest->get_title($notes['sectionid'])), array("usernotes" => $notes['language']), array('anchor' => 'usernotes')) . "' target='_blank'>" . $classquest->get_title($notes['sectionid']) . "</a>";
                     break;
                 case "npc":
                     $usernotelink = "NPC: <a href='" . $florensia->outlink(array("npcdetails", $notes['sectionid'], $stringtable->get_string($notes['sectionid'])), array("usernotes" => $notes['language']), array('anchor' => 'usernotes')) . "' target='_blank'>" . $stringtable->get_string($notes['sectionid'], array('protectionlink' => 1, 'protectionsmall' => 1)) . "</a>";
                     break;
                 case "item":
                     $usernotelink = "Item: <a href='" . $florensia->outlink(array("itemdetails", $notes['sectionid'], $stringtable->get_string($notes['sectionid'])), array("usernotes" => $notes['language']), array('anchor' => 'usernotes')) . "' target='_blank'>" . $stringtable->get_string($notes['sectionid'], array('protectionlink' => 1, 'protectionsmall' => 1)) . "</a>";
                     break;
                 case "map":
                     $usernotelink = "Map: <a href='" . $florensia->outlink(array("mapdetails", $notes['sectionid'], $stringtable->get_string($notes['sectionid'])), array("usernotes" => $notes['language']), array('anchor' => 'usernotes')) . "' target='_blank'>" . $stringtable->get_string($notes['sectionid'], array('protectionlink' => 1, 'protectionsmall' => 1)) . "</a>";
                     break;
                 case "gallery":
                     $image = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT name FROM flobase_gallery WHERE galleryid='" . intval($notes['sectionid']) . "'"));
                     if (!strlen($image['name'])) {
                         $image['name'] = "-";
                     }
                     $usernotelink = "Image: <a href='" . $florensia->outlink(array("gallery", "i", $notes['sectionid'], $image['name']), array("usernotes" => $notes['language'])) . "' target='_blank'>" . $florensia->escape($image['name']) . "</a>";
                     break;
                 default:
                     $usernotelink = "--";
             }
             $usernotelink .= "<br />";
         } else {
             unset($usernotelink);
         }
         if ($notes['lastupdate']) {
             list($luser, $ltime) = explode(",", $notes['lastupdate']);
             $lastupdate = "<div class='small' style='text-align:right; margin-top:7px; font-style:italic;'>" . $flolang->sprintf($flolang->usernotes_lastupdate_notice, $flouserdata->get_username($luser), date("m.d.y", $ltime)) . "</div>";
         }
         return "\n\t\t\t<div>\n\t\t\t\t<form action='" . $florensia->escape($florensia->request_uri(array(), 'usernotes')) . "' method='post'>\n\t\t\t\t<div class='small subtitle' style='margin-top:10px;'>\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t\t<tr><td style='vertical-align:top;'>\n\t\t\t\t\t\t\t<img src='{$florensia->layer_rel}/flags/png/" . $flolang->lang[$notes['language']]->flagid . ".png' alt='" . $flolang->lang[$notes['language']]->languagename . "' border='0'>\n\t\t\t\t\t\t\t" . $flouserdata->get_username($notes['userid']) . "{$adminipadress}<br />\n\t\t\t\t\t\t\t" . date("m.d.y - H:i", $notes['dateline']) . "\n\t\t\t\t\t\t</td><td style='text-align:right; vertical-align:top;'>\n\t\t\t\t\t\t\t{$usernotelink}\n\t\t\t\t\t\t\t{$editlink}\n\t\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\t<div class='shortinfo_1'>\n\t\t\t\t\t<div id='usernotetext_{$noteid}'>" . $parser->parse_message($notes['commenttext'], $this->parser_options) . "{$lastupdate}</div>\n\t\t\t\t\t{$editform}\n\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t";
     }
     return false;
 }
示例#30
0
文件: edit.php 项目: O-R-G/o-r-g.com
		<input name='action' type='hidden' value='update' />
		<input name='cancel' type='button' value='Cancel' onClick="javascript:location.href='<?php 
        echo "browse.php" . urlBack();
        ?>
';" /> 
		<input name='submit' type='submit' value='Update Object' />
		</form><br />&nbsp;
		<?php 
    }
} else {
    /////////////////////
    //  UPDATE Object  //
    /////////////////////
    $sql = "SELECT * FROM objects WHERE id = '{$object}' LIMIT 1";
    $result = MYSQL_QUERY($sql);
    $myrow = MYSQL_FETCH_ARRAY($result);
    if (!get_magic_quotes_gpc()) {
        $name1 = addslashes($name1);
        $name2 = addslashes($name2);
        $address1 = addslashes($address1);
        $city = addslashes($city);
        $state = addslashes($state);
        $zip = addslashes($zip);
        $country = addslashes($country);
        $phone = addslashes($phone);
        $email = addslashes($email);
        $begin = addslashes($begin);
        $end = addslashes($end);
        $body = addslashes($body);
        $notes = addslashes($notes);
    }