Initial commit as of 2018-10-16
This commit is contained in:
11
application/helpers/index.html
Normal file
11
application/helpers/index.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
33
application/helpers/is_allowed.php
Normal file
33
application/helpers/is_allowed.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Justboil.me - a TinyMCE image upload plugin
|
||||
* jbimages/config.php
|
||||
*
|
||||
* Released under Creative Commons Attribution 3.0 Unported License
|
||||
*
|
||||
* License: http://creativecommons.org/licenses/by/3.0/
|
||||
* Plugin info: http://justboil.me/
|
||||
* Author: Viktor Kuzhelnyi
|
||||
*
|
||||
* Version: 2.3 released 23/06/2013
|
||||
*/
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
|
|
||||
| IMPORTANT NOTE! In case, when TinyMCE<43>s folder is not protected with HTTP Authorisation,
|
||||
| you should require is_allowed() function to return
|
||||
| `TRUE` if user is authorised,
|
||||
| `FALSE` - otherwise
|
||||
|
|
||||
| This is intended to protect upload script, if someone guesses it's url.
|
||||
|
|
||||
-------------------------------------------------------------------*/
|
||||
|
||||
function is_allowed()
|
||||
{
|
||||
if(isset($_SESSION['user']) && $_SESSION['user']['rank'] >= 6) return TRUE;
|
||||
else return FALSE;
|
||||
}
|
||||
|
||||
?>
|
6
application/helpers/jbimages_helper.php
Normal file
6
application/helpers/jbimages_helper.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
This Helper is a wrapper of the file below
|
||||
*/
|
||||
|
||||
include("is_allowed.php");
|
Reference in New Issue
Block a user