Académique Documents
Professionnel Documents
Culture Documents
You can check the running project through the following link---https://w1313623.users.ecs.westminster.ac.uk/home.html
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------file name----->aaa.txt (Comma delimated Text file)
"Property Name",
Visits
"Post Code",
Price,
"Image File",
Product1 ,
src=""image1.jpg"">",
H30001,
2
101,
"<img
Product2,
src=""image2.jpg"">",
H30002,
2
102,
"<img
Product3,
src=""image3.jpg"">",
H30003,
2
103,
"<img
Product4,
src=""image4.jpg"">",
H30004,
3
104,
"<img
Product5,
src=""image5.jpg"">",
H30005,
1
105,
"<img
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
file name----->home.html
features of this project )
(Thats my first/front page .From here you can access all the
color: #FF0000;
}
.style1 {
font-family: "Times New Roman", Times, serif;
font-style: italic;
color: #990000;
font-size: 14px;
}
.style2 {font-family: Georgia, "Times New Roman", Times, serif}
.style4 {
font-size: 14px;
color: #990000;
font-family: "Times New Roman", Times, serif;
}
.style5 {
color: #990000;
font-size: 12px;
font-family: "Times New Roman", Times, serif;
font-style: italic;
font-weight: bold;
}
.style6 {
font-family: "Times New Roman", Times, serif;
font-size: 12px;
font-style: italic;
font-weight: bold;
}
-->
</style></head>
<body>
<h1 align="center">HOME 24 X 7
</h1>
<br/>
<div align="center">
<table width="990" height="68" border="0">
<tr>
<td width="843" height="64">
<form id="form1" name="form1" method="post" action="plist.php">
<fieldset>
</fieldset></form></td>
</tr>
</table>
<br/><br/>
<span>
<table width="990" height="68" border="0">
<tr>
<td width="843" height="64">
<form id="form2" name="form2" method="post" action="maximum.php" onsubmit=" return
validateForm()">
<fieldset>
</fieldset></form></td>
</tr>
</table>
</span>
<br/><br/>
<table width="990" height="68" border="0">
<tr>
<td width="843" height="64">
<form id="form3" name="form3" method="post" action="psearch.php" onsubmit=" return
validateForm1()">
<fieldset>
</div>
</fieldset></form></td>
</tr>
</table>
</div>
</body>
</html>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
color: #660033;
}
body {
background-color: #FFCCCC;
}
a{
font-family: Times New Roman, Times, serif;
}
h1,h2,h3,h4,h5,h6 {
font-family: Times New Roman, Times, serif;
}
h1 {
font-size: 18px;
color: #FF0000;
}
.style1 {
font-size: 24px;
font-weight: bold;
}
.style3 {color: #990033; font-size: 18px;}
.style4 {font-size: 40px; font-weight: bold; }
.style5 {color: #003300}
.style7 {font-size: 18px}
-->
</style></head>
<body>
while(!feof($file))
{
$arr[] = fgetcsv($file);
}
$row = count($arr,0);
$cols = (count($arr,1)/count($arr,0))-1;
echo "<tr>";
for($k=0;$k<$cols;$k++)
{
echo '<td width="813" height="46" bgcolor="#FF6C6C"><div align="center"><span
class="style5"><span class="style7"><b>';
echo $arr[0][$k];
echo "</span> </div> </td>";
}
echo "</b></tr>";
$k=0;
for($i=1;$i<($row-1);$i++)
{
if ($pname == strtoupper($arr[$i][0]))
{
$k=1;
echo "<tr>";
for($j=0;$j<$cols;$j++)
{
echo '<td width="465" ><div align="center"><span class="style6">';
echo $arr[$i][$j];
echo "</span> </div> </td>";
}
echo "</tr>";
}
if($k==0)
{
for($i=0;$i<$cols;$i++)
{
echo '<td width="465" ><div align="center"><span class="style6">';
echo "XXXXXX";
echo "</span> </div> </td>";
}
}
fclose($file);
?>
</table>
<p><div align="center"><span class="style1">
<?php
if ($k==0)
{
echo "You have not chosen any product";
}
?>
<br/>
<p><div align="center"><span class="style3"><form action="home.html">
<input type="submit" value="Back To Home"/></form></span></div></p>
</body>
</html>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
filename---->maximum.php (it will display all the properties below the maximum price entered by
the user)
body {
background-color: #FFCCCC;
}
a{
font-family: Times New Roman, Times, serif;
}
h1,h2,h3,h4,h5,h6 {
font-family: Times New Roman, Times, serif;
}
h1 {
font-size: 18px;
color: #FF0000;
}
.style1 {
font-size: 24px;
font-weight: bold;
}
.style3 {color: #990033; font-size: 18px;}
.style4 {font-size: 36px; font-weight: bold; }
.style5 {color: #003300}
.style7 {font-size: 18px}
-->
</style></head>
<body>
<?php
$amt= $_POST['amount'];
?>
<h1 align="center" class="style4">LIST OF PRODUCTS WITH PROPERTIES</h1>
<br/>
<p align="center"><span class="style3">The amount Entered by you is</span>
<span class="style1">
<?php
echo " " . $amt . " ";
?></span><span class="style3">thousand .</span> </p>
<p align="center" class="style3">Taken this as maximum amount, all products with price less than
the amount provided are listed below :- </p>
<br/>
<table width="879" height="300" border="5" align="center" bordercolor="#FF0000" bordercollapse="collapse">
<?php
$file = fopen("aaa.csv","r");
while(!feof($file))
{
$arr[] = fgetcsv($file);
}
$row = count($arr,0);
$cols = (count($arr,1)/count($arr,0))-1;
echo "<tr>";
for($k=0;$k<$cols;$k++)
{
echo '<td width="813" height="60" bgcolor="#FF6C6C"><div align="center"><span
class="style5"><span class="style7"><b>';
echo $arr[0][$k];
echo "</span> </div> </td>";
}
echo "</b></tr>";
$k=0;
for($i=1;$i<($row-1);$i++)
{
echo "</tr>";
}
if($k==0)
{
echo '<td width="465" ><div align="center"><span class="style6">';
echo "XXXXXX";
fclose($file);
?>
</table>
<p><div align="center"><span class="style3">
<?php
if ($k==0)
{
echo '<span class="style1">';
echo "No property found with price below than provided amount.<br/><br/>Please , try with some
large amount. ";
echo '</span>';
}
else
{
echo '<br/>';
echo '<form method="post" action="available.php"><div align="center">';
echo '<input type="hidden" name="hf" value="' . $amt . '" />';
echo 'To change property VISITS of the above products
<input type="submit" name="submit" value="Click Here" /></div></form></p>';
?></span></div></p>
<br/>
<p><div align="center"><span class="style3"><form action="home.html">
<input type="submit" value="Back To Home"/></form></span></div></p>
</body>
</html>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
file name---->available.php (Its a page from where you can add a visit to the property)
table
{
border-collapse:collapse;
}
body,td,th {
color: #660033;
}
body {
background-color: #FFCCCC;
}
a{
font-family: Times New Roman, Times, serif;
}
h1,h2,h3,h4,h5,h6 {
font-family: Times New Roman, Times, serif;
}
h1 {
font-size: 18px;
color: #FF0000;
}
.style1 {
font-size: 24px;
font-weight: bold;
}
.style3 {color: #990033; font-size: 18px;}
.style4 {font-size: 36px; font-weight: bold; }
.style5 {color: #003300}
$row = count($arr,0);
$cols = (count($arr,1)/count($arr,0))-1;
echo "<tr>";
for($k=0;$k<$cols;$k++)
{
echo '<td width="813" height="60" bgcolor="#FF6C6C"><div align="center"><span
class="style5"><span class="style7"><b>';
echo $arr[0][$k];
echo "</span> </div> </td>";
}
echo '<td width="813" height="60" bgcolor="#FF6C6C"><div align="center"><span
class="style5"><span class="style7"><b>';
echo 'Select';
echo '</td>';
echo "</b></tr>";
$k=0;
$k=0;
for($i=1;$i<($row-1);$i++)
{
echo $arr[$i][$j];
echo "</span> </div> </td>";
}
echo '<td><div align="center">';
echo "</tr>";
}
if($k==0)
{
echo '<td width="465" ><div align="center"><span class="style6">';
echo "XXXXXX";
echo "</span> </div> </td>";
}
}
fclose($file);
?>
</table>
<p align="center" class="style3">
<label>
<input type="submit" name="Submit" value="Continue" />
</label>
<label>
<input name="reset" type="reset" id="reset" value="Reset" />
</label>
</p>
</form>
</body>
</html>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
file name---->pchange.php
---------Name changed(visit.php)
to the given instruction but its name is pchange.php)
(it will confirm that one visit has been added to the existing one)
visit.php but I have used pchange.php)
table
{
border-collapse:collapse;
}
body,td,th {
color: #660033;
}
body {
background-color: #FFCCCC;
}
a{
font-family: Times New Roman, Times, serif;
}
h1,h2,h3,h4,h5,h6 {
font-family: Times New Roman, Times, serif;
}
h1 {
font-size: 18px;
color: #FF0000;
}
.style1 {
font-size: 24px;
font-weight: bold;
}
.style3 {color: #990033; font-size: 18px;}
.style4 {font-size: 36px; font-weight: bold; }
.style5 {color: #003300}
$file = fopen("aaa.csv","r");
while(!feof($file))
{
$arr[] = fgetcsv($file);
}
$row = count($arr,0);
$cols = (count($arr,1)/count($arr,0))-1;
echo "<tr>";
for($k=0;$k<$cols;$k++)
{
echo '<td width="813" height="60" bgcolor="#FF6C6C"><div align="center"><span
class="style5"><span class="style7"><b>';
echo $arr[0][$k];
echo "</span> </div> </td>";
}
echo "</b></tr>";
$k=0;
for($i=1;$i<($row-1);$i++)
{
if (isset($_POST['chk' . $i]))
{
$k=1;
echo "<tr>";
$arr[$i][4] = ($arr[$i][4] + 1);
$file = fopen("aaa.csv","w");
foreach ($arr as $fields)
{
fputcsv($file, $fields);
}
for($j=0;$j<$cols;$j++)
{
$file = fopen("aaa.csv","r");
echo '<td width="465" ><div align="center"><span class="style6">';
echo $arr[$i][$j];
}
if($k==0)
{
for($i=0;$i<$cols;$i++)
{
echo '<td width="465" ><div align="center"><span class="style6">';
echo "XXXXXX";
echo "</span> </div> </td>";
}
}
fclose($file);
?>
</table>
</br>
<p><div align="center"><span class="style3">
<?php
if ($k==0)
{
</body>
</html>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
file name---->psearch.php (it will show the details of the property which is entered by the user
through search)
.style1 {
font-size: 24px;
font-weight: bold;
}
.style3 {color: #990033; font-size: 18px;}
.style4 {font-size: 36px; font-weight: bold; }
.style5 {color: #003300}
.style7 {font-size: 18px}
-->
</style></head>
<body>
$file = fopen("aaa.csv","r");
while(!feof($file))
{
$arr[] = fgetcsv($file);
}
$row = count($arr,0);
$cols = (count($arr,1)/count($arr,0))-1;
echo "<tr>";
for($k=0;$k<$cols;$k++)
{
echo '<td width="813" height="46" bgcolor="#FF6C6C"><div align="center"><span
class="style5"><span class="style7"><b>';
echo $arr[0][$k];
echo "</span> </div> </td>";
}
echo "</b></tr>";
$sr= strtoupper($_POST['search']);
$l=0;
for($i=0;$i<($row-1);$i++)
{
for($j=0;$j<2;$j++)
{
if(strtoupper($arr[$i][$j]) == $sr)
{echo "<tr>";
$l=1;
for($k=0;$k<$cols;$k++)
{
echo '<td width="465" ><div align="center"><span class="style6">';
echo $arr[$i][$k];
echo "</span> </div> </td>";
}
echo "</tr>";
}
}
}
if($l==0)
{
for($i=0;$i<$cols;$i++)
{
echo '<td width="465" ><div align="center"><span class="style6">';
echo "XXXXXX";
echo "</span> </div> </td>";
}
}
fclose($file);
?>
</table>
<p><div align="center"><span class="style1">
<?php
if ($l==0)
{
echo "No Product matched with the search term. <br/><br/> Try another search. ";
}
?></span></div></p>
<br/>
<p><div align="center"><span class="style3"><form action="home.html">
<input type="submit" value="Back To Home"/></form></span></div></p>
</body>
</html>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------EXTRA ------> file name ---->maxamount.js(java script)
the amount column empty , we have use java script for this)
function validateForm()
{
var t = document.forms["form2"]["amount"].value;
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function validateForm1()
{
var x = document.forms["form3"]["search"].value;
}
------------------------------------------------*****FINISH*****-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------