%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/alliance/domains/congress-pact1in5.eu/public_html/
Upload File :
Create Path :
Current File : /home/alliance/domains/congress-pact1in5.eu/public_html/a-monter.php

<?php

include_once("inc/config.php");
include_once("inc/functions.php");
include_once("inc/session.php");
include_once("inc/init.php");

verif_get($_GET['id']);
verif_get($_GET['avant']);
$db = new BaseOps;

// if($_GET['table'] == "categorie") {
	// verif_co_admin();
	// $query = "SELECT ordre FROM `categorie` WHERE id = ".$_GET['id'];
	// $data = $db->select_array($query);
	// $query = "SELECT ordre FROM `categorie` WHERE id = ".$_GET['avant'];
	// $dataavant = $db->select_array($query);
	// $where = "id = ".$_GET['id'];
	// $values = array(
		// "ordre" => $dataavant['ordre'] );
	// $db->update("categorie", $values, $where);
	// $where = "id = ".$_GET['avant'];
	// $values = array(
		// "ordre" => $data['ordre'] );
	// $db->update("categorie", $values, $where);
	////recalculer
	// $db->recalcordre("categorie");
	// header("Location: liste_cat.php");
// }

if($_GET['table'] == "section") {
	verif_co_admin();
	$query = "SELECT ordre FROM `section` WHERE id = ".$_GET['id'];
	$data = $db->select_array($query);
	$query = "SELECT ordre FROM `section` WHERE id = ".$_GET['avant'];
	$dataavant = $db->select_array($query);
	$where = "id = ".$_GET['id'];
	$values = array(
		"ordre" => $dataavant['ordre'] );
	$db->update("section", $values, $where);
	$where = "id = ".$_GET['avant'];
	$values = array(
		"ordre" => $data['ordre'] );
	$db->update("section", $values, $where);
	//recalculer
	$db->recalcordre("section", "categorie = ".$_GET['cat']);
	header("Location: liste_cat.php");
}


if($_GET['table'] == "page") {
	$page_sec = $section->page_sec($_GET['id']);
	$page_sec2 = $section->page_sec($_GET['id']);
	verif_co_sec($page_sec);
	verif_co_sec($page_sec2);
	$query = "SELECT * FROM `page` WHERE id = ".$_GET['id'];
	$data = $db->select_array($query);
	$query = "SELECT ordre FROM `page` WHERE id = ".$_GET['avant'];
	$dataavant = $db->select_array($query);
	$where = "id = ".$_GET['id'];
	$values = array(
		"ordre" => $dataavant['ordre'] );
	$db->update("page", $values, $where);
	$where = "id = ".$_GET['avant'];
	$values = array(
		"ordre" => $data['ordre'] );
	$db->update("page", $values, $where);
	//recalculer
	$db->recalcordre("page", "edition=".$data['edition']." AND categorie=".$data['categorie']." AND section = ".$page_sec);
	header("Location: editer_section.php?id=".$page_sec);
}


if($_GET['table'] == "encart") {
	verif_co_admin();
	$query = "SELECT ordre FROM `encart` WHERE id = ".$_GET['id'];
	$data = $db->select_array($query);
	$query = "SELECT ordre FROM `encart` WHERE id = ".$_GET['avant'];
	$dataavant = $db->select_array($query);
	$where = "id = ".$_GET['id'];
	$values = array(
		"ordre" => $dataavant['ordre'] );
	$db->update("encart", $values, $where);
	$where = "id = ".$_GET['avant'];
	$values = array(
		"ordre" => $data['ordre'] );
	$db->update("encart", $values, $where);
	//recalculer
	$db->recalcordre("encart");
	header("Location: liste_infos.php");
}
if($_GET['table'] == "response") {
	verif_co_admin();
	$query = "SELECT ordre FROM `response` WHERE id = ".$_GET['id'];
	$data = $db->select_array($query);
	$query = "SELECT ordre FROM `response` WHERE id = ".$_GET['avant'];
	$dataavant = $db->select_array($query);
	$where = "id = ".$_GET['id'];
	$values = array(
		"ordre" => $dataavant['ordre'] );
	$db->update("response", $values, $where);
	$where = "id = ".$_GET['avant'];
	$values = array(
		"ordre" => $data['ordre'] );
	$db->update("response", $values, $where);
	//recalculer
	$db->recalcordre("response", "`question`=".$_GET['id_question']);
	header("Location: editer_question.php?id=".$_GET['id_question'].'&msg=yes');
}

if($_GET['table'] == "question") {
	verif_co_admin();
	$query = "SELECT * FROM `question` WHERE id = ".$_GET['id'];
	$data = $db->select_array($query);
	$query = "SELECT * FROM `question` WHERE id = ".$_GET['avant'];
	$dataavant = $db->select_array($query);
	$where = "id = ".$_GET['id'];
	$values = array(
		"ordre" => $dataavant['ordre'] );
	$db->update("question", $values, $where);
	$where = "id = ".$_GET['avant'];
	$values = array(
		"ordre" => $data['ordre'] );
	$db->update("question", $values, $where);
	//recalculer
	$db->recalcordre("question","`edition`=".$_GET['id_edition']." AND `profil`=".$data['profil']);
	header("Location: gerer_question.php?msg=yes");
}

if($_GET['table'] == "type_activite") {
	verif_co_admin();
	$query = "SELECT ordre,profil FROM `type_activite` WHERE id = ".$_GET['id'];
	$data = $db->select_array($query);
	$query = "SELECT ordre FROM `type_activite` WHERE id = ".$_GET['avant'];
	$dataavant = $db->select_array($query);
	$where = "id = ".$_GET['id'];
	$values = array(
		"ordre" => $dataavant['ordre'] );
	$db->update("type_activite", $values, $where);
	$where = "id = ".$_GET['avant'];
	$values = array(
		"ordre" => $data['ordre'] );
	$db->update("type_activite", $values, $where);
	//recalculer
	$db->recalcordre("type_activite","`profil`=".$data['profil']);
	header("Location: liste_type_act.php?id=".$_GET['id_edition'].'&msg=yes');
}

if($_GET['table'] == "offre") {
	verif_co_admin();
	$query = "SELECT ordre FROM `offre` WHERE id = ".$_GET['id'];
	$data = $db->select_array($query);
	$query = "SELECT ordre FROM `offre` WHERE id = ".$_GET['avant'];
	$dataavant = $db->select_array($query);
	$where = "id = ".$_GET['id'];
	$values = array(
		"ordre" => $dataavant['ordre'] );
	$db->update("offre", $values, $where);
	$where = "id = ".$_GET['avant'];
	$values = array(
		"ordre" => $data['ordre'] );
	$db->update("offre", $values, $where);
	//recalculer
	$db->recalcordre("offre");
	header("Location: offres_avantages.php");
}

if($_GET['table'] == "condition") {
	verif_co_admin();
	$query = "SELECT ordre,profil FROM `condition` WHERE id = ".$_GET['id'];
	$data = $db->select_array($query);
	$query = "SELECT ordre FROM `condition` WHERE id = ".$_GET['avant'];
	$dataavant = $db->select_array($query);
	$where = "id = ".$_GET['id'];
	$values = array(
		"ordre" => $dataavant['ordre'] );
	$db->update("condition", $values, $where);
	$where = "id = ".$_GET['avant'];
	$values = array(
		"ordre" => $data['ordre'] );
	$db->update("condition", $values, $where);
	//recalculer
	$db->recalcordre("condition","`profil`=".$data['profil']);
	header("Location: gerer_condition.php?id=".$_GET['id_edition'].'&msg=yes');
}


if($_GET['table'] == "theme") {
	verif_co_admin();
	$query = "SELECT ordre FROM `theme` WHERE id = ".$_GET['id'];
	$data = $db->select_array($query);
	$query = "SELECT ordre FROM `theme` WHERE id = ".$_GET['avant'];
	$dataavant = $db->select_array($query);
	$where = "id = ".$_GET['id'];
	$values = array(
		"ordre" => $dataavant['ordre'] );
	$db->update("theme", $values, $where);
	$where = "id = ".$_GET['avant'];
	$values = array(
		"ordre" => $data['ordre'] );
	$db->update("theme", $values, $where);
	//recalculer
	$db->recalcordre("theme");
	header("Location: liste_theme.php");
}

if($_GET['table'] == "categorie") {
	verif_co_admin();
	$query = "SELECT ordre FROM `categorie` WHERE id = ".$_GET['id'];
	$data = $db->select_array($query);
	$query = "SELECT ordre FROM `categorie` WHERE id = ".$_GET['avant'];
	$dataavant = $db->select_array($query);
	$where = "id = ".$_GET['id'];
	$values = array(
		"ordre" => $dataavant['ordre'] );
	$db->update("categorie", $values, $where);
	$where = "id = ".$_GET['avant'];
	$values = array(
		"ordre" => $data['ordre'] );
	$db->update("categorie", $values, $where);
	//recalculer
	$db->recalcordre("categorie");
	header("Location: liste_categorie.php");
}



?>

Zerion Mini Shell 1.0