Exemplo n.º 1
0
<title>Xác nhận email đăng ký</title>
<?php 
$sqlstr = mysql_query("SELECT * FROM " . confirm . " WHERE strcode='" . text($id_1) . "'");
if (mysql_num_rows($sqlstr) > 0) {
    $row = mysql_fetch_array($sqlstr);
    if (NumRow(id, members, "email='" . $row['email'] . "'") > 0) {
    } else {
        mysql_query("INSERT INTO " . members . " SET \r\n\tfullname                   = '" . $row['fullname'] . "'\r\n\t,address                   = '" . $row['address'] . "'\r\n\t,telephone                 = '" . $row['telephone'] . "'\r\n\t,email                     = '" . $row['email'] . "'\r\n\t,website                   = '" . $row['website'] . "'\r\n\t,username                  = '******'username'] . "'\r\n\t,password                  = '******'password'] . "'\r\n\t,postdate                  = '" . $row['postdate'] . "'");
        @($_SESSION['idcus'] = $row['id']);
        @($_SESSION['fullname'] = $row['fullname']);
        @($_SESSION['timelog'] = time());
        @($_SESSION['pic_member'] = $row['picture']);
        mysql_query("UPDATE " . members . " SET online='true' WHERE id='" . $row['id'] . "'");
        mysql_query("DELETE FROM " . confirm . " where strcode='" . text($id_1) . "'");
        echo "<div style='padding-top:50px; font-size:12px' align='center'>Xác nhận email thành công. Chúc mừng bạn đã là thành viên của website. Click <a href='" . $domain . "' class='xemtiep' style='color:red'>vào đây</a> để về trang chủ<div>";
    }
} else {
    echo "<div style='padding-top:50px; font-size:12px' align='center'>Liên kết này đã được kích hoạt hoặc không tồn tại. Click <a href='" . $domain . "' class='xemtiep' style='color:red'>vào đây</a> để về trang chủ<div>";
}
Exemplo n.º 2
0
        ?>
/<?php 
        echo convertSpace($row['category']);
        echo $vip;
        ?>
" class="titleCategory" onmouseover="this.style.color='#<?php 
        echo $row['hovercolor'];
        ?>
'" onmouseout="this.style.color='#<?php 
        echo $row['color'];
        ?>
'"><?php 
        echo $row['category'];
        ?>
</a> (<?php 
        echo NumRow("categories", "raovat_userpost", " status='true' AND categories = '" . $row['id'] . "'");
        ?>
)</div>
			</td>
            </tr>
          <tr>
            <td>
<?php 
        $sqlsub = mysql_query("SELECT id,category FROM " . menu_product . " WHERE status='true' AND parent='" . $row['id'] . "' ORDER BY stt ASC");
        if (mysql_num_rows($sqlsub) > 0) {
            $j = 0;
            while ($rowsub = mysql_fetch_array($sqlsub)) {
                $j += 1;
                $sql = mysql_query("SELECT * FROM " . menu_service . " WHERE status='true' AND parent='" . $row['id'] . "'");
                if (mysql_num_rows($sql) > 0) {
                    if ($j % 2 == '0') {
Exemplo n.º 3
0
echo keywords;
?>
">

<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF"> 
   <tr >
     <td class="proTop textLeftMenu" style="padding-left:10px;"><img src="<?php 
echo $domain;
?>
/images/icon_muiten.gif" />&nbsp;&nbsp;Kết quả tìm kiếm</td>   
   </tr>
   <tr><td class="proCenter" height="50" style="padding-left:50px;">
   <?php 
$tongtin = NumRow(categories, userpost, "status='true' AND (title like '%" . urldecode(text($id_1)) . "%' OR content like '%" . urldecode(text($id_1)) . "%')");
if (isset($_SESSION['province'])) {
    $tongtin = NumRow(categories, userpost, "status='true' AND (title like '%" . urldecode(text($id_1)) . "%' OR content like '%" . urldecode(text($id_1)) . "%') AND place='" . @$_SESSION['province'] . "'");
}
?>
   Tìm thấy tổng <b style="color:#FF0000"><?php 
echo $tongtin;
?>
</b> kết quả phù hợp với cụm từ <b style="color:#FF0000">"<?php 
echo urldecode($id_1);
?>
"</b> và nơi đăng tin <b style="color:#FF0000"><?php 
if (@$_SESSION['province'] != '') {
    Province(@$_SESSION['province'], tinh);
} else {
    echo "Toàn quốc";
}
?>
                              <tr>
                                <td align="right" style="padding-right:22px"><input name="nhantin" type="submit" id="nhantin" value="Gửi tin nhắn" /></td>
                              </tr>
                            </table>
                          </form>
</div>
						</div>	 </td>
   </tr>
      <tr>
      <td width="2%"><img src="<?php 
    echo $domain;
    ?>
/images/Ask.gif" width="35" height="35" style="padding-right:5px; padding-bottom:10px;"/>
       </td>
      <td width="98%" style="font-size:20px; font-family:Times New Roman; color:#E10000"><?php 
    echo NumRow(id, feedback, "id_news='" . intval($id_2) . "'");
    ?>
 phản hồi</td>
    </tr>
  <tr><td colspan="3"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<?php 
    $sqlstr = mysql_query("SELECT * FROM " . feedback . " WHERE id_news='" . intval($id_2) . "' AND shop='1' ORDER BY id DESC");
    if (mysql_num_rows($sqlstr) > 0) {
        while ($row = mysql_fetch_array($sqlstr)) {
            $sql = mysql_query("SELECT * FROM " . members . " WHERE id='" . intval($row['id_member']) . "' AND status='true'");
            if (mysql_num_rows($sql) > 0) {
                $rowpic = mysql_fetch_array($sql);
                ?>
 
    <tr>
      <td style="border-bottom:#999999 1px solid"><?php 
Exemplo n.º 5
0
<div style="width:96%" align="left"><strong>QUẢN LÝ TRUY CẬP:</strong></div>
<?php 
if ($_POST['ItemDel']) {
    $action = '';
    if ($_POST['element'] == '') {
        echo '<script>alert(\'Mời bạn chọn ít nhất 1 bản tin\')</script>';
        $action = true;
    }
    if ($action == '') {
        mysql_query("DELETE FROM " . check . " WHERE id in (" . implode(",", $_POST['element']) . ")");
    }
}
if ($_POST['ItemDelAll']) {
    mysql_query("DELETE FROM " . check . " ");
}
if (NumRow(id, check, "id!=''") > 10000) {
    mysql_query("DELETE FROM " . check . " ");
}
?>

<div style="float:left">
<form method="post" action="">
<table  border="1" bordercolor="#DDDDDD" bordercolorlight="#CCCCCC" bgcolor="#FFFFFF"  align="left" cellpadding="3" cellspacing="0" width="800">

  <?php 
$p = 50;
$sqlstr = "SELECT * FROM " . check . "";
$page = mysql_query($sqlstr);
$n_record = mysql_num_rows($page);
num_page();
$link = "index.php?menu=" . @$_GET['menu'] . "&site=" . @$_GET['site'] . "";
Exemplo n.º 6
0
if ($_POST['Send']) {
    echo "<tr><td  colspan=2 style='text-align:left; color:#FF0000;text-align:center'>";
    $submit = '';
    if (text($_POST['passold']) == '') {
        $alert = "Mời bạn nhập mật khẩu cũ";
        $submit = true;
    } elseif (text($_POST['passnew']) == '') {
        $alert = "Mời bạn nhập mật khẩu mới";
        $submit = true;
    } elseif (text($_POST['passnew1']) == '') {
        $alert = "Mời bạn nhập lại mật khẩu mới";
        $submit = true;
    } elseif (text($_POST['passnew']) != text($_POST['passnew1'])) {
        $alert = "Mời bạn nhập lại mật khẩu mới không chính xác";
        $submit = true;
    } elseif (NumRow(password, members, "password='******'passold'])) . "'") == '0') {
        $alert = "Mật khẩu cũ không chính xác";
        $submit = true;
    } elseif (text($_POST['code']) != @$_SESSION['code']) {
        $alert = "Mã xác nhận không chính xác";
        $submit = true;
    }
    if ($submit == '') {
        mysql_query("UPDATE  " . members . " SET \r\n\tpassword                   = '******'passnew'])) . "'\t\t\t\t\r\n\tWHERE id                   = " . intval(@$_SESSION['idcus']) . "");
        echo "<script>alert('Thay đổi mật khẩu thành công');location.href='" . $_SERVER['HTTP_REFERER'] . "';</script>";
    }
    if ($submit != '') {
        echo $alert;
    }
    echo "</td></tr>";
}
Exemplo n.º 7
0
</table>
<?php 
if ($id == '') {
    ?>
<table width="230" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td   class="colorTitle" align="center"><strong>Thống kê truy cập</strong></td>
  </tr>
  <tr>
	<td style="padding-left:10px" class="border">
	<div class="statis">Tổng số thành viên: <span><?php 
    echo NumRow(id, members, "status='true'");
    ?>
</span></div>
	<div class="statis">Số tin đăng: <span><?php 
    echo NumRow(id, userpost, "status='true'");
    ?>
</span></div>
	<div class="statis">Thành viên truy cập: <span><?php 
    echo $members;
    ?>
</span></div>
	<div class="statis">Khách truy cập: <span><?php 
    echo $visits;
    ?>
</span></div>
	<div class="statis">Tổng số lượt truy cập: <span><?php 
    echo $visited;
    ?>
</span></div>
	</td>
Exemplo n.º 8
0
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" >
 <tr >   
   <td ><form name="form3" method="post" action="">
  
     <table width="100%" border="0" cellspacing="0" cellpadding="5">
       <tr>
         <td colspan="3" align="center" style="color:#FF0000">
<?php 
if ($_POST['nhantin']) {
    if ($_POST['user_name'] == "") {
        echo "Bạn phải cho biết Username thành viên cần nhắn tin";
    } elseif ($_POST['title'] == "") {
        echo "Bạn phải nhập tiêu đề tin nhắn";
    } elseif ($_POST['content'] == "") {
        echo "Bạn phải nhập nội dung tin nhắn";
    } elseif (NumRow(username, members, "username='******'user_name']) . "'") < 0) {
        echo "Username này không tồn tại trong CSDL. Xin vui lòng kiểm tra lại";
    } else {
        $sqlstr = mysql_query("SELECT * FROM " . members . " WHERE status='true' AND username = '******'user_name']) . "'");
        if (mysql_num_rows($sqlstr) > 0) {
            $row = mysql_fetch_array($sqlstr);
            //insert bảng gửi đến thành viên nhận quản lý
            mysql_query("INSERT INTO " . msg . " SET title='" . text($_POST['title']) . "',\r\n\t\t\tcontent='" . textContent($_POST['content']) . "', id_to='" . $row['id'] . "',\r\n\t\t\tid_from='" . @$_SESSION['idcus'] . "',postdate='" . time() . "'");
            //insert bảng gửi đến thành viên gửi quản lý
            mysql_query("INSERT INTO " . msg1 . " SET title='" . text($_POST['title']) . "',\r\n\t\t\tcontent='" . textContent($_POST['content']) . "', id_to='" . $row['id'] . "',\r\n\t\t\tid_from='" . @$_SESSION['idcus'] . "',postdate='" . time() . "'");
            echo "<script>alert('Bạn đã gửi tin nhắn thành công');location.href='" . $_SERVER['HTTP_REFERER'] . "';</script>";
        }
    }
}
?>
		 </td>
Exemplo n.º 9
0
    }
}
mysql_free_result($sqlstr);
function format_date()
{
    $str_1 = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
    $str_2 = array("Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy");
    $str = str_replace($str_1, $str_2, date("l", time()));
    return $str;
}
//Thong ke truy cap
$sql = mysql_query("SELECT * FROM " . statis . "");
if (mysql_num_rows($sql) > 0) {
    $rs = mysql_fetch_array($sql);
    if (@$online > $rs['thanhvien'] + $rs['khach']) {
        mysql_query("update " . statis . " set thanhvien='" . NumRow(id, members, "online='true'") . "',\r\n\t\t\tkhach='" . ($online - NumRow(id, members, "online='true'")) . "',ngay='" . time() . "'");
    }
    if (@$all > $rs['luottruycap']) {
        $visited = $all;
    } else {
        $visited = $rs['luottruycap'];
    }
    if ($visited > $rs['luottruycap']) {
        mysql_query("update " . statis . " set luottruycap='" . intval($visited) . "'");
    }
}
//#################################
function CategorySesion($table, $id_2)
{
    global $id_product, $id_menu;
    $sqlstr = mysql_query("SELECT id FROM  " . $table . " WHERE parent = '" . intval($id_2) . "' ");
Exemplo n.º 10
0
 } elseif (text($_POST['address']) == '') {
     $alert = "Mời bạn nhập địa chỉ liên hệ";
     $submit = true;
 } elseif (text($_POST['email']) == '') {
     $alert = "Mời bạn nhập địa chỉ Email";
     $submit = true;
 } elseif (NumRow(email, members, "email='" . text($_POST['email']) . "'") > 0 || NumRow(email, confirm, "email='" . text($_POST['email']) . "'") > 0) {
     $alert = "Email này  đã có người sử dụng";
     $submit = true;
 } elseif (!eregi('^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.([a-zA-Z]{2,4})$', $_POST['email'])) {
     $alert = "Email của bạn không hợp lệ";
     $submit = true;
 } elseif (text($_POST['username']) == '') {
     $alert = "Mời bạn nhập tên truy cập";
     $submit = true;
 } elseif (NumRow(username, members, "username='******'username']) . "'") > 0 || NumRow(username, confirm, "username='******'username']) . "'") > 0) {
     $alert = "Tên truy cập đã có người sử dụng";
     $submit = true;
 } elseif (!eregi('^[a-zA-Z0-9._-]+[a-zA-Z0-9._-]$', text($_POST['username']))) {
     $alert = "Tên đăng nhập của bạn không hợp lệ";
     $submit = true;
 } elseif (text($_POST['password']) == '') {
     $alert = "Mời bạn nhập mật khẩu";
     $submit = true;
 } elseif (text($_POST['retypepassword']) == '') {
     $alert = "Mời bạn xác nhận lại mật khẩu";
     $submit = true;
 } elseif (text($_POST['password']) != text($_POST['retypepassword'])) {
     $alert = "Mật khẩu nhập lại không chính xác";
     $submit = true;
 } elseif (text($_POST['code']) != @$_SESSION['code']) {
Exemplo n.º 11
0
<br />
<table width="750" bgcolor="#FFFFFF" border="0" cellspacing="2" cellpadding="2"  align="center"  style="border:#cccccc 1px solid">

	 <tr id="tieude"  ><td  colspan="2"  >&nbsp;&nbsp;&nbsp;<span id="TextLeftCenter2m">Quản lý Thành viên </span> </td>  </tr>
</table>


<?php 
if ($_SESSION['modn'] == '1') {
    ?>
 


<?php 
    if ($_POST['InsertNews']) {
        if (NumRow(username, admin, "username='******'username']) . "'") > 0) {
            echo "Tên truy cập này đã có";
        } else {
            mysql_query("INSERT INTO " . admin . " SET \n\t\t\t\tusername = '******'username']) . "'\n       \t\t\t,fullname = '" . textContent($_POST['fullname']) . "'\n\t\t\t\t,email = '" . textContent($_POST['email']) . "'\n\t\t\t\t,modn = '" . textContent($_POST['modn']) . "'\n\t\t\t\t,password        = '******'password'])))) . "'\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t");
            echo "Thêm thành viên thành công";
        }
    }
    if ($_POST['ItemDel']) {
        $action = '';
        if ($_POST['element'] == '') {
            echo '<script>alert(\'Mời bạn chọn ít nhất 1 bản tin\')</script>';
            $action = true;
        }
        if ($action == '') {
            mysql_query("DELETE FROM " . admin . " WHERE id in (" . implode(",", $_POST['element']) . ")");
        }