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


PHP InitSmarty函数代码示例

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


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

示例1: ToValidate

 function ToValidate($email)
 {
     global $show, $url;
     $smarty = InitSmarty();
     $smarty->assign('email', $email);
     $smarty->assign('show', $show);
     $smarty->assign('url', $url);
     $smarty->display('validate.html');
     exit;
 }
开发者ID:Root-Whoami,项目名称:xss,代码行数:10,代码来源:User.class.php

示例2: include

        /*
        if(empty($captcha)) ShowError('请输入验证码',$url['login']);
        //判断验证码
        include(ROOT_PATH.'/source/class/Captcha.class.php');
        if(!Captcha::Check($captcha)) ShowError('验证码输入错误',$url['login']);
        */
        $auto = Val('auto', 'POST', 1);
        if ($user->userId <= 0) {
            if ($user->Login($username, $userpwd, $auto)) {
                ShowSuccess('登录成功');
            } else {
                ShowError('登录失败,请检查用户/邮箱或密码', $url['login']);
            }
        }
        break;
    case 'logout':
        if ($user->Logout()) {
            ShowSuccess('成功退出');
        }
        break;
    default:
        if ($user->userId > 0) {
            ShowError('已经登录');
        }
        $smarty = InitSmarty();
        $smarty->assign('do', $do);
        $smarty->assign('show', $show);
        $smarty->assign('url', $url);
        $smarty->display('login.html');
        break;
}
开发者ID:findlakes,项目名称:XSS-Platform,代码行数:31,代码来源:login.php

示例3: die

    die('Access Denied');
}
$db = DBConnect();
$tbUser = $db->tbPrefix . 'user';
$tbSession = $db->tbPrefix . 'session';
$tbContent = $db->tbPrefix . 'content';
$tbComment = $db->tbPrefix . 'comment';
//社区概况
$situation = array();
$situation['userCount'] = $db->FirstValue("SELECT COUNT(*) FROM {$tbUser}");
//注册用户总数
$tbSession = $db->tbPrefix . 'session';
$situation['onlineCount'] = $db->FirstValue("SELECT COUNT(DISTINCT userId) FROM {$tbSession} WHERE updateTime>" . (time() - EXPIRES));
//在线用户总数
$situation['onlineUsers'] = $db->Dataset("SELECT DISTINCT u.id,u.userName FROM {$tbSession} s INNER JOIN {$tbUser} u ON u.id=s.userId WHERE updateTime>" . (time() - EXPIRES));
//在线用户
//系统环境
$sysInfo = array();
$sysInfo['sys_version'] = 'IT121 1.0';
$sysInfo['serverOS'] = PHP_OS;
$sysInfo['serverSoftware'] = $_SERVER['SERVER_SOFTWARE'];
$sysInfo['phpVersion'] = 'PHP v' . PHP_VERSION;
$sysInfo['mysqlVersion'] = 'MySQL ' . $db->FirstValue('SELECT VERSION()');
include ROOT_PATH . '/source/common.php';
$smarty = InitSmarty(1);
$smarty->assign('situation', $situation);
$smarty->assign('sysInfo', $sysInfo);
$smarty->assign('do', $do);
$smarty->assign('show', $show);
$smarty->assign('url', $url);
$smarty->display('admin_index.html');
开发者ID:findlakes,项目名称:XSS-Platform,代码行数:31,代码来源:admin_index.php

示例4: Notice

function Notice($str = '', $turnto = URL_ROOT, $time = 3, $style = 'success', $urltitle)
{
    global $show, $url;
    $notice = array('str' => $str, 'turnto' => $turnto, 'time' => $time, 'style' => $style, 'urltitle' => $urltitle);
    $smarty = InitSmarty();
    $smarty->assign('show', $show);
    $smarty->assign('url', $url);
    $smarty->assign('notice', $notice);
    $smarty->display('notice.html');
    exit;
}
开发者ID:findlakes,项目名称:XSS-Platform,代码行数:11,代码来源:function.php


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