Example #1
0
                        ?>
                </tbody>
            </table>
        </div>
        <!-- END Block -->
        <?php
    // movido
    if(mysql_num_rows($rs) > 0) {
        $row = mysql_fetch_array($rs);

        if(trim($row["nClosedStaff"])=="" || $row["nClosedStaff"]==0)
            $var_close = 'N/A';
        elseif($row["nClosedStaff"]==-1)
            $var_close = 'User';
        else
            $var_close = getStaffName($row["nClosedStaff"]);

        $var_last_update = date("m-d-Y H:i",strtotime($row["dLastAttempted"]));
        $var_last_replier = $row["vStaffLogin"];

        //This section decides to show the reply , quote reply for the ticket for staff
        $arr_dept = explode(",",$lst_dept);
        for($j=0;$j < count($arr_dept);$j++) {
            if ($var_deptid == $arr_dept[$j]) {
                $showflag = true;
                break;
            }
        }
        if ($row["nLockStatus"] == "1" && $row["nOwner"] != $var_staffid) {
            $showflag = false;
        }
Example #2
0
        }
        if (!isset($title) || !isset($note) || !isset($level)) {
            $param['errors'][] = "システムエラーが発生しました。";
            renderTemplate('error.tpl', $param);
            exit;
        }
        for ($i = 0; $i < TARGET_LIMIT; $i++) {
            $param['reportTarget'][$i]['title'] = $title[$i];
            $param['reportTarget'][$i]['note'] = $note[$i];
            for ($j = 0; $j < 4; $j++) {
                $param['reportTarget'][$i]['level' . ($j + 1)] = isset($level[$j]) && isset($level[$j][$i]) ? $level[$j][$i] : null;
            }
        }
    } else {
        if ($reportTarget) {
            $name = getStaffName($reportTarget[0]['department_id']);
        } else {
            $name = null;
        }
        $param['reportTarget'] = $reportTarget;
        $param['lastUpdatedParsonId'] = $reportTarget[0]['department_id'];
        $param['name'] = $name[0]['name'];
    }
    $param['year'] = $year;
    // //画面遷移
    renderTemplate("target/edit.tpl", $param);
} catch (Exception $e) {
    $param['errors'][] = "システムエラーが発生しました。";
    renderTemplate('error.tpl', $param);
    exit;
}
Example #3
0
<br clear="all">

<ul style="font-size: 70%;">

EOHTML;
$summaryHTML = "<table style=\"float:right;\">";
$totals = array();
if ($result) {
    $cnt = 0;
    foreach ($result as $r) {
        if (!isset($totals[$r->eventsid])) {
            $totals[$r->eventsid] = 0;
        }
        $totals[$r->eventsid]++;
        $incept = date('d-m-Y h:i A', $r->incept);
        $staffName = getStaffName($r->staffid);
        $r->content = strip_tags($r->content);
        $bodyHTML .= <<<EOHTML

<li style="padding:2px;margin:2px;">
<div style="width:150px;float:left;">{$incept}</div>
<div style="width:250px;float:left;"> {$staffName}</div>
<div style="width:250px;float:left;"> {$r->name} </div>
<div style="width:280px;float:left;">
<div style="float:left;" id=fblogdetail{$cnt}><a href="javascript:void(0);" title="{$r->content}" onclick="showHide('logdetail{$cnt}')">Show Items</a></div>
<div style="padding:6px;margin:4px;border:1px #eee solid;width:250px;float:left;display:none;" id="logdetail{$cnt}">{$r->content}</div>
</div>
<br clear="all">
</li>

EOHTML;
Example #4
0
 /**
  * 到達レベル、注力ポイント取得
  *
  * @param
  */
 function getReportTargetUnit($year, $month, $id)
 {
     if (!isset($id) && empty($id)) {
         //新入社員がまだ月報を書いていない
         $res['emp_flg'] = true;
         return $res;
     }
     $sql = 'select id, admin_id, level, point from t_report_target_unit' . ' where target_year = :year and target_month = :month and target_id = :id';
     $searchParam = array('year' => $year, 'month' => $month, 'id' => $id);
     // データベースに接続する
     $conn = DbControl::getInstance();
     $conn->dbConnect(DbControl::SLAVE_DB);
     // クエリを実行する
     $res = $conn->dbExecFetchAll(DbControl::SLAVE_DB, $sql, $searchParam);
     if (count($res) > 0) {
         $admin_name = getStaffName($res[0]['admin_id']);
         $res['admin_name'] = $admin_name[0]['name'];
         $res['emp_flg'] = false;
         $res['tense'] = tenseMonthly($year, $month);
     } else {
         $res['emp_flg'] = true;
     }
     return $res;
 }