ShuanghongS 11 månader sedan
förälder
incheckning
4590c01013
2 ändrade filer med 35 tillägg och 35 borttagningar
  1. 29 29
      main_new_version.php
  2. 6 6
      utils/common.class.php

+ 29 - 29
main_new_version.php

@@ -640,7 +640,7 @@ switch ($action) {
         exit();
         break;
     case 'main_map_new':
-        include ONLINE_ROOT . 'libs' . DS . 'map_config.ini.php';
+        //include ONLINE_ROOT . 'libs' . DS . 'map_config.ini.php';
         //修改添加port_of_transshipment 和port_of_transshipment_name的坐标获取(有为空的可能)
         $serial_no = $_REQUEST["serial_no"];
         //$serial_no = "F41E6016-1A97-4C93-8198-53D8B3B26220";
@@ -673,35 +673,35 @@ switch ($action) {
         //           {"lng":"100.88333333","lat":"13.08333333","label":"Destination","infor":"LAEM CHABANG PORT,THAILAND","sort":"1","stime":null,"ptype":"pol"},
         //           {"lng":"-122.28640000","lat":"37.79784000","label":"Transfer","infor":"OAKLAND, CA, USA","sort":"2","stime":null,"ptype":"pod"}]';
         //$rss = json_decode($json,true);
-        global $mapdb;
-        //查询线(包含所有的线)
-        error_log("select * from get_track_data('$serial_no',true)");
-        $map_sql = "select * from get_track_data('$serial_no',true)";
-        $Line = $mapdb->GetAll($map_sql) or ( (!$mapdb->ErrorMsg()) or error_log(common::dbLog($mapdb, $map_sql), 0));
+        // global $mapdb;
+        // //查询线(包含所有的线)
+        // error_log("select * from get_track_data('$serial_no',true)");
+        // $map_sql = "select * from get_track_data('$serial_no',true)";
+        // $Line = $mapdb->GetAll($map_sql) or ( (!$mapdb->ErrorMsg()) or error_log(common::dbLog($mapdb, $map_sql), 0));
 
-        error_log("total:".count($Line));
-        $solidLine = array();
-        $dottedLine = array();
-        $rangePoint = array();
-        foreach($Line as $line){
-            if($line['tp'] == "1"){
-                $solidLine[] = $line;
-            }elseif($line['tp'] == "0"){
-                $dottedLine[] = $line;
-            }else{
-                $rangePoint[] = $line;
-            }
-        }
-        error_log("total_1:".count($solidLine));
-        error_log("total_2:".count($dottedLine));
-        error_log("total_3:".count($rangePoint));
-        //如果没有虚线,这这个范围点也是异常的,不需要显示
-        if(empty($dottedLine)){
-            $rangePoint = array();
-        }
-        $data = array("point"=>$rss,"solidLine"=>$solidLine,"dottedLine"=>$dottedLine,"rangePoint"=>$rangePoint);
-        common::echo_json_encode(200, $data);
-        //common::echo_json_encode(200, $rss);
+        // error_log("total:".count($Line));
+        // $solidLine = array();
+        // $dottedLine = array();
+        // $rangePoint = array();
+        // foreach($Line as $line){
+        //     if($line['tp'] == "1"){
+        //         $solidLine[] = $line;
+        //     }elseif($line['tp'] == "0"){
+        //         $dottedLine[] = $line;
+        //     }else{
+        //         $rangePoint[] = $line;
+        //     }
+        // }
+        // error_log("total_1:".count($solidLine));
+        // error_log("total_2:".count($dottedLine));
+        // error_log("total_3:".count($rangePoint));
+        // //如果没有虚线,这这个范围点也是异常的,不需要显示
+        // if(empty($dottedLine)){
+        //     $rangePoint = array();
+        // }
+        // $data = array("point"=>$rss,"solidLine"=>$solidLine,"dottedLine"=>$dottedLine,"rangePoint"=>$rangePoint);
+        // common::echo_json_encode(200, $data);
+        common::echo_json_encode(200, $rss);
         exit();
         break;
     case 'main_welcome':

+ 6 - 6
utils/common.class.php

@@ -1666,12 +1666,12 @@ class common {
             "title"=>"Container Count",
             "switchValue"=>true,
             "text"=>"Pie chart showing figures of shipments which are soon to depart/arrive (Calculated from ETD/ETA).");
-        if(_isRevenueDisplay()){    
-            $Management[] = array("id"=>5 ,
-                "title"=>"Revenue Spent",
-                "switchValue"=>true,
-                "text"=>"Revenue data for the past 12 months."); 
-        }   
+        // if(_isRevenueDisplay()){    
+        //     $Management[] = array("id"=>5 ,
+        //         "title"=>"Revenue Spent",
+        //         "switchValue"=>true,
+        //         "text"=>"Revenue data for the past 12 months."); 
+        // }   
         $Management[] = array("id"=>6 ,
             "title"=>"Top 10 Origin/Destination",
             "switchValue"=>true,