Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('header.php');
- ?>
- <?php if (!isset($_POST['submit'])) { // if page is not submitted to itself echo the form
- ?>
- <div id="content">
- <h2>Leads List Reports</h2>
- <table width="276" border="0" cellpadding="0">
- <form method="post" action="<?php $_SERVER['PHP_SELF'];?>">
- <tr>
- <td width="139"> </td>
- <td width="131"> </td>
- </tr>
- <tr>
- <td>Enter Start Date:</td>
- <td><input name="date1" type="text" id="date1" size="10"/></td>
- </tr>
- <tr>
- <td>Enter End Date:</td>
- <td><input name="date2" type="text" id="date2" size="10"/></td>
- </tr>
- <td> </td>
- <td><input type="submit" value="Submit" name="submit" /></td>
- </tr>
- </table>
- </form>;
- </div>
- </div>
- </div>
- <?php
- } else {
- $date1 = $_POST['date1'];
- $date2= $_POST['date2'];
- mysql_select_db("leads", $con);
- $sql = "SELECT * from `leads` WHERE (`sub_date` BETWEEN '$date1' AND '$date2')";
- $result = mysql_query($sql);
- $num=mysql_numrows($result);
- }?>
- <div id="content">
- <h1>Leads List</h1>
- <tr valign="baseline">
- <td>
- </td></tr>
- <table border="1" cellspacing="2" cellpadding="2">
- <tr>
- <th><font face="Arial, Helvetica, sans-serif">Submission<br />Date</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Name</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Email</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Phone</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Loan Type</font></th>
- <th><font face="Arial, Helvetica, sans-serif">How Long</font></th>
- <th><font face="Arial, Helvetica, sans-serif">First<br />Time</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Veteran</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Property<br />Zip Code</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Property<br />Type</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Property<br />Use</font></th>
- <th><font face="Arial, Helvetica, sans-serif">When</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Afford</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Saved</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Income</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Credit<br />Score</font></th>
- <th><font face="Arial, Helvetica, sans-serif">On Time</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Bank-<br />ruptcies</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Fore-<br />closures</font></th>
- <th><font face="Arial, Helvetica, sans-serif">Judg-<br />ments</font></th>
- </tr>
- <?php
- while($row = mysql_fetch_array($result)) {
- ?>
- <tr>
- <td width="150" align="center"><font face="Arial, Helvetica, sans-serif"><?php echo $row['sub_date'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['salutation'];?><?php echo $row['f_name'];?> <?php echo $row['l_name'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['email'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['phone'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['loan_type'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['how_long'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['first_time'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['veteran'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['p_zip'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['p_type'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['p_use'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['when'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['afford'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['saved'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['income'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['credit_score'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['on_time'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['bankruptcies'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['foreclosures'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['judgments'];?></font></td>
- </tr>
- <?php
- }else{
- echo "Sorry, your search returned with no results";
- }
- ?>
- </table>
- <?php
- require_once('footer.php');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement