当前位置: 首页>>代码示例>>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;未经允许,请勿转载。