ShuanghongS 5 mēneši atpakaļ
vecāks
revīzija
154b355a7e
2 mainītis faili ar 9 papildinājumiem un 1 dzēšanām
  1. 6 1
      main_new_version.php
  2. 3 0
      utils/common.class.php

+ 6 - 1
main_new_version.php

@@ -107,13 +107,18 @@ switch ($action) {
             $children[] = array("index" =>$index.'-2',"label" =>"System Settings","path"=>"/SystemSettings");   
             //只有chud的账户可以看日志记录
             if(strtolower(_getLoginName()) == "chud" 
-                || strtolower(_getLoginName()) == strtolower("IT.Andywu") 
+                || strtolower(_getLoginName()) == strtolower("IT.Andywu")
                 || strtolower(_getLoginName()) == "ra.admin"){
                     $children[] = array("index" =>$index.'-3',"label" =>"Chat Log","path"=>"/chat-log");
                     $children[] = array("index" =>$index.'-4',"label" =>"AI API Log","path"=>"/ai-api-log");
                     $children[] = array("index" =>$index.'-5',"label" =>"Operation Log","path"=>"/Operationlog");
                     $children[] = array("index" =>$index.'-6',"label" =>"Prompt Configuration","path"=>"/PromptConfiguration");  
             }
+            //特殊放开一个帐号
+            if(strtolower(_getLoginName()) == strtolower("michaelW")){
+                $children[] = array("index" =>$index.'-4',"label" =>"AI API Log","path"=>"/ai-api-log");
+                $children[] = array("index" =>$index.'-6',"label" =>"Prompt Configuration","path"=>"/PromptConfiguration");
+            }
             $systemManagement["children"] = $children;
             if (!empty($children)){
                 $menuList[] = $systemManagement;

+ 3 - 0
utils/common.class.php

@@ -2533,6 +2533,9 @@ class common {
     public static function getChatAiSequence(){
         $sequence = common::excuteOneSql("select count(*) from kln_robot_chat_log where request_time >= CURRENT_DATE");
         $sequence = empty($sequence)? "1" : $sequence + 1;
+        if($sequence >99999){
+            return $sequence;
+        }
         $sequence = sprintf("%05d", $sequence);
         return $sequence;
     }