mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-13 19:56:23 +00:00
added new settings to hide pictshare upload form or hide the fact that you're running pictshare
This commit is contained in:
29
inc/core.php
29
inc/core.php
@@ -59,14 +59,29 @@ function whatToDo($url)
|
||||
|
||||
if(!is_array($data) || !$data['hash'])
|
||||
{
|
||||
if($_POST['submit']==$pm->translate(3))
|
||||
$o=$pm->ProcessUploads();
|
||||
else
|
||||
$o.= $pm->renderUploadForm();
|
||||
|
||||
$vars['content'] = $o;
|
||||
$vars['slogan'] = $pm->translate(2);
|
||||
if((UPLOAD_FORM_LOCATION && $url==UPLOAD_FORM_LOCATION) || (!UPLOAD_FORM_LOCATION && $url='/'))
|
||||
{
|
||||
if($_POST['submit']==$pm->translate(3))
|
||||
$o=$pm->ProcessUploads();
|
||||
else
|
||||
$o.= $pm->renderUploadForm();
|
||||
|
||||
$vars['content'] = $o;
|
||||
$vars['slogan'] = $pm->translate(2);
|
||||
|
||||
}
|
||||
|
||||
if(!$vars && LOW_PROFILE)
|
||||
{
|
||||
header('HTTP/1.0 404 Not Found');
|
||||
exit();
|
||||
}
|
||||
else if(!$vars)
|
||||
{
|
||||
$vars['content'] = $pm->translate(12);
|
||||
$vars['slogan'] = $pm->translate(2);
|
||||
}
|
||||
|
||||
render($vars);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
<?php
|
||||
|
||||
//If set, upload form will only be shown on that location
|
||||
//eg: define('UPLOAD_FORM_LOCATION', '/secret/upload'); then the upload form will only be visible
|
||||
//from http://your.domain/secret/upload
|
||||
define('UPLOAD_FORM_LOCATION', false);
|
||||
|
||||
//If set to true, the only page that will be rendered is the upload form
|
||||
//if a wrong link is provided, 404 will be shown instead of the error page
|
||||
//It's meant to be used to hide the fact that you're using pictshare and your site just looks like a content server
|
||||
//use in combination with UPLOAD_FORM_LOCATION for maximum sneakiness
|
||||
define('LOW_PROFILE', false);
|
||||
|
||||
//if set to a string, this string must be provided before upload.
|
||||
//you can set multiple codes by;separating;them;with;semicolons
|
||||
//if set to false, everybody can upload
|
||||
|
||||
Reference in New Issue
Block a user