Jump to content

REOL

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Posts posted by REOL

  1. thanks!

    it didnt originally work but this worked instead

    echo '<h1>Properties in ' . $results[0]['city'] . ', ' . $results[0]['state'] . '</h1>';

    ...

    know how to display two results, then add a row then display the next two results after that?

    -ps
  2. i want to have the "<h1>" tags only display once. I am having trouble setting an array for it.

    can someone help me out?

    also how do i display a reuslt twice, add a row, then display again?


    [code]<?php
    include_once( "format.php" );
    $city = $_GET['city'];

    if ($city) :
    $query = "SELECT * FROM properties WHERE city='$city' ORDER BY propid";
    $results = pgdbsql( $query, "my_table" );
    ?>
    <?php
    foreach ( $results as $result ) {
    ?>

    <h1>Properties in <?php= $result['city'] ?>, <?php= $result['state']?></h1>
    <table cellspacing=2 cellpadding=1 border=0>
      <tr>
    <td vAlign=top><a href="property_overview.php?propid=<?php= $result['propid'] ?>">
    <?php
    if(file_exists("img_property/{$result['propid']}_thumb.gif")) {
    ?>
    <img src="img_property/<?php= $result['propid'] ?>_thumb.gif" border=0>
    <?php } else { ?>
    <img src="img_property/prop_na.jpg" border=0>
    <?php } ?>
    </a></td>
    <td class=tiny vAlign=top><span class=tiny_red><?php= $result['name'] ?></span><br /><?php= $result['address'] ?><p><img src="img_property/icon_<?php= $result['type'] ?>.gif" border=0></td>
      </tr>
    </table>
    <?php
    }
    endif;
    ?>[/code]
  3. i wanted to use the whereAdd funtion i believe?

    as well as fetch() ? ?

    so basically, there are multiple $spaces for each $property_id, i want to show the top table once, which outputs the $property_id ONCE, and show each $space according to the property_id

    so the output would be like:

    property_id (1)
    space
    space
    space
    space

    property_id (2)
    space
    space
    space


    AND NOT
    property_id (1)
    space
    property_id (1)
    space
    property_id (2)
    space
    property_id (2)
    space
  4. This form finds property availabilities from a database and displays it.

    currently it outputs the *TOP TABLE(property)* and *BOTTOM TABLE (spaces available in the property)*  together on each result. but i only want display the *BOTTOM TABLE* multiple times for each space.

    hope i can get some quicck help on this.


    [code]

    <!--results -->
    <?php
    if( $_GET['district_id'] && $_GET['district_id'][0] != 'all' )
    {
    $district_id = $_GET['district_id'];
    $minRentSq = $_GET['minimum_rent'];
    $maxRentSq = $_GET['maximum_rent'];
    $minSq = $_GET['minimum_space'];
    $officeBool = $_GET['isRetail'];
    $preBuiltBool = $_GET['isPrebuilt'];
    $sort_field = $_GET['sort_field'];
    $spaces = getSpacesByDistrict( $district_id, $minRentSq, $maxRentSq, $minSq, $officeBool, $preBuiltBool, $sort_field);
    echo "<pre>";
    print_r( $spaces );
    echo "</pre>";
    }
    else if( $_GET['property_id'] && $_GET['property_id'][0] != 'all' )
    {
    $property_id = $_GET['property_id'];
    $minRentSq = $_GET['minimum_rent'];
    $maxRentSq = $_GET['maximum_rent'];
    $minSq = $_GET['minimum_space'];
    $officeBool = $_GET['isRetail'];
    $preBuiltBool = $_GET['isPrebuilt'];
    $sort_field = $_GET['sort_field'];
    $spaces = getSpacesByProperty( $property_id, $minRentSq, $maxRentSq, $minSq, $officeBool, $preBuiltBool, $sort_field);
    echo "<pre>";
    print_r( $spaces );
    echo "</pre>";
    }

    ?>

    <br><br><img src="images/headers/hd_leasing_availableSR.gif" width="523" height="15"><br><br>
    <table>
    <tr>
    <td valign="middle"><input type="image" border="0" alt="Print Results" src="images/misc/printResults.gif"></td>
    <td><img src="images/null.gif" width="12"></td>
    <td valign="middle">
    <span class="foundtext"><?php= count($spaces) ?> leases available at
    <?php= $space['address'] ?></span><br><a class="small" href="#top">Refine Search</a></td>
    </tr>
    </table>

    <?php
    foreach ($spaces as $space) {
    ?>
    <!-- **************************TOP TABLE************************* -->
    <table border="0" width="500" cellpadding="2" cellspacing="1">
    <tr>
    <td colspan="2"><span class="leaseTitle"><?= $space['address'] ?></span></td>
    </tr>
    <tr>
    <td valign="top" align="right" class="leaseInfo">District:</td>
    <td class="leaseText" valign="top"><?php= $space['name'] ?></td>
    </tr>
    <tr>
    <td valign="top" class="leaseInfo" align="right">Contacts:</td>
    <td class="leaseText" valign="top"><a class="hplink" href="mailto:howard.tenenbaum@slgreen.com">Howard J. Tenenbaum</a>, 212-216-1685 (SL Green Leasing, LLC)<br><a class="hplink" href="mailto:gary.rosen@slgreen.com">Gary M. Rosen</a>, 212-216-1687 (SL Green Leasing, LLC)<br></td>
    </tr>
    </table>

    <br />
    <a href="property.php?id=<?php= $space['id'] ?>"><input class="button" type="button" value="Detailed Property Information" onClick="document.location.href='property.php?id=<?php= $id ?>';"></a>

    <br /><br /><br />
    <!-- **************************  END TOP TABLE  ************************* -->

    <!-- **************************BOTTOM TABLE************************* -->
    <table width="500" cellpadding="1" cellspacing="1" border="0">
    <tr align="center" bgcolor="#666666">
    <td class="smtypeWt">Floor<br><img src="images/gresources/x.gif" alt="SL Green" width="65" height="1" border="0"><br></td>
    <td class="smtypeWt">Suite<br><img src="images/gresources/x.gif" alt="SL Green" width="60" height="1" border="0"><br></td>
    <td class="smtypeWt">Square<br>Feet<br><img src="images/gresources/x.gif" alt="SL Green" width="50" height="1" border="0"><br></td>
    <td class="smtypeWt">Available<br><img src="images/gresources/x.gif" alt="SL Green" width="60" height="1" border="0"><br></td>
    <td class="smtypeWt">Rent/SF<br><img src="images/gresources/x.gif" alt="SL Green" width="60" height="1" border="0"><br></td>
    <td class="smtypeWt">Term<br><img src="images/gresources/x.gif" alt="SL Green" width="45" height="1" border="0"><br></td>
    <td class="smtypeWt">Direct/<br>Sublet<br><img src="images/gresources/x.gif" alt="SL Green" width="60" height="1" border="0"><br></td>
    <td class="smtypeWt">Retail/<br>Office<br><img src="images/gresources/x.gif" alt="SL Green" width="50" height="1" border="0"><br></td>
    <td class="smtypeWt">Prebuilt<br><img src="images/gresources/x.gif" alt="SL Green" width="50" height="1" border="0"><br></td>
    </tr>
    <?php $bgcolor = ($bgcolor == "#99CCFF") ? "#ccccFF" : "#99CCFF"; ?>
    <tr bgcolor="<?php= $bgcolor ?>">
    <td align="right" class="smtype" valign="top"><?php= $space['floor']  ?></td>
    <td class="smtype" valign="top"><?php= $space['suite'] ?></td>
    <td align="right" class="smtype" valign="top"><?php= $space['sqfeet'] ?></td>
    <td align="center" class="smtype" valign="top"><?php= $space['availability'] ?>
    <img src="/images/null.gif" width="1" height="1"></td>
    <td align="right" class="smtype" valign="top"><?php= $space['rentsqfeet'] ?></td>
    <td align="right" class="smtype" valign="top"><?php= $space['term'] ?><img src="/images/null.gif" width="1" height="1"></td>
    <td align="center" class="smtype" valign="top"><?php= $space['issublet'] ?></td>
    <td align="center" class="smtype" valign="top"><?php= $space['isretail'] ?></td>
    <td align="center" class="smtype" valign="top"><?php= $space['isprebuilt'] ?></td>
    </tr>
    <tr bgcolor="<?= $bgcolor ?>"><td align="left" class="smtype" valign="Top" colspan="9">
    <?php= $space['notes'] ?></td>
    </tr>
    <tr bgcolor="<?php= $bgcolor ?>"><td colspan="9" class="smtype"><a class="hplink" href="#" onClick="window.open('floorplan.php?spaceid=$space_id','spacewin','toolbar=no,status=no,directories=no,scrollbars=yes');">Floorplans</a></td>
    </tr>
    <tr align="center">
    <td class="smtype" colspan="9"><img src="images/gresources/x.gif" width="1" height="4" border="0"></td>
    </tr>
    <?php }  ?>

    </table>
    <!-- **************************END BOTTOM TABLE************************* -->[/code]
  5. [code]function getCorporateProfile()
    {
    $query = "SELECT * FROM feature, featuretype WHERE feature.featuretypeid = featuretype.id AND featuretype.name = 'corporateprofile'";
    $result = pgdbsql( $query, "adminssssss" );
    return $result;
    }
    [/code]


    that is my function above

    how do i just call and run it?
  6. [code]function getProperties( $sortcol = 'buildingcode')
    {
    $query = "SELECT * FROM property WHERE isactive='t' order by $sortcol";
    $result = pgdbsql( $query, "web" );
    return $result;
    }

    function getProperty( $property_id )
    {
    $query = "SELECT * FROM property WHERE id = $property_id";
    $result = pgdbsql( $query, "web" );
    return $result[0];
    }

    function getPropertyDistricts( $property_id )
    {
    $query = "SELECT districtid FROM propertydistrict WHERE propertyid = $property_id";
    $result = pgdbsql( $query, "web" );

    $districts = array();
    foreach( $result as $district )
    {
    $districts[] = $district['districtid'];
    }
    return $districts;
    }

    function getPropertyLeasingContacts( $property_id )
    {
    // 1 for leasing
    // 2 for building manager
    $query = "
    SELECT contact.*
    FROM contact, property, propertycontact
    WHERE property.id = $property_id
    AND property.id = propertycontact.propertyid
    AND contact.id = propertycontact.contactid
    AND contact.contacttypeid = 1
    ";
    $result = pgdbsql( $query, "web" );
    return $result;
    }

    function getPropertyManager( $property_id )
    {
    // 1 for leasing
    // 2 for building manager
    $query = "
    SELECT contact.*
    FROM contact, property, propertycontact
    WHERE property.id = $property_id
    AND property.id = propertycontact.propertyid
    AND contact.id = propertycontact.contactid
    AND contact.contacttypeid = 2
    ";
    $result = pgdbsql( $query, "web" );
    return $result;
    }

    function getPropertyTag( $property_id )
    {
    $query = "SELECT address FROM property WHERE id = $property_id";
    $result = pgdbsql( $query, "slgreenweb" );
    $address = strtolower( $result[0]['address'] );
    $address = join( "_", split( " ", $address ) );
    $address = join( "_", split( "/", $address ) );
    return $address;
    }

    function getPropertyPhotos( $property_id )
    {
    global $UPLOAD_DIR;
    $property_tag = getPropertyTag( $property_id );

    $pattern = '/^photo_'.$property_tag.'/';

    $files = array();
    $dir = opendir( $UPLOAD_DIR );
    while( $f = readdir( $dir ) )
    {
    if( strcmp( $f, '.' ) == 0 || strcmp( $f, '..' ) == 0 ) continue;
    if( preg_match( $pattern, $f ) ){
    array_push( $files, $f );
    }
    }
    closedir($dir);

    return $files;
    }

    function getSpaces( $property_id )
    {
    $query = "SELECT space.*, property.* FROM space,property WHERE space.buildingid = property.id AND property.id = $property_id";
    $result = pgdbsql( $query, "web" );
    return $result;
    }

    function getSpace( $space_id )
    {
    $query = "
    SELECT space.*, property.*, floortype.id as floortype_id, floortype.floorname as floortype_name
    FROM space,property,floortype
    WHERE space.buildingid = property.id
    AND space.id = $space_id
    AND floortype.id = space.altfloorid
    ";
    $result = pgdbsql( $query, "web" );
    return $result[0];
    }

    function getFloortypes()
    {
    $query = "SELECT id, floorname as name FROM floortype";
    $result = pgdbsql( $query, "web" );
    return $result;
    }

    function getDistricts( $sortcol = "sort_order")
    {
    $query = "SELECT id, districtname as name FROM district ORDER BY $sortcol";
    $result = pgdbsql( $query, "web" );
    return $result;
    }

    function getPropertiesByDistrict( $district_id )
    {
    $query = "
    SELECT property.*
    FROM property, propertydistrict
    WHERE propertydistrict.districtid = $district_id
    AND propertydistrict.propertyid = property.id
    AND property.isactive=true
    ";
    $result = pgdbsql( $query, "web" );
    return $result;
    }

    ?>
    [/code]


    above are the functions that relate to it.. mostly using getSpaces(); function.

    as you can tell, it is a property search, where it searches min-max ($) in rent, min-max in sqfeet the property that is chosen and the district the property is in.
    also they can sort the results using the sort form.

    im always having some trouble queriying all the info out to relate to $id, so the results will read like ,  mypage.php?id=($property_id of search results)

    thanks for all the help.
  7. i need to help query out the following;

    [code]<FORM method="get" name="find" action="<?php $_SERVER['PHP_SELF'] ?>">

    <table>
    <tr>
    <td align="center" colspan="3"><span class="formheadsmall">Rent ($ per Square Foot)</span></td>
    <td></td>
    <td colspan="3" align="center"><span class="formheadsmall">Square Footage</span></td>
    </tr>
    <tr>
    <td valign="top">
    <span class="formheadsmall">Minimum</span><br>
    <input class="small" type="text" size="5" name="minimum_rent" value="0" /></td>
    <td><img src="images/null.gif" height="1" width="24"></td>
    <td valign="top"><span class="formheadsmall">Maximum</span><br>
    <input class="small" type="text" size="5" name="maximum_rent" value="300" /></td>
    <td><img src="images/null.gif" width="48"></td>
    <td valign="top"><span class="formheadsmall">Minimum</span><br>
    <input class="small" type="text" size="5" name="minimum_space" value="0" /></td>
    <td><img src="images/null.gif" height="1" width="24"></td>
    <td valign="top"><span class="formheadsmall">Maximum</span><br>
    <input class="small" type="text" size="5" name="maximum_space" value="200000" /></td>
    </tr>
    </table>
    <table>
    <tr>
    <td><span class="formheadsmall">Office :: Retail</span><br>
    <select class="small" name="isRetail">
    <option value="-1">ALL</option>
    <option value="0">Office</option>
    <option value="1">Retail</option></select></td>
    <td><img src="images/null.gif" height="1" width="24"></td>
    <td><span class="formheadsmall">Prebuilt</span><br>
    <select class="small" name="isPrebuilt">
    <option value="-1">ALL</option>
    <option value="1">Yes</option>
    <option value="0">No</option></select></td>
    </tr>
    </table><br><table>
    <tr>
    <td valign="top"><span class="formheadsmall">Properties</span><br>
    <select class="small" multiple="yes" size="4" name="PropertyList">
    <option value="all" selected>All Properties</option>
    <?
    $properties = getProperties( 'id' );
    foreach ( $properties as $property )
    {
    $selected = ($property_id == $property['id']) ? "selected" : "";
    echo "<option $selected value='$property[id]'>$property[address]</option>";
    }
    ?>
    </select>
    </td>
    <td><img src="images/null.gif" height="1" width="18"></td>
    <td valign="top">
    <span class="formheadsmall">District</span><br>
    <select class="small" multiple="yes" size="4" name="DistrictList">
    <option value="all" selected>All Districts</option>
    <?
    $districts = getDistricts();
    foreach ( $districts as $district )
    {
    $selected = ($district_id == $district['id']) ? "selected" : "";
    echo "<option value='$district[districtid]'>$district[name]</option>";
    }
    ?>
    </select></td>
    </tr>
    <tr><td><img src="images/null.gif" width="1" height="6"></td></tr>
    <tr>
    <td><span class="formheadsmall">Sort Results</span><br>
    <select class="small" name="sort">
    <option value="0">By Property/Floor</option>
    <option value="1">By Rent</option>
    <option value="2">By Square Footage</option>
    </select></td>
    <td><img src="images/null.gif" height="1" width="6"></td>
    <td valign="bottom" align="left"><input class="button" type="submit" value="Find Space" name="search" /></td>
    </tr>
    </table>
    </form>[/code]


    just need the correct way to input all values and find a common entity, in this case its  property_id


    anyhelp would be great.  thanks.
  8. 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
×
×
  • 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.