fix adding bills. needs more work to standardise URLs.

git-svn-id: http://www.observium.org/svn/observer/trunk@3245 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-05-27 15:29:54 +00:00
parent 1d4b392876
commit bde0dfd023
2 changed files with 6 additions and 5 deletions

View File

@@ -45,12 +45,12 @@ $pagetitle[] = "Billing";
echo("<meta http-equiv='refresh' content='10000'>"); echo("<meta http-equiv='refresh' content='10000'>");
if ($_GET['opta'] == "history") if ($vars['view'] == "history")
{ {
include("pages/bills/search.inc.php"); include("pages/bills/search.inc.php");
include("pages/bills/pmonth.inc.php"); include("pages/bills/pmonth.inc.php");
} }
elseif ($_GET['opta'] == "add") elseif ($vars['view'] == "add")
{ {
if (is_numeric($vars['port'])) if (is_numeric($vars['port']))
{ {

View File

@@ -37,18 +37,19 @@
<td width='170' style='font-weight:bold; font-size: 12px;'> <td width='170' style='font-weight:bold; font-size: 12px;'>
<?php <?php
if ($_GET['opta'] == "history") if ($vars['view'] == "history")
{ {
echo('<a href="bills/"><img src="images/16/clock.png" align=absmiddle alt="Current Billing Period"> Current Billing Period</a>'); echo('<a href="bills/"><img src="images/16/clock.png" align=absmiddle alt="Current Billing Period"> Current Billing Period</a>');
} else } else
{ {
echo('<a href="bills/history/"><img src="images/16/clock_red.png" align=absmiddle alt="Previous Billing Period"> Previous Billing Period</a>'); // FIXME - generate_url
echo('<a href="bills/view=history/"><img src="images/16/clock_red.png" align=absmiddle alt="Previous Billing Period"> Previous Billing Period</a>');
} }
?> ?>
</td> </td>
<td width='80' style='font-weight:bold; font-size: 12px;'> <td width='80' style='font-weight:bold; font-size: 12px;'>
<a href='bills/add/'><img src="images/16/add.png" align=absmiddle alt="Add"> Add Bill</a> <a href='bills/view=add/'><img src="images/16/add.png" align=absmiddle alt="Add"> Add Bill</a>
</td> </td>
</tr> </tr>
</form> </form>