PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/core/admin/theme/footer.template.php

http://snowcms.googlecode.com/
PHP | 96 lines | 65 code | 8 blank | 23 comment | 10 complexity | 45a0b7e9a08fd8685e8129c414927926 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. <?php
  2. ////////////////////////////////////////////////////////////////////////////
  3. // SnowCMS v2.0 //
  4. // By the SnowCMS Team //
  5. // www.snowcms.com //
  6. // Released under the Microsoft Reciprocal License //
  7. // www.opensource.org/licenses/ms-rl.html //
  8. ////////////////////////////////////////////////////////////////////////////
  9. // //
  10. // SnowCMS originally pawned by soren121 started in early 2008 //
  11. // //
  12. ////////////////////////////////////////////////////////////////////////////
  13. // //
  14. // SnowCMS v2.0 began in November 2009 //
  15. // //
  16. ////////////////////////////////////////////////////////////////////////////
  17. // File version: SnowCMS 2.0 //
  18. ////////////////////////////////////////////////////////////////////////////
  19. if(!defined('INSNOW'))
  20. {
  21. die('Nice try...');
  22. }
  23. if(!admin_prompt_required() && admin_show_sidebar() && empty(api()->context['cp_access_denied']))
  24. {
  25. echo '
  26. </div>
  27. <div class="break">
  28. </div>';
  29. }
  30. ?>
  31. </div>
  32. <!-- /END CONTENT -->
  33. <div id="footer-container">
  34. <div id="footer-text">
  35. <p><?php echo l('Powered by <a href="http://www.snowcms.com/" target="_blank" title="SnowCMS">SnowCMS</a> v%s.', settings()->get('version', 'string')); ?></p>
  36. <p><?php echo l('Page created in %s seconds with %u queries.', round(microtime(true) - starttime, 3), db()->num_queries); ?></p>
  37. </div>
  38. <?php
  39. if(!admin_prompt_required() && empty(api()->context['cp_access_denied']))
  40. {
  41. ?>
  42. <div id="jump-to">
  43. <form action="#" method="post" onsubmit="return false;">
  44. <select name="jump_to_select" onchange="this.form.go.click();">
  45. <option><?php echo l('Control Panel'); ?></option>
  46. <?php
  47. // There can be up to two levels of navigation specified in the icons
  48. // array, but we only show the first level in this drop down... So we
  49. // need to figure out whether the currently specified area is at the
  50. // first level or not.
  51. $area_id = admin_current_area();
  52. if(isset($GLOBALS['icon_map']['index'][$area_id]))
  53. {
  54. $index = $GLOBALS['icon_map']['index'][$area_id];
  55. // If there is just one item, then we're at the first level.
  56. if(count($index) > 1)
  57. {
  58. $area_id = array_pop($index);
  59. }
  60. }
  61. // Display the drop down for quick navigation.
  62. foreach($GLOBALS['icons'] as $icon_group => $icon)
  63. {
  64. echo '
  65. <optgroup label="', htmlchars($icon_group), '">';
  66. foreach($icon as $i)
  67. {
  68. echo '
  69. <option value="', urlencode(htmlspecialchars_decode($i['href'])), '"', (!empty($i['id']) && $area_id == $i['id'] ? ' selected="selected"' : ''), '>', $i['label'], '</option>';
  70. }
  71. echo '
  72. </optgroup>';
  73. }
  74. echo '
  75. </select>
  76. <input type="submit" name="go" title="', l('Go'), '" value="', l('Go'), '" onclick="if(this.form.jump_to_select.value == \'', l('Control Panel'), '\') { location.href = \'', baseurl, '/index.php?action=admin\'; } else { location.href = decodeURIComponent(this.form.jump_to_select.value); }" />';
  77. ?>
  78. </form>
  79. </div>
  80. <?php
  81. }
  82. ?>
  83. <div class="break">
  84. </div>
  85. </div>
  86. </div>
  87. </body>
  88. </html>