in /home/airsofta/domains/aa-store.ch/public_html/lib/vendor/yiisoft/yii2/db/Connection.php at line 579
$token = 'Opening DB connection: ' . $this->dsn; try { Yii::info($token, __METHOD__); Yii::beginProfile($token, __METHOD__); $this->pdo = $this->createPdoInstance(); $this->initConnection(); Yii::endProfile($token, __METHOD__); } catch (\PDOException $e) { Yii::endProfile($token, __METHOD__); throw new Exception($e->getMessage(), $e->errorInfo, (int) $e->getCode(), $e); } } /** * Closes the currently active DB connection. * It does nothing if the connection is already closed. */ public function close() {
* Returns the PDO instance for the currently active master connection. * This method will open the master DB connection and then return [[pdo]]. * @return PDO the PDO instance for the currently active master connection. */ public function getMasterPdo() { $this->open(); return $this->pdo; } /** * Returns the currently active slave connection. * If this method is called the first time, it will try to open a slave connection when [[enableSlaves]] is true.
* is available and `$fallbackToMaster` is false. */ public function getSlavePdo($fallbackToMaster = true) { $db = $this->getSlave(false); if ($db === null) { return $fallbackToMaster ? $this->getMasterPdo() : null; } else { return $db->pdo; } } /**
public function quoteValue($str) { if (!is_string($str)) { return $str; } if (($value = $this->db->getSlavePdo()->quote($str)) !== false) { return $value; } else { // the driver doesn't support quote (e.g. oci) return "'" . addcslashes(str_replace("'", "''", $str), "\000\n\r\\\032") . "'"; } }
* @param string $value string to be quoted * @return string the properly quoted string * @see http://www.php.net/manual/en/function.PDO-quote.php */ public function quoteValue($value) { return $this->getSchema()->quoteValue($value); } /** * Quotes a table name for use in a query. * If the table name contains schema prefix, the prefix will also be properly quoted. * If the table name is already quoted or contains special characters including '(', '[[' and '{{',
$params = []; foreach ($this->params as $name => $value) { if (is_string($name) && strncmp(':', $name, 1)) { $name = ':' . $name; } if (is_string($value)) { $params[$name] = $this->db->quoteValue($value); } elseif (is_bool($value)) { $params[$name] = ($value ? 'TRUE' : 'FALSE'); } elseif ($value === null) { $params[$name] = 'NULL'; } elseif (!is_object($value) && !is_resource($value)) { $params[$name] = $value;
* @return mixed the method execution result * @throws Exception if the query causes any problem * @since 2.0.1 this method is protected (was private before). */ protected function queryInternal($method, $fetchMode = null) { $rawSql = $this->getRawSql(); Yii::info($rawSql, 'yii\db\Command::query'); if ($method !== '') { $info = $this->db->getQueryCacheInfo($this->queryCacheDuration, $this->queryCacheDependency); if (is_array($info)) {
* @return array all rows of the query result. Each array element is an array representing a row of data. * An empty array is returned if the query results in nothing. * @throws Exception execution failed */ public function queryAll($fetchMode = null) { return $this->queryInternal('fetchAll', $fetchMode); } /** * Executes the SQL statement and returns the first row of the result. * This method is best used when only the first row of result is needed for a query. * @param integer $fetchMode the result fetch mode. Please refer to [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php)
* @param Connection $db the database connection used to generate the SQL statement. * If this parameter is not given, the `db` application component will be used. * @return array the query results. If the query results in nothing, an empty array will be returned. */ public function all($db = null) { $rows = $this->createCommand($db)->queryAll(); return $this->populate($rows); } /** * Converts the raw query results into the format as specified by this query. * This method is internally used to convert the data fetched from database
* @param Connection $db the DB connection used to create the DB command. * If null, the DB connection returned by [[modelClass]] will be used. * @return array|ActiveRecord[] the query results. If the query results in nothing, an empty array will be returned. */ public function all($db = null) { return parent::all($db); } /** * @inheritdoc */ public function prepare($builder)
Global $customer_groups_id, $salemaker_array; if ($customer_groups_id && !check_customer_groups($customer_groups_id, 'is_promotion_allowed')){ return; } $salemaker_array = array(); $promotions = \common\models\promotions\Promotions::find()->where(['promo_status' => 1, 'platform_id' => PLATFORM_ID])->andWhere('promo_date_expired >= curdate() or promo_date_expired = "0000-00-00" or promo_date_expired is null')->andWhere('promo_date_start <= curdate() or promo_date_start = "0000-00-00" or promo_date_start is null')->andWhere('promo_class <> "specials"')->orderBy('promo_priority')->with('sets')->with('conditions')->all(); if ($promotions && is_array($promotions)){ $time_tmp=tep_db_fetch_array(tep_db_query("SELECT UNIX_TIMESTAMP() as server_time")); foreach ($promotions as $promo){ $products = [];
/*** * actions moved to \frontend\models\Cartfactory ***/ self::tep_update_whos_online(); self::tep_expire_specials(); self::tep_check_selemaker(); self::tep_expire_featured(); /// $user_agent = $_SERVER['HTTP_USER_AGENT']; if (stripos($user_agent, 'iphone') !== false || stripos($user_agent, 'ipod') !== false ||
} } $HTTP_SESSION_VARS =& $_SESSION; InitFactory::init(); } }
if (!isset($component)) { $component = Yii::createObject($class); } if ($component instanceof BootstrapInterface) { Yii::trace("Bootstrap with " . get_class($component) . '::bootstrap()', __METHOD__); $component->bootstrap($this); } else { Yii::trace("Bootstrap with " . get_class($component), __METHOD__); } } }
protected function bootstrap() { $request = $this->getRequest(); Yii::setAlias('@webroot', dirname($request->getScriptFile())); Yii::setAlias('@web', $request->getBaseUrl()); parent::bootstrap(); } /** * Handles the specified request. * @param Request $request the request to be handled * @return Response the resulting response
/** * @inheritdoc */ public function init() { $this->state = self::STATE_INIT; $this->bootstrap(); } /** * Initializes extensions and executes bootstrap components. * This method is called by [[init()]] after the application has been fully configured. * If you override this method, make sure you also call the parent implementation.
*/ public function __construct($config = []) { if (!empty($config)) { Yii::configure($this, $config); } $this->init(); } /** * Initializes the object. * This method is invoked at the end of the constructor after the object is initialized with the * given configuration.
$this->state = self::STATE_BEGIN; $this->preInit($config); $this->registerErrorHandler($config); Component::__construct($config); } /** * Pre-initializes the application. * This method is called at the beginning of the application constructor. * It initializes several important application properties.
require(__DIR__ . '/../../common/config/main.php'), require(__DIR__ . '/../../common/config/main-local.php'), require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); $application = new yii\web\Application($config); $application->run();
} */ //old engine require('includes/application_top.php'); require(__DIR__ . '/lib/frontend/web/index.php'); require_once('includes/application_bottom.php');
$_GET = [ 'language' => 'fr', ]; $_SERVER = [ 'PHPRC' => '/home/airsofta/domains/aa-store.ch/fcgi-bin/../etc/php7.1', 'SCRIPT_FILENAME' => '/home/airsofta/domains/aa-store.ch/public_html/index.php', 'PATH' => '/usr/local/bin:/usr/bin:/bin', 'PWD' => '/home/airsofta/domains/aa-store.ch/fcgi-bin', 'SHLVL' => '0', 'PHP_FCGI_MAX_REQUESTS' => '99999', 'CONTENT_LENGTH' => '0', 'SCRIPT_NAME' => '/index.php', 'REQUEST_URI' => '/helikon-hybrid-outback-pants-duracanvas-cloud-grey-black-a-m-xlong?language=fr', 'QUERY_STRING' => 'language=fr', 'REQUEST_METHOD' => 'GET', 'SERVER_PROTOCOL' => 'HTTP/1.0', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'REDIRECT_URL' => '/helikon-hybrid-outback-pants-duracanvas-cloud-grey-black-a-m-xlong', 'REDIRECT_QUERY_STRING' => 'language=fr', 'REMOTE_PORT' => '44826', 'SERVER_ADMIN' => '[no address given]', 'DOCUMENT_ROOT' => '/home/airsofta/domains/aa-store.ch/public_html', 'REMOTE_ADDR' => '3.80.131.164', 'SERVER_PORT' => '443', 'SERVER_ADDR' => '87.98.254.50', 'SERVER_NAME' => 'www.aa-store.ch', 'SERVER_SOFTWARE' => 'Apache/2.2.22 (Debian)', 'SERVER_SIGNATURE' => 'Apache/2.2.22 (Debian) Server at www.aa-store.ch Port 443 ', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_ACCEPT' => '*/*', 'HTTP_CONNECTION' => 'close', 'HTTP_X_FORWARDED_PROTO' => 'https', 'HTTP_X_FORWARDED_FOR' => '3.80.131.164', 'HTTP_X_REAL_IP' => '3.80.131.164', 'HTTP_HOST' => 'www.aa-store.ch', 'HTTPS' => 'on', 'SCRIPT_URI' => 'https://www.aa-store.ch/helikon-hybrid-outback-pants-duracanvas-cloud-grey-black-a-m-xlong', 'SCRIPT_URL' => '/helikon-hybrid-outback-pants-duracanvas-cloud-grey-black-a-m-xlong', 'REDIRECT_STATUS' => '200', 'REDIRECT_HTTPS' => 'on', 'REDIRECT_SCRIPT_URI' => 'https://www.aa-store.ch/helikon-hybrid-outback-pants-duracanvas-cloud-grey-black-a-m-xlong', 'REDIRECT_SCRIPT_URL' => '/helikon-hybrid-outback-pants-duracanvas-cloud-grey-black-a-m-xlong', 'FCGI_ROLE' => 'RESPONDER', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1711672800.788131, 'REQUEST_TIME' => 1711672800, ]; $_SESSION = [ 'language' => '', 'languages_id' => '11', 'locale' => 'fr_CH', 'currency_id' => '3', 'currency' => 'CHF', ];