|
|
|
ขอถามเรื่องการใส่ jquery progress bar หน่อยครับ ๆๆๆๆๆๆๆๆๆๆๆๆๆๆ |
|
|
|
|
|
|
|
ถ้าจะใส่นิต้อง ทำไงคับ Code (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>
<style type="text/css">
.input{
padding:5px;
width:250px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border:1px solid #CCC;
outline:none;
-webkit-transition: -webkit-transform 0.4s ease-out;
-moz-transition: -moz-transform 0.4s ease-out;
-transition: transform 0.4s ease-out;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
font-family: 'arial',Tahoma;
margin-top: 5px;
margin-right: 0px;
margin-bottom: 5px;
margin-left: 0px;
}
</style>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
$form = "<form action='upload.php' method='post' enctype='multipart/form-data'>
<table width='380' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
</tr>
<tr>
<td><div align='right'>Title :</div></td>
<td> </td>
<td width='210'><input type='text' name='title' class='input'></td>
<td width='33'> </td>
<td width='33'> </td>
</tr>
<tr>
</tr>
<tr>
<td><div align='right'>Detail :</div></td>
<td> </td>
<td><textarea name='description' class='input' ></textarea></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><div align='right'>File :</div></td>
<td> </td>
<td> <input type='file' name='myfile' class='input' />
<td></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type='submit' class='host_it' name='submitbutton' value='Upload' ></td>
<td> </td>
<td> </td>
</tr>
<tr>
</tr>
<tr>
<td colspan='6'><table width='374' border='0' cellspacing='0' cellpadding='0'>
<tr> </tr>
</table></td>
</tr>
</table></form>";
if($_POST['submitbutton'])
{
$title = $_POST['title'];
$description = $_POST['description'];
$name = $_FILES['myfile']['name'];
$type = $_FILES['myfile']['type'];
$size = $_FILES['myfile']['size'];
$tmpname = $_FILES['myfile']['tmp_name'];
$ext = substr($name, substr($name, '.'));
if ($name)
{
if($title && $description)
{
require("connect/connect.php");
$date = date("d-m-y");
$charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
$length = 15;
for ($i = 0; $i <= $length; $i++)
{
$rand = rand() % strlen($charset);
$tmp = substr($charset, $rand, 1);
$code .= $tmp;
}
while($numrows != 0)
{
for ($i = 0; $i <= $length; $i++)
{
$rand = rand() % strlen($charset);
$tmp = substr($charset, $rand, 1);
$code .= $tmp;
}
$quert = mysql_query("SELECT token FROM file WHILE token='$code'");
$numrows = mysql_num_rows($quert);
}
mkdir("MyFile/$code", 775);
move_uploaded_file($tmpname, "MyFile/$code/"."".$ext);
$query = mysql_query("INSERT INTO file VALUES ('', '$title', '$code', '$description', '$name', '$date', '$size')");
$file = "$name";
echo "<table width='380' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='100' rowspan='5'><img src='images/text-file-icon.png' width='100' height='100' /></td>
<td width='4'> </td>
<td colspan='3'> </td>
</tr>
<tr>
<td> </td>
<td width='205'><strong>$file</strong></td>
<td width='33'> </td>
<td width='38'> </td>
</tr>
<tr>
<td height='19'> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Link Download : [ กรุณา Copy ลิงค์ ตรง Link Download ]</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><input type='text' value='http://upload.anime-channal.com/download.php?token=$code' class='input' /></td>
<td> </td>
<td><a href='javascript:poptastic('download.php?token=$code)'><img src='images/link.png' width='32' height='32' target='_parent' /></a></td>
</tr>
<tr>
<td></td>
<td> </td>
<td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><strong>HTML CODE</strong></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan='5'><table width='374' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='106'> </td>
<td width='268'><input type='text' value='' class='input' /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><a href='upload.php'><img src='images/host_it.jpg' width='89' height='38' border='0' /></a></td>
</tr>
</table></td>
</tr>
</table>
";
}
else
echo "<span class='error'><center>You did fill in the form.</center></span>$form";
}
else
echo "<span class='error'><center>That is not an File.</center></span> $form";
}
else
echo "$form";
?>
</body>
</html>
Tag : PHP
|
|
|
|
|
|
Date :
2012-10-30 15:23:36 |
By :
nukedonut1 |
View :
1197 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ของผมใส่ในหน้าแรกก แล้วทำเป็น ซ่อนน ไว้คับๆ
|
|
|
|
|
Date :
2012-10-30 22:47:36 |
By :
varisz |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|