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


PHP HC_App::app方法代码示例

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


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

示例1: _n

 static function _n($singular, $plural, $count)
 {
     if (function_exists('_n')) {
         $domain = HC_App::app();
         return _n($singular, $plural, $count, $domain);
     } else {
         $gettext_obj = hc_get_gettext();
         if ($gettext_obj === NULL) {
             return $plural;
         } else {
             return $gettext_obj->ngettext($singular, $plural, $count);
         }
     }
 }
开发者ID:kumarkvk,项目名称:vz_emp_shiftsSchedule,代码行数:14,代码来源:hc_lib.php

示例2: __construct

 function __construct()
 {
     parent::__construct();
     // if we need to simulate user - in WP shortcut page */
     $app = HC_App::app();
     if (isset($GLOBALS['NTS_CONFIG'][$app]['SIMULATE_USER_ID'])) {
         $acl = HC_App::acl();
         $simulate_id = $GLOBALS['NTS_CONFIG'][$app]['SIMULATE_USER_ID'];
         $auth_user = $this->auth->user();
         $acl_user = $this->auth->user($simulate_id);
         if ($auth_user->level >= $auth_user->_const('LEVEL_MANAGER')) {
             $acl->set_user($acl_user);
         }
     }
 }
开发者ID:RCMmedia,项目名称:rubicon,代码行数:15,代码来源:MY_Controller.php

示例3: _drop_tables

 protected function _drop_tables()
 {
     $this->db->reset_data_cache();
     $app = HC_App::app();
     $my_table_prefix = isset($GLOBALS['NTS_CONFIG'][$app]['DB_TABLES_PREFIX']) ? $GLOBALS['NTS_CONFIG'][$app]['DB_TABLES_PREFIX'] : NTS_DB_TABLES_PREFIX;
     $dbprefix_version = $this->config->item('nts_dbprefix_version');
     if ($dbprefix_version) {
         $my_table_prefix = $my_table_prefix . $dbprefix_version . '_';
     }
     $tables = array();
     $sth = $this->db->query("SHOW TABLES LIKE '" . $my_table_prefix . "%'");
     foreach ($sth->result_array() as $r) {
         reset($r);
         foreach ($r as $k => $v) {
             $tables[] = $v;
         }
     }
     reset($tables);
     foreach ($tables as $t) {
         $this->db->query("DROP TABLE " . $t . "");
     }
 }
开发者ID:RCMmedia,项目名称:rubicon,代码行数:22,代码来源:setup.php

示例4:

        $user_title .= $user->username;
    } else {
        $user_title .= $user->email;
    }
    $user_title .= ']';
    $link_profile = 'auth/profile';
    $nav->add_item(HC_Html_Factory::widget('titled', 'a')->add_attr('href', HC_Lib::link($link_profile))->add_child($user_title));
    $auth_user = $this->auth->user();
    $acl = HC_App::acl();
    $acl_user = $acl->user();
    $ri = HC_Lib::ri();
    if ($auth_user->id != $acl_user->id) {
        if ($ri == 'wordpress') {
            if ($auth_user->level >= $auth_user->_const('LEVEL_MANAGER')) {
                $nav->add_divider();
                $app = HC_App::app();
                $admin_url = get_admin_url() . 'admin.php?page=' . $app;
                $nav->add_item(HC_Html_Factory::widget('titled', 'a')->add_attr('href', $admin_url)->add_child(HC_Html::icon('cogs'))->add_child(HC_Html_Factory::element('span')->add_attr('class', 'hidden-xs')->add_child(HCM::__('Admin Area'))));
            }
        }
    }
    $nav->add_divider();
    $nav->add_item(HC_Html_Factory::widget('titled', 'a')->add_attr('href', HC_Lib::link('auth/logout'))->add_child(HC_Html_Factory::element('span')->add_attr('class', 'hidden-xs')->add_child(HCM::__('Log Out')))->add_child(HC_Html::icon('sign-out')));
} else {
    if ($this_method != 'login') {
        $nav->add_item(HC_Html_Factory::widget('titled', 'a')->add_attr('href', HC_Lib::link('auth/login'))->add_child(HC_Html::icon('sign-in'))->add_child(HC_Html_Factory::element('span')->add_attr('class', 'hidden-xs')->add_child(HCM::__('Log In'))));
    } else {
        $nav->add_item(HC_Html_Factory::widget('titled', 'a')->add_attr('href', HC_Lib::link())->add_child(HC_Html::icon('arrow-left'))->add_child(HCM::__('Back To Start Page')));
    }
}
$out->add_child($nav);
开发者ID:kumarkvk,项目名称:vz_emp_shiftsSchedule,代码行数:31,代码来源:profile.php


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