Exemplo n.º 1
0
function out_html($gc) {

	if($gc->form_mode == "confirm"){
		if($gc->act == "i"){
			$gc->mode_title = "[追加・確認]";
		}else{
			$gc->mode_title = "[編集・確認]";
		}
	}elseif($gc->form_mode == "message"){
		$gc->mode_title = "[完了]";
	}else{
		if($gc->act == "i"){
			$gc->mode_title = "[追加]";
		}else{
			$gc->mode_title = "[編集]";
		}
	}
	//表示方法
	fdiv_set_display_radio($gc, $gc->display_flg, "display_flg");

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

	//チェックボックス設定
	fdiv_set_checkbox($gc, "賃貸仲介", ($gc->chintai_flg=="1"), "chintai_flg");
	fdiv_set_checkbox($gc, "サブリース", ($gc->sublease_flg=="1"), "sublease_flg");
	fdiv_set_checkbox($gc, "リロケーション", ($gc->relocation_flg=="1"), "relocation_flg");
	fdiv_set_checkbox($gc, "掲載する", ($gc->keisai_flg=="1"), "keisai_flg");
	fdiv_set_checkbox($gc, "企業ロゴをTOP画面に表示しない", ($gc->keisai_logo_flg=="1"), "keisai_logo_flg");
	fdiv_set_checkbox($gc, "掲載会社一覧に表示しない", ($gc->keisai_comment_flg=="1"), "keisai_comment_flg");
	fdiv_set_checkbox($gc, "分譲マンション", ($gc->buken_mansion_flg=="1"), "buken_mansion_flg");
	fdiv_set_checkbox($gc, "一戸建て", ($gc->buken_kodate_flg=="1"), "buken_kodate_flg");
	fdiv_set_checkbox($gc, "一棟アパート・マンション", ($gc->buken_ittou_flg=="1"), "buken_ittou_flg");
	fdiv_set_checkbox($gc, "", ($gc->light_flg=="1"), "light_flg");

	//郵便番号
	$gc->zip = $gc->zip1."-".$gc->zip2;
	if (!preg_match("/^\d{3}\-\d{4}$/", $gc->zip)) {
		$gc->zip = "";
	}

	//郵便番号
	$gc->sk_zip = $gc->sk_zip1."-".$gc->sk_zip2;
	if (!preg_match("/^\d{3}\-\d{4}$/", $gc->sk_zip)) {
		$gc->sk_zip = "";
	}

	//ロゴ画像
	if (strlen($gc->img_nm.$gc->img_tmp_nm) > 0) {
		$gc->img_show = true;
	}else{
		$gc->img_show = false;
	}

	if (strlen($gc->img_tmp_nm) > 0) {
		$gc->img_src = fimg_img_src_ssl($gc->img_tmp_nm, "tmp");
	}else{
		$gc->img_src = fimg_img_src_ssl($gc->img_nm, "logo");
	}

	if($gc->img_del=="y"){
		$gc->img_del_checked = " checked";
	}

?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>基本情報<?php echo f_hsc($gc->mode_title)?></title>
<!-- *** stylesheet *** -->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<script src="../js/jquery-1.9.1.js"></script>
<script src="../js/jquery-ui-1.10.3.custom.min.js"></script>
<!-- *** javascript *** -->
<script language="JavaScript">
<!--
$(function() {

	if($('#plan_flg').val() == 0 || $('#plan_flg').val() == 2){
		$('#light_ritu').attr('disabled', 'disabled');
		$("#light_ritu").css('backgroundColor', '#F2F2F2');
	}else{
		$('#light_ritu').attr('disabled', false);
		$("#light_ritu").css('backgroundColor', '');
	}

	light_check();
});

function plan(){
	if($('#plan_flg').val() == 0 || $('#plan_flg').val() == 2){
		$('#light_ritu').attr('disabled', 'disabled');
		$("#light_ritu").css('backgroundColor', '#F2F2F2');
		$("#light_ritu").val("");
	}else{
		$('#light_ritu').attr('disabled', false);
		$("#light_ritu").css('backgroundColor', '');

	}
}

function editnm(){
	$(".company_nm2").html($("#company_nm").val());
}

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;
}

function light_check(){
	if($('#light_flg').prop('checked')){
		$('#kingaku_light').attr('disabled', false);
		$("#kingaku_light").css('backgroundColor', '');
	}else{
		$('#kingaku_light').attr('disabled', 'disabled');
		$("#kingaku_light").css('backgroundColor', '#F2F2F2');
	}
}

function copy_add(){
	$("#sk_zip1").val($("#zip1").val());
	$("#sk_zip2").val($("#zip2").val());
	$("#sk_todoufuken_no").val($("#todoufuken_no").val());
	$("#sk_add1").val($("#add1").val());
	$("#sk_add2").val($("#add2").val());
}


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, 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>
			<a href="company_l.php">提携会社一覧</a>
			<span>&gt;</span>
			<a href="company_r.php?company_no=<?php echo $gc->company_no ?>">詳細</a>
			<span>&gt;</span>
			基本情報<?php echo f_hsc($gc->mode_title)?>
		</div>
		<!-- End Small Nav -->

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

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

<?php
	if($gc->form_mode=="confirm"){
?>

				<form name="form_data" action="company_e.php" method="POST" onsubmit="return false">
					<input name="mode" type="hidden" value="">
					<input name="act" type="hidden" value="<?php echo $gc->act?>">
					<input name="token" type="hidden" value="<?php echo f_hsc($gc->token)?>">
					<input name="company_no" type="hidden" value="<?php echo f_hsc($gc->company_no)?>">
					<input name="company_nm" type="hidden" value="<?php echo f_hsc($gc->company_nm)?>">
					<input name="company_sh" type="hidden" value="<?php echo f_hsc($gc->company_sh)?>">
					<input name="company_kn" type="hidden" value="<?php echo f_hsc($gc->company_kn)?>">
					<input name="company_kbn" type="hidden" value="<?php echo f_hsc($gc->company_kbn)?>">
					<input name="tantou" type="hidden" value="<?php echo f_hsc($gc->tantou)?>">
					<input name="tel" type="hidden" value="<?php echo f_hsc($gc->tel)?>">
					<input name="fax" type="hidden" value="<?php echo f_hsc($gc->fax)?>">
					<input name="e_mail" type="hidden" value="<?php echo f_hsc($gc->e_mail)?>">
					<input name="e_mail_2" type="hidden" value="<?php echo f_hsc($gc->e_mail_2)?>">
					<input name="e_mail_3" type="hidden" value="<?php echo f_hsc($gc->e_mail_3)?>">
					<input name="e_mail_4" type="hidden" value="<?php echo f_hsc($gc->e_mail_4)?>">
					<input name="e_mail_5" type="hidden" value="<?php echo f_hsc($gc->e_mail_5)?>">
					<input name="e_mail_6" type="hidden" value="<?php echo f_hsc($gc->e_mail_6)?>">
					<input name="e_mail_7" type="hidden" value="<?php echo f_hsc($gc->e_mail_7)?>">
					<input name="e_mail_8" type="hidden" value="<?php echo f_hsc($gc->e_mail_8)?>">
					<input name="e_mail_9" type="hidden" value="<?php echo f_hsc($gc->e_mail_9)?>">
					<input name="e_mail_10" type="hidden" value="<?php echo f_hsc($gc->e_mail_10)?>">
					<input name="url" type="hidden" value="<?php echo f_hsc($gc->url)?>">
					<input name="zip1" type="hidden" value="<?php echo f_hsc($gc->zip1)?>">
					<input name="zip2" type="hidden" value="<?php echo f_hsc($gc->zip2)?>">
					<input name="todoufuken_no" type="hidden" value="<?php echo f_hsc($gc->todoufuken_no)?>">
					<input name="add1" type="hidden" value="<?php echo f_hsc($gc->add1)?>">
					<input name="add2" type="hidden" value="<?php echo f_hsc($gc->add2)?>">
					<input name="sk_zip1" type="hidden" value="<?php echo f_hsc($gc->sk_zip1)?>">
					<input name="sk_zip2" type="hidden" value="<?php echo f_hsc($gc->sk_zip2)?>">
					<input name="sk_todoufuken_no" type="hidden" value="<?php echo f_hsc($gc->sk_todoufuken_no)?>">
					<input name="sk_add1" type="hidden" value="<?php echo f_hsc($gc->sk_add1)?>">
					<input name="sk_add2" type="hidden" value="<?php echo f_hsc($gc->sk_add2)?>">
					<input name="sk_jigyoubu" type="hidden" value="<?php echo f_hsc($gc->sk_jigyoubu)?>">
					<input name="sk_tantou" type="hidden" value="<?php echo f_hsc($gc->sk_tantou)?>">
					<input name="jyougen" type="hidden" value="<?php echo f_hsc($gc->jyougen)?>">
					<input name="light_flg" type="hidden" value="<?php echo f_hsc($gc->light_flg)?>">
					<input name="kingaku_light" type="hidden" value="<?php echo f_hsc($gc->kingaku_light)?>">
					<input name="kingaku_kotei" type="hidden" value="<?php echo f_hsc($gc->kingaku_kotei)?>">
					<input name="kakuritsu" type="hidden" value="<?php echo f_hsc($gc->kakuritsu)?>">
					<input name="chintai_flg" type="hidden" value="<?php echo f_hsc($gc->chintai_flg)?>">
					<input name="relocation_flg" type="hidden" value="<?php echo f_hsc($gc->relocation_flg)?>">
					<input name="keisai_flg" type="hidden" value="<?php echo f_hsc($gc->keisai_flg)?>">
					<input name="keisai_logo_flg" type="hidden" value="<?php echo f_hsc($gc->keisai_logo_flg)?>">
					<input name="keisai_comment_flg" type="hidden" value="<?php echo f_hsc($gc->keisai_comment_flg)?>">
					<input name="img_nm" type="hidden" value="<?php echo f_hsc($gc->img_nm)?>">
					<input name="img_tmp_nm" type="hidden" value="<?php echo f_hsc($gc->img_tmp_nm)?>">
					<input name="img_del" type="hidden" value="<?php echo f_hsc($gc->img_del)?>">

					<input name="sublease_flg" type="hidden" value="<?php echo f_hsc($gc->sublease_flg)?>">
					<input name="chintai_ritu" type="hidden" value="<?php echo f_hsc($gc->chintai_ritu)?>">
					<input name="sublease_ritu" type="hidden" value="<?php echo f_hsc($gc->sublease_ritu)?>">
					<input name="relocation_ritu" type="hidden" value="<?php echo f_hsc($gc->relocation_ritu)?>">
					<input name="comment" type="hidden" value="<?php echo f_hsc($gc->comment)?>">
					<input name="plan_flg" type="hidden" value="<?php echo f_hsc($gc->plan_flg)?>">
					<input name="light_ritu" type="hidden" value="<?php echo f_hsc($gc->light_ritu)?>">
					<input name="display_flg" type="hidden" value="<?php echo f_hsc($gc->display_flg)?>">
					<input name="buken_mansion_flg" type="hidden" value="<?php echo f_hsc($gc->buken_mansion_flg)?>">
					<input name="buken_kodate_flg" type="hidden" value="<?php echo f_hsc($gc->buken_kodate_flg)?>">
					<input name="buken_ittou_flg" type="hidden" value="<?php echo f_hsc($gc->buken_ittou_flg)?>">
				</form>

				<!-- Message OK -->
				<div class="msg msg-ok">
					<p><strong>&nbsp;次の内容でよろしいですか?</strong></p>
				</div>
				<!-- End Message OK -->

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

					<!-- Box Head -->
					<div class="box-head">
						<h2>基本情報</h2>
					</div>
					<!-- End Box Head -->

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

						<div class="box-field">
							<label>会社名</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->company_nm)?>
							</div>
						</div>

						<div class="box-field">
							<label>支店名</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->company_sh)?>
							</div>
						</div>

						<div class="box-field">
							<label>フリガナ</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->company_kn)?>
							</div>
						</div>
<!--
						<div class="box-field">
							<label>区分</label>
							<div class="box-confirm">
								<?php //echo f_hsc($gc->company_kbn_str)?>
							</div>
						</div>
 -->
						<div class="box-field">
							<label>物件種別選択</label>
							<div class="box-confirm">
								<?php if($gc->buken_mansion_flg == 1){ ?><span class="mr10"><?php echo f_hsc($gc->buken_mansion_flg_str)?></span><?php } ?>
								<?php if($gc->buken_kodate_flg == 1){ ?><span class="mr10"><?php echo f_hsc($gc->buken_kodate_flg_str)?></span><?php } ?>
								<?php if($gc->buken_ittou_flg == 1){ ?><span class="mr10"><?php echo f_hsc($gc->buken_ittou_flg_str)?></span><?php } ?>
							</div>
						</div>

 						<div class="box-field">
							<label>表示方法</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->display_flg_str)?>
							</div>
						</div>

						<div class="box-field">
							<label>サービス選択</label>
							<div class="box-confirm">
								<span class="mr10"><?php if($gc->chintai_flg == 1){ echo f_hsc($gc->chintai_flg_str).":".f_hsc($gc->chintai_ritu);}?></span>
								<span class="mr10"><?php if($gc->sublease_flg == 1){ echo f_hsc($gc->sublease_flg_str).":".f_hsc($gc->sublease_ritu);}?></span>
								<span class="mr10"><?php if($gc->relocation_flg == 1){ echo f_hsc($gc->relocation_flg_str).":".f_hsc($gc->relocation_ritu);}?></span>
							</div>
						</div>

						<div class="box-field">
								<label>プラン</label>
								<div class="box-confirm">
									<?php echo fsel_get_plan($gc,$gc->plan_flg,true)?>
								</div>
							</div>

						<div class="box-field">
							<label>ライトプラン出現率</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->light_ritu)?>
							</div>
						</div>

						<div class="box-field">
							<label>担当者</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->tantou)?>
							</div>
						</div>

						<div class="box-field">
							<label>TEL</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->tel)?>
							</div>
						</div>

						<div class="box-field">
							<label>FAX</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->fax)?>
							</div>
						</div>

						<div class="box-field">
							<label>E-mail</label>
							<div class="box-confirm">
								01: <?php echo f_hsc($gc->e_mail)?><br />
								02: <?php echo f_hsc($gc->e_mail_2)?><br />
								03: <?php echo f_hsc($gc->e_mail_3)?><br />
								04: <?php echo f_hsc($gc->e_mail_4)?><br />
								05: <?php echo f_hsc($gc->e_mail_5)?><br />
								06: <?php echo f_hsc($gc->e_mail_6)?><br />
								07: <?php echo f_hsc($gc->e_mail_7)?><br />
								08: <?php echo f_hsc($gc->e_mail_8)?><br />
								09: <?php echo f_hsc($gc->e_mail_9)?><br />
								10: <?php echo f_hsc($gc->e_mail_10)?><br />
							</div>
						</div>

						<div class="box-field">
							<label>URL</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->url)?>
							</div>
						</div>

						<div class="box-field">
							<label>所在地</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->zip)?><br />
								<?php echo fsel_get_todoufuken($gc, $gc->todoufuken_no, true) ?><br />
								<?php echo f_hsc($gc->add1)?><br />
								<?php echo f_hsc($gc->add2)?>
							</div>
						</div>

						<div class="box-field">
							<label>請求先住所</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->sk_zip)?><br />
								<?php echo fsel_get_todoufuken($gc, $gc->sk_todoufuken_no, true) ?><br />
								<?php echo f_hsc($gc->sk_add1)?><br />
								<?php echo f_hsc($gc->sk_add2)?>
							</div>
						</div>

						<div class="box-field">
							<label>請求事業所名</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->sk_jigyoubu)?>
							</div>
						</div>

						<div class="box-field">
							<label>請求担当者名</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->sk_tantou)?>
							</div>
						</div>

						<div class="box-field">
							<label>固定金額</label>
							<div class="box-confirm">
<?php if($gc->kingaku_kotei > 0){ ?>
								<?php echo f_hsc(number_format($gc->kingaku_kotei))?>
<?php } ?>
							</div>
							<label>ライトプラン金額</label>
							<div class="box-confirm">
<?php if($gc->light_flg == "1"){ ?>
								<?php echo f_hsc(number_format($gc->kingaku_light))?>
<?php }else{ ?>
								- (エリア毎に設定した金額を適用する)
<?php } ?>
							</div>
							<label>月の利用限度額</label>
							<div class="box-confirm">
<?php if($gc->jyougen > 0){ ?>
								<?php echo f_hsc(number_format($gc->jyougen))?>
<?php } ?>
							</div>
						</div>
<!--
						<div class="box-field">
							<label>出現率</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->kakuritsu)?>
							</div>
						</div>
 -->
						<div class="box-field">
							<label>ロゴ画像</label>
							<div class="box-confirm">
<?php if($gc->img_show){ ?>
							<?php echo ($gc->img_del_checked?"削除<br />":"") ?>
							<img src="<?php echo $gc->img_src ?>" alt="" width="200">
<?php } ?>
							<label><?php echo f_hsc($gc->company_nm)?></label>
							<label>コメント欄</label>
							<textarea name="comment" class="field" cols=50 rows= 4  readonly><?php echo $gc->comment?></textarea><br>
							<div class="box-confirm">
								<?php echo f_hsc($gc->keisai_logo_flg_str)?>
							</div>
							<div class="box-confirm">
								<?php echo f_hsc($gc->keisai_comment_flg_str)?>
							</div>
							</div>
						</div>

						<div class="box-field">
							<label>掲載</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->keisai_flg_str)?>
							</div>
						</div>

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

					<!-- Form Buttons -->
					<div class="buttons">
						<div class="alignleft">
							<button type="button" class="button color green" onclick="run_submit('form_data', 'entry')">はい</button>
							<button type="button" class="button color blue" onclick="run_submit('form_data', 'revision')">修正</button>
						</div>
						<div class="alignright">
						</div>
					</div>
					<!-- End Form Buttons -->

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

<?php
	}elseif($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

		switch ($gc->db_act) {
		case "i":
			echo "<div class=\"ac\">";
			echo "<a href=\"company_e.php?mode=add\">続けて新規登録</a>";
			echo "&nbsp;&nbsp;&nbsp;&nbsp;";
			echo "<a href=\"company_l.php\" class=\"ml10\">提携会社一覧へ</a>";
			echo "</div>";
			break;
		case "u":
		case "d":
			echo "<div class=\"ac\"><a href=\"company_l.php\">提携会社一覧へ</a></div>";
			break;
		}

	}else{

		for ($i=0; $i<$gc->msg->count; $i++) {
?>
				<!-- Message Error -->
				<div class="msg msg-error">
					<p><strong>&nbsp;<?php echo f_hsc($gc->msg->list[$i]) ?></strong></p>
				</div>
				<!-- End Message Error -->
<?php
		}
?>

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

					<!-- Box Head -->
					<div class="box-head">
						<h2>基本情報</h2>
					</div>
					<!-- End Box Head -->

					<form name="form_edit" action="company_e.php" method="POST" onsubmit="return false" enctype="multipart/form-data">
						<input name="mode" type="hidden" value="" />
						<input name="act" type="hidden" value="<?php echo $gc->act?>" />
						<input name="token" type="hidden" value="<?php echo f_hsc($gc->token)?>" />
						<input name="company_no" type="hidden" value="<?php echo f_hsc($gc->company_no)?>" />
						<input name="img_nm" type="hidden" value="<?php echo f_hsc($gc->img_nm)?>">
						<input name="img_tmp_nm" type="hidden" value="<?php echo f_hsc($gc->img_tmp_nm)?>">

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

							<div class="box-field">
								<label>会社名<span>(必須)</span></label>
								<input type="text" name="company_nm" id="company_nm" class="field size4" onchange="editnm()" value="<?php echo f_hsc($gc->company_nm)?>" />
							</div>

							<div class="box-field">
								<label>支店名</label>
								<input type="text" name="company_sh" class="field size4" value="<?php echo f_hsc($gc->company_sh)?>" />
							</div>

							<div class="box-field">
								<label>フリガナ<span>(必須)</span></label>
								<input type="text" name="company_kn" class="field size4" value="<?php echo f_hsc($gc->company_kn)?>" />
							</div>
<!--
							<div class="box-field inline-field">
								<label>区分<span>(必須)</span></label>
								<div class="ml10 mt05">
									<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>
								</div>
							</div>
 -->

							<div class="box-field">
								<label>物件種別選択<span>(どれか必須)</span></label>
								<div class="ml10 mt05">
									<input type="checkbox" name="buken_mansion_flg" id="buken_mansion_flg" value="1"<?php echo $gc->buken_mansion_flg_checked?>>
									<label for="buken_mansion_flg" class="check" style="display:inline;font-weight: normal; margin-right: 8px;">分譲マンション</label>
									<input type="checkbox" name="buken_kodate_flg" id="buken_kodate_flg" value="1"<?php echo $gc->buken_kodate_flg_checked?>>
									<label for="buken_kodate_flg" class="check" style="display:inline;font-weight: normal; margin-right: 8px;">一戸建て</label>
									<input type="checkbox" name="buken_ittou_flg" id="buken_ittou_flg" value="1"<?php echo $gc->buken_ittou_flg_checked?>>
									<label for="buken_ittou_flg" class="check" style="display:inline;font-weight: normal; margin-right: 8px;">一棟アパート・マンション</label>
								</div>
							</div>

 							<div class="box-field inline-field">
								<label>表示方法<span>(必須)</span></label>
								<div class="ml10 mt05">
									<p><input type="radio" name="display_flg" id="display_flg_0" value="0"<?php echo $gc->display_flg_0_checked?>>
									<label for="display_flg_0" class="check mr10" style="display:inline;font-weight: normal;">通常表示</label></p>
									<p><input type="radio" name="display_flg" id="display_flg_1" value="1"<?php echo $gc->display_flg_1_checked?>>
									<label for="display_flg_1" class="check mr10" style="display:inline;font-weight: normal;">ご希望サービスの賃貸募集・賃貸管理を選択した場合のみ表示</label></p>
									<p><input type="radio" name="display_flg" id="display_flg_2" value="2"<?php echo $gc->display_flg_2_checked?>>
									<label for="display_flg_2" class="check mr10" style="display:inline;font-weight: normal;">築年数が15年以下で延床面積が35㎡以上の場合のみ表示</label></p>
									<p><input type="radio" name="display_flg" id="display_flg_3" value="3"<?php echo $gc->display_flg_3_checked?>>
									<label for="display_flg_3" class="check mr10" style="display:inline;font-weight: normal;">延床面積が40平米以上のみ表示</label></p>
									<p><input type="radio" name="display_flg" id="display_flg_4" value="4"<?php echo $gc->display_flg_4_checked?>>
									<label for="display_flg_4" class="check mr10" style="display:inline;font-weight: normal;">ご希望のサービスのサブリースを選択した場合のみ表示</label></p>
									<p><input type="radio" name="display_flg" id="display_flg_5" value="5"<?php echo $gc->display_flg_5_checked?>>
									<label for="display_flg_5" class="check mr10" style="display:inline;font-weight: normal;">延床面積10平米以上25平米以下の物件の場合のみ表示</label></p>
									<p><input type="radio" name="display_flg" id="display_flg_6" value="6"<?php echo $gc->display_flg_6_checked?>>
									<label for="display_flg_6" class="check mr10" style="display:inline;font-weight: normal;">賃貸管理会社を探しているにチェックが入った場合のみ表示</label></p>
									<p><input type="radio" name="display_flg" id="display_flg_7" value="7"<?php echo $gc->display_flg_7_checked?>>
									<label for="display_flg_7" class="check mr10" style="display:inline;font-weight: normal;">築年数が20年以下の物件の場合のみ表示</label></p>
								</div>
							</div>

							<div class="box-field inline-field">
								<label>サービス選択<span>(どれか必須)</span></label>
								<div class="ml10 mt05">
									<input type="checkbox" name="chintai_flg" id="chintai_flg" value="1"<?php echo $gc->chintai_flg_checked?>>
									<label for="chintai_flg" class="check mr10" style="display:inline;font-weight: normal;">賃貸仲介</label>
									<input type="checkbox" name="sublease_flg" id="sublease_flg" value="1"<?php echo $gc->sublease_flg_checked?>>
									<label for="sublease_flg" class="check mr10" style="display:inline;font-weight: normal;">サブリース</label>
									<input type="checkbox" name="relocation_flg" id="relocation_flg" value="1"<?php echo $gc->relocation_flg_checked?>>
									<label for="relocation_flg" class="check mr10" style="display:inline;font-weight: normal;">リロケーション</label>
									<br/>
									<input type="text" name="chintai_ritu" class="field inlineR" style="ime-mode: disabled;width:50px;" value="<?php echo f_hsc($gc->chintai_ritu)?>" />
									<input type="text" name="sublease_ritu" class="field inlineR" style="ime-mode: disabled;width:50px;margin-left:20px;" value="<?php echo f_hsc($gc->sublease_ritu)?>" />
									<input type="text" name="relocation_ritu" class="field inlineR" style="ime-mode: disabled;width:50px;margin-left:29px;" value="<?php echo f_hsc($gc->relocation_ritu)?>" />
								</div>
							</div>

							<div class="box-field">
								<label>プラン<span>(必須)</span></label>
								<div class="inline-field">
									<select id="plan_flg" name="plan_flg" onchange="plan()" class="field">
										<?php echo fsel_get_plan($gc,$gc->plan_flg)?>
									</select>
								</div>
							</div>

							<div class="box-field">
								<label>ライトプラン出現率<span>(数値)</span></label>
								<input type="text" name="light_ritu" id="light_ritu" style="ime-mode: disabled;" class="field size2 inlineR" value="<?php echo f_hsc($gc->light_ritu)?>" />							</div>

							<div class="box-field">
								<label>担当者</label>
								<input type="text" name="tantou" class="field size4" value="<?php echo f_hsc($gc->tantou)?>" />
							</div>

							<div class="box-field">
								<label>TEL</label>
								<input type="text" name="tel" class="field size4" value="<?php echo f_hsc($gc->tel)?>" />
							</div>

							<div class="box-field">
								<label>FAX</label>
								<input type="text" name="fax" class="field size4" value="<?php echo f_hsc($gc->fax)?>" />
							</div>

							<div class="box-field">
								<label>E-mail<span>(1つ目は必須)</span></label>
								<div class="inline-field">
									01:<input style="margin-bottom:4px;" type="text" name="e_mail" class="field size4" value="<?php echo f_hsc($gc->e_mail)?>" /><br />
									02:<input style="margin-bottom:4px;" type="text" name="e_mail_2" class="field size4" value="<?php echo f_hsc($gc->e_mail_2)?>" /><br />
									03:<input style="margin-bottom:4px;" type="text" name="e_mail_3" class="field size4" value="<?php echo f_hsc($gc->e_mail_3)?>" /><br />
									04:<input style="margin-bottom:4px;" type="text" name="e_mail_4" class="field size4" value="<?php echo f_hsc($gc->e_mail_4)?>" /><br />
									05:<input style="margin-bottom:4px;" type="text" name="e_mail_5" class="field size4" value="<?php echo f_hsc($gc->e_mail_5)?>" /><br />
									06:<input style="margin-bottom:4px;" type="text" name="e_mail_6" class="field size4" value="<?php echo f_hsc($gc->e_mail_6)?>" /><br />
									07:<input style="margin-bottom:4px;" type="text" name="e_mail_7" class="field size4" value="<?php echo f_hsc($gc->e_mail_7)?>" /><br />
									08:<input style="margin-bottom:4px;" type="text" name="e_mail_8" class="field size4" value="<?php echo f_hsc($gc->e_mail_8)?>" /><br />
									09:<input style="margin-bottom:4px;" type="text" name="e_mail_9" class="field size4" value="<?php echo f_hsc($gc->e_mail_9)?>" /><br />
									10:<input style="margin-bottom:4px;" type="text" name="e_mail_10" class="field size4" value="<?php echo f_hsc($gc->e_mail_10)?>" /><br />
								</div>
							</div>

							<div class="box-field">
								<label>URL</label>
								<input type="text" name="url" class="field size4" value="<?php echo f_hsc($gc->url)?>" />
							</div>

							<div class="box-field">
									<label style="width: 200px; display:inline;">所在地</label> 
									<button type="button" class="button" style="margin: 3px;" onclick="copy_add()">請求先住所にコピーする</button>

								<div class="inline-field">
									<input type="text" name="zip1" id="zip1" class="field size2" value="<?php echo f_hsc($gc->zip1)?>" />
									-
									<input type="text" name="zip2" id="zip2" class="field size2" value="<?php echo f_hsc($gc->zip2)?>" />
								</div>
								<select name="todoufuken_no" id="todoufuken_no" class="field size3 mt05">
									<option value=""></option>
									<?php echo fsel_get_todoufuken($gc, $gc->todoufuken_no) ?>
								</select>
								<input type="text" name="add1" id="add1" class="field size4 mt05" value="<?php echo f_hsc($gc->add1)?>" />
								<input type="text" name="add2" id="add2" class="field size4 mt05" value="<?php echo f_hsc($gc->add2)?>" />
							</div>


							<div class="box-field">
								<label>請求先住所<span>必須</span></label>
								<div class="inline-field">
									<input type="text" name="sk_zip1" id="sk_zip1" class="field size2" value="<?php echo f_hsc($gc->sk_zip1)?>" />
									-
									<input type="text" name="sk_zip2" id="sk_zip2" class="field size2" value="<?php echo f_hsc($gc->sk_zip2)?>" />
								</div>
								<select name="sk_todoufuken_no" id="sk_todoufuken_no" class="field size3 mt05">
									<option value=""></option>
									<?php echo fsel_get_todoufuken($gc, $gc->sk_todoufuken_no) ?>
								</select>
								<input type="text" name="sk_add1" id="sk_add1" class="field size4 mt05" value="<?php echo f_hsc($gc->sk_add1)?>" />
								<input type="text" name="sk_add2" id="sk_add2" class="field size4 mt05" value="<?php echo f_hsc($gc->sk_add2)?>" />
							</div>

							<div class="box-field">
								<label>請求事業部名</label>
								<input type="text" name="sk_jigyoubu" class="field size4 mt05" value="<?php echo f_hsc($gc->sk_jigyoubu)?>" />
							</div>

							<div class="box-field">
								<label>請求担当者名<span>必須</span></label>
								<input type="text" name="sk_tantou" class="field size4 mt05" value="<?php echo f_hsc($gc->sk_tantou)?>" />
							</div>

							<div class="box-field">
								<div>
									<label>固定金額<span>(優先されます)</span></label>
									<input type="text" name="kingaku_kotei" class="field size2 inlineR" value="<?php echo f_hsc($gc->kingaku_kotei)?>" />
								</div>
							</div>
							<div class="box-field inline-field">
								<div>
									<label>ライトプラン金額<span>(1件あたり)</span></label>
									<input type="checkbox" name="light_flg" id="light_flg" value="1"<?php echo $gc->light_flg_checked?>  onclick="light_check()"> 
									<input type="text" name="kingaku_light" id="kingaku_light" class="field size2 inlineR" value="<?php echo f_hsc($gc->kingaku_light)?>" />
									<br>チェックが入っていない場合はエリア毎に設定した金額が適用されます。
								</div>
							</div>
							<div class="box-field">
								<div>
									<label>月の利用限度額<span>(数値)</span></label>
									<input type="text" name="jyougen" class="field size2 inlineR" value="<?php echo f_hsc($gc->jyougen)?>" />
								</div>
								<div style="clear:both;">
								</div>
							</div>
<!--
							<div class="box-field">
								<label>出現率<span>(数値)</span></label>
								<input type="text" name="kakuritsu" class="field size2 inlineR" value="<?php echo f_hsc($gc->kakuritsu)?>" />
								<?php //out_html_kakuritsu_list($gc); ?>
							</div>
 -->
							<div class="box-field">
								<label>ロゴ画像<span>(横200ピクセル・縦60ピクセル)</span></label>
<?php if($gc->img_show){ ?>
								<input type=checkbox name="img_del" id="img_del" value="y"<?php echo $gc->img_del_checked?>><label for="img_del" style="margin-left: 4px;display:inline;font-weight: normal;">削除</label>&nbsp;
<?php } ?>
								<input type=file name="img_file" style="width:300;"><br />
<?php if($gc->img_show){ ?>
								<img src="<?php echo $gc->img_src?>" alt="" width="200">
<?php } ?>
								<label class="company_nm2"><?php echo f_hsc($gc->company_nm)?></label>
								<label>コメント欄<span>最大3行毎行24文字以内入力してください</span></label>
								<textarea name="comment" class="field" cols=50 rows= 4 ><?php echo $gc->comment?></textarea><br>
								<div class="ml10 mt05">
									<input type="checkbox" name="keisai_logo_flg" id="keisai_logo_flg" value="1"<?php echo $gc->keisai_logo_flg_checked?>>
									<label for="keisai_logo_flg" class="check" style="display:inline;font-weight: normal;">企業ロゴをTOP画面に表示しない</label>
								</div>
								<div class="ml10 mt05">
									<input type="checkbox" name="keisai_comment_flg" id="keisai_comment_flg" value="1"<?php echo $gc->keisai_comment_flg_checked?>>
									<label for="keisai_comment_flg" class="check" style="display:inline;font-weight: normal;">掲載会社一覧に表示しない</label>
								</div>
							</div>

							<div class="box-field">
								<label>掲載</label>
								<div class="ml10 mt05">
									<input type="checkbox" name="keisai_flg" id="keisai_flg" value="1"<?php echo $gc->keisai_flg_checked?>>
									<label for="keisai_flg" class="check" style="display:inline;font-weight: normal;">掲載する</label>
								</div>
							</div>

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

						<!-- Form Buttons -->
						<div class="buttons">
							<div class="alignleft">
								<button type="button" class="button color green" onclick="run_submit('form_edit', 'confirm')">入力確認へ</button>
							</div>
<?php
		if($gc->act=="u"){
?>
							<div class="alignright">
								<button type="button" class="button color red" onclick="run_submit('form_edit', 'delete')">削除</button>
							</div>
							<div class="alignright pos-top2">
								<input id="del" name="delete_check" type="checkbox" value="1" class="pos-top2" /><label for="del">削除する</label>
							</div>
<?php
		}
?>
						</div>
						<!-- End Form Buttons -->

					</form>

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

<?php
	}
?>
				<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
}
Exemplo n.º 2
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
}
Exemplo n.º 3
0
function out_html($gc) {

	//表示方法
	fdiv_set_display_radio($gc, $gc->display_flg, "display_flg");

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

	//チェックボックス設定
	fdiv_set_checkbox($gc, "賃貸仲介", ($gc->chintai_flg=="1"), "chintai_flg");
	fdiv_set_checkbox($gc, "サブリース", ($gc->sublease_flg=="1"), "sublease_flg");
	fdiv_set_checkbox($gc, "リロケーション", ($gc->relocation_flg=="1"), "relocation_flg");
	fdiv_set_checkbox($gc, "掲載する", ($gc->keisai_flg=="1"), "keisai_flg");
	fdiv_set_checkbox($gc, "企業ロゴをTOP画面に表示しない", ($gc->keisai_logo_flg=="1"), "keisai_logo_flg");
	fdiv_set_checkbox($gc, "掲載会社一覧に表示しない", ($gc->keisai_comment_flg=="1"), "keisai_comment_flg");
	fdiv_set_checkbox($gc, "分譲マンション", ($gc->buken_mansion_flg=="1"), "buken_mansion_flg");
	fdiv_set_checkbox($gc, "一戸建て", ($gc->buken_kodate_flg=="1"), "buken_kodate_flg");
	fdiv_set_checkbox($gc, "一棟アパート・マンション", ($gc->buken_ittou_flg=="1"), "buken_ittou_flg");

	$gc->zip = $gc->zip1."-".$gc->zip2;
	if (!preg_match("/^\d{3}\-\d{4}$/", $gc->zip)) {
		$gc->zip = "";
	}

	$gc->sk_zip = $gc->sk_zip1."-".$gc->sk_zip2;
	if (!preg_match("/^\d{3}\-\d{4}$/", $gc->sk_zip)) {
		$gc->sk_zip = "";
	}

?>
<!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 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() {

	$('.group h3').click(function(){

		if( $(this).attr("panelmode") == "open" ){

			//閉じる処理

			$(this).attr("panelmode", "close");

			$(this).removeClass("ui-accordion-header-active");
			$(this).removeClass("ui-state-active");
			$(this).removeClass("ui-corner-top");
			$(this).addClass("ui-corner-all");

			$('span', this).removeClass("ui-icon-triangle-1-s");
			$('span', this).addClass("ui-icon-triangle-1-e");

			$('+div', this).removeClass("ui-accordion-content-active");

			$('+div:not(:animated)',this).slideUp('normal');

		}else{

			//開く処理

			get_area($('+div', this), $(this).attr("todoufuken_no"));

			$(this).attr("panelmode", "open");

			$(this).removeClass("ui-corner-all");
			$(this).addClass("ui-accordion-header-active");
			$(this).addClass("ui-state-active");
			$(this).addClass("ui-corner-top");

			$('span', this).removeClass("ui-icon-triangle-1-e");
			$('span', this).addClass("ui-icon-triangle-1-s");

			$('+div', this).addClass("ui-accordion-content-active");

			var d = {height:'toggle', opacity:'toggle'};
			$('+div',this).animate(d);

		}

	});

});
function get_area(pnl, todoufuken_no){

	var company_no = <?php echo $gc->company_no ?>;

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

	var query = "time=" + timestamp;
	query += "&mode=company_r";
	query += "&company_no=" + company_no;
	query += "&todoufuken_no=" + todoufuken_no;

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

}
</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>
			<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">

				<form name="form_data" action="company_e.php" method="GET" onsubmit="return false">
					<input name="mode" type="hidden" value="">
					<input name="company_no" type="hidden" value="<?php echo f_hsc($gc->company_no)?>">
				</form>

				<form name="form_area" action="company_area_e.php" method="GET" onsubmit="return false">
					<input name="mode" type="hidden" value="">
					<input name="company_no" type="hidden" value="<?php echo f_hsc($gc->company_no)?>">
				</form>

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

					<!-- Box Head -->
					<div class="box-head">
						<h2>基本情報</h2>
					</div>
					<!-- End Box Head -->

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

						<div class="box-field">
							<label>会社名</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->company_nm)?>
							</div>
						</div>

						<div class="box-field">
							<label>支店名</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->company_sh)?>
							</div>
						</div>

						<div class="box-field">
							<label>フリガナ</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->company_kn)?>
							</div>
						</div>
<!--
						<div class="box-field">
							<label>区分</label>
							<div class="box-confirm">
								<?php //echo f_hsc($gc->company_kbn_str)?>
							</div>
						</div>
 -->
						<div class="box-field">
							<label>物件種別選択</label>
							<div class="box-confirm">
								<?php if($gc->buken_mansion_flg == 1){ ?><span class="mr10"><?php echo f_hsc($gc->buken_mansion_flg_str)?></span><?php } ?>
								<?php if($gc->buken_kodate_flg == 1){ ?><span class="mr10"><?php echo f_hsc($gc->buken_kodate_flg_str)?></span><?php } ?>
								<?php if($gc->buken_ittou_flg == 1){ ?><span class="mr10"><?php echo f_hsc($gc->buken_ittou_flg_str)?></span><?php } ?>
							</div>
						</div>

 						<div class="box-field">
							<label>表示方法</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->display_flg_str)?>
							</div>
						</div>

						<div class="box-field">
							<label>サービス選択</label>
							<div class="box-confirm">
								<span class="mr10"><?php if($gc->chintai_flg == 1){ echo f_hsc($gc->chintai_flg_str).":".f_hsc($gc->chintai_ritu);}?></span>
								<span class="mr10"><?php if($gc->sublease_flg == 1){ echo f_hsc($gc->sublease_flg_str).":".f_hsc($gc->sublease_ritu);}?></span>
								<span class="mr10"><?php if($gc->relocation_flg == 1){ echo f_hsc($gc->relocation_flg_str).":".f_hsc($gc->relocation_ritu);}?></span>
							</div>
						</div>

						<div class="box-field">
							<label>プラン</label>
							<div class="box-confirm">
								<?php echo fsel_get_plan($gc,$gc->plan_flg,true)?>
							</div>
						</div>

						<div class="box-field">
							<label>ライトプラン出現率</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->light_ritu)?>
							</div>
						</div>

						<div class="box-field">
							<label>担当者</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->tantou)?>
							</div>
						</div>

						<div class="box-field">
							<label>TEL</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->tel)?>
							</div>
						</div>

						<div class="box-field">
							<label>FAX</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->fax)?>
							</div>
						</div>

						<div class="box-field">
							<label>E-mail</label>
							<div class="box-confirm">
								01: <?php echo f_hsc($gc->e_mail)?><br />
								02: <?php echo f_hsc($gc->e_mail_2)?><br />
								03: <?php echo f_hsc($gc->e_mail_3)?><br />
								04: <?php echo f_hsc($gc->e_mail_4)?><br />
								05: <?php echo f_hsc($gc->e_mail_5)?><br />
								06: <?php echo f_hsc($gc->e_mail_6)?><br />
								07: <?php echo f_hsc($gc->e_mail_7)?><br />
								08: <?php echo f_hsc($gc->e_mail_8)?><br />
								09: <?php echo f_hsc($gc->e_mail_9)?><br />
								10: <?php echo f_hsc($gc->e_mail_10)?><br />
							</div>
						</div>

						<div class="box-field">
							<label>URL</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->url)?>
							</div>
						</div>

						<div class="box-field">
							<label>所在地</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->zip)?><br />
								<?php echo fsel_get_todoufuken($gc, $gc->todoufuken_no, true) ?><br />
								<?php echo f_hsc($gc->add1)?><br />
								<?php echo f_hsc($gc->add2)?>
							</div>
						</div>

						<div class="box-field">
							<label>請求先住所</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->sk_zip)?><br />
								<?php echo fsel_get_todoufuken($gc, $gc->sk_todoufuken_no, true) ?><br />
								<?php echo f_hsc($gc->sk_add1)?><br />
								<?php echo f_hsc($gc->sk_add2)?>
							</div>
						</div>

						<div class="box-field">
							<label>請求事業所名</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->sk_jigyoubu)?>
							</div>
						</div>

						<div class="box-field">
							<label>請求担当者名</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->sk_tantou)?>
							</div>
						</div>

						<div class="box-field">
							<label>固定金額</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->kingaku_kotei)?>
							</div>
							<label>ライトプラン金額</label>
							<div class="box-confirm">
<?php if($gc->light_flg == "1"){ ?>
								<?php echo f_hsc($gc->kingaku_light)?>
<?php }else{ ?>
								- (エリア毎に設定した金額を適用する)
<?php } ?>

							</div>
							<label>月の利用限度額</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->jyougen)?>
							</div>
						</div>
<!--
						<div class="box-field">
							<label>出現率</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->kakuritsu)?>
							</div>
						</div>
 -->
						<div class="box-field">
							<label>ロゴ画像</label>
							<div class="box-confirm">
<?php if(file_exists(C_IMG_PATH."logo/".$gc->company_no)){ ?>
							<img src="<?php echo C_IMG_ROOT_URL."logo/".$gc->company_no ?>" alt="" width="200">
<?php } ?>
							<label><?php echo f_hsc($gc->company_nm)?></label>
							<label>コメント欄</label>
							<textarea name="comment" class="field" cols=50 rows= 4  readonly><?php echo $gc->comment?></textarea><br>
							<div class="box-confirm">
								<?php echo f_hsc($gc->keisai_logo_flg_str)?>
							</div>
							<div class="box-confirm">
								<?php echo f_hsc($gc->keisai_comment_flg_str)?>
							</div>
							</div>
						</div>

						<div class="box-field">
							<label>掲載</label>
							<div class="box-confirm">
								<?php echo f_hsc($gc->keisai_flg_str)?>
							</div>
						</div>

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

					<!-- Form Buttons -->
					<div class="buttons">
						<div class="ac">
							<button type="button" class="button color green" onclick="run_submit('form_data', 'edit')">基本情報を編集</button>
						</div>
					</div>
					<!-- End Form Buttons -->

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




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

					<!-- Box Head -->
					<div class="box-head">
						<h2 class="left"><b>対応エリア</b></h2>
						<div class="right">
							&nbsp;
						</div>
					</div>
					<!-- End Box Head -->

					<!-- Accordion -->
					<div class="Accordion" style="padding:15px 10px;">

						<!-- Accordion -->
						<div class="ui-accordion ui-widget ui-helper-reset">

<?php

	$sql = "SELECT SQL_CALC_FOUND_ROWS";
	$sql.= " t.todoufuken_no,";
	$sql.= " t.todoufuken_nm ";
	$sql.= "FROM";
	$sql.= " m_todoufuken t ";
	$sql.= "INNER JOIN";
	$sql.= " (";
	$sql.= " SELECT";
	$sql.= "  s.todoufuken_no";
	$sql.= " FROM";
	$sql.= "  m_company_area a";
	$sql.= " INNER JOIN";
	$sql.= "  m_shikucyouson s";
	$sql.= " ON";
	$sql.= "  a.shikucyouson_no = s.shikucyouson_no";
	$sql.= " WHERE";
	$sql.= "  a.company_no = ".$gc->company_no;
	$sql.= " GROUP BY";
	$sql.= "  s.todoufuken_no";
	$sql.= " ) c ";
	$sql.= "ON";
	$sql.= " t.todoufuken_no = c.todoufuken_no ";
	$sql.= "ORDER BY";
	$sql.= " t.sort_no";

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

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

	$i = 0;

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

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

?>
		<div class="group">
			<h3 panelmode="close" todoufuken_no="<?php echo f_hsc($todoufuken_no) ?>" class="ui-accordion-header ui-helper-reset ui-state-default ui-accordion-icons ui-corner-all">
				<span class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span>
				<?php echo f_hsc($todoufuken_nm) ?></h3>
			<div style="display: none;" class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom">
				&nbsp;
			</div>
		</div>
<?php

		$rs->move_next();

		$i++;

	}

	$rs->free_result();

	if($row_count==0){
		echo "<div class=\"ac\">";
		echo "対応エリアは未登録です。";
		echo "</div>";
	}

?>

						</div>

					</div>
					<!-- Accordion -->

					<!-- Form Buttons -->
					<div class="buttons">
						<div class="ac">
							<button type="button" class="button color green" onclick="run_submit('form_area', 'edit')">対応エリアを編集</button>
						</div>
					</div>
					<!-- End Form Buttons -->

				</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
}