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

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