public function overwriteRead($return) { $objs = $return['objs']; global $db; $q = "SELECT id_restaurant, name FROM menurevo__ms_restaurant WHERE aktiv='1'"; $res = $db->query($q, 2); foreach ($res as $value) { $arrHelp[$value->id_restaurant] = $value->name; } foreach ($objs as $obj) { if (isset($obj->id_restaurant)) { $obj->id_restaurant = $arrHelp[$obj->id_restaurant]; } if (isset($obj->aktiv)) { if ($obj->aktiv == "1") { $obj->aktiv = "Active"; } else { $obj->aktiv = "Inactive"; } } if (isset($obj->img_promo)) { if ($obj->img_promo == "") { $obj->img_promo = "noimage.jpg"; } $obj->img_promo = \Leap\View\InputFoto::getAndMakeFoto($obj->img_promo, "car_image_" . $obj->id_promo); } } return $return; }
public function overwriteRead($return) { $return = parent::overwriteRead($return); $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->camp_foto_panjang)) { $obj->camp_foto_panjang = \Leap\View\InputFoto::getAndMakeFoto($obj->camp_foto_panjang, "camp_image_" . $obj->camp_id); } if (isset($obj->camp_foto_medium)) { $obj->camp_foto_medium = \Leap\View\InputFoto::getAndMakeFoto($obj->camp_foto_medium, "camp2_image_" . $obj->camp_id); } if (isset($obj->camp_foto_small)) { $obj->camp_foto_small = \Leap\View\InputFoto::getAndMakeFoto($obj->camp_foto_small, "camp3_image_" . $obj->camp_id); } if (isset($obj->camp_welcome_pic)) { $obj->camp_welcome_pic = \Leap\View\InputFoto::getAndMakeFoto($obj->camp_welcome_pic, "camp4_image_" . $obj->camp_id); } if (isset($obj->camp_type)) { $obj->camp_type = $this->type[$obj->camp_type]; } if (isset($obj->camp_active)) { $obj->camp_active = $this->arrayYesNO[$obj->camp_active]; } if (isset($obj->camp_size)) { $obj->camp_size = $this->arrsize[$obj->camp_size]; } } return $return; }
public function overwriteRead($return) { $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->post_author)) { $aut = new Account(); $aut->getByID($obj->post_author); $obj->post_author = $aut->admin_nama_depan; } if (isset($obj->post_content)) { $obj->post_content = stripslashes($obj->post_content); } if (isset($obj->post_image)) { $obj->post_image = \Leap\View\InputFoto::getAndMakeFoto($obj->post_image, "post_image_" . $obj->post_image); } /*if(isset($obj->post_gallery_id)){ $pc = new PageContainer(); $pc->getByID($obj->post_gallery_id); $obj->post_gallery_id = $pc->container_name; }*/ } //pr($return); return $return; }
public function overwriteRead($return) { $return = parent::overwriteRead($return); $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->video_upload_preview)) { $obj->video_upload_preview = \Leap\View\InputFoto::getAndMakeFoto($obj->video_upload_preview, "video_upload_" . $obj->video_id); } } return $return; }
public function overwriteRead($return) { $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->mp_foto)) { $obj->mp_foto = \Leap\View\InputFoto::getAndMakeFoto($obj->mp_foto, "foto_mp_" . $obj->mp_id); } } //pr($return); return $return; }
public function overwriteRead($return) { $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->img_home)) { if ($obj->img_home == "") { $obj->img_home = "noimage.jpg"; } $obj->img_home = \Leap\View\InputFoto::getAndMakeFoto($obj->img_home, "car_image_" . $obj->id_home); } } return $return; }
public function overwriteRead($return) { $return = parent::overwriteRead($return); $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->news_pic)) { $obj->news_pic = \Leap\View\InputFoto::getAndMakeFoto($obj->news_pic, "news_image_" . $obj->news_pic); } if (isset($obj->news_active)) { $obj->news_active = $this->arrayYesNO[$obj->news_active]; } } return $return; }
public function overwriteRead($return) { $return = parent::overwriteRead($return); $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->carousel_photo)) { $obj->carousel_photo = \Leap\View\InputFoto::getAndMakeFoto($obj->carousel_photo, "car_image_" . $obj->carousel_id); } if (isset($obj->carousel_active)) { $obj->carousel_active = $this->arrayYesNO[$obj->carousel_active]; } } return $return; }
public function overwriteRead($return) { $return = parent::overwriteRead($return); $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->news_image)) { $obj->news_image = \Leap\View\InputFoto::getAndMakeFoto($obj->news_image, "news_image_" . $obj->news_id); } if (isset($obj->news_page_id)) { $p = new Page(); $p->getByID($obj->news_page_id, "ID,post_title"); $obj->news_page_id = $p->ID . " - " . $p->post_title; } } return $return; }
public function overwriteRead($return) { $return = parent::overwriteRead($return); $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->carousel_photo)) { $obj->carousel_photo = \Leap\View\InputFoto::getAndMakeFoto($obj->carousel_photo, "car_image_" . $obj->carousel_id); } if (isset($obj->carousel_page_id)) { $p = new Page(); $p->getByID($obj->carousel_page_id, "ID,post_title"); $obj->carousel_page_id = $p->ID . " - " . $p->post_title; } if (isset($obj->carousel_active)) { $obj->carousel_active = $this->arrayYesNO[$obj->carousel_active]; } } return $return; }
public function overwriteRead($return) { $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->image)) { if ($obj->image == "") { $obj->image = "noimage.jpg"; } $obj->image = \Leap\View\InputFoto::getAndMakeFoto($obj->image, "car_image_" . $obj->id_promo); } if (isset($obj->type)) { $obj->type = $this->arrType[strval($obj->type)]; } if (isset($obj->status)) { $obj->status = $this->arrActiveNotActive[strval($obj->status)]; } } return $return; }
public function overwriteRead($return) { $objs = $return['objs']; foreach ($objs as $obj) { if (isset($obj->status)) { $obj->status = $this->arrActiveNotActive[$obj->status]; } if (isset($obj->search_type)) { if (isset($obj->search_term)) { $obj->search_term = $this->viewSearchTerm($obj->search_type, $obj->search_term); } $obj->search_type = $this->arrSearchType[$obj->search_type]; } if (isset($obj->image)) { if ($obj->image == "") { $obj->image = "noimage.jpg"; } $obj->image = \Leap\View\InputFoto::getAndMakeFoto($obj->image, "car_image_" . $obj->id_home); } } return $return; }
public function overwriteRead($return) { $objs = $return['objs']; global $db; $q = "SELECT id_restaurant_type, name FROM menurevo__ms_restaurant_type"; $res = $db->query($q, 2); foreach ($res as $value) { $arrHelp[$value->id_restaurant_type] = $value->name; } // Cuisine $q = "SELECT id_cuisine, name_cuisine FROM menurevo__cuisine"; $res = $db->query($q, 2); foreach ($res as $value) { $arrHelp[$value->id_cuisine] = $value->name_cuisine; } foreach ($objs as $obj) { if (isset($obj->restaurant_type)) { $obj->restaurant_type = $arrHelp[$obj->restaurant_type]; } if (isset($obj->id_cuisine)) { $obj->id_cuisine = $arrHelp[$obj->id_cuisine]; } if (isset($obj->aktiv)) { if ($obj->aktiv == "1") { $obj->aktiv = "Yes"; } else { $obj->aktiv = "No"; } } if (isset($obj->halal)) { if ($obj->halal == "1") { $obj->halal = "Yes"; } else { $obj->halal = "No"; } } if (isset($obj->menu_status)) { if ($obj->menu_status == "1") { $obj->menu_status = "Active"; } else { $obj->menu_status = "Inactive"; } } if (isset($obj->image_logo)) { if ($obj->image_logo == "") { $obj->image_logo = "noimage.jpg"; } $obj->image_logo = \Leap\View\InputFoto::getAndMakeFoto($obj->image_logo, "car_image_" . $obj->id_restaurant); } } return $return; }
public function overwriteRead($return) { $objs = $return['objs']; global $db; // Restaurantname $q = "SELECT id_restaurant, name FROM menurevo__ms_restaurant WHERE aktiv='1'"; $res = $db->query($q, 2); foreach ($res as $value) { $arrHelp[$value->id_restaurant] = $value->name; } // Category $q = "SELECT id_category, name FROM menurevo__ms_category "; $res = $db->query($q, 2); foreach ($res as $value) { $arrHelpc[$value->id_category] = $value->name; } foreach ($objs as $obj) { if (isset($obj->id_category)) { $obj->id_category = $arrHelpc[$obj->id_category]; } if (isset($obj->id_restaurant)) { $obj->id_restaurant = $arrHelp[$obj->id_restaurant]; } if (isset($obj->halal)) { if ($obj->halal == "1") { $obj->halal = "Active"; } else { $obj->halal = "Inactive"; } } if (isset($obj->availability)) { if ($obj->availability == "1") { $obj->availability = "Active"; } else { $obj->availability = "Inactive"; } } if (isset($obj->is_drink)) { if ($obj->is_drink == "1") { $obj->is_drink = "Yes"; } else { $obj->is_drink = "No"; } } if (isset($obj->status)) { if ($obj->status == "1") { $obj->status = "Active"; } else { $obj->status = "Inactive"; } } if (isset($obj->image_foto)) { // if ($obj->image_foto == "") { // $obj->image_foto = "<img src='"._SPPATH."images/noimage.jpg"."'>"; // } $obj->image_foto = \Leap\View\InputFoto::getAndMakeFoto($obj->image_foto, "car_image_" . $obj->id_dish); } } return $return; }