예제 #1
0
 function forgot_email_check($str)
 {
     $user_table = user_table();
     $query = $this->db->query("SELECT * FROM `{$user_table}` WHERE `email` = '{$str}'");
     if ($query->num_rows == 1) {
         return TRUE;
     } else {
         $this->form_validation->set_message('forgot_email_check', 'The email address you provided is not registered in this system.');
         return FALSE;
     }
 }
예제 #2
0
파일: admin.php 프로젝트: homebru/bandb
 function set_forgotten_password($email)
 {
     $length = 8;
     $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
     $uncrypt_password = '';
     for ($i = 0; $i < $length; $i++) {
         $uncrypt_password .= $characters[mt_rand(0, strlen($characters) - 1)];
     }
     $password = $this->_salt(set_value($uncrypt_password));
     $user_table = user_table();
     $this->db->query("UPDATE `{$user_table}` SET `password` = '{$password}' WHERE `email` = '{$email}'");
     $userdata = $this->db->query("SELECT * FROM `{$user_table}` WHERE `email` = '{$email}'");
     $result = $userdata->row();
     $this->send_forgot_email($result->username, $uncrypt_password, $result->email);
 }
예제 #3
0
파일: home.php 프로젝트: pyp22/aurweb
	<div id="pkg-updates" class="widget box">
		<?php 
updates_table();
?>
	</div>
	<div id="pkg-stats" class="widget box">
		<?php 
general_stats_table();
?>
	</div>
	<?php 
if (!empty($_COOKIE["AURSID"])) {
    ?>
	<div id="pkg-stats" class="widget box">
		<?php 
    user_table(uid_from_sid($_COOKIE["AURSID"]));
    ?>
	</div>
	<?php 
}
?>

</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-typeahead.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('#pkgsearch-field').typeahead({
        source: function(query, callback) {
            $.getJSON('<?php 
echo get_uri('/rpc');
예제 #4
0
파일: index.php 프로젝트: Zariel/arch-aur
<?php 
echo __('Some packages may be provided as binaries in [community].');
?>
</p>
<table border='0' cellpadding='0' cellspacing='3' width='90%'>
<tr>
<td class='boxSoft' valign='top'>
<?php 
updates_table($dbh);
?>
</td>
<td class='boxSoft' valign='top'>
<?php 
if (!empty($_COOKIE["AURSID"])) {
    $user = username_from_sid($_COOKIE["AURSID"]);
    user_table($user, $dbh);
    echo '<br />';
}
general_stats_table($dbh);
?>

</td>
</tr>
</table>

<br />
<div class="important"><?php 
echo __('DISCLAIMER') . ':<br />';
echo __('Unsupported packages are user produced content. Any use of the provided files is at your own risk.');
?>
</div>
 function delete($id)
 {
     $user_table = user_table();
     $this->db->query("DELETE FROM `{$user_table}` WHERE `id` = '{$id}'");
 }
예제 #6
0
                        <label for="newemail"></label>
                        <input id ="newemail" type="string" name="newemail"/><br>
                        <input class="btn left" name="email" type="submit" value="Godkend"> 
                    </div>
                </form>

                <?php 
        if (isset($_REQUEST['newemail'])) {
            update_email($mysqli, $_REQUEST['newemail']);
            echo '<META HTTP-EQUIV="Refresh" Content="0; URL=administrator.php">';
        }
        ?>
                <br><br><br>
                
                <?php 
        user_table($mysqli);
        ?>
 <br><br>
                
                Vælg et id på den du ønsker, at lave til super admin.<br>   
                Dette medføre, at du ikke kan tilgå administrator siden mere.<br>
                (Der kan kun være en super administrator på en gang)<br>
                
                <form>
                <div>
                    <label for="id"><b>Bruger-id</b></label>
                    <input id ="id" type="int" name="id" required />
                </div>
                    <input class="btn left" type="submit" value="Ny admin">
                    <?php 
        if (isset($_REQUEST['id']) && get_userState($mysqli, $_REQUEST['id']) == 1) {