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

PHP gen_header函数代码示例

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

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



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

示例1: learn_skill

function learn_skill($skill, $price)
{
    global $p;
    global $sid;
    $skill = preg_replace('/[^0-9]/', '', $skill);
    $price = preg_replace('/[^0-9]/', '', $price);
    if ($skill === false) {
        put_error('неуказан навык');
    }
    if ($price === false) {
        put_error('неуказанa цена');
    }
    if (!isset($p['skills'][$skill])) {
        put_error('такого навыка нету');
    }
    if ($p['skills'][$skill]) {
        put_g_error('вы уже имеете этот навык!');
    }
    $mage = array(22, 23, 24, 25, 26, 27, 28, 29, 30);
    $warrior = array(7, 8, 9, 10, 41);
    $ranger = array(11, 12);
    // proverka na klassy:
    if ($p['classof'] != 3 && in_array($skill, $mage)) {
        put_g_error('только для магов!');
    }
    if ($p['classof'] != 1 && in_array($skill, $warrior)) {
        put_g_error('только для воина!');
    }
    if ($p['classof'] != 2 && in_array($skill, $ranger)) {
        put_g_error('только для лучников!');
    }
    if ($p['money'] < $price) {
        put_g_error('у вас нехватает серебра - надо ' . $price . ' монет!');
    }
    if (!$p['stats'][3]) {
        put_g_error('у вас нету очка навыка!');
    }
    // nelzja vychitq vtoroj navyk iz serii parirovanie - dvuruchnoe - dva
    if (($p['skills'][18] || $p['skills'][40] || $p['skills'][41]) && ($skill == 18 || $skill == 40 || $skill == 41)) {
        put_g_error('нелзя выучить два навыка из серии двуручное - два - парирование. Либо щит, либо двуручное, либо два.');
    }
    // esli vsju proverku proshli, podnimem i zabudem
    $p['skills'][$skill] = 1;
    $p['stats'][3] -= 1;
    $skills = implode('|', $p['skills']);
    $stats = implode('|', $p['stats']);
    $p['money'] -= $price;
    do_mysql("UPDATE players SET skills = '" . $skills . "', stats = '" . $stats . "', money = '" . $p['money'] . "' WHERE id_player = '" . $p['id_player'] . "';");
    $f = gen_header('навыки');
    $f .= '<div class="y" id="sodhg"><b>навыки:</b></div><p>';
    include 'modules/sp/sp_skillnames.php';
    $f .= 'вы выучили ' . $skn[$skill] . '!<br/>';
    $f .= '<a class="blue" href="game.php?sid=' . $sid . '">в игру</a></p>';
    $f .= gen_footer();
    exit($f);
}
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:56,代码来源:f_learn_skill.php


示例2: rpc

function rpc($reqs, $progress = true)
{
    global $ua, $ch, $swfurl, $cookies, $rpcseq, $rpcmax;
    global $debugout;
    $offset = 0;
    $resps = array();
    while (true) {
        $n = min(count($reqs) - $offset, $rpcmax);
        if ($n == 0) {
            break;
        }
        $req = array(gen_header(), array_slice($reqs, $offset, $n), 0);
        $offset += $n;
        ++$rpcseq;
        $body = new MessageBody();
        $body->setResponseURI("BaseService.dispatchBatch");
        $body->setResponseTarget("/{$rpcseq}");
        $body->setResults($req);
        $amf = new AMFObject();
        $amf->addBody($body);
        $serializer = new AMFSerializer();
        $postdata = $serializer->serialize($amf);
        if ($debugout) {
            file_put_contents("out/{$rpcseq}.req", $postdata);
        }
        curl_setopt_array($ch, array(CURLOPT_POST => true, CURLOPT_BINARYTRANSFER => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_USERAGENT => $ua, CURLOPT_REFERER => $swfurl, CURLOPT_COOKIE => $cookies, CURLOPT_POSTFIELDS => $postdata));
        $out = curl_exec($ch);
        if ($debugout) {
            file_put_contents("out/{$rpcseq}.resp", $out);
        }
        if ($progress) {
            print ".";
        }
        $amf = new AMFObject($out);
        $deserializer = new AMFDeserializer($amf->rawData);
        // deserialize the data
        $deserializer->deserialize($amf);
        // run the deserializer
        $v = $amf->getBodyAt(0)->getValue();
        if ($v['errorType'] != 0) {
            die($v['errorData'] . "\n");
        }
        $resps = array_merge($resps, $v['data']);
    }
    return $resps;
}
开发者ID:a1k0n,项目名称:a1k0n.github.io,代码行数:46,代码来源:fvbot.php


示例3: gen_header

<?php 
// infa broni
$f = gen_header('инфо');
$f .= '<div class="y" id="oaiyt">';
$qitf = do_mysql("SELECT * FROM items WHERE fullname = '" . $to . "';");
$itf = mysql_fetch_assoc($qitf);
$qua = substr($to, 8, 3);
$qlist = '.bas.nor.fur.tun.bet.rar.eli.epi.leg.';
if (strpos($qlist, $qua) === false) {
    $qua = 'black';
}
$f .= '<b><span class="' . $qua . '">' . $itf['name'] . '</span></b></div><p>';
if (substr($to, 4, 3) == 'hea') {
    $f .= 'шлем<br/>';
}
if (substr($to, 4, 3) == 'bo1') {
    $f .= 'броня<br/>';
}
if (substr($to, 4, 3) == 'bo2') {
    $f .= 'рубаха<br/>';
}
if (substr($to, 4, 3) == 'sho') {
    $f .= 'наплечники<br/>';
}
if (substr($to, 4, 3) == 'glo') {
    $f .= 'перчатки<br/>';
}
if (substr($to, 4, 3) == 'bel') {
    $f .= 'пояс<br/>';
}
if (substr($to, 4, 3) == 'leg') {
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:31,代码来源:sp_info_i_a.php


示例4: preg_replace

}
if (isset($_GET['part'])) {
    $part = preg_replace('/[^a-z0-9_]/i', '', $_GET['part']);
} else {
    $part = '';
}
$nid = is_npc($npc);
$nn = do_mysql("SELECT * FROM npc WHERE id_npc = '" . $nid . "';");
$nn = mysql_fetch_assoc($nn);
if ($nn['belongs'] != $LOGIN) {
    put_error('это не ваш нпц');
}
if ($nn['location'] != $p['location']) {
    put_g_error('рядом с вами нету этого нпц');
}
$f = gen_header($nn['name']);
$f .= '<div class="y" href="aof"><b>' . $nn['name'] . '</b></div><p>';
if (!$part) {
    $f .= '» <a class="blue" href="game.php?sid=' . $sid . '&action=talk_to_priru&part=har&npc=' . $npc . '">';
    $f .= 'просмотреть информацию</a><br/>';
    $f .= '» <a class="blue" href="game.php?sid=' . $sid . '&action=talk_to_priru&part=name1&npc=' . $npc . '">';
    $f .= 'дать кличку</a><br/>';
    if ($nn['move'] != 0) {
        $f .= '» <a class="blue" href="game.php?sid=' . $sid . '&action=talk_to_priru&part=stay&npc=' . $npc . '">стой тут!</a><br/>';
    } else {
        $f .= '» <a class="blue" href="game.php?sid=' . $sid . '&action=talk_to_priru&part=stay&npc=' . $npc . '">иди за мной!</a><br/>';
    }
    $f .= '» <a class="blue" href="game.php?sid=' . $sid . '&action=talk_to_priru&part=sit&npc=' . $npc . '">';
    $f .= 'сидеть!</a><br/>';
    $f .= '» <a class="blue" href="game.php?sid=' . $sid . '&action=talk_to_priru&part=lay&npc=' . $npc . '">';
    $f .= 'лежать!</a><br/>';
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:31,代码来源:s_talk_to_priru.php


示例5: is_npc

$nid = is_npc($npc);
$tr = do_mysql("SELECT drop2 FROM npc WHERE id_npc = '" . $nid . "';");
$tr = mysql_result($tr, 0);
$tr = explode('|', $tr);
if (strpos($tr[0], substr($item, 2, 1)) === false && $tr[0] != '*') {
    put_error('торговец не покупает эти виды вещей');
}
if ($count > $iin['on_take']) {
    $count = $iin['on_take'];
}
// cena
$cost = round($iin['price'] * $count * $tr[2]);
$p['money'] += $cost;
do_mysql("UPDATE players SET money = '" . $p['money'] . "' WHERE id_player = '" . $p['id_player'] . "';");
if ($count == $iin['on_take']) {
    // beretsja vsja veshq
    // udaljaem veshq von
    include_once 'modules/f_delete_item.php';
    delete_item($item);
} else {
    include_once 'modules/f_decrease_misc.php';
    decrease_misc($item, $count);
}
// vse, veshq prodali, teperq vyvodim stranicu
$f = gen_header('торг');
$f .= '<div class="y" id="oaidy"><b>продажа:</b></div><p>';
$f .= 'вы продали ' . $count . ' ' . $iin['name'] . ' за ' . $cost . ' серебра!<br/>';
$f .= '<a class="blue" href="game.php?sid=' . $sid . '&action=trade&npc=' . $npc . '&start=' . $_GET['start'] . '&start2=' . $_GET['start2'] . '">торг</a><br/>';
$f .= '<a class="blue" href="game.php?sid=' . $sid . '">в игру</a></p>';
$f .= gen_footer();
exit($f);
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:31,代码来源:s_sell_misc2.php


示例6: gen_header

<?php 
//////////////////////////////// NOVOSTI vnutri igry /////////////////////////
$f = gen_header('новости');
if (!isset($_GET['start'])) {
    $start = 0;
} else {
    $start = preg_replace('/[^-0-9]/', '', $_GET['start']);
}
$show = 5;
if (!$start) {
    $start = 0;
}
// qtotth zaprashivaem kolichestvo novostej
$qtotth = mysql_query("SELECT count(*) FROM news;", $dbcnx);
$totth = mysql_result($qtotth, 0);
if ($start > $totth) {
    $start = $totth - 3;
}
if ($start < 0) {
    $start = 0;
}
$goto = $start + $show;
if ($goto > $totth) {
    $goto = $totth;
}
$f .= '<div class="y" id="dgvdglhk"><b>новости: (' . $start . '-' . $goto . '/' . $totth . ')</b></div><div class="n" id="wt743dt">';
// proverka novyh novostej:
if (!$start) {
    $q = do_mysql("SELECT puttime FROM news WHERE puttime > '" . $p['lastnews'] . "' ORDER BY puttime DESC;");
    if (mysql_num_rows($q)) {
        $pt = mysql_result($q, 0);
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:31,代码来源:s_news.php


示例7: extract_poem_detail

    }
    $result_string .= "</li>\n";
    return $result_string;
}
function extract_poem_detail($cat_id)
{
    global $db;
    $poemresults = $db->query('SELECT * FROM poem WHERE cat_id=' . $cat_id);
    $result_string = "";
    while ($poemInfo = $poemresults->fetchArray()) {
        $result_string .= "<li> <a href=\"poem.php?poem_id=" . $poemInfo['id'] . "\">" . $poemInfo['title'] . "</a> </li>\n";
    }
    if ($result_string == "") {
        return "no entry!";
    } else {
        return "<ul>\n" . $result_string . "</ul>\n";
    }
}
$catresults = $db->query('SELECT * FROM cat WHERE poet_id=' . $poet_id . ' AND parent_id=0');
gen_header("جستجوی آثار", "<script type=\"text/javascript\" src=\"simpletreemenu.js\"></script>\n");
echo "<ul id=\"cattree\" class=\"treeview\" rel=\"open\">\n";
while ($catInfo = $catresults->fetchArray()) {
    echo extract_cat_info($catInfo['id'], $catInfo['text']);
}
echo "</ul>\n";
echo <<<SCRIPT
<script type="text/javascript">
streemenu.createTree("cattree", true, 5)
</script>
SCRIPT;
gen_footer();
开发者ID:arashbehmand,项目名称:simple-ganjoor-parser,代码行数:31,代码来源:cat.php


示例8: gen_header

<?php 
// spisok magii
$f = gen_header('магия');
$f .= '<div class="y" id="aeifa5f"><b>кланы:</b></div>';
if (isset($_GET['classof'])) {
    $classof = preg_replace('/[^0-9]/i', '', $_GET['classof']);
    $type = preg_replace('/[^a-z]/i', '', $_GET['type']);
    $f .= '<div class="n" id="aclanf">';
    $q = do_mysql("SELECT name, fullname FROM magic WHERE classof = '" . $classof . "' AND type = '" . $type . "' ORDER BY difficulty;");
    while ($mag = mysql_fetch_assoc($q)) {
        $f .= '&#187;<a class="blue" href="game.php?sid=' . $sid . '&action=show_magic_info&classof=' . $classof . '&type=' . $type . '&spell=' . $mag['fullname'] . '">' . $mag['name'] . '</a><br/>';
    }
    $f .= '<b>&#171;</b><a class="blue" href="game.php?sid=' . $sid . '&action=mir_magic">к выборy</a>';
    $f .= '</div>';
} else {
    $f .= '<div class="n" id="aclanf">';
    $f .= '<form action="game.php" method="get">';
    $f .= 'выберите магию и тип:<br/>';
    $f .= '<input type="hidden" name="sid" value="' . $sid . '"/>';
    $f .= '<input type="hidden" name="action" value="mir_magic"/>';
    $f .= '<select name="classof">';
    $f .= '<option value="0">общая</option>';
    $f .= '<option value="1">огня</option>';
    $f .= '<option value="2">воды</option>';
    $f .= '<option value="3">земли</option>';
    $f .= '<option value="4">воздуха</option>';
    $f .= '<option value="5">иллюзии</option>';
    $f .= '<option value="6">подземная</option>';
    $f .= '<option value="7">эльфийская природы</option>';
    $f .= '<option value="8">древнеэльфийская могущественных</option>';
    $f .= '</select><br/>';
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:31,代码来源:s_mir_magic.php


示例9: preg_replace

<?php 
// napisatq soobshenie konkretnomu chelu i dobavitq v zhurnal
$to = preg_replace('/[^a-z0-9_]/i', '', $_GET['to']);
// esli u chela otkljuchen zhurnal to nezachem muchatqsja i pisatq emu soobshenie
// da i servaka zhalko...
$id = is_player($to);
$qset = do_mysql("SELECT settings FROM players WHERE id_player = '" . $id . "';");
$set = mysql_result($qset, 0);
if ($set[3] == 0) {
    put_g_error('у ' . $to . ' отключен показ событий, ваше сообшение всеровно небудет прочитанно');
}
// teperq mozhno vyvoditq formu
$f = gen_header('сообщение');
$q = do_mysql("SELECT name FROM players WHERE id_player = '" . $id . "';");
$namefor = mysql_result($q, 0);
$f .= '<div class="y" id="fg"><b>' . $namefor . ', </b></div>';
$f .= '<div class="n" id="eruaj">сообщение: <br/>';
$f .= '<form action="game.php" method="get">';
$f .= '<textarea name="msg" rows="2"></textarea>';
$f .= '<input type="hidden" name="action" value="addmsg"/>';
$f .= '<input type="hidden" name="sid" value="' . $sid . '"/>';
$f .= '<input type="hidden" name="to" value="' . $to . '"/>';
// translit
$f .= '<br/><input type="radio" name="t" value="1"/>транслит<br/>';
$f .= '<input type="radio" name="t" value="0"/>как есть<br/>';
$f .= '<select size="1" name="shep">';
$f .= '<option value="0">говорить</option>';
$f .= '<option value="1">шептать</option>';
$f .= '<option value="2">всему клану</option>';
$f .= '<option value="3">партии</option>';
$f .= '</select><br/>';
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:31,代码来源:s_wmsg.php


示例10: array

<?php 
// FAQ:
$show = 5;
$faq[] = array('prilavki', 'что такое прилавки?');
$faq[] = array('clan', 'как создать свой клан?');
$faq[] = array('stats', 'немогу прокачать статы (нет знака +)');
$faq[] = array('stats2', 'как и на что влияют основные параметры?');
$faq[] = array('jewels', 'на что влияют украшения?');
$f = gen_header('FAQ');
$f .= '<div class="y" id="aeifa5f"><b>FAQ:</b></div>';
if (isset($_GET['faq'])) {
    $num = preg_replace('/[^0-9]/', '', $_GET['faq']);
    if ($num === false) {
        put_error('O_o');
    }
    if (!isset($faq[$num])) {
        put_error('X_x');
    }
    $f .= '<div class="y" id="aeifa5f"><b>' . $faq[$num][1] . '</b></div>';
    $f .= '<div class="n" id="ssad5f">';
    if (file_exists('modules/library/faq_' . $faq[$num][0] . '.txt')) {
        $f .= file_get_contents('modules/library/faq_' . $faq[$num][0] . '.txt');
    }
    $f .= '</div>';
}
$c = count($faq);
if (!isset($_GET['start'])) {
    $start = 0;
} else {
    $start = preg_replace('/[^0-9]/', '', $_GET['start']);
}
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:31,代码来源:s_faq.php


示例11: while

    echo "</p>\n";
    echo "<p>\n";
    echo "<label for=\"pid\">در آثار</label>\n";
    echo "<select id=\"pid\" name=\"pid\">\n";
    echo "<option value=\"0\">همه‌ی شاعران</option>\n";
    $results = $db->query('SELECT * FROM poet');
    while ($poetData = $results->fetchArray()) {
        echo "<option value=\"" . $poetData['id'] . "\">" . $poetData['name'] . "</option>\n";
    }
    echo "</select>";
    echo "<div style=\"margin-left: 150px;\">\n";
    echo "<input type=\"submit\" value=\"ارسال\" /> <input type=\"reset\" value=\"از نو\" />\n";
    echo "</div>\n";
    echo "</form>\n";
} else {
    gen_header("جستجو برای " . $_GET['q']);
    $qstr = "SELECT verse.text,verse.vorder,verse.position,poem.id,poem.cat_id,cat.poet_id FROM verse INNER JOIN poem ON verse.poem_id=poem.id INNER JOIN cat ON poem.cat_id=cat.id WHERE verse.text LIKE '%" . $_GET['q'] . "%'";
    $qstr .= @$_GET['pid'] == 0 ? "" : " AND cat.poet_id=" . $_GET['pid'];
    $results = $db->query($qstr);
    echo "<table>\n";
    while ($data = $results->fetchArray()) {
        echo "<tr>\n";
        echo "<td class=\"verseright\"><a href=\"cat.php?id=" . $data['poet_id'] . "\">" . implode("»", find_cat_hierachy($data['cat_id'])) . "</a></td>\n";
        echo "<td class=\"verseright\"><a href=\"poem.php?poem_id=" . $data['id'] . "\">" . $data['text'] . "</a></td>\n";
    }
    echo "</table>\n";
}
gen_footer();
?>

开发者ID:arashbehmand,项目名称:simple-ganjoor-parser,代码行数:29,代码来源:search.php


示例12: gen_header

<?php 
// pokazyvaet navyki i staty
$f = gen_header('навыки');
$f .= '<div class="y" id="skli5"><b>статы:</b></div><p>';
$f .= 'уровень: ' . $p['stats'][0] . '<br/>';
$f .= 'опыт навыка: ' . $p['stats'][1] . '/' . $p['stats'][2] . '<br/>';
$f .= 'очки навыка: ' . $p['stats'][3] . '<br/>';
$f .= 'опыт: ' . $p['stats'][4] . '/' . $p['stats'][5] . '<br/>';
$f .= 'очки опыта: ' . $p['stats'][6];
if ($p['stats'][6] > 0) {
    $sum = array_sum($p['skills']);
    if ($sum == 6) {
        $price = 0;
    } else {
        $price = $sum * $sum * 1;
    }
    //else $price = $sum * 100;
    $f .= '<br/><small>цена поднятия: ' . $price . ' серебра<br/></small>';
}
$f .= '</p>';
$f .= '<p>';
// pereberem, esli estq vstavim nazvanie, ukazhim naskolqko prokachen
include 'modules/sp/sp_skillnames.php';
// nazvanija
$c = count($p['skills']);
// limit
$stn = $skc = 0;
for ($i = 0; $i < 4; $i++) {
    $stn += $p['skills'][$i];
}
for ($i = 4; $i < $c; $i++) {
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:31,代码来源:s_show_skills.php


示例13: gen_header

<?php 
// spisok klanov
$show = 20;
$f = gen_header('замки');
$f .= '<div class="y" id="aeifa5f"><b>замки:</b></div>';
$f .= '<div class="y" id="aeifa5f"><b>Телир</b></div>';
$f .= '<div class="n" id="ssad5f">';
$q = do_mysql("SELECT belongs FROM castle WHERE name = 'telir';");
$bel = mysql_result($q, 0);
$f .= 'принадлежит <a class="blue" href="game.php?sid=' . $sid . '&action=clanlist&clan=' . $bel . '">' . $bel . '</a>!';
$f .= '</div>';
$f .= '<div class="n" id="adi45f">';
$f .= '&#187;<a class="blue" href="game.php?sid=' . $sid . '&action=mir_igry">мир игры</a><br />';
$f .= '&#187;<a class="blue" href="game.php?sid=' . $sid . '">в игру</a><br />';
$f .= '</div>';
$f .= gen_footer();
exit($f);
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:17,代码来源:s_castlelist.php


示例14: do_mysql

<?php 
do_mysql("INSERT INTO fonline VALUES ('" . $LOGIN . "', 'просмотр последних', NOW());");
$f = gen_header('просмотр последних');
$f .= '<div class="y" id="oi"><b>последниe посты:</b></div><p>';
$q = do_mysql("SELECT * FROM themes WHERE id_forum != 8 AND id_forum != 10 ORDER BY lpost DESC LIMIT 0, 10;");
while ($t = mysql_fetch_assoc($q)) {
    $a = do_mysql("SELECT author FROM posts WHERE id_theme = '" . $t['id_theme'] . "' ORDER BY puttime DESC LIMIT 0, 1;");
    if (!mysql_num_rows($a)) {
        $f .= 'создана тема "<a class="blue" href="game.php?sid=' . $sid . '&action=forum&sub_action=showposts&id_theme=' . $t['id_theme'] . '&id_forum=' . $t['id_forum'] . '&start=0">' . $t['name'] . '</a>"!<br/>';
        continue;
    }
    $name = mysql_result($a, 0);
    $f .= '<small>в теме</small> "<a class="blue" href="game.php?sid=' . $sid . '&action=forum&sub_action=showposts&id_theme=' . $t['id_theme'] . '&id_forum=' . $t['id_forum'] . '&start=0">' . $t['name'] . '</a>"<small> отписался</small> <a class="blue" href="game.php?sid=' . $sid . '&action=forum&sub_action=showposts&id_theme=' . $t['id_theme'] . '&id_forum=' . $t['id_forum'] . '&start=100000">' . $name . '</a>!<br/>';
}
$f .= '&#187;<a class="blue" href="game.php?sid=' . $sid . '&action=forum&sub_action=showlast">обновить</a><br/>';
$f .= '&#187;<a class="blue" href="game.php?sid=' . $sid . '&action=forum">форум</a><br/>';
$f .= '&#187;<a class="blue" href="game.php?sid=' . $sid . '">в игру</a></p>';
$f .= gen_footer();
exit($f);
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:19,代码来源:s_f_showlast.php


示例15: gen_header

<?php 
// pokaz kontaktov
$f = gen_header('переписка');
//////////////////////////////////////////////////////
// start
$show = 10;
if (!isset($_GET['start'])) {
    $start = 0;
} else {
    $start = preg_replace('/[^0-9]/', '', $_GET['start']);
}
// s kem perepiska
$to = preg_replace('/[^0-9]/', '', $_GET['to']);
//---------------------------------------------------------------
// esli nado ochistitq, ochistim
if (isset($_GET['subaction']) && $_GET['subaction'] == 'clear') {
    do_mysql("DELETE FROM ls WHERE (sentfor = '" . $p['id_player'] . "' AND sender = '" . $to . "') OR (sender = '" . $p['id_player'] . "' AND sentfor = '" . $to . "');");
}
// qtotp zaprashivaem kolichestvo ls
$qtotp = do_mysql("SELECT COUNT(*) FROM ls WHERE (sentfor = '" . $p['id_player'] . "' AND sender = '" . $to . "') OR (sender = '" . $p['id_player'] . "' AND sentfor = '" . $to . "');");
// totp poluchjaem kolichestvo tem
$totp = mysql_result($qtotp, 0);
if ($start > $totp) {
    $start = $totp - $show;
}
// menqshe nulja bytq nemozhet
if ($start < 0) {
    $start = 0;
}
//--
// kolichestvo nechitanyh ls
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:31,代码来源:s_perepiska.php


示例16: gen_header

<?php 
// forma sozdanija foruma
if ($p['admin'] > 1) {
    $f = gen_header('новая новость');
    $f .= '<div class="y" id="cfpor"><b>создать новость:</b></div><div class="n" id="gsd">';
    $f .= '<form action="game.php" method="get">';
    $f .= '<input type="hidden" name="sid" value="' . $sid . '"/>';
    $f .= '<input type="hidden" name="action" value="add_new2"/>';
    $f .= 'новость: <br/> <textarea name="name" rows="5" cols="32"></textarea><br/>';
    $f .= '<input type="submit" value="создать"/></form>';
    $f .= '<a class="blue" href="game.php?sid=' . $sid . '">в игру</a></div>';
    $f .= gen_footer();
    exit($f);
}
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:14,代码来源:s_add_new1.php


示例17: do_mysql

<?php 
do_mysql("INSERT INTO fonline VALUES ('" . $LOGIN . "', 'просмотр онлайн', NOW());");
$f = gen_header('просмотр онлайн');
$f .= '<div class="y" id="oi"><b>на форуме:</b></div><p>';
$q = do_mysql("SELECT * FROM fonline;");
while ($fo = mysql_fetch_assoc($q)) {
    $id = is_player($fo['login']);
    $q2 = do_mysql("SELECT name FROM players WHERE id_player = '" . $id . "';");
    $name = mysql_result($q2, 0);
    $f .= '<b>' . $name . '</b>: <small>' . $fo['is_in'] . '</small><br/>';
}
$f .= '&#187;<a class="blue" href="game.php?sid=' . $sid . '&action=forum&sub_action=showfonline">обновить</a><br/>';
$f .= '&#187;<a class="blue" href="game.php?sid=' . $sid . '&action=forum">форум</a><br/>';
$f .= '&#187;<a class="blue" href="game.php?sid=' . $sid . '">в игру</a></p>';
$f .= gen_footer();
exit($f);
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:16,代码来源:s_f_showfonline.php


示例18: gen_header

<?php 
// pokaz kombo:
$f = gen_header('приемы');
$f .= '<div class="y" id="skli5"><b>приемы:</b></div><p>';
include 'modules/sp/sp_kombonames.php';
// nazvanija
$c = count($p['kombo']);
for ($i = 0; $i < $c; $i++) {
    if (!$p['kombo'][$i]) {
        continue;
    }
    $p['kombo'][$i] = explode(':', $p['kombo'][$i]);
    $f .= $i + 1 . ': <a class="blue" href="game.php?sid=' . $sid . '&action=showkombo_i&kombo=' . $p['kombo'][$i][0] . '">' . $kn[$p['kombo'][$i][0]] . '</a>';
    $f .= ': <b>' . $p['kombo'][$i][1] . '</b> (' . $p['kombo'][$i][2] . '/';
    $tok = 20;
    for ($a = 1; $a < $p['kombo'][$i][1]; $a++) {
        $tok *= 2;
    }
    $f .= $tok . ')';
    $f .= ' <a class="blue" href="game.php?sid=' . $sid . '&action=use_kombo&kombo=' . $p['kombo'][$i][0] . '">&#187;</a><br/>';
}
$f .= '<a class="blue" href="game.php?sid=' . $sid . '&action=showinventory">в инвентарь</a><br/>';
$f .= '<a class="blue" href="game.php?sid=' . $sid . '">в игру</a></p>';
$f .= gen_footer();
exit($f);
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:25,代码来源:s_showkombo.php


示例19: gen_header

        include 'modules/sp/sp_use_scroll.php';
        break;
    case 'b':
        include 'modules/sp/sp_use_book.php';
        break;
    case 'm':
        include 'modules/sp/sp_use_misc.php';
        break;
    case 'q':
        include 'modules/sp/sp_use_quest.php';
        break;
    case 'x':
        include 'modules/sp/sp_use_shield.php';
        break;
}
$f = gen_header('инвентарь');
$f .= '<div class="y" id="gasi"><b>инвентарь:</b></div><p>';
switch ($t) {
    case 's':
        include 'modules/sp/sp_use_scroll.php';
        break;
    case 'b':
        include 'modules/sp/sp_use_book.php';
        break;
}
if (!isset($_GET['to']) && $t != 'q') {
    $f .= '<a class="blue" href="game.php?sid=' . $sid . '&action=showinventory">инвентарь</a><br/>';
    $f .= '<a class="blue" href="game.php?sid=' . $sid . '">в игру</a></p>';
    $f .= gen_footer();
    exit($f);
}
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:31,代码来源:s_use_item.php


示例20: put_g_error

function put_g_error($error)
{
    ######### gen_header(); ###############
    // vyvedet nadpisq ob oshibke (igrovuju, otobazhatq mozhno)
    global $sid;
    $f = gen_header('ошибка!');
    echo $f;
    echo '<div class="y" id="asf5"><b>ошибка:</b></div>';
    // ssylk na vhod
    $s = '<p><a href="game.php?sid=' . $sid . '">далее</a></p>';
    $s .= gen_footer();
    $error = htmlspecialchars(addslashes($error));
    $error .= $s;
    exit('<p>' . $error . '</p>');
}
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:15,代码来源:f_game.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP gen_helper函数代码示例发布时间:2022-05-15
下一篇:
PHP gen_handler函数代码示例发布时间: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