• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP fTitle函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中fTitle函数的典型用法代码示例。如果您正苦于以下问题:PHP fTitle函数的具体用法?PHP fTitle怎么用?PHP fTitle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了fTitle函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: topic

<?php

topic("Report Bug");
if (!$action) {
    fTitle("index.php?page=reportbug&action=submitbug");
    fTextArea("Bug/Advice Description:", "description");
    fEnd("Submit");
    echo 'Please describe the bug as accurately as possible.<br>';
}
if ($action == "submitbug") {
    $no = 0;
    if (!$description) {
        echo 'You have to enter a description.<br>';
        $no = 1;
    }
    if ($no == 0) {
        $date = date("Y-m-d @ H:i");
        mail($PhantomMail, "bug report - {$date}", "\r\n{$acc['name']} reported the following bug:\r\n\r\n" . stripslashes($description) . "\r\n\r\n" . $cq2url . "index.php?page=playerinfo&action=viewinfo&aid={$acc['id']}\r\n{$acc['email']}\r\n", $mailheaders);
        echo '
			Bug report/advice successfully submitted!<br>
			Thanks for helping us make CQ2 a better game.<br>
			';
    }
}
开发者ID:KristofMols,项目名称:castlequest2,代码行数:24,代码来源:reportbug.php


示例2: fTitle

}
if ($status == 3) {
    if (!$action) {
        echo '
			You face an immense wall. Your eyes try to grasp where it ends, 
			but in neither of the directions you can see and ending. Curious you touch 
			the wall and feel that it\'s made out of the same smooth black stone as the 
			narrow walls you were walking before. You walk a whole time alongside it, 
			until your reach small holes in the wall. You can\'t see inside them, because 
			it\'s darker as hell inside these hallways. You figure you can crawl through 
			one of these small tunnels to the other side of that wall.<br>
			You find about 10 holes right next to each other.<br><br>
			
			Which one will you enter?
			';
        fTitle("index.php?page=Maze&action=enter");
        fText("Entrance:", "entrance");
        fEnd("Enter");
    }
    if ($action == "enter") {
        if ($entrance == 5) {
            $sql = "UPDATE mazestatus SET status = '4' WHERE account = '{$acc['id']}'";
            $result = $db->query($sql);
            echo '
				You enter the dark passage. Before you know it, you have passed underneath the huge wall. You are standing in a gigantic hall.<br><br>
				
				As you wander through the Great Room, as you\'ve come to call it, you suddenly see, in the distance, a great structure. Running towards it, your anxiety grows, because you feel power emerging from that place, you can feel the greatness that once was.
				When you\'ve almost reached the structure, you gasp in awe at the colossal building in front of you, made entirely out of a low pulsing and gleaming material which emits a strange scent, one you\'ve never smelled before. When you\'re standing a few yards away from it, you realize this is some sort of tomb. A tomb that no man could build, for it seems entirely made out of one piece. Looking up at it, you see no end and circling the grave looks nearly impossible, because in the distance there is nothing to be seen but the giant wall.
				Surrounding the huge block of stone, there are little rooms. When you enter a few of those, you can see walls full of strange glowing symbols, huge ornaments with a frightening look, but nothing you can use. Several other rooms are completely empty, creating the feeling that this fascinating tomb is not yet finished - as if the creators were interupted in the middle of their work.<br><br>
				
				You feel lost in an eternal space.<br><br>
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:Maze.php


示例3: stripslashes

if ($action == "submitchangeprivate") {
    if (strlen($info) > gdMaxPrivateLength) {
        echo 'That text is too long.<br>';
    } else {
        $sql = "UPDATE accounts SET private = '{$private}' WHERE id = '{$acc['id']}'";
        $result = $db->query($sql);
        echo 'Private notes successfully changed!<br>';
        $acc["private"] = stripslashes($private);
        unset($action);
    }
}
if ($action == "raiseskill") {
    $availablepoints = gGetSkillPointsLeft();
    $raise = $gdClass[$class]["value"] == $acc["class"] ? 2 : 1;
    echo 'How many skill points do you want to spend on your ', strtolower($gdClass[$class]["name"]), ' skill? (maximum ', $availablepoints, ', skill raises by ', $raise, ' for every point spent)<br><br><br>';
    fTitle("index.php?page=character&action=raise&class={$class}");
    fText("Skill points:", "amount", "0", 5);
    fEnd("Raise skill");
}
if (!$action) {
    tBegin("Character Development");
    $togo = $acc["nextlevelxp"] - $acc["xp"];
    $previous = gCalcXp($acc["level"] - 1, $gdXpVar, $gdStartXp);
    $percent = round(($acc["xp"] - $previous) * 100 / ($acc["nextlevelxp"] - $previous));
    $xpbar = '<table border="0" cellspacing="0" cellpadding="0"><tr>';
    for ($m = 0; $m < 50; $m++) {
        if ($m < $percent / 2) {
            $xpbar .= '<td width="1" class="alert">';
        } else {
            $xpbar .= '<td width="1" class="head">';
        }
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:character.php


示例4: fTitle

    /*}
      else {
          echo '
          Registration is disabled until the next age starts.<br>
          ';
      }*/
}
if ($action == "reactivate") {
    include_once "functions/gamefunctions.php";
    echo '
		Normally, you should have received a mail with a reactivation code for your account.
		But some people didn\'t receive it because their e-mail account was invalid or they exceeded their maximum storage amount.
		These people can now receive their reactivation code by entering their old username and password below.
		If you don\'t know the username or password anymore and the activation e-mail hasn\'t arrived by now, your account will be lost and you will have to register again when the game goes up.<br><br>
		';
    fTitle("indexnl.php?page=nl_newaccount&action=reactivate2");
    fText("Login name:", "name");
    fText("Password:", "password", "", 20, TRUE);
    fEnd("Get reactivation key");
}
if ($action == "reactivate2") {
    include_once "functions/gamefunctions.php";
    $sql = "SELECT activatekey FROM reactivation WHERE name = '{$name}' AND password = PASSWORD('{$password}')";
    $result = $db->query($sql);
    $numrows = $db->num_rows($result);
    if ($numrows != 1) {
        echo 'Invalid login name or password.<br>';
        $no = 1;
    } else {
        $key = $db->result($result, 0);
        echo 'Click on the following url to activate your account:<br><br>';
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:nl_newaccount.php


示例5: fTitle

    $numrows = $db->num_rows($result);
    if ($numrows != 1) {
        echo 'Invalid bid.';
        $no = 1;
    }
    if ($no == 0) {
        $sql = "DELETE FROM changelog WHERE id = '{$bid}'";
        $result = $db->query($sql);
        echo 'changelog deleted.';
    }
}
if ($action == "changechangelog") {
    $sql = "SELECT * FROM changelog WHERE id = '{$bid}'";
    $result = $db->query($sql);
    $row = $db->fetch_array($result);
    fTitle("index.php?page=changelog&action=submitchangechangelog&bid=" . $row["id"]);
    fTextarea("Text:", "text", $row["text"]);
    fEnd("Change");
}
if ($action == "submitchangechangelog") {
    $no = 0;
    if (!$text) {
        echo 'Data is incomplete.';
        $no = 1;
    }
    $sql = "SELECT * FROM changelog WHERE id = '{$bid}'";
    $result = $db->query($sql);
    $numrows = $db->num_rows($result);
    if ($numrows != 1) {
        echo 'Invalid bid.';
        $no = 1;
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:achangelog.php


示例6: topic

<?php

topic("Report Abuse");
if (!$action) {
    fTitle("index.php?page=reportabuse&action=submitabuse");
    fText("Account name of abuser:", "name");
    fTextArea("Abuse Description:", "description");
    fEnd("Submit");
    echo '
		You can report anything abusive you encounter here.<br>
		Typical abuse can be the use of offensive language or a player with more than one account.<br>
		';
}
if ($action == "submitabuse") {
    $no = 0;
    if (!$description) {
        echo 'You have to enter a description and an account name.<br>';
        $no = 1;
    }
    $sql = "SELECT id, name FROM accounts WHERE name = '{$name}'";
    $result = $db->query($sql);
    $numrows = $db->num_rows($result);
    if ($numrows != 1) {
        echo 'You have to enter a valid account name.<br>';
        $no = 1;
    } else {
        $row = $db->fetch_array($result);
        $name = "{$row['name']} (" . $cq2url . "index.php?page=playerinfo&action=viewinfo&aid={$row['id']}";
    }
    if ($no == 0) {
        $date = date("Y-m-d @ H:i");
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:reportabuse.php


示例7: fTitle

				for (m = 0; m < fields; m++) {
					document.gemform.elements[m].checked = result;
				}
			}
			</script>
			
			<br><br>
			
			<a href="javascript:void(0);" onclick="fillin(true); return false;">Select all</a> / <a href="javascript:void(0);" onclick="fillin(false); return false;">Unselect all</a><br><br>
			
			<input type="submit" name="submit" class="input" value="Take Selected">
			</form>
			';
    }
    echo '<br><br>';
    fTitle("index.php?page=kingdom&action=gemtemple");
    fText("Sign:", "signname", $creaturename);
    fText("Minimum Level:", "minlevel", $minlevel, 5);
    fText("Maximum Level:", "maxlevel", $maxlevel, 5);
    unset($array, $default);
    $array[0] = array("name" => "Don't Filter", "value" => "NO");
    if ($genchantment == "NO" || !isset($genchantment)) {
        $default = 0;
    }
    $array[1] = array("name" => "No Enchantment", "value" => "NULL");
    $array[2] = array("name" => "Any Enchantment", "value" => "ANY");
    if ($genchantment == "NULL") {
        $default = 1;
    }
    if ($genchantment == "ANY") {
        $default = 2;
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:kingdom.php


示例8: round

                break;
            case 6:
                $resource = "essence";
                break;
            case 7:
                $resource = "granite";
                break;
        }
        $maxres = round($acc[$resource] * gdGamblingDwarfMax);
        echo '
				You encounter ', $gdEncounters[$encounter][0], '.<br>
				He offers you a ', $resource, ' gambling challenge.<br>
				You can gain a lot of ', $resource, ' and you can lose a lot, but you can never lose more than you invest.<br>
				You can gamble for at most ', $maxres, ' ', $resource, ' in one game.<br>
				';
        fTitle("index.php?page=travel&action=encounter");
        fText("{$resource} to invest:", "amount", "", 5);
        fEnd("Gamble");
    }
    if ($encounter == 8) {
        echo '
				You encounter ', $gdEncounters[$encounter][0], '.<br>
				He is an unusually powerful dwarf.<br>
				If you give him a gem and some additional resources, he will give you some of his power.<br><br>
				';
        $sql = "SELECT g.id AS gid, g.level AS glevel, g.type AS gtype, g.quality, s.name AS signname, s.rarity, s.type AS signtype FROM gems AS g, signs AS s WHERE g.owner = 'mage' AND g.target = '{$acc['id']}' AND g.sign = s.id";
        $result = $db->query($sql);
        $numrows = $db->num_rows($result);
        if ($numrows == 0) {
            echo 'Unfortunately, you do not have any gems.<br>';
        } else {
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:t_encounters.php


示例9: fTitle

<?php

include_once "functions/tablefunctions.php";
if (!$action) {
    fTitle("random.php?action=generate");
    fText("Amount of numbers to generate:", "amount", "1");
    fText("Min value to generate:", "min", "1");
    fText("Max value to generate:", "max", "100");
    fText("Lower or equal than:", "lower", "50");
    fEnd("Generate");
}
if ($action == "generate") {
    // generate results
    $results = array_fill($min, $max - $min + 1, 0);
    for ($i = 0; $i < $amount; $i++) {
        $pick = rand($min, $max);
        $results[$pick]++;
    }
    // print all results
    echo '<table width="55" border="0" cellspacing="0" cellpadding="0">';
    $total = 0;
    for ($i = $min; $i <= $max; $i++) {
        echo '
			<tr><td width="25" align="right">
			', $i, '
			</td><td width="5"></td><td width="25">
			</td><td width="25" align="left">
			', $results[$i], '
			</td></tr>
			';
        if ($i <= $lower) {
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:random.php


示例10: gCalcTimeDif

     if (!$gdSpecialKingdoms[$kingdom]) {
         $addon = "";
     } else {
         if ($row["timelimit"] == 0) {
             $addon = " for unlimited time";
         } else {
             $dif = gCalcTimeDif($row["timelimit"], $row["time"]);
             $addon = " for {$dif['days']} days";
         }
         $addon .= ", <a href=\"index.php?page=kingdom&action=changebandays&aid={$row['aid']}\">change</a>";
     }
     echo '<a href="index.php?page=playerinfo&action=viewinfo&aid=', $row["aid"], '">', $row["name"], '</a> by <a href="index.php?page=playerinfo&action=viewinfo&aid=', $row["banner"], '">', $row["bannername"], '</a> (since ', $date, '', $addon, ') - <a href="index.php?page=kingdom&action=unban&pbid=', $row["id"], '">unban</a><br>';
 }
 tEnd();
 tBegin("Ban Account");
 fTitle("index.php?page=kingdom&action=ban");
 fText("Name:", "name");
 fEnd("Ban");
 tEnd();
 if (in_array($acc["id"], $moderators)) {
     tBegin("Violations");
     $sql = "SELECT id, subject, days FROM violations ORDER BY subject ASC";
     $result = $db->query($sql);
     while ($row = $db->fetch_array($result)) {
         echo $row["subject"], ' (', $row["days"], '): <a href="index.php?page=kingdom&action=editviolation&vid=', $row["id"], '">edit</a>, <a href="index.php?page=kingdom&action=deleteviolation&vid=', $row["id"], '">delete</a><br>';
     }
     echo '<br><a href="index.php?page=kingdom&action=addviolation">Add violation.</a><br>';
     tEnd();
     tBegin("Violation Logs");
     echo '<a href="index.php?page=kingdom&action=violationlogs">View logs.</a>';
     tEnd();
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:kd_pub.php


示例11: fTitle

        if ($numrows != 0) {
            echo 'There are still buildings rooted to this one.';
            $no = 1;
        }
    }
    if ($no == 0) {
        $sql = "DELETE FROM buildings WHERE id = '{$bid}'";
        $result = $db->query($sql);
        echo 'Building deleted.';
    }
}
if ($action == "changebuilding") {
    $sql = "SELECT * FROM buildings WHERE id = '{$bid}'";
    $result = $db->query($sql);
    $row = $db->fetch_array($result);
    fTitle("index.php?page=buildings&action=submitchangebuilding&bid=" . $row["id"]);
    fText("Name:", "name", $row["name"]);
    fSelect("Type:", "type", $gdBuildingTypes, $row["type"]);
    fText("Granite cost:", "granite", $row["granite"]);
    fText("Level required:", "level", $row["level"]);
    for ($m = count($gdClass); $m > 0; $m--) {
        $fgdClass[$m] = $gdClass[$m - 1];
    }
    $fgdClass[0] = array("value" => 0, "name" => "No Class");
    fSelect("Class (race only):", "class", $fgdClass, $row["class"]);
    $sql = "SELECT * FROM buildings ORDER BY name ASC";
    $result = $db->query($sql);
    $array[0] = array("name" => "No Root", "value" => 0);
    $m = 1;
    while ($newrow = $db->fetch_array($result)) {
        $array[$m]["name"] = $newrow["name"];
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:abuildings.php


示例12: tEnd

        $offset = $outgoingreportoffset - $gdDisplayBattles;
        if ($offset < 0) {
            $offset = 0;
        }
        echo '<a href="index.php?page=battles&outgoingreportoffset=', $offset, '">previous</a>';
    }
    if ($outgoingreportoffset != 0 && $counter > $gdDisplayBattles) {
        echo '<br>';
    }
    if ($counter > $gdDisplayBattles) {
        $offset = $outgoingreportoffset + $gdDisplayBattles;
        echo '<a href="index.php?page=battles&outgoingreportoffset=', $offset, '">next</a>';
    }
    tEnd();
    tBegin("Attack");
    fTitle("index.php?page=battles&action=attack");
    fText("Target:", "targetname");
    fEnd("Attack");
    tEnd();
}
if ($action == "battleinfo") {
    $no = 0;
    $sql = "SELECT b.*, a.name AS aname, a.id AS aid, a.gender AS agender, k.id AS kid, k.name AS kname FROM battles AS b, accounts AS a, kingdoms AS k WHERE b.id = '{$bid}' AND b.account = '{$acc['id']}' AND b.status = '1' AND b.target = a.id AND a.kingdom = k.id";
    $result = $db->query($sql);
    $numrows = $db->num_rows($result);
    if ($numrows != 1) {
        echo 'Invalid data.<br>';
        $no = 1;
    }
    if ($no == 0) {
        $row = $db->fetch_array($result);
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:battles.php


示例13: fTitle

<?php

if ($action == "summonitems") {
    $sql = "SELECT name FROM items WHERE id = '{$iid}'";
    $result = $db->query($sql);
    $name = $db->result($result, 0);
    echo 'How many ', $name, ' amulets do you want to summon?<br><br><br>';
    fTitle("index.php?page=spellbook&action=submitsummonitems&iid={$iid}&path={$path}");
    fText("Amount:", "amount", 1, 5);
    fEnd("Summon Amulets");
}
if ($action == "building") {
    $no = 0;
    if (!$path) {
        echo 'Invalid data.<br>';
        $no = 1;
    }
    if ($no == 0) {
        $bids = split("-", $path);
        for ($m = 0; $m < count($bids); $m++) {
            if ($m != 0) {
                $addon .= " OR ";
            }
            $addon .= "i.building = '{$bids[$m]}'";
        }
        $sql = "SELECT i.id, i.name AS itemname, i.class, i.abilityname, i.value1, i.value2, i.race, r.name AS racename, i.level AS itemlevel FROM (items AS i, accbuildings AS ab) LEFT JOIN races AS r ON i.race = r.id WHERE ({$addon}) AND i.building = ab.building AND ab.account = '{$acc['id']}' AND (i.class = '0' OR i.class = '{$acc['class']}') ORDER BY i.level DESC, i.name ASC";
        $result = $db->query($sql);
        $numrows = $db->num_rows($result);
        if ($numrows == 0) {
            echo 'There are no items available for this building.<br>';
        } else {
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:sb_items.php


示例14: tEnd

			';
        tEnd();
    }
    tEnd();
    tBegin("Pending Reports");
    $sql = "SELECT r.*, a.name, a2.name AS adminname FROM (reports AS r, accounts AS a) LEFT JOIN accounts AS a2 ON r.admin = a2.id WHERE r.admin != '{$acc['id']}' AND r.processed = 'no' AND r.reporter = a.id ORDER BY (r.admin = 1) ASC, r.date ASC";
    $result = $db->query($sql);
    while ($row = $db->fetch_array($result)) {
        if ($row["admin"] == 0) {
            echo ucfirst($row["type"]), ' by ', $row["name"], ' on ', $row["date"], ': <a href="index.php?page=admin&action=addreport&rid=', $row["id"], '">process this report</a>.<br>';
        } else {
            echo ucfirst($row["type"]), ' by ', $row["name"], ' on ', $row["date"], ' flagged by ', $row["adminname"], ': <a href="index.php?page=admin&action=viewreport&rid=', $row["id"], '">view this report</a>.<br>';
        }
    }
    tEnd();
    tBegin("Processed Reports");
    $sql = "SELECT r.*, a.name, a2.name AS adminname FROM reports AS r, accounts AS a, accounts AS a2 WHERE r.processed = 'yes' AND r.reporter = a.id AND r.admin = a2.id ORDER BY r.date DESC";
    $result = $db->query($sql);
    while ($row = $db->fetch_array($result)) {
        echo ucfirst($row["type"]), ' by ', $row["name"], ' on ', $row["date"], ' processed by ', $row["adminname"], ': <a href="index.php?page=admin&action=viewreport&rid=', $row["id"], '">view this report</a>.<br>';
    }
    tEnd();
}
if ($action == "editnotes") {
    $sql = "SELECT text FROM misctext WHERE name = 'adminnotes'";
    $result = $db->query($sql);
    $notes = $db->result($result, 0);
    fTitle("index.php?page=admin&action=submiteditnotes");
    fTextarea("Notes:", "notes", $notes);
    fEnd("Edit");
}
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:admin.php


示例15: topic

<?php

topic("Creature And Item Database");
if (!$action) {
    echo '
		Enter the name of a creature or item in the field below to get information about that spell.
		You can only get information about the spells that are somewhat in your reach.
		Only creatures and items that have a usage level lower than your own will be available here.
		<br><br>
		';
    fTitle("index.php?page=spellinfo&action=viewinfo");
    fText("Spell Name:", "name");
    fEnd("Search");
}
if ($action == "viewinfo") {
    $no = 1;
    if ($type && $sid) {
        if ($type == "creature") {
            $sql = "SELECT count(*) FROM creatures WHERE id = '{$sid}'";
            $result = $db->query($sql);
            $numrows = $db->result($result, 0);
            if ($numrows == 1) {
                $no = 0;
            }
        }
        if ($type == "item") {
            $sql = "SELECT count(*) FROM items WHERE id = '{$sid}'";
            $result = $db->query($sql);
            $numrows = $db->result($result, 0);
            if ($numrows == 1) {
                $no = 0;
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:spellinfo.php


示例16: round

        $basecost = round(gdWorkerIncome * gdWorkersPerLevel * gdArcaneLevelTime * gdGemSpellMultiplier);
        for ($m = 0; $m < count($gems); $m++) {
            $row = $gems[$m];
            $creature = new creature($row);
            $cost = round($row["glevel"] * $basecost * $gdGemSpells[$eid]["multiplier"]);
            echo gEchoGem($row), ' (', $cost, ' resources)<br>';
            $totalcost += $cost;
        }
        echo '<br><br>Total spell cost: ', $totalcost, ' kingdom resources.<br>';
        $sql = "SELECT resources FROM kingdoms WHERE id = '{$acc['kingdom']}'";
        $result = $db->query($sql);
        $resources = $db->result($result, 0);
        if ($resources < $totalcost) {
            echo 'Your kingdom doesn\'t have enough resources to cast that spell.<br>';
        } else {
            fTitle("index.php?page=kingdom&action=submitenchantgems&eid={$eid}");
            for ($m = 0; $m < count($gems); $m++) {
                echo '<input type="hidden" name="gem[', $gems[$m]["gid"], ']" value="on">';
            }
            fEnd("Enchant Gems");
        }
    }
}
if ($action == "submitenchantgems") {
    $no = 0;
    $sql = "SELECT g.id AS gid, g.level AS glevel, g.type AS gtype, g.quality FROM gems AS g WHERE g.owner = 'mage' AND g.target = '{$acc['id']}'";
    $result = $db->query($sql);
    $numrows = $db->num_rows($result);
    if ($numrows == 0) {
        echo 'You don\'t have enough gems.<br>';
        $no = 1;
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:kd_gemtemple.php


示例17: fTitle

<?php

if ($action == "summoncreatures") {
    $sql = "SELECT name FROM creatures WHERE id = '{$cid}'";
    $result = $db->query($sql);
    $name = $db->result($result, 0);
    echo 'How many ', $name, ' amulets do you want to summon?<br><br><br>';
    fTitle("index.php?page=spellbook&action=submitsummoncreatures&cid={$cid}");
    fText("Amount:", "amount", 1, 5);
    fEnd("Summon Amulets");
}
if ($action == "race" || $action == "race_as") {
    $no = 0;
    if (!$rid) {
        echo 'Invalid data.<br>';
        $no = 1;
    } else {
        $sql = "SELECT class FROM races WHERE id = '{$rid}'";
        $result = $db->query($sql);
        $class = $db->result($result, 0);
        $value = $acc[strtolower($gdClass[$class - 1]["name"])];
        $core = "ROUND(((( c.damage * 2) + (2/30*(( r.forest + r.death + r.air + r.earth )/40* c.health ) + 2/3* c.health )) * (1 - (c.skillbonus / 100))), 0)";
        $maincheck = "({$core} /100* (100 - {$gdSkillDifference}))";
        $check = "(ROUND({$maincheck}) <= {$value})";
        $end = "ORDER BY {$core} ASC";
        $sql = "SELECT {$gdTravelChallengeCreatureSelect}, b.name AS buildingname FROM (creatures AS c, races AS r) LEFT JOIN accbuildings AS ab ON c.building = ab.building AND ab.account = '{$acc['id']}' LEFT JOIN buildings AS b ON b.id = c.building WHERE c.race = r.id AND r.id = '{$rid}' AND (c.building = '0' OR ab.building = c.building) AND c.type = '0' AND ({$check}) {$end}";
        $result = $db->query($sql);
        $numrows = $db->num_rows($result);
        if ($numrows == 0) {
            echo 'Invalid race.';
            $no = 1;
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:sb_creatures.php


示例18: tBegin

// *	Attacking		*
// ******************
if ($action == "mathdwarf") {
    tBegin("Mathematics Dwarf");
    $cache = md5(uniqid(rand()));
    echo '
		While giving orders to your minions you suddenly notice a strange little guy messing around with your creatures and counting their toes, tails and teeth, amongst other things.<br>
		
		<i>"I really need a duplicate of a rare number I discovered here...<br>
		Please, can you copy it for me?"</i><br><br>
		
		<img src="travelcounter.php?cache=', $cache, '"><br><br>
		
		Just refresh the page if you\'re not sure about the number.<br><br>
		';
    fTitle("index.php?page=playerinfo&action=submitnumber&aid={$aid}");
    fText("Copy:", "number", "", 5);
    echo '<input type="hidden" name="formtype" value="submitnumber">';
    fEnd("Give Number");
    tEnd();
}
if ($action == "attack") {
    $no = 0;
    if ($targetname) {
        $sql = "SELECT id FROM accounts WHERE name = '" . trim($targetname) . "'";
        $result = $db->query($sql);
        $numrows = $db->num_rows($result);
        if ($numrows != 1) {
            echo 'That mage doesn\'t exist.<br>';
            $no = 1;
        } else {
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:ba_handling.php


示例19: while

    $result = $db->query($sql);
    $numrows = $db->num_rows($result);
    while ($row = $db->fetch_array($result)) {
        echo $row["name"], ': <a href="index.php?page=defense&action=useslotconfig&icid=', $row["id"], '">use</a>, <a href="index.php?page=defense&action=modifyslotconfig&icid=', $row["id"], '">modify</a>, <a href="index.php?page=defense&action=renameslotconfig&icid=', $row["id"], '">rename</a>, <a href="index.php?page=defense&action=deleteslotconfig&icid=', $row["id"], '">delete</a><br>';
    }
    if ($numrows < gdMaxItemConfigs) {
        echo '<br><a href="index.php?page=defense&action=newslotconfig">Create a new defense slot configuration.</a><br>';
    } else {
        echo '<br>You can only have ', gdMaxItemConfigs, ' defense slot configurations.<br>';
    }
}
if ($action == "renameslotconfig") {
    $sql = "SELECT name FROM slotconfig WHERE id = '{$icid}'";
    $result = $db->query($sql);
    $name = $db->result($result, 0);
    fTitle("index.php?page=defense&action=submitrenameslotconfig&icid={$icid}");
    fText("Name:", "name", $name);
    fEnd("Rename");
}
if ($action == "removeslotconfigset") {
    $no = 0;
    $sql = "SELECT count(*) FROM slotconfig WHERE account = '{$acc['id']}' AND id = '{$icid}'";
    $result = $db->query($sql);
    $numrows = $db->result($result, 0);
    if ($numrows != 1) {
        echo 'Invalid icid.<br>';
        $no = 1;
    } else {
        $sql = "SELECT count(*) FROM slotconfigset WHERE creature = '{$sid}' AND config = '{$icid}'";
        $result = $db->query($sql);
        $numrows = $db->result($result, 0);
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:defense.php


示例20: tEnd

                }
                if ($status == 3) {
                    if ($relrow["kingdom"] == $acc["kingdom"]) {
                        echo '<a href="index.php?page=kingdominfo&action=changerelation&kid=', $row["id"], '&reltype=0">Cancel the alliance offer.</a><br>';
                    } else {
                        echo '<a href="index.php?page=kingdominfo&action=changerelation&kid=', $row["id"], '&reltype=2">Accept the alliance offer.</a><br>';
                        echo '<a href="index.php?page=kingdominfo&action=changerelation&kid=', $row["id"], '&reltype=0">Decline the alliance offer.</a><br>';
                    }
                }
                if ($status == 4) {
                    if ($relrow["kingdom"] == $acc["kingdom"]) {
                        echo '<a href="index.php?page=kingdominfo&action=changerelation&kid=', $row["id"], '&reltype=1">Cancel the peace treaty offer.</a><br>';
                    } else {
                        echo '<a href="index.php?page=kingdominfo&action=changerelation&kid=', $row["id"], '&reltype=0">Accept the peace treaty offer.</a><br>';
                        echo '<a href="index.php?page=kingdominfo&action=changerelation&kid=', $row["id"], '&reltype=1">Decline the peace treaty offer.</a><br>';
                    }
                }
            }
        }
        tEnd();
    }
}
if ($action == "donate") {
    echo 'Please select how much resources you want to donate to that kingdom.<br><br>';
    fTitle("index.php?page=kingdominfo&action=submitdonate&kid={$kid}");
    fText("Brimstone:", "brimstone", "0");
    fText("Crystal:", "crystal", "0");
    fText("Essence:", "essence", "0");
    fText("Granite:", "granite", "0");
    fEnd("Donate");
}
开发者ID:KristofMols,项目名称:castlequest2,代码行数:31,代码来源:kingdominfo.php



注:本文中的fTitle函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fToDate函数代码示例发布时间:2022-05-15
下一篇:
PHP fText函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap