init web ems all
This commit is contained in:
219
wxc2_omc/sysDefine/ledDef/led_list_down.php
Executable file
219
wxc2_omc/sysDefine/ledDef/led_list_down.php
Executable file
@@ -0,0 +1,219 @@
|
||||
<?php
|
||||
/*************************************************************************
|
||||
* <20>ļ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F2B5A5B8><EFBFBD>LED<45>Ƶĸ<C6B5><C4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* <20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:applet_display.php
|
||||
*
|
||||
*
|
||||
* <20><><EFBFBD>ߣ<EFBFBD>
|
||||
*
|
||||
*<2A><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
*NO.1
|
||||
*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*ʱ<>䣺
|
||||
*<2A><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
*************************************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$DEBUG = 0;
|
||||
$db=$omc_db;
|
||||
$table_name = sysLedConf;
|
||||
?>
|
||||
<base target="main_up" >
|
||||
<BODY bgcolor="#E6E6E6">
|
||||
|
||||
<form method="POST" action="./led_list_up.php">
|
||||
<?php
|
||||
if($mode == 'batch'){
|
||||
//================================================<3D><><EFBFBD><EFBFBD>LED<45><44><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD>趨============================================================
|
||||
if($submode =='mid'){
|
||||
?>
|
||||
<table><tr><td></td><td></td></tr></table>
|
||||
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" width="100%">
|
||||
<tr>
|
||||
<td colspan="3"><?php echo"$strBatchOfLEDClearanceSetting";?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo"$strLEDIDRange";?>:<input type="text" name="bgn_led" size="5">-<input type="text" name="end_led" size="5"></td>
|
||||
<td><?php echo"$strPointOfStart";?>: x:<input type="text" name="bgn_x" maxlength="4" size="5"> y:<input type="text" name="bgn_y" maxlength="4" size="5"></td>
|
||||
<td><?php echo"$strPointOfClearance";?>: x:<input type="text" name="move_x" maxlength="4" size="5">y:<input type="text" name="move_y" maxlength="4" size="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><input type="submit" value="<?php echo "$strSubmit";?>" name="submit"><input type="reset" value="<?php echo "$strCancel";?>" name="reset"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}elseif($submode == 'move'){
|
||||
//================================================<3D><><EFBFBD><EFBFBD>LED<45>趨============================================================
|
||||
?>
|
||||
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" width="100%">
|
||||
<tr>
|
||||
<td colspan="3"><?php echo "$strBatchOfLEDDefineSetting";?></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo"$strLEDIDRange";?>:<input type="text" name="bgn_led" size="5">-<input type="text" name="end_led" size="5"></td>
|
||||
<td>
|
||||
<?php echo"$strSourcePageNumber";?>:<input type="text" name="src_page_type" size="5"><input type="text" name="src_page_num" size="5">
|
||||
<input type=checkbox name="sel_src_page">
|
||||
</td><td>
|
||||
<?php echo"$strTargetPageNumber";?>:<input type="text" name="dst_page_type" size="5"><input type="text" name="dst_page_num" size="5">
|
||||
<input type=checkbox name="sel_dst_page">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
//<2F><>״
|
||||
echo "$strShape";
|
||||
echo "<select size=\"1\" name=\"shape\"> ";
|
||||
echo "<option value=\"0\" {$selected_shape[0]}>$strRound</option>";
|
||||
echo "<option value=\"1\" {$selected_shape[1]}>$strSquare</option>";
|
||||
echo "<option value=\"2\" {$selected_shape[2]}>$strLandscapeRectangle</option>";
|
||||
echo "<option value=\"3\" {$selected_shape[3]}>$strTriangle</option>";
|
||||
echo "<option value=\"4\" {$selected_shape[4]}>$strPortraitRectangle</option>";
|
||||
echo "</select>";
|
||||
echo "<input type=\"checkbox\" name=\"sel_shape\">";
|
||||
echo "</td><td>";
|
||||
//״̬
|
||||
/*
|
||||
$status_arr=array('blink gray','blink green','blink yellow','blink red','blink blue','blink umbra','blink white','not use','gray','green','yellow','red','blue','umbra','white','not use');
|
||||
echo "$strStatus : ";
|
||||
echo "<select size=\"1\" name=\"status\"> ";
|
||||
for($j=0;$j < sizeOf($status_arr);$j++){
|
||||
echo "<option value=\"$j\" ";
|
||||
if($j == 15) echo "selected";
|
||||
echo " >{$status_arr[$j]}</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
*/
|
||||
echo "$strInitLEDStatus";
|
||||
echo "<input type=\"hidden\" name=\"status\" vlaue=\"15151515151515151515151515151515\">";
|
||||
echo "<input type=\"checkbox\" name=\"sel_status\">";
|
||||
echo "</td><td>";
|
||||
//ƫ<><C6AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo "$strPointOfMove";
|
||||
?>
|
||||
x:<input type="text" name="move_x" size="5" value="0">y:<input type="text" name="move_y" size="5" value="0">
|
||||
<input type="submit" value="<?php echo "$strSubmit";?>" name="submit">
|
||||
<input type="reset" value="<?php echo "$strCancel";?>" name="reset"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
}else{
|
||||
//================================================<3D><><EFBFBD><EFBFBD>LED<45><44><EFBFBD>ӻ<EFBFBD><D3BB>趨================================================
|
||||
if(isset($led_num)){
|
||||
echo "Edit LED = $led_num";
|
||||
$sel_sql = "SELECT * FROM $table_name WHERE key_led_num ='$led_num'";
|
||||
$result = mysqli_query($pubConn,$sel_sql);
|
||||
echo mysqli_error($pubConn);
|
||||
if($DEBUG) echo "<br> sel_sql = $sel_sql";
|
||||
$rows = mysqli_fetch_array($result);
|
||||
$shape = $rows[shape];
|
||||
//$status = $rows[key_status];
|
||||
$src_page_type = $rows[key_src_page_type];
|
||||
$src_page_num = $rows[key_src_page_num];
|
||||
$dst_page_type = $rows[dst_page_type];
|
||||
$dst_page_num = $rows[dst_page_num];
|
||||
$point_x = $rows[point_x];
|
||||
$point_y = $rows[point_y];
|
||||
$sync_from_led = $rows[sync_from_led];
|
||||
$remark = $rows[remark];
|
||||
$mode = edit;
|
||||
}else{
|
||||
/*
|
||||
echo "$strAddLED:";
|
||||
echo "ID = <input type=\"text\" name=\"add_led_num\" value=\"\" size=\"8\" maxlength=\"5\" >";
|
||||
$mode = add;
|
||||
*/
|
||||
?>
|
||||
<script LANGUAGE="JavaScript">
|
||||
window.parent.document.body.rows="*,0%";
|
||||
</script>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
|
||||
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||||
<tr bgcolor="#CCFFCC" >
|
||||
<td colspan="2" align="center"><?php echo "$strSourcePage";?></td>
|
||||
<td colspan="2" align="center"><?php echo "$strTargetPage";?></td>
|
||||
<td colspan="1"><?php echo "Sync From Led";?></td>
|
||||
</tr>
|
||||
<tr bgcolor="#CCFFCC">
|
||||
<td><?php echo "$strPageType";?>: <input type="text" name="src_page_type" size="5" maxlength="2" value="<?php echo "$src_page_type";?>"> </td>
|
||||
<td><?php echo "$strPageNumber";?>:<input type="text" name="src_page_num" size="5" maxlength="5" value="<?php echo "$src_page_num"; ?>"> </td>
|
||||
<td><?php echo "$strPageType";?>: <input type="text" name="dst_page_type" size="5" maxlength="3" value="<?php echo "$dst_page_type";?>"> </td>
|
||||
<td><?php echo "$strPageNumber";?>:<input type="text" name="dst_page_num" size="5" maxlength="5" value="<?php echo "$dst_page_num"; ?>"> </td>
|
||||
<td><input type="text" name="sync_from_led" size="10" maxlength="10" value="<?php echo "$sync_from_led";?>"></nobr></td>
|
||||
</tr>
|
||||
<tr bgcolor="#CCFFCC">
|
||||
<td colspan="5">
|
||||
<?php
|
||||
echo "<nobr>";
|
||||
echo "$strShape";
|
||||
echo "<select size=\"1\" name=\"shape\"> ";
|
||||
for($i =0; $i<5;$i++){
|
||||
if($i == $shape){
|
||||
$selected_shape[$i] = 'selected';
|
||||
}
|
||||
}
|
||||
echo "<option value=\"0\" {$selected_shape[0]}>$strRound</option>";
|
||||
echo "<option value=\"1\" {$selected_shape[1]}>$strSquare</option>";
|
||||
echo "<option value=\"2\" {$selected_shape[2]}>$strLandscapeRectangle</option>";
|
||||
echo "<option value=\"3\" {$selected_shape[3]}>$strTriangle</option>";
|
||||
echo "<option value=\"4\" {$selected_shape[4]}>$strPortraitRectangle</option>";
|
||||
echo "</select>";
|
||||
/*
|
||||
$status_arr=array('blink gray','blink green','blink yellow','blink red','blink blue','blink umbra','blink white','not use','gray','green','yellow','red','blue','umbra','white','not use');
|
||||
echo "$strStatus";
|
||||
echo "<select size=\"1\" name=\"status\"> ";
|
||||
for($j=0;$j < sizeOf($status_arr);$j++){
|
||||
echo "<option value=\"$j\" ";
|
||||
if($j == $status){
|
||||
echo "selected";
|
||||
}
|
||||
echo ">{$status_arr[$j]}</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php echo "$strPoint";?>:
|
||||
x=<input type="text" name="point_x" size="3" maxlength="3" value="<?php echo "$point_x";?>">,
|
||||
y=<input type="text" name="point_y" size="3" maxlength="3" value="<?php echo "$point_y";?>">
|
||||
<?php echo "$strRemark";?> <input type="text" name="remark" size="25" maxlength="32" value="<?php echo "$remark";?>" >
|
||||
<input type="submit" value="<?php echo "$strSubmit";?>" name="submit"><input type="reset" value="<?php echo "$strCancel";?>" name="reset">
|
||||
</nobr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
if($mode == 'edit'){
|
||||
echo "\n <input type=\"hidden\" name=\"selected_led_num\" value=\"$led_num\">";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script LANGUAGE="JavaScript">
|
||||
window.parent.document.body.rows="*,20%";
|
||||
</script>
|
||||
<?php
|
||||
echo "\n <input type=\"hidden\" name=\"mode\" value=\"$mode\">";
|
||||
echo "\n <input type=\"hidden\" name=\"sel_page\" value=\"$sel_page\">";
|
||||
echo "\n <input type=\"hidden\" name=\"initial_record\" value=\"$initial_record\">";
|
||||
echo "\n <input type=\"hidden\" name=\"number_of_records\" value=\"$number_of_records\">";
|
||||
echo "\n <input type=\"hidden\" name=\"scroll_y\" value=\"$scroll_y\">";
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
32
wxc2_omc/sysDefine/ledDef/led_list_index.php
Executable file
32
wxc2_omc/sysDefine/ledDef/led_list_index.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*************************************************************************
|
||||
* <20>ļ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:ϵͳ״̬<D7B4><CCAC>ʾҳ<CABE>棬<EFBFBD><E6A3AC><EFBFBD><EFBFBD>Applet<65><74>
|
||||
*
|
||||
* <20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:applet_router.php
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:left_menu.php
|
||||
*
|
||||
*
|
||||
* <20><><EFBFBD>ߣ<EFBFBD>
|
||||
*
|
||||
*<2A><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
*NO.1
|
||||
*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*ʱ<>䣺
|
||||
*<2A><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
*************************************************************************/
|
||||
require("../../inc/header.inc");
|
||||
?>
|
||||
<frameset rows="*,0%" framespacing="0" border="0" frameborder="0">
|
||||
<frame name="main_up" src="led_list_up.php">
|
||||
<frame name="footnotes" target="main_up" src="led_list_down.php">
|
||||
<noframes>
|
||||
<body>
|
||||
|
||||
<p><3E><><EFBFBD><EFBFBD>ҳʹ<D2B3><CAB9><EFBFBD>˿<EFBFBD><CBBF>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD>ֿ<EFBFBD><D6BF>ܡ<EFBFBD></p>
|
||||
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
|
||||
</html>
|
||||
252
wxc2_omc/sysDefine/ledDef/led_list_up.php
Executable file
252
wxc2_omc/sysDefine/ledDef/led_list_up.php
Executable file
@@ -0,0 +1,252 @@
|
||||
<?php
|
||||
/*************************************************************************
|
||||
* <20>ļ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:<3A>б<EFBFBD><D0B1><EFBFBD>ʾLED<45>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD>ṩ<EFBFBD><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* <20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:applet_display.php
|
||||
*
|
||||
*
|
||||
* <20><><EFBFBD>ߣ<EFBFBD>
|
||||
*
|
||||
|
||||
*<2A><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
*NO.1
|
||||
*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*ʱ<>䣺
|
||||
*<2A><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
*************************************************************************/
|
||||
require("../../inc/header.inc");
|
||||
@set_time_limit(600);
|
||||
$DEBUG = 0;
|
||||
$db=$omc_db;
|
||||
$table_name = sysLedConf;
|
||||
$sort_field = 'key_src_page_type,key_led_num';
|
||||
$sort_direction = 'ASC';
|
||||
$number_records_to_display = 200;
|
||||
|
||||
//<2F>ֶ<EFBFBD><D6B6><EFBFBD>
|
||||
//key_led_num shape key_status key_src_page_type key_src_page_num dst_page_type dst_page_num point_x point_y width height remark update_time
|
||||
if(!isset($sel_page)){
|
||||
$sel_page='0_20480';
|
||||
}
|
||||
$tmpArr=explode('_',$sel_page);
|
||||
$sel_src_page_type = $tmpArr[0];
|
||||
$sel_src_page_num = $tmpArr[1];
|
||||
if($DEBUG) echo "<br>sel_src_page_type=$sel_src_page_type";
|
||||
if($DEBUG) echo "<br>sel_src_page_num=$sel_src_page_num";
|
||||
|
||||
//---------------------------<2D><><EFBFBD><EFBFBD>-----------------------------
|
||||
if($mode == 'edit' && isset($selected_led_num)){
|
||||
$update_sql = "UPDATE $table_name
|
||||
SET shape ='$shape',
|
||||
key_src_page_type = '$src_page_type',
|
||||
key_src_page_num = '$src_page_num',
|
||||
dst_page_type = '$dst_page_type',
|
||||
dst_page_num = '$dst_page_num',
|
||||
point_x = '$point_x',
|
||||
point_y = '$point_y',
|
||||
remark = '$remark',
|
||||
sync_from_led = '$sync_from_led'
|
||||
WHERE key_led_num ='$selected_led_num'
|
||||
";
|
||||
mysqli_query($pubConn,$update_sql);
|
||||
if($DEBUG) echo "<br> update_sql = $update_sql";
|
||||
echo mysqli_error($pubConn);
|
||||
}
|
||||
|
||||
|
||||
function get_page_id($page_type,$page_num,$offset){
|
||||
$offset = array(20480,20489,20577);
|
||||
if($page_type < 50){
|
||||
$type_offset = $offset[$page_type];
|
||||
switch($page_type){
|
||||
case 0:
|
||||
$page_type = "Map";
|
||||
break;
|
||||
case 1:
|
||||
$page_type = "Central_office";
|
||||
break;
|
||||
case 2:
|
||||
$page_type = "BSS";
|
||||
break;
|
||||
default:
|
||||
$page_type = "unkown";
|
||||
return($page_type);
|
||||
}
|
||||
$page_num = $page_num - $type_offset;
|
||||
$page_id = $page_type.' - '.$page_num;
|
||||
}else{
|
||||
$sys_code = $page_type - 50;
|
||||
$sys_type = omc_sys_code2type($sys_code);
|
||||
//echo "<br>sys_type=$sys_type";
|
||||
$sys_num = substr($page_num,0,2);
|
||||
$subsys_num = substr($page_num,2,2);
|
||||
$sys_id = $sys_type.'_'.$sys_num.'_'.$subsys_num;
|
||||
$page_id = $sys_id;
|
||||
}
|
||||
return($page_id);
|
||||
}
|
||||
|
||||
function get_status($status_num)
|
||||
{
|
||||
$status=array('blink gray','blink green','blink yellow','blink red','blink blue','blink umbra','blink white','not use','gray','green','yellow','red','blue','umbra','white','not use');
|
||||
for($i=0;$i < sizeOf($status);$i++){
|
||||
if($i == $status_num){
|
||||
return($status[$i]);
|
||||
}elseif($i == sizeOf($status)){
|
||||
return('unkown');
|
||||
}else{
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<script LANGUAGE="JavaScript">
|
||||
function select_led(link_var){
|
||||
var base_url,url,y;
|
||||
base_url='./led_list_down.php?<?php echo "sel_page=$sel_page";?>&';
|
||||
x = document.body.scrollLeft;
|
||||
y = document.body.scrollTop;
|
||||
url=base_url+link_var+'&scroll_y='+y;
|
||||
window.parent.footnotes.location=url;
|
||||
}
|
||||
function select_page(){
|
||||
var base_url,url_add,url;
|
||||
base_url='./led_list_up.php?<?php echo "sel_page=";?>';
|
||||
url_add=document.selectform.page_list.options[document.selectform.page_list.selectedIndex].value;
|
||||
url=base_url+url_add;
|
||||
window.location=url;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
//--------------------------------<2D>б<EFBFBD><D0B1><EFBFBD>ʾ-----------------------------------------------
|
||||
echo "<form name=\"selectform\" method=\"POST\" action=\"./led_set_up.php\" >";
|
||||
|
||||
$led_page_def = array(
|
||||
array('Map', 0, 20480),
|
||||
array('Central Office', 1, 20489),
|
||||
array('BSS-0', 2 ,20577),
|
||||
array('BSS-1', 2 ,20578),
|
||||
array('BSS-2', 2 ,20579),
|
||||
array('BSS-3', 2 ,20580),
|
||||
array('BSS-4', 2 ,20581),
|
||||
array('BSS-5', 2 ,20582),
|
||||
array('BSS-6', 2 ,20583),
|
||||
array('BSS-7', 2 ,20584),
|
||||
array('BSS-8', 2 ,20585),
|
||||
array('BSS-9', 2 ,20586),
|
||||
array('BSS-10', 2 ,20587),
|
||||
array('BSS-11', 2 ,20588)
|
||||
);
|
||||
echo "<select size=\"1\" name=\"page_list\" onChange=\"javascript:select_page()\"> ";
|
||||
for($i=0;$i < sizeof($led_page_def);$i++){
|
||||
$pageName = $led_page_def[$i][0];
|
||||
$pageTypeNo = $led_page_def[$i][1];
|
||||
$pageNo = $led_page_def[$i][2];
|
||||
if($pageTypeNo == $sel_src_page_type && $pageNo == $sel_src_page_num){
|
||||
$isSelected = 'selected';
|
||||
}else{
|
||||
$isSelected = '';
|
||||
}
|
||||
echo "<option value=\"$pageTypeNo"."_$pageNo\" $isSelected >$pageName</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
|
||||
|
||||
if($scroll_y > 0){
|
||||
echo "<body onLoad='self.scrollBy(0,"."$scroll_y".")'>";
|
||||
}else{
|
||||
echo "<body>";
|
||||
}
|
||||
$sel_sql = "SELECT * FROM $table_name
|
||||
WHERE key_src_page_type = '$sel_src_page_type'
|
||||
AND key_src_page_num = '$sel_src_page_num'
|
||||
AND point_x != '999'
|
||||
ORDER BY $sort_field $sort_direction
|
||||
";
|
||||
$result = mysqli_query($pubConn,$sel_sql);
|
||||
echo mysqli_error($pubConn);
|
||||
if($DEBUG)
|
||||
echo "<br> sel_sql = $sel_sql";
|
||||
$rows = mysqli_fetch_array($result);
|
||||
?>
|
||||
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||||
<tr bgcolor="#E6E6E6">
|
||||
<td width="5%">LED_ID</td>
|
||||
<!--<td width="10%"><?php echo "$strStatus";?></td> -->
|
||||
<td width="20%"><?php echo "$strShape";?></td>
|
||||
<td width="15%"><?php echo "$strSourcePage";?></td>
|
||||
<!--<td width="15%"><?php echo "$strTargetPage";?></td> -->
|
||||
<td width="10%"><?php echo "$strPoint";?></td>
|
||||
<td width="30%"><?php echo "$strRemark";?></td>
|
||||
<td width="5%" > </td>
|
||||
</tr>
|
||||
<?php
|
||||
$k=0;
|
||||
do{
|
||||
$led_num = $rows[key_led_num];
|
||||
//=0,Բ<><D4B2>=1,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=2,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=3,<2C><><EFBFBD><EFBFBD>
|
||||
switch($rows[shape]){
|
||||
case '0':
|
||||
$shape = "$strRound";
|
||||
break;
|
||||
case '1':
|
||||
$shape = "$strSquare";
|
||||
break;
|
||||
case '2':
|
||||
$shape = "$strLandscapeRectangle";
|
||||
break;
|
||||
case '3':
|
||||
$shape = "$strTriangle";
|
||||
break;
|
||||
case '4':
|
||||
$shape = "$strPortraitRectangle";
|
||||
break;
|
||||
case '5':
|
||||
$shape = "Cover EAN";
|
||||
break;
|
||||
default:
|
||||
$shape= "unkown";
|
||||
break;
|
||||
}
|
||||
$src_page_id = get_page_id($rows[key_src_page_type],$rows[key_src_page_num],$offset);
|
||||
$dst_page_id = get_page_id($rows[dst_page_type],$rows[dst_page_num],$offset);
|
||||
$remark = $rows[remark];
|
||||
if($led_num == $selected_led_num){
|
||||
$bgcolor = "bgcolor=\"#CCFFCC\"";
|
||||
// }elseif($k % 16 == 0){
|
||||
// $bgcolor = "bgcolor=\"#CCFFCC\"";
|
||||
}else{
|
||||
$bgcolor = '';
|
||||
}
|
||||
if($led_num < $divide_number){
|
||||
$status_offset =($led_num%16)*2;
|
||||
}else{
|
||||
$status_offset = 0;
|
||||
}
|
||||
$status_substr = substr($status_rows[key_status],$status_offset,2);
|
||||
$status = get_status(0);
|
||||
|
||||
echo "<tr $bgcolor>";
|
||||
//Echo "<tr>";
|
||||
echo "<td width=\"5%\">$led_num</td>";
|
||||
//echo "<td width=\"10%\">$status</td>";
|
||||
echo "<td width=\"10%\">$shape</td>";
|
||||
echo "<td width=\"15%\">$src_page_id</td>";
|
||||
//echo "<td width=\"15%\">$dst_page_id</td>";
|
||||
echo "<td width=\"10%\">($rows[point_x],$rows[point_y])</td>";
|
||||
echo "<td width=\"30%\">$remark</td>";
|
||||
echo "<td width=\"5%\"><a href=javascript:select_led('led_num=$led_num&mode=edit')> Edit </a></td>";
|
||||
echo "</tr>";
|
||||
|
||||
$k++;
|
||||
}while($rows = mysqli_fetch_array($result));
|
||||
?>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
220
wxc2_omc/sysDefine/ledDef/led_set_down.php
Executable file
220
wxc2_omc/sysDefine/ledDef/led_set_down.php
Executable file
@@ -0,0 +1,220 @@
|
||||
<?php
|
||||
/*************************************************************************
|
||||
* <20>ļ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F2B5A5B8><EFBFBD>LED<45>Ƶĸ<C6B5><C4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* <20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:applet_display.php
|
||||
*
|
||||
*
|
||||
* <20><><EFBFBD>ߣ<EFBFBD>
|
||||
*
|
||||
*<2A><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
*NO.1
|
||||
*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*ʱ<>䣺
|
||||
*<2A><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
*************************************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$DEBUG = 0;
|
||||
$db=$omc_db;
|
||||
$table_name = sysLedConf;
|
||||
?>
|
||||
<base target="main_up" >
|
||||
<BODY>
|
||||
|
||||
<form method="POST" action="./led_set_list.php">
|
||||
<?php
|
||||
if($mode == 'batch'){
|
||||
//================================================<3D><><EFBFBD><EFBFBD>LED<45><44><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD>趨============================================================
|
||||
if($submode =='mid'){
|
||||
?>
|
||||
<table><tr><td></td><td></td></tr></table>
|
||||
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" width="100%">
|
||||
<tr>
|
||||
<td colspan="3"><?php echo"$strBatchOfLEDClearanceSetting";?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo"$strLEDIDRange";?>:<input type="text" name="bgn_led" size="5">-<input type="text" name="end_led" size="5"></td>
|
||||
<td><?php echo"$strPointOfStart";?>: x:<input type="text" name="bgn_x" maxlength="4" size="5"> y:<input type="text" name="bgn_y" maxlength="4" size="5"></td>
|
||||
<td><?php echo"$strPointOfClearance";?>: x:<input type="text" name="move_x" maxlength="4" size="5">y:<input type="text" name="move_y" maxlength="4" size="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><input type="submit" value="<?php echo "$strSubmit";?>" name="submit"><input type="reset" value="<?php echo "$strCancel";?>" name="reset"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}elseif($submode == 'move'){
|
||||
//================================================<3D><><EFBFBD><EFBFBD>LED<45>趨============================================================
|
||||
?>
|
||||
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" width="100%">
|
||||
<tr>
|
||||
<td colspan="3"><?php echo "$strBatchOfLEDDefineSetting";?></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo"$strLEDIDRange";?>:<input type="text" name="bgn_led" size="5">-<input type="text" name="end_led" size="5"></td>
|
||||
<td>
|
||||
<?php echo"$strSourcePageNumber";?>:<input type="text" name="src_page_type" size="5"><input type="text" name="src_page_num" size="5">
|
||||
<input type=checkbox name="sel_src_page">
|
||||
</td><td>
|
||||
<?php echo"$strTargetPageNumber";?>:<input type="text" name="dst_page_type" size="5"><input type="text" name="dst_page_num" size="5">
|
||||
<input type=checkbox name="sel_dst_page">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
//<2F><>״
|
||||
echo "$strShape";
|
||||
echo "<select size=\"1\" name=\"shape\"> ";
|
||||
echo "<option value=\"0\" {$selected_shape[0]}>$strRound</option>";
|
||||
echo "<option value=\"1\" {$selected_shape[1]}>$strSquare</option>";
|
||||
echo "<option value=\"2\" {$selected_shape[2]}>$strLandscapeRectangle</option>";
|
||||
echo "<option value=\"3\" {$selected_shape[3]}>$strTriangle</option>";
|
||||
echo "<option value=\"4\" {$selected_shape[4]}>$strPortraitRectangle</option>";
|
||||
echo "</select>";
|
||||
echo "<input type=\"checkbox\" name=\"sel_shape\">";
|
||||
echo "</td><td>";
|
||||
//״̬
|
||||
/*
|
||||
$status_arr=array('blink gray','blink green','blink yellow','blink red','blink blue','blink umbra','blink white','not use','gray','green','yellow','red','blue','umbra','white','not use');
|
||||
echo "$strStatus : ";
|
||||
echo "<select size=\"1\" name=\"status\"> ";
|
||||
for($j=0;$j < sizeOf($status_arr);$j++){
|
||||
echo "<option value=\"$j\" ";
|
||||
if($j == 15) echo "selected";
|
||||
echo " >{$status_arr[$j]}</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
*/
|
||||
echo "$strInitLEDStatus";
|
||||
echo "<input type=\"hidden\" name=\"status\" vlaue=\"15151515151515151515151515151515\">";
|
||||
echo "<input type=\"checkbox\" name=\"sel_status\">";
|
||||
echo "</td><td>";
|
||||
//ƫ<><C6AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo "$strPointOfMove";
|
||||
?>
|
||||
x:<input type="text" name="move_x" size="5" value="0">y:<input type="text" name="move_y" size="5" value="0">
|
||||
<input type="submit" value="<?php echo "$strSubmit";?>" name="submit">
|
||||
<input type="reset" value="<?php echo "$strCancel";?>" name="reset"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
}else{
|
||||
//================================================<3D><><EFBFBD><EFBFBD>LED<45><44><EFBFBD>ӻ<EFBFBD><D3BB>趨================================================
|
||||
if(isset($led_num)){
|
||||
echo "Edit LED = $led_num";
|
||||
$sel_sql = "SELECT * FROM $table_name WHERE key_led_num ='$led_num'";
|
||||
$result = mysqli_query($pubConn,$sel_sql);
|
||||
echo mysqli_error($pubConn);
|
||||
if($DEBUG) echo "<br> sel_sql = $sel_sql";
|
||||
$rows = mysqli_fetch_array($result);
|
||||
$shape = $rows[shape];
|
||||
//$status = $rows[key_status];
|
||||
$src_page_type = $rows[key_src_page_type];
|
||||
$src_page_num = $rows[key_src_page_num];
|
||||
$dst_page_type = $rows[dst_page_type];
|
||||
$dst_page_num = $rows[dst_page_num];
|
||||
$point_x = $rows[point_x];
|
||||
$point_y = $rows[point_y];
|
||||
$src_led = $rows[sync_from_led];
|
||||
$remark = $rows[remark];
|
||||
$mode = edit;
|
||||
}else{
|
||||
/*
|
||||
echo "$strAddLED:";
|
||||
echo "ID = <input type=\"text\" name=\"add_led_num\" value=\"\" size=\"8\" maxlength=\"5\" >";
|
||||
$mode = add;
|
||||
*/
|
||||
?>
|
||||
<script LANGUAGE="JavaScript">
|
||||
window.parent.document.body.rows="*,0%";
|
||||
</script>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
|
||||
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||||
<tr bgcolor="#CCFFCC" >
|
||||
<td colspan="2" align="center"><?php echo "$strSourcePage";?></td>
|
||||
<td colspan="2" align="center"><?php echo "$strTargetPage";?></td>
|
||||
<td colspan="1"><?php echo "Source led num";?></td>
|
||||
</tr>
|
||||
<tr bgcolor="#CCFFCC">
|
||||
<td><?php echo "$strPageType";?>: <input type="text" name="src_page_type" size="5" maxlength="2" value="<?php echo "$src_page_type";?>"> </td>
|
||||
<td><?php echo "$strPageNumber";?>:<input type="text" name="src_page_num" size="5" maxlength="5" value="<?php echo "$src_page_num"; ?>"> </td>
|
||||
<td><?php echo "$strPageType";?>: <input type="text" name="dst_page_type" size="5" maxlength="3" value="<?php echo "$dst_page_type";?>"> </td>
|
||||
<td><?php echo "$strPageNumber";?>:<input type="text" name="dst_page_num" size="5" maxlength="5" value="<?php echo "$dst_page_num"; ?>"> </td>
|
||||
<td><input type="text" name="src_led" size="10" maxlength="10" value="<?php echo "$src_led";?>"></nobr></td>
|
||||
</tr>
|
||||
<tr bgcolor="#C0C0C0">
|
||||
<td colspan="5">
|
||||
<?php
|
||||
echo "<nobr>";
|
||||
echo "$strShape";
|
||||
echo "<select size=\"1\" name=\"shape\"> ";
|
||||
for($i =0; $i<5;$i++){
|
||||
if($i == $shape){
|
||||
$selected_shape[$i] = 'selected';
|
||||
}
|
||||
}
|
||||
echo "<option value=\"0\" {$selected_shape[0]}>$strRound</option>";
|
||||
echo "<option value=\"1\" {$selected_shape[1]}>$strSquare</option>";
|
||||
echo "<option value=\"2\" {$selected_shape[2]}>$strLandscapeRectangle</option>";
|
||||
echo "<option value=\"3\" {$selected_shape[3]}>$strTriangle</option>";
|
||||
echo "<option value=\"4\" {$selected_shape[4]}>$strPortraitRectangle</option>";
|
||||
echo "</select>";
|
||||
/*
|
||||
$status_arr=array('blink gray','blink green','blink yellow','blink red','blink blue','blink umbra','blink white','not use','gray','green','yellow','red','blue','umbra','white','not use');
|
||||
echo "$strStatus";
|
||||
echo "<select size=\"1\" name=\"status\"> ";
|
||||
for($j=0;$j < sizeOf($status_arr);$j++){
|
||||
echo "<option value=\"$j\" ";
|
||||
if($j == $status){
|
||||
echo "selected";
|
||||
}
|
||||
echo ">{$status_arr[$j]}</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php echo "$strPointOfMove";?>:
|
||||
x=<input type="text" name="point_x" size="3" maxlength="3" value="<?php echo "$point_x";?>">,
|
||||
y=<input type="text" name="point_y" size="3" maxlength="3" value="<?php echo "$point_y";?>">
|
||||
<?php echo "$strRemark";?> <input type="text" name="remark" size="25" maxlength="32" value="<?php echo "$remark";?>" >
|
||||
<input type="submit" value="<?php echo "$strSubmit";?>" name="submit"><input type="reset" value="<?php echo "$strCancel";?>" name="reset">
|
||||
</nobr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
if($mode == 'edit'){
|
||||
echo "\n <input type=\"hidden\" name=\"selected_led_num\" value=\"$led_num\">";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script LANGUAGE="JavaScript">
|
||||
window.parent.document.body.rows="*,20%";
|
||||
</script>
|
||||
<?php
|
||||
echo "\n <input type=\"hidden\" name=\"mode\" value=\"$mode\">";
|
||||
echo "\n <input type=\"hidden\" name=\"submode\" value=\"$submode\">";
|
||||
echo "\n <input type=\"hidden\" name=\"all_page_num\" value=\"$all_page_num\">";
|
||||
echo "\n <input type=\"hidden\" name=\"initial_record\" value=\"$initial_record\">";
|
||||
echo "\n <input type=\"hidden\" name=\"number_of_records\" value=\"$number_of_records\">";
|
||||
echo "\n <input type=\"hidden\" name=\"scroll_y\" value=\"$scroll_y\">";
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
32
wxc2_omc/sysDefine/ledDef/led_set_index.php
Executable file
32
wxc2_omc/sysDefine/ledDef/led_set_index.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*************************************************************************
|
||||
* <20>ļ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:ϵͳ״̬<D7B4><CCAC>ʾҳ<CABE>棬<EFBFBD><E6A3AC><EFBFBD><EFBFBD>Applet<65><74>
|
||||
*
|
||||
* <20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:applet_router.php
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:left_menu.php
|
||||
*
|
||||
*
|
||||
* <20><><EFBFBD>ߣ<EFBFBD>
|
||||
*
|
||||
*<2A><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
*NO.1
|
||||
*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*ʱ<>䣺
|
||||
*<2A><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
*************************************************************************/
|
||||
require("../../inc/header.inc");
|
||||
?>
|
||||
<frameset rows="*,0%" framespacing="0" border="0" frameborder="0">
|
||||
<frame name="main_up" src="led_set_list.php">
|
||||
<frame name="footnotes" target="main_up" src="led_set_down.php">
|
||||
<noframes>
|
||||
<body>
|
||||
|
||||
<p><3E><><EFBFBD><EFBFBD>ҳʹ<D2B3><CAB9><EFBFBD>˿<EFBFBD><CBBF>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD>ֿ<EFBFBD><D6BF>ܡ<EFBFBD></p>
|
||||
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
|
||||
</html>
|
||||
391
wxc2_omc/sysDefine/ledDef/led_set_up.php
Executable file
391
wxc2_omc/sysDefine/ledDef/led_set_up.php
Executable file
@@ -0,0 +1,391 @@
|
||||
<?php
|
||||
/*************************************************************************
|
||||
* <20>ļ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:<3A>б<EFBFBD><D0B1><EFBFBD>ʾLED<45>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD>ṩ<EFBFBD><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* <20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:applet_display.php
|
||||
*
|
||||
*
|
||||
* <20><><EFBFBD>ߣ<EFBFBD>
|
||||
*
|
||||
*<2A><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
*NO.1
|
||||
*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*ʱ<>䣺
|
||||
*<2A><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
*************************************************************************/
|
||||
require("../../inc/header.inc");
|
||||
@set_time_limit(600);
|
||||
$DEBUG = 0;
|
||||
$db=$omc_db;
|
||||
$table_name = sysLedConf;
|
||||
$sort_field = 'key_led_num';
|
||||
$sort_direction = 'ASC';
|
||||
$number_records_to_display = 160;
|
||||
$divide_number = 20480;
|
||||
if($DEBUG) echo "<br> mode = $mode, submode = $submode";
|
||||
//key_led_num shape key_status key_src_page_type key_src_page_num dst_page_type dst_page_num point_x point_y width height remark update_time
|
||||
|
||||
|
||||
//===========================================<3D><><EFBFBD><EFBFBD>LED<45><44><EFBFBD>»<EFBFBD><C2BB><EFBFBD><EFBFBD><EFBFBD>=====================================================
|
||||
//---------------------------<2D><><EFBFBD><EFBFBD>-----------------------------
|
||||
if($mode == 'edit' && isset($selected_led_num)){
|
||||
$update_sql = "UPDATE $table_name
|
||||
SET shape ='$shape',
|
||||
key_src_page_type = '$src_page_type',
|
||||
key_src_page_num = '$src_page_num',
|
||||
dst_page_type = '$dst_page_type',
|
||||
dst_page_num = '$dst_page_num',
|
||||
point_x = '$point_x',
|
||||
point_y = '$point_y',
|
||||
remark = '$remark',
|
||||
sync_from_led = '$src_led'
|
||||
WHERE key_led_num ='$selected_led_num'
|
||||
";
|
||||
mysqli_query($pubConn,$update_sql);
|
||||
if($DEBUG) echo "<br> update_sql = $update_sql";
|
||||
echo mysqli_error($pubConn);
|
||||
//---------------------------<2D><><EFBFBD><EFBFBD>-----------------------------
|
||||
}elseif($mode == 'add'){
|
||||
$insert_sql = "INSERT INTO $table_name
|
||||
(key_led_num,shape,key_status,key_src_page_type,key_src_page_num,dst_page_type,dst_page_num,point_x,point_y,width,height,remark)
|
||||
VALUES
|
||||
('$add_led_num','$shape','15','$src_page_type','$src_page_num','$dst_page_type','$dst_page_num','$point_x','$point_y','1','1','$remark')
|
||||
";
|
||||
if($DEBUG) echo "<br> $insert_sql";
|
||||
mysqli_query($pubConn,$insert_sql);
|
||||
echo mysqli_error($pubConn);
|
||||
//==================================================<3D><><EFBFBD><EFBFBD>LED<45><44><EFBFBD><EFBFBD>============================================================
|
||||
//--------------------------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>------------------------------
|
||||
}elseif($mode == 'batch' && $submode == 'move'){
|
||||
$move_x = $move_x -0;
|
||||
$move_y = $move_y -0;
|
||||
if($DEBUG) echo "<br>sel_src_page = $sel_src_page,sel_dst_page = $sel_dst_page,sel_shape = $sel_shape,sel_status = $sel_status";
|
||||
$src_page_sql = ($sel_src_page == 'on')?" key_src_page_type = '$src_page_type', key_src_page_num = '$src_page_num', ":'';
|
||||
$dst_page_sql = ($sel_dst_page == 'on')?" dst_page_type = '$dst_page_type', dst_page_num = '$dst_page_num', ":'';
|
||||
$shape_sql = ($sel_shape == 'on')?" shape ='$shape', ":'';
|
||||
$status_sql = ($sel_status == 'on')?" key_status ='$status', ":'';
|
||||
$point_sql = "point_x = (point_x + $move_x), point_y = (point_y + $move_y) ";
|
||||
$where_sql = "WHERE key_led_num >='$bgn_led' AND key_led_num <='$end_led'";
|
||||
|
||||
//-------<2D><><EFBFBD><EFBFBD>ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>-------
|
||||
$update_sql = "UPDATE $table_name SET ".$src_page_sql.$dst_page_sql.$shape_sql.$status_sql.$point_sql.$where_sql;
|
||||
mysqli_query($pubConn,$update_sql);
|
||||
if($DEBUG) echo "<br> update_sql = $update_sql";
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
//-----------<2D><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD>LED״̬----------
|
||||
if($sel_status == 'on'){
|
||||
//--<2D><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>---
|
||||
$update_status_sql = "UPDATE sysLedStat
|
||||
SET key_status='15151515151515151515151515151515'
|
||||
WHERE if(key_led_num < '$divide_number',key_led_num >= FLOOR($bgn_led/16),key_led_num >= '$bgn_led')
|
||||
AND if(key_led_num < '$divide_number',key_led_num <= FLOOR($end_led/16),key_led_num <= '$end_led')
|
||||
";
|
||||
mysqli_query($pubConn,$update_status_sql);
|
||||
if($DEBUG) echo "<br> update_status_sql = $update_status_sql";
|
||||
echo mysqli_error($pubConn);
|
||||
//--<2D><>ʶ<EFBFBD><CAB6><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>---
|
||||
//ɾ<><C9BE>LED״̬<D7B4><CCAC><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>5<EFBFBD><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
||||
//byte0<65><30>0/1/2/3=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>/<2F><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
|
||||
//byte1-4<><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>LED<45><44>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>
|
||||
//byte5-8<><38><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>LED<45><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//ע<><D7A2>LED<45>Ʊ<EFBFBD><C6B1><EFBFBD>Ϊ16<31><36><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻɾ<D6BB><C9BE>һ<EFBFBD><D2BB>LED<45><44>LED<45><44>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//<2F><><EFBFBD>磺<EFBFBD><E7A3BA>1000F000F<30><46><EFBFBD><EFBFBD>ʾɾ<CABE><C9BE>LED15
|
||||
|
||||
$shm_offset = 1;
|
||||
$bgn_led_hex = dechex($bgn_led);
|
||||
$bgn_led_hex = omc_keep_length($bgn_led_hex,0,4);
|
||||
$end_led_hex = dechex($end_led);
|
||||
$end_led_hex = omc_keep_length($end_led_hex,0,4);
|
||||
$shm_value = '1'.$bgn_led_hex.$end_led_hex;
|
||||
if($DEBUG) echo "<br> set:$shm_value";
|
||||
$shm_result = omc_set_shm($shm_value,$shm_offset);
|
||||
if($shm_result < 0){
|
||||
echo "<br><font size=\"3\" color =\"#ff0000\">Set LED(from $bgn_led to $end_led) fail,Please try again[can not write share memory]</font>";
|
||||
}else{
|
||||
sleep(5);
|
||||
$shm_count = 9;
|
||||
$shm_result = omc_get_shm($shm_offset,$shm_count);
|
||||
if($DEBUG) echo "<br> get:$shm_result";
|
||||
$shm_result = substr($shm_result,0,1);
|
||||
if($shm_result != '2'){
|
||||
echo "<br><font size=\"3\" color =\"#ff0000\">Set LED(from $bgn_led to $end_led) fail,Please try again[return error]</font>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-----------------------------
|
||||
}elseif($mode == 'batch' && $submode == 'mid'){
|
||||
for($i = $bgn_led; $i < $end_led; $i++){
|
||||
$update_sql = "UPDATE $table_name
|
||||
SET point_x = '$bgn_x' ,
|
||||
point_y = '$bgn_y'
|
||||
WHERE key_led_num ='$i'
|
||||
";
|
||||
mysqli_query($pubConn,$update_sql);
|
||||
if($DEBUG) echo "<br> update_sql = $update_sql";
|
||||
echo mysqli_error($pubConn);
|
||||
$bgn_x += $move_x;
|
||||
$bgn_y += $move_y;
|
||||
}
|
||||
}
|
||||
|
||||
//==================================================LED<45>б<EFBFBD><D0B1><EFBFBD>ʾ============================================================
|
||||
$offset = array(20480,20489,20577);
|
||||
function get_page_id($page_type,$page_num,$offset){
|
||||
if($page_type < 50){
|
||||
$type_offset = $offset[$page_type];
|
||||
switch($page_type){
|
||||
case 0:
|
||||
$page_type = "Map";
|
||||
break;
|
||||
case 1:
|
||||
$page_type = "Center";
|
||||
break;
|
||||
case 2:
|
||||
$page_type = "BSS";
|
||||
break;
|
||||
default:
|
||||
$page_type = "unkown";
|
||||
return($page_type);
|
||||
}
|
||||
$page_num = $page_num - $type_offset;
|
||||
$page_id = $page_type.' - '.$page_num;
|
||||
}else{
|
||||
$sys_code = $page_type - 50;
|
||||
$sys_type = omc_sys_code2type($sys_code);
|
||||
//echo "<br>sys_type=$sys_type";
|
||||
$sys_num = substr($page_num,0,2);
|
||||
$subsys_num = substr($page_num,2,2);
|
||||
$sys_id = $sys_type.$sys_num.'_'.$subsys_num;
|
||||
$page_id = $sys_id;
|
||||
}
|
||||
return($page_id);
|
||||
}
|
||||
|
||||
function get_status($status_num)
|
||||
{
|
||||
$status=array('blink gray','blink green','blink yellow','blink red','blink blue','blink umbra','blink white','not use','gray','green','yellow','red','blue','umbra','white','not use');
|
||||
for($i=0;$i < sizeOf($status);$i++){
|
||||
if($i == $status_num){
|
||||
return($status[$i]);
|
||||
}elseif($i == sizeOf($status)){
|
||||
return('unkown');
|
||||
}else{
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------- <20><>ʼ<EFBFBD><CABC>ҳ<EFBFBD><D2B3><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>-----------------------------------------
|
||||
if (!$number_of_records){
|
||||
$initial_record = 0;//<2F><>ʼ<EFBFBD><CABC>¼<EFBFBD><C2BC>
|
||||
$str_sql_all = "SELECT count(*) as number_of_records FROM $table_name";
|
||||
if($DEBUG)echo "<br> str_sql_all = $str_sql_all";
|
||||
$count_result = @mysqli_query($pubConn,$str_sql_all);
|
||||
$count_record = @mysql_fetch_object($count_result);
|
||||
$number_of_records = $count_record->number_of_records;
|
||||
if(!$number_of_records){
|
||||
echo "<br><font size =\"3\" color=\"#FF0000\">$strNotFindRecord</font>";
|
||||
exit();
|
||||
}
|
||||
$all_page_num = ceil($number_of_records / $number_records_to_display); //<2F><>ҳ<EFBFBD><D2B3>
|
||||
}
|
||||
|
||||
$this_page_num = round($initial_record / $number_records_to_display)+1; //<2F><>ҳҳ<D2B3><D2B3>
|
||||
|
||||
//------------------------------<2D><><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF>Ʒ<EFBFBD>ҳ<EFBFBD><D2B3>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>------------------------------
|
||||
|
||||
if ($number_of_records >= 1) {
|
||||
//<2F><>һҳ<D2BB>Ŀ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>
|
||||
$next_index = $initial_record + $number_records_to_display;
|
||||
if($next_index > $number_of_records){
|
||||
$next_index = $number_of_records;
|
||||
}
|
||||
//<2F><>һҳ<D2BB>Ŀ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>
|
||||
$prev_index = $initial_record - $number_records_to_display;
|
||||
if ($prev_index < 0) {
|
||||
$prev_index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//<2F><>һҳ<D2BB><D2B3><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
|
||||
if ($initial_record != 0) {
|
||||
$t1 = "all_page_num=$all_page_num&initial_record=$prev_index&number_of_records=$number_of_records";
|
||||
$prev_img ="<a href=\"$PHP_SELF?$t1\">";
|
||||
$prev_img .= "<IMG alt=\"$strPreviousPage\" border=\"0\" src=\"../../images/pre_page.gif\" ></a> ";
|
||||
}
|
||||
|
||||
//<2F><>һҳ<D2BB><D2B3><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
|
||||
if ($next_index != $number_of_records && $number_of_records >0) {
|
||||
$t2 = "all_page_num=$all_page_num&initial_record=$next_index&number_of_records=$number_of_records";
|
||||
$next_img ="<a href=\"$PHP_SELF?$t2\">";
|
||||
$next_img .="<IMG alt=\"$strNextPage\" border=\"0\" src=\"../../images/next_page.gif\" ></a> ";
|
||||
}
|
||||
$last_num_this_page = $next_index -1;
|
||||
|
||||
//--------------------------------<2D>б<EFBFBD><D0B1><EFBFBD>ʾ-----------------------------------------------
|
||||
echo "<table><tr>";
|
||||
echo "<td width=\"30%\">";
|
||||
echo "Records:<font color=#0000ff>$initial_record - $last_num_this_page</font> of $number_of_records, Page: <font color=#0000ff> $this_page_num </font> ";
|
||||
echo "</td><td width=\"15%\">";
|
||||
echo "$prev_img $next_img";
|
||||
//echo "</td><td width=\"0%\">";
|
||||
//echo "<a href=\"javascript:select_led('mode=add&all_page_num=$all_page_num&initial_record=$initial_record&number_of_records=$number_of_records')\">$strAddLED</a>";
|
||||
echo "</td><td width=\"25%\">";
|
||||
echo "<a href=\"javascript:select_led('mode=batch&submode=move&all_page_num=$all_page_num&initial_record=$initial_record&number_of_records=$number_of_records')\">$strBatchOfLEDDefineSetting</a>";
|
||||
echo "</td><td width=\"25%\">";
|
||||
echo "<a href=\"javascript:select_led('mode=batch&submode=mid&all_page_num=$all_page_num&initial_record=$initial_record&number_of_records=$number_of_records')\">$strBatchOfLEDClearanceSetting</a>";
|
||||
echo "</td></tr></table>";
|
||||
?>
|
||||
|
||||
<script LANGUAGE="JavaScript">
|
||||
function select_led(link_var){
|
||||
var base_url,url,y;
|
||||
base_url='./led_set_down.php?';
|
||||
x = document.body.scrollLeft;
|
||||
y = document.body.scrollTop;
|
||||
url=base_url+link_var+'&scroll_y='+y;
|
||||
window.parent.footnotes.location=url;
|
||||
}
|
||||
function select_page(){
|
||||
var base_url,url_add,url;
|
||||
base_url='./led_set_up.php?<?php echo "all_page_num=$all_page_num&number_of_records=$number_of_records&initial_record=";?>';
|
||||
url_add=document.selectform.page_list.options[document.selectform.page_list.selectedIndex].value;
|
||||
url=base_url+url_add;
|
||||
window.location=url;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if($scroll_y > 0){
|
||||
echo "<body onLoad='self.scrollBy(0,"."$scroll_y".")'>";
|
||||
}else{
|
||||
echo "<body>";
|
||||
}
|
||||
$sel_sql = "SELECT * FROM $table_name
|
||||
ORDER BY $sort_field $sort_direction
|
||||
LIMIT $initial_record, $number_records_to_display
|
||||
";
|
||||
$result = mysqli_query($pubConn,$sel_sql);
|
||||
echo mysqli_error($pubConn);
|
||||
if($DEBUG) echo "<br> sel_sql = $sel_sql";
|
||||
$rows = mysqli_fetch_array($result);
|
||||
|
||||
$sel_status_sql = "SELECT key_status
|
||||
FROM sysLedStat
|
||||
WHERE if(key_led_num < '$divide_number',key_led_num >= floor($initial_record/16),key_led_num >= $initial_record)
|
||||
AND if(key_led_num < '$divide_number',key_led_num <= floor(($initial_record+$number_records_to_display)/16),key_led_num <= ($initial_record+$number_records_to_display))
|
||||
";
|
||||
$status_result = mysqli_query($pubConn,$sel_status_sql);
|
||||
echo mysqli_error($pubConn);
|
||||
if($DEBUG) echo "<br> sel_status_sql = $sel_status_sql";
|
||||
$status_rows = mysqli_fetch_array($status_result);
|
||||
?>
|
||||
<form name="selectform" method="POST" action="./led_set_up.php" >
|
||||
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||||
<tr>
|
||||
<td width="5%">LED_ID</td>
|
||||
<td width="10%"><?php echo "$strStatus";?></td>
|
||||
<td width="10%"><?php echo "$strShape";?></td>
|
||||
<td width="15%"><?php echo "$strSourcePage";?></td>
|
||||
<td width="15%"><?php echo "$strTargetPage";?></td>
|
||||
<td width="10%"><?php echo "$strPoint";?></td>
|
||||
<td width="30%"><?php echo "$strRemark";?></td>
|
||||
<td width="5%" >
|
||||
<select size="1" name="page_list" onChange="javascript:select_page()">
|
||||
<?php
|
||||
/*
|
||||
for($i=0;$i < $all_page_num;$i++){
|
||||
$show_led_num = $i*$number_records_to_display;
|
||||
$isSelected=($initial_record == $show_led_num)?'selected':'';
|
||||
echo "<option value=\"$show_led_num\" $isSelected >$show_led_num</option>";
|
||||
}
|
||||
*/
|
||||
$led_name_def = array('--LED--','OMC','HLR','VLR','PPS','CNF','SMSC','AUC','EIR','GMSC','MSC','LAN','MTP2','CSC','LAPD','LAPDV5','VPS','PCR','PCRK','CNFC','PLAT','BSC','BTS','HBSC','HBTS','SN','VMS','EAN','--Page--','Area_P','Shelf_P','MSS_P','CSU_P','VPS_P','PCR_P','CNFC_P','AUC_P','MSC_P','VMS_P','EIR_P','OMC_P','HLR_P','VLR_P','PPS_P','CNF_P','SMSC_P','BSC_P','BTS_P');
|
||||
$led_number_def = array('0','0','64','128','192','256','320','384','9792','448','512','576','1600','2624','3648','4672','1600','6720','7744','8256','8768','11648','14272','3648','18112','18048','9856','9920','20480','20481','20489','20493','20497','20505','20521','20525','20537','20541','20545','20549','20553','20557','20561','20565','20569','20573','20577','20601');
|
||||
if(sizeof($led_name_def) != sizeof($led_number_def)){
|
||||
echo sizeof($led_name_def);
|
||||
echo sizeof($led_number_def);
|
||||
echo "ERROR of LED name <--> number setting!! please check it";
|
||||
}
|
||||
for($i=0;$i < sizeof($led_name_def);$i++){
|
||||
$show_led_num = $led_number_def[$i];
|
||||
$isSelected=($initial_record == $show_led_num)?'selected':'';
|
||||
echo "<option value=\"$show_led_num\" $isSelected >{$led_name_def[$i]}</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$k=0;
|
||||
do{
|
||||
$led_num = $rows[key_led_num];
|
||||
//=0,Բ<><D4B2>=1,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=2,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=3,<2C><><EFBFBD><EFBFBD>
|
||||
switch($rows[shape]){
|
||||
case '0':
|
||||
$shape = "$strRound";
|
||||
break;
|
||||
case '1':
|
||||
$shape = "$strSquare";
|
||||
break;
|
||||
case '2':
|
||||
$shape = "$strLandscapeRectangle";
|
||||
break;
|
||||
case '3':
|
||||
$shape = "$strTriangle";
|
||||
break;
|
||||
case '4':
|
||||
$shape = "$strPortraitRectangle";
|
||||
break;
|
||||
case '5':
|
||||
$shape = "Cover EAN";
|
||||
break;
|
||||
default:
|
||||
$shape= "unkown";
|
||||
break;
|
||||
}
|
||||
$src_page_id = get_page_id($rows[key_src_page_type],$rows[key_src_page_num],$offset);
|
||||
$dst_page_id = get_page_id($rows[dst_page_type],$rows[dst_page_num],$offset);
|
||||
$remark = $rows[remark];
|
||||
if($led_num == $selected_led_num){
|
||||
$bgcolor = "bgcolor=\"#C0C0C0\"";
|
||||
}elseif($k % 16 == 0){
|
||||
$bgcolor = "bgcolor=\"#CCFFCC\"";
|
||||
}else{
|
||||
$bgcolor = '';
|
||||
}
|
||||
if($led_num < $divide_number){
|
||||
$status_offset =($led_num%16)*2;
|
||||
}else{
|
||||
$status_offset = 0;
|
||||
}
|
||||
$status_substr = substr($status_rows[key_status],$status_offset,2);
|
||||
$status = get_status($status_substr);
|
||||
echo "<tr $bgcolor>";
|
||||
echo "<td width=\"5%\">$led_num</td>";
|
||||
echo "<td width=\"10%\">$status</td>";
|
||||
echo "<td width=\"10%\">$shape</td>";
|
||||
echo "<td width=\"15%\">$src_page_id</td>";
|
||||
echo "<td width=\"15%\">$dst_page_id</td>";
|
||||
echo "<td width=\"10%\">($rows[point_x],$rows[point_y])</td>";
|
||||
echo "<td width=\"30%\">$remark</td>";
|
||||
echo "<td width=\"5%\"><a href=javascript:select_led('led_num=$led_num&mode=edit&all_page_num=$all_page_num&initial_record=$initial_record&number_of_records=$number_of_records')>edit</a></td>";
|
||||
//echo "<td width=\"5%\"><a href=\"./led_set_down.php?led_num=$led_num&mode=del&all_page_num=$all_page_num&initial_record=$initial_record&number_of_records=$number_of_records\">del</a></td>";
|
||||
echo "</tr>";
|
||||
$k++;
|
||||
if(($led_num+1) >= $divide_number){
|
||||
$status_rows = mysqli_fetch_array($status_result);
|
||||
}else if((($led_num+1)%16) == 0){
|
||||
$status_rows = mysqli_fetch_array($status_result);
|
||||
}
|
||||
}while($rows = mysqli_fetch_array($result));
|
||||
?>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user