index.php 2.18 KB
<?php 

header("Content-type: text/html; charset=EUC-JP");

include("include/session_start.inc");
//include("include/dbcon.inc");
include("inc/header.inc");

//session_unregister("PHP_SYAIN_CD");
//session_unregister("PHP_SYAIN_NAME");
session_unregister("PHP_FOLDER");

require_once "jcode.phps";

$strPass=split("/", $_SERVER["SCRIPT_FILENAME"]);
$PHP_FOLDER=$strPass[count($strPass)-2];
session_register("PHP_FOLDER");	
//echo "グループID:media-tek<br>";
//echo "パスワード:mtc";
	$cookGroupID = $_COOKIE["cookie_GroupID"];
	$cookGroupPW = $_COOKIE["cookie_GroupPW"];
//	$strSql = "SELECT info_title,info_value FROM info_tbl ORDER BY date";
//	$rsRecset = pg_exec($pg_con,$strSql);
//	$intRsCnt = pg_numrows($rsRecset);
	
//	$getdb="";
//	for ($i = 0 ; $i <= $intRsCnt-1 ; $i++) {
//		$info_title = JCodeConvert(pg_result($rsRecset,$i,"info_title"),0,1);
//		$info_value = JCodeConvert(pg_result($rsRecset,$i,"info_value"),0,1);
//	}


/*
	$strSQLSyain="SELECT syain_id,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;
	}
	

			
	$SayinCMB = "";
	for ($intCnt = 0; $intCnt < pg_numrows($objRecSyain); $intCnt++) {
		$objSyain = pg_fetch_object($objRecSyain, $intCnt);
		$SayinCMB .= '<OPTION value="'.$objSyain->syain_cd.'"';
		if(($objSyain->syain_cd == $_COOKIE["cookie_syain_cd"]) || $guestid=="guest" ){
			 $SayinCMB .= " selected"; 
		}
		$SayinCMB .= '>'.$objSyain->name_kj_sei.$objSyain->name_kj_mei;

	}

*/

	include('./include/smarty.conf');
	
	if(empty($PHP_SYAIN_NAME)==TRUE){
		$session_chk="true";
	}else{
		$session_chk="true";
		$DISP_URL = "TOP000.php";
	}

	$date_y = date("Y");

	$o_smarty->assign('cookGroupID',$cookGroupID);
	$o_smarty->assign('cookGroupPW',$cookGroupPW);

	$o_smarty->assign('SayinCMB',$SayinCMB);
	$o_smarty->assign('info_title',$info_title);
	$o_smarty->assign('info_value',$info_value);
	$o_smarty->assign('session_true',$session_chk);
	$o_smarty->assign('user_name',$PHP_SYAIN_NAME);
	$o_smarty->assign('DISP_URL',$DISP_URL);
	$o_smarty->assign('date_y',$date_y);

	$o_smarty->display('index.tpl');
?>