%PDF- %PDF-
Mini Shell

Mini Shell

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

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

verif_co_admin();

$db = new BaseOps;

$this_section=$section->getSection($_GET['id_section']);;
if($this_section==null)
{
	include('a-404.php');
	exit(0);
}

if(isset($_POST['post']) && $_POST['post'] == 1)
{
	$erreur = $db->verifChamp("titre",$_POST,$trad->t('Title required','admin',$lang->getlang()) );
	if($erreur == "ok") $erreur = $db->verif($_POST['couleur'],$trad->t('Color required','admin',$lang->getlang()));
	if($erreur == "ok")
	{
		
		if($_POST['photo'] != null){
			$_POST['photo'] = photo_move($_POST['photo']);
		}		
		$form->creerChamp("permalien","titre",$_POST,"cleanUrl");
		
		$section->edit($_POST);
		header("Location:liste_cat.php?msg=yes");
	}
	else {
		$err = true;
	}
	
	
}
else{
	$_POST=$this_section;
}

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

<div class="text_admin">
<h2><?=$trad->t('Edit theme','admin',$lang->getlang())?></h2>

<ul class="sousmenuadmin">
	<li><a href="admin/liste_actus.php?id_section=<?php echo $_GET['id_section']; ?>"><?=$trad->t('News/events','admin',$lang->getlang())?></a></li>
	<?php if($data['type'] != 0) { ?><li><a href="admin/liste_pages.php?id_section=<?php echo $_GET['id_section']; ?>"><?=$trad->t('Page list','admin',$lang->getlang())?></a></li><?php } ?>
</ul>

<?php
if(isset($err)) {
	echo "<p class=\"erreurbloc\">".$erreur."</p>";
}
if(isset($yes)) {
	echo "<p class=\"infobloc\">Opération effectuée</p>";
}
?>
<?=$form->geneFlag($lang->id());?><br/>
<form action="admin/modifier_section.php?id_section=<?php echo $_GET['id_section']; ?>" method="post" class="form">
	<table>
		
		<tr>
			<td class="label"><?=$trad->t('Theme title','admin',$lang->getlang())?> <span class="etoile">*</span></td>
			<td class="field"><?$html='<input type="text" name="titre_[LANG]" value="[VALUE]" />';
			echo $form->geneField($html,$lang->id(),$form->getValuesField('titre',$_POST));?>
			</td>
		</tr>
		<tr>
			<td class="label"></td>
			<td class="field" colspan="2">
				<div id="toolbar"></div>
			</td>
		</tr>
		<tr>
			<td class="label top"><?=$trad->t("Theme description","admin",$lang->id())?> <span class="etoile">*</span></td>
			<td class="field">
			<?$html='<textarea name="texte_[LANG]">[VALUE]</textarea>';
			echo $form->geneField($html,$lang->id(),$form->getValuesField('texte',$_POST));
			?>
			</td>
		</tr>
		<tr>
			<td class="label top"><?=$trad->t("Theme presentation (between pages list and news)","admin",$lang->id())?> <span class="etoile">*</span></td>
			<td class="field">
			<?$html='<textarea name="texte2_[LANG]">[VALUE]</textarea>';
			echo $form->geneField($html,$lang->id(),$form->getValuesField('texte2',$_POST));
			?>
			</td>
		</tr>

		<!--<tr>
			<td class="label top">Type <span class="etoile">*</span></td>
			<td class="field">
				<p><input type="radio" class="radio" id="type1" <?php if($_POST['type'] == 1) echo 'checked="checked"' ?> name="type" value="1"> <label for="type1">Section avec des pages et actualités</label></p>
				<p><input type="radio" class="radio" id="type0" <?php if($_POST['type'] == 0) echo 'checked="checked"' ?> name="type" value="0"> <label for="type0">Section avec uniquement un lien et des actualités</label></p>
			</td>
			<td class="field"></td>
		</tr>
		<tr>
			<td class="label">Site web</td>
			<td class="field"><input type="text" name="site" value="<?php echo $_POST['site']; ?>" /></td>
			<td class="field"></td>
		</tr>
		<tr>
			<td class="label">E-Mail</td>
			<td class="field"><input type="text" name="email" value="<?php echo $_POST['email']; ?>" /></td>
			<td class="field"></td>
		</tr>-->
		
		<tr>
			<td class="label"><?=$trad->t("Color","admin",$lang->id())?> <span class="etoile">*</span></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 top"><?=$trad->t('Theme photo','admin',$lang->getlang())?> <span class="etoile">*</span></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>
	</table>
	<div class="form_bouton">
		<input type="hidden" name="id_section" value="<?=$_GET['id_section']?>" />
		<input type="hidden" name="post" value="1" />
		<input type="submit" class="bouton" id="maj_bouton" value="<?=$trad->t('Edit theme','admin',$lang->getlang())?>" />
<?php if($_GET['id_section'] != 1) { ?>
		<a href="admin/suppr_section.php?id_section=<?php echo $_GET['id_section']; ?>" class="bouton confirm" /><?=$trad->t('Delete theme','admin',$lang->getlang())?></a>
<?php } ?>
	</div>
</form>
<?=$form->geneFlag($lang->id());?><br/>
</div>

<?

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

?>

Zerion Mini Shell 1.0