This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/modules/adsl/views/service/user/plugin/adsl/view.php

80 lines
2.5 KiB
PHP

<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>
</div> <!-- /span -->
<div class="span6">
<fieldset>
<legend>Traffic Usage</legend>
<div class="dl-horizontal">
<dt>Last Month</dt>
<dd>&nbsp;<?php echo $o->traffic_month(strtotime('first day of 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 -->
<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 -->