<?php $delete_img = amac_mp_home('/app/public/img/delete.png'); echo "<input type='hidden' id='del_img_url' value='$delete_img'>"; ?> <h3>Add Membership</h3><hr/> <div class="mp-admin-form"> <?php echo $this->form->create($model->name); ?> <?php echo $this->form->input('code'); ?> <?php echo $this->form->input('description'); ?> <?php echo $this->form->input('fee'); ?> <?php echo $this->form->belongs_to_dropdown('MembershipAddon', $addons, array('style'=>'width:170px;','label'=>'Addons','empty' => 'Select Addon')); ?> <h4>Assigned add-ons</h4> <div id="m_assigned_addons" style="display:none;"></div> <?php echo $this->form->end('Add'); ?> </div>
<?php $payment_histories = $this->view_vars['object']->payment_histories; $data = ''; $pdficon = amac_mp_home('/app/public/img/pdf_icon_mini.gif'); foreach ($payment_histories as $ph) { $invoice = DocHandler::request_url($ph->invoice); $receipt = DocHandler::request_url($ph->receipt); $data .= "<tr> <td>$ph->date</td> <td>$ph->trx_id</td> <td>$ph->item</td> <td>$ph->card</td> <td>$ph->charge</td> <td>$ph->payment</td> <td>$ph->balance</td> <td><a target='_blank' href='{$invoice}'><img src='$pdficon'></a></td> <td><a target='_blank' href='{$receipt}'><img src='$pdficon'></a></td> </tr>"; } ?> <div class="row"> <hr/> <h2>Payment History</h2> <table class="mp_payment_history"> <thead> <tr> <th>Date</th> <th>Transaction No</th> <th>Item</th>
<?php $img_url = amac_mp_home('/app/public/img/'); $b = $this->view_vars['object']->billing; $ccno = $b->card_number; if(!empty($ccno)) { $ccno = substr($ccno, 0, 4) . str_repeat("X", strlen($ccno) - 8) . substr($ccno, -4); } $expdate = !empty($b->expiry_date) ? date('F Y', strtotime($b->expiry_date)) : ''; // build drop-down items for months $optMonths = ''; foreach (array('01','02','03','04','05','06','07','08','09','10','11','12') as $option) { $optMonths .= "<option value='$option'>$option</option>\n"; } // build drop-down items for years $thisYear = (int) date('Y'); $optYears = ''; foreach (range($thisYear, $thisYear + 15) as $year) { $optYears .= "<option value='$year'>$year</option>\n"; } ?> <div id="mp_billing_details"> <div class="row" style="background: transparent url(<?php echo $img_url; ?>verisign_small.png) no-repeat right center;"> <h2>Billing Details</h2><hr/> <div class="small-6 large-8 columns"> <div><p><strong>Card Type:</strong> <span id="p_cc_type"><?php echo strtoupper($b->card_type); ?></span></p></div>
<?php $m = $this->view_vars['object']->membership; $renew_date = $this->view_vars['object']->renewal_date; $action = isset($renew_date) ? 'upgrade' : 'renew'; $mem_incl = ''; $tick_icon = amac_mp_home('/app/public/img/tick.png'); foreach ($m->memberships_addons as $memberships_addons) { $ma = $memberships_addons->membership_addon; $mem_incl .= "<p><img src='$tick_icon'/> ".ucfirst($ma->description)."</p>"; } ?> <div class="row"> <h2><?=ucfirst($this->view_vars['action']) ?> Membership</h2><hr/> <div class="small-6 large-6 columns"> <div><p><strong>Membership Type:</strong> <?php echo $m->description; ?></p></div> <div><p><strong>Membership Inclusions:</strong> </p></div> </div> <div class="small-6 large-6 columns"> <div><p><strong>Membership Fee:</strong> $<?php echo $m->fee; ?></p></div> <div><?php echo $mem_incl; ?></div> </div> </div> <?php if($m->code !== 'full'): ?> <div class="row"> <div class="small-6 large-6 columns"> </div> <div class="small-6 large-6 columns"> <a href="<?php echo home_url('/'.$action); ?>"><button class="button button-blue"><?= ucfirst($action) ?></button></a> </div> </div> <?php endif; ?>