Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.34 KB | None | 0 0
  1. <?php
  2.  
  3. include('config2.php');
  4.  
  5. $query = sprintf("SELECT * FROM billingdates");
  6. $result = mysql_query($query);
  7.  
  8. echo "Date Range: <br /><br />";
  9.  
  10. while($row2 = mysql_fetch_array($result))
  11. {
  12.     $storedatestart++  = $row['start'];
  13.     $storedatefinish++ = $row['finish'];
  14. }
  15.  
  16.  
  17. $db = pg_connect('host= dbname= user= password=');
  18.  
  19. $query2 = sprintf("SELECT COUNT(inbound) AS totalcountcalls FROM call_stats WHERE inbound = 1 AND dura_released = null AND mainbox= ' " . $_SESSION['SESS_DID'] . "' AND time_start between '" . $storedatestart++ . " ' AND '" . $storedatefinish++ . " '");
  20.  
  21.         $result2 = pg_query($query2);
  22.         if (!$result2) {
  23.             echo "Problem with query " . $query2 . "<br/>";
  24.             echo pg_last_error();
  25.             exit();
  26.         }
  27.  
  28.  
  29. while($row3 = pg_fetch_array($result2))
  30. {
  31.     $queryresultcountrows++ = $totalcountcalls;
  32. }
  33.  
  34. while($row = mysql_fetch_array($result))
  35.   {
  36. echo "<form onSubmit='return validateForm()' name='frmRequest' action='report.php' method='post' encytype='multipart/form-data'>";
  37. echo "<input name='start' type='text' class=\"textfield2\" value='" . $row['start'] .  "'readonly /> To: <input value='" . $row['finished'] . "' name='finished' class=\"textfield2\" readonly /> <input type='submit' class='submit' value='Submit' /></form> " . $queryresultcountrows++ . "";
  38.   }
  39.  
  40.  
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement