1, 'ipx'=>1, 'mov'=>1, 'egg'=>1, 'ptv'=>1, 'jpg'=>2, 'gif'=>2, 'mpg'=>3, 'mpeg'=>3, 'avi'=>3 ); /* Removed instructions

Instructions:Use your mouse or the arrow keys to pan the tour. Use the A key to zoom in and the Z key to zoom out.
Not working correctly? Download Java Now

*/ // original elements before the java detection code was added // "ptv"=>'', // "ivr"=>"", /** * This is used to select a starting point in the 'ptv' slideshow * * **/ $media_html=array( "ivr"=>'', "egg"=>" ", "ptv"=>'', "jpg"=>"", "gif"=>"", "mpeg"=>"", "mpg"=>"", "avi"=>"", "mov"=>"", "ipx"=>" " ); /* $media_html=array( "ivr"=>" Java not supported
", "jpg"=>"", "gif"=>"", "mpeg"=>"", "mpg"=>"", "avi"=>"", "mov"=>"", "ipx"=>" Java not supported
");*/ $media_types=array( 0, array("ext='ivr'","ext='ipx'","ext='mov'","ext='egg'","ext='ptv'"), array("ext='jpg'","ext='gif'"), array("ext=''", "ext='mov'", "ext='mpeg'", "ext='avi'", "ext='rm'", "ext='mpg'") ); if (empty($tid)) { if (isset($id)) { $sql = "SELECT tid FROM vpt_tours WHERE id=".$id; list($tid)=sql_fetch_row(sql_query($sql)); if (empty($tid)) { echo "There is no tour for the room id (".$id.") that was specified"; die; } } else { echo "The link to this window does not specify what tour is to be displayed"; die; } } // increment times this tour has been views [1 month cookie] if (!$$visitor) { sql_query("UPDATE vpt_listings SET views=views+1 WHERE id=".$tid); } //get count of each media type $mediaCount = array(); for($i=1;$i<4;$i++) { $mediasql=join(" OR ", $media_types[$i]); $sql="SELECT count(*) as `ccc` FROM vpt_tours WHERE tid=".$tid." AND (".$mediasql.")"; $res=sql_query($sql); $r=sql_fetch_row($res); $mediaCount[$i]=$r[0]; } if (!$t) { for($t=1;$t<4;$t++) { if ($mediaCount[$t]>0) { break; } } } ////////////////////////////////// //fetch agent/subscriber info (if any) $sql = "SELECT uID, description, name, phone, email, url, company FROM vpt_listings WHERE ID=".$tid; list($xuID, $desc, $firstname, $phone, $email, $website, $company)=sql_fetch_row(sql_query($sql)); if ($info) { $details="

Not working correctly? Download Java Now.

"; } else { if (!$desc) { $desc="No description available at this time."; } $details=$desc; } /** * Get the company logo based on email in listings table and users table. * This is ugly but was how dB was originally designed. **/ if ($email) { // get listing details $sql = "SELECT username, u_simage, c_logo, c_name, user_type, scribe FROM vpt_users WHERE "; if (strpos($email, ";") !== false) { $res_email = explode(";", $email); foreach ($res_email as $ekey => $eval) { if ($ekey > 0) { $sql .= " or "; } $res_addy = strtolower(trim($eval)); $sql .= " u_email='" . $res_addy . "'"; } } // end: if else { $sql .= " u_email='" . trim($email) . "'"; } } // end: if if ($email) { list($username, $simage, $clogo, $cname,$usertype, $scribe)= sql_fetch_row(sql_query($sql)); } $agentinfo.="
"; $set_clogo = 0; // switch for displaying company logo on tours page // if company logo exists then get it for viewing on page if ($clogo) { //get the realtors correct company logo list($listings_id, $listings_email)=sql_fetch_row(sql_query("SELECT id, email FROM vpt_listings WHERE ID=".$tid)); if ($listings_email) { if (strpos($listings_email, ";") !== false) { $sql2 == null; $res_email = explode(";", $listings_email); foreach ($res_email as $ekey => $eval) { if ($ekey > 0) { $sql2 .= " or "; } $res_addy = strtolower(trim($eval)); $sql2 .= " u_email='" . $res_addy . "'"; } } // end: if else { $sql2 = " u_email='" . $listings_email . "'"; } } // end: if // list($users_id, $clogo)= sql_fetch_row(sql_query("SELECT id, c_logo FROM vpt_users WHERE u_email='" . $listings_email . "'")); $sql = "SELECT id, c_logo FROM vpt_users WHERE " . $sql2; list($users_id, $clogo)= sql_fetch_row(sql_query($sql)); if ($clogo) { $set_clogo = 1; // switch for displaying company logo on tours page } } // end: if if ($xuID != '' && $xuID != '0') { $agentinfo.=""; /** * START Agent Image Hack * When a user is first created the old method of the image name was simply the username (firstLast) as is. * No stripping of spaces was being done so the images had spaces in the names. The addagent page and the tours page * used different methods for the images. * * This attempts to catch the existing (currently only 2) types of images (with/without spaces) to display * the agents image. **/ // new method is to strip out spaces in the users name $realtor_name = preg_replace('/ +/', '', trim($firstname)); // create the image path $filename = $_SERVER['DOCUMENT_ROOT'] . "/images/realtors/" . $realtor_name . ".jpg"; /** * If the image exists (stripped spaces) we skip this 'if' statement because the realtor_name has already been set above. * If the image does not exist we use the old method which simply combines the first 2 array elements. **/ if (file_exists($filename) == false) { // method to get realtor image $realtor_name = explode(" ", strtolower(trim($firstname))); $realtor_name = $realtor_name[0] . $realtor_name[1]; } // END Agent Image Hack $agentinfo_img.=""; $agentinfo.="
".$firstname." ".$lastname."
"; $agentinfo.="
"; /** * gets realtor company logo. * This is now separated from $agentinfo so it can be placed on the page anywhere **/ if ($clogo) { $sql = "SELECT name, image FROM vpt_realestatecompanies WHERE id=".$clogo; list($cname, $clogos)=sql_fetch_row(sql_query($sql)); } if ($phone) { $agentinfo.="ph: ".$phone."
"; } if ($fax) { $agentinfo.="fax: ".$fax."
"; } if ($quote) { $agentinfo.="qoute: ".$quote."
"; } if ($website) { $agentinfo.="
Visit Website
"; } if ($email) { $agentinfo.="Email Me"; } // end: if } // end: if ($xuID != '' && $xuID != '0') $agentinfo.="
"; ////////////////////////////////// //fetch tour listings and set tourhtml code if ($id) { $sql = "SELECT ext FROM vpt_tours WHERE id=".$id; list($ext)=sql_fetch_row(sql_query($sql)); $t=$media_t[$ext]; } if ($t) { $mediasql=join(" OR ", $media_types[$t]); $sql="SELECT id, room, ext FROM vpt_tours WHERE tid=".$tid." AND (".$mediasql.") ORDER BY rid"; $res=sql_query($sql); } $count=0; $first=0; $listing_to_show=array(); while ($r=sql_fetch_row($res)) { $listing_to_show[] = $r; list($xid, $room, $ext) = $r; if (!$first && !$id) { $id=$xid; $first=1; } $css=""; if ($xid==$id) { $xext=$ext; $css="background-color: #000000"; } $listing.="".$room."
"; $count++; } if ($listing=="") { $listing="There are no tours of this type.
"; } else { // we only check for java on the extensions that use java if ($xext == 'ivr' || $xext == 'ptv') { $java_enabled_player = ''; $java_enabled_player .= ''; $tourhtml=str_replace("ID", $id, $java_enabled_player); } else { $tourhtml=str_replace("ID", $id, $media_html[$xext]); } } //if nothing is displayed, the layout is messed up if ($tourhtml=="") $tourhtml = " "; $threesixty=$PHP_SELF."?t=1&tid=".$tid; $photo=$PHP_SELF."?t=2&tid=".$tid; $video=$PHP_SELF."?t=3&tid=".$tid; $athreesixty=($t==1)?"sel_":""; $aphoto=($t==2)?"sel_":""; $avideo=($t==3)?"sel_":""; if (isset($_REQUEST['newlook'])) { include("tour_v2.php"); exit; } ?> <?=$site_name?> */ ?>