Lightbox unable to Enlarge Images - php

This week our product pages have been not working as intended. When clicking the product image thumbnail to enlarge, the lightbox window loads and just continues to load, never displaying the image. It was working before and I have no access to these scripts and files, since they are loaded through PHP that I have no access to. We are on BigCommerce's platform, but BC will not help me because we have customized our template. I have poured through the source code and cannot find what could be causing this issue. Any help is greatly appreciated.
Link to a product page: http://www.inflatableboats.net/demo-zodiac-pro-open-650-t-top-neo-2016-with-twin-yamaha-f70-four-stroke/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/">
%%Panel.HTMLHead%%
<body>
<script type="text/javascript" src="%%GLOBAL_AppPath%%/javascript/jquery/plugins/validate/jquery.validate.js?%%GLOBAL_JSCacheToken%%"></script>
<script type="text/javascript" src="%%GLOBAL_AppPath%%/javascript/product.functions.js?%%GLOBAL_JSCacheToken%%"></script>
<script type="text/javascript" src="%%GLOBAL_AppPath%%/javascript/product.js?%%GLOBAL_JSCacheToken%%"></script>
<div id="Container">
%%Panel.Header%%
<div id="Wrapper">
%%Panel.WrapperBanner%%
<div class="Left" id="LayoutColumn1">
%%Panel.SideCategoryList%%
%%Panel.SideNewProducts%%
%%Panel.SideNewsletterBox%%
%%Panel.SideLiveChatServices%%
</div>
<div class="Content" id="LayoutColumn2">
%%Panel.ProductBreadcrumb%%
%%Panel.ProductDetails%%
<div id="Fees">
<p id="FeeHeader"><strong>Standard Fees Apply</strong></p>
<a class="tooltip" style="float: left;" href="#"> PDI: <span> <img class="callout" src="http://inflatableboats.net/template/feebox/callout.gif" alt="" /> <strong>Pre-Delivery Inspection</strong><br /> Standard Fee for services performed and products used on each new vessel, requested by all manufacturers to validate and assist in all warranties.<br /><br />We install a deep cycle marine battery, fully rig steering components, complete electrical and systems check. We conduct a full system check on the motor, fill with oil, fluids, and fuel, then test run in a test tank.<br /><br />Once everything is tuned and prepared, a sea trial is performed with two Specialists to achieve ideal RPM-to-top-speed ratio, ensuring the boat gets on plane properly, and all systems operate on water.<br /><br />Afterwards a full detail is performed on the tubes, deck, and hull to be turn-key ready for the customer. </span> </a>
<p style="float: left;"> </p>
<a class="tooltip" style="float: left;" href="#"> Destination Fee: <span> <img class="callout" src="http://inflatableboats.net/template/feebox/callout.gif" alt="" /> <strong>Destination Fees are set by Zodiac.</strong><br /> Standard Fee both vehicle and vessel dealerships are charged from a manufacturer to ship product to dealerships </span> </a>
<p style="float: left;"> </p>
</div>
<div id="quote">
<a class="btn lightbox-40737220632144" style="cursor: pointer;"><img id="quotebutton" style="" src="http://inflatableboats.net/template/img/request-a-quote.png" name="quotebutton" /></a>
<img id="financebutton" style="" src="http://inflatableboats.net/template/img/finance-button.png" name="quotebutton" />
</div>
%%Panel.ProductTabs%%
%%Panel.ProductDescription%%
%%Panel.ProductVideos%%
%%Panel.ProductWarranty%%
%%Panel.ProductOtherDetails%%
%%Panel.SimilarProductsByTag%%
%%Panel.ProductByCategory%%
%%Panel.ProductVendorsOtherProducts%%
%%Panel.SimilarProductsByCustomerViews%%
</div>
<div class="Right" id="LayoutColumn3">
%%Panel.SideCurrencySelector%%
%%Panel.SideProductAddToWishList%%
%%Panel.SideProductRelated%%
%%Panel.SideProductRecentlyViewed%%
</div>
<br class="Clear" />
</div>
%%Panel.Footer%%
</div>
<script>
$(document).ready(function(){
$("#ProductOtherDetails .ProductDetailsGrid .DetailRow").each(function(){
var label = $(".Label",this).text();
if ( label === 'PDI:') {
var pdiAmount = $(".Value",this).text();
pdiAmount = pdiAmount.replace(/\t/g,"");
pdiAmount = pdiAmount.replace(/\n/g,"");
//console.log("PDI is " + pdiAmount);
$("#Fees p:nth-of-type(2)").text(pdiAmount);
}
if ( label === 'DF:') {
var dfiAmount = $(".Value",this).text();
dfiAmount = dfiAmount.replace(/\t/g,"");
dfiAmount = dfiAmount.replace(/\n/g,"");
//console.log("DF is " + dfiAmount);
$("#Fees p:nth-of-type(3)").text(dfiAmount);
}
})
});
</script>
<script src="https://form.jotform.com/static/feedback2.js?3.3.REV" type="text/javascript"> var JFL_40737220632144 = new JotformFeedback({ formId: '40737220632144', base: 'https://form.jotform.com/', windowTitle: 'Request a Quote', background: '#B10D13', fontColor: '#FFFFFF', type: 'false', height: 500, width: 700, openOnLoad: false }); </script>
</body>
</html>
I think that maybe it is caused by a TypeError, but do not know how I can fix this. Image linked below. It points me to the first line of the source, which is the HTML Doctype. That doesn't make sense to me.

Related

Button within multiple divs wont change with css

The button with in my code will not change at all, i have tried listing all the divs and this still has not worked
This is the code for the page, php:
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<!-- edit the refrence to show them the different options -->
<link rel="stylesheet" type="text/css" href="IndexopOr.css">
<!--<link rel="stylesheet" type="text/css" href="css/styler.php">-->
<title>Wccs Canteen</title>
</head>
<body>
<h1 class="Top_Text">WCCS Lunch Order</h1>
<div id="Menu-fixer1">
<div id="Menu_fin1">
<img src="WCCS Logo.png" id="lighthouse">
</div>
</div>
<div id="Menu-fixer">
<div id="Menu_fin">
<table>
<tr>
<td>
<!-- this will change when the css source is changed between Indexop1 and Indexop2, currently it is linked to Index, the file i will change when we have decided what we like -->
<span>Menu </span>
</td>
</tr>
<tr>
<td>
<span>Order </span>
</td>
</tr>
<tr>
<td>
<span>Contact Us </span>
</td>
</tr>
</table>
</div>
</div>
<div id="menu_bar">
<div id="menu_user">
<style type="text/css">
#menu_user {
position: absolute;
right: 10px;
bottom:20%;
font-size: 24px;
color: white;
font-family: HelvLight, verdana;
}
</style>
<?php
//seeing as you like documentation sir i added this in telling you about sessions, remind me to tell you if you want it explained
if (isset($_SESSION['food'])) {
echo 'Student: '.$_SESSION['food'];
echo $_SESSION['ln'];
} else {
echo "You are not logged in!";
}
?>
</div>
<div id="menubar_bottom">
<h1 class="menu_Hpg">Menu</h1>
</div>
</div>
<div id="list_space">
<div id="Right_list">
</div>
<div id="Left_orders">
<button id="but">Confirm</button>
</div>
<!--<div id="Bar"></div>-->
<div id="mid_bar"></div>
</div>
</body>
</html>
Then the css code:
#but button {
color:blue;
}
there is alot of css that is the part editing the button, please tell me why it doesn't work. It works when i just type style next to it and add it but it doesn't allow me to put a hover option on there.
#but button means that you are looking for button inside element with id but. You do not have such situation in your code. You have button with id but so it must be like this:
button#but
change '#but button' to 'button#but' in your css, because button has the id not its parent element
button#but {
color:blue;
}
try this selector, it select button that having attribute id=but
button#but
If you want to use multiple buttons, you must use classes and not id's. The id's can be used only one per page.
in any case, the syntax is correct button#but{} or #but{}.

While loop is repeating other elements in the page

Hello I have a query with while loop which is used for retrieving data but in here my query
along my while loop is in top of page so its repeating other elements specifically my
header.
Here is the code:
<?php
require_once('../Admin Panel/db.php');
if(!empty($_POST['Province']) && !empty($_POST['District']) && !empty($_POST['radio']))
{
$provincename=$_POST['Province'];
$districtname=$_POST['District'];
$propertystatus=$_POST['radio'];
$query = "SELECT
properties.PropertyID,
properties.PropertyType,
properties.PropertyDealType,
properties.PropertyRegion,
properties.PropostedPrice,
properties.DealStatus,
properties.CurrencyType,
propertyimages.ImageID,
propertyimages.ImagePath,
propertyimages.ImageName,
provinces.ProvinceName,
districts.DistrictName,
pds.PDName
FROM properties, provinces, districts, pds, propertyimages
WHERE provinces.ProvinceID=properties.ProvinceID
AND districts.DistrictID=properties.DistrictID
AND pds.PDID=properties.PDID
AND properties.ImageID=propertyimages.ImageID
AND properties.Status= 'Active'
AND properties.propertyStatus = 'APPROVED'
AND ProvinceName='".$provincename."'
AND DistrictName='".$districtname."'
AND PropertyDealType='".$propertystatus."'
GROUP BY properties.PropertyID";
$queryrun= $connection->query($query); // The query run in here
if( $connection->error ) exit( $connection->error ); // In here checks for the errors which may occure in our query
while ($row= $queryrun->fetch_assoc()) // storing the value of the query into the variable of row
{
$count= $queryrun->num_rows; // Taking the number of queries returened by the result
?>
<!DOCTYPE html>
<html>
<head>
<LINK REL="SHORTCUT ICON" HREF="favico.ico">
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content=" spdealers Onlince Dealing," />
<meta name="Keywords" content="spdealers.com - spdealers, Property spdealers, Property spdealers, real estate Afghanistan, Afghanistan property, Afghanistan properties, property in Afghanistan, property Afghanistan, Afghanistan real estate, apartments, properties for sale Afghanistan, office space, property, buy property, sell property, rent property, commercial real estate Afghanistan, Afghanistan properties, Afghanistan properties on sale, Afghanistan property portals, Afghanistan residential real estate, rental property, flats, apartments, studio apartments, property site,makaan, makan, spdealers.com, real estate properties, Afghanistan real estate, real estate Afghanistan, property Afghanistan, Afghanistan property portal, buy property, sell property, rent property online, flats, apartments, studio apartment, rental property, commercial real estate, search property, list property, post requirement, featured builders, dealers, property index, properties in Afghanistan, property by localityProperty, Properties, Property For Sale, Find a Property, Properties for sale, Real Estate, Buy real estate. R">
<Meta name="description" content="spdealers Online Property Dealing In Afghansitan, Property Search, buy, sell, rent, lease residential, commercial propertys only on spdealers.com.">
<title>SPDealers</title>
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="logo">
<img src="images/logo.png" alt="" />
</div>
<ul>
<li class="selected"><span>PROPERTY</span></li>
<li>View Option</li>
<li><span>HOME</span></li>
</ul>
</div>
<div id="body">
<div class="header">
<div>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
<div>
<p>Do you want to earn money and have a good income? Do you want to receive money without working hours and putting pressure over your Mind, So Please contact with us and make yourself one of our valuable Remote Employee Click Here for more information.</p>
</div>
<div id="threeimages">
<img src="images/flags.png">
<img src="images/graph.png">
</div>
</div>
</div>
<br>
<div class="footer">
<div class="featured">
<div class="propertywrapperviewmore">
<div class="propertysingleimageviewmore">
<a href="property.php?ImageID=<?php echo $row['ImageID'] ?>">
<img src="../Admin Panel/Property_Insertion_Files/<?php echo $row['ImagePath'] ?>" width="227" height="147" alt="<?php echo $row['ImageName'] ?>" style="border-radius:8px;" ></a>
</div>
<div class="propertyIDviewmorelablevalue">
<div class="propertyIDL">Property ID:</div>
<div class="propertyIDV"><?php echo $row['PropertyID']?></div>
<div align="right" style="
width:310px;
height:15px;
font-size:20px;
float:right;
padding-bottom:5px;
background-color:#000;
color:#FFF;
"><marquee behavior="scroll" scrollamount="2" onMouseover="this.scrollAmount=1" onMouseout="this.scrollAmount=6"><?php echo $row['PropertyDealType'] ?></marquee></div>
</div>
<div class="propertysviewmoreotherlablevalue">
<div class="propertyothersL">Property Type:</div>
<div class="propertyothersV"><?php echo $row['PropertyType']?></div>
</div>
<div class="propertysviewmoreotherlablevalue">
<div class="propertyothersL">Address:</div>
<div class="propertyothersV"><?php echo $row['PropertyRegion'].' / Nahya: '.$row['PDName'].' / District: '.$row['DistrictName'].' / '.$row['ProvinceName']?></div>
</div>
<div class="propertysviewmoreotherlablevalue">
<div class="propertyothersL">Total Price:</div>
<div class="propertyothersV"><?php $price = (isset($row['PropostedPrice']) && $row['PropostedPrice']!='')?
number_format($row['PropostedPrice'], 2, '.', ','):'';
echo $row['CurrencyType'].' '.$price?></div>
</div>
<div class="propertysviewmoreotherlablevalue">
<div class="propertyothersL">Deal Status:</div>
<div class="propertyothersV"><?php echo $row['DealStatus']?></div>
</div>
<br><br><br><br>
<div class="propertysviewmoreDescription">
<div class="propertysviewmoreDescriptionL">Description:</div>
<div class="propertysviewmoreDescriptionV">
To find out more this property, please click on the VIEW MORE button. You can contact us more specific information
on this property.
<label style="float:right;"><br>View More</label>
<div>
</div>
</div>
</div>
</div>
<?php
}
if($queryrun->num_rows == 0)
{
echo "<div style='margin-left:116px; line-height: 36px;'>".'Sorry there is no Record for Your search: '." ". "<br>
Province: <b>".$provincename."</b> <br>District: <b>". $districtname."</b>
<br> Property Status: <b>".$propertystatus."</b>
<br> to search other provinces and cities
<br>
<a href='../index.php' style='text-decoration:none; font-size: 16px; color:#2a4f5e;'>Click Here</a>
</div>";
}
}
else
{
echo '<br><br>You Havent Selected The Following Properly:<br><br>
<strong>(Province)</strong> <br>
<strong>(District)</strong> <br>
<strong>(Property Status)</strong>.<br><br>';
echo "Please <a href='../index.php' style='text-decoration:none; font-size: 16px; color:#2a4f5e;'>Click Here</a> to go back";
}
?>
</div>
<div id="ads" style="margin-left:844px;">
<div id="adsone"></div>
<div id="adsthree"></div>
</div>
</div>
</div>
<div id="footer">
<div id="bottomoptions">Home About Us Advertise With Us Terms&Condition Help&Support Privacy Policy FAQ Contact Us Report A Problem
<div id="copyright"><p>All rights Reserved©2014 spdealers.com</p>
</div>
</div>
</div>
</div>
</body>
</html>
I am only guessing where your loop is supposed to be and where your breaks should be on if else conditions. They should hopefully be close...??
<?php
require_once('../Admin Panel/db.php');
class ProvinceProp
{
protected $connection;
public function __construct($connection)
{
$this->connection = $connection;
}
public $provincename;
public $districtname;
public $propertystatus;
public $num_rows;
public function ProcessPost()
{
if(!empty($_POST['Province']) && !empty($_POST['District']) && !empty($_POST['radio'])) {
$this->provincename = $_POST['Province'];
$this->districtname = $_POST['District'];
$this->propertystatus = $_POST['radio'];
$query = "SELECT
properties.PropertyID,
properties.PropertyType,
properties.PropertyDealType,
properties.PropertyRegion,
properties.PropostedPrice,
properties.DealStatus,
properties.CurrencyType,
propertyimages.ImageID,
propertyimages.ImagePath,
propertyimages.ImageName,
provinces.ProvinceName,
districts.DistrictName,
pds.PDName
FROM properties, provinces, districts, pds, propertyimages
WHERE provinces.ProvinceID=properties.ProvinceID
AND districts.DistrictID=properties.DistrictID
AND pds.PDID=properties.PDID
AND properties.ImageID=propertyimages.ImageID
AND properties.Status= 'Active'
AND properties.propertyStatus = 'APPROVED'
AND ProvinceName='".$this->provincename."'
AND DistrictName='".$this->districtname."'
AND PropertyDealType='".$this->propertystatus."'
GROUP BY properties.PropertyID";
// The query run in here
$queryrun = $this->connection->query($query);
// In here checks for the errors which may occure in our query
if( $this->connection->error )
exit( $this->connection->error );
$this->num_rows = $queryrun->num_rows;
// storing the value of the query into the variable of row
while ($res = $queryrun->fetch_assoc()) {
$array[] = $res;
}
// Return array or return 0 (false)
return (isset($array))? $array: 0;
}
}
}
// Start instance, feed in database connection
$_property = new ProvinceProp($connection);
// See if there are rows returned (greater than or equal to 0) or empty
// Empty signifies that criteria to generate the sql was not satisfied
$array = $_property->ProcessPost();
?><!DOCTYPE html>
<html>
<head>
<LINK REL="SHORTCUT ICON" HREF="favico.ico">
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content=" spdealers Onlince Dealing," />
<meta name="Keywords" content="spdealers.com - spdealers, Property spdealers, Property spdealers, real estate Afghanistan, Afghanistan property, Afghanistan properties, property in Afghanistan, property Afghanistan, Afghanistan real estate, apartments, properties for sale Afghanistan, office space, property, buy property, sell property, rent property, commercial real estate Afghanistan, Afghanistan properties, Afghanistan properties on sale, Afghanistan property portals, Afghanistan residential real estate, rental property, flats, apartments, studio apartments, property site,makaan, makan, spdealers.com, real estate properties, Afghanistan real estate, real estate Afghanistan, property Afghanistan, Afghanistan property portal, buy property, sell property, rent property online, flats, apartments, studio apartment, rental property, commercial real estate, search property, list property, post requirement, featured builders, dealers, property index, properties in Afghanistan, property by localityProperty, Properties, Property For Sale, Find a Property, Properties for sale, Real Estate, Buy real estate. R">
<Meta name="description" content="spdealers Online Property Dealing In Afghansitan, Property Search, buy, sell, rent, lease residential, commercial propertys only on spdealers.com.">
<title>SPDealers</title>
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
</head>
<body>
<div id="wrapper">
<?php
// I am only guessing where conditions are met so display required....
if(isset($_property->provincename)) { ?>
<!--start header class -->
<div id="header">
<div id="logo"><img src="images/logo.png" alt="" /></div>
<ul>
<li class="selected"><span>PROPERTY</span></li>
<li>View Option</li>
<li><span>HOME</span></li
</ul>
</div>
<!--start body class -->
<div id="body">
<div class="header">
<div>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
<div>
<p>Do you want to earn money and have a good income? Do you want to receive money without working hours and putting pressure over your Mind, So Please contact with us and make yourself one of our valuable Remote Employee Click Here for more information.</p>
</div>
<div id="threeimages">
<img src="images/flags.png">
<img src="images/graph.png">
</div>
</div>
</div>
<div class="footer">
<div class="featured"><?php
// If the array was returned (ie rows were returned from db)
if(is_array($array)) {
// Here is the start of the loop where I am guessing it would be...??
foreach($array as $row) { ?>
<div class="propertywrapperviewmore">
<div class="propertysingleimageviewmore">
<a href="property.php?ImageID=<?php echo $row['ImageID'] ?>">
<img src="../Admin Panel/Property_Insertion_Files/<?php echo $row['ImagePath'] ?>" width="227" height="147" alt="<?php echo $row['ImageName'] ?>" style="border-radius:8px;" ></a>
</div>
<div class="propertyIDviewmorelablevalue">
<div class="propertyIDL">Property ID:</div>
<div class="propertyIDV"><?php echo $row['PropertyID']?></div>
<div align="right" style="width:310px; height:15px; font-size:20px; float:right; padding-bottom:5px; background-color:#000; color:#FFF;">
<marquee behavior="scroll" scrollamount="2" onMouseover="this.scrollAmount=1" onMouseout="this.scrollAmount=6"><?php echo $row['PropertyDealType'] ?></marquee>
</div>
</div>
<div class="propertysviewmoreotherlablevalue">
<div class="propertyothersL">Property Type:</div>
<div class="propertyothersV"><?php echo $row['PropertyType']?></div>
</div>
<div class="propertysviewmoreotherlablevalue">
<div class="propertyothersL">Address:</div>
<div class="propertyothersV"><?php echo $row['PropertyRegion'].' / Nahya: '.$row['PDName'].' / District: '.$row['DistrictName'].' / '.$row['ProvinceName']?></div>
</div>
<div class="propertysviewmoreotherlablevalue">
<div class="propertyothersL">Total Price:</div>
<div class="propertyothersV">
<?php $price = (isset($row['PropostedPrice']) && $row['PropostedPrice']!='')? number_format($row['PropostedPrice'], 2, '.', ','):'';
echo $row['CurrencyType'].' '.$price?></div>
</div>
<div class="propertysviewmoreotherlablevalue" style="margin-bottom: 60px;">
<div class="propertyothersL">Deal Status:</div>
<div class="propertyothersV"><?php echo $row['DealStatus']?></div>
</div>
<div class="propertysviewmoreDescription">
<div class="propertysviewmoreDescriptionL">Description:</div>
<div class="propertysviewmoreDescriptionV">To find out more this property, please click on the VIEW MORE button. You can contact us more specific information on this property.
<label style="float:right;"><br>View More</label>
<div>
</div>
</div>
<?php }
} ?>
</div>
</div>
<?php }
if(isset($_property->num_rows) && $_property->num_rows == 0) { ?>
<div style='margin-left:116px; line-height: 36px;'>Sorry there is no Record for Your search: <br>
Province: <b><?php echo $provincename; ?></b> <br>District: <b><?php echo $districtname; ?></b>
<br> Property Status: <b><?php echo $propertystatus; ?></b>
<br> to search other provinces and cities<br>
<a href='../index.php' style='text-decoration:none; font-size: 16px; color:#2a4f5e;'>Click Here</a>
</div><?php
}
else { ?>
<br><br>You Havent Selected The Following Properly:<br><br>
<strong>(Province)</strong> <br>
<strong>(District)</strong> <br>
<strong>(Property Status)</strong>.<br><br>
Please <a href='../index.php' style='text-decoration:none; font-size: 16px; color:#2a4f5e;'>Click Here</a> to go back<?php
} ?>
</div>
<div id="ads" style="margin-left:844px;">
<div id="adsone"></div>
<div id="adsthree"></div>
</div>
</div>
</div>
<div id="footer">
<div id="bottomoptions">Home About Us Advertise With Us Terms&Condition Help&Support Privacy Policy FAQ Contact Us Report A Problem
<div id="copyright"><p>All rights Reserved©2014 spdealers.com</p></div>
</div>
</div>
</div>
</body>
</html>
Your code is written in while loop you have to add only those tag that you want to repeat to full HTML code.
<HTML CODE>
<?php code
While loop
{
//php and html code combine
}
?>
<HTMl CODE>
Try this. my comments are in the capital letters so read them,
Breif Explanation: I removed the header tag from your while posted it above while loop and leave the note how you can place it. According to your need. and some other code i also posted it above the while loop.
But before reading the solution look the example how the while loop work
while($condition)
{
//repeat the code. In short it will reapeat the code untill the condition is true. Thanks
}
Thats your answer
<?php
require_once('../Admin Panel/db.php');
if(!empty($_POST['Province']) && !empty($_POST['District']) && !empty($_POST['radio']))
{
$provincename=$_POST['Province'];
$districtname=$_POST['District'];
$propertystatus=$_POST['radio'];
$query = "SELECT
properties.PropertyID,
properties.PropertyType,
properties.PropertyDealType,
properties.PropertyRegion,
properties.PropostedPrice,
properties.DealStatus,
properties.CurrencyType,
propertyimages.ImageID,
propertyimages.ImagePath,
propertyimages.ImageName,
provinces.ProvinceName,
districts.DistrictName,
pds.PDName
FROM properties, provinces, districts, pds, propertyimages
WHERE provinces.ProvinceID=properties.ProvinceID
AND districts.DistrictID=properties.DistrictID
AND pds.PDID=properties.PDID
AND properties.ImageID=propertyimages.ImageID
AND properties.Status= 'Active'
AND properties.propertyStatus = 'APPROVED'
AND ProvinceName='".$provincename."'
AND DistrictName='".$districtname."'
AND PropertyDealType='".$propertystatus."'
GROUP BY properties.PropertyID";
$queryrun= $connection->query($query); // The query run in here
if( $connection->error ) exit( $connection->error ); // In here checks for the errors which may occure in our query
//PUT YOUR HTTML CODE HERE WHICH YOU DONT WANT TO GET REPEATED.
//END THE PHP HERE
?>
<!DOCTYPE html>
<html>
<head>
<LINK REL="SHORTCUT ICON" HREF="favico.ico">
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content=" spdealers Onlince Dealing," />
<meta name="Keywords" content="spdealers.com - spdealers, Property spdealers, Property spdealers, real estate Afghanistan, Afghanistan property, Afghanistan properties, property in Afghanistan, property Afghanistan, Afghanistan real estate, apartments, properties for sale Afghanistan, office space, property, buy property, sell property, rent property, commercial real estate Afghanistan, Afghanistan properties, Afghanistan properties on sale, Afghanistan property portals, Afghanistan residential real estate, rental property, flats, apartments, studio apartments, property site,makaan, makan, spdealers.com, real estate properties, Afghanistan real estate, real estate Afghanistan, property Afghanistan, Afghanistan property portal, buy property, sell property, rent property online, flats, apartments, studio apartment, rental property, commercial real estate, search property, list property, post requirement, featured builders, dealers, property index, properties in Afghanistan, property by localityProperty, Properties, Property For Sale, Find a Property, Properties for sale, Real Estate, Buy real estate. R">
<Meta name="description" content="spdealers Online Property Dealing In Afghansitan, Property Search, buy, sell, rent, lease residential, commercial propertys only on spdealers.com.">
<title>SPDealers</title>
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="logo">
<img src="images/logo.png" alt="" />
</div>
<ul>
<li class="selected"><span>PROPERTY</span></li>
<!--ADDED THE HEADER HERE. YOU CAN PLACE IT WITH THE HELP OF YOUR CSS WHERE EVERY YOU WANT-->
<div class="header">
<div>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
<div>
<p>Do you want to earn money and have a good income? Do you want to receive money without working hours and putting pressure over your Mind, So Please contact with us and make yourself one of our valuable Remote Employee Click Here for more information.</p>
</div>
<div id="threeimages">
<img src="images/flags.png">
<img src="images/graph.png">
</div>
</div>
</div>
<?php
//BEFORE WHILE LOOP START AGAIN YOUR PHP
while ($row= $queryrun->fetch_assoc()) // storing the value of the query into the variable of row
{
$count= $queryrun->num_rows; // Taking the number of queries returened by the result
?>
<li>View Option</li>
<li><span>HOME</span></li>
</ul>
</div>
<div id="body">
<br>
<div class="footer">
<div class="featured">
<div class="propertywrapperviewmore">
<div class="propertysingleimageviewmore">
<a href="property.php?ImageID=<?php echo $row['ImageID'] ?>">
<img src="../Admin Panel/Property_Insertion_Files/<?php echo $row['ImagePath'] ?>" width="227" height="147" alt="<?php echo $row['ImageName'] ?>" style="border-radius:8px;" ></a>
</div>
<div class="propertyIDviewmorelablevalue">
<div class="propertyIDL">Property ID:</div>
<div class="propertyIDV"><?php echo $row['PropertyID']?></div>
<div align="right" style="
width:310px;
height:15px;
font-size:20px;
float:right;
padding-bottom:5px;
background-color:#000;
color:#FFF;
"><marquee behavior="scroll" scrollamount="2" onMouseover="this.scrollAmount=1" onMouseout="this.scrollAmount=6"><?php echo $row['PropertyDealType'] ?></marquee></div>
</div>
<div class="propertysviewmoreotherlablevalue">
<div class="propertyothersL">Property Type:</div>
<div class="propertyothersV"><?php echo $row['PropertyType']?></div>
</div>
<div class="propertysviewmoreotherlablevalue">
<div class="propertyothersL">Address:</div>
<div class="propertyothersV"><?php echo $row['PropertyRegion'].' / Nahya: '.$row['PDName'].' / District: '.$row['DistrictName'].' / '.$row['ProvinceName']?></div>
</div>
<div class="propertysviewmoreotherlablevalue">
<div class="propertyothersL">Total Price:</div>
<div class="propertyothersV"><?php $price = (isset($row['PropostedPrice']) && $row['PropostedPrice']!='')?
number_format($row['PropostedPrice'], 2, '.', ','):'';
echo $row['CurrencyType'].' '.$price?></div>
</div>
<div class="propertysviewmoreotherlablevalue">
<div class="propertyothersL">Deal Status:</div>
<div class="propertyothersV"><?php echo $row['DealStatus']?></div>
</div>
<br><br><br><br>
<div class="propertysviewmoreDescription">
<div class="propertysviewmoreDescriptionL">Description:</div>
<div class="propertysviewmoreDescriptionV">
To find out more this property, please click on the VIEW MORE button. You can contact us more specific information
on this property.
<label style="float:right;"><br>View More</label>
<div>
</div>
</div>
</div>
</div>
<?php
}
if($queryrun->num_rows == 0)
{
echo "<div style='margin-left:116px; line-height: 36px;'>".'Sorry there is no Record for Your search: '." ". "<br>
Province: <b>".$provincename."</b> <br>District: <b>". $districtname."</b>
<br> Property Status: <b>".$propertystatus."</b>
<br> to search other provinces and cities
<br>
<a href='../index.php' style='text-decoration:none; font-size: 16px; color:#2a4f5e;'>Click Here</a>
</div>";
}
}
else
{
echo '<br><br>You Havent Selected The Following Properly:<br><br>
<strong>(Province)</strong> <br>
<strong>(District)</strong> <br>
<strong>(Property Status)</strong>.<br><br>';
echo "Please <a href='../index.php' style='text-decoration:none; font-size: 16px; color:#2a4f5e;'>Click Here</a> to go back";
}
?>
</div>
<div id="ads" style="margin-left:844px;">
<div id="adsone"></div>
<div id="adsthree"></div>
</div>
</div>
</div>
<div id="footer">
<div id="bottomoptions">Home About Us Advertise With Us Terms&Condition Help&Support Privacy Policy FAQ Contact Us Report A Problem
<div id="copyright"><p>All rights Reserved©2014 spdealers.com</p>
</div>
</div>
</div>
</div>
</body>
</html>

print div With unspecified background html,javascript,php

I have a project for kids cards where the child selects the background from specific backgrounds and write his name and print
But the problem is that I only want to print the card (apDiv14 with background) not the full page Or if there was a way to convert certain content to pictures for print
<div id="apDiv14">
<div id="for1">
<h1 ID="head1"> <br>
<h1 ID="head2"> <br>
<h1 ID="head3"> <br>
<br>
</h1>
</div>
<div id="apDiv17"><form name="form1">
<p>
<br>
<input type="text" name="newtitle" size="25">
</p>
<input type="text" name="newtitle2" size="25">
<br>
<br>
<select name="newtitle3" style="width: 150px;">
<option value="">age</option>
</select>
<br>
</p>
<p> <img src="img/BB.gif" width="80" height="45" onClick="ChangeTitle();"><img src="img/PB.gif" width="80" height="45" onClick="pri();"> </p>
<p>
</form> </div></div>
<script>
function pri() {
window.print(); }
</script>
function pic1(apDiv14)
{
// background 1
document.getElementById("apDiv14").style.backgroundImage="url('img/1st card Jeddah.jpg')";
document.body.style.zIndex='4';
document.getElementById("apDiv14").style.backgroundSize = "527px 307px";
document.getElementById("apDiv14").style.backgroundRepeat='no-repeat';
}
function pic2(apDiv14)
{
//background 2
document.getElementById("apDiv14").style.backgroundImage= "url('img/2nd card Jeddah.jpg')";
document.body.style.zIndex='4';
document.getElementById("apDiv14").style.backgroundSize = "527px 307px";
document.getElementById("apDiv14").style.backgroundRepeat='no-repeat';}
You can use a print media stylesheet to limit which content gets printed (by setting other content to display: none but most browsers are configured to not print background images (since they are rarely important and use a lot of ink).
I'd approach this by using some server side code to generate a PDF version for printing and using a form to submit the options to the server.
javascript code:
var content = document.getElementById("divcontents");
var pri = document.getElementById("ifmcontentstoprint").contentWindow;
pri.document.open();
pri.document.write(content.innerHTML);
pri.document.close();
pri.focus();
pri.print();
html code:
<iframe id="ifmcontentstoprint" style="height: 0px; width: 0px; position: absolute"></iframe>

Appending PHP generated HTML to document fragment

I need to append a large amount of PHP generated HTML (5000 div elements) to a document fragment and append that to the body of the page.
Example HTML (this is just part of the StackOverflow source, but it is similar):
<div itemscope itemtype="http://schema.org/Article">
<link itemprop="image" href="http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png">
<div id="question-header">
<h1 itemprop="name">Access PHP variable in JavaScript [duplicate]</h1>
</div>
<div id="mainbar">
<div class="question" data-questionid="4287357" id="question">
<div class="everyonelovesstackoverflow" id="adzerk1">
</div>
<table>
<tr>
<td class="votecell">
<div class="vote">
<input type="hidden" value="4287357">
<a class="vote-up-off" title="This question shows research effort; it is useful and clear (click again to undo)">up vote</a>
<span class="vote-count-post ">2</span>
<a class="vote-down-off" title="This question does not show any research effort; it is unclear or not useful (click again to undo)">down vote</a>
<a class="star-off" href="#" title="This is a favorite question (click again to undo)">favorite</a>
<div class="favoritecount"><b>1</b></div>
</div>
I have broken the problem into 2 smaller problems:
Store PHP variable in Javascript: var tmp = "<?php Print($DOM); ?>";
Append HTML into document fragment (Looked at this but it's about something else)
How can I get this to work?
I have been using jsrender a lot lately to deal with formatting large amounts of JSON/Javascript data into HTML. This lets me pack more data into fewer bytes, and then have the client create large swaths of HTML using a template. Here is a simple example:
<html><head>
<script type="text/x-jsrender" id="historyTemplate">
{{if orders}}
<h1>Your Order History</h1>
<table>
<thead>
<tr><th>Order Name</th><th>Amount</th><th>Status</th><th>Tracking</th></tr>
</thead>
<tbody>
{{for orders}}<tr>
<td>{{>orderName}}</td>
<td>{{>total}}</td>
<td>{{>status}}</td>
<td>{{if trackingNumber}}
<a target="_new" href="{{:trackingURL}}">{{>trackingNumber}}</a>
{{/if}}</td>
</tr>{{/for}}
</tbody>
</table>
{{else}}
<h1>You have no prior webstore orders.</h1>
{{/if}}
</script>
<script type="text/javascript">
var customer = {
name: 'Joe Bloe',
orders: [
{ orderName: 'Joe Bloe 2013/04/01 #595',
total: 59,
status: 'Not yet shipped',
trackingNumber: null,
trackingUrl: null
},
{ orderName: 'Joe Bloe 2013/04/15 #876',
total: 32.50,
status: 'Shipped',
trackingNumber: '55512345',
trackingUrl: 'http://www.shipper.com/track?55512345'
},
]
};
$("#orderDiv").html( $('#historyTemplate').render(customer) );
</script>
</head><body>
<h1>Your Order History</h1>
<div id="orderDiv"> </div>
</body></html>
The data can be part of the page when it is served, or it can arrive via AJAX or JSONP, or it can be dynamically generated by the client itself. So far, I have never had a performance problem with it.

Customizing a Message Based On What Was Clicked

I have a div that has some smaller divs inside it. Each small div has its own id, and belongs to a class.
When you click the div, a message pops up that says "Added to cart" (Guess what this is about) and I want to know how to get the value of the text inside a paragraph inside the div that is clicked. I want to do this with PHP, so I can actually make some server changes with the users's cart.
Here is a site for my code (I try to include as little code, but some you may find unnecessary)
http://jsfiddle.net/av3Da/2/
My html:
<div id="shop">
<input type="button" value="Go To Checkout" id="checkoutbutton" />
<div class="shopitem" id="OrangeBG">
<p class="shopitemname">Orange Background Color</p>
<div class="buyinfo">
<p class="buyinfoname">Buy - 40 Coins</p>
</div>
</div>
<div class="shopitem" id="BlackBG">
<p class="shopitemname">Black Background Color</p>
<div class="buyinfo">
<p class="buyinfoname">Buy - 40 Coins</p>
</div>
</div>
<div class="shopitem" id="GreenBG">
<p class="shopitemname">Green Background Color</p>
<div class="buyinfo">
<p class="buyinfoname">Buy - 40 Coins</p>
</div>
</div>
<div class="shopitem" id="BlueBG">
<p class="shopitemname">Blue Background Color</p>
<div class="buyinfo">
<p class="buyinfoname">Buy - 40 Coins</p>
</div>
</div>
<div class="shopitem" id="YellowBG">
<p class="shopitemname">Yellow Background Color</p>
<div class="buyinfo">
<p class="buyinfoname">Buy - 40 Coins</p>
</div>
</div>
<div class="shopitem" id="PurpleBG">
<p class="shopitemname">Purple Background Color</p>
<div class="buyinfo">
<p class="buyinfoname">Buy - 40 Coins</p>
</div>
</div>
</div>
<div id="confirmbox">
<p>The item "<span id="box_item"></span>" was successfully added to your cart</p>
</div>
My javascript:
$(document).ready(function(){
$(".buyinfo")
.click(AddToCart)
.mouseout(popUpVanish);
$('#confirmbox').hide();
});
function AddToCart() {
$('#confirmbox').show('normal');
}
function popUpVanish() {
$('#confirmbox').delay(2000).fadeOut() ;
}
Why do i need to include code with JSFIDDLE?
Everything looks jumbled up, but that's because its on the fiddle site.
So if I wanted to customize the message to say "You bought X Background Color" and then add that to a PHP database, or javascript array?
In addition, I am looking for some advice on how to change the text on the div that says "Buy for 40 coins" into "Added to cart - Click to remove" and so that you click the button again and it removes the item from the cart.
If my question is not good, please don't just rate it down, write a comment and I'll fix!!!!
thanks
I've just tried to achieve the most part you've asked for. But I can't do all for you, you have to try it yourself and if there is a problem you have to ask another specific question.
// Shop Stuff
var cart = [];
$(document).ready(function(){
var buttonTxt = '';
$(".buyinfo").click(function() {
//Store text and id of the selected element
var txt = $(this).siblings('.shopitemname').text();
var id = $(this).closest('.shopitem').attr('id');
if(!$(this).hasClass('added')) {
buttonTxt = $('.buyinfoname', this).text();
$('#box_item').text(txt);
cart[id] = txt;
//Change text
$('.buyinfoname', this).text('Added to cart - Click to remove');
$(this).addClass('added');
//Show and hide overlay
$('#confirmbox').show('normal').delay(2000).fadeOut();
} else {
delete(cart[id]);
$(this).removeClass('added');
$('.buyinfoname', this).text(buttonTxt);
}
console.log(cart);
});
});
Css to hide the overlay by default.
#confirmbox {
display: none;
}
Look at that fiddle to try it. Have a look at the console to see the output and the current state of cart.

Categories