<?php


$subscription_pack_options = array();
foreach($subscription_packs as $pack){
	$subscription_pack_options[$pack->subscription_pack_ID] = $pack->subscription_pack_name.' - Rs.'.$pack->subscription_amount;
}

?>
<br>
<div class="row">
	<div class="col-md-offset-2 col-md-6">
		<div class="panel panel-default">
			<div class="panel-heading">
				Renew Subscription
			</div>
			<div class="panel-body">
				<fieldset>
					<legend>Student:</legend>
					<div class="row">
						<div class="col-sm-3">
							<img src="<?= base_url('uploads/'.$student->profile_img); ?>" class="img-responsive img-thumbnail">
						</div>
						<div class="col-sm-9">
							<p><strong>Name : </strong> <?= $student->f_name.' '.$student->l_name; ?></p>
							<p><strong>Username : </strong> <?= $student->username; ?></p>
							<p><strong>E-mail : </strong> <?= $student->email; ?></p>
							<p><strong>Phone No. : </strong> <?= $student->phone_no; ?></p>
						</div>
					</div>
				</fieldset>
				<br><br>
				<?= form_open('subscription_renewal/renew'); ?>
				<?= hidden_input(array('name'=>'subscription_id', 'value' => $subscription->subscription_ID)); ?>
				<?= form_dropdown(array(
					'name'			=>'subscription_pack',
					'label'			=>'Select Subscription Pack :',
					'options'		=> $subscription_pack_options,
					'class'			=> array('form-control'=>'select2'),
					'placeholder'	=> 'Select a Subscription Pack',
					'selected'		=> $subscription->subscription_pack_ID
				)); ?>
				<?= form_submit(array('name'=>'renew','value'=>'Renew','class'=>'btn-success')); ?>
				<?= form_close(); ?>
			</div>
		</div>
	</div>
</div>
