= $now) && $_SESSION['uid'] == "admin" && $_SESSION['upw'] == $Init['upw']) { $loginuser = "管理者"; $admin = 1; } else { $sql = "SELECT * FROM `$client` WHERE `ID`='". $_SESSION['uid']. "' AND `Pw`='". $_SESSION['upw']. "' AND `Target`='checked'"; $rs = mysql_query($sql); if (mysql_num_rows($rs)) { $member = mysql_fetch_object($rs); $loginuser = $member->Name; } } } !is_dir($_SERVER['DOCUMENT_ROOT']. "/360/$client/tmp") && mkdir($_SERVER['DOCUMENT_ROOT']. "/360/$client/tmp"); if ($loginuser) { if ($_REQUEST['action'] == "preview") { /* プレビュー */ $title = "プレビュー"; $Que = array(); if ($_REQUEST['file']) { /* 編集中の設問の場合 */ $max = count($_REQUEST['Que']); for ($i = 0; $i < $max; $i++) { if ($_REQUEST['Que'][$i]) { $value = join("\t", array( "Que=". $_REQUEST['Que'][$i], "Group=". $_REQUEST['Group'][$i], "Type=". $_REQUEST["Type"][$i], "Desc=". $_REQUEST['Desc'][$i], "Level=". $_REQUEST["Level"][$i] )); $Que[] = $value; } } } else { $path = $_SERVER['DOCUMENT_ROOT']. current_Dir(). "/data/original.que"; $Que = get_crypt_file($path, $System['cryptkey']); } $preview = "(プレビュー)"; $template = $Init['Template']; $text .= "

対象者について、最もあてはまる項目を選択してください。 設問数は、". count($Que). "問、自由記入以外はすべて必須です。

". precedent(). "

山田 太郎 様

"; if (count($Selects) > 0) { /* 動作環境の設定で選択肢が設定されている場合 */ $selectbox = ""; } else { $selectbox = ""; } $i = 1; $g = 0; foreach ($Que as $line) { $Field = dbfields($line); if ($ans_cnt > 5 || $Field['Type'] > 1) { $que_style = "width:90%;"; $box_float = "f-left"; } else { $que_style = ""; $box_float = "f-right"; } $bgclass = ""; if ($Setup['colorseparator']) { $bgclass = "bg-cream"; $i % 2 == 0 && $bgclass = "bg-cyan"; } if ($Field['Group']) { if ($g) { $text .= "
". precedent(). "

"; } $text .= "

". $Field['Group']. "

"; $g++; } else { $text .= "
"; } $text .= "

". sprintf("Q%02d", $i). ":

". $Field['Que']. "

"; if ($Field['Desc'] || $Field['Level']) { $text .= "

"; $Field['Desc'] && $text .= " ", $Field['Desc']). "'); $('#systemDialog').dialog({ title: '解説', resizable: false, height: 'auto', width: 400, modal: true, buttons: { '閉じる': function() { $( this ).dialog('close'); } } });\" style=\"width:60px;margin:2px;\"/>"; $Field['Level'] && $text .= " ", $Field['Level']). "'); $('#systemDialog').dialog({ title: 'レベル', resizable: false, height: 'auto', width: 400, modal: true, buttons: { '閉じる': function() { $( this ).dialog('close'); } } });\" style=\"width:60px;margin:2px;\"/>"; $text .= "

"; } $text .= "
    "; if ($Field['Type']) { if ($Field['Type'] == 1 || $Field['Type'] == 2) { $text .= "
  • 自己評価

  • "; } if ($Field['Type'] == 1 || $Field['Type'] == 3) { $text .= "
  • 近藤 勇子

  • 豊臣 秀雄

  • 御手洗 潤一郎

  • 坂本 龍子

  • "; } } else { $text .= "
  • 自己評価

    $selectbox
  • 近藤 勇子

    $selectbox
  • 豊臣 秀雄

    $selectbox
  • 御手洗 潤一郎

    $selectbox
  • 坂本 龍子

    $selectbox"; } $text .= "

"; $i++; } $text .= "
>\" />

"; } else { if ($_REQUEST['ajax']) { /* AjaxやSSIの処理は、すべてここで行う */ if ($_REQUEST['ajax'] == "defaultquelist") { $localdir = $_SERVER['DOCUMENT_ROOT']. "/360/common/que"; $files = array(); if ($dh = opendir($localdir)) { while (($file = readdir($dh)) !== false) { if (preg_match("/\.que$/", $file)) { $files[] = $file; } } closedir($dh); } if (count($files)) { sort($files); $_REQUEST['option'] != "add" && $class = "hover pointer"; $text = " "; if ($_REQUEST['option'] == "add") { $text .= " "; } $text .= " "; $i = 1; foreach ($files as $file) { $_REQUEST['option'] != "add" && $action = "selectque('/360/common/que/$file');$('#systemDialog').dialog('close')"; $text .= " "; $i++; } $text .= "
ファイル名 :
No. ファイル名
$i $file
"; } header("Content-type:text/html;charset=utf-8"); echo $text; } elseif ($_REQUEST['ajax'] == "membercsv") { $fname = "exhibitors". date("Ymd"). ".csv"; $csv = array('ID','承認','パスワード',$Field[0],$Field[1],$Field[2],'役職','氏名','Email','メール送信','被評価者'); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=". $fname); if ($fp = fopen('php://output', 'w')) { mb_convert_variables('SJIS-win', 'UTF-8', $csv); fputcsv($fp, $csv); $sql = "SELECT `ID`, CASE WHEN `Auth`='checked' THEN '○' ELSE '' END as 'Auth', `Pw`,`Office`,`Depart`,`Class`,`Post`,`Name`,`Email`, CASE WHEN `Sending`='checked' THEN '○' ELSE '' END as 'Sending', CASE WHEN `Target`='checked' THEN '○' ELSE '' END as 'Target' FROM `$client` WHERE 1"; $rs = mysql_query($sql); while ($csv = mysql_fetch_row($rs)) { mb_convert_variables('SJIS-win', 'UTF-8', $csv); fputcsv($fp, $csv); } fclose($fp); } } elseif ($_REQUEST['ajax'] == "memberform") { if ($_REQUEST['ID']) { $rs = mysql_query("SELECT * FROM `$client` WHERE `ID`='". $_REQUEST['ID']. "'"); $recode = mysql_fetch_object($rs); } else { $recode->ID = createid(); } $text = "
ID. "\" />
ID ". $recode->ID. "
承認
被評価者
$Field[0] Office. "\" />
$Field[1] Depart. "\" />
$Field[2] Class. "\" />
役職 Post. "\" />
氏名 Name. "\" />
Email Email. "\" style=\"width:98%;ime-mode:disabled;\" />
パスワード Pw. "\" style=\"width:120px;ime-mode:disabled;\" />
"; header("Content-type:text/html;charset=utf-8"); echo $text; exit; } elseif ($_REQUEST['ajax'] == "reportfilelist") { $dir = "./reportfiles/csv"; $files = array(); if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if (preg_match("/\.csv$/i", $file)) { $type = filetype("$dir/$file"); if ($type == "file") { @$date = date("Ymd H:i", filemtime("$dir/$file")); @$filesize = ceil(filesize("$dir/$file") / 1024); $size = sprintf("%9d", $filesize); $flg && $file = "$dir/$file"; $val = join("\t", array( $$key, $file, $date, $filesize )); $files[] = $val; } } } closedir($dh); } if (count($files)) { $text = " "; $i = 1; foreach($files as $file) { @list($key, $filename, $date, $size) = split("\t", $file); $text .= " "; $i++; } $text .= "
  ファイル名
$i $filename
"; } else { $text = "

所定の場所にファイルが見つかりません。

"; } } elseif ($_REQUEST['ajax'] == "quelist") { $path = $_SERVER['DOCUMENT_ROOT']. current_Dir(). "/data/original.que"; $Que = get_crypt_file($path, $System['cryptkey']); $text .= " "; $i = 1; foreach ($Que as $line) { $Field = dbfields($line); if ($Field['Group']) { $text .= " "; } if ($Field['Field']) { $text .= " "; } if ($Field['Type'] == 0) { $q = "Q". sprintf("%02d", $i); $text .= " "; } $i++; } $text .= "
■". $Field['Group']. "
". $Field['Field']. "
". $Field['Que']. "
"; } header("Content-type:text/html;charset=utf-8"); echo $text; exit; } elseif ($admin && $_REQUEST['action'] == "ans_reset") { mysql_query("TRUNCATE TABLE `$client-ans`"); } elseif ($admin && $_REQUEST['action'] == "select_reset") { mysql_query("TRUNCATE TABLE `$client-ans`"); mysql_query("TRUNCATE TABLE `$client-select`"); } elseif ($admin && $_REQUEST['action'] == "data_reset") { mysql_query("TRUNCATE TABLE `$client-ans`"); mysql_query("TRUNCATE TABLE `$client-select`"); mysql_query("TRUNCATE TABLE `$client`"); } $title = "コントロールパネル"; /* メインメニューを生成 */ if ($admin) { $mainmenu = "

ファイル

360度フィードバック

レポート

"; } if ($_REQUEST['cmd'] && is_file("../common/inc/". $_REQUEST['cmd']. ".inc")) { include "../common/inc/". $_REQUEST['cmd']. ".inc"; } else { $text .= startmenu(); !is_dir("./files") && mkdir("./files"); is_file("./files/log.dat") && $files = file("./files/log.dat"); if ($cnt = count($files)) { $text .= "

※共有ファイルに $cnt 個のファイルがあります。

"; } } $ready .= " $('.headerbutton').css('display','block');"; } } else { if ($Init['enDate'] && $Init['enDate'] < $now) { $text .= "
". preg_replace("/(\r\n| |[\r\n])/", "
", $Init['Endmessage']). "
"; } else { $text .= "
"; foreach ($_REQUEST as $key => $value) { $text .= " "; } $text .= "
". $_SERVER['SERVER_NAME']. current_Dir(). "は、IDとパスワードで保護されています。

ID
パスワード

※高度な機能をフルにご利用いただくため、管理者は横1280ピクセル以上の解像度を持つパソコン、 Firefoxまたは、Google Chromeなどのモダンブラウザのご使用を強くお勧めしています。 もちろん、システムが出力するコンテンツはOSやブラウザを選びません。

"; $ready = " $('#logindialog').dialog({ title: 'ログイン', resizable: false, width: 480, height:360, modal:true, show:'blind', hide:'blind', buttons: { 'ログイン': function() { $(this).dialog('close'); $('#loginform').submit(); }, 'キャンセル': function() { $(this).dialog('close'); } } });"; } } ?>