• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP FLEA类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: actionDeliveryDetailList

 function actionDeliveryDetailList()
 {
     //过滤语句
     $using = new class_using();
     $request = $using->safeUsing('request', 'controller:string,action:string');
     $this->_model =& FLEA::getSingleton('model_rep');
     //出货表
     $rep = $this->_model->find(array('ID' => $request['kcreport'], 'ID' => $request['actionDeliveryDetailList']));
     if ($rep) {
         $this->_model =& FLEA::getSingleton('model_grid');
         //表字段
         $grid = $this->_model->findAll(array('RepID' => $rep['ID']));
         //设置查询语句
         $dbo =& FLEA::getDBO();
         $this->sql = $rep['select FCustomerCode,FCustomerName,FDate,FSODate from v_delivery'];
         //查询条件-按日期查询
         ///此处可修改>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
         $cond = new class_conditions();
         $formdate = isset($request['formdate']) ? $request['formdate'] : date("Y-m-d");
         $todate = isset($request['todate']) ? $request['todate'] : date("Y-m-d");
         $FCustomer = isset($request['FCustomer']) ? trim($this->u2gbk($request['FCustomer'])) : null;
         $cond->between($formdate, $todate, 'FDate', 'D', 2);
         $cond->equal($FCustomer, 'FCustomerCode', 'S', ' and ');
         ///此处可修改<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
         //排序
         $order = new class_order($request);
         //获取当前页
         $page['cid'] = isset($request['pageNum']) && intval($request['pageNum']) > 0 ? intval($request['pageNum']) : 1;
         $page['size'] = isset($request['numPerPage']) && intval($request['numPerPage']) > 0 ? intval($request['numPerPage']) : 20;
         echo $this->sql;
         //获取SQL查询的全部记录
         $alldata = $dbo->getAll($this->sql . $cond->getWhere() . $order->getOrder());
         //获取SQL查询的记录总数
         $page['count'] = count($alldata);
         //$allFProfit =$this->_count($alldata,'FProfit');
         //$allFSaleAmount =$this->_count($alldata,'FSaleAmount');
         //记录偏移量
         $page['offset'] = ($page['cid'] - 1) * $page['size'] > $page['count'] ? $page['count'] : ($page['cid'] - 1) * $page['size'];
         $data = array_slice($alldata, $page['offset'], $page['size'], true);
         //处理查询结果
         if (isset($data)) {
             ///此处可修改>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
             $this->_smarty->assign('formdate', $formdate);
             $this->_smarty->assign('todate', $todate);
             $this->_smarty->assign('FCustomer', $FCustomer);
             ///此处可修改<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
             $this->_smarty->assign('orderField', $order->getField());
             $this->_smarty->assign('orderDirection', $order->getDirection());
             $this->_smarty->assign('page', $page);
             $this->_smarty->assign('data', $data);
             $this->_smarty->assign('grid', $grid);
             $this->_smarty->assign('alldata', $alldata);
             $this->_smarty->assign('allFProfit', $allFProfit);
             $this->_smarty->assign('allFSaleAmount', $allFSaleAmount);
             $this->_smarty->display('kc.DeliveryDetailList.htm');
         }
     } else {
         $this->_smarty->display('norepinfo.htm');
     }
 }
开发者ID:joaosigno,项目名称:dazake-job,代码行数:60,代码来源:kcreport.php


示例2: actionLogin

 /**
  * 登录
  */
 function actionLogin()
 {
     do {
         /**
          * 验证用户名和密码是否正确
          */
         $modelSysUsers =& FLEA::getSingleton('Model_SysUsers');
         $user = $modelSysUsers->findByUsername($_POST['username']);
         if (!$user) {
             $msg = _T('ui_l_invalid_username');
             break;
         }
         if (!$modelSysUsers->checkPassword($_POST['password'], $user['password'])) {
             $msg = _T('ui_l_invalid_password');
             break;
         }
         /**
          * 登录成功,通过 RBAC 保存用户信息和角色
          */
         $data = array();
         $data['ADMIN'] = $user['username'];
         $rbac =& FLEA::getSingleton('FLEA_Rbac');
         /* @var $rbac FLEA_Rbac */
         $rbac->setUser($data, array('SYSTERM_ADMIN'));
         //重定向
         redirect(url('ZobAdmin'));
     } while (false);
     //登录发生错误,再次显示登录界面
     $ui =& FLEA::initWebControls();
     include APP_DIR . '/ZobLoginIndex.php';
 }
开发者ID:TheProjecter,项目名称:teamweb,代码行数:34,代码来源:ZobLogin.php


示例3: ___uri_filter

/**
 * 根据应用程序设置 'urlMode' 分析 $_GET 参数
 *
 * 该函数由框架自动调用,应用程序不需要调用该函数。
 */
function ___uri_filter()
{
    static $firstTime = true;
    if (!$firstTime) {
        return;
    }
    $firstTime = false;
    $pathinfo = !empty($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : (!empty($_SERVER['ORIG_PATH_INFO']) ? $_SERVER['ORIG_PATH_INFO'] : '');
    $parts = explode('/', substr($pathinfo, 1));
    if (isset($parts[0]) && strlen($parts[0])) {
        $_GET[FLEA::getAppInf('controllerAccessor')] = $parts[0];
    }
    if (isset($parts[1]) && strlen($parts[1])) {
        $_GET[FLEA::getAppInf('actionAccessor')] = $parts[1];
    }
    $style = FLEA::getAppInf('urlParameterPairStyle');
    if ($style == '/') {
        for ($i = 2; $i < count($parts); $i += 2) {
            if (isset($parts[$i + 1])) {
                $_GET[$parts[$i]] = $parts[$i + 1];
            }
        }
    } else {
        for ($i = 2; $i < count($parts); $i++) {
            $p = $parts[$i];
            $arr = explode($style, $p);
            if (isset($arr[1])) {
                $_GET[$arr[0]] = $arr[1];
            }
        }
    }
    // 将 $_GET 合并到 $_REQUEST,
    // 有时需要使用 $_REQUEST 统一处理 url 中的 id=? 这样的参数
    $_REQUEST = array_merge($_REQUEST, $_GET);
}
开发者ID:uwitec,项目名称:01technology,代码行数:40,代码来源:Uri.php


示例4: actionDeliveryDetail

 function actionDeliveryDetail()
 {
     //过滤语句
     $using = new class_using();
     $request = $using->safeUsing('get', 'controller:string,action:string');
     //设置查询语句
     $dbo =& FLEA::getDBO();
     $this->sql = 'select FCustomerCode,FCustomerName,FDate,FAmount,FAllAmount from v_delivery';
     //查询条件-按日期查询
     $cond = new class_conditions();
     $formdate = isset($request['formdate']) ? $request['formdate'] : date("Y-m-d");
     $todate = isset($request['todate']) ? $request['todate'] : date("Y-m-d");
     $FCustomer = isset($request['FCustomer']) ? trim(rawurldecode($request['FCustomer'])) : null;
     $cond->equal($FCustomer, 'FCustomerCode', 'S', ' and ');
     $cond->between($formdate, $todate, 'fdate', 'D', 2);
     //排序
     $order = new class_order($request);
     //获取SQL查询的全部记录
     $alldata = $dbo->getAll($this->sql . $cond->getWhere() . $order->getOrder());
     $xls = new class_excel();
     $xls->addArray($this->gethead($alldata));
     $xls->addArray($this->getdata($alldata));
     $xls->addArray($this->getfoot($alldata));
     $xls->generateXML("DeliveryDetail");
 }
开发者ID:joaosigno,项目名称:dazake-job,代码行数:25,代码来源:kcexcel.php


示例5: actionSidebar

 /**
  * 显示左侧菜单
  */
 function actionSidebar()
 {
     // 首先定义菜单
     $catalog = FLEA::loadFile('Config_Menu.php');
     // 借助 FLEA_Dispatcher_Auth 对用户角色和控制器 ACT 进行验证
     $dispatcher =& $this->_getDispatcher();
     include APP_DIR . '/ZobSidebar.php';
 }
开发者ID:TheProjecter,项目名称:teamweb,代码行数:11,代码来源:ZobAdmin.php


示例6: __error_dump_trace

/**
 * 显示异常信息及调用堆栈
 *
 * @param FLEA_Exception $ex
 */
function __error_dump_trace($ex)
{
    echo '<strong>Exception: </strong>' . get_class($ex) . "<br />\n";
    if ($ex->getMessage() != '') {
        echo '<strong>Message: </strong>' . $ex->getMessage() . "<br />\n";
    }
    echo "<br />\n";
    if (!FLEA::getAppInf('displaySource')) {
        return;
    }
    $trace = $ex->getTrace();
    $ix = count($trace);
    foreach ($trace as $point) {
        $file = isset($point['file']) ? $point['file'] : null;
        $line = isset($point['line']) ? $point['line'] : null;
        $id = md5("{$file}({$line})");
        $function = isset($point['class']) ? "{$point['class']}::{$point['function']}" : $point['function'];
        $args = array();
        if (is_array($point['args']) && count($point['args']) > 0) {
            foreach ($point['args'] as $arg) {
                switch (gettype($arg)) {
                    case 'array':
                        $args[] = 'array(' . count($arg) . ')';
                        break;
                    case 'resource':
                        $args[] = gettype($arg);
                        break;
                    case 'object':
                        $args[] = get_class($arg);
                        break;
                    case 'string':
                        if (strlen($arg) > 30) {
                            $arg = substr($arg, 0, 27) . ' ...';
                        }
                        $args[] = "'{$arg}'";
                        break;
                    default:
                        $args[] = $arg;
                }
            }
        }
        $args = implode(", ", $args);
        echo <<<EOT
<hr />
<strong>Filename:</strong> <a href="javascript:switch_filedesc('{$id}');">{$file} [{$line}]</a><br />
#{$ix} {$function}({$args})
<div id="{$id}" class="filedesc" style="display: none;">
ARGS:
EOT;
        dump($point['args']);
        echo "SOURCE CODE: <br />\n";
        echo __error_show_source($file, $line);
        echo "\n</div>\n";
        echo "<br />\n";
        $ix--;
    }
}
开发者ID:uwitec,项目名称:01technology,代码行数:62,代码来源:header.php


示例7: socketconn

 public function socketconn($ip, $port)
 {
     $_G = FLEA::getSingleton("Util_Msg");
     $this->socket = @fsockopen($ip, $port, $errNo, $errstr, 30);
     if (!$this->socket) {
         $_G->customshow("建立Socket连接失败", "socket", "Index", 3, 0);
         exit;
     }
 }
开发者ID:BGCX261,项目名称:zlskytakeorder-svn-to-git,代码行数:9,代码来源:socketclient.php


示例8: Controller_Default

 /**
  * 构造函数
  *
  * @return Controller_Default
  */
 function Controller_Default()
 {
     /**
      * FLEA::getSingleton() 会自动载入指定类的定义文件,并且返回该类的唯一一个实例
      */
     $this->_metas =& FLEA::getAppInf('metas');
     $this->_modelNews =& FLEA::getSingleton('Model_News');
     $this->_modelMessage =& FLEA::getSingleton('Model_Message');
     $this->_modelGoods =& FLEA::getSingleton('Model_Goods');
 }
开发者ID:uwitec,项目名称:01technology,代码行数:15,代码来源:Default.php


示例9: actionlookup

 function actionlookup()
 {
     $this->_model =& FLEA::getSingleton('model_depart');
     $departs = $this->_model->findAll();
     //通用生成树函数
     //@param:$arrs 树结构数组
     //@param:$keyparam  显示的字段 例如:array('code','name') ,节点将显示“ 编码-名称” 形式
     //@param:$$outparam 双击节点带回数值的字段
     function maketree($arrs, $keyparam, $outparam)
     {
         if (isset($arrs) && is_array($arrs)) {
             foreach ($arrs as $arr) {
                 echo '<li>';
                 echo '<a ';
                 if (isset($outparam) && is_array($outparam)) {
                     echo 'ondblclick=\'javascript:$.bringBack({';
                     for ($i = 0; $i < count($outparam); $i++) {
                         if ($i > 0) {
                             echo ',';
                         }
                         echo $outparam[$i] . ':"' . $arr[$outparam[$i]] . '"';
                     }
                     echo '})\' title="双击选中" ';
                 }
                 echo '>';
                 if (isset($keyparam) && is_array($keyparam)) {
                     for ($i = 0; $i < count($keyparam); $i++) {
                         if ($i > 0) {
                             echo '-';
                         }
                         echo $arr[$keyparam[$i]];
                     }
                 }
                 echo '</a>';
                 if (isset($arr['child'])) {
                     echo '<ul>';
                     maketree($arr['child'], $keyparam, $outparam);
                     echo '</ul>';
                 }
                 echo '</li>';
             }
         }
     }
     if (isset($departs)) {
         //生成部门树结构
         $tree = new class_tree($departs);
         $departs = $tree->leaf(0);
         //设置参数
         $this->_smarty->assign('arrs', $departs);
         $this->_smarty->assign('keyparam', array('code', 'name'));
         $this->_smarty->assign('outparam', array('id', 'code', 'name'));
         $this->_smarty->display('departlookup.htm');
     }
 }
开发者ID:joaosigno,项目名称:dazake-job,代码行数:54,代码来源:depart.php


示例10: Controller_About

 /**
  * 构造函数
  *
  * @return Controller_Default
  */
 function Controller_About()
 {
     /**
      * FLEA::getSingleton() 会自动载入指定类的定义文件,并且返回该类的唯一一个实例
      */
     //$this->_modelAbout =& FLEA::getSingleton('Model_About');
     $this->_metas =& FLEA::getAppInf('metas');
     //$this->_metas['description'] = "辽宁万维医药有限公司关于万维";
     //$this->_metas['keywords'] = "辽宁万维医药,辽宁,吉林省,黑龙江省,关于万维";
     //$this->_metas['title'] = $this->_metas['title'] . "关于万维";
 }
开发者ID:uwitec,项目名称:01technology,代码行数:16,代码来源:About.php


示例11: Controller_News

 /**
  * 构造函数
  *
  * @return Controller_Default
  */
 function Controller_News()
 {
     /**
      * FLEA::getSingleton() 会自动载入指定类的定义文件,并且返回该类的唯一一个实例
      */
     $this->_modelNews =& FLEA::getSingleton('Model_News');
     $this->_metas =& FLEA::getAppInf('metas');
     $this->_metas['description'] = "辽宁万维医药有限公司新闻中心";
     $this->_metas['keywords'] = "辽宁万维医药,辽宁,吉林省,黑龙江省,医药新闻";
     $this->_metas['title'] = $this->_metas['title'] . "新闻中心";
 }
开发者ID:uwitec,项目名称:01technology,代码行数:16,代码来源:News.php


示例12: actionIndex

 /**
  * 列出所有的成员
  */
 function actionIndex()
 {
     $page = isset($_GET['page']) ? (int) $_GET['page'] : 0;
     FLEA::loadClass('FLEA_Helper_Pager');
     $table =& $this->_modelMembers->getTable();
     $pager =& new FLEA_Helper_Pager($table, $page, 20, '', 'member_id');
     $pk = $table->primaryKey;
     $rowset = $pager->findAll();
     $this->_setBack();
     include APP_DIR . '/ZobMembersList.php';
 }
开发者ID:TheProjecter,项目名称:teamweb,代码行数:14,代码来源:ZobMember.php


示例13: Controller_Products

 /**
  * 构造函数
  *
  * @return Controller_Default
  */
 function Controller_Products()
 {
     /**
      * FLEA::getSingleton() 会自动载入指定类的定义文件,并且返回该类的唯一一个实例
      */
     $this->_modelGoods =& FLEA::getSingleton('Model_Goods');
     $this->_metas =& FLEA::getAppInf('metas');
     $this->_metas['description'] = "辽宁万维医药经销渠道产品世界";
     $this->_metas['keywords'] = "辽宁万维医药,辽宁,吉林省,黑龙江省,医药产品,思清,柴芩清宁胶囊";
     $this->_metas['title'] = $this->_metas['title'] . "产品世界";
 }
开发者ID:uwitec,项目名称:01technology,代码行数:16,代码来源:Products.php


示例14: Controller_Feedback

 /**
  * 构造函数
  *
  * @return Controller_Default
  */
 function Controller_Feedback()
 {
     /**
      * FLEA::getSingleton() 会自动载入指定类的定义文件,并且返回该类的唯一一个实例
      */
     $this->_modelMessage =& FLEA::getSingleton('Model_Message');
     $this->_metas =& FLEA::getAppInf('metas');
     $this->_metas['description'] = "辽宁万维医药经销渠道客户回馈";
     $this->_metas['keywords'] = "辽宁万维医药,辽宁,吉林省,黑龙江省,医药客户回馈";
     $this->_metas['title'] = $this->_metas['title'] . "客户回馈";
 }
开发者ID:uwitec,项目名称:01technology,代码行数:16,代码来源:Feedback.php


示例15: setNav

 protected function setNav($aNav)
 {
     if (!is_array($aNav)) {
         $aNav = array($aNav);
     }
     $sessionKey = FLEA::getAppInf('RBACSessionKey');
     $username = $_SESSION[$sessionKey]['USERNAME'];
     $sNav = implode(" <span style='color:#FF0000;'>>></span> ", $aNav);
     $this->_V->assign("username", $username);
     $this->_V->assign("sNav", $sNav);
 }
开发者ID:BGCX261,项目名称:zlskytakeorder-svn-to-git,代码行数:11,代码来源:Core.php


示例16: removePost

 /**
  * 删除指定的贴吧信息
  *
  * @param int $postId
  *
  * @return boolean
  */
 function removePost($postId)
 {
     $postId = (int) $postId;
     $post = $this->_tbPosts->find($postId);
     if (!$post) {
         FLEA::loadClass('Exception_DataNotFound');
         __THROW(new Exception_DataNotFound($postId));
         return false;
     }
     return $this->_tbPosts->removeByPkv($postId);
 }
开发者ID:TheProjecter,项目名称:teamweb,代码行数:18,代码来源:Posts.php


示例17: Controller_ZobBase

 /**
  * 构造函数
  *
  * 负责根据用户的 session 设置载入语言文件
  *
  * @return Controller_OfficeBase
  */
 function Controller_ZobBase()
 {
     if (isset($_SESSION['LANG'])) {
         $lang = $_SESSION['LANG'];
         $languages = FLEA::getAppInf('languages');
         if (in_array($lang, $languages, true)) {
             FLEA::setAppInf('defaultLanguage', $lang);
         }
     }
     load_language('ui, exception');
 }
开发者ID:TheProjecter,项目名称:teamweb,代码行数:18,代码来源:ZobBase.php


示例18: Controller_Distribution

 /**
  * 构造函数
  *
  * @return Controller_Default
  */
 function Controller_Distribution()
 {
     /**
      * FLEA::getSingleton() 会自动载入指定类的定义文件,并且返回该类的唯一一个实例
      */
     //$this->_modelAbout =& FLEA::getSingleton('Model_Message');
     $this->_metas =& FLEA::getAppInf('metas');
     $this->_metas = FLEA::getAppInf('metas');
     $this->_metas['description'] = "辽宁万维医药经销渠道面向东三省招商";
     $this->_metas['keywords'] = "辽宁万维医药,辽宁,吉林省,黑龙江省,招商";
     $this->_metas['title'] = $this->_metas['title'] . "经销网络";
 }
开发者ID:uwitec,项目名称:01technology,代码行数:17,代码来源:Distribution.php


示例19: onAuthFailedCallback

/**
 * 权限认证失败时的错误处理
 *
 */
function onAuthFailedCallback($controller, $action)
{
    $sessionKey = FLEA::getAppInf('RBACSessionKey');
    $username = $_SESSION[$sessionKey]['USERNAME'];
    if (empty($username)) {
        $rurl = url('Default', 'Index');
        echo "<script language='javascript'>window.top.location.href='" . $rurl . "'</script>";
        // redirect(url('Default', 'Index'));
    } else {
        echo "你没有访问控制器" . $controller . "中" . $action . "方法的权限";
    }
}
开发者ID:BGCX261,项目名称:zlskytakeorder-svn-to-git,代码行数:16,代码来源:index.php


示例20: FLEA_View_SmartTemplate

 /**
  * 构造函数
  *
  * @return FLEA_View_SmartTemplate
  */
 function FLEA_View_SmartTemplate()
 {
     parent::SmartTemplate();
     $viewConfig = FLEA::getAppInf('viewConfig');
     if (is_array($viewConfig)) {
         foreach ($viewConfig as $key => $value) {
             if (isset($this->{$key})) {
                 $this->{$key} = $value;
             }
         }
     }
 }
开发者ID:uwitec,项目名称:01technology,代码行数:17,代码来源:SmartTemplate.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP FLEXIUtilities类代码示例发布时间:2022-05-23
下一篇:
PHP FLBuilderModule类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap