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


PHP Import::C方法代码示例

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


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

示例1: error

 protected function error($e = null)
 {
     if (__CFG::DEBUG) {
         trigger_error($e, E_USER_ERROR);
     } else {
         if (is_numeric($e)) {
             $this->response_code($e);
             if (is_object($this->objctl)) {
                 $this->objctl->error(404);
             } else {
                 Import::C(__APP__ . ':index');
                 $objctl = new Ctl_Index($this);
                 $objctl->error(404);
             }
         }
     }
 }
开发者ID:a195474368,项目名称:ejiawang,代码行数:17,代码来源:index.php

示例2: index

<?php

Import::C('ucenter/ucenter');
class Ctl_Ucenter_Diary extends Ctl_Ucenter
{
    protected $_diary_allower_fields = 'title,home_id,face_pic,company_id,type_id,way_id,total_price,start_date,end_date';
    protected $_diary_detail_allower_fields = '';
    public function index()
    {
        $filter = $pager = array();
        $pager['page'] = max(intval($page), 1);
        $pager['limit'] = $limit = 10;
        $filter['uid'] = $this->uid;
        if ($items = K::M('diary/diary')->items($filter, null, $page, $limit, $count)) {
            foreach ($items as $k => $v) {
                if ($v['home_id']) {
                    $home_ids[$v['home_id']] = $v['home_id'];
                }
                if ($v['company_id']) {
                    $company_ids[$v['company_id']] = $v['company_id'];
                }
                $items[$k]['create_ip'] = $v['create_ip'] . '(' . K::M("misc/location")->location($v['create_ip']) . ')';
            }
            if (!empty($home_ids)) {
                $this->pagedata['home_list'] = K::M('home/main')->items_by_ids($home_ids);
            }
            if (!empty($company_ids)) {
                $this->pagedata['company_list'] = K::M('company/company')->items_by_ids($company_ids);
            }
            $pager['count'] = $count;
            $pager['pagebar'] = $this->mkpage($count, $limit, $page, $this->mklink(null, array('{page}'), array(), true), array());
开发者ID:a195474368,项目名称:ejiawang,代码行数:31,代码来源:diary.ctl.php

示例3: index

<?php

/**
 * Copy Right Anuike.com
 * Each engineer has a duty to keep the code elegant
 * Author @shzhrui<Anhuike@gmail.com>
 * $Id: news.ctl.php 2772 2014-01-06 02:45:07Z youyi $
 */
Import::C('mall/shop');
class Ctl_Mall_News extends Ctl_Mall_Shop
{
    public function index()
    {
    }
    public function detail($news_id = null)
    {
        if (!($news_id = (int) $news_id)) {
            $this->error(404);
        } else {
            if (!($detail = K::M('shop/news')->detail($news_id))) {
                $this->error(404);
            } else {
                if (empty($detail['audit'])) {
                    $this->err->add('内容还在审核中', 211);
                } else {
                    $shop = $this->check_shop($detail['shop_id']);
                    if ($next = K::M('shop/news')->items(array('shop_id' => $detail['shop_id'], 'news_id' => '>:' . $news_id), array('news_id' => 'ASC'), 1, 1)) {
                        $pager['next'] = $next;
                    }
                    if ($next = K::M('shop/news')->items(array('shop_id' => $detail['shop_id'], 'news_id' => '<:' . $news_id), array('news_id' => 'DESC'), 1, 1)) {
                        $pager['next'] = $next;
开发者ID:a195474368,项目名称:ejiawang,代码行数:31,代码来源:news.ctl.php


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