Пример #1
0
 /**
  * Change payment status of order
  * @return void
  * @param integer id of orde
  * @param string new status
  */
 public function change_payment($id, $new)
 {
     // Check user permission and type of payment
     if (user::is_got() and payment::get_type($this->order->get_payment($id)) == "post") {
         $this->order->change_payment($id, $new);
         url::redirect('/order/order/' . $id);
     } else {
         url::redirect('/denied');
     }
 }
Пример #2
0
,- <?php 
echo Kohana::lang('eshop.currency');
?>
</td>
	</tr>
</table>

<? if(user::is_got()){ ?>
	<h3><? echo Kohana::lang('eshop.admin'); ?></h3>
	<div class="admin">
			<p>
				<?php 
echo Kohana::lang('eshop.status_payment');
?>
:
				<? if(payment::get_type($data['payment']) == "post"){ ?>

					<? if($data['status_payment'] == 'none'){ echo "<strong>";} ?><a href="/order/change_payment/<? echo $data['id']; ?>/none"><?php 
echo Kohana::lang('eshop.none');
?>
</a><? if($data['status_payment'] == 'none'){ echo "</strong>";} ?> |
					<? if($data['status_payment'] == 'paid'){ echo "<strong>";} ?><a href="/order/change_payment/<? echo $data['id']; ?>/paid"><?php 
echo Kohana::lang('eshop.paid');
?>
</a><? if($data['status_payment'] == 'paid'){ echo "</strong>";} ?>
				<? } else { ?>
					<? echo Kohana::lang('eshop.disabled_due_payment'); ?>
				<? } ?>
			</p>
			<p>
				<?php