The index. php file of the php project, which is written by the native php

Source: Internet
Author: User
{Code ...}

     
  
   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"]);}
  

The overall process is fromGETGet in requestuserId,
Then detect thisuserIdWhether a value exists. If no value exists, the system jumps back to the homepage.
If there is a value, a New XML structure (it should be calledWebService),
Then, based on the definitionSSO_SESSION_SERVERDetermine whether to use the default one or better.SessionServiceAddress.
Then initiate a request,
If the request fails, go back to the home page.
Otherwise, you can decide the page to jump to based on the request results.


     
  
   
Fecaca56a326610b24626b163814a02c
      
         
             
     
      
'. $ _ GET ['userid'].'
        
     
      
'. $ _ GET ['sid'].'
           
       
   '; // The default sessionServer address $ sessionServer =" http://mzwa-123.6655.la:8090/services/SessionService "; // If a constant of SSO_SESSION_SERVER is defined, if (defined ('sso _ SESSION_SERVER ') {// The $ sessionServer value is updated to the SSO_SESSION_SERVER value $ sessionServer = SSO_SESSION_SERVER ;} // The code here is useless, so $ securityServer = "is added" http://mzwa-123.6655.la:8090/services/SecurityService "; If (defined ('sso _ SECURITY_SERVER ') {$ securityServer = SSO_SECURITY_SERVER;} // an HTTP request $ xmls = fetch ($ sessionServer, $ param) should be initiated ); // if the request fails if ($ xmls = false) {// jump to a page (which should be the homepage or something) sd_redirect ($ GLOBAL_SYSTEM [PRODUCT_TYPE] ["index"]) ;}$ xml_values = ""; // parse the requested content $ parser = xml_parser_create ('utf-8 '); xml_parse_into_struct ($ parser, trim ($ xmls), $ xml_values); xml_parser_free ($ parser); // XML obtained through Traversal File foreach ($ xml_values as $ value) {if ($ value ['tag'] = "RETURN ") {// if the tag in the data is equal to RETURN if ($ value ['value'] = 'false ') {// sd_redirect ($ GLOBAL_SYSTEM [PRODUCT_TYPE] ["index"]) when the value in the data is false; // jump to a page} elseif ($ value ['value'] = 'true') {// if it is true, $ user = & sd_get_user ($ user_name ); // call a method again (pass the userId obtained above) if (! Empty ($ user) {// If the returned value of sd_get_user is not empty, $ result = login_without_pwd_verify ($ user); // call a method, pass the above return value in the past $ _ SESSION ["user"] = $ user_name; if ($ _ SESSION ["role"] = UserDao: $ ROLE_CLOUD_USER) {// then judge if (I2System: isI2Cloud () {// then judge... sd_redirect ("cloud/home. php "); // jump here when the condition is set} else {sd_redirect ($ GLOBAL_SYSTEM [PRODUCT_TYPE] [" index "]); // Skip here if it fails} else {// if it fails, jump here sd_redirect ("i2/home. php ") ;}} br Eak ;}} else {// if there is no userId, Skip 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.