当前位置: 首页>>代码示例>>PHP>>正文


PHP headers::userdata方法代码示例

本文整理汇总了PHP中headers::userdata方法的典型用法代码示例。如果您正苦于以下问题:PHP headers::userdata方法的具体用法?PHP headers::userdata怎么用?PHP headers::userdata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在headers的用法示例。


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

示例1: header

along with this program; if not, write to the Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
session_start();
require "global_func.php";
if ($_SESSION['loggedin'] == 0) {
    header("Location: login.php");
    exit;
}
$userid = $_SESSION['userid'];
require "header.php";
$h = new headers();
$h->startheaders();
include "mysql.php";
global $c;
$is = mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$userid}", $c) or die(mysql_error());
$ir = mysql_fetch_array($is);
check_level();
$fm = money_formatter($ir['money']);
$cm = money_formatter($ir['crystals'], '');
$lv = date('F j, Y, g:i a', $ir['laston']);
$h->userdata($ir, $lv, $fm, $cm);
$h->menuarea();
$_GET['ID'] = abs((int) $_GET['ID']);
if (!$_GET['ID']) {
    die("Incorrect usage of file.");
}
$q = mysql_query("SELECT * FROM oclogs WHERE oclID={$_GET['ID']}", $c);
$r = mysql_fetch_array($q);
print "Here is the detailed view on this crime.<br />\n<b>Crime:</b> {$r['ocCRIMEN']}<br />\n<b>Time Executed:</b> " . date('F j, Y, g:i:s a', $r['ocTIME']) . "<br />\n                {$r['oclLOG']}<br /><br />\n<b>Result:</b> {$r['oclRESULT']}<br />\n<b>Money Made:</b> \${$r['oclMONEY']}";
$h->endpage();
开发者ID:jwest00724,项目名称:mccodefree,代码行数:31,代码来源:oclog.php

示例2: die

if ($_SESSION['userid']) {
    if ($guest) {
        $gutxt = " AND guest=1";
    }
    $is = $db->query("SELECT * FROM users WHERE userid='{$userid}'{$gutxt}");
    $useex = $db->num_rows($is);
    if ($useex > 0) {
        $ir = $db->fetch_row($is);
        $namenospaces = str_replace(" ", "_", $ir['username']);
        $_SESSION['username'] = $namenospaces;
    } else {
        if (!$userid) {
            die('error');
        } else {
            if ($guest == 1) {
                header('Location: login.php');
            } else {
                $name = $user->fbc_name;
                $db->query("INSERT INTO users (userid, username, money) VALUES('{$userid}', '{$name}', 1000)");
                $is = $db->query("SELECT * FROM users WHERE userid='{$userid}'");
                $ir = $db->fetch_row($is);
            }
        }
    }
}
$h = new headers();
$h->startheaders();
$fm = "\$" . number_format($ir['money']);
$lv = date('F j, Y, g:i a', $ir['laston']);
$h->userdata($ir, $lv, $fm);
开发者ID:marcfeather,项目名称:Multiplayer-PHP-Ajax-Games,代码行数:30,代码来源:globals.php


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