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

PHP gen_footer函数代码示例

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

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



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

示例1: load_footer

function load_footer()
{
    $objResponse = new xajaxResponse();
    $text .= gen_footer();
    $objResponse->assign("bottom_nav", "innerHTML", $text);
    return $objResponse;
}
开发者ID:pkkann,项目名称:enrollment_sys,代码行数:7,代码来源:footer.php


示例2: 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


示例3: gen_main

function gen_main()
{
    $text = '';
    $text .= '<div id="top_wrapper">';
    $text .= '<nav id="top_nav" class="navbar navbar-inverse navbar-fixed-top animated fadeInDown">';
    $text .= gen_nav();
    $text .= '</nav>';
    $text .= '</div>';
    $text .= '<div id="middle_wrapper" class="animated fadeIn">';
    switch ($_SESSION['curPage']) {
        case '1':
            $text .= gen_residents();
            break;
        case '2':
            $text .= gen_guests();
            break;
        case '3':
            if ($_SESSION['user']['admin']) {
                $text .= gen_users();
            } else {
                $_SESSION['curPage'] = 1;
                $text .= gen_main();
            }
            break;
        case '4':
            $text .= gen_shifts();
            break;
    }
    $text .= '</div>';
    $text .= '<div id="bottom_wrapper">';
    $text .= '<nav id="bottom_nav" class="navbar navbar-default navbar-fixed-bottom animated fadeInUp">';
    $text .= gen_footer();
    $text .= '</nav>';
    $text .= '</div>';
    return $text;
}
开发者ID:pkkann,项目名称:enrollment_sys,代码行数:36,代码来源:main.php


示例4: gen_header

    }
    $f = gen_header('Забытая История');
    $f .= '<div class="y" id="udak"><b>Пауза</b>:</div>';
    $f .= '<p>';
    $f .= 'Вы еще не собрались силами после прошедшего заклинания!<br/>';
    $pl_eff = get_affected($LOGIN);
    if ($pl_eff) {
        $f .= 'Эффекты:<br/>-';
        include_once 'modules/f_translit.php';
        $pl_eff = translit($pl_eff);
        $pl_eff = str_replace('|', '<br/>-', $pl_eff);
        $f .= $pl_eff;
    }
    $f .= '<a class="blue" href="game.php?' . $str2 . '">продолжить</a> | ';
    $f .= '<a class="blue" href="game.php?sid=' . $sid . '">в игру</a></p>';
    $f .= gen_footer();
    exit($f);
}
// potom ispolqzuem manu:
include_once 'modules/f_use_mana.php';
if (!use_mana($spell, $LOGIN)) {
    put_g_error('у вас нехватает маны на это заклинание!');
}
// teperq obnovim poslednee zaklinanie:
include_once 'modules/f_upd_last_cast.php';
upd_last_cast($LOGIN, $spell);
// skazhem slova:
$q = do_mysql("SELECT words FROM magic WHERE fullname = '" . $spell . "';");
$words = mysql_result($q, 0);
add_journal($p['name'] . ': ' . $words . '!', 'l.' . $p['location']);
// potom proverka, vyshlo li kastanutq zakl -
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:31,代码来源:s_cast_from_book.php


示例5: 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,代码行数:30,代码来源:cat.php


示例6: 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


示例7: gen_header

    }
    $poem[$i][$j] = $verseData["text"];
    $j++;
}
gen_header("نمایش شعر » " . $poemData['title'] . "");
echo "<div class=\"header\"><a href=\"cat.php?id=" . $poet_info['id'] . "&catid=" . $poet_info['cat_id'] . "\">" . implode(" » ", $cat_hierachy) . "</a> » <b>" . $poemData['title'] . "</b></div>\n";
echo "<table align=\"center\" dir=\"rtl\">\n";
//var_dump($poem);
for ($i = 0; $i < count($poem); $i++) {
    echo "<tr>\n";
    if (count($poem[$i]) == 1) {
        echo "<td class=\"verseCenter\" colspan=\"3\">" . $poem[$i][0] . "</td>\n";
    } else {
        if (count($poem[$i]) == 2) {
            echo "<td class=\"verseLeft\">" . $poem[$i][0] . "</td>\n";
            echo "<td class=\"spacer\">&nbsp;</td>\n";
            echo "<td class=\"verseRight\">" . $poem[$i][1] . "</td>\n";
        } else {
            echo "<td colspan=\"3\">ERROR</td>";
            //for ( $j = 0; $j < count($poem[$i]); $j++){
            //	echo "<td>" . $poem[$i][$j] . "</td>\n";
            //}
        }
    }
    echo "</tr>\n";
}
echo "</table>\n";
gen_footer(array("نمایش آثار " . $poet_info['name'] => "cat.php?id=" . $poet_info['id'] . "&catid=" . $poet_info['cat_id']));
?>

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


示例8: teleport


//.........这里部分代码省略.........
        $show_info = 0;
    }
    global $NEWMAP;
    $NEWMAP = 1;
    if (!loc($loc_go, 'locinfo')) {
        return 0;
    }
    // sotrem byvshij inloc
    add_to_loc($loc_go, $who);
    //////////////////////////////
    // pitomec
    $an = do_mysql("SELECT name, fullname FROM npc WHERE belongs = '" . $login . "' AND location = '" . $loc . "' AND move <> 0;");
    $an = mysql_fetch_assoc($an);
    if ($an['fullname']) {
        $pit = ' и ' . $an['name'] . ' ';
        add_to_loc($loc_go, $an['fullname']);
    } else {
        $pit = '';
    }
    if (substr($who, 0, 2) == 'n.') {
        $map = substr($loc_go, 0, 4);
        do_mysql("UPDATE npc SET location = '" . $loc_go . "', map = '" . $map . "' WHERE id_npc = '" . $id . "';");
    } else {
        do_mysql("UPDATE players SET location = '" . $loc_go . "' WHERE id_player = '" . $id . "';");
    }
    $loc2 = 'l.' . $loc;
    // formiruem soobshenie.
    if ($pit) {
        $gone = 'исчезли';
        $come = 'появиись';
    } else {
        if (!isset($gender)) {
            // dlja npc, esliimja konchaetsja na 'a', to skorej vsego devushka
            $len = strlen($login);
            $len2 = $len - 1;
            if (substr($login, $len2) == 'а') {
                $gone = 'исчезла';
                $come = 'появилась';
            } else {
                $gone = 'исчез';
                $come = 'появился';
            }
        } else {
            if ($gender == 'male') {
                $gone = 'исчез';
                $come = 'появился';
            }
            if ($gender == 'female') {
                $gone = 'исчезлa';
                $come = 'появилась';
            }
        }
    }
    // proverim $n, esli 1 to eto npc i nado vsem pisatq, esli net to perehodjashemu ne nado
    if ($n) {
        $need = 1;
    } else {
        $need = 0;
    }
    // v byvshuju lokaciju
    add_journal('<p>' . $name . '' . $pit . ' ' . $gone . '!</p>', 'l.' . $loc, $need);
    // v novuju
    add_journal('<p>' . $come . ' ' . $name . '' . $pit . '</p>', 'l.' . $loc_go, $need);
    $p = get_pl_info($who, 'all');
    $NEWMAP = 1;
    include 'modules/s_loadmaps.php';
    // zagruzim kartu
    unset($p);
    //echo '<br/>show info = '.$show_info.'<br/>';
    //echo 'n = '.$n.'<br/>';
    //echo 'settings 4 = '.$p['settings'][4].'<br/>';
    // takzhe, esli showinfo = 1, perehodjashemu chelu pokazatq info toj karty
    if ($show_info && !$n && $who == $LOGIN) {
        global $p;
        do_mysql("UPDATE gamesys SET life_regen = 0;");
        if ($p['settings'][4] == 1) {
            $lg = loc($loc_go, 'locinfo');
            // kartinki v locpics/(nazvanie karty).jpg
            $map = substr($loc_go, 0, 4);
            $mapi = gen_header($lg[1]);
            $mapi .= '<div class="y" id="adg"><b>' . $lg[1] . '</div>';
            if (file_exists('modules/locpics/' . $map . '.JPEG')) {
                $mapi .= '<p><img src="modules/locpics/' . $map . '.JPEG" alt="."/></p>';
            }
            // teperq infa
            // '/mapinfo/'.$map.'.mapi'
            if (file_exists('modules/mapinfo/' . $map . '.txt')) {
                $mapi .= '<p>';
                $mapi .= file_get_contents('modules/mapinfo/' . $map . '.txt');
                $mapi .= '</p>';
            } else {
                $mapi .= '<p>нет информации</p>';
            }
            global $sid;
            $mapi .= '<p><a class="blue" href="game.php?sid=' . $sid . '">в игру</a></p>';
            $mapi .= gen_footer();
            exit($mapi);
        }
    }
}
开发者ID:nadvamir,项目名称:forgotten-story-mmorpg,代码行数:101,代码来源:f_teleport.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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