Jump to content

HELP w/ sessions/cookies


REOL

Recommended Posts

http://dev.etkinllc.com.gamma.reol.net/availabilities.php

question is:
when the user chooses something from the dropdown, and then clicks on the property, it leads them to another page...
now when they use the BACK browser button, i get the message, "The page you are trying to view contains POSTDATA that has expired from the cache.."

how can i rid of this popup alert??

i would also like it to lead back to their previous query and keep those results there.

any help would be appreciated... ill post the code of the site

[code]<!-- PS (REOL Services) ver 2.1 - 7.2006 -->
<html>
<head>
<title>ETKIN EQUITIES LLC</title>
<style type=text/css>
@import url(pstyles.css);
.texts {font-family:arial;font-size:12px;color:#000;line-height:140%;}
.textblack {font-family:arial;font-size:12px;color:#000;font-weight:bold;}
.textsmall {font-family:arial;font-size:11px;color:#000;}
.textwhite {font-family:arial;font-size:11px;color:#FFF;font-weight:bold;}
.textgrey {font-family:arial;font-size:11px;color:#333;}
.textblue {font-family:arial;font-size:10px;color:#2B3C78;}
.textwhizzite {font-family:arial;font-size:10px;color:#FFFFFF;}
.textblues {font-family:arial;font-size:11px;color:#2B3C78;}
.shadow {text-shadow: 2px 2px 3px #212121;font-family:arial;font-size:12px;color:#FFF;font-weight:bold;}

.equity
{font-family:arial;font-size:15px;font-weight:bold;text-align:left;color:#FFFFFF;padding-left:20px;}
#nlred
{padding-left:20px;padding-top:3px;font-family: arial,sans-serif;color:#AD161A;font-size:12px;
font-weight:bold;}
</style>
<script src="/js/home_swap.js" type="text/javascript">
</script>
</head>

<body>
<script language=javascript>
//<!--
function swapImage(imgName,newImg){
if (document[imgName]) document[imgName].src = newImg;
}
//-->
</script>
<!-- START [mainpage] -->
<table cellpadding=0 cellspacing=0 border=0 width=870 align=center>
<tr>

<!-- START row1 [header] -->
<td colspan=2>

<table cellspacing=0 cellpadding=0 border=0 align=center width=870>
<tr bgcolor=#FFFFFF>
<td><A href="index.php"><img src="img_home/logo_etkinllc.gif" border=0></a></td>
<td><a href="broker.php"><img src="img_home/link_brokers.gif" border=0></a><a href="contact.php"><img src="img_home/link_contact.gif" border=0></a></td>
</tr>
</table>

</td>
<!-- END row1 [header] -->
</tr><tr>
<!-- START row2 [navigation] -->
<td colspan=2 style='border-bottom:solid 1px #FFFFFF;'>

<table cellspacing=0 cellpadding=0 border=0 width=100%>
<tr bgcolor=#FFFFFF>
<td><a onMouseOver="swapImage('about', 'img_home/about_off.gif'); swapImage('about','img_home/about_on.gif');" onMouseOut="swapImage('about','img_home/about_off.gif');" a href="about.php"><img src="img_home/about_off.gif" name="about" border=0></a></td>
<td><a onMouseOver="swapImage('properties', 'img_home/properties_off.gif'); swapImage('properties','img_home/properties_on.gif');" onMouseOut="swapImage('properties','img_home/properties_off.gif');" a href="property.php"><img src="img_home/properties_off.gif" name="properties" border=0></a></td>
<td><a onMouseOver="swapImage('propmanage', 'img_home/propmanage_off.gif'); swapImage('propmanage','img_home/propmanage_on.gif');" onMouseOut="swapImage('propmanage','img_home/propmanage_off.gif');" a href="manage.php"><img src="img_home/propmanage_off.gif" name="propmanage" border=0></a></td>
<td><a onMouseOver="swapImage('newdev', 'img_home/newdev_off.gif'); swapImage('newdev','img_home/newdev_on.gif');" onMouseOut="swapImage('newdev','img_home/newdev_off.gif');" a href="developments.php"><img src="img_home/newdev_off.gif" name="newdev" border=0></a></td>
<td><a onMouseOver="swapImage('avail', 'img_home/avail_off.gif'); swapImage('avail','img_home/avail_on.gif');" onMouseOut="swapImage('avail','img_home/avail_on.gif');" a href="availabilities.php"><img src="img_home/avail_on.gif" name="avail" border=0></a></td>
<td><a onMouseOver="swapImage('news', 'img_home/news_off.gif'); swapImage('news','img_home/news_on.gif');" onMouseOut="swapImage('news','img_home/news_off.gif');" a href="news.php"><img src="img_home/news_off.gif" name="news" border=0></a></td>
</tr>
</table>

</td>
<!-- END row2 [navigation] -->
</tr><tr>

<!-- START row3 [toptext_content] -->

<!-- header text -->
<td class=equity height=31 bgcolor=#2B3C78 width=423 style='border-right:solid 1px #FFFFFF;'>
&nbsp;&nbsp;&nbsp;Availabilities at Your Fingertips
</td>
<!-- header quote -->
<td bgcolor=#959EBC class=equity>
&nbsp;&nbsp;&nbsp;Monthly Highlight
</td>

<!-- END row3 [toptext_content] -->
</tr><tr>
<!-- START row3 [main_content] -->

<!-- inner nav and output -->
<td vAlign=top width=423 style='border-right:solid 1px #FFFFFF;border-top:solid 1px #FFFFFF;' bgcolor=#E6E6E6>

<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td vAlign=top style='padding-left:15px;padding-right:10px;'><br />
<span class=textblue style='line-height:.5em;'><b>CHOOSE FROM THE FOLLOWING OPTIONS:</b></span>
<img src="img_home/RED_DOT.gif" border=0>
<br />
<!--AVAILABILITIES FORM BUILD-->

<Table cellspacing=0 cellpadding=0 border=0>
<tr>
<td class=textsmall>
<FORM method="post" name="find" action="<?php $_SERVER['PHP_SELF'] ?>">
<?php
include_once( "format.php" );
$types = pgdbsql("SELECT distinct * FROM property_types order by type_name", "etkin");
$locs = pgdbsql("SELECT DISTINCT city FROM properties", "etkin");

?>
<SELECT NAME="prop_type" class="textblues">
<OPTION VALUE="all">Any Property Type</OPTION>
<?php
foreach($types as $type) {
echo '<OPTION VALUE="'.$type["typeid"].'">'.ucfirst($type["type_name"]).'</OPTION>';
}
?>
</select>
<p>
<SELECT NAME="city" class="textblues">
<OPTION VALUE="all">Any Property Location </OPTION>
<?
foreach($locs as $loc) {
if ($loc[city] != "") {
?>
<OPTION VALUE="<?= $loc[city] ?>"><?= $loc[city] ?></OPTION>
<? }} ?>
</SELECT>
<p>
<SELECT NAME="sqft" class="textblues">
<OPTION VALUE="all">With Any Square Footage &nbsp; &nbsp; &nbsp; </OPTION>
<OPTION VALUE="1-500">Under 500 </OPTION>
<OPTION VALUE="500-1000">From 500 to 1000</OPTION>
<OPTION VALUE="1000-5000">From 1000 to 5000</OPTION>
<OPTION VALUE="5000-25000">From 5000 to 25000</OPTION>
<OPTION VALUE="25000-1000000">Over 25000</OPTION>
</SELECT>
<input  class="textblues" name="search" type="Submit" Value="Search">
</FORM>
<!-- AVAILABILITIES OUTPUT -->
<p>
<?php
if (isset($_POST['search'])) {
if ($prop_type != "all") {
$type = pgdbsql("select type_name from property_types where typeid=$prop_type", "etkin");
$type = $type[type_name];
} else {
$type = $_POST['prop_type'];
}
$query = "SELECT DISTINCT * FROM availabilities, properties WHERE properties.propid=availabilities.propid";

if ($prop_type != 'all') {
$query .= " AND (type=$prop_type OR type2=$prop_type OR type3=$prop_type) ";
}

if ($city != 'all') {
$query .= " AND city='$city'";
}

if ($sqft != 'all') {
$arr = split("-", $sqft);
$query .= " AND sqft_avail < {$arr[1]} AND sqft_avail > {$arr[0]}";
}

$query .= " ORDER BY city,name, sqft_avail";

$avails = pgdbsql($query, "etkin");
if ($avails) {
?>

<p>
<? if ($prop_type != "all" && $city != "all") { ?>
<B><font color=red size=2><?= count($avails) ?></font> availabilities found matching your search criteria.</b><br />

<? } elseif ($prop_type != "all") { ?>
<B><font color=red size=2><?= count($avails) ?></font> availabilities found matching your search criteria.</b><br />
<!--<B>'<font color=red><?= count($avails) ?></font>' properties with available space in <?= $city ?> cities </b>-->

<? } elseif ($city != "all") { ?>
<B><font color=red size=2><?= count($avails) ?></font> availabilities found matching your search criteria.</b><br />
<!--<B>'<font color=red><?= count($avails) ?></font>' available spaces of all property types in <?= $city ?> </b>-->

<? } else { ?>
<B><font color=red size=2><?= count($avails) ?></font> availabilities found matching your search criteria.</b><br />
<!--<B>'<font color=red><?= count($avails) ?></font>' available spaces of all property types in <?= $city ?> cities </b>-->
<? } ?>

<div id="active_property_tab" style='overflow:auto;height:240px;width:395px;'>
<!-- START WRITING THE OUTPUT -->

<table cellspacing=3 cellpadding=2 border=0 width=100% bgcolor=#FFFFFF>
<?
$props = array();
foreach($avails as $avail)
{
$id = $avail[propid];
$props[$id][propid] = $avail[propid];
$props[$id][address] = $avail[address];
$props[$id][state] = $avail[state];
$props[$id][city] = $avail[city];
$props[$id][name] = $avail[name];
$props[$id][rental_type] = $avail[rental_type];
$props[$id][a_id] = $avail[a_id];
}


foreach($props as $prop)  {

echo "
<tr>
<td colspan=6 class=textsmall vAlign=middle><a href='property_space.php?propid=$prop[propid]'><img src='img_property/$prop[propid]_thumb.gif' border='0' style='float:left;padding-right:10px;'></a>
<b><span class=tiny_red><a href='property_space.php?propid=$prop[propid]' style='text-decoration:none;'>$prop[name]</a></span><br />
<span class=tiny>$prop[address]<br />
$prop[city], $prop[state]</span><br />
<span class='textblue'><a href='property_space.php?propid=$prop[propid]' style='text-decoration:none;'>>> Click here for more information</a></span></b><br />";


print "</td></tr>";


if ($prop[name]!= "") {
echo "
<tr><td>
<table cellspacing=2 cellpadding=0 border=0 width=100%><tr>
<td class=textsmall><b>SF</b></td>
<td class=textsmall><b>Suite</b></td>
<td class=textsmall><b>Rate</b></td>
<td class=textsmall><b>Availability</b></td>
<td class=textsmall><b>Rental Type</b></td>
<td class=textsmall><b>Floorplan</b></td>
</tr><tr><td height=5 colspan=6></td></tr>";

foreach($avails as $avail) {
if ($prop[propid] == $avail[propid]) {
echo
"<tr>
<td class=textsmall>". number_format($avail[sqft_avail])."</td>
<td class=textsmall>$avail[suite]</td>
<td class=textsmall>$ ". number_format($avail[rate], 2)."</td>
<td class=textsmall>$avail[available]</td>
<td class=textsmall>$avail[rental_type]</td>
<td class=textsmall><A HREF='/floorplans/{$prop[propid]}_{$avail[a_id]}_unit_floorplan.pdf' target='_blank'>unit floor plan</A>
</td>";

if (file_exists("/floorplans/{$prop[propid]}_{$avail[a_id]}_unit_floorplan.pdf")) {
print "<A HREF='/floorplans/{$prop[propid]}_{$avail[a_id]}_unit_floorplan.pdf' target='_blank'>unit floor plan</A></td></tr>";

} elseif (file_exists("/floorplans/{$prop[propid]}_floorplan.jpg")) {
print "<A HREF='floorplans/{$prop[propid]}_floorplan.jpg'>Floor plan</A>";

} else {
}
echo "
</td>
</tr>
<tr>
<td class='textsmall' colspan='6'>
<HR noshade size='1' color='#D8DDE7'></TD>
</TR>";
}
}}
echo "
</TABLE></TD>
</TR>";
}
?>
</TABLE>

<?
} else {
if($type == "all" || $type == ""){$type = "any type";}
if($city == "all" || $city == ""){$city = "any city";}
if($sqft == "all" || $sqft == ""){$sqft = "any size";}

print "<br /><B>No availabilities found matching your search criteria.</b>";
//print "Type: ".ucfirst($type)."<BR>";
//print "City: $city<BR>";
//print "Sqft: $sqft<BR>";
//print "</BLOCKQUOTE>";
}
}
?>
</td>

</tr></table></td>
</tr></table>
</td>

<!-- right output -->
<td vAlign=top width=446>

<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td colspan=2 vAlign=top style='border-top:solid 1px #FFFFFF;'><a href="property_overview.php?propid=1026"><img src="img_home/img_avail_page.jpg" border=0></a></td>
</tr>
<tr>
<td><a href="property_overview.php?propid=1026"><img src="img_home/more_prop.jpg" border=0></a></td>
<td><img src="img_home/more_high.jpg" border=0></td>
</tr>
<tr bgcolor=#959EBC>
<td colspan=2 class=textwhite style='padding:2px 12px 0px 15px;vertical-align:middle;' valign=top>

<table cellspacing=0 cellpadding=2 border=0 width=100% align=center>
<tr>
<td width=20%><span class=textwhite><b>Etkin Equities<br />Leasing Team</b></span></td>
<td width=20% class=textwhizzite vAlign=top><a href="mailto:jketai@etkinllc.com?subject=Leasing/Availabilities Inquiry"><img src="img_home/av_keteai.gif" border=0 vspace=2></a><br />James Ketai</td>
<td width=20% class=textwhizzite vAlign=top><a href="mailto:mbliss@etkinllc.com?subject=Leasing/Availabilities Inquiry"><img src="img_home/av_bliss.jpg" border=0 vspace=2></a><br />Melissa Bliss</td>
<td width=20% class=textwhizzite vAlign=top><a href="mailto:erandolph@etkinllc.com?subject=Leasing/Availabilities Inquiry"><img src="img_home/av_randolph.jpg" border=0 vspace=2></a><br />Eric Randolph</td>
<td width=20% class=textwhizzite vAlign=top><a href="mailto:rwineman@etkinllc.com?subject=Leasing/Availabilities Inquiry"><img src="img_home/av_wineman.jpg" border=0 vspace=2></a><br />Rob Wineman</td>
</tr>
</table>

</td>
</tr>
<tr>
<td colspan=2 vAlign=top><img src="img_home/avail_bottom.gif" border=0></td>

</tr></table></td>

<!-- END row3 [main_content] -->
</tr><tr>
<!-- START row4 [footer] -->
<td colspan=2 class=foot style='padding-top:5px;'>Etkin Equities Headquarters: 200 Franklin Center &bull; 29100 Northwestern Hwy. &bull; Southfield, Michigan 48034 Telephone: 248-358-0800 &bull; Fax: 248-358-2180</td>
<!-- END row4 [footer] -->

</tr></table>

<!-- END [mainpage] -->
</body>
</html>[/code]


thanks.
-ps reol
Link to comment
Share on other sites

For remembering the data submitted, try using this script (javascript) http://javascriptkit.com/script/script2/rememberinput.shtml

As for the post data, there are 3 options that I can think of. The first would be to use sessions, the second would be to have the links to the properties open in new windows, and the third would be to have a frame that overlays on the page with the properties inside of it.

For the first option - I have no clue how to do it, I just know of it.

For the second option - simple, target="_blank" or target="_new" should do it.

For the third option - it's the same effect as the lightbox. What lightbox does is, once incorporated into a tag and clicked on, shadows the whole page with what you want on top. Then, once a link is clicked to close the frame that was loaded, it reverts back to the original page. (See http://www.huddletogether.com/projects/lightbox/ with the 'Lightbox Gone Wild' mod or the 'Leightbox' mod.)

Personally, I would go with the third option. It looks interesting, it entices the visitors, and it gives a professional look with minimal effort.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.