summaryrefslogtreecommitdiff
path: root/ng_selfservice/services.php
blob: ce47e9ea4f2bd2d8acdfe176f2f19a9d2b685649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<? $title ='My Services'; include('elements/header.php'); ?>
<? $current_menu = 'services.php'; include('elements/menu.php'); ?>
<?

$list_pkgs = $freeside->list_pkgs( array(
  'session_id' => $_COOKIE['session_id'],
) );

if ( isset($list_pkgs['error']) && $list_pkgs['error'] ) {
  $error = $list_pkgs['error'];
  header('Location:index.php?error='. urlencode($error));
  die();
}

extract($list_pkgs);

?>
<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=1>
<TR>
  <TH ALIGN="LEFT">Product</TH>
  <TH ALIGN="LEFT">Status</TH>
  <TH ALIGN="LEFT" COLSPAN=2>Service(s)</TH>
  <TH ALIGN="LEFT"></TH>
</TR>

<? foreach ( $cust_pkg AS $pkg ) {
    if ( $pkg['status'] == 'one-time charge' ) { continue; }
    //$link = '<A HREF="ticket.php?'. $ticket['id']. '">';
    $rowspan = count($pkg['cust_svc']);
    if ( $rowspan == 0 ) { $rowspan = 1; }
    $td = '<TD ALIGN="LEFT" VALIGN="top" ROWSPAN="'. $rowspan. '">';
?>
  <TR>
    <TD COLSPAN=4 STYLE="border-top:1px solid #999999"></TD>
  </TR>
  <TR>
    <? echo $td ?><? echo $pkg['pkg_label']; ?></TD>
    <? echo $td ?>
      <FONT COLOR="#<? echo $pkg['statuscolor'] ?>"><B>
        <? echo ucfirst($pkg['status']); ?>
      </B></FONT>
      <? if ( $pkg['status'] == 'active' && $pkg['bill'] ) { ?>
        - renews on <? echo date('M jS Y', $pkg['bill']); ?>
      <? } ?>
    </TD>
    <? $subsequent = 0;
       foreach ( $pkg['cust_svc'] AS $svc ) {
         $label  = $svc['label'][0];
         $value  = $svc['label'][1];
         $table  = $svc['label'][2];
         $svcnum = $svc['label'][3];
    ?>
       <? if ( $subsequent++ ) { echo '<TR>'; } ?>
         <TD ALIGN="right"><? echo $label ?>: </TD>
         <TD><? echo $value ?></TD>
       </TR>
    <? } ?>
<? } ?>

</TABLE>
<BR>

<!-- <A HREF="services_new.php">Order a new service</A> -->
<FORM ACTION="services_new.php">
<INPUT TYPE="submit" VALUE="Order a new service">
</FORM>

<? include('elements/menu_footer.php'); ?>
<? include('elements/footer.php'); ?>