b94386453f6b45748c1ae005180bafd066a04c88
4 $result = $this->db
->safe_query_fetch("SELECT * FROM `lock`;");
7 $user=$this->db
->auth
->get_user_id();
8 $username=$this->db
->auth
->get_username_by_id($user);
9 echo $this->html
->form("$URL/2", 'POST', array(
10 array('reason',"$username: ",'textarea',false,'autofocus','reason:'),
11 array('lock','lock','submit')
14 echo $this->html
->render_item_table($result);
15 echo $this->html
->form("$URL/2", 'POST', array(
16 array('unlock','unlock','submit')
22 if(isset($_POST['lock'])) {
23 $lock = $this->db
->quote($_POST['reason']);
24 $this->db
->safe_query("INSERT INTO `lock` (lock_name) VALUES ($lock);");
25 $this->post_redirect_get("$URL_INTERNAL/1", T('Lock set'));
27 if(isset($_POST['unlock'])) {
28 $this->db
->safe_query("TRUNCATE TABLE `lock`;");
29 $this->post_redirect_get("$URL_INTERNAL/1", T('Lock unset'));
31 $this->post_redirect_get("$URL_INTERNAL/1","Lock: No value passed!", true);
This page took 0.643738 seconds and 3 git commands to generate.