public function mostrar_usuarios() { $array = array(); parent::__construct($this->db, $this->tabla); parent::select($array); parent::mostrar_resultados(); }
public function __construct($__host, $__user, $__passwd) { $query = "SELECT * from "; $this->_bigcategory = array(); $this->_middlecategory = array(); $this->_city = new City($__host, $__user, $__passwd); parent::__construct($__host, $__user, $__passwd); // get category name $result = $this->_db_throw_query("Foodstuff", $query . "Foodstuff.Big_Category_List;"); if (!$result) { print "Quely Failed.\n" . mysqli_error($this->_connection); return NULL; } while ($records = mysqli_fetch_assoc($result)) { $this->_bigcategory[$records['Big_Category_ID']] = $records['Big_Category_Name']; } $result = $this->_db_throw_query("Foodstuff", $query . "Foodstuff.Middle_Category_List;"); if (!$result) { print "Quely Failed.\n" . mysqli_error($this->_connection); return NULL; } while ($records = mysqli_fetch_assoc($result)) { $big = $records['Middle_Category_ID'][0]; $middle = $records['Middle_Category_ID'][1]; $this->_middlecategory[$big][$middle] = $records['Middle_Category_Name']; } }
public function __construct() { parent::__construct(); $this->iv = mcrypt_create_iv(mcrypt_get_block_size(MCRYPT_TripleDES, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM); $this->key = 'LeeS1bae'; $this->delimiter = '%%'; }
public function __construct($config = array()) { parent::__construct($config); $this->debug = $config["debug"] ? $config["debug"] : false; $this->prefix = $config['prefix'] ? $config['prefix'] : 'qinggan_'; $this->_config_db($config); }
public function __construct($loginRequired = true) { // call parent constuctor parent::__construct(); // Start SESSION if not started if (session_status() !== PHP_SESSION_ACTIVE) { session_start(); } // Set SESSION ADMIN Login Flag to false if not set if (!isset($_SESSION['LOGGEDIN'])) { $_SESSION['LOGGEDIN'] = false; } // Redirect the user if NOT logged in if (!$_SESSION['LOGGEDIN'] && $loginRequired) { header("Location: index.php?flg=expired"); exit; } // Fetch the Logged in users details if login is required if ($loginRequired) { $this->usr = $this->query('SELECT * FROM `users` WHERE `id` = ' . $_SESSION['USERID'] . ' LIMIT 1')->fetch(PDO::FETCH_ASSOC); // get the user details } // Check if Message Flag is set if (isset($_GET["flg"])) { $this->flg = $_GET["flg"]; } }
public function __construct() { try { parent::__construct(); } catch (MysqlException $e) { Html::showAll($e); } }
public function get_ingredientes() { $array = array(); parent::__construct($this->db, $this->tabla); parent::select($array); $this->resultado = parent::__get("resultado"); var_dump($this->resultado); }
public function __construct($__host, $__user, $__passwd, $__uid) { $this->kind = array(0 => "main", 1 => "dish", 2 => "sub"); $this->week = array(0 => "Mon", 1 => "Tue", 2 => "Wed", 3 => "Thu", 4 => "Fri", 5 => "Sat", 6 => "Sun"); parent::__construct($__host, $__user, $__passwd); $query = "CREATE TABLE UM" . $__uid . " ( Menu_Name text, Kind_Name varchar(10), Date DATE );"; $result = $this->_db_throw_query("Users_Geo", $query); }
public function __construct() { parent::__construct(); $this->NowArtPage = 1; $this->DataTemp = false; $this->NewDataTemp = array(); $this->PageTemp = array(); $this->Indicators = '<div style="page-break-after: always; "><span style="DISPLAY:none"> </span></div>'; $this->TextName = 'text'; }
public function __construct($tableName = '') { //如果没有设置表名,则自动根据Model名取表名 if (null != $tableName && "" == $this->table) { $this->table = $tableName; } //如果没有设置数据库配置文件,读取默认文件 if (null == $this->_dbConfig) { $this->_dbConfig = registry::getRegistry('db'); } parent::__construct($this->_dbConfig); }
public function __construct() { global $db; parent::__construct(false, $db); $this->tableName = 'product_type'; $this->Cshu = 'id,title,UPID'; $this->sort = 'ranking'; $this->FID = 'id'; $this->ZID = 'UPID'; $this->SQL = null; $this->new_arr = array(); }
public function __construct() { parent::__construct(); global $configDetails; $themeDetails = $this->getRequiredFieldsSingle('site_themes', "theme_status=? ORDER BY theme_id ASC LIMIT 0,1", $conditionValue = array('1'), 'theme_path'); if ($themeDetails['theme_path'] != '') { $theme_path = _output($themeDetails['theme_path']); } else { $theme_path = DEFAULT_THEME_PATH; } $this->urlBase = $configDetails['sitePath']; // site path from config file(config.php) $this->urlAssetsBase = $configDetails['sitePath'] . $theme_path; $this->urlImageBase = $configDetails['sitePath'] . $theme_path . $configDetails['imagesDirectory']; }
/** * Constructor */ function SqlPager($query, $totalRows, $conditionValues, $page_link = "", $items_per_page = 25, $dbDetails) { $query = preg_replace("/LIMIT [0-9]+,[0-9]+/i", "", $query); //Remove the LIMIT option if there is one. //Get all the options that must be there. $this->query = $query; parent::__construct($dbDetails); //Number of items that must be displayed in one page. $this->items_per_page = $_REQUEST['items_per_page'] ? (int) $_REQUEST['items_per_page'] : (int) $items_per_page; $items_per_page = $this->items_per_page; //The pager is located in which page... Used to give the page numbers as a GET request. $page_link = $page_link ? $page_link : basename($_SERVER['PHP_SELF']) . '?'; $last_char = $page_link[strlen($page_link) - 1]; if ($last_char != '&' and $last_char != '?') { //If the given page dont end with a ? or a &, if (strpos($page_link, '?') === false) { $page_link .= '?'; } else { $page_link .= '&'; } //If there is a '?', add a '&' at the end. } //Add the items per page option to the page link. if ($_REQUEST['items_per_page']) { $page_link .= "items_per_page={$items_per_page}&"; } $this->_page_link = $page_link; $this->page = $_REQUEST['page'] ? $_REQUEST['page'] : 1; //Get the current page we are on. //Get the total number of items. //$this->prepareConditionStatement($query,$conditionValues); //$sql_count=$this->getAffectedRows(); $this->_total_items = $totalRows; $this->_total_pages = ceil($this->_total_items / $items_per_page); //And total pages }
public function __construct($__host, $__user, $__passwd) { parent::__construct($__host, $__user, $__passwd); }
function __construct() { $this->table = str_replace("Model", "", get_class($this)); parent::__construct(APP::$config['db']); }
public function __construct($dsn, $user = "", $passwd = "") { parent::__construct($dsn, $user, $passwd); }
public function __construct($config = array()) { parent::__construct($config); $this->config($config); }
public function __construct() { parent::__construct(); $this->main = new EnclothedMain(); }
function __construct($path, $path2big, $date, $author, $id_author, $show_athr = true, $adm_del = 'yes') { if (!db::check_connect()) { db::__construct(); } $this->path = $path; $this->date = $date; $this->path2big = $path2big; $this->id_author = $id_author; if ($show_athr) { $author_field = ' <tr> <td height="22" colspan="2" valign="top"> <a href="index.php?go=profile&id_user='******'" class="user">' . $author . '</a></td> </tr>'; } else { $author_field = ''; } $this->__ = sh_photo($path, $path2big, $date, $author_field, $adm_del); }
/** * CLASS PROPERTIES AND METHODS */ protected function __construct() { parent::__construct(); }
public function __construct($query) { parent::__construct(); $this->SQL = $query; $this->query(); }
function __construct($u_id = 1) { parent::__construct(); $this->user_id = $u_id; }
public function __construct() { # istanza della classe per la connessione al database $this->utente = new db(); parent::__construct(); }
function __construct() { parent::__construct(ALLOC_DB_USER, ALLOC_DB_PASS, ALLOC_DB_HOST, ALLOC_DB_NAME); }
public function __construct() { parent::__construct(); $this->pdo = parent::getConnection(); }
function __construct() { parent::__construct(); }
/** * Tests db->__construct() */ public function test__construct() { // TODO Auto-generated dbTest->test__construct() $this->markTestIncomplete("__construct test not implemented"); $this->db->__construct(); }