本文整理匯總了PHP中showDialog函數的典型用法代碼示例。如果您正苦於以下問題:PHP showDialog函數的具體用法?PHP showDialog怎麽用?PHP showDialog使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了showDialog函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: activity_verifyOp
/**
* 審核活動
*/
public function activity_verifyOp()
{
if (chksubmit()) {
$commonids = $_POST['commonids'];
$commonid_array = explode(',', $commonids);
foreach ($commonid_array as $value) {
if (!is_numeric($value)) {
showDialog(L('nc_common_op_fail'), 'reload');
}
}
$update2 = array();
$update2['activity_verify'] = intval($_POST['verify_state']);
$update2['activity_state'] = intval($_POST['verify_state']);
$update1 = array();
$update1['activity_verifyremark'] = trim($_POST['verify_reason']);
$update1 = array_merge($update1, $update2);
$where = array();
$where['activity_id_in'] = $commonids;
$model_activity = Model('activity');
if (intval($_POST['verify_state']) == 0) {
$model_activity->editActivityVerifyFail($where, $update1);
} else {
$model_activity->updateBycondition($update1, $where);
}
showDialog(L('nc_common_op_succ'), 'reload', 'succ');
}
Tpl::output('commonids', $_GET['id']);
Tpl::showpage('activity.verify_remark', 'null_layout');
}
示例2: share_saveOp
/**
* 分享保存
**/
public function share_saveOp()
{
$data = array();
$data['result'] = 'true';
$share_id = intval($_POST['share_id']);
$share_type = self::get_channel_type($_GET['type']);
if ($share_id <= 0 || empty($share_type) || mb_strlen($_POST['commend_message']) > 140) {
showDialog(Uk86Language::uk86_get('wrong_argument'), 'reload', 'fail', '');
}
if (!empty($_SESSION['member_id'])) {
$model = Model("micro_{$_GET['type']}");
//分享內容
if (isset($_POST['share_app_items'])) {
$condition = array();
$condition[$share_type['type_key']] = $_POST['share_id'];
if ($_GET['type'] == 'store') {
$info = $model->getOneWithStoreInfo($condition);
} else {
$info = $model->getOne($condition);
}
$info['commend_message'] = $_POST['commend_message'];
if (empty($info['commend_message'])) {
$info['commend_message'] = Uk86Language::uk86_get('microshop_share_default_message');
}
$info['type'] = $_GET['type'];
$info['url'] = MICROSHOP_SITE_URL . DS . "index.php?act={$_GET['type']}&op=detail&{$_GET['type']}_id=" . $_POST['share_id'];
self::share_app_publish('share', $info);
}
showDialog(Uk86Language::uk86_get('nc_common_save_succ'), '', 'succ', '');
} else {
showDialog(Uk86Language::uk86_get('no_login'), 'reload', 'fail', '');
}
}
示例3: share_saveOp
/**
* 分享保存
**/
public function share_saveOp()
{
$data = array();
$data['result'] = 'true';
$share_id = intval($_POST['share_id']);
$share_type = $_GET['type'];
if ($share_id <= 0 || empty($share_type) || mb_strlen($_POST['commend_message']) > 140) {
showDialog(Language::get('wrong_argument'), 'reload', 'fail', '');
}
if (!empty($_SESSION['member_id'])) {
$model = Model('cms_' . $share_type);
$model->modify(array($share_type . '_share_count' => array('exp', $share_type . '_share_count+1')), array($share_type . '_id' => $share_id));
//分享內容
if (isset($_POST['share_app_items'])) {
$info['commend_message'] = $_POST['commend_message'];
$info['share_title'] = $_POST['share_title'];
$info['share_image'] = $_POST['share_image'];
if (empty($info['commend_message'])) {
$info['commend_message'] = Language::get('share_text');
}
$info['url'] = CMS_SITE_URL . DS . "index.php?act={$_GET['type']}&op={$_GET['type']}_detail&{$_GET['type']}_id=" . $_POST['share_id'];
self::share_app_publish($info);
}
showDialog(Language::get('nc_common_save_succ'), '', 'succ', '');
} else {
showDialog(Language::get('no_login'), 'reload', 'fail', '');
}
}
示例4: save_deliveryOp
/**
* 保存申請
*/
public function save_deliveryOp()
{
if (!chksubmit()) {
showDialog(L('wrong_argument'));
}
$insert = array();
$insert['dlyp_name'] = $_POST['dname'];
$insert['dlyp_passwd'] = md5($_POST['dpasswd']);
$insert['dlyp_truename'] = $_POST['dtruename'];
$insert['dlyp_mobile'] = $_POST['dmobile'];
$insert['dlyp_telephony'] = $_POST['dtelephony'];
$insert['dlyp_address_name'] = $_POST['daddressname'];
$insert['dlyp_area_2'] = $_POST['area_id_2'];
$insert['dlyp_area_3'] = $_POST['area_id'];
$insert['dlyp_area_info'] = $_POST['area_info'];
$insert['dlyp_address'] = $_POST['daddress'];
$insert['dlyp_idcard'] = $_POST['didcard'];
$insert['dlyp_addtime'] = TIMESTAMP;
$insert['dlyp_state'] = 10;
$upload = new UploadFile();
$upload->set('default_dir', ATTACH_DELIVERY);
$result = $upload->upfile('didcardimg');
if (!$result) {
showDialog($upload->error);
}
$insert['dlyp_idcard_image'] = $upload->file_name;
$result = Model('delivery_point')->addDeliveryPoint($insert);
if ($result) {
showDialog('操作成功,等待管理員審核', 'index.php?act=login', 'succ');
} else {
showDialog(L('nc_common_op_fail'));
}
}
示例5: store_editOp
/**
* 編輯店鋪
*/
public function store_editOp()
{
$upload = new UploadFile();
/**
* 上傳店鋪圖片
*/
if (!empty($_FILES['store_banner']['name'])) {
$upload->set('default_dir', ATTACH_STORE);
$upload->set('thumb_ext', '');
$upload->set('file_name', '');
$upload->set('ifremove', false);
$result = $upload->upfile('store_banner');
if ($result) {
$_POST['store_banner'] = $upload->file_name;
} else {
showDialog($upload->error);
}
}
//刪除舊店鋪圖片
if (!empty($_POST['store_banner']) && !empty($store_info['store_banner'])) {
@unlink(BASE_UPLOAD_PATH . DS . ATTACH_STORE . DS . $this->store_info['store_banner']);
}
/**
* 更新入庫
*/
$param = array('store_banner' => empty($_POST['store_banner']) ? $this->store_info['store_banner'] : $_POST['store_banner'], 'store_qq' => $_POST['store_qq'], 'store_ww' => $_POST['store_ww'], 'store_phone' => $_POST['store_phone'], 'store_zy' => $_POST['store_zy'], 'store_keywords' => $_POST['seo_keywords'], 'store_description' => $_POST['seo_description']);
$result = Model('store')->editStore($param, array('store_id' => $this->store_info['store_id']));
if (!$result) {
output_error('編輯失敗');
}
output_data('1');
}
示例6: get_infoOp
/**
* 回調獲取信息
*/
public function get_infoOp()
{
$code = $_GET['code'];
if (!empty($code)) {
$user_info = $this->get_user_info($code);
if (!empty($user_info['unionid'])) {
$unionid = $user_info['unionid'];
$model_member = Model('member');
$member = $model_member->getMemberInfo(array('weixin_unionid' => $unionid));
if (!empty($member)) {
//會員信息存在時自動登錄
$model_member->createSession($member);
showDialog('登錄成功', 'index.php?act=member&op=home', 'succ');
}
if (!empty($_SESSION['member_id'])) {
//已登錄時綁定微信
$member_id = $_SESSION['member_id'];
$member = array();
$member['weixin_unionid'] = $unionid;
$member['weixin_info'] = $user_info['weixin_info'];
$model_member->editMember(array('member_id' => $member_id), $member);
showDialog('微信綁定成功', 'index.php?act=member&op=home', 'succ');
} else {
//自動注冊會員並登錄
$this->register($user_info);
exit;
}
}
}
showDialog('微信登錄失敗', urlLogin('login', 'index'), 'succ');
}
示例7: logoutOp
/**
* 登出
*/
public function logoutOp()
{
unset($_SESSION['delivery_login']);
unset($_SESSION['dlyp_id']);
unset($_SESSION['dlyp_name']);
showDialog('退出成功', 'reload', 'succ');
}
示例8: loginoutOp
public function loginoutOp()
{
session_unset();
session_destroy();
setNcCookie('goodsnum', '', -3600);
showDialog(L('login_logout_success'), '', 'succ', '', 2);
}
示例9: add_step_twoOp
/**
* 添加商品
*/
public function add_step_twoOp()
{
// 實例化商品分類模型
$model_goodsclass = Model('goods_class');
// 是否能使用編輯器
if (checkPlatformStore()) {
// 平台店鋪可以使用編輯器
$editor_multimedia = true;
} else {
// 三方店鋪需要
$editor_multimedia = false;
if ($this->store_grade['sg_function'] == 'editor_multimedia') {
$editor_multimedia = true;
}
}
Tpl::output('editor_multimedia', $editor_multimedia);
$gc_id = intval($_GET['class_id']);
// 驗證商品分類是否存在且商品分類是否為最後一級
$data = H('goods_class') ? H('goods_class') : H('goods_class', true);
if (!isset($data[$gc_id]) || isset($data[$gc_id]['child']) || isset($data[$gc_id]['childchild'])) {
showDialog(L('store_goods_index_again_choose_category1'));
}
// 三方店鋪驗證是否綁定了該分類
if (!checkPlatformStore()) {
$where['class_1|class_2|class_3'] = $gc_id;
$where['store_id'] = $_SESSION['store_id'];
$rs = Model('store_bind_class')->getStoreBindClassInfo($where);
if (empty($rs)) {
showMessage(L('store_goods_index_again_choose_category2'));
}
}
// 更新常用分類信息
$goods_class = $model_goodsclass->getGoodsClassLineForTag($gc_id);
Tpl::output('goods_class', $goods_class);
Model('goods_class_staple')->autoIncrementStaple($goods_class, $_SESSION['member_id']);
// 獲取類型相關數據
if ($goods_class['type_id'] > 0) {
$typeinfo = Model('type')->getAttr($goods_class['type_id'], $_SESSION['store_id'], $gc_id);
list($spec_json, $spec_list, $attr_list, $brand_list) = $typeinfo;
Tpl::output('sign_i', count($spec_list));
Tpl::output('spec_list', $spec_list);
Tpl::output('attr_list', $attr_list);
Tpl::output('brand_list', $brand_list);
}
// 實例化店鋪商品分類模型
$store_goods_class = Model('my_goods_class')->getClassTree(array('store_id' => $_SESSION['store_id'], 'stc_state' => '1'));
Tpl::output('store_goods_class', $store_goods_class);
// 小時分鍾顯示
$hour_array = array('00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23');
Tpl::output('hour_array', $hour_array);
$minute_array = array('05', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55');
Tpl::output('minute_array', $minute_array);
// 關聯版式
$plate_list = Model('store_plate')->getPlateList(array('store_id' => $_SESSION['store_id']), 'plate_id,plate_name,plate_position');
$plate_list = array_under_reset($plate_list, 'plate_position', 2);
Tpl::output('plate_list', $plate_list);
Tpl::output('item_id', '');
Tpl::output('menu_sign', 'add_goods_stpe2');
Tpl::showpage('store_goods_add.step2');
}
示例10: save_specOp
/**
* 保存規格值
*/
public function save_specOp()
{
$sp_id = intval($_POST['sp_id']);
$gc_id = intval($_POST['gc_id']);
if ($sp_id <= 0 || $gc_id <= 0 || !chksubmit()) {
showDialog(L('wrong_argument'));
}
$model_spec = Model('spec');
// 更新原規格值
if (is_array($_POST['sv']['old'])) {
foreach ($_POST['sv']['old'] as $key => $value) {
if (empty($value['name'])) {
continue;
}
$where = array('sp_value_id' => $key);
$update = array('sp_value_name' => $value['name'], 'sp_id' => $sp_id, 'gc_id' => $gc_id, 'store_id' => $_SESSION['store_id'], 'sp_value_color' => $value['color'], 'sp_value_sort' => intval($value['sort']));
$model_spec->editSpecValue($update, $where);
}
}
// 添加新規格值
if (is_array($_POST['sv']['new'])) {
$insert_array = array();
foreach ($_POST['sv']['new'] as $value) {
if (empty($value['name'])) {
continue;
}
$tmp_insert = array('sp_value_name' => $value['name'], 'sp_id' => $sp_id, 'gc_id' => $gc_id, 'store_id' => $_SESSION['store_id'], 'sp_value_color' => $value['color'], 'sp_value_sort' => intval($value['sort']));
$insert_array[] = $tmp_insert;
}
$model_spec->addSpecValueALL($insert_array);
}
showDialog(L('nc_common_op_succ'), 'reload', 'succ');
}
示例11: __construct
public function __construct() {
parent::__construct();
//驗證是否登錄
if ($_SESSION['is_login'] != '1'){
showDialog(L('no_login'),'index.php?act=login', 'error');
}
}
示例12: add_step_twoOp
/**
* 添加商品
*/
public function add_step_twoOp()
{
// 實例化模型
$model_goodsclass = Model('goods_class');
// 現暫時改為從匿名“自營店鋪專屬等級”中判斷
$editor_multimedia = false;
if ($this->store_grade['sg_function'] == 'editor_multimedia') {
$editor_multimedia = true;
}
Tpl::output('editor_multimedia', $editor_multimedia);
$gc_id = intval($_GET['class_id']);
// 驗證商品分類是否存在且商品分類是否為最後一級
$data = Model('goods_class')->getGoodsClassForCacheModel();
if (!isset($data[$gc_id]) || isset($data[$gc_id]['child']) || isset($data[$gc_id]['childchild'])) {
showDialog(L('store_goods_index_again_choose_category1'));
}
// 如果不是自營店鋪或者自營店鋪未綁定全部商品類目,讀取綁定分類
/*if (!checkPlatformStoreBindingAllGoodsClass()) {
$where['class_1|class_2|class_3'] = $gc_id;
$where['store_id'] = $_SESSION['store_id'];
$rs = Model('store_bind_class')->getStoreBindClassInfo($where);
if (empty($rs)) {
showMessage(L('store_goods_index_again_choose_category2'));
}
}*/
// 更新常用分類信息
$goods_class = $model_goodsclass->getGoodsClassLineForTag($gc_id);
Tpl::output('goods_class', $goods_class);
Model('goods_class_staple')->autoIncrementStaple($goods_class, $_SESSION['member_id']);
// 獲取類型相關數據
$typeinfo = Model('type')->getAttr($goods_class['type_id'], $_SESSION['store_id'], $gc_id);
list($spec_json, $spec_list, $attr_list, $brand_list) = $typeinfo;
Tpl::output('sign_i', count($spec_list));
Tpl::output('spec_list', $spec_list);
Tpl::output('attr_list', $attr_list);
Tpl::output('brand_list', $brand_list);
// 實例化店鋪商品分類模型
$store_goods_class = Model('store_goods_class')->getClassTree(array('store_id' => $_SESSION['store_id'], 'stc_state' => '1'));
Tpl::output('store_goods_class', $store_goods_class);
// 小時分鍾顯示
$hour_array = array('00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23');
Tpl::output('hour_array', $hour_array);
$minute_array = array('05', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55');
Tpl::output('minute_array', $minute_array);
// 關聯版式
$plate_list = Model('store_plate')->getStorePlateList(array('store_id' => $_SESSION['store_id']), 'plate_id,plate_name,plate_position');
$plate_list = array_under_reset($plate_list, 'plate_position', 2);
Tpl::output('plate_list', $plate_list);
//銷售區域by joe
$salearea = Model('setting');
$salearea_list = $salearea->getsaleareaList();
$store = Model('store');
$storeinfo = $store->getStoreInfoByID($_SESSION['store_id']);
Tpl::output('storeinfo', $storeinfo);
Tpl::output('salearea_list', $salearea_list);
// 獲得用戶信息
Tpl::showpage('store_goods_add.step2');
}
示例13: add_refundOp
/**
* 添加兌換碼退款
*
*/
public function add_refundOp()
{
$model_vr_refund = Model('vr_refund');
$order_id = intval($_GET['order_id']);
if ($order_id < 1) {
//參數驗證
showDialog(Language::get('wrong_argument'), 'index.php?act=member_vr_refund&op=index', 'error');
}
$condition = array();
$condition['buyer_id'] = $_SESSION['member_id'];
$condition['order_id'] = $order_id;
$order = $model_vr_refund->getRightOrderList($condition);
$order_id = $order['order_id'];
if (!$order['if_refund']) {
//檢查狀態,防止頁麵刷新不及時造成數據錯誤
showDialog(Language::get('wrong_argument'), 'index.php?act=member_vr_order&op=index', 'error');
}
if (chksubmit() && $order['if_refund']) {
$code_list = $order['code_list'];
$refund_array = array();
$goods_num = 0;
//兌換碼數量
$refund_amount = 0;
//退款金額
$code_sn = '';
$rec_id_array = $_POST['rec_id'];
if (!empty($rec_id_array) && is_array($rec_id_array)) {
//選擇退款的兌換碼
foreach ($rec_id_array as $key => $value) {
$code = $code_list[$value];
if (!empty($code)) {
$goods_num += 1;
$refund_amount += $code['pay_price'];
//實際支付金額
$code_sn .= $code['vr_code'] . ',';
//兌換碼編號
}
}
}
if ($goods_num < 1) {
showDialog(Language::get('wrong_argument'), 'reload', 'error');
}
$refund_array['code_sn'] = rtrim($code_sn, ',');
$refund_array['admin_state'] = '1';
//狀態:1為待審核,2為同意,3為不同意
$refund_array['refund_amount'] = ncPriceFormat($refund_amount);
$refund_array['goods_num'] = $goods_num;
$refund_array['buyer_message'] = $_POST['buyer_message'];
$refund_array['add_time'] = time();
$state = $model_vr_refund->addRefund($refund_array, $order);
if ($state) {
showDialog(Language::get('nc_common_save_succ'), 'index.php?act=member_vr_refund&op=index', 'succ');
} else {
showDialog(Language::get('nc_common_save_fail'), 'reload', 'error');
}
}
Tpl::showpage('member_vr_refund_add');
}
示例14: __construct
public function __construct()
{
parent::__construct();
Uk86Language::uk86_read('home_pointprod');
//驗證是否登錄
if ($_SESSION['is_login'] != '1') {
showDialog(L('no_login'), 'index.php?act=login', 'error');
}
}
示例15: delete_goods_floorOp
public function delete_goods_floorOp()
{
$condition['id'] = $_GET['id'];
$condition['store_id'] = $_SESSION['store_id'];
$model = Model();
if ($model->table('store_floor')->where($condition)->delete()) {
showDialog('刪除成功', 'reload', 'succ');
} else {
showDialog('刪除失敗', '', 'error');
}
}