open() or die($db->error()); if(isset($_POST['Register'])){ $NAME= $_POST['txt_name']; $EMAIL= $_POST['txt_email']; $PHONE= $_POST['txt_phone']; $CITY= $_POST['txt_city']; $MSG= $_POST['txt_comments']; $PID= $_POST['project_id']; $PTITLE= $_POST['project_title']; $TYPE="enquiry-developer"; $IP = getenv("REMOTE_ADDR"); $CREATED_AT = strtotime("now"); //receiver $to = "info@builderflight.com"; // subject of the mail $subject = "$NAME is intrested in $PTITLE"; // from mail $from1 = "From:$EMAIL \r\n"; // setting message which will sent to the e-mail //------------------------------------------------ $message = "Enquiry on builderflight.com via Developer Page \n IP - Address: $IP \n Name : $NAME \n Email Id : $EMAIL \n Project Id : $PID \n Project Name : $PTITLE \n Contact : $PHONE \n City : $CITY \n Comments : $MSG \n"; // mail script send through the server mail($to,$subject,$message,$from1); // Echo " Thanks we will get back soon"; $message1="Thanks $NAME, For your your interest in $PTITLE. You will get a call back from us within next 24 hours.\n\n Thanks \n BuilderFlight Team \r Contact : +91 1204247021 E-Mail : info@builderflight.com F-4, D-242,Sector-63, Noida"; $subject1 = "Thanks for contacting us Mr/Mrs $NAME"; $from2="From:$to \r\n"; mail($from1,$subject1,$message1,$from2); addQuerytoDataBase($NAME,$EMAIL,$PHONE,$CITY,$MSG,$TYPE,$IP,$PID,$PTITLE,$CREATED_AT,$db); } $pageid = $_REQUEST['pid']; $pagename = $_REQUEST['pname']; getPages($pageid,$pagename,$db); if($_SESSION['SESS_v_siteuser']) { $TOPBAR = ReadTemplate("$TEMPLATE_DIR/common/topbar_login.html"); } else { $TOPBAR = ReadTemplate("$TEMPLATE_DIR/common/topbar.html"); } $PAGE_CONTENTS = ReadTemplate("$TEMPLATE_DIR/developer.html"); //$LEFT_CONTENTS = ReadTemplate("$TEMPLATE_DIR/common/developer_rightbar.html"); $BOTTOMBAR = ReadTemplate("$TEMPLATE_DIR/common/bottombar.html"); $SUB_TEMPLATE = ReadTemplate("$TEMPLATE_DIR/common/sub_template_other.html"); $TEMPLATE = ReadTemplate("$TEMPLATE_DIR/common/template.html"); ReplaceContent(Array("TOPBAR", "BOTTOMBAR","LEFT_CONTENTS", "PAGE_CONTENTS", "SUB_TEMPLATE", "TEMPLATE")); print $TEMPLATE; flush(); function getPages($pageid,$pagename,$db) { global $NEWS_HEADLINES, $MAP_VROOT_PATH, $IMG_DIR, $DOCUMENT_ROOT, $NEWS_PIC_DIR, $GRID1, $GRID2,$GRIDLIST,$GRIDLIST1, $TEMPLATE_DIR; global $v_location,$v_newspaper,$d_newsDate,$developer_title,$profle,$pagename,$i_newsID,$LIST,$image,$d_id,$d_title,$PROJECT_LIST ; /*if($pagename){ $v_pgTitleArr = explode("_",$pagename); if(count($v_pgTitleArr) >1) { $pagenameStr = implode(" ",$v_pgTitleArr); $pagenameStr = strtoupper($pagenameStr); } else { $pagenameStr = strtoupper($pagename); } } */ $pidDecode = base64_decode($pageid); if($pidDecode) { $pidDecodeArr = explode("_",$pidDecode); $pidVal = $pidDecodeArr[1]; } $query2="select * from tbl_developers where developer_id ='$pidVal'"; $db->query($query2); $total = $db->num_rows(); if($total >0){ $row = $db->fetch_array(); $developer_title = ucfirst($row[developer_title]); $profle = $row[profle]; $image = $row['logo']; $d_id = $row['developer_id']; $d_title = $row['developer_title']; } else { $pagename = "Error"; $PAGE = "No Page Found!"; } $query2="select project_title,project_id,min_price,project_city,openside,display_location,tower,display_price,min_size,max_size,project_image,project_punch_line,propstatus,bathrooms,floor_no,totl_floor from tbl_project_dtls tpd inner join tbl_city tc on tc.city_id = tpd.project_city where developer_id='$pidVal'"; $db->query($query2); $total = $db->num_rows(); if($total >0){ $PROJECT_LIST = ""; while($row = $db->fetch_array()) { //echo '
'; print_r($row);
		$project_title = $row['project_title'];
		$project_id = $row['project_id'];
		$project_city = $row['project_city'];
		$display_location = $row['display_location'];
		$tower = $row['tower'];
		$display_price = $row['min_price'];
		$min_size = $row['min_size'];
		$max_size = $row['max_size'];
		$project_image = $row['project_image'];
		$project_punch_line = $row['project_punch_line'];
		$propstatus = $row['propstatus'];
		
		if(isset($row['openside']) && $row['openside'] != '')
		{
			$openside=$row['openside'];
		
		}else{
			$openside='N/A';
		}
		
								if(isset($propstatus) && $propstatus != '')
								{
								$propstatus = $propstatus;
								}else{
								$propstatus = "N/A";
								}
		
		$bathrooms = $row['bathrooms'];
		$floor_no = $row['floor_no'];
		$totl_floor = $row['totl_floor'];
		if($min_size!="" && $max_size!="")
		{
			$SIZE = $min_size." - ".$max_size;
		}else if($min_size!="" && $max_size=="")
		{
			$SIZE = $min_size;
		}else if($min_size!="" && $max_size=="")
		{
		  $SIZE = $max_size;
		}else
		{
			$SIZE = "N/A";
		}
		if($tower)
		{
			$PLAN = "
Plan: $tower
"; } if($project_punch_line){ if(strlen($project_punch_line) > 70){ $project_punch_line =substr($project_punch_line, 0, 70); } $PUNCH_LINE = $project_punch_line; } $display_price_val = ($display_price != "")? $display_price : 'N/A'; $project_title_val = $row['project_title']; if($project_title_val){ $project_title = str_replace(" ","-",$project_title_val); } $queryStr = base64_encode('project_'.$project_id); $PROJECT_LIST .= "
  • "; $PROJECT_LIST .= ""; if(isset($project_image) && $project_image != '') { $PROJECT_LIST .= ""; }else{ $PROJECT_LIST .= ""; } $PROJECT_LIST .= " View Detail "; $PROJECT_LIST .= "

    $project_title_val

    $display_location
    $propstatusStatus
    $SIZESize
    $opensideFacing

    $PUNCH_LINE

    Rs. $display_price*
  • "; } if($page > 0) { $prevpage=$page - $MAX; $PREV_PAGE_LINK="| Prev Page |"; } if($TOTAL_RECORDSET > $lastrow) { $NEXT_PAGE_LINK="| Next Page |"; } $PAGE_NAVS=""; for($i=0,$toPrint=1;$i< $TOTAL_RECORDSET;$i+=$MAX,$toPrint++) { if ($lastrow-$i==$MAX) { $PAGE_NAVS.=" ".$toPrint." | "; $CURRENT_PAGE_NO = $toPrint; } else { $PAGE_NAVS.=" $toPrint |"; } $TOTAL_PAGES=$toPrint; } //$PROJECT_LIST .= ""; }else { $PROJECT_LIST = "
  • Sorry! No Result Found!
  • "; } } function addQuerytoDataBase($NAME,$EMAIL,$PHONE,$CITY,$MSG,$TYPE,$IP,$PID,$PTITLE,$CREATED_AT,$db) { $query="insert into tbl_query (name,email,mobile,city,msg,type,ip,p_id,p_title,created_at) values ('$NAME','$EMAIL','$PHONE','$CITY','$MSG','$TYPE','$IP','$PID','$PTITLE','$CREATED_AT')"; $db->query($query); } ?>