<?php
require("../../inc/header.inc");
require("./function.inc");
?>

<script language="JavaScript">
function toHourPage(sysTypeNo,show_type,page_id,sel_date_from,sel_date_to,keyOne,keyTwo)
{
	parent.location.href="./general_csta_index.php?sysTypeNo="+sysTypeNo+"&show_type=hour&page_id="+page_id+"&sel_date_from="+sel_date_from+"&sel_date_to="+sel_date_to+"&keyOne="+keyOne+'&keyTwo='+keyTwo;
}
</script>

<?php
if($scroll_y > 0){
	echo "<body leftmargin=\"15\" rightmargin=\"10\" onload=\"javascript:scroll_div('$scroll_y');javascript:adjust_frame('down');\" onresize=\"javascript:adjust_frame('down');\" style=\"overflow:hidden;overflow-x:hidden;overflow-y:hidden;\">";
}else{
	echo "<body leftmargin=\"15\" rightmargin=\"10\" onload=\"javascript:adjust_frame('down');\" onresize=\"javascript:adjust_frame('down');\" style=\"overflow:hidden;overflow-x:hidden;overflow-y:hidden;\">";
}	
?>

<form name="myform" action="general_csta_down.php" method="POST">
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");	

//$url_temp=$_SERVER["REQUEST_URI"];
//echo "This page URL:$url_temp<br>";
global $OMC_server;
$sysTypeNo=$_REQUEST['sysTypeNo'];
$objDbConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], 'OBJ_'.$sysTypeNo);

$page_id=$_REQUEST['page_id'];
$show_type=$_REQUEST['show_type'];
$sel_date_from=$_REQUEST['sel_date_from'];
$sel_date_to=$_REQUEST['sel_date_to'];
$keyOne=$_REQUEST['keyOne'];
$keyTwo=$_REQUEST['keyTwo'];
$sel_pod_id=$_REQUEST['sel_pod_id'];
if (!isset($sel_pod_id)|| $sel_pod_id == "") $sel_pod_id = 1;
if(!isset($sel_date_from) || $sel_date_from == "")
	$sel_date_from=0;
if(!isset($sel_date_to) || $sel_date_to == "")
	$sel_date_to=0;
if(!isset($keyOne) || trim($keyOne) == "")
	$keyOne=0;
if(!isset($keyTwo) || trim($keyTwo) == "")
	$keyTwo=0;
//echo "a=$sysTypeNo";
switch($sysTypeNo)
{
case MSC_SYSTYPENO:
	//Service
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./msc_service_day.php");
		}
		else
		{
			include("./msc_service_hour.php");
		}
	}
	//Trunk Group
	else if($page_id == 1)
	{
		if($show_type == "day")
		{
			include("./msc_tg_day.php");
		}
		else
		{
			include("./msc_tg_hour.php");
		}
	}
	else if($page_id == 2)
	{
		include("./msc_erlang.php");
	}
	else if($page_id == 3)
	{
		include("./msc_bhca.php");
	}
	
	break;
case SMSC_SYSTYPENO:
	//Service
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./smsc_service_day.php");
		}
	}
	break;
case VSS_SYSTYPENO:
	//Service
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./vss_service_day.php");
		}
	}
	break;
case AAS_SYSTYPENO:
	//Service
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./aas_service_day.php");
		}
	}
	break;
case SMEG_SYSTYPENO:
	//Service
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./smeg_service_day.php");
		}
	}
	break;
case OPPS_SYSTYPENO:
	//Service
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./opps_service_day.php");
		}
	}
	break;
case iGRS_SYSTYPENO:
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./igrs_service_day.php");
		}
		else
		{
			include("./igrs_service_hour.php");
		}
	}
	break;
case TMG_SYSTYPENO:
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./tmg_service_day.php");
		}
		else
		{
			include("./tmg_service_hour.php");
		}
	}
	break;
case AMRMG_SYSTYPENO:
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./amrmg_service_day.php");
		}
		else
		{
			include("./amrmg_service_hour.php");
		}
	}
	break;
case PALIM_SYSTYPENO:
	//Service
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./ipalim_service_day.php");
		}
		else
		{
			include("./ipalim_service_hour.php");
		}
	}
	//Trunk Group
	else if($page_id == 1)
	{
		if($show_type == "day")
		{
			include("./ipalim_tg_day.php");
		}
		else
		{
			include("./ipalim_tg_hour.php");
		}
	}
	break;
case RLS_SYSTYPENO:
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./irls_service_day.php");
		}
	}
	break;
case MRFC_SYSTYPENO:
	//Service
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./mrfc_service_day.php");
		}
		else
		{
			include("./mrfc_service_hour.php");
		}
	}
	break;
case MHC_SYSTYPENO:
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./mhc_service_day.php");
		}
	}
	break;
case RCS_SYSTYPENO:
	if($page_id == 0)
	{
		if($show_type == "day")
		{
			include("./rcs_service_day.php");
		}
	}
	if($page_id == 1)
	{
		if($show_type == "day")
		{
			include("./rcs_service_pod_day.php");
		}
	}
	break;

case SPGW_SYSTYPENO:
	include("./spgw_day.php");
	break;
default:
	exit("can not find system({$pageConf[SysTypeNo]})");
	break;
}


echo "<input type=\"hidden\" name=\"sysTypeNo\" value=\"$sysTypeNo\">";
echo "<input type=\"hidden\" name=\"show_type\" value=\"$show_type\">";
echo "<input type=\"hidden\" name=\"page_id\" value=\"$page_id\">";
echo "<input type=\"hidden\" name=\"keyOne\" value=\"$keyOne\">";
echo "<input type=\"hidden\" name=\"keyTwo\" value=\"$keyTwo\">";
echo "<input type=\"hidden\" name=\"sel_date_from\" value=\"$sel_date_from\">";
echo "<input type=\"hidden\" name=\"sel_date_to\" value=\"$sel_date_to\">";


adjust_content_tail("down");
?>
</form>
