source:
trunk/web/addons/job_monarch/lib/extjs-30/examples/state/save-state.php
@
625
Last change on this file since 625 was 625, checked in by ramonb, 15 years ago | |
---|---|
File size: 413 bytes |
Line | |
---|---|
1 | <?php |
2 | session_start(); |
3 | if(!isset($_SESSION['state'])){ |
4 | $_SESSION['state'] = array( |
5 | 'sessionId'=>session_id() |
6 | ); |
7 | } |
8 | foreach($_COOKIE as $name=>$value){ |
9 | // look for state cookies |
10 | if(strpos($name, 'ys-') === 0){ |
11 | // store in session |
12 | $_SESSION['state'][substr($name, 3)] = $value; |
13 | // remove cookie |
14 | setCookie($name, '', time()-10000, '/'); |
15 | } |
16 | } |
Note: See TracBrowser
for help on using the repository browser.