Odyssey
Set_aTicket.i
1 <?php
2 /**
3  * @param array $sysenv This is the system environment structure defining the system (production/development)
4  */
5 function Set_aTicket ($pSysEnv, $cur, $newset) {
6 
7  $secret = 'xogich6RFoogeid4';
8  $Carray=array();
9  $newarray=array();
10  parse_str($cur,$Carray);
11  parse_str($newset,$newarray);
12 
13  foreach ($newarray as $key => $value) {
14  $Carray[$key] = $value;
15  }
16 
17  $Carray['Ch'] = MD5($secret .
18  MD5(join (':', array($secret, $Carray['Cip'],
19  $Carray['Ctime'], $Carray['Ce'], $Carray['Cl'],
20  $Carray['Cu'], $Carray['Cn'], $Carray['Cd'],
21  urlencode($Carray['Clu']),
22  urlencode($Carray['Fplog']),
23  urlencode($Carray['Fflog']),
24  $Carray['Ffchg'],$Carray['Ffremain'],
25  $Carray['Fset'],$Carray['Fset2'], $Carray['Fset3'])))
26  );
27  $delim='';
28  $ResetTicket='';
29  foreach ($Carray as $key => $value) {
30  $value=urlencode($value);
31  $ResetTicket .="${delim}${key}=${value}";
32  $delim='&';
33  }
34 
35  HCU_setcookie_env($pSysEnv, "aTicket", $ResetTicket, 0);
36  return $ResetTicket;
37 }