PageRenderTime 51ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/web/ca/page/delete.php

http://webgloo.googlecode.com/
PHP | 157 lines | 104 code | 49 blank | 4 comment | 2 complexity | 82ef45369bf8f659abae488ab11fb5e2 MD5 | raw file
  1. <?php
  2. include 'gloo.inc';
  3. require_once ($_SERVER['GLOO_INC_DIR'].'class_loader.inc' );
  4. require_once ($_SERVER['GLOO_INC_DIR'].'session.inc' );
  5. require_once ($_SERVER['GLOO_INC_DIR'].'error.inc' );
  6. include($location->GLOO_PAGE_HEADER);
  7. //security check
  8. if(!$context->isAdminGUI()) {
  9. header('location: '.url::base().'/ca/login.php');
  10. exit ;
  11. }
  12. $context->addCACrumb();
  13. $context->addCrumb('Delete page', $_SERVER['REQUEST_URI']);
  14. //ca/page/delete.php
  15. $pageId = $_GET['page_id'];
  16. //get page ident key
  17. if(empty($pageId)) {
  18. trigger_error('Wrong Navigation >> pageId not found',E_USER_ERROR);
  19. }
  20. //Go back to home page after deleting a page!
  21. $glooBackURI = url::base();
  22. ?>
  23. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  24. <html><head><title> <?php echo url::organizationName() ; ?> </title>
  25. <?php
  26. include($location->GLOO_META_TAGS);
  27. echo $glooWeb->loadCss(url::YUI_GRID_CSS) ;
  28. echo $glooWeb->loadCss(url::css('main.css'));
  29. ?>
  30. </head>
  31. <body>
  32. <?php include($location->GLOO_TOP_BAR) ?>
  33. <div id="custom-doc" class="yui-t2">
  34. <div class="content_top_bg">
  35. <div>
  36. <div> </div>
  37. </div>
  38. </div>
  39. <div class="content_left_border">
  40. <div id="hd" role="banner">
  41. <div id="header">
  42. <?php include($location->CA_HEADER_FILE) ?>
  43. </div> <!-- header -->
  44. </div>
  45. <div id="bd" role="main">
  46. <div id="yui-main">
  47. <div class="yui-b">
  48. <div class="yui-g">
  49. <div id="content">
  50. <p class="help-text">
  51. Please make sure that you do not want this page before
  52. pressing confirm button.
  53. </p>
  54. <div class="box_top_bg">
  55. <div> <div> </div> </div>
  56. </div>
  57. <div id="form">
  58. <form name="page_delete_form"
  59. action="<?php echo url::base() ?>/ca/page/frm/delete.php" method="POST">
  60. <table cellspacing="5" class="formGroup">
  61. <tr>
  62. <td class="field"> &nbsp; </td>
  63. <td>
  64. <div class="warning-message">
  65. Warning: All page content will be deleted!
  66. </div>
  67. </td>
  68. </tr>
  69. <tr> <td> &nbsp;</td> <td>&nbsp;</td></tr>
  70. <tr>
  71. <td>&nbsp;</td>
  72. <td id="bottomBar">
  73. <div class="submit">
  74. <div>
  75. <button type="submit" name="confirm" value="Confirm" onclick="this.setAttribute('value','Confirm');" ><span>Confirm</span></button>
  76. </div>
  77. </div>
  78. <div class="button">
  79. <div>
  80. <button type="button" name="cancel" onClick="javascript:go_back('<?php echo $glooBackURI ?>');"><span>Cancel</span></button>
  81. </div>
  82. </div>
  83. </td>
  84. </tr>
  85. </table>
  86. <input type="hidden" name="page_id" value="<?php echo $pageId ; ?>"/>
  87. </form>
  88. </div>
  89. <div class="box_bottom_bg">
  90. <div> <div> </div> </div>
  91. </div>
  92. </div> <!-- content -->
  93. </div>
  94. </div> <!-- block1 -->
  95. </div> <!-- yui-main -->
  96. <div class="yui-b">
  97. </div> <!-- block2 -->
  98. </div> <!-- bd -->
  99. </div> <!-- content-left-border -->
  100. <div class="content_bottom_bg">
  101. <div>
  102. <div> </div>
  103. </div>
  104. </div>
  105. </div> <!-- custom-doc -->
  106. <div id="ft" role="contentinfo"> <?php include($location->GLOO_PAGE_FOOTER); ?> </div>
  107. </body>
  108. </html>