<?php
	session_start();
	session_regenerate_id();
	//本体の高さを指定（未ログインの不格好さをなくすため）
	
	//閲覧できるアカウントなら情報を取得する
	include_once('db/access.php');
	include_once('db/getList.php');
	$dbConnect = new dbConnect();
	//初期化
	$getList = new getList();
/*	
	//検索条件を設定（入力があれば）
	if(!empty($_POST['sort'])){
		$getList->setSort($_POST['sort']);
	}
	if(!empty($_POST['state'])){
		$getList->setState();
	}
	if(!empty($_POST[''])){
		$getList->setkeywords();
	}
/*		//キーワードを入力
	if(isset($_POST['keyword'])){
		$key = $_POST['keyword'];
		$sql .= "AND (request_corp_name LIKE '%$key%' OR request_customer_name LIKE '%$key%' OR request_responsible LIKE '%$key%' OR request_address LIKE '%$key%' OR request_address_structure LIKE '%$key%' OR request_machine_name LIKE '%$key%' OR request_situation LIKE '%$key%') ";
	}*/
	
	//状況による絞込み
	$result = $getList->sqlExec($dbConnect);
	//セッションの更新
	$_SESSION['list'] = serialize($getList);
	session_write_close();

?>
<!DOCTYE html>
<html>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
	<head>
		<meta http-equiv='content-type' content='text/html; charset=utf-8'/>
		<meta name='robots' content='noindex,nofollow,noarchive' />
		<title>表一覧提示画面</title>
		<link rel='stylesheet' href='css/body.css' />
		<link rel='stylesheet' href='css/tableList.css' />
		<link rel="stylesheet" href="css/font-awesome.css" />
		<link rel="stylesheet" href="css/lightbox.css" />
		<script type='text/javascript' src='js/jquery.js'></script>
		<script type='text/javascript' src='js/tableList.js'></script>
		<script type='text/javascript' src='js/lightbox.js'></script>
	</head>
	<body>
		<section id='contents'>
			<div id='contents_block' align="center">				
				<!-- 表本体 -->
				<table>
					<thead>
						<tr>
							<td class='id'>ＩＤ</td>
							<td class='picture' colspan='5'>Picture</td>
							<!--<td class='contact'>Mail</td>-->
						</tr>
					<thead>
					<tbody id='listData'></tbody>
				</table>
			</div>
		</section>
		<div id="mailBlock" class="optionBlock" style="display: none;">
			<form id='mailForm' method='post' style='text-align: center'>
				<input type='email' name='from' style='width: 362px;' placeholder='From' autocomplete='on'/><br />
				<input type='text' name='subject'style='width: 362px;' placeholder='Subject'/><br />
<!--				<select name='pictureNum' style='width: 362px;'>
					<option value=''>Do you inquire about which picture?</option>
					<option value='1'>First column picture</option>
					<option value='2'>Second column picture</option>
					<option value='3'>Third column picture</option>
					<option value='4'>Fourth column picture</option>
					<option value='5'>Fifth column picture</option>
				</select>-->
				<textarea name='body' style='font-size: 12px; width: 362px;' rows='30' cols='30'>
</textarea><br />

				<input type='button' style='margin-right: 77px' id='mailClose' value='Close' />
				<input type='submit' id='mailSend' value='Send' />
			</form>
		</div>
		<!--メール送信中を示すマーク-->
		<div id='mailSending' style='display: none; position: absolute; top: 0px; right: 0px; width: 10em; text-align: right;' data-localize='mail.sending'>Mail is sending </div>
		<script>
$(function(){
	var lbox = new LBoxs("<div style='z-index: 20000; text-align: center; width: 100%;'><input type='button' class='contactButton' value='&#xf003; Contact' /></div>");
	var tableList = new TableList();
	tableList.setTable(<?php echo json_encode($result); ?>);
	tableList.init();
	tableList.buttonInit();
});
		</script>
	</body>
</html>