本文整理匯總了PHP中Tpl::output方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tpl::output方法的具體用法?PHP Tpl::output怎麽用?PHP Tpl::output使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tpl
的用法示例。
在下文中一共展示了Tpl::output方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: pic_cutOp
/**
* 圖片裁剪
*
*/
public function pic_cutOp()
{
Uk86Language::uk86_read('admin_common');
$lang = Uk86Language::uk86_getLangContent();
uk86_import('function.thumb');
if (uk86_chksubmit()) {
$thumb_width = $_POST['x'];
$x1 = $_POST["x1"];
$y1 = $_POST["y1"];
$x2 = $_POST["x2"];
$y2 = $_POST["y2"];
$w = $_POST["w"];
$h = $_POST["h"];
$scale = $thumb_width / $w;
$src = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_POST['url']);
if (strpos($src, '..') !== false || strpos($src, BASE_UPLOAD_PATH) !== 0) {
exit;
}
if (!empty($_POST['filename'])) {
// $save_file2 = BASE_UPLOAD_PATH.'/'.$_POST['filename'];
$save_file2 = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_POST['filename']);
} else {
$save_file2 = str_replace('_small.', '_sm.', $src);
}
$cropped = uk86_resize_thumb($save_file2, $src, $w, $h, $x1, $y1, $scale);
@unlink($src);
$pathinfo = pathinfo($save_file2);
exit($pathinfo['basename']);
}
$save_file = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_GET['url']);
$_GET['resize'] = $_GET['resize'] == '0' ? '0' : '1';
Tpl::output('height', uk86_get_height($save_file));
Tpl::output('width', uk86_get_width($save_file));
Tpl::showpage('common.pic_cut', 'null_layout');
}
示例2: informationOp
/**
* 詳細資料
*/
public function informationOp() {
$model_dp = Model('delivery_point');
$delivery_info = $model_dp->getDeliveryPointInfo(array('dlyp_id' => $_SESSION['dlyp_id']));
Tpl::output('delivery_info', $delivery_info);
Tpl::output('delivery_state', $model_dp->getDeliveryState());
Tpl::showpage('d_center.information', 'null_layout');
}
示例3: showTip
protected function showTip($msg, $url = '', $show_type = 'html', $msg_type = 'succ', $is_show = 1, $time = 2000)
{
/**
* 如果默認為空,則跳轉至上一步鏈接
*/
$url = $url != '' ? $url : getReferer();
$msg_type = in_array($msg_type, array('succ', 'error')) ? $msg_type : 'error';
if (is_array($url)) {
foreach ($url as $k => $v) {
$url[$k]['url'] = $v['url'] ? $v['url'] : getReferer();
}
}
/**
* 讀取信息布局的語言包
*/
Language::read("msg");
/**
* html輸出形式
* 指定為指定項目目錄下的error模板文件
*/
Tpl::setDir('');
Tpl::output('html_title', Language::get('nc_html_title'));
Tpl::output('msg', $msg);
Tpl::output('url', $url);
Tpl::output('msg_type', $msg_type);
Tpl::output('is_show', $is_show);
Tpl::showpage('msg', $this->layout, $time);
exit;
}
示例4: flistOp
/**
* 意見反饋
*/
public function flistOp()
{
$lang = Language::getLangContent();
$model_link = Model('mb_feedback');
/**
* 刪除
*/
if ($_POST['form_submit'] == 'ok') {
if (is_array($_POST['del_id']) && !empty($_POST['del_id'])) {
foreach ($_POST['del_id'] as $k => $v) {
$model_link->del($v);
}
showMessage($lang['feedback_del_succ']);
} else {
showMessage($lang['feedback_del_fiald']);
}
}
/**
* 分頁
*/
$page = new Page();
$page->setEachNum(10);
$page->setStyle('admin');
$list = $model_link->getList(array(), $page);
Tpl::output('list', $list);
Tpl::output('page', $page->show());
Tpl::showpage('mb_feedback.index');
}
示例5: detailOp
/**
* 店鋪詳細頁
*/
public function detailOp()
{
$store_id = intval($_GET['store_id']);
if ($store_id <= 0) {
header('location: ' . MICROSHOP_SITE_URL);
die;
}
$model_store = Model('store');
$model_goods = Model('goods');
$model_microshop_store = Model('micro_store');
$store_info = $model_microshop_store->getOneWithStoreInfo(array('microshop_store_id' => $store_id));
if (empty($store_info)) {
header('location: ' . MICROSHOP_SITE_URL);
}
//點擊數加1
$update = array();
$update['click_count'] = array('exp', 'click_count+1');
$model_microshop_store->modify($update, array('microshop_store_id' => $store_id));
Tpl::output('detail', $store_info);
$condition = array();
$condition['store_id'] = $store_info['shop_store_id'];
$goods_list = $model_goods->getGoodsListByColorDistinct($condition, 'goods_id,store_id,goods_name,goods_image,goods_price,goods_salenum', 'goods_id asc', 39);
Tpl::output('comment_type', 'store');
Tpl::output('comment_id', $store_id);
Tpl::output('list', $goods_list);
Tpl::output('show_page', $model_goods->showpage());
//獲得分享app列表
self::get_share_app_list();
Tpl::output('html_title', $store_info['store_name'] . '-' . Language::get('nc_microshop_store') . '-' . Language::get('nc_microshop') . '-' . C('site_name'));
Tpl::showpage('store_detail');
}
示例6: indexOp
/**
* 店鋪幫助頁
*
*/
public function indexOp()
{
$model_help = Model('help');
$list = $model_help->getShowStoreHelpList();
$type_id = intval($_GET['t_id']);
//幫助類型編號
if ($type_id < 1 || empty($list[$type_id])) {
$type_array = current($list);
$type_id = $type_array['type_id'];
}
Tpl::output('type_id', $type_id);
$help_id = intval($_GET['help_id']);
//幫助編號
if ($help_id < 1 || empty($list[$type_id]['help_list'][$help_id])) {
$help_array = current($list[$type_id]['help_list']);
$help_id = $help_array['help_id'];
}
Tpl::output('help_id', $help_id);
$help = $list[$type_id]['help_list'][$help_id];
Tpl::output('list', $list);
//左側幫助類型及幫助
Tpl::output('help', $help);
//當前幫助
Tpl::output('article_list', '');
//底部不顯示首頁的文章分類
$phone_array = explode(',', C('site_phone'));
Tpl::output('phone_array', $phone_array);
Tpl::output('html_title', C('site_name') . ' - ' . '商家幫助指南');
Tpl::setLayout('store_joinin_layout');
Tpl::showpage('store_help');
}
示例7: indexOp
/**
* 編輯信息
*/
public function indexOp()
{
$model_dp = Model('delivery_point');
$dpoint_info = $model_dp->getDeliveryPointFailInfo(array('dlyp_id' => $_SESSION['dlyp_id']));
Tpl::output('dpoint_info', $dpoint_info);
Tpl::showpage('joinin_again', 'login_layout');
}
示例8: profile_menu
/**
* 用戶中心右邊,小導航
*
* @param string $menu_key 當前導航的menu_key
* @return
*/
private function profile_menu($menu_key = '')
{
$menu_array = array();
$menu_array[] = array('menu_key' => 'cost_list', 'menu_name' => '消費列表', 'menu_url' => urlShop('store_cost', 'cost_list'));
Tpl::output('member_menu', $menu_array);
Tpl::output('menu_key', $menu_key);
}
示例9: pointvoucherOp
/**
* 所有卡卷包
*/
public function pointvoucherOp()
{
$model = Model('voucher_template');
//查詢條件
$condition = array();
$condition['voucher_t_start_date'] = array('lt', time());
$condition['voucher_t_end_date'] = array('gt', time());
$condition['voucher_t_state'] = 1;
$condition['voucher_t_total'] = array('gt', 'voucher_t_giveout');
//排序
if ($_GET['order_type'] == 1 || empty($_GET['order_type'])) {
$order = 'voucher_t_recommend desc, voucher_t_start_date desc';
} elseif ($_GET['order_type'] == 2) {
$order = 'voucher_t_giveout desc';
} else {
if ($_GET['order'] == 'asc') {
$order = 'voucher_t_points asc';
} else {
$order = 'voucher_t_points desc';
}
}
$field = 'voucher_t_id, voucher_t_end_date, voucher_t_price, voucher_t_points, voucher_t_limit, voucher_t_title, voucher_t_customimg';
$voucher_list = $model->where($condition)->field($field)->order($order)->select();
Tpl::output('list', $voucher_list);
Tpl::showpage('ucoin.index');
}
示例10: resources_manageOp
/**
* cms設置
*/
public function resources_manageOp()
{
$model_setting = Model('setting');
$setting_list = $model_setting->getListSetting();
Tpl::output('setting', $setting_list);
Tpl::showpage('resources_manage');
}
示例11: indexOp
public function indexOp()
{
$model_store = Model('store');
$model_store_bind_class = Model('store_bind_class');
$model_store_class = Model('store_class');
$model_store_grade = Model('store_grade');
// 店鋪信息
$store_info = $model_store->getStoreInfoByID($_SESSION['store_id']);
Tpl::output('store_info', $store_info);
// 店鋪分類信息
$store_class_info = $model_store_class->getOneClass($store_info['sc_id']);
Tpl::output('store_class_name', $store_class_info['sc_name']);
// 店鋪等級信息
$store_grade_info = $model_store_grade->getOneGrade($store_info['grade_id']);
Tpl::output('store_grade_name', $store_grade_info['sg_name']);
$model_store_joinin = Model('store_joinin');
$joinin_detail = $model_store_joinin->getOne(array('member_id' => $store_info['member_id']));
Tpl::output('joinin_detail', $joinin_detail);
$store_bind_class_list = $model_store_bind_class->getStoreBindClassList(array('store_id' => $_SESSION['store_id']), null);
$goods_class = H('goods_class') ? H('goods_class') : H('goods_class', true);
for ($i = 0, $j = count($store_bind_class_list); $i < $j; $i++) {
$store_bind_class_list[$i]['class_1_name'] = $goods_class[$store_bind_class_list[$i]['class_1']]['gc_name'];
$store_bind_class_list[$i]['class_2_name'] = $goods_class[$store_bind_class_list[$i]['class_2']]['gc_name'];
$store_bind_class_list[$i]['class_3_name'] = $goods_class[$store_bind_class_list[$i]['class_3']]['gc_name'];
}
Tpl::output('store_bind_class_list', $store_bind_class_list);
Tpl::showpage('store_info');
}
示例12: indexOp
/**
* 分類列表
*/
public function indexOp()
{
Language::read('home_category_index');
$lang = Language::getLangContent();
//得到分類類型
$type = trim($_GET['type']);
switch ($type) {
case 'store':
$model_sc = Model('store_class');
$sc_list = $model_sc->getTreeList();
//導航
$nav_link = array('0' => array('title' => $lang['homepage'], 'link' => SiteUrl . '/index.php'), '1' => array('title' => $lang['category_index_store_class']));
$model_store = Model('store');
//推薦店鋪
$recommend_store = $model_store->getRecommendStore(5);
Tpl::output('recommend_store', $recommend_store);
//最新店鋪
$new_store = $model_store->getNewStore(5);
Tpl::output('new_store', $new_store);
Tpl::output('nav_link_list', $nav_link);
Tpl::output('sc_list', $sc_list);
Tpl::showpage('category_store');
break;
default:
//導航
$nav_link = array('0' => array('title' => $lang['homepage'], 'link' => SiteUrl . '/index.php'), '1' => array('title' => $lang['category_index_goods_class']));
//分類
$show_goods_class = ($g = F('goods_class')) ? $g : H('goods_class', true, 'file');
Tpl::output('nav_link_list', $nav_link);
Tpl::output('gc_list', $show_goods_class);
Tpl::output('html_title', C('site_name') . ' - ' . Language::get('category_index_goods_class'));
Tpl::showpage('category_goods');
break;
}
}
示例13: indexOp
public function indexOp(){
//查詢會員及其附屬信息
parent::pointshopMInfo();
//開啟代金券功能後查詢推薦的熱門代金券列表
if (C('voucher_allow') == 1){
$recommend_voucher = Model('voucher')->getRecommendTemplate(6);
Tpl::output('recommend_voucher',$recommend_voucher);
}
//開啟積分兌換功能後查詢推薦的熱門兌換商品列表
if (C('pointprod_isuse') == 1){
//熱門積分兌換商品
$recommend_pointsprod = Model('pointprod')->getRecommendPointProd(10);
Tpl::output('recommend_pointsprod',$recommend_pointsprod);
}
//SEO
Model('seo')->type('point')->show();
//分類導航
$nav_link = array(
0=>array('title'=>L('homepage'),'link'=>SHOP_SITE_URL),
1=>array('title'=>L('nc_pointprod'))
);
Tpl::output('nav_link_list', $nav_link);
Tpl::showpage('pointprod');
}
示例14: welcomeOp
/**
* 歡迎頁麵
*/
public function welcomeOp()
{
/**
* 管理員信息
*/
$model_admin = Model('admin');
$tmp = $this->getAdminInfo();
$condition['admin_id'] = $tmp['id'];
$admin_info = $model_admin->infoAdmin($condition);
$admin_info['admin_login_time'] = date('Y-m-d H:i:s', $admin_info['admin_login_time'] == '' ? time() : $admin_info['admin_login_time']);
/**
* 係統信息
*/
require BasePath . DS . 'config.ini.php';
if (!empty($config) && is_array($config)) {
$version = $config['version'];
$setup_date = $config['setup_date'];
}
$statistics['os'] = PHP_OS;
$statistics['web_server'] = $_SERVER['SERVER_SOFTWARE'];
$statistics['php_version'] = PHP_VERSION;
$statistics['sql_version'] = Db::getServerInfo();
$statistics['shop_version'] = $version;
$statistics['setup_date'] = substr($setup_date, 0, 10);
Tpl::output('statistics', $statistics);
Tpl::output('admin_info', $admin_info);
Tpl::showpage('welcome');
}
示例15: pic_cutOp
/**
* 圖片裁剪
*
*/
public function pic_cutOp()
{
import('function.thumb');
if (chksubmit()) {
$thumb_width = $_POST['x'];
$x1 = $_POST["x1"];
$y1 = $_POST["y1"];
$x2 = $_POST["x2"];
$y2 = $_POST["y2"];
$w = $_POST["w"];
$h = $_POST["h"];
$scale = $thumb_width / $w;
$src = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_POST['url']);
if (strpos($src, '..') !== false || strpos($src, BASE_UPLOAD_PATH) !== 0) {
exit;
}
$save_file2 = str_replace('_small.', '_sm.', $src);
$cropped = resize_thumb($save_file2, $src, $w, $h, $x1, $y1, $scale);
@unlink($src);
$pathinfo = pathinfo($save_file2);
exit($pathinfo['basename']);
} else {
Language::read('cut');
$lang = Language::getLangContent();
}
$save_file = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_GET['url']);
$_GET['x'] = intval($_GET['x']) > 50 && $_GET['x'] < 400 ? $_GET['x'] : 200;
$_GET['y'] = intval($_GET['y']) > 50 && $_GET['y'] < 400 ? $_GET['y'] : 200;
$_GET['resize'] = $_GET['resize'] == '0' ? '0' : '1';
Tpl::output('height', get_height($save_file));
Tpl::output('width', get_width($save_file));
Tpl::showpage('cut', 'null_layout');
}