| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- class admin_boarding_model extends Model {
-
-
- public function getBoxes() {
- $result = $this->query("select * from azonics_boarding where box_status<>'0';");
- return $result;
- }
-
-
- public function loadBox() {
- $box_id = $this->escapeString($_REQUEST['id']);
- $row = $this->query("select * from azonics_boarding where box_id='".$box_id."';");
- return $row[0];
- }
-
-
- public function saveBox() {
- $data = $this->escapeArray($_REQUEST);
-
- if ($data['box_id']!='') {
- $this->execute("update azonics_boarding set "
- . "box_slug='".$data['box_slug']."', "
- . "box_title='".$data['box_title']."', "
- . "box_title_en='".$data['box_title_en']."', "
- . "box_subtitle='".$data['box_subtitle']."', "
- . "box_subtitle_en='".$data['box_subtitle_en']."', "
- . "box_button_text='".$data['box_button_text']."', "
- . "box_button_text_en='".$data['box_button_text_en']."', "
- . "box_url='".$data['box_url']."', "
- . "box_banner='".$data['box_banner']."' "
- . "where box_id='".$data['box_id']."';");
-
- return true;
- }
- }
-
-
- public function deleteBox() {
- $box_id = $this->escapeString($_REQUEST['id']);
- $this->execute("update azonics_boarding set box_status='0' where box_id='".$box_id."';");
- return true;
- }
-
-
- }
|