/** * class Content::__construct */ public function __construct() { parent::__construct(); //TODO: move to constants $this->type = VIDEO; $this->is_html = 0; }
protected function __construct($content_id) { $db = AbstractDb::getObject(); // Init values $row = null; parent::__construct($content_id); $this->CONTENT_ORDERING_MODES = array('RANDOM' => _("Pick content elements randomly"), 'PSEUDO_RANDOM' => _("Pick content elements randomly, but not twice until all elements have been seen"), 'SEQUENTIAL' => _("Pick content elements in sequential order")); $this->CONTENT_CHANGES_ON_MODES = array('ALWAYS' => _("Content always rotates"), 'NEXT_DAY' => _("Content rotates once per day"), 'NEXT_LOGIN' => _("Content rotates once per session"), 'NEXT_NODE' => _("Content rotates each time you change node"), 'NEVER' => _("Content never rotates. Usefull when showing all elements simultaneously in a specific order.")); $this->ALLOW_REPEAT_MODES = array('YES' => _("Content can be shown more than once"), 'NO' => _("Content can only be shown once"), 'ONCE_PER_NODE' => _("Content can be shown more than once, but not at the same node")); $content_id = $db->escapeString($content_id); $sql = "SELECT * FROM content_group WHERE content_group_id='{$content_id}'"; $db->execSqlUniqueRes($sql, $row, false); if ($row == null) { /*Since the parent Content exists, the necessary data in content_group had not yet been created */ $sql = "INSERT INTO content_group (content_group_id) VALUES ('{$content_id}')"; $db->execSqlUpdate($sql, false); $sql = "SELECT * FROM content_group WHERE content_group_id='{$content_id}'"; $db->execSqlUniqueRes($sql, $row, false); if ($row == null) { throw new Exception(_("The content with the following id could not be found in the database: ") . $content_id); } } $this->content_group_row = $row; // These are for internal use only ( private and protected methods ) for dealing with expanding content $this->setTemporaryDisplayNumElements(null); }
/** * Constructor * * @param string $content_id Content id * * @return void */ protected function __construct($content_id) { $db = AbstractDb::getObject(); // Init value $row = null; parent::__construct($content_id); $this->mDb =& $db; $content_id = $db->escapeString($content_id); $sql = "SELECT * FROM content_iframe WHERE iframes_id='{$content_id}'"; $db->execSqlUniqueRes($sql, $row, false); if ($row == null) { /* * Since the parent Content exists, the necessary data in * content_group had not yet been created */ $sql = "INSERT INTO content_iframe (iframes_id) VALUES ('{$content_id}')"; $db->execSqlUpdate($sql, false); $sql = "SELECT * FROM content_iframe WHERE iframes_id='{$content_id}'"; $db->execSqlUniqueRes($sql, $row, false); if ($row == null) { throw new Exception(_("The content with the following id could not be found in the database: ") . $content_id); } } $this->iframe_row = $row; }
/** * @param $arrayRest * @return void */ public function __construct($arrayRest = NULL) { parent::__construct($arrayRest); $this->sub = count($this->arrayRestFolder) > 1 ? $this->arrayRestFolder[1] : ""; $this->my_redirect = "admin/page/select"; $this->my_redirect .= "/" . $this->sub; $this->my_action .= "/" . $this->sub; //echo $this->sub; switch ($this->sub) { case "blog": $this->category_id = 36; break; case "sobre": $this->category_id = 15; $this->my_redirect = "/admin/page/edit/sobre/id.15/"; break; case "franquias": $this->category_id = 42; $this->my_redirect = "/admin/page/edit/franquias/id.21/"; //$this->total_files = 1; break; case "unidades": $this->my_redirect = "/admin/unidades/select/"; //$this->total_files = 1; break; default: $this->category_id = 18; break; } if (DataHandler::getValueByArrayIndex($this->arrayVariable, "category_id")) { $this->category_id = DataHandler::forceInt(DataHandler::getValueByArrayIndex($this->arrayVariable, "category_id")); } }
/** * Construct a text content. * * @param string $content Content. * @return void */ public function __construct($content = null) { parent::__construct(); $this['content-transfer-encoding'] = 'quoted-printable'; $this['content-type'] = 'text/plain; charset=utf-8'; $this->append($content); return; }
function __construct($key) { // Database Key $this->setField('key', $key); // Set filterType $this->setField('filterType', 'post'); parent::__construct(PATH_POSTS . $key . DS); }
public function __construct() { Logger::log("Enter: Event::__construct"); parent::__construct(); // Content $this->type = EVENT; $this->trackbacks = NULL; Logger::log("Exit: Event::__construct"); }
/** * class Content::__construct */ public function __construct() { parent::__construct(); $this->type = 7; //if not set = reveiw $this->sb_upload_dir = SB_UPLOAD_DIR; $this->sb_upload_url = SB_UPLOAD_URL; $this->sb_mc_location = SB_MC_LOCATION; }
/** * Constructor * * @param string $content_id Content id */ protected function __construct($content_id) { parent::__construct($content_id); $db = AbstractDb::getObject(); /** * HTML allowed to be used */ $this->allowed_html_tags = "<a><br><b><h1><h2><h3><h4><h5><h6><i><img><li><ol><p><strong><u><ul><li><br/><hr><div></div>"; $this->mBd =& $db; }
/** * class Content::__construct */ public function __construct() { parent::__construct(); //TODO: move to constants $this->type = QUESTION; $this->is_html = 0; $this->title = 'Question'; $this->allow_comments = 1; $this->is_default_content = TRUE; }
public function __construct($arrayRestFolder = NULL) { parent::__construct($arrayRestFolder); //categoria produtos $this->category_id = 43; $this->my_redirect = "backend/client/show"; if (isset($_POST["to"])) { $this->my_redirect = $_POST["to"]; } }
public function __construct() { parent::__construct(); global $CMS_ADMIN_PAGE; if (isset($CMS_ADMIN_PAGE)) { $this->error_types = array('404' => lang('404description')); } $this->doAliasCheck = false; $this->doAutoAliasIfEnabled = false; $this->mType = strtolower(get_class($this)); }
public function __construct($data = array()) { parent::__construct(); $this->entityType = 'banner'; if (!empty($data['id'])) { $CMS = new CMS(); $this->id = $data['id']; $this->populate_object($CMS->get_entity_data($this)); } $this->populate_object($data); }
/** * Constructor * * @param string $content_id Content Id * * @return void */ protected function __construct($content_id) { $db = AbstractDb::getObject(); // Init values $row = null; parent::__construct($content_id); $content_id = $db->escapeString($content_id); $sql_select = "SELECT * FROM content_group_element WHERE content_group_element_id='{$content_id}'"; $db->execSqlUniqueRes($sql_select, $row, false); $this->content_group_element_row = $row; /* A content group element is NEVER persistent */ parent::setIsPersistent(false); }
/** * Constructor * @since Version 3.5 * @param int|string $id */ public function __construct($id = null) { parent::__construct(); if (filter_var($id, FILTER_VALIDATE_INT)) { $this->id = $id; } elseif (is_string($id) && strlen($id) > 1) { $query = "SELECT pid FROM nuke_pages WHERE shortname = ?"; $this->id = $this->db->fetchOne($query, $id); } if (filter_var($this->id)) { $this->mckey = sprintf("railpage:page=%d", $this->id); $this->fetch(); } }
public function __construct($data = array()) { parent::__construct(); $this->entityType = 'article'; if (!empty($data['id'])) { $CMS = new CMS(); $this->id = $data['id']; $this->populate_object($CMS->get_entity_data($this)); } $this->populate_object($data); if (empty($this->template)) { $templates = new Templates(); $defaultTemplate = $templates->get_default(); $this->template = $defaultTemplate['path']; } }
/** * Constructor * * @param string $content_id Content id * * @return void */ protected function __construct($content_id) { $db = AbstractDb::getObject(); // Init values $row = null; $content_rss_aggregator_rows = null; $this->press_review = null; parent::__construct($content_id); $content_id = $db->escapeString($content_id); $sql = "SELECT *, EXTRACT(EPOCH FROM max_item_age) as max_item_age_seconds FROM content_rss_aggregator WHERE content_id='{$content_id}'"; $db->execSqlUniqueRes($sql, $row, false); if ($row == null) { $sql_new = "INSERT INTO content_rss_aggregator (content_id) VALUES ('{$content_id}')"; $db->execSqlUpdate($sql_new, false); $db->execSqlUniqueRes($sql, $row, false); if ($row == null) { throw new Exception(_("The RssAggregator content with the following id could not be found in the database: ") . $content_id); } } $this->content_rss_aggregator_row = $row; $sql = "SELECT * FROM content_rss_aggregator_feeds WHERE content_id='{$content_id}'"; $db->execSql($sql, $content_rss_aggregator_rows, false); if ($content_rss_aggregator_rows != null) { $this->content_rss_aggregator_feeds_rows = $content_rss_aggregator_rows; } else { $this->content_rss_aggregator_feeds_rows = array(); } }
/** * Associates the database table * @param \Zend\Db\Adapter\Adapter $db */ public function __construct(\Zend\Db\Adapter\Adapter $db) { parent::__construct($db, 'company'); }
/** * @param $arrayRest * @return void */ public function __construct($arrayRest = NULL) { parent::__construct($arrayRest); $this->category_id = 47; $this->my_redirect = "admin/home"; }
/** * class Content::__construct */ public function __construct() { parent::__construct(); //TODO: move to constants $this->type = 1; }
/** * class TekVideo::__construct */ public function __construct() { parent::__construct(); $this->type = TEK_VIDEO; }
/** * Associates the database table * @param \Zend\Db\Adapter\Adapter $db */ public function __construct(\Zend\Db\Adapter\Adapter $db) { parent::__construct($db, 'profile'); }
public function __construct($content) { parent::__construct($content); }
/** * Initialisation for all new instances of Blog * @access public * @param mixed $id Set this ID for this model on startup, can also be an array of options, see above. * @param string $table Name of database table to use. * @param string $ds DataSource connection name. * */ public function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds); $this->virtualFields = array('url' => "CONCAT('/blog/',`{$this->alias}`.`slug`)"); }
public function __construct() { parent::__construct(); }
public function __construct() { parent::__construct(); $this->type = 'blackboard'; }
/** * @param $arrayRest * @return void */ public function __construct($arrayRest = NULL) { parent::__construct($arrayRest); $this->category_id = 2; }
/** * Constructor * * @param string $content_id Content id * * @return void */ protected function __construct($content_id) { parent::__construct($content_id); }
/** * class Content::__construct */ public function __construct() { parent::__construct(); $this->type = ANNOUNCEMENT; }
protected function __construct($content_id) { // Init values $errmsg = ""; $row = null; parent::__construct($content_id); if (Dependency::check("Phlickr", $errmsg) && Dependency::check('curl', $errmsg)) { // Defined globals $db = AbstractDb::getObject(); // Load Phlickr classes require_once "Phlickr/Api.php"; require_once "Phlickr/User.php"; require_once "Phlickr/Group.php"; $content_id = $db->escapeString($content_id); $sql = "SELECT *, EXTRACT(EPOCH FROM AGE(CURRENT_TIMESTAMP, cache_update_timestamp)) as cache_age FROM content_flickr_photostream WHERE flickr_photostream_id='{$content_id}'"; $db->execSqlUniqueRes($sql, $row, false); if ($row == null) { /*Since the parent Content exists, the necessary data in content_group had not yet been created */ $sql = "INSERT INTO content_flickr_photostream (flickr_photostream_id, preferred_size) VALUES ('{$content_id}', '" . self::SIZE_SMALL_240x180 . "')"; $db->execSqlUpdate($sql, false); $sql = "SELECT * FROM content_flickr_photostream WHERE flickr_photostream_id='{$content_id}'"; $db->execSqlUniqueRes($sql, $row, false); if ($row == null) { throw new Exception(_("The content with the following id could not be found in the database: ") . $content_id); } } $this->flickr_photostream_row = $row; $this->flickr_api = null; $this->mBd =& $db; $this->_PhlickrAvailable = true; } }