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

Source for file sup.php

Documentation is available at sup.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage theme
  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. include_once("../lib/lib_common.php")
  19.  
  20. if(isset($_POST['id']))    $id=$_POST['id'];
  21. if(isset($_GET['id']))    $id=$_GET['id'];
  22.  
  23. $mask_mass_del="style=\"visibility:hidden;\"";
  24. $mask_mass_mod="style=\"visibility:hidden;\"";
  25. $mask_del_meth='';
  26. $mask_mod_meth='';
  27. $form_theme_transfert=-1;
  28.  
  29. if(isset($_POST['valider'])) {
  30.     $integrity=1;
  31.     if(isset($_POST['sup_method'])) {
  32.         $sup_method=$_POST['sup_method'];
  33.         if($sup_method=='delete'{
  34.             $type='MASS_DELETE';
  35.             $mask_mass_del="style=\"visibility:visible;\"";
  36.             $mask_del_meth="checked=\"checked\"";
  37.             $form_theme_transfert=-1;
  38.         }
  39.         if($sup_method=='modify'{
  40.             $type='MASS_MODIFY';
  41.             $mask_mod_meth="checked=\"checked\"";
  42.             $mask_mass_mod="style=\"visibility:visible;;\"";
  43.             if($_POST['transfert_theme']==-1$integrity=$GLOBALS['lang']['theme']['sup_notheme'];
  44.             else $form_theme_transfert=$_POST['transfert_theme'];
  45.         }
  46.         if($_SESSION['securityaction']!=md5($_POST['securitycode'])) {
  47.             $integrity=$GLOBALS['lang']['security']['message'];
  48.         }
  49.         if(!is_string($integrity)) {
  50.             $theme_objectnew theme;
  51.             $link_confirm="confirm.php?rub=".$rub."&todo=".$todo;
  52.             $result=$theme_object->DeleteTheme($id$sql_object$type$form_theme_transfert);
  53.             if(is_numeric($result)) header("Location: ".$link_confirm);
  54.             else  system_error();
  55.         }
  56.     }    else  {
  57.         $integrity=$GLOBALS['lang']['theme']['sup_nomethod'];
  58.     }
  59.  
  60. }
  61.  
  62.  
  63. include_once("../lib/input_helpers.php");
  64. $req_list=SQL_getlist4sup($id);
  65. $data=$sql_object->DBSelect($req_list);
  66. // select-box des thèmes
  67. $select_theme=ThemeSelectBox($data"transfert_theme"$form_theme_transfert);
  68.  
  69. $req_detSQL_getonetheme($id);
  70. $result1=$sql_object->DBSelect($req_det);
  71. $theme_name=formatText($result1[0]['theme_name'],'2HTML');
  72.  
  73. ?>
  74. <div id="chemin">
  75.     <ul>
  76.         <li>
  77.             <a href="index.php"><? echo $GLOBALS['lang']['way']['home'?></a>
  78.         </li>
  79.         <li>
  80.             <a href="<?php echo $rub_link?>"><? echo $GLOBALS['lang']['menu']['theme']?></a>
  81.         </li>
  82.         <li>
  83.             <span><? echo formatNavTitle($theme_name)?></span>
  84.         </li>
  85.     </ul>
  86. </div>
  87. <!--end barre haute -->
  88. <?php
  89. include_once("quickicons.php");
  90. ?>
  91. <div class="contentcontainer">
  92. <?php
  93. include_once($dir."/menurub.php");
  94. ?>
  95. <div id="content">
  96. <?php
  97. if(isset($integrity&& is_string($integrity)) display_errors($integrity);
  98. ?>
  99. <? echo "<h2>".formatTitleh2($theme_name)."</h2>"?>
  100. <form id="suptheme" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  101. <p>
  102.     <input type="radio" name="sup_method" id="sup_method_del" value="delete" onclick="ShowSuppInfo('mass_delete');" <?php echo $mask_del_meth?>/> 
  103.     <? echo $GLOBALS['lang']['theme']['sup_massd']?>
  104. </p>
  105. <p>
  106.     <input type="radio" name="sup_method" id="sup_method_mod" value="modify" onclick="ShowSuppInfo('mass_modify');" <?php echo $mask_mod_meth?>/>
  107.     <? echo $GLOBALS['lang']['theme']['sup_massm']?>
  108. </p>
  109. <p id="transfert" <? echo $mask_mass_mod?>>
  110.     <label for="transfert_theme" ><? echo $GLOBALS['lang']['theme']['sup_transfert']?></label>
  111.     <?php echo $select_theme?>
  112. </p>
  113. <p>
  114.     <label for="securitycode" ><? echo $GLOBALS['lang']['security']['info']?></label>
  115.     <img src="../lib/securitycode.php" alt="<? echo $GLOBALS['lang']['security']['info2']?>" id="securityimg" />
  116.     <input type="text" class="shorttextfield" id="securitycode" maxlength="5" name="securitycode" />  
  117. </p>
  118. <?php
  119. echo "<div class=\"info\"  id=\"mass_delete\" ".$mask_mass_del.">\n";
  120. echo "\t".$GLOBALS['lang']['theme']['sup_mass_delete']."\n";
  121. echo "</div>\n";
  122. echo "<div class=\"info\" id=\"mass_modify\" ".$mask_mass_mod.">\n";
  123. echo "\t".$GLOBALS['lang']['theme']['sup_mass_modify']."\n";
  124. echo "</div>\n";
  125. ?>
  126. <div>
  127. <input name="id" type="hidden" value="<?php echo $id?>" />
  128. <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  129. <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  130. <?php echo cancel_button('javascript:history.go(-1);')?>
  131. <input name="valider" type="submit" value="<? echo $GLOBALS['lang']['btn']['valid'?>" class="button" id="valider" />
  132. </div>
  133. </form>
  134. </div>
  135. <?php include_once($dir."/help.php")?>
  136. </div>

Documentation generated on Sat, 08 Nov 2008 14:54:27 +0100 by phpDocumentor 1.4.1