PageRenderTime 47ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/public/zf-demos/Zend/Gdata/YouTubeVideoApp/session_details.php

https://bitbucket.org/hieronim1981/tunethemusic
PHP | 66 lines | 28 code | 4 blank | 34 comment | 0 complexity | b74f42f2077781ccad1064c212b11d06 MD5 | raw file
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Gdata
  17. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. */
  20. /**
  21. * PHP sample code for the YouTube data API. Utilizes the Zend Framework
  22. * Zend_Gdata component to communicate with the YouTube data API.
  23. *
  24. * Requires the Zend Framework Zend_Gdata component and PHP >= 5.1.4
  25. * This sample is run from within a web browser. These files are required:
  26. * session_details.php - a script to view log output and session variables
  27. * operations.php - the main logic, which interfaces with the YouTube API
  28. * index.php - the HTML to represent the web UI, contains some PHP
  29. * video_app.css - the CSS to define the interface style
  30. * video_app.js - the JavaScript used to provide the video list AJAX interface
  31. *
  32. * NOTE: If using in production, some additional precautions with regards
  33. * to filtering the input data should be used. This code is designed only
  34. * for demonstration purposes.
  35. */
  36. session_start();
  37. ?>
  38. <html>
  39. <head>
  40. <title>YouTube data API Video Browser in PHP - Session Viewer</title>
  41. <link href="video_app.css" type="text/css" rel="stylesheet"/>
  42. <script src="video_app.js" type="text/javascript"></script>
  43. </head>
  44. <body>
  45. <div id="mainSessions">
  46. <div id="titleBar">
  47. <div id="titleText"><h3>Session variables</h3></div><br clear="all" />
  48. </div>
  49. <?php
  50. $session_copy = $_SESSION;
  51. ksort($session_copy);
  52. foreach($session_copy as $key => $value) {
  53. print '<h3>'. $key . '</h3><div id="sessionVariable" >'. $value .'</div><br />'.
  54. '<form method="POST" action="operations.php">' .
  55. '<input type="hidden" value="clear_session_var" name="operation"/>'.
  56. '<input type="hidden" name="name" value="'. $key .'"/>'.
  57. '<input type="submit" value="click to delete"/></form><hr />';
  58. }
  59. ?>
  60. <br clear="both" />
  61. <a href="index.php">back</a>
  62. </div></body></html>