Preview: report.php
Size: 3.46 KB
/home/www/idcceurope.com/www/idcceurope.com/admin/report.php
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="main.css" type="text/css" />
<style type="text/css">
.note{
font-family:Arial, Helvetica, sans-serif;
font-size:15px;
font-weight:bold;
color:red;
text-decoration:blink;
font-style:italic;
}
.bang{
clear:both;
padding:20px;
}
#main_center1{
margin:auto;
width:900px;
/*background-color:#FF00FF;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
-khtml-border-radius: 20px;
border-radius: 20px;*/
height:auto;
}
</style>
<script type="text/javascript">
function getImageOnePath(str)
{
document.getElementById("path").value=str;
}
function them()
{
document.getElementById("service").value = "add";
document.getElementById("login").submit();
}
function sua()
{
document.getElementById("service").value = "edit";
document.getElementById("login").submit();
}
function xoa()
{
document.getElementById("service").value = "delete";
document.getElementById("login").submit();
}
function showSalonImage(sel,index)
{
var tiemId = sel.options[index].value;
document.getElementById("anh").src = "anhtiem.php?salon="+tiemId;
}
function show(index)
{
var tb = document.getElementById("chitiet");
var row = tb.rows[index];
document.getElementById("id").value = row.cells[3].innerHTML;
document.getElementById("name").value = row.cells[1].innerHTML;
}
</script>
</head>
<body>
<?php
require "db.php";
$sql = "SELECT * FROM report";
$result = mysql_query($sql);
?>
<div id="main_center1">
<form action="insertReport.php" id="login" name="flogin" method="post" enctype="multipart/form-data">
<table align="center" width="600px" bgcolor="#EFEFEF" border="0" cellpadding="4px" cellspacing="4px" style="margin-top:10px">
<tr>
<td colspan="2" align="center"> NHẬP BÁO CÁO </td>
</tr>
<tr>
<td class="contact_form">Tên của báo cáo</td>
<td>
<input type="text" size="40" id="name" name="name">
</td>
</tr>
<tr>
<td class="contact_form">File báo cáo</td>
<td class="data"><input type="file" name="file" id="file" onBlur="getImageOnePath(this.value);" class="data" size="40"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" value="Thêm" onClick="them();">
<input type="button" value="Sửa" onClick="sua();">
<input type="button" value="Xóa" onClick="xoa();">
</td>
</tr>
</table>
<input type="hidden" id="path" name="path">
<input type="hidden" id="id" name="id">
<input type="hidden" id="service" name="service">
</form>
<div class="bang">
<table width="100%" border="1" style="border-collapse:collapse" id="chitiet">
<tr>
<td colspan="3" align="center">
Danh sách các file báo cáo đã upload
</td>
</tr>
<?php
$count = 0;
while($row = mysql_fetch_array($result))
{
$count++;
?>
<tr onClick="show(this.rowIndex);" style="cursor:pointer">
<td align="center"><?php echo $count;?></td>
<td><?php echo $row["name_en"];?></td>
<td><?php echo $row["file_name_en"];?></td>
<td style="display:none"><?php echo $row["id"];?></td>
</tr>
<?php
}
?>
</table>
</div>
</div>
</body>
</html>
Directory Contents
Dirs: 4 × Files: 101