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/oa/lieu/view/browse.html.php
<?php
/**
 * The browse view file of lieu 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     lieu
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../../sys/common/view/treeview.html.php';?>
<?php js::set('confirmReview', $lang->lieu->confirmReview)?>
<div id='menuActions'>
  <?php commonModel::printLink('oa.lieu', 'create', "", "<i class='icon icon-plus'></i> {$lang->lieu->create}", "data-toggle='modal' class='btn btn-primary'")?>
</div>
<?php if($type != 'browseReview'):?>
<div class='main-row'>
  <div class='side-col'>
    <div class='panel'>
      <div class='panel-body'>
        <ul class='tree' data-collapsed='true'>
          <?php foreach($yearList as $year):?>
          <li class='<?php echo $year == $currentYear ? 'active' : ''?>'>
            <?php commonModel::printLink('oa.lieu', $type, "date=$year", $year);?>
            <ul>
              <?php foreach($monthList[$year] as $month):?>
              <li class='<?php echo ($year == $currentYear and $month == $currentMonth) ? 'active' : ''?>'>
                <?php commonModel::printLink('oa.lieu', $type, "date=$year$month", $year . $month);?>
              </li>
              <?php endforeach;?>
            </ul>
          </li>
          <?php endforeach;?>
        </ul>
      </div>
    </div>
  </div>
  <div class='main-col'>
<?php endif;?>
    <div class='panel main-table' data-ride='table'>
      <?php $canBatchReview = ($lieuList && $type == 'browseReview' && commonModel::hasPriv('lieu', 'batchReview'));?>
      <?php if($canBatchReview):?>
      <form id='batchReviewForm' method='post' action='<?php echo inlink('batchReview', 'status=pass');?>'>
      <?php endif;?>
        <table class='table has-sort-head' id='lieuTable'>
          <thead>
            <tr>
              <?php $vars = "&date={$date}&orderBy=%s";?>
              <th class='w-100px text-left'>
                <?php if($canBatchReview):?>
                <div class='checkbox-primary check-all' title='<?php echo $this->lang->selectAll;?>'><label></label></div>
                <?php endif;?>
                <?php commonModel::printOrderLink('id', $orderBy, $vars, $lang->lieu->id);?>
              </th>
              <th class='w-100px'><?php commonModel::printOrderLink('createdBy', $orderBy, $vars, $lang->lieu->createdBy);?></th>
              <th class='w-100px'><?php echo $lang->user->dept;?></th>
              <th class='w-130px'><?php commonModel::printOrderLink('begin', $orderBy, $vars, $lang->lieu->begin);?></th>
              <th class='w-130px'><?php commonModel::printOrderLink('end', $orderBy, $vars, $lang->lieu->end);?></th>
              <th class='w-70px'><?php commonModel::printOrderLink('hours', $orderBy, $vars, $lang->lieu->hours);?></th>
              <th class='text-left c-desc'><?php echo $lang->lieu->desc;?></th>
              <th class='w-100px'><?php commonModel::printOrderLink('status', $orderBy, $vars, $lang->lieu->status);?></th>
              <?php if($type == 'personal'):?>
              <th class='w-<?php echo $lang->lieu->personalActionWidth;?>px'><?php echo $lang->actions;?></th>
              <?php else:?>
              <th class='w-<?php echo $lang->lieu->actionWidth;?>px'><?php echo $lang->actions;?></th>
              <?php endif;?>
            </tr>
          </thead>
          <?php foreach($lieuList as $lieu):?>
          <?php $viewUrl = commonModel::hasPriv('oa.lieu', 'view') ? $this->createLink('oa.lieu', 'view', "id={$lieu->id}&type=$type") : '';?>
          <tr id='lieu<?php echo $lieu->id;?>' url='<?php echo $viewUrl;?>'>
            <td class='idTD text-left'>
              <?php if($canBatchReview):?>
              <div class='checkbox-primary'><input type='checkbox' name='lieuIDList[]' value="<?php echo $lieu->id;?>" id="lieuIDList<?php echo $lieu->id;?>">
                <label for="lieuIDList<?php echo $lieu->id;?>"></label>
              </div>
              <?php endif;?>
              <?php echo $lieu->id;?>
            </td>
            <td><?php echo zget($users, $lieu->createdBy);?></td>
            <td><?php echo zget($deptList, $lieu->dept, '');?></td>
            <td><?php echo formatTime($lieu->begin . ' ' . $lieu->start, DT_DATETIME2);?></td>
            <td><?php echo formatTime($lieu->end . ' ' . $lieu->finish, DT_DATETIME2);?></td>
            <td><?php echo $lieu->hours;?></td>
            <td class='text-left c-desc' title='<?php echo $lieu->desc;?>'><?php echo $lieu->desc;?></td>
            <td class='lieu-<?php echo $lieu->status;?>'><?php echo $lieu->statusLabel;?></td>
            <td class='actionTD text-left'>
              <?php
              if($viewUrl) echo html::a($viewUrl, $lang->detail, "data-toggle='modal'");

              if($type == 'personal')
              {
                  $canEdit   = $this->lieu->isClickable($lieu, 'edit');
                  $canDelete = $this->lieu->isClickable($lieu, 'delete');
                  $canSwitch = $this->lieu->isClickable($lieu, 'switchStatus');

                  $switchLabel = $lieu->status == 'wait' ? $lang->lieu->cancel : $lang->lieu->submit;
                  if($canSwitch)
                  {
                      echo html::a(inlink('switchstatus', "id={$lieu->id}"), $switchLabel, "class='reload'");
                  }
                  else
                  {
                      echo html::a('javascript:;', $switchLabel, "class='disabled'");
                  }

                  if($canEdit)
                  {
                      echo html::a(inlink('edit', "id={$lieu->id}"), $lang->edit, "data-toggle='modal'");
                  }
                  else
                  {
                      echo html::a('javascript:;', $lang->edit, "class='disabled'");
                  }

                  if($canDelete)
                  {
                      echo html::a(inlink('delete', "id={$lieu->id}"), $lang->delete, "class='deleter'");
                  }
                  else
                  {
                      echo html::a('javascript:;', $lang->delete, "class='disabled'");
                  }
              }
              else
              {
                  $canReview = $this->lieu->isClickable($lieu, 'review');

                  if($canReview)
                  {
                      echo html::a(inlink('review', "id={$lieu->id}&status=pass"),   $lang->lieu->statusList['pass'],   "class='reviewPass'");
                      echo html::a(inlink('review', "id={$lieu->id}&status=reject"), $lang->lieu->statusList['reject'], "data-toggle='modal'");
                  }
                  else
                  {
                      echo html::a('javascript:;', $lang->lieu->statusList['pass'],   "class='disabled'");
                      echo html::a('javascript:;', $lang->lieu->statusList['reject'], "class='disabled'");
                  }
              }
              ?>
            </td>
          </tr>
          <?php endforeach;?>
        </table>
        <?php if(!$lieuList):?>
        <div class='table-footer'>
          <div class='pager' style='float: right; clear: none'><?php echo $lang->pager->noRecord;?></div>
        </div>
        <?php endif;?>
        <?php if($canBatchReview):?>
        <div class='table-footer'>
          <div class='checkbox-primary check-all'><label><?php echo $lang->selectAll?></label></div>
          <div class='table-actions btn-toolbar'><?php echo html::a('javascript:;', $lang->lieu->statusList['pass'], "class='btn batchPass'");?>
          <div class='table-statistic'></div>
        </div>
      </form>
      <?php endif;?>
    </div>
<?php if($type != 'browseReview'):?>
  </div>
</div>
<?php endif;?>
<?php include '../../common/view/footer.html.php';?>