當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。