ShuanghongS 2 månader sedan
förälder
incheckning
26f4a502b1
3 ändrade filer med 24 tillägg och 5 borttagningar
  1. 2 1
      main_new_version.php
  2. 12 2
      utils/common.class.php
  3. 10 2
      utils/utils.class.php

+ 2 - 1
main_new_version.php

@@ -25,7 +25,8 @@ include 'service/destination_delivery.class.php';
 //为了调用,临时做一个登录动作  如果是正式版 要注释掉菜单System Settings
  //$_POST['uname'] = "ra.admin";
  //$_POST['psw'] = common::excuteOneSql("select ra_password from public.ra_online_user where user_login = 'ra.admin'");
-//  $name =strpos(common::ip(), "192.168.0.158s") !== false || strpos(common::ip(), "192.168.0.161s") !== false ? "dddde" : 'ra.admin';
+ //$name = "dddde";
+//  $name = "ra.admin";
 //  $_POST['uname'] = $name;
 //  $_POST['psw'] = common::excuteOneSql("select ra_password from public.ra_online_user where user_login = '".$name."'");
 //  login::getInstance()->do_login_auto();

+ 12 - 2
utils/common.class.php

@@ -126,6 +126,13 @@ class common {
             if($action == "main" || $action == "tools" || $action == "save_layout"){
                 return;
             }
+            //tools是为了避免查询的用户,没有配置tools权限,但是新版mark_save需要进入
+            if($action == "robot_chat" ){
+                $operate = strtolower(utils::_get('operate'));
+                if ($operate == "ai_chat_fixed_init"|| $operate == "ai_chat_prompt"){
+                    return;
+                }
+            }
             if (!isset($_SESSION['ONLINE_USER'])) {
                 self::timeoutPrintInfor($httpAccept, $ajax, 'no');
             } else {
@@ -4021,13 +4028,16 @@ class common {
 
             $ctnrs = common::excuteListSql("select ctnr,seal_no,size,qty,unit,grs_kgs,cbm,marks,description,is_lcl FROM oc_container oc where oc.serial_no::text = '".$serial_no."' 
                     and oc.ctnr in (select regexp_split_to_table('".$ctnr."', ','))" );
-
+       
             $total_pcs = "";
             $total_pcs_unit = "";
             $total_weight = "";
             $total_weight_unit = "";
             $total_volume = "";
-            $total_volume_unit = "";     
+            $total_volume_unit = "";
+            foreach($ctnrs as $_ctnr_info){
+                
+            }      
 
             $biztype =  $oceanInfo['ex_im'] == "Export" && $oceanInfo['transport_mode'] == "sea" ? "SE" :(
                         $oceanInfo['ex_im'] == "Import" && $oceanInfo['transport_mode'] == "sea" ? "SI" :(

+ 10 - 2
utils/utils.class.php

@@ -353,7 +353,11 @@ class utils {
      * reset password link email   sendEmailByResetPassword
     */
     public static function sendEmailByResetPassword($data, $email) {
-        $sql = "select subject, ra_content as content from ra_online_email_tpl where lower(ra_type) = 'kln_reset'";
+        if(strtolower($data["user_type"]) == "employee"){
+            $sql = "select subject, ra_content as content from ra_online_email_tpl where lower(ra_type) = 'ra_reset'";
+        } else {
+            $sql = "select subject, ra_content as content from ra_online_email_tpl where lower(ra_type) = 'kln_reset'";
+        }
         $rs = common::excuteObjectSql($sql);
         if (!empty($rs)) {
             $subject = $rs['subject'];
@@ -392,7 +396,11 @@ class utils {
      * reset password link email   sendEmailByResetPassword
     */
     public static function sendEmailWithPasswordUpdate($user_login, $user_type) {
-        $sql = "select subject, ra_content as content from ra_online_email_tpl where lower(ra_type) = 'kln_passwordchange'";
+        if (strtolower($user_type) == "employee"){
+            $sql = "select subject, ra_content as content from ra_online_email_tpl where lower(ra_type) = 'ra_passwordchange'";
+        } else {
+            $sql = "select subject, ra_content as content from ra_online_email_tpl where lower(ra_type) = 'kln_passwordchange'";
+        }
         $rs = common::excuteObjectSql($sql);
         if (!empty($rs)) {
             $subject = $rs['subject'];