linea21-modules
[ class tree: linea21-modules ] [ index: linea21-modules ] [ all elements ]

Source for file sup.php

Documentation is available at sup.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage news
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. //////////// Check Inclusion de pages ////////////
  12. if (!function_exists('AuthenthificationProcess')){
  13.     include_once("../lib/lib_common.php");
  14.     ReloadIndex('admin');
  15. }
  16. ////////////
  17.  
  18.  
  19.  
  20. if(isset($_POST['id']))    $id=$_POST['id'];
  21. if(isset($_GET['id']))    $id=$_GET['id'];
  22. $link_det=$rub_link."&amp;todo=det&amp;id=".$id
  23.  
  24.  
  25. if(isset($_POST['valider'])) {
  26.     $news_object new news;
  27.     $link_confirm="confirm.php?rub=".$rub."&todo=".$todo;
  28.     $result=$news_object->DeleteNews($id$sql_object);
  29.     if($resultheader("Location: ".$link_confirm);
  30.     else  system_error();
  31. }
  32.  
  33. $requeteSQL_getNewsTitle($id);
  34. $result=$sql_object->DBSelect($requete);
  35. $news_title=FormatText($result[0]['news_title']);
  36. $news_owner=FormatText($result[0]['news_posted_by']);
  37.  
  38. //////////// Check Droits utilisateur ////////////
  39. if (!HaveRight('news')) ReloadIndex('admin');
  40. if (GetSessionElement('id')!=$news_owner && !IsSuperAdmin()) ReloadIndex('admin');
  41. ////////////
  42. ?>
  43.  
  44. <div id="chemin">
  45.     <ul>
  46.         <li>
  47.             <a href="index.php" class="chemin_home"><? echo _t('way','home')?></a>
  48.         </li>
  49.         <li>
  50.                <a href="<?php echo $rub_link?>" id="chemin_<? echo $rub?>" class="chemin_rub"><? echo _t('menu','news')?></a>
  51.         </li>
  52.         <li>
  53.             <span><? echo formatNavTitle(_t('news','sup')." : "$news_title)?></span>
  54.         </li>
  55.     </ul>
  56. </div>
  57. <!--end barre haute -->
  58. <?php
  59. include_once(THEME_ADMIN_PATH."quickicons.php");
  60. ?>
  61. <div class="contentcontainer">
  62. <?php
  63. include_once($dir."/menurub.php");
  64. ?>
  65. <div id="content">
  66. <? echo "<h2>"formatTitleh2($news_title)."</h2>"?>
  67. <form id="suptheme" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  68. <p class="info"><?php echo _t('divers','sup_confirm')?></p>
  69. <div>
  70. <input name="id" type="hidden" value="<?php echo $id?>" />
  71. <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  72. <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  73. <?php echo cancel_button('javascript:history.go(-1);')?>
  74. <input name="valider" type="submit" value="<? echo _t('btn','valid')?>" class="button" id="valider" />
  75. </div>
  76. </form>
  77. </div>
  78. <?php include_once($dir."/help.php")?>
  79. </div>

Documentation generated on Fri, 16 Oct 2009 09:39:22 +0200 by phpDocumentor 1.4.1