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/sys/customer/view/view.html.php
<?php 
/**
 * The info file of customer 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     customer 
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php $browseLink = $this->session->customerList ? $this->session->customerList : inlink('browse');?>
<div id='mainTitle' class='clearfix'>
  <div class='btn-toolbar pull-left'>
    <?php if(!isonlybody()):?>
    <?php echo html::a($browseLink, '<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="label label-id"><?php echo $customer->id?></span>
      <span class="text" title='<?php echo $customer->name;?>'><?php echo $customer->name;?></span>
      <?php if($customer->deleted):?>
      <span class='label label-danger'><?php echo $lang->deleted;?></span>
      <?php endif;?>
    </div>
  </div>
</div>
<div class='main-row'>
  <div class='main-col col-8'>
    <div class='panel panel-block'>
      <div class='panel-heading'><strong><?php echo $lang->customer->desc;?></strong></div>
      <div class='panel-body'><?php echo $customer->desc;?></div>
    </div>
    <?php if($customer->intension):?>
    <div class='panel panel-block universal'>
      <div class='panel-heading'><strong><?php echo $lang->customer->intension;?></strong></div>
      <div class='panel-body'><?php echo $customer->intension;?></div>
    </div>
    <?php endif;?>
    <?php if($customer->depositor):?>
    <div class='panel panel-block'>
      <div class='panel-heading'><strong><?php echo $lang->customer->depositor;?></strong></div>
      <div class='panel-body'><?php echo $customer->depositor;?></div>
    </div>
    <?php endif;?>
    <?php if(!empty($returnList)):?>
    <div class='panel panel-block panel-sm table-row universal'>
      <div class='panel-heading'><strong><?php echo $lang->contract->returnRecords;?></strong></div>
      <div class='panel-body'>
        <table class='table table-bordered table-fixed'>
          <thead>
            <tr class='text-center'>
              <th><?php echo $lang->contract->common;?></th>
              <th class='w-100px'><?php echo $lang->contract->returnedDate;?></th>
              <th class='w-100px'><?php echo $lang->contract->returnedBy;?></th> 
              <th class='w-120px text-right'><?php echo $lang->contract->amount;?></th> 
              <th class='w-160px'><?php echo $lang->trade->depositor;?></th>
            </tr>
          </thead>
          <?php foreach($returnList as $return):?>
          <?php $contract = $contracts[$return->contract];?>
          <tr class='text-center'>
            <td class='c-name'><?php echo $contract->name;?></td>
            <td><?php echo formatTime($return->returnedDate, DT_DATE1);?></td>
            <td><?php echo zget($users, $return->returnedBy, $return->returnedBy);?></td>
            <td class='text-right'><?php echo zget($currencySign, $contract->currency, '') . formatMoney($return->amount);?></td>
            <td><?php echo $return->depositor;?></td>
          </tr>
          <?php endforeach;?>
        </table>
      </div>
    </div>
    <?php endif;?>

    <div class='panel panel-block panel-sm universal'>
      <div class='panel-heading'><strong><?php echo $lang->file->common;?></strong></div>
      <div class='panel-body'>
        <?php echo $this->fetch('file', 'printFiles', array('files' => $files, 'fieldset' => 'false'))?>
      </div>
    </div>
    <?php echo $this->printExtendFields($customer, 'div', "position=left&inCell=1&inForm=0");?>
    <?php echo $this->fetch('action', 'history', "objectType=customer&objectID={$customer->id}")?>
    <div class='main-actions'>
      <div class='btn-toolbar'>
        <?php
        commonModel::printBack($browseLink);
        echo "<div class='divider'></div>";

        commonModel::printLink('crm.order', 'create', "customer=$customer->id", $lang->order->common, "class='btn universal'");
        commonModel::printLink('crm.contract', 'create', "type=sale&customer=$customer->id", $lang->contract->common, "class='btn universal'");
        echo "<div class='divider universal'></div>";
        commonModel::printLink('action', 'createRecord', "objectType=customer&objectID={$customer->id}&customer={$customer->id}&history=", $lang->customer->record, "class='btn universal' data-toggle='modal' data-width='800'");
        commonModel::printLink('customer', 'assign', "customerID=$customer->id", $lang->customer->assign, "class='btn universal' data-toggle='modal'");
        commonModel::printLink('customer', 'contact', "customerID=$customer->id", $lang->customer->contact,  "class='btn universal' data-toggle='modal' data-width='950'");
        commonModel::printLink('address',  'browse', "objectType=customer&objectID=$customer->id", $lang->customer->address, "class='btn universal' data-toggle='modal'");
        echo "<div class='divider universal'></div>";
        commonModel::printLink('customer', 'edit', "customerID=$customer->id", $lang->edit, "class='btn'");
        commonModel::printLink('customer', 'merge', "customerID=$customer->id", $lang->customer->merge, "class='btn' data-toggle='modal'");
        commonModel::printLink('customer', 'delete', "customerID=$customer->id", $lang->delete, "class='deleter btn'");
        echo html::a('#commentBox', $this->lang->comment, "class='btn btn-default universal' onclick=setComment()");
        echo "<div class='divider'></div>";

        commonModel::printRPN($preAndNext);
        ?>
      </div>
    </div>
    <div id='commentBox' class='hide panel panel-block universal'>
      <div class='panel-heading'><strong><?php echo $lang->comment;?></strong></div>
      <div class='panel-body'>
        <form id='ajaxForm' method='post' action='<?php echo inlink('edit', "customerID={$customer->id}&comment=true")?>'>
          <div class='form-group'><?php echo html::textarea('comment', '',"rows='5' class='w-p100'");?></div>
          <div class='form-actions'><?php echo html::submitButton() . html::commonButton($lang->cancel, 'btn btn-back', "onclick=setComment()");?></div>
        </form>
      </div>
    </div>      
  </div>
  <div class='side-col col-4'>  
    <div class='panel panel-block'>
      <div class='panel-heading'><strong><?php echo $lang->customer->basicInfo;?></strong></div>
      <div class='panel-body'>
        <table class='table table-data'>
          <tr class='universal'>
            <th class='w-60px'><?php echo $lang->customer->source;?></th>
            <td><?php echo zget($lang->customer->sourceList, $customer->source);?></td>
          </tr>
          <tr class='universal'>
            <th><?php echo $lang->customer->sourceNote;?></th>
            <td><?php echo $customer->sourceNote;?></td>
          </tr>
          <tr class='universal'>
            <th><?php echo $lang->customer->level;?></th>
            <td><?php if($customer->level) echo $lang->customer->levelNameList[$customer->level];?></td>
          </tr>
          <tr class='universal'>
            <th><?php echo $lang->customer->status;?></th>
            <td><?php if($customer->status) echo $lang->customer->statusList[$customer->status];?></td>
          </tr>
          <tr class='universal'>
            <th><?php echo $lang->customer->assignedTo;?></th>
            <td><?php echo zget($users, $customer->assignedTo);?></td>
          </tr>
          <tr>
            <th><?php echo $lang->customer->size;?></th>
            <td><?php echo $lang->customer->sizeNameList[$customer->size];?></td>
          </tr>
          <tr>
            <th><?php echo $lang->customer->type;?></th>
            <td><?php echo $lang->customer->typeList[$customer->type];?></td>
          </tr>
          <tr>
            <th><?php echo $lang->customer->industry;?></th>
            <td><?php if($customer->industry) echo $industryList[$customer->industry];?></td>
          </tr>
          <tr>
            <th><?php echo $lang->customer->area;?></th>
            <td><?php if($customer->area) echo $areaList[$customer->area];?></td>
          </tr>
          <tr>
            <th><?php echo $lang->customer->weibo;?></th>
            <td><?php if(!empty($customer->weibo) && $customer->weibo != 'http://weibo.com/') echo html::a("$customer->weibo", $customer->weibo, "target='_blank'");?></td>
          </tr>
          <tr>
            <th><?php echo $lang->customer->weixin;?></th>
            <td><?php echo $customer->weixin;?></td>
          </tr>
          <tr>
            <th><?php echo $lang->customer->site;?></th>
            <td><?php if(!empty($customer->site) && $customer->site != 'http://') echo html::a("$customer->site", $customer->site, "target='_blank'");?></td>
          </tr>
          <tr class='universal'>
            <th><?php echo $lang->customer->nextDate;?></th>
            <td><?php echo formatTime($customer->nextDate, DT_DATE1);?></td>
          </tr>
        </table>
      </div>
    </div>
    <?php echo $this->fetch('contact', 'block', "customer={$customer->id}", 'crm')?>
    <?php if(!empty($contracts)):?>
    <div class='panel panel-block universal'>
      <div class='panel-body no-padding-top'>
        <table class='table table-data table-form table-fixed'>
          <thead>
            <tr class='text-center'>      
              <th class='text-left'><?php echo $lang->customer->contract;?></th>
              <th class='w-120px'><?php echo $lang->order->amount;?></th> 
              <th class='w-60px'><?php echo $lang->order->status;?></th> 
            </tr>
          </thead>
          <?php foreach($contracts as $contract):?>
          <tr data-url='<?php echo $this->createLink('crm.contract', 'view', "contractID=$contract->id"); ?>' class='text-center'>
            <td class='c-name'><?php echo $contract->name;?></td>
            <td><?php echo zget($currencySign, $contract->currency, '') . $contract->amount;?></td>
            <td class='<?php echo "contract-{$contract->status}";?>'><?php echo $lang->contract->statusList[$contract->status];?></td>
          </tr>
          <?php endforeach;?>
        </table>
      </div>
    </div>
    <?php endif;?>

    <?php if(!empty($orders)):?>
    <div class='panel panel-block universal'>
      <div class='panel-body no-padding-top'>
        <table class='table table-data table-form table-fixed'>
          <thead>
            <tr class='text-center'>      
              <th class='text-left'><?php echo $lang->customer->order;?></th>
              <th class='w-100px'><?php echo $lang->order->plan;?></th>
              <th class='w-100px'><?php echo $lang->order->real;?></th>
              <th class='w-60px'><?php echo $lang->order->status;?></th>
            </tr>
          </thead>
          <?php foreach($orders as $order):?>
          <tr data-url='<?php echo $this->createLink('crm.order', 'view', "orderID=$order->id"); ?>' class='text-center'>
            <td class='text-left'><?php foreach($order->products as $product) echo $product . ' ';?></td>
            <td><?php echo $order->plan;?></td>
            <td><?php echo zget($currencySign, $order->currency, '') . $order->real;?></td>
            <td class='<?php echo "order-{$order->status}";?>'><?php echo $lang->order->statusList[$order->status];?></td>
          </tr>
          <?php endforeach;?>
        </table>
      </div>
    </div>
    <?php endif;?>

    <?php if(!empty($productList)):?>
    <div class='panel panel-block'>
      <div class='panel-body no-padding-top'>
        <table class='table table-data table-form table-fixed'>
          <thead>
            <tr class='text-center'>      
              <th class='text-left'><?php echo $lang->customer->purchasedProducts;?></th>
              <th class='w-100px'><?php echo $lang->product->category;?></th>
              <th class='w-60px'><?php echo $lang->product->type;?></th>
              <th class='w-60px'><?php echo $lang->product->status;?></th>
            </tr>
          </thead>
          <?php foreach($productList as $product):?>
          <tr class='text-center' data-url='<?php echo $this->createLink('crm.product', 'view', "productID=$product->id"); ?>'>
            <td class='c-name'><?php echo $product->name;?></td>
            <td><?php echo zget($productCategories, $product->category, '');?></td>
            <td><?php echo zget($lang->product->typeList, $product->type);?></td>
            <td><?php echo zget($lang->product->statusList, $product->status);?></td>
          </tr>
          <?php endforeach;?>
        </table>
      </div>
    </div>
    <?php endif;?>

    <div class='panel panel-block universal'>
      <div class='panel-heading'><strong><?php echo $lang->customer->address;?></strong></div>
      <div class='panel-body'>
        <table class='table table-data'>
          <?php foreach($addresses as $address):?>
          <tr>
            <td><?php echo $address->title . $lang->colon . $address->fullLocation;?></td>
          </tr>
          <?php endforeach;?>
        </table>
      </div>
    </div>
    <?php echo $this->printExtendFields($customer, 'div', "position=right&inCell=1&inForm=0");?>
  </div>
</div>
<?php include $app->getAppRoot() . 'common/view/footer.html.php';?>