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

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