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 publication
  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. if(isset($_POST['id']))    $id=$_POST['id'];
  20. if(isset($_GET['id']))    $id=$_GET['id'];
  21. $link_det=$rub_link."&amp;todo=det&amp;id=".$id;
  22.  
  23.  
  24. if(isset($_POST['valider'])) {
  25.   $publication_object new publication;
  26.   $link_confirm="confirm.php?rub=".$rub."&todo=".$todo;
  27.   $result=$publication_object->DeletePublication($id$sql_object);
  28.   if($resultheader("Location: ".$link_confirm);
  29.   else  system_error();
  30. }
  31.  
  32. $requeteSQL_getPublicationTitle($id);
  33. $result=$sql_object->DBSelect($requete);
  34. $publi_title=FormatText($result[0]['publi_title']);
  35. $publi_owner=$result[0]['publi_posted_by'];
  36.  
  37. //////////// Check Droits utilisateur ////////////
  38. if (!hasRight('publication')) ReloadIndex('admin');
  39. if (GetSessionElement('id')!=$publi_owner && !IsSuperAdmin()) ReloadIndex('admin');
  40. ////////////
  41. ?>
  42. <div id="chemin">
  43. <ul>
  44.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a>
  45.     </li>
  46.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  47.         class="chemin_rub"><?php echo _t('menu','publication')?></a></li>
  48.     <li><span><?php echo formatnavTitle(_t('publication','sup')." : "$publi_title)?></span>
  49.     </li>
  50. </ul>
  51. </div>
  52. <!--end barre haute -->
  53. <?php
  54. include_once(THEME_ADMIN_PATH."quickicons.php");
  55. ?>
  56. <div class="contentcontainer"><?php
  57. include_once($dir."/menurub.php");
  58. ?>
  59. <div id="content"><?php echo "<h2>".formatTitleh2($publi_title)."</h2>"?>
  60. <form id="suppubli" action="<?php echo $_SERVER['SCRIPT_NAME']?>"
  61.     method="post">
  62. <p class="info"><?php echo _t('divers','sup_confirm')?></p>
  63. <div><input name="id" type="hidden" value="<?php echo $id?>" /> <input
  64.     name="rub" type="hidden" value="<?php echo $rub?>" id="rub" /> <input
  65.     name="todo" type="hidden" value="<?php echo $todo?>" id="todo" /> <?php echo cancel_button('javascript:history.go(-1);')?>
  66. <input name="valider" type="submit"
  67.     value="<?php echo _t('btn','valid'?>" class="button" id="valider" />
  68. </div>
  69. </form>
  70. </div>
  71. <?php include_once($dir."/help.php")?></div>

Documentation generated on Thu, 03 May 2012 15:07:41 +0200 by phpDocumentor 1.4.1