TIM001.php
2.03 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
<?php
//*****************************************************************************
//*
//* プログラム名:タイムカード
//* プログラムID:TIM001.php
//* 機能 :タイムカード メイン
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("include/session_start.inc");
include("include/SessionChk.inc");
include('./include/smarty.conf');
include("inc/header.inc");
include("inc/TIM001.inc");
include("inc/input_chk.inc");
//メニューセット
include("menu_opacity.php");
$strDBinc="include/dbcon.inc";
include($strDBinc);
//社員情報
$strSQL="select * from syain_tbl where del_flg = true order by disp_rank";
$objRecSet = pg_exec($strSQL);
if($objRecSet==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($objRecSet)>0){
for($i=0;$i<pg_numrows($objRecSet);$i++){
$objRecData = pg_fetch_object($objRecSet, $i);
$strName[$i]=$objRecData->name_kj_sei.$objRecData->name_kj_mei;
$strCD[$i]=$objRecData->syain_cd;
if($objRecData->syain_cd == $PHP_SYAIN_CD){
$strCDSel[$i] = "selected";
}else{
$strCDSel[$i] = "";
}
}
}
//日付
/*
$strY[0] = date("Y") - 1;
$strYSel[0] = "";
$strY[1] = date("Y");
$strYSel[1] = "selected";
$strY[2] = date("Y") + 1;
$strYSel[2] = "";
*/
$tmp=date("Y")-2;
for($i=0;$i<5;$i++){
$strY[$i] = $tmp;
if($tmp==date("Y")){
$strYSel[$i] = "selected";
}else{
$strYSel[$i] = "";
}
$tmp++;
}
for($i=0;$i<12;$i++){
$strM[$i] = $i + 1;
if(date("n") == $i + 1){
$strMSel[$i] = "selected";
}else{
$strMSel[$i] = "";
}
}
$strToday = date("Y年n月j日のタイムカード");
$strSQL="";
$objRec="null";
$o_smarty->assign('PHP_TITLE_NAME',$PHP_TITLE_NAME[19]);
$o_smarty->assign('strName',$strName);
$o_smarty->assign('strCD',$strCD);
$o_smarty->assign('strCDSel',$strCDSel);
$o_smarty->assign('strY',$strY);
$o_smarty->assign('strYSel',$strYSel);
$o_smarty->assign('strM',$strM);
$o_smarty->assign('strMSel',$strMSel);
$o_smarty->assign('strToday',$strToday);
$o_smarty->display('TIM001.tpl');
?>