diff options
Diffstat (limited to 'final/app/include/ludo')
-rw-r--r-- | final/app/include/ludo/auth.inc.php | 31 | ||||
-rw-r--r-- | final/app/include/ludo/config.inc.php | 10 | ||||
-rw-r--r-- | final/app/include/ludo/fonctions.inc.php | 8 | ||||
-rw-r--r-- | final/app/include/ludo/html_elements.inc.php | 23 |
4 files changed, 45 insertions, 27 deletions
diff --git a/final/app/include/ludo/auth.inc.php b/final/app/include/ludo/auth.inc.php index 2491203..516bd45 100644 --- a/final/app/include/ludo/auth.inc.php +++ b/final/app/include/ludo/auth.inc.php @@ -13,24 +13,33 @@ define("ERR_BAD_PARAMS", -100); // Fonction d'authentification pop3 function pop3_auth_simple($mail, $upw) { - if ( ($ret = ereg ( "(^.*)@([[:alnum:]]+\.[[:alnum:]]+)", $mail, $re_tokens ) ) ) + //~ echo "DEBUG : function pop3_auth_simple($mail, $upw)\n"; + //~ if ( ($ret = ereg ( "(^.*)@([[:alnum:]]+\.[[:alnum:]]+)", $mail, $re_tokens ) ) ) + if ( ($ret = ereg ( "(^.*)@(.+)", $mail, $re_tokens ) ) ) { /* $re_tokens [] * [0] : email complet * [1] : nom_mail * [2] : serveur_mail */ - require_once('config.inc.php'); - $srv_conf = $CONFIG['AUTH']['POP']['SERVERS'][strtolower($re_tokens[2])]; - if ( is_array($srv_conf) ) + $server_mail=strtolower($re_tokens[2]); + include('config.inc.php'); + + if ( isset($CONFIG['AUTH']['POP']['SERVERS'][$server_mail]) ) { - $server=$srv_conf['subdomain']; - $port=$srv_conf['port']; - if ( $srv_conf['username_is_full_mail'] ) - { $user = $mail; } else { $user = $re_tokens[1]; } - return pop3_auth ($server, $port, $user, $upw); + $srv_conf = $CONFIG['AUTH']['POP']['SERVERS'][$server_mail]; + if ( is_array($srv_conf) ) + { + $server=$srv_conf['subdomain']; + $port=$srv_conf['port']; + if ( $srv_conf['username_is_full_mail'] ) + { $user = $mail; } else { $user = $re_tokens[1]; } + return pop3_auth ($server, $port, $user, $upw); + } } - } + //~ else { print_r($CONFIG); echo "\nDEBUG : \$server_mail==$server_mail\n";} + }//else echo "Pb EREG\n"; + /* DEBUG echo $mail . "\n" . $ret . "\n";; print_r($re_tokens); @@ -40,6 +49,8 @@ function pop3_auth_simple($mail, $upw) function pop3_auth ($server, $port, $user, $upw) { + //~ echo "function pop3_auth ($server, $port, $user, $upw)\n"; + //echo "DEBUG : fsockopen($server, $port, $errno, $errstr, 10);"; $sock = @fsockopen($server, $port, $errno, $errstr, 10); if ( $sock === false) diff --git a/final/app/include/ludo/config.inc.php b/final/app/include/ludo/config.inc.php index c016342..92be407 100644 --- a/final/app/include/ludo/config.inc.php +++ b/final/app/include/ludo/config.inc.php @@ -9,6 +9,12 @@ $CONFIG = array ( 'SERVERS' => array ( + 'etu.iut-blagnac.fr' => array + ( + 'subdomain' => 'mail.google.com', + 'port' => 110, + 'username_is_full_mail' => true + ), 'wanadoo.fr' => array ( 'subdomain' => 'pop.orange.fr', @@ -31,8 +37,8 @@ $CONFIG = array ( // 'nom à afficher' => 'nom_fichier_sans_extension' 'standard' => 'ice', - 'Glace (ancien)' => 'ice_moche', - 'bleu' => 'style1' + 'vertical demo' => 'ice_moche' + //'bleu' => 'style1' ) ), 'MAIL' => array diff --git a/final/app/include/ludo/fonctions.inc.php b/final/app/include/ludo/fonctions.inc.php index 3361827..1dd9117 100644 --- a/final/app/include/ludo/fonctions.inc.php +++ b/final/app/include/ludo/fonctions.inc.php @@ -145,7 +145,7 @@ function generate_html_array_personnes_crenaux($idR) if ( $is_admin ) { echo ' <a href="#poppersonne" onclick="loadid(\'poppersonne.php?idR=' . $idR; - echo '&idL=' . $idL_interne . '&idP_orga=' . $idP_orga . '\',\'poppersonne\',true);popon(\'poppersonne\');">' . "\n"; + echo '&idL=' . $idL_interne . '&idP_orga=' . $idP_orga . '\',\'poppersonne\',true);popon(\'poppersonne\');loadid(\'help/reunion_admin_participants.php.hlp\',\'help\',false)">' . "\n"; echo ' <img src="images/addP.gif" alt="Ajouter une personne" title="Ajouter une personne" height="17" width="19" />' . "\n"; echo ' </a> '; } @@ -185,7 +185,7 @@ function generate_html_array_personnes_crenaux($idR) { ?> <th> - <a href="#popcreneau" onclick="loadid('popcreneau.php?idR=<?php echo $idR; ?>','popcreneau',true);popon('popcreneau');"> + <a href="#popcreneau" onclick="loadid('popcreneau.php?idR=<?php echo $idR; ?>','popcreneau',true);popon('popcreneau');loadid('help/reunion_admin_creneaux.php.hlp','help',false)"> <img src="./images/editCreneau2.gif" alt="Editer les creneaux" title="Editer les creneaux" height="21" width="22" /> </a> </th> @@ -275,7 +275,7 @@ function generate_html_array_personnes_crenaux($idR) <td> <?php echo '<a href="#poppersonne" onclick="loadid(\'poppersonne.php?idR=' . $idR; - echo '&idL=' . $idL_interne . '&idP_orga=' . $idP_orga . '\',\'poppersonne\',true);popon(\'poppersonne\');">' . "\n"; + echo '&idL=' . $idL_interne . '&idP_orga=' . $idP_orga . '\',\'poppersonne\',true);popon(\'poppersonne\');loadid(\'help/reunion_admin_participants.php.hlp\',\'help\',false)">' . "\n"; ?> <img src="images/addP.gif" alt="Ajouter une personne" title="Ajouter une personne" height="17" width="19" /> </a> @@ -443,7 +443,7 @@ function generate_html_reunion_detail2($idR) echo '<a href="#popfixer" onclick="loadid(\'include/ludo/div_create_or_modif.php?idR='; echo $idR . '&objetR=' . urlencode($objetR) . '&lieuR=' . urlencode($lieuR) . '&ordreJourR='; echo urlencode($ordreJourR) . '&remarquesR=' . urlencode($remarquesR); - echo "','details_reunion',false)\">(Editer)</a>\n"; + echo "','details_reunion',false);loadid('help/reunion_admin_info.php.hlp','help',false)\">(Editer)</a>\n"; } $objetR=htmlentities($objetR, ENT_QUOTES); $ordreJourR=htmlentities($ordreJourR, ENT_QUOTES); diff --git a/final/app/include/ludo/html_elements.inc.php b/final/app/include/ludo/html_elements.inc.php index 35eaa68..a252662 100644 --- a/final/app/include/ludo/html_elements.inc.php +++ b/final/app/include/ludo/html_elements.inc.php @@ -16,9 +16,9 @@ echo '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n" <script type="text/javascript" src="script.js"></script> <?php //print_r($_COOKIE['aworcustom_css']); - if ( /*isset($_COOKIE['aworcustom_css'])*/ false ) + if ( isset($_COOKIE['aworchoose_css']) ) { - $cssfilemain = $_COOKIE['aworcustom_css']; + $cssfilemain = $_COOKIE['aworchoose_css']; } else { @@ -27,7 +27,7 @@ echo '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n" } echo ' <link href="css/' . $cssfilemain . '.css" rel="stylesheet" type="text/css" />' . "\n"; echo ' <link href="css/' . $cssfilemain . '_nohelp.css" rel="stylesheet" type="text/css" title="nohelp" />' . "\n"; - +/* if ( isset($CONFIG['CSS']['CHOOSER_LIST']) ) { foreach ( $CONFIG['CSS']['CHOOSER_LIST'] as $cssname => $cssfile ) @@ -39,6 +39,7 @@ echo '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n" } } } +*/ ?> <link href="css/print.css" rel="alternate stylesheet" type="text/css" title="print"/> </head> @@ -101,15 +102,15 @@ function generate_html_div_css_chooser() if ( ! is_array($CONFIG['CSS']['CHOOSER_LIST']) ) { return false; } - if ( isset($_COOKIE['aworcustom_css'] ) ) { $css_selected=$_COOKIE['aworcustom_css']; }else{$css_selected='';}; + if ( isset($_COOKIE['aworchoose_css'] ) ) { $css_selected=$_COOKIE['aworchoose_css']; }else{$css_selected='';}; echo '<div class="css_chooser">' . "\n"; //print_r($_COOKIE); echo ' <select id="switcherCSS" onchange="switchCSS();">' . "\n"; foreach ( $CONFIG['CSS']['CHOOSER_LIST'] as $file => $name ) { - echo ' <option value="' . $file . '"'; - if ( $file == $css_selected ) { echo ' selected="selected"'; } - echo '>' . htmlentities($name, ENT_QUOTES) . '</option>' /*. "$DEBUG:file=$file, css_selected=$css_selected"*/ . "\n"; + echo ' <option value="' . $name . '"'; + if ( $name == $css_selected ) { echo ' selected="selected"'; } + echo '>' . htmlentities($file, ENT_QUOTES) . '</option>' /*. "$DEBUG:file=$file, css_selected=$css_selected"*/ . "\n"; } echo ' </select>'. "\n"; echo '</div>'. "\n"; @@ -120,10 +121,10 @@ function generate_html_div_footer() ?> <div id="footer"> <ul> - <li class="left"> + <li class="csschooser"> <?php generate_html_div_css_chooser(); ?> </li> - <li class="center"> + <li class="wwwc"> <a href="http://validator.w3.org/check/referer"> <img src="./images/vxhtml.gif" alt="Validate" height="31" width="88" /> </a> @@ -134,8 +135,8 @@ function generate_html_div_footer() <img src="./images/wai.gif" alt="W3C-WAI level A conformance icon" height="31" width="88" /> </a> </li> - <li class="right"> - <span class="discret">Application réalisée par Jérémie Dénoyer,<br /> Ludovic Pouzenc, Julien Séré et Andriana Semouchtchak</span> + <li class="author"> + Application réalisée par :<ul><li>Jérémie Dénoyer</li><li>Ludovic Pouzenc</li><li>Julien Séré</li><li>Andriana Semouchtchak</li></ul> </li> </ul> </div> |