MTG002_m.php 4.45 KB
<?php 
//*****************************************************************************
//* 
//* プログラム名:会議(携帯電話)
//* プログラムID:MTG002_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");

//*** 会議カテゴリ名 ****//
$strSQL = "select * from mst_kaigi_category ";
$strSQL .= " WHERE category_no=$ctgno";
$recData=pg_exec($strSQL);
if($recData==false){
		echo("SQL実行に失敗しました(SELECT)");
		exit;
}
$recSet = pg_fetch_object($recData, 0);
$PHP_TITLE_NAME.="(".mb_convert_encoding($recSet->category_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%">
<a href="MTG001_m.php?<?php  echo $PHP_Argument.'&selDisp='.$selDisp ?>"accesskey="1"><?php  echo Get_Num("1"); ?>カテゴリ一覧へ</A><br><br>
<?php 

$strDate = date("Y").date("m").date("d").date("H");
if($selDisp == 1){
	$strWere = "date_end > '".$strDate."' and ";
	$srtOn = "and kaigi_info_tbl.date_end > '".$strDate."' ";
}elseif($selDisp == 2){
	$strWere = "date_end <= '".$strDate."' and ";
	$srtOn = "and kaigi_info_tbl.date_end <= '".$strDate."' ";
}else{
	$strWere="";
	$srtOn ="";
}
$strSQL = "select kaigi_info_tbl.meeting_no, kaigi_info_tbl.theme, count(pkaigi_tbl.read_flg) as readCnt from kaigi_info_tbl ";
$strSQL .= "left join pkaigi_tbl on pkaigi_tbl.meeting_no = kaigi_info_tbl.meeting_no and syain_cd = '".$PHP_SYAIN_CD."' and pkaigi_tbl.read_flg = 0 ";
$strSQL .= "where ".$strWere."kaigi_info_tbl.category_no='".$ctgno."' and (list_spk like '%/".$PHP_SYAIN_CD."/%' or list_obs like '%".$PHP_SYAIN_CD."/%') ";
$strSQL .= "group by kaigi_info_tbl.meeting_no, kaigi_info_tbl.theme, kaigi_info_tbl.open_date ";
$strSQL .= "order by readCnt desc, open_date desc";
$recKaigi=pg_exec($strSQL);
if($recKaigi==false){
		echo("SQL実行に失敗しました(SELECT)");
		exit;
}

$max = pg_numrows($recKaigi);
for($i=0;$i<$max;$i++){
		$ftcKaigi = pg_fetch_object($recKaigi, $i);
		
		//議案数
		$strSQL="select remark_no from kaigi_tbl where meeting_no = ".($ftcKaigi->meeting_no)." and answer_no = 0 and cp_answer_no = 0";
		$recRem=pg_exec($strSQL);
		if($recRem==false){
				echo("SQL実行に失敗しました(SELECT)");
				exit;
		}
		$chk_count1 = pg_numrows($recRem)-1;

		//発言数
		$strSQL="select remark_no from kaigi_tbl where meeting_no = ".($ftcKaigi->meeting_no)." and (answer_no > 0 or cp_answer_no > 0)";
		$recRem=pg_exec($strSQL);
		if($recRem==false){
				echo("SQL実行に失敗しました(SELECT)");
				exit;
		}
		$chk_count2 = pg_numrows($recRem);

		//新着数
		$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."' and pkaigi_tbl.meeting_no= ".$ftcKaigi->meeting_no;
		$recCnt=pg_exec($strSQL);
		if($recCnt==false){
			echo("SQL実行に失敗しました(SELECT)");
			exit;
		}
		$chk_count3 = pg_numrows($recCnt);

		echo '・<a href="MTG003_m.php?'.$PHP_Argument.'&ctgno='.$ctgno.'&mtgNo='.$ftcKaigi->meeting_no.'&selDisp='.$selDisp.'">';
		echo mb_convert_encoding($ftcKaigi->theme, "SJIS", "EUC-JP");
		echo '</a><br>';
		echo ' 議案'.$chk_count1.'件,';
		echo '発言'.$chk_count2.'件,';
		echo '新着'.$chk_count3.'件<br>';

}

?>
<br><br>
<a href="MTG001_m.php?<?php  echo $PHP_Argument.'&selDisp='.$selDisp ?>"accesskey="1"><?php  echo Get_Num("1"); ?>カテゴリ一覧へ</A>
<HR width="100%">
<?php 
	//メニュー表示
	include("include_m/CommonMenuReturn.inc");
	//*** 共通変数取得 ***//
	include("include_m/CommonHidden.inc");

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