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


PHP utils::c方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->title = '宅乐轩ERP管理系统';
     $this->style['css'][] = 'public/css/bootstrap.min.css';
     $this->style['css'][] = 'public/css/bootstrap-theme.min.css';
     $this->style['css'][] = 'public/css/admin/admin.css';
     $this->style['js'] = array('public/js/jquery.js', 'public/js/artDialog/jquery.artDialog.js?skin=default', 'public/js/comm.js');
     $this->style['js'][] = 'public/js/jquery.dragsort-0.5.2.min.js';
     $this->style['js'][] = 'public/js/bootstrap.min.js';
     $this->style['js'][] = 'public/js/admin/main.js';
     /*
      * 过滤后台有些可以不登录即可访问的action.如登录页面,退出页面等等。
      */
     $isAdminAuthorization = true;
     $adminFiltrateActionArr = utils::c('adminFiltrateAction');
     if ($adminFiltrateActionArr) {
         $adminFiltrateActionArrKey = array_keys($adminFiltrateActionArr);
         $controllerName = request::$controllerName;
         if (in_array($controllerName, $adminFiltrateActionArrKey)) {
             if (in_array(request::$actionName, $adminFiltrateActionArr[$controllerName])) {
                 $isAdminAuthorization = false;
             }
         }
     }
     if ($isAdminAuthorization) {
         $adminUserInfo = $this->checkAdminLogin();
         if (!$adminUserInfo) {
             $this->tip('你未登录EPR系统,请登录!', utils::getUrl('admin/index/login'));
         }
     }
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:32,代码来源:adminController.php

示例2: tip

 public function tip($title, $url = '', $timeout = 3)
 {
     if (!$url) {
         $url = utils::c('siteUrl');
     }
     $this->title = $title;
     $data = array('timeout' => $timeout, 'backurl' => $url);
     $this->setView($data, 'public/tip');
     exit;
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:10,代码来源:controller.php

示例3: __construct

 public function __construct($tableName)
 {
     $dbConfig = utils::c('db');
     $tableName = str_replace('Model', '', $tableName);
     $this->tableName = $dbConfig['tableFlx'] . $tableName;
     $this->tableName = strtolower($this->tableName);
     if (!$this->db) {
         $db = utils::getDB();
         $this->db = $db;
     }
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:11,代码来源:model.php

示例4: writeLogException

 public function writeLogException()
 {
     $exceptionInfo = parent::getTrace();
     $exceptionMessage = parent::getMessage();
     $content = date('Y-m-d H:i:s') . " 异常信息: " . $exceptionMessage . "\r\n";
     $content .= "文件--->  " . $exceptionInfo[0]['file'] . "\r\n";
     //产生异常的文件。
     $content .= "行号--->  " . $exceptionInfo[0]['line'] . "\r\n";
     //文件的第几行
     $content .= "类名--->  " . $exceptionInfo[0]['class'] . "\r\n";
     //类名称
     $content .= "方法名---> " . $exceptionInfo[0]['function'] . "\r\n方法参数--->";
     //方法名称
     foreach ($exceptionInfo[0]['args'] as $key => $val) {
         //方法的所有参数
         $valStr = json_encode($val);
         $content .= "(" . $key++ . "):" . $valStr . "   ";
     }
     $content .= "\r\n\r\n\r\n";
     FileUtil::appendContent(utils::c('log'), $content);
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:21,代码来源:myException.php

示例5: includeView

 public static function includeView($view)
 {
     $viewPath = utils::c('viewPath');
     $viewFile = $viewPath . $view . '.' . utils::c('fileFix');
     require $viewFile;
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:6,代码来源:view.php

示例6: orderWapPay

 public function orderWapPay($orderGlideId)
 {
     $orderPayGlideService = utils::getService('orderPayGlide');
     $orderGlideInfo = $orderPayGlideService->find($orderGlideId);
     $alipay_config = utils::c('aliwappay');
     $format = "xml";
     $v = "2.0";
     $req_id = date('Ymdhis');
     $notify_url = utils::c('siteUrl') . '/mobile/order/ali-pay-notify';
     $call_back_url = utils::c('siteUrl') . '/mobile/order/ali-pay-back';
     $merchant_url = utils::c('siteUrl') . '/mobile/order';
     $out_trade_no = $orderGlideInfo['glide_nums'];
     $subject = '宅配订单' . $orderGlideInfo['glide_nums'];
     $total_fee = $orderGlideInfo['total'];
     $req_data = '<direct_trade_create_req><notify_url>' . $notify_url . '</notify_url><call_back_url>' . $call_back_url . '</call_back_url><seller_account_name>' . trim($alipay_config['seller_email']) . '</seller_account_name><out_trade_no>' . $out_trade_no . '</out_trade_no><subject>' . $subject . '</subject><total_fee>' . $total_fee . '</total_fee><merchant_url>' . $merchant_url . '</merchant_url></direct_trade_create_req>';
     $para_token = array("service" => "alipay.wap.trade.create.direct", "partner" => trim($alipay_config['partner']), "sec_id" => trim($alipay_config['sign_type']), "format" => $format, "v" => $v, "req_id" => $req_id, "req_data" => $req_data, "_input_charset" => trim(strtolower($alipay_config['input_charset'])));
     $alipaySubmit = new AlipaySubmit($alipay_config);
     $html_text = $alipaySubmit->buildRequestHttp($para_token);
     $html_text = urldecode($html_text);
     $para_html_text = $alipaySubmit->parseResponse($html_text);
     $request_token = $para_html_text['request_token'];
     $req_data = '<auth_and_execute_req><request_token>' . $request_token . '</request_token></auth_and_execute_req>';
     $parameter = array("service" => "alipay.wap.auth.authAndExecute", "partner" => trim($alipay_config['partner']), "sec_id" => trim($alipay_config['sign_type']), "format" => $format, "v" => $v, "req_id" => $req_id, "req_data" => $req_data, "_input_charset" => trim(strtolower($alipay_config['input_charset'])));
     $alipaySubmit = new AlipaySubmit($alipay_config);
     $htmlText = $alipaySubmit->buildRequestForm($parameter, 'get', '支付宝支付');
     return $htmlText;
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:27,代码来源:orderService.php

示例7: createHomeMenuUrl

 public function createHomeMenuUrl($homeMenuInfo)
 {
     return utils::c('siteUrl') . $homeMenuInfo['url'];
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:4,代码来源:homeMenuService.php

示例8: getTableName

 public static function getTableName($tableName)
 {
     $tableName = strtolower($tableName);
     $dbConfig = utils::c('db');
     return $dbConfig['tableFlx'] . $tableName;
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:6,代码来源:utils.php

示例9: foreach

foreach ($style['js'] as $jsInfo) {
    ?>
        <script type="text/javascript" src="<?php 
    echo utils::getUrl() . $jsInfo;
    ?>
"></script>
    <?php 
}
?>
    <script type="text/javascript">
        var sessionId = '<?php 
echo session_id();
?>
';
        var siteUrl = '<?php 
echo utils::c('siteUrl');
?>
';
        var uploadActionUrl = '/upload/index';
        var uploadSwf = '/Public/uploadify/uploadify.swf';
        var SITE_URL = '';
    </script>
</head>
<body class="content_body">
<div class="header_action">
    <?php 
if ($menuTitle && $actionMenu) {
    ?>
    <ul class="title_action">
        <li class="content_title">
            <?php 
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:31,代码来源:header.php

示例10: pathToController

 private static function pathToController($pathFileUrl)
 {
     $controllerName = 'index';
     $actionName = 'index';
     $param = array();
     $sitePathArr = explode('/', $pathFileUrl);
     $newPath = '';
     if ($sitePathArr) {
         foreach ($sitePathArr as $key => $val) {
             switch ($key) {
                 case 0:
                     $val = self::replaceName($val);
                     if (utils::c('newPath') && in_array($val, utils::c('newPath'))) {
                         $newPath = $val;
                     } else {
                         $controllerName = $val;
                     }
                     break;
                 case 1:
                     $val = self::replaceName($val);
                     if ($val) {
                         if ($newPath) {
                             $controllerName = $val;
                         } else {
                             $actionName = $val;
                         }
                     }
                     break;
                 case 2:
                     if ($newPath) {
                         $val = self::replaceName($val);
                         $actionName = $val;
                     } else {
                         $valArr = explode('?', $val);
                         $param[] = $valArr[0];
                     }
                     break;
                 default:
                     $valArr = explode('?', $val);
                     $param[] = $valArr[0];
                     break;
             }
         }
     }
     return array('controller' => $controllerName, 'action' => $actionName, 'newPath' => $newPath, 'param' => $param);
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:46,代码来源:request.php


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