當前位置: 首頁>>代碼示例>>PHP>>正文


PHP iPHP::warning方法代碼示例

本文整理匯總了PHP中iPHP::warning方法的典型用法代碼示例。如果您正苦於以下問題:PHP iPHP::warning方法的具體用法?PHP iPHP::warning怎麽用?PHP iPHP::warning使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在iPHP的用法示例。


在下文中一共展示了iPHP::warning方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: user_data

function user_data($vars = null)
{
    $vars['uid'] or iPHP::warning('iCMS:user:data 標簽出錯! 缺少"uid"屬性或"uid"值為空.');
    $uid = $vars['uid'];
    if ($uid == 'me') {
        $uid = 0;
        $auth = user::get_cookie();
        $auth && ($uid = user::$userid);
    }
    if (strpos($uid, ',') === false) {
        $user = (array) user::get($uid);
        if ($vars['data']) {
            $user += (array) user::data($uid);
        }
    } else {
        $uid_array = explode(',', $uid);
        foreach ($uid_array as $key => $value) {
            $user[$key] = (array) user::get($uid);
            if ($vars['data']) {
                $user[$key] += (array) user::data($uid);
            }
        }
    }
    return $user[0] === false ? false : (array) $user;
}
開發者ID:sunhk25,項目名稱:iCMS,代碼行數:25,代碼來源:user.func.php

示例2: marker_html

/**
 * @package iCMS
 * @copyright 2007-2010, iDreamSoft
 * @license http://www.idreamsoft.com iDreamSoft
 * @author coolmoo <idreamsoft@qq.com>
 * @$Id: push.tpl.php 1392 2013-05-20 12:28:08Z coolmoo $
 */
function marker_html($vars)
{
    $where_sql = "WHERE `status`='1'";
    $vars['key'] or iPHP::warning('iCMS&#x3a;marker&#x3a;html 標簽出錯! 缺少"key"屬性或"key"值為空.');
    if (isset($vars['cid']) && $vars['cid'] != '') {
        $where_sql .= " AND `cid`='{$vars['cid']}'";
    }
    if (isset($vars['pid']) && $vars['pid'] != '') {
        $where_sql .= " AND `pid`='{$vars['pid']}'";
    }
    if (isset($vars['key']) && $vars['key'] != '') {
        $where_sql .= " AND `key`='{$vars['key']}'";
    }
    if (isset($vars['id']) && $vars['id'] != '') {
        $where_sql .= " AND `id`='{$vars['id']}'";
    }
    $marker = iDB::row("SELECT * FROM `#iCMS@__marker` {$where_sql}", ARRAY_A);
    iPHP_SQL_DEBUG && iDB::debug(1);
    if ($marker) {
        echo $marker['data'];
    }
}
開發者ID:sunhk25,項目名稱:iCMS,代碼行數:29,代碼來源:marker.func.php

示例3: tpl_block_cache

 public static function tpl_block_cache($vars, $content, &$tpl)
 {
     $vars['id'] or iPHP::warning('cache 標簽出錯! 缺少"id"屬性或"id"值為空.');
     $cache_time = isset($vars['time']) ? (int) $vars['time'] : -1;
     $cache_name = iPHP_DEVICE . '/part/' . $vars['id'];
     $cache = iCache::get($cache_name);
     if (empty($cache)) {
         if ($content === null) {
             return false;
         }
         $cache = $content;
         iCache::set($cache_name, $content, $cache_time);
         unset($content);
     }
     if ($vars['assign']) {
         $tpl->assign($vars['assign'], $cache);
         return;
     }
     if ($content === null) {
         return $cache;
     }
     // return $cache;
 }
開發者ID:sunhk25,項目名稱:iCMS,代碼行數:23,代碼來源:iPHP.class.php

示例4: comment_form

function comment_form($vars)
{
    if (!iCMS::$hooks['enable_comment']) {
        iPHP::warning('此頁麵禁止調用 iCMS&#x3a;comment&#x3a;form 標簽!');
    }
    if ($vars['ref']) {
        $_vars = iCMS::app_ref($vars['ref']);
        unset($vars['ref']);
        $vars = array_merge($vars, $_vars);
    }
    $vars['iid'] or iPHP::warning('iCMS&#x3a;comment&#x3a;form 標簽出錯! 缺少"iid"屬性或"iid"值為空.');
    $vars['cid'] or iPHP::warning('iCMS&#x3a;comment&#x3a;form 標簽出錯! 缺少"cid"屬性或"cid"值為空.');
    $vars['appid'] or iPHP::warning('iCMS&#x3a;comment&#x3a;form 標簽出錯! 缺少"appid"屬性或"appid"值為空.');
    $vars['title'] or iPHP::warning('iCMS&#x3a;comment&#x3a;form 標簽出錯! 缺少"title"屬性或"title"值為空.');
    switch ($vars['display']) {
        case 'iframe':
            $tpl = 'form.iframe';
            $vars['do'] = 'form';
            break;
        default:
            isset($vars['_display']) && ($vars['display'] = $vars['_display']);
            $vars['param'] = array('suid' => $vars['suid'], 'iid' => $vars['iid'], 'cid' => $vars['cid'], 'appid' => $vars['appid'], 'title' => $vars['title']);
            $tpl = 'form.default';
            break;
    }
    unset($vars['method'], $vars['_display']);
    $vars['query'] = http_build_query($vars);
    iPHP::assign('comment_vars', $vars);
    echo iPHP::view('iCMS://comment/' . $tpl . '.htm');
}
開發者ID:World3D,項目名稱:iCMS,代碼行數:30,代碼來源:comment.func.php

示例5: article_data

function article_data($vars)
{
    $vars['aid'] or iPHP::warning('iCMS&#x3a;article&#x3a;data 標簽出錯! 缺少"aid"屬性或"aid"值為空.');
    $data = iDB::row("SELECT body,subtitle FROM `#iCMS@__article_data` WHERE aid='" . (int) $vars['aid'] . "' LIMIT 1;", ARRAY_A);
    if ($data['body']) {
        $articleApp = iPHP::app("article");
        $data['body'] = $articleApp->ubb($data['body']);
        if (strpos($data['body'], '#--iCMS.Markdown--#') !== false) {
            $data['body'] = iPHP::Markdown($data['body']);
        }
        $data['body'] = $articleApp->keywords($data['body']);
        $data['body'] = $articleApp->taoke($data['body']);
    }
    return $data;
}
開發者ID:Junred,項目名稱:iCMS,代碼行數:15,代碼來源:article.func.php


注:本文中的iPHP::warning方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。