PHP Project index.php file, project is written by native PHP

Source: Internet
Author: User

     
  
   fecaca56a326610b24626b163814a02c
   
    
      
   
    
      
      
       '. $_get[' userId ']. ' 
      ' 
      
       . $_get[' Sid ']. ' 
               
     
        
 
           
    

    
   ';    $sessionServer = "Http://mzwa-123.6655.la:8090/services/SessionService";    if (defined (' Sso_session_server ')) {$sessionServer = Sso_session_server;    } $securityServer = "Http://mzwa-123.6655.la:8090/services/SecurityService";    if (defined (' Sso_security_server ')) {$securityServer = Sso_security_server;        } $XMLS = Fetch ($sessionServer, $param);    if ($xmls = = = False) {Sd_redirect ($GLOBAL _system[product_type]["index"]);        } $xml _values = "";    $parser = xml_parser_create (' UTF-8 ');    Xml_parse_into_struct ($parser, Trim ($xmls), $xml _values);        Xml_parser_free ($parser);                foreach ($xml _values as $value) {if ($value [' tag '] = = "RETURN") {if ($value [' value '] = = ' false ') {            Sd_redirect ($GLOBAL _system[product_type]["index"]);                }elseif ($value [' value '] = = ' true ') {$user = &sd_get_user ($user _name); if (!empty ($user)) {$result = Login_Without_pwd_verify ($user);                    $_session["user"] = $user _name;                            if ($_session["role"] = = Userdao:: $ROLE _cloud_user) {if (I2system::isi2cloud ()) {                        Sd_redirect ("cloud/home.php");                        }else{Sd_redirect ($GLOBAL _system[product_type]["index"]);                    }} else {sd_redirect ("i2/home.php");        }}} break; }}}else{Sd_redirect ($GLOBAL _system[product_type]["index"]. "?". $_server["Query_string"]);}
  

Reply content:


     
  
   fecaca56a326610b24626b163814a02c
   
    
      
   
    
      
      
       '. $_get[' userId ']. ' 
      ' 
      
       . $_get[' Sid ']. ' 
               
     
        
 
           
    

    
   ';    $sessionServer = "Http://mzwa-123.6655.la:8090/services/SessionService";    if (defined (' Sso_session_server ')) {$sessionServer = Sso_session_server;    } $securityServer = "Http://mzwa-123.6655.la:8090/services/SecurityService";    if (defined (' Sso_security_server ')) {$securityServer = Sso_security_server;        } $XMLS = Fetch ($sessionServer, $param);    if ($xmls = = = False) {Sd_redirect ($GLOBAL _system[product_type]["index"]);        } $xml _values = "";    $parser = xml_parser_create (' UTF-8 ');    Xml_parse_into_struct ($parser, Trim ($xmls), $xml _values);        Xml_parser_free ($parser);                foreach ($xml _values as $value) {if ($value [' tag '] = = "RETURN") {if ($value [' value '] = = ' false ') {            Sd_redirect ($GLOBAL _system[product_type]["index"]);                }elseif ($value [' value '] = = ' true ') {$user = &sd_get_user ($user _name); if (!empty ($user)) {$result = Login_Without_pwd_verify ($user);                    $_session["user"] = $user _name;                            if ($_session["role"] = = Userdao:: $ROLE _cloud_user) {if (I2system::isi2cloud ()) {                        Sd_redirect ("cloud/home.php");                        }else{Sd_redirect ($GLOBAL _system[product_type]["index"]);                    }} else {sd_redirect ("i2/home.php");        }}} break; }}}else{Sd_redirect ($GLOBAL _system[product_type]["index"]. "?". $_server["Query_string"]);}
  

In the overall process, it is GET obtained from the request userId ,
It then detects if userId there is a value and jumps back to the page if there is no value.
If there is a value, then the east of an XML structure (which should be called) is spelled out. WebService
The SSO_SESSION_SERVER default, or defined, address is then determined by whether a definition is available SessionService .
Then initiate the request,
If the request fails, jump back to the page.
Otherwise, depending on the result of the request, decide which page to jump to.


     
  
   fecaca56a326610b24626b163814a02c
   
    
      
   
     
      
      
        '. $_get[' userid ']. ' 
       
      
        '. $_get[' Sid ']. ' 
            
 
        

    
   ';    The default Sessionserver address $sessionServer = "Http://mzwa-123.6655.la:8090/services/SessionService";        If there are constants that define SSO_SESSION_SERVER (defined (' Sso_session_server ')) {//update the value of the $sessionServer to Sso_session_server    $sessionServer = Sso_session_server;    }//The code here has no place to use, so added annotated $securityServer = "Http://mzwa-123.6655.la:8090/services/SecurityService";    if (defined (' Sso_security_server ')) {$securityServer = Sso_security_server;        }//should be initiating an HTTP request $xmls = Fetch ($sessionServer, $param);    If the request fails if ($xmls = = = False) {//Jump to a page (should be the homepage or something) sd_redirect ($GLOBAL _system[product_type]["index"]);        } $xml _values = "";    Parse the contents of the request back $parser = xml_parser_create (' UTF-8 ');    Xml_parse_into_struct ($parser, Trim ($xmls), $xml _values);    Xml_parser_free ($parser); Traverse the resulting XML file foreach ($xml _values as $value) {if ($value [' tag '] = = "return") {//If the tag in the data equals return if ($value [' value '] = = ' false ') {//In the dataValue is False when Sd_redirect ($GLOBAL _system[product_type]["index"]);//Jump to a page}elseif ($value [' Valu                E '] = = ' true ') {//is true when $user = &sd_get_user ($user _name);//Call a method (pass the most obtained userId past)  if (!empty ($user)) {//If the return value of Sd_get_user is not empty $result = Login_without_pwd_verify ($user);//Call a method again to pass                    The above return value used to $_session["user"] = $user _name;                            if ($_session["role"] = = Userdao:: $ROLE _cloud_user) {//re-judge if (I2system::isi2cloud ()) {//re-judge ... Sd_redirect ("cloud/home.php");//When conditions are set to jump here}else{s D_redirect ($GLOBAL _system[product_type]["index"]);//not immediately jump here}} else {//if does not immediately jump this                    Li Sd_redirect ("i2/home.php");        }}} break; }}}else{//No userId, Jump here ... sd_redirect ($GLOBAL_system[product_type]["index"]. "?". $_server["Query_string"]);}
  
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.