MET012.php
2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
//*****************************************************************************
//*
//* プログラム名:電子会議室
//* プログラムID:MET012.php
//* 機能 :電子会議室一覧
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("include/session_start.inc");
include("include/SessionChk.inc");
include("include/STRING.inc");
include('./include/smarty.conf');
$strDBinc="../".$PHP_FOLDER."/include/dbcon.inc";
$strTempPath="../".$PHP_FOLDER."/temp/kaigi/";
include($strDBinc);
//折り返し文字数
$intBR_ctg = 40;
//一覧表示
$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."' ";
}elseif($selDisp == 3){
$strWere = "where kaigi_info_tbl.date_end < '".$strDate."' and minutes_maker='".$PHP_SYAIN_CD."' and minutes IS NULL ";
$srtOn = "and kaigi_info_tbl.date_end <= '".$strDate."' and kaigi_info_tbl. minutes_maker='".$PHP_SYAIN_CD."' and kaigi_info_tbl.minutes IS NULL ";
}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);
//カテゴリ番号
$ctgNo[$i] = $fetchData->category_no;
//カテゴリ名
// $ctgName[$i] = LINE_BR($fetchData->category_name,$intBR_ctg);
$ctgName[$i] = $fetchData->category_name;
//カテゴリ各数
$ctgCnt[$i] = $fetchData->ctgnum;
$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.category_no= ".$ctgNo[$i];
$recCnt=pg_exec($strSQL);
if($recCnt==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$noRead[$i] = pg_numrows($recCnt);
}
$o_smarty->assign('strDisp',$strDisp);
$o_smarty->assign('ctgNo',$ctgNo);
$o_smarty->assign('ctgName',$ctgName);
$o_smarty->assign('ctgCnt',$ctgCnt);
$o_smarty->assign('noRead',$noRead);
$o_smarty->display('MET012.tpl');
?>