|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /var/www/html/pathumthani_eoffice/application/agenda/ |
Upload File : |
<?
//=========================================
// Select document type where status is '1'
// @author Kridsada Satakarn
// @date 2009/06/20
// @return a array of list document type where status is '1'
//=
###################################################################
## AGENDA MAIN PAGE : E-OFFICE PATHUMTHANI
###################################################################
## Version : 20090620.001 (Created/Modified; Date.RunNumber)
## Created Date : 2009-06-20 hh:mm
## Created By : Kridsada Satakarn (JENG)
## E-mail :
## Tel. :
## Company : Sappire Research and Development Co.,Ltd. (C)All Right Reserved
###################################################################
##
## Version : 20091110.002
## Modified Detail: MODIFY DASH BOARD , CONVERT DATE THAI -> ENG
## Modified Date : 2009-11-10 13:00
## Modified By : Mr.PUDIS PROMSRI (PAAK)
##
###################################################################
/*session_start();
if(!isset($session_username)){
header("Location:login.php");
}*/
include("../../config/config.inc.php");
include("../../common/function.php");
include("function.listfile.php");
$arrThaiMonth = array('','มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม');
if($debug=="ON"){echo "<pre>";print_r($_SESSION);echo "</pre>";}
if($_POST['action']=='confirm'){
$sql="Update tbl_subject set confirm='$xtype', confirmby='$_SESSION[session_staffid]' where id_sub='$id'";
mysql_query($sql);
$sql ="SELECT *
FROM tbl_subject_approve
WHERE tbl_subject_approve.id_subject='$id'
AND comment_by='$session_staffid'
";
$rs_checkroe=@mysql_query($sql);
$num_row=@mysql_num_rows($rs_checkroe);
if($num_row>0){
while($rs_copy=mysql_fetch_assoc($rs_checkroe)){
$sql="insert into tbl_subject_approve_history (id_subject,approve_type,comment_detail,comment_by,comment_date) values( '$rs_copy[id_subject]','$rs_copy[approve_type]','$rs_copy[comment_detail]','$rs_copy[comment_by]','$rs_copy[comment_date]' )";
mysql_query($sql);
}
$sql="DELETE FROM `tbl_subject_approve` WHERE tbl_subject_approve.id_subject='$id' AND (`comment_by`='$session_staffid') ";
mysql_query($sql);
}
$sql="insert into tbl_subject_approve(id_subject,approve_type,comment_detail,comment_by,comment_date) values('$id','$xtype','$xdetail','$_SESSION[session_staffid]',NOW())";
mysql_query($sql);
}
$sql ="SELECT * FROM tbl_subject_approve WHERE tbl_subject_approve.id_subject='$id' AND comment_by='$session_staffid' ";
$rs_checkroe=@mysql_query($sql);
$num_rows=@mysql_num_rows($rs_checkroe);
if($num_rows==0){
$sql="insert into tbl_subject_approve(id_subject,approve_type,comment_detail,comment_by,comment_date) values('$id',0,'เรียกดูรายงานการประชุม','$_SESSION[session_staffid]',NOW())";
mysql_query($sql);
}
$sql="select varvalue from eoffice_config where appid='14' and modual_name='meeting_report' and varname='approve'";
//echo $sql;
$result =mysql_db_query($dbname,$sql);
$row=mysql_fetch_array($result );
$approveshow=$row[varvalue];
function selectFiles($sub_id, $id_type){
$path = "attach_file/temp/";
$add_cond = "";
if($id_type >= 0)
{
$add_cond = " AND id_type = ". $id_type;
}
$arr = array();
$sql = "SELECT
tbl_attach_file.attach_file,
tbl_attach_file.run_id,
tbl_attach_file.comment
FROM
tbl_attach_file
WHERE
tbl_attach_file.id_attach_file = '$sub_id' $add_cond order by run_id ASC";
$query = mysql_query($sql);
if($rs = mysql_fetch_array($query)){
$arrfile= $rs[attach_file];
$arrcomment=( $rs[comment]=="")?$arrfile:$rs[comment];
return "<a href=\"download.php?path=$path$arrfile&filename=$arrfile\" target='fdownload' >".$arrcomment."</a>";
}else{
return "-";
}
}
$docType = selectDocType();
$month_arr=array('','มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม');
$smonth_arr=array('','ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.','ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.');
$folder = "attach_file/";
$path_temp = "attach_file/agenda/";
//===================================================================================================
if($_SERVER[REQUEST_METHOD] == "POST"){
//echo "<pre>";print_r($_POST);echo "</pre>";
$close_value=($close_value)?$close_value:"on";
$sql="UPDATE `tbl_subject` SET `close_topic`='$close_value' WHERE (`id_sub`='".$id."') ";
$query = mysql_query($sql);
?>
<script language="javascript">
alert("ทำการปิดการรับรองการประชุมแล้ว");
</script>
<?
}
?>
<html>
<head>
<title>รายละเอียดรายงานการประชุม</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<LINK href="common/style.css" rel=stylesheet>
<script language='javascript' src='jquery.js'></script>
<script language="javascript">
function openpopup_confirm(){
var sFeatures="dialogHeight: " + 250 + "px;";
oReturnValue = window.showModalDialog('report_confirm_popup.php?'+Math.random()*10000,'' ,sFeatures);
if(oReturnValue ){
$('#xtype').val(oReturnValue.type);
$('#xdetail').val(oReturnValue.detail);
document.formE.submit()
}
}
</script>
<style type="text/css">
.page {
font : 9px tahoma;
font-weight : bold;
color : #0280D5;
padding : 1px 3px 1px 3px;
}
.pagelink {
font : 9px tahoma;
font-weight : bold;
color : #000000;
text-decoration : underline;
padding : 1px 3px 1px 3px;
}
.go {
BORDER: #59990e 1px solid;
PADDING-RIGHT: 0.38em;
PADDING-LEFT: 0.38em;
FONT-WEIGHT: bold;
FONT-SIZE: 105%;
BACKGROUND: url(../hr3/hr_report/images/hdr_bg.png) #6eab26 repeat-x 0px -90px;
FLOAT: left;
PADDING-BOTTOM: 0px;
COLOR: #fff;
MARGIN-RIGHT: 0.38em;
PADDING-TOP: 0px;
HEIGHT: 1.77em
}
#bf .go {
FLOAT: none
}
.go:hover {
BORDER: #3f8e00 1px solid;
BACKGROUND: url(../hr3/hr_report/images/hdr_bg.png) #63a218 repeat-x 0px -170px;
}
.q {
BORDER-RIGHT: #5595CC 1px solid;
PADDING-RIGHT: 0.7em;
BORDER-TOP: #5595CC 1px solid;
PADDING-LEFT: 0.7em;
FONT-WEIGHT: normal; FONT-SIZE: 105%;
FLOAT: left;
PADDING-BOTTOM: 0px;
MARGIN: 0px 0.38em 0px 0px;
BORDER-LEFT: #5595CC 1px solid;
WIDTH: 300px;
PADDING-TOP: 0.29em;
BORDER-BOTTOM: #5595CC 1px solid;
HEIGHT: 1.39em
}
.tabberlive .tabbertab {
background-color:#FFFFFF;
height:200px;
}
</style>
<style type="text/css">
<!--
.header1 { font-family:"MS Sans Serif", Tahoma, Arial;
font-size:1em;
font-weight:bold;
color: #FFFFFF;
}
.main { font-family:"MS Sans Serif", Tahoma, Arial;
font-size:0.8em;
color:#FF0000;
font-weight:bold;
}
.normal { font-family:"MS Sans Serif", Tahoma, Arial;
font-size:0.8em;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {color: #FF0000}
-->
</style>
<script language="javascript">
function popWindow(url, w, h){
var popup = "Popup";
if(w == "") w = 550;
if(h == "") h = 450;
var newwin = window.open(url, popup,'location=0,status=no,scrollbars=yes,resizable=yes,width=' + w + ',height=' + h + ',top=20');
newwin.focus();
}
</script>
</head>
<body>
<?
$month=($month)?$month:date('m');
$year=($year)?$year:date('Y');
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<form name="formE" id="formE" action="<?=$PHP_SELF?>?id=<?=$id?>" method="post">
<tr valign="top">
<td bgcolor="#FFFFFF" align="center">
<table width="81%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td colspan="2" align="left" bgcolor="#B0C6E6" class="executive_bg" ><strong>การประชุมหัวหน้าส่วนราชการจังหวัดปทุมธานี</strong></td>
</tr>
</table>
<table width="81%" border="0" cellspacing="1" cellpadding="3">
<?
$id=$_GET['id'];
$min_year="";
$strSQLe = "
SELECT
YEAR(meeting_date) as year,
MONTH(meeting_date) as month,
count(id_sub) as num
FROM tbl_subject
LEFT JOIN org_staffgroup ON tbl_subject.org_owner = org_staffgroup.gid
GROUP BY
YEAR(meeting_date) , MONTH(meeting_date)
"; //WHERE id_sub='$id'
if($debug=="ON"){echo "<pre>$strSQLe</pre>"; }
$Resulte= mysql_db_query($dbname,$strSQLe);
while($Rse = mysql_fetch_assoc($Resulte)){
$arrTag[$Rse['year']][$Rse['month']]=$Rse['num'];
$arrYear[$Rse['year']]=$Rse['year'];
if($Rse['year']<$min_year || $min_year==""){ $min_year=$Rse['year']; }
}
$min_year=$min_year?$min_year:date('Y');
$this_year=date('Y');
?>
<tr>
<? for($ix=$min_year;$ix<=$this_year;$ix++){ ?>
<td align="center" bgcolor="#B0C6E6" class="go" >ปี <?=$ix+543?> </td>
<? }?>
</tr>
<tr>
<? for($ix=$min_year;$ix<=$this_year;$ix++){ ?>
<td align="center" bgcolor="#FFFFFF" class="epm_inputbox">
<table width="100%" border="0" cellspacing="3" cellpadding="1">
<?
foreach($arrThaiMonth as $key => $val){
if($val){
if($arrTag[$ix][$key]){ $tag_select=" onClick=\"window.open('report_public_detail.php?month=$key&year=$ix')\" style=\"cursor:pointer\" ";}else{ $tag_select=""; }
?>
<tr bgcolor="<? echo $bgcolor=($bgcolor=='#EDEDED')?'#FFFFFF':'#EDEDED'?>" <?=$tag_select?> >
<td><? if($arrTag[$ix][$key]){echo "<u>";} echo "<b> $val </b>"; ?></td>
</tr>
<?
}
}
?>
</table>
</td>
<? }?>
</tr>
</table>
</td>
</tr>
</form>
<tr valign="top">
<td> </td>
</tr>
</table>
</body>
</html>