コード例 #1
0
ファイル: reset_passwords.php プロジェクト: alhousseyni/gepi
						$lig_ine=mysqli_fetch_object($res_ine);
						if($lig_ine->no_gep!='') {
							$new_password=$lig_ine->no_gep;
						}
						else {
							$new_password = pass_gen();
							$tab_non_INE_password[]="$user_nom $user_prenom";
						}
					}
					else {
						$new_password = pass_gen();
						$tab_non_INE_password[]="$user_nom $user_prenom";
					}
				}
				else {
					$new_password = pass_gen();
				}
			}

			// 20121115
			if((!isset($u_login))||
			(in_array($user_login, $u_login))) {
				$tab_password[$user_login]=$new_password;
				if ($user_auth_mode != "gepi") {
					// L'utilisateur est un utilisateur SSO. On enregistre un mot de passe vide.
					if(!getSettingAOui('auth_sso_ne_pas_vider_MDP_gepi')) {
						$save_new_pass = mysqli_query($GLOBALS["mysqli"], "UPDATE utilisateurs SET password='', change_mdp = 'n' WHERE login='" . $user_login . "'");
					}
					// Si l'accès LDAP en écriture est paramétré, on va mettre à jour le mot de passe de l'utilisateur
					// directement dans l'annuaire.
					if ($gepiSettings['ldap_write_access'] == "yes") {
コード例 #2
0
    die('Could not connect: ' . mysqli_error());
} else {
    echo 'SQL/PHP Connection: Successful <br><br>';
}
//STORES UIDS INTO PHP ARRAY
$sql = "SELECT uid FROM users";
$result = mysqli_query($link, $sql);
$uid_array = array();
while ($row = mysqli_fetch_assoc($result)) {
    //stores UID in UID_ARRAY
    array_push($uid_array, $row['uid']);
}
$length = count($uid_array);
//UPDATES DATA TO mySQL DATABASE
foreach ($uid_array as $array_index => $uid) {
    $pass = pass_gen();
    $created = created();
    $email = email_gen();
    $fname = fname_gen();
    $lname = lname_gen();
    $rnc = real_name_created();
    if ($array_index == 0) {
        $sql = "UPDATE users SET pass='" . $pass . "', created='" . $created . "', mail='" . $email . "', fname='" . $fname . "', lname='" . $lname . "', real_name_created='" . $rnc . "' WHERE uid ='" . $uid . "';";
    } else {
        $sql .= "UPDATE users SET pass='" . $pass . "', created='" . $created . "', mail='" . $email . "', fname='" . $fname . "', \n\t\t\t\t\tlname='" . $lname . "', real_name_created='" . $rnc . "' WHERE uid ='" . $uid . "';";
    }
}
unset($uid, $array_index);
//CONFIRMS SQL/PHP CONNECTION
if (mysqli_query($link, $sql)) {
    echo "Record updated successfully";
コード例 #3
0
    mysql_query($query0) or die(mysql_error());
    $lastid = mysql_insert_id();
    ?>
<div class="action"><span class="actionmsg">Client Added!</span><img src="https://www.benfund.com/images/elements/blank.gif" onload="javascript:popUp('https://www.benfund.com/client/client_manager/print_client.php')"></div><p>
<?php 
}
if ($_GET["cmd"] == "quickadd") {
    $first_name = $_POST['first_name'];
    $m_i = $_POST['m_i'];
    $last_name = $_POST['last_name'];
    $p1 = $_POST['p1'];
    $p2 = $_POST['p2'];
    $p3 = $_POST['p3'];
    $phone = "{$p1}-{$p2}-{$p3}";
    $email = $_POST['email'];
    $password = pass_gen();
    $balance = $_POST['balance'];
    //$cid = $_POST['cid'];
    if (isset($_POST['cid'])) {
        $cid = rand(1000, 9999);
    } else {
        $cid = $_POST['cid'];
    }
    $print = $_POST['print'];
    $send = $_POST['send'];
    if (isset($send)) {
        $to = $email;
        $subject = 'BenFund: New Account Information!';
        $message = '<table width="550" align="center" style="padding: 6px; border: 1px solid #2C2C2C;"><tr><td>
<span style="font-family: Georgia, Garamond, Serif; font-size: 40pt; color: #484848; text-decoration: none; font-weight: bolder; text-align: left; clear: both;">BenFund</span><br>
<span style="font-size: 10pt; font-style: italic; color: #484848; text-decoration: none; font-weight: bold; clear: both;">"Funding Financial Objectives"</span>