/home/eurekaismapp/public_html/addon/gardengenesis.app/model/config.model.php
}
public function is_server_up(){
$sql = "select status from server_up where id = '1'";
$response = $this->single_query($sql);
return $response['status'];
}
public function sanitize($sql){
$this->sql = $sql;
return $this->mysqli->real_escape_string($sql);
}
public function single_query($sql){
$this->sql = $sql;
return $this->mysqli->query($sql)->fetch_array(MYSQLI_ASSOC);
}
public function all_query($sql){
$this->sql = $sql;
return $this->mysqli->query($sql)->fetch_all(MYSQLI_ASSOC);
}
public function run_query($sql){
$this->sql = $sql;
$this->mysqli->query($sql);
}
public function insert($data,$table){
$column_name = array();
$column_value = array();
foreach($data as $column => $value){
$column_name[] = $column;
$column_value[] = $value;
}
$column_name = implode(",",$column_name);
$column_value = implode("','",$column_value);
$insert = "insert into $table($column_name) values ('{$column_value}')";
return $insert;
}
/home/eurekaismapp/public_html/addon/gardengenesis.app/class/special_offer.class.php
$sql = "select p.*,pv.* , sum(quantity) as total_sold from products p,product_variation pv,cart_transaction_header cth, cart_transactions ct where cth.receipt_no = ct.receipt_no and ct.product_id = p.product_id and pv.productid = p.product_id and p.availability = '1' and cth.status IN ('1','2','3') group by ct.product_id order by total_sold desc";
$response = $this->all_query($sql);
return $response;
}
public function get_product_top_index(){
$sql = "select p.*,pv.* , sum(quantity) as total_sold from products p,product_variation pv,cart_transaction_header cth, cart_transactions ct where cth.receipt_no = ct.receipt_no and ct.product_id = p.product_id and pv.productid = p.product_id and p.availability = '1' and cth.status IN ('1','2','3') group by ct.product_id order by total_sold desc limit 4";
$response = $this->all_query($sql);
return $response;
}
public function get_date_special_offer(){
$date = date("Y-m-d H:i:s");
$sql = "select so.*,p.*,pv.* from special_offer so,products p,product_variation pv where so.sku = pv.sku_number and so.product_id = pv.productid and pv.productid = p.product_id and pv.status = '1' and pv.promo_start <= '{$date}' and pv.promo_end >= '{$date}' order by pv.promo_end asc limit 1";
$response = $this->single_query($sql);
return $response;
}
public function get_random(){
$date = date("Y-m-d H:i:s");
$sql = "select so.*,p.*,pv.* from special_offer so,products p,product_variation pv where pv.productid = p.product_id and p.availability = '1' group by p.product_id order by RAND() ";
$response = $this->all_query($sql);
return $response;
}
public function calculate_percent_sold($productid,$sku,$datefrom,$dateto,$originalqty){
$promo_start = explode(" ",$datefrom);
$promo_start = $promo_start['0'];
$promo_end = explode(" ",$dateto);
$promo_end = $promo_end['0'];
$sql = "select sum(ct.quantity) as total from cart_transactions ct , cart_transaction_header cth , special_offer so, product_variation pv where so.product_id = pv.productid and so.sku = pv.sku_number and pv.productid = ct.product_id and pv.id = ct.type and so.product_id = '{$productid}' and so.sku = '{$sku}' and cth.receipt_no = ct.receipt_no and cth.status IN ('1','2','3') and cth.datetime_created between '{$promo_start}' and '{$promo_end}'";
$response = $this->single_query($sql);
$total = $response['total'];
$percent = ($total/$originalqty) * 100;
return $percent;
}
public function calculate_total_sold($productid,$sku,$datefrom,$dateto,$originalqty){
/home/eurekaismapp/public_html/addon/gardengenesis.app/view/product-details.php
$special_offer_controller = new Special_offer();
$parameter = "DNA-MILE Simple";
$all_product_category = $category_controller->get_category_product();
$all_image = $product_controller->get_product_details_image($parameter);
$product_details = $product_controller->get_product_details_name($parameter);
$productid = $product_details['product_id'];
$price = $product_details['product_price'];
$product_variation = $product_controller->get_product_variation($productid);
$description = $product_controller->product_description($productid);
$description = $description['description_en'];
$product_cat = $product_controller->get_product_same_category($productid);
$all_product_special_offer = $special_offer_controller->get_random();
$rand = $product_controller->get_product_rand_sql();
?>
<section class="welcome_area" >
<div class="welcome_slides owl-carousel">
</div>
</section>
<style>
.footer-main a{
font-weight:500 !important;
}
.footer-main p{
font-weight:500 !important;
}
/home/eurekaismapp/public_html/addon/gardengenesis.app/index.php
}
body, html{
overflow-x: hidden;
-webkit-overflow-scrolling: none;
/* Other browsers */
overscroll-behavior: none;
max-width: 100vw;
position: relative;
}
::-webkit-scrollbar {
display: none; // Safari and Chrome
}
</style>
<?php } ?>
<?php
if ($filename == "profile-preview") {
$full_path = "./profile-preview/theme/index.html";
include($full_path);
}else if(include($full_path)){
}else{
header("HTTP/1.1 200 OK");
include($error);
}
}else{ }
?>