当前位置: 首页>>代码示例>>PHP>>正文


PHP showMessage函数代码示例

本文整理汇总了PHP中showMessage函数的典型用法代码示例。如果您正苦于以下问题:PHP showMessage函数的具体用法?PHP showMessage怎么用?PHP showMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了showMessage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct() {
     parent::__construct();
     //检查是否开启
     if (intval(C('promotion_allow')) !== 1) {
         showMessage(Language::get('promotion_unavailable'), urlShop('seller_center', 'index'),'','error');
     }
 }
开发者ID:noikiy,项目名称:ejia,代码行数:7,代码来源:store_promotion_booth.php

示例2: mansong_addOp

 /**
  * 添加满就送活动
  **/
 public function mansong_addOp()
 {
     $model_mansong_quota = Model('p_mansong_quota');
     $model_mansong = Model('p_mansong');
     $start_time = $model_mansong->getMansongNewStartTime($_SESSION['store_id']);
     if (checkPlatformStore()) {
         Tpl::output('isOwnShop', true);
     } else {
         //检查当前套餐是否可用
         $current_mansong_quota = $model_mansong_quota->getMansongQuotaCurrent($_SESSION['store_id']);
         if (empty($current_mansong_quota)) {
             showMessage(Language::get('mansong_quota_current_error'), '', '', 'error');
         }
         if (empty($start_time)) {
             $start_time = $current_mansong_quota['start_time'];
         }
         $end_time = $current_mansong_quota['end_time'];
     }
     if (empty($start_time)) {
         $start_time = time();
     }
     Tpl::output('start_time', $start_time);
     Tpl::output('end_time', $end_time);
     //输出导航
     self::profile_menu('mansong_add');
     Tpl::showpage('store_promotion_mansong.add');
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:30,代码来源:store_promotion_mansong.php

示例3: checkUser

function checkUser()
{
    global $config;
    if (!isset($_SESSION['user_id']) or !$_SESSION['user_id']) {
        showMessage("Please login to use this feature", $config['site_url'] . 'user/login.php', "error");
    }
}
开发者ID:binnyva,项目名称:chromics,代码行数:7,代码来源:application.php

示例4: control

 /**
  * 控制器调度
  *
  */
 private static function control()
 {
     //二级域名
     if ($GLOBALS['setting_config']['enabled_subdomain'] == '1' && $_GET['act'] == 'index' && $_GET['op'] == 'index') {
         $store_id = subdomain();
         if ($store_id > 0) {
             $_GET['act'] = 'show_store';
         }
     }
     $act_file = realpath(BASE_PATH . '/control/' . $_GET['act'] . '.php');
     $class_name = $_GET['act'] . 'Control';
     if (!@(include $act_file)) {
         if (C('debug')) {
             throw_exception("Base Error: access file isn't exists!");
         } else {
             showMessage('抱歉!您访问的页面不存在', '', 'html', 'error');
         }
     }
     if (class_exists($class_name)) {
         $main = new $class_name();
         $function = $_GET['op'] . 'Op';
         if (method_exists($main, $function)) {
             $main->{$function}();
         } elseif (method_exists($main, 'indexOp')) {
             $main->indexOp();
         } else {
             $error = "Base Error: function {$function} not in {$class_name}!";
             throw_exception($error);
         }
     } else {
         $error = "Base Error: class {$class_name} isn't exists!";
         throw_exception($error);
     }
 }
开发者ID:noikiy,项目名称:cunkou,代码行数:38,代码来源:base.php

示例5: payment_saveOp

 /**
  * 编辑保存
  */
 public function payment_saveOp()
 {
     $payment_id = intval($_POST["payment_id"]);
     $data = array();
     $data['payment_state'] = intval($_POST["payment_state"]);
     switch ($_POST['payment_code']) {
         case 'alipay':
             $payment_config = array('alipay_account' => $_POST['alipay_account'], 'alipay_key' => $_POST['alipay_key'], 'alipay_partner' => $_POST['alipay_partner']);
             break;
         case 'wxpay':
             $payment_config = array('wxpay_appid' => $_POST['wxpay_appid'], 'wxpay_mch_id' => $_POST['wxpay_mch_id'], 'wxpay_appsecret' => $_POST['wxpay_appsecret'], 'wxpay_key' => $_POST['wxpay_key']);
             break;
         case 'unionpay':
             $payment_config = array('unionpay_account' => $_POST['unionpay_account'], 'cert_passwd' => $_POST['cert_passwd']);
             break;
         default:
             showMessage(L('param_error'), '');
     }
     $data['payment_config'] = $payment_config;
     $model_mb_payment = Model('mb_payment');
     $result = $model_mb_payment->editMbPayment($data, array('payment_id' => $payment_id));
     if ($result) {
         showMessage(Language::get('nc_common_save_succ'), urlAdmin('mb_payment', 'payment_list'));
     } else {
         showMessage(Language::get('nc_common_save_fail'), urlAdmin('mb_payment', 'payment_list'));
     }
 }
开发者ID:qqq232575,项目名称:extends,代码行数:30,代码来源:mb_payment.php

示例6: indexOp

 /**
  * 单个活动信息页
  */
 public function indexOp()
 {
     //读取语言包
     Language::read('home_activity_index');
     //得到导航ID
     $nav_id = intval($_GET['nav_id']) ? intval($_GET['nav_id']) : 0;
     Tpl::output('index_sign', $nav_id);
     //查询活动信息
     $activity_id = intval($_GET['activity_id']);
     if ($activity_id <= 0) {
         showMessage(Language::get('para_error'), 'index.php', 'html', 'error');
         //'缺少参数:活动编号'
     }
     $activity = Model('activity')->getOneById($activity_id);
     if (empty($activity) || $activity['activity_type'] != '1' || $activity['activity_state'] != 1 || $activity['activity_start_date'] > time() || $activity['activity_end_date'] < time()) {
         showMessage(Language::get('activity_index_activity_not_exists'), 'index.php', 'html', 'error');
         //'指定活动并不存在'
     }
     Tpl::output('activity', $activity);
     //查询活动内容信息
     $list = array();
     $list = Model('activity_detail')->getGoodsList(array('order' => 'activity_detail.activity_detail_sort asc', 'activity_id' => "{$activity_id}", 'goods_show' => '1', 'activity_detail_state' => '1'));
     Tpl::output('list', $list);
     Tpl::output('html_title', C('site_name') . ' - ' . $activity['activity_title']);
     Tpl::showpage('activity_show');
 }
开发者ID:noikiy,项目名称:nc-1,代码行数:29,代码来源:activity.php

示例7: save_item_data

 public function save_item_data($item_id, $type = 'page')
 {
     $this->load->module('forms');
     $group = (int) $this->input->post('cfcm_use_group');
     if ($group != '0') {
         if ($fields = $this->get_group_fields($group)) {
             $form = $this->forms->add_fields($fields);
             if ($form->isValid()) {
                 if ($item_id > 0) {
                     // Save fields data
                     $data = $form->getData();
                     $this->update_fields_data($item_id, $data, $type);
                     // Delete empty fields
                     foreach ($fields as $name => $field) {
                         if (!array_key_exists($name, $data)) {
                             $this->db->where('item_id', $item_id);
                             $this->db->where('field_name', $name);
                             $this->db->where('item_type', $type);
                             $this->db->delete('content_fields_data');
                         }
                     }
                 }
             } else {
                 showMessage($form->_validation_errors(), false, 'r');
                 die;
             }
         }
     }
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:29,代码来源:cfcm.php

示例8: __construct

	/**
	 *	验证是否开启闲置功能
	 */
	public function __construct(){
		parent::__construct();
		Language::read('home_flea_index');
		if($GLOBALS['setting_config']['flea_isuse']!='1'){
			showMessage(Language::get('flea_index_unable'),'index.php','','error');
		}
	}
开发者ID:noikiy,项目名称:ejia,代码行数:10,代码来源:flea_class.php

示例9: language_switch_show_configure

 public function language_switch_show_configure($action = 'show_settings', $widget_data = array())
 {
     if ($this->dx_auth->is_admin() == FALSE) {
         exit;
     }
     // Only admin access
     switch ($action) {
         case 'show_settings':
             $this->display_tpl('language_switch_show_form', array('widget' => $widget_data));
             break;
         case 'update_settings':
             $this->form_validation->set_rules('image_url', lang('Image', 'language_switch'), 'trim|required');
             $this->form_validation->set_rules('image_title', lang('Description', 'language_switch'), 'trim');
             $this->form_validation->set_rules('href', lang('passage Url', 'language_switch'), 'trim');
             if ($this->form_validation->run() == FALSE) {
                 showMessage(validation_errors(), false, 'r');
             } else {
                 $data = array('image_url' => trim($_POST['image_url']), 'image_title' => htmlspecialchars($_POST['image_title']), 'href' => trim(htmlspecialchars($_POST['href'])));
                 $this->load->module('admin/widgets_manager')->update_config($widget_data['id'], $data);
                 showMessage(lang('Settings saved', 'language_switch'));
             }
             break;
         case 'install_defaults':
             $this->load->module('admin/widgets_manager')->update_config($widget_data['id'], $this->defaults);
             break;
     }
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:27,代码来源:language_switch_widgets.php

示例10: authenticate

 /**
  * Authenticates a user.
  * @return boolean whether authentication succeeds.
  */
 public function authenticate()
 {
     $user = User::model()->find('LOWER(username)=?', array(strtolower($this->username)));
     if ($user === null) {
         $user = User::model()->find('LOWER(email)=?', array(strtolower($this->username)));
         if ($user === null) {
             $this->errorCode = self::ERROR_USERNAME_INVALID;
             return 0;
         }
     }
     if (!$user->validatePassword($this->password)) {
         $this->errorCode = self::ERROR_PASSWORD_INVALID;
         return 0;
     } elseif (!$user->active) {
         showMessage(Yii::t('common', 'Login'), Yii::t('common', 'Your account not active. The reasons: you not followed the link in the letter which has been sent at registration. Or administrator deactivate your account'), null, true);
         return 0;
     } else {
         $this->_id = $user->id;
         //$this->_isAdmin = $user->isAdmin;
         if ($user->isAdmin) {
             $this->setState('isAdmin', $user->isAdmin);
         }
         $this->username = $user->username;
         $this->setState('email', $user->email);
         $this->setState('username', $user->username);
         $this->setState('phone', $user->phone);
         $this->errorCode = self::ERROR_NONE;
     }
     return $this->errorCode == self::ERROR_NONE;
 }
开发者ID:alexjkitty,项目名称:estate,代码行数:34,代码来源:UserIdentity.php

示例11: store_livedetailOp

	public function store_livedetailOp(){
		$condition = array();
		$condition['order_id'] = intval($_GET['order_id']);
		$condition['store_id'] = $_SESSION['store_id'];

		$model_live_order = Model('live_order');
		$order = $model_live_order->live_orderInfo($condition);
		if(empty($order)){
			showMessage('该订单不存在','','','error');
		}
		Tpl::output('order',$order);

		$pwd_condition		= array();
		$pwd_condition['order_id']  = intval($_GET['order_id']);
		$order_pwd = $model_live_order->getLiveOrderPwd($pwd_condition);//抢购券
		Tpl::output('order_pwd',$order_pwd);


		$model_live_groupbuy = Model('live_groupbuy');
		$live_groupbuy = $model_live_groupbuy->live_groupbuyInfo(array('groupbuy_id'=>$order['item_id']));
		Tpl::output('live_groupbuy',$live_groupbuy);

		$this->profile_menu('store_livedetail');
		Tpl::showpage('store_livedetail');
	}
开发者ID:noikiy,项目名称:ejia,代码行数:25,代码来源:store_liveorder.php

示例12: recent_news_configure

 public function recent_news_configure($action = 'show_settings', $widget_data = array())
 {
     if ($this->dx_auth->is_admin() == FALSE) {
         exit;
     }
     switch ($action) {
         case 'show_settings':
             $this->load->library('lib_category');
             $cats = $this->lib_category->build();
             //$this->display_tpl('recent_news_form', array('widget' => $widget_data, 'cats' => $cats));
             $this->render('recent_news_form', array('widget' => $widget_data, 'cats' => $cats));
             break;
         case 'update_settings':
             $this->form_validation->set_rules('news_count', lang("Amount of news", "core"), 'trim|required|is_natural_no_zero|min_length[1]');
             $this->form_validation->set_rules('max_symdols', lang("Maximum number of characters", "core"), 'trim|required|is_natural|min_length[1]');
             if ($this->form_validation->run($this) == FALSE) {
                 showMessage(validation_errors());
             } else {
                 $data = array('news_count' => $_POST['news_count'], 'max_symdols' => $_POST['max_symdols'], 'categories' => $_POST['categories'], 'display' => $_POST['display']);
                 $this->load->module('admin/widgets_manager')->update_config($widget_data['id'], $data);
                 showMessage(lang("Settings have been saved", 'core'));
                 if ($_POST['action'] == 'tomain') {
                     pjax('/admin/widgets_manager/index');
                 }
             }
             break;
         case 'install_defaults':
             $this->load->module('admin/widgets_manager')->update_config($widget_data['id'], $this->defaults);
             break;
     }
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:31,代码来源:core_widgets.php

示例13: loadCommentNotice

 /**
  *	Load Comment Notice
  *
  *	@return	void
  */
 private function loadCommentNotice()
 {
     if (SESSION_USER_LOGGED == false) {
         exit(showMessage($this->lang->words['NoticeAjax']['CommentNotice']['Messages']['NotLogged'], 2));
     } else {
         $this->DB->Arguments($_GET['id']);
         $findSwitchQ = $this->DB->Select("CommentSwitch", "CTM_Notices", "Id = %d");
         $findSwitchR = $this->DB->CountRows($findSwitchQ);
         $findSwitch = $this->DB->FetchRow($findSwitchQ);
         if ($findSwitchR < 1) {
             exit(showMessage($this->lang->words['NoticeAjax']['CommentNotice']['Messages']['NotExists'], 2));
         } elseif ($findSwitch[0] == 0) {
             exit(showMessage($this->lang->words['NoticeAjax']['CommentNotice']['Messages']['Disabled'], 2));
         } elseif (empty($_POST['Character'])) {
             exit(showMessage($this->lang->words['NoticeAjax']['CommentNotice']['Messages']['SelectChar'], 1));
         } elseif (empty($_POST['Text'])) {
             exit(showMessage($this->lang->words['NoticeAjax']['CommentNotice']['Messages']['SetComment'], 1));
         } else {
             $insertData = array("NoticeID" => "%d", "Account" => "%s", "Author" => "%s", "Date" => "%d", "Text" => "%s");
             $this->DB->Arguments(intval($_GET['id']), USER_ACCOUNT, $_POST['Character'], time(), htmlEncode($_POST['Text']));
             $this->DB->Insert("CTM_NoticeComments", $insertData);
             $string = "<script>CTM.AjaxLoad('?app=core&module=notices&load=loadComments&id=" . $_GET['id'] . "','noticeComments');</script>";
             $string .= showMessage($this->lang->words['NoticeAjax']['CommentNotice']['Messages']['Success'], 3);
             exit($string);
         }
     }
 }
开发者ID:ADMTec,项目名称:effectweb-project,代码行数:32,代码来源:ajax.php

示例14: addOp

	/**
	 * 充值添加
	 */
	public function addOp(){
		if (!chksubmit()){
		    //信息输出
		    Tpl::output('menu_sign','predepositrecharge');
		    Tpl::output('menu_sign_url','index.php?act=predeposit');
		    Tpl::output('menu_sign1','predeposit_rechargeadd');
		    Tpl::showpage('charge_pd.add');
		    exit();
		}
		$pdr_amount = abs(floatval($_POST['pdr_amount']));
		if ($pdr_amount <= 0) {
		    showMessage(Language::get('predeposit_recharge_add_pricemin_error'),'','html','error');
		}
        $model_pdr = Model('predeposit');
        $data = array();
        $data['pdr_sn'] = $pay_sn = $model_pdr->makeSn();
        $data['pdr_member_id'] = $_SESSION['member_id'];
        $data['pdr_member_name'] = $_SESSION['member_name'];
        $data['pdr_amount'] = $pdr_amount;
        $data['pdr_add_time'] = TIMESTAMP;
        $insert = $model_pdr->addPdRecharge($data);
        if ($insert) {
            //转向到商城支付页面
            redirect('index.php?act=buy&op=pd_pay&pay_sn='.$pay_sn);
        }
	}
开发者ID:noikiy,项目名称:travel,代码行数:29,代码来源:charge.php

示例15: settings

 public function settings($action = 'get')
 {
     switch ($action) {
         case 'get':
             $this->db->limit(1);
             $this->db->where('name', 'feedback');
             $query = $this->db->get('components');
             if ($query->num_rows() == 1) {
                 $query = $query->row_array();
                 return unserialize($query['settings']);
             }
             break;
         case 'update':
             if (count($_POST) > 0) {
                 $this->load->library('form_validation');
                 $this->form_validation->set_rules('email', lang("E-Mail", 'feedback'), 'trim|valid_email|required|xss_clean');
                 $this->form_validation->set_rules('message_max_len', lang("Maximum message length", 'feedback'), 'trim|integer|required|xss_clean');
                 if ($this->form_validation->run($this) == FALSE) {
                     showMessage(validation_errors(), false, 'r');
                 } else {
                     $data = array('email' => $this->input->post('email'), 'message_max_len' => (int) $this->input->post('message_max_len'));
                     $this->db->where('name', 'feedback');
                     $this->db->update('components', array('settings' => serialize($data)));
                     $this->lib_admin->log(lang("Feedbacks settings was edited", "feedback"));
                     showMessage(lang("Settings have been saved", 'feedback'));
                 }
             }
             break;
     }
 }
开发者ID:RandomUsernameHere,项目名称:megainfo-corporate-cms,代码行数:30,代码来源:admin.php


注:本文中的showMessage函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。