Exemplo n.º 1
0
/**
 * @return resource|boolean
 */
function grr_verif_imap($_login, $_password)
{
    if ($_password == '') {
        return false;
    }
    include "config_imap.inc.php";
    $imap_connection = grr_connect_imap($imap_adresse, $imap_port, $_login, $_password, $imap_type, $imap_ssl, $imap_cert, $imap_tls);
    if ($imap_connection) {
        return $imap_connection;
    } else {
        return false;
    }
}
Exemplo n.º 2
0
 echo "<div style=\"text-align:center;\"><input type=\"submit\" value=\"Valider\" /></div></div></form>";
 if (@file_exists("../include/config_imap.inc.php")) {
     include "../include/config_imap.inc.php";
     if ($imap_adresse != '' && $imap_port != '') {
         echo "<hr/>";
         echo "<h3>Test de connexion:</h3>";
         echo "<form action=\"admin_config_imap.php\" method=\"post\"><div>";
         echo encode_message_utf8("Nom d'utilisateur : ");
         echo "<input type='text' name='imap_login' value=\"\" size=\"20\" /><br />";
         echo encode_message_utf8("Mot de passe de l'utilisateur : ");
         echo "<input type='password' name='imap_password' value=\"\" size=\"20\" />";
         echo "<div style=\"text-align:center;\"><input type=\"submit\" name=\"Valider2\" value=\"Test\"  /></div>";
         echo "<input type=\"hidden\" name=\"valid\" value=\"{$valid}\" />";
         echo "</div></form>";
         if (isset($_POST['Valider2']) && $_POST['Valider2'] == "Test") {
             grr_connect_imap($imap_adresse, $imap_port, $imap_login, $imap_password, $imap_type, $imap_ssl, $imap_cert, $imap_tls, "diag");
         }
     }
 }
 echo "<hr/>";
 if (@file_exists("../include/config_imap.inc.php")) {
     echo encode_message_utf8("<h3>Configuration actuelle</h3> (Informations contenues dans le fichier \"config_imap.inc.php\") :<br /><ul>");
     echo encode_message_utf8("<li>Nom de domaine IMAP/POP <b>: " . $imap_domaine . "</b></li>");
     echo encode_message_utf8("<li>Adresse Serveur IMAP/POP <b>: " . $imap_adresse . "</b></li>");
     echo encode_message_utf8("<li>Port utilise : <b>" . $imap_port . "</b></li>");
     if ($imap_type == "/imap" || $imap_adresse != "" && $imap_port != "" && $imap_type == "") {
         $use_type = "IMAP";
     } else {
         if ($imap_type == "/pop3") {
             $use_type = "POP3";
         } else {