init web ems all

This commit is contained in:
agtuser
2024-09-27 17:13:36 +08:00
parent 81c97acbe9
commit 5cc56f8078
4263 changed files with 798779 additions and 0 deletions

View File

@@ -0,0 +1,205 @@
<?php
/*********************************************************
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B9A9>ģ<EFBFBD><C4A3>CSTA<54><41>ʱ<EFBFBD><CAB1><EFBFBD>ء<EFBFBD>
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
<20><><EFBFBD>ߣ<EFBFBD>lilong 2004-8-27
<EFBFBD>޸<EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
NO.1
Name:Cui Ticun
Date: 2004-9-6
Description:
*********************************************************/
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
adjust_head();
$DEBUG = 0;
global $pubConn;
$pub_db = "OMC_PUB";
$elementTable='elementExistConf';
$helpId = "4.9";
$ThisPage="$strLog&nbsp;>&nbsp;CSTA download";
$blank4 .="&nbsp;&nbsp;&nbsp;&nbsp;";
//select module name from sysInfo.
$selSql = "SELECT sysTypeName FROM sysConf WHERE needCSTA=1 OR needFlow=1 ORDER BY sysTypeNo";
$selRes = @mysqli_query($pubConn,$selSql);
$num = @mysqli_num_rows($selRes);
for($i=0; $i<$num; $i++){
$rows = @mysqli_fetch_array($selRes);
$name[$i] = $rows[sysTypeName];
if($DEBUG){
echo "name[$i] = {$name[$i]}";
echo "<br>";
}
}
/********** FUNCTION START::TREEOLD *************/
function treeOld($directory,$blank,$sys_name)
{
$DEBUG=0;
$mydir=@dir($directory);
if(!$mydir){
echo "<br><br><font size=\"3\" color=\"#FF0000\"><b>Error: can't open this directory: \"$directory\" .It's not exist!</b></font>";
exit();
}
$blank .="<img border=\"0\" src=\"../../images/blank.gif\">"; //<2F><>һ<EFBFBD><D2BB><EFBFBD>հ<EFBFBD>ͼƬ<CDBC><C6AC>ʾÿ<CABE><C3BF>Ŀ¼<C4BF><C2BC><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
$k=0;
while($file=$mydir->read()){
if((is_dir("$directory/$file")) AND ($file!=".") AND ($file!="..")){
continue;
}elseif($file =="." || $file ==".."){
continue;
}else{
if (strstr($file,"Detail") == NULL) continue;
if (strstr($file,$sys_name) == NULL) continue;
if ($sys_name == "pps" && $file[0]=="o") continue;
if (strstr($file,"csv") == NULL) continue;
if (($sys_name=="msc")AND(strstr($file,"smsc") != NULL))
continue;
if(substr("$directory/$file",-2) == 'gz'){
$type_image="<img border=\"0\" src=\"../../images/zip_file.gif\">";
}elseif(substr("$directory/$file",-3) == 'csv'){
$type_image="<img border=\"0\" src=\"../../images/csv_file.gif\">";
}else{
$type_image="<img border=\"0\" src=\"../../images/unknown_file.gif\">";
}
//$fileList[$k] ="<tr><td width=\"50%\">$blank $type_image <a href=\"$directory/$file\" >$file</a></td>";
//target=\"_blank\"
$fileList[$k] ="<tr><td width=\"50%\">$blank $type_image <a href=\"./output_file.php?directory=$directory&filename=$file\" >$file</a></td>";
$k++;
}
}//end of while
$mydir->close();
for($h=0;$h<sizeof($fileList);$h++){
echo "{$fileList[$h]}";
}
} //end the program
/********** FUNCTION END:: TREEOLD *************/
/********** FUNCTION START::TREE *************/
function tree($directory,$blank,$sys_name){
$DEBUG=0;
global $blank4;
/**** START::define last 7 days hours timestamp ******/
for($i=0;$i<7;$i++){
$strYear = date("Y",mktime(0,0,0,date("m"),date("j")-$i,date("Y")));
$strMon = date("m",mktime(0,0,0,date("m"),date("j")-$i,date("Y")));
$strDay = date("d",mktime(0,0,0,date("m"),date("j")-$i,date("Y")));
$strYD['$strDay'] = strtolower($sys_name)."Detail_".$strYear."_".$strMon."_".$strDay;
$tbName[$i] = strtolower($sys_name)."Detail_".$strDay;
/* <20>ж<EFBFBD>tbName[$i]<5D>Ƿ<EFBFBD><C7B7>м<EFBFBD>¼ */
$res = mysql_list_tables("CSTA_DB");
$num = mysqli_num_rows($res);
/*echo
for($j=0; $j<$num; $j++){
$nameExit[$j] = mysql_tablename($res,$i);
echo $nameExit[$j]."<br>";
}*/
echo "<TR><TD>";
echo $blank4;
echo $blank4;
echo "<img border=\"0\" src=\"../../images/csv_file.gif\">";
//echo $strYD['$strDay'];
echo $tbName[$i];
/*
$tgzName = $directory."/".$strYD['$strDay'].".tgz";
//echo $tgzName;
if ( true == file_exists($tgzName) ) {
echo "&nbsp;&nbsp;";
echo "<a href=\"$tgzName\" ><font size=2>tgz</font></a>";
}
*/
echo "</TD></TR>";
echo "<TR><TD>";
echo $blank4;
echo $blank4;
echo $blank4;
for($j=0;$j<24;$j++){
$strHour = date("H",mktime($j,0,0,date("m"),date("j")-$i,date("Y")));
$strYDH["$strDay"]["$strHour"] = strtolower($sys_name)."Detail_".$strYear."_".$strMon."_".$strDay."_".$strHour;
if($DEBUG){
echo "strYDH[$strDay][$strHour]=";
echo $strYDH["$strDay"]["$strHour"];
echo "<br>";
echo "exsitFlag[$strDay][$strHour]=";
echo $exsitFlag["$strDay"]["$strHour"];
echo "<br>";
}
if(1==$exsitFlag["$strDay"]["$strHour"]){
$fileName = $strYDH["$strDay"]["$strHour"].".csv";
echo "<a href=\"$directory/$fileName\" ><font size=2>$j&nbsp;</font></a>";
}else{
echo "<font color=gray size=1>$j&nbsp;</font>";
}
}
echo "</TD></TR>";
}
/**** END::define last 7 days hours timestamp ******/
}
/********** FUNCTION END:: TREE *************/
?>
<?php
adjust_title_head();
echo "<TABLE id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<TR>";
echo "<TD width=\"50%\" align=\"left\">";
echo "$ThisPage";
echo "</TD>";
echo "<TD width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</TD>";
echo "</TR>";
echo "</TABLE>";
adjust_title_tail();
adjust_content_head();
/**************** TABLE START:: DISPLAY DETAILS ************************/
echo "<TABLE width=\"100%\">";
echo "<BR>";
$blank='';
for($i=0; $i<$num; $i++){
$tmpSql = " SELECT * FROM elementExistConf WHERE elementName='$name[$i]' AND existFlag='1'";
if($DEBUG)
echo "<br>tmpSql=$tmpSql";
$tmpRes = mysqli_query($pubConn,$tmpSql);
if(mysqli_num_rows($tmpRes)>0){
$blank="<img border=\"0\" src=\"../../images/blank.gif\">";
echo "<TR><TD colspan=\"4\">$blank<img border=\"0\" src=\"../../images/open.gif\">&nbsp;&nbsp;<b>$name[$i] CSTA</b></TD></TR>\n";
treeold("../../../db_backup/csta",$blank,strtolower($name[$i]));
}
}
//just template user can see the follow files
$highest=sizeof($oper_type) - 1;
echo "</TABLE>";
adjust_content_tail();
/**************** TABLE END:: DISPLAY DETAILS ************************/
?>
</body>
</html>