Ejemplo n.º 1
0
 /**
  * 渲染模板输出
  * @access public
  * @param string $templateFile 模板文件名
  * @param array $var 模板变量
  * @return void
  */
 public function fetch($templateFile, $var)
 {
     $templateFile = substr($templateFile, strlen(THEME_PATH));
     vendor('SmartTemplate.class#smarttemplate');
     $tpl = new \SmartTemplate($templateFile);
     $tpl->caching = C('TMPL_CACHE_ON');
     $tpl->template_dir = THEME_PATH;
     $tpl->compile_dir = CACHE_PATH;
     $tpl->cache_dir = TEMP_PATH;
     if (C('TMPL_ENGINE_CONFIG')) {
         $config = C('TMPL_ENGINE_CONFIG');
         foreach ($config as $key => $val) {
             $tpl->{$key} = $val;
         }
     }
     $tpl->assign($var);
     $tpl->output();
 }
Ejemplo n.º 2
0
 /**
  * 构造函数
  *
  * @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;
             }
         }
     }
 }
Ejemplo n.º 3
0
}
closedir($handle);
if (is_array($folderList)) {
    $folderList = arrayorder($folderList, 'file');
}
if (is_array($fileList)) {
    $fileList = arrayorder($fileList, 'file');
}
$allList = array_merge($folderList, $fileList);
$childDir = str_replace(realpath($rootPath), '', $currentDir);
if ($childDir[0] == '/' or $childDir[0] == '\\') {
    $childDir = substr($childDir, 1);
}
$i = 0;
foreach ($allList as $val) {
    $list['list'][$i]['sub'] = $val['sub'];
    $list['list'][$i]['date'] = $val['date'];
    $list['list'][$i]['size'] = $val['size'];
    $list['list'][$i]['mode'] = $val['mode'];
    ++$i;
}
if ($childDir == '') {
    $childDir = '根目录';
}
chdir($baseRoot);
$tp = new SmartTemplate();
$tp->set_templatefile('templates/dir_list.html');
$tp->assign($list);
$tp->assign('path', rawurlencode($currentDir));
$tp->assign('childDir', addslashes($childDir));
$tp->output();
Ejemplo n.º 4
0
    if (isset($order_detail['activity_list'][0]['service_start_time'])) {
        $order_detail['activity_list'][0]['service_start_time'] = date('Y-m-d H:i:s', $order_detail['activity_list'][0]['service_start_time']);
        $order_detail['activity_list'][0]['service_end_time'] = date('Y-m-d H:i:s', $order_detail['activity_list'][0]['service_end_time']);
    }
    // 以下获取操作记录资料
    $task_log_obj = POCO::singleton('pai_task_admin_log_class');
    $data['action_type'] = 4;
    $data['action_id'] = $order_id;
    $log_list = $task_log_obj->get_log_by_type($data);
    if ($log_list) {
        foreach ($log_list as $key => $val) {
            $log_list[$key]['add_time'] = date('Y-m-d H:i:s', $val['add_time']);
            $log_list[$key]['user_name'] = get_user_nickname_by_user_id($val['admin_id']);
        }
    }
    $tpl = new SmartTemplate(TASK_TEMPLATES_ROOT . "order_detail.tpl.htm");
    $tpl->assign('detail', $order_detail);
    $tpl->assign('log_list', $log_list);
} elseif ($action == 'query') {
} elseif ($action == 'export_order') {
    $format_ret = yue_admin_task_format_order($_INPUT);
    $where = $format_ret['where'];
    $filter = $format_ret['filter'];
    ini_set("memory_limit", "512M");
    $head_arr = array('序号', '订单ID', '订单号', '订单状态', '订单备注', '购买数量', '订单来源', '是否付款', '实付价格', '订单总价', '下单时间', '付款时间', '取消时间', '接受时间', '签到时间', '签到人', '是否优惠', '优惠金额', '优惠名称', '优惠代码', '到场人数', '服务地址', '服务时间', '商品ID', '商品名称', '所属分类', '扩展分类', '商品价格', '商家ID', '商家昵称', '所属机构', '机构名称', '管理员ID', '商家手机号码', '买家ID', '买家昵称', '买家手机号码');
    $fileName = "订单";
    $title = "订单列表";
    if ($filter['goods_id'] > 0) {
        $list = $task_order_obj->get_order_list_by_goods_ids($filter['type_id'], $filter['status'], array($filter['goods_id']), false, $where, 'order_id', '0,4000');
    } else {
        $list = $task_order_obj->get_order_full_list($filter['type_id'], $filter['status'], false, $where, 'order_id desc', '0, 4000');
Ejemplo n.º 5
0
}
header('Content-Type: text/html; charset=UTF-8');
$NEATIsLogin = '******';
$NEATUsername = $_COOKIE[COOKIE_PREFIX . 'neatusername'];
$NEATPassword = $_COOKIE[COOKIE_PREFIX . 'neatpassword'];
if ($NEATUsername == NEAT_USERNAME and $NEATPassword == md5(NEAT_PASSWORD)) {
    $NEATIsLogin = '******';
}
if ($NEATIsLogin != 'yes' and trim($_GET['module']) != 'login') {
    header('Location: ?module=login');
}
if (DEBUG == 0) {
    error_reporting(0);
}
$startTimes = utime();
$tp = new SmartTemplate();
$MetaSetting = '<meta asdfasdf><META HTTP-EQUIV="content-type" CONTENT="text/html; CHARSET=utf-8" />';
$_GET['module'] ? $moduleName = $_GET['module'] : ($moduleName = 'listRules');
if ($modulesMap[$moduleName]) {
    $tpShowBody = true;
    include_once 'modules/' . $modulesMap[$moduleName] . '.php';
    if ($tpShowBody) {
        $tp->set_templatefile('templates/body.html');
        $tp->assign('body_title', $moduleTitle);
        $tp->assign('body_contents', $moduleTemplate);
        $tp->assign('meta_setting', $MetaSetting);
        $tp->output();
    }
} else {
    header('Location: index.php');
    exit;