Example #1
0
include "qtri.php";
?>
 <?php 
ob_start();
session_start();
if (!isset($_SESSION['id'])) {
    header("location:../index.php");
} else {
    if ($_SESSION['phanquyen'] == 0) {
        header("location:../index.php");
    }
}
?>
 <?php 
$malh = $_GET["malh"];
$stt = chitiethang($malh);
?>
 <?php 
if (isset($_POST['btnsua'])) {
    $malh = $_GET["malh"];
    $tt = $_POST["stt"];
    $sql = "UPDATE lienhe SET stt='{$tt}' WHERE malh='{$malh}' ";
    mysql_query($sql);
    header("location:listlienhe.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>sua lienhe</title>
Example #2
0
<?php

$mahang = $_GET['mahang'];
$q = danhmucsanpham($mahang);
$w = chitiethang($mahang);
?>
<div class="cont_hang">
<img src="images/new-icon.png"/><?php 
echo $w['tenhang'];
?>
</div>
<?php 
while ($row = mysql_fetch_array($q)) {
    ob_start();
    ?>
<div class="sp" id="{masp}"><a href="?q=tt&masp={masp}">
<table width=175 height=220 border=0 cellspacing=0 cellpadding=0 background="images/box.gif" style="border:1px dotted #999\">
		  <tr>
			<td height=170><img src="images/{hinh}" width=150px height=150 border=0></td>
		  </tr>
		  <tr>
			<td height=25 style="font-size:14px; color:#F00;">{ten}</td>
		  </tr>
		  <tr>
			<td height=25>GiĆ”: {gia} vnd</td>
		  </tr>
		</table>



</div></a>
Example #3
0
  <?php 
ob_start();
session_start();
if (!isset($_SESSION['id'])) {
    header("location:../index.php");
} else {
    if ($_SESSION['phanquyen'] == 0) {
        header("location:../index.php");
    }
}
?>
 
 
<?php 
$mahang = $_GET["mahang"];
$tenhang = chitiethang($mahang);
?>
 <?php 
if (isset($_POST['btnsua'])) {
    $mahang = $_POST["mahang"];
    $tenhang = $_POST["tenhang"];
    $sql = "UPDATE hang SET tenhang='{$tenhang}' WHERE mahang='{$mahang}' ";
    mysql_query($sql);
    header("location:listhang.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>