diff --git a/.gitignore b/.gitignore
index 3cac71b..a9c952c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -220,3 +220,4 @@ mypersonaldata/public/
mypersonaldata/zipversions/
!mypersonaldata/zipversions/index.html
pass.php
+user_config.php
\ No newline at end of file
diff --git a/auto_restrict.php b/auto_restrict.php
index b4a8e60..fdd446c 100644
--- a/auto_restrict.php
+++ b/auto_restrict.php
@@ -1,185 +1,185 @@
-');
- include('login_form.php');exit();
- }
- else{ # On affiche un formulaire invitant à rentrer le mdp puis on exit le script
- include('login_form.php');exit();
- }
- }
- // ---------------------------------------------------------------------------------
+');
+ include('login_form.php');exit();
+ }
+ else{ # On affiche un formulaire invitant à rentrer le mdp puis on exit le script
+ include('login_form.php');exit();
+ }
+ }
+ // ---------------------------------------------------------------------------------
+
+
+ // ------------------------------------------------------------------
+
+ // ------------------------------------------------------------------
+ // gestion de post pour demande de connexion
+ // si un utilisateur tente de se loguer, on gère ici
+ // ------------------------------------------------------------------
+ if (isset($_POST['login'])&&isset($_POST['pass'])){
+ log_user($_POST['login'],$_POST['pass']);
+ if (isset($_POST['cookie'])){setcookie($auto_restrict['cookie_name'],sha1($_SERVER['HTTP_USER_AGENT']),time()+31104000);}//un an
+ header('location: index.php');
+ }
+
+ // ------------------------------------------------------------------
+ // si pas de demande de connexion on verifie les vars de session
+ // et la duree d'inactivité de la session
+ // si probleme,on include un form de login.
+ // ------------------------------------------------------------------
+ if (!is_ok()){session_destroy();header('location: index.php?public');exit();}
+
+ // ------------------------------------------------------------------
+ // demande de deco via la variable get 'deconnexion'
+ // ------------------------------------------------------------------
+ if (isset($_GET['deconnexion'])){log_user($_POST['login'],$_POST['pass']);}
+ // ------------------------------------------------------------------
+ //header('location: index.php?public');
+
+
+
+
+ // ------------------------------------------------------------------
+ // fonctions de cryptage
+ // récupérées sur http://www.info-3000.com/phpmysql/cryptagedecryptage.php
+ // ------------------------------------------------------------------
+ function GenerationCle($Texte,$CleDEncryptage)
+ {
+ $CleDEncryptage = md5($CleDEncryptage);
+ $Compteur=0;
+ $VariableTemp = "";
+ for ($Ctr=0;$Ctr
\ No newline at end of file
diff --git a/config_page.php b/config_page.php
index 5430768..0d31f8d 100644
--- a/config_page.php
+++ b/config_page.php
@@ -3,10 +3,10 @@
* @author bronco@warriordudimanche.com
* @copyright open source and free to adapt (keep me aware !)
* @version 0.1
- * auto_form.php is a little script to auto create a form and
- * its content only with an array.
- * It can create text inputs radiobuttons, select lists, passwords inputs.
- * All the generated form's elements can be reached by classes
+ * auto_form.php is a little script to auto create a form and
+ * its content only with an array.
+ * It can create text inputs radiobuttons, select lists, passwords inputs.
+ * All the generated form's elements can be reached by classes
* and ids with css or jquery.
*
* It's possible to configure auto_form to add some features
@@ -23,7 +23,7 @@ $config=array(
'use_a_radiobutton_choice'=>'choice one',// current value: other values are defined below
'my_password'=>'password',
'confirm_password'=>'',
-
+
);*/
//then render_form($config);
@@ -31,7 +31,7 @@ $config=array(
/* #####################################################################
# auto_form config #
#####################################################################
-
+
*/
// here are the basic parameters
@@ -68,7 +68,7 @@ function render_form($var){
if ($autoform_config['form_class']){$class=' class="'.$autoform_config['form_class'].'" ';}
if ($autoform_config['enctype']){$enctype=' enctype="'.$autoform_config['enctype'].'" ';}
if (isset($autoform_config['reset_button_label'])){$reset="';}
-
+
echo '
';
}
-
+
echo '
';
tagcloud();
echo '
';
@@ -925,8 +928,8 @@ if ($GLOBAL['done']['d'] !== FALSE) {
// PRIVATE PAGES ------------------------------------------------------------------------------------------
- if (!$GLOBAL['public']){
-
+ if (!$GLOBAL['public']){
+
echo '
'."\n";
$liste_pages = search('private',$search_tags);
if ( ($nb = count($liste_pages)) != 0 ) {
@@ -951,17 +954,17 @@ if ($GLOBAL['done']['d'] !== FALSE) {
}
$tags=$taglinks='';
if (isset($GLOBAL['tag_array']['private'][$liste_pages[$i]])){$tags=$GLOBAL['tag_array']['private'][$liste_pages[$i]];$taglinks=tag2links($GLOBAL['tag_array']['private'][$liste_pages[$i]]);}
-
+
echo "\t".'