Esempio 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();
 }
Esempio n. 2
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();
Esempio n. 3
0
            $data .= "<td>" . iconv("GB2312", "utf-8", get_user_nickname_by_user_id($val['buyer_user_id'])) . "</td>";
            $data .= "<td>" . iconv("GB2312", "utf-8", POCO::singleton('pai_user_class')->get_phone_by_user_id($val['buyer_user_id'])) . "</td>";
            $data .= "</tr>";
        }
        unset($order_list);
        echo $data . "\t";
        unset($data);
        $page = $count * $i;
        $limit = "{$page},{$count}";
        $i++;
    }
    $data .= "</table>";
    exit;
}
/* 显示模板 */
$tpl->output();
/**
 * 订单列表
 * @param $input
 * @return array
 */
function yue_admin_task_get_order_list($input)
{
    global $task_order_obj;
    global $org_obj;
    global $order_status_config;
    global $login_user_id;
    $format_ret = yue_admin_task_format_order($input);
    $where = $format_ret['where'];
    $filter = $format_ret['filter'];
    if ($filter['sign_time_begin']) {