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
session_start();
if($_SESSION['admin']=='')
die();
require_once('../jadro/base.php');
///checks for mod security
if(function_exists('apache_get_modules'))
{
$amod=@apache_get_modules();
if(in_array('mod_security',$amod))
$_GET['nojs']=1;
unset($amod);
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="<?php echo @constant('SITE_ROOT'); ?>/scripts/fancyupload/fancyupload.css" rel="stylesheet" type="text/css" media="screen" />
<?php if(!isset($_GET['nojs'])){ ?>
<script type="text/javascript" src="<?php echo @constant('SITE_ROOT'); ?>/scripts/mootools/mootools-1.2.1-core-yc.js"></script>
<script type="text/javascript" src="<?php echo @constant('SITE_ROOT'); ?>/scripts/fancyupload/Swiff.Uploader.js"></script>
<script type="text/javascript" src="<?php echo @constant('SITE_ROOT'); ?>/scripts/fancyupload/Fx.ProgressBar.js"></script>
<script type="text/javascript" src="<?php echo @constant('SITE_ROOT'); ?>/scripts/fancyupload/FancyUpload2.js"></script>
<script type="text/javascript">
window.addEvent('load', function() {
var swiffy = new FancyUpload2($('fancyupload-status'), $('fancyupload-list'), {
url: $('fancyupload-form').action,
fieldName: 'fancyupload-photoupload',
<?php if($_SESSION['instantstart']=='') { ?>
instantStart: true,
<?php } ?>
<?php if($_SESSION['multipleupload']!='') echo 'limitFiles: ' . $_SESSION['multipleupload'] . ','.($_SESSION['multipleupload']=='1'?'multiple: false,':'' ); ?>
path: '<?php echo @constant('SITE_ROOT'); ?>/scripts/fancyupload/Swiff.Uploader.swf',
onLoad: function() {
$('fancyupload-status').removeClass('hide');
$('fancyupload-fallback').destroy();
},
// The changed parts!
debug: false, // enable logs, uses console.log
target: 'fancyupload-browse' // the element for the overlay (Flash 10 only)
});
/**
* Various interactions
*/
var filt = {'Images ': '*.JPG; *.JPEG; *.GIF; *.PNG;*.jpg; *.jpeg; *.gif; *.png'};
swiffy.options.typeFilter = filt;
$('fancyupload-browse').addEvent('click', function() {
/**
* Doesn't work anymore with Flash 10: swiffy.browse();
* FancyUpload moves the Flash movie as overlay over the link.
* (see opeion "target" above)
*/
swiffy.browse();
return false;
});
/**
* The *NEW* way to set the typeFilter, since Flash 10 does not call
* swiffy.browse(), we need to change the type manually before the browse-click.
*/
$('fancyupload-select-images').addEvent('change', function() {
var filter = null;
if (this.checked) {
filter = {'Images ': '*.JPG; *.JPEG; *.GIF; *.PNG;*.jpg; *.jpeg; *.gif; *.png'};
}
swiffy.options.typeFilter = filter;
});
$('fancyupload-clear').addEvent('click', function() {
swiffy.removeFile();
return false;
});
$('fancyupload-upload').addEvent('click', function() {
swiffy.upload();
return false;
});
});
</script>
<?php } ?>
</head>
<body>
<form action="<?php echo @constant('SITE_ROOT'); ?>/admin/upload.php?<?php echo session_name().'='.session_id(); ?><?php if (isset($_GET['nojs']))echo '&nojs=1'; ?>" method="post" enctype="multipart/form-data" id="fancyupload-form">
<fieldset id="fancyupload-fallback">
<legend>File Upload</legend>
<p>
Select your photo to upload.<br />
</p>
<label for="fancyupload-photoupload">
Upload Photos:
<input type="file" name="fancyupload-photoupload" id="fancyupload-photoupload" />
<input type="submit" value="Upload" />
</label>
</fieldset>
<?php if(!isset($_GET['nojs'])){ ?>
<div id="fancyupload-status" class="hide">
<p>
<a href="#" id="fancyupload-browse">Browse Files</a> |
<input type="checkbox" id="fancyupload-select-images" checked="checked" class="ss" /> Images Only |
<a href="#" id="fancyupload-clear">Clear List</a> |
<a href="#" id="fancyupload-upload">Upload</a>
</p>
<div>
<strong class="overall-title">Overall progress</strong><br />
<img src="<?php echo @constant('SITE_ROOT'); ?>/scripts/fancyupload/images/bar.gif" class="progress overall-progress" />
</div>
<div>
<strong class="current-title">File Progress</strong><br />
<img src="<?php echo @constant('SITE_ROOT'); ?>/scripts/fancyupload/images/bar.gif" class="progress current-progress" />
</div>
<div class="current-text"></div>
</div>
<ul id="fancyupload-list"></ul>
<?php } ?>
</form>
</body></html>
; Maximum size of POST data that PHP will accept.
post_max_size = 32M
; Maximum allowed size for uploaded files.
upload_max_filesize = 32M
; Whether to allow HTTP file uploads. (this is on by default)
file_uploads = On