index2.php 3.23 KB
<?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>