Internal overhaul

This commit is contained in:
Deon George
2013-11-28 17:41:34 +11:00
parent 0ed5e5163d
commit f8a5b153cf
91 changed files with 1570 additions and 1619 deletions

View File

@@ -5,6 +5,7 @@
<th><?php echo $o->friendly($i); ?></th>
<?php endforeach ?>
</tr></thead>
<tbody>
<?php foreach ($td as $i => $details) : ?>
<tr>

View File

@@ -1,80 +1,79 @@
<fieldset class="span5">
<legend>Service Details</legend>
<div class="span6">
<fieldset>
<legend>Service Details</legend>
<div class="dl-horizontal">
<dt>Service Number</dt>
<dd><?php echo $o->display('service_number'); ?></dd>
<dt>Service Address</dt>
<dd><?php echo $o->display('service_address'); ?></dd>
<dt>Connect Date</dt>
<dd><?php echo $o->display('service_connect_date'); ?></dd>
<dt>Contract Term</dt>
<dd><?php echo $o->display('contract_term'); ?></dd>
<dt>Contract End Date</dt>
<dd><?php echo $o->contract_date_end(TRUE); ?></dd>
<dt>Service Username</dt>
<dd><?php echo $o->display('service_username'); ?></dd>
<dt>Service Password</dt>
<dd><?php echo $o->display('service_password'); ?></dd>
<dt>Service IP</dt>
<dd><?php echo $o->ipaddress(); ?></dd>
<?php if ($o->hasOffPeak() AND $o->offpeak_start AND $o->offpeak_end) : ?>
<dt>Offpeak Period</dt>
<dd><?php printf('%s-%s',$o->offpeak_start,$o->offpeak_end); ?></dd>
<?php endif ?>
</div> <!-- dl-horizontal -->
</fieldset>
<fieldset class="span6">
<legend>Traffic Usage</legend>
<div class="dl-horizontal">
<dt>Last Month</dt>
<dd>&nbsp;<?php echo $o->traffic_month(strtotime('last month'),TRUE,TRUE); ?></dd>
<dt>This Month</dt>
<dd>&nbsp;<?php echo $o->traffic_month(strtotime('yesterday'),TRUE,TRUE); ?></dd>
<dt>Excess Traffic</dt>
<dd>&nbsp;$<?php echo $o->traffic_excess(strtotime('yesterday'),TRUE,TRUE); ?></dd>
</div> <!-- dl-horizontal -->
</fieldset>
<fieldset class="span6">
<form class="form-inline" method="POST">
<div class="dl-horizontal">
<dt>View Traffic for</dt>
<dd><?php echo Form::select('month',array_merge(array(''),$o->get_traffic_months()),(isset($_POST['month']) ? $_POST['month'] : ''),array('class'=>'input-small','nocg'=>TRUE)); ?>
<button type="submit" class="btn btn-mini">Submit</button></dd>
<dt>Service Number</dt>
<dd><?php echo $o->display('service_number'); ?></dd>
<dt>Service Address</dt>
<dd><?php echo $o->display('service_address'); ?></dd>
<dt>Connect Date</dt>
<dd><?php echo $o->display('service_connect_date'); ?></dd>
<dt>Contract Term</dt>
<dd><?php echo $o->display('contract_term'); ?></dd>
<dt>Contract End Date</dt>
<dd><?php echo $o->contract_date_end(TRUE); ?></dd>
<dt>Service Username</dt>
<dd><?php echo $o->display('service_username'); ?></dd>
<dt>Service Password</dt>
<dd><?php echo $o->display('service_password'); ?></dd>
<dt>Service IP</dt>
<dd><?php echo $o->ipaddress(); ?></dd>
<?php if ($o->hasOffPeak() AND $o->offpeak_start AND $o->offpeak_end) : ?>
<dt>Offpeak Period</dt>
<dd><?php printf('%s-%s',$o->offpeak_start,$o->offpeak_end); ?></dd>
<?php endif ?>
</div> <!-- dl-horizontal -->
</form>
</fieldset>
</div> <!-- /span -->
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1" data-toggle="tab">Graph</a></li>
<li class=""><a href="#tab2" data-toggle="tab">Table</a></li>
</ul>
<div class="span6">
<fieldset>
<legend>Traffic Usage</legend>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<?php echo $o->traffic_graph(isset($_POST['month']) ? $_POST['month'] : ''); ?>
</div> <!-- /tab-pane -->
<div class="dl-horizontal">
<dt>Last Month</dt>
<dd>&nbsp;<?php echo $o->traffic_month(strtotime('last month'),TRUE,TRUE); ?></dd>
<div class="tab-pane" id="tab2">
<?php echo $o->traffic_table(isset($_POST['month']) ? $_POST['month'] : ''); ?>
</div> <!-- /tab-pane -->
<dt>This Month</dt>
<dd>&nbsp;<?php echo $o->traffic_month(strtotime('yesterday'),TRUE,TRUE); ?></dd>
</div> <!-- /tab-content -->
</div> <!-- /tabbable -->
<dt>Excess Traffic</dt>
<dd>&nbsp;$<?php echo $o->traffic_excess(strtotime('yesterday'),TRUE,TRUE); ?></dd>
</div> <!-- dl-horizontal -->
</fieldset>
<form class="form-inline" method="POST">
<div class="dl-horizontal">
<dt>View Traffic for</dt>
<dd><?php echo Form::select('month',array_merge(array(''),$o->get_traffic_months()),(isset($_POST['month']) ? $_POST['month'] : ''),array('class'=>'input-small','nocg'=>TRUE)); ?>
<button type="submit" class="btn btn-mini">Submit</button></dd>
</div> <!-- dl-horizontal -->
</form>
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1" data-toggle="tab">Graph</a></li>
<li class=""><a href="#tab2" data-toggle="tab">Table</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<?php echo $o->traffic_graph(isset($_POST['month']) ? $_POST['month'] : ''); ?>
</div> <!-- /tab-pane -->
<div class="tab-pane" id="tab2">
<?php echo $o->traffic_table(isset($_POST['month']) ? $_POST['month'] : ''); ?>
</div> <!-- /tab-pane -->
</div> <!-- /tab-content -->
</div> <!-- /tabbable -->
</fieldset>
</div> <!-- /span -->