mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
tables
This commit is contained in:
parent
b6288679dc
commit
ae00c1a480
@ -120,6 +120,11 @@ class Main extends CI_Controller
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 8,
|
||||
) ,
|
||||
'session_id' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 40,
|
||||
'null' => TRUE,
|
||||
) ,
|
||||
);
|
||||
$this->dbforge->add_field($fields);
|
||||
$this->dbforge->add_key('id', true);
|
||||
@ -127,8 +132,14 @@ class Main extends CI_Controller
|
||||
$this->dbforge->add_key('private');
|
||||
$this->dbforge->add_key('replyto');
|
||||
$this->dbforge->add_key('created');
|
||||
$this->dbforge->add_key('session_id');
|
||||
$this->dbforge->create_table('pastes', true);
|
||||
}
|
||||
|
||||
//check if field session_id exists
|
||||
//todo
|
||||
|
||||
|
||||
}
|
||||
|
||||
function _form_prep($lang = false, $title = '', $paste = '', $reply = false)
|
||||
|
@ -6,7 +6,7 @@
|
||||
* - index()
|
||||
* - lists()
|
||||
* Classes list:
|
||||
* - Main extends CI_Controller
|
||||
* - Spamadmin extends CI_Controller
|
||||
*/
|
||||
|
||||
class Spamadmin extends CI_Controller
|
||||
@ -15,32 +15,6 @@ class Spamadmin extends CI_Controller
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('languages');
|
||||
|
||||
if (!$this->db->table_exists('pid_ip'))
|
||||
{
|
||||
$this->load->dbforge();
|
||||
$fields = array(
|
||||
'id' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 10,
|
||||
'auto_increment' => TRUE,
|
||||
) ,
|
||||
'pid' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 8,
|
||||
) ,
|
||||
'ip' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 15,
|
||||
) ,
|
||||
);
|
||||
$this->dbforge->add_field($fields);
|
||||
$this->dbforge->add_key('id', true);
|
||||
$this->dbforge->add_key('pid');
|
||||
$this->dbforge->add_key('ip');
|
||||
$this->dbforge->create_table('pid_ip', true);
|
||||
}
|
||||
}
|
||||
|
||||
function index()
|
||||
|
Loading…
x
Reference in New Issue
Block a user