name. "-win\" class=\"virtualwin box-shadow\" style=\"width:". $this->width. ";\">

name. "-caption\" class=\"win-caption default-bar\" style=\"\">". $this->caption. "

name. "-body\" class=\"win-body\" style=\"height:". $this->height. ";\"> ". $this->body. "
"; return($text); } } function precedent() { global $Selects; $text = "
"; return($text); } function startmenu() { global $admin, $client, $Init,$accesslimit; $text = "

ホームメニュー

"; if ($admin) { if ($accesslimit && $Init['enDate'] && $_SESSION['uid'] == "admin") { $text .= "

システム使用期限は、". date("Y年 m月 d日", strtotime($Init['enDate'])). " までです。

"; } $text .= "
システムの設定 調査の準備 開始と管理 レポート

所属・氏名・メールアドレスが入ったファイルをご用意いただき、システムに読み込ませます。

 

被評価者のIDをクリックして選択します。

 

回答者・被評価者宛てに、調査実施のお願いをメールで一斉送信します。

 

分析、レポート出力のための設定を行います。

質問項目を自由に変更できます。お気軽にご相談下さい。(注意:トライアル版では変更できません)

 

被評価者を評価する上司・同僚・部下を選択します。調査開始後は回答状況を確認。

 

回答状況を確認します。未回答者へは再案内のメールを一斉送信できます。

 

非評価者、上司の一覧を表示します。

調査期間、責任者及び、案内メールの等の文面を設定します。

 

選択した回答者を承認します。

 

システムからログオフします。

 

分析、レポート用のデータファイルを管理します。

"; } else { $rs = mysql_query("SELECT * FROM `$client-ans` WHERE `TargetID`='". $_SESSION['uid']. "'"); mysql_num_rows($rs) && $no_edit = true; $text .= "

"; if ($no_edit) { $text .= " "; } else { $text .= " "; } $text .= "

"; } $text .= "
"; return($text); } function openDB() { global $System, $dbh; $dbh = mysql_connect($System['servername'], $System['username'], $System['password'], $System['dbname']); if (!$dbh) { die('接続できませんでした: ' . mysql_error()); exit; } mysql_select_db($System['dbname']); mysql_query("SET NAMES 'utf8'"); } function closeDB() { global $dbh;mysql_close($dbh); } function session_clear() { $_SESSION = array(); if( ini_get( 'session.use_cookies' ) ) { $params = session_get_cookie_params(); setcookie( session_name(), '', time() - 3600, $params[ 'path' ] ); } session_destroy(); } function AuthorizationError() { $html = join("\n", array( '', '', '401 Authorization Required', '', '

Authorization Required

', '

This server could not verify that you are authorized to access the document', ' requested. Either you supplied the wrong credentials (e.g., bad password), or your', ' browser doesn\'t understand how to supply the credentials required.

', '' )); header("Content-type:text/html; charset=utf-8"); echo $html; exit; } function getCryptfile($path, $key) { $buffer = array(); $filepath = $_SERVER['DOCUMENT_ROOT']. $path; if (is_file($filepath)) { if ($buf = file_get_contents($filepath)) { $base64 = strcrypt($buf, 0, $key); $buffer = split("\n", $base64); array_pop($buffer); } } return($buffer); } function setCryptfile($path, $buffer = array(), $key) { $filepath = $_SERVER['DOCUMENT_ROOT']. $path; data_save($filepath, $buffer); if ($key) { if ($buf = file_get_contents($filepath)) { $base64 = strcrypt($buf, 1, $key); file_put_contents($filepath, $base64); } } } function pager($page, $max, $pageview = 50) { !$page && $page = 1; $maxpage = ceil($max / $pageview); $pager = "
"; if ($maxpage > 1) { if ($page > 2) { $pager .= "

"; } if ($page > 1) { $prev = $page - 1; $pager .= "

"; } if ($maxpage <= 9) { $s = 1; } elseif ($maxpage - 4 <= $page) { $s = $maxpage - 8; } else { $s = $page - 4; } $s < 1 && $s = 1; $e = $s + 8; $e > $maxpage && $e = $maxpage; if ($s != 1) { $next = $s - 9; $next < 1 && $next = 1; $pager .= "

...

"; } for($i = $s; $i <= $e; $i++) { if ($i == $page) { $pager .= "

$i

"; } else { $pager .= "

$i

"; } } if ($e < $maxpage) { $next = $e + 9; $next >= $maxpage && $next = $maxpage; $pager .= "

...

"; } if ($page < $maxpage) { $next = $page + 1; $pager .= "

"; if ($next < $maxpage) { $pager .= "

"; } } } elseif ($max) { $pager .= "

1

"; } $pager .= "
"; return($pager); } function get_middle_section($que) { $middle = array(); foreach ($que as $line) { $Field = dbfields($line); if ($Field['Field']) { $key = $Field['Field']; } if ($Field['Type'] == 0) $middle[$key]++; } return($middle); } function createTable($file, $table) { /* テンポラリテーブルを作成してデータをセット 大分類に属する中分類の名称は、グローバル変数 $category に 中分類に属する設問コードは、変数 $subcategory に格納されている */ $QueCount = array(); global $Init, $Report, $QueCount; $commfields = split(",", $Report['commfields']); $category = array(); if (is_file($file)) { if ($fh = fopen($file, "r")) { $cat = fgetcsv_reg($fh); /* 1行目は大分類 */ mb_convert_variables('UTF-8', 'SJIS-win', $cat); $subcat = fgetcsv_reg($fh); /* 2行目は中分類 */ mb_convert_variables('UTF-8', 'SJIS-win', $subcat); $data = fgetcsv_reg($fh); /* 3行目で設問フィールドを取得 */ $cnt = count($data); /* 大分類と中分類の設問を解析 */ for ($i = 8; $i < $cnt; $i++) { if ($cat[$i]) { $key = $cat[$i]; $category[$key]; } if ($subcat[$i]) { $subkey = $subcat[$i]; $category[$key][$subkey]; } $category[$key][$subkey][] = $data[$i]; $QueCount[$key][] = $data[$i]; } if ($Report['exclusion']) { $exclusion = split(",", $Report['exclusion']); foreach ($exclusion as $line) { unset($category[$line]); unset($QueCount[$line]); } } /* テンポラリテーブルを生成 */ mb_convert_variables('UTF-8', 'SJIS-win', $data); $sql = "CREATE TEMPORARY TABLE IF NOT EXISTS `$table` ( `ID` int(11) NOT NULL auto_increment, `Date` datetime NOT NULL COMMENT '日付', `F1` varchar(20) collate utf8_unicode_ci NOT NULL COMMENT 'ユーザID', `F2` varchar(20) collate utf8_unicode_ci NOT NULL COMMENT '被評価者', `F3` varchar(20) collate utf8_unicode_ci NOT NULL COMMENT '関係', `F4` varchar(20) collate utf8_unicode_ci NOT NULL COMMENT '所属(大)', `F5` varchar(20) collate utf8_unicode_ci NOT NULL COMMENT '所属(中)', `F6` varchar(20) collate utf8_unicode_ci NOT NULL COMMENT '所属(小)', `F7` varchar(20) collate utf8_unicode_ci NOT NULL COMMENT '役職',"; for ($i = 8; $i < $cnt; $i++) { if (in_array($data[$i], $commfields)) { $sql .= " `". $data[$i]. "` varchar(200) collate utf8_unicode_ci NOT NULL,"; } else { $sql .= " `". $data[$i]. "` int(11) NOT NULL,"; } } $sql .= " PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;"; $sql = str_replace("\t", "", $sql); mysql_query($sql); $data = fgetcsv_reg($fh); /* 4行目も削除 */ while (($data = fgetcsv_reg($fh))) { mb_convert_variables('UTF-8', 'SJIS-win', $data); $sql = " INSERT INTO `$table` VALUES ( ''"; foreach ($data as $line) { $sql .= ", '$line'"; } $sql .= " );"; mysql_query($sql); } } } return($category); } ?>