index2.php
3.23 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
//*****************************************************************************
//*
//* プログラム名:ログイン グループログイン画面
//* プログラムID:index2.php
//* 機能 :
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=Shift_JIS");
include("include_m/dbcon_group.inc");
$strSQLGroup="SELECT group_id,group_pass,db_name,folder_name,group_name,mode_flg,mobile_flg " .
" From mst_group " .
" where mode_flg!=9 and group_id='".$LoginID."' and group_pass='".$Passwd."'";
$objRecGroup = pg_exec($strSQLGroup);
if($objRecGroup==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$GroupRes = pg_numrows($objRecGroup);
if($GroupRes==0){
echo '<HTML>';
echo '<HEAD>';
echo '<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">';
echo '<TITLE>E-グルPro(ログインエラー)</TITLE>';
echo '</HEAD>';
echo '<BODY>';
echo '<form>';
echo "ログインエラー<br>グループID・パスワードが不正です。";
echo "</form>";
echo "</BODY>";
echo "</HTML>";
exit;
}
$objGroup = pg_fetch_object($objRecGroup, 0);
if ((int)$objGroup->mobile_flg==1){
echo '<HTML>';
echo '<HEAD>';
echo '<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">';
echo '<TITLE>E-グルPro(ログインエラー)</TITLE>';
echo '</HEAD>';
echo '<BODY>';
echo '<form>';
echo "ログインエラー<br>E-グルPro携帯電話版はご利用になれません。";
echo "</form>";
echo "</BODY>";
echo "</HTML>";
exit;
}
$P_FOLDER = $objGroup->folder_name;
require_once "include_m/jcode.phps";
include("include_m/dbcon.inc");
//社員名取得
$strSQLSyain="SELECT syain_cd,name_kj_sei,name_kj_mei " .
" From syain_tbl " .
" Where del_flg=true " .
" Order by disp_rank ";
$objRecSyain = pg_exec($strSQLSyain);
if($objRecSyain==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
?>
<!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">
<TITLE>E-グルPro(携帯版)</TITLE>
</HEAD>
<BODY>
<center>E-グルPro(携帯版)</center>
<hr>
<FORM action="loginchk_m.php" method="GET">
ログイン名:<BR>
<SELECT name="LoginID">
<?php
for ($intCnt = 0; $intCnt < pg_numrows($objRecSyain); $intCnt++) {
$objSyain = pg_fetch_object($objRecSyain, $intCnt);
$strSyain_sei=mb_convert_encoding( $objSyain->name_kj_sei, "SJIS", "EUC-JP" );
$strSyain_mei=mb_convert_encoding( $objSyain->name_kj_mei, "SJIS", "EUC-JP" );
?>
<OPTION value="<?php echo $objSyain->syain_cd ?>"><?php echo $strSyain_sei . $strSyain_mei?>
<?php
}
?>
</SELECT><BR>
パスワード:<BR>
<?php
//携帯電話判定
if( eregi( "DoCoMo", $_SERVER["HTTP_USER_AGENT"] )){
?>
<INPUT type="text" maxlength="10" size="14" name="Passwd" istyle="3"><BR>
<?php
}elseif(eregi( "UP.Browser", $_SERVER["HTTP_USER_AGENT"] ) || eregi( "KDDI-", $_SERVER["HTTP_USER_AGENT"] )){
?>
<INPUT type="text" size="14" name="Passwd" format="*m"><BR>
<?php
}else{
?>
<INPUT type="text" size="14" name="Passwd" MODE="alphabet"><BR>
<?php
}
?>
<BR>
<INPUT type="submit" value="ログイン">
<INPUT TYPE="hidden" NAME="P_FOLDER" VALUE="<?php echo $P_FOLDER ?>">
</FORM>
</BODY>
</HTML>