Beispiel #1
0
function out_html($gc) {

	$sql = "SELECT SQL_CALC_FOUND_ROWS";
	$sql.= " user_no,";
	$sql.= " user_nm,";
	$sql.= " user_kn,";
	$sql.= " user_id,";
	$sql.= " e_mail,";
	$sql.= " last_login_time,";
	$sql.= " ltime ";
	$sql.= "FROM";
	$sql.= " m_user ";
	$sql.= "WHERE 0 = 0 ";

	$sql.= "ORDER BY";

	switch($_GET["si"]) {
	case "user_no":
		$sql.= " user_no".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "user_nm":
		$sql.= " user_nm".(($_GET["sa"]=="desc") ? " DESC" : "").", user_no ";
		break;
	case "user_kn":
		$sql.= " user_kn".(($_GET["sa"]=="desc") ? " DESC" : "").", user_no ";
		break;
	case "user_id":
		$sql.= " user_id".(($_GET["sa"]=="desc") ? " DESC" : "").", user_no ";
		break;
	case "e_mail":
		$sql.= " e_mail".(($_GET["sa"]=="desc") ? " DESC" : "").", user_no ";
		break;
	case "last_login_time":
		$sql.= " last_login_time".(($_GET["sa"]=="desc") ? " DESC" : "").", user_no ";
		break;
	default:
		$sql.= " user_no ";
	}

	$sql.= f_get_limit($gc->pn, $gc->pl, C_ORDER_LIST_COL_CNT);

	$rs = $gc->db->query($sql);

	$row_count = $gc->db->get_row_count();

	//ページャーの設定
	if($row_count > 0){
		$page_arr = f_page_arr("user_l.php", $row_count, $gc->pl, C_ORDER_LIST_COL_CNT, C_ORDER_PAGE_TAG_CNT);
	}

	//ソート関連
	$sort_mode["user_no"] = "";
	$sort_mode["user_nm"] = "";
	$sort_mode["user_kn"] = "";
	$sort_mode["user_id"] = "";
	$sort_mode["e_mail"] = "";
	$sort_mode["last_login_time"] = "";

	foreach ($sort_mode as $key => &$value) {
		if($key == $_GET["si"]){
			if($_GET["sa"] == "desc"){
				$value = " ▼";
			}else{
				$value = " ▲";
			}
		}
	}

?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>管理者一覧</title>
<!-- *** stylesheet *** -->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<!-- *** javascript *** -->
<script type="text/javascript" src="js/listpage.js" charset="utf-8"></script> 
</head>
<body>

<!-- Header -->
<div id="header">
	<div class="shell">
		<!-- Logo + Top Nav -->
		<?php tcom_header_logo_nav($gc) ?>
		<!-- End Logo + Top Nav -->
		<!-- Main Nav -->
		<?php tcom_header_main_nav($gc, 4) ?>
		<!-- End Main Nav -->
	</div>
</div>
<!-- End Header -->

<!-- Container -->
<div id="container">
	<div class="shell">

		<!-- Small Nav -->
		<div class="small-nav">
			<a href="user_l.php">管理者</a>
			<span>&gt;</span>
			管理者一覧
		</div>
		<!-- End Small Nav -->

		<!-- Main -->
		<div id="main">
			<div class="cl">&nbsp;</div>

			<!-- Content -->
			<div id="content">

				<!-- Box -->
				<div class="box">

					<!-- Box Head -->
					<div class="box-head">
						<h2 class="left"><b>管理者一覧</b></h2>
						<div class="right">
							<a href="user_e.php?mode=add" class="add-button"><span>新規追加</span></a>
						</div>
					</div>
					<!-- End Box Head -->

					<!-- Table -->
					<div class="table">

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								<?php echo $page_arr["cmes_str"].$page_arr["par1_str"].$page_arr["par2_str"]; ?>
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr style="border-top:solid 1px #e0e0e0;">
								<th width="60" class="ac"><a href="user_l.php<?php echo f_sq("user_no") ?>">No.</a><?php echo $sort_mode["user_no"] ?></th>
								<th width="150"><a href="user_l.php<?php echo f_sq("user_nm") ?>">管理者名</a><?php echo $sort_mode["user_nm"] ?></th>
								<th width="150"><a href="user_l.php<?php echo f_sq("user_kn") ?>">フリガナ</a><?php echo $sort_mode["user_kn"] ?></th>
								<th><a href="user_l.php<?php echo f_sq("e_mail") ?>">E-mail</a><?php echo $sort_mode["e_mail"] ?></th>
								<th width="120" class="ac"><a href="user_l.php<?php echo f_sq("user_id") ?>">ログインID</a><?php echo $sort_mode["user_id"] ?></th>
								<th width="120" class="ac"><a href="user_l.php<?php echo f_sq("last_login_time") ?>">最終ログイン日時</a><?php echo $sort_mode["last_login_time"] ?></th>
								<th width="70" class="ac">詳細</th>
							</tr>

<?php

	$i = 0;

	while ($rs->eof==false) {

		$user_no = $rs->fields["user_no"];
		$user_nm = $rs->fields["user_nm"];
		$user_kn = $rs->fields["user_kn"];
		$user_id = $rs->fields["user_id"];
		$e_mail = $rs->fields["e_mail"];
		$last_login_time = $rs->fields["last_login_time"];

		if($last_login_time != ""){
			$last_login_time_d = substr($last_login_time, 0, 4)."/".substr($last_login_time, 5, 2)."/".substr($last_login_time, 8, 2);
			$last_login_time_t = substr($last_login_time, 11);
		}else{
			$last_login_time_d = "";
			$last_login_time_t = "";
		}

		$odd = "";
		if(($i % 2)==1){
			$odd = " class=\"odd\"";
		}

		echo "<tr".$odd.">";
		echo "<td class=\"ac\">".f_hsc($user_no)."</td>";
		echo "<td>".f_hsc($user_nm)."</td>";
		echo "<td>".f_hsc($user_kn)."</td>";
		echo "<td>".f_hsc($e_mail)."</td>";
		echo "<td class=\"ac\">".f_hsc($user_id)."</td>";
		echo "<td class=\"ac\">".f_hsc($last_login_time_d)."<br />".f_hsc($last_login_time_t)."</td>";
		echo "<td class=\"ac\"><button type=\"button\" class=\"list-button\" onclick=\"location.href='user_e.php?mode=edit&user_no=".$user_no."';\">詳細</button></td>";
		echo "</tr>";

		$rs->move_next();

		$i++;

	}

	$rs->free_result();

	if($row_count==0){
		echo "<tr>";
		echo "<td colspan=\"6\" align=\"center\">データはありません。</td>";
		echo "</tr>";
	}

?>
						</table>

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								&nbsp;
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

					</div>
					<!-- Table -->

				</div>
				<!-- End Box -->
				<div class="cl">&nbsp;</div>

			</div>
			<!-- End Content -->
			<div class="cl">&nbsp;</div>

		</div>
		<!-- Main -->
	</div>
</div>
<!-- End Container -->

<!-- Footer -->
	<?php tcom_footer($gc) ?>
<!-- End Footer -->

</body>
</html>
<?php
}
Beispiel #2
0
function out_html($gc) {

	$gc->anken_no = $_GET["anken_no"];

	$sql = "SELECT SQL_CALC_FOUND_ROWS";
	$sql.= " i.item_no,";
	$sql.= " i.anken_no,";
	$sql.= " i.buken_sbt,";
	$sql.= " i.menseki,";
	$sql.= " i.rank_no,";
	$sql.= " i.buken_shikucyouson_no,";
	$sql.= " i.mukou_flg,";
	$sql.= " i.moushikomibi, ";
	$sql.= " c.c_mukou_flg ";
	$sql.= "FROM";
	$sql.= " t_item i ";
	$sql.= "INNER JOIN";
	$sql.= " m_shikucyouson s ";
	$sql.= "ON";
	$sql.= " i.buken_shikucyouson_no = s.shikucyouson_no ";
	$sql.= "LEFT JOIN";
	$sql.= " (select item_no,company_no,c_mukou_flg from t_item_company where company_no=".$gc->login_company_no.") as c ";
	$sql.= "ON";
	$sql.= " i.item_no = c.item_no ";
	$sql.= "WHERE 0 = 0 and c.company_no=".$gc->login_company_no." ";
	if($gc->anken_no != ""){
		$sql.= "and i.anken_no like '%".$gc->anken_no."%' ";
	}


	$sql.= "ORDER BY";

	switch($_GET["si"]) {
	case "ank":
		$sql.= " i.anken_no".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "mbi":
		$sql.= " i.moushikomibi".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "sbt":
		$sql.= " i.buken_sbt".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "men":
		$sql.= " i.menseki".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "tod":
		$sql.= " s.todoufuken_no".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "shi":
		$sql.= " s.shikucyouson_no".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "muk":
		$sql.= " c.c_mukou_flg".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	default:
		$sql.= " i.item_no DESC ";
	}

	$sql.= f_get_limit($gc->pn, $gc->pl, C_ORDER_LIST_COL_CNT);

	$rs = $gc->db->query($sql);

	$row_count = $gc->db->get_row_count();
	//ページャーの設定
	if($row_count > 0){
		$page_arr = f_page_arr("item_l.php", $row_count, $gc->pl, C_ORDER_LIST_COL_CNT, C_ORDER_PAGE_TAG_CNT);
	}

	//ソート関連
	$sort_mode["ank"] = "";
	$sort_mode["mbi"] = "";
	$sort_mode["sbt"] = "";
	$sort_mode["men"] = "";
	$sort_mode["tod"] = "";
	$sort_mode["shi"] = "";
	$sort_mode["muk"] = "";

	foreach ($sort_mode as $key => &$value) {
		if($key == $_GET["si"]){
			if($_GET["sa"] == "desc"){
				$value = " ▼";
			}else{
				$value = " ▲";
			}
		}
	}

?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>申込/対応状況</title>
<!-- *** stylesheet *** -->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<!-- *** javascript *** -->
<script type="text/javascript" src="js/listpage.js" charset="utf-8"></script> 
<script language="JavaScript">
<!--
var submit_flg = false;
function run_submit(fname, mode) {
	document.forms[fname].mode.value = mode;
	if(submit_flg==false){
		//ボタン2度押し対応
		submit_flg = true;
		document.forms[fname].submit();
	}
}
function unload_page(){
	submit_flg = false;
}
window.onunload = unload_page;
// -->
</script>
</head>
<body>

<!-- Header -->
<div id="header">
	<div class="shell">
		<!-- Logo + Top Nav -->
		<?php tcom_header_logo_nav($gc) ?>
		<!-- End Logo + Top Nav -->
		<!-- Main Nav -->
		<?php tcom_header_main_nav2($gc, 1) ?>
		<!-- End Main Nav -->
	</div>
</div>
<!-- End Header -->

<!-- Container -->
<div id="container">
	<div class="shell">

		<!-- Small Nav -->
		<div class="small-nav">
			<a href="item_l.php">案件管理</a>
			<span>&gt;</span>
			申込み/対応状況
		</div>
		<!-- End Small Nav -->

		<!-- Main -->
		<div id="main">
			<div class="cl">&nbsp;</div>

			<!-- Content -->
			<div id="content">

				<!-- Box -->
				<div class="box">

					<!-- Form -->
					<div class="form">

						<form name="form_search" action="item_l.php" method="get" onsubmit="return false">
							<input name="mode" type="hidden" value="">

							<div class="box-size2 left">
								<p class="inline-field">
									<label style="display:inline;">案件番号:</label>
									<input name="anken_no" type="text" class="field size3" value="<?php echo f_hsc($gc->anken_no) ?>" />
									<button type="button" class="button color silver ml05" onclick="run_submit('form_search', 'search');">検索</button>
								</p>
							</div>

							<div class="cl">&nbsp;</div>

						</form>

					</div>
					<!-- End Form -->

					<!-- Box Head -->
					<div class="box-head">
						<h2 class="left">申込み/対応状況</h2>
						<div class="right">
							<a href="item_csv.php" class="custom-button"><span>CSV出力</span></a>
						</div>
					</div>
					<!-- End Box Head -->

					<!-- Table -->
					<div class="table">

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								<?php echo $page_arr["cmes_str"].$page_arr["par1_str"].$page_arr["par2_str"]; ?>
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr style="border-top:solid 1px #e0e0e0;">
								<th width="80" class="ac"><a href="item_l.php<?php echo f_sq("ank") ?>">案件番号</a><?php echo $sort_mode["ank"] ?></th>
								<th width="80" class="ac"><a href="item_l.php<?php echo f_sq("mbi") ?>">申込日</a><?php echo $sort_mode["mbi"] ?></th>
								<th width="80" class="ac"><a href="item_l.php<?php echo f_sq("sbt") ?>">種別</a><?php echo $sort_mode["sbt"] ?></th>
								<th width="80" class="ac"><a href="item_l.php<?php echo f_sq("men") ?>">延床面積</a><?php echo $sort_mode["men"] ?><br />(平米)</th>
								<th width="100" class="ac"><a href="item_l.php<?php echo f_sq("tod") ?>">都道府県</a><?php echo $sort_mode["tod"] ?></th>
								<th><a href="item_l.php<?php echo f_sq("shi") ?>">市区町村</a><?php echo $sort_mode["shi"] ?></th>
								<th width="50" class="ac"><a href="item_l.php<?php echo f_sq("muk") ?>">状態</a><?php echo $sort_mode["muk"] ?></th>
								<th width="70" class="ac">詳細</th>
							</tr>

<?php

	$i = 0;

	while ($rs->eof==false) {

		$item_no = $rs->fields["item_no"];
		$anken_no = $rs->fields["anken_no"];
		$buken_sbt = $rs->fields["buken_sbt"];
		$menseki = $rs->fields["menseki"];
		$rank_no = $rs->fields["rank_no"];
		$buken_shikucyouson_no = $rs->fields["buken_shikucyouson_no"];
		$mukou_flg = $rs->fields["mukou_flg"];
		$c_mukou_flg = $rs->fields["c_mukou_flg"];
		$moushikomibi = $rs->fields["moushikomibi"];

		$menseki = (float)$menseki;

		$moushikomi_d = substr($moushikomibi, 0, 4)."/".substr($moushikomibi, 5, 2)."/".substr($moushikomibi, 8, 2);
		$moushikomi_t = substr($moushikomibi, 11);

		$arr = fdiv_set_buken_sbt_array();
		$buken_sbt_nm = $arr[$buken_sbt];

		$arr = fdiv_set_rank_array();
		$rank_nm = $arr[$rank_no];

		$buken_shikucyouson_nm = fdb_get_name($gc, "m_shikucyouson", "shikucyouson_nm", "shikucyouson_no", $buken_shikucyouson_no);
		$todoufuken_no = fdb_get_name($gc, "m_shikucyouson", "todoufuken_no", "shikucyouson_no", $buken_shikucyouson_no);
		$todoufuken_nm = fdb_get_name($gc, "m_todoufuken", "todoufuken_nm", "todoufuken_no", $todoufuken_no);

		$odd = "";
		if(($i % 2)==1){
			$odd = " class=\"odd\"";
		}

		echo "<tr".$odd.">";
		echo "<td class=\"ac\">".f_hsc($anken_no)."</td>";
		echo "<td class=\"ac\">".$moushikomi_d."<br />".$moushikomi_t."</td>";
		echo "<td class=\"ac\">".f_hsc($buken_sbt_nm)."</td>";
		echo "<td class=\"ac\">".f_hsc($menseki)."</td>";
		echo "<td class=\"ac\">".f_hsc($todoufuken_nm)."</td>";
		echo "<td>".f_hsc($buken_shikucyouson_nm)."</td>";
		echo "<td class=\"ac\" style=\"color: ".($c_mukou_flg==1?"red":"blue").";\">".f_hsc($c_mukou_flg==1?"無効":"有効")."</td>";
		echo "<td class=\"ac\"><button type=\"button\" class=\"list-button\" onclick=\"location.href='item_e.php?mode=edit&item_no=".$item_no."';\">詳細</button></td>";
		echo "</tr>";

		$rs->move_next();

		$i++;

	}

	$rs->free_result();

	if($row_count==0){
		echo "<tr>";
		echo "<td colspan=\"8\" align=\"center\">データはありません。</td>";
		echo "</tr>";
	}

?>

						</table>

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								&nbsp;
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

					</div>
					<!-- Table -->

				</div>
				<!-- End Box -->
				<div class="cl">&nbsp;</div>

			</div>
			<!-- End Content -->
			<div class="cl">&nbsp;</div>

		</div>
		<!-- Main -->
	</div>
</div>
<!-- End Container -->

<!-- Footer -->
	<?php tcom_footer($gc) ?>
<!-- End Footer -->

</body>
</html>
<?php
}
Beispiel #3
0
function out_html($gc) {

//	$gc->sum_tesuryou = get_sum_tesuryou($gc);
	$gc->sum_tesuryou = get_sum_tesuryou_d($gc);

	$gc->company_nm = fdb_get_name($gc, "m_company", "company_nm", "company_no", $gc->login_company_no);

	$arr_todoufuken = fsel_get_arr_todoufuken($gc);

	$arr_buken_sbt = fdiv_set_buken_sbt_array();

	$sql = sql_text_create_d($gc);

	switch($_GET["si"]) {
	case "ank":
		$sql.= " p.anken_no".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "mbi":
		$sql.= " p.moushikomibi".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "sbt":
		$sql.= " p.buken_sbt".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "men":
		$sql.= " p.menseki".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "ran":
		$sql.= " p.rank_no".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "tod":
		$sql.= " s.todoufuken_no".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "shi":
		$sql.= " p.buken_shikucyouson_no".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "muk":
		$sql.= " c3.c_mukou_flg".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "tes":
		$sql.= " p.tesuryou".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	default:
		$sql.= " p.moushikomibi desc ";
	}

	$sql.= f_get_limit($gc->pn, $gc->pl, C_ORDER_LIST_COL_CNT);

	$rs = $gc->db->query($sql);
	$row_count = $gc->db->get_row_count();

	//ページャーの設定
	if($row_count > 0){
		$page_arr = f_page_arr("tesuryo_d.php", $row_count, $gc->pl, C_ORDER_LIST_COL_CNT, C_ORDER_PAGE_TAG_CNT);
	}

	//ソート関連
	$sort_mode["ank"] = "";
	$sort_mode["mbi"] = "";
	$sort_mode["sbt"] = "";
	$sort_mode["men"] = "";
	$sort_mode["ran"] = "";
	$sort_mode["tod"] = "";
	$sort_mode["shi"] = "";
	$sort_mode["muk"] = "";
	$sort_mode["tes"] = "";

	foreach ($sort_mode as $key => &$value) {
		if($key == $_GET["si"]){
			if($_GET["sa"] == "desc"){
				$value = " ▼";
			}else{
				$value = " ▲";
			}
		}
	}

?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>手数料一覧</title>
<!-- *** stylesheet *** -->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<!-- *** javascript *** -->
<script type="text/javascript" src="js/listpage.js" charset="utf-8"></script>
<script language="JavaScript">
<!--
var submit_flg = false;
function run_submit(fname, mode) {
	document.forms[fname].mode.value = mode;
	if(submit_flg==false){
		//ボタン2度押し対応
		submit_flg = true;
		document.forms[fname].submit();
	}
}
function unload_page(){
	submit_flg = false;
}
window.onunload = unload_page;
function search_run(){
	var o;
	o = document.getElementById('mbif_y');
	var mbif_y = o.options[ o.selectedIndex ].value;
	o = document.getElementById('mbif_m');
	var mbif_m = o.options[ o.selectedIndex ].value;
	o = document.getElementById('mbif_d');
	var mbif_d = o.options[ o.selectedIndex ].value;
	o = document.getElementById('mbit_y');
	var mbit_y = o.options[ o.selectedIndex ].value;
	o = document.getElementById('mbit_m');
	var mbit_m = o.options[ o.selectedIndex ].value;
	o = document.getElementById('mbit_d');
	var mbit_d = o.options[ o.selectedIndex ].value;
	document.forms['form_search'].mbif.value = mbif_y + mbif_m + mbif_d;
	document.forms['form_search'].mbit.value = mbit_y + mbit_m + mbit_d;
	run_submit('form_search', 'search');
}

// -->
</script>
</head>
<body>

<!-- Header -->
<div id="header">
	<div class="shell">
		<!-- Logo + Top Nav -->
		<?php tcom_header_logo_nav($gc) ?>
		<!-- End Logo + Top Nav -->
		<!-- Main Nav -->
		<?php tcom_header_main_nav2($gc, 2) ?>
		<!-- End Main Nav -->
	</div>
</div>
<!-- End Header -->

<!-- Container -->
<div id="container">
	<div class="shell">

		<!-- Small Nav -->
		<div class="small-nav">
			<a href="tesuryo_l.php">手数料管理</a>
			<span>&gt;</span>
			手数料一覧
		</div>
		<!-- End Small Nav -->

		<!-- Main -->
		<div id="main">
			<div class="cl">&nbsp;</div>

			<!-- Content -->
			<div id="content">

				<!-- Box -->
				<div class="box">

					<!-- Form -->
					<div class="form">

						<form name="form_search" action="tesuryo_d.php" method="get" onsubmit="return false">
							<input name="mode" type="hidden" value="">
							<input name="mbif" type="hidden" value="">
							<input name="mbit" type="hidden" value="">

							<div class="box-size4 left">
								<p class="inline-field">
									<label style="display:inline;">集計期間:</label>
									<select id="mbif_y" class="field">
										<?php echo fsel_get_date_y($gc, $gc->mbif_y) ?>
									</select><span class="ml05">年</span>
									<select id="mbif_m" class="field">
										<?php echo fsel_get_date_m($gc, $gc->mbif_m) ?>
									</select><span class="ml05">月</span>
									<select id="mbif_d" class="field">
										<?php echo fsel_get_date_d($gc, $gc->mbif_d) ?>
									</select><span class="ml05">日</span>
									~
									<select id="mbit_y" class="field">
										<?php echo fsel_get_date_y($gc, $gc->mbit_y) ?>
									</select><span class="ml05">年</span>
									<select id="mbit_m" class="field">
										<?php echo fsel_get_date_m($gc, $gc->mbit_m) ?>
									</select><span class="ml05">月</span>
									<select id="mbit_d" class="field">
										<?php echo fsel_get_date_d($gc, $gc->mbit_d) ?>
									</select><span class="ml05">日</span>
									<button type="button" class="button color silver ml30" onclick="search_run();">検索</button>

								</p>
							</div>

							<div class="cl">&nbsp;</div>

						</form>

					</div>
					<!-- End Form -->

					<!-- Box Head -->
					<div class="box-head">
						<h2 class="left">抽出条件・手数料合計</h2>
						<div class="right">
							<div class="cl">&nbsp;</div>
						</div>
					</div>
					<!-- End Box Head -->

					<!-- Form -->
					<div class="form">

						<div class="box-size4 left">
							<p class="inline-field">
								<label style="display:inline;">集計期間:</label>
								<?php echo substr($gc->mbif, 0, 4) ?>年<?php echo substr($gc->mbif, 4, 2) ?>月<?php echo substr($gc->mbif, 6, 2) ?>日
								~
								<?php echo substr($gc->mbit, 0, 4) ?>年<?php echo substr($gc->mbit, 4, 2) ?>月<?php echo substr($gc->mbit, 6, 2) ?>日
							</p>
						</div>
						<div style="float:right;">
							<label class="ml40" style="display:inline;">手数料合計:</label>
							<?php echo number_format($gc->sum_tesuryou) ?>円
						</div>

						<div class="cl">&nbsp;</div>

					</div>
					<!-- End Form -->

					<!-- Box Head -->
					<div class="box-head">
						<h2 class="left">手数料一覧</h2>
						<div class="right">
							<a href="tesuryo_csv.php?mode=2&mbif=<?php echo f_hsc($gc->mbif) ?>&mbit=<?php echo f_hsc($gc->mbit) ?>&company_no=<?php echo f_hsc($gc->login_company_no) ?>" class="custom-button"><span>CSV出力</span></a>
						</div>
					</div>
					<!-- End Box Head -->

					<!-- Table -->
					<div class="table">

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								<?php echo $page_arr["cmes_str"].$page_arr["par1_str"].$page_arr["par2_str"]; ?>
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr style="border-top:solid 1px #e0e0e0;">
								<th width="80" class="ac"><a href="tesuryo_d.php<?php echo f_sq("ank") ?>">案件番号</a><?php echo $sort_mode["ank"] ?></th>
								<th width="80" class="ac"><a href="tesuryo_d.php<?php echo f_sq("mbi") ?>">申込日</a><?php echo $sort_mode["mbi"] ?></th>
								<th width="80" class="ac"><a href="tesuryo_d.php<?php echo f_sq("sbt") ?>">種別</a><?php echo $sort_mode["sbt"] ?></th>
								<th width="80" class="ac"><a href="tesuryo_d.php<?php echo f_sq("men") ?>">延床面積</a><?php echo $sort_mode["men"] ?><br />(平米)</th>
								<th width="50" class="ac"><a href="tesuryo_d.php<?php echo f_sq("ran") ?>">ランク</a><?php echo $sort_mode["ran"] ?></th>
								<th width="70"><a href="tesuryo_d.php<?php echo f_sq("tod") ?>">都道府県</a><?php echo $sort_mode["tod"] ?></th>
								<th><a href="tesuryo_d.php<?php echo f_sq("shi") ?>">市区町村</a><?php echo $sort_mode["shi"] ?></th>
								<th width="40" class="ac"><a href="tesuryo_d.php<?php echo f_sq("muk") ?>">状態</a><?php echo $sort_mode["muk"] ?></th>
								<th width="70" class="ac"><a href="tesuryo_d.php<?php echo f_sq("tes") ?>">手数料</a><?php echo $sort_mode["tes"] ?></th>
								<th width="60" class="ac">詳細</th>
							</tr>

<?php

	$i = 0;

	while ($rs->eof==false) {

		$item_no = $rs->fields["item_no"];
		$anken_no = $rs->fields["anken_no"];
		$buken_sbt = $rs->fields["buken_sbt"];
		$purpose_flg = $rs->fields["purpose_flg"];
		$menseki = $rs->fields["menseki"];
		$rank_no = get_rank_d($rs);
//		$rank_no = $rs->fields["rank_no"];
		$todoufuken_no = $rs->fields["todoufuken_no"];
		$buken_shikucyouson_no = $rs->fields["buken_shikucyouson_no"];
		$shikucyouson_nm = $rs->fields["shikucyouson_nm"];
		$mukou_flg = $rs->fields["mukou_flg"];
		$c_mukou_flg = $rs->fields["c_mukou_flg"];
		$m_cnt = $rs->fields["m_cnt"];
		$y_cnt = $rs->fields["y_cnt"];
		$tesuryou = get_tesuryo_d($rs);
//		$tesuryou = $rs->fields["tesuryou"];
		$moushikomibi = $rs->fields["moushikomibi"];

		$menseki = (float)$menseki;

		$moushikomi_d = substr($moushikomibi, 0, 4)."/".substr($moushikomibi, 5, 2)."/".substr($moushikomibi, 8, 2);
		$moushikomi_t = substr($moushikomibi, 11);

		$todoufuken_nm = $arr_todoufuken[$todoufuken_no];

		$buken_sbt_nm = $arr_buken_sbt[$buken_sbt];

		$arr = fdiv_set_rank_array();

		if($rank_no != "L"){
			$rank_nm = $arr[$rank_no];
		}else{
			$rank_nm = "L";
		}
/*
		if($purpose_flg == 1){
			$rank_nm = "L";
		}
*/
		$odd = "";
		if(($i % 2)==1){
			$odd = " class=\"odd\"";
		}

		echo "<tr".$odd.">";
		echo "<td class=\"ac\">".$anken_no."</td>";
		echo "<td class=\"ac\">".$moushikomi_d."<br />".$moushikomi_t."</td>";
		echo "<td class=\"ac\">".f_hsc($buken_sbt_nm)."</td>";
		echo "<td class=\"ac\">".f_hsc($menseki)."</td>";
		echo "<td class=\"ac\">".f_hsc($rank_nm)."</td>";
		echo "<td>".f_hsc($todoufuken_nm)."</td>";
		echo "<td>".f_hsc($shikucyouson_nm)."</td>";
		echo "<td class=\"ac\" style=\"color: ".($c_mukou_flg==1?"red":"blue").";\">".f_hsc($c_mukou_flg==1?"無効":"有効")."</td>";
		echo "<td class=\"ar\">".f_hsc($mukou_flg==1?"0":$tesuryou)."</td>";
//		echo "<td class=\"ar\">".f_hsc($mukou_flg==1?"0":number_format($tesuryou))."</td>";
		echo "<td class=\"ac\"><button type=\"button\" class=\"list-button\" onclick=\"location.href='item_e.php?item_no=".$item_no."&referrer=tesuryo_d&company_no=".$gc->login_company_no."&mbif=".$gc->mbif."&mbit=".$gc->mbit."';\">詳細</button></td>";
		echo "</tr>";

		$rs->move_next();

		$i++;

	}

	$rs->free_result();

	if($row_count==0){
		echo "<tr>";
		echo "<td colspan=\"10\" align=\"center\">データはありません。</td>";
		echo "</tr>";
	}

?>

						</table>

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								&nbsp;
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

					</div>
					<!-- Table -->

				</div>
				<!-- End Box -->
				<div class="cl">&nbsp;</div>

			</div>
			<!-- End Content -->
			<div class="cl">&nbsp;</div>

		</div>
		<!-- Main -->
	</div>
</div>
<!-- End Container -->

<!-- Footer -->
	<?php tcom_footer($gc) ?>
<!-- End Footer -->

</body>
</html>
<?php
}
Beispiel #4
0
function out_html($gc) {

	$gc->company_sh = $_GET["company_sh"];
	$gc->todoufuken_no = $_GET["todoufuken_no"];
	$gc->company_no = $_GET["company_no"];
	$gc->company_kbn = $_GET["company_kbn"];
	$gc->relocation_flg = $_GET["relocation_flg"];

	$arr_todoufuken = fsel_get_arr_todoufuken($gc);

	$arr_company_kbn = fdiv_set_company_kbn_array();

	//ラジオボタン設定
	fdiv_set_company_kbn_radio($gc, $gc->company_kbn, "company_kbn");

	//チェックボックス設定
	fdiv_set_checkbox($gc, "リロケーション", ($gc->relocation_flg=="1"), "relocation_flg");

	if(is_numeric($gc->company_no)){
		$gc->joken_company_nm = fdb_get_name($gc, "m_company", "company_nm", "company_no", $gc->company_no);
	}
	if($gc->joken_company_nm==""){
		$gc->joken_company_nm = "指定なし";
	}

	if($gc->company_sh==""){
		$gc->joken_company_sh = "指定なし";
	}else{
		$gc->joken_company_sh = $gc->company_sh;
	}

	if(is_numeric($gc->todoufuken_no)){
		$gc->joken_todoufuken_nm = $arr_todoufuken[$gc->todoufuken_no];
	}
	if($gc->joken_todoufuken_nm==""){
		$gc->joken_todoufuken_nm = "指定なし";
	}

	if($gc->relocation_flg=="1"){
		$gc->joken_relocation_flg_nm = "あり";
	}else{
		$gc->joken_relocation_flg_nm = "指定なし";
	}

	if(is_numeric($gc->company_kbn)){
		if($gc->company_kbn > 0){
			$gc->joken_company_kbn_nm = $arr_company_kbn[$gc->company_kbn];
		}else{
			$gc->joken_company_kbn_nm = "全て";
		}
	}else{
		$gc->joken_company_kbn_nm = "指定なし";
	}

	//ベースSQLの作成
	$base_sql = sql_text_create_l($gc);

	//手数料合計の取得
/*
	$sql = "SELECT";
	$sql.= " COALESCE(rl.sum_tesuryou, 0) AS sum_tesuryou_l,";
	$sql.= " COALESCE(rs.sum_tesuryou, 0) AS sum_tesuryou_s,";
	$sql.= " COALESCE(ra.sum_tesuryou, 0) AS sum_tesuryou_a,";
	$sql.= " COALESCE(rb.sum_tesuryou, 0) AS sum_tesuryou_b,";
	$sql.= " COALESCE(rc.sum_tesuryou, 0) AS sum_tesuryou_c ";
	$sql.= $base_sql;

	$rs = $gc->db->query($sql);

	$gc->sum_tesuryou = 0;

	while ($rs->eof==false) {

		$sum_tesuryou_l = $rs->fields["sum_tesuryou_l"];
		$sum_tesuryou_s = $rs->fields["sum_tesuryou_s"];
		$sum_tesuryou_a = $rs->fields["sum_tesuryou_a"];
		$sum_tesuryou_b = $rs->fields["sum_tesuryou_b"];
		$sum_tesuryou_c = $rs->fields["sum_tesuryou_c"];

		$gc->sum_tesuryou += $sum_tesuryou_l + $sum_tesuryou_s + $sum_tesuryou_a + $sum_tesuryou_b + $sum_tesuryou_c;

		$rs->move_next();

	}
	$rs->free_result();
	$sql = "SELECT SQL_CALC_FOUND_ROWS";
	$sql.= " mc.company_no,";
	$sql.= " mc.company_nm,";
	$sql.= " mc.company_kn,";
	$sql.= " mc.company_sh,";
	$sql.= " mc.company_kbn,";
	$sql.= " mc.todoufuken_no,";
	$sql.= " mc.add1,";
	$sql.= " mc.jyougen,";
	$sql.= " COALESCE(rl.cnt_rank, 0) AS cnt_rank_l,";
	$sql.= " COALESCE(rl.sum_tesuryou, 0) AS sum_tesuryou_l,";
	$sql.= " COALESCE(rs.cnt_rank, 0) AS cnt_rank_s,";
	$sql.= " COALESCE(rs.sum_tesuryou, 0) AS sum_tesuryou_s,";
	$sql.= " COALESCE(ra.cnt_rank, 0) AS cnt_rank_a,";
	$sql.= " COALESCE(ra.sum_tesuryou, 0) AS sum_tesuryou_a,";
	$sql.= " COALESCE(rb.cnt_rank, 0) AS cnt_rank_b,";
	$sql.= " COALESCE(rb.sum_tesuryou, 0) AS sum_tesuryou_b,";
	$sql.= " COALESCE(rc.cnt_rank, 0) AS cnt_rank_c,";
	$sql.= " COALESCE(rc.sum_tesuryou, 0) AS sum_tesuryou_c ";
	$sql.= $base_sql;
*/
	$sql= $base_sql;

	$sql.= " ORDER BY";

	switch($_GET["si"]) {
	case "ckn":
		$sql.= " c.company_kn".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "kbn":
		$sql.= " c.company_kbn".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "tod":
		$sql.= " c.todoufuken_no".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "crl":
		$sql.= " sr_l".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "crs":
		$sql.= " sr_1".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "cra":
		$sql.= " sr_2".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "crb":
		$sql.= " sr_3".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "crc":
		$sql.= " sr_4".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "tes":
		$sql.= " s_t".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "jog":
		$sql.= " c.jyougen".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	default:
		$sql.= " c.company_no ";
	}

	$sql.= f_get_limit($gc->pn, $gc->pl, C_ORDER_LIST_COL_CNT);

	$rs = $gc->db->query($sql);

	$row_count = $gc->db->get_row_count();

	//ページャーの設定
	if($row_count > 0){
		$page_arr = f_page_arr("tesuryo_l.php", $row_count, $gc->pl, C_ORDER_LIST_COL_CNT, C_ORDER_PAGE_TAG_CNT);
	}

	//ソート関連
	$sort_mode["ckn"] = "";
	$sort_mode["kbn"] = "";
	$sort_mode["tod"] = "";
	$sort_mode["crl"] = "";
	$sort_mode["crs"] = "";
	$sort_mode["cra"] = "";
	$sort_mode["crb"] = "";
	$sort_mode["crc"] = "";
	$sort_mode["tes"] = "";
	$sort_mode["jog"] = "";

	foreach ($sort_mode as $key => &$value) {
		if($key == $_GET["si"]){
			if($_GET["sa"] == "desc"){
				$value = " ▼";
			}else{
				$value = " ▲";
			}
		}
	}

?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>手数料一覧</title>
<!-- *** stylesheet *** -->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<!-- *** javascript *** -->
<script type="text/javascript" src="js/listpage.js" charset="utf-8"></script>
<script language="JavaScript">
<!--
var submit_flg = false;
function run_submit(fname, mode) {
	document.forms[fname].mode.value = mode;
	if(submit_flg==false){
		//ボタン2度押し対応
		submit_flg = true;
		document.forms[fname].submit();
	}
}
function unload_page(){
	submit_flg = false;
}
window.onunload = unload_page;
function search_run(){
	var o;
	o = document.getElementById('mbif_y');
	var mbif_y = o.options[ o.selectedIndex ].value;
	o = document.getElementById('mbif_m');
	var mbif_m = o.options[ o.selectedIndex ].value;
	o = document.getElementById('mbif_d');
	var mbif_d = o.options[ o.selectedIndex ].value;
	o = document.getElementById('mbit_y');
	var mbit_y = o.options[ o.selectedIndex ].value;
	o = document.getElementById('mbit_m');
	var mbit_m = o.options[ o.selectedIndex ].value;
	o = document.getElementById('mbit_d');
	var mbit_d = o.options[ o.selectedIndex ].value;
	document.forms['form_search'].mbif.value = mbif_y + mbif_m + mbif_d;
	document.forms['form_search'].mbit.value = mbit_y + mbit_m + mbit_d;
	run_submit('form_search', 'search');
}
// -->
</script>
</head>
<body>

<!-- Header -->
<div id="header">
	<div class="shell">
		<!-- Logo + Top Nav -->
		<?php tcom_header_logo_nav($gc) ?>
		<!-- End Logo + Top Nav -->
		<!-- Main Nav -->
		<?php tcom_header_main_nav2($gc, 2) ?>
		<!-- End Main Nav -->
	</div>
</div>
<!-- End Header -->

<!-- Container -->
<div id="container">
	<div class="shell">

		<!-- Small Nav -->
		<div class="small-nav">
			<a href="tesuryo_l.php">手数料管理</a>
			<span>&gt;</span>
			手数料一覧
		</div>
		<!-- End Small Nav -->

		<!-- Main -->
		<div id="main">
			<div class="cl">&nbsp;</div>

			<!-- Content -->
			<div id="content">

				<!-- Box -->
				<div class="box">

					<!-- Form -->
					<div class="form">

						<form name="form_search" action="tesuryo_l.php" method="get" onsubmit="return false">
							<input name="mode" type="hidden" value="">
							<input name="mbif" type="hidden" value="">
							<input name="mbit" type="hidden" value="">

							<div class="box-size4 left">
								<p class="inline-field">
									<label style="display:inline;">集計期間:</label>
									<select id="mbif_y" class="field">
										<?php echo fsel_get_date_y($gc, $gc->mbif_y) ?>
									</select><span class="ml05">年</span>
									<select id="mbif_m" class="field">
										<?php echo fsel_get_date_m($gc, $gc->mbif_m) ?>
									</select><span class="ml05">月</span>
									<select id="mbif_d" class="field">
										<?php echo fsel_get_date_d($gc, $gc->mbif_d) ?>
									</select><span class="ml05">日</span>
									~
									<select id="mbit_y" class="field">
										<?php echo fsel_get_date_y($gc, $gc->mbit_y) ?>
									</select><span class="ml05">年</span>
									<select id="mbit_m" class="field">
										<?php echo fsel_get_date_m($gc, $gc->mbit_m) ?>
									</select><span class="ml05">月</span>
									<select id="mbit_d" class="field">
										<?php echo fsel_get_date_d($gc, $gc->mbit_d) ?>
									</select><span class="ml05">日</span>

									<label class="ml20" style="display:inline;">区分:</label>
									<input id="company_kbn_0" type="radio" name="company_kbn" value="0"<?php echo $gc->company_kbn_0_checked ?> />
									<label class="mr10" for="company_kbn_0" style="display:inline;font-weight: normal;">全て</label>
									<input id="company_kbn_1" type="radio" name="company_kbn" value="1"<?php echo $gc->company_kbn_1_checked ?> />
									<label class="mr10" for="company_kbn_1" style="display:inline;font-weight: normal;">大手</label>
									<input id="company_kbn_2" type="radio" name="company_kbn" value="2"<?php echo $gc->company_kbn_2_checked ?> />
									<label class="mr10" for="company_kbn_2" style="display:inline;font-weight: normal;">地場</label>

								</p>
							</div>

							<div class="box-size4 left">
								<p class="inline-field">
									<label style="display:inline;">提携会社:</label>
									<select name="company_no" class="field">
										<option value=""></option>
										<?php echo fsel_get_company($gc, $gc->company_no) ?>
									</select>

									<label class="ml05" style="display:inline;">支店名:</label>
									<input name="company_sh" type="text" class="field size2" value="<?php echo f_hsc($gc->company_sh)?>" />

									<label class="ml05" style="display:inline;">所在地:</label>
									<select name="todoufuken_no" class="field">
										<option value=""></option>
										<?php echo fsel_get_todoufuken($gc, $gc->todoufuken_no) ?>
									</select>

									<label class="ml15" style="display:inline;">
										<input type="checkbox" name="relocation_flg" id="relocation_flg" value="1"<?php echo $gc->relocation_flg_checked?>>
										<span style="color:#000;">リロケーション</span>
									</label>

									<button type="button" class="button color silver ml30" onclick="search_run();">検索</button>
								</p>
							</div>

							<div class="cl">&nbsp;</div>

						</form>

					</div>
					<!-- End Form -->

					<!-- Box Head -->
					<div class="box-head">
						<h2 class="left">抽出条件・手数料合計</h2>
						<div class="right">
							<div class="cl">&nbsp;</div>
						</div>
					</div>
					<!-- End Box Head -->

					<!-- Form -->
					<div class="form">

						<div class="box-size4 left">
							<p class="inline-field">
								<label style="display:inline;">集計期間:</label>
								<?php echo substr($gc->mbif, 0, 4) ?>年<?php echo substr($gc->mbif, 4, 2) ?>月<?php echo substr($gc->mbif, 6, 2) ?>日
								~
								<?php echo substr($gc->mbit, 0, 4) ?>年<?php echo substr($gc->mbit, 4, 2) ?>月<?php echo substr($gc->mbit, 6, 2) ?>日
								<label class="ml20" style="display:inline;">区分:</label>
								<?php echo f_hsc($gc->joken_company_kbn_nm) ?>
							</p>
						</div>
						<div class="box-size4 left">
							<p class="inline-field">
								<label style="display:inline;">提携会社:</label>
								<?php echo f_hsc($gc->joken_company_nm) ?>
								<label class="ml20" style="display:inline;">支店名:</label>
								<?php echo f_hsc($gc->joken_company_sh) ?>
								<label class="ml20" style="display:inline;">所在地:</label>
								<?php echo f_hsc($gc->joken_todoufuken_nm) ?>
								<label class="ml20" style="display:inline;">リロケーション:</label>
								<?php echo f_hsc($gc->joken_relocation_flg_nm) ?>
							</p>
						</div>

						<div style="float:right;">
							<label class="ml40" style="display:inline;">手数料合計:</label>
							<?php echo number_format($gc->sum_tesuryou) ?>円
						</div>

						<div class="cl">&nbsp;</div>

					</div>
					<!-- End Form -->

					<!-- Box Head -->
					<div class="box-head">
						<h2 class="left">手数料一覧</h2>
						<div class="right">
							<a href="tesuryo_csv.php?mode=1&mbif=<?php echo f_hsc($gc->mbif) ?>&mbit=<?php echo f_hsc($gc->mbit) ?>&todoufuken_no=<?php echo f_hsc($gc->todoufuken_no) ?>&company_no=<?php echo f_hsc($gc->company_no) ?>&company_kbn=<?php echo f_hsc($gc->company_kbn) ?>&relocation_flg=<?php echo f_hsc($gc->relocation_flg) ?>&company_sh=<?php echo urlencode($gc->company_sh) ?>" class="custom-button"><span>CSV出力</span></a>
						</div>
					</div>
					<!-- End Box Head -->

					<!-- Table -->
					<div class="table">

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								<?php echo $page_arr["cmes_str"].$page_arr["par1_str"].$page_arr["par2_str"]; ?>
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr style="border-top:solid 1px #e0e0e0;">

								<th width="200" class="ac"><a href="tesuryo_l.php<?php echo f_sq("ckn") ?>">提携会社名</a><?php echo $sort_mode["ckn"] ?></th>
								<th width="40" class="ac"><a href="tesuryo_l.php<?php echo f_sq("kbn") ?>">区分</a><?php echo $sort_mode["kbn"] ?></th>
								<th class="ac"><a href="tesuryo_l.php<?php echo f_sq("tod") ?>">所在地</a><?php echo $sort_mode["tod"] ?></th>
								<th width="44" class="ac"><a href="tesuryo_l.php<?php echo f_sq("crl") ?>">Lプラン</a><?php echo $sort_mode["crl"] ?><br />(件数)</th>
								<th width="44" class="ac"><a href="tesuryo_l.php<?php echo f_sq("crs") ?>">Sランク</a><?php echo $sort_mode["crs"] ?><br />(件数)</th>
								<th width="44" class="ac"><a href="tesuryo_l.php<?php echo f_sq("cra") ?>">Aランク</a><?php echo $sort_mode["cra"] ?><br />(件数)</th>
								<th width="44" class="ac"><a href="tesuryo_l.php<?php echo f_sq("crb") ?>">Bランク</a><?php echo $sort_mode["crb"] ?><br />(件数)</th>
								<th width="44" class="ac"><a href="tesuryo_l.php<?php echo f_sq("crc") ?>">Cランク</a><?php echo $sort_mode["crc"] ?><br />(件数)</th>
								<th width="70" class="ac"><a href="tesuryo_l.php<?php echo f_sq("tes") ?>">手数料</a><?php echo $sort_mode["tes"] ?></th>
								<th width="70" class="ac"><a href="tesuryo_l.php<?php echo f_sq("jog") ?>">上限</a><?php echo $sort_mode["jog"] ?></th>
								<th width="60" class="ac">詳細</th>
							</tr>

<?php

	$i = 0;

	while ($rs->eof==false) {

		$company_no = $rs->fields["company_no"];
		$company_nm = $rs->fields["company_nm"];
		$company_sh = $rs->fields["company_sh"];
		$company_kbn = $rs->fields["company_kbn"];
		$todoufuken_no = $rs->fields["todoufuken_no"];
		$add1 = $rs->fields["add1"];
		$rank_l = $rs->fields["sr_l"];
		$rank_no1 = $rs->fields["sr_1"];
		$rank_no2 = $rs->fields["sr_2"];
		$rank_no3 = $rs->fields["sr_3"];
		$rank_no4 = $rs->fields["sr_4"];
		$sum_tesuryou_l = $rs->fields["sum_tesuryou_l"];
		$sum_tesuryou_s = $rs->fields["sum_tesuryou_s"];
		$sum_tesuryou_a = $rs->fields["sum_tesuryou_a"];
		$sum_tesuryou_b = $rs->fields["sum_tesuryou_b"];
		$sum_tesuryou_c = $rs->fields["sum_tesuryou_c"];
		$jyougen = $rs->fields["jyougen"];

		$todoufuken_nm = $arr_todoufuken[$todoufuken_no];

		$company_kbn_nm = $arr_company_kbn[$company_kbn];


		$tesuryou =$rs->fields["s_t"];
//		$tesuryou =$sum_tesuryou_l + $sum_tesuryou_s + $sum_tesuryou_a + $sum_tesuryou_b + $sum_tesuryou_c;

		$odd = "";
		if(($i % 2)==1){
			$odd = " class=\"odd\"";
		}

		echo "<tr".$odd.">";
		echo "<td>".f_hsc($company_nm)."<br />".f_hsc($company_sh)."</td>";
		echo "<td class=\"ac\">".f_hsc($company_kbn_nm)."</td>";
		echo "<td>".f_hsc($todoufuken_nm.$add1)."</td>";
		echo "<td class=\"ac\">".f_hsc($rank_l)."</td>";
		echo "<td class=\"ac\">".f_hsc($rank_no1)."</td>";
		echo "<td class=\"ac\">".f_hsc($rank_no2)."</td>";
		echo "<td class=\"ac\">".f_hsc($rank_no3)."</td>";
		echo "<td class=\"ac\">".f_hsc($rank_no4)."</td>";
		echo "<td class=\"ar\">".f_hsc(number_format($tesuryou))."</td>";
		echo "<td class=\"ar\">".f_hsc(number_format($jyougen))."</td>";
		echo "<td class=\"ac\"><button type=\"button\" class=\"list-button\" onclick=\"location.href='tesuryo_d.php?company_no=".$company_no."&mbif=".$gc->mbif."&mbit=".$gc->mbit."';\">詳細</button></td>";
		echo "</tr>";

		$rs->move_next();

		$i++;

	}

	$rs->free_result();

	if($row_count==0){
		echo "<tr>";
		echo "<td colspan=\"10\" align=\"center\">データはありません。</td>";
		echo "</tr>";
	}

?>

						</table>

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								&nbsp;
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

					</div>
					<!-- Table -->

				</div>
				<!-- End Box -->
				<div class="cl">&nbsp;</div>

			</div>
			<!-- End Content -->
			<div class="cl">&nbsp;</div>

		</div>
		<!-- Main -->
	</div>
</div>
<!-- End Container -->

<!-- Footer -->
	<?php tcom_footer($gc) ?>
<!-- End Footer -->

</body>
</html>
<?php
}
Beispiel #5
0
function out_html($gc) {

	$gc->company_nm = $_GET["company_nm"];

	$sql = "SELECT SQL_CALC_FOUND_ROWS";
	$sql.= " u.user_no,";
	$sql.= " u.user_nm,";
	$sql.= " u.user_kn,";
	$sql.= " u.user_id,";
	$sql.= " u.e_mail,";
	$sql.= " u.last_login_time,";
	$sql.= " u.ltime,";
	$sql.= " u.auth,";
	$sql.= " c.company_no,";
	$sql.= " c.company_nm,";
	$sql.= " c.ddir ";
	$sql.= "FROM";
	$sql.= " m_company_user u ";
	$sql.= "LEFT JOIN";
	$sql.= " m_company c ";
	$sql.= "ON";
	$sql.= " u.company_no = c.company_no ";
	$sql.= "WHERE 0 = 0 ";
	if($gc->company_nm != ""){
		$sql.= "and c.company_nm like '%".$gc->company_nm."%' ";
	}

	$sql.= "ORDER BY";

	switch($_GET["si"]) {
	case "user_no":
		$sql.= " u.user_no".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
		break;
	case "user_nm":
		$sql.= " u.user_nm".(($_GET["sa"]=="desc") ? " DESC" : "").", user_no ";
		break;
	case "user_kn":
		$sql.= " u.user_kn".(($_GET["sa"]=="desc") ? " DESC" : "").", user_no ";
		break;
	case "user_id":
		$sql.= " u.user_id".(($_GET["sa"]=="desc") ? " DESC" : "").", user_no ";
		break;
	case "e_mail":
		$sql.= " u.e_mail".(($_GET["sa"]=="desc") ? " DESC" : "").", user_no ";
		break;
	case "last_login_time":
		$sql.= " u.last_login_time".(($_GET["sa"]=="desc") ? " DESC" : "").", user_no ";
		break;
	case "company_nm":
		$sql.= " c.company_nm".(($_GET["sa"]=="desc") ? " DESC" : "").", user_no ";
		break;
	case "auth":
		$sql.= " u.auth".(($_GET["sa"]=="desc") ? " DESC" : "").", auth ";
		break;
	case "ddir":
		$sql.= " c.ddir".(($_GET["sa"]=="desc") ? " DESC" : "").", ddir ";
		break;
	default:
		$sql.= " u.user_no desc ";
	}

	$sql.= f_get_limit($gc->pn, $gc->pl, C_ORDER_LIST_COL_CNT);

	$rs = $gc->db->query($sql);

	$row_count = $gc->db->get_row_count();

	//ページャーの設定
	if($row_count > 0){
		$page_arr = f_page_arr("c_user_l.php", $row_count, $gc->pl, C_ORDER_LIST_COL_CNT, C_ORDER_PAGE_TAG_CNT);
	}

	//ソート関連
	$sort_mode["user_no"] = "";
	$sort_mode["user_nm"] = "";
	$sort_mode["user_kn"] = "";
	$sort_mode["user_id"] = "";
	$sort_mode["e_mail"] = "";
	$sort_mode["company_nm"] = "";
	$sort_mode["last_login_time"] = "";
	$sort_mode["auth"] = "";
	$sort_mode["ddir"] = "";

	foreach ($sort_mode as $key => &$value) {
		if($key == $_GET["si"]){
			if($_GET["sa"] == "desc"){
				$value = " ▼";
			}else{
				$value = " ▲";
			}
		}
	}

?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>提携会社ユーザー一覧</title>
<!-- *** stylesheet *** -->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<!-- *** javascript *** -->
<script type="text/javascript" src="js/listpage.js" charset="utf-8"></script> 
<script language="JavaScript">
<!--
var submit_flg = false;
function run_submit(fname, mode) {
	document.forms[fname].mode.value = mode;
	if(submit_flg==false){
		//ボタン2度押し対応
		submit_flg = true;
		document.forms[fname].submit();
	}
}
function unload_page(){
	submit_flg = false;
}
window.onunload = unload_page;
// -->
</script>
</head>
<body>

<!-- Header -->
<div id="header">
	<div class="shell">
		<!-- Logo + Top Nav -->
		<?php tcom_header_logo_nav($gc) ?>
		<!-- End Logo + Top Nav -->
		<!-- Main Nav -->
		<?php tcom_header_main_nav($gc, 7) ?>
		<!-- End Main Nav -->
	</div>
</div>
<!-- End Header -->

<!-- Container -->
<div id="container">
	<div class="shell">
		<!-- Small Nav -->
		<div class="small-nav">
			<a href="c_user_l.php">提携会社ユーザー</a>
			<span>&gt;</span>
			提携会社ユーザー一覧
		</div>
		<!-- End Small Nav -->

		<!-- Main -->
		<div id="main">
			<div class="cl">&nbsp;</div>

			<!-- Content -->
			<div id="content">

				<!-- Box -->
				<div class="box">

					<!-- Box Head -->
					<div class="box-head">
						<h2 class="left"><b>提携会社ユーザー一覧</b></h2>
						<div class="right">
							<a href="c_user_e.php?mode=add" class="add-button"><span>新規追加</span></a>
						</div>
					</div>
					<!-- End Box Head -->

					<!-- Form -->
					<div class="form">

						<form name="form_search" action="c_user_l.php" method="get" onsubmit="return false">
							<input name="mode" type="hidden" value="">

							<div class="box-size2 left">
								<p class="inline-field">
									<label style="display:inline;">提携会社名:</label>
									<input name="company_nm" type="text" class="field size3" value="<?php echo f_hsc($gc->company_nm) ?>" />
									<button type="button" class="button color silver ml05" onclick="run_submit('form_search', 'search');">検索</button>
								</p>
							</div>

							<div class="cl">&nbsp;</div>

						</form>

					</div>
					<!-- End Form -->

					<!-- Table -->
					<div class="table">

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								<?php echo $page_arr["cmes_str"].$page_arr["par1_str"].$page_arr["par2_str"]; ?>
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr style="border-top:solid 1px #e0e0e0;">
								<th width="60" class="ac"><a href="c_user_l.php<?php echo f_sq("user_no") ?>">No.</a><?php echo $sort_mode["user_no"] ?></th>
								<th width="150"><a href="c_user_l.php<?php echo f_sq("company_nm") ?>">提携会社名</a><?php echo $sort_mode["company_nm"] ?></th>
								<th width="150"><a href="c_user_l.php<?php echo f_sq("ddir") ?>">固有ID</a><?php echo $sort_mode["ddir"] ?></th>
								<th width="150"><a href="c_user_l.php<?php echo f_sq("user_nm") ?>">ユーザー名</a><?php echo $sort_mode["user_nm"] ?></th>
								<th width="120" class="ac"><a href="c_user_l.php<?php echo f_sq("user_id") ?>">ログインID</a><?php echo $sort_mode["user_id"] ?></th>
								<th width="120" class="ac"><a href="c_user_l.php<?php echo f_sq("auth") ?>">管理者</a><?php echo $sort_mode["auth"] ?></th>
								<th width="120" class="ac"><a href="c_user_l.php<?php echo f_sq("last_login_time") ?>">最終ログイン日時</a><?php echo $sort_mode["last_login_time"] ?></th>
								<th width="70" class="ac">詳細</th>
							</tr>

<?php

	$i = 0;

	while ($rs->eof==false) {

		$company_nm = $rs->fields["company_nm"];
		$user_no = $rs->fields["user_no"];
		$user_nm = $rs->fields["user_nm"];
		$user_kn = $rs->fields["user_kn"];
		$user_id = $rs->fields["user_id"];
		$e_mail = $rs->fields["e_mail"];
		$last_login_time = $rs->fields["last_login_time"];
		$auth = $rs->fields["auth"];
		$ddir = $rs->fields["ddir"];

		if($last_login_time != ""){
			$last_login_time_d = substr($last_login_time, 0, 4)."/".substr($last_login_time, 5, 2)."/".substr($last_login_time, 8, 2);
			$last_login_time_t = substr($last_login_time, 11);
		}else{
			$last_login_time_d = "";
			$last_login_time_t = "";
		}

		$odd = "";
		if(($i % 2)==1){
			$odd = " class=\"odd\"";
		}

		echo "<tr".$odd.">";
		echo "<td class=\"ac\">".f_hsc($user_no)."</td>";
		echo "<td>".f_hsc($company_nm)."</td>";
		echo "<td>".f_hsc($ddir)."</td>";
		echo "<td>".f_hsc($user_nm)."</td>";
		echo "<td class=\"ac\">".f_hsc($user_id)."</td>";
		echo "<td class=\"ac\">".f_hsc($auth==1?"○":"")."</td>";
		echo "<td class=\"ac\">".f_hsc($last_login_time_d)."<br />".f_hsc($last_login_time_t)."</td>";
		echo "<td class=\"ac\"><button type=\"button\" class=\"list-button\" onclick=\"location.href='c_user_e.php?mode=edit&user_no=".$user_no."';\">詳細</button></td>";
		echo "</tr>";

		$rs->move_next();

		$i++;

	}

	$rs->free_result();

	if($row_count==0){
		echo "<tr>";
		echo "<td colspan=\"6\" align=\"center\">データはありません。</td>";
		echo "</tr>";
	}

?>
						</table>

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								&nbsp;
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

					</div>
					<!-- Table -->

				</div>
				<!-- End Box -->
				<div class="cl">&nbsp;</div>

			</div>
			<!-- End Content -->
			<div class="cl">&nbsp;</div>

		</div>
		<!-- Main -->
	</div>
</div>
<!-- End Container -->

<!-- Footer -->
	<?php tcom_footer($gc) ?>
<!-- End Footer -->

</body>
</html>
<?php
}
Beispiel #6
0
function out_html($gc) {

	$gc->arr_todoufuken = fsel_get_arr_todoufuken($gc);

	$gc->company_kbn = $_GET["company_kbn"];

	//ラジオボタン設定
	fdiv_set_company_kbn_radio($gc, $gc->company_kbn, "company_kbn");

	$sql = "SELECT SQL_CALC_FOUND_ROWS";
	$sql.= " company_no,";
	$sql.= " company_nm,";
	$sql.= " company_sh,";
	$sql.= " company_kbn,";
	$sql.= " todoufuken_no,";
	$sql.= " add1,";
	$sql.= " tel,";
	$sql.= " tantou,";

	$sql.= " keisai_flg,";

	$sql.= " ltime ";
	$sql.= "FROM";
	$sql.= " m_company ";
	$sql.= "WHERE 0 = 0 ";

	switch ($gc->company_kbn) {
	case 1://大手
		$sql.= "AND company_kbn = 1 ";

		break;
	case 2://地場
		$sql.= "AND company_kbn = 2 ";

		break;

	default:

	}

	$sql.= "ORDER BY";

	switch($_GET["si"]) {
	case "company_kn":
		$sql.= " company_kn".(($_GET["sa"]=="desc") ? " DESC" : "").", company_no ";
		break;
	case "company_kbn":
		$sql.= " company_kbn".(($_GET["sa"]=="desc") ? " DESC" : "").", company_no ";
		break;
	case "syozaichi":
		$sql.= " CONCAT( LPAD(COALESCE(todoufuken_no,'0'), 3, '0'), COALESCE(add1,''), COALESCE(add2,''))".(($_GET["sa"]=="desc") ? " DESC" : "").", company_no ";
		break;
	case "tantou":
		$sql.= " tantou".(($_GET["sa"]=="desc") ? " DESC" : "").", company_no ";
		break;
	case "tel":
		$sql.= " tel".(($_GET["sa"]=="desc") ? " DESC" : "").", company_no ";
		break;
	case "keisai_flg":
		$sql.= " keisai_flg".(($_GET["sa"]=="desc") ? " DESC" : "").", company_no ";
		break;
	default:
		$sql.= " company_no ";
	}

	$sql.= f_get_limit($gc->pn, $gc->pl, C_ORDER_LIST_COL_CNT);

	$rs = $gc->db->query($sql);

	$row_count = $gc->db->get_row_count();

	//ページャーの設定
	if($row_count > 0){
		$page_arr = f_page_arr("company_l.php", $row_count, $gc->pl, C_ORDER_LIST_COL_CNT, C_ORDER_PAGE_TAG_CNT);
	}

	//ソート関連
	$sort_mode["company_kn"] = "";
	$sort_mode["company_kbn"] = "";
	$sort_mode["syozaichi"] = "";
	$sort_mode["tantou"] = "";
	$sort_mode["tel"] = "";
	$sort_mode["keisai_flg"] = "";

	foreach ($sort_mode as $key => &$value) {
		if($key == $_GET["si"]){
			if($_GET["sa"] == "desc"){
				$value = " ▼";
			}else{
				$value = " ▲";
			}
		}
	}

	$arr_company_kbn = fdiv_set_company_kbn_array();

?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>提携会社一覧</title>
<!-- *** stylesheet *** -->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/custom/jquery-ui-1.9.2.custom.css" rel="stylesheet">
<!-- *** javascript *** -->
<script type="text/javascript" src="js/listpage.js" charset="utf-8"></script>
<script src="js/jquery-1.8.3.js"></script>
<script src="js/jquery-ui-1.9.2.custom.min.js"></script>
<script language="JavaScript">
<!--
var submit_flg = false;
function run_submit(fname, mode) {
	document.forms[fname].mode.value = mode;
	if(submit_flg==false){
		//ボタン2度押し対応
		submit_flg = true;
		document.forms[fname].submit();
	}
}
function unload_page(){
	submit_flg = false;
}
window.onunload = unload_page;
$(function() {
	$("input").focus( function () { this.blur(); } );
	$('input[name="company_kbn"]:radio').change( function() {
		run_submit("form_search", "search");
	});
});
// -->
</script>
</head>
<body>

<!-- Header -->
<div id="header">
	<div class="shell">
		<!-- Logo + Top Nav -->
		<?php tcom_header_logo_nav($gc) ?>
		<!-- End Logo + Top Nav -->
		<!-- Main Nav -->
		<?php tcom_header_main_nav($gc, 2) ?>
		<!-- End Main Nav -->
	</div>
</div>
<!-- End Header -->

<!-- Container -->
<div id="container">
	<div class="shell">

		<!-- Small Nav -->
		<div class="small-nav">
			<a href="company_l.php">提携会社管理</a>
			<span>&gt;</span>
			提携会社一覧
		</div>
		<!-- End Small Nav -->

		<!-- Main -->
		<div id="main">
			<div class="cl">&nbsp;</div>

			<!-- Content -->
			<div id="content">

				<!-- Box -->
				<div class="box">

					<!-- Form -->
<!--					<div class="form">

						<form name="form_search" action="company_l.php" method="get" onsubmit="return false">
							<input name="mode" type="hidden" value="">

							<div class="box-size2 left">
								<p class="inline-field">
									<label style="display:inline;">表示形式:</label>
									<input id="company_kbn_0" type="radio" name="company_kbn" value="0"<?php //echo $gc->company_kbn_0_checked ?> />
									<label class="mr10" for="company_kbn_0" style="display:inline;font-weight: normal;">全て</label>
									<input id="company_kbn_1" type="radio" name="company_kbn" value="1"<?php //echo $gc->company_kbn_1_checked ?> />
									<label class="mr10" for="company_kbn_1" style="display:inline;font-weight: normal;">大手のみ</label>
									<input id="company_kbn_2" type="radio" name="company_kbn" value="2"<?php //echo $gc->company_kbn_2_checked ?> />
									<label class="mr10" for="company_kbn_2" style="display:inline;font-weight: normal;">地場のみ</label>
								</p>
							</div>

							<div class="cl">&nbsp;</div>

						</form>

					</div>  -->
					<!-- End Form -->

					<!-- Box Head -->
					<div class="box-head">

						<div class="left">
						<h2 class="left"><b>提携会社一覧</b></h2>
							<div class="cl">&nbsp;</div>
						</div>

						<div class="right">
							<a href="company_area_csv.php" class="custom-button" style="margin-right:10px;"><span>エリア金額一括エクスポート</span></a>
							<a href="company_area_insert.php" class="custom-button" style="margin-right:50px;"><span>エリア金額一括インポート</span></a>
							<a href="company_e.php?mode=add" class="add-button"><span>新規追加</span></a>
							<div class="cl">&nbsp;</div>
						</div>
					</div>


					<!-- End Box Head -->

					<!-- Table -->
					<div class="table">

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								<?php echo $page_arr["cmes_str"].$page_arr["par1_str"].$page_arr["par2_str"]; ?>
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr style="border-top:solid 1px #e0e0e0;">
								<th><a href="company_l.php<?php echo f_sq("company_kn") ?>">企業名</a><?php echo $sort_mode["company_kn"] ?></th>
								<!--  <th width="40" class="ac"><a href="company_l.php<?php //echo f_sq("company_kbn") ?>">区分</a><?php //echo $sort_mode["company_kbn"] ?></th>-->
								<th width="150"><a href="company_l.php<?php echo f_sq("syozaichi") ?>">所在地</a><?php echo $sort_mode["syozaichi"] ?></th>
								<th width="120" class="ac"><a href="company_l.php<?php echo f_sq("tantou") ?>">担当者名</a><?php echo $sort_mode["tantou"] ?></th>
								<th width="120" class="ac"><a href="company_l.php<?php echo f_sq("tel") ?>">電話番号</a><?php echo $sort_mode["tel"] ?></th>
								<th width="40" class="ac"><a href="company_l.php<?php echo f_sq("keisai_flg") ?>">掲載</a><?php echo $sort_mode["keisai_flg"] ?></th>
								<th width="70" class="ac">詳細</th>
							</tr>

<?php

	$i = 0;

	while ($rs->eof==false) {

		$company_no = $rs->fields["company_no"];
		$company_nm = $rs->fields["company_nm"];
		$company_sh = $rs->fields["company_sh"];
		$company_kbn = $rs->fields["company_kbn"];
		$todoufuken_no = $rs->fields["todoufuken_no"];
		$add1 = $rs->fields["add1"];
		$tel = $rs->fields["tel"];
		$tantou = $rs->fields["tantou"];
		$keisai_flg = $rs->fields["keisai_flg"];

		$todoufuken_nm = $gc->arr_todoufuken[$todoufuken_no];

		$company_kbn_nm = $arr_company_kbn[$company_kbn];

		$odd = "";
		if(($i % 2)==1){
			$odd = " class=\"odd\"";
		}

		echo "<tr".$odd.">";
		echo "<td>".f_hsc($company_nm." ".$company_sh)."</td>";
		//echo "<td class=\"ac\">".f_hsc($company_kbn_nm)."</td>";
		echo "<td>".f_hsc($todoufuken_nm.$add1)."</td>";
		echo "<td class=\"ac\">".f_hsc($tantou)."</td>";
		echo "<td class=\"ac\">".f_hsc($tel)."</td>";
		echo "<td class=\"ac\">".f_hsc( ($keisai_flg==1?"○":"×") )."</td>";
		echo "<td class=\"ac\"><button type=\"button\" class=\"list-button\" onclick=\"location.href='company_r.php?company_no=".$company_no."';\">詳細</button></td>";
		echo "</tr>";

		$rs->move_next();

		$i++;

	}

	$rs->free_result();

	if($row_count==0){
		echo "<tr>";
		echo "<td colspan=\"7\" align=\"center\">データはありません。</td>";
		echo "</tr>";
	}

?>
						</table>

<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								&nbsp;
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

					</div>
					<!-- Table -->

				</div>
				<!-- End Box -->
				<div class="cl">&nbsp;</div>

			</div>
			<!-- End Content -->
			<div class="cl">&nbsp;</div>

		</div>
		<!-- Main -->
	</div>
</div>
<!-- End Container -->

<!-- Footer -->
	<?php tcom_footer($gc) ?>
<!-- End Footer -->

</body>
</html>
<?php
}
Beispiel #7
0
function out_html($gc)
{
    $opt_todoufuken = get_todoufuken($gc);
    $gc->keyword = $_GET["keyword"];
    $gc->todoufuken = $_GET["todoufuken"];
    $gc->shikucyouson = $_GET["shikucyouson"];
    $gc->town = $_GET["town"];
    $sql = " SELECT SQL_CALC_FOUND_ROWS";
    $sql .= " property_no";
    $sql .= " , property_nm";
    $sql .= " , todoufuken_no";
    $sql .= " , todoufuken_nm";
    $sql .= " , shikucyouson_no";
    $sql .= " , shikucyouson_nm";
    $sql .= " , town_nm";
    $sql .= " , address";
    $sql .= " FROM";
    $sql .= " propertylist ";
    $sql .= " WHERE 0=0 ";
    switch ($gc->mode) {
        case "keyword":
            if ($_GET["keyword"] != "") {
                $sql .= " AND property_nm like '%" . $_GET["keyword"] . "%'";
            }
            break;
        case "area":
            if ($_GET["todoufuken"] > 0) {
                $sql .= " AND todoufuken_no = " . $_GET["todoufuken"];
            }
            if ($_GET["shikucyouson"] > 0) {
                $sql .= " AND shikucyouson_no = " . $_GET["shikucyouson"];
            }
            if ($_GET["town"] != "") {
                $sql .= " AND town_nm = '" . $_GET["town"] . "' ";
            }
            break;
        default:
            $sql .= " AND 1=0 ";
            break;
    }
    $sql .= " ORDER BY";
    $sql .= " todoufuken_no, shikucyouson_no, property_no ";
    $sqls .= $sql . f_get_limit($gc->pn, $gc->pl, C_ORDER_LIST_COL_CNT);
    $rs = $gc->db->query($sqls);
    $row_count = $gc->db->get_row_count();
    $gc->cnt = 0;
    $gc->cnt = $row_count;
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>分譲マンションを貸す、高く貸したい|マンション貸す.comで賃料相場を調べる</title>
<meta name="keywords" content="分譲マンション,貸す,貸したい,賃貸に出す,賃料相場">
<meta name="description" content="全国の分譲マンションの過去の取引データをもとに賃料相場を算出。相場を調べて分譲マンションを高く貸す、高く貸したい。賢く安全に賃貸に出すならマンション貸す.comをご利用ください。優良不動産会社に無料で一括賃料査定が申し込めます。空室対策の入居者募集から賃貸管理、転勤・留守宅管理(リロケーション)、空室保証・家賃保証(サブリース)まで幅広く対応しております。">
<link rel="stylesheet" type="text/css" href="css/reset.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/jquery-1.9.1.js"></script>
<script src="js/top.js"></script>
<script type="text/javascript" src="admin/js/listpage.js" charset="utf-8"></script>
<link rel="shortcut icon" href="favicon.ico" />

<script type="text/javascript">

var submit_flg = false;
function run_submit(mode) {
	document.forms['formsearch'].mode.value = mode;
	if(submit_flg==false){
		//ボタン2度押し対応
		submit_flg = true;
		document.forms['formsearch'].submit();
	}
}
function unload_page(){
	submit_flg = false;
}
window.onunload = unload_page;

$(function() {

	$('#todoufuken').change( function () {
		todoufuken_change($('#todoufuken').val());
		shikucyouson_change(0);
	} );
	$('#shikucyouson').change( function () {
		shikucyouson_change($('#shikucyouson').val());
	} );

});

function todoufuken_change(id){

	var date = new Date();
	var timestamp = date.getTime();

	var query = "time=" + timestamp;
	query += "&mode=get_shikucyouson";
	query += "&todoufuken_no=" + id;

	$.ajax({
		type: "POST",
		url: "ajx_area_search.php",
		dataType: "text",
		data: query,
		cache: false,
		async: false,
		complete: function(XMLHttpRequest, textStatus){
			if(textStatus=="success"){
				$('#shikucyouson').html(XMLHttpRequest.responseText);
			}else{
				alert("通信エラーが発生しました。");
			}
		}
	});

}

function shikucyouson_change(id){

	var date = new Date();
	var timestamp = date.getTime();

	var query = "time=" + timestamp;
	query += "&mode=get_town";
	query += "&shikucyouson_no=" + id;

	$.ajax({
		type: "POST",
		url: "ajx_area_search.php",
		dataType: "text",
		data: query,
		cache: false,
		async: false,
		complete: function(XMLHttpRequest, textStatus){
			if(textStatus=="success"){
				$('#town').html(XMLHttpRequest.responseText);
			}else{
				alert("通信エラーが発生しました。");
			}
		}
	});

}

function anka(){
	 obj = document.getElementById("result");
	   y = obj.offsetTop;
	   scrollTo(0,y);
	}
</script>
</head>
<body <?php 
    if ($_GET["mode"] != "") {
        echo "onload=\"anka();\"";
    }
    ?>
>

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/ja_JP/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

	<div id="header">
		<?php 
    include "_header.php";
    ?>
	</div>
		<div class="clearfix"></div>
	<div class="nav">
		<div class="inner">
			<ul>
				<li>
					<a href="./index.php">トップ</a>|
				</li>

				<li>
					<a href="./relocation.php">リロケーションについて</a>|
				</li>

				<li>
					<a href="./sublease.php">サブリースについて</a>|
				</li>

				<li>
					<a href="./case_study.php">ケーススタディ</a>|
				</li>

				<li>
					<a href="./faq.php">よくある質問</a>|
				</li>

				<li>
					<a href="./post_company.php">提携企業一覧</a>|
				</li>

				<li>
					<a href="./ads.php">広告掲載について</a>
				</li>
			</ul>
		</div>
		<div class="clearfix"></div>
	</div>

	<div class="main">
		<div class="pan"><a href="index.php">トップ</a> &gt; マンション相場検索</div>
<!--
		<p class="pan" align="center">空室対策でお悩みの方、転勤・留守宅管理(リロケーション)、空室保障(サブリース)をご検討中の方、住み替えや相続、賃貸管理など様々な理由で、<br />
マンションを貸し出したい方へ、「早く貸したい。高く貸したい。」あらゆるニーズに対応可能な優良不動産会社をご紹介します。</p>
-->

		<div id="form"></div>
		<div class="left search">
				<h1><img src="img/title_search.jpg" alt="マンション相場検索"></h1>
				<img src="img/header02.jpg" alt="あなたのマンションの気になる賃料相場は?相場を調べて賢く高く貸す!">
				<p class="htx">すこしでも高く貸したい方、安心して貸したい方、<br />査定額が不安な方へ、相場を調べて納得安心の賃貸経営。</p>
				<form id="formsearch" name="formsearch" action="search.php" method="get" onsubmit="return false">
					<input name="mode" type="hidden" value="">
					<h2 style="margin-top:-15px;"><img src="img/sb01.jpg" alt="マンション名から探す"></h2>
					<table class="searcht">
						<tr>
							<td><input type="text" name="keyword" value="<?php 
    echo f_hsc($gc->keyword);
    ?>
" style="color: #808080;" class="text size1"></td>
							<td class="btn">
								<input type="image" src="img/btn01.jpg"  onclick="run_submit('keyword');" alt="検索する">
							</td>
						</tr>

					</table>

					<h2><img src="img/sb02.jpg" alt="住所から探す"></h2>
					<table class="searcht">
						<tr>
							<td>
								<select id="todoufuken" name="todoufuken" class="dropdown size2">
									<?php 
    if ($gc->todoufuken < 1) {
        echo $opt_todoufuken;
    } else {
        echo fsel_get_todoufuken($gc, $gc->todoufuken);
    }
    ?>
								</select>
							</td>
							<td class="pl20">
								<select id="shikucyouson" name="shikucyouson" class="dropdown size2">
									<?php 
    if ($gc->todoufuken < 1) {
        echo "<option value=\"0\">市・区を選択</option>";
    } else {
        echo fsel_get_shikucyouson($gc, $gc->todoufuken, $gc->shikucyouson);
    }
    ?>
								</select>

							</td>

							<td class="pl20">
								<select id="town" name="town" class="dropdown size2">
									<?php 
    if ($gc->shikucyouson < 1) {
        echo "<option value=\"0\">町名を選択</option>";
    } else {
        echo fsel_get_town($gc, $gc->shikucyouson, $gc->town);
    }
    ?>
								</select>
							</td>
							<td class="btn">
								<input type="image" src="img/btn01.jpg"  onclick="run_submit('area');" alt="検索する">
							</td>
						</tr>

					</table>
				</form>

			<div class="data" id="result">
				<h2 style="margin-top:-30px;"><img src="img/sb03.jpg" alt="検索結果"></h2>
				<strong><font size="3em"><?php 
    echo f_hsc("【" . $gc->cnt . "件該当しました】");
    ?>
</font></strong>
				<table>
					<tr class="even">
						<th>マンション名</th>
						<th>マンション所在地</th>
						<th class="last">詳細</th>
					</tr>

					<?php 
    $i = 0;
    while ($rs->eof == false) {
        $property_no = $rs->fields["property_no"];
        $property_nm = $rs->fields["property_nm"];
        $todoufuken_nm = $rs->fields["todoufuken_nm"];
        $shikucyouson_nm = $rs->fields["shikucyouson_nm"];
        $town_nm = $rs->fields["town_nm"];
        $address = $rs->fields["address"];
        $odd = "";
        if ($i % 2 == 1) {
            $odd = " class=\"even\"";
        }
        echo "<tr" . $odd . ">";
        echo "<td class=\"al\"><a href=\"./" . $property_no . "/detail.php\">" . f_hsc($property_nm) . "</a></td>";
        echo "<td class=\"al\">" . f_hsc($todoufuken_nm . $shikucyouson_nm . $town_nm . $address) . "</td>";
        echo "<td class=\"last\"><a href=\"./" . $property_no . "/detail.php\"><img src=\"img/btn02.jpg\" alt=\"詳細をみる\"></a></td>";
        echo "</tr>";
        $rs->move_next();
        $i++;
    }
    $rs->free_result();
    ?>
				</table>
					<!-- Pagging -->
						<div style="text-align:right;">
				<?php 
    if ($row_count > 0) {
        $page_arr = f_page_web("search.php", $row_count, $gc->pl, C_ORDER_LIST_COL_CNT, C_ORDER_PAGE_TAG_CNT);
        if ($page_arr["page_cnt"] > 1) {
            echo $page_arr["back_str"] . $page_arr["page_str"] . $page_arr["next_str"];
        }
    }
    ?>
						</div>
						<!-- End Pagging -->
			</div>
		</div>
		<?php 
    include "_side.php";
    ?>
		<div class="clearfix"></div>

	</div>

	<?php 
    include "_footer.php";
    ?>

    <script type="text/javascript" language="javascript"> var yahoo_retargeting_id = '880R3QJO8N'; var yahoo_retargeting_label = ''; </script> <script type="text/javascript" language="javascript" src="//b92.yahoo.co.jp/js/s_retargeting.js"></script>


<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 981619677;
var google_custom_params = window.google_tag_params; var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/981619677/?value=0&amp;guid=ON&amp;script=0"/>
</div>
</noscript>


</body>
</html>
<?php 
}
function out_html($gc) {

	$gc->keyword = $_GET["keyword"];

	//ソート関連
	$sort_mode["cmt"] = "";

	foreach ($sort_mode as $key => &$value) {
		if($key == $_GET["si"]){
			if($_GET["sa"] == "desc"){
				$value = " ▼";
			}else{
				$value = " ▲";
			}
		}
	}

	$sql = "SELECT";
	$sql.=" t.todoufuken_no";
	$sql.=" , t.todoufuken_nm";
	$sql.=" , s.shikucyouson_nm";
	$sql.=" FROM";
	$sql.=" m_todoufuken t ";
	$sql.=" LEFT JOIN";
	$sql.=" m_shikucyouson s";
	$sql.=" ON s.todoufuken_no = t.todoufuken_no";
	$sql.= " WHERE s.shikucyouson_no = ".$gc->shikucyouson_no;

	$rs = $gc->db->query($sql);

	if(!$rs->eof){

		$todoufuken_nm = $rs->fields["todoufuken_nm"];
		$shikucyouson_nm = $rs->fields["shikucyouson_nm"];
		$todoufuken_no = $rs->fields["todoufuken_no"];
	}

	$rs->free_result();

	$sql =" SELECT SQL_CALC_FOUND_ROWS";
	$sql.=" l.property_no";
	$sql.=" , l.property_nm";
	$sql.=" , l.todoufuken_no";
	$sql.=" , l.todoufuken_nm";
	$sql.=" , l.shikucyouson_no";
	$sql.=" , l.shikucyouson_nm";
	$sql.=" , l.town_nm";
	$sql.=" , l.address";
	$sql.=" , (case when CHAR_LENGTH(l.comment)>0 then 1 else 0 end) as comment";
	$sql.=" , l.direction";
	$sql.=" , l.pitch";
	$sql.=" , d.rent";
	$sql.=" , d.unit_price";
	$sql.=" FROM";
	$sql.=" propertylist l";
	$sql.=" LEFT JOIN";
	$sql.=" (SELECT";
	$sql.=" property_no";
	$sql.=" , avg(rent) as rent";
	$sql.=" , avg(unit_price) as unit_price";
	$sql.=" FROM";
	$sql.=" propertydetail ";
	$sql.=" GROUP BY property_no";
	$sql.=" ) d";
	$sql.=" ON d.property_no = l.property_no";
	$sql.=" LEFT JOIN ";
	$sql.=" m_shikucyouson s";
	$sql.=" On s.shikucyouson_no = l.shikucyouson_no";
	$sql.=" WHERE";
	$sql.=" l.shikucyouson_no = ".$gc->shikucyouson_no;
	if($gc->keyword != ""){
		$sql.=" AND (s.shikucyouson_nm like '%".$gc->keyword."%' ";
		$sql.=" OR l.property_nm like '%".$gc->keyword."%') ";
	}

	$sql.=" ORDER BY";
	switch($_GET["si"]) {
		case "cmt":
			$sql.= " l.comment".(($_GET["sa"]=="desc") ? " DESC" : "")." ";
			break;
		default:
			$sql.= " l.property_no DESC ";
	}

	$sql.= f_get_limit($gc->pn, $gc->pl, C_ORDER_LIST_COL_CNT);

	$rsp = $gc->db->query($sql);
	$row_count = $gc->db->get_row_count();
	//ページャーの設定
	if($row_count > 0){
		$page_arr = f_page_arr("buken_list.php", $row_count, $gc->pl, C_ORDER_LIST_COL_CNT, C_ORDER_PAGE_TAG_CNT);
	}

?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>簡易査定一覧</title>
<!-- *** stylesheet *** -->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/custom/jquery-ui-1.9.2.custom.css" rel="stylesheet">
<!-- *** javascript *** -->
<script type="text/javascript" src="js/listpage.js" charset="utf-8"></script>
<script src="js/jquery-1.8.3.js"></script>
<script src="js/jquery-ui-1.9.2.custom.min.js"></script>
<script language="JavaScript">

$(function(){

	// メッセージDialog
	$('#dialog_message').dialog({
		autoOpen: false,
		resizable: false,
		modal: true,
		width: 350,
		height: 150,
		buttons: {
			"OK": function() {
				run_submit('form_del', 'del')
			},
			"キャンセル": function() {
				$(this).dialog("close");
			}
		}
	});


});

var submit_flg = false;
function run_submit(fname, mode) {
	document.forms[fname].mode.value = mode;
	if(submit_flg==false){
		//ボタン2度押し対応
		submit_flg = true;
		document.forms[fname].submit();
	}
}
function unload_page(){
	submit_flg = false;
}
window.onunload = unload_page;

function Boxcheck(){

	var flg = false;
	if($("#allchk:checked").val()){
		flg = true;
	}

	   form = document.form_del;
	   cnt =  form.elements.length;

	   for (i = 0; i < cnt; i++) {
	   if(form.elements[i].name == 'id[]') {
		   form.elements[i].checked = flg;

	   }

	 }
}

function delmsg(){

	$('#dlg_msg_str').text( "選択行を削除しでもよろしいですか?" );
	$('#dialog_message').dialog('open');
}

</script>
</head>
<body>

<!-- Header -->
<div id="header">
	<div class="shell">
		<!-- Logo + Top Nav -->
		<?php tcom_header_logo_nav($gc) ?>
		<!-- End Logo + Top Nav -->
		<!-- Main Nav -->
		<?php tcom_header_main_nav($gc, 6) ?>
		<!-- End Main Nav -->
	</div>
</div>
<!-- End Header -->

<!-- Container -->
<div id="container">
	<div class="shell">

		<!-- Small Nav -->
		<div class="small-nav">
		<a href="#">簡易査定</a>
		<span>&gt;</span>
			<a href="./buken_area_list.php">登録エリア一覧</a>
		<span>&gt;</span>
			<?php echo f_hsc($todoufuken_nm." ".$shikucyouson_nm)?>
		</div>
		<!-- End Small Nav -->

		<!-- Main -->
		<div id="main">
			<div class="cl">&nbsp;</div>

			<!-- Content -->
			<div id="content">
			<?php
			if($gc->form_mode=="message"){
			?>

				<!-- Message OK -->
				<div class="msg msg-ok">
					<p><strong>&nbsp;<?php echo f_hsc($gc->message) ?></strong></p>
				</div>
				<!-- End Message OK -->

		<?php }?>
				<!-- Box -->
				<div class="box">

				<!-- Form -->
					<div class="form">

						<form name="form_search" action="buken_list.php" method="get" onsubmit="return false">
							<input name="mode" type="hidden" value="">
							<input name="shikucyouson_no" type="hidden" value="<?php echo f_hsc($gc->shikucyouson_no) ?>">
							<div class="box-size2 left">
								<p class="inline-field">
									<label style="display:inline;">マンション名:</label>
									<input name="keyword" type="text" class="field size3" value="<?php echo f_hsc($gc->keyword) ?>" />
									<button type="button" class="button color silver ml05" onclick="run_submit('form_search', 'search');">検索</button>
								</p>
							</div>

							<div class="cl">&nbsp;</div>

						</form>

					</div>
					<!-- End Form -->

					<!-- Box Head -->
					<div class="box-head">
						<div class="left">
						<h2 class="left"><?php echo f_hsc($todoufuken_nm." ".$shikucyouson_nm)?></h2>
							<div class="cl">&nbsp;</div>
						</div>
						<div class="right">
							<a href="buken_csv.php?shikucyouson_no=<?php echo $gc->shikucyouson_no?>" class="custom-button" style="margin-right:10px;"><span>CSV出力</span></a>
							<div class="cl">&nbsp;</div>
						</div>
					</div>
					<!-- End Box Head -->
						<!-- Accordion -->
						<div class="table">
			<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								<?php echo $page_arr["cmes_str"].$page_arr["par1_str"].$page_arr["par2_str"]; ?>
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>
						<form name="form_del" method="GET" action="buken_list.php" onSubmit="return false">
							<input name="mode" type="hidden" value="">
							<input name="shikucyouson_no" type="hidden" value="<?php echo f_hsc($gc->shikucyouson_no) ?>">
							<input name="keyword" type="hidden" value="<?php echo f_hsc($gc->keyword) ?>" />
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<th width="10" class="ac"><input type="checkbox" name="allchk" id="allchk" onclick="Boxcheck();"></th>
									<th width="120" class="al">マンション名</th>
									<th width=60 class="al">市区町村</th>
									<th width="100" class="al">住所</th>
									<th width="90" class="ac">賃料相場</th>
									<th width="90" class="ac">㎡単価</th>
									<th width="20" class="ac">方角</th>
									<th width="50" class="ac"><a href="buken_list.php<?php echo f_sq("cmt") ?>">コメント</a><?php echo $sort_mode["cmt"] ?></th>
									<th width="45" class="ac">詳細</th>
									<th width="65" class="ac">プレビュー</th>
								</tr>

			<?php

				$i = 0;

			while ($rsp->eof==false) {

				$property_no = $rsp->fields["property_no"];
				$property_nm = $rsp->fields["property_nm"];
				$todoufuken_nm = $rsp->fields["todoufuken_nm"];
				$shikucyouson_nm = $rsp->fields["shikucyouson_nm"];
				$town_nm = $rsp->fields["town_nm"];
				$address= $rsp->fields["address"];
				$direction = $rsp->fields["direction"];
				$pitch = $rsp->fields["pitch"];
				$management_company = $rsp->fields["management_company"];
				$rent = $rsp->fields["rent"];
				$rent = sprintf('%.1f',round($rent*0.9/10000,1))."万~".sprintf('%.1f',round($rent*1.1/10000,1))."万";
				$unit_price = $rsp->fields["unit_price"];
				$unit_price = number_format(round($unit_price*0.9))."~".number_format(round($unit_price*1.1));
				$odd = "";

				$comment = "-";
				if($rsp->fields["comment"] == 1){
					$comment = "○";
				}

				$hokaku = "-";
				if($direction != "0" || $pitch != "0"){
					$hokaku = "済";
				}
				if(($i % 2)==1){
					$odd = " class=\"odd\"";
				}
				echo "<tr".$odd.">";
				echo "<td class=\"ac\"><input type=\"checkbox\" name=\"id[]\" value=\"".$property_no."\"></td>";
				echo "<td class=\"al\">".f_hsc($property_nm)."</td>";
				echo "<td class=\"al\">".f_hsc($shikucyouson_nm)."</td>";
				echo "<td class=\"al\">".f_hsc($town_nm.$address)."</td>";
				echo "<td class=\"ac\">".f_hsc($rent)."</td>";
				echo "<td class=\"ac\">".$unit_price."</td>";
				echo "<td class=\"ac\">".$hokaku."</td>";
				echo "<td class=\"ac\">".$comment."</td>";
				echo "<td class=\"ac\"><button type=\"button\" class=\"button\" onclick=\"location.href='bukendetail.php?mode=edit&property_no=".$property_no."';\">編集</button></td>";
				echo "<td class=\"ac\"><button type=\"button\" class=\"button\" onclick=\"window.open('../".$property_no."/detail.php');\">プレビュー</button></td>";
				echo "</tr>";
				$rsp->move_next();

				$i++;

			}

			$rsp->free_result();
			if($row_count==0){
				echo "<tr>";
				echo "<td colspan=\"10\" align=\"center\">データはありません。</td>";
				echo "</tr>";
			}
			?>
			</table>
</form>
			<?php if($row_count > 0){ ?>
						<!-- Pagging -->
						<div class="pagging">
							<div class="box-l">
								<button type="button" class="button color red" onclick="delmsg();">選択行を削除</button>
							</div>
							<div class="box-c">
								<div class="margin-center">
									<?php echo $page_arr["back_str"].$page_arr["list_str"].$page_arr["deno_str"].$page_arr["next_str"]; ?>
								</div>
							</div>
							<div class="box-r">
								<label>表示件数:</label>
								<?php echo $page_arr["plst_str"] ?>
							</div>
						</div>
						<!-- End Pagging -->
<?php } ?>

					</div>
					<!-- Accordion -->
				</div>
				<!-- End Box -->

				<div class="cl">&nbsp;</div>
			</div>
			<!-- End Content -->
			<div class="cl">&nbsp;</div>
		</div>
		<!-- Main -->

	</div>
</div>
<!-- End Container -->

<!-- Footer -->
	<?php tcom_footer($gc) ?>
<!-- End Footer -->

	<div id="dialog_message" title="メッセージ">
		<p id="dlg_msg_str" class="mt10 ml10"></p>
	</div>

</body>
</html>
<?php
}