/**
  * 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();
 }
Exemplo n.º 2
0
 /**
  * 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();
 }
Exemplo n.º 3
0
 /**
  * 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();
 }
 /**
  * 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();
 }
Exemplo n.º 5
0
 /**
  * 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();
 }
Exemplo n.º 6
0
<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>
Exemplo n.º 7
0
 /**
  * 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.
         // die()s!
         // Test mail body generation
         // *DO NOT* remove this!  Needed for site testing.
         case 'testMail':
             // Test with
             // http://localhost/contrexx_300/de/index.php?section=Shop&act=testMail&key=&order_id=5
             //MailTemplate::errorHandler();die();
             $order_id = !empty($_GET['order_id']) ? $_GET['order_id'] : 10;
             $key = !empty($_GET['key']) ? $_GET['key'] : 'order_confirmation';
             $arrSubstitution = Orders::getSubstitutionArray($order_id);
             $customer_id = $arrSubstitution['CUSTOMER_ID'];
             $objCustomer = Customer::getById($customer_id);
             if (!$objCustomer) {
                 die("Failed to get Customer for ID {$customer_id}");
                 return false;
             }
             $arrSubstitution += $objCustomer->getSubstitutionArray($customer_id) + self::getSubstitutionArray();
             $arrMailTemplate = array('section' => 'Shop', 'key' => $key, 'lang_id' => $arrSubstitution['LANG_ID'], 'substitution' => &$arrSubstitution, 'to' => '*****@*****.**');
             \DBG::activate(DBG_LOG_FIREPHP);
             //                DBG::activate(DBG_LOG_FILE);
             die(nl2br(contrexx_raw2xhtml(var_export($arrMailTemplate, true))));
             //                DBG::log(MailTemplate::send($arrMailTemplate) ? "Sent successfully" : "Sending FAILED!");
             //                DBG::deactivate(DBG_LOG_FILE);
             break;
         case 'testAttachment':
             \Cx\Core\MailTemplate\Controller\MailTemplate::send(array('from' => '*****@*****.**', 'to' => '*****@*****.**', 'subject' => 'Test Attachment', 'message' => 'Test', 'attachments' => array(0 => 'images/content/banner/qualidator.gif', 'images/content/banner/itnews.gif' => 'Sch�nes Bild')));
             die("Done!");
         case 'pricelist':
             self::send_pricelist();
             break;
         case 'terms':
             // Static content only (fttb)
             break;
             // TODO: Add Order history view (see History.class.php)
             //            case 'history':
             //                self::view_history();
             //                break;
         // TODO: Add Order history view (see History.class.php)
         //            case 'history':
         //                self::view_history();
         //                break;
         case 'destroy':
             self::destroyCart();
             // TODO: Experimental
             //                self::destroyCart(true);
             // No break on purpose
         // TODO: Experimental
         //                self::destroyCart(true);
         // No break on purpose
         case 'lastFive':
         case 'products':
         default:
             self::view_product_overview();
     }
     // Note that the Shop Navbar *MUST* be set up *after* the request
     // has been processed, otherwise the cart info won't be up to date!
     self::setNavbar();
     // TODO: Set the Messages in the global template instead when that's ready
     \Message::show(self::$objTemplate);
     //\DBG::deactivate();
     return self::$objTemplate->get();
 }
Exemplo n.º 8
0
 /**
  * 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']) ? '&amp;cmd=' . htmlentities($_GET['cmd'], ENT_QUOTES, CONTREXX_CHARSET) : '';
     $this->_overviewMedia();
     \Message::show($this->_objTpl);
     return $this->_objTpl->get();
 }
Exemplo n.º 9
0
 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,
     		102 => 1,
     		),
     		1=> array(
     		1101 => 1,
     		1102 => 1,
     		),
     		);*/
     ########################
     if (!empty($info)) {
         //获取会员信息
         if ($need_member_info && $member_id) {
             $member_info = $this->get_member_info($member_id);
         }
         ######################
         /*$member_id = array(
         		0 => array(
         		101 => array('nick_name'=>'hoge','sex'=>'male'),
         		102 => array('nick_name'=>'hoge','sex'=>'male'),
         		),
         		1=> array(
         		1101 => array('nick_name'=>'hoge','sex'=>'male'),
         		1102 => array('nick_name'=>'hoge','sex'=>'male'),
         		),
         		);*/
         ########################
         if ($this->input['need_count']) {
             foreach ($info as $key => $val) {
                 if ($need_member_info && $member_info && $member_info[$val['member_type']][$val['member_id']]) {
                     $info[$key]['member_info'] = $member_info[$val['member_type']][$val['member_id']];
                 }
             }
             $totalcount = $this->return_count();
             $this->addItem_withkey('total', $totalcount['total']);
             $this->addItem_withkey('data', $info);
         } else {
             foreach ($info as $key => $val) {
                 //反序列化最后一次回复
                 if ($val['last_reply']) {
                     $val['last_reply'] = unserialize($val['last_reply']);
                 }
                 //整理会员信息
                 if ($need_member_info && $member_info && $member_info[$val['member_type']][$val['member_id']]) {
                     $val['member_info'] = $member_info[$val['member_type']][$val['member_id']];
                 }
                 if ($this->user['user_id'] && $val['member_id'] == $this->user['user_id']) {
                     $val['is_my'] = 1;
                 } else {
                     $val['is_my'] = 0;
                 }
                 $this->addItem($val);
             }
         }
     }
     $this->output();
 }
Exemplo n.º 10
0
 /**
  * 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();
 }
Exemplo n.º 11
0
 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();
 }
Exemplo n.º 12
0
 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 {
                     if ($v['state'] == '3') {
                         $v['state'] = '屏蔽字';
                     } else {
                         $v['state'] = '待审核';
                     }
                 }
             }
             //没有用户名用ip替代
             if ($v['author']) {
                 $v['username'] = $v['author'];
             } else {
                 if (!$v['username']) {
                     $v['username'] = $v['ip'];
                 }
             }
             //整合会员信息
             if ($need_member_info && $member_info[$v['member_id']]) {
                 $v['member_info'] = $member_info[$v['member_id']];
             }
             $this->addItem($v);
         }
     }
     $this->output();
 }
Exemplo n.º 13
0
 /**
  * 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();
 }
Exemplo n.º 14
0
<?php

require __DIR__ . '/Message.php';
function redirect($url)
{
    header('Location: ' . $url);
    exit;
}
$app = new Message();
var_dump($_SESSION);
$app->success("Shit");
echo $app->show();
Exemplo n.º 15
0
 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');
 }
Exemplo n.º 16
0
                    </ul>
                </li>
                <li><a href="logout.php"><span class="glyphicon glyphicon-log-out"></span> Wyloguj się</a></li>
            </ul>
        </div>
    </div>
</nav>
<div class="row">
    <div class="col-sm-4">

    </div>
    <div class="col-sm-4">
        <table class="table table-striped">
            <!-- Wyświetla treść i informacje o wiadomości -->
            <?php 
$message->show();
$mysqli->close();
?>
        </table>
    </div>
    <div class="col-sm-4">

    </div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"
        integrity="sha256-KXn5puMvxCw+dAYznun+drMdG1IFl3agK0p/pqT9KAo= sha512-2e8qq0ETcfWRI4HJBzQiA3UoyFk6tbNyG+qSaIBZLyW9Xf3sWZHN/lxe9fTh1U45DpPf07yj94KsUHHWe4Yk1A=="
        crossorigin="anonymous"></script>
</body>
</html>