<?php $masp = $_GET['masp']; ?> <table width="100%" border="1" cellpadding="0"> <?php $ct = chitietsanpham($masp); ?> <tr> <th width="26%" scope="col"><img src="images/<?php echo $ct['hinh']; ?> " /></th> <th width="74%" scope="col"><?php echo $ct['ttsp']; ?> </br><?php echo $ct['mausac']; ?> </th> </tr> <tr> <th scope="row"><?php echo $ct['tensp']; ?> </th> <td>RAM : <?php echo $ct['ram']; ?> </td> </tr>
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 $masp = $_GET['masp']; $row_sp = chitietsanpham($masp); ?> <?php if (isset($_POST["btnthem"])) { $arrImg = array("image/png", "image/jpeg", "image/bmp"); $errFile = $_FILES["hinh"]["error"]; if ($errFile > 0) { $err .= "Lỗi file hình <br>"; } else { $type = $_FILES["hinh"]["type"]; if (!in_array($type, $arrImg)) { $err .= "Không phải file hình <br>"; } else { $temp = $_FILES["hinh"]["tmp_name"]; $name = $_FILES["hinh"]["name"]; if (!move_uploaded_file($temp, "../images/" . $name)) {