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/browse.html.php
<?php 
/**
 * The browse view 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->getAppRoot() . 'common/view/header.html.php';?>
<?php js::set('mode', $mode);?>
<?php $extendFields = $this->customer->getFlowExtendFields();?>
<li id='bysearchTab'><?php echo html::a('#', "<i class='icon-search icon'></i>" . $lang->search->common)?></li>
<div id='menuActions'>
  <?php if(commonModel::hasPriv('customer', 'export')):?>
  <div class='btn-group universal'>
    <button data-toggle='dropdown' class='btn btn-secondary dropdown-toggle' type='button'><?php echo $lang->exportIcon . $lang->export;?> <span class='caret'></span></button>
    <ul id='exportActionMenu' class='dropdown-menu'>
      <li><?php commonModel::printLink('customer', 'export', "mode=$mode&type=all", $lang->exportAll, "class='iframe' data-width='700'");?></li>
      <li><?php commonModel::printLink('customer', 'export', "mode=$mode&type=thisPage", $lang->exportThisPage, "class='iframe' data-width='700'");?></li>
    </ul>
  </div>
  <?php endif;?>
  <?php commonModel::printLink('customer', 'create', '', '<i class="icon-plus"></i> ' . $lang->customer->create, 'class="btn btn-primary"');?>
</div>
<div class='panel main-table' data-ride='table'>
  <?php $canBatchAssign = ($customers && commonModel::hasPriv('customer', 'batchAssign'));?>
  <?php if($canBatchAssign):?>
  <form id='browseForm' method='post' action='<?php echo inlink('batchAssign');?>'>
  <?php endif;?>
    <table class='table has-sort-head'>
      <thead>
        <tr class='text-center'>
          <?php $vars = "mode={$mode}&param=&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
          <th class='text-left w-100px'>
            <?php if($canBatchAssign):?>
            <div class='checkbox-primary check-all' title='<?php echo $this->lang->selectAll;?>'><label></label></div>
            <?php endif;?>
            <?php commonModel::printOrderLink('id', $orderBy, $vars, $lang->customer->id);?>
          </th>
          <th>                <?php commonModel::printOrderLink('name',   $orderBy, $vars, $lang->customer->name);?></th>
          <th class='w-70px universal'> <?php commonModel::printOrderLink('assignedTo', $orderBy, $vars, $lang->customer->assignedTo);?></th>
          <th class='w-70px universal'> <?php commonModel::printOrderLink('level',  $orderBy, $vars, $lang->customer->level);?></th>
          <th class='w-80px'><?php commonModel::printOrderLink('size', $orderBy, $vars, $lang->customer->size);?></th>
          <th class='w-80px'> <?php commonModel::printOrderLink('type', $orderBy, $vars, $lang->customer->type);?></th>
          <th class='w-160px text-left singleApp'><?php commonModel::printOrderLink('area',     $orderBy, $vars, $lang->customer->area);?></th>
          <th class='w-150px text-left singleApp'><?php commonModel::printOrderLink('industry', $orderBy, $vars, $lang->customer->industry);?></th>
          <th class='w-70px universal'> <?php commonModel::printOrderLink('status', $orderBy, $vars, $lang->customer->status);?></th>
          <th class='w-100px'><?php commonModel::printOrderLink('createdDate', $orderBy, $vars, $lang->customer->createdDate);?></th>
          <th class='w-100px universal'><?php commonModel::printOrderLink('contactedDate', $orderBy, $vars, $lang->customer->contactedDate);?></th>
          <?php
          /* The next date is searched from the table crm_dating, so use date instead of nextDate to avoid occur errors when order by this field. */
          $date = strpos(',past,today,tomorrow,thisweek,thismonth,', ",{$mode},") != false ? 'date' : 'nextDate';
          ?>
          <th class='w-110px universal'><?php commonModel::printOrderLink($date, $orderBy, $vars, $lang->customer->nextDate);?></th>
          <?php foreach($extendFields as $extendField) echo "<th class='" . ($extendField->width != 'auto' ? "w-{$extendField->width}px" : '')  . "'>{$extendField->name}</th>";?>
          <th class='w-<?php echo $lang->customer->actionWidth;?>px'><?php echo $lang->actions;?></th>
        </tr>
      </thead>
      <tbody>
        <?php foreach($customers as $customer):?>
        <tr class='text-center'>
          <td class='text-left'>
            <?php if($canBatchAssign):?>
            <div class='checkbox-primary'><input type='checkbox' name='customerIDList[]' value="<?php echo $customer->id;?>" id="customerIDList<?php echo $customer->id;?>">
              <label for="customerIDList<?php echo $customer->id;?>"></label>
            </div>
            <?php endif;?>
            <?php echo $customer->id;?>
          </td>
          <td class='text-left c-name'><?php if(!commonModel::printLink('customer', 'view', "customerID={$customer->id}", $customer->name)) echo $customer->name;?></td>
          <td class='universal'><?php if(isset($users[$customer->assignedTo])) echo $users[$customer->assignedTo];?></td>
          <td class='universal'><?php echo isset($lang->customer->levelNameList[$customer->level]) ? $lang->customer->levelNameList[$customer->level] : '';?></td>
          <td><?php echo $lang->customer->sizeNameList[$customer->size];?></td>
          <td><?php echo $lang->customer->typeList[$customer->type];?></td>
          <td class='<?php echo "customer-{$customer->status}";?> universal'><?php if($customer->status) echo $lang->customer->statusList[$customer->status];?></td>
          <td class='text-left singleApp'><?php echo zget($areas, $customer->area);?></td>
          <td class='text-left singleApp'><?php echo zget($industries, $customer->industry);?></td>
          <td><?php echo formatTime($customer->createdDate, DT_DATE1);?></td>
          <td class='universal'><?php echo formatTime($customer->contactedDate, DT_DATE1);?></td>
          <td class='universal'><?php echo formatTime($customer->nextDate, DT_DATE1);?></td>
          <?php foreach($extendFields as $extendField) echo "<td>" . $this->loadModel('flow')->getFieldValue($extendField, $customer) . "</td>";?>
          <td class='actions'>
            <?php
            commonModel::printLink('action',   'createRecord', "objectType=customer&objectID=$customer->id&customer=$customer->id", $lang->customer->record, "class='universal' data-toggle='modal' data-width='800'");
            commonModel::printLink('customer', 'assign', "customerID=$customer->id", $lang->customer->assign, "class='universal' data-toggle='modal'");
            commonModel::printLink('customer', 'contact', "customerID=$customer->id", $lang->customer->contact, "class='universal' data-toggle='modal' data-width='950'");
            commonModel::printLink('customer', 'edit', "customerID=$customer->id", $lang->edit);
            echo "<div class='dropdown universal'><a data-toggle='dropdown' href='javascript:;'>" . $this->lang->more . "<span class='caret'></span> </a><ul class='dropdown-menu pull-right'>";
            commonModel::printLink('customer', 'order', "customerID=$customer->id", $lang->customer->order, "data-toggle='modal'", '', '', 'li');
            commonModel::printLink('customer', 'contract', "customerID=$customer->id", $lang->customer->contract, "data-toggle='modal'", '', '', 'li');
            commonModel::printLink('crm.address', 'browse', "objectType=customer&objectID=$customer->id", $lang->customer->address, "data-toggle='modal'", '', '', 'li');
            commonModel::printLink('customer', 'merge', "customerID=$customer->id", $lang->customer->merge, "data-toggle='modal'", '', '', 'li');
            commonModel::printLink('customer', 'delete', "customerID=$customer->id", $lang->delete, "class='deleter'", '', '', 'li');
            echo "</ul></div>";
            ?>
          </td>
        </tr>
        <?php endforeach;?>
      </tbody>
    </table>
    <div class='table-footer'>
      <?php if($canBatchAssign):?>
      <div class='checkbox-primary check-all'><label><?php echo $lang->selectAll?></label></div>
      <div class='table-actions btn-toolbar'>
        <div class='input-group assign-action'>
          <?php echo html::select('assignedTo', $validUsers, '', "class='form-control chosen'");?>
          <span class='input-group-btn'><?php echo html::a('javascript:;', $lang->customer->assign, "class='btn batchAssign'");?></span>
        </div>
      </div>
      <div class='table-statistic'></div>
      <?php endif;?>
      <?php $pager->show();?>
    </div>
  </form>
</div>
<?php include $app->getAppRoot() . 'common/view/footer.html.php';?>