/home/techb158/exp.abdallabala.com/application/autoload
NameSizeModeActions
Ib/-0755rm
IBilling/-0755rm
Models/-0755rm
Notify/-0755rm
Admin.php16260644editdlrm
App.php870644editdlrm
Arr.php4160644editdlrm
Asset.php18220644editdlrm
Auth.php12460644editdlrm
Backup.php116500644editdlrm
Cache.php840644editdlrm
Ccavenue.php84580644editdlrm
class.smtp.php394380644editdlrm
Companies.php25640644editdlrm
Contacts.php66070644editdlrm
Countries.php311520644editdlrm
Currency.php232370644editdlrm
Dashboard.php206250644editdlrm
DB.php620644editdlrm
Demo.php248440644editdlrm
Dev.php16660644editdlrm
Ed.php17580644editdlrm
Event.php4490644editdlrm
ExtendedZip.php13810644editdlrm
Finance.php58740644editdlrm
Fsubmit.php44890644editdlrm
Gravatar.php27210644editdlrm
Image.php693950644editdlrm
index.html1120644editdlrm
Invoice.php155570644editdlrm
Make.php9660644editdlrm
Misc.php13850644editdlrm
Model.php237280644editdlrm
ORM.php840360644editdlrm
Paginator.php61220644editdlrm
parseCSV.php390090644editdlrm
Parsedown.php381370644editdlrm
Password.php21360644editdlrm
PHPMailer.php1114110644editdlrm
Plugins.php29730644editdlrm
Quote.php80900644editdlrm
Reorder.php20170644editdlrm
Repeating.php57710644editdlrm
Schema.php48990644editdlrm
Sms.php10470644editdlrm
Syscpanel.php60580644editdlrm
Syscurl.php10750644editdlrm
Sysfile.php5790644editdlrm
Tags.php8310644editdlrm
Template.php5400644editdlrm
Timezone.php11710644editdlrm
Transaction.php10730644editdlrm
Uploader.php33690644editdlrm
User.php3740644editdlrm
Util.php97600644editdlrm
Validator.php86340644editdlrm
View.php21700644editdlrm
Edit: /home/techb158/exp.abdallabala.com/application/autoload/Schema.php (4899B)
table = $table; $this->method = 'create'; $this->build_query = 'CREATE TABLE IF NOT EXISTS ' . $table . ' ( id int(11) NOT NULL AUTO_INCREMENT, '; $this->extras = ''; $this->engine = 'InnoDB'; $this->primary_data = ''; } public function drop_before_build() { $this->build_query = 'DROP TABLE IF EXISTS ' . $this->table . '; CREATE TABLE ' . $this->table . ' ( id int(11) NOT NULL AUTO_INCREMENT, '; return $this; } public function create() { $this->method = 'create'; } public function add_column() { $table = $this->table; $this->method = 'add_column'; $this->build_query = 'ALTER TABLE ' . $table . ' '; } public function drop_column() { $table = $this->table; $this->method = 'drop_column'; $this->build_query = 'ALTER TABLE ' . $table . ' '; } public function select($column) { $this->build_query .= 'DROP ' . $column . ', '; return $this; } public function add_foreign_key($columns, $table, $f_columns) { if ( !isset($columns) || !is_array($columns) || !isset($table) || !isset($f_columns) || !is_array($f_columns) ) { return; } $this->build_query .= ' FOREIGN KEY (' . implode(',', $columns) . ') REFERENCES ' . $table . '(' . implode(',', $f_columns) . ') ON DELETE CASCADE, '; } public function add($name, $type = 'text', $length = '', $default = '') { //Apply logic to create order $l = ''; if ($length != '') { $l = '(' . $length . ')'; } if ($default != '') { $d = ' NOT NULL DEFAULT \'' . $default . '\''; } else { $d = ''; } $method = $this->method; if ($method == 'create') { $this->build_query .= '`' . $name . '` ' . $type . '' . $l . $d . ', '; } elseif ($method == 'add_column') { $this->build_query .= 'ADD ' . $name . ' ' . $type . '' . $l . $d . ', '; } else { } return $this; } public function add_extras($extras) { $this->extras .= $extras; } public function set_engine($engine) { $this->engine = $engine; } public function add_primary_data($data) { $this->primary_data = '; INSERT INTO `' . $this->table . '` ' . $data; } public function column() { $this->build_query = ''; } public function save($type = 'execute') { $method = $this->method; if ($method == 'create') { $this->build_query .= 'PRIMARY KEY ( id ) ' . $this->extras . ' ) ENGINE=' . $this->engine . ' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1' . $this->primary_data; if ($type == 'show_sql') { return $this->build_query; } try { $d = ORM::execute($this->build_query); return $d; } catch (Exception $e) { return $e->getMessage(); } } elseif ($method == 'add_column') { $build_query = $this->build_query; $build_query = substr($build_query, 0, -2); try { $d = ORM::execute($build_query); return $d; } catch (Exception $e) { return $e->getMessage(); } } else { return false; } } public function drop() { $method = $this->method; if ($method == 'create') { try { $d = ORM::execute('DROP TABLE IF EXISTS ' . $this->table); return $d; } catch (Exception $e) { return $e->getMessage(); } } elseif ($method == 'drop_column') { $build_query = $this->build_query; $build_query = substr($build_query, 0, -2); try { $d = ORM::execute($build_query); return $d; } catch (Exception $e) { return $e->getMessage(); } } else { return false; } } }