Example #1
0
}
echo "\n\t\t\t\t<br/>";
if ($_GET['id'] != NULL) {
    $sql1 = "SELECT * FROM `users` where `id`='" . $_GET[id] . "'";
    $query1 = @mysql_query($sql1);
    $record1 = @mysql_num_rows($query1);
    if ($record1 != NULL) {
        $row1 = @mysql_fetch_array($query1);
        if ($row1[avatar] == NULL) {
            $ava = "../images/noavatar.jpg";
        } else {
            $ava = $row1[avatar];
        }
        echo "\n\t\t\t\t<form action='' class='jNice' method='post' enctype='multipart/form-data'>\n\t\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t\t<p><label>Ảnh đại diện</label><img src='" . $ava . "' width='200px' height='200px'  style='margin-bottom: 6px'><br/><input type='file' name='file' id='file'/></p>\n\t\t\t\t\t\t\t<p><label>Tên</label><input name='name' type='text' class='text-long' value='" . $row1[name] . "' required/></p>\n\t\t\t\t\t\t\t<p><label>Ngày sinh</label><input name='birthday' type='text' class='text-long' value='" . $row1[birthday] . "' required/></p>\n\t\t\t\t\t\t\t<p><label>Giới tính</label><input name='sex' type='radio' value='1'";
        if (logging_account(sex) == 1) {
            echo " checked > Nam <input name='sex' type='radio' value='2'";
        } else {
            if (logging_account(sex) == 2) {
                echo "> Nam <input name='sex' type='radio' value='1' checked";
            } else {
                echo "> Nam <input name='sex' type='radio' value='1'";
            }
        }
        echo "> Nữ</p>\n\t\t\t\t\t\t\t<p><label>Địa chỉ</label><input name='address' type='text' class='text-long' value='" . $row1[address] . "' required/></p>\n\t\t\t\t\t\t\t<p><label>Yahoo</label><input name='yahoo' type='text' class='text-long' value='" . $row1[yahoo] . "' required/></p>\n\t\t\t\t\t\t\t<p><label>Email</label><input name='email' type='text' class='text-long' value='" . $row1[email] . "' required/></p>\n\t\t\t\t\t\t\t<p><label>Điện thoại</label><input name='phone' type='text' class='text-long' value='" . $row1[phone] . "' required/></p>\n\t\t\t\t\t\t\t<p><label>Mật khẩu (MD5)</label><input name='pass' type='password' class='text-long' value=''/></p>\n                            <input name='id' type='hidden' value='" . $_GET[id] . "' />\n\t\t\t\t\t\t\t<input name='edituser' type='submit' value='Chỉnh sửa' />\n                        </fieldset>\n\t\t\t\t</form>";
    } else {
        echo "Có lỗi<br/><br/>";
    }
} else {
    echo "Có lỗi<br/><br/>";
}
require_once "footer.php";
Example #2
0
<?php

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
require_once "config.php";
require_once "function.php";
ob_start();
session_start();
date_default_timezone_set('Asia/Ho_Chi_Minh');
if (isset($_COOKIE["cookid"])) {
    $_SESSION["userid"] = $_COOKIE["cookid"];
}
$title = "Đổi mật khẩu";
$title2 = "Tài khoản";
$link2 = "#";
$description = "Đổi mật khẩu";
$keyword = "đổi mật khẩu,doi mat khau,đổi mật khẩu tài khoản,doi mat khau tai khoan,tài khoản,tai khoan";
require_once "header.php";
echo "<center><p><h1>Đổi mật khẩu</h1></p></center>";
echo "\n<p class='message_blue'>Nếu quên mật khẩu cấp 2, bạn có thể <a href='doi-mat-khau'>Đổi mật khẩu bằng mật khẩu cũ!</a></p>\n<br/>\n<center>\n<form action='' method='post'>\n<table>\n<tr><td><p>Tài khoản</p></td><td><p><input name='username' type='text' value='" . logging_account(username) . "' class='textbox' size='50' required/><br/></p></td></tr>\n<tr><td><p>Mật khẩu cấp 2</p></td><td><p><input name='password2' type='password' value='' class='textbox' size='50' required/><br/></p></td></tr>\n<tr><td><p>Mật khẩu mới</p></td><td><p><input name='password' type='password' value='' class='textbox' size='50' required/><br/></p></td></tr>\n<tr><td><p>Nhập lại</p></td><td><p><input name='repassword' type='password' value='' class='textbox' size='50' required/><br/></p></td></tr>\n<tr><td><p>Mã bảo vệ</p></td><td><p><input name='capt' type='text' value='' class='textbox' size='36' required/>&nbsp;<img src='capt.php'/><br/></p></td></tr>\n<tr><td></td><td><p><input type='submit' name='change_pass' class='button' value='Lấy lại mật khẩu'/><br/></p></td></tr>\n</table>\n</form>\n</center>\n<br/>";
if (isset($_POST["change_pass"])) {
    change_pass2();
}
require_once "footer.php";
Example #3
0
$title = "Thay đổi thông tin thành viên";
$description = "Thay đổi thông tin thành viên";
$keyword = "thay đổi thông tin thành viên,thay đổi thông tin,thông tin thành viên,thay đổi,thông tin,thành viên,thay doi thong tin thanh vien,thay doi thong tin,thong tin thanh vien,thay doi,thong tin,thanh vien";
require_once "header.php";
echo "<center><p><h1>Thay đổi thông tin thành viên</h1></p></center>";
if ($_SESSION['userid'] != NULL) {
    $sql = "SELECT * FROM `users` where `id`='" . $id . "'";
    $query = @mysql_query($sql);
    if (logging_account(avatar) == NULL) {
        $ava = "./images/noavatar.jpg";
    } else {
        $ava = logging_account(avatar);
    }
    echo "\n<table border='0' style='margin-top: 5px;'>\n<tr>\n<td rowspan='2' style='padding-right: 10px;'>\n<img class='img' src='../" . $ava . "' width='165px' height='165px'/><br/>\n</td>\n</tr>\n<tr>\n<td>\n<form action='' method='post' enctype='multipart/form-data'>\n<input type='file' name='file' id='file' />\n</td>\n</tr>\n</table>\n<table>\n<tr>\n<td><p>Tên</p></td><td><input name='name' type='text' value='" . logging_account(name) . "' class='textbox' size='40' required/></td>\n</tr>\n<tr>\n<td><p>Ngày Sinh</p></td><td><input name='birthday' type='text' value='" . logging_account(birthday) . "' class='textbox' size='40' required/></td>\n</tr>\n<tr>\n<td><p>Giới Tính</p></td><td><input name='sex' type='radio' value='1'";
    if (logging_account(sex) == 1) {
        echo " checked > Nam <input name='sex' type='radio' value='2'";
    } else {
        if (logging_account(sex) == 2) {
            echo "> Nam <input name='sex' type='radio' value='1' checked";
        } else {
            echo "> Nam <input name='sex' type='radio' value='1'";
        }
    }
    echo "> Nữ</td>\n</tr>\n<tr>\n<td><p>Địa Chỉ</p></td><td><input name='address' type='text' value='" . logging_account(address) . "' class='textbox' size='40' required/></td>\n</tr>\n<tr>\n<td><p>Yahoo</p></td><td><input name='yahoo' type='text' value='" . logging_account(yahoo) . "' class='textbox' size='40' required/></td>\n</tr>\n<tr>\n<td><p>Email</p></td><td><input name='email' type='text' value='" . logging_account(email) . "' class='textbox' size='40' required/></td>\n</tr>\n<tr>\n<td><p>Điện Thoại</p></td><td><input name='phone' type='text' value='" . logging_account(phone) . "' class='textbox' size='40' required/></td>\n</tr>\n<tr>\n<td><p>Mật khẩu</p></td><td><p><input name='password' type='password' value='' class='textbox' size='40' required/><br/></p></td>\n</tr>\n<tr>\n<td><p>Mã bảo vệ</p></td><td><p><input name='capt' type='text' value='' class='textbox' size='30' required/>&nbsp;<img src='capt.php'/><br/></p></td>\n</tr>\n</table>\n<span style='float: right;'>\n<input type='submit' name='edit' value='Chỉnh Sửa' class='button'/>\n</form>\n</span><br/><br/><br/>";
    if (isset($_POST["edit"])) {
        edit_profile();
    }
} else {
    echo "<p class='message_yellow'>Bạn chưa đăng nhập, không thể thay đổi thông tin!</p>";
}
require_once "footer.php";
Example #4
0
function edit_profile()
{
    if ($_POST["capt"] == NULL) {
        echo "<p class='message_red'>Bạn chưa nhập mã bảo vệ!</p>";
    } else {
        if ($_POST["capt"] == $_SESSION["security_code"]) {
            if ($_POST["password"] == NULL) {
                echo "<p class='message_red'>Ban chưa nhập nhập mật khẩu!</p>";
            } else {
                $sql = "select * from `users` where `id`='" . $_SESSION['userid'] . "' and `password`='" . md5($_POST["password"]) . "'";
                $query = @mysql_query($sql);
                if (@mysql_num_rows($query) == 0) {
                    echo "<p class='message_red'>Mật khẩu không đúng!</p>";
                } else {
                    $n = mysql_escape_string($_POST['name']);
                    $bd = mysql_escape_string($_POST['birthday']);
                    $s = mysql_escape_string($_POST['sex']);
                    $ad = mysql_escape_string($_POST['address']);
                    $yh = mysql_escape_string($_POST['yahoo']);
                    $m = mysql_escape_string($_POST['email']);
                    $p = mysql_escape_string($_POST['phone']);
                    if ($_FILES['file']['name'] != NULL) {
                        if (strtolower(getExtension($_FILES['file']['name'])) == "jpg" || strtolower(getExtension($_FILES['file']['name'])) == "png" || strtolower(getExtension($_FILES['file']['name'])) == "gif") {
                            $name = md5(rand(0, 9999999)) . md5(rand(0, 9999999)) . ".jpg";
                            move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $name);
                            $a = mysql_escape_string("../upload/" . $name);
                        } else {
                            $a = logging_account(avatar);
                            echo "<p class='message_red'>Không cho phép upload loại file này!</p>";
                        }
                    } else {
                        $a = logging_account(avatar);
                    }
                    $sql2 = "update `users` set name='" . $n . "', birthday='" . $bd . "',sex='" . $s . "',address='" . $ad . "',yahoo='" . $yh . "',email='" . $m . "',phone='" . $p . "',avatar='" . $a . "' where id='" . $_SESSION['userid'] . "'";
                    $query = @mysql_query($sql2);
                    /////Gửi mail
                    if ($s == 1) {
                        $ssex = "Nam";
                    } else {
                        $ssex = "Nữ";
                    }
                    $to = $m;
                    $subject = "Thông tin thành viên của bạn đã được thay đổi ở " . settings('title') . " - " . settings('description') . "";
                    $message = "\nChào " . $u . "\n\nBạn đã thay đổi một vài thông tin cá nhân của mình ở " . settings('title') . " - " . settings('url') . "<br/>\nThông tin hiện tại của bạn là:<br/>\n<br/>\n- Tên: " . $n . "<br/>\n- Ngày sinh: " . $bd . "<br/>\n- Giới tính: " . $ssex . "<br/>\n- Địa chỉ: " . $ad . "<br/>\n- Yahoo: " . $yh . "<br/>\n- Email: " . $m . "<br/>\n- Điện thoại: " . $p . "<br/>\n<br/>\nThân,<br/>\n" . settings('title');
                    $header = "From: admin@" . settings('domain') . "" . "\r\n";
                    $header .= "Reply-To: admin@" . settings('domain') . "" . "\r\n";
                    send_mail($to, $subject, $message, $header);
                    echo "<p class='message_green'>Thay đổi thông tin thành công!</p>";
                }
            }
        } else {
            echo "<p class='message_red'>Mã bảo vệ sai!</p>";
        }
    }
}
Example #5
0
if ($_SESSION["userid"] == NULL) {
    $x = explode('?' . $_SERVER['QUERY_STRING'], '?' . $_SERVER['QUERY_STRING'] . $_SERVER['REQUEST_URI']);
    if ($x[1] == "/dang-nhap") {
        echo "<li><a href='./dang-nhap'>Đăng nhập</a></li>";
        echo "<li><a href='./dang-ky'>Đăng ký</a></li>";
    } else {
        echo "<li><a href='./dang-nhap?goto=" . $_SERVER['REQUEST_URI'] . "'>Đăng nhập</a></li>";
        echo "<li><a href='./dang-ky?goto=" . $_SERVER['REQUEST_URI'] . "'>Đăng ký</a></li>";
    }
} else {
    if (logging_account(avatar) == NULL) {
        $avatar = "./images/noavatar.jpg";
    } else {
        $avatar = logging_account(avatar);
    }
    echo "\n\t\t\t\t\t\t\t\t\t\t<li><a href='./thong-tin-thanh-vien-" . strtolower(str_filter(account($_SESSION["userid"], username))) . "-" . $_SESSION["userid"] . "' class='username'>\n\t\t\t\t\t\t\t\t\t\t\t\t<img class='img2' width='30px' height='30px' src='" . $avatar . "'>\n\t\t\t\t\t\t\t\t\t\t\t\t<span>" . logging_account(username) . "</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class='dropdown1'>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class='dropdowntop'></div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class='dropdownbottom'>\n\t\t\t\t\t\t\t\t\t\t\t\t<ul class='menudrop1'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li><a href='./danh-sach-de-da-dong-gop-cua-" . strtolower(str_filter(account($_SESSION["userid"], username))) . "-" . $_SESSION["userid"] . "'>Danh sách đề đã đóng góp</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li><a href='./danh-sach-de-da-tai-cua-" . strtolower(str_filter(account($_SESSION["userid"], username))) . "-" . $_SESSION["userid"] . "'>Danh sách đề đã tải</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li><a href='./thay-doi-thong-tin-thanh-vien'>Sửa thông tin cá nhân</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li><a href='./doi-mat-khau'>Đổi mật khẩu</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li><a href='./dang-xuat'>Đăng xuất</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class='clear'></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</li>";
}
?>
						</div>
					</ul>
				</div>
				<br/>
<ul id="breadcrumb">
		<li><a href="./" title="ĐềKiểmTra.Net">ĐềKiểmTra.Net</a></li>
		<?php 
if ($title4 != "") {
    echo "<li><a href='" . $link4 . "' title='" . $title4 . "' id='title4'>" . $title4 . "</a></li>";
}
if ($title3 != "") {
    echo "<li><a href='" . $link3 . "' title='" . $title3 . "' id='title3'>" . $title3 . "</a></li>";
}
Example #6
0
$sql = "SELECT * FROM `users` where `id`='" . $id . "'";
$query = @mysql_query($sql);
if (@mysql_num_rows($query) == NULL) {
    $title = "Có lỗi";
    $description = "Có lỗi";
    $keyword = "Có lỗi,lỗi,co loi,loi";
    require_once "header.php";
    echo "<p class='message_red'>Không xác định được thành viên!</p>";
} else {
    $title = "Danh sách đề đã tải của " . account($id, username);
    $description = "Danh sách đề đã tải của " . account($id, username);
    $keyword = "Danh sách đề đã tải,đề đã tải,danh sach de da tai,de da tai," . account($id, username);
    require_once "header.php";
    $sql = "";
    $i = 0;
    $x = logging_account(down);
    $y = explode(',', $x);
    $display = 15;
    if (isset($_GET['p']) && (int) $_GET['p']) {
        $p = $_GET['p'];
    } else {
        $p = 1;
    }
    // Kiểm Tra Trang Cần Hiển Thị $p
    foreach ($y as $id2) {
        $i++;
        if ($i == 1) {
            $sql = $sql . "SELECT * FROM `tests` where `id`='" . $id2 . "'";
        } else {
            $sql = $sql . " UNION SELECT * FROM `tests` where `id`='" . $id2 . "'";
        }
Example #7
0
$sql = "SELECT * FROM `users` where `id`='" . $id . "'";
$query = @mysql_query($sql);
if (@mysql_num_rows($query) == NULL) {
    $title = "Có lỗi";
    $description = "Có lỗi";
    $keyword = "Có lỗi,lỗi,co loi,loi";
    require_once "header.php";
    echo "<p class='message_red'>Không xác định được thành viên!</p>";
} else {
    $title = "Danh sách đề đã đóng góp của " . account($id, username);
    $description = "Danh sách đề đã đóng góp của " . account($id, username);
    $keyword = "Danh sách đề đã đóng góp,đề đã đóng góp,danh sach de da dong gop,de da dong gop," . account($id, username);
    require_once "header.php";
    $sql = "";
    $i = 0;
    $x = logging_account(up);
    $y = explode(',', $x);
    $display = 15;
    if (isset($_GET['p']) && (int) $_GET['p']) {
        $p = $_GET['p'];
    } else {
        $p = 1;
    }
    // Kiểm Tra Trang Cần Hiển Thị $p
    foreach ($y as $id2) {
        $i++;
        if ($i == 1) {
            $sql = $sql . "SELECT * FROM `tests` where `id`='" . $id2 . "'";
        } else {
            $sql = $sql . " UNION SELECT * FROM `tests` where `id`='" . $id2 . "'";
        }