if (isset($_GET['search'])) { $search['search'] = $_GET['search']; } elseif (isset($_GET['price'])) { if ($_GET['price'] == 1) { $search['price-down'] = 'price-down'; } else { $search['price-up'] = 'price-up'; } } elseif (isset($_GET['category'])) { $search['category'] = $_GET['category']; } else { $search['category'] = ''; } //print_r($cookie); //echo '<br>'.$fav; $obj = new realestate(); $data = $obj->get_data($search); if (isset($_GET['category'])) { $category = $_GET['category']; switch ($category) { case 1: $category = 'Apartment'; break; case 2: $category = 'House'; break; case 3: $category = 'Commercial'; break; default: $category = 'All';
<?php include_once 'classes/realestate.php'; $obj = new realestate(); $param['submit'] = 'fresh'; $get_data = $obj->contactus($param); while ($row = mysqli_fetch_array($get_data)) { $_DATA[$row['name']] = $row['value']; } if (isset($_POST['submit'])) { foreach ($_POST as $key => $value) { if (empty($_POST[$key])) { $error = 'style="display:block;"'; // exit('foreach'); } $_data[$key] = $value; } if (!isset($error)) { // print_r($_data); $to = '*****@*****.**'; $subject = 'Infromation about investment '; $message = '<h3>Hi Dear</h3><br>' . $_data['message'] . '<br><br> Redards:<br> ' . $_data['name'] . '<br> ' . $_data['email'] . '<br> ' . $_data['phone']; //echo $message; $result = $obj->send_email($to, $subject, $message); if ($result == TRUE) { $result = 'style="display:block;"'; } else { $result_fail = 'style="display:block;"'; } } }
<?php include_once '../classes/realestate.php'; if (!isset($_SESSION['secour']) && $_SESSION['secour'] != 'secour') { header("Location:../index.php"); } //echo session_status(); $obj = new realestate(); if (isset($_GET['logout'])) { $obj->logout(); } if (isset($_POST['submit'])) { if (isset($_GET['forget'])) { $param = array('user_name' => $_POST['name'], 'user_email' => $_POST['email']); $result = $obj->pass_update($param); if ($result == TRUE) { $forgetmsg = 'Your new password sent on your Reg. email'; } } else { $param = array('user_name' => $_POST['name'], 'user_password' => $_POST['password']); $result = $obj->login($param); } } //echo $_SESSION['post_id']; ?> <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. -->
<?php include_once '../classes/realestate.php'; if (!isset($_SESSION['login']) && $_SESSION['login'] != 'login') { header("Location:../index.php"); } //echo session_status(); $obj = new realestate(); if (isset($_POST['submit'])) { if ($_POST['password'] == $_POST['cpassword'] && !empty($_POST['cpassword']) && !empty($_POST['password'])) { //$param = array('password' => $_POST['password'], 'token' => 'update'); $result = $obj->change_pass($_POST['password']); } else { $error = true; } } //echo $_SESSION['post_id']; ?> <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <meta charset="UTF-8"> <title></title> <?php include 'head.php'; ?>
<?php include_once 'classes/realestate.php'; $obj = new realestate(); $param['submit'] = 'fresh'; $get_data = $obj->contactus($param); while ($row = mysqli_fetch_array($get_data)) { $_DATA[$row['name']] = $row['value']; } if (isset($_COOKIE['favorite'])) { $cookie = explode(',', $_COOKIE['favorite']); $fav = sizeof($cookie); } if (isset($_GET['category'])) { $category = $_GET['category']; switch ($category) { case 1: $category = 'Apartment'; break; case 2: $category = 'House'; break; case 3: $category = 'Commercial'; break; default: $category = 'All'; break; } } else { $category = '';
* * @author Usman */ session_start(); if (isset($_POST['image_d'])) { $result = unlink('../upload/' . $_POST['image_d']); // $obj = new realestate(); // $result = $obj->delete_fimage($_POST['image_d']); // if ($result==TRUE) { echo $result; // } // exit; } if (isset($_POST['d_name'])) { // $result=unlink('../upload/'.$_POST['image_d']); $obj = new realestate(); $result = $obj->delete_fimage($_POST['d_name']); if ($result == TRUE) { echo $result; } // exit; } class realestate { function connection() { $conn = mysqli_connect('localhost', 'reccatec_real', 'admin', 'reccatec_realestate'); // $conn = mysqli_connect('localhost', 'root', '', 'realestate'); if ($conn == TRUE) { return $conn; } else {
} else { $_DATA['parking'] = 'yes'; } // print_r($_FILES["images"]); // exit(); if (isset($_FILES["images"]) && !empty($_FILES["images"]["name"][0])) { $_DATA['images'] = $_FILES["images"]; $_DATA['images_empty'] = 'no'; } else { $_DATA['images'] = $_FILES["images"]; $_DATA['images_empty'] = 'yes'; } // print_r($_DATA); // exit(); if (!isset($error)) { $obj = new realestate(); $result = $obj->store_data($_DATA); } //print_r($_DATA); //echo implode(',' ,$_DATA['image']); } /* defult variable to set in input */ if (!empty($_DATA['post_id']) || isset($_DATA['post_id'])) { $postid = 'value="' . $_DATA['post_id'] . '"'; } else { $postid = 'value="' . time() . '"'; } if (!empty($_DATA['name']) || isset($_DATA['name'])) { $name = 'value="' . $_DATA['name'] . '"'; } else { $name = 'placeholder="Post name"';
<?php include 'classes/realestate.php'; $obj = new realestate(); if (!isset($_GET['get_id'])) { header('Location:index.php'); } else { $param['post_id'] = $_GET['get_id']; $row = $obj->get_post($param); $main_post = mysqli_fetch_array($row); // print_r($main_post); } if (isset($_POST['submit'])) { foreach ($_POST as $key => $value) { if (empty($_POST[$key])) { $error = true; } $_data[$key] = $value; } if (!isset($error)) { print_r($_data); $to = '*****@*****.**'; $subject = 'About property'; $message = '<h2>Hi Dear</h2><br>' . $_data['message'] . '<br> Property URL: ' . $_data['url'] . '<br> Property ID: ' . $_data['post_id'] . '<br><br> Redards:<br> ' . $_data['name'] . '<br> ' . $_data['email'] . '<br> ' . $_data['phone']; //echo $message; $result = $obj->send_email($to, $subject, $message); } } ?> <!DOCTYPE html>
<?php $obj = new realestate(); if (isset($_GET['search'])) { $search['search'] = $_GET['search']; } elseif (isset($_GET['price'])) { if ($_GET['price'] == 1) { $search['price-down'] = 'price-down'; } else { $search['price-up'] = 'price-up'; } } elseif (isset($_GET['category'])) { $search['category'] = $_GET['category']; } else { $search['category'] = ''; } //switch ($category) { // case 1: // break; // case 2: // break; // case 3: // break; // // default: // break; //} $first_load = $obj->first_load($search); $category = ""; $i = 1; $no_of_row = mysqli_num_rows($first_load);
//print_r($_POST); //exit(); foreach ($_POST as $key => $value) { if (empty($_POST[$key])) { $_Error[$key] = $value; $error = TRUE; } else { // if($_POST[$key]!='submit'){ $_DATA[$key] = $value; // } } } if (!isset($error)) { // print_r($_DATA); // exit(); $obj = new realestate(); $result = $obj->contactus($_DATA); while ($row = mysqli_fetch_array($result)) { // print_r($row); // exit(); foreach ($row as $key => $value) { $_DATA[$key] = $value; } } } //print_r($_DATA); //echo implode(',' ,$_DATA['image']); } else { $param['submit'] = 'fresh'; $get_data = $obj->contactus($param); while ($row = mysqli_fetch_array($get_data)) {
<?php include_once 'classes/realestate.php'; $obj = new realestate(); $param['submit'] = 'fresh'; $get_data = $obj->contactus($param); while ($row = mysqli_fetch_array($get_data)) { $_DATA[$row['name']] = $row['value']; } $obj = new realestate(); if (!isset($_GET['get_id'])) { header('Location:index.php'); } else { $param['post_id'] = $_GET['get_id']; $row = $obj->get_post($param); $main_post = mysqli_fetch_array($row); switch ($main_post['category']) { case 1: $category = 'Apartment'; break; case 2: $category = 'House'; break; case 3: $category = 'Commercial'; break; } $post_images = $obj->get_images($param); $param['next_id'] = TRUE; $next_row = $obj->get_post($param); $next_id = mysqli_fetch_array($next_row);
<?php include_once '../classes/realestate.php'; if (!isset($_SESSION['login']) && $_SESSION['login'] != 'login') { header("Location:../index.php"); } $obj = new realestate(); if (isset($_GET['delete_id'])) { $param = $_GET['delete_id']; $result = $obj->delete_post($param); } $num_rec_per_page = 10; if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page = 1; } $start_from = ($page - 1) * $num_rec_per_page; $result = $obj->post_pagination($start_from, $num_rec_per_page); $search['category'] = ''; $rs_result = $obj->get_data($search); $total_records = mysqli_num_rows($rs_result); //count number of records $total_pages = ceil($total_records / $num_rec_per_page); ?> <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. -->
<?php include_once 'classes/realestate.php'; $obj = new realestate(); $param['submit'] = 'fresh'; $get_data = $obj->contactus($param); while ($row = mysqli_fetch_array($get_data)) { $_DATA[$row['name']] = $row['value']; } if (isset($_COOKIE['favorite'])) { $cookie = explode(',', $_COOKIE['favorite']); $fav = sizeof($cookie); } //print_r($cookie); //echo '<br>'.$fav; $obj = new realestate(); $data = $obj->get_data(); ?> <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <meta charset="UTF-8"> <title></title> <?php include 'inc/head.php';
<?php $last_msg_id = $_GET['last_msg_id']; //exit(); $obj = new realestate(); //if(!isset($_GET['category'])){ //// $search['category'] = 'dfgsd'; // $search['search'] = $_GET['search']; //}else{ // $search['category'] = $_GET['category']; //} //print_r($_GET); //exit(); if (isset($_GET['search']) && $_GET['search'] != '') { $search['search'] = $_GET['search']; // print_r($search['search']); // exit(); } elseif (isset($_GET['price']) && $_GET['price'] != '') { // print_r($_GET['price']); // exit(); if ($_GET['price'] == '1') { $search['price-down'] = 'price-down'; $search['value'] = $_GET['pricevalue']; // print_r($search['price-down']); // exit(); } else { $search['price-up'] = 'price-up'; $search['value'] = $_GET['pricevalue']; } } elseif (isset($_GET['category'])) { $search['category'] = $_GET['category'];