public function __construct($OSE = array(), $FROM = self::FROM_BDD) { parent::__construct(); $this->teatre = array("te_id" => 0, "te_nom" => "", "te_nomVisible" => "", "te_configuracio" => 0); switch ($FROM) { case self::FROM_BDD: foreach ($this->teatre as $K => $V) { $this->teatre[$K] = $OSE[$K]; if ($K == 'te_configuracio') { $this->teatre['te_configuracio'] = json_decode($OSE['te_configuracio'], true); } } break; case self::FROM_JSON: $S = $OSE['teatre']; foreach ($this->teatre as $K => $V) { if (!isset($S[$K])) { throw new MyException("Falta entrar el camp, {$K}"); } else { $this->teatre[$K] = $S[$K]; //if($K == 'te_configuracio') $this->teatre['te_configuracio'] = json_encode($S[$K]); } } break; case self::FROM_EMPTY: $this->teatre['te_id'] = 0; break; } }
public function __construct($OT = NULL, $FROM = self::FROM_EMPTY) { parent::__construct(); $this->localitat['l_zona'] = 0; $this->localitat['l_fila'] = 0; $this->localitat['l_seient'] = 0; $this->localitat['l_idSessio'] = 0; $this->localitat['l_estat'] = ''; $this->localitat['l_pagament'] = ''; $this->localitat['l_data'] = ''; $this->localitat['l_idComanda'] = 0; $this->localitat['l_idPreu'] = ''; $this->localitat['l_codi'] = ''; $this->localitat['l_horaArribada'] = NULL; $this->extres['isNew'] = false; switch ($FROM) { case self::FROM_BDD: foreach ($this->localitat as $K => $V) { $this->localitat[$K] = $OT[$K]; } $this->localitat['l_idPreu'] = json_decode($this->localitat['l_idPreu'], true); $this->localitat['nom_seient'] = $this->localitat['l_zona'] . '-' . $this->localitat['l_fila'] . '-' . $this->localitat['l_seient']; $this->localitat['nom_estat'] = $this->estats[$this->localitat['l_estat']]; break; case self::FROM_JSON: foreach ($this->localitat as $K => $V) { $this->localitat[$K] = $OT['localitat'][$K]; } break; case self::FROM_EMPTY: break; } }
public function __construct($OT = array(), $FROM = self::FROM_BDD) { parent::__construct(); $this->espectacle['e_id'] = 0; $this->espectacle['e_Titol'] = ''; $this->espectacle['e_SrcMin'] = ''; $this->espectacle['e_Resum'] = ''; $this->espectacle['e_Tipus'] = ''; $this->espectacle['e_Html'] = ''; $this->espectacle['e_Imatge'] = ''; $this->espectacle['e_OrganitzadorCif'] = ''; $this->espectacle['e_OrganitzadorNom'] = ''; $this->espectacle['e_Correcte'] = 0; $this->espectacle['e_Companyia'] = ""; switch ($FROM) { case self::FROM_BDD: foreach ($this->espectacle as $K => $V) { $this->espectacle[$K] = $OT[$K]; } break; case self::FROM_JSON: foreach ($this->espectacle as $K => $V) { $this->espectacle[$K] = $OT['espectacle'][$K]; } break; case self::FROM_EMPTY: $this->espectacle['e_id'] = 0; break; } }
public function __construct($OSE = array(), $FROM = self::FROM_BDD) { parent::__construct(); $this->sessio = array("s_id" => 0, "s_idEspectacle" => 0, "s_idTeatre" => 0, "s_Preus" => array(), "s_SeientsLliures" => 0, "s_Localitats" => 0, "s_DataHora" => 0, "s_Correcte" => 0, "s_VisibleWeb" => 0, "s_PermetCompraOnline" => 1, "s_NomesCompraAmics" => 0, "s_DataHoraCompra" => 0); $this->espectacle = new EspectacleTableObject(null, EspectacleTableObject::FROM_EMPTY); switch ($FROM) { case self::FROM_BDD: foreach ($this->sessio as $K => $V) { $this->sessio[$K] = $OSE[$K]; } if (isset($OSE['e_Titol'])) { $this->espectacle = new EspectacleTableObject($OSE, EspectacleTableObject::FROM_BDD); } $this->generaExtres(); break; case self::FROM_JSON: $S = $OSE['sessio']; foreach ($this->sessio as $K => $V) { if (!isset($S[$K])) { throw new MyException("Falta entrar el camp, {$K}"); } else { $this->sessio[$K] = $S[$K]; } } $this->sessio['s_Preus'] = json_encode($this->sessio['s_Preus']); $this->generaExtres(); break; case self::FROM_FORM: $S = $OSE['sessio']; foreach ($this->sessio as $K => $V) { if (!isset($S[$K])) { throw new MyException("Falta entrar el camp, {$K}"); } else { $this->sessio[$K] = $S[$K]; } } if (!isset($OSE['sessio']['tmp_Hora']) || !isset($OSE['sessio']['tmp_Dia'])) { throw new MyException("Has d'entrar algun dia i hora per la sessió."); } else { //Guardo el dia i hora de la sessió $this->sessio['tmp_Hora'] = $OSE['sessio']['tmp_Hora']; $this->sessio['tmp_Dia'] = $OSE['sessio']['tmp_Dia']; $this->sessio['s_Preus'] = json_encode($this->sessio['s_Preus']); } if (!isset($OSE['sessio']['tmp_HoraCompra']) || empty($OSE['sessio']['tmp_HoraCompra']) || !isset($OSE['sessio']['tmp_DiaCompra']) || empty($OSE['sessio']['tmp_DiaCompra'])) { throw new MyException("Has d'entrar algun dia i hora per començar a vendre entrades."); } else { //Guardo el dia i hora de la sessió $this->sessio['tmp_HoraCompra'] = $OSE['sessio']['tmp_HoraCompra']; $this->sessio['tmp_DiaCompra'] = $OSE['sessio']['tmp_DiaCompra']; } $this->generaExtres(self::FROM_FORM); break; case self::FROM_EMPTY: $this->sessio['s_id'] = 0; $this->sessio['s_Preus'] = array(); break; } }
/** * Call the parent construct */ function __construct() { parent::__construct(); $this->moviesql = 'SELECT * FROM ' . PREFIX . 'movie'; $this->yearsql = 'SELECT ' . PREFIX . 'movie.title, ' . PREFIX . 'movie.description, ' . PREFIX . 'movie.seoname FROM ' . PREFIX . 'movie_year INNER JOIN ' . PREFIX . 'movie ON ' . PREFIX . 'movie.id = ' . PREFIX . 'movie_year.movie_id INNER JOIN ' . PREFIX . 'yr ON ' . PREFIX . 'yr.id = ' . PREFIX . 'movie_year.year_id WHERE ' . PREFIX . 'yr.yr=:yr'; $this->actorsql = 'SELECT ' . PREFIX . 'movie.title, ' . PREFIX . 'movie.description, ' . PREFIX . 'movie.seoname FROM ' . PREFIX . 'movie_actor INNER JOIN ' . PREFIX . 'movie ON ' . PREFIX . 'movie.id = ' . PREFIX . 'movie_actor.movie_id INNER JOIN ' . PREFIX . 'actor ON ' . PREFIX . 'actor.id = ' . PREFIX . 'movie_actor.actor_id WHERE ' . PREFIX . 'actor.actorseo=:actor'; $this->genresql = 'SELECT ' . PREFIX . 'movie.title, ' . PREFIX . 'movie.description, ' . PREFIX . 'movie.seoname FROM ' . PREFIX . 'movie_genre INNER JOIN ' . PREFIX . 'movie ON ' . PREFIX . 'movie.id = ' . PREFIX . 'movie_genre.movie_id INNER JOIN ' . PREFIX . 'genre ON ' . PREFIX . 'genre.id = ' . PREFIX . 'movie_genre.genre_id WHERE ' . PREFIX . 'genre.seogenre=:genre'; $this->countrysql = 'SELECT ' . PREFIX . 'movie.title, ' . PREFIX . 'movie.description, ' . PREFIX . 'movie.seoname FROM ' . PREFIX . 'movie_origin INNER JOIN ' . PREFIX . 'movie ON ' . PREFIX . 'movie.id = ' . PREFIX . 'movie_origin.movie_id INNER JOIN ' . PREFIX . 'origin ON ' . PREFIX . 'origin.id = ' . PREFIX . 'movie_origin.origin_id WHERE ' . PREFIX . 'origin.countryseo=:country'; $this->languagesql = 'SELECT ' . PREFIX . 'movie.title, ' . PREFIX . 'movie.description, ' . PREFIX . 'movie.seoname FROM ' . PREFIX . 'movie_languages INNER JOIN ' . PREFIX . 'movie ON ' . PREFIX . 'movie.id = ' . PREFIX . 'movie_languages.movie_id INNER JOIN ' . PREFIX . 'language ON ' . PREFIX . 'language.id = ' . PREFIX . 'movie_languages.language_id WHERE ' . PREFIX . 'language.languageseo=:language'; $this->ratingsql = 'SELECT ' . PREFIX . 'movie.title, ' . PREFIX . 'movie.description, ' . PREFIX . 'movie.seoname FROM ' . PREFIX . 'movie_rating INNER JOIN ' . PREFIX . 'movie ON ' . PREFIX . 'movie.id = ' . PREFIX . 'movie_rating.movie_id INNER JOIN ' . PREFIX . 'rating ON ' . PREFIX . 'rating.id = ' . PREFIX . 'movie_rating.rating_id WHERE ' . PREFIX . 'rating.seorating=:rating'; }
function __construct() { parent::__construct(); $this->pathcache = ROOT . DS . "cache" . DS . "iso3166"; if (!file_exists($this->pathcache)) { mkdir($this->pathcache); } }
public function __construct() { parent::__construct(); self::$_settings = $this->cache->get('app_user_group_settings'); if (!is_array(self::$_settings)) { $settings = []; $rows = $this->db->select('*')->from(':user_group_custom')->all(); foreach ($rows as $row) { if (!\Phpfox::isModule($row['module_id'])) { $settings[$row['user_group_id']][$row['name']] = $row['default_value']; } } $this->cache->set('app_user_group_settings', $settings); self::$_settings = $this->cache->get('app_user_group_settings'); } }
public function __construct($flavorId = null) { parent::__construct(); if ($flavorId !== null) { self::$_active = $this->db->select('t.*, ts.folder AS flavor_folder')->from(':theme_style', 'ts')->join(':theme', 't', ['t.theme_id' => ['=' => 'ts.theme_id']])->where(['ts.style_id' => (int) $flavorId])->get(); if (!self::$_active) { throw new \Exception('Not a valid flavor.'); } } if (!self::$_active) { $cookie = \Phpfox::getCookie('flavor_id'); if ($cookie) { self::$_active = $this->db->select('t.*, ts.folder AS flavor_folder')->from(':theme_style', 'ts')->join(':theme', 't', ['t.theme_id' => ['=' => 'ts.theme_id']])->where(['ts.style_id' => (int) $cookie])->get(); } else { self::$_active = $this->db->select('t.*, ts.folder AS flavor_folder')->from(':theme', 't')->join(':theme_style', 'ts', ['t.theme_id' => ['=' => 'ts.theme_id'], 'ts.is_default' => 1])->where($cookie ? ['t.theme_id' => (int) $cookie] : ['t.is_default' => 1])->get(); } if (!self::$_active || defined('PHPFOX_CSS_FORCE_DEFAULT')) { self::$_active = ['name' => 'Default', 'folder' => 'default', 'flavor_folder' => 'default']; } } }
public function __construct($OC = array(), $FROM = self::FROM_EMPTY) { parent::__construct(); $this->comanda['co_idComanda'] = NULL; $this->comanda['co_IdClient'] = 0; $this->comanda['co_data'] = NULL; $this->comanda['co_estat'] = NULL; $this->comanda['co_sessiophp'] = NULL; $this->comanda['co_TipusPagament'] = NULL; $this->comanda['co_TipusComanda'] = NULL; $this->comanda['co_TpvOrder'] = NULL; $this->comanda['co_TpvCode'] = NULL; $this->comanda['co_NomCompra'] = NULL; $this->comanda['co_EmailCompra'] = NULL; $this->comanda['co_TelefonCompra'] = NULL; $this->comanda['co_PreuFinal'] = NULL; $this->comanda['co_LlocCompra'] = NULL; $this->comanda['co_Codi'] = NULL; $this->extres['NomTipusPagament'] = NULL; $this->extres['NomTipusComanda'] = NULL; $this->extres['NomEstat'] = NULL; $this->extres['NomLlocCompra'] = NULL; $this->localitats = array(); //Aquí hi van les localitats switch ($FROM) { case self::FROM_BDD: foreach ($this->comanda as $K => $V) { $this->comanda[$K] = $OC[$K]; $this->CarregaExtres(); } break; case self::FROM_JSON: foreach ($this->comanda as $K => $V) { $this->comanda[$K] = $OT['comanda'][$K]; } break; case self::FROM_EMPTY: break; } }
public function __construct($OT = array(), $FROM = self::FROM_EMPTY) { parent::__construct(); $this->client['c_id'] = 0; $this->client['c_Nom'] = ''; $this->client['c_Cognoms'] = ''; $this->client['c_Email'] = ''; $this->client['c_Password'] = ''; $this->client['c_Telefon'] = ''; $this->client['c_Adreca'] = ''; $this->client['c_Ciutat'] = ''; $this->client['c_CodiPostal'] = ''; $this->client['c_Permisos'] = 'R'; //Pot ser 'R' (Registrat), 'V' (Venedor), 'A' (Administrador) $this->client['c_Estat'] = 'A'; //Pot ser 'A' o 'B' ( Alta o Baixa ) $this->client['c_DataCanviEstat'] = date('U', time()); $this->password = ''; //Ho guardo aquí perquè el camp el deixo buit... aquest és el password de BDD switch ($FROM) { case self::FROM_BDD: foreach ($this->client as $K => $V) { $this->client[$K] = $OT[$K]; } $this->password = $this->client['c_Password']; $this->client['c_Password'] = ""; break; case self::FROM_JSON: foreach ($this->client as $K => $V) { $this->client[$K] = $OT['client'][$K]; } break; case self::FROM_EMPTY: $this->client['c_id'] = 0; break; } }
public function __construct() { if (self::$_settings === null) { parent::__construct(); self::$_settings = $this->cache->get('app_settings'); if (is_bool(self::$_settings)) { $App = new \Core\App(); foreach ($App->all() as $_app) { if ($_app->settings) { foreach ($_app->settings as $key => $value) { $thisValue = isset($value->value) ? $value->value : null; $value = $this->db->select('*')->from(':setting')->where(['product_id' => $_app->id, 'var_name' => $key])->get(); if (isset($value['value_actual'])) { $thisValue = $value['value_actual']; } self::$_settings[$key] = $thisValue; } } } $this->cache->set('app_settings', self::$_settings); self::$_settings = $this->cache->get('app_settings'); } } }
public function __construct(\Core\Theme\Object $Theme) { parent::__construct(); $this->_theme = $Theme; $this->_service = new Service($this->_theme); }
public function __construct() { parent::__construct(); $this->t_atom = date(DATE_ATOM); }
protected function __construct() { parent::__construct('sessions', 'id_session'); }
public function __construct(\Core\Theme\Object $Theme) { parent::__construct(); $this->_theme = $Theme; }
public function __construct(\Core\App\Object $App) { parent::__construct(); $this->_app = $App; }
protected function __construct() { parent::__construct('texts', 'id_text'); }
public function __construct() { parent::__construct(); $this->date_stamp = date(DATE_ATOM); $this->salt_number = rand(0, 999); }
function __construct() { parent::__construct(); $this->auditTable = '`' . PREFIX . 'audit`'; }
public function __construct() { parent::__construct(); $this->CI =& getInstance(); }
protected function __construct() { parent::__construct('users', 'id_user'); }
/** * Call the parent construct */ public function __construct() { parent::__construct(); }
function __construct() { parent::__construct(); $this->query = new Querybuilder(); $this->date = date('d-m-Y H:i:s'); }
protected function __construct() { parent::__construct('galleries', 'id_gallery'); }
protected function __construct() { parent::__construct('posts', 'id_post'); }
/** * pageModel constructor. */ public function __construct($host, $username, $password, $database) { parent::__construct($host, $username, $password, $database, 'pages'); }
public function __construct() { parent::__construct('goods', 'id_goods'); }
function __construct() { parent::__construct(); $this->db_helper = new \helpers\querybuilder(); }
public function __construct() { parent::__construct(); $this->errMapping(); }
function __construct() { parent::__construct(); $this->db = Database::get(); }