Advertisement
Guest User

methods.PHP Class (aka object) -> Functions (aka methods)

a guest
Aug 13th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 67.04 KB | None | 0 0
  1. <?php
  2.  
  3. //--------------------------------------//
  4. //              STEAM PRO               //
  5. //              methods.php             //
  6. //--------------------------------------//
  7. //              Ryan Perkins            //
  8. //      rypedesigns.com 2016 (c)        //
  9. //--------------------------------------//
  10.  
  11.  
  12. class database {
  13.  
  14.     function connect()
  15.         {
  16.        
  17.         if  ( $_SERVER["REMOTE_ADDR"] == "127.0.0.1" ) 
  18.             //{ $domain = "localhost"; } else { $domain = "mysql.rypedesigns.com"; }
  19.  
  20.                 $dbuser = "steampro_rype";
  21.                 $dbpass = "password";
  22.                 $dbname = "steampro_site";
  23.                 $dbhost = "steampros.net";
  24.  
  25.        
  26.         $this->id = mysql_connect($dbhost, 'steampro_rype', $dbpass) or die("<br />Failed onConnect(DB); printing report..<br />" . mysql_error());
  27.         mysql_select_db($dbname, $this->id) or die ("<br />Failed onSelect('{$dbname}'); printing report..<br />" . mysql_error());
  28.         return $this->id;
  29.        
  30.         } // end connect()
  31.  
  32.     function query($query_input, $results = false, $result_name = false)
  33.         {
  34.            
  35.             global $DB;
  36.            
  37.             if  ( $this->qcount == 0 || $this->qcount == false || $this->qcount == NULL ){
  38.                
  39.                 $this->qcount = 1;
  40.                
  41.                 } else {
  42.                
  43.                 ++$this->qcount;
  44.                
  45.                 }
  46.                
  47.             $result = @mysql_query($query_input, $this->id);
  48.            
  49.            
  50.             if  ( $result !== false && $result !== NULL ){
  51.                
  52.                 $this->error = NULL;
  53.                 $this->last_query = $query_input;
  54.                 $this->bool = true;
  55.                
  56.                 if  ( !isset($result_name) || $result_name == false ){
  57.                       $this->result = $result;
  58.                     }
  59.                
  60.                 else{ $this->$result_name = $result; }
  61.                
  62.                 if  ( $results == true || $results == "1" ){    $result_count = 0;
  63.                    
  64.                     $this->count_query = preg_replace('/LIMIT(\s*)(\d*\s*,)?(\s*)(\d*)/', '', $query_input);
  65.                     $count_result = @mysql_query($this->count_query, $this->id);
  66.                    
  67.                     while   ( $row = mysql_fetch_row($count_result) )
  68.                             { $result_count++; }
  69.                            
  70.                     $this->results = $result_count;
  71.                     return $result;
  72.                            
  73.                     } else {
  74.                        
  75.                     return true;
  76.                    
  77.                     }
  78.                    
  79.                 } else {
  80.                    
  81.                 $this->error = mysql_error();
  82.                 $this->last_query = $query_input;
  83.                 $this->bool = false;
  84.                 $this->result = false;
  85.                
  86.                  return false;
  87.            
  88.                 }
  89.                
  90.         } // end query
  91.  
  92.  
  93. } // end DB
  94.  
  95.  
  96.  
  97.  
  98. class user {
  99. /*
  100.     function login($page){
  101.        
  102.         global $DB, $subpage;
  103.        
  104.         if  ( isset($_POST["username"]) && isset($_POST["password"]) ) {
  105.            
  106.             $username   =   $_POST["username"];
  107.             $password   =   md5($_POST["password"]);
  108.  
  109.             $query = "SELECT * FROM `users` WHERE `username` = '{$username}' AND `password` = '{$password}' LIMIT 1";
  110.             $DB->query($query);
  111.            
  112.             $row = mysql_fetch_array($DB->result, MYSQL_ASSOC);
  113.             if  ( isset($row) && $DB->error == NULL ) {    
  114.                
  115.                
  116.                 setcookie("id", $row["id"]);
  117.                 setcookie("username", $_POST["username"]);
  118.                 setcookie("password", $password);
  119.                
  120.                 $this->logged_in    = true;
  121.                 $this->uid              = $row["id"];
  122.                 $this->username = $_POST["username"];
  123.                 $this->password = $password;
  124.                 $this->admin        = $row["admin"];
  125.                
  126.                 } else {
  127.                
  128.                 setcookie("id", NULL);
  129.                 setcookie("username", NULL);
  130.                 setcookie("password", NULL);
  131.                
  132.                 $this->logged_in    = false;
  133.                 $this->uid              = NULL;
  134.                 $this->username = NULL;
  135.                 $this->password = NULL;            
  136.                 $this->admin        = false;
  137.                    
  138.                 }
  139.        
  140.             }
  141.        
  142.         }       //  end login()         ----------
  143.  
  144. */
  145.  
  146.     function verify($source, $setcookies) {
  147.    
  148.     global $DB;
  149.    
  150.     if  ( $source == "post" || $_POST["login"] == "1" ) {
  151.        
  152.         $username   = $_POST["username"];
  153.         $password   = md5($_POST["password"]);
  154.        
  155.         } elseif ( $source == "cookie" || isset($_COOKIE["username"]) ) {
  156.            
  157.         $username   = $_COOKIE["username"];
  158.         $password   = $_COOKIE["password"];
  159.        
  160.         }
  161.        
  162.     $query          = "SELECT * FROM `users` WHERE `username` = '{$username}' AND `password` = '{$password}' LIMIT 1";
  163.    
  164.     $DB->query($query);
  165.    
  166.     $row = mysql_fetch_array($DB->result, MYSQL_ASSOC);
  167.  
  168.             if  ( isset($row) && $DB->error == NULL ) {    
  169.            
  170.                 $this->logged_in    = true;
  171.                 $this->uid              = $row["id"];
  172.                 $this->username = $row["username"];
  173.                 $this->password = $row["password"];
  174.                 $this->admin        = $row["admin"];
  175.                
  176.                 if  ( $setcookies == "true" ) {
  177.  
  178.                     setcookie("id", $row["id"]);
  179.                     setcookie("username", $row["username"]);
  180.                     setcookie("password", $row["password"]);
  181.                     setcookie("time", time());
  182.                    
  183.                     }  
  184.  
  185.                 } else {
  186.                
  187.                 $this->logged_in    = false;
  188.                 $this->uid              = NULL;
  189.                 $this->username = NULL;
  190.                 $this->password = NULL;            
  191.                 $this->admin        = false;
  192.                
  193.                 if  ( $setcookies == "true" ) {
  194.                    
  195.                     unset($_COOKIE["id"]);
  196.                     unset($_COOKIE["username"]);
  197.                     unset($_COOKIE["password"]);
  198.                     unset($_COOKIE["time"]);
  199.                    
  200.                     }                  
  201.            
  202.             }
  203.                                             //  echo "COOKIES:"; print_r($_COOKIE); echo "<br /><br /><br />";
  204.     }       //      end verify()            ----------
  205.    
  206. }   //      end user() class    ---------------
  207.  
  208.  
  209.  
  210. class methods {
  211.  
  212.  
  213.     function administration($page) {
  214.    
  215.         global $DB, $user, $subpage;
  216.        
  217.         // $this->subHeader($page);
  218.        
  219.         if      ( isset($_POST["nid"]) ) { $nid = $_POST["nid"]; }
  220.         elseif  ( isset($_GET["nid"]) )  { $nid = $_GET["nid"]; }
  221.        
  222.         // print_r($_POST);
  223.         // echo $_COOKIE["username"] . " ==> username(cookie)<br /><br /> " . $_COOKIE["password"] . " ==> password <br /><br />";
  224.        
  225.        
  226.         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."; }
  227.        
  228.         //  CHECK LOGGED IN     ---------------
  229.        
  230.         if  ( $user->logged_in == true && $user->admin == "1" ) {          
  231.  
  232.  
  233.                 //  CHECK NEWS SUBMITTED        ---------------
  234.             if  ( $_POST["submit_news"] == "1" && isset($_POST["title"]) && isset($_POST["body"]) ) {
  235.                
  236.                 $title  = addslashes($_POST["title"]);
  237.                 $body   = addslashes($_POST["body"]);
  238.                 $time   = time();
  239.                 $action = $_POST["action"];
  240.                 $nid    = $_POST["nid"];
  241.                 $delete = $_POST["delete"];
  242.                
  243.                 if  ( isset($user->username) && isset($user->uid) ) {  
  244.                            
  245.                     if ( $subpage == "create" || $action == "insert" ) {
  246.                                 $query = "INSERT INTO `newsEntries` ( `uid`, `username`, `title`, `body`, `time` )  VALUES ('{$user->uid}', '{$user->username}', '{$title}', '{$body}', '{$time}')";
  247.                                 $DB->query($query);
  248.                                
  249.                                 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."; }
  250.                                            
  251.                     } elseif( $subpage == "edit" && $delete == "1" && isset($nid) ) {
  252.                             $query = "DELETE FROM `newsEntries` WHERE `id` = '{$nid}' limit 1";
  253.                             $DB->query($query);
  254.                            
  255.                             if  ( $DB->error == NULL ) {   
  256.                                 echo "<h2>Successfully Deleted!</h2>The news post you requested ('<b>{$title}</b>') has been successfuly removed from the database.";   }
  257.                        
  258. //                      } elseif ( $subpage == "create" || $action == "insert" ) {
  259. //                          $query = "INSERT INTO `newsEntries` ( `uid`, `username`, `title`, `body`, `time` )  VALUES ('{$user->uid}', '{$user->username}', '{$title}', '{$body}', '{$time}')";
  260. //                          $DB->query($query);
  261. //                         
  262. //                          if  ( $DB->error == NULL ) {
  263. //                                  echo "<h2>News Entry Added!</h2>Your news post named '<b>{$title}</b>' has been successfully added to the News database."; }
  264.                        
  265.                         } elseif ( $subpage == "edit" && $action == "update" && is_numeric($nid) ) {
  266.                             $query = "UPDATE `newsEntries` SET `title` = '{$title}', `body` = '{$body}' WHERE `id` = '{$nid}' LIMIT 1";
  267.                             $DB->query($query);
  268.                            
  269.                             if  ( $DB->error == NULL ) {
  270.                                     echo "<h2>News Entry Updated!</h2>Your news post named '<b>{$title}</b>' has been successfully updated."; }
  271.                         } else {
  272.                             echo "<h2>Sorry..</h2>There was a problem with your request. Please hit the back button and try again.";   
  273.                         }
  274.                    
  275.                         //  ECHO QUERY TROUBLESHOOTING  ---------------
  276.                     echo "<!-- {$query} -->";
  277.                    
  278.                     } else { echo "username or uid is not set. user :: "; print_r($user); }
  279.                
  280.                
  281.                     //  CHECK NEWS EDIT VARS        ---------------
  282.                 } elseif ( isset($subpage) && $subpage == "edit" ) {
  283.                
  284.                 $query  = "SELECT * FROM `newsEntries` WHERE `id` = '{$nid}' LIMIT 1";
  285.                 $DB->query($query);
  286.                
  287.                 $row    = mysql_fetch_array($DB->result, MYSQL_ASSOC);
  288.                
  289.                 if  ( $DB->error !== NULL ) { echo $DB->error; return; }
  290.                
  291.                 $title  = $row["title"];
  292.                 $body   = $row["body"];
  293.                
  294.                 echo "
  295.  
  296.                 <h2>Edit News Entry</h2>
  297.  
  298.                 <form action=\"". $PHP_SELF ."?page=administration&subpage=edit\" method=\"post\">
  299.  
  300.                     <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\">
  301.                    
  302.                     <tr>
  303.                         <td colspan=\"2\" valign=\"top\" style=\"height: auto; padding-bottom: 6px; color: #93804f\">
  304.                        
  305.                             News Title<br />
  306.                             <input type=\"text\" name=\"title\" value=\"{$title}\" size=\"64\" style=\"width: 100%; min-width: 400px\">
  307.                            
  308.                             <br />
  309.                            
  310.                             News Body <br />
  311.                             <textarea name=\"body\" style=\"width: 100%; min-width: 400px\" rows=\"8\">{$body}</textarea>
  312.    
  313.                         </td>
  314.                     </tr>
  315.    
  316.    
  317.                     <tr>
  318.                         <td style=\"width: 100px; color: #93804f; white-space: nowrap; vertical-align: top; text-align: center; padding-top: 0px\" valign=\"top\" nowrap>
  319.    
  320.                            
  321.                             <span style=\"display: inline-block; background-color: #AA0A0A; border: 2px solid white; padding: 2px 10px 2px 10px; width: auto; border-radius: 4px\">
  322.                            
  323.                             <font style=\"color: white\">Delete?</font> <input type=\"checkbox\" name=\"delete\" value=\"1\" onClick=\"confirm('Really delete this post?')\">
  324.                                
  325.                             </span>
  326.                        
  327.                         </td>
  328.                        
  329.                         <td valign=\"top\" style=\"padding: 0px 2px 0px 10px; vertical-align: top; text-align: right\" nowrap>
  330.  
  331.                         <input type=\"hidden\" name=\"submit_news\" value=\"1\">
  332.                         <input type=\"hidden\" name=\"action\" value=\"update\">
  333.                         <input type=\"hidden\" name=\"nid\" value=\"{$nid}\">
  334.                        
  335.                         <input type=\"submit\" value=\"Edit News Entry\" style=\"width: 100%; text-align: center; margin-top: 0px\">
  336.                        
  337.                         </td>
  338.                     </tr>
  339.                    
  340.                     </table>
  341.  
  342.  
  343.                     </form>
  344.                    
  345.                     ";         
  346.                
  347.                 } elseif ( isset($subpage) && $subpage == "inbox" ) {
  348.                
  349.                     echo "<h2>Customer Inbox [admin only]</h2>";
  350.                    
  351.                     if  ( is_numeric($_GET["id"]) )     { $id = $_GET["id"]; }
  352.                     $id = $_GET["id"];
  353.                    
  354.                     $query  = "SELECT * FROM `customerMessages` WHERE `id` = '{$id}' LIMIT 1";
  355.                     $DB->query($query);
  356.                    
  357.                     $row    = mysql_fetch_array($DB->result, MYSQL_ASSOC);
  358.                    
  359.                     foreach ( $row as $key => $value ) {
  360.                    
  361.                     if  ( $key == "time" ) { $value = date('m.d.y @ h:i A', $row["time"]); }
  362.                     echo "<font style=\"color: white; font-weight: bold\">{$key}</font> => <font style=\"color: #4090D0\">{$value}</font> <br />";
  363.                        
  364.                     }
  365.                    
  366.                     //  ELSE ECHO NEWS ENTRY        ---------------
  367.                 } else {
  368.                
  369.                 echo "
  370.  
  371.                     <h2>Create News Entry</h2>
  372.                    
  373.                     <div style=\"width: 70%; min-width: 600px; margin-left: auto; margin-right: auto\">
  374.                    
  375.                     <form action=\"".$PHP_SELF."?page=administration&subpage=create\" method=\"post\">
  376.                        
  377.                         News Title<br />
  378.                         <input type=\"text\" name=\"title\" size=\"64\" style=\"width: 100%; min-width: 400px\">
  379.                        
  380.                         <br />
  381.                        
  382.                         News Body <br />
  383.                         <textarea name=\"body\" style=\"width: 100%; min-width: 400px\" rows=\"8\"></textarea>
  384.                        
  385.                         <br />
  386.  
  387.                         <input type=\"hidden\" name=\"submit_news\" value=\"1\">
  388.                         <input type=\"hidden\" name=\"action\" value=\"insert\">
  389.                        
  390.                         <div style=\"width: 100%; margin: 0px auto 0px auto; text-align: center\">
  391.                         <input type=\"submit\" value=\"Create News Entry\" style=\"width: 100%; text-align: center; margin-left: auto; margin-right: auto\">
  392.                         </div>
  393.                         <input type=\"hidden\" name=\"submit_news\" value=\"1\">
  394.                         <input type=\"hidden\" name=\"action\" value=\"insert\">
  395.                        
  396.                     </form>
  397.                    
  398.                     </div>
  399.                
  400.                 ";
  401.                
  402.                 }
  403.  
  404.            
  405.             echo "<hr class=\"gold\">";
  406.            
  407.             //  RECENT CUSTOMER MESSAGES    ---------------
  408.             echo "<h2>Steam Pros Inbox</h2>
  409.             <div align=\"center\" style=\"width: 85%; text-align: left; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px\">
  410.             ";
  411.            
  412.             $i = 1;
  413.             $query = "SELECT * FROM `customerMessages` ORDER BY `id` DESC LIMIT 15";
  414.             $DB->query($query);
  415.            
  416.             while   ( $row = mysql_fetch_array($DB->result, MYSQL_ASSOC) ) {
  417.                    
  418.                    
  419.                     if  ( !isset($row["title"]) || $row["title"] == NULL ) { $row["title"] = "Unnamed News Entry"; }
  420.                     $date = date('m.d.y @ h:i A', $row["time"]);   
  421.                     echo "
  422.                     ".$row['id']."] &nbsp; <b><a href=\"?page=administration&subpage=inbox&id=".$row['id']."\">".$row['subject']."</a></b> &nbsp;&nbsp; <span style=\"color: #CCCCCC\">".htmlspecialchars( substr($row['body'],0,64) )."..</span>  &nbsp;&nbsp; <font style=\"color: #4090D0\">by <b>".substr($row['name'],0,16)."</b></font> <font style=\"color: #AAAAAA\"> &nbsp;&nbsp; on ".substr($date,0,8)."</font>
  423.                     <br />
  424.                     ";
  425.                     ++$i;
  426.                
  427.                     }          
  428.            
  429.             echo "</div>";
  430.  
  431.  
  432.             //  EDIT NEWS ENTRIES   ---------------
  433.             echo "<h2>Edit News Entries</h2>
  434.             <div align=\"center\" style=\"width: 85%; text-align: left; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px\">
  435.             ";
  436.            
  437.             $i = 1;
  438.             $query = "SELECT * FROM `newsEntries` ORDER BY `id` ASC LIMIT 10";
  439.             $DB->query($query);
  440.            
  441.             while   ( $row = mysql_fetch_array($DB->result, MYSQL_ASSOC) ) {
  442.                    
  443.                    
  444.                     if  ( !isset($row["title"]) || $row["title"] == NULL ) { $row["title"] = "Unnamed News Entry"; }
  445.                     $date = date('m.d.y @ h:i A', $row["time"]);   
  446.                     echo "
  447.                     ".$row['id']."] &nbsp; <b><a href=\"?page=administration&subpage=edit&nid=".$row['id']."\">".$row['title']."</a></b> &nbsp;&nbsp; <span style=\"color: #CCCCCC\">".htmlspecialchars( substr($row['body'],0,64) )."..</span>  &nbsp;&nbsp; <font style=\"color: #4090D0\">by <b>".substr($row['username'],0,5)."</b></font> <font style=\"color: #AAAAAA\"> &nbsp;&nbsp; on ".substr($date,0,8)."</font>
  448.                     <br />
  449.                     ";
  450.                     ++$i;
  451.                
  452.                     }          
  453.            
  454.             echo "</div>";         
  455.            
  456.  
  457.            
  458.  
  459.             echo "<hr class=\"gold\">
  460.            
  461.             <h2>Troubleshooting Data</h2>
  462.             USER ARRAY:";
  463.             print_r($user);
  464.             echo "<br /><br />COOKIE ARRAY:";
  465.             print_r($_COOKIE);
  466.             echo "<br /><br />username> ". $user->username."<br />password> ".$user->password."<br />uid> ".$user->uid." <br />";
  467.            
  468.             } else {
  469.            
  470.             echo "<h2>Administrator Login</h2>
  471.            
  472.                 <form action=\"".$PHP_SELF."?page=administration\" method=\"post\">
  473.                
  474.                     Username    <br />
  475.                     <input type=\"text\" maxlength=\"32\" size=\"32\" name=\"username\"><br />
  476.            
  477.                     Password    <br />
  478.                     <input type=\"password\" maxlength=\"32\" size=\"32\" name=\"password\"><br />
  479.                    
  480.                     <br />
  481.                    
  482.                     <input type=\"submit\" value=\"Login!\">
  483.                    
  484.                     <br />
  485.                     <input type=\"hidden\" name=\"login\" value=\"1\">
  486.                    
  487.                 </form>
  488.        
  489.                 ";
  490.            
  491.             }
  492.        
  493.         echo "<br /><br />
  494.         <h4 style=\"text-align: center\">logged in as: {$user->username}</h4>";
  495.        
  496.     }
  497.  
  498.  
  499.  
  500.     function news($page)
  501.         {
  502.  
  503.             global $DB, $user, $subpage, $wrapper;
  504.                    
  505.             $background_image_number = rand(1, 2);
  506.  
  507.             echo "
  508.                 <!-- <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> -->
  509.                
  510.                 <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;\">
  511.            
  512.                 <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%\">
  513.                
  514.                     <span style=\"vertical-align: -390px; line-height: auto; letter-spacing: 2px; word-spacing: 2px; margin: 0px 0px 0px 0px;\">&nbsp;</span>
  515.                    
  516.                 </div>
  517.            
  518.             </div>
  519.            
  520.             <div align=\"center\">
  521.                 <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>
  522.             </div>
  523.            
  524.             <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']."\">
  525.            
  526.            
  527.            
  528.             ";
  529.            
  530.                 //  SETUP VARS FOR PAGE NUMBER URL FUNCTION
  531.                
  532.             if  ( !isset($_GET["results"]) || $_GET["results"] == "" ) { $result_limit = 4; } else { $result_limit = $_GET["results"]; }
  533.             //  if  ( isset($_GET["results"]) && is_numeric($_GET["results"]) ) { $result_limit = $_GET["results"]; } else { $result_limit = 3; }
  534.            
  535.             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 . ", "; }
  536.             if  ( $result_start == 0 || !isset($result_start) || $result_start < 0 ) { $result_start = 0; }
  537.  
  538.             $page_urls = pageNumber_urls('id', 'newsEntries', $result_limit);
  539.            
  540.                 //  SETUP FOR QUERY WHILE MYSQL_FETCH_ARRAY LOOP
  541.            
  542.             $result_selected = $result_start;
  543.             $result_selected++;
  544.             $i = 1;
  545.            
  546.             $query = "SELECT * FROM `newsEntries` ORDER BY `id` DESC LIMIT {$result_start_string} {$result_limit}";
  547.             $DB->query($query);
  548.            
  549.             while   ( $row = mysql_fetch_array($DB->result, MYSQL_ASSOC) ) {
  550.                    
  551.                     $date = date('m.d.y @ h:i A', $row["time"]);   
  552.                     echo "
  553.                     <h2 style=\"font-size: 20px\"><!-- row `id` = ".$row['id']." -->{$result_selected}] &nbsp; <b>".$row['title']."</b> &nbsp; <!-- <font style=\"color: #4090D0\">by <b>".$row['username']."</b></font> &nbsp;&nbsp; --><font style=\"color: #AAAAAA; font-size: 20px\"> on ".$date."</font></h2>
  554.                     <p>".$row['body']."</p>
  555.                     ";
  556.                     ++$i;   $result_selected++;
  557.                
  558.                     }
  559.  
  560.  
  561.             echo "
  562.            
  563.                 </div>
  564.            
  565.                 <div style=\"width: 100%; text-align: center; color: #d1d1d1; font-size: 18px\">
  566.                
  567.                 <b>Page List &nbsp;[ {$page_urls} ]</b>
  568.                
  569.                 </div>
  570.            
  571.             <hr style=\"background-color: #707070; height: 1px; border: none; width: 50%; margin-top: 16px; margin-bottom: 16px\">
  572.            
  573.             <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>
  574.            
  575.             ";
  576.        
  577.            
  578.         }   //  end news()      ---------------
  579.  
  580.  
  581.  
  582.  
  583.     function contact($page)
  584.         {
  585.  
  586.             global $DB, $user, $subpage, $wrapper;
  587.            
  588.             // $this->subHeader($page);
  589.  
  590.                 // CHECK USER SENT MESSAGE FORM
  591.             if  ( $_POST["submit_message"] == "1" ) {
  592.                
  593.                 $slashed_POST = addslashes_array($_POST);
  594.                 $time = time();
  595.                 $ip = $_SERVER['REMOTE_ADDR']; 
  596.                
  597.                 $query = "
  598.                 INSERT INTO `customerMessages`
  599.                         ( `name`, `number`, `email`, `subject`, `body`, `time`  )
  600.                 VALUES  ( '".$slashed_POST['name']."', '".$slashed_POST['number']."', '".$slashed_POST['email']."', '".$slashed_POST['subject']."', '".$slashed_POST['body']."', '{$time}' )";             
  601.                 $DB->query($query);
  602.                
  603.                 if  ( $DB->error == NULL ) {
  604.                    
  605.                     if  ( isset($slashed_POST["name"]) ) { $name = ", " .$slashed_POST["name"]; }
  606.  
  607.                         // EMAIL VARS AND LOOP      ---------------
  608.                     $query  = "SELECT * FROM `customerMessages` WHERE `subject` = '".$slashed_POST['subject']."' AND `name` = '".$slashed_POST['name']."' LIMIT 1";
  609.                     $DB->query($query);
  610.                     $sql_row    = mysql_fetch_array($DB->result, MYSQL_ASSOC);
  611.                     $msg_id         = $sql_row["id"];
  612.                    
  613.                     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.";
  614.                
  615.                     $email1 = "alexleocarollo@gmail.com";
  616.                     $email2 = "rypedesigns@gmail.com";
  617.                     $subject = $slashed_POST["subject"];
  618.                     $message = "MESSAGE FROM " . $slashed_POST["name"] . "\n
  619.                     ";
  620.                    
  621.                     foreach ( $slashed_POST as $key => $value ) {
  622.                        
  623.                         $message .= "\n
  624. {$key} => {$value}";    // if   ( $key == "time" ) { $value = date('m.d.y @ h:i A', $row["time"]); }
  625.                     }
  626.                
  627.                 $message .= "\n
  628. link => http://steampros.net/index.php?page=administration&subpage=inbox&id=" . $msg_id;
  629.                    
  630.                     // SEND MESSAGE AS EMAILS
  631.                 email($email1,$subject,$message);
  632.                 email($email2,$subject,$message);
  633.                 email('3603284545@vtext.com',$slashed_POST['number'],"
  634.                 http://steampros.net/?page=administration&subpage=inbox&id=" . $msg_id . "\n
  635. " . $slashed_POST['body']);
  636.                 email('9852649068@txt.att.net',$slashed_POST['number'],"
  637.                 http://steampros.net/?page=administration&subpage=inbox&id=" . $msg_id . "\n
  638. " . $slashed_POST['body']);
  639.                    
  640.                 } else {
  641.                
  642.                     echo "<h2>Sorry! There was a problem with your request..</h2>Printing form variables for troubleshooting: .. <br />"; print_r($_POST);
  643.                    
  644.                 }   // END SQL ERROR MESSAGE
  645.                
  646.                
  647.                    
  648.                 } else {    // IF MESSAGE FORM NOT SUBMITTED ..
  649.    
  650.                 echo "
  651.                        
  652.                 <h2>Contact Steam Pro</h2>
  653.                
  654.                 <div align=\"center\" style=\"width: 100%; min-width: ".$wrapper['min_width']."\">
  655.    
  656.                 <form action=\"?page=contact\" method=\"post\">
  657.                
  658.                 <input type=\"hidden\" name=\"submit_message\" value=\"1\">
  659.                
  660.                 <b>
  661.                
  662.                 <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%\">
  663.    
  664.                 <tr>
  665.                     <td style=\"width: 50%; text-align: right\">
  666.                
  667.                     Your Name: ** <br>
  668.                     <input name=\"name\" type=\"text\" maxlength=\"48\" size=\"24\" style=\"text-align: right; width: 100%\"><br>
  669.                    
  670.                     </td>
  671.                     <td style=\"width: 50%; text-align: left\">
  672.  
  673.                     Message Subject: ** <br>
  674.                     <input name=\"subject\" type=\"text\" maxlength=\"96\" size=\"24\" style=\"width: 100%\"><br>  
  675.        
  676.                     </td>
  677.                  </tr>
  678.                  
  679.                  <tr>
  680.                     <td style=\"width: 50; text-align: right\">
  681.    
  682.                     E-mail address: <br>
  683.                     <input name=\"email\" type=\"text\" maxlength=\"64\" size=\"24\" style=\"text-align: right; width: 100%\"><br>
  684.                    
  685.                     </td>
  686.                     <td style=\"width: 50; text-align: left\">
  687.                
  688.                     Phone Number: (not required)<br>
  689.                     <input name=\"number\" type=\"text\" maxlength=\"16\" size=\"24\" style=\"width: 100%\"><br>           
  690.                
  691.                     </td>
  692.                 </tr>
  693.    
  694.    
  695.                 <tr>
  696.                     <td colspan=\"2\" style=\"width: 100%\">
  697.                    
  698.                     Message to Steam Pro: ** <br>      
  699.                     <textarea name=\"body\" rows=\"6\" style=\"width: 100%\"></textarea><br>
  700.                
  701.                     </td>
  702.                 </tr>
  703.                
  704.                
  705.                 <tr>
  706.                     <td colspan=\"2\" style=\"width: 100%; text-align: center\">
  707.                    
  708.                     <input type=\"submit\" value=\"Send Message!\" style=\"width: 100%; text-align: center\">
  709.                    
  710.                     <br /><br />
  711.                    
  712.                     </td>
  713.                 </tr>
  714.                
  715.                 </table>
  716.        
  717.                 </b>
  718.                
  719.                 </form>
  720.                
  721.                 <br /><br /><br />
  722.                
  723.                 </div>
  724.                
  725.                 ";
  726.            
  727.             }
  728.            
  729.             echo "
  730.            
  731.             <h2 style=\"margin-bottom: 0px\">Contact & Location Information</h2>           
  732.            
  733.             <br />
  734.            
  735.             <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\">
  736.                 <tr>
  737.                     <td valign=\"top\" style=\"width: 33%; font-weight: normal; color: #dbc88f; padding-top: 24px; padding-right: 12px; text-align: right;\">
  738.                        
  739.                         <font style=\"color: white; font-weight: bold\">Steam Pro </font><br />
  740.                         Wes Carollo <br />
  741.                         <br />
  742.                         <font style=\"color: white; font-weight: bold\">Address: </font><br />
  743.                         2231 Labarre St. <br />
  744.                         Mandeville, LA <br />
  745.                         St. Tammany Parish <br />
  746.                         70448 <br />
  747.                         <br />
  748.                         <font style=\"color: white; font-weight: bold\">LAN Phone</font><br />  985-626-5895 <br />
  749.                         <font style=\"color: white; font-weight: bold\">Cell Phone</font><br />     985-626-5895 <br />
  750.  
  751.                     </td>
  752.  
  753.                     <td valign=\"top\" style=\"width: 33%; color: #dbc88f  font-weight: normal; text-align: left; padding-top: 0px\">
  754.  
  755.                         <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\">
  756.                         <h2 style=\"margin-bottom: 0px; margin-top: 0px; font-size: 20px; border-bottom: 0px\">Mandeville Steam Pro</h2>
  757.                            
  758.                             <div style=\"padding: 2%; padding-top: 0px; margin-top: 0px; margin-bottom: 0px; padding-top: 4px; padding-bottom: 4px; text-align: center\">  
  759.                            
  760.                             <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\">
  761.                            
  762.                             <address style=\"margin-bottom: 0px;\"><b>
  763.                                 <span>2231 Labarre St</span><br/>
  764.                                 <span>Mandeville</span>,&nbsp;
  765.                                 <span>LA</span><br/>
  766.                                 <span>70448</span>
  767.                             </b></address>
  768.                            
  769.                             </div>
  770.                         </div>
  771.                    
  772.                     </td>
  773.                    
  774.                     <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\">
  775.                    
  776.                         <font style=\"color: white; font-weight: bold\">Site</font><br /> <a href=\"http://steampros.net/\">SteamPros.net</a> <br />
  777.                         <br />
  778.                         <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!
  779.                        
  780.                         <br /><br />
  781.                        
  782.                     </td>
  783.                 </tr>
  784.             </table>
  785.  
  786.             <h2>Business Card</h2>
  787.                
  788.             <div align=\"center\" style=\"width: 100%; text-align: center; min-width: 600px\">
  789.                
  790.                 <img src=\"site_images/business_card.png\" style=\"border: 2px solid #BBBBBB;\" />
  791.                
  792.             </div>
  793.            
  794.             ";
  795.            
  796.         }   //  end contact()   ---------------
  797.  
  798.  
  799.  
  800.  
  801.     function pricing($page)
  802.         {
  803.  
  804.             global $subpage, $wrapper;
  805.            
  806.             // $this->subHeader($page);
  807.        
  808.             echo "
  809.  
  810.             <h2>Price Calculator [estimate]</h2>
  811.            
  812.             <div style=\"width: 100%; text-align:left; font-size: 14px; padding-left: 32px; padding-right: 16px\">
  813.            
  814.             <form action=\"index.php?page=pricing&subact=calculate\" method=\"post\">
  815.            
  816.             <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>
  817.            
  818.             <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%\">
  819.                
  820.                 <tr>
  821.                     <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>
  822.                 </tr>
  823.            
  824.                 <tr>
  825.                     <td style=\"text-align: right;width: 30%;\">$35 per Room</td>
  826.                     <td style=\"text-align: left; width: auto;\">
  827.                    
  828.                     <select name=\"carpet_rooms\" id=\"carpet1\" onchange=\"calculateCarpet(this.value)\">
  829.                         <option value=\"0\">0 = $0</option>
  830.                         <option value=\"35\">1 = $35</option>
  831.                         <option value=\"70\">2 = $70</option>
  832.                         <option value=\"105\">3 = $105</option>
  833.                         <option value=\"140\">4 = $140</option>
  834.                         <option value=\"175\">5 = $175</option>
  835.                         <option value=\"210\">6 = $210</option>
  836.                     </select>
  837.                    
  838.                     <!-- <input type=\"text\" name=\"reg_rooms\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
  839.                    
  840.                     </td>
  841.                
  842.                     <td style=\"text-align: right; width: 30%; border-left: 1px solid #FFE082;\">$150 per Kitchen/Utility Room</td>
  843.                     <td style=\"text-align: left; width: auto; border-right: 1px solid #FFE082;\">
  844.                    
  845.                     <select name=\"tile_kitchens\" id=\"tile1\" onchange=\"calculateTile(this.value)\">
  846.                         <option value=\"0\">0 = $0</option>
  847.                         <option value=\"150\">1 = $150</option>
  848.                         <option value=\"300\">2 = $300</option>
  849.                         <option value=\"450\">3 = $450</option>
  850.                         <option value=\"600\">4 = $600</option>
  851.                         <option value=\"750\">5 = $750</option>
  852.                     </select>
  853.                    
  854.                     <!-- <input type=\"text\" name=\"kitchen_utility\" value=\"0\" maxlength=\"1\" size=\"1\"> -->
  855.                    
  856.                     </td>                    
  857.  
  858.                     <td style=\"text-align: left;width: 30%;\">$75 per 2-Cusion Sofa</td>
  859.                     <td style=\"text-align: left; width: auto;\">
  860.                    
  861.                     <select name=\"upholstery_sofa_2\" id=\"upholstery1\" onchange=\"calculateUpholstery(this.value)\">
  862.                         <option value=\"0\">0 = $0</option>
  863.                         <option value=\"75\">1 = $75</option>
  864.                         <option value=\"150\">2 = $150</option>
  865.                         <option value=\"225\">3 = $225</option>
  866.                         <option value=\"300\">4 = $300</option>
  867.                         <option value=\"375\">5 = $375</option>
  868.                     </select>
  869.                    
  870.                     <!-- <input type=\"text\" name=\"two_cusion_sofa\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
  871.                    
  872.                     </td>  
  873.  
  874.                </tr>
  875.                
  876.                 <tr>   
  877.                     <td style=\"text-align: right;width: 30%;\">$50 per Stairset</td>
  878.                     <td style=\"text-align: left; width: auto;\">
  879.  
  880.                     <select name=\"carpet_stairs\" id=\"carpet2\" onchange=\"calculateCarpet(this.value)\">
  881.                         <option value=\"0\">0 = $0</option>
  882.                         <option value=\"50\">1 = $50</option>
  883.                         <option value=\"100\">2 = $100</option>
  884.                         <option value=\"150\">3 = $150</option>
  885.                         <option value=\"200\">4 = $200</option>
  886.                         <option value=\"250\">5 = $250</option>
  887.                     </select>
  888.                    
  889.                     <!-- <input type=\"text\" name=\"stairsets\" value=\"0\" maxlength=\"1\" size=\"2\"> -->
  890.                    
  891.                     </td>
  892.                    
  893.                     <td style=\"text-align: right; width: 30%; border-left: 1px solid #FFE082;\">$35 per Bathroom</td>
  894.                     <td style=\"text-align: left; width: auto; border-right: 1px solid #FFE082;\">
  895.                    
  896.                     <select name=\"tile_bathroom\" id=\"tile2\" onchange=\"calculateTile(this.value)\">
  897.                         <option value=\"0\">0 = $0</option>
  898.                         <option value=\"35\">1 = $35</option>
  899.                         <option value=\"70\">2 = $70</option>
  900.                         <option value=\"105\">3 = $105</option>
  901.                         <option value=\"140\">4 = $140</option>
  902.                         <option value=\"175\">5 = $175</option>
  903.                     </select>
  904.                    
  905.                     <!-- <input type=\"text\" name=\"bathroom\" value=\"0\" maxlength=\"1\" size=\"1\"> -->
  906.                    
  907.                     </td>  
  908.  
  909.                     <td style=\"text-align: left;width: 30%;\">$100 per 3-Cushion Sofa</td>
  910.                     <td style=\"text-align: left; width: auto;\">
  911.                    
  912.                     <select name=\"upholstery_sofa_3\" id=\"upholstery2\" onchange=\"calculateUpholstery(this.value)\">
  913.                         <option value=\"0\">0 = $0</option>
  914.                         <option value=\"100\">1 = $100</option>
  915.                         <option value=\"200\">2 = $200</option>
  916.                         <option value=\"300\">3 = $300</option>
  917.                         <option value=\"400\">4 = $400</option>
  918.                         <option value=\"500\">5 = $500</option>
  919.                     </select>
  920.                    
  921.                     <!-- <input type=\"text\" name=\"three_cusion_sofa\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
  922.                    
  923.                     </td>
  924.  
  925.                 </tr>
  926.                
  927.                 <tr>
  928.                     <td style=\"text-align: right;width: 30%;\">$70 per Living Room</td>
  929.                     <td style=\"text-align: left; width: auto;\">
  930.                    
  931.                     <select name=\"carpet_living_rooms\" id=\"carpet3\" onchange=\"calculateCarpet(this.value)\">
  932.                         <option value=\"0\">0 = $0</option>
  933.                         <option value=\"70\">1 = $70</option>
  934.                         <option value=\"140\">2 = $140</option>
  935.                         <option value=\"210\">3 = $210</option>
  936.                         <option value=\"280\">4 = $280</option>
  937.                         <option value=\"350\">5 = $350</option>
  938.                     </select>                  
  939.    
  940.                     <!-- <input type=\"text\" name=\"living_rooms\" value=\"0\" maxlength=\"1\" size=\"2\"> -->
  941.                    
  942.                     </td>
  943.                    
  944.                     <td style=\"text-align: right; width: 30%; border-left: 1px solid #FFE082;\">$45 per Master Bathroom</td>
  945.                     <td style=\"text-align: left; width: auto; border-right: 1px solid #FFE082;\">
  946.                    
  947.                     <select name=\"tile_master_bathroom\" id=\"tile3\" onchange=\"calculateTile(this.value)\">
  948.                         <option value=\"0\">0 = $0</option>
  949.                         <option value=\"45\">1 = $45</option>
  950.                         <option value=\"90\">2 = $90</option>
  951.                         <option value=\"135\">3 = $135</option>
  952.                         <option value=\"180\">4 = $180</option>
  953.                         <option value=\"225\">5 = $225</option>
  954.                     </select>
  955.                    
  956.                     <!-- <input type=\"text\" name=\"master_bathroom\" value=\"0\" maxlength=\"1\" size=\"1\"> -->
  957.                    
  958.                     </td>                    
  959.                  
  960.                     <td style=\"text-align: left;width: 30%;\">$150+ per Sectional Sofa</td>
  961.                     <td style=\"text-align: left; width: auto;\">
  962.                    
  963.                     <select name=\"upholstery_sofa_sectional\" id=\"upholstery3\" onchange=\"calculateUpholstery(this.value)\">
  964.                         <option value=\"0\">0 = $0</option>
  965.                         <option value=\"150\">1 = $150</option>
  966.                         <option value=\"300\">2 = $300</option>
  967.                         <option value=\"450\">3 = $450</option>
  968.                         <option value=\"600\">4 = $600</option>
  969.                         <option value=\"750\">5 = $750</option>
  970.                     </select>
  971.                    
  972.                     <!-- <input type=\"text\" name=\"sectional_cusion_sofa\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
  973.                    
  974.                     </td>                
  975.                 </tr>
  976.                
  977.                <tr>
  978.                     <td style=\"text-align: left;width: 30%;\">&nbsp;</td>              
  979.                     <td style=\"text-align: left; width: auto;\">&nbsp;</td>
  980.                    
  981.                     <td style=\"text-align: right; width: 30%; border-left: 1px solid #FFE082;\">$60 per Bedroom</td>
  982.                     <td style=\"text-align: left; width: auto; border-right: 1px solid #FFE082;\">
  983.                    
  984.                     <select name=\"tile_bedroom\" id=\"tile4\" onchange=\"calculateTile(this.value)\">
  985.                         <option value=\"0\">0 = $0</option>
  986.                         <option value=\"60\">1 = $60</option>
  987.                         <option value=\"120\">2 = $120</option>
  988.                         <option value=\"180\">3 = $180</option>
  989.                         <option value=\"240\">4 = $240</option>
  990.                         <option value=\"300\">5 = $300</option>
  991.                     </select>
  992.                    
  993.                     <!-- <input type=\"text\" name=\"bedroom\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
  994.                    
  995.                     </td>                      
  996.  
  997.                     <td style=\"text-align: left;width: 30%;\">$60 per Recliner</td>
  998.                     <td style=\"text-align: left; width: auto;\">
  999.                    
  1000.                     <select name=\"upholstery_recliner\" id=\"upholstery4\" onchange=\"calculateUpholstery(this.value)\">
  1001.                         <option value=\"0\">0 = $0</option>
  1002.                         <option value=\"60\">1 = $60</option>
  1003.                         <option value=\"120\">2 = $120</option>
  1004.                         <option value=\"180\">3 = $180</option>
  1005.                         <option value=\"240\">4 = $240</option>
  1006.                         <option value=\"300\">5 = $300</option>
  1007.                     </select>
  1008.                    
  1009.                     <!-- <input type=\"text\" name=\"recliner\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
  1010.                    
  1011.                     </td>  
  1012.  
  1013.                </tr>
  1014.                
  1015.                <tr>
  1016.                     <td colspan=\"2\" style=\"text-align: center\">
  1017.                        
  1018.                         <!-- Carpet Total <br /><input id=\"carpetTotal\" name=\"carpet_total\" type=\"text\" value=\"0\" style=\"text-align: center; width: 100%\"> -->
  1019.  
  1020.                     </td>
  1021.  
  1022.                     <td style=\"text-align: right; width: 30%; border-left: 1px solid #FFE082;\">$150 per Tile Living Room</td>
  1023.                     <td style=\"text-align: center; width: auto; border-right: 1px solid #FFE082; border-right: 1px solid #FFE082;\">
  1024.                    
  1025.                     <select name=\"tile_living_room\" id=\"tile5\" onchange=\"calculateTile(this.value)\">
  1026.                         <option value=\"0\">0 = $0</option>
  1027.                         <option value=\"150\">1 = $150</option>
  1028.                         <option value=\"300\">2 = $300</option>
  1029.                         <option value=\"450\">3 = $450</option>
  1030.                     </select>
  1031.                    
  1032.                     <!-- <input type=\"text\" name=\"living_room_tiled\" value=\"0\" maxlength=\"2\" size=\"2\"> -->
  1033.                    
  1034.                     </td>  
  1035.                    
  1036.                    <td colspan=\"2\">&nbsp;</td>
  1037.                 </tr>
  1038.                
  1039.                 <tr>
  1040.                     <td colspan=\"2\" style=\"text-align: center; width: auto; border-top: 2px solid #FFE082;\">
  1041.                    
  1042.                         Carpet Total
  1043.                         <br />
  1044.                         <input id=\"carpetTotal\" name=\"carpet_total\" type=\"text\" value=\"0\" style=\"text-align: center; width: 100%\">
  1045.                    
  1046.                     </td>
  1047.                    
  1048.                     <td colspan=\"2\" style=\"text-align: center; width: auto; border-top: 2px solid #FFE082; border-left: 1px solid #FFE082; border-right: 1px solid #FFE082;\">
  1049.                    
  1050.                         Tile Total
  1051.                         <br />
  1052.                         <input id=\"tileTotal\" name=\"tile_total\" type=\"text\" value=\"0\" style=\"text-align: center; width: 100%\">
  1053.                    
  1054.                     </td>
  1055.                    
  1056.                     <td colspan=\"2\" style=\"text-align: center; width: auto; border-top: 2px solid #FFE082;\">
  1057.                    
  1058.                         Upholstery Total
  1059.                         <br />
  1060.                         <input id=\"upholsteryTotal\" name=\"upholstery_total\" type=\"text\" value=\"0\" style=\"text-align: center; width: 100%\">
  1061.                    
  1062.                     </td>              
  1063.                 </tr>
  1064.  
  1065.  
  1066.                 <tr>
  1067.                     <td colspan=\"6\" style=\"text-align: center;  padding-bottom: 12px; \">
  1068.                    
  1069.                     <h2 style=\"margin-top: 0px; padding-top: 0px; margin-bottom: 0px; border: 0px solid black; \">Combined Total</h2>
  1070.                    
  1071.                     <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%\">
  1072.                    
  1073.                     </td>          
  1074.                 </tr>
  1075.  
  1076.  
  1077.                 <tr>
  1078.                     <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\">
  1079.                     <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>
  1080.                     <br />
  1081.                     Minimum Charge is $90 ---- <b>For a set of dining room chairs, or any other furniture, please call.</b><br />
  1082.                    
  1083.                 </tr>
  1084.                
  1085.             </table>
  1086.  
  1087.             </form>
  1088.            
  1089.             </div>
  1090.            
  1091.             <br /><br />
  1092.            
  1093.             <h2>Free Estimate</h2>
  1094.             ";
  1095.            
  1096.             contact_form(true);
  1097.            
  1098.         }   //  end pricing()   ---------------
  1099.  
  1100.  
  1101.  
  1102.  
  1103.     function about($page)
  1104.         {
  1105.  
  1106.             global $subpage, $wrapper, $constructor_test;
  1107.        
  1108.             // $this->subHeader($page);
  1109.            
  1110.             echo "
  1111.            
  1112.             <h2>About Wes Carollo and Steam Pro</h2>
  1113.            
  1114.             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.
  1115.            
  1116.             <br /><br />
  1117.            
  1118.             The cleaning process employs a powerful truck-mounted steam extraction service.  The cleaning solution is an eco and environmentally friendly product:
  1119.  
  1120.             <br /><br />
  1121.  
  1122.             Safe for your family, your pets and your community.<br />
  1123.             Services are offered seven days a week.
  1124.            
  1125.             <br /><br /><br />
  1126.            
  1127.             <h2 style=\"margin-bottom: 0px\">Business Information</h2>
  1128.            
  1129.             <br />
  1130.                        
  1131.             <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\">
  1132.                 <tr>
  1133.                     <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 />
  1134.                
  1135.                         Wes Carollo <br />
  1136.                         <br />
  1137.                         <font style=\"color: white; font-weight: bold\">Address </font><br />
  1138.                         2231 Labarre St <br />
  1139.                         Mandeville, LA <br />
  1140.                         St. Tammany Parish <br />
  1141.                         70448 <br />
  1142.                         <br />
  1143.                         <font style=\"color: white; font-weight: bold\">LAN Phone</font><br />  985-626-5895 <br />
  1144.                         <font style=\"color: white; font-weight: bold\">Cell Phone</font><br />     985-626-5895 <br />
  1145.  
  1146.                     </td>
  1147.  
  1148.                     <td valign=\"top\" style=\"width: 33%; color: #dbc88f  font-weight: normal; text-align: left; padding-top: 0px\">
  1149.  
  1150.                         <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\">
  1151.                         <h2 style=\"font-size: 20px; margin-bottom: 0px; margin-top: 0px;border-bottom: 0px\">Mandeville Steam Pro</h2>
  1152.                            
  1153.                             <div style=\"padding: 2%; padding-top: 0px; margin-top: 0px; margin-bottom: 0px; padding-top: 4px; padding-bottom: 4px; text-align: center\">  
  1154.                            
  1155.                             <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\">
  1156.                            
  1157.                             <address style=\"margin-bottom: 0px;\"><b>
  1158.                                 <span>2231 Labarre St</span><br/>
  1159.                                 <span>Mandeville</span>,&nbsp;
  1160.                                 <span>LA</span><br/>
  1161.                                 <span>70448</span>
  1162.                             </b></address>
  1163.                            
  1164.                             </div>
  1165.                         </div>
  1166.                    
  1167.                     </td>
  1168.                    
  1169.                     <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\">
  1170.                    
  1171.                         <font style=\"color: white; font-weight: bold\">Site</font><br /> <a href=\"http://steampros.net/\">SteamPros.net</a> <br />
  1172.                         <br />
  1173.                         <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!
  1174.                        
  1175.                         <br /><br />
  1176.                        
  1177.                     </td>
  1178.                 </tr>
  1179.             </table>
  1180.  
  1181.             <h2>Business Card</h2>
  1182.                
  1183.             <div align=\"center\" style=\"width: 100%; text-align: center; min-width: 600px\">
  1184.                
  1185.                 <img src=\"site_images/business_card.png\" style=\"border: 2px solid #BBBBBB;\" />
  1186.                
  1187.             </div>
  1188.  
  1189.             ";         
  1190.            
  1191.         }   // end  about()     ---------------
  1192.  
  1193. /*
  1194.  
  1195.     function testz()
  1196.         {
  1197.    
  1198.     echo '<h2>TESTING THIS FUNCTION</h2>';
  1199.    
  1200.     $formated_name = hide_surnames("Ryan Perkins", " ");
  1201.    
  1202.     echo $formated_name . "<br><br><br>";
  1203.    
  1204.     echo "<br /><br />{$string} == sent string<br/><br />First: {$FirstName} <br />Last: {$LastName} => (shorted) = {$AbbLast} <br /><br />NewName = {$NewName}";
  1205.    
  1206.         }
  1207.  
  1208. */
  1209.  
  1210.     function reviews($page)
  1211.         {
  1212.  
  1213.             global $DB, $subpage, $wrapper;
  1214.        
  1215.             // $this->subHeader($page);
  1216.  
  1217.                 date_default_timezone_set("US/Eastern");
  1218.                 $ip = $_SERVER['REMOTE_ADDR'];
  1219.                 unset($valid_review);
  1220.  
  1221.                    
  1222.  
  1223.                
  1224.                 if  ( $_POST["submit_review"] == "1" ){
  1225.                    
  1226.                     $DB->query("SELECT * FROM  `userReviews` WHERE  `ip_address` =  '{$ip}' ORDER BY `userReviews`.`time` DESC LIMIT 1");
  1227.    
  1228.                     $result = mysql_fetch_array($DB->result, MYSQL_ASSOC);
  1229.                    
  1230.                    
  1231.                     //  ALTER TABLE `userReviews` AUTO_INCREMENT = 1; REMINDER ON HOW TO CHANGE AI                 
  1232.                     // if   ($DB->bool == true ) { echo "<hr>"; var_dump($result); echo "<hr>"; }
  1233.                     // print_r($result);
  1234.                    
  1235.                     if  ( $DB->bool == true && is_numeric( $result['time'] ) ){
  1236.                    
  1237.                     $time = time();
  1238.                     $review_time = $result['time'];
  1239.                     $timeout_time = (7 * 24 * 60 * 60);
  1240.                     $timeout = $review_time + $timeout_time;
  1241.  
  1242.                         if (    $time > $timeout )  { $valid_review = true; }  
  1243.                        
  1244.                         elseif( $time <= $timeout ) { $valid_review = false; }
  1245.                        
  1246.                         else                        { $valid_review = NULL; }
  1247.                    
  1248.                     } else {
  1249.                        
  1250.                     $valid_review = true;
  1251.                        
  1252.                     }
  1253.                    
  1254.                     //echo "<hr><h2>VALID REVIEW = "; var_dump($valid_review); echo "</h2>";
  1255.                    
  1256.                     if  ( isset($_POST["rating"]) && $_POST["rating"] > 0 && $_POST["rating"] < 6 ) {   $rating = $_POST["rating"]; }
  1257.                     else{ $rating = "5"; }
  1258.                    
  1259.                     $ip = $ip;
  1260.                     $time = $time;                 
  1261.                     $author = addslashes($_POST["author"]);
  1262.                     $shortAuthor = abb_surnames($author, $seperator);
  1263.                     $title = addslashes($_POST["title"]);
  1264.                     $body = addslashes($_POST["body"]);
  1265.                    
  1266.                    
  1267.                    
  1268.                     $sql_query = "INSERT INTO userReviews ( `author`, `title`, `body`, `rating`, `time`, `ip_address` ) VALUES ( '{$shortAuthor}', '{$title}', '{$body}', '{$rating}', '{$time}', '{$ip}' )";
  1269.                     // echo $sql_query ."<br />";
  1270.                    
  1271.                     if  ( $valid_review == true ) {
  1272.                    
  1273.                         if ( is_numeric($rating) && $rating >= 0 && $rating <= 5 ){
  1274.    
  1275.                                 //  FINAL CONDITION BEFORE SQL ..
  1276.                             if  ( isset($body) && $body !== "" ){
  1277.                                
  1278.                                 $DB->query("{$sql_query}");
  1279.                            
  1280.                                 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>"; }
  1281.                                
  1282.                                 }
  1283.                                
  1284.                                
  1285.                         } else { // $rating >= 0 && <= 5
  1286.                        
  1287.                         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>";
  1288.                        
  1289.                         }
  1290.                    
  1291.                     } else {    // $valid_review
  1292.                        
  1293.                         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) . " -->";   
  1294.                     }
  1295.                 }
  1296.  
  1297.                 if      ( isset($_GET["page_number"]) && is_numeric($_GET["page_number"]) ) { $page_selected = $_GET["page_number"]; }
  1298.                 elseif  ( !isset($_GET["page_number"]) || $_GET["page_number"] == NULL )    { $page_selected = "1"; }
  1299.                 else    { $page_selected = "1"; }  
  1300.  
  1301.                 $DB->query("SELECT COUNT(`rating`) FROM `userReviews`");
  1302.                 $review_count = mysql_fetch_row($DB->result, MYSQL_ASSOC);
  1303.                 $review_count = $review_count['COUNT(`rating`)'];
  1304.                
  1305.                 $DB->query("SELECT AVG(`rating`) FROM `userReviews`");
  1306.                 $rating_avg = mysql_fetch_row($DB->result, MYSQL_ASSOC);
  1307.                 $rating_avg = round($rating_avg["AVG(`rating`)"], 2);      
  1308.                
  1309.                 // abb_surnames($FullName, $seperator);
  1310.                
  1311.                 echo "
  1312.                
  1313.                 <br />
  1314.                 <br />
  1315.                
  1316.                 <div style=\"display: hidden;\">
  1317.                 <div itemprop=\"name\"><strong>Steam Pro Carpet Cleaning</strong></div>
  1318.                
  1319.                 <div itemprop=\"aggregateRating\" itemscope itemtype=\"//schema.org/AggregateRating\">
  1320.                     <meta itemprop=\"worstRating\" content = \"1\">
  1321.                     <meta itemprop=\"bestRating\" content = \"5\">
  1322.                     Average Rating: <b><span itemprop=\"ratingValue\">{$rating_avg}</span> stars</b> based on <b><span itemprop=\"reviewCount\">{$review_count}</span> reviews</b>
  1323.                 </div>
  1324.                
  1325.                 </div>
  1326.                
  1327.                 <!--
  1328.                 <div itemprop=\"aggregateRating\" itemscope itemtype=\"http://schema.org/AggregateRating\">
  1329.                 <div itemprop=\"itemReviewed\" itemscope itemtype=\"http://schema.org/Thing\"><span itemprop=\"name\" style=\"color: #707070\">Steam Pro Carpet Cleaning</span></div>
  1330.                 Average <span itemprop=\"ratingValue\">{$rating_avg}</span> stars based on <span itemprop=\"reviewCount\">{$review_count}</span> reviews    </div>
  1331.                 -->
  1332.                
  1333.                 <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;\">
  1334.                
  1335.                     <div style=\"vertical-align: bottom; width: 100%; text-align: left\">
  1336.                        
  1337.                         <span style=\"width: auto; text-align: left\">Customer Reviews</span>
  1338.                         <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>
  1339.                        
  1340.                     </div>
  1341.                    
  1342.                 </h2>
  1343.                
  1344.                 <!--
  1345.                
  1346.                 <h4 style=\"margin-top: 0px; padding: 5px 12px 5px 12px; background-color: #131317\">
  1347.                    
  1348.                     <div style=\"display: hidden;\">
  1349.                    
  1350.                         <div itemprop=\"name\"><strong>Steam Pro Carpet Cleaning</strong></div>
  1351.                
  1352.                             <div itemprop=\"aggregateRating\" itemscope itemtype=\"//schema.org/AggregateRating\">
  1353.                                 <meta itemprop=\"worstRating\" content = \"1\">
  1354.                                 <meta itemprop=\"bestRating\" content = \"5\">
  1355.                                 Average <span itemprop=\"ratingValue\">{$rating_avg}</span> stars based on <span itemprop=\"reviewCount\">{$review_count}</span> reviews
  1356.                             </div>
  1357.                
  1358.                     </div>
  1359.                    
  1360.                     <div itemprop=\"itemReviewed\" itemscope itemtype=\"http://schema.org/Thing\"><span itemprop=\"name\" style=\"color: #00baff\">Steam Pro Carpet Cleaning</span></div>
  1361.                    
  1362.                     <span style=\"font-size: 18px; color: #FFFFFF; opacity: 0.75; text-align: left; margin-left: 12px; margin-right: auto\">
  1363.                        
  1364.                         Average Rating:
  1365.                        [<span itemprop=\"ratingValue\" style=\"color: #FFCC00\">{$rating_avg}</span>]
  1366.                             stars over
  1367.                         <span itemprop=\"reviewCount\" style=\"color: #FFCC00\">{$review_count}</span> reviews for
  1368.                        
  1369.                     </span>
  1370.                        
  1371.                 </h4>
  1372.                
  1373.                 -->
  1374.                
  1375.                 <table style=\"width: 100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-bottom: 4px solid #AAAAAA\">
  1376.                
  1377.                 <meta itemprop=\"datePublished\" content=\"{$metadate}\">
  1378.                
  1379.                 ";
  1380.  
  1381.                 $result_limit = 7;
  1382.                 $page_urls = pageNumber_urls('id', 'userReviews', $result_limit);
  1383.  
  1384.                 if  ( isset($_GET["results"]) && is_numeric($_GET["results"]) ) { $result_limit = $_GET["results"]; }
  1385.                 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 . ", "; }
  1386.                 if  ( $result_start == 0 || !isset($result_start) || $result_start < 0 ) { $result_start = 0; }
  1387.                 $DB->query("SELECT * FROM `userReviews` ORDER BY `id` DESC LIMIT {$result_start_string} {$result_limit}");
  1388.  
  1389.                 $i = 0;
  1390.                 $result_selected = $result_start;
  1391.                 $result_selected++;
  1392.                
  1393.                
  1394.                 while   ( $row = mysql_fetch_array($DB->result, MYSQL_ASSOC) ){
  1395.  
  1396.                         ++$i;
  1397.                         $author = $row["author"];
  1398.                         $shortAuthor = abb_surnames($author, $seperator);
  1399.                             if  ( !isset($author) ) { $author = "Anonymous"; }
  1400.                         $title = $row["title"];
  1401.                         $body = $row["body"];
  1402.                         $date = date('m-d-y @ h:i A', $row["time"]);
  1403.                         $metadate = date('m-d-y', $row["time"]);
  1404.                         $rating = $row["rating"];
  1405.                         $starHTML = ratingStars($rating);
  1406.                        
  1407.                         if  ( $i <= 1 ){ $border_top_width = "0px"; } else { $border_top_width = "1px"; }
  1408.                        
  1409.                         echo "
  1410.                        
  1411.                         <tbody itemprop=\"review\" itemscope itemtype=\"http://schema.org/Review\">
  1412.                        
  1413.                             <tr>
  1414.                             <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>
  1415.                             <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> &nbsp;&nbsp;<span itemprop=\"author\">{$shortAuthor}</span> \"<span itemprop=\"description\">{$title}</span>\"<font style=\"font-weight: bold; color: #BBBBBB; font-size: 12px\">&nbsp;&nbsp; {$date}</font></td></tr>
  1416.                            
  1417.                             <tr>
  1418.                                 <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>
  1419.                                 <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>
  1420.                                     <div style=\"display: none\" itemprop=\"reviewRating\" itemscope itemtype=\"http://schema.org/Rating\">
  1421.                                       <meta itemprop=\"worstRating\" content =\"1\">
  1422.                                       <meta itemprop=\"ratingValue\" content=\"{$rating}\">
  1423.                                       <meta itemprop=\"bestRating\" content=\"5\">
  1424.                                     </div>
  1425.                                 </td>
  1426.                             </tr>
  1427.                            
  1428.                         </tbody>
  1429.                         ";
  1430.                        
  1431.                         $result_selected++;
  1432.                    
  1433.                 }
  1434.            
  1435.                 echo "
  1436.                
  1437.                 <tr>
  1438.                     <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;\">
  1439.                    
  1440.                     <font style=\"font-weight: bold\">Page List &nbsp;[ {$page_urls} ]</font>
  1441.                
  1442.                     </td>
  1443.                 </tr>
  1444.  
  1445.                 <tr>
  1446.                     <td colspan=\"2\" style=\"text-align: left\" align=\"center\">
  1447.  
  1448.  
  1449.                 <h2>Submit Review</h2>
  1450.                
  1451.                 <form action=\"".$PHP_SELF."?page=reviews\" method=\"post\">
  1452.                
  1453.                 <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\">
  1454.                
  1455.                 <tr>
  1456.                     <td colspan=\"2\" valign=\"top\" style=\"height: auto; padding-bottom: 6px; color: #93804f\">
  1457.                    
  1458.                         Your Name (Last name will only publicly show initial)
  1459.                         <input type=\"text\" name=\"author\" size=\"64\" maxlength=\"32\" style=\"width: 100%; min-width: 400px\">
  1460.                             <br />
  1461.                         Review Title
  1462.                         <input type=\"text\" name=\"title\" size=\"64\" style=\"width: 100%; min-width: 400px\">
  1463.                             <br />
  1464.                         Review Body
  1465.                             <br />
  1466.                         <textarea name=\"body\" style=\"width: 100%; min-width: 400px\" rows=\"4\"></textarea>
  1467.  
  1468.                     </td>
  1469.                 </tr>
  1470.  
  1471.  
  1472.                 <tr>
  1473.                     <td style=\"width: 100px; color: #93804f; white-space: nowrap; vertical-align: top; text-align: center; padding-top: 0px\" valign=\"top\" nowrap>
  1474.  
  1475.                        
  1476.                         <span style=\"display: inline-block; background-color: #104596; border: 2px solid white; padding: 8px 0px 8px 0px; width: 100%; border-radius: 7px\">
  1477.                        
  1478.                         <span class=\"rating\">
  1479.                             <input type=\"radio\" class=\"rating-input\"
  1480.                                 id=\"rating-input-1-5\" name=\"rating\" value=\"5\">
  1481.                             <label for=\"rating-input-1-5\" class=\"rating-star\"></label>
  1482.                             <input type=\"radio\" class=\"rating-input\"
  1483.                                 id=\"rating-input-1-4\" name=\"rating\" value=\"4\">
  1484.                             <label for=\"rating-input-1-4\" class=\"rating-star\"></label>
  1485.                             <input type=\"radio\" class=\"rating-input\"
  1486.                                 id=\"rating-input-1-3\" name=\"rating\" value=\"3\">
  1487.                             <label for=\"rating-input-1-3\" class=\"rating-star\"></label>
  1488.                             <input type=\"radio\" class=\"rating-input\"
  1489.                                 id=\"rating-input-1-2\" name=\"rating\" value=\"2\">
  1490.                             <label for=\"rating-input-1-2\" class=\"rating-star\"></label>
  1491.                             <input type=\"radio\" class=\"rating-input\"
  1492.                                 id=\"rating-input-1-1\" name=\"rating\" value=\"1\">
  1493.                             <label for=\"rating-input-1-1\" class=\"rating-star\"></label>
  1494.                         </span>
  1495.                            
  1496.                         </span>
  1497.                        
  1498.                         <br />
  1499.                         <font style=\"color: white\">Rating</font>
  1500.                    
  1501.                     </td>
  1502.                    
  1503.                     <td valign=\"top\" style=\"padding: 0px 2px 0px 10px; vertical-align: top; text-align: right\" nowrap>
  1504.                    
  1505.                     <input type=\"submit\" value=\"Submit Review!\" style=\"width: 100%; text-align: center; margin-top: 0px\">
  1506.                    
  1507.                     </td>
  1508.                 </tr>
  1509.                
  1510.                 </table>
  1511.                
  1512.                 <input type=\"hidden\" name=\"submit_review\" value=\"1\">
  1513.                
  1514.                 </form>
  1515.  
  1516.  
  1517.  
  1518.                     </td>
  1519.                 </tr>
  1520.                
  1521.                 <tr>
  1522.                     <td colspan=\"2\" style=\"text-align: left\" align=\"center\">
  1523.                    
  1524.                     <br />
  1525.                    
  1526.                     <h2>External Reviews</h2>
  1527.                    
  1528.                     <div align=\"center\" style=\"min-width: 1%; width: auto; margin-left: auto; margin-right: auto\">
  1529.                    
  1530.                 <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>     
  1531.                    
  1532.                     </div>
  1533.                    
  1534.                     <br />
  1535.                    
  1536.                     </td>
  1537.                 </tr>
  1538.        
  1539.             </table>
  1540.                    
  1541.                 </div>
  1542.                
  1543.                
  1544.                 ";
  1545.  
  1546.         }   //  end reviews()   ---------------
  1547.  
  1548.  
  1549.  
  1550.     function surfaces($page)
  1551.         {      
  1552.        
  1553.             global $subpage;
  1554.            
  1555.             // $this->subHeader($page);
  1556.  
  1557.                 echo "
  1558.                    
  1559.                     <table style=\"width: 100%; height: 100%\" height=\"100%\" valign=\"top\" cellpadding=\"0\" cellspacing=\"0\">
  1560.                    
  1561.                     <tr>
  1562.                    
  1563.                         <td style=\"text-align: right; vertical-align: top; width: 175px; padding-right: 16px; font-size: 20px; height: 100%\" valign=\"top\">
  1564.                    
  1565.                         <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>
  1566.                        
  1567.                         <p style=\"margin-top: 0px; line-height: 26px\">
  1568.                        
  1569.                         <a href=\"?page=surfaces&subpage=upholstery\">Upholstery</a> --<br />
  1570.                         <a href=\"?page=surfaces&subpage=tile\">Tile & Grout</a> --<br />
  1571.                         <a href=\"?page=surfaces&subpage=carpets\">Carpets</a> --<br />
  1572.                        
  1573.                         </p>
  1574.                        
  1575.                         </td>
  1576.                        
  1577.                         <td valign=\"top\" style=\"vertical-align: top; height: 100%\">";
  1578.                                        
  1579.                 if  ( $subpage == "tile" ) {        // TILE & GROUT
  1580.            
  1581.                     echo "
  1582.  
  1583.                     <h2>Steam Tile and Grout Cleaning</h2>
  1584.                      
  1585.                    
  1586.                     Steam Pro is equipped with a powerful, truck-mounted system to clean your ceramic, porcelain, or travertine grouted tile floors.
  1587.  
  1588.                     <br />
  1589.                    
  1590.                     <h3>I accomplish this by:</h3>
  1591.                     Removing loose dirt using the best vacuuming methods
  1592.                    
  1593.                     <br /><br />
  1594.                    
  1595.                     Using an acid based tile restoring chemical especially formulated for thoroughly cleaning ceramic tiles and grout joints
  1596.                    
  1597.                     <br /><br />
  1598.                    
  1599.                     Thoroughly rinsing off surfaces a number of times in order to make sure that no cleaning materials remain
  1600.                    
  1601.                     <br /><br />
  1602.                    
  1603.                     <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>
  1604.                    
  1605.                     <br /><br />
  1606.                    
  1607.                     Steam Pro serves Mandeville, Covington, Slidell, Hammond, Abita Springs, Lacombe, LA and surrounding St. Tammany areas.
  1608.                    
  1609.                     <br /><br />
  1610.                    
  1611.                     Residential and Commercial.
  1612.                    
  1613.                     <br /><br />
  1614.                    
  1615.                     <font style=\"color: white\">Available for Emergencies!</font>
  1616.                    
  1617.                     ";
  1618.                    
  1619.                     } elseif ( $subpage == "carpets" ) {        //  CARPETS
  1620.  
  1621.                     echo "
  1622.                    
  1623.                     <h2>Affordable Carpet Cleaning Service</h2>
  1624.                    
  1625.                     To be filled in..<br /><br />
  1626.                     Steam Pro serves Mandeville, Covington, Slidell, Hammond, Abita Springs, Lacombe, LA and surrounding areas.";
  1627.                    
  1628.                     } else {        // UPHOLSTERY DEFAULT
  1629.            
  1630.                     echo "
  1631.                        
  1632.                     <h2>Upholstery Cleaning Service</h2>
  1633.                     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.
  1634.                        
  1635.                     <br /><br />
  1636.                        
  1637.                     The cleaning process employs a powerful truck-mounted steam extraction service.  The cleaning solution is an eco and environmentally friendly product:
  1638.                    
  1639.                     <br /><br />
  1640.                        
  1641.                     .: <font style=\"color: white\">Safe for your family, your pets and your community.</font><br />
  1642.                     .: <font style=\"color: white\">Services are offered seven days a week</font><br />
  1643.                     .: <font style=\"color: white\">Emergency flood extraction is available twenty-four hours a day</font><br />
  1644.                    
  1645.                     <br /><br />
  1646.                        
  1647.                     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.
  1648.                    
  1649.                     <br /><br />
  1650.                        
  1651.                     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.
  1652.                    
  1653.                     <br />
  1654.                        
  1655.                     <h2>Dry vs. Steam Cleaning on Upholstery</h2>
  1656.                    
  1657.                     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.
  1658.                        
  1659.                     <br /><br />
  1660.                    
  1661.                     Notwithstanding the cleaning instructions, upholstered furniture should be professionally cleaned periodically to remove soil, keep sanitary, restore freshness, preserve appearance, and protect your investment.
  1662.                    
  1663.                     <br /><br />
  1664.                    
  1665.                     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.
  1666.                     <br /><br />
  1667.                    
  1668.                     <font style=\"color: white\">Upholstery Cleaning in Mandeville , Madisonville , Covington , Lacombe , Abita Springs , Slidell , Folsom, Hammond, Ponchatoula, and Robert LA.</font>            
  1669.                    
  1670.                         ";
  1671.                    
  1672.                        
  1673.                     }
  1674.  
  1675.                 echo "
  1676.                    
  1677.                         </td>
  1678.                    
  1679.                     </tr>
  1680.                    
  1681.                 </table>
  1682.                
  1683.                 </div>";
  1684.  
  1685.            
  1686.         }   //  end     surfaces()  ---------------
  1687.  
  1688.  
  1689.  
  1690.     function error($page) {
  1691.        
  1692.         echo "
  1693.         <h2>Sorry! There was a problem with your request..</h2>
  1694.         The requested page {$page} does not exist. Please click another link from the navigation bar.
  1695.        
  1696.         <br /><br />
  1697.        
  1698.         Thanks in advance, <br />
  1699.         <b>Administration</b>
  1700.         ";
  1701.        
  1702.     }   // end  error() ---------------
  1703.  
  1704.  
  1705.  
  1706.     function subHeader($page) {
  1707.  
  1708.             global $subpage;
  1709.            
  1710.             if  ( isset($page) && isset($subpage) ) {
  1711.                 $pageTitle      =   "{$page}>{$subpage}";
  1712.                 } else {
  1713.                 $pageTitle      =   $page;
  1714.                 }
  1715.            
  1716.             //  <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>
  1717.                
  1718.             echo "
  1719.             <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\">
  1720.                
  1721.                 <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;\">
  1722.                
  1723.                 <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>
  1724.                    
  1725.                 </div>
  1726.                
  1727.             </div>
  1728.                
  1729.             <div align=\"center\" style=\"text-align: left; margin-left: auto; margin-right: auto; width: 65%; min-width: 675px\"
  1730.             ";
  1731.            
  1732.     }   // end  subHeader() ---------------
  1733.  
  1734.  
  1735. /*
  1736.  
  1737.     function testScripts(){
  1738.            
  1739.             $svar_name = "test_svar";
  1740.            
  1741.             echo "<h2>Initial \${$svar_name} = ".svar("{$svar_name}")."</h2>";
  1742.  
  1743.             echo "<h2>New \${$svar_name} = ".svar("{$svar_name}", "NEW SVAR VALUE WOOHOO")."</h2>";
  1744.            
  1745.             $array_keys = array_keys($GLOBALS);
  1746.             print_r($array_keys);
  1747.            
  1748.             echo "<h2>Server Vars</h2>";
  1749.             print_r($GLOBALS["_SERVER"]);
  1750.  
  1751.             echo "<h2>Request Vars</h2>";
  1752.             print_r($GLOBALS["_REQUEST"]);
  1753.            
  1754.             echo "<h2>Cookie Vars</h2>";
  1755.             print_r($GLOBALS["_COOKIE"]);
  1756.            
  1757.             //echo "<h2>Nested GLOBALS Vars</h2>";
  1758.             //print_r(array_values($GLOBALS));
  1759.            
  1760.             echo "<h2>Foreach Loop</h2>";
  1761.             foreach ( $GLOBALS as $key => $val ){
  1762.            
  1763.             if  ( !is_array($val) ) { echo "<br>__[{$key}] -- {$val}"; }
  1764.             else{ echo "<br>__[{$key}] -- {$val}"; }
  1765.  
  1766.             }
  1767.            
  1768.    
  1769.            
  1770.             //$constructor_test = new constructor_test(true);
  1771.             //var_dump($constructor_test);
  1772.             //var_dump($constructor_test);
  1773.            
  1774.             // $test_global_return = global_var("global_scope");
  1775.            
  1776.             //$construct_return = $constructor_test("construct_return input");
  1777.             //var_dump($constructor_test);
  1778.             //$constructor_test->testFunction($inputTest); 
  1779.        
  1780.     }
  1781.    
  1782. */         
  1783.    
  1784. }       //  end methods()       ----------------------------------------
  1785.  
  1786.     if  ( $launchDatabase   !== "false" )   {   $DB = new database();       $DB->connect(); }
  1787.     if  ( $launchUser       !== "false" )   {   $user = new user(); }
  1788.  
  1789. if  ( $_POST["login"] == "1" && isset($_POST["username"]) ) {      
  1790.         $user->verify("post", "true");
  1791.     } elseif ( isset($_COOKIE["username"]) ) {
  1792.         $user->verify("cookie", "false");
  1793.     } elseif ( !isset($_POST["login"]) && !isset($_COOKIE["username"]) ) {
  1794.         $user->logged_in    = false;
  1795.     }
  1796.  
  1797. // if   ( $_POST["login"] == "1" && isset($_POST["username"]) && isset($_POST["password"]) || isset($_COOKIE["username"]) ) {   $user->verify("true");  }
  1798.  
  1799. if  ( $launchMethods !== "false" )  {   $methods = new methods();       }
  1800.  
  1801. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement