AEOS Calvarium v0.2
This commit is contained in:
parent
b1cb9e9582
commit
37a738d9de
16 changed files with 152 additions and 150 deletions
7
modules/owsimple/base.php
Normal file
7
modules/owsimple/base.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
/* *************************************
|
||||
Fichier BASE du module Simple.
|
||||
************************************* */
|
||||
|
||||
echo $contenu['page']['contenu']['#text'];
|
||||
?>
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<page>
|
||||
<id>0</id>
|
||||
|
||||
<nom>nom</nom>
|
||||
<contenu>contenu</contenu>
|
||||
<type>Simple</type>
|
||||
<type>owSimple</type>
|
||||
<ordre>0</ordre>
|
||||
<etat>0</etat>
|
||||
</page>
|
||||
9
modules/owsimple/config.xml
Normal file
9
modules/owsimple/config.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<configuration>
|
||||
<nom>owSimple</nom>
|
||||
<dossier>owsimple</dossier>
|
||||
<description>Ajouter une page de texte simple.</description>
|
||||
<version>1.1</version>
|
||||
<auteurs>NNS Production</auteurs>
|
||||
<email>contact@nekonosekai.com</email>
|
||||
</configuration>
|
||||
87
modules/owsimple/edition.php
Normal file
87
modules/owsimple/edition.php
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
/* *************************************
|
||||
Titre: Module Simple
|
||||
Auteur: NNS Production
|
||||
Version: 1.1
|
||||
----------- Changelog ------------------
|
||||
14/08/2011 - Modification d'une variable
|
||||
défectueuse.
|
||||
************************************* */
|
||||
|
||||
if ($_GET['action']=="ajouter")
|
||||
{
|
||||
if(isset($_POST['s1']) || isset($_POST['s2']))
|
||||
{
|
||||
if (empty($_POST['nom_page']) || $_POST['nom_page']=="")
|
||||
{
|
||||
echo "<span class='erreur'>Merci d'indiquer un nom de page.</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$list=listing_dossier($DATA_PAGES);
|
||||
$nb = sizeof($list); $nb=$nb+1;
|
||||
copy('../modules/'.$_POST['type'].'/base.xml', '../data/pages/'.$nb.'.xml');
|
||||
ecriture_xml('../data/pages/'.$nb.'.xml', 'nom', $_POST['nom_page']);
|
||||
ecriture_xml('../data/pages/'.$nb.'.xml', 'contenu', $_POST['input']);
|
||||
ecriture_xml('../data/pages/'.$nb.'.xml', 'id', $nb);
|
||||
ecriture_xml('../data/pages/'.$nb.'.xml', 'ordre', $nb);
|
||||
|
||||
if (@$_POST['affichage']=="on"){$maintenance="1";} else {$maintenance="0";}
|
||||
ecriture_xml('../data/pages/'.$nb.'.xml', 'etat', $maintenance);
|
||||
if(isset($_POST['s1'])) {$m=1; echo "<span class='valide'>Page ajoutée.</span>";}
|
||||
if(isset($_POST['s2'])) {$m=1;echo "<span class='valide'>Page sauvegardée.</span>";}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elseif ($_GET['action']=="modifier")
|
||||
{
|
||||
if(isset($_POST['s1']) || isset($_POST['s2']))
|
||||
{
|
||||
if (empty($_POST['nom_page']) || $_POST['nom_page']=="")
|
||||
{
|
||||
echo "<span class='erreur'>Merci d'indiquer un nom de page.</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
ecriture_xml('../data/pages/'.$_GET['id'].'.xml', 'nom', $_POST['nom_page']);
|
||||
ecriture_xml('../data/pages/'.$_GET['id'].'.xml', 'contenu', $_POST['input']);
|
||||
|
||||
if (@$_POST['affichage']=="on"){$maintenance="1";} else {$maintenance="0";}
|
||||
ecriture_xml('../data/pages/'.$_GET['id'].'.xml', 'etat', $maintenance);
|
||||
|
||||
if(isset($_POST['s1'])) {$m=0; echo "<span class='valide'>Changement appliqué.</span>";}
|
||||
if(isset($_POST['s2'])) {$m=1; echo "<span class='valide'>Changement sauvegardé.</span>";}
|
||||
}
|
||||
}
|
||||
$page = lecture_xml("../data/pages/".$_GET['id'].".xml");
|
||||
}
|
||||
if (@$m!=1) { ?>
|
||||
|
||||
<form action="index.php?pid=2&action=<?php echo $_GET['action']; if($_GET['action']=="modifier"){echo "&id=".$_GET['id'];}?>" method="post" onsubmit="editor.post();" enctype="multipart/form-data">
|
||||
<p>
|
||||
<b>Nom de la page</b><br /><br />
|
||||
<input type="text" name="nom_page" class="input_text" value="<?php echo @$page['page']['nom']['#text']; ?>" id="text_input" /><br /><br />
|
||||
<b>Contenu de la page</b>
|
||||
</p>
|
||||
<div class="gauche"><textarea id="input" name="input" cols="0" rows="0"><?php echo @$page['page']['contenu']['#text']; ?></textarea></div>
|
||||
<div class="div_unique1">
|
||||
<b>Options</b><br /><br />
|
||||
<table id="option_table">
|
||||
<tr>
|
||||
<td><input type="checkbox" id="affi" name="affichage" <?php if(@$page['page']['etat']['#text']==1){echo "checked='checked'";} ?>/><label for="affi"><span style="cursor:pointer;"> Affichage</span></label></td>
|
||||
<td><input type="submit" name="s1" value="Appliquer" id="apply_but"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="../themes/defaut/images/icones/delete.png" alt="Delete" /><a href="index.php?pid=2"> Annuler</a></td>
|
||||
<td><input type="submit" name="s2" value="Enregistrer" id="save_but"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php include('../lib/wysiwyg.lib.php'); ?>
|
||||
<p>
|
||||
<input type="hidden" name="type" value="<?php echo $_POST['type']; ?>" /><br /><br />
|
||||
</p>
|
||||
</form><?php
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<configuration>
|
||||
<nom>Pages simples</nom>
|
||||
<dossier>simple</dossier>
|
||||
<description>Module de base qui permet d'ajouter une page de texte.</description>
|
||||
<version>1.0.3</version>
|
||||
<auteurs>N.n.S Production</auteurs>
|
||||
<email>contact@nekonosekai.com</email>
|
||||
</configuration>
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
<?php
|
||||
// Fichier d'édition et d'ajout d'une page
|
||||
if ($_GET['action']=="ajouter")
|
||||
{
|
||||
if(isset($_POST['s1']) || isset($_POST['s2']))
|
||||
{
|
||||
if (empty($_POST['nom_page']) || $_POST['nom_page']=="")
|
||||
{
|
||||
echo "<span class='erreur'>Merci d'indiquer un nom de page.</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$list=listing_dossier($DATA_PAGES);
|
||||
$nb = sizeof($list); $nb=$nb+1;
|
||||
copy('../modules/simple/base.xml', '../data/pages/'.$nb.'.xml');
|
||||
ecriture_xml('../data/pages/'.$nb.'.xml', 'nom', $_POST['nom_page']);
|
||||
ecriture_xml('../data/pages/'.$nb.'.xml', 'contenu', $_POST['input']);
|
||||
ecriture_xml('../data/pages/'.$nb.'.xml', 'id', $nb);
|
||||
ecriture_xml('../data/pages/'.$nb.'.xml', 'ordre', $nb);
|
||||
|
||||
if (@$_POST['affichage']=="on"){$maintenance="1";} else {$maintenance="0";}
|
||||
ecriture_xml('../data/pages/'.$nb.'.xml', 'etat', $maintenance);
|
||||
if(isset($_POST['s1'])) {$m=1; echo "<span class='valide'>Page ajoutée.</span>";}
|
||||
if(isset($_POST['s2'])) {$m=1;echo "<span class='valide'>Page sauvegardée.</span>";}
|
||||
}
|
||||
}
|
||||
|
||||
if (@$m!=1) { ?>
|
||||
<form action="index.php?pid=2&action=ajouter" method="post" onsubmit="editor.post();" enctype="multipart/form-data">
|
||||
<p>
|
||||
<b>Nom de la page</b><br /><br />
|
||||
<input type="text" name="nom_page" class="input_text" value="" id="text_input" /><br /><br />
|
||||
<b>Contenu de la page</b>
|
||||
</p>
|
||||
<div class="gauche"><textarea id="input" name="input" cols="0" rows="0"></textarea></div>
|
||||
<div class="div_unique1">
|
||||
<b>Options</b><br /><br />
|
||||
<table id="option_table">
|
||||
<tr>
|
||||
<td><input type="checkbox" id="affi" name="affichage" /><label for="affi"><span style="cursor:pointer;"> Affichage</span></label></td>
|
||||
<td><input type="submit" name="s1" value="Appliquer" id="apply_but"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="../themes/defaut/images/icones/delete.png" alt="Delete" /><a href="index.php?pid=2"> Annuler</a></td>
|
||||
<td><input type="submit" name="s2" value="Enregistrer" id="save_but"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php include('../lib/wysiwyg.lib.php'); ?>
|
||||
<p>
|
||||
<input type="hidden" name="type" value="<?php echo $_POST['type']; ?>" /><br /><br />
|
||||
</p>
|
||||
|
||||
</form><?php
|
||||
}
|
||||
}
|
||||
elseif ($_GET['action']=="modifier")
|
||||
{
|
||||
if(isset($_POST['s1']) || isset($_POST['s2']))
|
||||
{
|
||||
if (empty($_POST['nom_page']) || $_POST['nom_page']=="")
|
||||
{
|
||||
echo "<span class='erreur'>Merci d'indiquer un nom de page.</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
ecriture_xml('../data/pages/'.$_GET['id'].'.xml', 'nom', $_POST['nom_page']);
|
||||
ecriture_xml('../data/pages/'.$_GET['id'].'.xml', 'contenu', $_POST['input']);
|
||||
|
||||
if (@$_POST['affichage']=="on"){$maintenance="1";} else {$maintenance="0";}
|
||||
ecriture_xml('../data/pages/'.$_GET['id'].'.xml', 'etat', $maintenance);
|
||||
|
||||
if(isset($_POST['s1'])) {$m=0; echo "<span class='valide'>Changement appliqué.</span>";}
|
||||
if(isset($_POST['s2'])) {$m=1; echo "<span class='valide'>Changement sauvegardé.</span>";}
|
||||
}
|
||||
}
|
||||
$page = lecture_xml("../data/pages/".$_GET['id'].".xml");
|
||||
|
||||
if(@$m!=1){ ?>
|
||||
<form action="index.php?pid=2&action=modifier&id=<?php echo $_GET['id']; ?>" method="post" onsubmit="editor.post();" enctype="multipart/form-data">
|
||||
<p> <b>Nom de la page</b><br /><br />
|
||||
<input type="text" name="nom_page" class="input_text" value="<?php echo $page['page']['nom']['#text']; ?>" id="text_input" /><br /><br />
|
||||
<input type="hidden" name="type" value="<?php echo $_POST['type']; ?>" /><br /><br />
|
||||
<b>Contenu de la page</b><br />
|
||||
</p>
|
||||
<div class="gauche"><textarea id="input" name="input" cols="0" rows="0"><?php echo $page['page']['contenu']['#text']; ?></textarea></div>
|
||||
<div class="div_unique1">
|
||||
<b>Options</b><br /><br />
|
||||
<table id="option_table">
|
||||
<tr>
|
||||
<td><input type="checkbox" id="affi" name="affichage" <?php if($page['page']['etat']['#text']==1){echo "checked='checked'";} ?>/><label for="affi"><span style="cursor:pointer;"> Affichage</span></label></td>
|
||||
<td><input type="submit" name="s1" value="Appliquer" id="apply_but"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="../themes/defaut/images/icones/delete.png" alt="Delete" /><a href="index.php?pid=2"> Annuler</a></td>
|
||||
<td><input type="submit" name="s2" value="Enregistrer" id="save_but"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php include('../lib/wysiwyg.lib.php'); ?>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue