本文整理汇总了PHP中Tpl::showpage方法的典型用法代码示例。如果您正苦于以下问题:PHP Tpl::showpage方法的具体用法?PHP Tpl::showpage怎么用?PHP Tpl::showpage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tpl
的用法示例。
在下文中一共展示了Tpl::showpage方法的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: 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');
}
示例3: store_liveOp
public function store_liveOp()
{
if (chksubmit()) {
//编辑商户信息
$params = array();
//参数
$params['store_vrcode_prefix'] = preg_match('/^[a-zA-Z0-9]{1,3}$/', $_POST['store_vrcode_prefix']) ? $_POST['store_vrcode_prefix'] : null;
$params['live_store_name'] = $_POST['live_store_name'];
$params['live_store_address'] = $_POST['live_store_address'];
$params['live_store_tel'] = $_POST['live_store_tel'];
$params['live_store_bus'] = $_POST['live_store_bus'];
$model_store = Model('store');
$res = $model_store->editStore($params, array('store_id' => $_SESSION['store_id']));
if ($res) {
showMessage('编辑成功', '', '', 'succ');
} else {
showMessage('编辑失败', '', '', 'error');
}
}
$model_store = Model('store');
$store = $model_store->getStoreInfo(array('store_id' => $_SESSION['store_id']));
if (empty($store)) {
showMessage('该商家不存在');
}
Tpl::output('store', $store);
$this->profile_menu('store_live');
Tpl::showpage('store_liveinfo');
}
示例4: 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');
}
示例5: inform_listOp
public function inform_listOp()
{
/*
* 生成分页
*/
$page = new Page();
$page->setEachNum(10);
$page->setStyle('admin');
/*
* 得到该店被举报禁售的列表
*/
$model_inform = Model('inform');
$condition = array();
$condition['inform_state'] = 2;
$condition['inform_store_id'] = $_SESSION['store_id'];
$condition['inform_handle_type'] = 3;
$condition['order'] = 'inform_id desc';
$list = $model_inform->getInform($condition, $page);
$this->profile_menu('inform_list');
Tpl::output('list', $list);
Tpl::output('show_page', $page->show());
Tpl::output('menu_sign', 'store_inform');
Tpl::output('menu_sign_url', 'index.php?act=store_inform');
Tpl::output('menu_sign1', 'store_inform');
Tpl::showpage('store_inform.list');
}
示例6: mb_appOp
/**
* 设置下载地址
*
*/
public function mb_appOp()
{
$model_setting = Model('setting');
$mobile_apk = $model_setting->getRowSetting('mobile_apk');
$mobile_content = $model_setting->getRowSetting('mobile_content');
$mobile_apk_version = $model_setting->getRowSetting('mobile_apk_version');
$mobile_ios = $model_setting->getRowSetting('mobile_ios');
if (chksubmit()) {
$update_array = array();
$update_array['mobile_apk'] = $_POST['mobile_apk'];
$update_array['mobile_apk_version'] = intval($_POST['mobile_apk_version']);
$update_array['mobile_content'] = $_POST['mobile_content'];
$update_array['mobile_ios'] = $_POST['mobile_ios'];
$state = $model_setting->updateSetting($update_array);
if ($state) {
$this->log('设置手机端下载地址');
showMessage(Language::get('nc_common_save_succ'), 'index.php?act=mb_app&op=mb_app');
} else {
showMessage(Language::get('nc_common_save_fail'));
}
}
Tpl::output('mobile_apk', $mobile_apk);
Tpl::output('mobile_version', $mobile_apk_version);
Tpl::output('mobile_ios', $mobile_ios);
Tpl::output('mobile_content', $mobile_content);
Tpl::showpage('mb_app.edit');
}
示例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: points_logOp
/**
* 积分日志列表
*/
public function points_logOp()
{
$condition_arr = array();
$condition_arr['pl_memberid'] = $_SESSION['member_id'];
if ($_GET['stage']) {
$condition_arr['pl_stage'] = $_GET['stage'];
}
$condition_arr['saddtime'] = strtotime($_GET['stime']);
$condition_arr['eaddtime'] = strtotime($_GET['etime']);
if ($condition_arr['eaddtime'] > 0) {
$condition_arr['eaddtime'] += 86400;
}
$condition_arr['pl_desc_like'] = $_GET['description'];
//分页
$page = new Page();
$page->setEachNum(10);
$page->setStyle('admin');
//查询积分日志列表
$points_model = Model('points');
$list_log = $points_model->getPointsLogList($condition_arr, $page, '*', '');
//查询会员信息
$this->get_member_info();
//信息输出
self::profile_menu('points');
Tpl::output('show_page', $page->show());
Tpl::output('list_log', $list_log);
Tpl::output('menu_sign', 'points');
Tpl::output('menu_sign_url', 'index.php?act=member_points');
Tpl::showpage('member_points');
}
示例9: modifypwOp
/**
* 修改密码
*/
public function modifypwOp()
{
if (chksubmit()) {
if (trim($_POST['new_pw']) !== trim($_POST['new_pw2'])) {
//showMessage('两次输入的密码不一致,请重新输入');
showMessage(Language::get('index_modifypw_repeat_error'));
}
$admininfo = $this->getAdminInfo();
//查询管理员信息
$admin_model = Model('admin');
$admininfo = $admin_model->getOneAdmin($admininfo['id']);
if (!is_array($admininfo) || count($admininfo) <= 0) {
showMessage(Language::get('index_modifypw_admin_error'));
}
//旧密码是否正确
if ($admininfo['admin_password'] != md5(trim($_POST['old_pw']))) {
showMessage(Language::get('index_modifypw_oldpw_error'));
}
$new_pw = md5(trim($_POST['new_pw']));
$result = $admin_model->updateAdmin(array('admin_password' => $new_pw, 'admin_id' => $admininfo['admin_id']));
if ($result) {
showMessage(Language::get('index_modifypw_success'));
} else {
showMessage(Language::get('index_modifypw_fail'));
}
} else {
Language::read('admin');
Tpl::showpage('admin.modifypw');
}
}
示例10: returnOp
/**
* 支付回调
*/
public function returnOp()
{
unset($_GET['act']);
unset($_GET['op']);
unset($_GET['payment_code']);
$payment_api = $this->_get_payment_api();
$payment_config = $this->_get_payment_config();
$callback_info = $payment_api->getReturnInfo($payment_config);
if ($callback_info) {
//验证成功
$result = $this->_update_order($callback_info['out_trade_no'], $callback_info['trade_no']);
if ($result['state']) {
Tpl::output('result', 'success');
Tpl::output('message', '支付成功');
} else {
Tpl::output('result', 'fail');
Tpl::output('message', '支付失败');
}
} else {
//验证失败
Tpl::output('result', 'fail');
Tpl::output('message', '支付失败');
}
Tpl::showpage('payment_message');
}
示例11: indexOp
/**
* 店铺开店页
*
*/
public function indexOp()
{
Language::read("home_login_index");
$code_info = C('store_joinin_pic');
$info['pic'] = array();
if (!empty($code_info)) {
$info = unserialize($code_info);
}
Tpl::output('pic_list', $info['pic']);
//首页图片
Tpl::output('show_txt', $info['show_txt']);
//贴心提示
$model_help = Model('help');
$condition['type_id'] = '1';
//入驻指南
$help_list = $model_help->getHelpList($condition, '', 4);
//显示4个
Tpl::output('help_list', $help_list);
Tpl::output('article_list', '');
//底部不显示文章分类
Tpl::output('show_sign', 'joinin');
Tpl::output('html_title', C('site_name') . ' - ' . '商家入驻');
Tpl::setLayout('store_joinin_layout');
Tpl::showpage('store_joinin');
}
示例12: returnOp
/**
* 支付回调
*/
public function returnOp()
{
$verify_result = $this->_verify_result('return');
if ($verify_result) {
//商户订单号
$out_trade_no = $_GET['out_trade_no'];
//支付宝交易号
$trade_no = $_GET['trade_no'];
//支付接口代码
$payment_code = 'alipay';
//验证成功
$model_order = Model('order');
$model_payment = Model('payment');
$order_list = $model_order->getOrderList(array('pay_sn' => $out_trade_no, 'order_state' => ORDER_STATE_NEW));
$result = $model_payment->updateProductBuy($out_trade_no, $payment_code, $order_list, $trade_no);
if (empty($result['error'])) {
Tpl::output('result', 'success');
Tpl::output('message', '支付成功');
} else {
Tpl::output('result', 'fail');
Tpl::output('message', '支付失败');
}
} else {
//验证失败
//如要调试,请看alipay_notify.php页面的verifyReturn函数
Tpl::output('result', 'fail');
Tpl::output('message', '支付失败');
}
Tpl::showpage('payment_message');
}
示例13: my_consultOp
/**
* 查询买家商品咨询
*/
public function my_consultOp()
{
//实例化商品咨询模型
$consult = Model('consult');
$page = new Page();
$page->setEachNum(10);
$page->setStyle('admin');
$list_consult = array();
$search_array = array();
if ($_GET['type'] != '') {
if ($_GET['type'] == 'to_reply') {
$search_array['consult_reply'] = '';
}
if ($_GET['type'] == 'replied') {
$search_array['consult_reply'] = array('neq', '');
}
}
$search_array['member_id'] = "{$_SESSION['member_id']}";
$list_consult = $consult->getConsultList($search_array, $page);
Tpl::output('show_page', $page->show());
Tpl::output('list_consult', $list_consult);
$_GET['type'] = empty($_GET['type']) ? 'consult_list' : $_GET['type'];
self::profile_menu('my_consult', $_GET['type']);
Tpl::showpage('member_my_consult');
}
示例14: 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');
}
示例15: 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');
}