Example #1
0
 /**
  * Sets tag value
  *
  * @param string $sTag tag value
  */
 public function __construct($sTag = null)
 {
     parent::__construct();
     if ($sTag !== null) {
         $this->set($sTag);
     }
 }
Example #2
0
 /**
  * Returns cookie stored used login data
  *
  * @param string $sShopId shop ID (default null)
  *
  * @return string
  */
 public function getUserCookie($sShopId = null)
 {
     $myConfig = parent::getConfig();
     $sShopId = !$sShopId ? $myConfig->getShopId() : $sShopId;
     // check for SSL connection
     if (!$myConfig->isSsl() && $this->getOxCookie('oxid_' . $sShopId . '_autologin') == '1') {
         $sSslUrl = rtrim($myConfig->getSslShopUrl(), '/') . $_SERVER['REQUEST_URI'];
         if (stripos($sSslUrl, 'https') === 0) {
             oxRegistry::getUtils()->redirect($sSslUrl, true, 302);
         }
     }
     if (array_key_exists($sShopId, $this->_aUserCookie) && $this->_aUserCookie[$sShopId] !== null) {
         return $this->_aUserCookie[$sShopId] ? $this->_aUserCookie[$sShopId] : null;
     }
     return $this->_aUserCookie[$sShopId] = $this->getOxCookie('oxid_' . $sShopId);
 }
Example #3
0
 /**
  * Admin mode setter
  *
  * @param bool $blAdmin admin mode
  */
 public function setAdminMode($blAdmin)
 {
     self::$_blIsAdmin = $blAdmin;
 }
Example #4
0
 /**
  * ShopControl constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->offlineWarningTimestampFile = OX_BASE_PATH . 'log/last-offline-warning-timestamp.log';
 }