MTG001_m.php 3.6 KB
<?php 
//*****************************************************************************
//* 
//* プログラム名:会議(携帯電話)
//* プログラムID:MTG001_m.php
//* 機能        :会議
//* 作成者      :
//* 
//*****************************************************************************
header("Content-type: text/html; charset=Shift_JIS");

//*** 広告 ***//
include("include_m/Advertisement.inc");

//*** 共通処理 ***//
include("include_m/CommonProcess.inc");

//*** 電子会議 ***
$strMenuSQL = "SELECT name FROM sub_menu_TBL WHERE url = 'MET010.php'";
$rsRecset = pg_exec($strMenuSQL);
$PHP_TITLE_NAME=mb_convert_encoding(pg_result($rsRecset,0,"name"), "SJIS", "EUC-JP");

if ($selDisp==""){
		$selDisp=1;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<META http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" type="text/css" href="basefont.css">
<TITLE>E-グルPro(<?php  echo $PHP_TITLE_NAME ?>)</TITLE>
</HEAD>
<BODY>
<form>
<center>
<?php  echo $PHP_TITLE_NAME ?><br>
<?php  echo $strName; ?>
<HR width="100%">
<?php  echo $koukokuTEL; ?>
</center>
<?php 
	//メニュー表示
	include("include_m/CommonMenuReturn.inc");
?>
<HR width="100%">
<select name="selDisp">
<option value=0 <?php  if ($selDisp==0){ echo "selected";} ?>>全て</option>";
<option value=1 <?php  if ($selDisp==1){ echo "selected";} ?>>開催中</option>";
<option value=2 <?php  if ($selDisp==2){ echo "selected";} ?>>終了</option>";
</select>
<input type="submit" name="intSts" value="表示"><BR>
<?php 
$selDisp = (int) $selDisp;
$strDate = date("Y").date("m").date("d").date("H");
if($selDisp == 1){
		$strWere = "where kaigi_info_tbl.date_end > '".$strDate."' ";
		$srtOn = "and kaigi_info_tbl.date_end > '".$strDate."' ";
}elseif($selDisp == 2){
		$strWere = "where kaigi_info_tbl.date_end < '".$strDate."' ";
		$srtOn = "and kaigi_info_tbl.date_end <= '".$strDate."' ";
}else{
		$strWere="";
		$srtOn="";
}

$strSQL = "select kaigi_info_tbl.category_no, mst_kaigi_category.category_name, count(*) as ctgnum, mst_kaigi_category.disp_rank ";
$strSQL .= "from  kaigi_info_tbl join  mst_kaigi_category on mst_kaigi_category.category_no = kaigi_info_tbl.category_no ";
$strSQL .= "and(kaigi_info_tbl.list_spk like '%/".$PHP_SYAIN_CD."/%' or kaigi_info_tbl.list_obs like '%".$PHP_SYAIN_CD."/%') ";
$strSQL .= $strWere;
$strSQL .= "group by kaigi_info_tbl.category_no, mst_kaigi_category.category_name, mst_kaigi_category.disp_rank ";
$strSQL .= "order by mst_kaigi_category.disp_rank";
$recData=pg_exec($strSQL);
if($recData==false){
		echo("SQL実行に失敗しました(SELECT)");
		exit;
}
for($i=0;$i<pg_numrows($recData);$i++){
		$fetchData = pg_fetch_object($recData,$i);
		//カテゴリ名
		echo '<a href="MTG002_m.php?'. $PHP_Argument.'&ctgno='.$fetchData->category_no.'&selDisp='.$selDisp.'">';
		echo mb_convert_encoding($fetchData->category_name, "SJIS", "EUC-JP");
		echo "(".$fetchData->ctgnum.")";
		echo '</a>';

		$strSQL = "select read_flg from pkaigi_tbl ";
		$strSQL .= "join kaigi_info_tbl on kaigi_info_tbl.meeting_no = pkaigi_tbl.meeting_no ".$srtOn." ";
		$strSQL .= "where pkaigi_tbl.read_flg = 0 and pkaigi_tbl.syain_cd = '".$PHP_SYAIN_CD;
		$strSQL .= "' and pkaigi_tbl.category_no= ".$fetchData->category_no;
		$recCnt=pg_exec($strSQL);
		if($recCnt==false){
				echo("SQL実行に失敗しました(SELECT)");
				exit;
		}
		if (pg_numrows($recCnt)>0){
				echo "&nbsp;[新着]";
		}
		echo '<br>';
}

?>
<HR width="100%">
<?php 
	//メニュー表示
	include("include_m/CommonMenuReturn.inc");
	//*** 共通変数取得 ***//
	include("include_m/CommonHidden.inc");

?>
</form>
</BODY>
</HTML>