Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //--------------------------------------//
- // STEAM PRO //
- // methods.php //
- //--------------------------------------//
- // Ryan Perkins //
- // rypedesigns.com 2016 (c) //
- //--------------------------------------//
- class database {
- function connect()
- {
- if ( $_SERVER["REMOTE_ADDR"] == "127.0.0.1" )
- //{ $domain = "localhost"; } else { $domain = "mysql.rypedesigns.com"; }
- $dbuser = "steampro_rype";
- $dbpass = "password";
- $dbname = "steampro_site";
- $dbhost = "steampros.net";
- $this->id = mysql_connect($dbhost, 'steampro_rype', $dbpass) or die("<br />Failed onConnect(DB); printing report..<br />" . mysql_error());
- mysql_select_db($dbname, $this->id) or die ("<br />Failed onSelect('{$dbname}'); printing report..<br />" . mysql_error());
- return $this->id;
- } // end connect()
- function query($query_input, $results = false, $result_name = false)
- {
- global $DB;
- if ( $this->qcount == 0 || $this->qcount == false || $this->qcount == NULL ){
- $this->qcount = 1;
- } else {
- ++$this->qcount;
- }
- $result = @mysql_query($query_input, $this->id);
- if ( $result !== false && $result !== NULL ){
- $this->error = NULL;
- $this->last_query = $query_input;
- $this->bool = true;
- if ( !isset($result_name) || $result_name == false ){
- $this->result = $result;
- }
- else{ $this->$result_name = $result; }
- if ( $results == true || $results == "1" ){ $result_count = 0;
- $this->count_query = preg_replace('/LIMIT(\s*)(\d*\s*,)?(\s*)(\d*)/', '', $query_input);
- $count_result = @mysql_query($this->count_query, $this->id);
- while ( $row = mysql_fetch_row($count_result) )
- { $result_count++; }
- $this->results = $result_count;
- return $result;
- } else {
- return true;
- }
- } else {
- $this->error = mysql_error();
- $this->last_query = $query_input;
- $this->bool = false;
- $this->result = false;
- return false;
- }
- } // end query
- } // end DB
- class user {
- /*
- function login($page){
- global $DB, $subpage;
- if ( isset($_POST["username"]) && isset($_POST["password"]) ) {
- $username = $_POST["username"];
- $password = md5($_POST["password"]);
- $query = "SELECT * FROM `users` WHERE `username` = '{$username}' AND `password` = '{$password}' LIMIT 1";
- $DB->query($query);
- $row = mysql_fetch_array($DB->result, MYSQL_ASSOC);
- if ( isset($row) && $DB->error == NULL ) {
- setcookie("id", $row["id"]);
- setcookie("username", $_POST["username"]);
- setcookie("password", $password);
- $this->logged_in = true;
- $this->uid = $row["id"];
- $this->username = $_POST["username"];
- $this->password = $password;
- $this->admin = $row["admin"];
- } else {
- setcookie("id", NULL);
- setcookie("username", NULL);
- setcookie("password", NULL);
- $this->logged_in = false;
- $this->uid = NULL;
- $this->username = NULL;
- $this->password = NULL;
- $this->admin = false;
- }
- }
- } // end login() ----------
- */
- function verify($source, $setcookies) {
- global $DB;
- if ( $source == "post" || $_POST["login"] == "1" ) {
- $username = $_POST["username"];
- $password = md5($_POST["password"]);
- } elseif ( $source == "cookie" || isset($_COOKIE["username"]) ) {
- $username = $_COOKIE["username"];
- $password = $_COOKIE["password"];
- }
- $query = "SELECT * FROM `users` WHERE `username` = '{$username}' AND `password` = '{$password}' LIMIT 1";
- $DB->query($query);
- $row = mysql_fetch_array($DB->result, MYSQL_ASSOC);
- if ( isset($row) && $DB->error == NULL ) {
- $this->logged_in = true;
- $this->uid = $row["id"];
- $this->username = $row["username"];
- $this->password = $row["password"];
- $this->admin = $row["admin"];
- if ( $setcookies == "true" ) {
- setcookie("id", $row["id"]);
- setcookie("username", $row["username"]);
- setcookie("password", $row["password"]);
- setcookie("time", time());
- }
- } else {
- $this->logged_in = false;
- $this->uid = NULL;
- $this->username = NULL;
- $this->password = NULL;
- $this->admin = false;
- if ( $setcookies == "true" ) {
- unset($_COOKIE["id"]);
- unset($_COOKIE["username"]);
- unset($_COOKIE["password"]);
- unset($_COOKIE["time"]);
- }
- }
- // echo "COOKIES:"; print_r($_COOKIE); echo "<br /><br /><br />";
- } // end verify() ----------
- } // end user() class ---------------
- class methods {
- function administration($page) {
- global $DB, $user, $subpage;
- // $this->subHeader($page);
- if ( isset($_POST["nid"]) ) { $nid = $_POST["nid"]; }
- elseif ( isset($_GET["nid"]) ) { $nid = $_GET["nid"]; }
- // print_r($_POST);
- // echo $_COOKIE["username"] . " ==> username(cookie)<br /><br /> " . $_COOKIE["password"] . " ==> password <br /><br />";
- if ( $user->admin !== "1" ) { echo "<h2>Login Required!</h2>Please click the administors link at the bottom of any page and login properly to access this page."; }
- // CHECK LOGGED IN ---------------
- if ( $user->logged_in == true && $user->admin == "1" ) {
- // CHECK NEWS SUBMITTED ---------------
- if ( $_POST["submit_news"] == "1" && isset($_POST["title"]) && isset($_POST["body"]) ) {
- $title = addslashes($_POST["title"]);
- $body = addslashes($_POST["body"]);
- $time = time();
- $action = $_POST["action"];
- $nid = $_POST["nid"];
- $delete = $_POST["delete"];
- if ( isset($user->username) && isset($user->uid) ) {
- if ( $subpage == "create" || $action == "insert" ) {
- $query = "INSERT INTO `newsEntries` ( `uid`, `username`, `title`, `body`, `time` ) VALUES ('{$user->uid}', '{$user->username}', '{$title}', '{$body}', '{$time}')";
- $DB->query($query);
- if ( $DB->error == NULL ) { echo "<h2>News Entry Added!</h2>Your news post named '<b>{$title}</b>' has been successfully added to the News database."; }
- } elseif( $subpage == "edit" && $delete == "1" && isset($nid) ) {
- $query = "DELETE FROM `newsEntries` WHERE `id` = '{$nid}' limit 1";
- $DB->query($query);
- if ( $DB->error == NULL ) {
- echo "<h2>Successfully Deleted!</h2>The news post you requested ('<b>{$title}</b>') has been successfuly removed from the database."; }
- // } elseif ( $subpage == "create" || $action == "insert" ) {
- // $query = "INSERT INTO `newsEntries` ( `uid`, `username`, `title`, `body`, `time` ) VALUES ('{$user->uid}', '{$user->username}', '{$title}', '{$body}', '{$time}')";
- // $DB->query($query);
- //
- // if ( $DB->error == NULL ) {
- // echo "<h2>News Entry Added!</h2>Your news post named '<b>{$title}</b>' has been successfully added to the News database."; }
- } elseif ( $subpage == "edit" && $action == "update" && is_numeric($nid) ) {
- $query = "UPDATE `newsEntries` SET `title` = '{$title}', `body` = '{$body}' WHERE `id` = '{$nid}' LIMIT 1";
- $DB->query($query);
- if ( $DB->error == NULL ) {
- echo "<h2>News Entry Updated!</h2>Your news post named '<b>{$title}</b>' has been successfully updated."; }
- } else {
- echo "<h2>Sorry..</h2>There was a problem with your request. Please hit the back button and try again.";
- }
- // ECHO QUERY TROUBLESHOOTING ---------------
- echo "<!-- {$query} -->";
- } else { echo "username or uid is not set. user :: "; print_r($user); }
- // CHECK NEWS EDIT VARS ---------------
- } elseif ( isset($subpage) && $subpage == "edit" ) {
- $query = "SELECT * FROM `newsEntries` WHERE `id` = '{$nid}' LIMIT 1";
- $DB->query($query);
- $row = mysql_fetch_array($DB->result, MYSQL_ASSOC);
- if ( $DB->error !== NULL ) { echo $DB->error; return; }
- $title = $row["title"];
- $body = $row["body"];
- echo "
- <h2>Edit News Entry</h2>
- <form action=\"". $PHP_SELF ."?page=administration&subpage=edit\" method=\"post\">
- <table cellpadding=\"0\" cellspacing=\"0\" align=\"center\" style=\"width: 70%; min-width: 400px; text-align: left; font-weight: bold; margin-left: auto; margin-right: auto\">
- <tr>
- <td colspan=\"2\" valign=\"top\" style=\"height: auto; padding-bottom: 6px; color: #93804f\">
- News Title<br />
- <input type=\"text\" name=\"title\" value=\"{$title}\" size=\"64\" style=\"width: 100%; min-width: 400px\">
- <br />
- News Body <br />
- <textarea name=\"body\" style=\"width: 100%; min-width: 400px\" rows=\"8\">{$body}</textarea>
- </td>
- </tr>
- <tr>
- <td style=\"width: 100px; color: #93804f; white-space: nowrap; vertical-align: top; text-align: center; padding-top: 0px\" valign=\"top\" nowrap>
- <span style=\"display: inline-block; background-color: #AA0A0A; border: 2px solid white; padding: 2px 10px 2px 10px; width: auto; border-radius: 4px\">
- <font style=\"color: white\">Delete?</font> <input type=\"checkbox\" name=\"delete\" value=\"1\" onClick=\"confirm('Really delete this post?')\">
- </span>
- </td>
- <td valign=\"top\" style=\"padding: 0px 2px 0px 10px; vertical-align: top; text-align: right\" nowrap>
- <input type=\"hidden\" name=\"submit_news\" value=\"1\">
- <input type=\"hidden\" name=\"action\" value=\"update\">
- <input type=\"hidden\" name=\"nid\" value=\"{$nid}\">
- <input type=\"submit\" value=\"Edit News Entry\" style=\"width: 100%; text-align: center; margin-top: 0px\">
- </td>
- </tr>
- </table>
- </form>
- ";
- } elseif ( isset($subpage) && $subpage == "inbox" ) {
- echo "<h2>Customer Inbox [admin only]</h2>";
- if ( is_numeric($_GET["id"]) ) { $id = $_GET["id"]; }
- $id = $_GET["id"];
- $query = "SELECT * FROM `customerMessages` WHERE `id` = '{$id}' LIMIT 1";
- $DB->query($query);
- $row = mysql_fetch_array($DB->result, MYSQL_ASSOC);
- foreach ( $row as $key => $value ) {
- if ( $key == "time" ) { $value = date('m.d.y @ h:i A', $row["time"]); }
- echo "<font style=\"color: white; font-weight: bold\">{$key}</font> => <font style=\"color: #4090D0\">{$value}</font> <br />";
- }
- // ELSE ECHO NEWS ENTRY ---------------
- } else {
- echo "
- <h2>Create News Entry</h2>
- <div style=\"width: 70%; min-width: 600px; margin-left: auto; margin-right: auto\">
- <form action=\"".$PHP_SELF."?page=administration&subpage=create\" method=\"post\">
- News Title<br />
- <input type=\"text\" name=\"title\" size=\"64\" style=\"width: 100%; min-width: 400px\">
- <br />
- News Body <br />
- <textarea name=\"body\" style=\"width: 100%; min-width: 400px\" rows=\"8\"></textarea>
- <br />
- <input type=\"hidden\" name=\"submit_news\" value=\"1\">
- <input type=\"hidden\" name=\"action\" value=\"insert\">
- <div style=\"width: 100%; margin: 0px auto 0px auto; text-align: center\">
- <input type=\"submit\" value=\"Create News Entry\" style=\"width: 100%; text-align: center; margin-left: auto; margin-right: auto\">
- </div>
- <input type=\"hidden\" name=\"submit_news\" value=\"1\">
- <input type=\"hidden\" name=\"action\" value=\"insert\">
- </form>
- </div>
- ";
- }
- echo "<hr class=\"gold\">";
- // RECENT CUSTOMER MESSAGES ---------------
- echo "<h2>Steam Pros Inbox</h2>
- <div align=\"center\" style=\"width: 85%; text-align: left; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px\">
- ";
- $i = 1;
- $query = "SELECT * FROM `customerMessages` ORDER BY `id` DESC LIMIT 15";
- $DB->query($query);
- while ( $row = mysql_fetch_array($DB->result, MYSQL_ASSOC) ) {
- if ( !isset($row["title"]) || $row["title"] == NULL ) { $row["title"] = "Unnamed News Entry"; }
- $date = date('m.d.y @ h:i A', $row["time"]);
- echo "
- ".$row['id']."] <b><a href=\"?page=administration&subpage=inbox&id=".$row['id']."\">".$row['subject']."</a></b> <span style=\"color: #CCCCCC\">".htmlspecialchars( substr($row['body'],0,64) )."..</span> <font style=\"color: #4090D0\">by <b>".substr($row['name'],0,16)."</b></font> <font style=\"color: #AAAAAA\"> on ".substr($date,0,8)."</font>
- <br />
- ";
- ++$i;
- }
- echo "</div>";
- // EDIT NEWS ENTRIES ---------------
- echo "<h2>Edit News Entries</h2>
- <div align=\"center\" style=\"width: 85%; text-align: left; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px\">
- ";
- $i = 1;
- $query = "SELECT * FROM `newsEntries` ORDER BY `id` ASC LIMIT 10";
- $DB->query($query);
- while ( $row = mysql_fetch_array($DB->result, MYSQL_ASSOC) ) {
- if ( !isset($row["title"]) || $row["title"] == NULL ) { $row["title"] = "Unnamed News Entry"; }
- $date = date('m.d.y @ h:i A', $row["time"]);
- echo "
- ".$row['id']."] <b><a href=\"?page=administration&subpage=edit&nid=".$row['id']."\">".$row['title']."</a></b> <span style=\"color: #CCCCCC\">".htmlspecialchars( substr($row['body'],0,64) )."..</span> <font style=\"color: #4090D0\">by <b>".substr($row['username'],0,5)."</b></font> <font style=\"color: #AAAAAA\"> on ".substr($date,0,8)."</font>
- <br />
- ";
- ++$i;
- }
- echo "</div>";
- echo "<hr class=\"gold\">
- <h2>Troubleshooting Data</h2>
- USER ARRAY:";
- print_r($user);
- echo "<br /><br />COOKIE ARRAY:";
- print_r($_COOKIE);
- echo "<br /><br />username> ". $user->username."<br />password> ".$user->password."<br />uid> ".$user->uid." <br />";
- } else {
- echo "<h2>Administrator Login</h2>
- <form action=\"".$PHP_SELF."?page=administration\" method=\"post\">
- Username <br />
- <input type=\"text\" maxlength=\"32\" size=\"32\" name=\"username\"><br />
- Password <br />
- <input type=\"password\" maxlength=\"32\" size=\"32\" name=\"password\"><br />
- <br />
- <input type=\"submit\" value=\"Login!\">
- <br />
- <input type=\"hidden\" name=\"login\" value=\"1\">
- </form>
- ";
- }
- echo "<br /><br />
- <h4 style=\"text-align: center\">logged in as: {$user->username}</h4>";
- }
- function news($page)
- {
- global $DB, $user, $subpage, $wrapper;
- $background_image_number = rand(1, 2);
- echo "
- <!-- <h2 style=\"margin-bottom: 0px; margin-top: 0px; font-size: 18px; border: none; color: #dbc88f\">Serving the greater St. Tammany Parish, LA area and more!<br /><font style=\"color: #ffffff; font-size: 20px\">We are proud to be a local, family-owned & maintained business.</font></h2> -->
- <div style=\"border-radius: 0px 0px 0p 0px; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; width: 100%; background-color: transparent; border: none; height: 405px; text-align: left; vertical-align: middle; line-height: auto; font-weight: bold; font-size: 56px; font-family: 'Trebuchet MS', Tahoma, Arial; color: white; background-image: url('site_images/news_img_{$background_image_number}.jpg'); background-position: top center; background-repeat: no-repeat; border-left: 0px solid #ffffff; border-right: 0px solid #ffffff; border-bottom: 10px solid #e8cf6f; border-top: 0px solid #ffffff;\">
- <div align=\"center\" style=\"padding: 0px 0px 0px 0px; text-align: left; margin-left: 0%; margin-right: 0%; width: 100%; min-width: ".$wrapper['min_width']."; height: 100%\">
- <span style=\"vertical-align: -390px; line-height: auto; letter-spacing: 2px; word-spacing: 2px; margin: 0px 0px 0px 0px;\"> </span>
- </div>
- </div>
- <div align=\"center\">
- <h2 style=\"text-align: center; color: #d1d1d1; border-width: 0px 0px 1px 0px; border-color: #8a8a8a; width: 50%; min-width: ".$wrapper['min_width']."\">News Entries</h2>
- </div>
- <div align=\"center\" style=\"padding: 0px 0px 0px 0%; margin: 0px 0px 0px 0px; text-align: left; margin-left: auto; margin-right: auto; width: 60%; min-width: ".$wrapper['min_width']."\">
- ";
- // SETUP VARS FOR PAGE NUMBER URL FUNCTION
- if ( !isset($_GET["results"]) || $_GET["results"] == "" ) { $result_limit = 4; } else { $result_limit = $_GET["results"]; }
- // if ( isset($_GET["results"]) && is_numeric($_GET["results"]) ) { $result_limit = $_GET["results"]; } else { $result_limit = 3; }
- if ( isset($_GET["page_number"]) && is_numeric($_GET["page_number"]) ) { $page = $_GET["page_number"]; $result_start = (($page - 1) * $result_limit); $result_start_string = $result_start . ", "; }
- if ( $result_start == 0 || !isset($result_start) || $result_start < 0 ) { $result_start = 0; }
- $page_urls = pageNumber_urls('id', 'newsEntries', $result_limit);
- // SETUP FOR QUERY WHILE MYSQL_FETCH_ARRAY LOOP
- $result_selected = $result_start;
- $result_selected++;
- $i = 1;
- $query = "SELECT * FROM `newsEntries` ORDER BY `id` DESC LIMIT {$result_start_string} {$result_limit}";
- $DB->query($query);
- while ( $row = mysql_fetch_array($DB->result, MYSQL_ASSOC) ) {
- $date = date('m.d.y @ h:i A', $row["time"]);
- echo "
- <h2 style=\"font-size: 20px\"><!-- row `id` = ".$row['id']." -->{$result_selected}] <b>".$row['title']."</b> <!-- <font style=\"color: #4090D0\">by <b>".$row['username']."</b></font> --><font style=\"color: #AAAAAA; font-size: 20px\"> on ".$date."</font></h2>
- <p>".$row['body']."</p>
- ";
- ++$i; $result_selected++;
- }
- echo "
- </div>
- <div style=\"width: 100%; text-align: center; color: #d1d1d1; font-size: 18px\">
- <b>Page List [ {$page_urls} ]</b>
- </div>
- <hr style=\"background-color: #707070; height: 1px; border: none; width: 50%; margin-top: 16px; margin-bottom: 16px\">
- <a class=\"widget ng-scope\" ng-href=\"https://www.thumbtack.com/Steam-Pro-Mandeville-LA/service/2014794\" target=\"_blank\" href=\"https://www.thumbtack.com/Steam-Pro-Mandeville-LA/service/2014794\"> <img style=\"height: 128px;width: 128px;\" ng-src=\"https://static.thumbtackstatic.com/media/pages/profile/standard-widgets/pro-svg/white/2015.svg\" src=\"https://static.thumbtackstatic.com/media/pages/profile/standard-widgets/pro-svg/white/2015.svg\"></a><script type='text/javascript' src='https://www.thumbtack.com/profile/widgets/scripts/?service_id=5TTNTVvi39dV1w&widget_id=profile'></script>
- ";
- } // end news() ---------------
- function contact($page)
- {
- global $DB, $user, $subpage, $wrapper;
- // $this->subHeader($page);
- // CHECK USER SENT MESSAGE FORM
- if ( $_POST["submit_message"] == "1" ) {
- $slashed_POST = addslashes_array($_POST);
- $time = time();
- $ip = $_SERVER['REMOTE_ADDR'];
- $query = "
- INSERT INTO `customerMessages`
- ( `name`, `number`, `email`, `subject`, `body`, `time` )
- VALUES ( '".$slashed_POST['name']."', '".$slashed_POST['number']."', '".$slashed_POST['email']."', '".$slashed_POST['subject']."', '".$slashed_POST['body']."', '{$time}' )";
- $DB->query($query);
- if ( $DB->error == NULL ) {
- if ( isset($slashed_POST["name"]) ) { $name = ", " .$slashed_POST["name"]; }
- // EMAIL VARS AND LOOP ---------------
- $query = "SELECT * FROM `customerMessages` WHERE `subject` = '".$slashed_POST['subject']."' AND `name` = '".$slashed_POST['name']."' LIMIT 1";
- $DB->query($query);
- $sql_row = mysql_fetch_array($DB->result, MYSQL_ASSOC);
- $msg_id = $sql_row["id"];
- echo "<h2>Message Sent to Steam Pro!</h2>Your message with the subject '".$slashed_POST['subject']."' was successfully sent to Steam Pro! They have been notified of your message and will be contacting you{$name} as soon as they read it.";
- $email1 = "alexleocarollo@gmail.com";
- $email2 = "rypedesigns@gmail.com";
- $subject = $slashed_POST["subject"];
- $message = "MESSAGE FROM " . $slashed_POST["name"] . "\n
- ";
- foreach ( $slashed_POST as $key => $value ) {
- $message .= "\n
- {$key} => {$value}"; // if ( $key == "time" ) { $value = date('m.d.y @ h:i A', $row["time"]); }
- }
- $message .= "\n
- link => http://steampros.net/index.php?page=administration&subpage=inbox&id=" . $msg_id;
- // SEND MESSAGE AS EMAILS
- email($email1,$subject,$message);
- email($email2,$subject,$message);
- email('3603284545@vtext.com',$slashed_POST['number'],"
- http://steampros.net/?page=administration&subpage=inbox&id=" . $msg_id . "\n
- " . $slashed_POST['body']);
- email('9852649068@txt.att.net',$slashed_POST['number'],"
- http://steampros.net/?page=administration&subpage=inbox&id=" . $msg_id . "\n
- " . $slashed_POST['body']);
- } else {
- echo "<h2>Sorry! There was a problem with your request..</h2>Printing form variables for troubleshooting: .. <br />"; print_r($_POST);
- } // END SQL ERROR MESSAGE
- } else { // IF MESSAGE FORM NOT SUBMITTED ..
- echo "
- <h2>Contact Steam Pro</h2>
- <div align=\"center\" style=\"width: 100%; min-width: ".$wrapper['min_width']."\">
- <form action=\"?page=contact\" method=\"post\">
- <input type=\"hidden\" name=\"submit_message\" value=\"1\">
- <b>
- <table cellpadding=\4\" cellspacing=\"8\" align=\"left\" align=\"center\" style=\"width: 100%; min-width: 600px; margin-left: 0px; font-weight: bold; padding-left: 10%; padding-right: 10%\">
- <tr>
- <td style=\"width: 50%; text-align: right\">
- Your Name: ** <br>
- <input name=\"name\" type=\"text\" maxlength=\"48\" size=\"24\" style=\"text-align: right; width: 100%\"><br>
- </td>
- <td style=\"width: 50%; text-align: left\">
- Message Subject: ** <br>
- <input name=\"subject\" type=\"text\" maxlength=\"96\" size=\"24\" style=\"width: 100%\"><br>
- </td>
- </tr>
- <tr>
- <td style=\"width: 50; text-align: right\">
- E-mail address: <br>
- <input name=\"email\" type=\"text\" maxlength=\"64\" size=\"24\" style=\"text-align: right; width: 100%\"><br>
- </td>
- <td style=\"width: 50; text-align: left\">
- Phone Number: (not required)<br>
- <input name=\"number\" type=\"text\" maxlength=\"16\" size=\"24\" style=\"width: 100%\"><br>
- </td>
- </tr>
- <tr>
- <td colspan=\"2\" style=\"width: 100%\">
- Message to Steam Pro: ** <br>
- <textarea name=\"body\" rows=\"6\" style=\"width: 100%\"></textarea><br>
- </td>
- </tr>
- <tr>
- <td colspan=\"2\" style=\"width: 100%; text-align: center\">
- <input type=\"submit\" value=\"Send Message!\" style=\"width: 100%; text-align: center\">
- <br /><br />
- </td>
- </tr>
- </table>
- </b>
- </form>
- <br /><br /><br />
- </div>
- ";
- }
- echo "
- <h2 style=\"margin-bottom: 0px\">Contact & Location Information</h2>
- <br />
- <table cellpadding=\4\" cellspacing=\"8\" align=\"left\" align=\"center\" style=\"width: 100%; min-width: 600px; margin-left: 0px; margin-top: 0px; font-weight: bold; padding-left: 24px; padding-right: 24px\">
- <tr>
- <td valign=\"top\" style=\"width: 33%; font-weight: normal; color: #dbc88f; padding-top: 24px; padding-right: 12px; text-align: right;\">
- <font style=\"color: white; font-weight: bold\">Steam Pro </font><br />
- Wes Carollo <br />
- <br />
- <font style=\"color: white; font-weight: bold\">Address: </font><br />
- 2231 Labarre St. <br />
- Mandeville, LA <br />
- St. Tammany Parish <br />
- 70448 <br />
- <br />
- <font style=\"color: white; font-weight: bold\">LAN Phone</font><br /> 985-626-5895 <br />
- <font style=\"color: white; font-weight: bold\">Cell Phone</font><br /> 985-626-5895 <br />
- </td>
- <td valign=\"top\" style=\"width: 33%; color: #dbc88f font-weight: normal; text-align: left; padding-top: 0px\">
- <div align=\"center\" width=\"1%\" style=\"height: auto; width: 300px; background-color: transparent; margin: 0px auto 0px auto; padding-top: 0px; padding-bottom: 4px; text-align: center\">
- <h2 style=\"margin-bottom: 0px; margin-top: 0px; font-size: 20px; border-bottom: 0px\">Mandeville Steam Pro</h2>
- <div style=\"padding: 2%; padding-top: 0px; margin-top: 0px; margin-bottom: 0px; padding-top: 4px; padding-bottom: 4px; text-align: center\">
- <img src=\"https://maps.googleapis.com/maps/api/staticmap?center=Mandeville,LA&markers=color:red%7C3980+2231+Labarre+St<br%2F>Mandeville,LA&zoom=10&size=250x250&maptype=roadmap&sensor=false\" alt=\"SteamPro Mandeville, LA Location\">
- <address style=\"margin-bottom: 0px;\"><b>
- <span>2231 Labarre St</span><br/>
- <span>Mandeville</span>,
- <span>LA</span><br/>
- <span>70448</span>
- </b></address>
- </div>
- </div>
- </td>
- <td valign=\"top\" style=\"width: 33%; color: #dbc88f; font-size: 14px; font-weight: normal; padding-top: 24px; padding-left: 12px; text-align: left; padding-right: 0px\">
- <font style=\"color: white; font-weight: bold\">Site</font><br /> <a href=\"http://steampros.net/\">SteamPros.net</a> <br />
- <br />
- <font style=\"color: white; font-weight: bold\">Information: </font><br /> Serving: Mandeville, Madisonville, Covington, Lacombe, Abita Springs, Slidell, Folsom, Hammond, Ponchatoula, and Robert. Call for a quick quote or email and we will respond to you in a timely manner!
- <br /><br />
- </td>
- </tr>
- </table>
- <h2>Business Card</h2>
- <div align=\"center\" style=\"width: 100%; text-align: center; min-width: 600px\">
- <img src=\"site_images/business_card.png\" style=\"border: 2px solid #BBBBBB;\" />
- </div>
- ";
- } // end contact() ---------------
- function pricing($page)
- {
- global $subpage, $wrapper;
- // $this->subHeader($page);
- echo "
- <h2>Price Calculator [estimate]</h2>
- <div style=\"width: 100%; text-align:left; font-size: 14px; padding-left: 32px; padding-right: 16px\">
- <form action=\"index.php?page=pricing&subact=calculate\" method=\"post\">
- <h4>If you would like to send us a message with a description of what you need done, or have any other question, please use the form below the Price Calculator.</h4>
- <table id=\"priceCalculator\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\" style=\"border-bottom: 1px solid FFE082; padding: 4px 4px 4px 4px; border: 0px; font-size: 18px; font-weight: bold; width: 100%\">
- <tr>
- <td colspan=\"2\" style=\"width: 33%; text-align: center\"><h2 style=\"margin-top: 0px; padding-top: 0px; margin-bottom: 0px;\">Carpet</h2></td><td colspan=\"2\" style=\"width: 33%; text-align: center; border-left: 1px solid #FFE082; border-right: 1px solid #FFE082\"><h2 style=\"margin-top: 0px; padding-top: 0px; margin-bottom: 0px;\">Tile</h2></td><td colspan=\"2\" style=\"width: 33%; text-align: center;\"><h2 style=\"margin-top: 0px; padding-top: 0px; margin-bottom: 0px;\">Upholstery</h2></td>
- </tr>
- <tr>
- <td style=\"text-align: right;width: 30%;\">$35 per Room</td>
- <td style=\"text-align: left; width: auto;\">
- <select name=\"carpet_rooms\" id=\"carpet1\" onchange=\"calculateCarpet(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"35\">1 = $35</option>
- <option value=\"70\">2 = $70</option>
- <option value=\"105\">3 = $105</option>
- <option value=\"140\">4 = $140</option>
- <option value=\"175\">5 = $175</option>
- <option value=\"210\">6 = $210</option>
- </select>
- <!-- <input type=\"text\" name=\"reg_rooms\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
- </td>
- <td style=\"text-align: right; width: 30%; border-left: 1px solid #FFE082;\">$150 per Kitchen/Utility Room</td>
- <td style=\"text-align: left; width: auto; border-right: 1px solid #FFE082;\">
- <select name=\"tile_kitchens\" id=\"tile1\" onchange=\"calculateTile(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"150\">1 = $150</option>
- <option value=\"300\">2 = $300</option>
- <option value=\"450\">3 = $450</option>
- <option value=\"600\">4 = $600</option>
- <option value=\"750\">5 = $750</option>
- </select>
- <!-- <input type=\"text\" name=\"kitchen_utility\" value=\"0\" maxlength=\"1\" size=\"1\"> -->
- </td>
- <td style=\"text-align: left;width: 30%;\">$75 per 2-Cusion Sofa</td>
- <td style=\"text-align: left; width: auto;\">
- <select name=\"upholstery_sofa_2\" id=\"upholstery1\" onchange=\"calculateUpholstery(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"75\">1 = $75</option>
- <option value=\"150\">2 = $150</option>
- <option value=\"225\">3 = $225</option>
- <option value=\"300\">4 = $300</option>
- <option value=\"375\">5 = $375</option>
- </select>
- <!-- <input type=\"text\" name=\"two_cusion_sofa\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
- </td>
- </tr>
- <tr>
- <td style=\"text-align: right;width: 30%;\">$50 per Stairset</td>
- <td style=\"text-align: left; width: auto;\">
- <select name=\"carpet_stairs\" id=\"carpet2\" onchange=\"calculateCarpet(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"50\">1 = $50</option>
- <option value=\"100\">2 = $100</option>
- <option value=\"150\">3 = $150</option>
- <option value=\"200\">4 = $200</option>
- <option value=\"250\">5 = $250</option>
- </select>
- <!-- <input type=\"text\" name=\"stairsets\" value=\"0\" maxlength=\"1\" size=\"2\"> -->
- </td>
- <td style=\"text-align: right; width: 30%; border-left: 1px solid #FFE082;\">$35 per Bathroom</td>
- <td style=\"text-align: left; width: auto; border-right: 1px solid #FFE082;\">
- <select name=\"tile_bathroom\" id=\"tile2\" onchange=\"calculateTile(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"35\">1 = $35</option>
- <option value=\"70\">2 = $70</option>
- <option value=\"105\">3 = $105</option>
- <option value=\"140\">4 = $140</option>
- <option value=\"175\">5 = $175</option>
- </select>
- <!-- <input type=\"text\" name=\"bathroom\" value=\"0\" maxlength=\"1\" size=\"1\"> -->
- </td>
- <td style=\"text-align: left;width: 30%;\">$100 per 3-Cushion Sofa</td>
- <td style=\"text-align: left; width: auto;\">
- <select name=\"upholstery_sofa_3\" id=\"upholstery2\" onchange=\"calculateUpholstery(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"100\">1 = $100</option>
- <option value=\"200\">2 = $200</option>
- <option value=\"300\">3 = $300</option>
- <option value=\"400\">4 = $400</option>
- <option value=\"500\">5 = $500</option>
- </select>
- <!-- <input type=\"text\" name=\"three_cusion_sofa\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
- </td>
- </tr>
- <tr>
- <td style=\"text-align: right;width: 30%;\">$70 per Living Room</td>
- <td style=\"text-align: left; width: auto;\">
- <select name=\"carpet_living_rooms\" id=\"carpet3\" onchange=\"calculateCarpet(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"70\">1 = $70</option>
- <option value=\"140\">2 = $140</option>
- <option value=\"210\">3 = $210</option>
- <option value=\"280\">4 = $280</option>
- <option value=\"350\">5 = $350</option>
- </select>
- <!-- <input type=\"text\" name=\"living_rooms\" value=\"0\" maxlength=\"1\" size=\"2\"> -->
- </td>
- <td style=\"text-align: right; width: 30%; border-left: 1px solid #FFE082;\">$45 per Master Bathroom</td>
- <td style=\"text-align: left; width: auto; border-right: 1px solid #FFE082;\">
- <select name=\"tile_master_bathroom\" id=\"tile3\" onchange=\"calculateTile(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"45\">1 = $45</option>
- <option value=\"90\">2 = $90</option>
- <option value=\"135\">3 = $135</option>
- <option value=\"180\">4 = $180</option>
- <option value=\"225\">5 = $225</option>
- </select>
- <!-- <input type=\"text\" name=\"master_bathroom\" value=\"0\" maxlength=\"1\" size=\"1\"> -->
- </td>
- <td style=\"text-align: left;width: 30%;\">$150+ per Sectional Sofa</td>
- <td style=\"text-align: left; width: auto;\">
- <select name=\"upholstery_sofa_sectional\" id=\"upholstery3\" onchange=\"calculateUpholstery(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"150\">1 = $150</option>
- <option value=\"300\">2 = $300</option>
- <option value=\"450\">3 = $450</option>
- <option value=\"600\">4 = $600</option>
- <option value=\"750\">5 = $750</option>
- </select>
- <!-- <input type=\"text\" name=\"sectional_cusion_sofa\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
- </td>
- </tr>
- <tr>
- <td style=\"text-align: left;width: 30%;\"> </td>
- <td style=\"text-align: left; width: auto;\"> </td>
- <td style=\"text-align: right; width: 30%; border-left: 1px solid #FFE082;\">$60 per Bedroom</td>
- <td style=\"text-align: left; width: auto; border-right: 1px solid #FFE082;\">
- <select name=\"tile_bedroom\" id=\"tile4\" onchange=\"calculateTile(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"60\">1 = $60</option>
- <option value=\"120\">2 = $120</option>
- <option value=\"180\">3 = $180</option>
- <option value=\"240\">4 = $240</option>
- <option value=\"300\">5 = $300</option>
- </select>
- <!-- <input type=\"text\" name=\"bedroom\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
- </td>
- <td style=\"text-align: left;width: 30%;\">$60 per Recliner</td>
- <td style=\"text-align: left; width: auto;\">
- <select name=\"upholstery_recliner\" id=\"upholstery4\" onchange=\"calculateUpholstery(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"60\">1 = $60</option>
- <option value=\"120\">2 = $120</option>
- <option value=\"180\">3 = $180</option>
- <option value=\"240\">4 = $240</option>
- <option value=\"300\">5 = $300</option>
- </select>
- <!-- <input type=\"text\" name=\"recliner\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
- </td>
- </tr>
- <tr>
- <td colspan=\"2\" style=\"text-align: center\">
- <!-- Carpet Total <br /><input id=\"carpetTotal\" name=\"carpet_total\" type=\"text\" value=\"0\" style=\"text-align: center; width: 100%\"> -->
- </td>
- <td style=\"text-align: right; width: 30%; border-left: 1px solid #FFE082;\">$150 per Tile Living Room</td>
- <td style=\"text-align: center; width: auto; border-right: 1px solid #FFE082; border-right: 1px solid #FFE082;\">
- <select name=\"tile_living_room\" id=\"tile5\" onchange=\"calculateTile(this.value)\">
- <option value=\"0\">0 = $0</option>
- <option value=\"150\">1 = $150</option>
- <option value=\"300\">2 = $300</option>
- <option value=\"450\">3 = $450</option>
- </select>
- <!-- <input type=\"text\" name=\"living_room_tiled\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
- </td>
- <td colspan=\"2\"> </td>
- </tr>
- <tr>
- <td colspan=\"2\" style=\"text-align: center; width: auto; border-top: 2px solid #FFE082;\">
- Carpet Total
- <br />
- <input id=\"carpetTotal\" name=\"carpet_total\" type=\"text\" value=\"0\" style=\"text-align: center; width: 100%\">
- </td>
- <td colspan=\"2\" style=\"text-align: center; width: auto; border-top: 2px solid #FFE082; border-left: 1px solid #FFE082; border-right: 1px solid #FFE082;\">
- Tile Total
- <br />
- <input id=\"tileTotal\" name=\"tile_total\" type=\"text\" value=\"0\" style=\"text-align: center; width: 100%\">
- </td>
- <td colspan=\"2\" style=\"text-align: center; width: auto; border-top: 2px solid #FFE082;\">
- Upholstery Total
- <br />
- <input id=\"upholsteryTotal\" name=\"upholstery_total\" type=\"text\" value=\"0\" style=\"text-align: center; width: 100%\">
- </td>
- </tr>
- <tr>
- <td colspan=\"6\" style=\"text-align: center; padding-bottom: 12px; \">
- <h2 style=\"margin-top: 0px; padding-top: 0px; margin-bottom: 0px; border: 0px solid black; \">Combined Total</h2>
- <input id=\"wholeTotal\" name=\"whole_total\" type=\"text\" value=\"0\" style=\"background-color: #e8cf6f; color: #151515; font-size: 24px; border: 2px solid black; border-radius: 8px; text-align: center; width: 90%\">
- </td>
- </tr>
- <tr>
- <td colspan=\"6\" style=\"padding: 6px 6px 6px 6px; text-align: center; font-size: 16px; border-top: 1px solid #FFE082; border-bottom: 1px solid #FFE082\">
- <i>This is a general price estimator. Keep in mind it is subject to change, dependant on factors that are not included in the estimator.</i>
- <br />
- Minimum Charge is $90 ---- <b>For a set of dining room chairs, or any other furniture, please call.</b><br />
- </tr>
- </table>
- </form>
- </div>
- <br /><br />
- <h2>Free Estimate</h2>
- ";
- contact_form(true);
- } // end pricing() ---------------
- function about($page)
- {
- global $subpage, $wrapper, $constructor_test;
- // $this->subHeader($page);
- echo "
- <h2>About Wes Carollo and Steam Pro</h2>
- Wes Carollo is a resident of Mandeville, Louisiana for the past thirty-five years. Wes and Steam Pro have been a fixture in St. Tammany Parish since 1987. He is a <font style=\"color: white\"><b>certified carpet cleaning technician</b></font> and a stickler for detail.
- <br /><br />
- The cleaning process employs a powerful truck-mounted steam extraction service. The cleaning solution is an eco and environmentally friendly product:
- <br /><br />
- Safe for your family, your pets and your community.<br />
- Services are offered seven days a week.
- <br /><br /><br />
- <h2 style=\"margin-bottom: 0px\">Business Information</h2>
- <br />
- <table cellpadding=\4\" cellspacing=\"8\" align=\"left\" align=\"center\" style=\"width: 100%; min-width: 600px; margin-left: 0px; margin-top: 0px; font-weight: bold; padding-left: 24px; padding-right: 24px\">
- <tr>
- <td valign=\"top\" style=\"width: 33%; font-weight: normal; color: #dbc88f; padding-top: 24px; padding-right: 12px; text-align: right;\"> <font style=\"color: white; font-weight: bold\">Steam Pro </font><br />
- Wes Carollo <br />
- <br />
- <font style=\"color: white; font-weight: bold\">Address </font><br />
- 2231 Labarre St <br />
- Mandeville, LA <br />
- St. Tammany Parish <br />
- 70448 <br />
- <br />
- <font style=\"color: white; font-weight: bold\">LAN Phone</font><br /> 985-626-5895 <br />
- <font style=\"color: white; font-weight: bold\">Cell Phone</font><br /> 985-626-5895 <br />
- </td>
- <td valign=\"top\" style=\"width: 33%; color: #dbc88f font-weight: normal; text-align: left; padding-top: 0px\">
- <div align=\"center\" width=\"1%\" style=\"height: auto; width: 300px; background-color: transparent; margin: 0px auto 0px auto; padding-top: 0px; padding-bottom: 4px; text-align: center\">
- <h2 style=\"font-size: 20px; margin-bottom: 0px; margin-top: 0px;border-bottom: 0px\">Mandeville Steam Pro</h2>
- <div style=\"padding: 2%; padding-top: 0px; margin-top: 0px; margin-bottom: 0px; padding-top: 4px; padding-bottom: 4px; text-align: center\">
- <img src=\"https://maps.googleapis.com/maps/api/staticmap?center=Mandeville,LA&markers=color:red%7C3980+2231+Labarre+St<br%2F>Mandeville,LA&zoom=10&size=250x250&maptype=roadmap&sensor=false\" alt=\"SteamPro Mandeville, LA Location\">
- <address style=\"margin-bottom: 0px;\"><b>
- <span>2231 Labarre St</span><br/>
- <span>Mandeville</span>,
- <span>LA</span><br/>
- <span>70448</span>
- </b></address>
- </div>
- </div>
- </td>
- <td valign=\"top\" style=\"width: 33%; color: #dbc88f; font-size: 14px; font-weight: normal; padding-top: 24px; padding-left: 12px; text-align: left; padding-right: 0px\">
- <font style=\"color: white; font-weight: bold\">Site</font><br /> <a href=\"http://steampros.net/\">SteamPros.net</a> <br />
- <br />
- <font style=\"color: white; font-weight: bold\">Information: </font><br /> Serving: Mandeville, Madisonville, Covington, Lacombe, Abita Springs, Slidell, Folsom, Hammond, Ponchatoula, and Robert. Call for a quick quote or email and we will respond to you in a timely manner!
- <br /><br />
- </td>
- </tr>
- </table>
- <h2>Business Card</h2>
- <div align=\"center\" style=\"width: 100%; text-align: center; min-width: 600px\">
- <img src=\"site_images/business_card.png\" style=\"border: 2px solid #BBBBBB;\" />
- </div>
- ";
- } // end about() ---------------
- /*
- function testz()
- {
- echo '<h2>TESTING THIS FUNCTION</h2>';
- $formated_name = hide_surnames("Ryan Perkins", " ");
- echo $formated_name . "<br><br><br>";
- echo "<br /><br />{$string} == sent string<br/><br />First: {$FirstName} <br />Last: {$LastName} => (shorted) = {$AbbLast} <br /><br />NewName = {$NewName}";
- }
- */
- function reviews($page)
- {
- global $DB, $subpage, $wrapper;
- // $this->subHeader($page);
- date_default_timezone_set("US/Eastern");
- $ip = $_SERVER['REMOTE_ADDR'];
- unset($valid_review);
- if ( $_POST["submit_review"] == "1" ){
- $DB->query("SELECT * FROM `userReviews` WHERE `ip_address` = '{$ip}' ORDER BY `userReviews`.`time` DESC LIMIT 1");
- $result = mysql_fetch_array($DB->result, MYSQL_ASSOC);
- // ALTER TABLE `userReviews` AUTO_INCREMENT = 1; REMINDER ON HOW TO CHANGE AI
- // if ($DB->bool == true ) { echo "<hr>"; var_dump($result); echo "<hr>"; }
- // print_r($result);
- if ( $DB->bool == true && is_numeric( $result['time'] ) ){
- $time = time();
- $review_time = $result['time'];
- $timeout_time = (7 * 24 * 60 * 60);
- $timeout = $review_time + $timeout_time;
- if ( $time > $timeout ) { $valid_review = true; }
- elseif( $time <= $timeout ) { $valid_review = false; }
- else { $valid_review = NULL; }
- } else {
- $valid_review = true;
- }
- //echo "<hr><h2>VALID REVIEW = "; var_dump($valid_review); echo "</h2>";
- if ( isset($_POST["rating"]) && $_POST["rating"] > 0 && $_POST["rating"] < 6 ) { $rating = $_POST["rating"]; }
- else{ $rating = "5"; }
- $ip = $ip;
- $time = $time;
- $author = addslashes($_POST["author"]);
- $shortAuthor = abb_surnames($author, $seperator);
- $title = addslashes($_POST["title"]);
- $body = addslashes($_POST["body"]);
- $sql_query = "INSERT INTO userReviews ( `author`, `title`, `body`, `rating`, `time`, `ip_address` ) VALUES ( '{$shortAuthor}', '{$title}', '{$body}', '{$rating}', '{$time}', '{$ip}' )";
- // echo $sql_query ."<br />";
- if ( $valid_review == true ) {
- if ( is_numeric($rating) && $rating >= 0 && $rating <= 5 ){
- // FINAL CONDITION BEFORE SQL ..
- if ( isset($body) && $body !== "" ){
- $DB->query("{$sql_query}");
- if ( $DB->error == NULL ) { echo "<h2 style=\"margin-bottom: 2px\">Success! Your Review Was Posted!</h2><b>We greatly appreciate your input, and again, we thank you for choosing us.</b>"; }
- }
- } else { // $rating >= 0 && <= 5
- echo "<h2 style=\"margin-bottom: 2px\">Sorry! Invalid Review Form Input</h2><b>Ratings must be numeric and can only go up to 5.</b>";
- }
- } else { // $valid_review
- echo "<h2 style=\"margin-bottom: 2px\">Sorry! Review post failed..</h2> <b>You can only post one review per week.</b> <!-- " . var_dump($valid_review) . " -->";
- }
- }
- if ( isset($_GET["page_number"]) && is_numeric($_GET["page_number"]) ) { $page_selected = $_GET["page_number"]; }
- elseif ( !isset($_GET["page_number"]) || $_GET["page_number"] == NULL ) { $page_selected = "1"; }
- else { $page_selected = "1"; }
- $DB->query("SELECT COUNT(`rating`) FROM `userReviews`");
- $review_count = mysql_fetch_row($DB->result, MYSQL_ASSOC);
- $review_count = $review_count['COUNT(`rating`)'];
- $DB->query("SELECT AVG(`rating`) FROM `userReviews`");
- $rating_avg = mysql_fetch_row($DB->result, MYSQL_ASSOC);
- $rating_avg = round($rating_avg["AVG(`rating`)"], 2);
- // abb_surnames($FullName, $seperator);
- echo "
- <br />
- <br />
- <div style=\"display: hidden;\">
- <div itemprop=\"name\"><strong>Steam Pro Carpet Cleaning</strong></div>
- <div itemprop=\"aggregateRating\" itemscope itemtype=\"//schema.org/AggregateRating\">
- <meta itemprop=\"worstRating\" content = \"1\">
- <meta itemprop=\"bestRating\" content = \"5\">
- Average Rating: <b><span itemprop=\"ratingValue\">{$rating_avg}</span> stars</b> based on <b><span itemprop=\"reviewCount\">{$review_count}</span> reviews</b>
- </div>
- </div>
- <!--
- <div itemprop=\"aggregateRating\" itemscope itemtype=\"http://schema.org/AggregateRating\">
- <div itemprop=\"itemReviewed\" itemscope itemtype=\"http://schema.org/Thing\"><span itemprop=\"name\" style=\"color: #707070\">Steam Pro Carpet Cleaning</span></div>
- Average <span itemprop=\"ratingValue\">{$rating_avg}</span> stars based on <span itemprop=\"reviewCount\">{$review_count}</span> reviews </div>
- -->
- <h2 style=\"border-bottom: 2px solid #e2c363; margin-bottom: 0px; margin-top: 8px; background-image: url('site_images/tile_pageName[1].png'); background-repeat: repeat-x; background-position: top; background-color: #424242; border-radius: 13px 13px 0px 0px; padding: 6px 12px 6px 12px;\">
- <div style=\"vertical-align: bottom; width: 100%; text-align: left\">
- <span style=\"width: auto; text-align: left\">Customer Reviews</span>
- <span style=\"text-align: right; width: auto; float:right; margin-left: auto; margin-right: 0%; display: inline-block; font-size: 20px; color: #CCCCCC\">Displaying Page [<font style=\"color: #93805b\">{$page_selected}</font>]</span>
- </div>
- </h2>
- <!--
- <h4 style=\"margin-top: 0px; padding: 5px 12px 5px 12px; background-color: #131317\">
- <div style=\"display: hidden;\">
- <div itemprop=\"name\"><strong>Steam Pro Carpet Cleaning</strong></div>
- <div itemprop=\"aggregateRating\" itemscope itemtype=\"//schema.org/AggregateRating\">
- <meta itemprop=\"worstRating\" content = \"1\">
- <meta itemprop=\"bestRating\" content = \"5\">
- Average <span itemprop=\"ratingValue\">{$rating_avg}</span> stars based on <span itemprop=\"reviewCount\">{$review_count}</span> reviews
- </div>
- </div>
- <div itemprop=\"itemReviewed\" itemscope itemtype=\"http://schema.org/Thing\"><span itemprop=\"name\" style=\"color: #00baff\">Steam Pro Carpet Cleaning</span></div>
- <span style=\"font-size: 18px; color: #FFFFFF; opacity: 0.75; text-align: left; margin-left: 12px; margin-right: auto\">
- Average Rating:
- [<span itemprop=\"ratingValue\" style=\"color: #FFCC00\">{$rating_avg}</span>]
- stars over
- <span itemprop=\"reviewCount\" style=\"color: #FFCC00\">{$review_count}</span> reviews for
- </span>
- </h4>
- -->
- <table style=\"width: 100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-bottom: 4px solid #AAAAAA\">
- <meta itemprop=\"datePublished\" content=\"{$metadate}\">
- ";
- $result_limit = 7;
- $page_urls = pageNumber_urls('id', 'userReviews', $result_limit);
- if ( isset($_GET["results"]) && is_numeric($_GET["results"]) ) { $result_limit = $_GET["results"]; }
- if ( isset($_GET["page_number"]) && is_numeric($_GET["page_number"]) ) { $page = $_GET["page_number"]; $result_start = (($page - 1) * $result_limit); $result_start_string = $result_start . ", "; }
- if ( $result_start == 0 || !isset($result_start) || $result_start < 0 ) { $result_start = 0; }
- $DB->query("SELECT * FROM `userReviews` ORDER BY `id` DESC LIMIT {$result_start_string} {$result_limit}");
- $i = 0;
- $result_selected = $result_start;
- $result_selected++;
- while ( $row = mysql_fetch_array($DB->result, MYSQL_ASSOC) ){
- ++$i;
- $author = $row["author"];
- $shortAuthor = abb_surnames($author, $seperator);
- if ( !isset($author) ) { $author = "Anonymous"; }
- $title = $row["title"];
- $body = $row["body"];
- $date = date('m-d-y @ h:i A', $row["time"]);
- $metadate = date('m-d-y', $row["time"]);
- $rating = $row["rating"];
- $starHTML = ratingStars($rating);
- if ( $i <= 1 ){ $border_top_width = "0px"; } else { $border_top_width = "1px"; }
- echo "
- <tbody itemprop=\"review\" itemscope itemtype=\"http://schema.org/Review\">
- <tr>
- <td valign=\"bottom\" style=\"background-color: #202020; width: 42px; border-bottom: 1px solid #141414; border-left: 2px solid #303030; border-top: {$border_top_width} solid #171717; border-right: 0px solid #505050; padding-right: 6px; padding-bottom: 2px; text-align: center; font-size: 16px; font-weight: bold; height: 24px\">[".$row['rating']."/5]</td>
- <td style=\"background-color: #202020; border-bottom: 1px solid #141414; border-top: {$border_top_width} solid #171717; border-right: 2px solid #303030; padding-bottom: 2px; padding-top: 4px; padding-left: 6px; font-size: 16px; font-weight: bold; height: 24px\"> <font style=\"color: #FFDD66\">{$starHTML}</font> <span itemprop=\"author\">{$shortAuthor}</span> \"<span itemprop=\"description\">{$title}</span>\"<font style=\"font-weight: bold; color: #BBBBBB; font-size: 12px\"> {$date}</font></td></tr>
- <tr>
- <td valign=\"top\" style=\"background-color: #242424; border-left: 2px solid #303030; border-right: 1px solid #222222; border-bottom: 0px solid #303030; vertical-align: top; padding-top: 4px; text-align: center; font-weight: bold; color: #d1d1d1; font-size: 16px\"><font style=\"font-weight: normal; font-size: 12px\">#</font>{$result_selected}</td>
- <td valign=\"top\" style=\"background-color: #2c2c2c; border-right: 2px solid #303030; border-bottom: 0px solid #303030; vertical-align: top; padding-left: 6px; padding-top: 4px; padding-bottom: 32px; font-family: Verdana; font-size: 14px\"><span itemprop=\"reviewBody\">{$body}</span>
- <div style=\"display: none\" itemprop=\"reviewRating\" itemscope itemtype=\"http://schema.org/Rating\">
- <meta itemprop=\"worstRating\" content =\"1\">
- <meta itemprop=\"ratingValue\" content=\"{$rating}\">
- <meta itemprop=\"bestRating\" content=\"5\">
- </div>
- </td>
- </tr>
- </tbody>
- ";
- $result_selected++;
- }
- echo "
- <tr>
- <td colspan=\"2\" id=\"lightCell\" align=\"center\" style=\"background-color: #383838; border-radius: 0px 0px 10px 10px; border: 0px solid #1c1c1c; border-top: 2px solid #202020;\">
- <font style=\"font-weight: bold\">Page List [ {$page_urls} ]</font>
- </td>
- </tr>
- <tr>
- <td colspan=\"2\" style=\"text-align: left\" align=\"center\">
- <h2>Submit Review</h2>
- <form action=\"".$PHP_SELF."?page=reviews\" method=\"post\">
- <table cellpadding=\"0\" cellspacing=\"0\" align=\"center\" style=\"width: 75%; min-width: 400px; text-align: left; font-weight: bold; margin-left: auto; margin-right: auto\">
- <tr>
- <td colspan=\"2\" valign=\"top\" style=\"height: auto; padding-bottom: 6px; color: #93804f\">
- Your Name (Last name will only publicly show initial)
- <input type=\"text\" name=\"author\" size=\"64\" maxlength=\"32\" style=\"width: 100%; min-width: 400px\">
- <br />
- Review Title
- <input type=\"text\" name=\"title\" size=\"64\" style=\"width: 100%; min-width: 400px\">
- <br />
- Review Body
- <br />
- <textarea name=\"body\" style=\"width: 100%; min-width: 400px\" rows=\"4\"></textarea>
- </td>
- </tr>
- <tr>
- <td style=\"width: 100px; color: #93804f; white-space: nowrap; vertical-align: top; text-align: center; padding-top: 0px\" valign=\"top\" nowrap>
- <span style=\"display: inline-block; background-color: #104596; border: 2px solid white; padding: 8px 0px 8px 0px; width: 100%; border-radius: 7px\">
- <span class=\"rating\">
- <input type=\"radio\" class=\"rating-input\"
- id=\"rating-input-1-5\" name=\"rating\" value=\"5\">
- <label for=\"rating-input-1-5\" class=\"rating-star\"></label>
- <input type=\"radio\" class=\"rating-input\"
- id=\"rating-input-1-4\" name=\"rating\" value=\"4\">
- <label for=\"rating-input-1-4\" class=\"rating-star\"></label>
- <input type=\"radio\" class=\"rating-input\"
- id=\"rating-input-1-3\" name=\"rating\" value=\"3\">
- <label for=\"rating-input-1-3\" class=\"rating-star\"></label>
- <input type=\"radio\" class=\"rating-input\"
- id=\"rating-input-1-2\" name=\"rating\" value=\"2\">
- <label for=\"rating-input-1-2\" class=\"rating-star\"></label>
- <input type=\"radio\" class=\"rating-input\"
- id=\"rating-input-1-1\" name=\"rating\" value=\"1\">
- <label for=\"rating-input-1-1\" class=\"rating-star\"></label>
- </span>
- </span>
- <br />
- <font style=\"color: white\">Rating</font>
- </td>
- <td valign=\"top\" style=\"padding: 0px 2px 0px 10px; vertical-align: top; text-align: right\" nowrap>
- <input type=\"submit\" value=\"Submit Review!\" style=\"width: 100%; text-align: center; margin-top: 0px\">
- </td>
- </tr>
- </table>
- <input type=\"hidden\" name=\"submit_review\" value=\"1\">
- </form>
- </td>
- </tr>
- <tr>
- <td colspan=\"2\" style=\"text-align: left\" align=\"center\">
- <br />
- <h2>External Reviews</h2>
- <div align=\"center\" style=\"min-width: 1%; width: auto; margin-left: auto; margin-right: auto\">
- <div class=\"widget ng-scope\" id=\"tt-review-widget-star\" style=\"margin-left:auto; margin-right: auto\"> <img ng-src=\"https://static.thumbtackstatic.com/media/logos/thumbtack/wordmark.svg\" alt=\"Thumbtack\" class=\"tt-logo\" src=\"https://static.thumbtackstatic.com/media/logos/thumbtack/wordmark.svg\"> <a ng-href=\"https://www.thumbtack.com/Steam-Pro-Mandeville-LA/service/2014794\" href=\"https://www.thumbtack.com/Steam-Pro-Mandeville-LA/service/2014794\"> <div class=\"ng-binding\" style=\"text-align: center\">Steam Pro</div> </a> <div id=\"tt-dynamic\" style=\"text-align: center\"> <img src=\"https://static.thumbtackstatic.com/media/pages/profile/standard-widgets/review-widget/orange_star.svg\"> <img src=\"https://static.thumbtackstatic.com/media/pages/profile/standard-widgets/review-widget/orange_star.svg\"> <img src=\"https://static.thumbtackstatic.com/media/pages/profile/standard-widgets/review-widget/orange_star.svg\"> <img src=\"https://static.thumbtackstatic.com/media/pages/profile/standard-widgets/review-widget/orange_star.svg\"> <img src=\"https://static.thumbtackstatic.com/media/pages/profile/standard-widgets/review-widget/orange_star.svg\"> <span>9 reviews</span> </div> </div><script type='text/javascript' src='https://www.thumbtack.com/profile/widgets/scripts/?service_id=5TTNTVvi39dV1w&widget_id=review&type=star'></script>
- </div>
- <br />
- </td>
- </tr>
- </table>
- </div>
- ";
- } // end reviews() ---------------
- function surfaces($page)
- {
- global $subpage;
- // $this->subHeader($page);
- echo "
- <table style=\"width: 100%; height: 100%\" height=\"100%\" valign=\"top\" cellpadding=\"0\" cellspacing=\"0\">
- <tr>
- <td style=\"text-align: right; vertical-align: top; width: 175px; padding-right: 16px; font-size: 20px; height: 100%\" valign=\"top\">
- <h2 style=\"text-align: right; border-bottom-width: 1px; font-size: 24px; margin-left: auto; margin-right: auto; margin-bottom: 14px; width: 100%\">Surface Types</h2>
- <p style=\"margin-top: 0px; line-height: 26px\">
- <a href=\"?page=surfaces&subpage=upholstery\">Upholstery</a> --<br />
- <a href=\"?page=surfaces&subpage=tile\">Tile & Grout</a> --<br />
- <a href=\"?page=surfaces&subpage=carpets\">Carpets</a> --<br />
- </p>
- </td>
- <td valign=\"top\" style=\"vertical-align: top; height: 100%\">";
- if ( $subpage == "tile" ) { // TILE & GROUT
- echo "
- <h2>Steam Tile and Grout Cleaning</h2>
- Steam Pro is equipped with a powerful, truck-mounted system to clean your ceramic, porcelain, or travertine grouted tile floors.
- <br />
- <h3>I accomplish this by:</h3>
- Removing loose dirt using the best vacuuming methods
- <br /><br />
- Using an acid based tile restoring chemical especially formulated for thoroughly cleaning ceramic tiles and grout joints
- <br /><br />
- Thoroughly rinsing off surfaces a number of times in order to make sure that no cleaning materials remain
- <br /><br />
- <font style=\"color: white\">I won't leave your home until I have completed cleaning the tiles and grout joints to your satisfaction. <a href=\"?page=contact\">Contact me</a> for a FREE Estimate.</font>
- <br /><br />
- Steam Pro serves Mandeville, Covington, Slidell, Hammond, Abita Springs, Lacombe, LA and surrounding St. Tammany areas.
- <br /><br />
- Residential and Commercial.
- <br /><br />
- <font style=\"color: white\">Available for Emergencies!</font>
- ";
- } elseif ( $subpage == "carpets" ) { // CARPETS
- echo "
- <h2>Affordable Carpet Cleaning Service</h2>
- To be filled in..<br /><br />
- Steam Pro serves Mandeville, Covington, Slidell, Hammond, Abita Springs, Lacombe, LA and surrounding areas.";
- } else { // UPHOLSTERY DEFAULT
- echo "
- <h2>Upholstery Cleaning Service</h2>
- Steam Pro can restore your fabric upholstered furniture to look new again, and smell fresh! Do you have an old or dingy looking couch. How about a sofa with a stain? A love seat that someone spilled their dinner on? A car that stinks after it rained or you can't get to stop smelling like your dog? This is what I have been doing for a living since 1987, let me help you. Give me a call or text at <font style=\"color: white\">985-626-5895</font> to talk to me or click here for a free estimate and I will get back to you within 24 hours.
- <br /><br />
- The cleaning process employs a powerful truck-mounted steam extraction service. The cleaning solution is an eco and environmentally friendly product:
- <br /><br />
- .: <font style=\"color: white\">Safe for your family, your pets and your community.</font><br />
- .: <font style=\"color: white\">Services are offered seven days a week</font><br />
- .: <font style=\"color: white\">Emergency flood extraction is available twenty-four hours a day</font><br />
- <br /><br />
- Regular upholstery cleaning will help extend the life of upholstered furniture by maintaining appearance and reducing wear. In most cases, spills need immediate treatment and should be blotted up with a sponge or towel. Follow the cleaning instructions attached to your upholstered furniture.
- <br /><br />
- When selecting a cleaning service, the main factor to consider is the operator's skill and ability. Upholstery cleaning professionals of long standing reputation can usually be relied upon to provide satisfactory service.
- <br />
- <h2>Dry vs. Steam Cleaning on Upholstery</h2>
- Do not use water based cleaning solution on a fabric labeled for dry cleaning only. If you are unsure, rather be safe than sorry. \"Use the professional's dry cleaning only\" type labels will require professional cleaning.
- <br /><br />
- Notwithstanding the cleaning instructions, upholstered furniture should be professionally cleaned periodically to remove soil, keep sanitary, restore freshness, preserve appearance, and protect your investment.
- <br /><br />
- Steam Pro provides upholstery cleaning services for both residential homes and commercial offices. Steam Pro also provides upholstery and carpet cleaning for your car, truck, or boat.
- <br /><br />
- <font style=\"color: white\">Upholstery Cleaning in Mandeville , Madisonville , Covington , Lacombe , Abita Springs , Slidell , Folsom, Hammond, Ponchatoula, and Robert LA.</font>
- ";
- }
- echo "
- </td>
- </tr>
- </table>
- </div>";
- } // end surfaces() ---------------
- function error($page) {
- echo "
- <h2>Sorry! There was a problem with your request..</h2>
- The requested page {$page} does not exist. Please click another link from the navigation bar.
- <br /><br />
- Thanks in advance, <br />
- <b>Administration</b>
- ";
- } // end error() ---------------
- function subHeader($page) {
- global $subpage;
- if ( isset($page) && isset($subpage) ) {
- $pageTitle = "{$page}>{$subpage}";
- } else {
- $pageTitle = $page;
- }
- // <span style=\"height: 48px; display: inline-block; vertical-align: bottom; padding-bottom: 0px; margin-bottom: 0px; margin-top: auto; line-height: auto; font-size: 36px; letter-spacing: 4px; word-spacing: 25px; border: 4px solid #d1d1d1; border-bottom-width: 0px; background-color: #505050\">{$pageTitle}</span>
- echo "
- <div style=\"width: 100%; background-color: #4A4A4A; height: 55px; text-align: center; vertical-align: middle; font-weight: bold; font-size: 36px; font-family: 'Trebuchet MS', Tahoma, Arial; color: white; background-image: url('site_images/tile_h5_light.png'); background-position: bottom; background-repeat: repeat-x; border-bottom: 8px solid #d1d1d1; padding-top: 0px; margin-bottom: 0px\">
- <div align=\"center\" style=\"padding: 0px 8px 0px 0px; text-align: left; background-color: transparent; margin-left: auto; margin-right: auto; width: 65%; min-width: 675px; height: 40px; padding-top: 11px;\">
- <span style=\"height: 100%; display: inline-block; margin: 0px 0px 0px 0px; padding: 0px 30px 0px 24px; background-color: #303030; color: #DDDDDD; border-width: 4px 4px 0px 4px; border-color: #d1d1d1; border-style: solid; border-radius: 10px 10px 0px 0px; vertical-align: bottom; font-size: 36px\">{$pageTitle}</span>
- </div>
- </div>
- <div align=\"center\" style=\"text-align: left; margin-left: auto; margin-right: auto; width: 65%; min-width: 675px\">
- ";
- } // end subHeader() ---------------
- /*
- function testScripts(){
- $svar_name = "test_svar";
- echo "<h2>Initial \${$svar_name} = ".svar("{$svar_name}")."</h2>";
- echo "<h2>New \${$svar_name} = ".svar("{$svar_name}", "NEW SVAR VALUE WOOHOO")."</h2>";
- $array_keys = array_keys($GLOBALS);
- print_r($array_keys);
- echo "<h2>Server Vars</h2>";
- print_r($GLOBALS["_SERVER"]);
- echo "<h2>Request Vars</h2>";
- print_r($GLOBALS["_REQUEST"]);
- echo "<h2>Cookie Vars</h2>";
- print_r($GLOBALS["_COOKIE"]);
- //echo "<h2>Nested GLOBALS Vars</h2>";
- //print_r(array_values($GLOBALS));
- echo "<h2>Foreach Loop</h2>";
- foreach ( $GLOBALS as $key => $val ){
- if ( !is_array($val) ) { echo "<br>__[{$key}] -- {$val}"; }
- else{ echo "<br>__[{$key}] -- {$val}"; }
- }
- //$constructor_test = new constructor_test(true);
- //var_dump($constructor_test);
- //var_dump($constructor_test);
- // $test_global_return = global_var("global_scope");
- //$construct_return = $constructor_test("construct_return input");
- //var_dump($constructor_test);
- //$constructor_test->testFunction($inputTest);
- }
- */
- } // end methods() ----------------------------------------
- if ( $launchDatabase !== "false" ) { $DB = new database(); $DB->connect(); }
- if ( $launchUser !== "false" ) { $user = new user(); }
- if ( $_POST["login"] == "1" && isset($_POST["username"]) ) {
- $user->verify("post", "true");
- } elseif ( isset($_COOKIE["username"]) ) {
- $user->verify("cookie", "false");
- } elseif ( !isset($_POST["login"]) && !isset($_COOKIE["username"]) ) {
- $user->logged_in = false;
- }
- // if ( $_POST["login"] == "1" && isset($_POST["username"]) && isset($_POST["password"]) || isset($_COOKIE["username"]) ) { $user->verify("true"); }
- if ( $launchMethods !== "false" ) { $methods = new methods(); }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement