本文整理汇总了PHP中FLEA类的典型用法代码示例。如果您正苦于以下问题:PHP FLEA类的具体用法?PHP FLEA怎么用?PHP FLEA使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FLEA类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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');
}
}
示例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';
}
示例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);
}
示例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");
}
示例5: actionSidebar
/**
* 显示左侧菜单
*/
function actionSidebar()
{
// 首先定义菜单
$catalog = FLEA::loadFile('Config_Menu.php');
// 借助 FLEA_Dispatcher_Auth 对用户角色和控制器 ACT 进行验证
$dispatcher =& $this->_getDispatcher();
include APP_DIR . '/ZobSidebar.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--;
}
}
示例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;
}
}
示例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');
}
示例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');
}
}
示例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'] . "关于万维";
}
示例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'] . "新闻中心";
}
示例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';
}
示例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'] . "产品世界";
}
示例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'] . "客户回馈";
}
示例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);
}