<?php 
/**
 * The create view file of exchange module of ZDOO.
 *
 * @copyright   Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Tingting Dai <daitingting@xirangit.com>
 * @package     exchange
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.modal.html.php';?>
<form method='post' id='ajaxForm' action='<?php echo inlink('create', "giftID={$gift->id}");?>'>
  <table class='table table-form'>
    <tr>
      <th class='w-80px'><?php echo $lang->exchange->gift;?></th>
      <td class='w-p100'><?php echo $gift->name;?></td><td></td>
    </tr>
    <tr>
      <th><?php echo $lang->exchange->score;?></th>
      <td class='giftScore'><?php echo $gift->score;?></td>
    </tr>
    <tr>
      <th><?php echo $lang->exchange->scoreBalance;?></th>
      <td><?php echo $user->score;?></td>
    </tr>
    <tr>
      <th><?php echo $lang->exchange->amount;?></th>
      <td><?php echo html::number('amount', '1', "class='form-control' min='1' max='{$gift->limit}'");?></td>
    </tr>
    <tr>
      <th><?php echo $lang->exchange->costScore;?></th>
      <td class='costScore'><?php echo ' ' . html::hidden('score');?></td>
    </tr>
    <tr>
      <th></th>
      <td colspan='2' class='form-actions'>
        <?php echo html::submitButton();?>
        <?php echo html::commonButton($lang->goback, 'btn btn-back', "data-dismiss='modal'");?>
      </td>
    </tr>
  </table>
</form>
<?php include '../../common/view/footer.html.php';?>
