sel_src_page_type=$sel_src_page_type";
if($DEBUG) echo "
sel_src_page_num=$sel_src_page_num";
//---------------------------更新-----------------------------
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 "
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 "
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;
}
}
}
?>
";
$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 "";
if($scroll_y > 0){
echo "
| LED_ID | |||||||
| $led_num | "; //echo "$status | "; echo "$shape | "; echo "$src_page_id | "; //echo "$dst_page_id | "; echo "($rows[point_x],$rows[point_y]) | "; echo "$remark | "; echo "Edit | "; echo "