Exemplo n.º 1
0
include_once 'inc/config.inc.php';
$id = $_GET['id'];
$pro_id = $_GET['id'];
/* echo $id;
  $id2 = explode('=',$id);
  echo $id2;
  $url = "p=".$id;
  $res = urlencode($url); */
unset($_SESSION['book']);
header('content-type:text/html;charset=utf8');
//----------------products------------
$where = array('product.is_deleted' => 'N', 'product.is_active' => 'Y', 'product.id' => $id);
$rows_data = getRows(DB_TABLE_PREFIX . 'product', $where, 'product.*,category.title AS category,category.slug AS category_slug', '', 'LEFT JOIN category ON category.id = product.category_id');
if ($rows_data['total_recs'] == 0) {
    enqueueMsg("Invalid product", "error", "product.php");
}
$product_data_tmp = $rows_data['data'];
$product_data = $product_data_tmp[0];
$ptitle = stripcslashes(Decode($product_data['title']));
$p_adult_price = $product_data['adult_price'];
$p_promo_adult_price = $product_data['promo_adult_price'];
$prod_reviews = $product_data['rating'];
//if(intval($p_promo_adult_price) != 0)
// {
//    $p_adult_price = $p_promo_adult_price;
// }
//----------------likes---------------
$where_like = array('product_id' => $pro_id);
$rows_data_like = getRows(DB_TABLE_PREFIX . 'likes', $where_like, '*');
$product_data_like = $rows_data_like['data'];
Exemplo n.º 2
0
                Query("UPDATE admin_user SET full_name = '" . Encode($name) . "', email = '" . Encode($email) . "' WHERE id = '" . Encode($_SESSION['S_ID']) . "'");
                enqueueMsg("Profile has been updated successfully!", "success");
            }
        }
    } else {
        if (isset($new_password) && isset($password_confirm)) {
            $r = Query("SELECT * FROM admin_user WHERE id = '" . Encode($_SESSION['S_ID']) . "' AND password = '******'");
            if (Num($r) > 0) {
                if ($new_password != $password_confirm) {
                    enqueueMsg("Password and confirm password does not match!");
                } else {
                    Query("UPDATE admin_user SET password = '******' WHERE id = '" . Encode($_SESSION['S_ID']) . "'");
                    enqueueMsg("Your password has been updated successfully!", "success");
                }
            } else {
                enqueueMsg("Invalid old Password!");
            }
        }
    }
}
include 'header.php';
?>
<div>
    <ul class="breadcrumb">
        <li><a href="dashboard.php">Home</a> <span class="divider">/</span></li>
        <li>Profile</li>
    </ul>
</div>
<?php 
echo $msg;
?>
Exemplo n.º 3
0
    $update_data = array_copy('id,country_residence,destination,source,handled_by,agent_name,client_name,email,in_date,tr_date,arrival_date,arrival_option,number_of_night,adults,child,infant,currency,budget_from,budget_to,remarks,hotel_start_preference,status' . $dated, $_POST);
    InsertUpdateRecord($update_data, DB_TABLE_PREFIX . 'inquiry', 'id');
    $message = "Inquiry has beed updated";
    enqueueMsg($message, "success", "inquiry.php");
}
if (isset($_GET['id'])) {
    $id = $_GET["id"];
    $where = array('id' => $id);
    $result_arr = getRows(DB_TABLE_PREFIX . 'inquiry', $where);
    if ($result_arr['total_recs'] > 0) {
        $result = $result_arr['result'];
        $row_data = GetArr($result);
        extract($row_data);
        $var_clear = false;
    } else {
        enqueueMsg('Invalid record id.', "alert");
    }
}
if ($var_clear) {
    $id = 0;
    $full_name = "";
    $email = "";
    $mobile = "";
    $hotel_name = "";
    $hotel_address = "";
    $total_adult = "";
    $total_child = "";
    $tour_datedate = "";
    $pickup_timetime = "";
    $product_id = "";
    $product_name = "";
Exemplo n.º 4
0
Arquivo: index.php Projeto: Khum/SDFU
        $res = Query("SELECT * FROM admin_user WHERE user_name = '" . Encode($username) . "' AND password = '******' AND is_deleted = 'N'");
        if (Num($res) > 0) {
            $o = GetObj($res);
            if ($o->is_active == 'N') {
                enqueueMsg("This is not an  active user, please contact system administrator to activate!", "error");
            } else {
                $_SESSION["S_login"] = "******";
                $_SESSION["S_ID"] = $o->id;
                $_SESSION["S_username"] = $o->user_name;
                $_SESSION["S_full_name"] = $o->full_name;
                $_SESSION["S_email"] = $o->email;
                header("location:dashboard.php");
                exit;
            }
        } else {
            enqueueMsg("Invalid User Name/Password!", "error");
        }
    }
}
if ($msg == '') {
    //$msg = displayMsg('Please login with your Username and Password.');
}
$no_visible_elements = true;
include 'header.php';
?>
<div class="row-fluid">
    <div class="span12 center login-header">
        <!--<h2>Welcome to Singaporedeals4u</h2>-->
        <img alt="Singaporedeals4u" src="img/logo.png" />
    </div><!--/span-->
</div><!--/row-->