Example #1
0
 public function __construct($translate)
 {
     parent::__construct($translate);
     // Change this if different
     $this->url = url($this->slug . '/' . $this->id);
     $this->process_details();
 }
Example #2
0
 /**
  * This is construct base of the class.
  *
  * A public constructor; initializes the variable $instanceDataBase.
  *
  */
 public function __construct($instanceDataBase)
 {
     parent::__construct($instanceDataBase);
     Kinship::setDataOperationBusiness($instanceDataBase);
     Kinship::getBusiness();
     Kinship::getDescriptionBusiness();
 }
Example #3
0
 public function __construct($id)
 {
     parent::__construct();
     $this->id = (int) $id;
     $this->data = $this->pdo->query('SELECT * FROM bills WHERE id = ' . $this->id)->fetch(PDO::FETCH_ASSOC);
     $this->data['items'] = $this->pdo->query('SELECT * FROM bills_items WHERE bill_id = ' . $this->id . ' ORDER BY item_id')->fetchAll(PDO::FETCH_ASSOC);
 }
Example #4
0
 public function __construct()
 {
     $this->_struct = '
     {
         "session" : 
             {"type":"string", "size":128, "mandatory":true },
         "jidto" : 
             {"type":"string", "size":128, "mandatory":true },
         "jidfrom" : 
             {"type":"string", "size":128, "mandatory":true },
         "resource" : 
             {"type":"string", "size":128 },
         "type" : 
             {"type":"string", "size":20 },
         "subject" : 
             {"type":"text"},
         "thread" : 
             {"type":"string", "size":128 },
         "body" : 
             {"type":"text"},
         "html" : 
             {"type":"text"},
         "published" : 
             {"type":"date"},
         "delivered" : 
             {"type":"date"}
     }';
     parent::__construct();
 }
Example #5
0
 function __construct($serial_number = '', $module = '')
 {
     parent::__construct('id', 'event');
     //primary key, tablename
     $this->rs['id'] = '';
     $this->rs['serial_number'] = '';
     $this->rt['serial_number'] = 'VARCHAR(30)';
     $this->rs['type'] = '';
     $this->rt['type'] = 'VARCHAR(10)';
     $this->rs['module'] = '';
     $this->rt['module'] = 'VARCHAR(20)';
     $this->rs['msg'] = '';
     $this->rs['data'] = '';
     $this->rs['timestamp'] = time();
     $this->idx[] = array('serial_number');
     $this->idx[] = array('serial_number', 'module');
     $this->idx[] = array('type');
     $this->idx[] = array('msg');
     // Create table if it does not exist
     $this->create_table();
     if ($serial_number && $module) {
         $this->retrieve_one('serial_number=? AND module=?', array($serial_number, $module));
         $this->serial_number = $serial_number;
         $this->module = $module;
     }
     return $this;
 }
 public function __construct()
 {
     parent::__construct();
     $this->fields = array('id', 'user', 'name', 'email', 'tel', 'address', 'buildings', 'code', 'delivery', 'pay', 'price', 'ordernum', 'order_pay', 'order_delivery', 'order_state', 'delivery_name', 'delivery_url', 'delivery_num', 'refund', 'is_record', 'text', 'goods', 'ps', 'date');
     $this->tables = array(DB_FREFIX . 'order');
     list($this->R['id'], $this->R['goods_id'], $this->R['order_id'], $this->R['order_state'], $this->R['order_delivery'], $this->R['refund'], $this->R['is_record'], ) = $this->getRequest()->getParam(array(isset($_GET['id']) ? $_GET['id'] : null, isset($_GET['goods_id']) ? $_GET['goods_id'] : null, isset($_GET['order_id']) ? $_GET['order_id'] : null, isset($_POST['order_state']) ? $_POST['order_state'] : null, isset($_POST['order_delivery']) ? $_POST['order_delivery'] : null, isset($_POST['refund']) ? $_POST['refund'] : null, isset($_POST['is_record']) ? $_POST['is_record'] : null));
 }
Example #7
0
 /**
  * @param $id
  *
  * Create dvd object from id.
  */
 public function __construct($id)
 {
     parent::__construct();
     $id = mysql_real_escape_string($id);
     $sql = "SELECT *\n                    FROM dvds\n                    WHERE id = '" . $id . "';";
     $result = $this->db->query($sql);
     $result_row = $result->fetch(PDO::FETCH_ASSOC);
     $this->id = $id;
     $this->priceBand = $result_row['priceBand'];
     switch ($this->priceBand) {
         case "A":
             $this->price = 3.5;
             break;
         case "B":
             $this->price = 2.5;
             break;
         case "C":
             $this->price = 1;
             break;
     }
     $this->title = $result_row['title'];
     $this->cast = $result_row['cast'];
     $this->director = $result_row['director'];
     $this->genre = $result_row['genre'];
     $this->synopsis = $result_row['synopsis'];
     $this->image = $result_row['image'];
     if (!is_null($result_row['renterID'])) {
         //$this->renterID = $result_row['renterID'];
         $this->renterID = "";
     } else {
         $this->renterID = "";
     }
     $this->year = $result_row['year'];
     $this->db = null;
 }
Example #8
0
 public function __construct($registry)
 {
     parent::__construct($registry);
     $this->db_prefix = $this->db->escape(DB_PREFIX);
     $this->language_id = (int) $this->config->get('config_language_id');
     $this->store_id = (int) $this->config->get('config_store_id');
 }
 /**
  * This is construct base of the class.
  *
  * A public constructor; initializes the variable $instanceDataBase.
  *
  */
 public function __construct($instanceDataBase)
 {
     parent::__construct($instanceDataBase);
     AssignHolderFamily::setDataOperationBusiness($instanceDataBase);
     AssignHolderFamily::getBusiness();
     AssignHolderFamily::getDescriptionBusiness();
 }
Example #10
0
 function __construct($id = '')
 {
     parent::__construct('id', 'order');
     //primary key = uid; tablename = users
     $this->rs['id'] = '';
     $this->rs['username'] = '';
     $this->rs['password'] = '';
     $this->rs['product_id'] = '';
     $this->rs['product_name'] = '';
     $this->rs['price'] = '';
     $this->rs['quantity'] = '';
     $this->rs['taxtype'] = '';
     $this->rs['tax_percentage'] = '';
     $this->rs['name'] = '';
     $this->rs['contact'] = '';
     $this->rs['pin'] = '';
     $this->rs['area'] = '';
     $this->rs['city'] = '';
     $this->rs['state'] = '';
     $this->rs['agree'] = '';
     $this->rs['paymentmode'] = '';
     $this->rs['status'] = '';
     $this->rs['billid'] = '';
     $this->rs['date'] = date("Y-m-d H:i:s");
 }
Example #11
0
 function __construct($id = false, $table = null, $ds = null)
 {
     if ($_SERVER['HTTP_HOST'] == 'server.local' || $_SERVER['HTTP_HOST'] == '10.0.1.7' || $_SERVER['HTTP_HOST'] == '10.10.0.220') {
         $this->useDbConfig = 'test';
     }
     parent::__construct($id, $table, $ds);
 }
Example #12
0
 /**
  * Konfiguriert dieses Modell für den Gebrauch mit einer bestimmten Tabelle
  * und den gegebenen Feldern.
  * @param Database     $db     database-Schnittstellen-Objekt
  * @param string       $table  Name der Tabelle
  * @param string|array $fields Komma-getrennte Liste oder Array der Feldnamen
  */
 protected function __construct($db, $table, $fields = '*', $filter = '')
 {
     parent::__construct($db);
     $this->table($table)->fields($fields)->filter($filter);
     $this->table = $table;
     $this->fields = $fields;
 }
 /**
  * This is construct base of the class.
  *
  * A public constructor; initializes the variable $instanceDataBase.
  *
  */
 public function __construct($instanceDataBase)
 {
     parent::__construct($instanceDataBase);
     LevelMainCourse::setDataOperationBusiness($instanceDataBase);
     LevelMainCourse::getBusiness();
     LevelMainCourse::getDescriptionBusiness();
 }
Example #14
0
 /**
  * Constructor for Registration.
  * Check for post submit.
  */
 public function __construct()
 {
     parent::__construct();
     if (isset($_POST["submit"])) {
         $this->registerNewUser();
     }
 }
Example #15
0
 public function __construct($event, $row, $start, $end)
 {
     Model::__construct($event->serviceKey);
     $deviationId = $row['uid'];
     unset($row['uid']);
     unset($row['pid']);
     unset($row['parentid']);
     unset($row['tstamp']);
     unset($row['crdate']);
     unset($row['cruser_id']);
     unset($row['deleted']);
     unset($row['hidden']);
     unset($row['starttime']);
     unset($row['endtime']);
     // storing allday in a temp var, in case it is set from 1 to 0
     $allday = $row['allday'];
     $row = array_merge($event->row, array_filter($row));
     $row['allday'] = $allday;
     $row['deviationId'] = $deviationId;
     $this->createEvent($row, false);
     $this->setStart($start);
     $this->setEnd($end);
     $this->setAllday($row['allday']);
     $this->origStartDate = new \TYPO3\CMS\Cal\Model\CalDate($row['orig_start_date']);
     $this->origStartDate->addSeconds($row['orig_start_time']);
 }
Example #16
0
 /**
  * Constructor
  *
  * return Spam alert object
  * required Spam_type_model
  */
 public function __construct()
 {
     parent::__construct();
     $this->CI =& get_instance();
     $this->DB =& $this->CI->db;
     $this->CI->load->model("spam/models/Spam_type_model");
 }
Example #17
0
 public function __construct($registry)
 {
     parent::__construct($registry);
     $this->load->model('kuler/common');
     $this->load->model('setting/setting');
     $this->common = $this->model_kuler_common;
 }
 /**
  * Constructor
  *
  * @return Dynamic_blocks_install_model
  */
 public function __construct()
 {
     parent::__construct();
     $this->CI =& get_instance();
     // load langs
     $this->CI->load->model('Install_model');
 }
Example #19
0
 public function __construct()
 {
     parent::__construct();
     $mg_instance = new MongoClient(Kohana::config('uap.mongodb'));
     $mongo = $mg_instance->selectDB(MONGO_DB_FEED);
     $this->mongo_deal = $mongo->selectCollection('deals');
 }
 function __construct($serial = '')
 {
     parent::__construct('id', 'location');
     //primary key, tablename
     $this->rs['id'] = '';
     $this->rs['serial_number'] = $serial;
     $this->rt['serial_number'] = 'VARCHAR(255) UNIQUE';
     $this->rs['address'] = '';
     $this->rs['altitude'] = 0;
     $this->rs['currentstatus'] = '';
     $this->rs['ls_enabled'] = 0;
     $this->rs['lastlocationrun'] = '';
     $this->rs['lastrun'] = '';
     $this->rs['latitude'] = 0.0;
     $this->rs['latitudeaccuracy'] = 0;
     $this->rs['longitude'] = 0.0;
     $this->rs['longitudeaccuracy'] = 0;
     $this->rs['stalelocation'] = '';
     // Store default values
     $this->defaults = $this->rs;
     // Add indexes
     $this->idx[] = array('address');
     $this->idx[] = array('currentstatus');
     // Schema version, increment when creating a db migration
     $this->schema_version = 1;
     // Create table if it does not exist
     $this->create_table();
     if ($serial) {
         $this->retrieve_record($serial);
     }
     $this->serial = $serial;
 }
Example #21
0
 function __construct($id = '')
 {
     parent::__construct('id', 'tin');
     //primary key = uid; tablename = users
     $this->rs['id'] = '';
     $this->rs['tin'] = '';
 }
 /**
  * This is construct base of the class.
  *
  * A public constructor; initializes the variable $instanceDataBase.
  *
  */
 public function __construct($instanceDataBase)
 {
     parent::__construct($instanceDataBase);
     AssignStudentCourseHard::setDataOperationBusiness($instanceDataBase);
     AssignStudentCourseHard::getBusiness();
     AssignStudentCourseHard::getDescriptionBusiness();
 }
Example #23
0
 public function __construct()
 {
     parent::__construct();
     $this->_table = DB_PREFIX . 'News';
     $this->_type = 'news';
     $this->_database = DB::load();
 }
Example #24
0
 /**
  * Constructor
  *
  * @return
  */
 public function __construct()
 {
     parent::__construct();
     $this->CI =& get_instance();
     $this->DB =& $this->CI->db;
     $this->use_infile_city_install = $this->CI->pg_module->get_module_config('countries', 'use_infile_city_install');
 }
 function __construct()
 {
     parent::__construct();
     $this->CI =& get_instance();
     $this->url = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
     $this->url .= $_SERVER['SERVER_PORT'] != '80' ? $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'] : $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
 }
 function __construct($serial = '')
 {
     parent::__construct('id', 'crashplan');
     //primary key, tablename
     $this->rs['id'] = '';
     $this->rs['serial_number'] = $serial;
     //$this->rt['serial_number'] = 'VARCHAR(255) UNIQUE';
     $this->rs['destination'] = '';
     // Name of destination
     $this->rs['last_success'] = 0;
     // Timestamp of last successful backup
     $this->rs['duration'] = 0;
     // duration in seconds
     $this->rs['last_failure'] = 0;
     // Timestamp of last failed backup
     $this->rs['reason'] = '';
     // Reason of last failure
     $this->rs['timestamp'] = 0;
     // Timestamp of last update
     // Schema version, increment when creating a db migration
     $this->schema_version = 0;
     //indexes to optimize queries
     $this->idx[] = array('serial_number');
     $this->idx[] = array('reason');
     // Create table if it does not exist
     $this->create_table();
 }
Example #27
0
 public function __construct(array $data = [], $isNew = true)
 {
     parent::__construct($data, $isNew);
     if (!$isNew) {
         $this->originalStatusId = $this['status_id'];
     }
 }
Example #28
0
 public function __construct($id = false, $table = null, $ds = null)
 {
     if (!isset($_SERVER['HTTP_HOST']) || preg_match('/^(localhost)?$/', $_SERVER['HTTP_HOST'])) {
         $this->useDbConfig = 'developer';
     }
     parent::__construct($id, $table, $ds);
 }
 function __construct($serial = '')
 {
     parent::__construct('id', 'adoberum');
     //primary key, tablename
     $this->rs['id'] = '';
     $this->rs['serial_number'] = $serial;
     $this->rt['serial_number'] = 'VARCHAR(255) UNIQUE';
     $this->rs['version'] = '';
     // Results in VARCHAR255
     $this->rs['returncode'] = '';
     // Results in VARCHAR255
     $this->rs['failed1'] = '';
     // Results in VARCHAR255
     $this->rs['failed2'] = '';
     // Results in VARCHAR255
     $this->rs['failed3'] = '';
     // Results in VARCHAR255
     $this->rs['failed4'] = '';
     // Results in VARCHAR255
     $this->rs['failed5'] = '';
     // Results in VARCHAR255
     // Schema version, increment when creating a db migration
     $this->schema_version = 0;
     $this->create_table();
     if ($serial) {
         $this->retrieve_one('serial_number=?', $serial);
     }
     $this->serial = $serial;
 }
 function __construct($serial = '')
 {
     parent::__construct('id', 'reportdata');
     //primary key, tablename
     $this->rs['id'] = '';
     $this->rs['serial_number'] = '';
     $this->rt['serial_number'] = 'VARCHAR(255) UNIQUE';
     $this->rs['console_user'] = '';
     $this->rs['long_username'] = '';
     $this->rs['remote_ip'] = '';
     $this->rs['uptime'] = 0;
     $this->rt['uptime'] = 'INTEGER DEFAULT 0';
     // Uptime in seconds
     $this->rs['reg_timestamp'] = time();
     // Registration date
     $this->rs['machine_group'] = 0;
     $this->rt['machine_group'] = 'INT DEFAULT 0';
     $this->rs['timestamp'] = time();
     // Schema version, increment when creating a db migration
     $this->schema_version = 3;
     // Create indexes
     $this->idx[] = array('console_user');
     $this->idx[] = array('long_username');
     $this->idx[] = array('remote_ip');
     $this->idx[] = array('reg_timestamp');
     $this->idx[] = array('timestamp');
     $this->idx[] = array('machine_group');
     // Create table if it does not exist
     $this->create_table();
     if ($serial) {
         $this->retrieve_record($serial);
         $this->serial_number = $serial;
     }
     return $this;
 }