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


PHP FLEA::loadHelper方法代码示例

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


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

示例1: actionIndex

 function actionIndex()
 {
     // 菜单栏:显示
     $this->_V->assign("_op", true);
     // 模式:列表 + 搜索页
     $this->_V->assign("_ds", true);
     $this->_V->assign("_sp", "user_search.htm");
     // 链接:添加
     $this->_V->assign("_addurl", url("User", "Add"));
     // 删除表单:提交地址
     $this->_V->assign("_delurl", url("User", "Delete"));
     // 内容:导航条
     $this->_V->assign("_CurrentlyPlace", $this->_N->genNav());
     // 权限:需要判断
     $this->_V->assign("_rights", $this->_N->judgeRight(array("add" => 'User_Add', "delete" => "User_Delete", "mod" => "User_Modify")));
     // 内容:主页面
     $this->_V->assign("_MainFile", "user_list.htm");
     # 部门数组
     $soms = $this->_O->findAll();
     $aSom = array();
     for ($i = 0; $i < count($soms); $i++) {
         $aSom[$soms[$i]['org_id']] = $soms[$i]['name'];
     }
     $this->_V->assign("soms", $aSom);
     $w = " username!='admin'";
     if ($_POST['searchString'] != "") {
         $w = empty($w) ? "" : $w . " and ";
         $w .= " username LIKE '%" . $_POST['searchString'] . "%' or tname LIKE '%" . $_POST['searchString'] . "%'";
     }
     if ($_POST['org_id'] != "-1" and $_POST['org_id'] != '') {
         $w = empty($w) ? "" : $w . " and ";
         $w .= " org_id = '" . $_POST['org_id'] . "'";
         $org_id = $_POST['org_id'];
     } else {
         $org_id = '-1';
     }
     $this->_V->assign('org_id', $org_id);
     $param = isset($_GET['param']) ? $_GET['param'] : $w;
     $this->_V->assign('param', $param);
     // 分页开始
     FLEA::loadHelper('pager');
     $currentPage = isset($_GET['page']) ? $_GET['page'] : 0;
     $pager = new FLEA_Helper_Pager($this->_M, $currentPage, PAGESIZE, $param, 'user_id DESC');
     $pagerData = $pager->getPagerData();
     $plist = $pager->findAll();
     if (count($plist) > 0) {
         for ($i = 0; $i < count($plist); $i++) {
             //echo $plist[$i]['Updated'];
             // $plist[$i]['created_d'] = date("Y年n月d日",$plist[$i]['Created']);
             $plist[$i]['updated_d'] = date("Y年n月d日", $plist[$i]['updated']);
             $plist[$i]['created_d'] = date("Y年n月d日", $plist[$i]['created']);
         }
     } else {
         $this->_V->assign("nodata", NODATA);
     }
     //dump($plist);
     $this->_V->assign('pagerData', $pagerData);
     $this->_V->assign("plist", $plist);
     $this->_V->display('sys_container.htm');
 }
开发者ID:BGCX261,项目名称:zlskytakeorder-svn-to-git,代码行数:60,代码来源:User.php

示例2: actionIndex

 public function actionIndex()
 {
     $w = "";
     $param = isset($_GET['param']) ? $_GET['param'] : $w;
     $this->_V->assign('param', $param);
     FLEA::loadHelper('pager');
     $currentPage = isset($_GET['page']) ? $_GET['page'] : 0;
     $pager = new FLEA_Helper_Pager($this->_M, $currentPage, 2, $param);
     $pagerData = $pager->getPagerData();
     $plist = $pager->findAll();
     if (count($plist) > 0) {
         $socket = FLEA::getSingleton('Util_socketclient');
         foreach ($plist as &$devinfo) {
             foreach ($devinfo['chninfo'] as &$chninfo) {
                 $chninfo['agcstat'] = $socket->ConversionLanguageChinese($chninfo['agcstat']);
                 $chninfo['mutestat'] = $socket->ConversionLanguageChinese($chninfo['mutestat']);
                 $chninfo['passstat'] = $socket->ConversionLanguageChinese($chninfo['passstat']);
             }
         }
     } else {
         $this->_V->assign('nodata', NODATA);
     }
     $chnselect = $this->M_chninfo->findAll('chn<>9 and prgname<>\'\'');
     $this->_V->assign('chnselect', $chnselect);
     $this->_V->assign('pagerData', $pagerData);
     $this->_V->assign('Datalist', $plist);
     $this->_V->assign('editview', url('socket', 'editview'));
     $this->_V->display('edit_index.htm');
 }
开发者ID:BGCX261,项目名称:zlskytakeorder-svn-to-git,代码行数:29,代码来源:edit.php

示例3: getUserWithPermissions

 /**
  * 获取指定用户,及其权限信息
  *
  * @param array $conditions
  */
 function getUserWithPermissions($conditions)
 {
     $tableUsers =& FLEA::getSingleton($this->_tableClass['users']);
     /* @var $tableUsers FLEA_Acl_Table_Users */
     $user = $tableUsers->find($conditions);
     if (empty($user)) {
         return false;
     }
     // 取得用户所在用户组的层次数据
     $tableUserGroups =& FLEA::getSingleton($this->_tableClass['userGroups']);
     /* @var $tableUserGroups FLEA_Acl_Table_UserGroups */
     $rowset = $tableUserGroups->getPath($user['group']);
     // 找出用户组的单一路径
     FLEA::loadHelper('array');
     $ret = array_to_tree($rowset, 'user_group_id', 'parent_id', 'subgroups', true);
     $tree =& $ret['tree'];
     $refs =& $ret['refs'];
     $groupid = $user['user_group_id'];
     $path = array();
     while (isset($refs[$groupid])) {
         array_unshift($path, $refs[$groupid]);
         $groupid = $refs[$groupid]['parent_id'];
     }
     // 整理角色信息
     $userRoles = array();
     foreach ($path as $group) {
         $roles = $group['roles'];
         foreach ($roles as $role) {
             $roleid = $role['role_id'];
             if ($role['_join_is_include']) {
                 $userRoles[$roleid] = array('role_id' => $roleid, 'name' => $role['name']);
             } else {
                 unset($userRoles[$roleid]);
             }
         }
     }
     foreach ((array) $user['roles'] as $role) {
         $roleid = $role['role_id'];
         if ($role['_join_is_include']) {
             $userRoles[$roleid] = array('role_id' => $roleid, 'name' => $role['name']);
         } else {
             unset($userRoles[$roleid]);
         }
     }
     // 整理权限信息
     $user['roles'] = $userRoles;
     return $user;
 }
开发者ID:uwitec,项目名称:01technology,代码行数:53,代码来源:Manager.php

示例4: actionIndex

 public function actionIndex()
 {
     // 菜单栏:显示
     $this->_V->assign("_op", true);
     // 模式:列表 + 搜索页
     $this->_V->assign("_ds", true);
     $this->_V->assign("_sp", "time_search.htm");
     // 链接:添加
     $this->_V->assign("_addurl", url("time", "Add"));
     // 删除表单:提交地址
     $this->_V->assign("_delurl", url("time", "Delete"));
     // 内容:导航条
     $this->_V->assign("_CurrentlyPlace", $this->_N->genNav('c=time&a=Index'));
     // 权限:需要判断
     $this->_V->assign("_rights", $this->_N->judgeRight(array("add" => 'time_Add', "delete" => "time_Delete", "mod" => "time_Modify")));
     // 内容:主页面
     $this->_V->assign("_MainFile", "time_list.htm");
     // 数据
     $w = "";
     if ($_POST['searchString'] != "") {
         $w = empty($w) ? "" : $w . " and ";
         $w .= "( prgname LIKE '%" . $_POST['searchString'] . "%' or schedule LIKE '%" . $_POST['searchString'] . "%' or schedule_desc LIKE '%" . $_POST['searchString'] . "%')";
     }
     $param = isset($_GET['param']) ? $_GET['param'] : $w;
     $this->_V->assign('param', $param);
     // 分页开始
     FLEA::loadHelper('pager');
     $currentPage = isset($_GET['page']) ? $_GET['page'] : 0;
     $pager = new FLEA_Helper_Pager($this->M_timeinfo, $currentPage, PAGESIZE, $param, 'serial asc');
     $pagerData = $pager->getPagerData();
     $plist = $pager->findAll();
     $chninfo = $this->M_chninfo->findall();
     $achninfo = array();
     for ($i = 0; $i < count($chninfo); $i++) {
         $achninfo[$chninfo[$i]['prgname']] = $chninfo[$i]['prgname'];
     }
     if (count($plist) > 0) {
         /*for($i=0;$i<count($plist);$i++)
           {
               $plist[$i]['prgname'] = $achninfo[$plist[$i]['serial']];
           }*/
     } else {
         $this->_V->assign("nodata", NODATA);
     }
     $this->_V->assign('pagerData', $pagerData);
     $this->_V->assign("plist", $plist);
     $this->_V->display('sys_container.htm');
 }
开发者ID:BGCX261,项目名称:zlskytakeorder-svn-to-git,代码行数:48,代码来源:time.php

示例5: actionIndex

 public function actionIndex()
 {
     // 菜单栏:显示
     $this->_V->assign("_op", true);
     // 模式:列表 + 搜索页
     $this->_V->assign("_ds", true);
     $this->_V->assign("_sp", "som_search.htm");
     // 链接:添加
     $this->_V->assign("_addurl", url("Som", "Add"));
     // 删除表单:提交地址
     $this->_V->assign("_delurl", url("Som", "Delete"));
     // 内容:导航条
     $this->_V->assign("_CurrentlyPlace", $this->_N->genNav());
     // 权限:需要判断
     $this->_V->assign("_rights", $this->_N->judgeRight(array("add" => 'Som_Add', "delete" => "Som_Delete", "mod" => "Som_Modify")));
     // 内容:主页面
     $this->_V->assign("_MainFile", "som_list.htm");
     // 数据
     $w = "";
     if ($_POST['searchString'] != "") {
         $w = empty($w) ? "" : $w . " and ";
         $w .= " name LIKE '%" . $_POST['searchString'] . "%'";
     }
     $param = isset($_GET['param']) ? $_GET['param'] : $w;
     $this->_V->assign('param', $param);
     // 分页开始
     FLEA::loadHelper('pager');
     $currentPage = isset($_GET['page']) ? $_GET['page'] : 0;
     $pager = new FLEA_Helper_Pager($this->_M, $currentPage, PAGESIZE, $param, 'org_id DESC');
     $pagerData = $pager->getPagerData();
     $plist = $pager->findAll();
     //dump($plist);
     if (count($plist) > 0) {
         for ($i = 0; $i < count($plist); $i++) {
             $plist[$i]['created_d'] = date("Y年n月d日", $plist[$i]['created']);
             $plist[$i]['updated_d'] = date("Y年n月d日", $plist[$i]['updated']);
         }
     } else {
         $this->_V->assign("nodata", NODATA);
     }
     $this->_V->assign('pagerData', $pagerData);
     $this->_V->assign("plist", $plist);
     $this->_V->display('sys_container.htm');
 }
开发者ID:BGCX261,项目名称:zlskytakeorder-svn-to-git,代码行数:44,代码来源:Som.php

示例6: array

require 'FLEA.php';
$dbDSN = array('driver' => 'mysqlt', 'host' => 'localhost', 'login' => 'root', 'password' => '', 'database' => 'test');
FLEA::setAppInf('dbDSN', $dbDSN);
FLEA::setAppInf('internalCacheDir', 'D:/temp');
$dbo =& FLEA::getDBO();
$dbo->startTrans();
/**
 * 建立全部需要的权限
 */
$tablePermissions =& FLEA::getSingleton('FLEA_Acl_Table_Permissions');
/* @var $tablePermissions FLEA_Acl_Table_Permissions */
$permissions = array(array('name' => '/Project/Create'), array('name' => '/Project/View'), array('name' => '/Project/Edit'), array('name' => '/Project/Delete'), array('name' => '/Bug/Create'), array('name' => '/Bug/View'), array('name' => '/Bug/Edit'), array('name' => '/Bug/AddComment'), array('name' => '/Bug/SetFixed'), array('name' => '/Bug/SetClosed'), array('name' => '/Bug/Delete'));
$tablePermissions->createRowset($permissions);
$permissions = $tablePermissions->findAll();
FLEA::loadHelper('array');
$permissions = array_to_hashmap($permissions, 'name');
/**
 * 建立角色,并将权限绑定到角色上
 */
$tableRoles =& FLEA::getSingleton('FLEA_Acl_Table_Roles');
/* @var $tableRoles FLEA_Acl_Table_Roles */
$role = array('name' => 'ProjectManager', 'permissions' => array($permissions['/Project/Create'], $permissions['/Project/View'], $permissions['/Project/Edit'], $permissions['/Project/Delete'], $permissions['/Bug/Delete']));
$tableRoles->create($role);
$role = array('name' => 'Developer', 'permissions' => array($permissions['/Project/View'], $permissions['/Bug/View'], $permissions['/Bug/AddComment'], $permissions['/Bug/SetFixed'], $permissions['/Bug/Delete']));
$tableRoles->create($role);
$role = array('name' => 'Tester', 'permissions' => array($permissions['/Project/Create'], $permissions['/Bug/Create'], $permissions['/Bug/Edit'], $permissions['/Bug/View'], $permissions['/Bug/AddComment'], $permissions['/Bug/SetClosed']));
$tableRoles->create($role);
/**
 * 读取所有角色信息,并以角色名为索引
 */
开发者ID:uwitec,项目名称:01technology,代码行数:30,代码来源:testCreateData.php

示例7: _createClassFile

 /**
  * 创建指定类的定义文件
  *
  * @param string $class
  * @param string $content
  */
 function _createClassFile($class, $content)
 {
     $dir = FLEA::getAppInfValue('scripts', 'appDir');
     $filename = str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php';
     $path = $dir . DIRECTORY_SEPARATOR . $filename;
     $dir = dirname($path);
     FLEA::loadHelper('file');
     mkdirs($dir);
     if (file_put_contents($path, $content)) {
         echo "Create file '{$path}' successed.\n";
         return true;
     }
     return false;
 }
开发者ID:uwitec,项目名称:01technology,代码行数:20,代码来源:Abstract.php

示例8: actionloglist

 public function actionloglist()
 {
     // 菜单栏:显示
     //        $this->_V->assign("_op",true);
     $this->_V->assign("_rights", $this->_N->judgeRight(array("delete" => "socket_logDelete", "logalldelete" => "socket_logalldelete", "sendlogcvs" => "socket_sendlogcvs")));
     //日志功能
     $this->_V->assign("_fu", TRUE);
     $this->_V->assign('_fun', 'log_function.htm');
     // 模式:列表 + 搜索页
     $this->_V->assign("_ds", TRUE);
     $this->_V->assign("_sp", "log_search.htm");
     // 链接:添加
     #$this->_V->assign("_addurl",url("socket","Add"));
     // 删除表单:提交地址
     $this->_V->assign("_delurl", url("socket", "logDelete"));
     // 内容:导航条
     $this->_V->assign("_CurrentlyPlace", $this->_N->genNav());
     // 内容:主页面
     $this->_V->assign("_MainFile", "log_list.htm");
     $log = FLEA::getSingleton('Model_operatorlog');
     $utilLog = FLEA::getSingleton('Util_log');
     $searchDate = $utilLog->searchDate();
     $this->_V->assign('searchTime', $searchDate);
     //如果超过一定数量的日志,将提示删除日志
     $lognum = $log->findCount();
     if ($lognum > LogMaxNum) {
         $this->_V->assign('log_warning', TRUE);
     }
     if (isset($_GET['param'])) {
         $key = explode('|', $_GET['param']);
         if ($key[0] != '' && $key[1] != '' && $key[2] != '' && $key[3] != '' && $key[4] != '' && $key[5] != '' && $key[6] != '') {
             $firstTime = $key[0] . '-' . $key[1] . '-' . $key[2];
             $lastTime = $key[3] . '-' . $key[4] . '-' . $key[5];
             $searchTime = $key[0] . '|' . $key[1] . '|' . $key[2] . '|' . $key[3] . '|' . $key[4] . '|' . $key[5];
             $this->_V->assign('startYear', $key[0]);
             $this->_V->assign('startMonth', $key[1]);
             $this->_V->assign('startDay', $key[2]);
             $this->_V->assign('endYear', $key[3]);
             $this->_V->assign('endMonth', $key[4]);
             $this->_V->assign('endDay', $key[5]);
         }
     } else {
         if ($_POST['startYear'] != '' && $_POST['startMonth'] != '' && $_POST['startDay'] != '' && $_POST['endYear'] != '' && $_POST['endMonth'] != '' && $_POST['endDay'] != '') {
             $firstTime = strtotime($_POST['startYear'] . '-' . $_POST['startMonth'] . '-' . $_POST['startDay']);
             $lastTime = strtotime($_POST['endYear'] . '-' . $_POST['endMonth'] . '-' . $_POST['endDay']);
             $searchTime = $_POST['startYear'] . '|' . $_POST['startMonth'] . '|' . $_POST['startDay'] . '|' . $_POST['endYear'] . '|' . $_POST['endMonth'] . '|' . $_POST['endDay'];
             $this->_V->assign('startYear', $_POST['startYear']);
             $this->_V->assign('startMonth', $_POST['startMonth']);
             $this->_V->assign('startDay', $_POST['startDay']);
             $this->_V->assign('endYear', $_POST['endYear']);
             $this->_V->assign('endMonth', $_POST['endMonth']);
             $this->_V->assign('endDay', $_POST['endDay']);
         }
     }
     // 数据
     $w = "";
     if ($firstTime != '' && $lastTime != '') {
         $w = empty($w) ? "" : $w . " and ";
         $w .= "(time BETWEEN {$firstTime} and {$lastTime})";
     }
     $param = isset($_GET['param']) ? $_GET['param'] : $searchTime;
     $this->_V->assign('param', $param);
     // 分页开始
     FLEA::loadHelper('pager');
     $currentPage = isset($_GET['page']) ? $_GET['page'] : 0;
     $pager = new FLEA_Helper_Pager($log, $currentPage, 12, $w, 'serial desc');
     $pagerData = $pager->getPagerData();
     $plist = $pager->findAll();
     if (count($plist) > 0) {
         foreach ($plist as &$list) {
             $list['run_type'] = $list['run_type'] ? '<font color="#666666">自动</font>' : '手动';
             $list['time'] = date('Y-m-d H:i:s', $list['time']);
         }
     } else {
         $this->_V->assign("nodata", NODATA);
     }
     $this->_V->assign('pagerData', $pagerData);
     $this->_V->assign("plist", $plist);
     $this->_V->display('sys_container.htm');
 }
开发者ID:BGCX261,项目名称:zlskytakeorder-svn-to-git,代码行数:80,代码来源:socket.php


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