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/attend/view/browse.html.php
<?php
/**
 * The browse view file of attend 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      chujilu <chujilu@cnezsoft.com>
 * @package     attend
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../../sys/common/view/treeview.html.php';?>
<?php $lang->attend->abbrStatusList['rest'] = '';?>
<div id='menuActions'>
  <?php commonModel::printLink('attend', 'export', "date=$currentYear$currentMonth&company=$company", "{$lang->attend->export}", "class='iframe btn btn-primary'")?>
</div>
<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('attend', $company ? 'company' : 'department', "date=$year", $year);?>
            <ul>
              <?php foreach($monthList[$year] as $month):?>
              <li class='<?php echo ($year == $currentYear and $month == $currentMonth) ? 'active' : ''?>'>
                <?php commonModel::printLink('attend', $company ? 'company' : 'department', "date=$year$month", $year . $month);?>
              </li>
              <?php endforeach;?>
            </ul>
          </li>
          <?php endforeach;?>
        </ul>
      </div>
    </div>
  </div>
  <div class='main-col'>
    <div class='panel'>
      <div class='panel-heading text-center'>
        <?php $title = $currentYear;?>
        <?php if($this->app->clientLang != 'en') $title .= $lang->year;?>
        <?php $title .= $currentMonth;?>
        <?php if($this->app->clientLang != 'en') $title .= $lang->month;?>
        <strong><?php echo $title . $lang->attend->report;?></strong>
      </div>
      <div class='panel-body'>
        <table class='table table-bordered table-fixed'>
          <thead>
            <tr class='text-center'>
              <th rowspan='2' class='w-80px text-middle c-dept'><?php echo $lang->user->dept;?></th>
              <th rowspan='2' class='w-80px text-middle c-name'><?php echo $lang->user->realname;?></th>
              <?php for($day = 1; $day <= $dayNum; $day++):?>
              <th><?php echo $day?></th>
              <?php endfor;?>
            </tr>
            <tr class='text-center'>
              <?php $weekOffset = date('w', strtotime("$currentYear-$currentMonth-01")) - 1;?>
              <?php for($day = 1; $day <= $dayNum; $day++):?>
              <th><?php echo $lang->datepicker->abbrDayNames[($day + $weekOffset) % 7]?></th>
              <?php endfor;?>
            </tr>
          </thead>
          <?php foreach($attends as $dept => $deptAttends):?>
            <?php $isFirst = true;?>
            <?php foreach($deptAttends as $account => $userAttends):?>
            <tr class='text-center'>
              <?php if($isFirst):?>
              <td rowspan='<?php echo count($deptAttends);?>' class='text-middle'>
                <?php echo isset($users[$account]->dept) ? $deptList[$users[$account]->dept] : ''?>
              </td>
              <?php $isFirst = false;?>
              <?php endif;?>
              <td class='text-middle'><?php echo isset($users[$account]->realname) ? $users[$account]->realname : '';?></td>
              <?php for($day = 1; $day <= $dayNum; $day++):?>
                <?php $currentDate = date("Y-m-d", strtotime("{$currentYear}-{$currentMonth}-{$day}"));?>
                <?php if(isset($userAttends[$currentDate])):?>
                <?php 
                $attend = $userAttends[$currentDate];
                $status = $attend->status;
                if($attend->hoursList)
                {
                    $title  = '';
                    $icon   = '';
                    foreach($attend->hoursList as $status => $hours) 
                    {
                        $title .= $lang->attend->statusList[$status] . $hours . 'h ';
                        $icon  .= $lang->attend->markStatusList[$status];
                    }
                }
                else
                {
                    $title = $lang->attend->statusList[$attend->status];
                    $icon  = $lang->attend->markStatusList[$attend->status];
                }
                ?>
                <td class='attend-status attend-<?php echo $status;?>' title='<?php echo $title;?>'>
                  <span><?php echo $icon;?></span>
                </td>
                <?php else:?>
                <td></td>
                <?php endif;?>
              <?php endfor;?>
            </tr>
            <?php endforeach;?>
          <?php endforeach;?>
        </table>
      </div>
      <div class='table-footer legend'>
        <?php foreach($lang->attend->markStatusList as $key => $value):?>
        <span class='legend-item attend-<?php echo $key?>'>
          <i class='legend-i'><?php echo $value?></i>
          <?php echo $lang->attend->statusList[$key]?>
        </span>
        <?php endforeach;?>
      </div>
    </div>
  </div>
</div>
<?php include '../../common/view/footer.html.php';?>