本文整理汇总了PHP中Message::show方法的典型用法代码示例。如果您正苦于以下问题:PHP Message::show方法的具体用法?PHP Message::show怎么用?PHP Message::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Message
的用法示例。
在下文中一共展示了Message::show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parsePage
/**
* Use this to parse your backend page
*
* You will get the template located in /View/Template/{CMD}.html
* You can access Cx class using $this->cx
* To show messages, use \Message class
*
* @param \Cx\Core\Html\Sigma $template template for current CMD
* @param array $cmd CMD separated by slashes
*/
public function parsePage(\Cx\Core\Html\Sigma $template, array $cmd)
{
$this->template = $template;
//GeoIp configuration setting
self::initConfig();
$this->showOverview();
\Message::show();
}
示例2: parsePage
/**
* Use this to parse your backend page
*
* You will get the template located in /View/Template/{CMD}.html
* You can access Cx class using $this->cx
* To show messages, use \Message class
* @param \Cx\Core\Html\Sigma $template Template for current CMD
* @param array $cmd CMD separated by slashes
*/
public function parsePage(\Cx\Core\Html\Sigma $template, array $cmd)
{
// this class inherits from Controller, therefore you can get access to
// Cx like this:
$this->cx;
$this->template = $template;
$act = $cmd[0];
$this->connectToController($act);
\Message::show();
}
示例3: parsePage
/**
* Use this to parse your backend page
*
* You will get the template located in /View/Template/{CMD}.html
* You can access Cx class using $this->cx
* To show messages, use \Message class
* @param \Cx\Core\Html\Sigma $template Template for current CMD
* @param array $cmd CMD separated by slashes
*/
public function parsePage(\Cx\Core\Html\Sigma $template, array $cmd)
{
// this class inherits from Controller, therefore you can get access to
// Cx like this:
$this->cx;
$this->template = $template;
// instantiate the default View Controller
$objController = new \Cx\Core\NetManager\Controller\DefaultController($this->getSystemComponentController(), $this->cx);
$objController->parsePage($this->template);
\Message::show();
}
示例4: parsePage
/**
* Use this to parse your backend page
*
* You will get the template located in /View/Template/{CMD}.html
* You can access Cx class using $this->cx
* To show messages, use \Message class
* @param \Cx\Core\Html\Sigma $template Template for current CMD
* @param array $cmd CMD separated by slashes
*/
public function parsePage(\Cx\Core\Html\Sigma $template, array $cmd)
{
// this class inherits from Controller, therefore you can get access to
// Cx like this:
$this->cx;
$this->template = $template;
$act = $cmd[0];
/* If the act is not empty, we are not on the first tab an we can use parsePage() from
SystemComponentBackendController to create the view.
If act is empty, we are on first tab where parent::parsePage() will not work, because ViewGenerator does
not support views on first tab of components.
Note: This function (parsePage) can be removed as soon as ViewGenerator has first tab support
*/
if ($act != '') {
parent::parsePage($template, $cmd);
} else {
$this->connectToController('Default');
}
\Message::show();
}
示例5: parsePage
/**
* Use this to parse your backend page
*
* You will get the template located in /View/Template/{CMD}.html
* You can access Cx class using $this->cx
* To show messages, use \Message class
* @param \Cx\Core\Html\Sigma $template Template for current CMD
* @param array $cmd CMD separated by slashes
*/
public function parsePage(\Cx\Core\Html\Sigma $template, array $cmd)
{
// this class inherits from Controller, therefore you can get access to
// Cx like this:
$this->cx;
$this->template = $template;
$act = $cmd[0];
//Check whether the page has the permission to access
$this->checkAccessPermission($act);
/* If the act is not empty, we are not on the first tab an we can use parsePage() from
SystemComponentBackendController to create the view.
If act is empty, we are on first tab where parent::parsePage() will not work, because ViewGenerator does
not support views on first tab of components.
We use a own controller for subscriptions because we have an filter there.
*/
if ($act != '' && $act != 'subscription') {
parent::parsePage($this->template, $cmd);
} else {
$this->connectToController($act);
}
\Message::show();
}
示例6:
<div class="row">
<?php
echo Message::show();
?>
<?php
if (SESSION::get('admin')) {
?>
<a id="editreihenfolge" class="waves-effect waves-light btn btn-navigator" style="background-color:#4db6ac;" href="#">Reihenfolge aktualisieren</a><br><br>
<a class="modal-trigger-newBilder waves-effect waves-light btn btn-navigator" style="background-color:#40c4ff" href="#modalNewBilder">Neue Bilder hochladen</a><br><br>
<div id="modalNewBilder" class="modal">
<div class="modal-content">
<form action="<?php
echo DIR;
?>
portfolio/uploadBilder" method="POST" enctype="multipart/form-data">
<div class="row input-field">
<div class="file-field col s12">
<input type="hidden" name="album_id" value="<?php
echo $data['id_album'];
?>
">
<div class="btn">
<span>Datei</span>
<input type="file" name="images[]" multiple="">
</div>
<div class="file-path-wrapper">
<input class="file-path validate" type="text" placeholder="Ein oder mehr Bilder hochladen">
</div>
</div>
<input type="submit" class="right btn submit" value="Hochladen">
</div>
示例7: getPage
/**
* Returns the Shop page for the present parameters
* @param string $template The page template
* @return string The page content
*/
static function getPage($template)
{
//\DBG::activate(DBG_ERROR_FIREPHP);
//\DBG::activate(DBG_LOG_FILE);
self::init();
self::registerJavascriptCode();
// PEAR Sigma template
self::$objTemplate = new \Cx\Core\Html\Sigma('.');
self::$objTemplate->setErrorHandling(PEAR_ERROR_DIE);
self::$objTemplate->setTemplate($template);
// Global module index for clones
self::$objTemplate->setGlobalVariable('MODULE_INDEX', MODULE_INDEX);
// Do this *before* calling our friends, especially Customer methods!
// Pick the default Country for delivery
if (empty($_SESSION['shop']['countryId2'])) {
$_SESSION['shop']['countryId2'] = isset($_POST['countryId2']) ? intval($_POST['countryId2']) : \Cx\Core\Setting\Controller\Setting::getValue('country_id', 'Shop');
}
// TODO: This should be set up in a more elegant way
Vat::is_reseller(self::$objCustomer && self::$objCustomer->is_reseller());
// The coupon code may be set when entering the Shop already
if (isset($_REQUEST['coupon_code'])) {
global $sessionObj;
if (!$sessionObj) {
$sessionObj = \cmsSession::getInstance();
}
$_SESSION['shop']['coupon_code'] = trim(strip_tags(contrexx_input2raw($_REQUEST['coupon_code'])));
//\DBG::log("Coupon Code: Set to ".$_SESSION['shop']['coupon_code']);
}
//\DBG::log("Shop::getPage(): Entered");
// Global placeholders that are used on (almost) all pages.
// Add more as desired.
self::$objTemplate->setGlobalVariable(array('SHOP_CURRENCY_CODE' => Currency::getActiveCurrencyCode(), 'SHOP_CURRENCY_SYMBOL' => Currency::getActiveCurrencySymbol()));
if (!isset($_GET['cmd'])) {
$_GET['cmd'] = '';
}
if (!isset($_GET['act'])) {
$_GET['act'] = $_GET['cmd'];
}
switch ($_GET['act']) {
case 'shipment':
self::showShipmentTerms();
break;
case 'success':
self::success();
break;
case 'confirm':
self::confirm();
break;
case 'lsv':
case 'lsv_form':
self::view_lsv_form();
break;
case 'payment':
self::payment();
break;
case 'account':
self::view_account();
break;
case 'cart':
self::cart();
break;
case 'discounts':
self::discounts();
break;
case 'login':
self::login();
break;
case 'paypalIpnCheck':
// OBSOLETE -- Handled by PaymentProcessing::checkIn() now
$objPaypal = new \PayPal();
$objPaypal->ipnCheck();
exit;
case 'sendpass':
self::view_sendpass();
break;
case 'changepass':
self::_changepass();
break;
// Test for PayPal IPN.
// *DO NOT* remove this! Needed for site testing.
// Test for PayPal IPN.
// *DO NOT* remove this! Needed for site testing.
case 'testIpn':
\PayPal::testIpn();
// die()s!
// Test for PayPal IPN validation
// *DO NOT* remove this! Needed for site testing.
// die()s!
// Test for PayPal IPN validation
// *DO NOT* remove this! Needed for site testing.
case 'testIpnValidate':
\PayPal::testIpnValidate();
// die()s!
// Test mail body generation
// *DO NOT* remove this! Needed for site testing.
//.........这里部分代码省略.........
示例8: getMediaPage
/**
* Gets the requested page
* @global array $_ARRAYLANG,$_CONFIG
* @return string parsed content
*/
function getMediaPage()
{
global $_ARRAYLANG, $template;
$this->webPath = $this->getWebPath($this->arrWebPaths[$this->archive]);
$this->path = \Env::get('cx')->getWebsitePath() . $this->webPath;
$this->getCmd = !empty($_GET['cmd']) ? '&cmd=' . htmlentities($_GET['cmd'], ENT_QUOTES, CONTREXX_CHARSET) : '';
$this->_overviewMedia();
\Message::show($this->_objTpl);
return $this->_objTpl->get();
}
示例9: show
public function show()
{
//cmid发布库id,cid内容id,member_id评论者Id
if (!$this->input['cmid'] && !$this->input['cid'] && !$this->input['member_id'] && !$this->input['content_id'] && !$this->user['user_id'] && !$this->input['site_id'] && !intval($this->input['groupid'])) {
$this->errorOutput(PARALACK);
}
//内容id请求评论时要传入app_uniqueid,mod_uniqueid
if ($this->input['cid'] || $this->input['content_id']) {
if (!$this->input['app_uniqueid'] || !$this->input['mod_uniqueid']) {
$this->errorOutput(NOUNIQUEID);
}
}
$offset = $this->input['offset'] ? intval(urldecode($this->input['offset'])) : 0;
$count = $this->input['count'] ? intval(urldecode($this->input['count'])) : 10;
$limit = " limit {$offset}, {$count}";
//获取评论设置
$set = $this->comment_set();
//显示顺序
$order = $set['display_order'];
if ($order) {
$descasc = 'DESC';
} else {
$descasc = 'ASC';
}
//查询用户自己的所有评论
if ($this->input['my_conment'] && $this->user['user_id']) {
$member_id = $this->user['user_id'] ? $this->user['user_id'] : $this->input['member_id'];
$sql = 'SELECT table_name FROM ' . DB_PREFIX . 'comment_point ORDER BY id DESC';
$q = $this->db->query($sql);
$table_name = array();
while ($r = $this->db->fetch_array($q)) {
$table_name[] = $r['table_name'];
}
if (!empty($table_name)) {
$sql = "SELECT * FROM (";
foreach ($table_name as $v) {
$sql .= " SELECT * FROM " . DB_PREFIX . $v . " UNION ALL ";
}
$sql = rtrim($sql, 'UNION ALL');
$sql .= ")t WHERE member_id = " . $member_id . " ORDER BY pub_time DESC " . $limit;
}
$q = $this->db->query($sql);
while ($r = $this->db->fetch_array($q)) {
$res[] = $r;
}
} else {
//按点赞数排序
if ($this->input['hot_comment']) {
$orderby = ' ORDER BY m.useful ' . $descasc;
} else {
$orderby = ' ORDER BY m.id ' . $descasc;
}
$condition = $this->get_condition();
$mes = new Message();
$field = ' m.id,m.fid,m.title,m.content_title,m.app_uniqueid,m.mod_uniqueid,m.userid,m.username,m.member_id,m.member_type,m.author,m.pub_time,m.ip,m.ip_info,m.state,m.content,m.useful,m.yawp,m.contentid,m.cmid,m.appname,m.order_id,m.last_reply,m.floor,m.floor_reply,m.reply_num,m.baidu_longitude,m.baidu_latitude,m.address ';
$res = $mes->show($field, $condition, $orderby, $limit);
}
if (!$res) {
$this->addItem();
$this->output();
}
$need_reply = $this->input['need_reply'];
//需要查询恢复
$reply_count = intval($this->input['reply_count']);
$reply_count = $reply_count ? $reply_count : 10;
//查询回复个数
$need_member_info = intval($this->input['need_member_info']);
//需要用户信息
$info = array();
foreach ($res as $k => $v) {
//查询回复上层评论
if ($need_reply && $v['fid'] && $v['tablename']) {
$comment = array();
$comment = $this->get_comments_reply($v['fid'], $v['tablename'], $reply_count, $need_member_info);
if (!empty($comment)) {
ksort($comment);
$v['up'] = $comment;
}
}
//替换ip后2位
if ($v['ip']) {
$arr = array();
$arr = explode('.', $v['ip']);
if (!empty($arr)) {
$arr[2] = '*';
$arr[3] = '*';
$v['ip'] = implode('.', $arr);
}
}
//不需要用户信息,显示昵称或者部分ip
$v['username'] = $this->check_username($v['author'], $v['user_id'], $v['ip'], $v['username']);
if ($need_member_info) {
$member_id[$v['member_type']][$v['member_id']] = 1;
}
$info[] = $v;
}
######################
/*$member_id = array(
0 => array(
101 => 1,
//.........这里部分代码省略.........
示例10: loadContent
/**
* This parses the content
*
* This cannot be used in mode self::MODE_COMMAND, since content is added to template directly
* @todo Write a method, that only returns the content, in order to allow usage in CLI mode
* @todo Remove usage of globals
* @global type $plainSection
* @global type $_ARRAYLANG
*/
protected function loadContent()
{
global $plainSection, $_ARRAYLANG;
if ($this->mode == self::MODE_COMMAND) {
return;
}
// init module language
$_ARRAYLANG = \Env::get('init')->loadLanguageData($plainSection);
// load module
if (empty($plainSection) && $this->mode != self::MODE_BACKEND) {
return;
}
$this->ch->callPreContentParseHooks();
$this->ch->loadComponent($this, $plainSection, $this->resolvedPage);
// This would be a postContentParseHook:
\Message::show();
$this->ch->callPostContentParseHooks();
}
示例11: setPassword
function setPassword($userId, $pw)
{
/* --------------------------------------------
Diese Methode setzt dem Benutzer der
ÃÂÃÂÃÂÃÂbergebenen ID das angegebene Passwort
-------------------------------------------- */
//USER-ROW HOLEN
$r = $this->USERTABLE->getUser($userId);
//PASSWORT SPEICHERN
$upd = "UPDATE user SET Pw = '" . md5($pw) . "' WHERE id = " . $r['id'];
$this->DBCONNECT->executeQuery($upd);
//EMAIL TEMPLATE GENERIEREN
$tmplArray = array();
$tmplArray[0] = $r["Vorname"];
$tmplArray[1] = $r["Nachname"];
$tmplArray[2] = $r["User"];
$tmplArray[3] = $pw;
$tmplArray[4] = date("d. m Y");
if ($r["aktiv"] != "J") {
$activateCode = $this->createPw(10);
$upd = "UPDATE user SET activationString = '" . $activateCode . "' WHERE id = " . $r['id'];
$this->DBCONNECT->executeQuery($upd);
$tmplArray[5] = "klicken Sie auf den folgenden Link um Ihren Zugang zu aktivieren:\n \n http://" . $_SERVER["HTTP_HOST"] . "?do=Activate&userActivate=" . $r["id"] . "&ActivationCode=" . $activateCode . "\n ";
}
//MAIL MIT TEMPLATE SENDEN
$mail = new Mail();
$mail->setTo($r["Email"]);
$mail->setFrom("Userverwaltung@" . $_SERVER["HTTP_HOST"]);
$mail->setSendername($r["Email"]);
$mail->setText("In dieser Mail finden Sie ihr neues Passwort.");
$mail->setType("pwrequest");
$mail->setSubject("Login-Informationen fÃÂÃÂÃÂür: " . $_SERVER["HTTP_HOST"]);
$mail->setTemplateArray($tmplArray);
$mail->send();
//MELDUNG AUSGEBEN
$m = new Message("Passwort erstellt", "Ihnen wurde soeben ein neues Passwort per Email zugesendet.");
$m->show();
}
示例12: show
public function show()
{
$this->verify_content_prms(array('_action' => 'manage'));
$offset = $this->input['offset'] ? intval(urldecode($this->input['offset'])) : 0;
$count = $this->input['count'] ? intval(urldecode($this->input['count'])) : 10;
$limit = " limit {$offset}, {$count}";
$orders = array('id');
$descasc = strtoupper($this->input['hgupdn']);
if ($descasc != 'ASC') {
$descasc = 'DESC';
}
if (in_array($this->input['hgorder'], $orders)) {
$orderby = ' ORDER BY ' . $this->input['hgorder'] . ' ' . $descasc;
} else {
$orderby = ' ORDER BY m.order_id ' . $descasc;
}
$condition = $this->get_condition();
$field = ' m.id,m.title,m.content_url,m.app_uniqueid,m.mod_uniqueid,m.userid,m.username,m.member_id,m.author,m.pub_time,m.ip,m.ip_info,m.state,m.content,m.useful,m.yawp,m.contentid,m.cmid,m.appname,m.order_id,m.content_title,m.last_reply,n.name as groupname ';
$join = ' LEFT JOIN ' . DB_PREFIX . 'message_node n ON m.groupid = n.id ';
$mes = new Message();
$res = $mes->show($field, $condition, $orderby, $limit, $join);
//需要会员信息
$need_member_info = intval($this->input['need_member_info']);
if (is_array($res) && count($res)) {
$cmid = array();
$member_id = array();
//获取有多少内容发布后id
foreach ($res as $key => $val) {
//抓取会员id
if ($need_member_info && $val['member_id']) {
$member_id[$val['member_id']] = 1;
}
//获取发布id
if ($val['cmid']) {
$cmid['app'][$val['cmid']] = 0;
} else {
//栏目
if ($val['app_uniqueid'] == 'column' && $val['mod_uniqueid'] == 'column') {
$cmid['column'][$val['contentid']] = 1;
}
}
}
//获取会员信息
if ($need_member_info && $member_id) {
include_once ROOT_PATH . 'lib/class/member.class.php';
$member = new member();
$mem_ids = array_keys($member_id);
$member_id = implode(',', $mem_ids);
$member_info = $member->getMemberByIds($member_id);
$member_info = $member_info[0];
}
//查询每个发布内容的标题
if (count($cmid)) {
$arr = array();
foreach ($cmid as $key => $val) {
foreach ($val as $k => $v) {
if ($key == 'app') {
$r = $mes->get_publish_content($k);
$v = trim($this->input['content_title']);
$arr['app'][$k] = $v;
} else {
if ($key == 'column') {
$r = $mes->get_publish_content($k, $v);
$v = trim($this->input['content_title']);
$arr['column'][$k] = $v;
}
}
}
}
}
//整合输出内容
foreach ($res as $k => $v) {
//添加内容标题
if (count($arr)) {
if ($v['cmid']) {
foreach ($arr['app'] as $kk => $vv) {
if ($kk == $v['cmid']) {
$v['content_title'] = $vv;
}
}
} else {
if ($v['contentid'] && $v['app_uniqueid'] == 'column') {
if ($arr['column']) {
foreach ($arr['column'] as $kk => $vv) {
if ($kk == $v['contentid']) {
$v['content_title'] = $vv;
}
}
}
}
}
}
$v['status'] = $v['state'];
//状态判断
if ($v['state'] == '1') {
$v['state'] = '已审核';
} else {
if ($v['state'] == '2') {
$v['state'] = '已打回';
} else {
//.........这里部分代码省略.........
示例13: getPage
/**
* Set up the shop admin page
*/
function getPage()
{
global $objTemplate, $_ARRAYLANG;
//\DBG::activate(DBG_ERROR_FIREPHP|DBG_LOG);
if (!isset($_GET['act'])) {
$_GET['act'] = '';
}
switch ($_GET['act']) {
case 'mailtemplate_overview':
case 'mailtemplate_edit':
$_GET['tpl'] = 'mail';
// No break on purpose
// No break on purpose
case 'settings':
$this->view_settings();
break;
case 'categories':
case 'category_edit':
// Includes PDF pricelists
$this->view_categories();
break;
case 'products':
case 'activate_products':
case 'deactivate_products':
$this->view_products();
break;
case 'delProduct':
case 'deleteProduct':
self::$pageTitle = $_ARRAYLANG['TXT_PRODUCT_CATALOG'];
$this->delete_product();
$this->view_products();
break;
case 'orders':
$this->view_order_overview();
break;
case 'orderdetails':
$this->view_order_details();
break;
case 'editorder':
$this->view_order_details(true);
break;
case 'delorder':
// Redirects back to Order overview
$this->delete_order();
break;
case 'delcustomer':
$this->delete_customer();
$this->view_customers();
break;
case 'customer_activate':
case 'customer_deactivate':
$this->customer_activate();
$this->view_customers();
break;
case 'customers':
self::$pageTitle = $_ARRAYLANG['TXT_CUSTOMERS_PARTNERS'];
$this->view_customers();
break;
case 'customerdetails':
self::$pageTitle = $_ARRAYLANG['TXT_CUSTOMER_DETAILS'];
$this->view_customer_details();
break;
case 'neweditcustomer':
$this->view_customer_edit();
break;
case 'statistics':
self::$pageTitle = $_ARRAYLANG['TXT_STATISTIC'];
Orders::view_statistics(self::$objTemplate);
break;
case 'import':
$this->_import();
break;
case 'manufacturer':
$this->view_manufacturers();
break;
default:
$this->view_order_overview();
break;
}
\Message::show();
\Cx\Core\Csrf\Controller\Csrf::add_placeholder(self::$objTemplate);
$objTemplate->setVariable(array('CONTENT_TITLE' => self::$pageTitle, 'ADMIN_CONTENT' => self::$objTemplate->get()));
$this->act = isset($_REQUEST['act']) ? $_REQUEST['act'] : '';
$this->setNavigation();
}
示例14: redirect
<?php
require __DIR__ . '/Message.php';
function redirect($url)
{
header('Location: ' . $url);
exit;
}
$app = new Message();
var_dump($_SESSION);
$app->success("Shit");
echo $app->show();
示例15: search
public function search()
{
$data['title'] = 'Search';
$data['form_header'] = 'Gesuchte Produkte';
$this->_view->render('header', $data);
$this->_view->render('form_header', $data);
if ($_GET['q'] == "") {
Message::set('Geben Sie bitte etwas ein.', 'warning');
echo Message::show();
} elseif (isset($_GET['q'])) {
$find = filter_var($_GET['q'], FILTER_SANITIZE_STRING);
$data['products'] = $this->_model->searchProduct($find);
if ($data['products']) {
$this->_view->render('products/list', $data);
} else {
Message::set('Keine Produkte gefunden.', 'warning');
echo Message::show();
}
}
$this->_view->render('footer');
}