%PDF- %PDF-
Mini Shell

Mini Shell

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

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

verif_co_admin();
verif_get($_GET['id']);

if(isset($_POST['post']) && $_POST['post'] == 1)
{
	$theme = new Theme($connection);
	$erreur = "ok";
	$erreur = $db->verifChamp("libelle",$_POST,$trad->t('Text required (english)','error',$lang->getlang()) );
	if($erreur == "ok")
	{
		unset($_POST["post"]);
		
		
		if(isset($_FILES['file_1']['name']) && $_FILES['file_1']['name'] != null){
			$_POST['photo'] = file_move("",$_FILES['file_1']['name'],$_FILES['file_1']['tmp_name']);
		}
		if(isset($_FILES['file_2']['name']) && $_FILES['file_2']['name'] != null){
			$_POST['photo2'] = file_move("",$_FILES['file_2']['name'],$_FILES['file_2']['tmp_name']);
		}
		$theme->edit($_POST);
		
		header("Location:liste_theme.php?msg=yes");
	}
	else {
		$err = true;
	}
}
else{
	$_POST=$theme->get($_GET['id']);
}

//affichage du html
include("theme/html.php");
//affichage des metas
include("theme/meta.php");
echo "\n<title>".$trad->t("Modifier le theme","admin")." - ".$info_titresite."</title>\n";
//affichage du header
include("theme/header_admin.php");

?>

<div class="text_admin">
<h2><?=$trad->t("Modifier le theme","admin")?></h2>
<?php
if(isset($_GET['msg']) && $_GET['msg']=="yes") {
	echo "<p class=\"infobloc\">Opération effectuée</p>";
}
if(isset($err) && $err) {
	echo "<p class=\"erreurbloc\">".$erreur."</p>";
}	
?>
<?=$form->geneFlag($lang->id());?>
<form action="" method="post" enctype="multipart/form-data" class="form">
	<table>
		<tr>
			<td class="label"><?=$trad->t('Libelle')?></td>
			<td class="field top">
				<? 
				$html='<input type="text" name="libelle_[LANG]" value="[VALUE]" />';
				echo $form->geneField($html,$lang->id(),$_POST['libelle']);
				
				?>
			</td>
		</tr>
		<tr>
			<td class="label"><?=$trad->t("Color","admin",$lang->id())?></td>
			<td class="field"># <input type="text" name="couleur" class="small colorpick" value="<?=(isset($_POST['couleur'])? $_POST['couleur']:"") ?>" /></td>
			<td class="field"></td>
		</tr>
		<tr>
			<td class="label"><?=$trad->t("Icone","admin",$lang->id())?></td>
			<td class="field"><input type="text" name="icone" class="" value="<?=(isset($_POST['icone'])? $_POST['icone']:"") ?>" /></td>
			<td class="field"></td>
		</tr>
		<!--<tr>
			<td class="label top"><?=$trad->t('Theme photo','admin',$lang->id())?></td>
			<td class="field"><input type="file" name="file_1" id="file_1" /><?php if(isset($_POST['photo'])) echo '<div class="uploadifyQueueItem completed">'.$_POST['photo'].'</div> '; ?></td>
			<td class="field"><input type="hidden" name="photo" id="photo1" value="<?=((isset($_POST['photo']))?$_POST['photo']:""); ?>" /></td>
		</tr>-->
		<tr>
			<td class="label top"><?=$trad->t("Photo","admin",$lang->id())?></td>
			<td class="field"><input type="file" name="file_1" id="file_1" /><?php if(isset($_POST['photo'])) echo '<div class="uploadifyQueueItem completed">'.$_POST['photo'].'</div> '; ?></td>
			<td class="field"><input type="hidden" name="photo" id="photo1" value="<?php echo $_POST['photo']; ?>" /></td>
		</tr>
		
		<tr>
			<td class="label top"><?=$trad->t("Photo 2","admin",$lang->id())?></td>
			<td class="field"><input type="file" name="file_2" id="file_2" /><?php if(isset($_POST['photo2'])) echo '<div class="uploadifyQueueItem completed">'.$_POST['photo2'].'</div> '; ?></td>
			<td class="field"><input type="hidden" name="photo2" id="photo2" value="<?php echo $_POST['photo2']; ?>" /></td>
		</tr>
		
		<tr>
			<td class="label top"><?=$trad->t("Description","admin",$lang->id())?></td>
			<td class="field top">
			<?$html='<textarea name="description_[LANG]">[VALUE]</textarea>';
			echo $form->geneField($html,$lang->id(),$_POST['description']);?>
			</td>
			
		</tr>
		
	</table>
	<div class="form_bouton">
		<input type="hidden" name="post" value="1" />
		<input type="hidden" name="id_theme" value="<?=$_GET['id']?>" />
		<input type="submit" class="bouton" id="maj_bouton" value="<?=$trad->t('Modifier le theme')?>" />
	</div>
</form>
<?=$form->geneFlag($lang->id());?>

</div>

<?

//affichage du footer
include("theme/footer.php");

?>

Zerion Mini Shell 1.0