Example #1
0
include './auth.php';
$all_users  = AllUsers();

if ($_REQUEST['new_usr'] == '1') {
    extract($_POST); 
    $init = strtoupper($initials);
    $sql = "INSERT INTO sohorepro_users
			SET     user_name   = '" . $user_name . "',
                                password    = '******',
                                initials    = '" . $init."',
				email       = '" . $user_name . "',
                                type        = '" . $user_type . "',
                                status      = '1' ";

    $sql_result = mysql_query($sql);
    $send_mail = forgot_mail($user_name);
    if ($sql_result) {
        $result = "success";
    } else {
        $result = "failure";
    }
}
//Status Change Start
if ($_GET['status_id']) {

    $change_status = ($_GET['change_id'] == 1) ? '0' : '1';
    $status_id = $_GET['status_id'];
    $sql = "UPDATE sohorepro_users
			SET     status     = '" . $change_status . "' WHERE id= '" . $status_id . "'";

    $sql_result = mysql_query($sql);
Example #2
0
             ?>
             <div id="alert1" class="alert">Username and password should not empty.</div>      
             <?php
             }
      }
 ?>
   <!--  Login Section End -->          
   <!--  Forgot Section Start -->          
   <?php
   if ($_REQUEST['e_mail'] == '1')
   {
       extract($_POST);
       //Check Mail Exist or not
       $mail_id = mail_exist($email);
       if(count($mail_id) != ''){
           $send_mail = forgot_mail($mail_id);
           if($send_mail == '1'){
               ?>                                
             <div class="alert">Login details sent successfully</div> 
             <script>setTimeout("location.href=\'index.php\'", 1000);</script>
 <?php
   }
   }  else {                          
   ?>
      <div class="alert">Email not found</div> 
      <script>setTimeout("location.href=\'index.php\'", 1000);</script>       
 <?php
   }
   }
   ?>
   <!--  Forgot Section End -->