Source for file sup.php
Documentation is available at sup.php
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
//////////// Check Inclusion de pages ////////////
include_once("../lib/lib_common.php");
if(isset ($_POST['id'])) $id= $_POST['id'];
if(isset ($_GET['id'])) $id= $_GET['id'];
$link_cancel= $rub_link. "&todo=det&id=". $id;
$mask_mass_del= "style=\"visibility:hidden;\"";
$mask_mass_mod= "style=\"visibility:hidden;\"";
$form_scale_transfert=- 1;
$scale_object= new scale;
if(isset ($_POST['valider'])) {
if(isset ($_POST['sup_method'])) {
$sup_method= $_POST['sup_method'];
if($sup_method== 'delete') {
$mask_mass_del= "style=\"visibility:visible;\"";
$mask_del_meth= "checked=\"checked\"";
$form_scale_transfert=- 1;
if($sup_method== 'modify') {
$mask_mod_meth= "checked=\"checked\"";
$mask_mass_mod= "style=\"visibility:visible;;\"";
if($_POST['transfert_scale']==- 1) $integrity= $GLOBALS['lang']['scale']['sup_noscale'];
else $form_scale_transfert= $_POST['transfert_scale'];
if($_SESSION['securityaction']!= md5($_POST['securitycode'])) {
$integrity= $GLOBALS['lang']['security']['message'];
$link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo;
$result= $scale_object->DeleteScale($id, $sql_object, $type, $form_scale_transfert);
$integrity= $GLOBALS['lang']['scale']['sup_nomethod'];
include_once("../lib/input_helpers.php");
// select-box des échelles
#$req_list=SQL_getlistscale($id);
#$data=$sql_object->DBSelect($req_list);
#$select_root=ScaleSelectBox($data, "transfert_scale", $form_scale_transfert);
// select-box des échelles
$table_exclu= $scale_object->getMaxDepth($id, $sql_object);
$data= $sql_object->DBSelect($req);
$select_root= ScaleSelectBox($data, "transfert_scale", $form_scale_transfert);
$result1= $sql_object->DBSelect($req_det);
$current_title= $result1[0]['scale_denomination'];
//////////// Check si pas suppresion échelle root ////////////
if ($result1[0]['scale_root']== 0){
include_once("../lib/lib_common.php");
<a href="index.php"> <? echo $GLOBALS['lang']['way']['home']; ?></a>
<a href=" <?php echo $rub_link; ?>"> <? echo $GLOBALS['lang']['menu']['scale']; ?></a>
<span> <? echo $GLOBALS['lang']['scale']['sup']. ' : '. formatnavTitle($current_title); ?></span>
include_once("quickicons.php");
<div class="contentcontainer">
include_once($dir. "/menurub.php");
<form id="supscale" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<input type="radio" name="sup_method" value="delete" onclick="ShowSuppInfo('mass_delete')" <?php echo $mask_del_meth; ?> />
<? echo $GLOBALS['lang']['scale']['sup_massd']; ?>
<input type="radio" name="sup_method" value="modify" onclick="ShowSuppInfo('mass_modify')" <?php echo $mask_mod_meth; ?> />
<? echo $GLOBALS['lang']['scale']['sup_massm']; ?>
<p id="transfert" <?php echo $mask_mass_mod; ?> >
<label for="transfert_scale" > <? echo $GLOBALS['lang']['scale']['sup_transfert']; ?></label>
<?php echo $select_root; ?>
<label for="securitycode" > <? echo $GLOBALS['lang']['security']['info'] ?></label>
<img src="../lib/securitycode.php" alt=" <? echo $GLOBALS['lang']['security']['info2'] ?>" id="securityimg" />
<input type="text" class="shorttextfield" id="securitycode" maxlength="5" name="securitycode" />
echo "<div class=\"info\" id=\"mass_delete\" ". $mask_mass_del. ">\n";
echo $GLOBALS['lang']['scale']['sup_scale_info2'];
echo "<div class=\"info\" id=\"mass_modify\" ". $mask_mass_mod. ">\n";
echo $GLOBALS['lang']['scale']['sup_scale_info1'];
<input name="id" type="hidden" value=" <?php echo $id; ?>" />
<input name="rub" type="hidden" value=" <?php echo $rub; ?>" id="rub" />
<input name="todo" type="hidden" value=" <?php echo $todo; ?>" id="todo" />
<input name="valider" type="submit" value=" <? echo $GLOBALS['lang']['btn']['valid'] ?>" class="button" id="valider" />
<?php include_once($dir. "/help.php"); ?>
|