diff options
Diffstat (limited to 'final/app/include')
-rw-r--r-- | final/app/include/connect.inc.php | 4 | ||||
-rw-r--r-- | final/app/include/je.inc.php | 5 | ||||
-rw-r--r-- | final/app/include/ju.inc.php | 10 | ||||
-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 |
7 files changed, 57 insertions, 34 deletions
diff --git a/final/app/include/connect.inc.php b/final/app/include/connect.inc.php index 0bc0a10..469ebd1 100644 --- a/final/app/include/connect.inc.php +++ b/final/app/include/connect.inc.php @@ -4,9 +4,9 @@ */ // $bd représente le nom de la database à utiliser -$bd = "awor"; +$bd = "awor_final"; // mysql_connect(<nom_ou_ip_serveur_mysql>, <utilisateur_mysql>, <mot_de_passe_en_clair_mysql>); -$link = @mysql_connect('localhost', 'awor', 'blagnac'); +$link = @mysql_connect('localhost', 'lud_restricted', 'maille_ess_ku_elle'); @mysql_select_db($bd , $link); diff --git a/final/app/include/je.inc.php b/final/app/include/je.inc.php index d7d1081..5205b47 100644 --- a/final/app/include/je.inc.php +++ b/final/app/include/je.inc.php @@ -163,7 +163,7 @@ require_once ('include/connect.inc.php'); if ($row['estPrivee'] == 'oui' || $row['idP_Createur']==$idP) echo "<a href=\"#\" onclick=\"loadid('popdeletelist.php?idL=".htmlentities($row[0], ENT_QUOTES)."','popdeletelist',true);popon('popdeletelist')\"><img src=\"images/supprimer.png\" alt=\"Supprimer ".htmlentities($row[1], ENT_QUOTES)."\" /></a></td>\n" ; else echo "</td>\n"; if ($row['estPrivee'] == 'oui') echo "<td>Privée" ; else echo "<td>Public"; echo "</td>\n<td>"; - echo "<a href=\"#\" onclick=\"loadid('poppersonne.php?idL=".$row['idL']."&idP_orga=".$idP."','poppersonne',true);popon('poppersonne')\">"; + echo "<a href=\"#\" onclick=\"loadid('poppersonne.php?idL=".$row['idL']."&idP_orga=".$idP."','poppersonne',true);popon('poppersonne');loadid('help/listes_modif.php.hlp','help',false)\">"; echo htmlentities($row['libelleL'], ENT_QUOTES); echo "</a></td>\n"; echo "</tr>\n"; @@ -237,5 +237,6 @@ require_once ('include/connect.inc.php'); } } echo '</table>'; - } +} + ?>
\ No newline at end of file diff --git a/final/app/include/ju.inc.php b/final/app/include/ju.inc.php index 4bb9330..4ab1a1c 100644 --- a/final/app/include/ju.inc.php +++ b/final/app/include/ju.inc.php @@ -153,9 +153,13 @@ function traiter_formulaire_maj_profil() { require_once ('include/tools.inc.php'); $requete = "UPDATE AWOR_Personne SET courrielP = '".addslashes_if_needed($_POST["courrielP"])."', loginP = '".addslashes_if_needed($_POST["loginP"])."', nomP = '".addslashes_if_needed($_POST["nomP"])."', prenomP = '".addslashes_if_needed($_POST["prenomP"])."', methodeAuth = '".addslashes_if_needed($_POST["methodeAuth"])."' WHERE idP = '".$_SESSION['session_idP']."'"; - if(mysql_query($requete) == false) return "Une erreur MySQL est survenu : ".mysql_error(); - $_SESSION['session_prenomP'] = $_POST["prenomP"]; - $_SESSION['session_nomP'] = $_POST["nomP"]; + if(mysql_query($requete) === false) return false;// "Une erreur MySQL est survenu : ".mysql_error(); + else + { + $_SESSION['session_prenomP'] = $_POST["prenomP"]; + $_SESSION['session_nomP'] = $_POST["nomP"]; + return true; + } //print_r($_POST); } 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> |