Convert line endings from MAC to UNIX
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 27 Feb 2021 20:25:17 +0000 (15:25 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Sat, 27 Feb 2021 20:25:17 +0000 (15:25 -0500)
29 files changed:
include/import.csv.php
preferences.php
register/admin_index.php
register/auth_check_header.php
register/checklogin.php
register/delete_this.php
register/delete_user.php
register/delete_user_confirm.php
register/edit_user.php
register/edit_user_save.php
register/email_password.php
register/email_password_sender.php
register/email_sent.php
register/include_menu.php
register/linktick.php
register/login.php
register/login_failed.php
register/logout.php
register/master_inc.php
register/readme.php
register/reset_password.php
register/reset_password_save.php
register/router.php
register/sample_page.php
register/traffic.php
register/user_add.form.php
register/user_add.php
register/user_add_errors.php
register/user_add_sso.php

index 2cd271c..4a0f5c7 100644 (file)
@@ -1 +1,56 @@
-<?php\r\rrequire_once "import.del.php";\r\rclass ImportCsv extends ImportDel {\r\r  function ImportCsv( $file_lines\r                    , $delims = array(";", ",", "\t")\r                    , $quotes = array('"', "'")\r                    ) {\r                           \r    function maxChar($chars, $testString) {\r           \r       $max_count = 0;         \r      $the_char  = (count($chars) > 0 ? $chars[0] : " ");\r      foreach($chars as $char) {\r            $new_count = substr_count($testString, $char);\r         if($new_count > $max_count) {\r                  $max_count = $new_count;\r               $the_char  = $char;\r            }\r      }\r      \r      return $the_char;\r    }\r    \r    $test_line = $file_lines[0];\r    \r    //\r    // Detect the most probable delimiter.\r    //\r    $delim = maxChar($delims, $test_line);\r    $quote = maxChar($quotes, $test_line);\r    \r    //\r    // Re-Conncat the file-lines\r    //\r     $input = implode("\n", $file_lines)."\n";\r      \r    //\r        // Setup and run the parser\r    //\r    include "lib/parsecsv.lib.php";\r         $csv = new parseCSV();\r         $csv->delimiter = $delim;\r      $csv->enclosure = $quote;\r      $csv->file_data = &$input;      \r       $this->data = $csv->parse_string();\r\r    //\r    // Convert the array to addresses\r    //           \r    $this->convertToAddresses();\r  }\r}\r?>
\ No newline at end of file
+<?php
+
+require_once "import.del.php";
+
+class ImportCsv extends ImportDel {
+
+  function ImportCsv( $file_lines
+                    , $delims = array(";", ",", "\t")
+                    , $quotes = array('"', "'")
+                    ) {
+                       
+    function maxChar($chars, $testString) {
+       
+       $max_count = 0;         
+      $the_char  = (count($chars) > 0 ? $chars[0] : " ");
+      foreach($chars as $char) {
+       $new_count = substr_count($testString, $char);
+       if($new_count > $max_count) {
+               $max_count = $new_count;
+               $the_char  = $char;
+       }
+      }
+      
+      return $the_char;
+    }
+    
+    $test_line = $file_lines[0];
+    
+    //
+    // Detect the most probable delimiter.
+    //
+    $delim = maxChar($delims, $test_line);
+    $quote = maxChar($quotes, $test_line);
+    
+    //
+    // Re-Conncat the file-lines
+    //
+         $input = implode("\n", $file_lines)."\n";
+         
+    //
+         // Setup and run the parser
+    //
+    include "lib/parsecsv.lib.php";
+         $csv = new parseCSV();
+         $csv->delimiter = $delim;
+         $csv->enclosure = $quote;
+         $csv->file_data = &$input;      
+         $this->data = $csv->parse_string();
+
+    //
+    // Convert the array to addresses
+    //           
+    $this->convertToAddresses();
+  }
+}
+?>
\ No newline at end of file
index af6eb1b..1c030d0 100644 (file)
@@ -16,7 +16,8 @@
                                                        echo "<option value='$supp_lang'>".ucfmsg($supp_lang)."</option>\n";
                                                } ?>\r
                                        </select><br /><br />\r
-                               -->\r                            \r
+                               -->
+                               \r
                                <label><?php echo ucfmsg("MAIL_CLIENT") ?>:</label>\r
                                <select name="mailer">\r
                                        <?php
index d51e3db..b98ab3a 100644 (file)
-<? \r\r
-//Set permission level threshold for this page remove if page is good for all levels\r\r
-$permission_level=5;\r\r
-\r\r
-include"auth_check_header.php";\r\r
-\r\r
-?>     \r\r
-\r\r
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\r
-<html xmlns='http://www.w3.org/1999/xhtml'>\r\r
-<head>\r\r
-<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\r\r
-<title>AMS Agent Index</title>\r\r
-</head>\r\r
-\r\r
-<body topmargin="0">\r\r
-<table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-  <tr>\r\r
-    <td valign="top"><div align="center"><strong><font size="3"><font face="Verdana, Arial, Helvetica, sans-serif">\r\r
-      <legend><font size="4">Admin Index</font><font size="2"><br />\r\r
-        </font></legend>\r\r
-      </font></font></strong>\r\r
-    </div>\r\r
-      <div style="text-align:left; width:100%; margin-top:10px;">\r\r
-        <p align="center">\r\r
-          <? include"include_menu.php"; ?> \r\r
-          <font size="2" face="Verdana, Arial, Helvetica, sans-serif">|</font> <strong><font face="Verdana, Arial, Helvetica, sans-serif"><a href="traffic.php"><font size="2">Traffic Report</font></a></font></strong></p>\r\r
-        <form action="admin_index.php" method="post" name="form" id="form">\r\r
-          <table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-            <tr>\r\r
-              <td><div align="center">\r\r
-                  <input name="q" type='text' id='q' />\r\r
-                &nbsp;\r\r
-                <input type="submit" name="Submit22" value="Search Users" />\r\r
-              </div></td>\r\r
-            </tr>\r\r
-          </table>\r\r
-          <p>\r\r
-            <?\r\r
-                       \r\r
-$var = $_REQUEST['q'];\r\r
-                       \r\r
-$color1 = "#ffffff";  \r\r
-$color2 = "#ebebeb";   \r\r
-\r\r
-echo"<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>\r\r
-               <table width='100%' cellpadding='5'>";  \r\r
-                          \r\r
-\r\r
-$query = "SELECT * FROM users WHERE (`id` LIKE \"%$var%\" OR `username` LIKE \"%$var%\" OR `password` LIKE \"%$var%\" OR `email` LIKE \"%$var%\" OR `lastname`LIKE \"%$var%\" OR `firstname`LIKE \"%$var%\") ORDER BY `id` desc"; \r\r
-\r\r
-$numresults=mysqli_query($db, $query);\r\r
-$numrows=mysqli_num_rows($numresults); \r\r
-\r\r
-// get results\r\r
-$result = mysqli_query($query) or die("Couldn't execute query");\r\r
-\r\r
-// now you can display the results returned\r\r
-while ($row= mysqli_fetch_array($result)) {\r\r
-\r\r
-$id= $row["id"];\r\r
-$username= $row["username"];\r\r
-$password= $row["password"];\r\r
-$lastname= $row["lastname"];\r\r
-$firstname= $row["firstname"];\r\r
-$phone= $row["phone"];\r\r
-$email= $row["email"];\r\r
-$permissions = $row["permissions"];\r\r
-$email_sub = substr($email, 0, 50);\r\r
-\r\r
-\r\r
-   $row_color = ($row_count % 2) ? $color1 : $color2; \r\r
-//DISPLAY DATA HERE_____________\r\r
-\r\r
-echo "\r\r
-    <tr>\r\r
-    <td width='100%' bgcolor='$row_color'>\r\r
-       <table width= '100%'><tr>\r\r
-                <td width='20%' bgcolor='$row_color' >$username</a></td>\r\r
-                <td width='10%' bgcolor='$row_color' >$lastname, $firstname</td>\r\r
-                <td width='10%' bgcolor='$row_color' >$phone</td>\r\r
-                <td width='20%' bgcolor='$row_color' >$email_sub</td>\r\r
-                <td width='10%' bgcolor='$row_color' >$permissions</td> \r\r
-                <td width='100' bgcolor='$row_color' ><a href='edit_user.php?id=$id'>edit</a></td>\r\r
-                               </tr>\r\r
-                               </table>\r\r
-       </td>\r\r
-    </tr>\r\r
-           ";\r\r
-    $row_count++; \r\r
-} \r\r
-\r\r
-\r\r
-echo"</tabel></font>";\r\r
-\r\r
-                       \r\r
-                       ?>\r\r
-          </p>\r\r
-          <p>&nbsp; </p>\r\r
-        </form>\r\r
-        </p>\r\r
-      </div></td>\r\r
-  </tr>\r\r
-</table>\r\r
-<br>\r\r
-<A href="http://www.amsmerchant.com" target="_blank"></A><br>\r\r
-<br>\r\r
-</body>\r\r
-</html>\r\r
+<? 
+\r
+//Set permission level threshold for this page remove if page is good for all levels
+\r
+$permission_level=5;
+\r
+
+\r
+include"auth_check_header.php";
+\r
+
+\r
+?>     
+\r
+
+\r
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+\r
+<html xmlns='http://www.w3.org/1999/xhtml'>
+\r
+<head>
+\r
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
+\r
+<title>AMS Agent Index</title>
+\r
+</head>
+\r
+
+\r
+<body topmargin="0">
+\r
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+  <tr>
+\r
+    <td valign="top"><div align="center"><strong><font size="3"><font face="Verdana, Arial, Helvetica, sans-serif">
+\r
+      <legend><font size="4">Admin Index</font><font size="2"><br />
+\r
+        </font></legend>
+\r
+      </font></font></strong>
+\r
+    </div>
+\r
+      <div style="text-align:left; width:100%; margin-top:10px;">
+\r
+        <p align="center">
+\r
+          <? include"include_menu.php"; ?> 
+\r
+          <font size="2" face="Verdana, Arial, Helvetica, sans-serif">|</font> <strong><font face="Verdana, Arial, Helvetica, sans-serif"><a href="traffic.php"><font size="2">Traffic Report</font></a></font></strong></p>
+\r
+        <form action="admin_index.php" method="post" name="form" id="form">
+\r
+          <table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+            <tr>
+\r
+              <td><div align="center">
+\r
+                  <input name="q" type='text' id='q' />
+\r
+                &nbsp;
+\r
+                <input type="submit" name="Submit22" value="Search Users" />
+\r
+              </div></td>
+\r
+            </tr>
+\r
+          </table>
+\r
+          <p>
+\r
+            <?
+\r
+                       
+\r
+$var = $_REQUEST['q'];
+\r
+                       
+\r
+$color1 = "#ffffff";  
+\r
+$color2 = "#ebebeb";   
+\r
+
+\r
+echo"<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>
+\r
+               <table width='100%' cellpadding='5'>";  
+\r
+                          
+\r
+
+\r
+$query = "SELECT * FROM users WHERE (`id` LIKE \"%$var%\" OR `username` LIKE \"%$var%\" OR `password` LIKE \"%$var%\" OR `email` LIKE \"%$var%\" OR `lastname`LIKE \"%$var%\" OR `firstname`LIKE \"%$var%\") ORDER BY `id` desc"; 
+\r
+
+\r
+$numresults=mysqli_query($db, $query);
+\r
+$numrows=mysqli_num_rows($numresults); 
+\r
+
+\r
+// get results
+\r
+$result = mysqli_query($query) or die("Couldn't execute query");
+\r
+
+\r
+// now you can display the results returned
+\r
+while ($row= mysqli_fetch_array($result)) {
+\r
+
+\r
+$id= $row["id"];
+\r
+$username= $row["username"];
+\r
+$password= $row["password"];
+\r
+$lastname= $row["lastname"];
+\r
+$firstname= $row["firstname"];
+\r
+$phone= $row["phone"];
+\r
+$email= $row["email"];
+\r
+$permissions = $row["permissions"];
+\r
+$email_sub = substr($email, 0, 50);
+\r
+
+\r
+
+\r
+   $row_color = ($row_count % 2) ? $color1 : $color2; 
+\r
+//DISPLAY DATA HERE_____________
+\r
+
+\r
+echo "
+\r
+    <tr>
+\r
+    <td width='100%' bgcolor='$row_color'>
+\r
+       <table width= '100%'><tr>
+\r
+                <td width='20%' bgcolor='$row_color' >$username</a></td>
+\r
+                <td width='10%' bgcolor='$row_color' >$lastname, $firstname</td>
+\r
+                <td width='10%' bgcolor='$row_color' >$phone</td>
+\r
+                <td width='20%' bgcolor='$row_color' >$email_sub</td>
+\r
+                <td width='10%' bgcolor='$row_color' >$permissions</td> 
+\r
+                <td width='100' bgcolor='$row_color' ><a href='edit_user.php?id=$id'>edit</a></td>
+\r
+                               </tr>
+\r
+                               </table>
+\r
+       </td>
+\r
+    </tr>
+\r
+           ";
+\r
+    $row_count++; 
+\r
+} 
+\r
+
+\r
+
+\r
+echo"</tabel></font>";
+\r
+
+\r
+                       
+\r
+                       ?>
+\r
+          </p>
+\r
+          <p>&nbsp; </p>
+\r
+        </form>
+\r
+        </p>
+\r
+      </div></td>
+\r
+  </tr>
+\r
+</table>
+\r
+<br>
+\r
+<A href="http://www.amsmerchant.com" target="_blank"></A><br>
+\r
+<br>
+\r
+</body>
+\r
+</html>
+\r
index 21cdf6d..f893170 100644 (file)
-<? \r\r
-\r\r
-include"master_inc.php";\r\r
-\r\r
-$username_from_cookie = $_COOKIE[$cookiename]; //retrieve contents of cookie \r\r
-\r\r
-if($permission_level==''){\r\r
-\r\r
-$sql="SELECT * FROM users WHERE username='$username_from_cookie'";\r\r
-\r\r
-}else{\r\r
-\r\r
-$threshold = $permission_level-1;\r\r
-\r\r
-$sql="SELECT * FROM users WHERE username='$username_from_cookie' AND permissions>'$threshold'";\r\r
-\r\r
-}\r\r
-\r\r
-$result=mysqli_query($db,$sql);\r\r
-\r\r
-// mysqli_num_row is counting table rows\r\r
-\r\r
-$count=mysqli_num_rows($result);\r\r
-\r\r
-// If result matches $myusername and $mypassword, table row must be 1 row\r\r
-\r\r
-if($count==0){\r\r
-\r\r
-{\r\r
-\r\r
-header("location:login.php");\r\r
-\r\r
-}\r\r
-\r\r
-}\r\r
-\r\r
-$query = "SELECT * FROM users WHERE `username`='$username_from_cookie'"; \r\r
-\r\r
-$numresults=mysqli_query($db, $query);\r\r
-$numrows=mysqli_num_rows($numresults); \r\r
-\r\r
-// get results\r\r
-$result = mysqli_query($query) or die("Couldn't execute query");\r\r
-\r\r
-// now you can display the results returned\r\r
-while ($row= mysqli_fetch_array($result)) {\r\r
-\r\r
-$permissions= $row["permissions"];\r\r
-\r\r
-}\r\r
-\r\r
-//end Chris Carr Auth Check Header\r\r
-\r\r
-$username = $username_from_cookie;\r\r
-\r\r
+<? 
+\r
+
+\r
+include"master_inc.php";
+\r
+
+\r
+$username_from_cookie = $_COOKIE[$cookiename]; //retrieve contents of cookie 
+\r
+
+\r
+if($permission_level==''){
+\r
+
+\r
+$sql="SELECT * FROM users WHERE username='$username_from_cookie'";
+\r
+
+\r
+}else{
+\r
+
+\r
+$threshold = $permission_level-1;
+\r
+
+\r
+$sql="SELECT * FROM users WHERE username='$username_from_cookie' AND permissions>'$threshold'";
+\r
+
+\r
+}
+\r
+
+\r
+$result=mysqli_query($db,$sql);
+\r
+
+\r
+// mysqli_num_row is counting table rows
+\r
+
+\r
+$count=mysqli_num_rows($result);
+\r
+
+\r
+// If result matches $myusername and $mypassword, table row must be 1 row
+\r
+
+\r
+if($count==0){
+\r
+
+\r
+{
+\r
+
+\r
+header("location:login.php");
+\r
+
+\r
+}
+\r
+
+\r
+}
+\r
+
+\r
+$query = "SELECT * FROM users WHERE `username`='$username_from_cookie'"; 
+\r
+
+\r
+$numresults=mysqli_query($db, $query);
+\r
+$numrows=mysqli_num_rows($numresults); 
+\r
+
+\r
+// get results
+\r
+$result = mysqli_query($query) or die("Couldn't execute query");
+\r
+
+\r
+// now you can display the results returned
+\r
+while ($row= mysqli_fetch_array($result)) {
+\r
+
+\r
+$permissions= $row["permissions"];
+\r
+
+\r
+}
+\r
+
+\r
+//end Chris Carr Auth Check Header
+\r
+
+\r
+$username = $username_from_cookie;
+\r
+
+\r
 ?>
\ No newline at end of file
index 3eabf55..fe2ef0d 100644 (file)
-<?php\r\r
-\r\r
-include"login_config.php";\r\r
-\r\r
-//Connection String Variables_________________________________________________\r\r
-\r\r
-   // connect to the server\r\r
-   mysqli_connect( $db_host, $db_username, $db_password )\r\r
-      or die( "Error! Could not connect to database: " . mysqli_error() );\r\r
-   \r\r
-   // select the database\r\r
-   mysqli_select_db( $db )\r\r
-      or die( "Error! Could not select the database: " . mysqli_error() );\r\r
-\r\r
-//IBM suggested scrub for URL request\r\r
-$urlun = strip_tags(substr($_REQUEST['username'],0,32));\r\r
-$urlpw = strip_tags(substr($_REQUEST['password'],0,32));\r\r
-\r\r
-$cleanpw = md5($urlpw);\r\r
-\r\r
-//echo"Cleanpw: $cleanpw<br>";\r\r
-\r\r
-//$sql="SELECT * FROM agents WHERE username='$urlun' and password='$urlpw'";\r\r
-$sql="SELECT * FROM users WHERE username='$urlun' and password='$cleanpw'";\r\r
-\r\r
-$result=mysqli_query($db,$sql);\r\r
-\r\r
-// mysqli_num_row is counting table rows\r\r
-\r\r
-$count=mysqli_num_rows($result);\r\r
-\r\r
-// If result matches $myusername and $mypassword, table row must be 1 row\r\r
-\r\r
-//echo"Count:$count<br>";\r\r
-\r\r
-if($count==1){\r\r
-\r\r
-// Register $myusername and redirect to file designated success file\r\r
-\r\r
-$cookie_name ="$cookiename";\r\r
-\r\r
-$cookie_value ="$urlun";\r\r
-\r\r
-//set to 24 hours\r\r
-\r\r
-$cookie_expire ="86400";\r\r
-\r\r
-setcookie($cookie_name,$cookie_value,time() + (86400),"/", $cookie_domain);\r\r
-\r\r
-header("location:$successful_login_url");\r\r
-\r\r
-}else{\r\r
-\r\r
-header("location:$failed_login");\r\r
-\r\r
-}\r\r
-\r\r
-\r\r
-?>\r\r
-\r\r
-\r\r
-\r\r
-\r\r
-\r\r
+<?php
+\r
+
+\r
+include"login_config.php";
+\r
+
+\r
+//Connection String Variables_________________________________________________
+\r
+
+\r
+   // connect to the server
+\r
+   mysqli_connect( $db_host, $db_username, $db_password )
+\r
+      or die( "Error! Could not connect to database: " . mysqli_error() );
+\r
+   
+\r
+   // select the database
+\r
+   mysqli_select_db( $db )
+\r
+      or die( "Error! Could not select the database: " . mysqli_error() );
+\r
+
+\r
+//IBM suggested scrub for URL request
+\r
+$urlun = strip_tags(substr($_REQUEST['username'],0,32));
+\r
+$urlpw = strip_tags(substr($_REQUEST['password'],0,32));
+\r
+
+\r
+$cleanpw = md5($urlpw);
+\r
+
+\r
+//echo"Cleanpw: $cleanpw<br>";
+\r
+
+\r
+//$sql="SELECT * FROM agents WHERE username='$urlun' and password='$urlpw'";
+\r
+$sql="SELECT * FROM users WHERE username='$urlun' and password='$cleanpw'";
+\r
+
+\r
+$result=mysqli_query($db,$sql);
+\r
+
+\r
+// mysqli_num_row is counting table rows
+\r
+
+\r
+$count=mysqli_num_rows($result);
+\r
+
+\r
+// If result matches $myusername and $mypassword, table row must be 1 row
+\r
+
+\r
+//echo"Count:$count<br>";
+\r
+
+\r
+if($count==1){
+\r
+
+\r
+// Register $myusername and redirect to file designated success file
+\r
+
+\r
+$cookie_name ="$cookiename";
+\r
+
+\r
+$cookie_value ="$urlun";
+\r
+
+\r
+//set to 24 hours
+\r
+
+\r
+$cookie_expire ="86400";
+\r
+
+\r
+setcookie($cookie_name,$cookie_value,time() + (86400),"/", $cookie_domain);
+\r
+
+\r
+header("location:$successful_login_url");
+\r
+
+\r
+}else{
+\r
+
+\r
+header("location:$failed_login");
+\r
+
+\r
+}
+\r
+
+\r
+
+\r
+?>
+\r
+
+\r
+
+\r
+
+\r
+
+\r
+
+\r
index 4561319..962e376 100644 (file)
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r\r
-<html xmlns="http://www.w3.org/1999/xhtml">\r\r
-<head>\r\r
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\r\r
-<title>Untitled Document</title>\r\r
-<!-- automatic insertion -->\r\r
-\r\r
-<script language="JavaScript">\r\r
-var if_clientCode = "Not-Signed-In";\r\r
-var if_nt_userName = "";\r\r
-var if_nt_login = "0";\r\r
-var if_nt_numMessages = "0";\r\r
-var if_nt_span = "";\r\r
-var if_nt_zyg = "";\r\r
-var if_nt_demo = "";\r\r
-var if_nt_era = "";    \r\r
-var if_nt_bandwidth = "";\r\r
-</script>\r\r
-\r\r
-\r\r
-\r\r
-\r\r
-\r\r
-<script language="JavaScript" src="/sitewide/scripts/omni_config.js"></script>\r\r
-\r\r
-<script type="text/JavaScript" language="JavaScript" src="/global/reporting/scripts/omni_functions.js"></script>\r\r
-\r\r
-</droplet>\r\r
-<script language="JavaScript">\r\r
-function popCheck() {}\r\r
-</script>\r\r
-\r\r
-\r\r
-\r\r
-<script language="javascript" type="text/javascript">\r\r
-var extraVals = '';\r\r
-extraVals = extraVals==""?extraVals:"&"+extraVals;\r\r
-var if_nt_Screen_Attr = screen.height + "x" + screen.width + "x" + screen.colorDepth;\r\r
-var if_nt_Flash = flashVersion;\r\r
-var if_nt_VPNT = VwptVETInstalled;\r\r
-\r\r
-var docURL = document.location + "";\r\r
-\r\r
-var partsParts = window.location.pathname;\r\r
-\r\r
-var if_nt_url= escape(partsParts);\r\r
-\r\r
-var mep1;\r\r
-function setMep1(str){\r\r
-mep1 = str;\r\r
-}\r\r
-setMep1(sections + "&pageName=artist.jhtml" + "&if_nt_login=" + if_nt_login + "&if_clientCode=" + if_clientCode + "&if_nt_userName=" + if_nt_userName + "&if_nt_bandwidth=" + if_nt_bandwidth + "&if_nt_Screen_Attr=" + if_nt_Screen_Attr + "&if_nt_zyg=" + if_nt_zyg + "&if_nt_span=" + if_nt_span + "&if_nt_demo=" + if_nt_demo + "&if_nt_era=" + if_nt_era + "&if_nt_Flash=" + if_nt_Flash + "&if_nt_VPNT=" + if_nt_VPNT + extraVals);\r\r
-\r\r
-var bc="&if_nt_Browser_Combination=" + escape(window.navigator.userAgent);\r\r
-var Site='vh1'; var if_SiteID='1';\r\r
-\r\r
-</script>      \r\r
-\r\r
-</head>\r\r
-\r\r
-<body>\r\r
-<div style="width: 728px; height: 90px; float:left; clear:none; overflow: visible;"><a href="http://www.readyclip.com"><img src="images/readyclip_logo.jpg" alt="readyclip.com logo" width="190" height="35" border="0" /></a> \r\r
-        <script language="JavaScript" type="text/javascript">if (isNaN(document.axel)) {document.axel = Math.random() + ""; ord = document.axel * 1000000000000000000;}\r\r
-var ad = '<SCRIPT language="JavaScript1.1" src="http://ad.doubleclick.net/adj/vh1.mtvi/artists;art=az;dcopt=ist;art=white_stripes;gen=rock;pagename=artist;art=artist;portal=artists;section_1=az;section_2=white_stripes;zyg='+if_nt_zyg+';span='+if_nt_span+';demo='+if_nt_demo+';era='+if_nt_era+';bps='+if_nt_bandwidth+';fla='+if_nt_Flash+';dcove=o;sz=728x90;tile=1;ord=' + ord + '?"><\/SCRIPT>';\r\r
-document.write(ad);\r\r
-  </script>\r\r
-      </div>\r\r
-</body>\r\r
-</html>\r\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+\r
+<html xmlns="http://www.w3.org/1999/xhtml">
+\r
+<head>
+\r
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+\r
+<title>Untitled Document</title>
+\r
+<!-- automatic insertion -->
+\r
+
+\r
+<script language="JavaScript">
+\r
+var if_clientCode = "Not-Signed-In";
+\r
+var if_nt_userName = "";
+\r
+var if_nt_login = "0";
+\r
+var if_nt_numMessages = "0";
+\r
+var if_nt_span = "";
+\r
+var if_nt_zyg = "";
+\r
+var if_nt_demo = "";
+\r
+var if_nt_era = "";    
+\r
+var if_nt_bandwidth = "";
+\r
+</script>
+\r
+
+\r
+
+\r
+
+\r
+
+\r
+
+\r
+<script language="JavaScript" src="/sitewide/scripts/omni_config.js"></script>
+\r
+
+\r
+<script type="text/JavaScript" language="JavaScript" src="/global/reporting/scripts/omni_functions.js"></script>
+\r
+
+\r
+</droplet>
+\r
+<script language="JavaScript">
+\r
+function popCheck() {}
+\r
+</script>
+\r
+
+\r
+
+\r
+
+\r
+<script language="javascript" type="text/javascript">
+\r
+var extraVals = '';
+\r
+extraVals = extraVals==""?extraVals:"&"+extraVals;
+\r
+var if_nt_Screen_Attr = screen.height + "x" + screen.width + "x" + screen.colorDepth;
+\r
+var if_nt_Flash = flashVersion;
+\r
+var if_nt_VPNT = VwptVETInstalled;
+\r
+
+\r
+var docURL = document.location + "";
+\r
+
+\r
+var partsParts = window.location.pathname;
+\r
+
+\r
+var if_nt_url= escape(partsParts);
+\r
+
+\r
+var mep1;
+\r
+function setMep1(str){
+\r
+mep1 = str;
+\r
+}
+\r
+setMep1(sections + "&pageName=artist.jhtml" + "&if_nt_login=" + if_nt_login + "&if_clientCode=" + if_clientCode + "&if_nt_userName=" + if_nt_userName + "&if_nt_bandwidth=" + if_nt_bandwidth + "&if_nt_Screen_Attr=" + if_nt_Screen_Attr + "&if_nt_zyg=" + if_nt_zyg + "&if_nt_span=" + if_nt_span + "&if_nt_demo=" + if_nt_demo + "&if_nt_era=" + if_nt_era + "&if_nt_Flash=" + if_nt_Flash + "&if_nt_VPNT=" + if_nt_VPNT + extraVals);
+\r
+
+\r
+var bc="&if_nt_Browser_Combination=" + escape(window.navigator.userAgent);
+\r
+var Site='vh1'; var if_SiteID='1';
+\r
+
+\r
+</script>      
+\r
+
+\r
+</head>
+\r
+
+\r
+<body>
+\r
+<div style="width: 728px; height: 90px; float:left; clear:none; overflow: visible;"><a href="http://www.readyclip.com"><img src="images/readyclip_logo.jpg" alt="readyclip.com logo" width="190" height="35" border="0" /></a> 
+\r
+        <script language="JavaScript" type="text/javascript">if (isNaN(document.axel)) {document.axel = Math.random() + ""; ord = document.axel * 1000000000000000000;}
+\r
+var ad = '<SCRIPT language="JavaScript1.1" src="http://ad.doubleclick.net/adj/vh1.mtvi/artists;art=az;dcopt=ist;art=white_stripes;gen=rock;pagename=artist;art=artist;portal=artists;section_1=az;section_2=white_stripes;zyg='+if_nt_zyg+';span='+if_nt_span+';demo='+if_nt_demo+';era='+if_nt_era+';bps='+if_nt_bandwidth+';fla='+if_nt_Flash+';dcove=o;sz=728x90;tile=1;ord=' + ord + '?"><\/SCRIPT>';
+\r
+document.write(ad);
+\r
+  </script>
+\r
+      </div>
+\r
+</body>
+\r
+</html>
+\r
index 2eaeaf0..65ec7c5 100644 (file)
-<? \r\r
-//Set permission level threshold for this page remove if page is good for all levels\r\r
-$permission_level=5;\r\r
-\r\r
-include"auth_check_header.php";\r\r
-\r\r
-?>     \r\r
-\r\r
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\r
-<html xmlns='http://www.w3.org/1999/xhtml'>\r\r
-<head>\r\r
-<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\r\r
-<title>AMS Agent Index</title>\r\r
-</head>\r\r
-\r\r
-<body topmargin="0">\r\r
-<table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-  <tr>\r\r
-    <td valign="top"><div align="center"><strong><font size="3"><font face="Verdana, Arial, Helvetica, sans-serif">\r\r
-      <legend><font size="4">Delete User </font><font size="2"><br />\r\r
-        </font></legend>\r\r
-      </font></font></strong>\r\r
-    </div>\r\r
-      <div style="text-align:left; width:100%; margin-top:10px;">\r\r
-        <p align="center"><? include"include_menu.php"; ?></p>\r\r
-        <p align="center">\r\r
-          <?\r\r
-                         \r\r
-                         \r\r
-                         $id = $_REQUEST['id'];\r\r
-                         \r\r
-                         \r\r
-                         $query = "DELETE FROM `users` WHERE `id`='$id'";\r\r
-\r\r
-$result = mysqli_query( $query );\r\r
-\r\r
-// print out the results\r\r
-if( $result )\r\r
-{\r\r
-echo( "<font face='Verdana, Arial, Helvetica, sans-serif' size='2' color='#000000'>Successfully deleted the entry.</font>" );\r\r
-}\r\r
-else\r\r
-{\r\r
-die( "Error: Could not delete entry: " . mysqli_error() );\r\r
-}\r\r
-\r\r
-                         \r\r
-               \r\r
-                         ?>\r\r
-</p>\r\r
-        <table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-            <tr>\r\r
-              <td><div align="center"></div></td>\r\r
-            </tr>\r\r
-        </table>\r\r
-         \r\r
-        \r\r
-      </div></td>\r\r
-  </tr>\r\r
-</table>\r\r
-<br>\r\r
-<A href="http://www.amsmerchant.com" target="_blank"></A><br>\r\r
-<br>\r\r
-</body>\r\r
-</html>\r\r
+<? 
+\r
+//Set permission level threshold for this page remove if page is good for all levels
+\r
+$permission_level=5;
+\r
+
+\r
+include"auth_check_header.php";
+\r
+
+\r
+?>     
+\r
+
+\r
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+\r
+<html xmlns='http://www.w3.org/1999/xhtml'>
+\r
+<head>
+\r
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
+\r
+<title>AMS Agent Index</title>
+\r
+</head>
+\r
+
+\r
+<body topmargin="0">
+\r
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+  <tr>
+\r
+    <td valign="top"><div align="center"><strong><font size="3"><font face="Verdana, Arial, Helvetica, sans-serif">
+\r
+      <legend><font size="4">Delete User </font><font size="2"><br />
+\r
+        </font></legend>
+\r
+      </font></font></strong>
+\r
+    </div>
+\r
+      <div style="text-align:left; width:100%; margin-top:10px;">
+\r
+        <p align="center"><? include"include_menu.php"; ?></p>
+\r
+        <p align="center">
+\r
+          <?
+\r
+                         
+\r
+                         
+\r
+                         $id = $_REQUEST['id'];
+\r
+                         
+\r
+                         
+\r
+                         $query = "DELETE FROM `users` WHERE `id`='$id'";
+\r
+
+\r
+$result = mysqli_query( $query );
+\r
+
+\r
+// print out the results
+\r
+if( $result )
+\r
+{
+\r
+echo( "<font face='Verdana, Arial, Helvetica, sans-serif' size='2' color='#000000'>Successfully deleted the entry.</font>" );
+\r
+}
+\r
+else
+\r
+{
+\r
+die( "Error: Could not delete entry: " . mysqli_error() );
+\r
+}
+\r
+
+\r
+                         
+\r
+               
+\r
+                         ?>
+\r
+</p>
+\r
+        <table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+            <tr>
+\r
+              <td><div align="center"></div></td>
+\r
+            </tr>
+\r
+        </table>
+\r
+         
+\r
+        
+\r
+      </div></td>
+\r
+  </tr>
+\r
+</table>
+\r
+<br>
+\r
+<A href="http://www.amsmerchant.com" target="_blank"></A><br>
+\r
+<br>
+\r
+</body>
+\r
+</html>
+\r
index df0137f..64b1407 100644 (file)
-<? \r\r
-//Set permission level threshold for this page remove if page is good for all levels\r\r
-$permission_level=5;\r\r
-\r\r
-include"auth_check_header.php";\r\r
-\r\r
-?>     \r\r
-\r\r
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\r
-<html xmlns='http://www.w3.org/1999/xhtml'>\r\r
-<head>\r\r
-<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\r\r
-<title>AMS Agent Index</title>\r\r
-</head>\r\r
-\r\r
-<body topmargin="0">\r\r
-<table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-  <tr>\r\r
-    <td valign="top"><div align="center"><strong><font size="3"><font face="Verdana, Arial, Helvetica, sans-serif">\r\r
-      <legend><font size="4">Delete User </font><font size="2"><br />\r\r
-        </font></legend>\r\r
-      </font></font></strong>\r\r
-    </div>\r\r
-      <div style="text-align:left; width:100%; margin-top:10px;">\r\r
-        <p align="center"><? include"include_menu.php"; ?></p>\r\r
-        <p align="center">\r\r
-          <?\r\r
-                         \r\r
-                         \r\r
-                         $id = $_REQUEST['id'];\r\r
-                         \r\r
-                         echo "<br><br><font face='Verdana, Arial, Helvetica, sans-serif' size='2' color='#000000'>Are you sure you want to delete user ID: $id?<br><br><a href='edit_user.php?id=$id'>No</a><br><br><a href='delete_user.php?id=$id'>Yes</a></font>";\r\r
-                         \r\r
-               \r\r
-                         ?>\r\r
-</p>\r\r
-        <table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-            <tr>\r\r
-              <td><div align="center"></div></td>\r\r
-            </tr>\r\r
-        </table>\r\r
-         \r\r
-        \r\r
-      </div></td>\r\r
-  </tr>\r\r
-</table>\r\r
-<br>\r\r
-<A href="http://www.amsmerchant.com" target="_blank"></A><br>\r\r
-<br>\r\r
-</body>\r\r
-</html>\r\r
+<? 
+\r
+//Set permission level threshold for this page remove if page is good for all levels
+\r
+$permission_level=5;
+\r
+
+\r
+include"auth_check_header.php";
+\r
+
+\r
+?>     
+\r
+
+\r
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+\r
+<html xmlns='http://www.w3.org/1999/xhtml'>
+\r
+<head>
+\r
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
+\r
+<title>AMS Agent Index</title>
+\r
+</head>
+\r
+
+\r
+<body topmargin="0">
+\r
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+  <tr>
+\r
+    <td valign="top"><div align="center"><strong><font size="3"><font face="Verdana, Arial, Helvetica, sans-serif">
+\r
+      <legend><font size="4">Delete User </font><font size="2"><br />
+\r
+        </font></legend>
+\r
+      </font></font></strong>
+\r
+    </div>
+\r
+      <div style="text-align:left; width:100%; margin-top:10px;">
+\r
+        <p align="center"><? include"include_menu.php"; ?></p>
+\r
+        <p align="center">
+\r
+          <?
+\r
+                         
+\r
+                         
+\r
+                         $id = $_REQUEST['id'];
+\r
+                         
+\r
+                         echo "<br><br><font face='Verdana, Arial, Helvetica, sans-serif' size='2' color='#000000'>Are you sure you want to delete user ID: $id?<br><br><a href='edit_user.php?id=$id'>No</a><br><br><a href='delete_user.php?id=$id'>Yes</a></font>";
+\r
+                         
+\r
+               
+\r
+                         ?>
+\r
+</p>
+\r
+        <table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+            <tr>
+\r
+              <td><div align="center"></div></td>
+\r
+            </tr>
+\r
+        </table>
+\r
+         
+\r
+        
+\r
+      </div></td>
+\r
+  </tr>
+\r
+</table>
+\r
+<br>
+\r
+<A href="http://www.amsmerchant.com" target="_blank"></A><br>
+\r
+<br>
+\r
+</body>
+\r
+</html>
+\r
index b1200e8..528c034 100644 (file)
-<? \r\r
-//Set permission level threshold for this page remove if page is good for all levels\r\r
-$permission_level=5;\r\r
-\r\r
-include"auth_check_header.php";\r\r
-\r\r
-?>     \r\r
-\r\r
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\r
-<html xmlns='http://www.w3.org/1999/xhtml'>\r\r
-<head>\r\r
-<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\r\r
-<title>AMS Agent Index</title>\r\r
-</head>\r\r
-\r\r
-<body topmargin="0">\r\r
-<table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-  <tr>\r\r
-    <td valign="top"><div align="center"><strong><font size="3"><font face="Verdana, Arial, Helvetica, sans-serif">\r\r
-      <legend><font size="4">Edit User </font><font size="2"><br />\r\r
-        </font></legend>\r\r
-      </font></font></strong>\r\r
-    </div>\r\r
-      <div style="text-align:left; width:100%; margin-top:10px;">\r\r
-        <p align="center"><? include"include_menu.php"; ?></p>\r\r
-        <form action="edit_user_save.php" method="post" name="form" id="form">\r\r
-          <table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-            <tr>\r\r
-              <td><div align="center">\r\r
-                  <p>&nbsp;<?\r\r
-                       \r\r
-$var = $_REQUEST['q'];\r\r
-$id = $_REQUEST['id'];\r\r
-                       \r\r
-$color1 = "#ffffff";  \r\r
-$color2 = "#ebebeb";   \r\r
-\r\r
-echo"<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>\r\r
-               <table width='100%' cellpadding='5'>";  \r\r
-                          \r\r
-\r\r
-$query = "SELECT * FROM users WHERE `id`='$id'"; \r\r
-\r\r
-$numresults=mysqli_query($query);\r\r
-$numrows=mysqli_num_rows($numresults); \r\r
-\r\r
-// get results\r\r
-$result = mysqli_query($query) or die("Couldn't execute query");\r\r
-\r\r
-// now you can display the results returned\r\r
-while ($row= mysqli_fetch_array($result)) {\r\r
-\r\r
-$id= $row["id"];\r\r
-$username= $row["username"];\r\r
-$password= $row["password"];\r\r
-$lastname= $row["lastname"];\r\r
-$firstname= $row["firstname"];\r\r
-$phone= $row["phone"];\r\r
-$notes= $row["notes"];\r\r
-$email= $row["email"];\r\r
-$permissions= $row["permissions"];\r\r
-$email_sub = substr($email, 0, 50);\r\r
-\r\r
-} \r\r
-\r\r
-\r\r
-echo"</tabel></font>";\r\r
-\r\r
-                       \r\r
-                       ?>\r\r
-</p>\r\r
-                  <table width='49%' border='0' align="center" cellpadding='10' cellspacing='0'>\r\r
-                    <tr>\r\r
-                      <td width="295" bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">ID</font></td>\r\r
-                      <td width='342' bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                       <? echo $id; ?><input type="hidden" width="50" name="id" value = '<? echo $id; ?>' /> </font></td>\r\r
-                    </tr>\r\r
-                    <tr>\r\r
-                      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Username</font></td>\r\r
-                      <td width='342'><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                      <? echo $username; ?></font></td>\r\r
-                    </tr>\r\r
-                    <tr>\r\r
-                      <td bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password</font></td>\r\r
-                      <td width='342' bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                       <? echo $password; ?></font></td>\r\r
-                    </tr>\r\r
-                    <tr>\r\r
-                      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Lastname</font></td>\r\r
-                      <td width='342'><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                        <input type="text" width="50" name="lastname" value = '<? echo $lastname; ?>' />\r\r
-                      </font></td>\r\r
-                    </tr>\r\r
-                    <tr>\r\r
-                      <td bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Firstname</font></td>\r\r
-                      <td width='342' bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                        <input type="text" width="50" name="firstname" value = '<? echo $firstname; ?>' />\r\r
-                      </font></td>\r\r
-                    </tr>\r\r
-                    <tr>\r\r
-                      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Phone</font></td>\r\r
-                      <td width='342'><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                        <input type="text" width="50" name="phone" value = '<? echo $phone; ?>' />\r\r
-                      </font></td>\r\r
-                    </tr>\r\r
-                    <tr>\r\r
-                      <td bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Email </font></td>\r\r
-                      <td width='342' bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                        <input type="text" width="50" name="email" value = '<? echo $email; ?>' />\r\r
-                      </font></td>\r\r
-                    </tr>\r\r
-                                          <tr>\r\r
-                      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Permissions</font></td>\r\r
-                      <td width='342'><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                        <input type="text" width="50" name="permissions" value = '<? echo $permissions; ?>' />\r\r
-                      </font></td>\r\r
-                    </tr>\r\r
-                                        <tr>\r\r
-                      <td bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Notes</font></td>\r\r
-                      <td width='342' bgcolor="#ebebeb"><p><b>\r\r
-                        <textarea name="notes" cols="45" rows="8"><? echo $notes; ?></textarea>\r\r
-                       </b></p>                       </td>\r\r
-                    </tr>\r\r
-                  </table>\r\r
-                  <p>\r\r
-                    <input type="submit" name="Submit" value="Save Changes" />\r\r
-                  </p>\r\r
-                  <p>&nbsp;</p>\r\r
-                  <p><a href="delete_user_confirm.php?id=<? echo $id; ?>"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Delete User </font></a></p>\r\r
-              </div></td>\r\r
-            </tr>\r\r
-          </table>\r\r
-          <p>\r\r
-          \r\r
-          <p>&nbsp;</p>\r\r
-          <p>\r\r
-          \r\r
-          <p>\r\r
-          <p>&nbsp;</p>\r\r
-          <p>&nbsp; </p>\r\r
-        </form>\r\r
-        </p>\r\r
-      </div></td>\r\r
-  </tr>\r\r
-</table>\r\r
-<br>\r\r
-<A href="http://www.amsmerchant.com" target="_blank"></A><br>\r\r
-<br>\r\r
-</body>\r\r
-</html>\r\r
+<? 
+\r
+//Set permission level threshold for this page remove if page is good for all levels
+\r
+$permission_level=5;
+\r
+
+\r
+include"auth_check_header.php";
+\r
+
+\r
+?>     
+\r
+
+\r
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+\r
+<html xmlns='http://www.w3.org/1999/xhtml'>
+\r
+<head>
+\r
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
+\r
+<title>AMS Agent Index</title>
+\r
+</head>
+\r
+
+\r
+<body topmargin="0">
+\r
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+  <tr>
+\r
+    <td valign="top"><div align="center"><strong><font size="3"><font face="Verdana, Arial, Helvetica, sans-serif">
+\r
+      <legend><font size="4">Edit User </font><font size="2"><br />
+\r
+        </font></legend>
+\r
+      </font></font></strong>
+\r
+    </div>
+\r
+      <div style="text-align:left; width:100%; margin-top:10px;">
+\r
+        <p align="center"><? include"include_menu.php"; ?></p>
+\r
+        <form action="edit_user_save.php" method="post" name="form" id="form">
+\r
+          <table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+            <tr>
+\r
+              <td><div align="center">
+\r
+                  <p>&nbsp;<?
+\r
+                       
+\r
+$var = $_REQUEST['q'];
+\r
+$id = $_REQUEST['id'];
+\r
+                       
+\r
+$color1 = "#ffffff";  
+\r
+$color2 = "#ebebeb";   
+\r
+
+\r
+echo"<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>
+\r
+               <table width='100%' cellpadding='5'>";  
+\r
+                          
+\r
+
+\r
+$query = "SELECT * FROM users WHERE `id`='$id'"; 
+\r
+
+\r
+$numresults=mysqli_query($query);
+\r
+$numrows=mysqli_num_rows($numresults); 
+\r
+
+\r
+// get results
+\r
+$result = mysqli_query($query) or die("Couldn't execute query");
+\r
+
+\r
+// now you can display the results returned
+\r
+while ($row= mysqli_fetch_array($result)) {
+\r
+
+\r
+$id= $row["id"];
+\r
+$username= $row["username"];
+\r
+$password= $row["password"];
+\r
+$lastname= $row["lastname"];
+\r
+$firstname= $row["firstname"];
+\r
+$phone= $row["phone"];
+\r
+$notes= $row["notes"];
+\r
+$email= $row["email"];
+\r
+$permissions= $row["permissions"];
+\r
+$email_sub = substr($email, 0, 50);
+\r
+
+\r
+} 
+\r
+
+\r
+
+\r
+echo"</tabel></font>";
+\r
+
+\r
+                       
+\r
+                       ?>
+\r
+</p>
+\r
+                  <table width='49%' border='0' align="center" cellpadding='10' cellspacing='0'>
+\r
+                    <tr>
+\r
+                      <td width="295" bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">ID</font></td>
+\r
+                      <td width='342' bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                       <? echo $id; ?><input type="hidden" width="50" name="id" value = '<? echo $id; ?>' /> </font></td>
+\r
+                    </tr>
+\r
+                    <tr>
+\r
+                      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Username</font></td>
+\r
+                      <td width='342'><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                      <? echo $username; ?></font></td>
+\r
+                    </tr>
+\r
+                    <tr>
+\r
+                      <td bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password</font></td>
+\r
+                      <td width='342' bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                       <? echo $password; ?></font></td>
+\r
+                    </tr>
+\r
+                    <tr>
+\r
+                      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Lastname</font></td>
+\r
+                      <td width='342'><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                        <input type="text" width="50" name="lastname" value = '<? echo $lastname; ?>' />
+\r
+                      </font></td>
+\r
+                    </tr>
+\r
+                    <tr>
+\r
+                      <td bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Firstname</font></td>
+\r
+                      <td width='342' bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                        <input type="text" width="50" name="firstname" value = '<? echo $firstname; ?>' />
+\r
+                      </font></td>
+\r
+                    </tr>
+\r
+                    <tr>
+\r
+                      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Phone</font></td>
+\r
+                      <td width='342'><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                        <input type="text" width="50" name="phone" value = '<? echo $phone; ?>' />
+\r
+                      </font></td>
+\r
+                    </tr>
+\r
+                    <tr>
+\r
+                      <td bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Email </font></td>
+\r
+                      <td width='342' bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                        <input type="text" width="50" name="email" value = '<? echo $email; ?>' />
+\r
+                      </font></td>
+\r
+                    </tr>
+\r
+                                          <tr>
+\r
+                      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Permissions</font></td>
+\r
+                      <td width='342'><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                        <input type="text" width="50" name="permissions" value = '<? echo $permissions; ?>' />
+\r
+                      </font></td>
+\r
+                    </tr>
+\r
+                                        <tr>
+\r
+                      <td bgcolor="#ebebeb"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Notes</font></td>
+\r
+                      <td width='342' bgcolor="#ebebeb"><p><b>
+\r
+                        <textarea name="notes" cols="45" rows="8"><? echo $notes; ?></textarea>
+\r
+                       </b></p>                       </td>
+\r
+                    </tr>
+\r
+                  </table>
+\r
+                  <p>
+\r
+                    <input type="submit" name="Submit" value="Save Changes" />
+\r
+                  </p>
+\r
+                  <p>&nbsp;</p>
+\r
+                  <p><a href="delete_user_confirm.php?id=<? echo $id; ?>"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Delete User </font></a></p>
+\r
+              </div></td>
+\r
+            </tr>
+\r
+          </table>
+\r
+          <p>
+\r
+          
+\r
+          <p>&nbsp;</p>
+\r
+          <p>
+\r
+          
+\r
+          <p>
+\r
+          <p>&nbsp;</p>
+\r
+          <p>&nbsp; </p>
+\r
+        </form>
+\r
+        </p>
+\r
+      </div></td>
+\r
+  </tr>
+\r
+</table>
+\r
+<br>
+\r
+<A href="http://www.amsmerchant.com" target="_blank"></A><br>
+\r
+<br>
+\r
+</body>
+\r
+</html>
+\r
index 616bc96..6810928 100644 (file)
-<? \r\r
-//Set permission level threshold for this page remove if page is good for all levels\r\r
-$permission_level=5;\r\r
-\r\r
-include"auth_check_header.php";\r\r
-\r\r
-?>     \r\r
-\r\r
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\r
-<html xmlns='http://www.w3.org/1999/xhtml'>\r\r
-<head>\r\r
-<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\r\r
-<title>AMS Agent Index</title>\r\r
-</head>\r\r
-\r\r
-<body topmargin="0">\r\r
-<table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-  <tr>\r\r
-    <td valign="top"><div align="center"><strong><font size="3"><font face="Verdana, Arial, Helvetica, sans-serif">\r\r
-      <legend><font size="4">Edit User </font><font size="2"><br />\r\r
-        </font></legend>\r\r
-      </font></font></strong>\r\r
-    </div>\r\r
-      <div style="text-align:left; width:100%; margin-top:10px;">\r\r
-        <p align="center"><strong><font face="Verdana, Arial, Helvetica, sans-serif"><a href='admin_index.php'><font size="2"><strong>Admin Index</strong></font></a></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;|&nbsp;</font><font face="Verdana, Arial, Helvetica, sans-serif"><a href="traffic.php"><font size="2">Traffic Report</font></a></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">| </font></strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><a href="logout.php">Logout</a></strong></font></p>\r\r
-     \r\r
-          <table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-            <tr>\r\r
-              <td><?\r\r
-                         \r\r
-                         \r\r
-                         $id = $_REQUEST['id'];\r\r
-                         $lastname = $_REQUEST['lastname'];\r\r
-                         $firstname = $_REQUEST['firstname'];\r\r
-                         $phone = $_REQUEST['phone'];\r\r
-                         $email = $_REQUEST['email'];\r\r
-                         $permissions = $_REQUEST['permissions'];\r\r
-                         $notes = $_REQUEST['notes'];\r\r
-                         \r\r
-                         \r\r
-$query = "UPDATE `users` SET\r\r
-`lastname`='$lastname',\r\r
-`firstname`='$firstname',\r\r
-`phone`='$phone',\r\r
-`email`='$email',\r\r
-`permissions`='$permissions',\r\r
-`notes`='$notes' \r\r
-WHERE `id`='$id'";\r\r
-\r\r
-// save the info to the database\r\r
-$results = mysqli_query( $query );\r\r
-\r\r
-// print out the results\r\r
-if( $results )\r\r
-\r\r
-{ echo( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Your changes have been made sucessfully.</font>" );\r\r
-}\r\r
-else\r\r
-{\r\r
-die( "Trouble saving information to the database: " . mysqli_error() );\r\r
-}\r\r
-\r\r
-\r\r
-\r\r
-                         \r\r
-                         \r\r
-                         ?>\r\r
-              <div align="center"></div></td>\r\r
-            </tr>\r\r
-          </table>\r\r
-         \r\r
-        \r\r
-      </div></td>\r\r
-  </tr>\r\r
-</table>\r\r
-<br>\r\r
-<A href="http://www.amsmerchant.com" target="_blank"></A><br>\r\r
-<br>\r\r
-</body>\r\r
-</html>\r\r
+<? 
+\r
+//Set permission level threshold for this page remove if page is good for all levels
+\r
+$permission_level=5;
+\r
+
+\r
+include"auth_check_header.php";
+\r
+
+\r
+?>     
+\r
+
+\r
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+\r
+<html xmlns='http://www.w3.org/1999/xhtml'>
+\r
+<head>
+\r
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
+\r
+<title>AMS Agent Index</title>
+\r
+</head>
+\r
+
+\r
+<body topmargin="0">
+\r
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+  <tr>
+\r
+    <td valign="top"><div align="center"><strong><font size="3"><font face="Verdana, Arial, Helvetica, sans-serif">
+\r
+      <legend><font size="4">Edit User </font><font size="2"><br />
+\r
+        </font></legend>
+\r
+      </font></font></strong>
+\r
+    </div>
+\r
+      <div style="text-align:left; width:100%; margin-top:10px;">
+\r
+        <p align="center"><strong><font face="Verdana, Arial, Helvetica, sans-serif"><a href='admin_index.php'><font size="2"><strong>Admin Index</strong></font></a></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;|&nbsp;</font><font face="Verdana, Arial, Helvetica, sans-serif"><a href="traffic.php"><font size="2">Traffic Report</font></a></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">| </font></strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><a href="logout.php">Logout</a></strong></font></p>
+\r
+     
+\r
+          <table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+            <tr>
+\r
+              <td><?
+\r
+                         
+\r
+                         
+\r
+                         $id = $_REQUEST['id'];
+\r
+                         $lastname = $_REQUEST['lastname'];
+\r
+                         $firstname = $_REQUEST['firstname'];
+\r
+                         $phone = $_REQUEST['phone'];
+\r
+                         $email = $_REQUEST['email'];
+\r
+                         $permissions = $_REQUEST['permissions'];
+\r
+                         $notes = $_REQUEST['notes'];
+\r
+                         
+\r
+                         
+\r
+$query = "UPDATE `users` SET
+\r
+`lastname`='$lastname',
+\r
+`firstname`='$firstname',
+\r
+`phone`='$phone',
+\r
+`email`='$email',
+\r
+`permissions`='$permissions',
+\r
+`notes`='$notes' 
+\r
+WHERE `id`='$id'";
+\r
+
+\r
+// save the info to the database
+\r
+$results = mysqli_query( $query );
+\r
+
+\r
+// print out the results
+\r
+if( $results )
+\r
+
+\r
+{ echo( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Your changes have been made sucessfully.</font>" );
+\r
+}
+\r
+else
+\r
+{
+\r
+die( "Trouble saving information to the database: " . mysqli_error() );
+\r
+}
+\r
+
+\r
+
+\r
+
+\r
+                         
+\r
+                         
+\r
+                         ?>
+\r
+              <div align="center"></div></td>
+\r
+            </tr>
+\r
+          </table>
+\r
+         
+\r
+        
+\r
+      </div></td>
+\r
+  </tr>
+\r
+</table>
+\r
+<br>
+\r
+<A href="http://www.amsmerchant.com" target="_blank"></A><br>
+\r
+<br>
+\r
+</body>
+\r
+</html>
+\r
index 9dcc9a8..9ec2b8e 100644 (file)
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\r
-<html xmlns='http://www.w3.org/1999/xhtml'>\r\r
-<head>\r\r
-<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\r\r
-<title>Untitled Document</title>\r\r
-</head>\r\r
-\r\r
-<body topmargin="0">\r\r
-<table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-  <tr>\r\r
-    <td><div align="center">\r\r
-     \r\r
-      <form action="email_password_sender.php" method="post" name="form" id="form">\r\r
-      \r\r
-        <div align="center"><strong><font size="3">\r\r
-          <font face="Verdana, Arial, Helvetica, sans-serif">\r\r
-          <legend><font size="4"><br>\r\r
-          <br>\r\r
-          Reset Password Via Email </font><font size="2"><br>\r\r
-          <br>\r\r
-          <br />\r\r
-          </font></legend>\r\r
-          </font></font></strong>\r\r
-            <div style="text-align:left; width:400px; height:20px; margin-top:10px;">\r\r
-              <div style=" float:left; text-align:right; width:200px; border:1px; padding-right:10px;"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Email Address Associated with this account </font></strong></div>\r\r
-              <div style="float:left; text-align:left; border: 1px; width:140px; ">\r\r
-                <font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                <input type="text" name="email" value = '' />\r\r
-              </font></div>\r\r
-            </div>\r\r
-            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>\r\r
-              <input name="submit" type="submit" value="Submit" />\r\r
-            </strong></font></p>\r\r
-            <p class="submit"><a href="login.php"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">I remember now. Back to Login </font></a></p>\r\r
-            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="email_password.php"></a></font></p>\r\r
-            <p class="submit">&nbsp;</p>\r\r
-            <p class="submit">&nbsp;</p>\r\r
-            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="agent_add_form.php"></a></font></p>\r\r
-          <strong><font size="3">\r\r
-            <legend><br />\r\r
-            </legend>\r\r
-          </font></strong></div>\r\r
-         \r\r
-      </form>\r\r
-      <p align="left"><br>\r\r
-      </p>\r\r
-    </div></td>\r\r
-  </tr>\r\r
-</table>\r\r
-<br>\r\r
-<A href="http://www.amsmerchant.com" target="_blank"></A><br>\r\r
-<br>\r\r
-</body>\r\r
-</html>\r\r
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+\r
+<html xmlns='http://www.w3.org/1999/xhtml'>
+\r
+<head>
+\r
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
+\r
+<title>Untitled Document</title>
+\r
+</head>
+\r
+
+\r
+<body topmargin="0">
+\r
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+  <tr>
+\r
+    <td><div align="center">
+\r
+     
+\r
+      <form action="email_password_sender.php" method="post" name="form" id="form">
+\r
+      
+\r
+        <div align="center"><strong><font size="3">
+\r
+          <font face="Verdana, Arial, Helvetica, sans-serif">
+\r
+          <legend><font size="4"><br>
+\r
+          <br>
+\r
+          Reset Password Via Email </font><font size="2"><br>
+\r
+          <br>
+\r
+          <br />
+\r
+          </font></legend>
+\r
+          </font></font></strong>
+\r
+            <div style="text-align:left; width:400px; height:20px; margin-top:10px;">
+\r
+              <div style=" float:left; text-align:right; width:200px; border:1px; padding-right:10px;"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Email Address Associated with this account </font></strong></div>
+\r
+              <div style="float:left; text-align:left; border: 1px; width:140px; ">
+\r
+                <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                <input type="text" name="email" value = '' />
+\r
+              </font></div>
+\r
+            </div>
+\r
+            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>
+\r
+              <input name="submit" type="submit" value="Submit" />
+\r
+            </strong></font></p>
+\r
+            <p class="submit"><a href="login.php"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">I remember now. Back to Login </font></a></p>
+\r
+            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="email_password.php"></a></font></p>
+\r
+            <p class="submit">&nbsp;</p>
+\r
+            <p class="submit">&nbsp;</p>
+\r
+            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="agent_add_form.php"></a></font></p>
+\r
+          <strong><font size="3">
+\r
+            <legend><br />
+\r
+            </legend>
+\r
+          </font></strong></div>
+\r
+         
+\r
+      </form>
+\r
+      <p align="left"><br>
+\r
+      </p>
+\r
+    </div></td>
+\r
+  </tr>
+\r
+</table>
+\r
+<br>
+\r
+<A href="http://www.amsmerchant.com" target="_blank"></A><br>
+\r
+<br>
+\r
+</body>
+\r
+</html>
+\r
index 9bd66a1..ce63278 100644 (file)
-<?\r\r
-\r\r
-include "master_inc.php";\r\r
-\r\r
-$email  = $_REQUEST['email'];\r\r
-$sql    = "SELECT * FROM ".$usertable." WHERE email='".mysqli_real_escape_string(trim($email))."'";\r\r
-$result = mysqli_query($db,$sql);\r\r
-\r\r
-// mysqli_num_row is counting table rows\r\r
-$count  = mysqli_num_rows($result);\r\r
-\r\r
-// If result matches $myusername and $mypassword, table row must be 1 row\r\r
-if($count == 0){\r\r
-\r\r
-  die("<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Sorry but we don't have that email in our system.  <a href='email_password.php'>Please try again.</a>  Thank you!</font>");\r\r
-\r\r
-}else{\r\r
-       \r\r
-  //comes from config which pulls from /inc\r\r
-  $email_body = $forgot_password_email;\r\r
-}\r\r
-               \r\r
-$from        = $from_email;\r\r
-$reply_to    = $reply_to_email;\r\r
-$return_path = $return_path_email;\r\r
-\r\r
-$to = $email;\r\r
-\r\r
-$subject = $forgot_password_email_subject;\r\r
-\r\r
-//***attaches view tracker to link tracked code*** - CCC\r\r
-$mailbody= "$email_body";\r\r
-\r\r
-//____________________________Begin Multipart Mail Sender\r\r
-//add From: header \r\r
-$headers = "From:$from\nReply-to:$reply_to\nReturn-path:$return_path\nJobID:$date\n"; \r\r
-\r\r
-//specify MIME version 1.0 \r\r
-$headers .= "MIME-Version: 1.0\n"; \r\r
-\r\r
-//unique boundary \r\r
-$boundary = uniqid("HTMLDEMO8656856"); \r\r
-\r\r
-//tell e-mail client this e-mail contains//alternate versions \r\r
-$headers.="X-Priority: 3\n";\r\r
-$headers.="Content-Type: multipart/alternative; boundary=\"".$boundary."\"\n";\r\r
-$headers.="Content-Transfer-Encoding: 7bit\n";\r\r
-\r\r
-//message to people with clients who don't \r\r
-//understand MIME \r\r
-$headers .= "This is a MIME encoded message.\n\n"; \r\r
-\r\r
-//plain text version of message \r\r
-$headers .= "--$boundary\n" . \r\r
-   "Content-Type: text/plain; charset=ISO-8859-1\r\n" . \r\r
-   "Content-Transfer-Encoding: base64\n\n"; \r\r
-$headers .= chunk_split(base64_encode("$mailbody")); \r\r
-\r\r
-//HTML version of message \r\r
-$headers .= "--$boundary\n" . \r\r
-   "Content-Type: text/html; charset=ISO-8859-1\n" . \r\r
-   "Content-Transfer-Encoding: base64\n\n"; \r\r
-$headers .= chunk_split(base64_encode("$mailbody")); \r\r
-\r\r
-//send message\r\r
-\r\r
-If (mail("$to", "$subject", "", $headers))\r\r
-{\r\r
-echo"<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>An account verification link has been sent to <b><a href='mailto:$email'>$email</a></b>. This link will allow you to reset your password<br><br> Emails may take up to 10 minutes to arrive.  Check your spam folder also and whitelist this site if you find our message there.  Thanks!<br<br>\r\r
-<a href='login.php'>Back to login</a></font>";\r\r
-}\r\r
-?>\r\r
+<?
+\r
+
+\r
+include "master_inc.php";
+\r
+
+\r
+$email  = $_REQUEST['email'];
+\r
+$sql    = "SELECT * FROM ".$usertable." WHERE email='".mysqli_real_escape_string(trim($email))."'";
+\r
+$result = mysqli_query($db,$sql);
+\r
+
+\r
+// mysqli_num_row is counting table rows
+\r
+$count  = mysqli_num_rows($result);
+\r
+
+\r
+// If result matches $myusername and $mypassword, table row must be 1 row
+\r
+if($count == 0){
+\r
+
+\r
+  die("<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Sorry but we don't have that email in our system.  <a href='email_password.php'>Please try again.</a>  Thank you!</font>");
+\r
+
+\r
+}else{
+\r
+       
+\r
+  //comes from config which pulls from /inc
+\r
+  $email_body = $forgot_password_email;
+\r
+}
+\r
+               
+\r
+$from        = $from_email;
+\r
+$reply_to    = $reply_to_email;
+\r
+$return_path = $return_path_email;
+\r
+
+\r
+$to = $email;
+\r
+
+\r
+$subject = $forgot_password_email_subject;
+\r
+
+\r
+//***attaches view tracker to link tracked code*** - CCC
+\r
+$mailbody= "$email_body";
+\r
+
+\r
+//____________________________Begin Multipart Mail Sender
+\r
+//add From: header 
+\r
+$headers = "From:$from\nReply-to:$reply_to\nReturn-path:$return_path\nJobID:$date\n"; 
+\r
+
+\r
+//specify MIME version 1.0 
+\r
+$headers .= "MIME-Version: 1.0\n"; 
+\r
+
+\r
+//unique boundary 
+\r
+$boundary = uniqid("HTMLDEMO8656856"); 
+\r
+
+\r
+//tell e-mail client this e-mail contains//alternate versions 
+\r
+$headers.="X-Priority: 3\n";
+\r
+$headers.="Content-Type: multipart/alternative; boundary=\"".$boundary."\"\n";
+\r
+$headers.="Content-Transfer-Encoding: 7bit\n";
+\r
+
+\r
+//message to people with clients who don't 
+\r
+//understand MIME 
+\r
+$headers .= "This is a MIME encoded message.\n\n"; 
+\r
+
+\r
+//plain text version of message 
+\r
+$headers .= "--$boundary\n" . 
+\r
+   "Content-Type: text/plain; charset=ISO-8859-1\r\n" . 
+\r
+   "Content-Transfer-Encoding: base64\n\n"; 
+\r
+$headers .= chunk_split(base64_encode("$mailbody")); 
+\r
+
+\r
+//HTML version of message 
+\r
+$headers .= "--$boundary\n" . 
+\r
+   "Content-Type: text/html; charset=ISO-8859-1\n" . 
+\r
+   "Content-Transfer-Encoding: base64\n\n"; 
+\r
+$headers .= chunk_split(base64_encode("$mailbody")); 
+\r
+
+\r
+//send message
+\r
+
+\r
+If (mail("$to", "$subject", "", $headers))
+\r
+{
+\r
+echo"<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>An account verification link has been sent to <b><a href='mailto:$email'>$email</a></b>. This link will allow you to reset your password<br><br> Emails may take up to 10 minutes to arrive.  Check your spam folder also and whitelist this site if you find our message there.  Thanks!<br<br>
+\r
+<a href='login.php'>Back to login</a></font>";
+\r
+}
+\r
+?>
+\r
index a8fea5d..d3e6c2c 100644 (file)
@@ -1,25 +1,50 @@
-<?\r\r
-\r\r
-include"master_inc.php";\r\r
-\r\r
-$sql="SELECT * FROM users WHERE username='$username_from_cookie'";\r\r
-\r\r
-$result=mysqli_query($db,$sql);\r\r
-\r\r
-// mysqli_num_row is counting table rows\r\r
-\r\r
-$count=mysqli_num_rows($result);\r\r
-\r\r
-//echo "count: $count<br>";\r\r
-\r\r
-// If result matches $myusername and $mypassword, table row must be 1 row\r\r
-\r\r
-if($count==0){\r\r
-\r\r
-{\r\r
-\r\r
-echo"Sorry but we don't have that email in our system.  <a href='email_password.php'>Please try again.</a>  Thank you!"\r\r
-\r\r
-}\r\r
-\r\r
-?>\r\r
+<?
+\r
+
+\r
+include"master_inc.php";
+\r
+
+\r
+$sql="SELECT * FROM users WHERE username='$username_from_cookie'";
+\r
+
+\r
+$result=mysqli_query($db,$sql);
+\r
+
+\r
+// mysqli_num_row is counting table rows
+\r
+
+\r
+$count=mysqli_num_rows($result);
+\r
+
+\r
+//echo "count: $count<br>";
+\r
+
+\r
+// If result matches $myusername and $mypassword, table row must be 1 row
+\r
+
+\r
+if($count==0){
+\r
+
+\r
+{
+\r
+
+\r
+echo"Sorry but we don't have that email in our system.  <a href='email_password.php'>Please try again.</a>  Thank you!"
+\r
+
+\r
+}
+\r
+
+\r
+?>
+\r
index d6d1b4d..7546a05 100644 (file)
@@ -1 +1,2 @@
-<strong><font face="Verdana, Arial, Helvetica, sans-serif"><a href='admin_index.php'><font size="2"><strong>Admin Index</strong></font></a></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> | </font></strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><a href="logout.php">Logout</a></strong></font>\r\r
+<strong><font face="Verdana, Arial, Helvetica, sans-serif"><a href='admin_index.php'><font size="2"><strong>Admin Index</strong></font></a></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> | </font></strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><a href="logout.php">Logout</a></strong></font>
+\r
index 917dfcb..d257b0b 100644 (file)
@@ -1,41 +1,82 @@
-<?php\r\r
-\r\r
-\r\r
-include"master_inc.php";\r\r
-\r\r
-\r\r
-function sanitize_paranoid_string($string, $min='', $max='')\r\r
-{\r\r
-  $string = preg_replace("/[^a-zA-Z0-9:\/\._]/", "", $string);\r\r
-  $len = strlen($string);\r\r
-  if((($min != '') && ($len < $min)) || (($max != '') && ($len > $max)))\r\r
-    return FALSE;\r\r
-  return $string;\r\r
-}\r\r
-         \r\r
-         \r\r
-              $site = $_REQUEST['site'];\r\r
-                  $site = sanitize_paranoid_string($site);             \r\r
-                  \r\r
-                  //Time & Date\r\r
-                       $date = date ('m/d/y  g:i a');\r\r
-                       \r\r
-                       //IP Address\r\r
-                       $ip = $_SERVER['REMOTE_ADDR'];\r\r
-                       \r\r
-                       $type = "link";\r\r
-                       \r\r
-          $query = "INSERT INTO `traffic` (`date`,`ip`,`link`,`notes`,`site`,`type`) \r\r
-         VALUES ( '$date','$ip','$link','$notes','$site','$type')";   \r\r
-                                \r\r
-                 // save the info to the database\r\r
-   $results = mysqli_query( $query );\r\r
-\r\r
-$url = str_replace("316AMPERSAND316","&","$link");\r\r
-\r\r
-//echo "URL: $url";\r\r
-\r\r
-header ("Location: $url");\r\r
-\r\r
-\r\r
-?>\r\r
+<?php
+\r
+
+\r
+
+\r
+include"master_inc.php";
+\r
+
+\r
+
+\r
+function sanitize_paranoid_string($string, $min='', $max='')
+\r
+{
+\r
+  $string = preg_replace("/[^a-zA-Z0-9:\/\._]/", "", $string);
+\r
+  $len = strlen($string);
+\r
+  if((($min != '') && ($len < $min)) || (($max != '') && ($len > $max)))
+\r
+    return FALSE;
+\r
+  return $string;
+\r
+}
+\r
+         
+\r
+         
+\r
+              $site = $_REQUEST['site'];
+\r
+                  $site = sanitize_paranoid_string($site);             
+\r
+                  
+\r
+                  //Time & Date
+\r
+                       $date = date ('m/d/y  g:i a');
+\r
+                       
+\r
+                       //IP Address
+\r
+                       $ip = $_SERVER['REMOTE_ADDR'];
+\r
+                       
+\r
+                       $type = "link";
+\r
+                       
+\r
+          $query = "INSERT INTO `traffic` (`date`,`ip`,`link`,`notes`,`site`,`type`) 
+\r
+         VALUES ( '$date','$ip','$link','$notes','$site','$type')";   
+\r
+                                
+\r
+                 // save the info to the database
+\r
+   $results = mysqli_query( $query );
+\r
+
+\r
+$url = str_replace("316AMPERSAND316","&","$link");
+\r
+
+\r
+//echo "URL: $url";
+\r
+
+\r
+header ("Location: $url");
+\r
+
+\r
+
+\r
+?>
+\r
index 35fbd8f..7896f65 100644 (file)
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\r
-<html xmlns='http://www.w3.org/1999/xhtml'>\r\r
-<head>\r\r
-<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\r\r
-<title>Untitled Document</title>\r\r
-</head>\r\r
-\r\r
-<body topmargin="0">\r\r
-<table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-  <tr>\r\r
-    <td><div align="center">\r\r
-      <p></p>\r\r
-      <form action="checklogin.php" method="post" name="form" id="form">\r\r
-      \r\r
-        <div align="center"><strong><font size="3">\r\r
-          <font face="Verdana, Arial, Helvetica, sans-serif">\r\r
-          <legend><font size="4"><br>\r\r
-          <br>\r\r
-          <a href="http://www.basiclogin.com" target="_blank">BasicLogin</a></font><font size="2"><br>\r\r
-          <br>\r\r
-          <br />\r\r
-          </font></legend>\r\r
-          </font></font></strong>\r\r
-            <div style="text-align:left; width:300px; height:20px; margin-top:10px;">\r\r
-              <div style=" float:left; text-align:right; width:100px; border:1px; padding-right:10px;"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Username</strong></font></div>\r\r
-              <div style="float:left; text-align:left; border: 1px; width:140px; ">\r\r
-                <font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                <input type="text" name="username" value = '<? //echo $username; ?>' />\r\r
-              </font></div>\r\r
-            </div>\r\r
-          <div style="text-align:left; width:300px; height:20px; margin-top:10px;">\r\r
-              <div style=" float:left; text-align:right; width:100px; border:1px; padding-right:10px;"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Password</strong></font></div>\r\r
-            <div style="float:left; text-align:left; border: 1px; width:140px; ">\r\r
-                <font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                <input type="password" name="password" value = '<? //echo $password; ?>' />\r\r
-              </font></div>\r\r
-            <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><br />\r\r
-            </strong></font></div>\r\r
-          \r\r
-            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>\r\r
-              <input name="submit" type="submit" value="Submit" />\r\r
-            </strong></font></p>\r\r
-            <p class="submit"><a href="user_add.php"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Create a new account </font></a></p>\r\r
-            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="email_password.php">Forgot Password / Change Password </a></font></p>\r\r
-            <p class="submit">&nbsp;</p>\r\r
-            <p class="submit">&nbsp;</p>\r\r
-            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="agent_add_form.php"></a></font></p>\r\r
-          <strong><font size="3">\r\r
-            <legend><br />\r\r
-            </legend>\r\r
-          </font></strong></div>\r\r
-         \r\r
-      </form>\r\r
-      <p align="left"><br>\r\r
-      </p>\r\r
-    </div></td>\r\r
-  </tr>\r\r
-</table>\r\r
-<br>\r\r
-<A href="http://www.amsmerchant.com" target="_blank"></A><br>\r\r
-<br>\r\r
-</body>\r\r
-</html>\r\r
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+\r
+<html xmlns='http://www.w3.org/1999/xhtml'>
+\r
+<head>
+\r
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
+\r
+<title>Untitled Document</title>
+\r
+</head>
+\r
+
+\r
+<body topmargin="0">
+\r
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+  <tr>
+\r
+    <td><div align="center">
+\r
+      <p></p>
+\r
+      <form action="checklogin.php" method="post" name="form" id="form">
+\r
+      
+\r
+        <div align="center"><strong><font size="3">
+\r
+          <font face="Verdana, Arial, Helvetica, sans-serif">
+\r
+          <legend><font size="4"><br>
+\r
+          <br>
+\r
+          <a href="http://www.basiclogin.com" target="_blank">BasicLogin</a></font><font size="2"><br>
+\r
+          <br>
+\r
+          <br />
+\r
+          </font></legend>
+\r
+          </font></font></strong>
+\r
+            <div style="text-align:left; width:300px; height:20px; margin-top:10px;">
+\r
+              <div style=" float:left; text-align:right; width:100px; border:1px; padding-right:10px;"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Username</strong></font></div>
+\r
+              <div style="float:left; text-align:left; border: 1px; width:140px; ">
+\r
+                <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                <input type="text" name="username" value = '<? //echo $username; ?>' />
+\r
+              </font></div>
+\r
+            </div>
+\r
+          <div style="text-align:left; width:300px; height:20px; margin-top:10px;">
+\r
+              <div style=" float:left; text-align:right; width:100px; border:1px; padding-right:10px;"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Password</strong></font></div>
+\r
+            <div style="float:left; text-align:left; border: 1px; width:140px; ">
+\r
+                <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                <input type="password" name="password" value = '<? //echo $password; ?>' />
+\r
+              </font></div>
+\r
+            <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><br />
+\r
+            </strong></font></div>
+\r
+          
+\r
+            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>
+\r
+              <input name="submit" type="submit" value="Submit" />
+\r
+            </strong></font></p>
+\r
+            <p class="submit"><a href="user_add.php"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Create a new account </font></a></p>
+\r
+            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="email_password.php">Forgot Password / Change Password </a></font></p>
+\r
+            <p class="submit">&nbsp;</p>
+\r
+            <p class="submit">&nbsp;</p>
+\r
+            <p class="submit"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="agent_add_form.php"></a></font></p>
+\r
+          <strong><font size="3">
+\r
+            <legend><br />
+\r
+            </legend>
+\r
+          </font></strong></div>
+\r
+         
+\r
+      </form>
+\r
+      <p align="left"><br>
+\r
+      </p>
+\r
+    </div></td>
+\r
+  </tr>
+\r
+</table>
+\r
+<br>
+\r
+<A href="http://www.amsmerchant.com" target="_blank"></A><br>
+\r
+<br>
+\r
+</body>
+\r
+</html>
+\r
index efd0e1f..1a98063 100644 (file)
@@ -1,23 +1,46 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r\r
-<html xmlns="http://www.w3.org/1999/xhtml">\r\r
-<head>\r\r
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\r\r
-<title>Untitled Document</title>\r\r
-</head>\r\r
-\r\r
-<body topmargin="0">\r\r
-<table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-  <tr>\r\r
-    <td valign="top"><div align="center">\r\r
-      <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><br />\r\r
-          <br />\r\r
-            <font size="4">Wrong Username / Password combination. <br />\r\r
-            <br />\r\r
-            <a href="login.php">Please try again</a>. Thanks! </font></strong></font></p>\r\r
-      <p align="left"><br />\r\r
-      </p>\r\r
-    </div></td>\r\r
-  </tr>\r\r
-</table>\r\r
-</body>\r\r
-</html>\r\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+\r
+<html xmlns="http://www.w3.org/1999/xhtml">
+\r
+<head>
+\r
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+\r
+<title>Untitled Document</title>
+\r
+</head>
+\r
+
+\r
+<body topmargin="0">
+\r
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+  <tr>
+\r
+    <td valign="top"><div align="center">
+\r
+      <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><br />
+\r
+          <br />
+\r
+            <font size="4">Wrong Username / Password combination. <br />
+\r
+            <br />
+\r
+            <a href="login.php">Please try again</a>. Thanks! </font></strong></font></p>
+\r
+      <p align="left"><br />
+\r
+      </p>
+\r
+    </div></td>
+\r
+  </tr>
+\r
+</table>
+\r
+</body>
+\r
+</html>
+\r
index a012290..8cc599b 100644 (file)
@@ -1,19 +1,38 @@
-<? \r\r
-\r\r
-include"login_config.php";\r\r
-\r\r
-$cookie_name = $cookiename;\r\r
-\r\r
-$cookie_value ="Unset";\r\r
-\r\r
-setcookie($cookie_name,$cookie_value,time() + (-3600),"/", $cookie_domain);\r\r
-\r\r
-unset($cookie_name); \r\r
-\r\r
-?>\r\r
-\r\r
-\r\r
-<p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><br />\r\r
-      <font size="4">You are now logged out <br />\r\r
-        <br />\r\r
-        <a href="login.php">Return to Login      </a></font></strong></font></p>\r\r
+<? 
+\r
+
+\r
+include"login_config.php";
+\r
+
+\r
+$cookie_name = $cookiename;
+\r
+
+\r
+$cookie_value ="Unset";
+\r
+
+\r
+setcookie($cookie_name,$cookie_value,time() + (-3600),"/", $cookie_domain);
+\r
+
+\r
+unset($cookie_name); 
+\r
+
+\r
+?>
+\r
+
+\r
+
+\r
+<p align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><br />
+\r
+      <font size="4">You are now logged out <br />
+\r
+        <br />
+\r
+        <a href="login.php">Return to Login      </a></font></strong></font></p>
+\r
index 9cba333..6827517 100644 (file)
@@ -1,13 +1,25 @@
-<?\r\r
-//no space before <?\r\r
-  include"login_config.php";\r\r
-\r\r
-   // connect to the server\r\r
-   mysqli_connect( $db_host, $db_username, $db_password )\r\r
-      or die( "Error! Could not connect to database: " . mysqli_error() );\r\r
-   \r\r
-   // select the database\r\r
-   mysqli_select_db( $db )\r\r
-      or die( "Error! Could not select the database: " . mysqli_error() );\r\r
-         \r\r
+<?
+\r
+//no space before <?
+\r
+  include"login_config.php";
+\r
+
+\r
+   // connect to the server
+\r
+   mysqli_connect( $db_host, $db_username, $db_password )
+\r
+      or die( "Error! Could not connect to database: " . mysqli_error() );
+\r
+   
+\r
+   // select the database
+\r
+   mysqli_select_db( $db )
+\r
+      or die( "Error! Could not select the database: " . mysqli_error() );
+\r
+         
+\r
 ?>
\ No newline at end of file
index 3e05a12..3462ef5 100644 (file)
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r\r
-<html xmlns="http://www.w3.org/1999/xhtml">\r\r
-<head>\r\r
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\r\r
-<title>Basic Login Readme</title>\r\r
-</head>\r\r
-\r\r
-<body>\r\r
-<div style="text-align:left; width:800px; margin-top:10px;">\r\r
-  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Basic Login is a basic PHP login script that can be  downloaded used and modified under the general user public license  provisions.&nbsp; This is not a PHP login  script for a government institution or fortune 500 company as it uses standard  encryption and cookie based user identification that a determined hacker might  exploit.&nbsp; It is, however, perfect for a  standard website that would benefit from a basic PHP to MySQL login script that  is easy to deploy and uses standard methods of restricting access and granting  permissions.</font></p>\r\r
-  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">After writing countless PHP login scripts using various  combinations of standard components tailored to the needs of the sites for  which they were designed, I got wise and distilled the elements that I used  most frequently into a basic application that can be easily uploaded and  deployed on any project I was working on.&nbsp;  While there are no grand inventions happening here, Basic Login should  do what you need it to do right out of the gate.&nbsp; Features, functions and components are as  follows:</font></p>\r\r
-  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">PHP to MySQL structure<br />\r\r
-    Password encryption<br />\r\r
-    Email forgotten password hint<br />\r\r
-    Email password change/ recreation<br />\r\r
-    New user account creation with error handling<br />\r\r
-    User permission level control<br />\r\r
-    User login routing by permission on login<br />\r\r
-    Central configuration file<br />\r\r
-    Administrative user management report<br />\r\r
-    First user gets admin permissions</font></p>\r\r
-  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Using Basic Login is easy:</font></p>\r\r
-  <ol start="1" type="1">\r\r
-    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Download       Basic Login files</font></li>\r\r
-    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Unzip       Basic Login files</font></li>\r\r
-    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Upload       Basic Login files to a directory of your choice</font></li>\r\r
-    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Create       users table in MySQL:<br />\r\r
-      Just run this query or cut and paste the following code into the SQL       window of phpmyadmin or an equivalent MySQL control panel:</font></li>\r\r
-  </ol>\r\r
-  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">CREATE TABLE `users` (<br />\r\r
-&nbsp;  `id` int(11) NOT NULL auto_increment,<br />\r\r
-&nbsp;  `username` varchar(50) NOT NULL default '',<br />\r\r
-&nbsp;  `password` varchar(150) NOT NULL default '',<br />\r\r
-&nbsp;  `password_hint` varchar(255) NOT NULL default '',<br />\r\r
-&nbsp;  `lastname` varchar(50) NOT NULL default '',<br />\r\r
-&nbsp;  `firstname` varchar(50) NOT NULL default '',<br />\r\r
-&nbsp;  `email` varchar(100) NOT NULL default '',<br />\r\r
-&nbsp;  `phone` varchar(50) NOT NULL default '',<br />\r\r
-&nbsp;  `address1` varchar(100) NOT NULL default '',<br />\r\r
-&nbsp;  `address2` varchar(100) NOT NULL default '',<br />\r\r
-&nbsp;  `city` varchar(80) NOT NULL default '',<br />\r\r
-&nbsp;  `state` varchar(20) NOT NULL default '',<br />\r\r
-&nbsp;  `zip` varchar(20) NOT NULL default '',<br />\r\r
-&nbsp;  `country` varchar(50) NOT NULL default '',<br />\r\r
-&nbsp;  `url` varchar(125) NOT NULL default '',<br />\r\r
-&nbsp;  `permissions` varchar(20) NOT NULL default '1',<br />\r\r
-&nbsp;  PRIMARY KEY&nbsp; (`id`)<br />\r\r
-)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></p>\r\r
-  <ol start="5" type="1">\r\r
-    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Open       login_config.php and set the configuration values as desired</font></li>\r\r
-    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Add       your first account.&nbsp; It will be       configured as the administrator by default.&nbsp; </font></li>\r\r
-    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Put pages behind the security framework &lt; ? include &quot;auth_check_header&quot;; ?&gt; at the very top of any pages that are for members only. Make sure they are in the same directory as the Basic Login files. </font></li>\r\r
-    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Happy       coding!</font></li>\r\r
-  </ol>\r\r
-  <p class="submit">&nbsp;</p>\r\r
-  <p>&nbsp; </p>\r\r
-</div>\r\r
-</body>\r\r
-</html>\r\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+\r
+<html xmlns="http://www.w3.org/1999/xhtml">
+\r
+<head>
+\r
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+\r
+<title>Basic Login Readme</title>
+\r
+</head>
+\r
+
+\r
+<body>
+\r
+<div style="text-align:left; width:800px; margin-top:10px;">
+\r
+  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Basic Login is a basic PHP login script that can be  downloaded used and modified under the general user public license  provisions.&nbsp; This is not a PHP login  script for a government institution or fortune 500 company as it uses standard  encryption and cookie based user identification that a determined hacker might  exploit.&nbsp; It is, however, perfect for a  standard website that would benefit from a basic PHP to MySQL login script that  is easy to deploy and uses standard methods of restricting access and granting  permissions.</font></p>
+\r
+  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">After writing countless PHP login scripts using various  combinations of standard components tailored to the needs of the sites for  which they were designed, I got wise and distilled the elements that I used  most frequently into a basic application that can be easily uploaded and  deployed on any project I was working on.&nbsp;  While there are no grand inventions happening here, Basic Login should  do what you need it to do right out of the gate.&nbsp; Features, functions and components are as  follows:</font></p>
+\r
+  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">PHP to MySQL structure<br />
+\r
+    Password encryption<br />
+\r
+    Email forgotten password hint<br />
+\r
+    Email password change/ recreation<br />
+\r
+    New user account creation with error handling<br />
+\r
+    User permission level control<br />
+\r
+    User login routing by permission on login<br />
+\r
+    Central configuration file<br />
+\r
+    Administrative user management report<br />
+\r
+    First user gets admin permissions</font></p>
+\r
+  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Using Basic Login is easy:</font></p>
+\r
+  <ol start="1" type="1">
+\r
+    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Download       Basic Login files</font></li>
+\r
+    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Unzip       Basic Login files</font></li>
+\r
+    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Upload       Basic Login files to a directory of your choice</font></li>
+\r
+    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Create       users table in MySQL:<br />
+\r
+      Just run this query or cut and paste the following code into the SQL       window of phpmyadmin or an equivalent MySQL control panel:</font></li>
+\r
+  </ol>
+\r
+  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">CREATE TABLE `users` (<br />
+\r
+&nbsp;  `id` int(11) NOT NULL auto_increment,<br />
+\r
+&nbsp;  `username` varchar(50) NOT NULL default '',<br />
+\r
+&nbsp;  `password` varchar(150) NOT NULL default '',<br />
+\r
+&nbsp;  `password_hint` varchar(255) NOT NULL default '',<br />
+\r
+&nbsp;  `lastname` varchar(50) NOT NULL default '',<br />
+\r
+&nbsp;  `firstname` varchar(50) NOT NULL default '',<br />
+\r
+&nbsp;  `email` varchar(100) NOT NULL default '',<br />
+\r
+&nbsp;  `phone` varchar(50) NOT NULL default '',<br />
+\r
+&nbsp;  `address1` varchar(100) NOT NULL default '',<br />
+\r
+&nbsp;  `address2` varchar(100) NOT NULL default '',<br />
+\r
+&nbsp;  `city` varchar(80) NOT NULL default '',<br />
+\r
+&nbsp;  `state` varchar(20) NOT NULL default '',<br />
+\r
+&nbsp;  `zip` varchar(20) NOT NULL default '',<br />
+\r
+&nbsp;  `country` varchar(50) NOT NULL default '',<br />
+\r
+&nbsp;  `url` varchar(125) NOT NULL default '',<br />
+\r
+&nbsp;  `permissions` varchar(20) NOT NULL default '1',<br />
+\r
+&nbsp;  PRIMARY KEY&nbsp; (`id`)<br />
+\r
+)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></p>
+\r
+  <ol start="5" type="1">
+\r
+    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Open       login_config.php and set the configuration values as desired</font></li>
+\r
+    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Add       your first account.&nbsp; It will be       configured as the administrator by default.&nbsp; </font></li>
+\r
+    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Put pages behind the security framework &lt; ? include &quot;auth_check_header&quot;; ?&gt; at the very top of any pages that are for members only. Make sure they are in the same directory as the Basic Login files. </font></li>
+\r
+    <li><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Happy       coding!</font></li>
+\r
+  </ol>
+\r
+  <p class="submit">&nbsp;</p>
+\r
+  <p>&nbsp; </p>
+\r
+</div>
+\r
+</body>
+\r
+</html>
+\r
index ee04482..4aac08e 100644 (file)
-<?\r\r
-\r\r
-include"master_inc.php";\r\r
-\r\r
-                 $email  = $_REQUEST['email'];\r\r
-                 $pw_url = $_REQUEST['password'];\r\r
-                 \r\r
-// Connect to server and select databse.\r\r
-$sql="SELECT * FROM addr_users WHERE email='$email' AND md5_pass ='$pw_url'";\r\r
-\r\r
-$result=mysqli_query($db,$sql);\r\r
-\r\r
-// mysqli_num_row is counting table rows\r\r
-\r\r
-$count=mysqli_num_rows($result);\r\r
-\r\r
-// If result matches $myusername and $mypassword, table row must be 1 row\r\r
-\r\r
-if($count==0){\r\r
-\r\r
-\r\r
-header("location:login_failed.php");\r\r
-\r\r
-\r\r
-}\r\r
-                         \r\r
-//Change to temporary password:\r\r
-\r\r
-$temp_pw_raw=date("YmdHis");   \r\r
-\r\r
-$encrypted_temp_pw = md5($temp_pw_raw);\r\r
-\r\r
-\r\r
-$query = "UPDATE `users` SET `password`='$encrypted_temp_pw',`password_hint`='' WHERE `email`='$email'"; \r\r
-\r\r
-// save the info to the database\r\r
-$results = mysqli_query( $query );\r\r
-\r\r
-// print out the results\r\r
-if( $results )\r\r
-\r\r
-{ echo( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>An encrypted temporary password has been assigned.  Choose a new password in the form below:<br></font>  " );\r\r
-}\r\r
-else\r\r
-{\r\r
-die( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Trouble saving information to the database:</font><br><br> " . mysqli_error() );\r\r
-}\r\r
-\r\r
-\r\r
-?>\r\r
-<div align="center">\r\r
-  <p><font size="4" face="Verdana, Arial, Helvetica, sans-serif"><strong>Password Reset </strong></font></p>\r\r
-  <form action="reset_password_save.php" method="post" name="form" id="form">\r\r
-  <TABLE cellSpacing="0" cellPadding="10" width="30%" border="0">\r\r
-    <TBODY>\r\r
-      <TR>\r\r
-        <TD width="171"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Username</font></TD>\r\r
-        <TD width="204"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-          <? \r\r
-                 \r\r
-                 $query = "SELECT * FROM users WHERE email='$email' AND password='$encrypted_temp_pw'";\r\r
-\r\r
-$numresults=mysqli_query($query);\r\r
-$numrows=mysqli_num_rows($numresults); \r\r
-\r\r
-// get results\r\r
-$result = mysqli_query($query) or die("Couldn't execute query");\r\r
-\r\r
-// now you can display the results returned\r\r
-while ($row= mysqli_fetch_array($result)) {\r\r
-\r\r
-$username= $row["username"];\r\r
-$email= $row["email"];\r\r
-$password= $row["password"];\r\r
-                 \r\r
-                 echo $username;\r\r
-                 \r\r
-                 }\r\r
-                 \r\r
-                  ?>\r\r
-          <input type = "hidden" value="<? echo $email; ?>" name="email" width="50" />\r\r
-          <input type = "hidden" value="<? echo $username; ?>" name="username" width="50" />\r\r
-</font></TD>\r\r
-      </TR>\r\r
-    </TBODY>\r\r
-  </TABLE>\r\r
-  <TABLE cellSpacing="0" cellPadding="10" width="30%" border="0">\r\r
-    <TBODY>\r\r
-      <TR>\r\r
-        <TD width="171"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">New Password</font></TD>\r\r
-        <TD width="204"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-          <INPUT type = "password" value="" name="password" width="50">\r\r
-        </font></TD>\r\r
-      </TR>\r\r
-    </TBODY>\r\r
-  </TABLE>\r\r
-  <TABLE cellSpacing="0" cellPadding="10" width="30%" border="0">\r\r
-    <TBODY>\r\r
-      <TR>\r\r
-        <TD width="171"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Confirm New Password </font></TD>\r\r
-        <TD width="204"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-          <INPUT type = "password" value="" name="password_confirm" width="50">\r\r
-        </font></TD>\r\r
-      </TR>\r\r
-         <TR>\r\r
-        <TD><font size="2" face="Verdana, Arial, Helvetica, sans-serif">New Password Hint </font></TD>\r\r
-        <TD width="204"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">\r\r
-          <INPUT type = "text" value="" name="password_hint" width="80">\r\r
-        </font></TD>\r\r
-      </TR>\r\r
-    </TBODY>\r\r
-  </TABLE>\r\r
-  <p><font size="1" face="Arial, Helvetica, sans-serif">\r\r
-    <input type="submit" value="Save and Continue" name="submit2" />\r\r
-  </font></p>\r\r
-  </form>\r\r
-  <p>\r\r
-    <?\r\r
-\r\r
-?>\r\r
-  </p>\r\r
-  <p>&nbsp;</p>\r\r
-</div>\r\r
+<?
+\r
+
+\r
+include"master_inc.php";
+\r
+
+\r
+                 $email  = $_REQUEST['email'];
+\r
+                 $pw_url = $_REQUEST['password'];
+\r
+                 
+\r
+// Connect to server and select databse.
+\r
+$sql="SELECT * FROM addr_users WHERE email='$email' AND md5_pass ='$pw_url'";
+\r
+
+\r
+$result=mysqli_query($db,$sql);
+\r
+
+\r
+// mysqli_num_row is counting table rows
+\r
+
+\r
+$count=mysqli_num_rows($result);
+\r
+
+\r
+// If result matches $myusername and $mypassword, table row must be 1 row
+\r
+
+\r
+if($count==0){
+\r
+
+\r
+
+\r
+header("location:login_failed.php");
+\r
+
+\r
+
+\r
+}
+\r
+                         
+\r
+//Change to temporary password:
+\r
+
+\r
+$temp_pw_raw=date("YmdHis");   
+\r
+
+\r
+$encrypted_temp_pw = md5($temp_pw_raw);
+\r
+
+\r
+
+\r
+$query = "UPDATE `users` SET `password`='$encrypted_temp_pw',`password_hint`='' WHERE `email`='$email'"; 
+\r
+
+\r
+// save the info to the database
+\r
+$results = mysqli_query( $query );
+\r
+
+\r
+// print out the results
+\r
+if( $results )
+\r
+
+\r
+{ echo( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>An encrypted temporary password has been assigned.  Choose a new password in the form below:<br></font>  " );
+\r
+}
+\r
+else
+\r
+{
+\r
+die( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Trouble saving information to the database:</font><br><br> " . mysqli_error() );
+\r
+}
+\r
+
+\r
+
+\r
+?>
+\r
+<div align="center">
+\r
+  <p><font size="4" face="Verdana, Arial, Helvetica, sans-serif"><strong>Password Reset </strong></font></p>
+\r
+  <form action="reset_password_save.php" method="post" name="form" id="form">
+\r
+  <TABLE cellSpacing="0" cellPadding="10" width="30%" border="0">
+\r
+    <TBODY>
+\r
+      <TR>
+\r
+        <TD width="171"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Username</font></TD>
+\r
+        <TD width="204"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+          <? 
+\r
+                 
+\r
+                 $query = "SELECT * FROM users WHERE email='$email' AND password='$encrypted_temp_pw'";
+\r
+
+\r
+$numresults=mysqli_query($query);
+\r
+$numrows=mysqli_num_rows($numresults); 
+\r
+
+\r
+// get results
+\r
+$result = mysqli_query($query) or die("Couldn't execute query");
+\r
+
+\r
+// now you can display the results returned
+\r
+while ($row= mysqli_fetch_array($result)) {
+\r
+
+\r
+$username= $row["username"];
+\r
+$email= $row["email"];
+\r
+$password= $row["password"];
+\r
+                 
+\r
+                 echo $username;
+\r
+                 
+\r
+                 }
+\r
+                 
+\r
+                  ?>
+\r
+          <input type = "hidden" value="<? echo $email; ?>" name="email" width="50" />
+\r
+          <input type = "hidden" value="<? echo $username; ?>" name="username" width="50" />
+\r
+</font></TD>
+\r
+      </TR>
+\r
+    </TBODY>
+\r
+  </TABLE>
+\r
+  <TABLE cellSpacing="0" cellPadding="10" width="30%" border="0">
+\r
+    <TBODY>
+\r
+      <TR>
+\r
+        <TD width="171"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">New Password</font></TD>
+\r
+        <TD width="204"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+          <INPUT type = "password" value="" name="password" width="50">
+\r
+        </font></TD>
+\r
+      </TR>
+\r
+    </TBODY>
+\r
+  </TABLE>
+\r
+  <TABLE cellSpacing="0" cellPadding="10" width="30%" border="0">
+\r
+    <TBODY>
+\r
+      <TR>
+\r
+        <TD width="171"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Confirm New Password </font></TD>
+\r
+        <TD width="204"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+          <INPUT type = "password" value="" name="password_confirm" width="50">
+\r
+        </font></TD>
+\r
+      </TR>
+\r
+         <TR>
+\r
+        <TD><font size="2" face="Verdana, Arial, Helvetica, sans-serif">New Password Hint </font></TD>
+\r
+        <TD width="204"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
+\r
+          <INPUT type = "text" value="" name="password_hint" width="80">
+\r
+        </font></TD>
+\r
+      </TR>
+\r
+    </TBODY>
+\r
+  </TABLE>
+\r
+  <p><font size="1" face="Arial, Helvetica, sans-serif">
+\r
+    <input type="submit" value="Save and Continue" name="submit2" />
+\r
+  </font></p>
+\r
+  </form>
+\r
+  <p>
+\r
+    <?
+\r
+
+\r
+?>
+\r
+  </p>
+\r
+  <p>&nbsp;</p>
+\r
+</div>
+\r
index 539b85f..67d455b 100644 (file)
@@ -1,40 +1,80 @@
-<?\r\r
-include"master_inc.php";\r\r
-\r\r
-$username=$_REQUEST['username'];\r\r
-$password=$_REQUEST['password'];\r\r
-$password_confirm=$_REQUEST['password_confirm'];\r\r
-$password_hint = $_REQUEST['password_hint'];\r\r
-$email=$_REQUEST['email'];\r\r
-\r\r
-if($password==$password_confirm){\r\r
-\r\r
-\r\r
-$pw = strip_tags(substr($_POST['password'],0,32));\r\r
-       \r\r
-$cleanpw = md5($pw);\r\r
-\r\r
-//Debug: echo"New User Defined PW: $cleanpw<br>email = $email | username = $username<br>";\r\r
-\r\r
-$query = "UPDATE `users` SET `password`='$cleanpw', `password_hint`='$password_hint' WHERE `email`='$email'"; \r\r
-\r\r
-// save the info to the database\r\r
-$results = mysqli_query( $query );\r\r
-\r\r
-// print out the results\r\r
-if( $results )\r\r
-\r\r
-{ echo( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Your changes have been made sucessfully.<br><br><a href='login.php'>Back to Login</a></font>  " );\r\r
-}\r\r
-else\r\r
-{\r\r
-die( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Trouble saving information to the database:</font> " . mysqli_error() );\r\r
-}\r\r
-\r\r
-}\r\r
-else\r\r
-{\r\r
-echo"<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Your new passwords do not match.  <a href='reset_password.php?email=$email'>Please try again</a>";\r\r
-}\r\r
-\r\r
-?>\r\r
+<?
+\r
+include"master_inc.php";
+\r
+
+\r
+$username=$_REQUEST['username'];
+\r
+$password=$_REQUEST['password'];
+\r
+$password_confirm=$_REQUEST['password_confirm'];
+\r
+$password_hint = $_REQUEST['password_hint'];
+\r
+$email=$_REQUEST['email'];
+\r
+
+\r
+if($password==$password_confirm){
+\r
+
+\r
+
+\r
+$pw = strip_tags(substr($_POST['password'],0,32));
+\r
+       
+\r
+$cleanpw = md5($pw);
+\r
+
+\r
+//Debug: echo"New User Defined PW: $cleanpw<br>email = $email | username = $username<br>";
+\r
+
+\r
+$query = "UPDATE `users` SET `password`='$cleanpw', `password_hint`='$password_hint' WHERE `email`='$email'"; 
+\r
+
+\r
+// save the info to the database
+\r
+$results = mysqli_query( $query );
+\r
+
+\r
+// print out the results
+\r
+if( $results )
+\r
+
+\r
+{ echo( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Your changes have been made sucessfully.<br><br><a href='login.php'>Back to Login</a></font>  " );
+\r
+}
+\r
+else
+\r
+{
+\r
+die( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Trouble saving information to the database:</font> " . mysqli_error() );
+\r
+}
+\r
+
+\r
+}
+\r
+else
+\r
+{
+\r
+echo"<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Your new passwords do not match.  <a href='reset_password.php?email=$email'>Please try again</a>";
+\r
+}
+\r
+
+\r
+?>
+\r
index 102210d..b8ee3ba 100644 (file)
-<? \r\r
-\r\r
-include"master_inc.php";\r\r
-\r\r
-$username_from_cookie = $_COOKIE[$cookiename]; //retrieve contents of cookie \r\r
-\r\r
-//Query to get permissions\r\r
-\r\r
-$sql = "SELECT * FROM users WHERE `username` = '$username_from_cookie'"; \r\r
-\r\r
-$numresults = mysqli_query($sql);\r\r
-$numrows = mysqli_num_rows($numresults); \r\r
-\r\r
-// get results\r\r
-$result = mysqli_query($query) or die("Couldn't execute query");\r\r
-\r\r
-// now you can display the results returned\r\r
-while ($row= mysqli_fetch_array($result)) {\r\r
-\r\r
-$permissions = $row["permissions"];\r\r
-\r\r
-//Set Rules for where various permissions go after login\r\r
-\r\r
-if($permissions==5)\r\r
-{\r\r
-\r\r
-header("location:$level_5_url");\r\r
-\r\r
-}\r\r
-if($permissions==4)\r\r
-{\r\r
-\r\r
-header("location:$level_4_url");\r\r
-\r\r
-}\r\r
-if($permissions==3)\r\r
-{\r\r
-\r\r
-header("location:$level_3_url");\r\r
-\r\r
-}\r\r
-if($permissions==2)\r\r
-{\r\r
-\r\r
-header("location:$level_2_url");\r\r
-\r\r
-}\r\r
-\r\r
-if($permissions==1)\r\r
-{\r\r
-\r\r
-header("location:$level_1_url");\r\r
-\r\r
-}\r\r
-\r\r
-}\r\r
-\r\r
-//}\r\r
-\r\r
-\r\r
+<? 
+\r
+
+\r
+include"master_inc.php";
+\r
+
+\r
+$username_from_cookie = $_COOKIE[$cookiename]; //retrieve contents of cookie 
+\r
+
+\r
+//Query to get permissions
+\r
+
+\r
+$sql = "SELECT * FROM users WHERE `username` = '$username_from_cookie'"; 
+\r
+
+\r
+$numresults = mysqli_query($sql);
+\r
+$numrows = mysqli_num_rows($numresults); 
+\r
+
+\r
+// get results
+\r
+$result = mysqli_query($query) or die("Couldn't execute query");
+\r
+
+\r
+// now you can display the results returned
+\r
+while ($row= mysqli_fetch_array($result)) {
+\r
+
+\r
+$permissions = $row["permissions"];
+\r
+
+\r
+//Set Rules for where various permissions go after login
+\r
+
+\r
+if($permissions==5)
+\r
+{
+\r
+
+\r
+header("location:$level_5_url");
+\r
+
+\r
+}
+\r
+if($permissions==4)
+\r
+{
+\r
+
+\r
+header("location:$level_4_url");
+\r
+
+\r
+}
+\r
+if($permissions==3)
+\r
+{
+\r
+
+\r
+header("location:$level_3_url");
+\r
+
+\r
+}
+\r
+if($permissions==2)
+\r
+{
+\r
+
+\r
+header("location:$level_2_url");
+\r
+
+\r
+}
+\r
+
+\r
+if($permissions==1)
+\r
+{
+\r
+
+\r
+header("location:$level_1_url");
+\r
+
+\r
+}
+\r
+
+\r
+}
+\r
+
+\r
+//}
+\r
+
+\r
+
+\r
 ?>
\ No newline at end of file
index cbd3dbb..0b5d000 100644 (file)
@@ -1,33 +1,66 @@
-<? \r\r
-//Set permission level threshold for this page remove if page is good for all levels\r\r
-$permission_level=1;\r\r
-\r\r
-include"auth_check_header.php";\r\r
-\r\r
-?>     \r\r
-\r\r
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\r
-<html xmlns='http://www.w3.org/1999/xhtml'>\r\r
-<head>\r\r
-<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\r\r
-<title>AMS Agent Index</title>\r\r
-</head>\r\r
-\r\r
-<body topmargin="0">\r\r
-<table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-  <tr>\r\r
-    <td valign="top"><div align="center">\r\r
-      <p>&nbsp;</p>\r\r
-      <p><strong><font size="3"><font size="5" face="Trebuchet MS">Sample Page</font>\r\r
-          </font><font face="Trebuchet MS"></font></font></strong>        </p>\r\r
-      <p><font face="Trebuchet MS"><strong><font size="3">You are logged in and can see content for which you are authorized </font></strong></font></p>\r\r
-    <p><font face="Trebuchet MS"><a href="logout.php">Log out </a></font><a href="logout.php"></a></p>\r\r
-    </div>\r\r
-    </td>\r\r
-  </tr>\r\r
-</table>\r\r
-<br>\r\r
-<A href="http://www.amsmerchant.com" target="_blank"></A><br>\r\r
-<br>\r\r
-</body>\r\r
-</html>\r\r
+<? 
+\r
+//Set permission level threshold for this page remove if page is good for all levels
+\r
+$permission_level=1;
+\r
+
+\r
+include"auth_check_header.php";
+\r
+
+\r
+?>     
+\r
+
+\r
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+\r
+<html xmlns='http://www.w3.org/1999/xhtml'>
+\r
+<head>
+\r
+<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
+\r
+<title>AMS Agent Index</title>
+\r
+</head>
+\r
+
+\r
+<body topmargin="0">
+\r
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+  <tr>
+\r
+    <td valign="top"><div align="center">
+\r
+      <p>&nbsp;</p>
+\r
+      <p><strong><font size="3"><font size="5" face="Trebuchet MS">Sample Page</font>
+\r
+          </font><font face="Trebuchet MS"></font></font></strong>        </p>
+\r
+      <p><font face="Trebuchet MS"><strong><font size="3">You are logged in and can see content for which you are authorized </font></strong></font></p>
+\r
+    <p><font face="Trebuchet MS"><a href="logout.php">Log out </a></font><a href="logout.php"></a></p>
+\r
+    </div>
+\r
+    </td>
+\r
+  </tr>
+\r
+</table>
+\r
+<br>
+\r
+<A href="http://www.amsmerchant.com" target="_blank"></A><br>
+\r
+<br>
+\r
+</body>
+\r
+</html>
+\r
index 528a4bc..e928f87 100644 (file)
-<? include"auth_check_header.php";  \r\r
-\r\r
-\r\r
-function nicetrim ($s) {\r\r
-// limit the length of the given string to $MAX_LENGTH char\r\r
-// If it is more, it keeps the first $MAX_LENGTH-3 characters \r\r
-// and adds "..."\r\r
-// It counts HTML char such as Ã¡ as 1 char.\r\r
-//\r\r
-\r\r
-  $MAX_LENGTH = 80;\r\r
-  $str_to_count = html_entity_decode($s);\r\r
-  if (strlen($str_to_count) <= $MAX_LENGTH) {\r\r
-    return $s;\r\r
-  }\r\r
-\r\r
-  $s2 = substr($str_to_count, 0, $MAX_LENGTH - 3);\r\r
-  $s2 .= "...";\r\r
-  return htmlentities($s2);\r\r
-}                   \r\r
-\r\r
-?>\r\r
-\r\r
-\r\r
-\r\r
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r\r
-<html xmlns="http://www.w3.org/1999/xhtml">\r\r
-<head>\r\r
-\r\r
-<META NAME="KEYWORDS" CONTENT="PHP Login Script Free download secure encrypted passwords php mysql simple login script"> \r\r
-<META NAME="DESCRIPTION"\r\r
-CONTENT="Basic Login Script for PHP to Mysql Download it for free and modify as you see fit">\r\r
-<meta http-equiv="content-language" content="en">\r\r
-<title>Basic Login - Download a free basic PHP Login Script</title> \r\r
-</head>\r\r
-\r\r
-<body bgcolor="ebebeb" topmargin="0">\r\r
-<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">\r\r
-  <tr>\r\r
-    <td valign="top" bgcolor="ffffff"><div align="center">\r\r
-      <p><strong><font size="5" face="Verdana, Arial, Helvetica, sans-serif">BasicLogin.com</font></strong>\r\r
-         <table border="0" cellspacing="0" cellpadding="0" width="750" align="center"><tbody><tr><td colspan="3" width="750" height="38" valign="top"><a href="http://www.wvr.org" target="_blank"></a><a href="http://wvr.org/email_donate.php" target="_blank"></a><a href="http://www.percontact.com" target="_blank"></a><a href="http://www.percontact.com" target="_blank"><img src="http://www.skincaresolve.com/images/200801152254030801_pc_blue_template_top_750w.jpg" border="0" alt="top bar" /></a></td></tr><tr><td width="35" background="http://www.skincaresolve.com/images/200801152256170801_pc_blue_template_left_bg_35w.jpg"> </td><td width="669" valign="top"><table border="0" cellspacing="0" cellpadding="0" width="680"><tbody><tr><td height="72" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5">\r\r
-        <tr>\r\r
-          <td width="33%" height="181" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif"><font face="Verdana, Arial, Helvetica, sans-serif"><font face="Verdana, Arial, Helvetica, sans-serif"><font face="Arial, Helvetica, sans-serif" size="3"><b><font face="Verdana, Arial, Helvetica, sans-serif">\r\r
-                 \r\r
-                  </font></b></font></font></font></font><form action="traffic.php" method="post" name="form" id="form">\r\r
-                 \r\r
-             <table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-               <tr>\r\r
-                 <td><div>\r\r
-                   <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><a href='admin_index.php'><font size="2"><strong>Admin Index</strong></font></a></font><br />\r\r
-                     <br />\r\r
-                   </div>\r\r
-                 </div>\r\r
-                 <div align="center">\r\r
-                     <font size="3" face="Verdana, Arial, Helvetica, sans-serif"><b><input name="var" type='text' id='var' />\r\r
-                   &nbsp;\r\r
-                   <input type="submit" name="Submit22" value="Search traffic" />\r\r
-                 </b></font></div></td>\r\r
-               </tr>\r\r
-             </table>\r\r
-             <p><font size="3" face="Verdana, Arial, Helvetica, sans-serif"><strong><font size="2">Sort By: <a href="traffic.php?criteria=id">ID</a></font></strong></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b> | <a href="traffic.php?criteria=ip">IP</a> | <a href="traffic.php?criteria=date">Date</a> | <a href="traffic.php?criteria=site">Site</a> | <a href="traffic.php?criteria=type">Type</a></b></font></p>\r\r
-             <table width="100%" border="0" cellspacing="0" cellpadding="0">\r\r
-               <tr>\r\r
-                 <td><div align="left"><font size="3" face="Verdana, Arial, Helvetica, sans-serif"><b>\r\r
-                   <?php\r\r
-\r\r
-$s=$_REQUEST['s'];\r\r
-\r\r
-$limit=100;\r\r
-\r\r
-// Build SQL Query  \r\r
-\r\r
-$criteria_url = $_REQUEST['criteria'];\r\r
-//secho "Criteria:$criteria_url<br>";\r\r
-\r\r
-If($criteria_url==''){$criteria="id";}else{$criteria=$criteria_url;}\r\r
-\r\r
-//echo "Criteria:$criteria<br>";\r\r
-\r\r
-\r\r
-$var = $_REQUEST['var'];\r\r
-\r\r
-$sql = "select * from traffic WHERE `id` LIKE \"%$var%\" OR `site` LIKE \"%$var%\" OR `type` LIKE \"%$var%\" OR `date` LIKE \"%$var%\" OR `ip` LIKE \"%$var%\" OR `link` LIKE \"%$var%\" OR `page` LIKE \"%$var%\"order by `$criteria` desc"; \r\r
-\r\r
-\r\r
- $numresults=mysqli_query($sql);\r\r
- $numrows=mysqli_num_rows($numresults);\r\r
\r\r
- echo"<font face='Arial, Helvetica, sans-serif' size='2' color='#000000'>Results: $numrows</font><hr>"; \r\r
-\r\r
- if (empty($s)) {\r\r
-  $s=0;\r\r
-  }\r\r
-\r\r
-// get results\r\r
-  $query .= " limit $s,$limit";\r\r
-\r\r
-// get results\r\r
-  $result = mysqli_query($query) or die("Couldn't execute query");\r\r
-\r\r
-\r\r
-// now you can display the results returned\r\r
-  while ($row= mysqli_fetch_array($result)) {\r\r
-  \r\r
-  $id= $row["id"];\r\r
-  $ip= $row["ip"];\r\r
-  $date = $row["date"];\r\r
-  $site = $row["site"];\r\r
-  $type= $row["type"];\r\r
-  $link_raw= $row["link"];\r\r
-  $page= $row["page"];\r\r
-  $link=nicetrim($link_raw);\r\r
-\r\r
-  \r\r
-  \r\r
-echo "<font face='Arial, Helvetica, sans-serif' size='1' color='#000000'>$id | $ip | $date | $site | $type | $page </font><font face='Arial, Helvetica, sans-serif' size='1' color='#666666'>$link<br><br></font>";\r\r
-\r\r
-}\r\r
-\r\r
-$currPage = (($s/$limit) + 1);\r\r
-\r\r
-//break before paging\r\r
-  echo "<br />";\r\r
-\r\r
-  // next we need to do the links to other results\r\r
-  if ($s>=1) { // bypass PREV link if s is 0\r\r
-  $prevs=($s-$limit);\r\r
-  print "&nbsp;<a href=\"$PHP_SELF?s=$prevs&var=$var&criteria=$criteria\">&lt;&lt; \r\r
-  Prev 100</a>&nbsp&nbsp;";\r\r
-  }\r\r
-\r\r
-// calculate number of pages needing links\r\r
-  $pages=intval($numrows/$limit);\r\r
-\r\r
-// $pages now contains int of pages needed unless there is a remainder from division\r\r
-\r\r
-  if ($numrows%$limit) {\r\r
-  // has remainder so add one page\r\r
-  $pages++;\r\r
-  }\r\r
-\r\r
-// check to see if last page\r\r
-  if (!((($s+$limit)/$limit)==$pages) && $pages!=1) {\r\r
-\r\r
-  // not last page so give NEXT link\r\r
-  $news=$s+$limit;\r\r
-\r\r
-  echo "&nbsp;<a href=\"$PHP_SELF?s=$news&var=$var&criteria=$criteria\">Next 100 &gt;&gt;</a>";\r\r
-  }\r\r
-\r\r
-$a = $s + ($limit) ;\r\r
-  if ($a > $numrows) { $a = $numrows ; }\r\r
-  $b = $s + 1 ;\r\r
-\r\r
-?>\r\r
-                 </b></font></div></td>\r\r
-               </tr>\r\r
-             </table>\r\r
-             <p>&nbsp;\r\r
-                          </p>\r\r
-                  </form>\r\r
-          </td>\r\r
-        </tr>\r\r
-      </table>   \r\r
-         <p align="left" style="margin: 0in 0in 0pt">&nbsp;</p>\r\r
-                     </td>\r\r
-     </tr></tbody></table></td><td width="36" background="http://www.skincaresolve.com/images/200801152254030801_pc_blue_template_right_bg_35w.jpg"> </td></tr><tr><td colspan="3"><a href="http://www.percontact.com" target="_blank"><img src="http://www.skincaresolve.com/images/200801152254030801_pc_blue_template_bottom_750w.jpg" border="0" alt="bottom bar" /></a><a href="http://wvr.org/email_donate.php" target="_blank"></a></td></tr></tbody></table>\r\r
-         \r\r
-         </p>\r\r
-      <p>&nbsp;</p>\r\r
-      <p align="left"><br />  \r\r
-          <br />\r\r
-      </p>\r\r
-    </div></td>\r\r
-  </tr>\r\r
-</table>\r\r
-<?\r\r
-//View Tracking Code for reference\r\r
-\r\r
-                  \r\r
-                  //Time & Date\r\r
-                       $date = date ('m/d/y  g:i a');\r\r
-                       \r\r
-                       //IP Address\r\r
-                       $ip = $_SERVER['REMOTE_ADDR'];\r\r
-                       \r\r
-                       $type = "view";\r\r
-                       \r\r
-                       $site = "basiclogin.com";\r\r
-\r\r
-//Query Block Tracking: WHERE '$ip' != '69.254.101.167'\r\r
-\r\r
-          $query = "INSERT INTO `traffic` (`date`,`ip`,`link`,`notes`,`site`,`type`) \r\r
-         VALUES ( '$date','$ip','$link','$notes','$site','$type' WHERE '$ip' != '69.254.101.167')";   \r\r
-                                \r\r
-                 // save the info to the database\r\r
-   $results = mysqli_query( $query );\r\r
-   \r\r
-?>\r\r
-</body>\r\r
-</html>\r\r
+<? include"auth_check_header.php";  
+\r
+
+\r
+
+\r
+function nicetrim ($s) {
+\r
+// limit the length of the given string to $MAX_LENGTH char
+\r
+// If it is more, it keeps the first $MAX_LENGTH-3 characters 
+\r
+// and adds "..."
+\r
+// It counts HTML char such as Ã¡ as 1 char.
+\r
+//
+\r
+
+\r
+  $MAX_LENGTH = 80;
+\r
+  $str_to_count = html_entity_decode($s);
+\r
+  if (strlen($str_to_count) <= $MAX_LENGTH) {
+\r
+    return $s;
+\r
+  }
+\r
+
+\r
+  $s2 = substr($str_to_count, 0, $MAX_LENGTH - 3);
+\r
+  $s2 .= "...";
+\r
+  return htmlentities($s2);
+\r
+}                   
+\r
+
+\r
+?>
+\r
+
+\r
+
+\r
+
+\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+\r
+<html xmlns="http://www.w3.org/1999/xhtml">
+\r
+<head>
+\r
+
+\r
+<META NAME="KEYWORDS" CONTENT="PHP Login Script Free download secure encrypted passwords php mysql simple login script"> 
+\r
+<META NAME="DESCRIPTION"
+\r
+CONTENT="Basic Login Script for PHP to Mysql Download it for free and modify as you see fit">
+\r
+<meta http-equiv="content-language" content="en">
+\r
+<title>Basic Login - Download a free basic PHP Login Script</title> 
+\r
+</head>
+\r
+
+\r
+<body bgcolor="ebebeb" topmargin="0">
+\r
+<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
+\r
+  <tr>
+\r
+    <td valign="top" bgcolor="ffffff"><div align="center">
+\r
+      <p><strong><font size="5" face="Verdana, Arial, Helvetica, sans-serif">BasicLogin.com</font></strong>
+\r
+         <table border="0" cellspacing="0" cellpadding="0" width="750" align="center"><tbody><tr><td colspan="3" width="750" height="38" valign="top"><a href="http://www.wvr.org" target="_blank"></a><a href="http://wvr.org/email_donate.php" target="_blank"></a><a href="http://www.percontact.com" target="_blank"></a><a href="http://www.percontact.com" target="_blank"><img src="http://www.skincaresolve.com/images/200801152254030801_pc_blue_template_top_750w.jpg" border="0" alt="top bar" /></a></td></tr><tr><td width="35" background="http://www.skincaresolve.com/images/200801152256170801_pc_blue_template_left_bg_35w.jpg"> </td><td width="669" valign="top"><table border="0" cellspacing="0" cellpadding="0" width="680"><tbody><tr><td height="72" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5">
+\r
+        <tr>
+\r
+          <td width="33%" height="181" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif"><font face="Verdana, Arial, Helvetica, sans-serif"><font face="Verdana, Arial, Helvetica, sans-serif"><font face="Arial, Helvetica, sans-serif" size="3"><b><font face="Verdana, Arial, Helvetica, sans-serif">
+\r
+                 
+\r
+                  </font></b></font></font></font></font><form action="traffic.php" method="post" name="form" id="form">
+\r
+                 
+\r
+             <table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+               <tr>
+\r
+                 <td><div>
+\r
+                   <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><a href='admin_index.php'><font size="2"><strong>Admin Index</strong></font></a></font><br />
+\r
+                     <br />
+\r
+                   </div>
+\r
+                 </div>
+\r
+                 <div align="center">
+\r
+                     <font size="3" face="Verdana, Arial, Helvetica, sans-serif"><b><input name="var" type='text' id='var' />
+\r
+                   &nbsp;
+\r
+                   <input type="submit" name="Submit22" value="Search traffic" />
+\r
+                 </b></font></div></td>
+\r
+               </tr>
+\r
+             </table>
+\r
+             <p><font size="3" face="Verdana, Arial, Helvetica, sans-serif"><strong><font size="2">Sort By: <a href="traffic.php?criteria=id">ID</a></font></strong></font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b> | <a href="traffic.php?criteria=ip">IP</a> | <a href="traffic.php?criteria=date">Date</a> | <a href="traffic.php?criteria=site">Site</a> | <a href="traffic.php?criteria=type">Type</a></b></font></p>
+\r
+             <table width="100%" border="0" cellspacing="0" cellpadding="0">
+\r
+               <tr>
+\r
+                 <td><div align="left"><font size="3" face="Verdana, Arial, Helvetica, sans-serif"><b>
+\r
+                   <?php
+\r
+
+\r
+$s=$_REQUEST['s'];
+\r
+
+\r
+$limit=100;
+\r
+
+\r
+// Build SQL Query  
+\r
+
+\r
+$criteria_url = $_REQUEST['criteria'];
+\r
+//secho "Criteria:$criteria_url<br>";
+\r
+
+\r
+If($criteria_url==''){$criteria="id";}else{$criteria=$criteria_url;}
+\r
+
+\r
+//echo "Criteria:$criteria<br>";
+\r
+
+\r
+
+\r
+$var = $_REQUEST['var'];
+\r
+
+\r
+$sql = "select * from traffic WHERE `id` LIKE \"%$var%\" OR `site` LIKE \"%$var%\" OR `type` LIKE \"%$var%\" OR `date` LIKE \"%$var%\" OR `ip` LIKE \"%$var%\" OR `link` LIKE \"%$var%\" OR `page` LIKE \"%$var%\"order by `$criteria` desc"; 
+\r
+
+\r
+
+\r
+ $numresults=mysqli_query($sql);
+\r
+ $numrows=mysqli_num_rows($numresults);
+\r
+\r
+ echo"<font face='Arial, Helvetica, sans-serif' size='2' color='#000000'>Results: $numrows</font><hr>"; 
+\r
+
+\r
+ if (empty($s)) {
+\r
+  $s=0;
+\r
+  }
+\r
+
+\r
+// get results
+\r
+  $query .= " limit $s,$limit";
+\r
+
+\r
+// get results
+\r
+  $result = mysqli_query($query) or die("Couldn't execute query");
+\r
+
+\r
+
+\r
+// now you can display the results returned
+\r
+  while ($row= mysqli_fetch_array($result)) {
+\r
+  
+\r
+  $id= $row["id"];
+\r
+  $ip= $row["ip"];
+\r
+  $date = $row["date"];
+\r
+  $site = $row["site"];
+\r
+  $type= $row["type"];
+\r
+  $link_raw= $row["link"];
+\r
+  $page= $row["page"];
+\r
+  $link=nicetrim($link_raw);
+\r
+
+\r
+  
+\r
+  
+\r
+echo "<font face='Arial, Helvetica, sans-serif' size='1' color='#000000'>$id | $ip | $date | $site | $type | $page </font><font face='Arial, Helvetica, sans-serif' size='1' color='#666666'>$link<br><br></font>";
+\r
+
+\r
+}
+\r
+
+\r
+$currPage = (($s/$limit) + 1);
+\r
+
+\r
+//break before paging
+\r
+  echo "<br />";
+\r
+
+\r
+  // next we need to do the links to other results
+\r
+  if ($s>=1) { // bypass PREV link if s is 0
+\r
+  $prevs=($s-$limit);
+\r
+  print "&nbsp;<a href=\"$PHP_SELF?s=$prevs&var=$var&criteria=$criteria\">&lt;&lt; 
+\r
+  Prev 100</a>&nbsp&nbsp;";
+\r
+  }
+\r
+
+\r
+// calculate number of pages needing links
+\r
+  $pages=intval($numrows/$limit);
+\r
+
+\r
+// $pages now contains int of pages needed unless there is a remainder from division
+\r
+
+\r
+  if ($numrows%$limit) {
+\r
+  // has remainder so add one page
+\r
+  $pages++;
+\r
+  }
+\r
+
+\r
+// check to see if last page
+\r
+  if (!((($s+$limit)/$limit)==$pages) && $pages!=1) {
+\r
+
+\r
+  // not last page so give NEXT link
+\r
+  $news=$s+$limit;
+\r
+
+\r
+  echo "&nbsp;<a href=\"$PHP_SELF?s=$news&var=$var&criteria=$criteria\">Next 100 &gt;&gt;</a>";
+\r
+  }
+\r
+
+\r
+$a = $s + ($limit) ;
+\r
+  if ($a > $numrows) { $a = $numrows ; }
+\r
+  $b = $s + 1 ;
+\r
+
+\r
+?>
+\r
+                 </b></font></div></td>
+\r
+               </tr>
+\r
+             </table>
+\r
+             <p>&nbsp;
+\r
+                          </p>
+\r
+                  </form>
+\r
+          </td>
+\r
+        </tr>
+\r
+      </table>   
+\r
+         <p align="left" style="margin: 0in 0in 0pt">&nbsp;</p>
+\r
+                     </td>
+\r
+     </tr></tbody></table></td><td width="36" background="http://www.skincaresolve.com/images/200801152254030801_pc_blue_template_right_bg_35w.jpg"> </td></tr><tr><td colspan="3"><a href="http://www.percontact.com" target="_blank"><img src="http://www.skincaresolve.com/images/200801152254030801_pc_blue_template_bottom_750w.jpg" border="0" alt="bottom bar" /></a><a href="http://wvr.org/email_donate.php" target="_blank"></a></td></tr></tbody></table>
+\r
+         
+\r
+         </p>
+\r
+      <p>&nbsp;</p>
+\r
+      <p align="left"><br />  
+\r
+          <br />
+\r
+      </p>
+\r
+    </div></td>
+\r
+  </tr>
+\r
+</table>
+\r
+<?
+\r
+//View Tracking Code for reference
+\r
+
+\r
+                  
+\r
+                  //Time & Date
+\r
+                       $date = date ('m/d/y  g:i a');
+\r
+                       
+\r
+                       //IP Address
+\r
+                       $ip = $_SERVER['REMOTE_ADDR'];
+\r
+                       
+\r
+                       $type = "view";
+\r
+                       
+\r
+                       $site = "basiclogin.com";
+\r
+
+\r
+//Query Block Tracking: WHERE '$ip' != '69.254.101.167'
+\r
+
+\r
+          $query = "INSERT INTO `traffic` (`date`,`ip`,`link`,`notes`,`site`,`type`) 
+\r
+         VALUES ( '$date','$ip','$link','$notes','$site','$type' WHERE '$ip' != '69.254.101.167')";   
+\r
+                                
+\r
+                 // save the info to the database
+\r
+   $results = mysqli_query( $query );
+\r
+   
+\r
+?>
+\r
+</body>
+\r
+</html>
+\r
index 8ae82a9..d5bf56f 100644 (file)
@@ -1,9 +1,18 @@
-<form accept-charset="utf-8" name="LoginForm" method="post" action="user_add_save.php">\r\r
-   <label>e-Mail:</label><input value="<? echo $email; ?>" name="email"/><br/>\r\r
-   <label>Password:</label><input value="<? echo $password; ?>" name="password" type="password"/><br/>\r\r
-   <br/>\r\r
-   <input type=submit value="Sign-Up"/>\r\r
-</form>\r\r
-  <script>                             \r\r
-    document.LoginForm.user.focus();\r\r
-  </script>\r\r
+<form accept-charset="utf-8" name="LoginForm" method="post" action="user_add_save.php">
+\r
+   <label>e-Mail:</label><input value="<? echo $email; ?>" name="email"/><br/>
+\r
+   <label>Password:</label><input value="<? echo $password; ?>" name="password" type="password"/><br/>
+\r
+   <br/>
+\r
+   <input type=submit value="Sign-Up"/>
+\r
+</form>
+\r
+  <script>                             
+\r
+    document.LoginForm.user.focus();
+\r
+  </script>
+\r
index 9965209..cfc20a5 100644 (file)
@@ -1,17 +1,34 @@
-<!--\r\r
-\r\r
-<div align="center">\r\r
--->\r\r
-\r\r
-<?php include "header.html"; ?>\r\r
-<?php include "user_add.form.php"; ?>\r\r
-<!--\r\r
-<?php include "footer.html"; ?>\r\r
-  <p>\r\r
-    <?\r\r
-\r\r
-?>\r\r
-  </p>\r\r
-  <p>&nbsp;</p>\r\r
-</div>\r\r
--->\r\r
+<!--
+\r
+
+\r
+<div align="center">
+\r
+-->
+\r
+
+\r
+<?php include "header.html"; ?>
+\r
+<?php include "user_add.form.php"; ?>
+\r
+<!--
+\r
+<?php include "footer.html"; ?>
+\r
+  <p>
+\r
+    <?
+\r
+
+\r
+?>
+\r
+  </p>
+\r
+  <p>&nbsp;</p>
+\r
+</div>
+\r
+-->
+\r
index 780730e..420783d 100644 (file)
-<?php include "header.html"; ?>\r\r
-\r\r
-<!--\r\r
-  <table width="500" border="0" cellspacing="0" cellpadding="0">\r\r
-    <tr>\r\r
-      <td>\r\r
--->      \r\r
-<?php\r\r
-  $username_already_in_use = $_REQUEST['username_already_in_use'];\r\r
-       $email_already_in_use = $_REQUEST['email_already_in_use'];\r\r
-       $pw_insecure = $_REQUEST['pw_insecure'];\r\r
-       $bad_email = $_REQUEST['bad_email'];\r\r
-       $username_too_short = $_REQUEST['username_too_short'];\r\r
-       \r\r
-               if($username_too_short==104) {\r\r
-                       echo "<font size='2' color='#ff0000' face='Verdana, Arial, Helvetica, sans-serif'>";\r\r
-      echo "That username is too short.  Please make it more than 4 characters.<br><br>";\r\r
-      echo "</font>";\r\r
-    }\r\r
-       \r\r
-       if($username_already_in_use==104) {\r\r
-                echo "<font size='2' color='#ff0000' face='Verdana, Arial, Helvetica, sans-serif'>";\r\r
-     echo "That username is already in use.  Please try again or log in to your existing account.<br><br>"; // </font>";\r\r
-     echo "</font>";\r\r
-  }\r\r
-\r\r
-       if($email_already_in_use==104) {\r\r
-                echo "<font size='2' color='#ff0000' face='Verdana, Arial, Helvetica, sans-serif'>";\r\r
-     echo "That email is already in use.  That probably means you have an existing account. Log in or <a href='email_password.php'>reset your password</a><br><br>";\r\r
-     echo "</font>";\r\r
-  }\r\r
-\r\r
-       if($pw_insecure==104){\r\r
-                echo "<font size='2' color='#ff0000' face='Verdana, Arial, Helvetica, sans-serif'>";\r\r
-     echo "Your Password is not formatted correctly.  Please choose a password that is between 4 and 20 characters and has at least 1 uppercase letter, one lower case letter and one number I.E. <i>Hello23</i>.<br><br>";\r\r
-     echo "</font>";\r\r
-  }\r\r
-       \r\r
-  if($bad_email==104){\r\r
-   echo "<font size='2' color='#ff0000' face='Verdana, Arial, Helvetica, sans-serif'>";\r\r
-   echo "Your email does not appear to be valid";\r\r
-   echo "<br><br></font>";\r\r
-  }\r\r
-\r\r
-\r\r
-  ?></td>\r\r
-    </tr>\r\r
-  </table>\r\r
-<?php include "user_add.form.php"; ?>\r\r
-  <p>\r\r
-    <?\r\r
-\r\r
-?>\r\r
-  </p>\r\r
-  <p>&nbsp;</p>\r\r
-</div>\r\r
+<?php include "header.html"; ?>
+\r
+
+\r
+<!--
+\r
+  <table width="500" border="0" cellspacing="0" cellpadding="0">
+\r
+    <tr>
+\r
+      <td>
+\r
+-->      
+\r
+<?php
+\r
+  $username_already_in_use = $_REQUEST['username_already_in_use'];
+\r
+       $email_already_in_use = $_REQUEST['email_already_in_use'];
+\r
+       $pw_insecure = $_REQUEST['pw_insecure'];
+\r
+       $bad_email = $_REQUEST['bad_email'];
+\r
+       $username_too_short = $_REQUEST['username_too_short'];
+\r
+       
+\r
+               if($username_too_short==104) {
+\r
+                       echo "<font size='2' color='#ff0000' face='Verdana, Arial, Helvetica, sans-serif'>";
+\r
+      echo "That username is too short.  Please make it more than 4 characters.<br><br>";
+\r
+      echo "</font>";
+\r
+    }
+\r
+       
+\r
+       if($username_already_in_use==104) {
+\r
+                echo "<font size='2' color='#ff0000' face='Verdana, Arial, Helvetica, sans-serif'>";
+\r
+     echo "That username is already in use.  Please try again or log in to your existing account.<br><br>"; // </font>";
+\r
+     echo "</font>";
+\r
+  }
+\r
+
+\r
+       if($email_already_in_use==104) {
+\r
+                echo "<font size='2' color='#ff0000' face='Verdana, Arial, Helvetica, sans-serif'>";
+\r
+     echo "That email is already in use.  That probably means you have an existing account. Log in or <a href='email_password.php'>reset your password</a><br><br>";
+\r
+     echo "</font>";
+\r
+  }
+\r
+
+\r
+       if($pw_insecure==104){
+\r
+                echo "<font size='2' color='#ff0000' face='Verdana, Arial, Helvetica, sans-serif'>";
+\r
+     echo "Your Password is not formatted correctly.  Please choose a password that is between 4 and 20 characters and has at least 1 uppercase letter, one lower case letter and one number I.E. <i>Hello23</i>.<br><br>";
+\r
+     echo "</font>";
+\r
+  }
+\r
+       
+\r
+  if($bad_email==104){
+\r
+   echo "<font size='2' color='#ff0000' face='Verdana, Arial, Helvetica, sans-serif'>";
+\r
+   echo "Your email does not appear to be valid";
+\r
+   echo "<br><br></font>";
+\r
+  }
+\r
+
+\r
+
+\r
+  ?></td>
+\r
+    </tr>
+\r
+  </table>
+\r
+<?php include "user_add.form.php"; ?>
+\r
+  <p>
+\r
+    <?
+\r
+
+\r
+?>
+\r
+  </p>
+\r
+  <p>&nbsp;</p>
+\r
+</div>
+\r
index a94d7b3..551afb2 100644 (file)
-<?php\r\r
-\r\r
-        $hybridauth_config = /* dirname(__FILE__) . */ '../hybridauth/config.php';\r\r
-        require_once( "../hybridauth/Hybrid/Auth.php" );\r\r
-\r\r
-               try{\r\r
-                       \r\r
-               // create an instance for Hybridauth with the configuration file path as parameter\r\r
-                       $hybridauth = new Hybrid_Auth( $hybridauth_config );\r\r
-\r\r
-               // try to authenticate the selected $provider\r\r
-                       $adapter = $hybridauth->authenticate( $username );\r\r
-\r\r
-               // grab the user profile\r\r
-                       $user_profile = $adapter->getUserProfile();\r\r
-                       \r\r
-                       // a) Does user with "xxx" = identifier exist?\r\r
-                       //   -> Yes, then login as user                    \r\r
-\r\r
-                       // b) Does email of user exist?\r\r
-                       //   -> No, then create new user\r\r
-\r\r
-                       // c) Does email of user exist?\r\r
-                       //   -> Yes, ask for regular login. Preset email = login\r\r
-                       \r\r
-                       $provider_uid  = $user_profile->identifier;\r\r
-                       $email         = $user_profile->email;\r\r
-                       $first_name    = $user_profile->firstName;\r\r
-                       $last_name     = $user_profile->lastName;\r\r
-                       $display_name  = $user_profile->displayName;\r\r
-                       $website_url   = $user_profile->webSiteURL;\r\r
-                       $profile_url   = $user_profile->profileURL;\r\r
-                       $password      = rand( ) ; # for the password we generate something random\r\r
-                       \r\r
-                       echo $provider_uid."<br>";\r\r
-                       echo $email;\r\r
-               }\r\r
-               catch( Exception $e ){\r\r
-                       // Display the recived error\r\r
-                       switch( $e->getCode() ){ \r\r
-                               case 0 : $error = "Unspecified error."; break;\r\r
-                               case 1 : $error = "Hybriauth configuration error."; break;\r\r
-                               case 2 : $error = "Provider not properly configured."; break;\r\r
-                               case 3 : $error = "Unknown or disabled provider."; break;\r\r
-                               case 4 : $error = "Missing provider application credentials."; break;\r\r
-                               case 5 : $error = "Authentification failed. The user has canceled the authentication or the provider refused the connection."; break;\r\r
-                               case 6 : $error = "User profile request failed. Most likely the user is not connected to the provider and he should to authenticate again."; \r\r
-                                            $adapter->logout(); \r\r
-                                            break;\r\r
-                               case 7 : $error = "User not connected to the provider."; \r\r
-                                            $adapter->logout(); \r\r
-                                            break;\r\r
-                       } \r\r
-    }      \r\r
+<?php
+\r
+
+\r
+        $hybridauth_config = /* dirname(__FILE__) . */ '../hybridauth/config.php';
+\r
+        require_once( "../hybridauth/Hybrid/Auth.php" );
+\r
+
+\r
+               try{
+\r
+                       
+\r
+               // create an instance for Hybridauth with the configuration file path as parameter
+\r
+                       $hybridauth = new Hybrid_Auth( $hybridauth_config );
+\r
+
+\r
+               // try to authenticate the selected $provider
+\r
+                       $adapter = $hybridauth->authenticate( $username );
+\r
+
+\r
+               // grab the user profile
+\r
+                       $user_profile = $adapter->getUserProfile();
+\r
+                       
+\r
+                       // a) Does user with "xxx" = identifier exist?
+\r
+                       //   -> Yes, then login as user                    
+\r
+
+\r
+                       // b) Does email of user exist?
+\r
+                       //   -> No, then create new user
+\r
+
+\r
+                       // c) Does email of user exist?
+\r
+                       //   -> Yes, ask for regular login. Preset email = login
+\r
+                       
+\r
+                       $provider_uid  = $user_profile->identifier;
+\r
+                       $email         = $user_profile->email;
+\r
+                       $first_name    = $user_profile->firstName;
+\r
+                       $last_name     = $user_profile->lastName;
+\r
+                       $display_name  = $user_profile->displayName;
+\r
+                       $website_url   = $user_profile->webSiteURL;
+\r
+                       $profile_url   = $user_profile->profileURL;
+\r
+                       $password      = rand( ) ; # for the password we generate something random
+\r
+                       
+\r
+                       echo $provider_uid."<br>";
+\r
+                       echo $email;
+\r
+               }
+\r
+               catch( Exception $e ){
+\r
+                       // Display the recived error
+\r
+                       switch( $e->getCode() ){ 
+\r
+                               case 0 : $error = "Unspecified error."; break;
+\r
+                               case 1 : $error = "Hybriauth configuration error."; break;
+\r
+                               case 2 : $error = "Provider not properly configured."; break;
+\r
+                               case 3 : $error = "Unknown or disabled provider."; break;
+\r
+                               case 4 : $error = "Missing provider application credentials."; break;
+\r
+                               case 5 : $error = "Authentification failed. The user has canceled the authentication or the provider refused the connection."; break;
+\r
+                               case 6 : $error = "User profile request failed. Most likely the user is not connected to the provider and he should to authenticate again."; 
+\r
+                                            $adapter->logout(); 
+\r
+                                            break;
+\r
+                               case 7 : $error = "User not connected to the provider."; 
+\r
+                                            $adapter->logout(); 
+\r
+                                            break;
+\r
+                       } 
+\r
+    }      
+\r
 ?>
\ No newline at end of file