". $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 = "
";
}
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 = "
";
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 |
$filename |
";
$i++;
}
$text .= "
";
} else {
$text = "
所定の場所にファイルが見つかりません。
";
}
} elseif ($_REQUEST['ajax'] == "quelist") {
$path = $_SERVER['DOCUMENT_ROOT']. current_Dir(). "/data/original.que";
$Que = get_crypt_file($path, $System['cryptkey']);
$text .= "
";
}
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 = "
";
}
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 .= "
";
$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');
}
}
});";
}
}
?>