HEX
Server: nginx/1.22.1
System: Linux VM-16-9-centos 3.10.0-1160.99.1.el7.x86_64 #1 SMP Wed Sep 13 14:19:20 UTC 2023 x86_64
User: www (1001)
PHP: 7.3.31
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/oa.sanjiangapp.com/app/crm/contract/view/edit.html.php
<?php
/**
 * The edit view file of contract 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      Yidong Wang <yidong@cnezsoft.com>
 * @package     contract
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../../sys/common/view/kindeditor.html.php';?>
<?php js::set('label', $lang->$moduleType->order);?>
<div id='mainTitle' class='clearfix'>
  <div class='btn-toolbar pull-left'>
    <?php if(!isonlybody()):?>
    <?php echo html::a('javascript:history.go(-1);', '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, "class='btn btn-back'");?>
    <div class="divider"></div>
    <?php endif;?>
    <div class="page-title">
      <span class="text"><?php echo $lang->$moduleType->edit . $lang->minus . $contract->name;?></span>
    </div>
  </div>
</div>
<form method='post' id='ajaxForm' class='main-row'>
  <div class='main-col col-8'>
    <div class='panel'>
      <div class='panel-body'>
        <table class='table table-form'>
          <tr>
            <th class='w-80px'><?php echo $lang->$moduleType->name;?></th>
            <td>
              <?php echo html::input('name', $contract->name, "class='form-control'");?>
            </td>
            <td class='w-400px'>
              <div class='input-group'>
                <div class='input-group-addon'><?php echo $lang->$moduleType->code;?></div>
                <?php echo html::input('code', $contract->code, "class='form-control'");?>
              </div>
            </td>
          </tr>
          <?php if($moduleType == 'contract'):?>
          <?php foreach($contractOrders as $currentOrder):?>
          <tr>
            <th class='orderTH'><?php echo $lang->$moduleType->order;?></th>
            <td>
              <span>
                <select name='order[]' class='select-order form-control'>
                  <?php foreach($orders as $order):?>
                  <?php if(!$order):?>
                  <option value='' data-real='' data-currency=''></option>
                  <?php else:?>
                  <?php if($order->id == $currentOrder->id or $order->status == 'normal'):?>
                  <?php $selected = $currentOrder->id == $order->id ? "selected='selected'" : '';?>
                  <option value="<?php echo $order->id;?>" <?php echo $selected;?> data-real="<?php echo $order->plan;?>" data-currency="<?php echo $order->currency?>"><?php echo $order->title;?></option>
                  <?php endif;?>
                  <?php endif;?>
                  <?php endforeach;?>
                </select>
              </span>
            </td>
            <td class='w-400px'>
              <span>
                <div class='input-group'>
                  <div class='input-group-addon order-currency'><?php echo zget($currencySign, $currentOrder->currency, '');?></div>
                  <?php echo html::input('real[]', ($currentOrder->real and $currentOrder->real != '0.00') ? $currentOrder->real : $currentOrder->plan, "class='order-real form-control' placeholder='{$this->lang->contract->placeholder->real}'");?>
                  <div class='input-group-btn'>
                    <a href='javascript:;' class='btn plus'><i class='icon-plus'></i></a>
                  </div>
                  <div class='input-group-btn'>
                    <a href='javascript:;' class='btn minus'><i class='icon-remove'></i></a>
                  </div>
                </div>
              </span>
            </td>
          </tr>
          <?php endforeach;?>
          <?php if(!$contractOrders):?>
          <tr>
            <th class='orderTH'><?php echo $lang->$moduleType->order;?></th>
            <td>
              <span>
                <select name='order[]' class='select-order form-control'>
                  <?php foreach($orders as $order):?>
                  <?php if(!$order):?>
                  <option value='' data-real='' data-currency=''></option>
                  <?php else:?>
                  <option value="<?php echo $order->id;?>" data-real="<?php echo $order->plan;?>" data-currency="<?php echo $order->currency?>"><?php echo $order->title;?></option>
                  <?php endif;?>
                  <?php endforeach;?>
                </select>
              </span>
            </td>
            <td class='w-400px'>
              <span>
                <div class='input-group'>
                  <div class='input-group-addon order-currency'><?php echo zget($currencySign, $contract->currency, $contract->currency)?></div>
                  <?php echo html::input('real[]', '', "class='order-real form-control' placeholder='{$this->lang->contract->placeholder->real}'");?>
                  <div class='input-group-btn'>
                    <a href='javascript:;' class='btn plus'><i class='icon-plus'></i></a>
                  </div>
                  <div class='input-group-btn'>
                    <a href='javascript:;' class='btn minus'><i class='icon-remove'></i></a>
                  </div>
                </div>
              </span>
            </td>
          </tr>
          <?php endif;?>
          <tbody id='tmpData' class='hide'></tbody>
          <?php endif;?>
          <tr>
            <th><?php echo $lang->$moduleType->amount;?></th>
            <td colspan='2'>
              <div class='row'>
                <div class='col-sm-2'><?php echo html::select('currency', $currencyList, $contract->currency, "class='form-control'");?></div>
                <div class='col-sm-10'><?php echo html::input('amount', $contract->amount, "class='form-control'");?></div>
              </div>
            </td>
          </tr>
          <tr>
            <th><?php echo $lang->$moduleType->items;?></th>
            <td colspan='2'><?php echo html::textarea('items', $contract->items, "class='form-control'");?></td>
          </tr>
          <?php echo $this->printExtendFields($contract, 'table');?>
          <?php if(commonModel::hasPriv('file', 'upload')):?>
          <tr>
            <th><?php echo $lang->files;?></th>
            <td colspan='2'><?php echo $this->fetch('file', 'buildForm');?></td>
          </tr>
          <?php endif;?>
        </table>
      </div>
    </div>
    <?php echo $this->fetch('action', 'history', "objectType={$moduleType}&objectID={$contract->id}")?>
    <div class='main-actions'><?php echo html::submitButton() . html::backButton();?></div>
  </div>
  <div class='side-col col-4'>
    <div class='panel'>
      <div class='panel-heading'>
        <strong><?php echo $lang->basicInfo;?></strong>
      </div>
      <div class='panel-body'>
        <table class='table table-form'>
          <tr>
            <th class='w-70px'><?php echo $lang->$moduleType->customer;?></th>
            <td><?php echo $customer->name;?></td>
          </tr>
          <?php if($moduleType == 'contract'):?>
          <tr>
            <th><?php echo $lang->$moduleType->delivery;?></th>
            <td><?php echo html::select('delivery', $lang->$moduleType->deliveryList, $contract->delivery, "class='form-control'");?></td>
          </tr>
          <?php endif;?>
          <tr>
            <th><?php echo $lang->$moduleType->return;?></th>
            <td><?php echo html::select('return', $lang->$moduleType->returnList, $contract->return, "class='form-control'");?></td>
          </tr>
          <tr>
            <th><?php echo $lang->$moduleType->status;?></th>
            <td><?php echo html::select('status', $lang->$moduleType->statusList, $contract->status, "class='form-control'");?></td>
          </tr>
          <tr>
            <th><?php echo $lang->$moduleType->contact;?></th>
            <td><?php echo html::select('contact', $contacts, $contract->contact, "class='form-control chosen'");?></td>
          </tr>
          <?php if($moduleType == 'contract'):?>
          <tr>
            <th><?php echo $lang->$moduleType->address;?></th>
            <td><?php echo html::select('address', $addresses, $contract->address, "class='form-control'");?></td>
          </tr>
          <?php endif;?>
          <tr>
            <th><?php echo $lang->$moduleType->begin;?></th>
            <td><?php echo html::input('begin', formatTime($contract->begin), "class='form-control form-date'");?></td>
          </tr>
          <tr>
            <th><?php echo $lang->$moduleType->end;?></th>
            <td><?php echo html::input('end', formatTime($contract->end), "class='form-control form-date'");?></td>
          </tr>
          <?php if($moduleType == 'contract'):?>
          <tr>
            <th><?php echo $lang->$moduleType->handlers;?></th>
            <td><?php echo html::select('handlers[]', $users, $contract->handlers, "class='form-control chosen' multiple");?></td>
          </tr>
          <?php endif;?>
        </table>
      </div>
    </div>
    <div class='panel'>
      <div class='panel-heading'>
        <strong><?php echo $lang->$moduleType->lifetime;?></strong>
      </div>
      <div class='panel-body'>
        <table class='table table-form table-data' id='contractLife'>
          <tr>
            <th class='w-100px'><?php echo $lang->$moduleType->createdBy;?></th>
            <td><?php echo zget($users, $contract->createdBy);?></td>
          </tr>
          <tr>
            <th><?php echo $lang->$moduleType->signedBy;?></th>
            <td><?php echo html::select('signedBy', $users, $contract->signedBy, "class='form-control chosen'");?></td>
          </tr>
          <tr>
            <th><?php echo $lang->$moduleType->signedDate;?></th>
            <td><?php echo html::input('signedDate', formatTime($contract->signedDate), "class='form-control form-date'");?></td>
          </tr>
          <?php if($moduleType == 'contract'):?>
          <tr>
            <th><?php echo $lang->$moduleType->deliveredBy;?></th>
            <td><?php echo html::select('deliveredBy', $users, $contract->deliveredBy, "class='form-control chosen'");?></td>
          </tr>
          <tr>
            <th><?php echo $lang->$moduleType->deliveredDate;?></th>
            <td><?php echo html::input('deliveredDate', formatTime($contract->deliveredDate), "class='form-control form-date'");?></td>
          </tr>
          <?php endif;?>
          <tr>
            <th><?php echo $lang->$moduleType->returnedBy;?></th>
            <td><?php echo html::select('returnedBy', $users, $contract->returnedBy, "class='form-control chosen'");?></td>
          </tr>
          <tr>
            <th><?php echo $lang->$moduleType->returnedDate;?></th>
            <td><?php echo html::input('returnedDate', formatTime($contract->returnedDate), "class='form-control form-date'");?></td>
          </tr>
          <?php if($contract->finishedBy):?>
          <tr>
            <th><?php echo $lang->$moduleType->finishedBy;?></th>
            <td><?php echo html::select('finishedBy', $users, $contract->finishedBy, "class='form-control chosen'");?></td>
          </tr>
          <tr>
            <th><?php echo $lang->$moduleType->finishedDate;?></th>
            <td><?php echo html::input('finishedDate', formatTime($contract->finishedDate), "class='form-control form-date'");?></td>
          </tr>
          <?php endif;?>
          <?php if($contract->canceledBy):?>
          <tr>
            <th><?php echo $lang->$moduleType->canceledBy;?></th>
            <td><?php echo html::select('canceledBy', $users, $contract->canceledBy, "class='form-control chosen'");?></td>
          </tr>
          <tr>
            <th><?php echo $lang->$moduleType->canceledDate;?></th>
            <td><?php echo html::input('canceledDate', formatTime($contract->canceledDate), "class='form-control form-date'");?></td>
          </tr>
          <?php endif;?>
        </table>
      </div>
    </div>
    <?php echo $this->printExtendFields($contract, 'div', 'position=right');?>
  </div>
</div>
</form>
<?php if($moduleType == 'contract'):?>
<table id='orderGroup' class='hide'>
  <tr>
    <th class='orderTH'></th>
    <td>
      <span>
        <select name='order[]' class='select-order form-control'>
          <?php foreach($orders as $order):?>
          <?php if(!$order):?>
          <option value='' data-real='' data-currency=''></option>
          <?php else:?>
          <option value="<?php echo $order->id;?>" data-real="<?php echo $order->plan;?>" data-currency="<?php echo $order->currency?>"><?php echo $order->title;?></option>
          <?php endif;?>
          <?php endforeach;?>
        </select>
      </span>
    </td>
    <td>
      <span>
        <div class='input-group'>
          <div class='input-group-addon order-currency'><?php echo zget($currencySign, $contract->currency, $contract->currency)?></div>
          <?php echo html::input('real[]', '', "class='order-real form-control' placeholder='{$this->lang->contract->placeholder->real}'");?>
          <div class='input-group-btn'>
            <a href='javascript:;' class='btn plus'><i class='icon-plus'></i></a>
          </div>
          <div class='input-group-btn'>
            <a href='javascript:;' class='btn minus'><i class='icon-remove'></i></a>
          </div>
        </div>
      </span>
    </td>
  </tr>
</table>
<?php endif;?>
<?php js::set('currencySign', array('' => '') + $currencySign);?>
<?php include '../../common/view/footer.html.php';?>