Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- session_start();
- $for=0;
- if ($_POST['txtUsername'] == $webuser && $_POST['txtPassword'] == $webpass || $_SESSION['auth']==0) {
- $for++;
- ?>
- <html>
- <head>
- <style>
- body {background:#000000;color:ffffff;text-align:center;font-size:11px;padding-top:100px;}
- img.logo {display:block;margin-left:auto;margin-right:auto;}
- </style>
- <title>Login Required</title>
- </head>
- <body>
- <img class="logo" src="wilcomp.png">
- <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
- <p><label for="txtUsername">Username:</label>
- <br /><input type="text" title="Enter your Username" name="txtUsername" /></p>
- <p><label for="txtpassword">Password:</label>
- <br /><input type="password" title="Enter your password" name="txtPassword" /></p>
- <p><input type="submit" name="Submit" value="Login" /></p>
- </form>
- </body>
- </html>
- <?
- }
- else
- {
- $_SESSION['auth']=1;
- mysql_connect(localhost,$username,$password);
- @mysql_select_db($database) or die( "Unable to select database");
- $query="SELECT * FROM demographics";
- $result=mysql_query($query);
- $num=mysql_numrows($result);
- mysql_close();
- echo <<<EOT
- <html>
- <head>
- <script src="sorttable.js"></script>
- <style>
- table {width:100%;margin: 0px;background: #FFFFFF;border: 1px solid #666;border-collapse: collapse;}
- td, th {font-size:12px;border-bottom: 1px solid #333333;padding: 5px 10px;text-align: center;}
- th {background: #eeeeee;}
- caption {background: #dddddd;margin: 0;border: 1px solid #333333;border-bottom: none;padding: 6px 6px;font-weight: bold;}
- body { text-align:center; }
- </style>
- <title>Demographic Information</title>
- </head>
- <body>
- <b>Change contacted status:</b><br>
- ID #: <form style="display: inline;" action="change.php" method="post"><input type="text" size="3" name="c1"> through ID #: <input type="text" size="3" name="c2">
- To: <form style="display: inline;" action="change.php" method="post"><select name="id"><option value="0">0</option><option value="1">1</option></select>
- <input type="submit"></form>
- <br>
- <br>
- <div align="center">
- <table class="sortable" align="center">
- <caption>Demographic Information</caption>
- <tr>
- <th>ID</th>
- <th>D.O.A</th>
- <th>IP</th>
- <th>Business</th>
- <th>Address</th>
- <th>City</th>
- <th>State</th>
- <th>ZIP</th>
- <th>Website</th>
- <th>Phone</th>
- <th>Contact</th>
- <th>Contact Phone</th>
- <th>Email</th>
- <th>Contacted</th>
- </tr>
- EOT;
- $o=1;
- $i=0;
- while ($i < $num) {
- $id=mysql_result($result,$i,"id");
- $doa=mysql_result($result, $i, "doa");
- $ip=mysql_result($result, $i, "ip");
- $business=mysql_result($result, $i, "business");
- $address=mysql_result($result, $i,"address");
- $city=mysql_result($result, $i, "city");
- $state=mysql_result($result, $i, "state");
- $zip=mysql_result($result, $i, "zip");
- $bsite=mysql_result($result, $i, "bsite");
- $phone=mysql_result($result, $i, "phone");
- $cname=mysql_result($result, $i, "cname");
- $cphone=mysql_result($result, $i, "cphone");
- $cemail=mysql_result($result, $i, "cemail");
- $contacted=mysql_result($result, $i, "contacted");
- echo <<<EOT
- <tr>
- <td>$id</td>
- <td>$doa</td>
- <td>$ip</td>
- <td>$business</td>
- <td>$address</td>
- <td>$city</td>
- <td>$state</td>
- <td>$zip</td>
- <td>$bsite</td>
- <td>$phone</td>
- <td>$cname</td>
- <td>$cphone</td>
- <td>$cemail</td>
- <td>$contacted</td>
- </tr>
- EOT;
- $i++;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement