Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: header Arguments: page Description: Sessionkey can be sent in as first optional argument Page type: text Render function: Module: maybeathome Page source: <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <meta name="description" content=Maybe@Home lets you try before you buy, when renting or buying a house.""> <meta name="author" content=""> <link rel="icon" href="assets/images/favicon.png"> <title data-localize="title">Maybe@Home </title> <BASE href="http://www.maybeathome.com/"> <!-- Bootstrap core CSS --> <link href="assets/bootstrap/css/bootstrap.css" rel="stylesheet"> <!-- Bootstrap theme --> <!-- Css For Bootstrap Select2 Plugin --> <link href="assets/plugins/bootstrap-select/css/bootstrap-select.css" rel="stylesheet"> <link href="assets/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> <!-- Css For Select2 Plugin --> <link href="assets/plugins/select2/css/select2.css" rel="stylesheet"> <!-- Country Select Style --> <link href="assets/plugins/country-select/css/countrySelect.min.css" rel="stylesheet"/> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <script> function post(path, params, method) { method = method || "post"; // Set method to post by default if not specified. // The rest of this code assumes you are not using a library. // It can be made less wordy if you use one. var form = document.createElement("form"); form.setAttribute("method", method); form.setAttribute("action", path); for(var key in params) { if(params.hasOwnProperty(key)) { var hiddenField = document.createElement("input"); hiddenField.setAttribute("type", "hidden"); hiddenField.setAttribute("name", key); hiddenField.setAttribute("value", params[key]); form.appendChild(hiddenField); } } document.body.appendChild(form); form.submit(); } function searchType(type) { post("/webl/WubHub_DoIt", { "cmdline":"maybeathome.searchProperties(sessionkey, type, address, price, beds, baths, rooms, size, lotSize, features, description)", "sessionkey": "<webl>ToString(wubinfo.cookies.sessionkey ? nil);</webl>", "type": type, "address":"Oakland, CA", "price":"", "beds":"", "baths":"", "rooms":"", "size":"", "lotSize":"", "features":"", "description":"" }, "post"); } </script> <webl> var sessionkey = wubinfo.cookies.sessionkey ? nil; if (page == "sell") then ` <!-- Css For Bxslider Plugin --> <link href="assets/plugins/bxslider/jquery.bxslider.css" rel="stylesheet" type="text/css"/> <!-- Perfect Scrollbar Style --> <link href="assets/plugins/perfect-scrollbar/perfect-scrollbar.min.css" rel="stylesheet" type="text/css"/> <!-- Dropzone Css --> <link href="assets/plugins/dropzone/dropzone.css" rel="stylesheet" type="text/css"/> <!-- Bootstrap Tags Input Css --> <link href="assets/plugins/bootstrap-tagsinput/bootstrap-tagsinput.css" rel="stylesheet" type="text/css"/> <script> function getEstimate() { var address = $('#address').val(); var encrypt_address = address.replace(/\,/g, "-") encrypt_address = encrypt_address.replace(/ /g, "-") var api = 'http://www.maybeathome.com/site/zillowEstimate%3A+' + encrypt_address $.ajax({ url: api, type: "GET", }) .done(function (data) { $('#price').val(data); }) .fail(function (xhr, status, errorThrown) { $('#price').val('') + errorThrown; }); }; </script> ` elsif (page == "results") then ` <!-- Css For Bxslider Plugin --> <link href="assets/plugins/bxslider/jquery.bxslider.css" rel="stylesheet" type="text/css"> <!-- Perfect Scrollbar Style --> <link href="assets/plugins/perfect-scrollbar/perfect-scrollbar.min.css" rel="stylesheet" type="text/css"> <!-- Full Calendar Style --> <link href="assets/plugins/full-calendar/fullcalendar.min.css" rel="stylesheet" type="text/css"/> ` else "" end; </webl> <!-- Bootstrap Date-picker Style --> <link href="assets/plugins/bootstrap-datepicker/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/> <!-- Custom styles for this template --> <link href="assets/css/theme.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <!-- Navbar Wrapper Starts --> <nav class="navbar navbar-default navbar-custom"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="./"> <img src="assets/images/logo-navbar.png" alt="logo-navbar"/> </a> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="dropdown"> <a href="site/buy" data-localize="header.buy">Buy</a> <ul class="dropdown-menu"> <li> <div class="row"> <div class="col-sm-6"> <a href='javascript:searchType("House")' data-localize="buy.houseHeader">Homes For Sale</a> </div> <div class="col-sm-6 active"> <a href='javascript:searchType("New House")' data-localize="buy.newHouseHeader">New Houses For Sale</a> </div> <!-- div class="col-sm-4"> <a href="/site/finance">Finance Your Purchase</a> </div --> </div> </li> <li> <div class="row"> <div class="col-sm-6"> <a href='javascript:searchType("Apartment")' data-localize="buy.apartmentHeader">Apartments For Sale</a> </div> <div class="col-sm-6 active"> <a href='javascript:searchType("New Apartment")' data-localize="buy.newApartmentHeader">New Apartments For Sale</a> </div> <!-- div class="col-sm-4"> <a href="/site/buyer-checklist">Buyer Checklist</a> </div --> </div> </li> </ul> </li> <li class="dropdown"> <a href="site/sell" data-localize="header.sell">Sell</a> <ul class="dropdown-menu"> <li> <div class="row"> <div class="col-sm-6 active"> <a href="/site/sell" data-localize="sell.sellProperty">Sell Your Property</a> </div> <div class="col-sm-6"> <a href="/site/estimate" data-localize="sell.estimateProperty">Estimate Your Property</a> </div> </div> </li> </ul> </li> <li><a href="site/partners" data-localize="header.partners">Partners</a></li> <li><a href="site/quality" data-localize="header.quality">Quality</a></li> <li><a href="site/about" data-localize="header.about">About</a></li> <!-- li><a href="#" style="color:red;">Working: <span style="color:yellow;"> <span> <webl>WubCall("maybeathome.whosWorking", []);</webl> </span></a></li --> </ul> <ul class="nav navbar-nav navbar-right"> <webl> var sessionkey = wubinfo.cookies.sessionkey ? nil; if (sessionkey == nil) then if (Size(OPTIONALARGS) > 0) then sessionkey = OPTIONALARGS[0] end end; if (Size(OPTIONALARGS) > 0) and (OPTIONALARGS[0] == "nil") then sessionkey = nil; end; var userInfo = WubCall("siteutil.getSessionInfo", ["maybeathome", sessionkey]); if (userInfo == nil) then `<li><a href="site/login" class="btn-login" data-localize="login.login">Login</a></li>` + "\n" else `<li><a href="site/userprofile" class="userprofile" >` + userInfo.name + `</a></li>` + "\n" end; </webl> <li> <a href="javascript:void(0);" class="country-select-link"> <input type="text" id="country" /> <input type="hidden" id="country_code" /> </a> </li> </ul> </div><!--/.nav-collapse --> </div> </nav> <!-- Navbar Wrapper Ends -->