示例#1
0
function change_user_loged_pass()
{
    global $main_db, $session;
    $p_user = new PublicUser();
    $email = new Email();
    if (isset($_POST['action'])) {
        /*
         * Have a problem if mobile not appear
         * */
        $user = $p_user->get_user_by_id($session->p_userID);
        if ($user != NULL) {
            if ($user->pass == md5($_POST['current_pass'])) {
                $data['pass'] = md5($_POST['new_pass']);
                if ($p_user->update_user($data, array('id' => $user->id))) {
                    echo 'yes';
                }
            } else {
                echo 'no';
            }
        } else {
            //Please don't change it
            echo 'no';
        }
    }
}
示例#2
0
                </div>
                <?php 
}
?>
                <ul class="nav navbar-nav navbar-right navmenu">
                    <li><a href="<?php 
echo get_home_url();
?>
#about"><span class="fa fa-simplybuilt fa-3x"></span> About Us </a></li>
                    <li><a href="#location"> <span class="fa fa-map-marker fa-3x"></span>Location </a></li>
                    <li><a href="#how_it_work"> <span class="fa fa-youtube fa-3x"></span>How It Work </a></li>
                    <li><a href="#contact"> <span class="fa fa-envelope fa-3x"></span>Contact Us </a></li>
                    <?php 
if ($session->is_p_logedIn()) {
    $current_user = $p_user->get_user_by_id($session->p_userID);
    ?>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <i class="fa fa-angle-down pull-right"></i> <br><small>balance: <?php 
    echo $current_user->bal;
    ?>
 points</small></a>
                        <ul class="dropdown-menu">
                            <li data-target="profile" class="active"><a href="#"><i class="fa fa-user"></i> Profile</a></li>
                            <li data-target="upload_files"><a href="<?php 
    echo get_home_url() . '/user-admin.php';
    ?>
"><i class="fa fa-file-text-o"></i> My Document</a></li>
                            <li><a href="<?php 
    echo get_home_url();
    ?>