Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/include/reports/UsefulReports_html.php
<?php
echo "<form action=\"include/reports/printReports.php\" method=\"post\" target=\"foo\" onsubmit=\"window.open('', 'foo', 'width=800,height=600,status=yes,resizable=yes,scrollbars=yes')\">";
echo "<span style=\"font-weight: bold; font-family: Arial;\"></span>
	<hr><small>";
$resultloc = getLocationName($oreon->user);
echo '<table style=text-align: left; width: 100%;><tr><td>Choose your Locations : </td><td>';
echo '<script type="text/javascript">  
function changeLocationStat(formulaire) { 
	document.location.href="phpmyprepaid.php?lsid="+formulaire.LocationChangeStat.value;
	}  
 </script>';
echo ('<select name="LocationChangeStat" onchange="changeLocationStat(this.form)">');
$loctmp=$loc;
if ($oreon->user->get_status()=='3') {
	if ($_GET['lsid']=="All")
	{
		echo ("<option  value=\"All\">All");
		$loctmp="-1";
	}
	else
	echo ("<option selected=\"selected\" value=\"All\">All");

}
while ($row = $oreon->database->database->fetch_object($resultloc)) {
      if($loctmp==$row->ID )
	      echo ("<option selected=\"selected\" value=\"".$row->LocationName."\">".$row->LocationName);
      else
	      echo ("<option  value=\"".$row->LocationName."\">".$row->LocationName);
}
echo "</td></tr></table></select><br>
<input type=\"hidden\" name=\"buttonID\" value=\"$buttonID\">
<input type=\"hidden\" name=\"locationReports\" value=\"$loc\">
<input type=\"hidden\" name=\"phpmyprepaid\" value=\"".session_id()."\">
<b>Print Reports for location $LocName
<hr><br>
<span><table><tr><td>
Billing Plan :</td>

<td><select name=\"billing_plan\">";

echo "<option selected=\"selected\">None</option>";
while ($r=$oreon->database->database->fetch_object($result))
{
  echo "<option >$r->NameBp</option>";
}

echo "</select><br>
<tr>
<td></span> Type :</td>
<td><select name=\"type\">";
	
echo "<option selected=\"selected\">None</option>";
while ($r=$oreon->database->database->fetch_object($result2))
{
	echo "<option>$r->Type</option>";
}
echo "</select></td>
<tr><td> Order By :</td>

<td><select name=\"order\">
<option selected=\"selected\">None</option>
<option>Username</option>
<option>Creation Date</option>
<option>Type</option>
<option>Billing Plan</option>
<option>Activate Date</option>
</select></td></tr><tr><td>Based on :<td>";

echo "<select name=\"date_search\">";
if ($date_search=="Accounting Date")
      echo "<option selected=\"selected\" >Accounting Date</option>";
else
       echo "<option >Accounting Date</option>";
if ($date_search=="Login Date")
       echo "<option  selected=\"selected\" >Login Date</option>";
else 
       echo "<option>Login Date</option>";
if ($date_search=="Creation Date")
      	echo "<option  selected=\"selected\" >Creation Date</option>";
	else
	echo "<option>Creation Date</option>";
	
	echo "</td></select>
</tr></table>
<br>
&nbsp;&nbsp;
<center>
<table style=\"text-align: left; height: 28px; width: 606px;\"
 border=\"1\" >
  <tbody>
  <tr class=\"statresult\">
  <h2><b><p>Print List </p></b></h2> 
      <td class=\"statresult\" style=\"text-align: left; width: 10px;\"><input
      value=\"Billing Plan\" name=\"bp_list\" class =\"smallButton\" type=\"submit\"></td>
      <td class=\"statresult\" style=\"text-align: left; width: 10px;\"><input
      value=\"Users list\" name=\"user_list\" class =\"smallButton\" type=\"submit\"></td>
      <td class=\"statresult\" style=\"text-align: left; width: 10px;\"><input
      value=\" Unused Account\" name=\"never_used\" class =\"smallButton\" type=\"submit\"></td>
      </tr></table><br>
      
      </center>
      <hr><center><h2><b><p>Users Reports</p></b><br></center>  
      <table border=0 width=650 cellpadding=0 cellspacing=0>
      <tr >
	<td><small><b>from date</td>
	<td><small><b>to date</td>
	<td><small><b>user</td>
	<td>&nbsp;</td>
</tr>
<tr >
	<td >";
	echo '
		<input type="text"  width="20" name="after" id="after" size="15" value="'.$startf.'"/><button type="reset" id="f_trigger_b1">...</button>
		</span></td>';
	echo '<script type="text/javascript">
		Calendar.setup({
			inputField     :    "after",      // id of the input field
				ifFormat       :    "'.cdateformat_calendar($dateFormat).'",       // format of the input field
				showsTime      :    true,            // will display a time selector
				button         :    "f_trigger_b1",   // trigger for the calendar (button ID)
				singleClick    :    true,           // double-click mode
				step           :    1                // show all years in drop-down boxes (instead of every other year as default)
});
</script>';
	echo '<td>
		<input type="text"  width="13" name="before" id="before" size="15" value="'.$stopf.'"/><button type="reset" id="f_trigger_b2">...</button>
		</span></td>';
	echo '<script type="text/javascript">
		Calendar.setup({
			inputField     :    "before",      // id of the input field
				ifFormat       :    "'.cdateformat_calendar($dateFormat).'",       // format of the input field
				showsTime      :    true,            // will display a time selector
				button         :    "f_trigger_b2",   // trigger for the calendar (button ID)
				singleClick    :    true,           // double-click mode
				step           :    1                // show all years in drop-down boxes (instead of every other year as default)
});
</script>';

	echo "<td ><input type=\"text\" name=\"user\"  size=\"15\" value=$login ></td>
</b></tr>
</table>
<br><center>
      <table style=\"text-align: left; height: 28px; width: 606px;\" border=\"1\"><tr>
     <td class=\"statresult\" style=\"text-align: left; width: 90px;\"><input class =\"smallButton\" value=\"Activate Users\" name=\"activate_users\" type=\"submit\"></td>
      <td class=\"statresult\" style=\"text-align: left; width: 90px;\"><input class =\"smallButton\" value=\"Expired User\" name=\"expired_users\" type=\"submit\"></td>
      <td class=\"statresult\" style=\"text-align: left; width: 90px;\"><input class =\"smallButton\" value=\"User Accounting\" name=\"user_accounting\" type=\"submit\"></td>
      </tr></table><br>
     
      ";
echo "
<br>
<br>
</body>

</form>
</body>";

?>
Return current item: phpMyPrepaid