Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<?php
if(isset($_POST['submit'])){
include "../inc.php";
$id = (int)$_GET['id'];
$ip = $_SERVER['REMOTE_ADDR'];
$direct = $_POST['direct'];
$file=$_FILES['file']['name'];
$tmp_file=$_FILES['file']['tmp_name'];
$size=$_FILES['file']['size'];
$upload_path="".$direct."".basename($file);
$date = date('d-m-y g:i');
if(empty($file)) {
echo "Моля изберете файл!";
echo '</td>
<td class="c_right"><img src="../images/blank.gif" width="2" height="2" alt="" border="0"></td>
</tr>
<tr>
<td class="d_left"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
<td class="d_center"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
<td class="d_right"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
</tr>
</table>';
require("style2.php");
exit;
}
if(file_exists($upload_path)){
echo "Файлът вече съществува!";
echo '</td>
<td class="c_right"><img src="../images/blank.gif" width="2" height="2" alt="" border="0"></td>
</tr>
<tr>
<td class="d_left"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
<td class="d_center"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
<td class="d_right"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
</tr>
</table>';
require("style2.php");
exit;
}
if($size==0){
echo "Файлът е повреден!";
echo '</td>
<td class="c_right"><img src="../images/blank.gif" width="2" height="2" alt="" border="0"></td>
</tr>
<tr>
<td class="d_left"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
<td class="d_center"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
<td class="d_right"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
</tr>
</table>';
require("style2.php");
exit;
}
function random_string($max = 20000){
$chars = explode(" ", 'a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9');
for($i = 0; $i < $max; $i++){
$rand_key = array_rand($chars);
$screen1 .= $chars[$rand_key];
}
return str_shuffle($screen1);
}
if($size>52428800000){
echo "Файлът е прекалено голям!";
echo '</td>
<td class="c_right"><img src="../images/blank.gif" width="2" height="2" alt="" border="0"></td>
</tr>
<tr>
<td class="d_left"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
<td class="d_center"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
<td class="d_right"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
</tr>
</table>';
require("style2.php");
exit;
}
$extensions = array("flv","FLV");
$extension_file = end(explode(".",$file));
$extension_file = strtolower($extension_file);
if(!in_array($extension_file,$extensions)){
echo "Забранен формат!";
echo '</td>
<td class="c_right"><img src="../images/blank.gif" width="2" height="2" alt="" border="0"></td>
</tr>
<tr>
<td class="d_left"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
<td class="d_center"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
<td class="d_right"><img src="../images/blank.gif" width="1" height="1" alt="" border="0"></td>
</tr>
</table>';
require("style2.php");
exit;
}
$upload=move_uploaded_file($tmp_file,$upload_path);
if($upload){
$q=mysql_query("INSERT INTO `table` (`id`,`file`,`direct`,`ip`,`size`,`date`) VALUES ('$id','$file','$direct','$ip','$size','$date')");
if($q = TRUE){
echo "<font color=\"green\">Файлът е успешно качен!
<meta http-equiv='refresh' content='1;url=http://www.fighter-bg.com/admin/sitemap_album.php'/>
</font>";
}else{
echo "<font color=\"red\">Грешка!</font></center>";
exit;
}
}
}else{
?>
<form action="" method="post" enctype="multipart/form-data" class="upform" name="upload" id="upload">
<table width="95%" border="0">
<tr><td>Файл:</td><td><input name="file" type="file">
<br><font color="green">Избери файл за качване</font></td></tr>
<input type="hidden" name="direct" value='../folder/'>
<tr><td></td><td><input name="submit" type="submit" value="Качи!"></td></tr>
</table>
</form>
<?php
}
?>
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
<script type="text/javascript">jwplayer.key="ABCDEFGHIJKLMOPQ";</script>
<div id="myElement">Loading the player...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
file: "/uploads/myVideo.mp4",
image: "/uploads/myPoster.jpg"
});
</script>