General improvements
|
@ -28,12 +28,15 @@ class File extends MY_Controller
|
||||||
$isThumb = isset($_GET['w']) || isset($_GET['h']);
|
$isThumb = isset($_GET['w']) || isset($_GET['h']);
|
||||||
$w = isset($_GET['w']) ? $_GET['w'] : false;
|
$w = isset($_GET['w']) ? $_GET['w'] : false;
|
||||||
$h = isset($_GET['h']) ? $_GET['h'] : false;
|
$h = isset($_GET['h']) ? $_GET['h'] : false;
|
||||||
$imagePath = pathinfo($file['path'], PATHINFO_DIRNAME) . '/' .
|
$basePath = str_replace('\\', DIRECTORY_SEPARATOR, $file['path']);
|
||||||
|
$basePath = str_replace('/', DIRECTORY_SEPARATOR, $basePath);
|
||||||
|
$imagePath = pathinfo($basePath, PATHINFO_DIRNAME) . '/' .
|
||||||
($isThumb ? 'thumbs/' : '') .
|
($isThumb ? 'thumbs/' : '') .
|
||||||
$file['name'] .
|
$file['name'] .
|
||||||
($w ? '_w' . $w : '') .
|
($w ? '_w' . $w : '') .
|
||||||
($h ? '_h' . $h : '') .
|
($h ? '_h' . $h : '') .
|
||||||
'.' . pathinfo($file['path'], PATHINFO_EXTENSION);
|
'.' . pathinfo($basePath, PATHINFO_EXTENSION);
|
||||||
|
$imagePath = str_replace('/', DIRECTORY_SEPARATOR, $imagePath);
|
||||||
|
|
||||||
if (!file_exists($imagePath)) {
|
if (!file_exists($imagePath)) {
|
||||||
if(!$isThumb)
|
if(!$isThumb)
|
||||||
|
|
|
@ -194,7 +194,6 @@
|
||||||
if ($username == $loginData['username'] || $username == $loginData['email']) {
|
if ($username == $loginData['username'] || $username == $loginData['email']) {
|
||||||
$resetKey = $this->LoginModel->createForgetPasswordKey($loginData['username']);
|
$resetKey = $this->LoginModel->createForgetPasswordKey($loginData['username']);
|
||||||
|
|
||||||
// TODO: E-Mail send
|
|
||||||
$this->EmailModel->sendMail($loginData['email'], 'Passwort zurücksetzen auf KingOfDog.eu', 'password_reset', ['userHash' => base64_encode($loginData['username']), 'resetKey' => $resetKey]);
|
$this->EmailModel->sendMail($loginData['email'], 'Passwort zurücksetzen auf KingOfDog.eu', 'password_reset', ['userHash' => base64_encode($loginData['username']), 'resetKey' => $resetKey]);
|
||||||
|
|
||||||
$notice['state'] = true;
|
$notice['state'] = true;
|
||||||
|
|
|
@ -83,6 +83,8 @@
|
||||||
|
|
||||||
$this->GeneralModel->addContactMessage($email, $userID, $message);
|
$this->GeneralModel->addContactMessage($email, $userID, $message);
|
||||||
|
|
||||||
|
$this->EmailModel->sendMail('contact@kingofdog.eu', "Neue Nachricht von $email", 'contact_message', ['email' => $email, 'message' => $message]);
|
||||||
|
|
||||||
$notice['type'] = true;
|
$notice['type'] = true;
|
||||||
$notice['message'] = "Deine Nachricht wurde versendet!";
|
$notice['message'] = "Deine Nachricht wurde versendet!";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -73,5 +73,4 @@ class AdminModel extends CI_Model {
|
||||||
{
|
{
|
||||||
return $this->db->query('SELECT * FROM calendar')->result_array();
|
return $this->db->query('SELECT * FROM calendar')->result_array();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
use Coduo\PHPHumanizer\DateTimeHumanizer;
|
|
||||||
|
|
||||||
class EmailModel extends CI_Model
|
class EmailModel extends CI_Model
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -131,15 +131,20 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var _paq = _paq || [];
|
var _paq = _paq || [];
|
||||||
|
// require user consent before processing data
|
||||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
_paq.push(['trackPageView']);
|
_paq.push(['trackPageView']);
|
||||||
_paq.push(['enableLinkTracking']);
|
_paq.push(['enableLinkTracking']);
|
||||||
(function() {
|
(function () {
|
||||||
var u="//stats.kingofdog.eu/";
|
var u = "//stats.kingofdog.eu/";
|
||||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
_paq.push(['setTrackerUrl', u + 'piwik.php']);
|
||||||
_paq.push(['setSiteId', '1']);
|
_paq.push(['setSiteId', '1']);
|
||||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
|
||||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
g.type = 'text/javascript';
|
||||||
|
g.async = true;
|
||||||
|
g.defer = true;
|
||||||
|
g.src = u + 'piwik.js';
|
||||||
|
s.parentNode.insertBefore(g, s);
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -386,7 +386,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button id="load-more-button" class="btn btn-default col-xs-6 col-xs-offset-3" onclick="loadPosts(false)"
|
<button id="load-more-button" class="btn btn-default col-xs-6 col-xs-offset-3" onclick="loadPosts(false)"
|
||||||
data-loading="<i class='fa fa-cog fa-spin'></i> Lädt..."
|
data-loading="<div class='loadingSpinner'></div> Lädt..."
|
||||||
data-load="<i class='fa fa-ellipsis-h'></i> Mehr Posts laden">
|
data-load="<i class='fa fa-ellipsis-h'></i> Mehr Posts laden">
|
||||||
<i class="fa fa-ellipsis-h"></i>
|
<i class="fa fa-ellipsis-h"></i>
|
||||||
Mehr Posts laden
|
Mehr Posts laden
|
||||||
|
|
5
assets/css/lib/bootstrap-tagsinput.css
vendored
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* bootstrap-tagsinput v0.8.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
.bootstrap-tagsinput {
|
.bootstrap-tagsinput {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
|
|
50
assets/css/lib/bootstrap-tagsinput.min.css
vendored
|
@ -1 +1,49 @@
|
||||||
.bootstrap-tagsinput{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);display:inline-block;padding:4px 6px;color:#555;vertical-align:middle;border-radius:4px;max-width:100%;line-height:22px;cursor:text}.bootstrap-tagsinput input,.bootstrap-tagsinput input:focus{border:none;box-shadow:none}.bootstrap-tagsinput input{outline:0;background-color:transparent;padding:0 6px;margin:0;width:auto;max-width:inherit}.bootstrap-tagsinput.form-control input::-moz-placeholder{color:#777;opacity:1}.bootstrap-tagsinput.form-control input:-ms-input-placeholder{color:#777}.bootstrap-tagsinput.form-control input::-webkit-input-placeholder{color:#777}.bootstrap-tagsinput .tag{margin-right:2px;color:#fff}.bootstrap-tagsinput .tag [data-role=remove]{margin-left:8px;cursor:pointer}.bootstrap-tagsinput .tag [data-role=remove]:after{content:"x";padding:0 2px}.bootstrap-tagsinput .tag [data-role=remove]:hover{box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.bootstrap-tagsinput .tag [data-role=remove]:hover:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}
|
.bootstrap-tagsinput{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);display:inline-block;padding:4px 6px;color:#555;vertical-align:middle;border-radius:4px;max-width:100%;line-height:22px;cursor:text}.bootstrap-tagsinput input,.bootstrap-tagsinput input:focus{border:none;box-shadow:none}.bootstrap-tagsinput input{outline:0;background-color:transparent;padding:0 6px;margin:0;width:auto;max-width:inherit}.bootstrap-tagsinput.form-control input::-moz-placeholder{color:#777;opacity:1}.bootstrap-tagsinput.form-control input:-ms-input-placeholder{color:#777}.bootstrap-tagsinput.form-control input::-webkit-input-placeholder{color:#777}.bootstrap-tagsinput .tag{margin-right:2px;color:#fff}.bootstrap-tagsinput .tag [data-role=remove]{margin-left:8px;cursor:pointer}.bootstrap-tagsinput .tag [data-role=remove]:after{content:"x";padding:0 2px}.bootstrap-tagsinput .tag [data-role=remove]:hover{box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.bootstrap-tagsinput .tag [data-role=remove]:hover:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.twitter-typeahead .tt-query,
|
||||||
|
.twitter-typeahead .tt-hint {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.twitter-typeahead .tt-hint
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tt-menu {
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1000;
|
||||||
|
display: none;
|
||||||
|
float: left;
|
||||||
|
min-width: 160px;
|
||||||
|
padding: 5px 0;
|
||||||
|
margin: 2px 0 0;
|
||||||
|
list-style: none;
|
||||||
|
font-size: 14px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||||
|
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||||
|
background-clip: padding-box;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tt-suggestion {
|
||||||
|
display: block;
|
||||||
|
padding: 3px 20px;
|
||||||
|
clear: both;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 1.428571429;
|
||||||
|
color: #333333;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tt-suggestion:hover,
|
||||||
|
.tt-suggestion:focus {
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
outline: 0;
|
||||||
|
background-color: #428bca;
|
||||||
|
}
|
8
assets/js/lib/bootstrap-tagsinput.min.js
vendored
|
@ -93,7 +93,10 @@ function getCookie(key) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCookie(key, value) {
|
function setCookie(key, value) {
|
||||||
document.cookie = key + '=' + value + ';';
|
// const expires = new Date('31.12.9999 23:59:59');
|
||||||
|
const expires = new Date();
|
||||||
|
expires.setTime(expires.getTime() + (10000 * 24 * 60 * 60 * 1000));
|
||||||
|
document.cookie = key + '=' + value + ';expires=' + expires.toUTCString() + ';path=/';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Feedback Form
|
// Feedback Form
|
||||||
|
@ -120,7 +123,6 @@ function sendFeedback() {
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
$('#feedbackModal .modal-loading-container .modal-loading-icon').removeClass('fa-cog fa-spin').addClass('fa-check success').append('<span>Vielen Dank für dein Feedback!</span>');
|
$('#feedbackModal .modal-loading-container .modal-loading-icon').removeClass('fa-cog fa-spin').addClass('fa-check success').append('<span>Vielen Dank für dein Feedback!</span>');
|
||||||
},
|
},
|
||||||
error: console.log
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +151,6 @@ function sendContactMessage() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (data) {
|
error: function (data) {
|
||||||
console.log(data);
|
|
||||||
$('#contactModal .modal-loading-container .modal-loading-icon i').removeClass('fa-cog fa-spin').addClass('fa-times').parents('.modal-loading-icon').addClass('error').append('<span>Ein unbekannter Fehler ist aufgetreten</span>');
|
$('#contactModal .modal-loading-container .modal-loading-icon i').removeClass('fa-cog fa-spin').addClass('fa-times').parents('.modal-loading-icon').addClass('error').append('<span>Ein unbekannter Fehler ist aufgetreten</span>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -204,7 +205,6 @@ $('.side-navigation-background').click(function () {
|
||||||
$('.side-navigation-content .dropdown > a').on("click", function (e) {
|
$('.side-navigation-content .dropdown > a').on("click", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(".sub-menu", $(this).parent()).slideToggle(200);
|
$(".sub-menu", $(this).parent()).slideToggle(200);
|
||||||
console.log($('.fa-angle-down', $(this)));
|
|
||||||
$('.fa-angle-down', $(this)).toggleClass('opened');
|
$('.fa-angle-down', $(this)).toggleClass('opened');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -222,6 +222,98 @@ $(document).on('swipeleft', function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function closeSearch() {
|
||||||
|
$('.navbar.search-open').removeClass('search-open')
|
||||||
|
.find('.navbar-search input').val('');
|
||||||
|
}
|
||||||
|
|
||||||
|
function executeSearch() {
|
||||||
|
const search = $('.navbar-search input').val().trim();
|
||||||
|
|
||||||
|
if(search.length < 3) {
|
||||||
|
addSnackbar('warning', 'Bitte gib mindestens 3 Buchstaben als Suchbegriff an.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const newUrl = '/search?q=' + encodeURI(search);
|
||||||
|
window.history.pushState(null, '', newUrl);
|
||||||
|
|
||||||
|
const old = $('body > *:not(header):not(footer):not(#bottom)').fadeOut(500);
|
||||||
|
setTimeout(() => old.remove(), 500);
|
||||||
|
|
||||||
|
$('.navbar').after('<div class="loadingSpinner"></div>');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '/search',
|
||||||
|
data: {
|
||||||
|
q: search
|
||||||
|
},
|
||||||
|
method: 'GET',
|
||||||
|
success: data => {
|
||||||
|
// $('html').children().remove()[0].outerHTML = data;
|
||||||
|
document.write(data);
|
||||||
|
document.close();
|
||||||
|
// const newBody = $('body > *:not(header):not(footer):not(#bottom)', $(data));
|
||||||
|
// console.log(newBody);
|
||||||
|
// $('.loadingSpinner').after(newBody);
|
||||||
|
},
|
||||||
|
error: data => {
|
||||||
|
console.log(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#searchButton').on('click', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
const navbar = $('.navbar');
|
||||||
|
if (navbar.hasClass('search-open')) {
|
||||||
|
const search = $('.navbar-search input').val().trim();
|
||||||
|
|
||||||
|
if (search.length > 0) {
|
||||||
|
executeSearch();
|
||||||
|
} else {
|
||||||
|
closeSearch();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
navbar.addClass('search-open');
|
||||||
|
$('.navbar .navbar-search input').focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#searchResetButton').on('click', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
closeSearch();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('body').on('keyup', (e) => {
|
||||||
|
if ($('.navbar').hasClass('search-open') && e.key === 'Escape') {
|
||||||
|
closeSearch();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.navbar-search input').on('keyup', (e) => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
executeSearch()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.navbar-search:not(.active) .btn-search').click(function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
const $form = $(this).closest('form'),
|
||||||
|
$input = $form.find('input');
|
||||||
|
$form.addClass('active');
|
||||||
|
$input.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.navbar-search.active .btn-search').click(function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
const $form = $(this).closest('form'),
|
||||||
|
$input = $form.find('input');
|
||||||
|
//TODO: Execute search
|
||||||
|
|
||||||
|
closeSearch();
|
||||||
|
});
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
$.each($(".share-btn"), function () {
|
$.each($(".share-btn"), function () {
|
||||||
$(this).on("click", function (event) {
|
$(this).on("click", function (event) {
|
||||||
|
@ -308,14 +400,13 @@ function loadNotificationsAsync() {
|
||||||
offset: notificationOffset
|
offset: notificationOffset
|
||||||
},
|
},
|
||||||
beforeSend: () => {
|
beforeSend: () => {
|
||||||
$('#notificationMenu').find('.fa').removeClass('fa-frown text-danger').addClass('fa-spin fa-cog');
|
$('#notificationMenu').find('.loadingSpinner').removeClass('failed');
|
||||||
},
|
},
|
||||||
success: (data) => {
|
success: (data) => {
|
||||||
$('#notificationMenu').find('.text-center').remove();
|
$('#notificationMenu').find('.loadingSpinner').remove();
|
||||||
if (data.status === 'success') {
|
if (data.status === 'success') {
|
||||||
const container = $('#notificationMenu .list-group');
|
const container = $('#notificationMenu .list-group');
|
||||||
for (let notification of data.notifications) {
|
for (let notification of data.notifications) {
|
||||||
console.log(notification);
|
|
||||||
container.append(`
|
container.append(`
|
||||||
<a href="${notification.link}" class="list-group-item list-group-item-action flex-column align-items-start ${notification.unread ? '' : 'disabled'}">
|
<a href="${notification.link}" class="list-group-item list-group-item-action flex-column align-items-start ${notification.unread ? '' : 'disabled'}">
|
||||||
<div class="d-flex w-100 justify-content-between">
|
<div class="d-flex w-100 justify-content-between">
|
||||||
|
@ -339,7 +430,7 @@ function loadNotificationsAsync() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: () => {
|
error: () => {
|
||||||
$('#notificationMenu').find('.fa').removeClass('fa-spin fa-cog').addClass('fa-frown text-danger');
|
$('#notificationMenu').find('.loadingSpinner').addClass('failed');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -349,7 +440,7 @@ loadNotificationsAsync();
|
||||||
$('#switchDarkmode').click(function (event) {
|
$('#switchDarkmode').click(function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
$('body').toggleClass('dark');
|
$('body').toggleClass('dark');
|
||||||
if($('body').hasClass('dark')) {
|
if ($('body').hasClass('dark')) {
|
||||||
$(this).find('.fa-moon').removeClass('fa').addClass('far');
|
$(this).find('.fa-moon').removeClass('fa').addClass('far');
|
||||||
$(this).attr('data-title', 'Light Theme')
|
$(this).attr('data-title', 'Light Theme')
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -50,7 +50,6 @@ function sendEdit() {
|
||||||
data: data,
|
data: data,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
success: data => {
|
success: data => {
|
||||||
console.log(data);
|
|
||||||
if(data.success) {
|
if(data.success) {
|
||||||
$('#editingID').val(data.id);
|
$('#editingID').val(data.id);
|
||||||
$('.snackbar-container').append(`
|
$('.snackbar-container').append(`
|
||||||
|
@ -66,7 +65,6 @@ function sendEdit() {
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: console.log
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,15 +164,12 @@ $('.upload-btn').on('change', '.upload-image', function () {
|
||||||
$('.uploaded-image-container').css('background-color', '');
|
$('.uploaded-image-container').css('background-color', '');
|
||||||
}, 2000);
|
}, 2000);
|
||||||
},
|
},
|
||||||
error: console.log
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#url').keyup(function (e) {
|
$('#url').keyup(function (e) {
|
||||||
console.log(e);
|
|
||||||
|
|
||||||
$('#url').val(encodeUrl($('#url').val()));
|
$('#url').val(encodeUrl($('#url').val()));
|
||||||
allowUrlEditing = false;
|
allowUrlEditing = false;
|
||||||
});
|
});
|
||||||
|
|
114
assets/js/tinymce/jquery.tinymce.min.js
vendored
|
@ -1,114 +0,0 @@
|
||||||
!function (a) {
|
|
||||||
function b() {
|
|
||||||
function b(a) {
|
|
||||||
"remove" === a && this.each(function (a, b) {
|
|
||||||
var c = e(b);
|
|
||||||
c && c.remove()
|
|
||||||
}), this.find("span.mceEditor,div.mceEditor").each(function (a, b) {
|
|
||||||
var c = tinymce.get(b.id.replace(/_parent$/, ""));
|
|
||||||
c && c.remove()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function d(a) {
|
|
||||||
var c, d = this;
|
|
||||||
if (null != a) b.call(d), d.each(function (b, c) {
|
|
||||||
var d;
|
|
||||||
(d = tinymce.get(c.id)) && d.setContent(a)
|
|
||||||
}); else if (d.length > 0 && (c = tinymce.get(d[0].id)))return c.getContent()
|
|
||||||
}
|
|
||||||
|
|
||||||
function e(a) {
|
|
||||||
var b = null;
|
|
||||||
return a && a.id && g.tinymce && (b = tinymce.get(a.id)), b
|
|
||||||
}
|
|
||||||
|
|
||||||
function f(a) {
|
|
||||||
return !!(a && a.length && g.tinymce && a.is(":tinymce"))
|
|
||||||
}
|
|
||||||
|
|
||||||
var h = {};
|
|
||||||
a.each(["text", "html", "val"], function (b, g) {
|
|
||||||
var i = h[g] = a.fn[g], j = "text" === g;
|
|
||||||
a.fn[g] = function (b) {
|
|
||||||
var g = this;
|
|
||||||
if (!f(g))return i.apply(g, arguments);
|
|
||||||
if (b !== c)return d.call(g.filter(":tinymce"), b), i.apply(g.not(":tinymce"), arguments), g;
|
|
||||||
var h = "", k = arguments;
|
|
||||||
return (j ? g : g.eq(0)).each(function (b, c) {
|
|
||||||
var d = e(c);
|
|
||||||
h += d ? j ? d.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g, "") : d.getContent({save: !0}) : i.apply(a(c), k)
|
|
||||||
}), h
|
|
||||||
}
|
|
||||||
}), a.each(["append", "prepend"], function (b, d) {
|
|
||||||
var g = h[d] = a.fn[d], i = "prepend" === d;
|
|
||||||
a.fn[d] = function (a) {
|
|
||||||
var b = this;
|
|
||||||
return f(b) ? a !== c ? ("string" == typeof a && b.filter(":tinymce").each(function (b, c) {
|
|
||||||
var d = e(c);
|
|
||||||
d && d.setContent(i ? a + d.getContent() : d.getContent() + a)
|
|
||||||
}), g.apply(b.not(":tinymce"), arguments), b) : void 0 : g.apply(b, arguments)
|
|
||||||
}
|
|
||||||
}), a.each(["remove", "replaceWith", "replaceAll", "empty"], function (c, d) {
|
|
||||||
var e = h[d] = a.fn[d];
|
|
||||||
a.fn[d] = function () {
|
|
||||||
return b.call(this, d), e.apply(this, arguments)
|
|
||||||
}
|
|
||||||
}), h.attr = a.fn.attr, a.fn.attr = function (b, g) {
|
|
||||||
var i = this, j = arguments;
|
|
||||||
if (!b || "value" !== b || !f(i))return g !== c ? h.attr.apply(i, j) : h.attr.apply(i, j);
|
|
||||||
if (g !== c)return d.call(i.filter(":tinymce"), g), h.attr.apply(i.not(":tinymce"), j), i;
|
|
||||||
var k = i[0], l = e(k);
|
|
||||||
return l ? l.getContent({save: !0}) : h.attr.apply(a(k), j)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var c, d, e, f = [], g = window;
|
|
||||||
a.fn.tinymce = function (c) {
|
|
||||||
function h() {
|
|
||||||
var d = [], f = 0;
|
|
||||||
e || (b(), e = !0), l.each(function (a, b) {
|
|
||||||
var e, g = b.id, h = c.oninit;
|
|
||||||
g || (b.id = g = tinymce.DOM.uniqueId()), tinymce.get(g) || (e = new tinymce.Editor(g, c, tinymce.EditorManager), d.push(e), e.on("init", function () {
|
|
||||||
var a, b = h;
|
|
||||||
l.css("visibility", ""), h && ++f == d.length && ("string" == typeof b && (a = -1 === b.indexOf(".") ? null : tinymce.resolve(b.replace(/\.\w+$/, "")), b = tinymce.resolve(b)), b.apply(a || tinymce, d))
|
|
||||||
}))
|
|
||||||
}), a.each(d, function (a, b) {
|
|
||||||
b.render()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
var i, j, k, l = this, m = "";
|
|
||||||
if (!l.length)return l;
|
|
||||||
if (!c)return window.tinymce ? tinymce.get(l[0].id) : null;
|
|
||||||
if (l.css("visibility", "hidden"), g.tinymce || d || !(i = c.script_url)) 1 === d ? f.push(h) : h(); else {
|
|
||||||
d = 1, j = i.substring(0, i.lastIndexOf("/")), -1 != i.indexOf(".min") && (m = ".min"), g.tinymce = g.tinyMCEPreInit || {
|
|
||||||
base: j,
|
|
||||||
suffix: m
|
|
||||||
}, -1 != i.indexOf("gzip") && (k = c.language || "en", i = i + (/\?/.test(i) ? "&" : "?") + "js=true&core=true&suffix=" + escape(m) + "&themes=" + escape(c.theme || "modern") + "&plugins=" + escape(c.plugins || "") + "&languages=" + (k || ""), g.tinyMCE_GZ || (g.tinyMCE_GZ = {
|
|
||||||
start: function () {
|
|
||||||
function b(a) {
|
|
||||||
tinymce.ScriptLoader.markDone(tinymce.baseURI.toAbsolute(a))
|
|
||||||
}
|
|
||||||
|
|
||||||
b("langs/" + k + ".js"), b("themes/" + c.theme + "/theme" + m + ".js"), b("themes/" + c.theme + "/langs/" + k + ".js"), a.each(c.plugins.split(","), function (a, c) {
|
|
||||||
c && (b("plugins/" + c + "/plugin" + m + ".js"), b("plugins/" + c + "/langs/" + k + ".js"))
|
|
||||||
})
|
|
||||||
}, end: function () {
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
var n = document.createElement("script");
|
|
||||||
n.type = "text/javascript", n.onload = n.onreadystatechange = function (b) {
|
|
||||||
b = b || window.event, 2 === d || "load" != b.type && !/complete|loaded/.test(n.readyState) || (tinymce.dom.Event.domLoaded = 1, d = 2, c.script_loaded && c.script_loaded(), h(), a.each(f, function (a, b) {
|
|
||||||
b()
|
|
||||||
}))
|
|
||||||
}, n.src = i, document.body.appendChild(n)
|
|
||||||
}
|
|
||||||
return l
|
|
||||||
}, a.extend(a.expr[":"], {
|
|
||||||
tinymce: function (a) {
|
|
||||||
var b;
|
|
||||||
return !!(a.id && "tinymce" in window && (b = tinymce.get(a.id), b && b.editorManager === tinymce))
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}(jQuery);
|
|
|
@ -1,3 +0,0 @@
|
||||||
This is where language files should be placed.
|
|
||||||
|
|
||||||
Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("advlist",function(a){function b(a,b){var c=[];return tinymce.each(b.split(/[ ,]/),function(a){c.push({text:a.replace(/\-/g," ").replace(/\b\w/g,function(a){return a.toUpperCase()}),data:"default"==a?"":a})}),c}function c(b,c){a.undoManager.transact(function(){var d,e=a.dom,f=a.selection;if(d=e.getParent(f.getNode(),"ol,ul"),!d||d.nodeName!=b||c===!1){var h={"list-style-type":c?c:""};a.execCommand("UL"==b?"InsertUnorderedList":"InsertOrderedList",!1,h)}c=c===!1?g[b]:c,g[b]=c,d=e.getParent(f.getNode(),"ol,ul"),d&&(e.setStyle(d,"listStyleType",c?c:null),d.removeAttribute("data-mce-style")),a.focus()})}function d(b){var c=a.dom.getStyle(a.dom.getParent(a.selection.getNode(),"ol,ul"),"listStyleType")||"";b.control.items().each(function(a){a.active(a.settings.data===c)})}var e,f,g={};e=b("OL",a.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),f=b("UL",a.getParam("advlist_bullet_styles","default,circle,disc,square")),a.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:e,onshow:d,onselect:function(a){c("OL",a.control.settings.data)},onclick:function(){c("OL",!1)}}),a.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:f,onshow:d,onselect:function(a){c("UL",a.control.settings.data)},onclick:function(){c("UL",!1)}})});
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("anchor",function(a){function b(){var b=a.selection.getNode(),c="",d="A"==b.tagName&&""===a.dom.getAttrib(b,"href");d&&(c=b.name||b.id||""),a.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:c},onsubmit:function(c){var e=c.data.name;d?b.id=e:(a.selection.collapse(!0),a.execCommand("mceInsertContent",!1,a.dom.createHTML("a",{id:e})))}})}a.addCommand("mceAnchor",b),a.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:b,stateSelector:"a:not([href])"}),a.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:b})});
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("autolink",function(a){function b(a){e(a,-1,"(",!0)}function c(a){e(a,0,"",!0)}function d(a){e(a,-1,"",!1)}function e(a,b,c){function d(a,b){if(0>b&&(b=0),3==a.nodeType){var c=a.data.length;b>c&&(b=c)}return b}function e(a,b){1!=a.nodeType||a.hasChildNodes()?h.setStart(a,d(a,b)):h.setStartBefore(a)}function f(a,b){1!=a.nodeType||a.hasChildNodes()?h.setEnd(a,d(a,b)):h.setEndAfter(a)}var h,i,j,k,l,m,n,o,p,q;if("A"!=a.selection.getNode().tagName){if(h=a.selection.getRng(!0).cloneRange(),h.startOffset<5){if(o=h.endContainer.previousSibling,!o){if(!h.endContainer.firstChild||!h.endContainer.firstChild.nextSibling)return;o=h.endContainer.firstChild.nextSibling}if(p=o.length,e(o,p),f(o,p),h.endOffset<5)return;i=h.endOffset,k=o}else{if(k=h.endContainer,3!=k.nodeType&&k.firstChild){for(;3!=k.nodeType&&k.firstChild;)k=k.firstChild;3==k.nodeType&&(e(k,0),f(k,k.nodeValue.length))}i=1==h.endOffset?2:h.endOffset-1-b}j=i;do e(k,i>=2?i-2:0),f(k,i>=1?i-1:0),i-=1,q=h.toString();while(" "!=q&&""!==q&&160!=q.charCodeAt(0)&&i-2>=0&&q!=c);h.toString()==c||160==h.toString().charCodeAt(0)?(e(k,i),f(k,j),i+=1):0===h.startOffset?(e(k,0),f(k,j)):(e(k,i),f(k,j)),m=h.toString(),"."==m.charAt(m.length-1)&&f(k,j-1),m=h.toString(),n=m.match(g),n&&("www."==n[1]?n[1]="http://www.":/@$/.test(n[1])&&!/^mailto:/.test(n[1])&&(n[1]="mailto:"+n[1]),l=a.selection.getBookmark(),a.selection.setRng(h),a.execCommand("createlink",!1,n[1]+n[2]),a.selection.moveToBookmark(l),a.nodeChanged())}}var f,g=/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;return a.settings.autolink_pattern&&(g=a.settings.autolink_pattern),a.on("keydown",function(b){return 13==b.keyCode?d(a):void 0}),tinymce.Env.ie?void a.on("focus",function(){if(!f){f=!0;try{a.execCommand("AutoUrlDetect",!1,!0)}catch(b){}}}):(a.on("keypress",function(c){return 41==c.keyCode?b(a):void 0}),void a.on("keyup",function(b){return 32==b.keyCode?c(a):void 0}))});
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("autoresize",function(a){function b(){return a.plugins.fullscreen&&a.plugins.fullscreen.isFullscreen()}function c(d){var g,h,i,j,k,l,m,n,o,p,q,r,s=tinymce.DOM;if(h=a.getDoc()){if(i=h.body,j=h.documentElement,k=e.autoresize_min_height,!i||d&&"setcontent"===d.type&&d.initial||b())return void(i&&j&&(i.style.overflowY="auto",j.style.overflowY="auto"));m=a.dom.getStyle(i,"margin-top",!0),n=a.dom.getStyle(i,"margin-bottom",!0),o=a.dom.getStyle(i,"padding-top",!0),p=a.dom.getStyle(i,"padding-bottom",!0),q=a.dom.getStyle(i,"border-top-width",!0),r=a.dom.getStyle(i,"border-bottom-width",!0),l=i.offsetHeight+parseInt(m,10)+parseInt(n,10)+parseInt(o,10)+parseInt(p,10)+parseInt(q,10)+parseInt(r,10),(isNaN(l)||0>=l)&&(l=tinymce.Env.ie?i.scrollHeight:tinymce.Env.webkit&&0===i.clientHeight?0:i.offsetHeight),l>e.autoresize_min_height&&(k=l),e.autoresize_max_height&&l>e.autoresize_max_height?(k=e.autoresize_max_height,i.style.overflowY="auto",j.style.overflowY="auto"):(i.style.overflowY="hidden",j.style.overflowY="hidden",i.scrollTop=0),k!==f&&(g=k-f,s.setStyle(a.iframeElement,"height",k+"px"),f=k,tinymce.isWebKit&&0>g&&c(d))}}function d(b,e,f){tinymce.util.Delay.setEditorTimeout(a,function(){c({}),b--?d(b,e,f):f&&f()},e)}var e=a.settings,f=0;a.settings.inline||(e.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),e.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),a.on("init",function(){var b,c;b=a.getParam("autoresize_overflow_padding",1),c=a.getParam("autoresize_bottom_margin",50),b!==!1&&a.dom.setStyles(a.getBody(),{paddingLeft:b,paddingRight:b}),c!==!1&&a.dom.setStyles(a.getBody(),{paddingBottom:c})}),a.on("nodechange setcontent keyup FullscreenStateChanged",c),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){d(20,100,function(){d(5,1e3)})}),a.addCommand("mceAutoResize",c))});
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce._beforeUnloadHandler=function(){var a;return tinymce.each(tinymce.editors,function(b){b.plugins.autosave&&b.plugins.autosave.storeDraft(),!a&&b.isDirty()&&b.getParam("autosave_ask_before_unload",!0)&&(a=b.translate("You have unsaved changes are you sure you want to navigate away?"))}),a},tinymce.PluginManager.add("autosave",function(a){function b(a,b){var c={s:1e3,m:6e4};return a=/^(\d+)([ms]?)$/.exec(""+(a||b)),(a[2]?c[a[2]]:1)*parseInt(a,10)}function c(){var a=parseInt(n.getItem(k+"time"),10)||0;return(new Date).getTime()-a>m.autosave_retention?(d(!1),!1):!0}function d(b){n.removeItem(k+"draft"),n.removeItem(k+"time"),b!==!1&&a.fire("RemoveDraft")}function e(){!j()&&a.isDirty()&&(n.setItem(k+"draft",a.getContent({format:"raw",no_events:!0})),n.setItem(k+"time",(new Date).getTime()),a.fire("StoreDraft"))}function f(){c()&&(a.setContent(n.getItem(k+"draft"),{format:"raw"}),a.fire("RestoreDraft"))}function g(){l||(setInterval(function(){a.removed||e()},m.autosave_interval),l=!0)}function h(){var b=this;b.disabled(!c()),a.on("StoreDraft RestoreDraft RemoveDraft",function(){b.disabled(!c())}),g()}function i(){a.undoManager.beforeChange(),f(),d(),a.undoManager.add()}function j(b){var c=a.settings.forced_root_block;return b=tinymce.trim("undefined"==typeof b?a.getBody().innerHTML:b),""===b||new RegExp("^<"+c+"[^>]*>((\xa0| |[ ]|<br[^>]*>)+?|)</"+c+">|<br>$","i").test(b)}var k,l,m=a.settings,n=tinymce.util.LocalStorage;k=m.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",k=k.replace(/\{path\}/g,document.location.pathname),k=k.replace(/\{query\}/g,document.location.search),k=k.replace(/\{id\}/g,a.id),m.autosave_interval=b(m.autosave_interval,"30s"),m.autosave_retention=b(m.autosave_retention,"20m"),a.addButton("restoredraft",{title:"Restore last draft",onclick:i,onPostRender:h}),a.addMenuItem("restoredraft",{text:"Restore last draft",onclick:i,onPostRender:h,context:"file"}),a.settings.autosave_restore_when_empty!==!1&&(a.on("init",function(){c()&&j()&&f()}),a.on("saveContent",function(){d()})),window.onbeforeunload=tinymce._beforeUnloadHandler,this.hasDraft=c,this.storeDraft=e,this.restoreDraft=f,this.removeDraft=d,this.isEmpty=j});
|
|
|
@ -1 +0,0 @@
|
||||||
!function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a){var b=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.on("beforeSetContent",function(a){a.content=b["_"+c+"_bbcode2html"](a.content)}),a.on("postProcess",function(a){a.set&&(a.content=b["_"+c+"_bbcode2html"](a.content)),a.get&&(a.content=b["_"+c+"_html2bbcode"](a.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Ephox Corp",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),b(/<font>(.*?)<\/font>/gi,"$1"),b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),b(/<\/(strong|b)>/gi,"[/b]"),b(/<(strong|b)>/gi,"[b]"),b(/<\/(em|i)>/gi,"[/i]"),b(/<(em|i)>/gi,"[i]"),b(/<\/u>/gi,"[/u]"),b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),b(/<u>/gi,"[u]"),b(/<blockquote[^>]*>/gi,"[quote]"),b(/<\/blockquote>/gi,"[/quote]"),b(/<br \/>/gi,"\n"),b(/<br\/>/gi,"\n"),b(/<br>/gi,"\n"),b(/<p>/gi,""),b(/<\/p>/gi,"\n"),b(/ |\u00a0/gi," "),b(/"/gi,'"'),b(/</gi,"<"),b(/>/gi,">"),b(/&/gi,"&"),a},_punbb_bbcode2html:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/\n/gi,"<br />"),b(/\[b\]/gi,"<strong>"),b(/\[\/b\]/gi,"</strong>"),b(/\[i\]/gi,"<em>"),b(/\[\/i\]/gi,"</em>"),b(/\[u\]/gi,"<u>"),b(/\[\/u\]/gi,"</u>"),b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),a}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}();
|
|
1
assets/js/tinymce/plugins/code/plugin.min.js
vendored
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("code",function(a){function b(){var b=a.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:a.getParam("code_dialog_width",600),minHeight:a.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(b){a.focus(),a.undoManager.transact(function(){a.setContent(b.data.code)}),a.selection.setCursorLocation(),a.nodeChanged()}});b.find("#code").value(a.getContent({source_view:!0}))}a.addCommand("mceCodeEditor",b),a.addButton("code",{icon:"code",tooltip:"Source code",onclick:b}),a.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:b})});
|
|
|
@ -1,138 +0,0 @@
|
||||||
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
|
|
||||||
/**
|
|
||||||
* prism.js default theme for JavaScript, CSS and HTML
|
|
||||||
* Based on dabblet (http://dabblet.com)
|
|
||||||
* @author Lea Verou
|
|
||||||
*/
|
|
||||||
|
|
||||||
code[class*="language-"],
|
|
||||||
pre[class*="language-"] {
|
|
||||||
color: black;
|
|
||||||
text-shadow: 0 1px white;
|
|
||||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
||||||
direction: ltr;
|
|
||||||
text-align: left;
|
|
||||||
white-space: pre;
|
|
||||||
word-spacing: normal;
|
|
||||||
word-break: normal;
|
|
||||||
word-wrap: normal;
|
|
||||||
line-height: 1.5;
|
|
||||||
|
|
||||||
-moz-tab-size: 4;
|
|
||||||
-o-tab-size: 4;
|
|
||||||
tab-size: 4;
|
|
||||||
|
|
||||||
-webkit-hyphens: none;
|
|
||||||
-moz-hyphens: none;
|
|
||||||
-ms-hyphens: none;
|
|
||||||
hyphens: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
|
||||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
|
||||||
text-shadow: none;
|
|
||||||
background: #b3d4fc;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
|
||||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
|
||||||
text-shadow: none;
|
|
||||||
background: #b3d4fc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media print {
|
|
||||||
code[class*="language-"],
|
|
||||||
pre[class*="language-"] {
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Code blocks */
|
|
||||||
pre[class*="language-"] {
|
|
||||||
padding: 1em;
|
|
||||||
margin: .5em 0;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
:not(pre) > code[class*="language-"],
|
|
||||||
pre[class*="language-"] {
|
|
||||||
background: #f5f2f0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Inline code */
|
|
||||||
:not(pre) > code[class*="language-"] {
|
|
||||||
padding: .1em;
|
|
||||||
border-radius: .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.comment,
|
|
||||||
.token.prolog,
|
|
||||||
.token.doctype,
|
|
||||||
.token.cdata {
|
|
||||||
color: slategray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.punctuation {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.namespace {
|
|
||||||
opacity: .7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.property,
|
|
||||||
.token.tag,
|
|
||||||
.token.boolean,
|
|
||||||
.token.number,
|
|
||||||
.token.constant,
|
|
||||||
.token.symbol,
|
|
||||||
.token.deleted {
|
|
||||||
color: #905;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.selector,
|
|
||||||
.token.attr-name,
|
|
||||||
.token.string,
|
|
||||||
.token.char,
|
|
||||||
.token.builtin,
|
|
||||||
.token.inserted {
|
|
||||||
color: #690;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.operator,
|
|
||||||
.token.entity,
|
|
||||||
.token.url,
|
|
||||||
.language-css .token.string,
|
|
||||||
.style .token.string {
|
|
||||||
color: #a67f59;
|
|
||||||
background: hsla(0, 0%, 100%, .5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.atrule,
|
|
||||||
.token.attr-value,
|
|
||||||
.token.keyword {
|
|
||||||
color: #07a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.function {
|
|
||||||
color: #DD4A68;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.regex,
|
|
||||||
.token.important,
|
|
||||||
.token.variable {
|
|
||||||
color: #e90;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.important,
|
|
||||||
.token.bold {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.token.italic {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.token.entity {
|
|
||||||
cursor: help;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("colorpicker",function(a){function b(b,c){function d(a){var b=new tinymce.util.Color(a),c=b.toRgb();f.fromJSON({r:c.r,g:c.g,b:c.b,hex:b.toHex().substr(1)}),e(b.toHex())}function e(a){f.find("#preview")[0].getEl().style.background=a}var f=a.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:c,onchange:function(){var a=this.rgb();f&&(f.find("#r").value(a.r),f.find("#g").value(a.g),f.find("#b").value(a.b),f.find("#hex").value(this.value().substr(1)),e(this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var a,b,c=f.find("colorpicker")[0];return a=this.name(),b=this.value(),"hex"==a?(b="#"+b,d(b),void c.value(b)):(b={r:f.find("#r").value(),g:f.find("#g").value(),b:f.find("#b").value()},c.value(b),void d(b))}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){b("#"+this.toJSON().hex)}});d(c)}a.settings.color_picker_callback||(a.settings.color_picker_callback=b)});
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("contextmenu",function(a){var b,c=a.settings.contextmenu_never_use_native,d=function(a){return a.ctrlKey&&!c},e=function(){return tinymce.Env.mac&&tinymce.Env.webkit};a.on("mousedown",function(b){e()&&2===b.button&&!d(b)&&a.selection.isCollapsed()&&a.once("contextmenu",function(b){a.selection.placeCaretAt(b.clientX,b.clientY)})}),a.on("contextmenu",function(c){var e;if(!d(c)){if(c.preventDefault(),e=a.settings.contextmenu||"link image inserttable | cell row column deletetable",b)b.show();else{var f=[];tinymce.each(e.split(/[ ,]/),function(b){var c=a.menuItems[b];"|"==b&&(c={text:b}),c&&(c.shortcut="",f.push(c))});for(var g=0;g<f.length;g++)"|"==f[g].text&&(0!==g&&g!=f.length-1||f.splice(g,1));b=new tinymce.ui.Menu({items:f,context:"contextmenu",classes:"contextmenu"}).renderTo(),a.on("remove",function(){b.remove(),b=null})}var h={x:c.pageX,y:c.pageY};a.inline||(h=tinymce.DOM.getPos(a.getContentAreaContainer()),h.x+=c.clientX,h.y+=c.clientY),b.moveTo(h.x,h.y)}})});
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("directionality",function(a){function b(b){var c,d=a.dom,e=a.selection.getSelectedBlocks();e.length&&(c=d.getAttrib(e[0],"dir"),tinymce.each(e,function(a){d.getParent(a.parentNode,"*[dir='"+b+"']",d.getRoot())||(c!=b?d.setAttrib(a,"dir",b):d.setAttrib(a,"dir",null))}),a.nodeChanged())}function c(a){var b=[];return tinymce.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(c){b.push(c+"[dir="+a+"]")}),b.join(",")}a.addCommand("mceDirectionLTR",function(){b("ltr")}),a.addCommand("mceDirectionRTL",function(){b("rtl")}),a.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:c("ltr")}),a.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:c("rtl")})});
|
|
Before Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 329 B |
Before Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 342 B |
Before Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 323 B |
Before Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 350 B |
Before Width: | Height: | Size: 336 B |
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("emoticons",function(a,b){function c(){var a;return a='<table role="list" class="mce-grid">',tinymce.each(d,function(c){a+="<tr>",tinymce.each(c,function(c){var d=b+"/img/smiley-"+c+".gif";a+='<td><a href="#" data-mce-url="'+d+'" data-mce-alt="'+c+'" tabindex="-1" role="option" aria-label="'+c+'"><img src="'+d+'" style="width: 18px; height: 18px" role="presentation" /></a></td>'}),a+="</tr>"}),a+="</table>"}var d=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:c,onclick:function(b){var c=a.dom.getParent(b.target,"a");c&&(a.insertContent('<img src="'+c.getAttribute("data-mce-url")+'" alt="'+c.getAttribute("data-mce-alt")+'" />'),this.hide())}},tooltip:"Emoticons"})});
|
|
|
@ -1,8 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<h3>Custom dialog</h3>
|
|
||||||
Input some text: <input id="content">
|
|
||||||
<button onclick="top.tinymce.activeEditor.windowManager.getWindows()[0].close();">Close window</button>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("example",function(a,b){a.addButton("example",{text:"My button",icon:!1,onclick:function(){a.windowManager.open({title:"Example plugin",body:[{type:"textbox",name:"title",label:"Title"}],onsubmit:function(b){a.insertContent("Title: "+b.data.title)}})}}),a.addMenuItem("example",{text:"Example plugin",context:"tools",onclick:function(){a.windowManager.open({title:"TinyMCE site",url:b+"/dialog.html",width:600,height:400,buttons:[{text:"Insert",onclick:function(){var b=a.windowManager.getWindows()[0];a.insertContent(b.getContentWindow().document.getElementById("content").value),b.close()}},{text:"Close",onclick:"close"}]})}})});
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("example_dependency",function(){},["example"]);
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){var a=tinymce.DOM.getViewPort();return{x:a.x,y:a.y}}function d(a){scrollTo(a.x,a.y)}function e(){function e(){m.setStyle(p,"height",b().h-(o.clientHeight-p.clientHeight))}var n,o,p,q,r=document.body,s=document.documentElement;l=!l,o=a.getContainer(),n=o.style,p=a.getContentAreaContainer().firstChild,q=p.style,l?(k=c(),f=q.width,g=q.height,q.width=q.height="100%",i=n.width,j=n.height,n.width=n.height="",m.addClass(r,"mce-fullscreen"),m.addClass(s,"mce-fullscreen"),m.addClass(o,"mce-fullscreen"),m.bind(window,"resize",e),e(),h=e):(q.width=f,q.height=g,i&&(n.width=i),j&&(n.height=j),m.removeClass(r,"mce-fullscreen"),m.removeClass(s,"mce-fullscreen"),m.removeClass(o,"mce-fullscreen"),m.unbind(window,"resize",h),d(k)),a.fire("FullscreenStateChanged",{state:l})}var f,g,h,i,j,k,l=!1,m=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Ctrl+Shift+F","",e)}),a.on("remove",function(){h&&m.unbind(window,"resize",h)}),a.addCommand("mceFullScreen",e),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,onClick:function(){e(),a.focus()},onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Shift+F",onClick:e,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return l}})});
|
|
1
assets/js/tinymce/plugins/hr/plugin.min.js
vendored
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("hr",function(a){a.addCommand("InsertHorizontalRule",function(){a.execCommand("mceInsertContent",!1,"<hr />")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("importcss",function(a){function b(a){var b=tinymce.Env.cacheSuffix;return"string"==typeof a&&(a=a.replace("?"+b,"").replace("&"+b,"")),a}function c(b){var c=a.settings,d=c.skin!==!1?c.skin||"lightgray":!1;if(d){var e=c.skin_url;return e=e?a.documentBaseURI.toAbsolute(e):tinymce.baseURL+"/skins/"+d,b===e+"/content"+(a.inline?".inline":"")+".min.css"}return!1}function d(a){return"string"==typeof a?function(b){return-1!==b.indexOf(a)}:a instanceof RegExp?function(b){return a.test(b)}:a}function e(d,e){function f(a,d){var h,i=a.href;if(i=b(i),i&&e(i,d)&&!c(i)){n(a.imports,function(a){f(a,!0)});try{h=a.cssRules||a.rules}catch(j){}n(h,function(a){a.styleSheet?f(a.styleSheet,!0):a.selectorText&&n(a.selectorText.split(","),function(a){g.push(tinymce.trim(a))})})}}var g=[],h={};n(a.contentCSS,function(a){h[a]=!0}),e||(e=function(a,b){return b||h[a]});try{n(d.styleSheets,function(a){f(a)})}catch(i){}return g}function f(b){var c,d=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(b);if(d){var e=d[1],f=d[2].substr(1).split(".").join(" "),g=tinymce.makeMap("a,img");return d[1]?(c={title:b},a.schema.getTextBlockElements()[e]?c.block=e:a.schema.getBlockElements()[e]||g[e.toLowerCase()]?c.selector=e:c.inline=e):d[2]&&(c={inline:"span",title:b.substr(1),classes:f}),a.settings.importcss_merge_classes!==!1?c.classes=f:c.attributes={"class":f},c}}function g(a,b){return tinymce.util.Tools.grep(a,function(a){return!a.filter||a.filter(b)})}function h(a){return tinymce.util.Tools.map(a,function(a){return tinymce.util.Tools.extend({},a,{original:a,selectors:{},filter:d(a.filter),item:{text:a.title,menu:[]}})})}function i(a,b){return null===b||a.settings.importcss_exclusive!==!1}function j(b,c,d){return!(i(a,c)?b in d:b in c.selectors)}function k(b,c,d){i(a,c)?d[b]=!0:c.selectors[b]=!0}function l(b,c,d){var e,g=a.settings;return e=d&&d.selector_converter?d.selector_converter:g.importcss_selector_converter?g.importcss_selector_converter:f,e.call(b,c,d)}var m=this,n=tinymce.each;a.on("renderFormatsMenu",function(b){var c=a.settings,f={},i=d(c.importcss_selector_filter),o=b.control,p=h(c.importcss_groups),q=function(b,c){if(j(b,c,f)){k(b,c,f);var d=l(m,b,c);if(d){var e=d.name||tinymce.DOM.uniqueId();return a.formatter.register(e,d),tinymce.extend({},o.settings.itemDefaults,{text:d.title,format:e})}}return null};a.settings.importcss_append||o.items().remove(),n(e(b.doc||a.getDoc(),d(c.importcss_file_filter)),function(a){if(-1===a.indexOf(".mce-")&&(!i||i(a))){var b=g(p,a);if(b.length>0)tinymce.util.Tools.each(b,function(b){var c=q(a,b);c&&b.item.menu.push(c)});else{var c=q(a,null);c&&o.add(c)}}}),n(p,function(a){a.item.menu.length>0&&o.add(a.item)}),b.control.renderNew()}),m.convertSelectorToFormat=f});
|
|
|
@ -1 +0,0 @@
|
||||||
tinymce.PluginManager.add("insertdatetime",function(a){function b(b,c){function d(a,b){if(a=""+a,a.length<b)for(var c=0;c<b-a.length;c++)a="0"+a;return a}return c=c||new Date,b=b.replace("%D","%m/%d/%Y"),b=b.replace("%r","%I:%M:%S %p"),b=b.replace("%Y",""+c.getFullYear()),b=b.replace("%y",""+c.getYear()),b=b.replace("%m",d(c.getMonth()+1,2)),b=b.replace("%d",d(c.getDate(),2)),b=b.replace("%H",""+d(c.getHours(),2)),b=b.replace("%M",""+d(c.getMinutes(),2)),b=b.replace("%S",""+d(c.getSeconds(),2)),b=b.replace("%I",""+((c.getHours()+11)%12+1)),b=b.replace("%p",""+(c.getHours()<12?"AM":"PM")),b=b.replace("%B",""+a.translate(i[c.getMonth()])),b=b.replace("%b",""+a.translate(h[c.getMonth()])),b=b.replace("%A",""+a.translate(g[c.getDay()])),b=b.replace("%a",""+a.translate(f[c.getDay()])),b=b.replace("%%","%")}function c(c){var d=b(c);if(a.settings.insertdatetime_element){var e;e=b(/%[HMSIp]/.test(c)?"%Y-%m-%dT%H:%M":"%Y-%m-%d"),d='<time datetime="'+e+'">'+d+"</time>";var f=a.dom.getParent(a.selection.getStart(),"time");if(f)return void a.dom.setOuterHTML(f,d)}a.insertContent(d)}var d,e,f="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),g="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),h="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),i="January February March April May June July August September October November December".split(" "),j=[];a.addCommand("mceInsertDate",function(){c(a.getParam("insertdatetime_dateformat",a.translate("%Y-%m-%d")))}),a.addCommand("mceInsertTime",function(){c(a.getParam("insertdatetime_timeformat",a.translate("%H:%M:%S")))}),a.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){c(d||e)},menu:j}),tinymce.each(a.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(a){e||(e=a),j.push({text:b(a),onclick:function(){d=a,c(a)}})}),a.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:j,context:"insert"})});
|
|
|
@ -1 +0,0 @@
|
||||||
Deny from all
|
|
|
@ -1,116 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| AUTO-LOADER
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| This file specifies which systems should be loaded by default.
|
|
||||||
|
|
|
||||||
| In order to keep the framework as light-weight as possible only the
|
|
||||||
| absolute minimal resources are loaded by default. For example,
|
|
||||||
| the database is not connected to automatically since no assumption
|
|
||||||
| is made regarding whether you intend to use it. This file lets
|
|
||||||
| you globally define which systems you would like loaded with every
|
|
||||||
| request.
|
|
||||||
|
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Instructions
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| These are the things you can load automatically:
|
|
||||||
|
|
|
||||||
| 1. Packages
|
|
||||||
| 2. Libraries
|
|
||||||
| 3. Helper files
|
|
||||||
| 4. Custom config files
|
|
||||||
| 5. Language files
|
|
||||||
| 6. Models
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Auto-load Packges
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Prototype:
|
|
||||||
|
|
|
||||||
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$autoload['packages'] = array();
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Auto-load Libraries
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| These are the classes located in the system/libraries folder
|
|
||||||
| or in your application/libraries folder.
|
|
||||||
|
|
|
||||||
| Prototype:
|
|
||||||
|
|
|
||||||
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
|
|
||||||
*/
|
|
||||||
|
|
||||||
$autoload['libraries'] = array();
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Auto-load Helper Files
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Prototype:
|
|
||||||
|
|
|
||||||
| $autoload['helper'] = array('url', 'file');
|
|
||||||
*/
|
|
||||||
|
|
||||||
$autoload['helper'] = array();
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Auto-load Config files
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Prototype:
|
|
||||||
|
|
|
||||||
| $autoload['config'] = array('config1', 'config2');
|
|
||||||
|
|
|
||||||
| NOTE: This item is intended for use ONLY if you have created custom
|
|
||||||
| config files. Otherwise, leave it blank.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$autoload['config'] = array();
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Auto-load Language files
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Prototype:
|
|
||||||
|
|
|
||||||
| $autoload['language'] = array('lang1', 'lang2');
|
|
||||||
|
|
|
||||||
| NOTE: Do not include the "_lang" part of your file. For example
|
|
||||||
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$autoload['language'] = array();
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Auto-load Models
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Prototype:
|
|
||||||
|
|
|
||||||
| $autoload['model'] = array('model1', 'model2');
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$autoload['model'] = array();
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file autoload.php */
|
|
||||||
/* Location: ./application/config/autoload.php */
|
|
|
@ -1,362 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Base Site URL
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| URL to your CodeIgniter root. Typically this will be your base URL,
|
|
||||||
| WITH a trailing slash:
|
|
||||||
|
|
|
||||||
| http://example.com/
|
|
||||||
|
|
|
||||||
| If this is not set then CodeIgniter will guess the protocol, domain and
|
|
||||||
| path to your installation.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['base_url'] = '';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Index File
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Typically this will be your index.php file, unless you've renamed it to
|
|
||||||
| something else. If you are using mod_rewrite to remove the page set this
|
|
||||||
| variable so that it is blank.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['index_page'] = 'index.php';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| URI PROTOCOL
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This item determines which server global should be used to retrieve the
|
|
||||||
| URI string. The default setting of 'AUTO' works for most servers.
|
|
||||||
| If your links do not seem to work, try one of the other delicious flavors:
|
|
||||||
|
|
|
||||||
| 'AUTO' Default - auto detects
|
|
||||||
| 'PATH_INFO' Uses the PATH_INFO
|
|
||||||
| 'QUERY_STRING' Uses the QUERY_STRING
|
|
||||||
| 'REQUEST_URI' Uses the REQUEST_URI
|
|
||||||
| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['uri_protocol'] = 'QUERY_STRING';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| URL suffix
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
|
|
||||||
| For more information please see the user guide:
|
|
||||||
|
|
|
||||||
| http://codeigniter.com/user_guide/general/urls.html
|
|
||||||
*/
|
|
||||||
|
|
||||||
$config['url_suffix'] = '';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Default Language
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This determines which set of language files should be used. Make sure
|
|
||||||
| there is an available translation if you intend to use something other
|
|
||||||
| than english.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['language'] = 'english';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Default Character Set
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This determines which character set is used by default in various methods
|
|
||||||
| that require a character set to be provided.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['charset'] = 'UTF-8';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Enable/Disable System Hooks
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| If you would like to use the 'hooks' feature you must enable it by
|
|
||||||
| setting this variable to TRUE (boolean). See the user guide for details.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['enable_hooks'] = FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Class Extension Prefix
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This item allows you to set the filename/classname prefix when extending
|
|
||||||
| native libraries. For more information please see the user guide:
|
|
||||||
|
|
|
||||||
| http://codeigniter.com/user_guide/general/core_classes.html
|
|
||||||
| http://codeigniter.com/user_guide/general/creating_libraries.html
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['subclass_prefix'] = 'MY_';
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Allowed URL Characters
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This lets you specify with a regular expression which characters are permitted
|
|
||||||
| within your URLs. When someone tries to submit a URL with disallowed
|
|
||||||
| characters they will get a warning message.
|
|
||||||
|
|
|
||||||
| As a security measure you are STRONGLY encouraged to restrict URLs to
|
|
||||||
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
|
||||||
|
|
|
||||||
| Leave blank to allow all characters -- but only if you are insane.
|
|
||||||
|
|
|
||||||
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Enable Query Strings
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| By default CodeIgniter uses search-engine friendly segment based URLs:
|
|
||||||
| example.com/who/what/where/
|
|
||||||
|
|
|
||||||
| By default CodeIgniter enables access to the $_GET array. If for some
|
|
||||||
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
|
||||||
|
|
|
||||||
| You can optionally enable standard query string based URLs:
|
|
||||||
| example.com?who=me&what=something&where=here
|
|
||||||
|
|
|
||||||
| Options are: TRUE or FALSE (boolean)
|
|
||||||
|
|
|
||||||
| The other items let you set the query string 'words' that will
|
|
||||||
| invoke your controllers and its functions:
|
|
||||||
| example.com/index.php?c=controller&m=function
|
|
||||||
|
|
|
||||||
| Please note that some of the helpers won't work as expected when
|
|
||||||
| this feature is enabled, since CodeIgniter is designed primarily to
|
|
||||||
| use segment based URLs.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['allow_get_array'] = FALSE;
|
|
||||||
$config['enable_query_strings'] = FALSE;
|
|
||||||
$config['controller_trigger'] = 'c';
|
|
||||||
$config['function_trigger'] = 'm';
|
|
||||||
$config['directory_trigger'] = 'd'; // experimental not currently in use
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Error Logging Threshold
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| If you have enabled error logging, you can set an error threshold to
|
|
||||||
| determine what gets logged. Threshold options are:
|
|
||||||
| You can enable error logging by setting a threshold over zero. The
|
|
||||||
| threshold determines what gets logged. Threshold options are:
|
|
||||||
|
|
|
||||||
| 0 = Disables logging, Error logging TURNED OFF
|
|
||||||
| 1 = Error Messages (including PHP errors)
|
|
||||||
| 2 = Debug Messages
|
|
||||||
| 3 = Informational Messages
|
|
||||||
| 4 = All Messages
|
|
||||||
|
|
|
||||||
| For a live site you'll usually only enable Errors (1) to be logged otherwise
|
|
||||||
| your log files will fill up very fast.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['log_threshold'] = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Error Logging Directory Path
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Leave this BLANK unless you would like to set something other than the default
|
|
||||||
| application/logs/ folder. Use a full server path with trailing slash.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['log_path'] = '';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Date Format for Logs
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Each item that is logged has an associated date. You can use PHP date
|
|
||||||
| codes to set your own date formatting
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['log_date_format'] = 'Y-m-d H:i:s';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Cache Directory Path
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Leave this BLANK unless you would like to set something other than the default
|
|
||||||
| system/cache/ folder. Use a full server path with trailing slash.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['cache_path'] = '';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Encryption Key
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| If you use the Encryption class or the Session class you
|
|
||||||
| MUST set an encryption key. See the user guide for info.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['encryption_key'] = '';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Session Variables
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| 'sess_cookie_name' = the name you want for the cookie
|
|
||||||
| 'sess_expiration' = the number of SECONDS you want the session to last.
|
|
||||||
| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
|
|
||||||
| 'sess_expire_on_close' = Whether to cause the session to expire automatically
|
|
||||||
| when the browser window is closed
|
|
||||||
| 'sess_encrypt_cookie' = Whether to encrypt the cookie
|
|
||||||
| 'sess_use_database' = Whether to save the session data to a database
|
|
||||||
| 'sess_table_name' = The name of the session database table
|
|
||||||
| 'sess_match_ip' = Whether to match the user's IP address when reading the session data
|
|
||||||
| 'sess_match_useragent' = Whether to match the User Agent when reading the session data
|
|
||||||
| 'sess_time_to_update' = how many seconds between CI refreshing Session Information
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['sess_cookie_name'] = 'ci_session';
|
|
||||||
$config['sess_expiration'] = 7200;
|
|
||||||
$config['sess_expire_on_close'] = FALSE;
|
|
||||||
$config['sess_encrypt_cookie'] = FALSE;
|
|
||||||
$config['sess_use_database'] = FALSE;
|
|
||||||
$config['sess_table_name'] = 'ci_sessions';
|
|
||||||
$config['sess_match_ip'] = FALSE;
|
|
||||||
$config['sess_match_useragent'] = TRUE;
|
|
||||||
$config['sess_time_to_update'] = 300;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Cookie Related Variables
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| 'cookie_prefix' = Set a prefix if you need to avoid collisions
|
|
||||||
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
|
|
||||||
| 'cookie_path' = Typically will be a forward slash
|
|
||||||
| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['cookie_prefix'] = "";
|
|
||||||
$config['cookie_domain'] = "";
|
|
||||||
$config['cookie_path'] = "/";
|
|
||||||
$config['cookie_secure'] = FALSE;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Global XSS Filtering
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Determines whether the XSS filter is always active when GET, POST or
|
|
||||||
| COOKIE data is encountered
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['global_xss_filtering'] = FALSE;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Cross Site Request Forgery
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
|
|
||||||
| checked on a submitted form. If you are accepting user data, it is strongly
|
|
||||||
| recommended CSRF protection be enabled.
|
|
||||||
|
|
|
||||||
| 'csrf_token_name' = The token name
|
|
||||||
| 'csrf_cookie_name' = The cookie name
|
|
||||||
| 'csrf_expire' = The number in seconds the token should expire.
|
|
||||||
*/
|
|
||||||
$config['csrf_protection'] = FALSE;
|
|
||||||
$config['csrf_token_name'] = 'csrf_test_name';
|
|
||||||
$config['csrf_cookie_name'] = 'csrf_cookie_name';
|
|
||||||
$config['csrf_expire'] = 7200;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Output Compression
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Enables Gzip output compression for faster page loads. When enabled,
|
|
||||||
| the output class will test whether your server supports Gzip.
|
|
||||||
| Even if it does, however, not all browsers support compression
|
|
||||||
| so enable only if you are reasonably sure your visitors can handle it.
|
|
||||||
|
|
|
||||||
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
|
|
||||||
| means you are prematurely outputting something to your browser. It could
|
|
||||||
| even be a line of whitespace at the end of one of your scripts. For
|
|
||||||
| compression to work, nothing can be sent before the output buffer is called
|
|
||||||
| by the output class. Do not 'echo' any values with compression enabled.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['compress_output'] = FALSE;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Master Time Reference
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Options are 'local' or 'gmt'. This pref tells the system whether to use
|
|
||||||
| your server's local time as the master 'now' reference, or convert it to
|
|
||||||
| GMT. See the 'date helper' page of the user guide for information
|
|
||||||
| regarding date handling.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['time_reference'] = 'local';
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Rewrite PHP Short Tags
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| If your PHP installation does not have short tag support enabled CI
|
|
||||||
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
|
|
||||||
| in your view files. Options are TRUE or FALSE (boolean)
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['rewrite_short_tags'] = FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Reverse Proxy IPs
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| If your server is behind a reverse proxy, you must whitelist the proxy IP
|
|
||||||
| addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
|
|
||||||
| header in order to properly identify the visitor's IP address.
|
|
||||||
| Comma-delimited, e.g. '10.0.1.200,10.0.1.201'
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['proxy_ips'] = '';
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file config.php */
|
|
||||||
/* Location: ./application/config/config.php */
|
|
|
@ -1,41 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| File and Directory Modes
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| These prefs are used when checking and setting modes when working
|
|
||||||
| with the file system. The defaults are fine on servers with proper
|
|
||||||
| security, but you may wish (or even need) to change the values in
|
|
||||||
| certain environments (Apache running a separate process for each
|
|
||||||
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
|
|
||||||
| always be used to set the mode correctly.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
define('FILE_READ_MODE', 0644);
|
|
||||||
define('FILE_WRITE_MODE', 0666);
|
|
||||||
define('DIR_READ_MODE', 0755);
|
|
||||||
define('DIR_WRITE_MODE', 0777);
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| File Stream Modes
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| These modes are used when working with fopen()/popen()
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
define('FOPEN_READ', 'rb');
|
|
||||||
define('FOPEN_READ_WRITE', 'r+b');
|
|
||||||
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
|
|
||||||
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
|
|
||||||
define('FOPEN_WRITE_CREATE', 'ab');
|
|
||||||
define('FOPEN_READ_WRITE_CREATE', 'a+b');
|
|
||||||
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
|
|
||||||
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file constants.php */
|
|
||||||
/* Location: ./application/config/constants.php */
|
|
|
@ -1,69 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| DATABASE CONNECTIVITY SETTINGS
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| This file will contain the settings needed to access your database.
|
|
||||||
|
|
|
||||||
| For complete instructions please consult the 'Database Connection'
|
|
||||||
| page of the User Guide.
|
|
||||||
|
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| EXPLANATION OF VARIABLES
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| ['hostname'] The hostname of your database server.
|
|
||||||
| ['username'] The username used to connect to the database
|
|
||||||
| ['password'] The password used to connect to the database
|
|
||||||
| ['database'] The name of the database you want to connect to
|
|
||||||
| ['dbdriver'] The database type. ie: mysql. Currently supported:
|
|
||||||
mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
|
|
||||||
| ['dbprefix'] You can add an optional prefix, which will be added
|
|
||||||
| to the table name when using the Active Record class
|
|
||||||
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
|
|
||||||
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
|
|
||||||
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
|
|
||||||
| ['cachedir'] The path to the folder where cache files should be stored
|
|
||||||
| ['char_set'] The character set used in communicating with the database
|
|
||||||
| ['dbcollat'] The character collation used in communicating with the database
|
|
||||||
| NOTE: For MySQL and MySQLi databases, this setting is only used
|
|
||||||
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
|
|
||||||
| (and in table creation queries made with DB Forge).
|
|
||||||
| There is an incompatibility in PHP with mysql_real_escape_string() which
|
|
||||||
| can make your site vulnerable to SQL injection if you are using a
|
|
||||||
| multi-byte character set and are running versions lower than these.
|
|
||||||
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
|
|
||||||
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
|
|
||||||
| ['autoinit'] Whether or not to automatically initialize the database.
|
|
||||||
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
|
|
||||||
| - good for ensuring strict SQL while developing
|
|
||||||
|
|
|
||||||
| The $active_group variable lets you choose which connection group to
|
|
||||||
| make active. By default there is only one group (the 'default' group).
|
|
||||||
|
|
|
||||||
| The $active_record variables lets you determine whether or not to load
|
|
||||||
| the active record class
|
|
||||||
*/
|
|
||||||
|
|
||||||
$active_group = 'default';
|
|
||||||
$active_record = TRUE;
|
|
||||||
|
|
||||||
$db['default']['hostname'] = 'localhost';
|
|
||||||
$db['default']['username'] = '';
|
|
||||||
$db['default']['password'] = '';
|
|
||||||
$db['default']['database'] = '';
|
|
||||||
$db['default']['dbdriver'] = 'mysql';
|
|
||||||
$db['default']['dbprefix'] = '';
|
|
||||||
$db['default']['pconnect'] = TRUE;
|
|
||||||
$db['default']['db_debug'] = TRUE;
|
|
||||||
$db['default']['cache_on'] = FALSE;
|
|
||||||
$db['default']['cachedir'] = '';
|
|
||||||
$db['default']['char_set'] = 'utf8';
|
|
||||||
$db['default']['dbcollat'] = 'utf8_general_ci';
|
|
||||||
$db['default']['swap_pre'] = '';
|
|
||||||
$db['default']['autoinit'] = TRUE;
|
|
||||||
$db['default']['stricton'] = FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file database.php */
|
|
||||||
/* Location: ./application/config/database.php */
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
|
|
||||||
$_doctypes = array(
|
|
||||||
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
|
|
||||||
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
|
||||||
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
|
||||||
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
|
|
||||||
'html5' => '<!DOCTYPE html>',
|
|
||||||
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
|
|
||||||
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
|
|
||||||
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'
|
|
||||||
);
|
|
||||||
|
|
||||||
/* End of file doctypes.php */
|
|
||||||
/* Location: ./application/config/doctypes.php */
|
|
|
@ -1,64 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| Foreign Characters
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| This file contains an array of foreign characters for transliteration
|
|
||||||
| conversion used by the Text helper
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$foreign_characters = array(
|
|
||||||
'/ä|æ|ǽ/' => 'ae',
|
|
||||||
'/ö|œ/' => 'oe',
|
|
||||||
'/ü/' => 'ue',
|
|
||||||
'/Ä/' => 'Ae',
|
|
||||||
'/Ü/' => 'Ue',
|
|
||||||
'/Ö/' => 'Oe',
|
|
||||||
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A',
|
|
||||||
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a',
|
|
||||||
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
|
|
||||||
'/ç|ć|ĉ|ċ|č/' => 'c',
|
|
||||||
'/Ð|Ď|Đ/' => 'D',
|
|
||||||
'/ð|ď|đ/' => 'd',
|
|
||||||
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E',
|
|
||||||
'/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e',
|
|
||||||
'/Ĝ|Ğ|Ġ|Ģ/' => 'G',
|
|
||||||
'/ĝ|ğ|ġ|ģ/' => 'g',
|
|
||||||
'/Ĥ|Ħ/' => 'H',
|
|
||||||
'/ĥ|ħ/' => 'h',
|
|
||||||
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I',
|
|
||||||
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i',
|
|
||||||
'/Ĵ/' => 'J',
|
|
||||||
'/ĵ/' => 'j',
|
|
||||||
'/Ķ/' => 'K',
|
|
||||||
'/ķ/' => 'k',
|
|
||||||
'/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L',
|
|
||||||
'/ĺ|ļ|ľ|ŀ|ł/' => 'l',
|
|
||||||
'/Ñ|Ń|Ņ|Ň/' => 'N',
|
|
||||||
'/ñ|ń|ņ|ň|ʼn/' => 'n',
|
|
||||||
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O',
|
|
||||||
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o',
|
|
||||||
'/Ŕ|Ŗ|Ř/' => 'R',
|
|
||||||
'/ŕ|ŗ|ř/' => 'r',
|
|
||||||
'/Ś|Ŝ|Ş|Š/' => 'S',
|
|
||||||
'/ś|ŝ|ş|š|ſ/' => 's',
|
|
||||||
'/Ţ|Ť|Ŧ/' => 'T',
|
|
||||||
'/ţ|ť|ŧ/' => 't',
|
|
||||||
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U',
|
|
||||||
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u',
|
|
||||||
'/Ý|Ÿ|Ŷ/' => 'Y',
|
|
||||||
'/ý|ÿ|ŷ/' => 'y',
|
|
||||||
'/Ŵ/' => 'W',
|
|
||||||
'/ŵ/' => 'w',
|
|
||||||
'/Ź|Ż|Ž/' => 'Z',
|
|
||||||
'/ź|ż|ž/' => 'z',
|
|
||||||
'/Æ|Ǽ/' => 'AE',
|
|
||||||
'/ß/'=> 'ss',
|
|
||||||
'/IJ/' => 'IJ',
|
|
||||||
'/ij/' => 'ij',
|
|
||||||
'/Œ/' => 'OE',
|
|
||||||
'/ƒ/' => 'f'
|
|
||||||
);
|
|
||||||
|
|
||||||
/* End of file foreign_chars.php */
|
|
||||||
/* Location: ./application/config/foreign_chars.php */
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------------
|
|
||||||
| Hooks
|
|
||||||
| -------------------------------------------------------------------------
|
|
||||||
| This file lets you define "hooks" to extend CI without hacking the core
|
|
||||||
| files. Please see the user guide for info:
|
|
||||||
|
|
|
||||||
| http://codeigniter.com/user_guide/general/hooks.html
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file hooks.php */
|
|
||||||
/* Location: ./application/config/hooks.php */
|
|
|
@ -1,10 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>403 Forbidden</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p>Directory access is forbidden.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,41 +0,0 @@
|
||||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Enable/Disable Migrations
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Migrations are disabled by default but should be enabled
|
|
||||||
| whenever you intend to do a schema migration.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['migration_enabled'] = FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Migrations version
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This is used to set migration version that the file system should be on.
|
|
||||||
| If you run $this->migration->latest() this is the version that schema will
|
|
||||||
| be upgraded / downgraded to.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['migration_version'] = 0;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Migrations Path
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Path to your migrations folder.
|
|
||||||
| Typically, it will be within your application path.
|
|
||||||
| Also, writing permission is required within the migrations path.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['migration_path'] = APPPATH . 'migrations/';
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file migration.php */
|
|
||||||
/* Location: ./application/config/migration.php */
|
|
|
@ -1,106 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| MIME TYPES
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| This file contains an array of mime types. It is used by the
|
|
||||||
| Upload class to help identify allowed file types.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$mimes = array( 'hqx' => 'application/mac-binhex40',
|
|
||||||
'cpt' => 'application/mac-compactpro',
|
|
||||||
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
|
|
||||||
'bin' => 'application/macbinary',
|
|
||||||
'dms' => 'application/octet-stream',
|
|
||||||
'lha' => 'application/octet-stream',
|
|
||||||
'lzh' => 'application/octet-stream',
|
|
||||||
'exe' => array('application/octet-stream', 'application/x-msdownload'),
|
|
||||||
'class' => 'application/octet-stream',
|
|
||||||
'psd' => 'application/x-photoshop',
|
|
||||||
'so' => 'application/octet-stream',
|
|
||||||
'sea' => 'application/octet-stream',
|
|
||||||
'dll' => 'application/octet-stream',
|
|
||||||
'oda' => 'application/oda',
|
|
||||||
'pdf' => array('application/pdf', 'application/x-download'),
|
|
||||||
'ai' => 'application/postscript',
|
|
||||||
'eps' => 'application/postscript',
|
|
||||||
'ps' => 'application/postscript',
|
|
||||||
'smi' => 'application/smil',
|
|
||||||
'smil' => 'application/smil',
|
|
||||||
'mif' => 'application/vnd.mif',
|
|
||||||
'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
|
|
||||||
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'),
|
|
||||||
'wbxml' => 'application/wbxml',
|
|
||||||
'wmlc' => 'application/wmlc',
|
|
||||||
'dcr' => 'application/x-director',
|
|
||||||
'dir' => 'application/x-director',
|
|
||||||
'dxr' => 'application/x-director',
|
|
||||||
'dvi' => 'application/x-dvi',
|
|
||||||
'gtar' => 'application/x-gtar',
|
|
||||||
'gz' => 'application/x-gzip',
|
|
||||||
'php' => 'application/x-httpd-php',
|
|
||||||
'php4' => 'application/x-httpd-php',
|
|
||||||
'php3' => 'application/x-httpd-php',
|
|
||||||
'phtml' => 'application/x-httpd-php',
|
|
||||||
'phps' => 'application/x-httpd-php-source',
|
|
||||||
'js' => 'application/x-javascript',
|
|
||||||
'swf' => 'application/x-shockwave-flash',
|
|
||||||
'sit' => 'application/x-stuffit',
|
|
||||||
'tar' => 'application/x-tar',
|
|
||||||
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
|
|
||||||
'xhtml' => 'application/xhtml+xml',
|
|
||||||
'xht' => 'application/xhtml+xml',
|
|
||||||
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
|
|
||||||
'mid' => 'audio/midi',
|
|
||||||
'midi' => 'audio/midi',
|
|
||||||
'mpga' => 'audio/mpeg',
|
|
||||||
'mp2' => 'audio/mpeg',
|
|
||||||
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
|
|
||||||
'aif' => 'audio/x-aiff',
|
|
||||||
'aiff' => 'audio/x-aiff',
|
|
||||||
'aifc' => 'audio/x-aiff',
|
|
||||||
'ram' => 'audio/x-pn-realaudio',
|
|
||||||
'rm' => 'audio/x-pn-realaudio',
|
|
||||||
'rpm' => 'audio/x-pn-realaudio-plugin',
|
|
||||||
'ra' => 'audio/x-realaudio',
|
|
||||||
'rv' => 'video/vnd.rn-realvideo',
|
|
||||||
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
|
|
||||||
'bmp' => array('image/bmp', 'image/x-windows-bmp'),
|
|
||||||
'gif' => 'image/gif',
|
|
||||||
'jpeg' => array('image/jpeg', 'image/pjpeg'),
|
|
||||||
'jpg' => array('image/jpeg', 'image/pjpeg'),
|
|
||||||
'jpe' => array('image/jpeg', 'image/pjpeg'),
|
|
||||||
'png' => array('image/png', 'image/x-png'),
|
|
||||||
'tiff' => 'image/tiff',
|
|
||||||
'tif' => 'image/tiff',
|
|
||||||
'css' => 'text/css',
|
|
||||||
'html' => 'text/html',
|
|
||||||
'htm' => 'text/html',
|
|
||||||
'shtml' => 'text/html',
|
|
||||||
'txt' => 'text/plain',
|
|
||||||
'text' => 'text/plain',
|
|
||||||
'log' => array('text/plain', 'text/x-log'),
|
|
||||||
'rtx' => 'text/richtext',
|
|
||||||
'rtf' => 'text/rtf',
|
|
||||||
'xml' => 'text/xml',
|
|
||||||
'xsl' => 'text/xml',
|
|
||||||
'mpeg' => 'video/mpeg',
|
|
||||||
'mpg' => 'video/mpeg',
|
|
||||||
'mpe' => 'video/mpeg',
|
|
||||||
'qt' => 'video/quicktime',
|
|
||||||
'mov' => 'video/quicktime',
|
|
||||||
'avi' => 'video/x-msvideo',
|
|
||||||
'movie' => 'video/x-sgi-movie',
|
|
||||||
'doc' => 'application/msword',
|
|
||||||
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'),
|
|
||||||
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'),
|
|
||||||
'word' => array('application/msword', 'application/octet-stream'),
|
|
||||||
'xl' => 'application/excel',
|
|
||||||
'eml' => 'message/rfc822',
|
|
||||||
'json' => array('application/json', 'text/json')
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file mimes.php */
|
|
||||||
/* Location: ./application/config/mimes.php */
|
|
|
@ -1,17 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------------
|
|
||||||
| Profiler Sections
|
|
||||||
| -------------------------------------------------------------------------
|
|
||||||
| This file lets you determine whether or not various sections of Profiler
|
|
||||||
| data are displayed when the Profiler is enabled.
|
|
||||||
| Please see the user guide for info:
|
|
||||||
|
|
|
||||||
| http://codeigniter.com/user_guide/general/profiling.html
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file profiler.php */
|
|
||||||
/* Location: ./application/config/profiler.php */
|
|
|
@ -1,48 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------------
|
|
||||||
| URI ROUTING
|
|
||||||
| -------------------------------------------------------------------------
|
|
||||||
| This file lets you re-map URI requests to specific controller functions.
|
|
||||||
|
|
|
||||||
| Typically there is a one-to-one relationship between a URL string
|
|
||||||
| and its corresponding controller class/method. The segments in a
|
|
||||||
| URL normally follow this pattern:
|
|
||||||
|
|
|
||||||
| example.com/class/method/id/
|
|
||||||
|
|
|
||||||
| In some instances, however, you may want to remap this relationship
|
|
||||||
| so that a different class/function is called than the one
|
|
||||||
| corresponding to the URL.
|
|
||||||
|
|
|
||||||
| Please see the user guide for complete details:
|
|
||||||
|
|
|
||||||
| http://codeigniter.com/user_guide/general/routing.html
|
|
||||||
|
|
|
||||||
| -------------------------------------------------------------------------
|
|
||||||
| RESERVED ROUTES
|
|
||||||
| -------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| There area two reserved routes:
|
|
||||||
|
|
|
||||||
| $route['default_controller'] = 'welcome';
|
|
||||||
|
|
|
||||||
| This route indicates which controller class should be loaded if the
|
|
||||||
| URI contains no data. In the above example, the "welcome" class
|
|
||||||
| would be loaded.
|
|
||||||
|
|
|
||||||
| $route['404_override'] = 'errors/page_missing';
|
|
||||||
|
|
|
||||||
| This route will tell the Router what URI segments to use if those provided
|
|
||||||
| in the URL cannot be matched to a valid route.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$route['default_controller'] = "uploader";
|
|
||||||
$route['404_override'] = '';
|
|
||||||
|
|
||||||
$route['(:any)'] = "uploader/$1";
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file routes.php */
|
|
||||||
/* Location: ./application/config/routes.php */
|
|
|
@ -1,66 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| SMILEYS
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| This file contains an array of smileys for use with the emoticon helper.
|
|
||||||
| Individual images can be used to replace multiple simileys. For example:
|
|
||||||
| :-) and :) use the same image replacement.
|
|
||||||
|
|
|
||||||
| Please see user guide for more info:
|
|
||||||
| http://codeigniter.com/user_guide/helpers/smiley_helper.html
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$smileys = array(
|
|
||||||
|
|
||||||
// smiley image name width height alt
|
|
||||||
|
|
||||||
':-)' => array('grin.gif', '19', '19', 'grin'),
|
|
||||||
':lol:' => array('lol.gif', '19', '19', 'LOL'),
|
|
||||||
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
|
|
||||||
':)' => array('smile.gif', '19', '19', 'smile'),
|
|
||||||
';-)' => array('wink.gif', '19', '19', 'wink'),
|
|
||||||
';)' => array('wink.gif', '19', '19', 'wink'),
|
|
||||||
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
|
|
||||||
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
|
|
||||||
':-S' => array('confused.gif', '19', '19', 'confused'),
|
|
||||||
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
|
|
||||||
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
|
|
||||||
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
|
|
||||||
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
|
|
||||||
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
|
|
||||||
':P' => array('raspberry.gif', '19', '19', 'raspberry'),
|
|
||||||
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
|
|
||||||
':long:' => array('longface.gif', '19', '19', 'long face'),
|
|
||||||
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
|
|
||||||
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
|
|
||||||
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
|
|
||||||
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
|
|
||||||
':down:' => array('downer.gif', '19', '19', 'downer'),
|
|
||||||
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
|
|
||||||
':sick:' => array('sick.gif', '19', '19', 'sick'),
|
|
||||||
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
|
|
||||||
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
|
|
||||||
'>:(' => array('mad.gif', '19', '19', 'mad'),
|
|
||||||
':mad:' => array('mad.gif', '19', '19', 'mad'),
|
|
||||||
'>:-(' => array('angry.gif', '19', '19', 'angry'),
|
|
||||||
':angry:' => array('angry.gif', '19', '19', 'angry'),
|
|
||||||
':zip:' => array('zip.gif', '19', '19', 'zipper'),
|
|
||||||
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
|
|
||||||
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
|
|
||||||
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
|
|
||||||
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
|
|
||||||
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
|
|
||||||
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
|
|
||||||
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
|
|
||||||
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
|
|
||||||
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
|
|
||||||
':snake:' => array('snake.gif', '19', '19', 'snake'),
|
|
||||||
':exclaim:' => array('exclaim.gif', '19', '19', 'excaim'),
|
|
||||||
':question:' => array('question.gif', '19', '19', 'question') // no comma after last item
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
/* End of file smileys.php */
|
|
||||||
/* Location: ./application/config/smileys.php */
|
|
|
@ -1,178 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/*
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| USER AGENT TYPES
|
|
||||||
| -------------------------------------------------------------------
|
|
||||||
| This file contains four arrays of user agent data. It is used by the
|
|
||||||
| User Agent Class to help identify browser, platform, robot, and
|
|
||||||
| mobile device data. The array keys are used to identify the device
|
|
||||||
| and the array values are used to set the actual name of the item.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$platforms = array (
|
|
||||||
'windows nt 6.0' => 'Windows Longhorn',
|
|
||||||
'windows nt 5.2' => 'Windows 2003',
|
|
||||||
'windows nt 5.0' => 'Windows 2000',
|
|
||||||
'windows nt 5.1' => 'Windows XP',
|
|
||||||
'windows nt 4.0' => 'Windows NT 4.0',
|
|
||||||
'winnt4.0' => 'Windows NT 4.0',
|
|
||||||
'winnt 4.0' => 'Windows NT',
|
|
||||||
'winnt' => 'Windows NT',
|
|
||||||
'windows 98' => 'Windows 98',
|
|
||||||
'win98' => 'Windows 98',
|
|
||||||
'windows 95' => 'Windows 95',
|
|
||||||
'win95' => 'Windows 95',
|
|
||||||
'windows' => 'Unknown Windows OS',
|
|
||||||
'os x' => 'Mac OS X',
|
|
||||||
'ppc mac' => 'Power PC Mac',
|
|
||||||
'freebsd' => 'FreeBSD',
|
|
||||||
'ppc' => 'Macintosh',
|
|
||||||
'linux' => 'Linux',
|
|
||||||
'debian' => 'Debian',
|
|
||||||
'sunos' => 'Sun Solaris',
|
|
||||||
'beos' => 'BeOS',
|
|
||||||
'apachebench' => 'ApacheBench',
|
|
||||||
'aix' => 'AIX',
|
|
||||||
'irix' => 'Irix',
|
|
||||||
'osf' => 'DEC OSF',
|
|
||||||
'hp-ux' => 'HP-UX',
|
|
||||||
'netbsd' => 'NetBSD',
|
|
||||||
'bsdi' => 'BSDi',
|
|
||||||
'openbsd' => 'OpenBSD',
|
|
||||||
'gnu' => 'GNU/Linux',
|
|
||||||
'unix' => 'Unknown Unix OS'
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// The order of this array should NOT be changed. Many browsers return
|
|
||||||
// multiple browser types so we want to identify the sub-type first.
|
|
||||||
$browsers = array(
|
|
||||||
'Flock' => 'Flock',
|
|
||||||
'Chrome' => 'Chrome',
|
|
||||||
'Opera' => 'Opera',
|
|
||||||
'MSIE' => 'Internet Explorer',
|
|
||||||
'Internet Explorer' => 'Internet Explorer',
|
|
||||||
'Shiira' => 'Shiira',
|
|
||||||
'Firefox' => 'Firefox',
|
|
||||||
'Chimera' => 'Chimera',
|
|
||||||
'Phoenix' => 'Phoenix',
|
|
||||||
'Firebird' => 'Firebird',
|
|
||||||
'Camino' => 'Camino',
|
|
||||||
'Netscape' => 'Netscape',
|
|
||||||
'OmniWeb' => 'OmniWeb',
|
|
||||||
'Safari' => 'Safari',
|
|
||||||
'Mozilla' => 'Mozilla',
|
|
||||||
'Konqueror' => 'Konqueror',
|
|
||||||
'icab' => 'iCab',
|
|
||||||
'Lynx' => 'Lynx',
|
|
||||||
'Links' => 'Links',
|
|
||||||
'hotjava' => 'HotJava',
|
|
||||||
'amaya' => 'Amaya',
|
|
||||||
'IBrowse' => 'IBrowse'
|
|
||||||
);
|
|
||||||
|
|
||||||
$mobiles = array(
|
|
||||||
// legacy array, old values commented out
|
|
||||||
'mobileexplorer' => 'Mobile Explorer',
|
|
||||||
// 'openwave' => 'Open Wave',
|
|
||||||
// 'opera mini' => 'Opera Mini',
|
|
||||||
// 'operamini' => 'Opera Mini',
|
|
||||||
// 'elaine' => 'Palm',
|
|
||||||
'palmsource' => 'Palm',
|
|
||||||
// 'digital paths' => 'Palm',
|
|
||||||
// 'avantgo' => 'Avantgo',
|
|
||||||
// 'xiino' => 'Xiino',
|
|
||||||
'palmscape' => 'Palmscape',
|
|
||||||
// 'nokia' => 'Nokia',
|
|
||||||
// 'ericsson' => 'Ericsson',
|
|
||||||
// 'blackberry' => 'BlackBerry',
|
|
||||||
// 'motorola' => 'Motorola'
|
|
||||||
|
|
||||||
// Phones and Manufacturers
|
|
||||||
'motorola' => "Motorola",
|
|
||||||
'nokia' => "Nokia",
|
|
||||||
'palm' => "Palm",
|
|
||||||
'iphone' => "Apple iPhone",
|
|
||||||
'ipad' => "iPad",
|
|
||||||
'ipod' => "Apple iPod Touch",
|
|
||||||
'sony' => "Sony Ericsson",
|
|
||||||
'ericsson' => "Sony Ericsson",
|
|
||||||
'blackberry' => "BlackBerry",
|
|
||||||
'cocoon' => "O2 Cocoon",
|
|
||||||
'blazer' => "Treo",
|
|
||||||
'lg' => "LG",
|
|
||||||
'amoi' => "Amoi",
|
|
||||||
'xda' => "XDA",
|
|
||||||
'mda' => "MDA",
|
|
||||||
'vario' => "Vario",
|
|
||||||
'htc' => "HTC",
|
|
||||||
'samsung' => "Samsung",
|
|
||||||
'sharp' => "Sharp",
|
|
||||||
'sie-' => "Siemens",
|
|
||||||
'alcatel' => "Alcatel",
|
|
||||||
'benq' => "BenQ",
|
|
||||||
'ipaq' => "HP iPaq",
|
|
||||||
'mot-' => "Motorola",
|
|
||||||
'playstation portable' => "PlayStation Portable",
|
|
||||||
'hiptop' => "Danger Hiptop",
|
|
||||||
'nec-' => "NEC",
|
|
||||||
'panasonic' => "Panasonic",
|
|
||||||
'philips' => "Philips",
|
|
||||||
'sagem' => "Sagem",
|
|
||||||
'sanyo' => "Sanyo",
|
|
||||||
'spv' => "SPV",
|
|
||||||
'zte' => "ZTE",
|
|
||||||
'sendo' => "Sendo",
|
|
||||||
|
|
||||||
// Operating Systems
|
|
||||||
'symbian' => "Symbian",
|
|
||||||
'SymbianOS' => "SymbianOS",
|
|
||||||
'elaine' => "Palm",
|
|
||||||
'palm' => "Palm",
|
|
||||||
'series60' => "Symbian S60",
|
|
||||||
'windows ce' => "Windows CE",
|
|
||||||
|
|
||||||
// Browsers
|
|
||||||
'obigo' => "Obigo",
|
|
||||||
'netfront' => "Netfront Browser",
|
|
||||||
'openwave' => "Openwave Browser",
|
|
||||||
'mobilexplorer' => "Mobile Explorer",
|
|
||||||
'operamini' => "Opera Mini",
|
|
||||||
'opera mini' => "Opera Mini",
|
|
||||||
|
|
||||||
// Other
|
|
||||||
'digital paths' => "Digital Paths",
|
|
||||||
'avantgo' => "AvantGo",
|
|
||||||
'xiino' => "Xiino",
|
|
||||||
'novarra' => "Novarra Transcoder",
|
|
||||||
'vodafone' => "Vodafone",
|
|
||||||
'docomo' => "NTT DoCoMo",
|
|
||||||
'o2' => "O2",
|
|
||||||
|
|
||||||
// Fallback
|
|
||||||
'mobile' => "Generic Mobile",
|
|
||||||
'wireless' => "Generic Mobile",
|
|
||||||
'j2me' => "Generic Mobile",
|
|
||||||
'midp' => "Generic Mobile",
|
|
||||||
'cldc' => "Generic Mobile",
|
|
||||||
'up.link' => "Generic Mobile",
|
|
||||||
'up.browser' => "Generic Mobile",
|
|
||||||
'smartphone' => "Generic Mobile",
|
|
||||||
'cellphone' => "Generic Mobile"
|
|
||||||
);
|
|
||||||
|
|
||||||
// There are hundreds of bots but these are the most common.
|
|
||||||
$robots = array(
|
|
||||||
'googlebot' => 'Googlebot',
|
|
||||||
'msnbot' => 'MSNBot',
|
|
||||||
'slurp' => 'Inktomi Slurp',
|
|
||||||
'yahoo' => 'Yahoo',
|
|
||||||
'askjeeves' => 'AskJeeves',
|
|
||||||
'fastcrawler' => 'FastCrawler',
|
|
||||||
'infoseek' => 'InfoSeek Robot 1.0',
|
|
||||||
'lycos' => 'Lycos'
|
|
||||||
);
|
|
||||||
|
|
||||||
/* End of file user_agents.php */
|
|
||||||
/* Location: ./application/config/user_agents.php */
|
|
|
@ -1,10 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>403 Forbidden</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p>Directory access is forbidden.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,62 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>404 Page Not Found</title>
|
|
||||||
<style type="text/css">
|
|
||||||
|
|
||||||
::selection{ background-color: #E13300; color: white; }
|
|
||||||
::moz-selection{ background-color: #E13300; color: white; }
|
|
||||||
::webkit-selection{ background-color: #E13300; color: white; }
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: #fff;
|
|
||||||
margin: 40px;
|
|
||||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
|
||||||
color: #4F5155;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #003399;
|
|
||||||
background-color: transparent;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
color: #444;
|
|
||||||
background-color: transparent;
|
|
||||||
border-bottom: 1px solid #D0D0D0;
|
|
||||||
font-size: 19px;
|
|
||||||
font-weight: normal;
|
|
||||||
margin: 0 0 14px 0;
|
|
||||||
padding: 14px 15px 10px 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
|
||||||
font-size: 12px;
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
border: 1px solid #D0D0D0;
|
|
||||||
color: #002166;
|
|
||||||
display: block;
|
|
||||||
margin: 14px 0 14px 0;
|
|
||||||
padding: 12px 10px 12px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#container {
|
|
||||||
margin: 10px;
|
|
||||||
border: 1px solid #D0D0D0;
|
|
||||||
-webkit-box-shadow: 0 0 8px #D0D0D0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 12px 15px 12px 15px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="container">
|
|
||||||
<h1><?php echo $heading; ?></h1>
|
|
||||||
<?php echo $message; ?>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,62 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Database Error</title>
|
|
||||||
<style type="text/css">
|
|
||||||
|
|
||||||
::selection{ background-color: #E13300; color: white; }
|
|
||||||
::moz-selection{ background-color: #E13300; color: white; }
|
|
||||||
::webkit-selection{ background-color: #E13300; color: white; }
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: #fff;
|
|
||||||
margin: 40px;
|
|
||||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
|
||||||
color: #4F5155;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #003399;
|
|
||||||
background-color: transparent;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
color: #444;
|
|
||||||
background-color: transparent;
|
|
||||||
border-bottom: 1px solid #D0D0D0;
|
|
||||||
font-size: 19px;
|
|
||||||
font-weight: normal;
|
|
||||||
margin: 0 0 14px 0;
|
|
||||||
padding: 14px 15px 10px 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
|
||||||
font-size: 12px;
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
border: 1px solid #D0D0D0;
|
|
||||||
color: #002166;
|
|
||||||
display: block;
|
|
||||||
margin: 14px 0 14px 0;
|
|
||||||
padding: 12px 10px 12px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#container {
|
|
||||||
margin: 10px;
|
|
||||||
border: 1px solid #D0D0D0;
|
|
||||||
-webkit-box-shadow: 0 0 8px #D0D0D0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 12px 15px 12px 15px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="container">
|
|
||||||
<h1><?php echo $heading; ?></h1>
|
|
||||||
<?php echo $message; ?>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,62 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Error</title>
|
|
||||||
<style type="text/css">
|
|
||||||
|
|
||||||
::selection{ background-color: #E13300; color: white; }
|
|
||||||
::moz-selection{ background-color: #E13300; color: white; }
|
|
||||||
::webkit-selection{ background-color: #E13300; color: white; }
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: #fff;
|
|
||||||
margin: 40px;
|
|
||||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
|
||||||
color: #4F5155;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #003399;
|
|
||||||
background-color: transparent;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
color: #444;
|
|
||||||
background-color: transparent;
|
|
||||||
border-bottom: 1px solid #D0D0D0;
|
|
||||||
font-size: 19px;
|
|
||||||
font-weight: normal;
|
|
||||||
margin: 0 0 14px 0;
|
|
||||||
padding: 14px 15px 10px 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
|
||||||
font-size: 12px;
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
border: 1px solid #D0D0D0;
|
|
||||||
color: #002166;
|
|
||||||
display: block;
|
|
||||||
margin: 14px 0 14px 0;
|
|
||||||
padding: 12px 10px 12px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#container {
|
|
||||||
margin: 10px;
|
|
||||||
border: 1px solid #D0D0D0;
|
|
||||||
-webkit-box-shadow: 0 0 8px #D0D0D0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 12px 15px 12px 15px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="container">
|
|
||||||
<h1><?php echo $heading; ?></h1>
|
|
||||||
<?php echo $message; ?>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
|
||||||
|
|
||||||
<h4>A PHP Error was encountered</h4>
|
|
||||||
|
|
||||||
<p>Severity: <?php echo $severity; ?></p>
|
|
||||||
<p>Message: <?php echo $message; ?></p>
|
|
||||||
<p>Filename: <?php echo $filepath; ?></p>
|
|
||||||
<p>Line Number: <?php echo $line; ?></p>
|
|
||||||
|
|
||||||
</div>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>403 Forbidden</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p>Directory access is forbidden.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>403 Forbidden</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p>Directory access is forbidden.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>403 Forbidden</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p>Directory access is forbidden.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>403 Forbidden</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p>Directory access is forbidden.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,24 +0,0 @@
|
||||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
|
||||||
|
|
||||||
$lang['imglib_source_image_required'] = "Vous devez spécifier une image source dans vos préférences.";
|
|
||||||
$lang['imglib_gd_required'] = "La librairie GD est requise pour cette fonctionnalité.";
|
|
||||||
$lang['imglib_gd_required_for_props'] = "Votre serveur doit supporter la librairie d\'images GD pour déterminer les propriétés de l\'image";
|
|
||||||
$lang['imglib_unsupported_imagecreate'] = "Votre serveur ne dispose pas de la fonction GD nécessaire pour traiter ce type d\'image.";
|
|
||||||
$lang['imglib_gif_not_supported'] = "Le format GIF est souvent inutilisable du fait de restrictions de licence. Vous devriez utiliser le format JPG ou PNG à la place.";
|
|
||||||
$lang['imglib_jpg_not_supported'] = "Le format JPG n\'est pas supporté.";
|
|
||||||
$lang['imglib_png_not_supported'] = "Le format PNG n\'est pas supporté.";
|
|
||||||
$lang['imglib_jpg_or_png_required'] = "Le protocole de redimensionnement spécifié dans vos préférences ne fonctionne qu\'avec les formats d\'image JPG ou PNG.";
|
|
||||||
$lang['imglib_copy_error'] = "Une erreur est survenue lors du remplacement du fichier. Veuillez vérifier les permissions d\'écriture de votre répertoire.";
|
|
||||||
$lang['imglib_rotate_unsupported'] = "Votre serveur ne supporte apparemment pas la rotation d\'images.";
|
|
||||||
$lang['imglib_libpath_invalid'] = "Le chemin d\'accès à votre librairie de traitement d\'image n\'est pas correct. Veuillez indiquer le chemin correct dans vos préférences.";
|
|
||||||
$lang['imglib_image_process_failed'] = "Le traitement de l\'image a échoué. Veuillez vérifier que votre serveur supporte le protocole choisi et que le chemin d\'accès à votre librairie de traitement d\'image est correct.";
|
|
||||||
$lang['imglib_rotation_angle_required'] = "Un angle de rotation doit être indiqué pour effectuer cette transformation sur l\'image.";
|
|
||||||
$lang['imglib_writing_failed_gif'] = "Image GIF ";
|
|
||||||
$lang['imglib_invalid_path'] = "Le chemin d\'accès à l\'image est incorrect.";
|
|
||||||
$lang['imglib_copy_failed'] = "Le processus de copie d\'image a échoué.";
|
|
||||||
$lang['imglib_missing_font'] = "Impossible de trouver une police de caractères utilisable.";
|
|
||||||
$lang['imglib_save_failed'] = "Impossible d\'enregistrer l\'image. Vérifiez que l\'image et le dossier disposent des droits d\'écriture.";
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file imglib_lang.php */
|
|
||||||
/* Location: ./application/language/french/imglib_lang.php */
|
|
|
@ -1,10 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>403 Forbidden</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p>Directory access is forbidden.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$lang['jb_blankpage_message'] = "Le processus de téléchargement n\'a pas encore commencé"; // Google translate))
|
|
||||||
|
|
||||||
/* End of file jbstrings_lang.php */
|
|
||||||
/* Location: ./application/language/french/jbstrings_lang.php */
|
|
|
@ -1,22 +0,0 @@
|
||||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
|
||||||
|
|
||||||
$lang['upload_userfile_not_set'] = "Impossible de trouver une variable de type POST nommée userfile.";
|
|
||||||
$lang['upload_file_exceeds_limit'] = "Le fichier envoyé dépasse la taille limite définie dans votre fichier de configuration PHP.";
|
|
||||||
$lang['upload_file_exceeds_form_limit'] = "Le fichier chargé dépasse la taille limite définie par le formulaire de soumission.";
|
|
||||||
$lang['upload_file_partial'] = "Le fichier n\'a été que partiellement envoyé.";
|
|
||||||
$lang['upload_no_temp_directory'] = "Le dossier temporaire manque.";
|
|
||||||
$lang['upload_unable_to_write_file'] = "Incapable d\'écrire le fichier sur disque.";
|
|
||||||
$lang['upload_stopped_by_extension'] = "Le chargement du fichier a été arrêté par une extension.";
|
|
||||||
$lang['upload_no_file_selected'] = "Vous n\'avez pas sélectionné de fichier à envoyer.";
|
|
||||||
$lang['upload_invalid_filetype'] = "Le type de fichier que vous tentez d\'envoyer n\'est pas autorisé.";
|
|
||||||
$lang['upload_invalid_filesize'] = "Le fichier que vous tentez d\'envoyer est plus gros que la taille autorisée.";
|
|
||||||
$lang['upload_invalid_dimensions'] = "L\'image que vous tentez d\'envoyer dépasse les valeurs maximales autorisées pour la hauteur ou la largeur.";
|
|
||||||
$lang['upload_destination_error'] = "Une erreur est survenue lors du déplacement du fichier envoyé vers sa destination finale.";
|
|
||||||
$lang['upload_no_filepath'] = "Le chemin de destination semble invalide.";
|
|
||||||
$lang['upload_no_file_types'] = "Vous n\'avez pas spécifié les types de fichier autorisés.";
|
|
||||||
$lang['upload_bad_filename'] = "Un fichier avec le même nom que celui que vous avez envoyé existe déjà sur le serveur.";
|
|
||||||
$lang['upload_not_writable'] = "Le répertoire de destination ne semble pas être accessible en écriture.";
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file upload_lang.php */
|
|
||||||
/* Location: ./application/language/french/upload_lang.php */
|
|
|
@ -1,24 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$lang['imglib_source_image_required'] = "You must specify a source image in your preferences.";
|
|
||||||
$lang['imglib_gd_required'] = "The GD image library is required for this feature.";
|
|
||||||
$lang['imglib_gd_required_for_props'] = "Your server must support the GD image library in order to determine the image properties.";
|
|
||||||
$lang['imglib_unsupported_imagecreate'] = "Your server does not support the GD function required to process this type of image.";
|
|
||||||
$lang['imglib_gif_not_supported'] = "GIF images are often not supported due to licensing restrictions. You may have to use JPG or PNG images instead.";
|
|
||||||
$lang['imglib_jpg_not_supported'] = "JPG images are not supported.";
|
|
||||||
$lang['imglib_png_not_supported'] = "PNG images are not supported.";
|
|
||||||
$lang['imglib_jpg_or_png_required'] = "The image resize protocol specified in your preferences only works with JPEG or PNG image types.";
|
|
||||||
$lang['imglib_copy_error'] = "An error was encountered while attempting to replace the file. Please make sure your file directory is writable.";
|
|
||||||
$lang['imglib_rotate_unsupported'] = "Image rotation does not appear to be supported by your server.";
|
|
||||||
$lang['imglib_libpath_invalid'] = "The path to your image library is not correct. Please set the correct path in your image preferences.";
|
|
||||||
$lang['imglib_image_process_failed'] = "Image processing failed. Please verify that your server supports the chosen protocol and that the path to your image library is correct.";
|
|
||||||
$lang['imglib_rotation_angle_required'] = "An angle of rotation is required to rotate the image.";
|
|
||||||
$lang['imglib_writing_failed_gif'] = "GIF image.";
|
|
||||||
$lang['imglib_invalid_path'] = "The path to the image is not correct.";
|
|
||||||
$lang['imglib_copy_failed'] = "The image copy routine failed.";
|
|
||||||
$lang['imglib_missing_font'] = "Unable to find a font to use.";
|
|
||||||
$lang['imglib_save_failed'] = "Unable to save the image. Please make sure the image and file directory are writable.";
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file imglib_lang.php */
|
|
||||||
/* Location: ./system/language/english/imglib_lang.php */
|
|
|
@ -1,10 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>403 Forbidden</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p>Directory access is forbidden.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$lang['jb_blankpage_message'] = "Процесс загрузки еще не начался, либо начался и еще не завершился, либо просто нет связи с удаленным сервером.";
|
|
||||||
|
|
||||||
/* End of file jbstrings_lang.php */
|
|
||||||
/* Location: ./application/language/russian/jbstrings_lang.php */
|
|
|
@ -1,22 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$lang['upload_userfile_not_set'] = "Не найдена переменная POST[userfile].";
|
|
||||||
$lang['upload_file_exceeds_limit'] = "Размер файла слишком большой для загрузки.";
|
|
||||||
$lang['upload_file_exceeds_form_limit'] = "Размер файла слишком большой.";
|
|
||||||
$lang['upload_file_partial'] = "Файл загрузился неполностью.";
|
|
||||||
$lang['upload_no_temp_directory'] = "Внутренняя ошибка. Проблемы с временной папкой.";
|
|
||||||
$lang['upload_unable_to_write_file'] = "Внутренняя ошибка. Проблемы с записью на диск.";
|
|
||||||
$lang['upload_stopped_by_extension'] = "Загрузка прервана по неизвестной причине.";
|
|
||||||
$lang['upload_no_file_selected'] = "Пожалуйста, выберите файл для загрузки.";
|
|
||||||
$lang['upload_invalid_filetype'] = "Тип файла запрещен для загрузки.";
|
|
||||||
$lang['upload_invalid_filesize'] = "Ваш файл больше разрешенного размера.";
|
|
||||||
$lang['upload_invalid_dimensions'] = "Изображение которое вы пытаетесь загрузить превосходит максимально допустимые ширину/высоту.";
|
|
||||||
$lang['upload_destination_error'] = "Внутренняя ошибка. Проблема с переносом файла в конечную папку.";
|
|
||||||
$lang['upload_no_filepath'] = "Внутренняя ошибка. Указанный путь для загрузки неверен.";
|
|
||||||
$lang['upload_no_file_types'] = "Внутренняя ошибка. Не указан перечень разрешенных для загрузки типов.";
|
|
||||||
$lang['upload_bad_filename'] = "Файл уже существует.";
|
|
||||||
$lang['upload_not_writable'] = "Внутренняя ошибка. Конечная папка не представляется разрешенной для записи.";
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file upload_lang.php */
|
|
||||||
/* Location: ./application/language/russian/upload_lang.php */
|
|
|
@ -1,10 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>403 Forbidden</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<p>Directory access is forbidden.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,205 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
*---------------------------------------------------------------
|
|
||||||
* APPLICATION ENVIRONMENT
|
|
||||||
*---------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* You can load different configurations depending on your
|
|
||||||
* current environment. Setting the environment also influences
|
|
||||||
* things like logging and error reporting.
|
|
||||||
*
|
|
||||||
* This can be set to anything, but default usage is:
|
|
||||||
*
|
|
||||||
* development
|
|
||||||
* testing
|
|
||||||
* production
|
|
||||||
*
|
|
||||||
* NOTE: If you change these, also change the error_reporting() code below
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
define('ENVIRONMENT', 'production');
|
|
||||||
/*
|
|
||||||
*---------------------------------------------------------------
|
|
||||||
* ERROR REPORTING
|
|
||||||
*---------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* Different environments will require different levels of error reporting.
|
|
||||||
* By default development will show errors but testing and live will hide them.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (defined('ENVIRONMENT'))
|
|
||||||
{
|
|
||||||
switch (ENVIRONMENT)
|
|
||||||
{
|
|
||||||
case 'development':
|
|
||||||
error_reporting(E_ALL);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'testing':
|
|
||||||
case 'production':
|
|
||||||
error_reporting(0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
exit('The application environment is not set correctly.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
*---------------------------------------------------------------
|
|
||||||
* SYSTEM FOLDER NAME
|
|
||||||
*---------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* This variable must contain the name of your "system" folder.
|
|
||||||
* Include the path if the folder is not in the same directory
|
|
||||||
* as this file.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$system_path = 'system';
|
|
||||||
|
|
||||||
/*
|
|
||||||
*---------------------------------------------------------------
|
|
||||||
* APPLICATION FOLDER NAME
|
|
||||||
*---------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* If you want this front controller to use a different "application"
|
|
||||||
* folder then the default one you can set its name here. The folder
|
|
||||||
* can also be renamed or relocated anywhere on your server. If
|
|
||||||
* you do, use a full server path. For more info please see the user guide:
|
|
||||||
* http://codeigniter.com/user_guide/general/managing_apps.html
|
|
||||||
*
|
|
||||||
* NO TRAILING SLASH!
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$application_folder = 'application';
|
|
||||||
|
|
||||||
/*
|
|
||||||
* --------------------------------------------------------------------
|
|
||||||
* DEFAULT CONTROLLER
|
|
||||||
* --------------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* Normally you will set your default controller in the routes.php file.
|
|
||||||
* You can, however, force a custom routing by hard-coding a
|
|
||||||
* specific controller class/function here. For most applications, you
|
|
||||||
* WILL NOT set your routing here, but it's an option for those
|
|
||||||
* special instances where you might want to override the standard
|
|
||||||
* routing in a specific front controller that shares a common CI installation.
|
|
||||||
*
|
|
||||||
* IMPORTANT: If you set the routing here, NO OTHER controller will be
|
|
||||||
* callable. In essence, this preference limits your application to ONE
|
|
||||||
* specific controller. Leave the function name blank if you need
|
|
||||||
* to call functions dynamically via the URI.
|
|
||||||
*
|
|
||||||
* Un-comment the $routing array below to use this feature
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
// The directory name, relative to the "controllers" folder. Leave blank
|
|
||||||
// if your controller is not in a sub-folder within the "controllers" folder
|
|
||||||
// $routing['directory'] = '';
|
|
||||||
|
|
||||||
// The controller class file name. Example: Mycontroller
|
|
||||||
// $routing['controller'] = '';
|
|
||||||
|
|
||||||
// The controller function you wish to be called.
|
|
||||||
// $routing['function'] = '';
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* -------------------------------------------------------------------
|
|
||||||
* CUSTOM CONFIG VALUES
|
|
||||||
* -------------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* The $assign_to_config array below will be passed dynamically to the
|
|
||||||
* config class when initialized. This allows you to set custom config
|
|
||||||
* items or override any default config values found in the config.php file.
|
|
||||||
* This can be handy as it permits you to share one application between
|
|
||||||
* multiple front controller files, with each file containing different
|
|
||||||
* config values.
|
|
||||||
*
|
|
||||||
* Un-comment the $assign_to_config array below to use this feature
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
// $assign_to_config['name_of_config_item'] = 'value of config item';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ---------------------------------------------------------------
|
|
||||||
* Resolve the system path for increased reliability
|
|
||||||
* ---------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Set the current directory correctly for CLI requests
|
|
||||||
if (defined('STDIN'))
|
|
||||||
{
|
|
||||||
chdir(dirname(__FILE__));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (realpath($system_path) !== FALSE)
|
|
||||||
{
|
|
||||||
$system_path = realpath($system_path).'/';
|
|
||||||
}
|
|
||||||
|
|
||||||
// ensure there's a trailing slash
|
|
||||||
$system_path = rtrim($system_path, '/').'/';
|
|
||||||
|
|
||||||
// Is the system path correct?
|
|
||||||
if ( ! is_dir($system_path))
|
|
||||||
{
|
|
||||||
exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* -------------------------------------------------------------------
|
|
||||||
* Now that we know the path, set the main path constants
|
|
||||||
* -------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
// The name of THIS file
|
|
||||||
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
|
|
||||||
|
|
||||||
// The PHP file extension
|
|
||||||
// this global constant is deprecated.
|
|
||||||
define('EXT', '.php');
|
|
||||||
|
|
||||||
// Path to the system folder
|
|
||||||
define('BASEPATH', str_replace("\\", "/", $system_path));
|
|
||||||
|
|
||||||
// Path to the front controller (this file)
|
|
||||||
define('FCPATH', str_replace(SELF, '', __FILE__));
|
|
||||||
|
|
||||||
// Name of the "system folder"
|
|
||||||
define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
|
|
||||||
|
|
||||||
|
|
||||||
// The path to the "application" folder
|
|
||||||
if (is_dir($application_folder))
|
|
||||||
{
|
|
||||||
define('APPPATH', $application_folder.'/');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( ! is_dir(BASEPATH.$application_folder.'/'))
|
|
||||||
{
|
|
||||||
exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
|
|
||||||
}
|
|
||||||
|
|
||||||
define('APPPATH', BASEPATH.$application_folder.'/');
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* --------------------------------------------------------------------
|
|
||||||
* LOAD THE BOOTSTRAP FILE
|
|
||||||
* --------------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* And away we go...
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
require_once BASEPATH.'core/CodeIgniter.php';
|
|
||||||
|
|
||||||
/* End of file index.php */
|
|
||||||
/* Location: ./index.php */
|
|
|
@ -1 +0,0 @@
|
||||||
Deny from all
|
|
|
@ -1,118 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/**
|
|
||||||
* CodeIgniter
|
|
||||||
*
|
|
||||||
* An open source application development framework for PHP 5.1.6 or newer
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
|
|
||||||
* @license http://codeigniter.com/user_guide/license.html
|
|
||||||
* @link http://codeigniter.com
|
|
||||||
* @since Version 1.0
|
|
||||||
* @filesource
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CodeIgniter Benchmark Class
|
|
||||||
*
|
|
||||||
* This class enables you to mark points and calculate the time difference
|
|
||||||
* between them. Memory consumption can also be displayed.
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @subpackage Libraries
|
|
||||||
* @category Libraries
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @link http://codeigniter.com/user_guide/libraries/benchmark.html
|
|
||||||
*/
|
|
||||||
class CI_Benchmark {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all benchmark markers and when they were added
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
var $marker = array();
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set a benchmark marker
|
|
||||||
*
|
|
||||||
* Multiple calls to this function can be made so that several
|
|
||||||
* execution points can be timed
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string $name name of the marker
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function mark($name)
|
|
||||||
{
|
|
||||||
$this->marker[$name] = microtime();
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculates the time difference between two marked points.
|
|
||||||
*
|
|
||||||
* If the first parameter is empty this function instead returns the
|
|
||||||
* {elapsed_time} pseudo-variable. This permits the full system
|
|
||||||
* execution time to be shown in a template. The output class will
|
|
||||||
* swap the real value for this variable.
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string a particular marked point
|
|
||||||
* @param string a particular marked point
|
|
||||||
* @param integer the number of decimal places
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
function elapsed_time($point1 = '', $point2 = '', $decimals = 4)
|
|
||||||
{
|
|
||||||
if ($point1 == '')
|
|
||||||
{
|
|
||||||
return '{elapsed_time}';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! isset($this->marker[$point1]))
|
|
||||||
{
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! isset($this->marker[$point2]))
|
|
||||||
{
|
|
||||||
$this->marker[$point2] = microtime();
|
|
||||||
}
|
|
||||||
|
|
||||||
list($sm, $ss) = explode(' ', $this->marker[$point1]);
|
|
||||||
list($em, $es) = explode(' ', $this->marker[$point2]);
|
|
||||||
|
|
||||||
return number_format(($em + $es) - ($sm + $ss), $decimals);
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Memory Usage
|
|
||||||
*
|
|
||||||
* This function returns the {memory_usage} pseudo-variable.
|
|
||||||
* This permits it to be put it anywhere in a template
|
|
||||||
* without the memory being calculated until the end.
|
|
||||||
* The output class will swap the real value for this variable.
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function memory_usage()
|
|
||||||
{
|
|
||||||
return '{memory_usage}';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// END CI_Benchmark class
|
|
||||||
|
|
||||||
/* End of file Benchmark.php */
|
|
||||||
/* Location: ./system/core/Benchmark.php */
|
|
|
@ -1,402 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/**
|
|
||||||
* CodeIgniter
|
|
||||||
*
|
|
||||||
* An open source application development framework for PHP 5.1.6 or newer
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
|
|
||||||
* @license http://codeigniter.com/user_guide/license.html
|
|
||||||
* @link http://codeigniter.com
|
|
||||||
* @since Version 1.0
|
|
||||||
* @filesource
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* System Initialization File
|
|
||||||
*
|
|
||||||
* Loads the base classes and executes the request.
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @subpackage codeigniter
|
|
||||||
* @category Front-controller
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @link http://codeigniter.com/user_guide/
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CodeIgniter Version
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
define('CI_VERSION', '2.1.3');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CodeIgniter Branch (Core = TRUE, Reactor = FALSE)
|
|
||||||
*
|
|
||||||
* @var boolean
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
define('CI_CORE', FALSE);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Load the global functions
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
require(BASEPATH.'core/Common.php');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Load the framework constants
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/constants.php'))
|
|
||||||
{
|
|
||||||
require(APPPATH.'config/'.ENVIRONMENT.'/constants.php');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
require(APPPATH.'config/constants.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Define a custom error handler so we can log PHP errors
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
set_error_handler('_exception_handler');
|
|
||||||
|
|
||||||
if ( ! is_php('5.3'))
|
|
||||||
{
|
|
||||||
@set_magic_quotes_runtime(0); // Kill magic quotes
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Set the subclass_prefix
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*
|
|
||||||
* Normally the "subclass_prefix" is set in the config file.
|
|
||||||
* The subclass prefix allows CI to know if a core class is
|
|
||||||
* being extended via a library in the local application
|
|
||||||
* "libraries" folder. Since CI allows config items to be
|
|
||||||
* overriden via data set in the main index. php file,
|
|
||||||
* before proceeding we need to know if a subclass_prefix
|
|
||||||
* override exists. If so, we will set this value now,
|
|
||||||
* before any classes are loaded
|
|
||||||
* Note: Since the config file data is cached it doesn't
|
|
||||||
* hurt to load it here.
|
|
||||||
*/
|
|
||||||
if (isset($assign_to_config['subclass_prefix']) AND $assign_to_config['subclass_prefix'] != '')
|
|
||||||
{
|
|
||||||
get_config(array('subclass_prefix' => $assign_to_config['subclass_prefix']));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Set a liberal script execution time limit
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
if (function_exists("set_time_limit") == TRUE AND @ini_get("safe_mode") == 0)
|
|
||||||
{
|
|
||||||
@set_time_limit(300);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Start the timer... tick tock tick tock...
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$BM =& load_class('Benchmark', 'core');
|
|
||||||
$BM->mark('total_execution_time_start');
|
|
||||||
$BM->mark('loading_time:_base_classes_start');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Instantiate the hooks class
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$EXT =& load_class('Hooks', 'core');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Is there a "pre_system" hook?
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$EXT->_call_hook('pre_system');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Instantiate the config class
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$CFG =& load_class('Config', 'core');
|
|
||||||
|
|
||||||
// Do we have any manually set config items in the index.php file?
|
|
||||||
if (isset($assign_to_config))
|
|
||||||
{
|
|
||||||
$CFG->_assign_to_config($assign_to_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Instantiate the UTF-8 class
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*
|
|
||||||
* Note: Order here is rather important as the UTF-8
|
|
||||||
* class needs to be used very early on, but it cannot
|
|
||||||
* properly determine if UTf-8 can be supported until
|
|
||||||
* after the Config class is instantiated.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$UNI =& load_class('Utf8', 'core');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Instantiate the URI class
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$URI =& load_class('URI', 'core');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Instantiate the routing class and set the routing
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$RTR =& load_class('Router', 'core');
|
|
||||||
$RTR->_set_routing();
|
|
||||||
|
|
||||||
// Set any routing overrides that may exist in the main index file
|
|
||||||
if (isset($routing))
|
|
||||||
{
|
|
||||||
$RTR->_set_overrides($routing);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Instantiate the output class
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$OUT =& load_class('Output', 'core');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Is there a valid cache file? If so, we're done...
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
if ($EXT->_call_hook('cache_override') === FALSE)
|
|
||||||
{
|
|
||||||
if ($OUT->_display_cache($CFG, $URI) == TRUE)
|
|
||||||
{
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* -----------------------------------------------------
|
|
||||||
* Load the security class for xss and csrf support
|
|
||||||
* -----------------------------------------------------
|
|
||||||
*/
|
|
||||||
$SEC =& load_class('Security', 'core');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Load the Input class and sanitize globals
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$IN =& load_class('Input', 'core');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Load the Language class
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$LANG =& load_class('Lang', 'core');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Load the app controller and local controller
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
// Load the base controller class
|
|
||||||
require BASEPATH.'core/Controller.php';
|
|
||||||
|
|
||||||
function &get_instance()
|
|
||||||
{
|
|
||||||
return CI_Controller::get_instance();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php'))
|
|
||||||
{
|
|
||||||
require APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load the local application controller
|
|
||||||
// Note: The Router class automatically validates the controller path using the router->_validate_request().
|
|
||||||
// If this include fails it means that the default controller in the Routes.php file is not resolving to something valid.
|
|
||||||
if ( ! file_exists(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().'.php'))
|
|
||||||
{
|
|
||||||
show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.');
|
|
||||||
}
|
|
||||||
|
|
||||||
include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().'.php');
|
|
||||||
|
|
||||||
// Set a mark point for benchmarking
|
|
||||||
$BM->mark('loading_time:_base_classes_end');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Security check
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*
|
|
||||||
* None of the functions in the app controller or the
|
|
||||||
* loader class can be called via the URI, nor can
|
|
||||||
* controller functions that begin with an underscore
|
|
||||||
*/
|
|
||||||
$class = $RTR->fetch_class();
|
|
||||||
$method = $RTR->fetch_method();
|
|
||||||
|
|
||||||
if ( ! class_exists($class)
|
|
||||||
OR strncmp($method, '_', 1) == 0
|
|
||||||
OR in_array(strtolower($method), array_map('strtolower', get_class_methods('CI_Controller')))
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if ( ! empty($RTR->routes['404_override']))
|
|
||||||
{
|
|
||||||
$x = explode('/', $RTR->routes['404_override']);
|
|
||||||
$class = $x[0];
|
|
||||||
$method = (isset($x[1]) ? $x[1] : 'index');
|
|
||||||
if ( ! class_exists($class))
|
|
||||||
{
|
|
||||||
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
|
|
||||||
{
|
|
||||||
show_404("{$class}/{$method}");
|
|
||||||
}
|
|
||||||
|
|
||||||
include_once(APPPATH.'controllers/'.$class.'.php');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
show_404("{$class}/{$method}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Is there a "pre_controller" hook?
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$EXT->_call_hook('pre_controller');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Instantiate the requested controller
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
// Mark a start point so we can benchmark the controller
|
|
||||||
$BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start');
|
|
||||||
|
|
||||||
$CI = new $class();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Is there a "post_controller_constructor" hook?
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$EXT->_call_hook('post_controller_constructor');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Call the requested method
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
// Is there a "remap" function? If so, we call it instead
|
|
||||||
if (method_exists($CI, '_remap'))
|
|
||||||
{
|
|
||||||
$CI->_remap($method, array_slice($URI->rsegments, 2));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// is_callable() returns TRUE on some versions of PHP 5 for private and protected
|
|
||||||
// methods, so we'll use this workaround for consistent behavior
|
|
||||||
if ( ! in_array(strtolower($method), array_map('strtolower', get_class_methods($CI))))
|
|
||||||
{
|
|
||||||
// Check and see if we are using a 404 override and use it.
|
|
||||||
if ( ! empty($RTR->routes['404_override']))
|
|
||||||
{
|
|
||||||
$x = explode('/', $RTR->routes['404_override']);
|
|
||||||
$class = $x[0];
|
|
||||||
$method = (isset($x[1]) ? $x[1] : 'index');
|
|
||||||
if ( ! class_exists($class))
|
|
||||||
{
|
|
||||||
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
|
|
||||||
{
|
|
||||||
show_404("{$class}/{$method}");
|
|
||||||
}
|
|
||||||
|
|
||||||
include_once(APPPATH.'controllers/'.$class.'.php');
|
|
||||||
unset($CI);
|
|
||||||
$CI = new $class();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
show_404("{$class}/{$method}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Call the requested method.
|
|
||||||
// Any URI segments present (besides the class/function) will be passed to the method for convenience
|
|
||||||
call_user_func_array(array(&$CI, $method), array_slice($URI->rsegments, 2));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Mark a benchmark end point
|
|
||||||
$BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Is there a "post_controller" hook?
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$EXT->_call_hook('post_controller');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Send the final rendered output to the browser
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
if ($EXT->_call_hook('display_override') === FALSE)
|
|
||||||
{
|
|
||||||
$OUT->_display();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Is there a "post_system" hook?
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$EXT->_call_hook('post_system');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Close the DB connection if one exists
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
if (class_exists('CI_DB') AND isset($CI->db))
|
|
||||||
{
|
|
||||||
$CI->db->close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* End of file CodeIgniter.php */
|
|
||||||
/* Location: ./system/core/CodeIgniter.php */
|
|
|
@ -1,564 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/**
|
|
||||||
* CodeIgniter
|
|
||||||
*
|
|
||||||
* An open source application development framework for PHP 5.1.6 or newer
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
|
|
||||||
* @license http://codeigniter.com/user_guide/license.html
|
|
||||||
* @link http://codeigniter.com
|
|
||||||
* @since Version 1.0
|
|
||||||
* @filesource
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Common Functions
|
|
||||||
*
|
|
||||||
* Loads the base classes and executes the request.
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @subpackage codeigniter
|
|
||||||
* @category Common Functions
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @link http://codeigniter.com/user_guide/
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines if the current version of PHP is greater then the supplied value
|
|
||||||
*
|
|
||||||
* Since there are a few places where we conditionally test for PHP > 5
|
|
||||||
* we'll set a static variable.
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string
|
|
||||||
* @return bool TRUE if the current version is $version or higher
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('is_php'))
|
|
||||||
{
|
|
||||||
function is_php($version = '5.0.0')
|
|
||||||
{
|
|
||||||
static $_is_php;
|
|
||||||
$version = (string)$version;
|
|
||||||
|
|
||||||
if ( ! isset($_is_php[$version]))
|
|
||||||
{
|
|
||||||
$_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $_is_php[$version];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests for file writability
|
|
||||||
*
|
|
||||||
* is_writable() returns TRUE on Windows servers when you really can't write to
|
|
||||||
* the file, based on the read-only attribute. is_writable() is also unreliable
|
|
||||||
* on Unix servers if safe_mode is on.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('is_really_writable'))
|
|
||||||
{
|
|
||||||
function is_really_writable($file)
|
|
||||||
{
|
|
||||||
// If we're on a Unix server with safe_mode off we call is_writable
|
|
||||||
if (DIRECTORY_SEPARATOR == '/' AND @ini_get("safe_mode") == FALSE)
|
|
||||||
{
|
|
||||||
return is_writable($file);
|
|
||||||
}
|
|
||||||
|
|
||||||
// For windows servers and safe_mode "on" installations we'll actually
|
|
||||||
// write a file then read it. Bah...
|
|
||||||
if (is_dir($file))
|
|
||||||
{
|
|
||||||
$file = rtrim($file, '/').'/'.md5(mt_rand(1,100).mt_rand(1,100));
|
|
||||||
|
|
||||||
if (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose($fp);
|
|
||||||
@chmod($file, DIR_WRITE_MODE);
|
|
||||||
@unlink($file);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
elseif ( ! is_file($file) OR ($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose($fp);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class registry
|
|
||||||
*
|
|
||||||
* This function acts as a singleton. If the requested class does not
|
|
||||||
* exist it is instantiated and set to a static variable. If it has
|
|
||||||
* previously been instantiated the variable is returned.
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string the class name being requested
|
|
||||||
* @param string the directory where the class should be found
|
|
||||||
* @param string the class name prefix
|
|
||||||
* @return object
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('load_class'))
|
|
||||||
{
|
|
||||||
function &load_class($class, $directory = 'libraries', $prefix = 'CI_')
|
|
||||||
{
|
|
||||||
static $_classes = array();
|
|
||||||
|
|
||||||
// Does the class exist? If so, we're done...
|
|
||||||
if (isset($_classes[$class]))
|
|
||||||
{
|
|
||||||
return $_classes[$class];
|
|
||||||
}
|
|
||||||
|
|
||||||
$name = FALSE;
|
|
||||||
|
|
||||||
// Look for the class first in the local application/libraries folder
|
|
||||||
// then in the native system/libraries folder
|
|
||||||
foreach (array(APPPATH, BASEPATH) as $path)
|
|
||||||
{
|
|
||||||
if (file_exists($path.$directory.'/'.$class.'.php'))
|
|
||||||
{
|
|
||||||
$name = $prefix.$class;
|
|
||||||
|
|
||||||
if (class_exists($name) === FALSE)
|
|
||||||
{
|
|
||||||
require($path.$directory.'/'.$class.'.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Is the request a class extension? If so we load it too
|
|
||||||
if (file_exists(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.'.php'))
|
|
||||||
{
|
|
||||||
$name = config_item('subclass_prefix').$class;
|
|
||||||
|
|
||||||
if (class_exists($name) === FALSE)
|
|
||||||
{
|
|
||||||
require(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.'.php');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Did we find the class?
|
|
||||||
if ($name === FALSE)
|
|
||||||
{
|
|
||||||
// Note: We use exit() rather then show_error() in order to avoid a
|
|
||||||
// self-referencing loop with the Excptions class
|
|
||||||
exit('Unable to locate the specified class: '.$class.'.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Keep track of what we just loaded
|
|
||||||
is_loaded($class);
|
|
||||||
|
|
||||||
$_classes[$class] = new $name();
|
|
||||||
return $_classes[$class];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Keeps track of which libraries have been loaded. This function is
|
|
||||||
* called by the load_class() function above
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('is_loaded'))
|
|
||||||
{
|
|
||||||
function &is_loaded($class = '')
|
|
||||||
{
|
|
||||||
static $_is_loaded = array();
|
|
||||||
|
|
||||||
if ($class != '')
|
|
||||||
{
|
|
||||||
$_is_loaded[strtolower($class)] = $class;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $_is_loaded;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Loads the main config.php file
|
|
||||||
*
|
|
||||||
* This function lets us grab the config file even if the Config class
|
|
||||||
* hasn't been instantiated yet
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('get_config'))
|
|
||||||
{
|
|
||||||
function &get_config($replace = array())
|
|
||||||
{
|
|
||||||
static $_config;
|
|
||||||
|
|
||||||
if (isset($_config))
|
|
||||||
{
|
|
||||||
return $_config[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Is the config file in the environment folder?
|
|
||||||
if ( ! defined('ENVIRONMENT') OR ! file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/config.php'))
|
|
||||||
{
|
|
||||||
$file_path = APPPATH.'config/config.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch the config file
|
|
||||||
if ( ! file_exists($file_path))
|
|
||||||
{
|
|
||||||
exit('The configuration file does not exist.');
|
|
||||||
}
|
|
||||||
|
|
||||||
require($file_path);
|
|
||||||
|
|
||||||
// Does the $config array exist in the file?
|
|
||||||
if ( ! isset($config) OR ! is_array($config))
|
|
||||||
{
|
|
||||||
exit('Your config file does not appear to be formatted correctly.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Are any values being dynamically replaced?
|
|
||||||
if (count($replace) > 0)
|
|
||||||
{
|
|
||||||
foreach ($replace as $key => $val)
|
|
||||||
{
|
|
||||||
if (isset($config[$key]))
|
|
||||||
{
|
|
||||||
$config[$key] = $val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $_config[0] =& $config;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the specified config item
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('config_item'))
|
|
||||||
{
|
|
||||||
function config_item($item)
|
|
||||||
{
|
|
||||||
static $_config_item = array();
|
|
||||||
|
|
||||||
if ( ! isset($_config_item[$item]))
|
|
||||||
{
|
|
||||||
$config =& get_config();
|
|
||||||
|
|
||||||
if ( ! isset($config[$item]))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
$_config_item[$item] = $config[$item];
|
|
||||||
}
|
|
||||||
|
|
||||||
return $_config_item[$item];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Error Handler
|
|
||||||
*
|
|
||||||
* This function lets us invoke the exception class and
|
|
||||||
* display errors using the standard error template located
|
|
||||||
* in application/errors/errors.php
|
|
||||||
* This function will send the error page directly to the
|
|
||||||
* browser and exit.
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('show_error'))
|
|
||||||
{
|
|
||||||
function show_error($message, $status_code = 500, $heading = 'An Error Was Encountered')
|
|
||||||
{
|
|
||||||
$_error =& load_class('Exceptions', 'core');
|
|
||||||
echo $_error->show_error($heading, $message, 'error_general', $status_code);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 404 Page Handler
|
|
||||||
*
|
|
||||||
* This function is similar to the show_error() function above
|
|
||||||
* However, instead of the standard error template it displays
|
|
||||||
* 404 errors.
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('show_404'))
|
|
||||||
{
|
|
||||||
function show_404($page = '', $log_error = TRUE)
|
|
||||||
{
|
|
||||||
$_error =& load_class('Exceptions', 'core');
|
|
||||||
$_error->show_404($page, $log_error);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Error Logging Interface
|
|
||||||
*
|
|
||||||
* We use this as a simple mechanism to access the logging
|
|
||||||
* class and send messages to be logged.
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('log_message'))
|
|
||||||
{
|
|
||||||
function log_message($level = 'error', $message, $php_error = FALSE)
|
|
||||||
{
|
|
||||||
static $_log;
|
|
||||||
|
|
||||||
if (config_item('log_threshold') == 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$_log =& load_class('Log');
|
|
||||||
$_log->write_log($level, $message, $php_error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set HTTP Status Header
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param int the status code
|
|
||||||
* @param string
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('set_status_header'))
|
|
||||||
{
|
|
||||||
function set_status_header($code = 200, $text = '')
|
|
||||||
{
|
|
||||||
$stati = array(
|
|
||||||
200 => 'OK',
|
|
||||||
201 => 'Created',
|
|
||||||
202 => 'Accepted',
|
|
||||||
203 => 'Non-Authoritative Information',
|
|
||||||
204 => 'No Content',
|
|
||||||
205 => 'Reset Content',
|
|
||||||
206 => 'Partial Content',
|
|
||||||
|
|
||||||
300 => 'Multiple Choices',
|
|
||||||
301 => 'Moved Permanently',
|
|
||||||
302 => 'Found',
|
|
||||||
304 => 'Not Modified',
|
|
||||||
305 => 'Use Proxy',
|
|
||||||
307 => 'Temporary Redirect',
|
|
||||||
|
|
||||||
400 => 'Bad Request',
|
|
||||||
401 => 'Unauthorized',
|
|
||||||
403 => 'Forbidden',
|
|
||||||
404 => 'Not Found',
|
|
||||||
405 => 'Method Not Allowed',
|
|
||||||
406 => 'Not Acceptable',
|
|
||||||
407 => 'Proxy Authentication Required',
|
|
||||||
408 => 'Request Timeout',
|
|
||||||
409 => 'Conflict',
|
|
||||||
410 => 'Gone',
|
|
||||||
411 => 'Length Required',
|
|
||||||
412 => 'Precondition Failed',
|
|
||||||
413 => 'Request Entity Too Large',
|
|
||||||
414 => 'Request-URI Too Long',
|
|
||||||
415 => 'Unsupported Media Type',
|
|
||||||
416 => 'Requested Range Not Satisfiable',
|
|
||||||
417 => 'Expectation Failed',
|
|
||||||
|
|
||||||
500 => 'Internal Server Error',
|
|
||||||
501 => 'Not Implemented',
|
|
||||||
502 => 'Bad Gateway',
|
|
||||||
503 => 'Service Unavailable',
|
|
||||||
504 => 'Gateway Timeout',
|
|
||||||
505 => 'HTTP Version Not Supported'
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($code == '' OR ! is_numeric($code))
|
|
||||||
{
|
|
||||||
show_error('Status codes must be numeric', 500);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($stati[$code]) AND $text == '')
|
|
||||||
{
|
|
||||||
$text = $stati[$code];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($text == '')
|
|
||||||
{
|
|
||||||
show_error('No status text available. Please check your status code number or supply your own message text.', 500);
|
|
||||||
}
|
|
||||||
|
|
||||||
$server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE;
|
|
||||||
|
|
||||||
if (substr(php_sapi_name(), 0, 3) == 'cgi')
|
|
||||||
{
|
|
||||||
header("Status: {$code} {$text}", TRUE);
|
|
||||||
}
|
|
||||||
elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0')
|
|
||||||
{
|
|
||||||
header($server_protocol." {$code} {$text}", TRUE, $code);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
header("HTTP/1.1 {$code} {$text}", TRUE, $code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Exception Handler
|
|
||||||
*
|
|
||||||
* This is the custom exception handler that is declaired at the top
|
|
||||||
* of Codeigniter.php. The main reason we use this is to permit
|
|
||||||
* PHP errors to be logged in our own log files since the user may
|
|
||||||
* not have access to server logs. Since this function
|
|
||||||
* effectively intercepts PHP errors, however, we also need
|
|
||||||
* to display errors based on the current error_reporting level.
|
|
||||||
* We do that with the use of a PHP error template.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('_exception_handler'))
|
|
||||||
{
|
|
||||||
function _exception_handler($severity, $message, $filepath, $line)
|
|
||||||
{
|
|
||||||
// We don't bother with "strict" notices since they tend to fill up
|
|
||||||
// the log file with excess information that isn't normally very helpful.
|
|
||||||
// For example, if you are running PHP 5 and you use version 4 style
|
|
||||||
// class functions (without prefixes like "public", "private", etc.)
|
|
||||||
// you'll get notices telling you that these have been deprecated.
|
|
||||||
if ($severity == E_STRICT)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$_error =& load_class('Exceptions', 'core');
|
|
||||||
|
|
||||||
// Should we display the error? We'll get the current error_reporting
|
|
||||||
// level and add its bits with the severity bits to find out.
|
|
||||||
if (($severity & error_reporting()) == $severity)
|
|
||||||
{
|
|
||||||
$_error->show_php_error($severity, $message, $filepath, $line);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Should we log the error? No? We're done...
|
|
||||||
if (config_item('log_threshold') == 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$_error->log_exception($severity, $message, $filepath, $line);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove Invisible Characters
|
|
||||||
*
|
|
||||||
* This prevents sandwiching null characters
|
|
||||||
* between ascii characters, like Java\0script.
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('remove_invisible_characters'))
|
|
||||||
{
|
|
||||||
function remove_invisible_characters($str, $url_encoded = TRUE)
|
|
||||||
{
|
|
||||||
$non_displayables = array();
|
|
||||||
|
|
||||||
// every control character except newline (dec 10)
|
|
||||||
// carriage return (dec 13), and horizontal tab (dec 09)
|
|
||||||
|
|
||||||
if ($url_encoded)
|
|
||||||
{
|
|
||||||
$non_displayables[] = '/%0[0-8bcef]/'; // url encoded 00-08, 11, 12, 14, 15
|
|
||||||
$non_displayables[] = '/%1[0-9a-f]/'; // url encoded 16-31
|
|
||||||
}
|
|
||||||
|
|
||||||
$non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
$str = preg_replace($non_displayables, '', $str, -1, $count);
|
|
||||||
}
|
|
||||||
while ($count);
|
|
||||||
|
|
||||||
return $str;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns HTML escaped variable
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param mixed
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
if ( ! function_exists('html_escape'))
|
|
||||||
{
|
|
||||||
function html_escape($var)
|
|
||||||
{
|
|
||||||
if (is_array($var))
|
|
||||||
{
|
|
||||||
return array_map('html_escape', $var);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return htmlspecialchars($var, ENT_QUOTES, config_item('charset'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End of file Common.php */
|
|
||||||
/* Location: ./system/core/Common.php */
|
|
|
@ -1,379 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/**
|
|
||||||
* CodeIgniter
|
|
||||||
*
|
|
||||||
* An open source application development framework for PHP 5.1.6 or newer
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
|
|
||||||
* @license http://codeigniter.com/user_guide/license.html
|
|
||||||
* @link http://codeigniter.com
|
|
||||||
* @since Version 1.0
|
|
||||||
* @filesource
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CodeIgniter Config Class
|
|
||||||
*
|
|
||||||
* This class contains functions that enable config files to be managed
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @subpackage Libraries
|
|
||||||
* @category Libraries
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @link http://codeigniter.com/user_guide/libraries/config.html
|
|
||||||
*/
|
|
||||||
class CI_Config {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of all loaded config values
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
var $config = array();
|
|
||||||
/**
|
|
||||||
* List of all loaded config files
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
var $is_loaded = array();
|
|
||||||
/**
|
|
||||||
* List of paths to search when trying to load a config file
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
var $_config_paths = array(APPPATH);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*
|
|
||||||
* Sets the $config data from the primary config.php file as a class variable
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string the config file name
|
|
||||||
* @param boolean if configuration values should be loaded into their own section
|
|
||||||
* @param boolean true if errors should just return false, false if an error message should be displayed
|
|
||||||
* @return boolean if the file was successfully loaded or not
|
|
||||||
*/
|
|
||||||
function __construct()
|
|
||||||
{
|
|
||||||
$this->config =& get_config();
|
|
||||||
log_message('debug', "Config Class Initialized");
|
|
||||||
|
|
||||||
// Set the base_url automatically if none was provided
|
|
||||||
if ($this->config['base_url'] == '')
|
|
||||||
{
|
|
||||||
if (isset($_SERVER['HTTP_HOST']))
|
|
||||||
{
|
|
||||||
$base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
|
|
||||||
$base_url .= '://'. $_SERVER['HTTP_HOST'];
|
|
||||||
$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$base_url = 'http://localhost/';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->set_item('base_url', $base_url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load Config File
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string the config file name
|
|
||||||
* @param boolean if configuration values should be loaded into their own section
|
|
||||||
* @param boolean true if errors should just return false, false if an error message should be displayed
|
|
||||||
* @return boolean if the file was loaded correctly
|
|
||||||
*/
|
|
||||||
function load($file = '', $use_sections = FALSE, $fail_gracefully = FALSE)
|
|
||||||
{
|
|
||||||
$file = ($file == '') ? 'config' : str_replace('.php', '', $file);
|
|
||||||
$found = FALSE;
|
|
||||||
$loaded = FALSE;
|
|
||||||
|
|
||||||
$check_locations = defined('ENVIRONMENT')
|
|
||||||
? array(ENVIRONMENT.'/'.$file, $file)
|
|
||||||
: array($file);
|
|
||||||
|
|
||||||
foreach ($this->_config_paths as $path)
|
|
||||||
{
|
|
||||||
foreach ($check_locations as $location)
|
|
||||||
{
|
|
||||||
$file_path = $path.'config/'.$location.'.php';
|
|
||||||
|
|
||||||
if (in_array($file_path, $this->is_loaded, TRUE))
|
|
||||||
{
|
|
||||||
$loaded = TRUE;
|
|
||||||
continue 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_exists($file_path))
|
|
||||||
{
|
|
||||||
$found = TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($found === FALSE)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
include($file_path);
|
|
||||||
|
|
||||||
if ( ! isset($config) OR ! is_array($config))
|
|
||||||
{
|
|
||||||
if ($fail_gracefully === TRUE)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
show_error('Your '.$file_path.' file does not appear to contain a valid configuration array.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($use_sections === TRUE)
|
|
||||||
{
|
|
||||||
if (isset($this->config[$file]))
|
|
||||||
{
|
|
||||||
$this->config[$file] = array_merge($this->config[$file], $config);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->config[$file] = $config;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->config = array_merge($this->config, $config);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->is_loaded[] = $file_path;
|
|
||||||
unset($config);
|
|
||||||
|
|
||||||
$loaded = TRUE;
|
|
||||||
log_message('debug', 'Config file loaded: '.$file_path);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($loaded === FALSE)
|
|
||||||
{
|
|
||||||
if ($fail_gracefully === TRUE)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
show_error('The configuration file '.$file.'.php does not exist.');
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch a config file item
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string the config item name
|
|
||||||
* @param string the index name
|
|
||||||
* @param bool
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function item($item, $index = '')
|
|
||||||
{
|
|
||||||
if ($index == '')
|
|
||||||
{
|
|
||||||
if ( ! isset($this->config[$item]))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
$pref = $this->config[$item];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( ! isset($this->config[$index]))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! isset($this->config[$index][$item]))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
$pref = $this->config[$index][$item];
|
|
||||||
}
|
|
||||||
|
|
||||||
return $pref;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch a config file item - adds slash after item (if item is not empty)
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string the config item name
|
|
||||||
* @param bool
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function slash_item($item)
|
|
||||||
{
|
|
||||||
if ( ! isset($this->config[$item]))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
if( trim($this->config[$item]) == '')
|
|
||||||
{
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
return rtrim($this->config[$item], '/').'/';
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Site URL
|
|
||||||
* Returns base_url . index_page [. uri_string]
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string the URI string
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function site_url($uri = '')
|
|
||||||
{
|
|
||||||
if ($uri == '')
|
|
||||||
{
|
|
||||||
return $this->slash_item('base_url').$this->item('index_page');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->item('enable_query_strings') == FALSE)
|
|
||||||
{
|
|
||||||
$suffix = ($this->item('url_suffix') == FALSE) ? '' : $this->item('url_suffix');
|
|
||||||
return $this->slash_item('base_url').$this->slash_item('index_page').$this->_uri_string($uri).$suffix;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return $this->slash_item('base_url').$this->item('index_page').'?'.$this->_uri_string($uri);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Base URL
|
|
||||||
* Returns base_url [. uri_string]
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string $uri
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function base_url($uri = '')
|
|
||||||
{
|
|
||||||
return $this->slash_item('base_url').ltrim($this->_uri_string($uri), '/');
|
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Build URI string for use in Config::site_url() and Config::base_url()
|
|
||||||
*
|
|
||||||
* @access protected
|
|
||||||
* @param $uri
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function _uri_string($uri)
|
|
||||||
{
|
|
||||||
if ($this->item('enable_query_strings') == FALSE)
|
|
||||||
{
|
|
||||||
if (is_array($uri))
|
|
||||||
{
|
|
||||||
$uri = implode('/', $uri);
|
|
||||||
}
|
|
||||||
$uri = trim($uri, '/');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (is_array($uri))
|
|
||||||
{
|
|
||||||
$i = 0;
|
|
||||||
$str = '';
|
|
||||||
foreach ($uri as $key => $val)
|
|
||||||
{
|
|
||||||
$prefix = ($i == 0) ? '' : '&';
|
|
||||||
$str .= $prefix.$key.'='.$val;
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
$uri = $str;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* System URL
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function system_url()
|
|
||||||
{
|
|
||||||
$x = explode("/", preg_replace("|/*(.+?)/*$|", "\\1", BASEPATH));
|
|
||||||
return $this->slash_item('base_url').end($x).'/';
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set a config file item
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string the config item key
|
|
||||||
* @param string the config item value
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function set_item($item, $value)
|
|
||||||
{
|
|
||||||
$this->config[$item] = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Assign to Config
|
|
||||||
*
|
|
||||||
* This function is called by the front controller (CodeIgniter.php)
|
|
||||||
* after the Config class is instantiated. It permits config items
|
|
||||||
* to be assigned or overriden by variables contained in the index.php file
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @param array
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function _assign_to_config($items = array())
|
|
||||||
{
|
|
||||||
if (is_array($items))
|
|
||||||
{
|
|
||||||
foreach ($items as $key => $val)
|
|
||||||
{
|
|
||||||
$this->set_item($key, $val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// END CI_Config class
|
|
||||||
|
|
||||||
/* End of file Config.php */
|
|
||||||
/* Location: ./system/core/Config.php */
|
|
|
@ -1,64 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/**
|
|
||||||
* CodeIgniter
|
|
||||||
*
|
|
||||||
* An open source application development framework for PHP 5.1.6 or newer
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
|
|
||||||
* @license http://codeigniter.com/user_guide/license.html
|
|
||||||
* @link http://codeigniter.com
|
|
||||||
* @since Version 1.0
|
|
||||||
* @filesource
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CodeIgniter Application Controller Class
|
|
||||||
*
|
|
||||||
* This class object is the super class that every library in
|
|
||||||
* CodeIgniter will be assigned to.
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @subpackage Libraries
|
|
||||||
* @category Libraries
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @link http://codeigniter.com/user_guide/general/controllers.html
|
|
||||||
*/
|
|
||||||
class CI_Controller {
|
|
||||||
|
|
||||||
private static $instance;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
self::$instance =& $this;
|
|
||||||
|
|
||||||
// Assign all the class objects that were instantiated by the
|
|
||||||
// bootstrap file (CodeIgniter.php) to local class variables
|
|
||||||
// so that CI can run as one big super object.
|
|
||||||
foreach (is_loaded() as $var => $class)
|
|
||||||
{
|
|
||||||
$this->$var =& load_class($class);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->load =& load_class('Loader', 'core');
|
|
||||||
|
|
||||||
$this->load->initialize();
|
|
||||||
|
|
||||||
log_message('debug', "Controller Class Initialized");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function &get_instance()
|
|
||||||
{
|
|
||||||
return self::$instance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// END Controller class
|
|
||||||
|
|
||||||
/* End of file Controller.php */
|
|
||||||
/* Location: ./system/core/Controller.php */
|
|
|
@ -1,193 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/**
|
|
||||||
* CodeIgniter
|
|
||||||
*
|
|
||||||
* An open source application development framework for PHP 5.1.6 or newer
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
|
|
||||||
* @license http://codeigniter.com/user_guide/license.html
|
|
||||||
* @link http://codeigniter.com
|
|
||||||
* @since Version 1.0
|
|
||||||
* @filesource
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Exceptions Class
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @subpackage Libraries
|
|
||||||
* @category Exceptions
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @link http://codeigniter.com/user_guide/libraries/exceptions.html
|
|
||||||
*/
|
|
||||||
class CI_Exceptions {
|
|
||||||
var $action;
|
|
||||||
var $severity;
|
|
||||||
var $message;
|
|
||||||
var $filename;
|
|
||||||
var $line;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Nesting level of the output buffering mechanism
|
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
* @access public
|
|
||||||
*/
|
|
||||||
var $ob_level;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List if available error levels
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
* @access public
|
|
||||||
*/
|
|
||||||
var $levels = array(
|
|
||||||
E_ERROR => 'Error',
|
|
||||||
E_WARNING => 'Warning',
|
|
||||||
E_PARSE => 'Parsing Error',
|
|
||||||
E_NOTICE => 'Notice',
|
|
||||||
E_CORE_ERROR => 'Core Error',
|
|
||||||
E_CORE_WARNING => 'Core Warning',
|
|
||||||
E_COMPILE_ERROR => 'Compile Error',
|
|
||||||
E_COMPILE_WARNING => 'Compile Warning',
|
|
||||||
E_USER_ERROR => 'User Error',
|
|
||||||
E_USER_WARNING => 'User Warning',
|
|
||||||
E_USER_NOTICE => 'User Notice',
|
|
||||||
E_STRICT => 'Runtime Notice'
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->ob_level = ob_get_level();
|
|
||||||
// Note: Do not log messages from this constructor.
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Exception Logger
|
|
||||||
*
|
|
||||||
* This function logs PHP generated error messages
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @param string the error severity
|
|
||||||
* @param string the error string
|
|
||||||
* @param string the error filepath
|
|
||||||
* @param string the error line number
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function log_exception($severity, $message, $filepath, $line)
|
|
||||||
{
|
|
||||||
$severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];
|
|
||||||
|
|
||||||
log_message('error', 'Severity: '.$severity.' --> '.$message. ' '.$filepath.' '.$line, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 404 Page Not Found Handler
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @param string the page
|
|
||||||
* @param bool log error yes/no
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function show_404($page = '', $log_error = TRUE)
|
|
||||||
{
|
|
||||||
$heading = "404 Page Not Found";
|
|
||||||
$message = "The page you requested was not found.";
|
|
||||||
|
|
||||||
// By default we log this, but allow a dev to skip it
|
|
||||||
if ($log_error)
|
|
||||||
{
|
|
||||||
log_message('error', '404 Page Not Found --> '.$page);
|
|
||||||
}
|
|
||||||
|
|
||||||
echo $this->show_error($heading, $message, 'error_404', 404);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* General Error Page
|
|
||||||
*
|
|
||||||
* This function takes an error message as input
|
|
||||||
* (either as a string or an array) and displays
|
|
||||||
* it using the specified template.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @param string the heading
|
|
||||||
* @param string the message
|
|
||||||
* @param string the template name
|
|
||||||
* @param int the status code
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function show_error($heading, $message, $template = 'error_general', $status_code = 500)
|
|
||||||
{
|
|
||||||
set_status_header($status_code);
|
|
||||||
|
|
||||||
$message = '<p>'.implode('</p><p>', ( ! is_array($message)) ? array($message) : $message).'</p>';
|
|
||||||
|
|
||||||
if (ob_get_level() > $this->ob_level + 1)
|
|
||||||
{
|
|
||||||
ob_end_flush();
|
|
||||||
}
|
|
||||||
ob_start();
|
|
||||||
include(APPPATH.'errors/'.$template.'.php');
|
|
||||||
$buffer = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
return $buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Native PHP error handler
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @param string the error severity
|
|
||||||
* @param string the error string
|
|
||||||
* @param string the error filepath
|
|
||||||
* @param string the error line number
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function show_php_error($severity, $message, $filepath, $line)
|
|
||||||
{
|
|
||||||
$severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];
|
|
||||||
|
|
||||||
$filepath = str_replace("\\", "/", $filepath);
|
|
||||||
|
|
||||||
// For safety reasons we do not show the full file path
|
|
||||||
if (FALSE !== strpos($filepath, '/'))
|
|
||||||
{
|
|
||||||
$x = explode('/', $filepath);
|
|
||||||
$filepath = $x[count($x)-2].'/'.end($x);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ob_get_level() > $this->ob_level + 1)
|
|
||||||
{
|
|
||||||
ob_end_flush();
|
|
||||||
}
|
|
||||||
ob_start();
|
|
||||||
include(APPPATH.'errors/error_php.php');
|
|
||||||
$buffer = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
echo $buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
// END Exceptions Class
|
|
||||||
|
|
||||||
/* End of file Exceptions.php */
|
|
||||||
/* Location: ./system/core/Exceptions.php */
|
|
|
@ -1,248 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/**
|
|
||||||
* CodeIgniter
|
|
||||||
*
|
|
||||||
* An open source application development framework for PHP 5.1.6 or newer
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
|
|
||||||
* @license http://codeigniter.com/user_guide/license.html
|
|
||||||
* @link http://codeigniter.com
|
|
||||||
* @since Version 1.0
|
|
||||||
* @filesource
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CodeIgniter Hooks Class
|
|
||||||
*
|
|
||||||
* Provides a mechanism to extend the base system without hacking.
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @subpackage Libraries
|
|
||||||
* @category Libraries
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @link http://codeigniter.com/user_guide/libraries/encryption.html
|
|
||||||
*/
|
|
||||||
class CI_Hooks {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines wether hooks are enabled
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
var $enabled = FALSE;
|
|
||||||
/**
|
|
||||||
* List of all hooks set in config/hooks.php
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
var $hooks = array();
|
|
||||||
/**
|
|
||||||
* Determines wether hook is in progress, used to prevent infinte loops
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
var $in_progress = FALSE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
function __construct()
|
|
||||||
{
|
|
||||||
$this->_initialize();
|
|
||||||
log_message('debug', "Hooks Class Initialized");
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize the Hooks Preferences
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function _initialize()
|
|
||||||
{
|
|
||||||
$CFG =& load_class('Config', 'core');
|
|
||||||
|
|
||||||
// If hooks are not enabled in the config file
|
|
||||||
// there is nothing else to do
|
|
||||||
|
|
||||||
if ($CFG->item('enable_hooks') == FALSE)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Grab the "hooks" definition file.
|
|
||||||
// If there are no hooks, we're done.
|
|
||||||
|
|
||||||
if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
|
|
||||||
{
|
|
||||||
include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
|
|
||||||
}
|
|
||||||
elseif (is_file(APPPATH.'config/hooks.php'))
|
|
||||||
{
|
|
||||||
include(APPPATH.'config/hooks.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ( ! isset($hook) OR ! is_array($hook))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->hooks =& $hook;
|
|
||||||
$this->enabled = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Call Hook
|
|
||||||
*
|
|
||||||
* Calls a particular hook
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @param string the hook name
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
function _call_hook($which = '')
|
|
||||||
{
|
|
||||||
if ( ! $this->enabled OR ! isset($this->hooks[$which]))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($this->hooks[$which][0]) AND is_array($this->hooks[$which][0]))
|
|
||||||
{
|
|
||||||
foreach ($this->hooks[$which] as $val)
|
|
||||||
{
|
|
||||||
$this->_run_hook($val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->_run_hook($this->hooks[$which]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run Hook
|
|
||||||
*
|
|
||||||
* Runs a particular hook
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @param array the hook details
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
function _run_hook($data)
|
|
||||||
{
|
|
||||||
if ( ! is_array($data))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------
|
|
||||||
// Safety - Prevents run-away loops
|
|
||||||
// -----------------------------------
|
|
||||||
|
|
||||||
// If the script being called happens to have the same
|
|
||||||
// hook call within it a loop can happen
|
|
||||||
|
|
||||||
if ($this->in_progress == TRUE)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------
|
|
||||||
// Set file path
|
|
||||||
// -----------------------------------
|
|
||||||
|
|
||||||
if ( ! isset($data['filepath']) OR ! isset($data['filename']))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
$filepath = APPPATH.$data['filepath'].'/'.$data['filename'];
|
|
||||||
|
|
||||||
if ( ! file_exists($filepath))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------
|
|
||||||
// Set class/function name
|
|
||||||
// -----------------------------------
|
|
||||||
|
|
||||||
$class = FALSE;
|
|
||||||
$function = FALSE;
|
|
||||||
$params = '';
|
|
||||||
|
|
||||||
if (isset($data['class']) AND $data['class'] != '')
|
|
||||||
{
|
|
||||||
$class = $data['class'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($data['function']))
|
|
||||||
{
|
|
||||||
$function = $data['function'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($data['params']))
|
|
||||||
{
|
|
||||||
$params = $data['params'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($class === FALSE AND $function === FALSE)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------
|
|
||||||
// Set the in_progress flag
|
|
||||||
// -----------------------------------
|
|
||||||
|
|
||||||
$this->in_progress = TRUE;
|
|
||||||
|
|
||||||
// -----------------------------------
|
|
||||||
// Call the requested class and/or function
|
|
||||||
// -----------------------------------
|
|
||||||
|
|
||||||
if ($class !== FALSE)
|
|
||||||
{
|
|
||||||
if ( ! class_exists($class))
|
|
||||||
{
|
|
||||||
require($filepath);
|
|
||||||
}
|
|
||||||
|
|
||||||
$HOOK = new $class;
|
|
||||||
$HOOK->$function($params);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( ! function_exists($function))
|
|
||||||
{
|
|
||||||
require($filepath);
|
|
||||||
}
|
|
||||||
|
|
||||||
$function($params);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->in_progress = FALSE;
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// END CI_Hooks class
|
|
||||||
|
|
||||||
/* End of file Hooks.php */
|
|
||||||
/* Location: ./system/core/Hooks.php */
|
|
|
@ -1,849 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/**
|
|
||||||
* CodeIgniter
|
|
||||||
*
|
|
||||||
* An open source application development framework for PHP 5.1.6 or newer
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
|
|
||||||
* @license http://codeigniter.com/user_guide/license.html
|
|
||||||
* @link http://codeigniter.com
|
|
||||||
* @since Version 1.0
|
|
||||||
* @filesource
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Input Class
|
|
||||||
*
|
|
||||||
* Pre-processes global input data for security
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @subpackage Libraries
|
|
||||||
* @category Input
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @link http://codeigniter.com/user_guide/libraries/input.html
|
|
||||||
*/
|
|
||||||
class CI_Input {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* IP address of the current user
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
var $ip_address = FALSE;
|
|
||||||
/**
|
|
||||||
* user agent (web browser) being used by the current user
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
var $user_agent = FALSE;
|
|
||||||
/**
|
|
||||||
* If FALSE, then $_GET will be set to an empty array
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
var $_allow_get_array = TRUE;
|
|
||||||
/**
|
|
||||||
* If TRUE, then newlines are standardized
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
var $_standardize_newlines = TRUE;
|
|
||||||
/**
|
|
||||||
* Determines whether the XSS filter is always active when GET, POST or COOKIE data is encountered
|
|
||||||
* Set automatically based on config setting
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
var $_enable_xss = FALSE;
|
|
||||||
/**
|
|
||||||
* Enables a CSRF cookie token to be set.
|
|
||||||
* Set automatically based on config setting
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
var $_enable_csrf = FALSE;
|
|
||||||
/**
|
|
||||||
* List of all HTTP request headers
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $headers = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*
|
|
||||||
* Sets whether to globally enable the XSS processing
|
|
||||||
* and whether to allow the $_GET array
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
log_message('debug', "Input Class Initialized");
|
|
||||||
|
|
||||||
$this->_allow_get_array = (config_item('allow_get_array') === TRUE);
|
|
||||||
$this->_enable_xss = (config_item('global_xss_filtering') === TRUE);
|
|
||||||
$this->_enable_csrf = (config_item('csrf_protection') === TRUE);
|
|
||||||
|
|
||||||
global $SEC;
|
|
||||||
$this->security =& $SEC;
|
|
||||||
|
|
||||||
// Do we need the UTF-8 class?
|
|
||||||
if (UTF8_ENABLED === TRUE)
|
|
||||||
{
|
|
||||||
global $UNI;
|
|
||||||
$this->uni =& $UNI;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sanitize global arrays
|
|
||||||
$this->_sanitize_globals();
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch from array
|
|
||||||
*
|
|
||||||
* This is a helper function to retrieve values from global arrays
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @param array
|
|
||||||
* @param string
|
|
||||||
* @param bool
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function _fetch_from_array(&$array, $index = '', $xss_clean = FALSE)
|
|
||||||
{
|
|
||||||
if ( ! isset($array[$index]))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($xss_clean === TRUE)
|
|
||||||
{
|
|
||||||
return $this->security->xss_clean($array[$index]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $array[$index];
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch an item from the GET array
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string
|
|
||||||
* @param bool
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function get($index = NULL, $xss_clean = FALSE)
|
|
||||||
{
|
|
||||||
// Check if a field has been provided
|
|
||||||
if ($index === NULL AND ! empty($_GET))
|
|
||||||
{
|
|
||||||
$get = array();
|
|
||||||
|
|
||||||
// loop through the full _GET array
|
|
||||||
foreach (array_keys($_GET) as $key)
|
|
||||||
{
|
|
||||||
$get[$key] = $this->_fetch_from_array($_GET, $key, $xss_clean);
|
|
||||||
}
|
|
||||||
return $get;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->_fetch_from_array($_GET, $index, $xss_clean);
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch an item from the POST array
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string
|
|
||||||
* @param bool
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function post($index = NULL, $xss_clean = FALSE)
|
|
||||||
{
|
|
||||||
// Check if a field has been provided
|
|
||||||
if ($index === NULL AND ! empty($_POST))
|
|
||||||
{
|
|
||||||
$post = array();
|
|
||||||
|
|
||||||
// Loop through the full _POST array and return it
|
|
||||||
foreach (array_keys($_POST) as $key)
|
|
||||||
{
|
|
||||||
$post[$key] = $this->_fetch_from_array($_POST, $key, $xss_clean);
|
|
||||||
}
|
|
||||||
return $post;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->_fetch_from_array($_POST, $index, $xss_clean);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch an item from either the GET array or the POST
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string The index key
|
|
||||||
* @param bool XSS cleaning
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function get_post($index = '', $xss_clean = FALSE)
|
|
||||||
{
|
|
||||||
if ( ! isset($_POST[$index]) )
|
|
||||||
{
|
|
||||||
return $this->get($index, $xss_clean);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return $this->post($index, $xss_clean);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch an item from the COOKIE array
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string
|
|
||||||
* @param bool
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function cookie($index = '', $xss_clean = FALSE)
|
|
||||||
{
|
|
||||||
return $this->_fetch_from_array($_COOKIE, $index, $xss_clean);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set cookie
|
|
||||||
*
|
|
||||||
* Accepts six parameter, or you can submit an associative
|
|
||||||
* array in the first parameter containing all the values.
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param mixed
|
|
||||||
* @param string the value of the cookie
|
|
||||||
* @param string the number of seconds until expiration
|
|
||||||
* @param string the cookie domain. Usually: .yourdomain.com
|
|
||||||
* @param string the cookie path
|
|
||||||
* @param string the cookie prefix
|
|
||||||
* @param bool true makes the cookie secure
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE)
|
|
||||||
{
|
|
||||||
if (is_array($name))
|
|
||||||
{
|
|
||||||
// always leave 'name' in last place, as the loop will break otherwise, due to $$item
|
|
||||||
foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'secure', 'name') as $item)
|
|
||||||
{
|
|
||||||
if (isset($name[$item]))
|
|
||||||
{
|
|
||||||
$$item = $name[$item];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($prefix == '' AND config_item('cookie_prefix') != '')
|
|
||||||
{
|
|
||||||
$prefix = config_item('cookie_prefix');
|
|
||||||
}
|
|
||||||
if ($domain == '' AND config_item('cookie_domain') != '')
|
|
||||||
{
|
|
||||||
$domain = config_item('cookie_domain');
|
|
||||||
}
|
|
||||||
if ($path == '/' AND config_item('cookie_path') != '/')
|
|
||||||
{
|
|
||||||
$path = config_item('cookie_path');
|
|
||||||
}
|
|
||||||
if ($secure == FALSE AND config_item('cookie_secure') != FALSE)
|
|
||||||
{
|
|
||||||
$secure = config_item('cookie_secure');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! is_numeric($expire))
|
|
||||||
{
|
|
||||||
$expire = time() - 86500;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$expire = ($expire > 0) ? time() + $expire : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
setcookie($prefix.$name, $value, $expire, $path, $domain, $secure);
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch an item from the SERVER array
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string
|
|
||||||
* @param bool
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function server($index = '', $xss_clean = FALSE)
|
|
||||||
{
|
|
||||||
return $this->_fetch_from_array($_SERVER, $index, $xss_clean);
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch the IP Address
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function ip_address()
|
|
||||||
{
|
|
||||||
if ($this->ip_address !== FALSE)
|
|
||||||
{
|
|
||||||
return $this->ip_address;
|
|
||||||
}
|
|
||||||
|
|
||||||
$proxy_ips = config_item('proxy_ips');
|
|
||||||
if ( ! empty($proxy_ips))
|
|
||||||
{
|
|
||||||
$proxy_ips = explode(',', str_replace(' ', '', $proxy_ips));
|
|
||||||
foreach (array('HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'HTTP_X_CLIENT_IP', 'HTTP_X_CLUSTER_CLIENT_IP') as $header)
|
|
||||||
{
|
|
||||||
if (($spoof = $this->server($header)) !== FALSE)
|
|
||||||
{
|
|
||||||
// Some proxies typically list the whole chain of IP
|
|
||||||
// addresses through which the client has reached us.
|
|
||||||
// e.g. client_ip, proxy_ip1, proxy_ip2, etc.
|
|
||||||
if (strpos($spoof, ',') !== FALSE)
|
|
||||||
{
|
|
||||||
$spoof = explode(',', $spoof, 2);
|
|
||||||
$spoof = $spoof[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! $this->valid_ip($spoof))
|
|
||||||
{
|
|
||||||
$spoof = FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->ip_address = ($spoof !== FALSE && in_array($_SERVER['REMOTE_ADDR'], $proxy_ips, TRUE))
|
|
||||||
? $spoof : $_SERVER['REMOTE_ADDR'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->ip_address = $_SERVER['REMOTE_ADDR'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! $this->valid_ip($this->ip_address))
|
|
||||||
{
|
|
||||||
$this->ip_address = '0.0.0.0';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->ip_address;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Validate IP Address
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string
|
|
||||||
* @param string ipv4 or ipv6
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function valid_ip($ip, $which = '')
|
|
||||||
{
|
|
||||||
$which = strtolower($which);
|
|
||||||
|
|
||||||
// First check if filter_var is available
|
|
||||||
if (is_callable('filter_var'))
|
|
||||||
{
|
|
||||||
switch ($which) {
|
|
||||||
case 'ipv4':
|
|
||||||
$flag = FILTER_FLAG_IPV4;
|
|
||||||
break;
|
|
||||||
case 'ipv6':
|
|
||||||
$flag = FILTER_FLAG_IPV6;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$flag = '';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (bool) filter_var($ip, FILTER_VALIDATE_IP, $flag);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($which !== 'ipv6' && $which !== 'ipv4')
|
|
||||||
{
|
|
||||||
if (strpos($ip, ':') !== FALSE)
|
|
||||||
{
|
|
||||||
$which = 'ipv6';
|
|
||||||
}
|
|
||||||
elseif (strpos($ip, '.') !== FALSE)
|
|
||||||
{
|
|
||||||
$which = 'ipv4';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$func = '_valid_'.$which;
|
|
||||||
return $this->$func($ip);
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Validate IPv4 Address
|
|
||||||
*
|
|
||||||
* Updated version suggested by Geert De Deckere
|
|
||||||
*
|
|
||||||
* @access protected
|
|
||||||
* @param string
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
protected function _valid_ipv4($ip)
|
|
||||||
{
|
|
||||||
$ip_segments = explode('.', $ip);
|
|
||||||
|
|
||||||
// Always 4 segments needed
|
|
||||||
if (count($ip_segments) !== 4)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
// IP can not start with 0
|
|
||||||
if ($ip_segments[0][0] == '0')
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check each segment
|
|
||||||
foreach ($ip_segments as $segment)
|
|
||||||
{
|
|
||||||
// IP segments must be digits and can not be
|
|
||||||
// longer than 3 digits or greater then 255
|
|
||||||
if ($segment == '' OR preg_match("/[^0-9]/", $segment) OR $segment > 255 OR strlen($segment) > 3)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Validate IPv6 Address
|
|
||||||
*
|
|
||||||
* @access protected
|
|
||||||
* @param string
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
protected function _valid_ipv6($str)
|
|
||||||
{
|
|
||||||
// 8 groups, separated by :
|
|
||||||
// 0-ffff per group
|
|
||||||
// one set of consecutive 0 groups can be collapsed to ::
|
|
||||||
|
|
||||||
$groups = 8;
|
|
||||||
$collapsed = FALSE;
|
|
||||||
|
|
||||||
$chunks = array_filter(
|
|
||||||
preg_split('/(:{1,2})/', $str, NULL, PREG_SPLIT_DELIM_CAPTURE)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Rule out easy nonsense
|
|
||||||
if (current($chunks) == ':' OR end($chunks) == ':')
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// PHP supports IPv4-mapped IPv6 addresses, so we'll expect those as well
|
|
||||||
if (strpos(end($chunks), '.') !== FALSE)
|
|
||||||
{
|
|
||||||
$ipv4 = array_pop($chunks);
|
|
||||||
|
|
||||||
if ( ! $this->_valid_ipv4($ipv4))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
$groups--;
|
|
||||||
}
|
|
||||||
|
|
||||||
while ($seg = array_pop($chunks))
|
|
||||||
{
|
|
||||||
if ($seg[0] == ':')
|
|
||||||
{
|
|
||||||
if (--$groups == 0)
|
|
||||||
{
|
|
||||||
return FALSE; // too many groups
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen($seg) > 2)
|
|
||||||
{
|
|
||||||
return FALSE; // long separator
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($seg == '::')
|
|
||||||
{
|
|
||||||
if ($collapsed)
|
|
||||||
{
|
|
||||||
return FALSE; // multiple collapsed
|
|
||||||
}
|
|
||||||
|
|
||||||
$collapsed = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif (preg_match("/[^0-9a-f]/i", $seg) OR strlen($seg) > 4)
|
|
||||||
{
|
|
||||||
return FALSE; // invalid segment
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $collapsed OR $groups == 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* User Agent
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function user_agent()
|
|
||||||
{
|
|
||||||
if ($this->user_agent !== FALSE)
|
|
||||||
{
|
|
||||||
return $this->user_agent;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->user_agent = ( ! isset($_SERVER['HTTP_USER_AGENT'])) ? FALSE : $_SERVER['HTTP_USER_AGENT'];
|
|
||||||
|
|
||||||
return $this->user_agent;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sanitize Globals
|
|
||||||
*
|
|
||||||
* This function does the following:
|
|
||||||
*
|
|
||||||
* Unsets $_GET data (if query strings are not enabled)
|
|
||||||
*
|
|
||||||
* Unsets all globals if register_globals is enabled
|
|
||||||
*
|
|
||||||
* Standardizes newline characters to \n
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function _sanitize_globals()
|
|
||||||
{
|
|
||||||
// It would be "wrong" to unset any of these GLOBALS.
|
|
||||||
$protected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST',
|
|
||||||
'_SESSION', '_ENV', 'GLOBALS', 'HTTP_RAW_POST_DATA',
|
|
||||||
'system_folder', 'application_folder', 'BM', 'EXT',
|
|
||||||
'CFG', 'URI', 'RTR', 'OUT', 'IN');
|
|
||||||
|
|
||||||
// Unset globals for securiy.
|
|
||||||
// This is effectively the same as register_globals = off
|
|
||||||
foreach (array($_GET, $_POST, $_COOKIE) as $global)
|
|
||||||
{
|
|
||||||
if ( ! is_array($global))
|
|
||||||
{
|
|
||||||
if ( ! in_array($global, $protected))
|
|
||||||
{
|
|
||||||
global $$global;
|
|
||||||
$$global = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach ($global as $key => $val)
|
|
||||||
{
|
|
||||||
if ( ! in_array($key, $protected))
|
|
||||||
{
|
|
||||||
global $$key;
|
|
||||||
$$key = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Is $_GET data allowed? If not we'll set the $_GET to an empty array
|
|
||||||
if ($this->_allow_get_array == FALSE)
|
|
||||||
{
|
|
||||||
$_GET = array();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (is_array($_GET) AND count($_GET) > 0)
|
|
||||||
{
|
|
||||||
foreach ($_GET as $key => $val)
|
|
||||||
{
|
|
||||||
$_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean $_POST Data
|
|
||||||
if (is_array($_POST) AND count($_POST) > 0)
|
|
||||||
{
|
|
||||||
foreach ($_POST as $key => $val)
|
|
||||||
{
|
|
||||||
$_POST[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean $_COOKIE Data
|
|
||||||
if (is_array($_COOKIE) AND count($_COOKIE) > 0)
|
|
||||||
{
|
|
||||||
// Also get rid of specially treated cookies that might be set by a server
|
|
||||||
// or silly application, that are of no use to a CI application anyway
|
|
||||||
// but that when present will trip our 'Disallowed Key Characters' alarm
|
|
||||||
// http://www.ietf.org/rfc/rfc2109.txt
|
|
||||||
// note that the key names below are single quoted strings, and are not PHP variables
|
|
||||||
unset($_COOKIE['$Version']);
|
|
||||||
unset($_COOKIE['$Path']);
|
|
||||||
unset($_COOKIE['$Domain']);
|
|
||||||
|
|
||||||
foreach ($_COOKIE as $key => $val)
|
|
||||||
{
|
|
||||||
$_COOKIE[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sanitize PHP_SELF
|
|
||||||
$_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);
|
|
||||||
|
|
||||||
|
|
||||||
// CSRF Protection check on HTTP requests
|
|
||||||
if ($this->_enable_csrf == TRUE && ! $this->is_cli_request())
|
|
||||||
{
|
|
||||||
$this->security->csrf_verify();
|
|
||||||
}
|
|
||||||
|
|
||||||
log_message('debug', "Global POST and COOKIE data sanitized");
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean Input Data
|
|
||||||
*
|
|
||||||
* This is a helper function. It escapes data and
|
|
||||||
* standardizes newline characters to \n
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @param string
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function _clean_input_data($str)
|
|
||||||
{
|
|
||||||
if (is_array($str))
|
|
||||||
{
|
|
||||||
$new_array = array();
|
|
||||||
foreach ($str as $key => $val)
|
|
||||||
{
|
|
||||||
$new_array[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
|
|
||||||
}
|
|
||||||
return $new_array;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We strip slashes if magic quotes is on to keep things consistent
|
|
||||||
|
|
||||||
NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and
|
|
||||||
it will probably not exist in future versions at all.
|
|
||||||
*/
|
|
||||||
if ( ! is_php('5.4') && get_magic_quotes_gpc())
|
|
||||||
{
|
|
||||||
$str = stripslashes($str);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean UTF-8 if supported
|
|
||||||
if (UTF8_ENABLED === TRUE)
|
|
||||||
{
|
|
||||||
$str = $this->uni->clean_string($str);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove control characters
|
|
||||||
$str = remove_invisible_characters($str);
|
|
||||||
|
|
||||||
// Should we filter the input data?
|
|
||||||
if ($this->_enable_xss === TRUE)
|
|
||||||
{
|
|
||||||
$str = $this->security->xss_clean($str);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Standardize newlines if needed
|
|
||||||
if ($this->_standardize_newlines == TRUE)
|
|
||||||
{
|
|
||||||
if (strpos($str, "\r") !== FALSE)
|
|
||||||
{
|
|
||||||
$str = str_replace(array("\r\n", "\r", "\r\n\n"), PHP_EOL, $str);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $str;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean Keys
|
|
||||||
*
|
|
||||||
* This is a helper function. To prevent malicious users
|
|
||||||
* from trying to exploit keys we make sure that keys are
|
|
||||||
* only named with alpha-numeric text and a few other items.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @param string
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function _clean_input_keys($str)
|
|
||||||
{
|
|
||||||
if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str))
|
|
||||||
{
|
|
||||||
exit('Disallowed Key Characters.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean UTF-8 if supported
|
|
||||||
if (UTF8_ENABLED === TRUE)
|
|
||||||
{
|
|
||||||
$str = $this->uni->clean_string($str);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $str;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Request Headers
|
|
||||||
*
|
|
||||||
* In Apache, you can simply call apache_request_headers(), however for
|
|
||||||
* people running other webservers the function is undefined.
|
|
||||||
*
|
|
||||||
* @param bool XSS cleaning
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function request_headers($xss_clean = FALSE)
|
|
||||||
{
|
|
||||||
// Look at Apache go!
|
|
||||||
if (function_exists('apache_request_headers'))
|
|
||||||
{
|
|
||||||
$headers = apache_request_headers();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$headers['Content-Type'] = (isset($_SERVER['CONTENT_TYPE'])) ? $_SERVER['CONTENT_TYPE'] : @getenv('CONTENT_TYPE');
|
|
||||||
|
|
||||||
foreach ($_SERVER as $key => $val)
|
|
||||||
{
|
|
||||||
if (strncmp($key, 'HTTP_', 5) === 0)
|
|
||||||
{
|
|
||||||
$headers[substr($key, 5)] = $this->_fetch_from_array($_SERVER, $key, $xss_clean);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// take SOME_HEADER and turn it into Some-Header
|
|
||||||
foreach ($headers as $key => $val)
|
|
||||||
{
|
|
||||||
$key = str_replace('_', ' ', strtolower($key));
|
|
||||||
$key = str_replace(' ', '-', ucwords($key));
|
|
||||||
|
|
||||||
$this->headers[$key] = $val;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->headers;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get Request Header
|
|
||||||
*
|
|
||||||
* Returns the value of a single member of the headers class member
|
|
||||||
*
|
|
||||||
* @param string array key for $this->headers
|
|
||||||
* @param boolean XSS Clean or not
|
|
||||||
* @return mixed FALSE on failure, string on success
|
|
||||||
*/
|
|
||||||
public function get_request_header($index, $xss_clean = FALSE)
|
|
||||||
{
|
|
||||||
if (empty($this->headers))
|
|
||||||
{
|
|
||||||
$this->request_headers();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! isset($this->headers[$index]))
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($xss_clean === TRUE)
|
|
||||||
{
|
|
||||||
return $this->security->xss_clean($this->headers[$index]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->headers[$index];
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Is ajax Request?
|
|
||||||
*
|
|
||||||
* Test to see if a request contains the HTTP_X_REQUESTED_WITH header
|
|
||||||
*
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function is_ajax_request()
|
|
||||||
{
|
|
||||||
return ($this->server('HTTP_X_REQUESTED_WITH') === 'XMLHttpRequest');
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Is cli Request?
|
|
||||||
*
|
|
||||||
* Test to see if a request was made from the command line
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function is_cli_request()
|
|
||||||
{
|
|
||||||
return (php_sapi_name() === 'cli' OR defined('STDIN'));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End of file Input.php */
|
|
||||||
/* Location: ./system/core/Input.php */
|
|
|
@ -1,160 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
/**
|
|
||||||
* CodeIgniter
|
|
||||||
*
|
|
||||||
* An open source application development framework for PHP 5.1.6 or newer
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
|
|
||||||
* @license http://codeigniter.com/user_guide/license.html
|
|
||||||
* @link http://codeigniter.com
|
|
||||||
* @since Version 1.0
|
|
||||||
* @filesource
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Language Class
|
|
||||||
*
|
|
||||||
* @package CodeIgniter
|
|
||||||
* @subpackage Libraries
|
|
||||||
* @category Language
|
|
||||||
* @author ExpressionEngine Dev Team
|
|
||||||
* @link http://codeigniter.com/user_guide/libraries/language.html
|
|
||||||
*/
|
|
||||||
class CI_Lang {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of translations
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
var $language = array();
|
|
||||||
/**
|
|
||||||
* List of loaded language files
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
var $is_loaded = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
*/
|
|
||||||
function __construct()
|
|
||||||
{
|
|
||||||
log_message('debug', "Language Class Initialized");
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load a language file
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param mixed the name of the language file to be loaded. Can be an array
|
|
||||||
* @param string the language (english, etc.)
|
|
||||||
* @param bool return loaded array of translations
|
|
||||||
* @param bool add suffix to $langfile
|
|
||||||
* @param string alternative path to look for language file
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
function load($langfile = '', $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '')
|
|
||||||
{
|
|
||||||
$langfile = str_replace('.php', '', $langfile);
|
|
||||||
|
|
||||||
if ($add_suffix == TRUE)
|
|
||||||
{
|
|
||||||
$langfile = str_replace('_lang.', '', $langfile).'_lang';
|
|
||||||
}
|
|
||||||
|
|
||||||
$langfile .= '.php';
|
|
||||||
|
|
||||||
if (in_array($langfile, $this->is_loaded, TRUE))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$config =& get_config();
|
|
||||||
|
|
||||||
if ($idiom == '')
|
|
||||||
{
|
|
||||||
$deft_lang = ( ! isset($config['language'])) ? 'english' : $config['language'];
|
|
||||||
$idiom = ($deft_lang == '') ? 'english' : $deft_lang;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine where the language file is and load it
|
|
||||||
if ($alt_path != '' && file_exists($alt_path.'language/'.$idiom.'/'.$langfile))
|
|
||||||
{
|
|
||||||
include($alt_path.'language/'.$idiom.'/'.$langfile);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$found = FALSE;
|
|
||||||
|
|
||||||
foreach (get_instance()->load->get_package_paths(TRUE) as $package_path)
|
|
||||||
{
|
|
||||||
if (file_exists($package_path.'language/'.$idiom.'/'.$langfile))
|
|
||||||
{
|
|
||||||
include($package_path.'language/'.$idiom.'/'.$langfile);
|
|
||||||
$found = TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($found !== TRUE)
|
|
||||||
{
|
|
||||||
show_error('Unable to load the requested language file: language/'.$idiom.'/'.$langfile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ( ! isset($lang))
|
|
||||||
{
|
|
||||||
log_message('error', 'Language file contains no data: language/'.$idiom.'/'.$langfile);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($return == TRUE)
|
|
||||||
{
|
|
||||||
return $lang;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->is_loaded[] = $langfile;
|
|
||||||
$this->language = array_merge($this->language, $lang);
|
|
||||||
unset($lang);
|
|
||||||
|
|
||||||
log_message('debug', 'Language file loaded: language/'.$idiom.'/'.$langfile);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetch a single line of text from the language array
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param string $line the language line
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function line($line = '')
|
|
||||||
{
|
|
||||||
$value = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line];
|
|
||||||
|
|
||||||
// Because killer robots like unicorns!
|
|
||||||
if ($value === FALSE)
|
|
||||||
{
|
|
||||||
log_message('error', 'Could not find the language line "'.$line.'"');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
// END Language Class
|
|
||||||
|
|
||||||
/* End of file Lang.php */
|
|
||||||
/* Location: ./system/core/Lang.php */
|
|