add logout to example wordpress self-service, RT#75279
[freeside.git] / fs_selfservice / wordpress / example_selfservice.php
1 <?php
2
3 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
4
5 $freeside = new FreesideSelfService();
6
7 $customer_info = $freeside->customer_info_short( array(
8   'session_id' => $_COOKIE['freeside_session_id'],
9 ) );
10
11
12 if ( isset($customer_info['error']) && $customer_info['error'] ) {
13   $error = $customer_info['error'];
14   wp_redirect('example_login.php?freeside_error='. urlencode($error));
15   die();
16 }
17
18 extract($customer_info);
19
20 get_header();
21
22 ?>
23
24 <h3>Billing</h3>
25
26 <p><big><strong>Name</strong></big></p>
27 <p><?php echo htmlspecialchars($name); ?></p>
28
29 <?php if ( $signupdate_pretty ) { ?>
30   <p><big><strong>Signup Date</strong></big></p>
31   <p><?php echo htmlspecialchars($signupdate_pretty); ?></p>
32 <?php } ?>
33
34 <p><big><strong>Username</strong></big></p>
35 <p><?php echo htmlspecialchars($svc_label) ?></p>
36
37 <p><big><strong>Account Number</strong></big></p>
38 <p><?php echo $display_custnum ?></p>
39
40 <p><big><strong>Address</strong></big></p>
41 <address>
42 <?php echo htmlspecialchars($address1); ?><br>
43 <?php echo strlen($address2) ? htmlspecialchars($address2).'<br>' : '' ?>
44 <?php echo $city ?>, <?php echo $state ?>  <?php echo $zip ?><br>
45 <?php echo $country ?>
46 </address>
47
48 <p><big><strong>Email Address</strong></big></p>
49 <p><?php echo htmlspecialchars($invoicing_list) ?></p>
50
51 <br>
52 <br>
53 <br>
54 <p><big><strong>Total Balance</strong></big></p>
55 <h4><?php echo $balance_pretty ?></h4>
56
57 <br>
58 <br>
59 <br>
60 <p><a href="view_invoice.php?invnum=<?php echo $max_invnum ?>">View my Bill</a></p>
61 <p><a href="change_bill.php">Change Bill Deliver Options</a></p>
62
63 <p><a href="process_logout.php">Logout</a></p>
64
65
66 <h3>Services</h3>
67
68 <h4><font color="#4682B4"> <i class="fa fa-laptop"> </i> </font> Internet </h4>
69 <h4><font color="#4682B4"> <i class="fa fa-volume-control-phone"> </i> </font>   Voice </h4>
70
71 <?php echo $announcement ?>
72
73 <!--
74 your open invoices if you have any & payment link if you have one.  more insistant if you're late?
75 <BR><BR>
76
77 your tickets.  some notification if there's new responses since your last login 
78 <BR><BR>
79
80 anything else?
81 -->
82
83
84 <?php get_footer(); ?>