2023-01-14
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
ini_set('display_errors', 1 );
|
||||
ini_set('display_errors', 0 );
|
||||
/*require_once MYDIR . '/api/php/db.php';
|
||||
require_once MYDIR . '/api/php/clean.php';*/
|
||||
if (file_exists('api/modules/' . $_GET['id'] . '/ajax.php')) require_once 'api/modules/' . $_GET['id'] . '/ajax.php';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Берем рандомные 10 товаров.....
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
$rndTovar = \DB::getAll( 'SELECT * FROM `tovar` WHERE `artikul`<>"" ORDER BY RANDOM() LIMIT 10' );
|
||||
$rndTovar = \DB::getAll( 'SELECT * FROM `tovar` WHERE `artikul`<>"" ORDER BY RAND() LIMIT 10' );
|
||||
for ( $i=0; $i < count( $rndTovar ); $i++ ) {
|
||||
$rndTovar[$i]['cena'] = \DB::getValue( "SELECT `cena` FROM `tovar_price_history` WHERE `tovar_id`=? ORDER BY `t` DESC LIMIT 1", $rndTovar[$i]['id'] );
|
||||
$rndTovar[$i]['img'] = \DB::getValue( "SELECT `filename` FROM `tovar_img` WHERE `tovar_id`=? LIMIT 1", $rndTovar[$i]['id'] );
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
<?php
|
||||
class main extends MySQL{
|
||||
//var $db; // Здесь объект для работы с MySQL
|
||||
var $id;
|
||||
/*function __construct($smarty, $settings){
|
||||
@mkdir(MYDIR . '/img/pages_cat', 0700);
|
||||
@mkdir(MYDIR . '/img/pages_cat/slider', 0700);
|
||||
@mkdir(MYDIR . '/img/pages_cat/slider/' . ID, 0700);
|
||||
/*
|
||||
Создаем каталог под файлы раздела и определяемся с кэшем
|
||||
*/
|
||||
/* @mkdir (MYDIR . '/img/slider/' . ID, 0700);
|
||||
if( $settings['cachePage'] > 0 ){
|
||||
if( !@$_SESSION['user_id'] ) { /* если не авторизован - кешируем на часок */
|
||||
/* $smarty -> caching = true;
|
||||
$smarty -> cache_lifetime = $settings['cachePage'];
|
||||
}
|
||||
}
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------------------------------------- */
|
||||
function get_info( $id ){ // получаем информацию о категории
|
||||
$a['id'] = $id;
|
||||
//$db = $this -> db;
|
||||
$postrow = $this -> get_massiv ( 'pages', $a );
|
||||
return $postrow;
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------------------------------------- */
|
||||
function get_sub_cats( $id, $tip ){ // Получаем страницы
|
||||
//$this -> debug = 2;
|
||||
//$db = $this -> db;
|
||||
$sql='SELECT * FROM `pages` WHERE `public` = "1" AND `tip` = "' . $tip . '" AND `parent` = "' . $id . '" ORDER BY `txt`';
|
||||
$postrow = $this -> free_sql( $sql );
|
||||
//print_r($postrow);
|
||||
$num = count($postrow);
|
||||
for($i = 0; $i < $num; $i++){
|
||||
//парсим json
|
||||
$j = $this -> from_j( $postrow[$i]['json'] );
|
||||
foreach ( $j as $key => $value ){ $postrow[$i][$key] = $value;}
|
||||
//Получаем фото
|
||||
$a['page_id']=$postrow[$i]['id'];
|
||||
$postrow[$i]['img']=$this->get_val('img', $a, 'fileName');
|
||||
}
|
||||
|
||||
|
||||
//print_r( $postrow );
|
||||
return $postrow;
|
||||
}
|
||||
/* ------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
function breadcrumb( $id ){ // Получаем страницы
|
||||
//хлебные крошки
|
||||
$p=ID;
|
||||
while ($p!=0){
|
||||
unset($tmp);
|
||||
unset($a);
|
||||
$a['id']=$p;
|
||||
$tmp=$db->get_massiv('m_groupe', $a, 'id', 1);
|
||||
$p=$tmp[0]['parent'];
|
||||
if (ID!=$tmp[0]['id'])$breadcrumb= '<li class="breadcrumb-item"><a href="/tovar_cat/' . $tmp[0]['id'] . '" style="font-size: 10pt;">' . $tmp[0]['naim'] . '</a></li>' . $breadcrumb;
|
||||
}
|
||||
$smarty -> assign( 'breadcrumb', $breadcrumb);
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -1,8 +1,20 @@
|
|||
<?php
|
||||
ini_set('display_errors', 0 );
|
||||
function ekr ($text) { // ФУНКЦИЯ очистки кода
|
||||
|
||||
$old1 = array(" ");#Ищем вредное ">",, "<"
|
||||
|
||||
$new1 = array("%");#Меняем на полезное">", , "<"
|
||||
|
||||
$text = str_replace($old1, $new1, $text);#Собсно сама замена =)
|
||||
|
||||
return $text; }
|
||||
|
||||
|
||||
|
||||
|
||||
$massiv=\DB::getAll(
|
||||
"SELECT * FROM `tovar` WHERE (`id`=? OR `title` LIKE '%" . $_POST['txt'] . "%' OR `txt` LIKE '%" . $_POST['txt'] . "%' OR `artikul`=?) AND `status`=1",
|
||||
"SELECT * FROM `tovar` WHERE (`id`=? OR `title` LIKE '%" . ekr( $_POST['txt'] ) . "%' OR `txt` LIKE '%" . ekr( $_POST['txt'] ) . "%' OR `artikul`=?) AND `status`=1",
|
||||
array( $_POST['txt'], $_POST['txt'] ) );
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
ini_set('display_errors', 0 );
|
||||
ini_set('display_errors', 0);
|
||||
|
||||
/*
|
||||
20.11.2017 добавлен поиск по алиасу (ЧПУ) /alias.html
|
||||
|
@ -10,15 +10,15 @@ ini_set('display_errors', 0 );
|
|||
*/
|
||||
//print_r($_SESSION);
|
||||
|
||||
$mod = new main(BD_NAME, BD_TYPE, BD_HOST, BD_USER, BD_PWD, MOD);
|
||||
//$mod->db=$db;
|
||||
$page = $mod->get_page(ID);
|
||||
|
||||
//$mod->db=$db;
|
||||
$page = \DB::getAll("SELECT * FROM `pages` WHERE `id`=? LIMIT 1", $_GET['id']);
|
||||
if ($page[0]['status']==0)header( 'Location: /403/' );
|
||||
|
||||
$page[0]['date']=date('d.m.Y', $page[0]['t']);
|
||||
$smarty->assign('page', $page);
|
||||
//print_r($page);
|
||||
|
||||
/*
|
||||
//Получаем данные о категории
|
||||
if ( $page[0]['parent'] !=0 ) $cat_info = $mod -> get_cat_info ( $page[0]['parent'] );
|
||||
|
||||
|
@ -57,5 +57,5 @@ unset($c);
|
|||
$db -> or_by_desc = '';
|
||||
$c['page_id']=$page[0]['id'];
|
||||
|
||||
|
||||
*/
|
||||
?>
|
|
@ -66,7 +66,7 @@
|
|||
<!-- Категории -->
|
||||
{include file=$cat_list massiv=$categoryList}
|
||||
<!-- Страницы -->
|
||||
{include file=$pages_list massiv=$pages}
|
||||
{include file=$pages_list massiv=$pagesList}
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-8-2">
|
||||
|
|
|
@ -40,7 +40,17 @@ $_GET['id'] = ( $_GET['id'] ) ? $_GET['id'] : 0;
|
|||
//echo $category;
|
||||
$categoryList = \DB::getAll("SELECT * FROM `pages_category` WHERE `category`=? ORDER BY `title`", $_GET['id']);
|
||||
$smarty -> assign( 'categoryList', $categoryList );//Получаем все опубликованные категории для модалки добавления и изменения категорий
|
||||
//print_r($categoryList);
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
07.01.2023
|
||||
Получаем список страниц
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
$pagesList = \DB::getAll("SELECT * FROM `pages` WHERE `category`=? ORDER BY `title`", $_GET['id']);
|
||||
$smarty -> assign( 'pagesList', $pagesList );//Получаем все опубликованные категории для модалки добавления и изменения категорий
|
||||
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
07.10.2022
|
||||
Подключаемые области
|
||||
|
@ -51,68 +61,4 @@ $smarty -> assign( 'modal_new_cat', 'api/modules/' . MOD . '/modal_new_cat.html'
|
|||
$smarty -> assign( 'modal_del_page', 'api/modules/' . MOD . '/modal_del_page.html' );
|
||||
|
||||
|
||||
//узнавалка текущей категории
|
||||
unset($b);
|
||||
unset($a);
|
||||
$b['id']=ID;
|
||||
|
||||
|
||||
/* вынести эту партанку в класс */
|
||||
/*
|
||||
if (ID){
|
||||
$a['parent']=ID;
|
||||
//узнаем вышестоящий каталог...
|
||||
unset($b);
|
||||
$b['id']=ID;
|
||||
$db -> get_val('pages', $b, 'parent');
|
||||
$parent=$db->result;
|
||||
if ($parent>0)$smarty -> assign( 'parent', $parent );
|
||||
}else{
|
||||
$a['parent']=0;
|
||||
}
|
||||
|
||||
|
||||
$a['tip']='category';
|
||||
|
||||
$a['user_id']=$_SESSION['user_id'];
|
||||
unset($cats);
|
||||
//$cats = $db -> get_massiv ( 'pages', $a );
|
||||
*/
|
||||
/*
|
||||
$num=count($cats);
|
||||
for($i = 0; $i < $num; $i++){
|
||||
if ($cats[$i]['id']){
|
||||
unset($b);
|
||||
$tmp=$db->from_j($db->clear_json($cats[$i]['json'])); //строку в джейсона в массив
|
||||
$db->to_log($db->clear_json($cats[$i]['json']));
|
||||
foreach ( $tmp as $key => $value ) $cats[$i][$key] = $value;
|
||||
unset($tmp);
|
||||
}
|
||||
}
|
||||
|
||||
//print_r($cats);
|
||||
|
||||
$smarty -> assign( 'cats', $cats );
|
||||
|
||||
|
||||
//получаем список страниц
|
||||
//echo ("test1");
|
||||
$pages = $mod -> get_pages('page', ID);
|
||||
|
||||
|
||||
|
||||
$smarty -> assign( 'pages', $pages );//список страниц
|
||||
|
||||
//$smarty -> assign( 'cat_id', ID );//ИД категории
|
||||
|
||||
|
||||
$smarty -> assign( 'all_cats', $mod->get_all_cats() );//Получаем все опубликованные категории для модалки добавления и изменения категорий
|
||||
*/
|
||||
/*
|
||||
|
||||
|
||||
if (ID) $smarty -> assign( 'this_cat', $mod -> get_this_cat( ID ) );//Эта категория
|
||||
|
||||
|
||||
*/
|
||||
?>
|
|
@ -12,24 +12,19 @@
|
|||
|
||||
<input type='text' name='alias' class="form-control mt-3" tabindex='6' value='{$page[0].alias}' placeholder="ЧПУ/Алиас">
|
||||
|
||||
<input type='text' name='rdir' class="form-control mt-3" tabindex='6' value='{$page[0].rdir}' placeholder="301-й редирект на новую страницу">
|
||||
|
||||
<b>Публиковать?</b>
|
||||
<select name="public" class="form-control mt-3">
|
||||
<option value="0">Нет</option>
|
||||
<option value="1" {if $page[0].public==1}selected{/if}>Да</option>
|
||||
</select>
|
||||
|
||||
<b>Категория</b>
|
||||
<select name="parent" class="form-control mt-3">
|
||||
<select name="category" class="form-control mt-3">
|
||||
<option value="0">Нет</option>
|
||||
{section name=customer loop=$list}
|
||||
{if $list[customer].id}{assign var=json value=$list[customer].json}
|
||||
<option value="{$list[customer].id}" {if $page[0].cat==$list[customer].id}selected{/if}>{$json.title}</option>
|
||||
{section name=customer loop=$pages_category}
|
||||
{if $pages_category[customer].id}
|
||||
|
||||
<option value="{$pages_category[customer].id}" {if $page[0].category==$pages_category[customer].id}selected{/if}>{$pages_category[customer].title}</option>
|
||||
{/if}
|
||||
{/section}
|
||||
</select>
|
||||
<br>
|
||||
<input type='submit' value='Сохранить' tabindex='5' name="ok" class="btn btn-dark mt-3 mb-3">
|
||||
</form>
|
||||
{$editor}
|
||||
{$editor_js}
|
|
@ -1,4 +1,8 @@
|
|||
{if $smarty.session.dostup=='a' || $smarty.session.dostup=='e'} {include file=$header_admin title="Создать страницу" h1="Новая страница" settings_mod="1"} {else} {include file=$header title="Создать страницу" h1="Новая страница"} {/if}
|
||||
{if $smarty.session.dostup=='a' || $smarty.session.dostup=='e'}
|
||||
{include file=$header_admin title="Создать страницу" h1="Новая страница" settings_mod="1"}
|
||||
{else}
|
||||
{include file=$header title="Создать страницу" h1="Новая страница"}
|
||||
{/if}
|
||||
|
||||
<h1 class="title text-center">
|
||||
<!-- i class="fa fa-cog" style="font-size: 25pt;" title="Настройки" data-toggle="modal" data-target="#mod_settings"></i -->
|
||||
|
@ -20,7 +24,7 @@
|
|||
|
||||
<div class="ibox">
|
||||
<div class="ibox-head">
|
||||
<div class="ibox-title">Редактирование страницы</div>
|
||||
<div class="ibox-title">Редактирование страницы: {$page[0].title|substr:15}</div>
|
||||
<ul class="nav nav-tabs tabs-line pull-right">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#tab-8-1" data-toggle="tab"><i class="fa fa-taxi"></i>Редактор</a>
|
||||
|
|
|
@ -1,83 +1,97 @@
|
|||
<?php
|
||||
ini_set('display_errors', 0 );
|
||||
if ( $_SESSION['dostup'] !=='a' && $_SESSION['dostup'] !== 'e' ) header( 'Location: /login/' );
|
||||
/*
|
||||
26.05.2017
|
||||
Добавлена загрузка обложки
|
||||
27.07.2017
|
||||
Урезан код за счет удаления открытых SQL-запросов, все перенесено в апи
|
||||
20.11.2017
|
||||
Работа с ЧПУ - изменение данных
|
||||
*/
|
||||
$smarty -> assign( 'editor', 'api/modules/pages_edit/editor.html' );
|
||||
$smarty -> assign( 'editor', '<script language="javascript" type="text/javascript" src="/api/soft/tinymce/4.3.12/tinymce.min.js"></script><script language="javascript" type="text/javascript" src="/api/soft/tinymce/4.3.12/load.php"></script>');
|
||||
ini_set( 'display_errors', 0 );
|
||||
$smarty -> assign( 'editor', 'api/modules/page_edit/editor.html' );
|
||||
$smarty -> assign( 'editor_js', '<script language="javascript" type="text/javascript" src="/api/soft/tinymce/4.3.12/tinymce.min.js"></script><script language="javascript" type="text/javascript" src="/api/soft/tinymce/4.3.12/load.php"></script>');
|
||||
|
||||
if ($_GET['id']){
|
||||
$_SESSION['page_id']=$_GET['id'];
|
||||
$page=\DB::getAll("SELECT * FROM `pages` WHERE `id`=?", $_GET['id']);
|
||||
$smarty -> assign( 'page', $page );
|
||||
}
|
||||
/*
|
||||
//$mod = new main(BD_NAME, BD_TYPE, BD_HOST, BD_USER, BD_PWD, MOD);
|
||||
// 22.05.2022: Получаем настройки модуля
|
||||
$local_settings = $db -> get_mod_settings();
|
||||
|
||||
//Убрать в install.php
|
||||
|
||||
try {
|
||||
$db->free_sql2('ALTER TABLE `pages` ADD COLUMN `mainImg` TEXT');
|
||||
}catch (Exception $e) {
|
||||
$this -> to_log( MOD . ': Выброшено исключение: ' . $e->getMessage() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (ID){
|
||||
$page = $mod -> get_content_from_pages ( ID );
|
||||
$page=\DB::getAll("SELECT * FROM `pages` WHERE `id`=? LIMIT 1", $_GET['id']);
|
||||
$smarty -> assign( 'page', $page );
|
||||
}
|
||||
|
||||
//unset($a);
|
||||
//загружаем обложку
|
||||
if ( @$_FILES['oblozhka']['tmp_name'] ) $_POST['mainImg'] = $mod -> upload_main_img( $_FILES );
|
||||
/* ----------------------------------------------------------------------
|
||||
14.12.2022
|
||||
Получаем инфу о пользователе
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
$smarty -> assign( 'userInfo', \core::getUserInfo( $_SESSION['user_id'] ) );
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
07.01.20223
|
||||
Получаем список категорий
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
$smarty -> assign( 'pages_category', \DB::getAll("SELECT * FROM `pages_category` WHERE `status`=1" ) );
|
||||
|
||||
if ($_POST){
|
||||
function ekr ($text) {
|
||||
$old1 = array("'");
|
||||
$new1 = array("'");
|
||||
$text = str_replace($old1, $new1, $text);
|
||||
return $text;
|
||||
}
|
||||
$_POST['tip']='page';
|
||||
$_POST['user_id']=$_SESSION['user_id'];
|
||||
$_POST['public'];
|
||||
$_POST['parent'];
|
||||
$_POST['t']=time();
|
||||
$_POST['alias'];
|
||||
$_POST['txt'];
|
||||
unset($_POST['ok']);
|
||||
//$res['json']=json_encode($_POST, JSON_UNESCAPED_UNICODE);
|
||||
if (ID)
|
||||
$db->update('pages', ID, $_POST);
|
||||
else
|
||||
$db->add('pages', $_POST);
|
||||
//header( 'Location: /page_all/' );
|
||||
}
|
||||
/* ----------------------------------------------------------------------
|
||||
07.01.20223
|
||||
Принимаем входящие данные
|
||||
---------------------------------------------------------------------- */
|
||||
if ($_GET['id']){
|
||||
\DB::set("UPDATE `pages` SET
|
||||
`title`=?,
|
||||
`txt`=?,
|
||||
`t`=?,
|
||||
`keywords`=?,
|
||||
`alias`=?,
|
||||
`description`=?,
|
||||
`category`=?,
|
||||
`user_id`=?,
|
||||
`d`=? WHERE `id`=?", array(
|
||||
$_POST['title'],
|
||||
$_POST['txt'],
|
||||
time(),
|
||||
$_POST['keywords'],
|
||||
$_POST['alias'],
|
||||
$_POST['description'],
|
||||
$_POST['category'],
|
||||
$_SESSION['user_id'],
|
||||
$_POST['d'],
|
||||
$_GET['id']
|
||||
|
||||
|
||||
|
||||
|
||||
) );
|
||||
$id=$_GET['id'];
|
||||
}else{
|
||||
|
||||
$id=\DB::add("INSERT INTO `pages` (`title`, `txt`, `t`, `keywords`, `alias`, `description`, `category`, `user_id`, `d`, `status`) VALUES (?,?,?,?,?,?,?,?,?,1)", array(
|
||||
$_POST['title'],
|
||||
$_POST['txt'],
|
||||
time(),
|
||||
$_POST['keywords'],
|
||||
$_POST['alias'],
|
||||
$_POST['description'],
|
||||
$_POST['category'],
|
||||
$_SESSION['user_id'],
|
||||
$_POST['d']
|
||||
|
||||
|
||||
|
||||
|
||||
) );
|
||||
|
||||
|
||||
|
||||
|
||||
//выбираем редактор:*/
|
||||
|
||||
|
||||
/* выбираем категорию */
|
||||
/*unset($a);
|
||||
$a['tip']='category';
|
||||
|
||||
$smarty -> assign( 'list', $db -> get_massiv ( 'pages', $a ) );
|
||||
//$smarty -> assign( 'img', $mod -> get_images ( ID ) );
|
||||
//$smarty -> assign( 'modal_settings', MYDIR . '/api/modules/' . MOD . '/modal.html' );
|
||||
//загружаем список картинок
|
||||
//unset($a);
|
||||
//$a['page_id']=ID;
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
header( 'Location: /page_edit/' . $id );
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -32,6 +32,7 @@ class core{
|
|||
Берем настройки модуля/сайта
|
||||
---------------------------------------------------------------------- */
|
||||
static function getSettings($set, $mod='global'){
|
||||
//echo 'SELECT `json` FROM `settings` WHERE `mod` = "' . $mod . '" LIMIT 1';
|
||||
$txt = \DB::getValue('SELECT `json` FROM `settings` WHERE `mod` = "' . $mod . '" LIMIT 1');
|
||||
$massiv = \json::from_j($txt);
|
||||
return $massiv[$set];
|
||||
|
|
183
api/php/db.php
|
@ -27,13 +27,15 @@ class DB
|
|||
* $this -> conn = new PDO( 'sqlite:' . $_SERVER['DOCUMENT_ROOT'] . '/bd/'. $bd );
|
||||
*/
|
||||
public static function getDbh(){
|
||||
if (self::$type==''){
|
||||
|
||||
require 'set/' . $_SERVER['SERVER_NAME'] . '.php';
|
||||
//self::$type=@$db['type'];
|
||||
if (@$db['type']=='mysql'){
|
||||
self::$dsn=$db['type'] . ':dbname=' . $db['db'] . ';host=' . $db['host'];
|
||||
self::$user=$db['user'];
|
||||
self::$pass=$db['password'];
|
||||
if (self::$type==''){
|
||||
if (@$db['type']=='mysql'){
|
||||
if (!self::$dsn){
|
||||
self::$dsn=$db['type'] . ':dbname=' . $db['db'] . ';host=' . $db['host'];
|
||||
self::$user=$db['user'];
|
||||
self::$pass=$db['password'];
|
||||
}
|
||||
if (!self::$dbh) {
|
||||
try {
|
||||
self::$dbh = new PDO(
|
||||
|
@ -47,10 +49,12 @@ class DB
|
|||
}
|
||||
}
|
||||
if (@$db['type']=='sqlite3'){
|
||||
# echo "lite";
|
||||
|
||||
// echo "lite";
|
||||
if (!self::$dbh) {
|
||||
try {
|
||||
self::$dbh = new PDO('sqlite:' . 'bd/'. $_SERVER['SERVER_NAME'] . '.db' );
|
||||
echo self::$dsn;
|
||||
//Делаем бекап БД
|
||||
if (!file_exists('bd/' . date("Y-m-d") . '_'. $_SERVER['SERVER_NAME'] . '.zip'))exec ('zip bd/' . date("Y-m-d") . '_'. $_SERVER['SERVER_NAME'] . '.zip bd/'. $_SERVER['SERVER_NAME'] . '.db 9 &');
|
||||
self::$dbh->exec('PRAGMA journal_mode=WAL;');
|
||||
|
@ -61,6 +65,7 @@ class DB
|
|||
self::$dbh = new PDO('sqlite:' . self::$path );
|
||||
self::$dbh->exec('PRAGMA journal_mode=WAL;');
|
||||
}
|
||||
|
||||
return self::$dbh;
|
||||
}
|
||||
|
||||
|
@ -149,169 +154,5 @@ class DB
|
|||
self::$dbh -> query($query);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
олучение одной записи из БД
|
||||
|
||||
$item = DB::getRow("SELECT * FROM `category` WHERE `id` = ?", 1);
|
||||
|
||||
// Или
|
||||
|
||||
$item = DB::getRow("SELECT * FROM `category` WHERE `id` = :id", array('id' => 1));
|
||||
|
||||
|
||||
|
||||
print_r($item);
|
||||
|
||||
PHP
|
||||
Результат:
|
||||
|
||||
Array
|
||||
|
||||
(
|
||||
|
||||
[id] => 1
|
||||
|
||||
[parent] => 0
|
||||
|
||||
[name] => Мороженое
|
||||
|
||||
)
|
||||
|
||||
Получение нескольких записей из БД
|
||||
|
||||
$items = DB::getAll("SELECT * FROM `category` WHERE `id` > 2");
|
||||
|
||||
print_r($items);
|
||||
|
||||
PHP
|
||||
Результат:
|
||||
|
||||
Array
|
||||
|
||||
(
|
||||
|
||||
[0] => Array
|
||||
|
||||
(
|
||||
|
||||
[id] => 3
|
||||
|
||||
[parent] => 0
|
||||
|
||||
[name] => Фрукты
|
||||
|
||||
)
|
||||
|
||||
[1] => Array
|
||||
|
||||
(
|
||||
|
||||
[id] => 4
|
||||
|
||||
[parent] => 0
|
||||
|
||||
[name] => Ягоды
|
||||
|
||||
)
|
||||
|
||||
[2] => Array
|
||||
|
||||
(
|
||||
|
||||
[id] => 5
|
||||
|
||||
[parent] => 2
|
||||
|
||||
[name] => Грибы
|
||||
|
||||
)
|
||||
|
||||
...
|
||||
|
||||
)
|
||||
|
||||
Получения значения
|
||||
|
||||
$value = DB::getValue("SELECT `name` FROM `category` WHERE `id` = 2");
|
||||
|
||||
print_r($value);
|
||||
|
||||
PHP
|
||||
Результат:
|
||||
|
||||
Овощи
|
||||
|
||||
Получения значений колонки
|
||||
|
||||
$values = DB::getColumn("SELECT `name` FROM `category`");
|
||||
|
||||
print_r($values);
|
||||
|
||||
PHP
|
||||
Результат:
|
||||
|
||||
Array
|
||||
|
||||
(
|
||||
|
||||
[0] => Мороженое
|
||||
|
||||
[1] => Овощи
|
||||
|
||||
[2] => Фрукты
|
||||
|
||||
[3] => Ягоды
|
||||
|
||||
[4] => Грибы
|
||||
|
||||
[5] => Морепродукты
|
||||
|
||||
...
|
||||
|
||||
)
|
||||
|
||||
Добавление в БД
|
||||
|
||||
Метод возвращает ID вставленной записи.
|
||||
|
||||
$insert_id = DB::add("INSERT INTO `category` SET `name` = ?", 'Яблоки');
|
||||
|
||||
PHP
|
||||
Все остальные запросы
|
||||
|
||||
Выполняет запросы в БД, такие как DELETE, UPDATE, CREATE TABLE и т.д. В случаи успеха возвращает true.
|
||||
|
||||
DB::set("DELETE FROM `category` WHERE `id` > ? AND `parent` > ?", array(123, 0));
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -0,0 +1,2 @@
|
|||
40.122.204.231;1673428053;Safari 10+;Mac OS;;
|
||||
40.86.83.33;1673428320;Safari 10+;Mac OS;;
|
|
|
@ -1 +1 @@
|
|||
1672129215
|
||||
1673428053
|
|
|
@ -1,4 +1,4 @@
|
|||
1671915600;1;1;1;
|
||||
1671483600;1;1;1;
|
||||
;1;1;0;
|
||||
1672088400;1;1;1;
|
||||
1671397200;2;2;1;
|
||||
|
|
|
|
@ -36,3 +36,26 @@
|
|||
46.165.16.184;1673099558;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/56-16.html;
|
||||
46.165.16.184;1673099577;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/56-18.html;
|
||||
46.165.16.184;1673099598;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/56-19.html;
|
||||
46.165.16.184;1673101053;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/56-19.html;
|
||||
46.165.16.184;1673103952;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/56-19.html;
|
||||
46.165.16.184;1673103959;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673108139;Firefox 10+;Linux;https://tk-ligat.ru/page/2;
|
||||
46.165.16.184;1673108468;Firefox 10+;Linux;https://tk-ligat.ru/page/2;
|
||||
46.165.16.184;1673108513;Firefox 10+;Linux;https://tk-ligat.ru/page/2;
|
||||
46.165.16.184;1673109147;Firefox 10+;Linux;https://tk-ligat.ru/page/2;
|
||||
46.165.16.184;1673109163;Firefox 10+;Linux;https://tk-ligat.ru/403/;
|
||||
46.165.16.184;1673109288;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673109758;Firefox 10+;Linux;https://tk-ligat.ru/403/;
|
||||
46.165.16.184;1673109797;Firefox 10+;Linux;https://tk-ligat.ru/403/;
|
||||
46.165.16.184;1673109861;Firefox 10+;Linux;https://tk-ligat.ru/403/;
|
||||
46.165.16.184;1673109889;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673109924;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/1859;
|
||||
46.165.16.184;1673109940;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/12-0.html;
|
||||
46.165.16.184;1673109943;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/89-1.html;
|
||||
46.165.16.184;1673109946;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/3796;
|
||||
46.165.16.184;1673111736;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/60-1.html;
|
||||
46.165.16.184;1673114376;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/60-1.html;
|
||||
46.165.16.184;1673114416;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/13-1.html;
|
||||
46.165.16.184;1673114422;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/80-1.html;
|
||||
46.165.16.184;1673119744;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/13-1.html;
|
||||
46.165.16.184;1673119751;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/88-1.html;
|
||||
|
|
|
|
@ -0,0 +1,20 @@
|
|||
31.173.101.107;1673153311;Firefox 10+;Linux;https://tk-ligat.ru/login/;
|
||||
88.83.200.111;1673156936;Chrome 10+;Windows;https://tk-ligat.ru/login/;
|
||||
79.173.90.130;1673156962;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673159366;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673159369;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673159372;Firefox 10+;Linux;https://tk-ligat.ru/login/;
|
||||
46.165.16.184;1673161296;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/88-1.html;
|
||||
46.165.16.184;1673161307;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673161319;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/35-1.html;
|
||||
46.165.16.184;1673161322;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/36-1.html;
|
||||
46.165.16.184;1673161366;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/36-4.html;
|
||||
46.165.16.184;1673161379;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/36-3.html;
|
||||
46.165.16.184;1673161679;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/36-3.html;
|
||||
46.165.16.184;1673182037;Firefox 10+;Linux;https://tk-ligat.ru/login/;
|
||||
80.80.108.36;1673190475;Chrome 70+;Windows;http://webspros.ru/chat.php?invite=pc&member=tk-ligat.ru&pg=21&check=ok;
|
||||
80.80.108.36;1673190536;Chrome 70+;Windows;http://webspros.ru/chat.php?invite=pc&member=tk-ligat.ru&pg=21&check=ok;
|
||||
46.165.16.184;1673192291;Firefox 10+;Linux;https://tk-ligat.ru/login/;
|
||||
46.165.16.184;1673196584;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673196592;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.16.184;1673196595;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/61-1.html;
|
|
|
@ -0,0 +1,129 @@
|
|||
95.29.225.49;1673218023;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673233223;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/61-1.html;
|
||||
178.46.89.210;1673239577;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
178.46.89.210;1673239607;Chrome 10+;Windows;https://tk-ligat.ru/login/;
|
||||
178.46.89.210;1673239640;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
178.46.89.210;1673239643;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673239652;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/1-1.html;
|
||||
178.46.89.210;1673239661;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/4-1.html;
|
||||
178.46.89.210;1673239689;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/4-1.html;
|
||||
178.46.89.210;1673239691;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/4-1.html;
|
||||
178.46.89.210;1673239703;Chrome 10+;Windows;https://tk-ligat.ru/new_find/;
|
||||
178.46.89.210;1673239723;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
178.46.89.210;1673239741;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673239745;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/7-1.html;
|
||||
178.46.89.210;1673239819;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/7-1.html;
|
||||
178.46.89.210;1673239821;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/7-1.html;
|
||||
178.46.89.210;1673239823;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/67-1.html;
|
||||
178.46.89.210;1673239849;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673239854;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/6-1.html;
|
||||
178.46.89.210;1673239861;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673239869;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/12-1.html;
|
||||
178.46.89.210;1673239880;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673239882;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
178.46.89.210;1673239899;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/72-1.html;
|
||||
178.46.89.210;1673239902;Chrome 10+;Windows;https://tk-ligat.ru/tovar_show/21921;
|
||||
178.46.89.210;1673239982;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673239985;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
178.46.89.210;1673240253;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
178.46.89.210;1673240281;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
178.46.89.210;1673240283;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
178.46.89.210;1673240287;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673240291;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/30-1.html;
|
||||
178.46.89.210;1673240294;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/31-1.html;
|
||||
178.46.89.210;1673240304;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/31-15.html;
|
||||
178.46.89.210;1673240323;Chrome 10+;Windows;https://tk-ligat.ru/new_find/;
|
||||
178.46.89.210;1673240335;Chrome 10+;Windows;https://tk-ligat.ru/new_find/;
|
||||
178.46.89.210;1673240344;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673240348;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/10-1.html;
|
||||
178.46.89.210;1673240352;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673240388;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/9-1.html;
|
||||
178.46.89.210;1673240392;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/53-1.html;
|
||||
178.46.89.210;1673240449;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673240453;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/35-1.html;
|
||||
178.46.89.210;1673240458;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/44-1.html;
|
||||
46.165.49.31;1673256140;Firefox 10+;Windows;https://tk-ligat.ru/;
|
||||
46.165.49.31;1673256143;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.49.31;1673256145;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/7-1.html;
|
||||
46.165.49.31;1673256148;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/41-1.html;
|
||||
46.165.49.31;1673256158;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/41-1.html;
|
||||
46.165.49.31;1673256260;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/41-1.html;
|
||||
46.165.49.31;1673256263;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/41-1.html;
|
||||
46.165.49.31;1673256309;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/41-1.html;
|
||||
46.165.49.31;1673256319;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/41-1.html;
|
||||
46.165.49.31;1673256340;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/41-1.html;
|
||||
46.165.49.31;1673256452;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/7-1.html;
|
||||
46.165.49.31;1673256453;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/54-1.html;
|
||||
46.165.49.31;1673256456;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/7-1.html;
|
||||
46.165.49.31;1673256458;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/67-1.html;
|
||||
46.165.49.31;1673256464;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673258017;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
178.46.89.210;1673258037;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673258040;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
178.46.89.210;1673258047;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/50-1.html;
|
||||
178.46.89.210;1673258077;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/62-1.html;
|
||||
178.46.89.210;1673258097;Chrome 10+;Windows;https://tk-ligat.ru/new_find/;
|
||||
178.46.89.210;1673258104;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673258108;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
178.46.89.210;1673258112;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/62-1.html;
|
||||
178.46.89.210;1673258178;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/62-2.html;
|
||||
178.46.89.210;1673258196;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/62-3.html;
|
||||
178.46.89.210;1673258239;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
178.46.89.210;1673258307;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673258311;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/6-1.html;
|
||||
178.46.89.210;1673258319;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673258323;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/9-1.html;
|
||||
178.46.89.210;1673258326;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/53-1.html;
|
||||
178.46.89.210;1673258341;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/53-2.html;
|
||||
178.46.89.210;1673258352;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/53-3.html;
|
||||
46.165.49.31;1673258428;Firefox 10+;Windows;https://tk-ligat.ru/;
|
||||
46.165.49.31;1673258434;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.49.31;1673258436;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.49.31;1673258438;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/50-1.html;
|
||||
46.165.49.31;1673258440;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/50-1.html;
|
||||
46.165.49.31;1673258442;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/50-1.html;
|
||||
178.46.89.210;1673258447;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673258450;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.49.31;1673258541;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/50-1.html;
|
||||
46.165.49.31;1673258543;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.49.31;1673258546;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/62-1.html;
|
||||
46.165.49.31;1673258548;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.49.31;1673258550;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/50-1.html;
|
||||
46.165.49.31;1673258552;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/50-1.html;
|
||||
178.46.89.210;1673258593;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
46.165.49.31;1673258645;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.49.31;1673258647;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/51-1.html;
|
||||
46.165.49.31;1673258648;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.49.31;1673258654;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/68-1.html;
|
||||
46.165.49.31;1673258656;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.49.31;1673258659;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/72-1.html;
|
||||
46.165.49.31;1673258671;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.49.31;1673258675;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/62-1.html;
|
||||
46.165.49.31;1673258677;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.49.31;1673258680;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/61-1.html;
|
||||
46.165.49.31;1673258705;Firefox 10+;Windows;https://tk-ligat.ru/new_find/;
|
||||
46.165.49.31;1673258713;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.49.31;1673258727;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/12-1.html;
|
||||
46.165.49.31;1673258750;Firefox 10+;Windows;https://tk-ligat.ru/new_find/;
|
||||
178.46.89.210;1673258778;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
178.46.89.210;1673258781;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
178.46.89.210;1673258799;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673258810;Chrome 10+;Windows;https://tk-ligat.ru/new_find/;
|
||||
178.46.89.210;1673258828;Chrome 10+;Windows;https://tk-ligat.ru/new_find/;
|
||||
178.46.89.210;1673258832;Chrome 10+;Windows;https://tk-ligat.ru/new_find/;
|
||||
178.46.89.210;1673258842;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673258845;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/6-1.html;
|
||||
178.46.89.210;1673258851;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673258853;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/12-1.html;
|
||||
178.46.89.210;1673258861;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/29-1.html;
|
||||
178.46.89.210;1673258873;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/26-1.html;
|
||||
178.46.89.210;1673258898;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/78-1.html;
|
||||
178.46.89.210;1673259118;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
178.46.89.210;1673259124;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/1-1.html;
|
||||
178.46.89.210;1673259127;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/96-1.html;
|
||||
178.46.89.210;1673259137;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/3-1.html;
|
||||
178.46.89.210;1673259152;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/3-2.html;
|
||||
37.204.10.28;1673268518;Chrome 10+;Windows;https://tk-ligat.ru/login/;
|
||||
46.165.16.184;1673274975;Firefox 10+;Linux;https://tk-ligat.ru/login/;
|
||||
46.165.16.184;1673274977;Firefox 10+;Linux;https://tk-ligat.ru/login/;
|
||||
46.165.16.184;1673274981;Firefox 10+;Linux;https://tk-ligat.ru/;
|
|
|
@ -0,0 +1,10 @@
|
|||
46.165.16.184;1673318791;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673318799;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.16.184;1673318803;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/51-1.html;
|
||||
46.165.16.184;1673318807;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/5-1.html;
|
||||
46.165.16.184;1673318811;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/61-1.html;
|
||||
46.165.16.184;1673358589;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673360982;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673374412;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673374420;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/1-1.html;
|
||||
46.165.16.184;1673374424;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/3-1.html;
|
|
|
@ -0,0 +1,66 @@
|
|||
46.165.16.184;1673406667;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673406675;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/7-1.html;
|
||||
46.165.16.184;1673406678;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/67-1.html;
|
||||
13.89.200.136;1673410552;Safari 10+;Mac OS;;
|
||||
188.17.169.8;1673423628;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
188.17.169.8;1673423632;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
188.17.169.8;1673423636;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/1-1.html;
|
||||
188.17.169.8;1673423640;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/3-1.html;
|
||||
188.17.169.8;1673423661;Chrome 10+;Windows;https://tk-ligat.ru/tovar_cat/4-1.html;
|
||||
188.17.169.8;1673423696;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673445262;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673445270;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673445273;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673445275;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673448691;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673448701;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673448744;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673448773;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673448788;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673448837;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673448934;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673449000;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673449054;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673449055;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/16360;
|
||||
46.165.16.184;1673449061;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673449193;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673449272;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673449279;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673449612;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673449636;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673449851;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673449861;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673449945;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673449948;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/2945;
|
||||
46.165.16.184;1673452178;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452334;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452354;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452364;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452374;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452440;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452495;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452556;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452567;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452575;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452630;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452647;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452657;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452683;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452694;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452728;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452739;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452744;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452846;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452881;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452928;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673452955;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673453014;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673453042;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673453065;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673453100;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673453131;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673453137;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673453249;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673453269;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673453284;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673453489;Firefox 10+;Linux;https://tk-ligat.ru/;
|
|
|
@ -0,0 +1,12 @@
|
|||
95.161.221.29;1673495025;Chrome 10+;Windows;https://tk-ligat.ru/login/;
|
||||
88.83.200.151;1673495054;Chrome 10+;Windows;https://tk-ligat.ru/;
|
||||
46.165.49.31;1673523882;Firefox 10+;Windows;https://tk-ligat.ru/tovar_cat/56-3.html;
|
||||
46.165.16.184;1673534873;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673534888;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673534894;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673535113;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673537791;Firefox 10+;Linux;https://tk-ligat.ru/new_find/;
|
||||
46.165.16.184;1673538135;Firefox 10+;Linux;https://tk-ligat.ru/new_find/;
|
||||
46.165.16.184;1673538198;Firefox 10+;Linux;https://tk-ligat.ru/new_find/;
|
||||
46.165.16.184;1673538251;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/7911;
|
||||
46.165.16.184;1673538298;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/22983;
|
|
|
@ -0,0 +1,2 @@
|
|||
46.165.16.184;1673625411;Firefox 10+;Linux;https://tk-ligat.ru/new_find/;
|
||||
46.165.16.184;1673625418;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/22042;
|
|
|
@ -0,0 +1,47 @@
|
|||
205.169.39.63;1673683825;Chrome 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673695589;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673695594;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/18548;
|
||||
46.165.16.184;1673702699;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/18548;
|
||||
46.165.16.184;1673705155;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/18548;
|
||||
46.165.16.184;1673705159;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673705166;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673705173;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673705229;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673705259;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/15973;
|
||||
46.165.16.184;1673705262;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/15973;
|
||||
46.165.16.184;1673705267;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/15973;
|
||||
46.165.16.184;1673705270;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673705282;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673705294;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/3560;
|
||||
46.165.16.184;1673705729;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/3560;
|
||||
46.165.16.184;1673705735;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673705824;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673705827;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673705836;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/1124;
|
||||
46.165.16.184;1673705862;Firefox 10+;Linux;https://tk-ligat.ru/new_find/;
|
||||
46.165.16.184;1673705950;Firefox 10+;Linux;https://tk-ligat.ru/new_find/;
|
||||
46.165.16.184;1673707234;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673707243;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673707396;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673707857;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/4905;
|
||||
46.165.16.184;1673707899;Firefox 10+;Linux;https://tk-ligat.ru/cart/;
|
||||
46.165.16.184;1673707922;Firefox 10+;Linux;https://tk-ligat.ru/cart/;
|
||||
46.165.16.184;1673707925;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/4905;
|
||||
46.165.16.184;1673707939;Firefox 10+;Linux;https://tk-ligat.ru/cart/;
|
||||
185.149.41.41;1673708116;Firefox 10+;Windows;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673708835;Firefox 10+;Linux;https://tk-ligat.ru/cart/;
|
||||
46.165.16.184;1673708844;Firefox 10+;Linux;https://tk-ligat.ru/cart/;
|
||||
46.165.16.184;1673708990;Firefox 10+;Linux;https://tk-ligat.ru/cart/;
|
||||
46.165.16.184;1673709060;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673709066;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/3559;
|
||||
46.165.16.184;1673709552;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673709605;Firefox 10+;Linux;https://tk-ligat.ru/cart/;
|
||||
46.165.16.184;1673709955;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/3559;
|
||||
46.165.16.184;1673709985;Firefox 10+;Linux;https://tk-ligat.ru/cart/;
|
||||
46.165.16.184;1673710008;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673710094;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
|
||||
46.165.16.184;1673710112;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/2919;
|
||||
46.165.16.184;1673710121;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673710126;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/15576;
|
||||
46.165.16.184;1673711562;Firefox 10+;Linux;https://tk-ligat.ru/;
|
||||
46.165.16.184;1673712736;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/17030;
|
|
|
@ -1 +1 @@
|
|||
1672767443
|
||||
1673374412
|
|
|
@ -1,146 +1,150 @@
|
|||
1657832400;2;2;;15.07.2022.csv;
|
||||
1662411600;1;1;;06.09.2022.csv;
|
||||
1664571600;2;2;;01.10.2022.csv;
|
||||
1660338000;1;1;;13.08.2022.csv;
|
||||
1662584400;2;2;;08.09.2022.csv;
|
||||
1671570000;43;4;;21.12.2022.csv;
|
||||
1666386000;13;2;;22.10.2022.csv;
|
||||
1665867600;3;2;;16.10.2022.csv;
|
||||
1662498000;5;5;;07.09.2022.csv;
|
||||
1661202000;5;3;;23.08.2022.csv;
|
||||
1671310800;10;2;;18.12.2022.csv;
|
||||
1670878800;7;3;;13.12.2022.csv;
|
||||
1658350800;1;1;;21.07.2022.csv;
|
||||
1662843600;7;2;;11.09.2022.csv;
|
||||
1672952400;141;3;;06.01.2023.csv;
|
||||
1666126800;5;2;;19.10.2022.csv;
|
||||
1671051600;45;3;;15.12.2022.csv;
|
||||
1660597200;14;2;;16.08.2022.csv;
|
||||
1671915600;176;3;;25.12.2022.csv;
|
||||
1657314000;3;2;;09.07.2022.csv;
|
||||
1671742800;2;1;;23.12.2022.csv;
|
||||
1666818000;1;1;;27.10.2022.csv;
|
||||
1661029200;18;3;;21.08.2022.csv;
|
||||
1660251600;1;1;;12.08.2022.csv;
|
||||
1656277200;10;5;;27.06.2022.csv;
|
||||
1663621200;10;6;;20.09.2022.csv;
|
||||
1658091600;2;2;;18.07.2022.csv;
|
||||
1671483600;67;3;;20.12.2022.csv;
|
||||
1672434000;50;2;;31.12.2022.csv;
|
||||
1656968400;15;4;;05.07.2022.csv;
|
||||
1672088400;240;3;;27.12.2022.csv;
|
||||
1657400400;2;2;;10.07.2022.csv;
|
||||
1660078800;1;1;;10.08.2022.csv;
|
||||
1660165200;2;2;;11.08.2022.csv;
|
||||
1657141200;15;4;;07.07.2022.csv;
|
||||
1657746000;2;2;;14.07.2022.csv;
|
||||
1671829200;45;4;;24.12.2022 (conflicted copy 2022-12-24 194548).csv;
|
||||
1665954000;2;1;;17.10.2022.csv;
|
||||
1660510800;15;6;;15.08.2022.csv;
|
||||
1661806800;4;4;;30.08.2022.csv;
|
||||
1658005200;2;2;;17.07.2022.csv;
|
||||
1659992400;1;1;;09.08.2022.csv;
|
||||
1666299600;6;2;;21.10.2022.csv;
|
||||
1672866000;74;5;;05.01.2023.csv;
|
||||
1666645200;3;3;;25.10.2022.csv;
|
||||
1661374800;6;3;;25.08.2022.csv;
|
||||
1662066000;3;3;;02.09.2022.csv;
|
||||
1656363600;9;4;;28.06.2022.csv;
|
||||
1656622800;1;1;;01.07.2022.csv;
|
||||
1663362000;1;1;;17.09.2022.csv;
|
||||
1672174800;177;3;;28.12.2022.csv;
|
||||
1672261200;84;3;;29.12.2022.csv;
|
||||
1664226000;3;1;;27.09.2022.csv;
|
||||
1659301200;2;2;;01.08.2022.csv;
|
||||
1667250000;1;1;;01.11.2022.csv;
|
||||
1663880400;9;2;;23.09.2022.csv;
|
||||
1659214800;1;1;;31.07.2022.csv;
|
||||
1664744400;1;1;;03.10.2022.csv;
|
||||
1659646800;2;2;;05.08.2022.csv;
|
||||
1663707600;2;1;;21.09.2022.csv;
|
||||
1657227600;3;3;;08.07.2022.csv;
|
||||
1661547600;2;2;;27.08.2022.csv;
|
||||
1656795600;56;1;;03.07.2022.csv;
|
||||
1659560400;1;1;;04.08.2022.csv;
|
||||
1672002000;120;2;;26.12.2022.csv;
|
||||
1665176400;6;1;;08.10.2022.csv;
|
||||
1662152400;2;2;;03.09.2022.csv;
|
||||
1671829200;9;4;;24.12.2022.csv;
|
||||
1661893200;1;1;;31.08.2022.csv;
|
||||
1663189200;2;2;;15.09.2022.csv;
|
||||
1656882000;2;2;;04.07.2022.csv;
|
||||
1670965200;2;1;;14.12.2022.csv;
|
||||
1672520400;228;2;;01.01.2023.csv;
|
||||
1660424400;1;1;;14.08.2022.csv;
|
||||
1658955600;1;1;;28.07.2022.csv;
|
||||
1659042000;1;1;;29.07.2022.csv;
|
||||
1658610000;1;1;;24.07.2022.csv;
|
||||
1662325200;2;2;;05.09.2022.csv;
|
||||
1666472400;13;3;;23.10.2022.csv;
|
||||
1658696400;1;1;;25.07.2022.csv;
|
||||
1659387600;1;1;;02.08.2022.csv;
|
||||
1666904400;7;4;;28.10.2022.csv;
|
||||
1657918800;1;1;;16.07.2022.csv;
|
||||
1667336400;3;1;;02.11.2022.csv;
|
||||
1656450000;2;2;;29.06.2022.csv;
|
||||
1658782800;3;3;;26.07.2022.csv;
|
||||
1672693200;147;4;;03.01.2023.csv;
|
||||
1663102800;1;1;;14.09.2022.csv;
|
||||
1659474000;1;1;;03.08.2022.csv;
|
||||
1660683600;15;4;;17.08.2022.csv;
|
||||
1658178000;1;1;;19.07.2022.csv;
|
||||
1656190800;7;1;;26.06.2022.csv;
|
||||
1663534800;269;5;;19.09.2022.csv;
|
||||
1660942800;1;1;;20.08.2022.csv;
|
||||
1665781200;16;13;;15.10.2022.csv;
|
||||
1671656400;8;5;;22.12.2022.csv;
|
||||
1661115600;1;1;;22.08.2022.csv;
|
||||
1671397200;193;5;;19.12.2022.csv;
|
||||
1664398800;1;1;;29.09.2022.csv;
|
||||
1661461200;2;2;;26.08.2022.csv;
|
||||
1657054800;7;4;;06.07.2022.csv;
|
||||
1665262800;9;1;;09.10.2022.csv;
|
||||
1657573200;1;1;;12.07.2022.csv;
|
||||
1659906000;1;1;;08.08.2022.csv;
|
||||
1663016400;3;3;;13.09.2022.csv;
|
||||
1665694800;2;2;;14.10.2022.csv;
|
||||
1665349200;3;2;;10.10.2022.csv;
|
||||
1658523600;2;2;;23.07.2022.csv;
|
||||
1666213200;3;1;;20.10.2022.csv;
|
||||
1665608400;1;1;;13.10.2022.csv;
|
||||
1667077200;6;2;;30.10.2022.csv;
|
||||
1660770000;1;1;;18.08.2022.csv;
|
||||
1662930000;7;4;;12.09.2022.csv;
|
||||
1671224400;295;1;;17.12.2022.csv;
|
||||
1659128400;1;1;;30.07.2022.csv;
|
||||
1663275600;3;3;;16.09.2022.csv;
|
||||
1661979600;1;1;;01.09.2022.csv;
|
||||
1662238800;1;1;;04.09.2022.csv;
|
||||
1667509200;1;1;;04.11.2022.csv;
|
||||
1666731600;1;1;;26.10.2022.csv;
|
||||
1662670800;1;1;;09.09.2022.csv;
|
||||
1661288400;5;3;;24.08.2022.csv;
|
||||
1661720400;2;1;;29.08.2022.csv;
|
||||
1659819600;3;3;;07.08.2022.csv;
|
||||
1659733200;1;1;;06.08.2022.csv;
|
||||
1671138000;15;4;;16.12.2022.csv;
|
||||
1663448400;4;2;;18.09.2022.csv;
|
||||
1658869200;1;1;;27.07.2022.csv;
|
||||
1666558800;2;1;;24.10.2022.csv;
|
||||
1667422800;2;2;;03.11.2022.csv;
|
||||
1672606800;99;8;;02.01.2023.csv;
|
||||
1672779600;450;6;;04.01.2023.csv;
|
||||
1664053200;2;2;;25.09.2022.csv;
|
||||
1665090000;24;3;;07.10.2022.csv;
|
||||
1657659600;5;5;;13.07.2022.csv;
|
||||
1664312400;6;3;;28.09.2022.csv;
|
||||
1662757200;1;1;;10.09.2022.csv;
|
||||
1665003600;1;1;;06.10.2022.csv;
|
||||
1660856400;6;6;;19.08.2022.csv;
|
||||
1658437200;5;4;;22.07.2022.csv;
|
||||
1656709200;21;3;;02.07.2022.csv;
|
||||
1672347600;13;2;;30.12.2022.csv;
|
||||
1656536400;2;2;;30.06.2022.csv;
|
||||
1666040400;2;2;;18.10.2022.csv;
|
||||
1657486800;3;3;;11.07.2022.csv;
|
||||
1664139600;6;4;;26.09.2022.csv;
|
||||
1673298000;7;1;2;
|
||||
1657832400;2;2;2;
|
||||
1662411600;1;1;1;
|
||||
1664571600;2;2;2;
|
||||
1660338000;1;1;1;
|
||||
1662584400;2;2;2;
|
||||
1671570000;43;4;3;
|
||||
1666386000;13;2;2;
|
||||
1673211600;129;5;3;
|
||||
1665867600;3;2;2;
|
||||
1662498000;5;5;4;
|
||||
1661202000;5;3;3;
|
||||
1671310800;10;2;2;
|
||||
1670878800;7;3;3;
|
||||
1658350800;1;1;1;
|
||||
1662843600;7;2;3;
|
||||
1672952400;197;7;10;
|
||||
1666126800;5;2;2;
|
||||
1671051600;45;3;2;
|
||||
1660597200;14;2;2;
|
||||
1671915600;176;3;4;
|
||||
1657314000;3;2;2;
|
||||
1671742800;2;1;1;
|
||||
1666818000;1;1;1;
|
||||
1661029200;18;3;3;
|
||||
1660251600;1;1;1;
|
||||
1656277200;10;5;4;
|
||||
1663621200;10;6;5;
|
||||
1658091600;2;2;2;
|
||||
1671483600;67;3;2;
|
||||
1672434000;50;2;2;
|
||||
1656968400;15;4;4;
|
||||
1672088400;240;3;4;
|
||||
1657400400;2;2;2;
|
||||
1660078800;1;1;1;
|
||||
1660165200;2;2;2;
|
||||
1657141200;15;4;4;
|
||||
1657746000;2;2;2;
|
||||
1671829200;45;4;3;
|
||||
1665954000;2;1;1;
|
||||
1660510800;15;6;4;
|
||||
1661806800;4;4;4;
|
||||
1658005200;2;2;2;
|
||||
1659992400;1;1;1;
|
||||
1666299600;6;2;2;
|
||||
1672866000;74;5;6;
|
||||
1666645200;3;3;3;
|
||||
1661374800;6;3;4;
|
||||
1662066000;3;3;2;
|
||||
1656363600;9;4;4;
|
||||
1656622800;1;1;1;
|
||||
1663362000;1;1;1;
|
||||
1672174800;177;3;5;
|
||||
1672261200;84;3;5;
|
||||
1664226000;3;1;1;
|
||||
1659301200;2;2;2;
|
||||
1667250000;1;1;1;
|
||||
1663880400;9;2;1;
|
||||
1659214800;1;1;1;
|
||||
1664744400;1;1;1;
|
||||
1659646800;2;2;2;
|
||||
1663707600;2;1;1;
|
||||
1657227600;3;3;3;
|
||||
1661547600;2;2;2;
|
||||
1656795600;56;1;1;
|
||||
1659560400;1;1;1;
|
||||
1672002000;120;2;5;
|
||||
1665176400;6;1;1;
|
||||
1662152400;2;2;2;
|
||||
1671829200;9;4;3;
|
||||
1661893200;1;1;1;
|
||||
1663189200;2;2;2;
|
||||
1656882000;2;2;2;
|
||||
1670965200;2;1;1;
|
||||
1672520400;228;2;3;
|
||||
1660424400;1;1;1;
|
||||
1658955600;1;1;1;
|
||||
1673125200;20;5;6;
|
||||
1659042000;1;1;1;
|
||||
1658610000;1;1;1;
|
||||
1662325200;2;2;2;
|
||||
1666472400;13;3;3;
|
||||
1658696400;1;1;1;
|
||||
1659387600;1;1;1;
|
||||
1666904400;7;4;4;
|
||||
1657918800;1;1;1;
|
||||
1667336400;3;1;1;
|
||||
1656450000;2;2;2;
|
||||
1658782800;3;3;2;
|
||||
1672693200;147;4;8;
|
||||
1663102800;1;1;1;
|
||||
1659474000;1;1;1;
|
||||
1660683600;15;4;4;
|
||||
1658178000;1;1;1;
|
||||
1656190800;7;1;1;
|
||||
1663534800;269;5;5;
|
||||
1660942800;1;1;1;
|
||||
1665781200;16;13;5;
|
||||
1671656400;8;5;4;
|
||||
1661115600;1;1;1;
|
||||
1671397200;193;5;6;
|
||||
1664398800;1;1;1;
|
||||
1661461200;2;2;2;
|
||||
1657054800;7;4;3;
|
||||
1665262800;9;1;1;
|
||||
1657573200;1;1;1;
|
||||
1659906000;1;1;1;
|
||||
1673038800;61;1;5;
|
||||
1663016400;3;3;3;
|
||||
1665694800;2;2;2;
|
||||
1665349200;3;2;2;
|
||||
1658523600;2;2;2;
|
||||
1666213200;3;1;1;
|
||||
1665608400;1;1;1;
|
||||
1667077200;6;2;2;
|
||||
1660770000;1;1;1;
|
||||
1662930000;7;4;4;
|
||||
1671224400;295;1;1;
|
||||
1659128400;1;1;1;
|
||||
1663275600;3;3;3;
|
||||
1661979600;1;1;1;
|
||||
1662238800;1;1;1;
|
||||
1667509200;1;1;1;
|
||||
1666731600;1;1;1;
|
||||
1662670800;1;1;1;
|
||||
1661288400;5;3;2;
|
||||
1661720400;2;1;1;
|
||||
1659819600;3;3;2;
|
||||
1659733200;1;1;1;
|
||||
1671138000;15;4;3;
|
||||
1663448400;4;2;2;
|
||||
1658869200;1;1;1;
|
||||
1666558800;2;1;1;
|
||||
1667422800;2;2;2;
|
||||
1672606800;99;8;6;
|
||||
1672779600;450;6;6;
|
||||
1664053200;2;2;1;
|
||||
1665090000;24;3;3;
|
||||
1657659600;5;5;4;
|
||||
1664312400;6;3;3;
|
||||
1662757200;1;1;1;
|
||||
1665003600;1;1;1;
|
||||
1660856400;6;6;3;
|
||||
1658437200;5;4;1;
|
||||
1656709200;21;3;3;
|
||||
1672347600;13;2;4;
|
||||
1656536400;2;2;2;
|
||||
1666040400;2;2;1;
|
||||
1657486800;3;3;3;
|
||||
1664139600;6;4;4;
|
||||
|
|
|
|
@ -1,109 +1,109 @@
|
|||
# jQuery File Upload Plugin
|
||||
|
||||
## Demo
|
||||
[Demo File Upload](http://blueimp.github.io/jQuery-File-Upload/)
|
||||
|
||||
## Description
|
||||
File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery.
|
||||
Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.
|
||||
|
||||
## Setup
|
||||
* [How to setup the plugin on your website](https://github.com/blueimp/jQuery-File-Upload/wiki/Setup)
|
||||
* [How to use only the basic plugin (minimal setup guide).](https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin)
|
||||
|
||||
## Support
|
||||
|
||||
* **[Support Forum](https://groups.google.com/d/forum/jquery-fileupload)**
|
||||
**Support requests** and **general discussions** about the File Upload plugin can be posted to the official
|
||||
[Support Forum](https://groups.google.com/d/forum/jquery-fileupload).
|
||||
If your question is not directly related to the File Upload plugin, you might have a better chance to get a reply by posting to [Stack Overflow](http://stackoverflow.com/questions/tagged/blueimp+jquery+file-upload).
|
||||
|
||||
* Bugs and Feature requests
|
||||
**Bugs** and **Feature requests** can be reported using the [issues tracker](https://github.com/blueimp/jQuery-File-Upload/issues).
|
||||
Please read the [issue guidelines](https://github.com/blueimp/jQuery-File-Upload/blob/master/CONTRIBUTING.md) before posting.
|
||||
|
||||
## Features
|
||||
* **Multiple file upload:**
|
||||
Allows to select multiple files at once and upload them simultaneously.
|
||||
* **Drag & Drop support:**
|
||||
Allows to upload files by dragging them from your desktop or filemanager and dropping them on your browser window.
|
||||
* **Upload progress bar:**
|
||||
Shows a progress bar indicating the upload progress for individual files and for all uploads combined.
|
||||
* **Cancelable uploads:**
|
||||
Individual file uploads can be canceled to stop the upload progress.
|
||||
* **Resumable uploads:**
|
||||
Aborted uploads can be resumed with browsers supporting the Blob API.
|
||||
* **Chunked uploads:**
|
||||
Large files can be uploaded in smaller chunks with browsers supporting the Blob API.
|
||||
* **Client-side image resizing:**
|
||||
Images can be automatically resized on client-side with browsers supporting the required JS APIs.
|
||||
* **Preview images, audio and video:**
|
||||
A preview of image, audio and video files can be displayed before uploading with browsers supporting the required APIs.
|
||||
* **No browser plugins (e.g. Adobe Flash) required:**
|
||||
The implementation is based on open standards like HTML5 and JavaScript and requires no additional browser plugins.
|
||||
* **Graceful fallback for legacy browsers:**
|
||||
Uploads files via XMLHttpRequests if supported and uses iframes as fallback for legacy browsers.
|
||||
* **HTML file upload form fallback:**
|
||||
Allows progressive enhancement by using a standard HTML file upload form as widget element.
|
||||
* **Cross-site file uploads:**
|
||||
Supports uploading files to a different domain with cross-site XMLHttpRequests or iframe redirects.
|
||||
* **Multiple plugin instances:**
|
||||
Allows to use multiple plugin instances on the same webpage.
|
||||
* **Customizable and extensible:**
|
||||
Provides an API to set individual options and define callBack methods for various upload events.
|
||||
* **Multipart and file contents stream uploads:**
|
||||
Files can be uploaded as standard "multipart/form-data" or file contents stream (HTTP PUT file upload).
|
||||
* **Compatible with any server-side application platform:**
|
||||
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.
|
||||
|
||||
## Requirements
|
||||
* [jQuery](http://jquery.com/) v. 1.6+
|
||||
* [jQuery UI widget factory](http://api.jqueryui.com/jQuery.widget/) v. 1.9+ (included)
|
||||
* [jQuery Iframe Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/jquery.iframe-transport.js) (included)
|
||||
* [JavaScript Templates engine](https://github.com/blueimp/JavaScript-Templates) v. 2.2.1+ (optional)
|
||||
* [JavaScript Load Image function](https://github.com/blueimp/JavaScript-Load-Image) v. 1.7.3+ (optional)
|
||||
* [JavaScript Canvas to Blob function](https://github.com/blueimp/JavaScript-Canvas-to-Blob) v. 2.0.6+ (optional)
|
||||
* [Bootstrap CSS Toolkit](https://github.com/twitter/bootstrap/) v. 2.3+ (optional)
|
||||
|
||||
The jQuery UI widget factory is a requirement for the basic File Upload plugin, but very lightweight without any other dependencies.
|
||||
The jQuery Iframe Transport is required for [browsers without XHR file upload support](https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support).
|
||||
The UI version of the File Upload plugin also requires the JavaScript Templates engine as well as the JavaScript Load Image and JavaScript Canvas to Blob functions (for the image previews and resizing functionality). These dependencies are marked as optional, as the basic File Upload plugin can be used without them and the UI version of the plugin can be extended to override these dependencies with alternative solutions.
|
||||
|
||||
The User Interface is built with Twitter's [Bootstrap](https://github.com/twitter/bootstrap/) Toolkit. This enables a CSS based, responsive layout and fancy transition effects on modern browsers. The demo also includes the [blueimp Gallery](https://github.com/blueimp/Gallery). Both of these components are optional and not required.
|
||||
|
||||
The repository also includes the [jQuery XDomainRequest Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/cors/jquery.xdr-transport.js), which enables Cross-domain AJAX requests (GET and POST only) in Microsoft Internet Explorer >= 8. However, the XDomainRequest object doesn't support file uploads and the plugin is only used by the [Demo](http://blueimp.github.io/jQuery-File-Upload/) for Cross-domain requests to delete uploaded files from the demo file upload service.
|
||||
|
||||
[Cross-domain File Uploads](https://github.com/blueimp/jQuery-File-Upload/wiki/Cross-domain-uploads) using the [Iframe Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/jquery.iframe-transport.js) require a redirect back to the origin server to retrieve the upload results. The [example implementation](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/main.js) makes use of [result.html](https://github.com/blueimp/jQuery-File-Upload/blob/master/cors/result.html) as a static redirect page for the origin server.
|
||||
|
||||
## Browsers
|
||||
|
||||
### Desktop browsers
|
||||
The File Upload plugin is regularly tested with the latest browser versions and supports the following minimal versions:
|
||||
|
||||
* Google Chrome
|
||||
* Apple Safari 4.0+
|
||||
* Mozilla Firefox 3.0+
|
||||
* Opera 11.0+
|
||||
* Microsoft Internet Explorer 6.0+
|
||||
|
||||
### Mobile browsers
|
||||
The File Upload plugin has been tested with and supports the following mobile browsers:
|
||||
|
||||
* Apple Safari on iOS 6.0+
|
||||
* Google Chrome on iOS 6.0+
|
||||
* Google Chrome on Android 4.0+
|
||||
* Default Browser on Android 2.3+
|
||||
* Opera Mobile 12.0+
|
||||
|
||||
### Supported features
|
||||
For a detailed overview of the features supported by each browser version please have a look at the [Extended browser support information](https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support).
|
||||
|
||||
## License
|
||||
Released under the [MIT license](http://www.opensource.org/licenses/MIT).
|
||||
|
||||
## Donations
|
||||
jQuery File Upload is free software, but you can donate to support the developer, Sebastian Tschan:
|
||||
|
||||
Flattr: [![Flattr](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/thing/286433/jQuery-File-Upload-Plugin)
|
||||
|
||||
PayPal: [![PayPal](https://www.paypalobjects.com/WEBSCR-640-20110429-1/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PYWYSYP77KL54)
|
||||
# jQuery File Upload Plugin
|
||||
|
||||
## Demo
|
||||
[Demo File Upload](http://blueimp.github.io/jQuery-File-Upload/)
|
||||
|
||||
## Description
|
||||
File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery.
|
||||
Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.
|
||||
|
||||
## Setup
|
||||
* [How to setup the plugin on your website](https://github.com/blueimp/jQuery-File-Upload/wiki/Setup)
|
||||
* [How to use only the basic plugin (minimal setup guide).](https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin)
|
||||
|
||||
## Support
|
||||
|
||||
* **[Support Forum](https://groups.google.com/d/forum/jquery-fileupload)**
|
||||
**Support requests** and **general discussions** about the File Upload plugin can be posted to the official
|
||||
[Support Forum](https://groups.google.com/d/forum/jquery-fileupload).
|
||||
If your question is not directly related to the File Upload plugin, you might have a better chance to get a reply by posting to [Stack Overflow](http://stackoverflow.com/questions/tagged/blueimp+jquery+file-upload).
|
||||
|
||||
* Bugs and Feature requests
|
||||
**Bugs** and **Feature requests** can be reported using the [issues tracker](https://github.com/blueimp/jQuery-File-Upload/issues).
|
||||
Please read the [issue guidelines](https://github.com/blueimp/jQuery-File-Upload/blob/master/CONTRIBUTING.md) before posting.
|
||||
|
||||
## Features
|
||||
* **Multiple file upload:**
|
||||
Allows to select multiple files at once and upload them simultaneously.
|
||||
* **Drag & Drop support:**
|
||||
Allows to upload files by dragging them from your desktop or filemanager and dropping them on your browser window.
|
||||
* **Upload progress bar:**
|
||||
Shows a progress bar indicating the upload progress for individual files and for all uploads combined.
|
||||
* **Cancelable uploads:**
|
||||
Individual file uploads can be canceled to stop the upload progress.
|
||||
* **Resumable uploads:**
|
||||
Aborted uploads can be resumed with browsers supporting the Blob API.
|
||||
* **Chunked uploads:**
|
||||
Large files can be uploaded in smaller chunks with browsers supporting the Blob API.
|
||||
* **Client-side image resizing:**
|
||||
Images can be automatically resized on client-side with browsers supporting the required JS APIs.
|
||||
* **Preview images, audio and video:**
|
||||
A preview of image, audio and video files can be displayed before uploading with browsers supporting the required APIs.
|
||||
* **No browser plugins (e.g. Adobe Flash) required:**
|
||||
The implementation is based on open standards like HTML5 and JavaScript and requires no additional browser plugins.
|
||||
* **Graceful fallback for legacy browsers:**
|
||||
Uploads files via XMLHttpRequests if supported and uses iframes as fallback for legacy browsers.
|
||||
* **HTML file upload form fallback:**
|
||||
Allows progressive enhancement by using a standard HTML file upload form as widget element.
|
||||
* **Cross-site file uploads:**
|
||||
Supports uploading files to a different domain with cross-site XMLHttpRequests or iframe redirects.
|
||||
* **Multiple plugin instances:**
|
||||
Allows to use multiple plugin instances on the same webpage.
|
||||
* **Customizable and extensible:**
|
||||
Provides an API to set individual options and define callBack methods for various upload events.
|
||||
* **Multipart and file contents stream uploads:**
|
||||
Files can be uploaded as standard "multipart/form-data" or file contents stream (HTTP PUT file upload).
|
||||
* **Compatible with any server-side application platform:**
|
||||
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.
|
||||
|
||||
## Requirements
|
||||
* [jQuery](http://jquery.com/) v. 1.6+
|
||||
* [jQuery UI widget factory](http://api.jqueryui.com/jQuery.widget/) v. 1.9+ (included)
|
||||
* [jQuery Iframe Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/jquery.iframe-transport.js) (included)
|
||||
* [JavaScript Templates engine](https://github.com/blueimp/JavaScript-Templates) v. 2.2.1+ (optional)
|
||||
* [JavaScript Load Image function](https://github.com/blueimp/JavaScript-Load-Image) v. 1.7.3+ (optional)
|
||||
* [JavaScript Canvas to Blob function](https://github.com/blueimp/JavaScript-Canvas-to-Blob) v. 2.0.6+ (optional)
|
||||
* [Bootstrap CSS Toolkit](https://github.com/twitter/bootstrap/) v. 2.3+ (optional)
|
||||
|
||||
The jQuery UI widget factory is a requirement for the basic File Upload plugin, but very lightweight without any other dependencies.
|
||||
The jQuery Iframe Transport is required for [browsers without XHR file upload support](https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support).
|
||||
The UI version of the File Upload plugin also requires the JavaScript Templates engine as well as the JavaScript Load Image and JavaScript Canvas to Blob functions (for the image previews and resizing functionality). These dependencies are marked as optional, as the basic File Upload plugin can be used without them and the UI version of the plugin can be extended to override these dependencies with alternative solutions.
|
||||
|
||||
The User Interface is built with Twitter's [Bootstrap](https://github.com/twitter/bootstrap/) Toolkit. This enables a CSS based, responsive layout and fancy transition effects on modern browsers. The demo also includes the [blueimp Gallery](https://github.com/blueimp/Gallery). Both of these components are optional and not required.
|
||||
|
||||
The repository also includes the [jQuery XDomainRequest Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/cors/jquery.xdr-transport.js), which enables Cross-domain AJAX requests (GET and POST only) in Microsoft Internet Explorer >= 8. However, the XDomainRequest object doesn't support file uploads and the plugin is only used by the [Demo](http://blueimp.github.io/jQuery-File-Upload/) for Cross-domain requests to delete uploaded files from the demo file upload service.
|
||||
|
||||
[Cross-domain File Uploads](https://github.com/blueimp/jQuery-File-Upload/wiki/Cross-domain-uploads) using the [Iframe Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/jquery.iframe-transport.js) require a redirect back to the origin server to retrieve the upload results. The [example implementation](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/main.js) makes use of [result.html](https://github.com/blueimp/jQuery-File-Upload/blob/master/cors/result.html) as a static redirect page for the origin server.
|
||||
|
||||
## Browsers
|
||||
|
||||
### Desktop browsers
|
||||
The File Upload plugin is regularly tested with the latest browser versions and supports the following minimal versions:
|
||||
|
||||
* Google Chrome
|
||||
* Apple Safari 4.0+
|
||||
* Mozilla Firefox 3.0+
|
||||
* Opera 11.0+
|
||||
* Microsoft Internet Explorer 6.0+
|
||||
|
||||
### Mobile browsers
|
||||
The File Upload plugin has been tested with and supports the following mobile browsers:
|
||||
|
||||
* Apple Safari on iOS 6.0+
|
||||
* Google Chrome on iOS 6.0+
|
||||
* Google Chrome on Android 4.0+
|
||||
* Default Browser on Android 2.3+
|
||||
* Opera Mobile 12.0+
|
||||
|
||||
### Supported features
|
||||
For a detailed overview of the features supported by each browser version please have a look at the [Extended browser support information](https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support).
|
||||
|
||||
## License
|
||||
Released under the [MIT license](http://www.opensource.org/licenses/MIT).
|
||||
|
||||
## Donations
|
||||
jQuery File Upload is free software, but you can donate to support the developer, Sebastian Tschan:
|
||||
|
||||
Flattr: [![Flattr](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/thing/286433/jQuery-File-Upload-Plugin)
|
||||
|
||||
PayPal: [![PayPal](https://www.paypalobjects.com/WEBSCR-640-20110429-1/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PYWYSYP77KL54)
|
||||
|
|
0
api/soft/tinymce/4.3.12/plugins/image/bootstrap/blueimp/css/style.css
Normal file → Executable file
0
api/soft/tinymce/4.3.12/plugins/image/bootstrap/blueimp/img/ajax-loader.gif
Normal file → Executable file
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 723 B |
0
api/soft/tinymce/4.3.12/plugins/image/bootstrap/blueimp/img/border-image.png
Normal file → Executable file
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
0
api/soft/tinymce/4.3.12/plugins/image/bootstrap/blueimp/img/icons.png
Normal file → Executable file
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
2402
api/soft/tinymce/4.3.12/plugins/image/bootstrap/blueimp/js/jquery.fileupload.js
vendored
Normal file → Executable file
370
api/soft/tinymce/4.3.12/plugins/image/bootstrap/blueimp/js/jquery.iframe-transport.js
Normal file → Executable file
|
@ -1,185 +1,185 @@
|
|||
/*
|
||||
* jQuery Iframe Transport Plugin 1.6.1
|
||||
* https://github.com/blueimp/jQuery-File-Upload
|
||||
*
|
||||
* Copyright 2011, Sebastian Tschan
|
||||
* https://blueimp.net
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
/*jslint unparam: true, nomen: true */
|
||||
/*global define, window, document */
|
||||
|
||||
(function (factory) {
|
||||
'use strict';
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// Register as an anonymous AMD module:
|
||||
define(['jquery'], factory);
|
||||
} else {
|
||||
// Browser globals:
|
||||
factory(window.jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
'use strict';
|
||||
|
||||
// Helper variable to create unique names for the transport iframes:
|
||||
var counter = 0;
|
||||
|
||||
// The iframe transport accepts three additional options:
|
||||
// options.fileInput: a jQuery collection of file input fields
|
||||
// options.paramName: the parameter name for the file form data,
|
||||
// overrides the name property of the file input field(s),
|
||||
// can be a string or an array of strings.
|
||||
// options.formData: an array of objects with name and value properties,
|
||||
// equivalent to the return data of .serializeArray(), e.g.:
|
||||
// [{name: 'a', value: 1}, {name: 'b', value: 2}]
|
||||
$.ajaxTransport('iframe', function (options) {
|
||||
if (options.async) {
|
||||
var form,
|
||||
iframe,
|
||||
addParamChar;
|
||||
return {
|
||||
send: function (_, completeCallback) {
|
||||
form = $('<form style="display:none;"></form>');
|
||||
form.attr('accept-charset', options.formAcceptCharset);
|
||||
addParamChar = /\?/.test(options.url) ? '&' : '?';
|
||||
// XDomainRequest only supports GET and POST:
|
||||
if (options.type === 'DELETE') {
|
||||
options.url = options.url + addParamChar + '_method=DELETE';
|
||||
options.type = 'POST';
|
||||
} else if (options.type === 'PUT') {
|
||||
options.url = options.url + addParamChar + '_method=PUT';
|
||||
options.type = 'POST';
|
||||
} else if (options.type === 'PATCH') {
|
||||
options.url = options.url + addParamChar + '_method=PATCH';
|
||||
options.type = 'POST';
|
||||
}
|
||||
// javascript:false as initial iframe src
|
||||
// prevents warning popups on HTTPS in IE6.
|
||||
// IE versions below IE8 cannot set the name property of
|
||||
// elements that have already been added to the DOM,
|
||||
// so we set the name along with the iframe HTML markup:
|
||||
iframe = $(
|
||||
'<iframe src="javascript:false;" name="iframe-transport-' +
|
||||
(counter += 1) + '"></iframe>'
|
||||
).bind('load', function () {
|
||||
var fileInputClones,
|
||||
paramNames = $.isArray(options.paramName) ?
|
||||
options.paramName : [options.paramName];
|
||||
iframe
|
||||
.unbind('load')
|
||||
.bind('load', function () {
|
||||
var response;
|
||||
// Wrap in a try/catch block to catch exceptions thrown
|
||||
// when trying to access cross-domain iframe contents:
|
||||
try {
|
||||
response = iframe.contents();
|
||||
// Google Chrome and Firefox do not throw an
|
||||
// exception when calling iframe.contents() on
|
||||
// cross-domain requests, so we unify the response:
|
||||
if (!response.length || !response[0].firstChild) {
|
||||
throw new Error();
|
||||
}
|
||||
} catch (e) {
|
||||
response = undefined;
|
||||
}
|
||||
// The complete callback returns the
|
||||
// iframe content document as response object:
|
||||
completeCallback(
|
||||
200,
|
||||
'success',
|
||||
{'iframe': response}
|
||||
);
|
||||
// Fix for IE endless progress bar activity bug
|
||||
// (happens on form submits to iframe targets):
|
||||
$('<iframe src="javascript:false;"></iframe>')
|
||||
.appendTo(form);
|
||||
form.remove();
|
||||
});
|
||||
form
|
||||
.prop('target', iframe.prop('name'))
|
||||
.prop('action', options.url)
|
||||
.prop('method', options.type);
|
||||
if (options.formData) {
|
||||
$.each(options.formData, function (index, field) {
|
||||
$('<input type="hidden"/>')
|
||||
.prop('name', field.name)
|
||||
.val(field.value)
|
||||
.appendTo(form);
|
||||
});
|
||||
}
|
||||
if (options.fileInput && options.fileInput.length &&
|
||||
options.type === 'POST') {
|
||||
fileInputClones = options.fileInput.clone();
|
||||
// Insert a clone for each file input field:
|
||||
options.fileInput.after(function (index) {
|
||||
return fileInputClones[index];
|
||||
});
|
||||
if (options.paramName) {
|
||||
options.fileInput.each(function (index) {
|
||||
$(this).prop(
|
||||
'name',
|
||||
paramNames[index] || options.paramName
|
||||
);
|
||||
});
|
||||
}
|
||||
// Appending the file input fields to the hidden form
|
||||
// removes them from their original location:
|
||||
form
|
||||
.append(options.fileInput)
|
||||
.prop('enctype', 'multipart/form-data')
|
||||
// enctype must be set as encoding for IE:
|
||||
.prop('encoding', 'multipart/form-data');
|
||||
}
|
||||
form.submit();
|
||||
// Insert the file input fields at their original location
|
||||
// by replacing the clones with the originals:
|
||||
if (fileInputClones && fileInputClones.length) {
|
||||
options.fileInput.each(function (index, input) {
|
||||
var clone = $(fileInputClones[index]);
|
||||
$(input).prop('name', clone.prop('name'));
|
||||
clone.replaceWith(input);
|
||||
});
|
||||
}
|
||||
});
|
||||
form.append(iframe).appendTo(document.body);
|
||||
},
|
||||
abort: function () {
|
||||
if (iframe) {
|
||||
// javascript:false as iframe src aborts the request
|
||||
// and prevents warning popups on HTTPS in IE6.
|
||||
// concat is used to avoid the "Script URL" JSLint error:
|
||||
iframe
|
||||
.unbind('load')
|
||||
.prop('src', 'javascript'.concat(':false;'));
|
||||
}
|
||||
if (form) {
|
||||
form.remove();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// The iframe transport returns the iframe content document as response.
|
||||
// The following adds converters from iframe to text, json, html, and script:
|
||||
$.ajaxSetup({
|
||||
converters: {
|
||||
'iframe text': function (iframe) {
|
||||
return iframe && $(iframe[0].body).text();
|
||||
},
|
||||
'iframe json': function (iframe) {
|
||||
return iframe && $.parseJSON($(iframe[0].body).text());
|
||||
},
|
||||
'iframe html': function (iframe) {
|
||||
return iframe && $(iframe[0].body).html();
|
||||
},
|
||||
'iframe script': function (iframe) {
|
||||
return iframe && $.globalEval($(iframe[0].body).text());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}));
|
||||
/*
|
||||
* jQuery Iframe Transport Plugin 1.6.1
|
||||
* https://github.com/blueimp/jQuery-File-Upload
|
||||
*
|
||||
* Copyright 2011, Sebastian Tschan
|
||||
* https://blueimp.net
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
/*jslint unparam: true, nomen: true */
|
||||
/*global define, window, document */
|
||||
|
||||
(function (factory) {
|
||||
'use strict';
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// Register as an anonymous AMD module:
|
||||
define(['jquery'], factory);
|
||||
} else {
|
||||
// Browser globals:
|
||||
factory(window.jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
'use strict';
|
||||
|
||||
// Helper variable to create unique names for the transport iframes:
|
||||
var counter = 0;
|
||||
|
||||
// The iframe transport accepts three additional options:
|
||||
// options.fileInput: a jQuery collection of file input fields
|
||||
// options.paramName: the parameter name for the file form data,
|
||||
// overrides the name property of the file input field(s),
|
||||
// can be a string or an array of strings.
|
||||
// options.formData: an array of objects with name and value properties,
|
||||
// equivalent to the return data of .serializeArray(), e.g.:
|
||||
// [{name: 'a', value: 1}, {name: 'b', value: 2}]
|
||||
$.ajaxTransport('iframe', function (options) {
|
||||
if (options.async) {
|
||||
var form,
|
||||
iframe,
|
||||
addParamChar;
|
||||
return {
|
||||
send: function (_, completeCallback) {
|
||||
form = $('<form style="display:none;"></form>');
|
||||
form.attr('accept-charset', options.formAcceptCharset);
|
||||
addParamChar = /\?/.test(options.url) ? '&' : '?';
|
||||
// XDomainRequest only supports GET and POST:
|
||||
if (options.type === 'DELETE') {
|
||||
options.url = options.url + addParamChar + '_method=DELETE';
|
||||
options.type = 'POST';
|
||||
} else if (options.type === 'PUT') {
|
||||
options.url = options.url + addParamChar + '_method=PUT';
|
||||
options.type = 'POST';
|
||||
} else if (options.type === 'PATCH') {
|
||||
options.url = options.url + addParamChar + '_method=PATCH';
|
||||
options.type = 'POST';
|
||||
}
|
||||
// javascript:false as initial iframe src
|
||||
// prevents warning popups on HTTPS in IE6.
|
||||
// IE versions below IE8 cannot set the name property of
|
||||
// elements that have already been added to the DOM,
|
||||
// so we set the name along with the iframe HTML markup:
|
||||
iframe = $(
|
||||
'<iframe src="javascript:false;" name="iframe-transport-' +
|
||||
(counter += 1) + '"></iframe>'
|
||||
).bind('load', function () {
|
||||
var fileInputClones,
|
||||
paramNames = $.isArray(options.paramName) ?
|
||||
options.paramName : [options.paramName];
|
||||
iframe
|
||||
.unbind('load')
|
||||
.bind('load', function () {
|
||||
var response;
|
||||
// Wrap in a try/catch block to catch exceptions thrown
|
||||
// when trying to access cross-domain iframe contents:
|
||||
try {
|
||||
response = iframe.contents();
|
||||
// Google Chrome and Firefox do not throw an
|
||||
// exception when calling iframe.contents() on
|
||||
// cross-domain requests, so we unify the response:
|
||||
if (!response.length || !response[0].firstChild) {
|
||||
throw new Error();
|
||||
}
|
||||
} catch (e) {
|
||||
response = undefined;
|
||||
}
|
||||
// The complete callback returns the
|
||||
// iframe content document as response object:
|
||||
completeCallback(
|
||||
200,
|
||||
'success',
|
||||
{'iframe': response}
|
||||
);
|
||||
// Fix for IE endless progress bar activity bug
|
||||
// (happens on form submits to iframe targets):
|
||||
$('<iframe src="javascript:false;"></iframe>')
|
||||
.appendTo(form);
|
||||
form.remove();
|
||||
});
|
||||
form
|
||||
.prop('target', iframe.prop('name'))
|
||||
.prop('action', options.url)
|
||||
.prop('method', options.type);
|
||||
if (options.formData) {
|
||||
$.each(options.formData, function (index, field) {
|
||||
$('<input type="hidden"/>')
|
||||
.prop('name', field.name)
|
||||
.val(field.value)
|
||||
.appendTo(form);
|
||||
});
|
||||
}
|
||||
if (options.fileInput && options.fileInput.length &&
|
||||
options.type === 'POST') {
|
||||
fileInputClones = options.fileInput.clone();
|
||||
// Insert a clone for each file input field:
|
||||
options.fileInput.after(function (index) {
|
||||
return fileInputClones[index];
|
||||
});
|
||||
if (options.paramName) {
|
||||
options.fileInput.each(function (index) {
|
||||
$(this).prop(
|
||||
'name',
|
||||
paramNames[index] || options.paramName
|
||||
);
|
||||
});
|
||||
}
|
||||
// Appending the file input fields to the hidden form
|
||||
// removes them from their original location:
|
||||
form
|
||||
.append(options.fileInput)
|
||||
.prop('enctype', 'multipart/form-data')
|
||||
// enctype must be set as encoding for IE:
|
||||
.prop('encoding', 'multipart/form-data');
|
||||
}
|
||||
form.submit();
|
||||
// Insert the file input fields at their original location
|
||||
// by replacing the clones with the originals:
|
||||
if (fileInputClones && fileInputClones.length) {
|
||||
options.fileInput.each(function (index, input) {
|
||||
var clone = $(fileInputClones[index]);
|
||||
$(input).prop('name', clone.prop('name'));
|
||||
clone.replaceWith(input);
|
||||
});
|
||||
}
|
||||
});
|
||||
form.append(iframe).appendTo(document.body);
|
||||
},
|
||||
abort: function () {
|
||||
if (iframe) {
|
||||
// javascript:false as iframe src aborts the request
|
||||
// and prevents warning popups on HTTPS in IE6.
|
||||
// concat is used to avoid the "Script URL" JSLint error:
|
||||
iframe
|
||||
.unbind('load')
|
||||
.prop('src', 'javascript'.concat(':false;'));
|
||||
}
|
||||
if (form) {
|
||||
form.remove();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// The iframe transport returns the iframe content document as response.
|
||||
// The following adds converters from iframe to text, json, html, and script:
|
||||
$.ajaxSetup({
|
||||
converters: {
|
||||
'iframe text': function (iframe) {
|
||||
return iframe && $(iframe[0].body).text();
|
||||
},
|
||||
'iframe json': function (iframe) {
|
||||
return iframe && $.parseJSON($(iframe[0].body).text());
|
||||
},
|
||||
'iframe html': function (iframe) {
|
||||
return iframe && $(iframe[0].body).html();
|
||||
},
|
||||
'iframe script': function (iframe) {
|
||||
return iframe && $.globalEval($(iframe[0].body).text());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}));
|
||||
|
|
1060
api/soft/tinymce/4.3.12/plugins/image/bootstrap/blueimp/js/jquery.ui.widget.js
vendored
Normal file → Executable file
0
api/soft/tinymce/4.3.12/plugins/image/bootstrap/blueimp/js/script.js
Normal file → Executable file
12614
api/soft/tinymce/4.3.12/plugins/image/bootstrap/css/bootstrap.css
vendored
Normal file → Executable file
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 424 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
0
api/soft/tinymce/4.3.12/plugins/image/bootstrap/img/glyphicons-halflings-white.png
Normal file → Executable file
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
0
api/soft/tinymce/4.3.12/plugins/image/bootstrap/img/glyphicons-halflings.png
Normal file → Executable file
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1,349 +1,349 @@
|
|||
//fgnass.github.com/spin.js#v1.3
|
||||
|
||||
/**
|
||||
* Copyright (c) 2011-2013 Felix Gnass
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
(function(root, factory) {
|
||||
|
||||
/* CommonJS */
|
||||
if (typeof exports == 'object') module.exports = factory()
|
||||
|
||||
/* AMD module */
|
||||
else if (typeof define == 'function' && define.amd) define(factory)
|
||||
|
||||
/* Browser global */
|
||||
else root.Spinner = factory()
|
||||
}
|
||||
(this, function() {
|
||||
"use strict";
|
||||
|
||||
var prefixes = ['webkit', 'Moz', 'ms', 'O'] /* Vendor prefixes */
|
||||
, animations = {} /* Animation rules keyed by their name */
|
||||
, useCssAnimations /* Whether to use CSS animations or setTimeout */
|
||||
|
||||
/**
|
||||
* Utility function to create elements. If no tag name is given,
|
||||
* a DIV is created. Optionally properties can be passed.
|
||||
*/
|
||||
function createEl(tag, prop) {
|
||||
var el = document.createElement(tag || 'div')
|
||||
, n
|
||||
|
||||
for(n in prop) el[n] = prop[n]
|
||||
return el
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends children and returns the parent.
|
||||
*/
|
||||
function ins(parent /* child1, child2, ...*/) {
|
||||
for (var i=1, n=arguments.length; i<n; i++)
|
||||
parent.appendChild(arguments[i])
|
||||
|
||||
return parent
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a new stylesheet to hold the @keyframe or VML rules.
|
||||
*/
|
||||
var sheet = (function() {
|
||||
var el = createEl('style', {type : 'text/css'})
|
||||
ins(document.getElementsByTagName('head')[0], el)
|
||||
return el.sheet || el.styleSheet
|
||||
}())
|
||||
|
||||
/**
|
||||
* Creates an opacity keyframe animation rule and returns its name.
|
||||
* Since most mobile Webkits have timing issues with animation-delay,
|
||||
* we create separate rules for each line/segment.
|
||||
*/
|
||||
function addAnimation(alpha, trail, i, lines) {
|
||||
var name = ['opacity', trail, ~~(alpha*100), i, lines].join('-')
|
||||
, start = 0.01 + i/lines * 100
|
||||
, z = Math.max(1 - (1-alpha) / trail * (100-start), alpha)
|
||||
, prefix = useCssAnimations.substring(0, useCssAnimations.indexOf('Animation')).toLowerCase()
|
||||
, pre = prefix && '-' + prefix + '-' || ''
|
||||
|
||||
if (!animations[name]) {
|
||||
sheet.insertRule(
|
||||
'@' + pre + 'keyframes ' + name + '{' +
|
||||
'0%{opacity:' + z + '}' +
|
||||
start + '%{opacity:' + alpha + '}' +
|
||||
(start+0.01) + '%{opacity:1}' +
|
||||
(start+trail) % 100 + '%{opacity:' + alpha + '}' +
|
||||
'100%{opacity:' + z + '}' +
|
||||
'}', sheet.cssRules.length)
|
||||
|
||||
animations[name] = 1
|
||||
}
|
||||
|
||||
return name
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries various vendor prefixes and returns the first supported property.
|
||||
*/
|
||||
function vendor(el, prop) {
|
||||
var s = el.style
|
||||
, pp
|
||||
, i
|
||||
|
||||
if(s[prop] !== undefined) return prop
|
||||
prop = prop.charAt(0).toUpperCase() + prop.slice(1)
|
||||
for(i=0; i<prefixes.length; i++) {
|
||||
pp = prefixes[i]+prop
|
||||
if(s[pp] !== undefined) return pp
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets multiple style properties at once.
|
||||
*/
|
||||
function css(el, prop) {
|
||||
for (var n in prop)
|
||||
el.style[vendor(el, n)||n] = prop[n]
|
||||
|
||||
return el
|
||||
}
|
||||
|
||||
/**
|
||||
* Fills in default values.
|
||||
*/
|
||||
function merge(obj) {
|
||||
for (var i=1; i < arguments.length; i++) {
|
||||
var def = arguments[i]
|
||||
for (var n in def)
|
||||
if (obj[n] === undefined) obj[n] = def[n]
|
||||
}
|
||||
return obj
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the absolute page-offset of the given element.
|
||||
*/
|
||||
function pos(el) {
|
||||
var o = { x:el.offsetLeft, y:el.offsetTop }
|
||||
while((el = el.offsetParent))
|
||||
o.x+=el.offsetLeft, o.y+=el.offsetTop
|
||||
|
||||
return o
|
||||
}
|
||||
|
||||
// Built-in defaults
|
||||
|
||||
var defaults = {
|
||||
lines: 12, // The number of lines to draw
|
||||
length: 7, // The length of each line
|
||||
width: 5, // The line thickness
|
||||
radius: 10, // The radius of the inner circle
|
||||
rotate: 0, // Rotation offset
|
||||
corners: 1, // Roundness (0..1)
|
||||
color: '#000', // #rgb or #rrggbb
|
||||
direction: 1, // 1: clockwise, -1: counterclockwise
|
||||
speed: 1, // Rounds per second
|
||||
trail: 100, // Afterglow percentage
|
||||
opacity: 1/4, // Opacity of the lines
|
||||
fps: 20, // Frames per second when using setTimeout()
|
||||
zIndex: 2e9, // Use a high z-index by default
|
||||
className: 'spinner', // CSS class to assign to the element
|
||||
top: 'auto', // center vertically
|
||||
left: 'auto', // center horizontally
|
||||
position: 'relative' // element position
|
||||
}
|
||||
|
||||
/** The constructor */
|
||||
function Spinner(o) {
|
||||
if (typeof this == 'undefined') return new Spinner(o)
|
||||
this.opts = merge(o || {}, Spinner.defaults, defaults)
|
||||
}
|
||||
|
||||
// Global defaults that override the built-ins:
|
||||
Spinner.defaults = {}
|
||||
|
||||
merge(Spinner.prototype, {
|
||||
|
||||
/**
|
||||
* Adds the spinner to the given target element. If this instance is already
|
||||
* spinning, it is automatically removed from its previous target b calling
|
||||
* stop() internally.
|
||||
*/
|
||||
spin: function(target) {
|
||||
this.stop()
|
||||
|
||||
var self = this
|
||||
, o = self.opts
|
||||
, el = self.el = css(createEl(0, {className: o.className}), {position: o.position, width: 0, zIndex: o.zIndex})
|
||||
, mid = o.radius+o.length+o.width
|
||||
, ep // element position
|
||||
, tp // target position
|
||||
|
||||
if (target) {
|
||||
target.insertBefore(el, target.firstChild||null)
|
||||
tp = pos(target)
|
||||
ep = pos(el)
|
||||
css(el, {
|
||||
left: (o.left == 'auto' ? tp.x-ep.x + (target.offsetWidth >> 1) : parseInt(o.left, 10) + mid) + 'px',
|
||||
top: (o.top == 'auto' ? tp.y-ep.y + (target.offsetHeight >> 1) : parseInt(o.top, 10) + mid) + 'px'
|
||||
})
|
||||
}
|
||||
|
||||
el.setAttribute('role', 'progressbar')
|
||||
self.lines(el, self.opts)
|
||||
|
||||
if (!useCssAnimations) {
|
||||
// No CSS animation support, use setTimeout() instead
|
||||
var i = 0
|
||||
, start = (o.lines - 1) * (1 - o.direction) / 2
|
||||
, alpha
|
||||
, fps = o.fps
|
||||
, f = fps/o.speed
|
||||
, ostep = (1-o.opacity) / (f*o.trail / 100)
|
||||
, astep = f/o.lines
|
||||
|
||||
;(function anim() {
|
||||
i++;
|
||||
for (var j = 0; j < o.lines; j++) {
|
||||
alpha = Math.max(1 - (i + (o.lines - j) * astep) % f * ostep, o.opacity)
|
||||
|
||||
self.opacity(el, j * o.direction + start, alpha, o)
|
||||
}
|
||||
self.timeout = self.el && setTimeout(anim, ~~(1000/fps))
|
||||
})()
|
||||
}
|
||||
return self
|
||||
},
|
||||
|
||||
/**
|
||||
* Stops and removes the Spinner.
|
||||
*/
|
||||
stop: function() {
|
||||
var el = this.el
|
||||
if (el) {
|
||||
clearTimeout(this.timeout)
|
||||
if (el.parentNode) el.parentNode.removeChild(el)
|
||||
this.el = undefined
|
||||
}
|
||||
return this
|
||||
},
|
||||
|
||||
/**
|
||||
* Internal method that draws the individual lines. Will be overwritten
|
||||
* in VML fallback mode below.
|
||||
*/
|
||||
lines: function(el, o) {
|
||||
var i = 0
|
||||
, start = (o.lines - 1) * (1 - o.direction) / 2
|
||||
, seg
|
||||
|
||||
function fill(color, shadow) {
|
||||
return css(createEl(), {
|
||||
position: 'absolute',
|
||||
width: (o.length+o.width) + 'px',
|
||||
height: o.width + 'px',
|
||||
background: color,
|
||||
boxShadow: shadow,
|
||||
transformOrigin: 'left',
|
||||
transform: 'rotate(' + ~~(360/o.lines*i+o.rotate) + 'deg) translate(' + o.radius+'px' +',0)',
|
||||
borderRadius: (o.corners * o.width>>1) + 'px'
|
||||
})
|
||||
}
|
||||
|
||||
for (; i < o.lines; i++) {
|
||||
seg = css(createEl(), {
|
||||
position: 'absolute',
|
||||
top: 1+~(o.width/2) + 'px',
|
||||
transform: o.hwaccel ? 'translate3d(0,0,0)' : '',
|
||||
opacity: o.opacity,
|
||||
animation: useCssAnimations && addAnimation(o.opacity, o.trail, start + i * o.direction, o.lines) + ' ' + 1/o.speed + 's linear infinite'
|
||||
})
|
||||
|
||||
if (o.shadow) ins(seg, css(fill('#000', '0 0 4px ' + '#000'), {top: 2+'px'}))
|
||||
|
||||
ins(el, ins(seg, fill(o.color, '0 0 1px rgba(0,0,0,.1)')))
|
||||
}
|
||||
return el
|
||||
},
|
||||
|
||||
/**
|
||||
* Internal method that adjusts the opacity of a single line.
|
||||
* Will be overwritten in VML fallback mode below.
|
||||
*/
|
||||
opacity: function(el, i, val) {
|
||||
if (i < el.childNodes.length) el.childNodes[i].style.opacity = val
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
function initVML() {
|
||||
|
||||
/* Utility function to create a VML tag */
|
||||
function vml(tag, attr) {
|
||||
return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr)
|
||||
}
|
||||
|
||||
// No CSS transforms but VML support, add a CSS rule for VML elements:
|
||||
sheet.addRule('.spin-vml', 'behavior:url(#default#VML)')
|
||||
|
||||
Spinner.prototype.lines = function(el, o) {
|
||||
var r = o.length+o.width
|
||||
, s = 2*r
|
||||
|
||||
function grp() {
|
||||
return css(
|
||||
vml('group', {
|
||||
coordsize: s + ' ' + s,
|
||||
coordorigin: -r + ' ' + -r
|
||||
}),
|
||||
{ width: s, height: s }
|
||||
)
|
||||
}
|
||||
|
||||
var margin = -(o.width+o.length)*2 + 'px'
|
||||
, g = css(grp(), {position: 'absolute', top: margin, left: margin})
|
||||
, i
|
||||
|
||||
function seg(i, dx, filter) {
|
||||
ins(g,
|
||||
ins(css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx}),
|
||||
ins(css(vml('roundrect', {arcsize: o.corners}), {
|
||||
width: r,
|
||||
height: o.width,
|
||||
left: o.radius,
|
||||
top: -o.width>>1,
|
||||
filter: filter
|
||||
}),
|
||||
vml('fill', {color: o.color, opacity: o.opacity}),
|
||||
vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (o.shadow)
|
||||
for (i = 1; i <= o.lines; i++)
|
||||
seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)')
|
||||
|
||||
for (i = 1; i <= o.lines; i++) seg(i)
|
||||
return ins(el, g)
|
||||
}
|
||||
|
||||
Spinner.prototype.opacity = function(el, i, val, o) {
|
||||
var c = el.firstChild
|
||||
o = o.shadow && o.lines || 0
|
||||
if (c && i+o < c.childNodes.length) {
|
||||
c = c.childNodes[i+o]; c = c && c.firstChild; c = c && c.firstChild
|
||||
if (c) c.opacity = val
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var probe = css(createEl('group'), {behavior: 'url(#default#VML)'})
|
||||
|
||||
if (!vendor(probe, 'transform') && probe.adj) initVML()
|
||||
else useCssAnimations = vendor(probe, 'animation')
|
||||
|
||||
return Spinner
|
||||
|
||||
}));
|
||||
//fgnass.github.com/spin.js#v1.3
|
||||
|
||||
/**
|
||||
* Copyright (c) 2011-2013 Felix Gnass
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
(function(root, factory) {
|
||||
|
||||
/* CommonJS */
|
||||
if (typeof exports == 'object') module.exports = factory()
|
||||
|
||||
/* AMD module */
|
||||
else if (typeof define == 'function' && define.amd) define(factory)
|
||||
|
||||
/* Browser global */
|
||||
else root.Spinner = factory()
|
||||
}
|
||||
(this, function() {
|
||||
"use strict";
|
||||
|
||||
var prefixes = ['webkit', 'Moz', 'ms', 'O'] /* Vendor prefixes */
|
||||
, animations = {} /* Animation rules keyed by their name */
|
||||
, useCssAnimations /* Whether to use CSS animations or setTimeout */
|
||||
|
||||
/**
|
||||
* Utility function to create elements. If no tag name is given,
|
||||
* a DIV is created. Optionally properties can be passed.
|
||||
*/
|
||||
function createEl(tag, prop) {
|
||||
var el = document.createElement(tag || 'div')
|
||||
, n
|
||||
|
||||
for(n in prop) el[n] = prop[n]
|
||||
return el
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends children and returns the parent.
|
||||
*/
|
||||
function ins(parent /* child1, child2, ...*/) {
|
||||
for (var i=1, n=arguments.length; i<n; i++)
|
||||
parent.appendChild(arguments[i])
|
||||
|
||||
return parent
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a new stylesheet to hold the @keyframe or VML rules.
|
||||
*/
|
||||
var sheet = (function() {
|
||||
var el = createEl('style', {type : 'text/css'})
|
||||
ins(document.getElementsByTagName('head')[0], el)
|
||||
return el.sheet || el.styleSheet
|
||||
}())
|
||||
|
||||
/**
|
||||
* Creates an opacity keyframe animation rule and returns its name.
|
||||
* Since most mobile Webkits have timing issues with animation-delay,
|
||||
* we create separate rules for each line/segment.
|
||||
*/
|
||||
function addAnimation(alpha, trail, i, lines) {
|
||||
var name = ['opacity', trail, ~~(alpha*100), i, lines].join('-')
|
||||
, start = 0.01 + i/lines * 100
|
||||
, z = Math.max(1 - (1-alpha) / trail * (100-start), alpha)
|
||||
, prefix = useCssAnimations.substring(0, useCssAnimations.indexOf('Animation')).toLowerCase()
|
||||
, pre = prefix && '-' + prefix + '-' || ''
|
||||
|
||||
if (!animations[name]) {
|
||||
sheet.insertRule(
|
||||
'@' + pre + 'keyframes ' + name + '{' +
|
||||
'0%{opacity:' + z + '}' +
|
||||
start + '%{opacity:' + alpha + '}' +
|
||||
(start+0.01) + '%{opacity:1}' +
|
||||
(start+trail) % 100 + '%{opacity:' + alpha + '}' +
|
||||
'100%{opacity:' + z + '}' +
|
||||
'}', sheet.cssRules.length)
|
||||
|
||||
animations[name] = 1
|
||||
}
|
||||
|
||||
return name
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries various vendor prefixes and returns the first supported property.
|
||||
*/
|
||||
function vendor(el, prop) {
|
||||
var s = el.style
|
||||
, pp
|
||||
, i
|
||||
|
||||
if(s[prop] !== undefined) return prop
|
||||
prop = prop.charAt(0).toUpperCase() + prop.slice(1)
|
||||
for(i=0; i<prefixes.length; i++) {
|
||||
pp = prefixes[i]+prop
|
||||
if(s[pp] !== undefined) return pp
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets multiple style properties at once.
|
||||
*/
|
||||
function css(el, prop) {
|
||||
for (var n in prop)
|
||||
el.style[vendor(el, n)||n] = prop[n]
|
||||
|
||||
return el
|
||||
}
|
||||
|
||||
/**
|
||||
* Fills in default values.
|
||||
*/
|
||||
function merge(obj) {
|
||||
for (var i=1; i < arguments.length; i++) {
|
||||
var def = arguments[i]
|
||||
for (var n in def)
|
||||
if (obj[n] === undefined) obj[n] = def[n]
|
||||
}
|
||||
return obj
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the absolute page-offset of the given element.
|
||||
*/
|
||||
function pos(el) {
|
||||
var o = { x:el.offsetLeft, y:el.offsetTop }
|
||||
while((el = el.offsetParent))
|
||||
o.x+=el.offsetLeft, o.y+=el.offsetTop
|
||||
|
||||
return o
|
||||
}
|
||||
|
||||
// Built-in defaults
|
||||
|
||||
var defaults = {
|
||||
lines: 12, // The number of lines to draw
|
||||
length: 7, // The length of each line
|
||||
width: 5, // The line thickness
|
||||
radius: 10, // The radius of the inner circle
|
||||
rotate: 0, // Rotation offset
|
||||
corners: 1, // Roundness (0..1)
|
||||
color: '#000', // #rgb or #rrggbb
|
||||
direction: 1, // 1: clockwise, -1: counterclockwise
|
||||
speed: 1, // Rounds per second
|
||||
trail: 100, // Afterglow percentage
|
||||
opacity: 1/4, // Opacity of the lines
|
||||
fps: 20, // Frames per second when using setTimeout()
|
||||
zIndex: 2e9, // Use a high z-index by default
|
||||
className: 'spinner', // CSS class to assign to the element
|
||||
top: 'auto', // center vertically
|
||||
left: 'auto', // center horizontally
|
||||
position: 'relative' // element position
|
||||
}
|
||||
|
||||
/** The constructor */
|
||||
function Spinner(o) {
|
||||
if (typeof this == 'undefined') return new Spinner(o)
|
||||
this.opts = merge(o || {}, Spinner.defaults, defaults)
|
||||
}
|
||||
|
||||
// Global defaults that override the built-ins:
|
||||
Spinner.defaults = {}
|
||||
|
||||
merge(Spinner.prototype, {
|
||||
|
||||
/**
|
||||
* Adds the spinner to the given target element. If this instance is already
|
||||
* spinning, it is automatically removed from its previous target b calling
|
||||
* stop() internally.
|
||||
*/
|
||||
spin: function(target) {
|
||||
this.stop()
|
||||
|
||||
var self = this
|
||||
, o = self.opts
|
||||
, el = self.el = css(createEl(0, {className: o.className}), {position: o.position, width: 0, zIndex: o.zIndex})
|
||||
, mid = o.radius+o.length+o.width
|
||||
, ep // element position
|
||||
, tp // target position
|
||||
|
||||
if (target) {
|
||||
target.insertBefore(el, target.firstChild||null)
|
||||
tp = pos(target)
|
||||
ep = pos(el)
|
||||
css(el, {
|
||||
left: (o.left == 'auto' ? tp.x-ep.x + (target.offsetWidth >> 1) : parseInt(o.left, 10) + mid) + 'px',
|
||||
top: (o.top == 'auto' ? tp.y-ep.y + (target.offsetHeight >> 1) : parseInt(o.top, 10) + mid) + 'px'
|
||||
})
|
||||
}
|
||||
|
||||
el.setAttribute('role', 'progressbar')
|
||||
self.lines(el, self.opts)
|
||||
|
||||
if (!useCssAnimations) {
|
||||
// No CSS animation support, use setTimeout() instead
|
||||
var i = 0
|
||||
, start = (o.lines - 1) * (1 - o.direction) / 2
|
||||
, alpha
|
||||
, fps = o.fps
|
||||
, f = fps/o.speed
|
||||
, ostep = (1-o.opacity) / (f*o.trail / 100)
|
||||
, astep = f/o.lines
|
||||
|
||||
;(function anim() {
|
||||
i++;
|
||||
for (var j = 0; j < o.lines; j++) {
|
||||
alpha = Math.max(1 - (i + (o.lines - j) * astep) % f * ostep, o.opacity)
|
||||
|
||||
self.opacity(el, j * o.direction + start, alpha, o)
|
||||
}
|
||||
self.timeout = self.el && setTimeout(anim, ~~(1000/fps))
|
||||
})()
|
||||
}
|
||||
return self
|
||||
},
|
||||
|
||||
/**
|
||||
* Stops and removes the Spinner.
|
||||
*/
|
||||
stop: function() {
|
||||
var el = this.el
|
||||
if (el) {
|
||||
clearTimeout(this.timeout)
|
||||
if (el.parentNode) el.parentNode.removeChild(el)
|
||||
this.el = undefined
|
||||
}
|
||||
return this
|
||||
},
|
||||
|
||||
/**
|
||||
* Internal method that draws the individual lines. Will be overwritten
|
||||
* in VML fallback mode below.
|
||||
*/
|
||||
lines: function(el, o) {
|
||||
var i = 0
|
||||
, start = (o.lines - 1) * (1 - o.direction) / 2
|
||||
, seg
|
||||
|
||||
function fill(color, shadow) {
|
||||
return css(createEl(), {
|
||||
position: 'absolute',
|
||||
width: (o.length+o.width) + 'px',
|
||||
height: o.width + 'px',
|
||||
background: color,
|
||||
boxShadow: shadow,
|
||||
transformOrigin: 'left',
|
||||
transform: 'rotate(' + ~~(360/o.lines*i+o.rotate) + 'deg) translate(' + o.radius+'px' +',0)',
|
||||
borderRadius: (o.corners * o.width>>1) + 'px'
|
||||
})
|
||||
}
|
||||
|
||||
for (; i < o.lines; i++) {
|
||||
seg = css(createEl(), {
|
||||
position: 'absolute',
|
||||
top: 1+~(o.width/2) + 'px',
|
||||
transform: o.hwaccel ? 'translate3d(0,0,0)' : '',
|
||||
opacity: o.opacity,
|
||||
animation: useCssAnimations && addAnimation(o.opacity, o.trail, start + i * o.direction, o.lines) + ' ' + 1/o.speed + 's linear infinite'
|
||||
})
|
||||
|
||||
if (o.shadow) ins(seg, css(fill('#000', '0 0 4px ' + '#000'), {top: 2+'px'}))
|
||||
|
||||
ins(el, ins(seg, fill(o.color, '0 0 1px rgba(0,0,0,.1)')))
|
||||
}
|
||||
return el
|
||||
},
|
||||
|
||||
/**
|
||||
* Internal method that adjusts the opacity of a single line.
|
||||
* Will be overwritten in VML fallback mode below.
|
||||
*/
|
||||
opacity: function(el, i, val) {
|
||||
if (i < el.childNodes.length) el.childNodes[i].style.opacity = val
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
function initVML() {
|
||||
|
||||
/* Utility function to create a VML tag */
|
||||
function vml(tag, attr) {
|
||||
return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr)
|
||||
}
|
||||
|
||||
// No CSS transforms but VML support, add a CSS rule for VML elements:
|
||||
sheet.addRule('.spin-vml', 'behavior:url(#default#VML)')
|
||||
|
||||
Spinner.prototype.lines = function(el, o) {
|
||||
var r = o.length+o.width
|
||||
, s = 2*r
|
||||
|
||||
function grp() {
|
||||
return css(
|
||||
vml('group', {
|
||||
coordsize: s + ' ' + s,
|
||||
coordorigin: -r + ' ' + -r
|
||||
}),
|
||||
{ width: s, height: s }
|
||||
)
|
||||
}
|
||||
|
||||
var margin = -(o.width+o.length)*2 + 'px'
|
||||
, g = css(grp(), {position: 'absolute', top: margin, left: margin})
|
||||
, i
|
||||
|
||||
function seg(i, dx, filter) {
|
||||
ins(g,
|
||||
ins(css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx}),
|
||||
ins(css(vml('roundrect', {arcsize: o.corners}), {
|
||||
width: r,
|
||||
height: o.width,
|
||||
left: o.radius,
|
||||
top: -o.width>>1,
|
||||
filter: filter
|
||||
}),
|
||||
vml('fill', {color: o.color, opacity: o.opacity}),
|
||||
vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
if (o.shadow)
|
||||
for (i = 1; i <= o.lines; i++)
|
||||
seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)')
|
||||
|
||||
for (i = 1; i <= o.lines; i++) seg(i)
|
||||
return ins(el, g)
|
||||
}
|
||||
|
||||
Spinner.prototype.opacity = function(el, i, val, o) {
|
||||
var c = el.firstChild
|
||||
o = o.shadow && o.lines || 0
|
||||
if (c && i+o < c.childNodes.length) {
|
||||
c = c.childNodes[i+o]; c = c && c.firstChild; c = c && c.firstChild
|
||||
if (c) c.opacity = val
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var probe = css(createEl('group'), {behavior: 'url(#default#VML)'})
|
||||
|
||||
if (!vendor(probe, 'transform') && probe.adj) initVML()
|
||||
else useCssAnimations = vendor(probe, 'animation')
|
||||
|
||||
return Spinner
|
||||
|
||||
}));
|
||||
|
|
12
api/soft/tinymce/4.3.12/plugins/image/bootstrap/js/bootstrap.min.js
vendored
Normal file → Executable file
16
api/soft/tinymce/4.3.12/plugins/image/bootstrap/js/html5shiv.js
vendored
Normal file → Executable file
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
|
||||
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
|
||||
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
|
||||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
|
||||
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
|
||||
/*
|
||||
HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
|
||||
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
|
||||
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
|
||||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
|
||||
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
|
||||
|
|
8
api/soft/tinymce/4.3.12/plugins/image/bootstrap/js/jquery.js
vendored
Normal file → Executable file
|
@ -1,80 +1,80 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2013 Felix Gnass
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
Basic Usage:
|
||||
============
|
||||
|
||||
$('#el').spin(); // Creates a default Spinner using the text color of #el.
|
||||
$('#el').spin({ ... }); // Creates a Spinner using the provided options.
|
||||
|
||||
$('#el').spin(false); // Stops and removes the spinner.
|
||||
|
||||
Using Presets:
|
||||
==============
|
||||
|
||||
$('#el').spin('small'); // Creates a 'small' Spinner using the text color of #el.
|
||||
$('#el').spin('large', '#fff'); // Creates a 'large' white Spinner.
|
||||
|
||||
Adding a custom preset:
|
||||
=======================
|
||||
|
||||
$.fn.spin.presets.flower = {
|
||||
lines: 9
|
||||
length: 10
|
||||
width: 20
|
||||
radius: 0
|
||||
}
|
||||
|
||||
$('#el').spin('flower', 'red');
|
||||
|
||||
*/
|
||||
|
||||
(function(factory) {
|
||||
|
||||
if (typeof exports == 'object') {
|
||||
// CommonJS
|
||||
factory(require('jquery'), require('spin'))
|
||||
}
|
||||
else if (typeof define == 'function' && define.amd) {
|
||||
// AMD, register as anonymous module
|
||||
define(['jquery', 'spin'], factory)
|
||||
}
|
||||
else {
|
||||
// Browser globals
|
||||
if (!window.Spinner) throw new Error('Spin.js not present')
|
||||
factory(window.jQuery, window.Spinner)
|
||||
}
|
||||
|
||||
}(function($, Spinner) {
|
||||
|
||||
$.fn.spin = function(opts, color) {
|
||||
|
||||
return this.each(function() {
|
||||
var $this = $(this),
|
||||
data = $this.data();
|
||||
|
||||
if (data.spinner) {
|
||||
data.spinner.stop();
|
||||
delete data.spinner;
|
||||
}
|
||||
if (opts !== false) {
|
||||
opts = $.extend(
|
||||
{ color: color || $this.css('color') },
|
||||
$.fn.spin.presets[opts] || opts
|
||||
)
|
||||
data.spinner = new Spinner(opts).spin(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.spin.presets = {
|
||||
tiny: { lines: 8, length: 2, width: 2, radius: 3 },
|
||||
small: { lines: 8, length: 4, width: 3, radius: 5 },
|
||||
large: { lines: 10, length: 8, width: 4, radius: 8 }
|
||||
}
|
||||
|
||||
}));
|
||||
/**
|
||||
* Copyright (c) 2011-2013 Felix Gnass
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
Basic Usage:
|
||||
============
|
||||
|
||||
$('#el').spin(); // Creates a default Spinner using the text color of #el.
|
||||
$('#el').spin({ ... }); // Creates a Spinner using the provided options.
|
||||
|
||||
$('#el').spin(false); // Stops and removes the spinner.
|
||||
|
||||
Using Presets:
|
||||
==============
|
||||
|
||||
$('#el').spin('small'); // Creates a 'small' Spinner using the text color of #el.
|
||||
$('#el').spin('large', '#fff'); // Creates a 'large' white Spinner.
|
||||
|
||||
Adding a custom preset:
|
||||
=======================
|
||||
|
||||
$.fn.spin.presets.flower = {
|
||||
lines: 9
|
||||
length: 10
|
||||
width: 20
|
||||
radius: 0
|
||||
}
|
||||
|
||||
$('#el').spin('flower', 'red');
|
||||
|
||||
*/
|
||||
|
||||
(function(factory) {
|
||||
|
||||
if (typeof exports == 'object') {
|
||||
// CommonJS
|
||||
factory(require('jquery'), require('spin'))
|
||||
}
|
||||
else if (typeof define == 'function' && define.amd) {
|
||||
// AMD, register as anonymous module
|
||||
define(['jquery', 'spin'], factory)
|
||||
}
|
||||
else {
|
||||
// Browser globals
|
||||
if (!window.Spinner) throw new Error('Spin.js not present')
|
||||
factory(window.jQuery, window.Spinner)
|
||||
}
|
||||
|
||||
}(function($, Spinner) {
|
||||
|
||||
$.fn.spin = function(opts, color) {
|
||||
|
||||
return this.each(function() {
|
||||
var $this = $(this),
|
||||
data = $this.data();
|
||||
|
||||
if (data.spinner) {
|
||||
data.spinner.stop();
|
||||
delete data.spinner;
|
||||
}
|
||||
if (opts !== false) {
|
||||
opts = $.extend(
|
||||
{ color: color || $this.css('color') },
|
||||
$.fn.spin.presets[opts] || opts
|
||||
)
|
||||
data.spinner = new Spinner(opts).spin(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.spin.presets = {
|
||||
tiny: { lines: 8, length: 2, width: 2, radius: 3 },
|
||||
small: { lines: 8, length: 4, width: 3, radius: 5 },
|
||||
large: { lines: 10, length: 8, width: 4, radius: 8 }
|
||||
}
|
||||
|
||||
}));
|
||||
|
|
0
api/soft/tinymce/4.3.12/plugins/image/cache/timthumb_cacheLastCleanTime.touch
vendored
Normal file → Executable file
|
@ -4,12 +4,20 @@ session_start();
|
|||
|
||||
/** Full path to the folder that images will be used as library and upload. Include trailing slash */
|
||||
#define('LIBRARY_FOLDER_PATH', $_SERVER['DOCUMENT_ROOT'] . 'uploads/');
|
||||
define('LIBRARY_FOLDER_PATH', $_SERVER['DOCUMENT_ROOT'] . '/img/users/' . $_SESSION['user_id'] . '/');
|
||||
define('LIBRARY_FOLDER_PATH', $_SERVER['DOCUMENT_ROOT'] . '/img/' . $_SERVER['SERVER_NAME'] . '/pages/user/' . $_SESSION['user_id'] . '/');
|
||||
|
||||
define('LIBRARY_FOLDER_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/img/users/' . $_SESSION['user_id'] . '/');
|
||||
define('LIBRARY_FOLDER_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/img/' . $_SERVER['SERVER_NAME'] . '/pages/user/' . $_SESSION['user_id'] . '/');
|
||||
|
||||
@mkdir( $_SERVER['DOCUMENT_ROOT'] . '/img/users/', 0777);
|
||||
@mkdir( LIBRARY_FOLDER_PATH, 0777);
|
||||
|
||||
|
||||
@mkdir( $_SERVER['DOCUMENT_ROOT'] . '/img', 0700);
|
||||
@mkdir( $_SERVER['DOCUMENT_ROOT'] . '/img/' . $_SERVER['SERVER_NAME'], 0700);
|
||||
@mkdir( $_SERVER['DOCUMENT_ROOT'] . '/img/' . $_SERVER['SERVER_NAME'] . '/pages', 0700);
|
||||
@mkdir( $_SERVER['DOCUMENT_ROOT'] . '/img/' . $_SERVER['SERVER_NAME'] . '/pages/user', 0700);
|
||||
@mkdir( $_SERVER['DOCUMENT_ROOT'] . '/img/' . $_SERVER['SERVER_NAME'] . '/pages/user/' . $_SESSION['user_id'], 0700);
|
||||
|
||||
//@mkdir( $_SERVER['DOCUMENT_ROOT'] . '/img/users/', 0777);
|
||||
//@mkdir( LIBRARY_FOLDER_PATH, 0777);
|
||||
|
||||
/** Full URL to the folder that images will be used as library and upload. Include trailing slash and protocol (i.e. http://) */
|
||||
//define('LIBRARY_FOLDER_URL', '');
|
||||
|
@ -17,7 +25,7 @@ define('LIBRARY_FOLDER_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/img/users/'
|
|||
/** The extensions for to use in validation */
|
||||
define('ALLOWED_IMG_EXTENSIONS', 'gif,jpg,jpeg,png,jpe');
|
||||
|
||||
/** Use these 3 functions to check cookies and sessions for permission.
|
||||
/* Use these 3 functions to check cookies and sessions for permission.
|
||||
Simply write your code and return true or false */
|
||||
|
||||
|
||||
|
|
|
@ -1,93 +1,93 @@
|
|||
<?php
|
||||
//require_once('config.php');
|
||||
if(isset($_SESSION['tinymce_toggle_view'])){
|
||||
$view = $_SESSION['tinymce_toggle_view'];
|
||||
}else{
|
||||
$view = 'grid';
|
||||
}
|
||||
|
||||
$current_folder_content = scandirSorted($current_folder);
|
||||
|
||||
if(count($current_folder_content) > 0 AND CanAcessLibrary()){
|
||||
$html = '';
|
||||
foreach($current_folder_content as $c){
|
||||
if($view == 'list'){
|
||||
if($c['is_file'] == false){
|
||||
$html .= '<tr>
|
||||
<td>
|
||||
<i class="icon-folder-open"></i>
|
||||
<a class="lib-folder" href="" rel="'. urlencode($c['path']).'" title="'. $c['name'] .'">
|
||||
'. TrimText($c['name'], 50) .'
|
||||
</a>
|
||||
</td>
|
||||
<td width="20%">
|
||||
'. $c['i'] .' Items
|
||||
</td>
|
||||
<td width="10%">
|
||||
<a href="" class="transparent change-folder" title="Change Name" rel="'. $c['name'] .'"><i class="icon-pencil"></i></a>
|
||||
<a href="" class="transparent delete-folder" rel="'. urlencode($c['path']).'" title="Delete"><i class="icon-trash"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}else{
|
||||
$html .= '<tr>
|
||||
<td>
|
||||
<i class="icon-picture"></i>
|
||||
<a href="" class="img-thumbs" rel="' .$c['path'] . '" title="'. $c['name'] .'">
|
||||
'. TrimText($c['name'], 50) .'
|
||||
</a>
|
||||
</td>
|
||||
<td width="20%">
|
||||
'. formatSizeUnits($c['s']) .'
|
||||
</td>
|
||||
<td width="10%">
|
||||
<a href="" class="transparent change-file" title="Change Name" rel="'. $c['name'] .'"><i class="icon-pencil"></i></a>
|
||||
<a href="" class="transparent delete-file" rel="'. urlencode($c['p']).'" title="Delete"><i class="icon-trash"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
}else{
|
||||
if($c['is_file'] == false){
|
||||
$html .= '<div class="item">
|
||||
<a class="lib-folder" href="" rel="'. urlencode($c['path']).'" title="'. $c['name'] .'">
|
||||
<img src="bootstrap/img/130x90.png" class="img-polaroid" width="130" height="90">
|
||||
</a>
|
||||
<div>
|
||||
<a href="" class="pull-left transparent change-folder" title="Change Name" rel="'. $c['name'] .'"><i class="icon-pencil"></i></a>
|
||||
|
||||
<small>
|
||||
'. $c['name'] .'</small>
|
||||
<a href="" class="pull-right transparent delete-folder" rel="'. urlencode($c['path']).'" title="Delete">
|
||||
|
||||
|
||||
|
||||
<i class="icon-trash"></i></a>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>';
|
||||
}else{
|
||||
$html .= '<div class="item">
|
||||
<a href="" class="img-thumbs" rel="' .$c['path'] . '" title="'. $c['name'] .'">
|
||||
<img src="timthumb.php?src=' . $c['path'] . '&w=130&h=90" class="img-polaroid" width="130" height="90">
|
||||
</a>
|
||||
<div>
|
||||
<a href="" class="pull-left transparent change-file" title="Change Name" rel="'. $c['name'] .'"><i class="icon-pencil"></i></a>
|
||||
<a href="" class="pull-right transparent delete-file" rel="'. urlencode($c['p']).'" title="Delete"><i class="icon-trash"></i></a>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
if($html != ''){
|
||||
if($view == 'list'){
|
||||
$html = '<br/><table class="table">' . $html . '</table>';
|
||||
}
|
||||
|
||||
$output["html"] = $html;
|
||||
}else{
|
||||
$output["html"] = '<center>No images in the folder.</center>';
|
||||
}
|
||||
}else{
|
||||
$output["html"] = '<center>No images in the folder.</center>';
|
||||
}
|
||||
<?php
|
||||
//require_once('config.php');
|
||||
if(isset($_SESSION['tinymce_toggle_view'])){
|
||||
$view = $_SESSION['tinymce_toggle_view'];
|
||||
}else{
|
||||
$view = 'grid';
|
||||
}
|
||||
|
||||
$current_folder_content = scandirSorted($current_folder);
|
||||
|
||||
if(count($current_folder_content) > 0 AND CanAcessLibrary()){
|
||||
$html = '';
|
||||
foreach($current_folder_content as $c){
|
||||
if($view == 'list'){
|
||||
if($c['is_file'] == false){
|
||||
$html .= '<tr>
|
||||
<td>
|
||||
<i class="icon-folder-open"></i>
|
||||
<a class="lib-folder" href="" rel="'. urlencode($c['path']).'" title="'. $c['name'] .'">
|
||||
'. TrimText($c['name'], 50) .'
|
||||
</a>
|
||||
</td>
|
||||
<td width="20%">
|
||||
'. $c['i'] .' Items
|
||||
</td>
|
||||
<td width="10%">
|
||||
<a href="" class="transparent change-folder" title="Change Name" rel="'. $c['name'] .'"><i class="icon-pencil"></i></a>
|
||||
<a href="" class="transparent delete-folder" rel="'. urlencode($c['path']).'" title="Delete"><i class="icon-trash"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}else{
|
||||
$html .= '<tr>
|
||||
<td>
|
||||
<i class="icon-picture"></i>
|
||||
<a href="" class="img-thumbs" rel="' .$c['path'] . '" title="'. $c['name'] .'">
|
||||
'. TrimText($c['name'], 50) .'
|
||||
</a>
|
||||
</td>
|
||||
<td width="20%">
|
||||
'. formatSizeUnits($c['s']) .'
|
||||
</td>
|
||||
<td width="10%">
|
||||
<a href="" class="transparent change-file" title="Change Name" rel="'. $c['name'] .'"><i class="icon-pencil"></i></a>
|
||||
<a href="" class="transparent delete-file" rel="'. urlencode($c['p']).'" title="Delete"><i class="icon-trash"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
}else{
|
||||
if($c['is_file'] == false){
|
||||
$html .= '<div class="item">
|
||||
<a class="lib-folder" href="" rel="'. urlencode($c['path']).'" title="'. $c['name'] .'">
|
||||
<img src="bootstrap/img/130x90.png" class="img-polaroid" width="130" height="90">
|
||||
</a>
|
||||
<div>
|
||||
<a href="" class="pull-left transparent change-folder" title="Change Name" rel="'. $c['name'] .'"><i class="icon-pencil"></i></a>
|
||||
|
||||
<small>
|
||||
'. $c['name'] .'</small>
|
||||
<a href="" class="pull-right transparent delete-folder" rel="'. urlencode($c['path']).'" title="Delete">
|
||||
|
||||
|
||||
|
||||
<i class="icon-trash"></i></a>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>';
|
||||
}else{
|
||||
$html .= '<div class="item">
|
||||
<a href="" class="img-thumbs" rel="' .$c['path'] . '" title="'. $c['name'] .'">
|
||||
<img src="timthumb.php?src=' . $c['path'] . '&w=130&h=90" class="img-polaroid" width="130" height="90">
|
||||
</a>
|
||||
<div>
|
||||
<a href="" class="pull-left transparent change-file" title="Change Name" rel="'. $c['name'] .'"><i class="icon-pencil"></i></a>
|
||||
<a href="" class="pull-right transparent delete-file" rel="'. urlencode($c['p']).'" title="Delete"><i class="icon-trash"></i></a>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
if($html != ''){
|
||||
if($view == 'list'){
|
||||
$html = '<br/><table class="table">' . $html . '</table>';
|
||||
}
|
||||
|
||||
$output["html"] = $html;
|
||||
}else{
|
||||
$output["html"] = '<center>No images in the folder.</center>';
|
||||
}
|
||||
}else{
|
||||
$output["html"] = '<center>No images in the folder.</center>';
|
||||
}
|
||||
|
|
|
@ -1,93 +1,93 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/delete_file\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["msg"] = "";
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
|
||||
if(!CanDeleteFiles()){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You don not have permission to delete files.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["file"]) AND $_GET["file"] != ""){
|
||||
$file = urldecode(clean($_GET["file"]));
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The file name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!startsWith($file, LIBRARY_FOLDER_PATH)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You can not delete this file";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!file_exists($file)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The file does not exist.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!is_file($file)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "That is not a file.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!unlink($file)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The file could not be deleted.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/delete_file\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["msg"] = "";
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
|
||||
if(!CanDeleteFiles()){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You don not have permission to delete files.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["file"]) AND $_GET["file"] != ""){
|
||||
$file = urldecode(clean($_GET["file"]));
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The file name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!startsWith($file, LIBRARY_FOLDER_PATH)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You can not delete this file";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!file_exists($file)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The file does not exist.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!is_file($file)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "That is not a file.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!unlink($file)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The file could not be deleted.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
|
|
|
@ -1,88 +1,88 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/delete_folder\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["msg"] = "";
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
|
||||
if(!CanDeleteFolder()){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You don not have permission to delete folders.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["folder"]) AND $_GET["folder"] != ""){
|
||||
$folder = urldecode(clean($_GET["folder"]));
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The folder name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!startsWith($folder, LIBRARY_FOLDER_PATH)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You can not delete this folder";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!file_exists($folder)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The folder does not exist.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!is_dir($folder)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "That is not a folder.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
lc_delete($folder);
|
||||
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/delete_folder\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["msg"] = "";
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
|
||||
if(!CanDeleteFolder()){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You don not have permission to delete folders.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["folder"]) AND $_GET["folder"] != ""){
|
||||
$folder = urldecode(clean($_GET["folder"]));
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The folder name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!startsWith($folder, LIBRARY_FOLDER_PATH)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You can not delete this folder";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!file_exists($folder)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The folder does not exist.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!is_dir($folder)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "That is not a folder.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
lc_delete($folder);
|
||||
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
|
|
|
@ -1,271 +1,271 @@
|
|||
<?php
|
||||
|
||||
function Dirtree($path, $name = "Upload to: Home", $prefix = "") {
|
||||
if(isset($_SESSION["tinymce_upload_directory"]) AND $_SESSION["tinymce_upload_directory"] == $path){
|
||||
$list = '<option value="'.$path.'" selected="selected">'.$prefix.''.$name.'</option>';
|
||||
}else{
|
||||
$list = '<option value="'.$path.'">'.$prefix.''.$name.'</option>';
|
||||
}
|
||||
|
||||
$dircont = scandir($path);
|
||||
if(count($dircont) > 0){
|
||||
foreach($dircont as $file){
|
||||
if(is_file($path . $file)){
|
||||
//do nothing
|
||||
}elseif($file !== '.' && $file !== '..'){
|
||||
$list .= Dirtree($path . $file . '/', $file, $prefix . '… ');
|
||||
}
|
||||
}
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
function startsWith($haystack,$needle,$case=true) {
|
||||
if($case){return (strcmp(substr($haystack, 0, strlen($needle)),$needle)===0);}
|
||||
return (strcasecmp(substr($haystack, 0, strlen($needle)),$needle)===0);
|
||||
}
|
||||
|
||||
function lc_delete($targ) {
|
||||
if(is_dir($targ)){
|
||||
$files = glob($targ . '*', GLOB_MARK); //GLOB_MARK adds a slash to directories returned
|
||||
foreach($files as $file){
|
||||
lc_delete($file);
|
||||
}
|
||||
rmdir($targ);
|
||||
}else{
|
||||
unlink($targ);
|
||||
}
|
||||
}
|
||||
|
||||
function scandirSorted($path) {
|
||||
$sortedData = array();
|
||||
$dircont = scandir($path);
|
||||
if(count($dircont) > 0){
|
||||
foreach($dircont as $file){
|
||||
if(is_file($path . $file)){
|
||||
if(ValidFileExtension($file)){
|
||||
array_push($sortedData, array('is_file'=>true, 'name'=>$file, 'path'=>PathToUrl($path) . $file, 'p'=>$path . $file, 's'=> filesize($path . $file)));
|
||||
}
|
||||
}elseif($file !== '.' && $file !== '..'){
|
||||
$count = count(scandirSorted($path . $file . '/'));
|
||||
array_unshift($sortedData, array('is_file'=>false, 'name'=>$file, 'path'=>$path . $file . '/', 'i'=>$count));
|
||||
}
|
||||
}
|
||||
}
|
||||
return $sortedData;
|
||||
}
|
||||
|
||||
function SearchFiles($path){
|
||||
$sortedData = array();
|
||||
$dircont = scandir($path);
|
||||
if(count($dircont) > 0){
|
||||
foreach($dircont as $file){
|
||||
if(is_file($path . $file)){
|
||||
if(ValidFileExtension($file)){
|
||||
$sortedData[] = array(0=>PathToUrl($path) . $file, 1=>$file);
|
||||
}
|
||||
}elseif($file !== '.' && $file !== '..'){
|
||||
array_merge($sortedData, SearchFiles($path . $file . '/'));
|
||||
}
|
||||
}
|
||||
}
|
||||
return $sortedData;
|
||||
}
|
||||
|
||||
function PathToUrl($path){
|
||||
if($path == LIBRARY_FOLDER_PATH){
|
||||
return LIBRARY_FOLDER_URL;
|
||||
}else{
|
||||
$url = str_replace(LIBRARY_FOLDER_PATH,"",$path);
|
||||
//array_shift($url);// Remove root of lib
|
||||
|
||||
if($url != ""){
|
||||
return LIBRARY_FOLDER_URL . $url;
|
||||
}else{
|
||||
return LIBRARY_FOLDER_URL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ValidFileExtension($name){
|
||||
$allowed_extensions = explode(',', ALLOWED_IMG_EXTENSIONS);
|
||||
$extension = strtolower(GetExtension($name));
|
||||
if (in_array($extension, $allowed_extensions, TRUE)){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function GetExtension($filename){
|
||||
$x = explode('.', $filename);
|
||||
return end($x);
|
||||
}
|
||||
|
||||
function clean($str) {
|
||||
if(is_array($str)){
|
||||
$return = array();
|
||||
foreach($str as $k=>$v){
|
||||
$return[clean($k)] = clean($v);
|
||||
}
|
||||
return $return;
|
||||
}else{
|
||||
$str = @trim($str);
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
function set_filename($path, $filename){
|
||||
$filename = clean_file_name($filename);
|
||||
$file_ext = GetExtension($filename);
|
||||
if ( ! file_exists($path.$filename)){
|
||||
return $filename;
|
||||
}
|
||||
$new_filename = str_replace('.'.$file_ext, '', $filename);
|
||||
for ($i = 1; $i < 300; $i++){
|
||||
if ( ! file_exists($path.$new_filename.'_'.$i.'.'.$file_ext)){
|
||||
$new_filename .= '_'.$i.'.'.$file_ext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $new_filename;
|
||||
}
|
||||
|
||||
function clean_file_name($filename){
|
||||
$invalid = array("<!--","-->","'","<",">",'"','&','$','=',';','?','/',"%20","%22","%3c","%253c","%3e","%0e","%28","%29","%2528","%26","%24","%3f","%3b", "%3d");
|
||||
$filename = str_replace($invalid, '', $filename);
|
||||
$filename = preg_replace("/\s+/", "_", $filename);
|
||||
return stripslashes($filename);
|
||||
}
|
||||
|
||||
function MBToBytes($number){
|
||||
return $number*pow(1024,2);
|
||||
}
|
||||
|
||||
function DoUpload($field = 'userfile'){
|
||||
$output = array();
|
||||
$output["success"] = true;
|
||||
|
||||
if(isset($_SESSION["tinymce_upload_directory"]) AND $_SESSION["tinymce_upload_directory"] != ""){
|
||||
$current_folder = $_SESSION["tinymce_upload_directory"];
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
if(!CanAcessUploadForm()){
|
||||
$output["reason"] = "No permission to upload.";
|
||||
$output["success"] = false;
|
||||
return $output;
|
||||
}
|
||||
|
||||
if(!isset($_FILES[$field])){
|
||||
$output["reason"] = "File not selected.";
|
||||
$output["success"] = false;
|
||||
return $output;
|
||||
}
|
||||
|
||||
if(!is_uploaded_file($_FILES[$field]['tmp_name'])){
|
||||
$error = (!isset($_FILES[$field]['error'])) ? 4 : $_FILES[$field]['error'];
|
||||
$output["success"] = false;
|
||||
switch($error){
|
||||
case 1: // UPLOAD_ERR_INI_SIZE
|
||||
$output["reason"] = "File exceeds limit size.";
|
||||
break;
|
||||
case 2: // UPLOAD_ERR_FORM_SIZE
|
||||
$output["reason"] = "File exceeds limit size.";
|
||||
break;
|
||||
case 3: // UPLOAD_ERR_PARTIAL
|
||||
$output["reason"] = "File uploaded partially.";
|
||||
break;
|
||||
case 4: // UPLOAD_ERR_NO_FILE
|
||||
$output["reason"] = "File not selected.";
|
||||
break;
|
||||
case 6: // UPLOAD_ERR_NO_TMP_DIR
|
||||
$output["reason"] = "No temp directory.";
|
||||
break;
|
||||
case 7: // UPLOAD_ERR_CANT_WRITE
|
||||
$output["reason"] = "Unable to write the file.";
|
||||
break;
|
||||
case 8: // UPLOAD_ERR_EXTENSION
|
||||
$output["reason"] = "Invalid extension.";
|
||||
break;
|
||||
default :
|
||||
$output["reason"] = "File not selected.";
|
||||
break;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
if(!ValidFileExtension($_FILES[$field]['name'])){
|
||||
$output["reason"] = "Invalid extension.";
|
||||
$output["success"] = false;
|
||||
return $output;
|
||||
}
|
||||
|
||||
$file_name = set_filename($current_folder, $_FILES[$field]['name']);
|
||||
|
||||
if(!@copy($_FILES[$field]['tmp_name'], $current_folder.$file_name)){
|
||||
if(!@move_uploaded_file($_FILES[$field]['tmp_name'], $current_folder.$file_name)){
|
||||
$output["reason"] = "Could not move file.";
|
||||
$output["success"] = false;
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($_SESSION['SimpleImageManager'])){
|
||||
$_SESSION['SimpleImageManager'] = array();
|
||||
}
|
||||
$_SESSION['SimpleImageManager'][] = PathToUrl($current_folder).$file_name;
|
||||
|
||||
$output["file"] = PathToUrl($current_folder).$file_name;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
function is_url_exist($url){
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_exec($ch);
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
|
||||
if($code == 200){
|
||||
$status = true;
|
||||
}else{
|
||||
$status = false;
|
||||
}
|
||||
curl_close($ch);
|
||||
return $status;
|
||||
}
|
||||
|
||||
function TrimText($input, $length) {
|
||||
$input = strip_tags($input);
|
||||
if (strlen($input) <= $length) {
|
||||
return $input;
|
||||
}
|
||||
$trimmed_text = substr($input, 0, $length);
|
||||
|
||||
$trimmed_text .= ' …';
|
||||
|
||||
return $trimmed_text;
|
||||
}
|
||||
|
||||
function formatSizeUnits($bytes){
|
||||
if ($bytes >= 1073741824){
|
||||
$bytes = number_format($bytes / 1073741824, 2) . ' GB';
|
||||
}elseif($bytes >= 1048576){
|
||||
$bytes = number_format($bytes / 1048576, 2) . ' MB';
|
||||
}elseif($bytes >= 1024){
|
||||
$bytes = number_format($bytes / 1024, 2) . ' KB';
|
||||
}elseif($bytes > 1){
|
||||
$bytes = $bytes . ' bytes';
|
||||
}elseif($bytes == 1){
|
||||
$bytes = $bytes . ' byte';
|
||||
}else{
|
||||
$bytes = '0 bytes';
|
||||
}
|
||||
|
||||
return $bytes;
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
function Dirtree($path, $name = "Upload to: Home", $prefix = "") {
|
||||
if(isset($_SESSION["tinymce_upload_directory"]) AND $_SESSION["tinymce_upload_directory"] == $path){
|
||||
$list = '<option value="'.$path.'" selected="selected">'.$prefix.''.$name.'</option>';
|
||||
}else{
|
||||
$list = '<option value="'.$path.'">'.$prefix.''.$name.'</option>';
|
||||
}
|
||||
|
||||
$dircont = scandir($path);
|
||||
if(count($dircont) > 0){
|
||||
foreach($dircont as $file){
|
||||
if(is_file($path . $file)){
|
||||
//do nothing
|
||||
}elseif($file !== '.' && $file !== '..'){
|
||||
$list .= Dirtree($path . $file . '/', $file, $prefix . '… ');
|
||||
}
|
||||
}
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
function startsWith($haystack,$needle,$case=true) {
|
||||
if($case){return (strcmp(substr($haystack, 0, strlen($needle)),$needle)===0);}
|
||||
return (strcasecmp(substr($haystack, 0, strlen($needle)),$needle)===0);
|
||||
}
|
||||
|
||||
function lc_delete($targ) {
|
||||
if(is_dir($targ)){
|
||||
$files = glob($targ . '*', GLOB_MARK); //GLOB_MARK adds a slash to directories returned
|
||||
foreach($files as $file){
|
||||
lc_delete($file);
|
||||
}
|
||||
rmdir($targ);
|
||||
}else{
|
||||
unlink($targ);
|
||||
}
|
||||
}
|
||||
|
||||
function scandirSorted($path) {
|
||||
$sortedData = array();
|
||||
$dircont = scandir($path);
|
||||
if(count($dircont) > 0){
|
||||
foreach($dircont as $file){
|
||||
if(is_file($path . $file)){
|
||||
if(ValidFileExtension($file)){
|
||||
array_push($sortedData, array('is_file'=>true, 'name'=>$file, 'path'=>PathToUrl($path) . $file, 'p'=>$path . $file, 's'=> filesize($path . $file)));
|
||||
}
|
||||
}elseif($file !== '.' && $file !== '..'){
|
||||
$count = count(scandirSorted($path . $file . '/'));
|
||||
array_unshift($sortedData, array('is_file'=>false, 'name'=>$file, 'path'=>$path . $file . '/', 'i'=>$count));
|
||||
}
|
||||
}
|
||||
}
|
||||
return $sortedData;
|
||||
}
|
||||
|
||||
function SearchFiles($path){
|
||||
$sortedData = array();
|
||||
$dircont = scandir($path);
|
||||
if(count($dircont) > 0){
|
||||
foreach($dircont as $file){
|
||||
if(is_file($path . $file)){
|
||||
if(ValidFileExtension($file)){
|
||||
$sortedData[] = array(0=>PathToUrl($path) . $file, 1=>$file);
|
||||
}
|
||||
}elseif($file !== '.' && $file !== '..'){
|
||||
array_merge($sortedData, SearchFiles($path . $file . '/'));
|
||||
}
|
||||
}
|
||||
}
|
||||
return $sortedData;
|
||||
}
|
||||
|
||||
function PathToUrl($path){
|
||||
if($path == LIBRARY_FOLDER_PATH){
|
||||
return LIBRARY_FOLDER_URL;
|
||||
}else{
|
||||
$url = str_replace(LIBRARY_FOLDER_PATH,"",$path);
|
||||
//array_shift($url);// Remove root of lib
|
||||
|
||||
if($url != ""){
|
||||
return LIBRARY_FOLDER_URL . $url;
|
||||
}else{
|
||||
return LIBRARY_FOLDER_URL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ValidFileExtension($name){
|
||||
$allowed_extensions = explode(',', ALLOWED_IMG_EXTENSIONS);
|
||||
$extension = strtolower(GetExtension($name));
|
||||
if (in_array($extension, $allowed_extensions, TRUE)){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function GetExtension($filename){
|
||||
$x = explode('.', $filename);
|
||||
return end($x);
|
||||
}
|
||||
|
||||
function clean($str) {
|
||||
if(is_array($str)){
|
||||
$return = array();
|
||||
foreach($str as $k=>$v){
|
||||
$return[clean($k)] = clean($v);
|
||||
}
|
||||
return $return;
|
||||
}else{
|
||||
$str = @trim($str);
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
function set_filename($path, $filename){
|
||||
$filename = clean_file_name($filename);
|
||||
$file_ext = GetExtension($filename);
|
||||
if ( ! file_exists($path.$filename)){
|
||||
return $filename;
|
||||
}
|
||||
$new_filename = str_replace('.'.$file_ext, '', $filename);
|
||||
for ($i = 1; $i < 300; $i++){
|
||||
if ( ! file_exists($path.$new_filename.'_'.$i.'.'.$file_ext)){
|
||||
$new_filename .= '_'.$i.'.'.$file_ext;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $new_filename;
|
||||
}
|
||||
|
||||
function clean_file_name($filename){
|
||||
$invalid = array("<!--","-->","'","<",">",'"','&','$','=',';','?','/',"%20","%22","%3c","%253c","%3e","%0e","%28","%29","%2528","%26","%24","%3f","%3b", "%3d");
|
||||
$filename = str_replace($invalid, '', $filename);
|
||||
$filename = preg_replace("/\s+/", "_", $filename);
|
||||
return stripslashes($filename);
|
||||
}
|
||||
|
||||
function MBToBytes($number){
|
||||
return $number*pow(1024,2);
|
||||
}
|
||||
|
||||
function DoUpload($field = 'userfile'){
|
||||
$output = array();
|
||||
$output["success"] = true;
|
||||
|
||||
if(isset($_SESSION["tinymce_upload_directory"]) AND $_SESSION["tinymce_upload_directory"] != ""){
|
||||
$current_folder = $_SESSION["tinymce_upload_directory"];
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
if(!CanAcessUploadForm()){
|
||||
$output["reason"] = "No permission to upload.";
|
||||
$output["success"] = false;
|
||||
return $output;
|
||||
}
|
||||
|
||||
if(!isset($_FILES[$field])){
|
||||
$output["reason"] = "File not selected.";
|
||||
$output["success"] = false;
|
||||
return $output;
|
||||
}
|
||||
|
||||
if(!is_uploaded_file($_FILES[$field]['tmp_name'])){
|
||||
$error = (!isset($_FILES[$field]['error'])) ? 4 : $_FILES[$field]['error'];
|
||||
$output["success"] = false;
|
||||
switch($error){
|
||||
case 1: // UPLOAD_ERR_INI_SIZE
|
||||
$output["reason"] = "File exceeds limit size.";
|
||||
break;
|
||||
case 2: // UPLOAD_ERR_FORM_SIZE
|
||||
$output["reason"] = "File exceeds limit size.";
|
||||
break;
|
||||
case 3: // UPLOAD_ERR_PARTIAL
|
||||
$output["reason"] = "File uploaded partially.";
|
||||
break;
|
||||
case 4: // UPLOAD_ERR_NO_FILE
|
||||
$output["reason"] = "File not selected.";
|
||||
break;
|
||||
case 6: // UPLOAD_ERR_NO_TMP_DIR
|
||||
$output["reason"] = "No temp directory.";
|
||||
break;
|
||||
case 7: // UPLOAD_ERR_CANT_WRITE
|
||||
$output["reason"] = "Unable to write the file.";
|
||||
break;
|
||||
case 8: // UPLOAD_ERR_EXTENSION
|
||||
$output["reason"] = "Invalid extension.";
|
||||
break;
|
||||
default :
|
||||
$output["reason"] = "File not selected.";
|
||||
break;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
if(!ValidFileExtension($_FILES[$field]['name'])){
|
||||
$output["reason"] = "Invalid extension.";
|
||||
$output["success"] = false;
|
||||
return $output;
|
||||
}
|
||||
|
||||
$file_name = set_filename($current_folder, $_FILES[$field]['name']);
|
||||
|
||||
if(!@copy($_FILES[$field]['tmp_name'], $current_folder.$file_name)){
|
||||
if(!@move_uploaded_file($_FILES[$field]['tmp_name'], $current_folder.$file_name)){
|
||||
$output["reason"] = "Could not move file.";
|
||||
$output["success"] = false;
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($_SESSION['SimpleImageManager'])){
|
||||
$_SESSION['SimpleImageManager'] = array();
|
||||
}
|
||||
$_SESSION['SimpleImageManager'][] = PathToUrl($current_folder).$file_name;
|
||||
|
||||
$output["file"] = PathToUrl($current_folder).$file_name;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
function is_url_exist($url){
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_exec($ch);
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
|
||||
if($code == 200){
|
||||
$status = true;
|
||||
}else{
|
||||
$status = false;
|
||||
}
|
||||
curl_close($ch);
|
||||
return $status;
|
||||
}
|
||||
|
||||
function TrimText($input, $length) {
|
||||
$input = strip_tags($input);
|
||||
if (strlen($input) <= $length) {
|
||||
return $input;
|
||||
}
|
||||
$trimmed_text = substr($input, 0, $length);
|
||||
|
||||
$trimmed_text .= ' …';
|
||||
|
||||
return $trimmed_text;
|
||||
}
|
||||
|
||||
function formatSizeUnits($bytes){
|
||||
if ($bytes >= 1073741824){
|
||||
$bytes = number_format($bytes / 1073741824, 2) . ' GB';
|
||||
}elseif($bytes >= 1048576){
|
||||
$bytes = number_format($bytes / 1048576, 2) . ' MB';
|
||||
}elseif($bytes >= 1024){
|
||||
$bytes = number_format($bytes / 1024, 2) . ' KB';
|
||||
}elseif($bytes > 1){
|
||||
$bytes = $bytes . ' bytes';
|
||||
}elseif($bytes == 1){
|
||||
$bytes = $bytes . ' byte';
|
||||
}else{
|
||||
$bytes = '0 bytes';
|
||||
}
|
||||
|
||||
return $bytes;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,57 +1,57 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/lib\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_GET["toggle"]) AND $_GET["toggle"] != ""){
|
||||
if(isset($_SESSION['tinymce_toggle_view'])){
|
||||
if($_SESSION['tinymce_toggle_view'] == 'grid'){
|
||||
$_SESSION['tinymce_toggle_view'] = 'list';
|
||||
}else{
|
||||
$_SESSION['tinymce_toggle_view'] = 'grid';
|
||||
}
|
||||
}else{
|
||||
$_SESSION['tinymce_toggle_view'] = 'list';
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
if(!startsWith(urldecode($_GET["path"]), LIBRARY_FOLDER_PATH)){
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}else{
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/lib\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_GET["toggle"]) AND $_GET["toggle"] != ""){
|
||||
if(isset($_SESSION['tinymce_toggle_view'])){
|
||||
if($_SESSION['tinymce_toggle_view'] == 'grid'){
|
||||
$_SESSION['tinymce_toggle_view'] = 'list';
|
||||
}else{
|
||||
$_SESSION['tinymce_toggle_view'] = 'grid';
|
||||
}
|
||||
}else{
|
||||
$_SESSION['tinymce_toggle_view'] = 'list';
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
if(!startsWith(urldecode($_GET["path"]), LIBRARY_FOLDER_PATH)){
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}else{
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
|
|
|
@ -1,95 +1,95 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/new_folder\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["msg"] = "";
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
|
||||
if(!is_writable($current_folder)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The current folder is not writable.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!CanCreateFolders()){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You don not have permission to create folders.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["folder"]) AND $_GET["folder"] != ""){
|
||||
$new_folder = $current_folder . '/' . clean($_GET["folder"]);
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The new folder name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(file_exists($new_folder)) {
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "Another folder with the same name exists. Please select another name.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!strpbrk($_GET["folder"], "\\/?%*:|\"<>") === FALSE){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The folder name is invalid.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
$old = umask(0);
|
||||
if(!mkdir($new_folder, 0777)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The folder could not be created.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
umask($old);
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/new_folder\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["msg"] = "";
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
|
||||
if(!is_writable($current_folder)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The current folder is not writable.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!CanCreateFolders()){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You don not have permission to create folders.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["folder"]) AND $_GET["folder"] != ""){
|
||||
$new_folder = $current_folder . '/' . clean($_GET["folder"]);
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The new folder name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(file_exists($new_folder)) {
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "Another folder with the same name exists. Please select another name.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!strpbrk($_GET["folder"], "\\/?%*:|\"<>") === FALSE){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The folder name is invalid.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
$old = umask(0);
|
||||
if(!mkdir($new_folder, 0777)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The folder could not be created.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
umask($old);
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
|
|
|
@ -1,148 +1,148 @@
|
|||
/*global tinymce:true */
|
||||
|
||||
tinymce.PluginManager.add('image', function(editor, url) {
|
||||
function showDialog() {
|
||||
var win, data, dom = editor.dom, imgElm = editor.selection.getNode();
|
||||
var width, height, query_str = "";
|
||||
|
||||
if(imgElm.nodeName == "IMG" && !imgElm.getAttribute('data-mce-object')){
|
||||
query_str = "?title=" + dom.getAttrib(imgElm, 'title') + "&alt=" + dom.getAttrib(imgElm, 'alt') + "&width=" + dom.getAttrib(imgElm, 'width') + "&height=" + dom.getAttrib(imgElm, 'height') + "&src=" + encodeURIComponent(dom.getAttrib(imgElm, 'src'));
|
||||
if(dom.getStyle(imgElm, 'float')){
|
||||
query_str += "&align=" + dom.getStyle(imgElm, 'float');
|
||||
}
|
||||
}else{
|
||||
imgElm = null;
|
||||
}
|
||||
|
||||
function GetTheHtml(){
|
||||
var html = '';
|
||||
if(imgElm){
|
||||
html += '<input type="hidden" name="src" id="src" value="' + dom.getAttrib(imgElm, "src") + '"/>';
|
||||
html += '<input type="hidden" name="alt" id="alt" value="' + dom.getAttrib(imgElm, "alt") + '"/>';
|
||||
html += '<input type="hidden" name="title" id="title" value="' + dom.getAttrib(imgElm, "title") + '"/>';
|
||||
html += '<input type="hidden" name="width" id="width" value="' + dom.getAttrib(imgElm, "width") + '"/>';
|
||||
html += '<input type="hidden" name="height" id="height" value="' + dom.getAttrib(imgElm, "height") + '"/>';
|
||||
html += '<input type="hidden" name="linkURL" id="linkURL" />';
|
||||
html += '<input type="hidden" name="target" id="target" />';
|
||||
html += '<input type="hidden" name="align" id="align" value="' + dom.getStyle(imgElm, 'float') + '"/>';
|
||||
html += '<iframe src="'+ url + '/image.php'+ query_str + '&' + new Date().getTime() + '" frameborder="0"></iframe>';
|
||||
}else{
|
||||
html += '<input type="hidden" name="src" id="src" />';
|
||||
html += '<input type="hidden" name="alt" id="alt" />';
|
||||
html += '<input type="hidden" name="title" id="title" />';
|
||||
html += '<input type="hidden" name="width" id="width" />';
|
||||
html += '<input type="hidden" name="height" id="height" />';
|
||||
html += '<input type="hidden" name="linkURL" id="linkURL" />';
|
||||
html += '<input type="hidden" name="target" id="target" />';
|
||||
html += '<input type="hidden" name="align" id="align" />';
|
||||
html += '<iframe src="'+ url + '/image.php'+ '?' + new Date().getTime() + '" frameborder="0"></iframe>';
|
||||
}
|
||||
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function BuildDom(src, alt, w, h, title, linkURL, target, float){
|
||||
if(imgElm){
|
||||
if(src){
|
||||
dom.setStyle(imgElm, 'float', float);
|
||||
|
||||
dom.setAttribs(imgElm, {
|
||||
'src': src,
|
||||
'alt': alt ? alt : null,
|
||||
'width': w ? w : null,
|
||||
'height': h ? h : null,
|
||||
'title': title ? title : null
|
||||
});
|
||||
|
||||
}
|
||||
}else{
|
||||
var markup = '';
|
||||
if(src){
|
||||
markup += '<img src="' + src + '"';
|
||||
if(alt){
|
||||
markup += ' alt="' + alt + '"';
|
||||
}
|
||||
if(title){
|
||||
markup += ' title="' + title + '"';
|
||||
}
|
||||
if(h){
|
||||
markup += ' height="' + h + '"';
|
||||
}
|
||||
if(w){
|
||||
markup += ' width="' + w + '"';
|
||||
}
|
||||
|
||||
if(float){
|
||||
if(!linkURL){
|
||||
markup += ' style="float: ' + float + '"';
|
||||
}
|
||||
}
|
||||
|
||||
markup += ' />';
|
||||
|
||||
if(linkURL){
|
||||
var thelink = '<a href="' + linkURL + '"';
|
||||
|
||||
if(target){
|
||||
thelink += ' target="' + target + '"';
|
||||
}
|
||||
|
||||
if(float){
|
||||
thelink += ' style="float: ' + float + '"';
|
||||
}
|
||||
|
||||
thelink += '>';
|
||||
markup = thelink + markup + '</a>';
|
||||
}
|
||||
|
||||
editor.insertContent(markup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
win = editor.windowManager.open({
|
||||
title: "Manage Image",
|
||||
width : 885,
|
||||
height : 475,
|
||||
html: GetTheHtml(),
|
||||
buttons: [
|
||||
{
|
||||
text: 'Insert Image',
|
||||
subtype: 'primary',
|
||||
onclick: function(e) {
|
||||
BuildDom(document.getElementById("src").value,
|
||||
document.getElementById("alt").value,
|
||||
document.getElementById("width").value,
|
||||
document.getElementById("height").value,
|
||||
document.getElementById("title").value,
|
||||
document.getElementById("linkURL").value,
|
||||
document.getElementById("target").value,
|
||||
document.getElementById("align").value);
|
||||
this.parent().parent().close();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Cancel',
|
||||
onclick: function() {
|
||||
this.parent().parent().close();
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
editor.addButton('image', {
|
||||
icon: 'image',
|
||||
tooltip: 'Insert/edit image',
|
||||
onclick: showDialog,
|
||||
stateSelector: 'img:not([data-mce-object])'
|
||||
});
|
||||
|
||||
editor.addMenuItem('image', {
|
||||
icon: 'image',
|
||||
text: 'Insert image',
|
||||
onclick: showDialog,
|
||||
context: 'insert',
|
||||
prependToContext: true
|
||||
});
|
||||
});
|
||||
/*global tinymce:true */
|
||||
|
||||
tinymce.PluginManager.add('image', function(editor, url) {
|
||||
function showDialog() {
|
||||
var win, data, dom = editor.dom, imgElm = editor.selection.getNode();
|
||||
var width, height, query_str = "";
|
||||
|
||||
if(imgElm.nodeName == "IMG" && !imgElm.getAttribute('data-mce-object')){
|
||||
query_str = "?title=" + dom.getAttrib(imgElm, 'title') + "&alt=" + dom.getAttrib(imgElm, 'alt') + "&width=" + dom.getAttrib(imgElm, 'width') + "&height=" + dom.getAttrib(imgElm, 'height') + "&src=" + encodeURIComponent(dom.getAttrib(imgElm, 'src'));
|
||||
if(dom.getStyle(imgElm, 'float')){
|
||||
query_str += "&align=" + dom.getStyle(imgElm, 'float');
|
||||
}
|
||||
}else{
|
||||
imgElm = null;
|
||||
}
|
||||
|
||||
function GetTheHtml(){
|
||||
var html = '';
|
||||
if(imgElm){
|
||||
html += '<input type="hidden" name="src" id="src" value="' + dom.getAttrib(imgElm, "src") + '"/>';
|
||||
html += '<input type="hidden" name="alt" id="alt" value="' + dom.getAttrib(imgElm, "alt") + '"/>';
|
||||
html += '<input type="hidden" name="title" id="title" value="' + dom.getAttrib(imgElm, "title") + '"/>';
|
||||
html += '<input type="hidden" name="width" id="width" value="' + dom.getAttrib(imgElm, "width") + '"/>';
|
||||
html += '<input type="hidden" name="height" id="height" value="' + dom.getAttrib(imgElm, "height") + '"/>';
|
||||
html += '<input type="hidden" name="linkURL" id="linkURL" />';
|
||||
html += '<input type="hidden" name="target" id="target" />';
|
||||
html += '<input type="hidden" name="align" id="align" value="' + dom.getStyle(imgElm, 'float') + '"/>';
|
||||
html += '<iframe src="'+ url + '/image.php'+ query_str + '&' + new Date().getTime() + '" frameborder="0"></iframe>';
|
||||
}else{
|
||||
html += '<input type="hidden" name="src" id="src" />';
|
||||
html += '<input type="hidden" name="alt" id="alt" />';
|
||||
html += '<input type="hidden" name="title" id="title" />';
|
||||
html += '<input type="hidden" name="width" id="width" />';
|
||||
html += '<input type="hidden" name="height" id="height" />';
|
||||
html += '<input type="hidden" name="linkURL" id="linkURL" />';
|
||||
html += '<input type="hidden" name="target" id="target" />';
|
||||
html += '<input type="hidden" name="align" id="align" />';
|
||||
html += '<iframe src="'+ url + '/image.php'+ '?' + new Date().getTime() + '" frameborder="0"></iframe>';
|
||||
}
|
||||
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function BuildDom(src, alt, w, h, title, linkURL, target, float){
|
||||
if(imgElm){
|
||||
if(src){
|
||||
dom.setStyle(imgElm, 'float', float);
|
||||
|
||||
dom.setAttribs(imgElm, {
|
||||
'src': src,
|
||||
'alt': alt ? alt : null,
|
||||
'width': w ? w : null,
|
||||
'height': h ? h : null,
|
||||
'title': title ? title : null
|
||||
});
|
||||
|
||||
}
|
||||
}else{
|
||||
var markup = '';
|
||||
if(src){
|
||||
markup += '<img src="' + src + '"';
|
||||
if(alt){
|
||||
markup += ' alt="' + alt + '"';
|
||||
}
|
||||
if(title){
|
||||
markup += ' title="' + title + '"';
|
||||
}
|
||||
if(h){
|
||||
markup += ' height="' + h + '"';
|
||||
}
|
||||
if(w){
|
||||
markup += ' width="' + w + '"';
|
||||
}
|
||||
|
||||
if(float){
|
||||
if(!linkURL){
|
||||
markup += ' style="float: ' + float + '"';
|
||||
}
|
||||
}
|
||||
|
||||
markup += ' />';
|
||||
|
||||
if(linkURL){
|
||||
var thelink = '<a href="' + linkURL + '"';
|
||||
|
||||
if(target){
|
||||
thelink += ' target="' + target + '"';
|
||||
}
|
||||
|
||||
if(float){
|
||||
thelink += ' style="float: ' + float + '"';
|
||||
}
|
||||
|
||||
thelink += '>';
|
||||
markup = thelink + markup + '</a>';
|
||||
}
|
||||
|
||||
editor.insertContent(markup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
win = editor.windowManager.open({
|
||||
title: "Manage Image",
|
||||
width : 885,
|
||||
height : 475,
|
||||
html: GetTheHtml(),
|
||||
buttons: [
|
||||
{
|
||||
text: 'Insert Image',
|
||||
subtype: 'primary',
|
||||
onclick: function(e) {
|
||||
BuildDom(document.getElementById("src").value,
|
||||
document.getElementById("alt").value,
|
||||
document.getElementById("width").value,
|
||||
document.getElementById("height").value,
|
||||
document.getElementById("title").value,
|
||||
document.getElementById("linkURL").value,
|
||||
document.getElementById("target").value,
|
||||
document.getElementById("align").value);
|
||||
this.parent().parent().close();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Cancel',
|
||||
onclick: function() {
|
||||
this.parent().parent().close();
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
editor.addButton('image', {
|
||||
icon: 'image',
|
||||
tooltip: 'Insert/edit image',
|
||||
onclick: showDialog,
|
||||
stateSelector: 'img:not([data-mce-object])'
|
||||
});
|
||||
|
||||
editor.addMenuItem('image', {
|
||||
icon: 'image',
|
||||
text: 'Insert image',
|
||||
onclick: showDialog,
|
||||
context: 'insert',
|
||||
prependToContext: true
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,148 +1,148 @@
|
|||
/*global tinymce:true */
|
||||
|
||||
tinymce.PluginManager.add('image', function(editor, url) {
|
||||
function showDialog() {
|
||||
var win, data, dom = editor.dom, imgElm = editor.selection.getNode();
|
||||
var width, height, query_str = "";
|
||||
|
||||
if(imgElm.nodeName == "IMG" && !imgElm.getAttribute('data-mce-object')){
|
||||
query_str = "?title=" + dom.getAttrib(imgElm, 'title') + "&alt=" + dom.getAttrib(imgElm, 'alt') + "&width=" + dom.getAttrib(imgElm, 'width') + "&height=" + dom.getAttrib(imgElm, 'height') + "&src=" + encodeURIComponent(dom.getAttrib(imgElm, 'src'));
|
||||
if(dom.getStyle(imgElm, 'float')){
|
||||
query_str += "&align=" + dom.getStyle(imgElm, 'float');
|
||||
}
|
||||
}else{
|
||||
imgElm = null;
|
||||
}
|
||||
|
||||
function GetTheHtml(){
|
||||
var html = '';
|
||||
if(imgElm){
|
||||
html += '<input type="hidden" name="src" id="src" value="' + dom.getAttrib(imgElm, "src") + '"/>';
|
||||
html += '<input type="hidden" name="alt" id="alt" value="' + dom.getAttrib(imgElm, "alt") + '"/>';
|
||||
html += '<input type="hidden" name="title" id="title" value="' + dom.getAttrib(imgElm, "title") + '"/>';
|
||||
html += '<input type="hidden" name="width" id="width" value="' + dom.getAttrib(imgElm, "width") + '"/>';
|
||||
html += '<input type="hidden" name="height" id="height" value="' + dom.getAttrib(imgElm, "height") + '"/>';
|
||||
html += '<input type="hidden" name="linkURL" id="linkURL" />';
|
||||
html += '<input type="hidden" name="target" id="target" />';
|
||||
html += '<input type="hidden" name="align" id="align" value="' + dom.getStyle(imgElm, 'float') + '"/>';
|
||||
html += '<iframe src="'+ url + '/image.php'+ query_str + '&' + new Date().getTime() + '" frameborder="0"></iframe>';
|
||||
}else{
|
||||
html += '<input type="hidden" name="src" id="src" />';
|
||||
html += '<input type="hidden" name="alt" id="alt" />';
|
||||
html += '<input type="hidden" name="title" id="title" />';
|
||||
html += '<input type="hidden" name="width" id="width" />';
|
||||
html += '<input type="hidden" name="height" id="height" />';
|
||||
html += '<input type="hidden" name="linkURL" id="linkURL" />';
|
||||
html += '<input type="hidden" name="target" id="target" />';
|
||||
html += '<input type="hidden" name="align" id="align" />';
|
||||
html += '<iframe src="'+ url + '/image.php'+ '?' + new Date().getTime() + '" frameborder="0"></iframe>';
|
||||
}
|
||||
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function BuildDom(src, alt, w, h, title, linkURL, target, float){
|
||||
if(imgElm){
|
||||
if(src){
|
||||
dom.setStyle(imgElm, 'float', float);
|
||||
|
||||
dom.setAttribs(imgElm, {
|
||||
'src': src,
|
||||
'alt': alt ? alt : null,
|
||||
'width': w ? w : null,
|
||||
'height': h ? h : null,
|
||||
'title': title ? title : null
|
||||
});
|
||||
|
||||
}
|
||||
}else{
|
||||
var markup = '';
|
||||
if(src){
|
||||
markup += '<img src="' + src + '"';
|
||||
if(alt){
|
||||
markup += ' alt="' + alt + '"';
|
||||
}
|
||||
if(title){
|
||||
markup += ' title="' + title + '"';
|
||||
}
|
||||
if(h){
|
||||
markup += ' height="' + h + '"';
|
||||
}
|
||||
if(w){
|
||||
markup += ' width="' + w + '"';
|
||||
}
|
||||
|
||||
if(float){
|
||||
if(!linkURL){
|
||||
markup += ' style="float: ' + float + '"';
|
||||
}
|
||||
}
|
||||
|
||||
markup += ' />';
|
||||
|
||||
if(linkURL){
|
||||
var thelink = '<a href="' + linkURL + '"';
|
||||
|
||||
if(target){
|
||||
thelink += ' target="' + target + '"';
|
||||
}
|
||||
|
||||
if(float){
|
||||
thelink += ' style="float: ' + float + '"';
|
||||
}
|
||||
|
||||
thelink += '>';
|
||||
markup = thelink + markup + '</a>';
|
||||
}
|
||||
|
||||
editor.insertContent(markup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
win = editor.windowManager.open({
|
||||
title: "Manage Image",
|
||||
width : 885,
|
||||
height : 475,
|
||||
html: GetTheHtml(),
|
||||
buttons: [
|
||||
{
|
||||
text: 'Insert Image',
|
||||
subtype: 'primary',
|
||||
onclick: function(e) {
|
||||
BuildDom(document.getElementById("src").value,
|
||||
document.getElementById("alt").value,
|
||||
document.getElementById("width").value,
|
||||
document.getElementById("height").value,
|
||||
document.getElementById("title").value,
|
||||
document.getElementById("linkURL").value,
|
||||
document.getElementById("target").value,
|
||||
document.getElementById("align").value);
|
||||
this.parent().parent().close();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Cancel',
|
||||
onclick: function() {
|
||||
this.parent().parent().close();
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
editor.addButton('image', {
|
||||
icon: 'image',
|
||||
tooltip: 'Insert/edit image',
|
||||
onclick: showDialog,
|
||||
stateSelector: 'img:not([data-mce-object])'
|
||||
});
|
||||
|
||||
editor.addMenuItem('image', {
|
||||
icon: 'image',
|
||||
text: 'Insert image',
|
||||
onclick: showDialog,
|
||||
context: 'insert',
|
||||
prependToContext: true
|
||||
});
|
||||
});
|
||||
/*global tinymce:true */
|
||||
|
||||
tinymce.PluginManager.add('image', function(editor, url) {
|
||||
function showDialog() {
|
||||
var win, data, dom = editor.dom, imgElm = editor.selection.getNode();
|
||||
var width, height, query_str = "";
|
||||
|
||||
if(imgElm.nodeName == "IMG" && !imgElm.getAttribute('data-mce-object')){
|
||||
query_str = "?title=" + dom.getAttrib(imgElm, 'title') + "&alt=" + dom.getAttrib(imgElm, 'alt') + "&width=" + dom.getAttrib(imgElm, 'width') + "&height=" + dom.getAttrib(imgElm, 'height') + "&src=" + encodeURIComponent(dom.getAttrib(imgElm, 'src'));
|
||||
if(dom.getStyle(imgElm, 'float')){
|
||||
query_str += "&align=" + dom.getStyle(imgElm, 'float');
|
||||
}
|
||||
}else{
|
||||
imgElm = null;
|
||||
}
|
||||
|
||||
function GetTheHtml(){
|
||||
var html = '';
|
||||
if(imgElm){
|
||||
html += '<input type="hidden" name="src" id="src" value="' + dom.getAttrib(imgElm, "src") + '"/>';
|
||||
html += '<input type="hidden" name="alt" id="alt" value="' + dom.getAttrib(imgElm, "alt") + '"/>';
|
||||
html += '<input type="hidden" name="title" id="title" value="' + dom.getAttrib(imgElm, "title") + '"/>';
|
||||
html += '<input type="hidden" name="width" id="width" value="' + dom.getAttrib(imgElm, "width") + '"/>';
|
||||
html += '<input type="hidden" name="height" id="height" value="' + dom.getAttrib(imgElm, "height") + '"/>';
|
||||
html += '<input type="hidden" name="linkURL" id="linkURL" />';
|
||||
html += '<input type="hidden" name="target" id="target" />';
|
||||
html += '<input type="hidden" name="align" id="align" value="' + dom.getStyle(imgElm, 'float') + '"/>';
|
||||
html += '<iframe src="'+ url + '/image.php'+ query_str + '&' + new Date().getTime() + '" frameborder="0"></iframe>';
|
||||
}else{
|
||||
html += '<input type="hidden" name="src" id="src" />';
|
||||
html += '<input type="hidden" name="alt" id="alt" />';
|
||||
html += '<input type="hidden" name="title" id="title" />';
|
||||
html += '<input type="hidden" name="width" id="width" />';
|
||||
html += '<input type="hidden" name="height" id="height" />';
|
||||
html += '<input type="hidden" name="linkURL" id="linkURL" />';
|
||||
html += '<input type="hidden" name="target" id="target" />';
|
||||
html += '<input type="hidden" name="align" id="align" />';
|
||||
html += '<iframe src="'+ url + '/image.php'+ '?' + new Date().getTime() + '" frameborder="0"></iframe>';
|
||||
}
|
||||
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function BuildDom(src, alt, w, h, title, linkURL, target, float){
|
||||
if(imgElm){
|
||||
if(src){
|
||||
dom.setStyle(imgElm, 'float', float);
|
||||
|
||||
dom.setAttribs(imgElm, {
|
||||
'src': src,
|
||||
'alt': alt ? alt : null,
|
||||
'width': w ? w : null,
|
||||
'height': h ? h : null,
|
||||
'title': title ? title : null
|
||||
});
|
||||
|
||||
}
|
||||
}else{
|
||||
var markup = '';
|
||||
if(src){
|
||||
markup += '<img src="' + src + '"';
|
||||
if(alt){
|
||||
markup += ' alt="' + alt + '"';
|
||||
}
|
||||
if(title){
|
||||
markup += ' title="' + title + '"';
|
||||
}
|
||||
if(h){
|
||||
markup += ' height="' + h + '"';
|
||||
}
|
||||
if(w){
|
||||
markup += ' width="' + w + '"';
|
||||
}
|
||||
|
||||
if(float){
|
||||
if(!linkURL){
|
||||
markup += ' style="float: ' + float + '"';
|
||||
}
|
||||
}
|
||||
|
||||
markup += ' />';
|
||||
|
||||
if(linkURL){
|
||||
var thelink = '<a href="' + linkURL + '"';
|
||||
|
||||
if(target){
|
||||
thelink += ' target="' + target + '"';
|
||||
}
|
||||
|
||||
if(float){
|
||||
thelink += ' style="float: ' + float + '"';
|
||||
}
|
||||
|
||||
thelink += '>';
|
||||
markup = thelink + markup + '</a>';
|
||||
}
|
||||
|
||||
editor.insertContent(markup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
win = editor.windowManager.open({
|
||||
title: "Manage Image",
|
||||
width : 885,
|
||||
height : 475,
|
||||
html: GetTheHtml(),
|
||||
buttons: [
|
||||
{
|
||||
text: 'Insert Image',
|
||||
subtype: 'primary',
|
||||
onclick: function(e) {
|
||||
BuildDom(document.getElementById("src").value,
|
||||
document.getElementById("alt").value,
|
||||
document.getElementById("width").value,
|
||||
document.getElementById("height").value,
|
||||
document.getElementById("title").value,
|
||||
document.getElementById("linkURL").value,
|
||||
document.getElementById("target").value,
|
||||
document.getElementById("align").value);
|
||||
this.parent().parent().close();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Cancel',
|
||||
onclick: function() {
|
||||
this.parent().parent().close();
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
editor.addButton('image', {
|
||||
icon: 'image',
|
||||
tooltip: 'Insert/edit image',
|
||||
onclick: showDialog,
|
||||
stateSelector: 'img:not([data-mce-object])'
|
||||
});
|
||||
|
||||
editor.addMenuItem('image', {
|
||||
icon: 'image',
|
||||
text: 'Insert image',
|
||||
onclick: showDialog,
|
||||
context: 'insert',
|
||||
prependToContext: true
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,57 +1,57 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/recent\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
|
||||
if(isset($_SESSION['SimpleImageManager']) AND count($_SESSION['SimpleImageManager']) > 0){
|
||||
$html = '';
|
||||
foreach($_SESSION['SimpleImageManager'] as $s){
|
||||
$me = false;
|
||||
$exists = is_url_exist($s);
|
||||
$url_host = parse_url($s, PHP_URL_HOST);
|
||||
if($url_host == $_SERVER['HTTP_HOST']){
|
||||
$me = true;
|
||||
}
|
||||
|
||||
if($me){
|
||||
$html .= '<div class="item"><a href="" class="img-thumbs" rel="' .$s . '"><img src="timthumb.php?src=' . $s . '&w=130&h=90" class="img-polaroid" width="130" height="90"></a></div>';
|
||||
}elseif($exists){
|
||||
$html .= '<div class="item"><a href="" class="img-thumbs" rel="' .$s . '"><img src="' . $s . '" class="img-polaroid" width="130" height="90"></a></div>';
|
||||
}
|
||||
}
|
||||
if($html != ''){
|
||||
$output["html"] = $html;
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
}
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
}
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/recent\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
|
||||
if(isset($_SESSION['SimpleImageManager']) AND count($_SESSION['SimpleImageManager']) > 0){
|
||||
$html = '';
|
||||
foreach($_SESSION['SimpleImageManager'] as $s){
|
||||
$me = false;
|
||||
$exists = is_url_exist($s);
|
||||
$url_host = parse_url($s, PHP_URL_HOST);
|
||||
if($url_host == $_SERVER['HTTP_HOST']){
|
||||
$me = true;
|
||||
}
|
||||
|
||||
if($me){
|
||||
$html .= '<div class="item"><a href="" class="img-thumbs" rel="' .$s . '"><img src="timthumb.php?src=' . $s . '&w=130&h=90" class="img-polaroid" width="130" height="90"></a></div>';
|
||||
}elseif($exists){
|
||||
$html .= '<div class="item"><a href="" class="img-thumbs" rel="' .$s . '"><img src="' . $s . '" class="img-polaroid" width="130" height="90"></a></div>';
|
||||
}
|
||||
}
|
||||
if($html != ''){
|
||||
$output["html"] = $html;
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
}
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
}
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/refresh_dir_list\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["html"] = Dirtree(LIBRARY_FOLDER_PATH);;
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/refresh_dir_list\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["html"] = Dirtree(LIBRARY_FOLDER_PATH);;
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
|
|
|
@ -1,106 +1,106 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/rename_file\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["msg"] = "";
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
|
||||
if(!CanRenameFiles()){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You don not have permission to rename files.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["new_name"]) AND $_GET["new_name"] != ""){
|
||||
$new_name = clean($_GET["new_name"]);
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The new name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["current_name"]) AND $_GET["current_name"] != ""){
|
||||
$current_name = clean($_GET["current_name"]);
|
||||
$file = $current_folder . $current_name;
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The current name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!startsWith($file, LIBRARY_FOLDER_PATH)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You can not edit this file";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!file_exists($file)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The file does not exist.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!is_file($file)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "That is not a file.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(file_exists(($current_folder . $new_name))){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The new name is already in use.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
rename(($current_folder . $current_name), ($current_folder . $new_name));
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/rename_file\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["msg"] = "";
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
|
||||
if(!CanRenameFiles()){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You don not have permission to rename files.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["new_name"]) AND $_GET["new_name"] != ""){
|
||||
$new_name = clean($_GET["new_name"]);
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The new name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["current_name"]) AND $_GET["current_name"] != ""){
|
||||
$current_name = clean($_GET["current_name"]);
|
||||
$file = $current_folder . $current_name;
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The current name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!startsWith($file, LIBRARY_FOLDER_PATH)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You can not edit this file";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!file_exists($file)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The file does not exist.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!is_file($file)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "That is not a file.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(file_exists(($current_folder . $new_name))){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The new name is already in use.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
rename(($current_folder . $current_name), ($current_folder . $new_name));
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
|
|
|
@ -1,106 +1,106 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/rename_folder\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["msg"] = "";
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
|
||||
if(!CanRenameFolder()){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You don not have permission to rename folders.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["new_name"]) AND $_GET["new_name"] != ""){
|
||||
$new_name = clean($_GET["new_name"]);
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The new name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["current_name"]) AND $_GET["current_name"] != ""){
|
||||
$current_name = clean($_GET["current_name"]);
|
||||
$folder = $current_folder . $current_name;
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The current name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!startsWith($folder, LIBRARY_FOLDER_PATH)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You can not rename this folder";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!file_exists($folder)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The folder does not exist.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!is_dir($folder)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "That is not a folder.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(file_exists(($current_folder . $new_name))){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The new name is already in use.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
rename(($current_folder . $current_name), ($current_folder . $new_name));
|
||||
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/rename_folder\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["msg"] = "";
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
|
||||
if(!CanRenameFolder()){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You don not have permission to rename folders.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["new_name"]) AND $_GET["new_name"] != ""){
|
||||
$new_name = clean($_GET["new_name"]);
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The new name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(isset($_GET["current_name"]) AND $_GET["current_name"] != ""){
|
||||
$current_name = clean($_GET["current_name"]);
|
||||
$folder = $current_folder . $current_name;
|
||||
}else{
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The current name is required.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!startsWith($folder, LIBRARY_FOLDER_PATH)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You can not rename this folder";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!file_exists($folder)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The folder does not exist.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(!is_dir($folder)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "That is not a folder.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(file_exists(($current_folder . $new_name))){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "The new name is already in use.";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
rename(($current_folder . $current_name), ($current_folder . $new_name));
|
||||
|
||||
|
||||
include 'contents.php';
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/search\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = SearchFiles(LIBRARY_FOLDER_PATH);
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/set_upload_directory\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
$output["success"] = 1;
|
||||
$output["msg"] = "";
|
||||
|
||||
if(isset($_GET["path"]) AND $_GET["path"] != ""){
|
||||
$current_folder = urldecode(clean($_GET["path"]));
|
||||
}else{
|
||||
$current_folder = LIBRARY_FOLDER_PATH;
|
||||
}
|
||||
|
||||
if(!startsWith($current_folder, LIBRARY_FOLDER_PATH)){
|
||||
$output["success"] = 0;
|
||||
$output["msg"] = "You can not upload to this folder";
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
||||
}
|
||||
|
||||
$_SESSION["tinymce_upload_directory"] = $current_folder;
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/update_recent\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["src"]) AND is_url_exist(clean($_POST["src"]))){
|
||||
if(!isset($_SESSION['SimpleImageManager'])){
|
||||
$_SESSION['SimpleImageManager'] = array();
|
||||
$_SESSION['SimpleImageManager'][] = clean($_POST["src"]);
|
||||
}else{
|
||||
if(!in_array(clean($_POST["src"]), $_SESSION['SimpleImageManager'])){
|
||||
$_SESSION['SimpleImageManager'][] = clean($_POST["src"]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
require_once('config.php');
|
||||
require_once('functions.php');
|
||||
//echo LIBRARY_FOLDER_PATH;
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
// define('LIBRARY_FOLDER_PATH', 'uploads/');
|
||||
}
|
||||
/*
|
||||
if(!defined('LIBRARY_FOLDER_PATH')){
|
||||
$pageURL = 'http';
|
||||
if(isset($_SERVER["HTTPS"]) AND $_SERVER["HTTPS"] == "on"){
|
||||
$pageURL .= "s";
|
||||
}
|
||||
$pageURL .= "://";
|
||||
if($_SERVER["SERVER_PORT"] != "80"){
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
||||
}else{
|
||||
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
if(preg_match("/(.*)\/upload\.php/",$pageURL,$matches)){
|
||||
define('LIBRARY_FOLDER_URL', $matches[1] . '/uploads/');
|
||||
}
|
||||
}
|
||||
*/
|
||||
$output = DoUpload('upl');
|
||||
|
||||
header("Content-type: text/plain;");
|
||||
echo json_encode($output);
|
||||
exit();
|
|
@ -0,0 +1,150 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>User Guide · TinyMCE 4 Image Manager</title>
|
||||
<link href="bootstrap/css/bootstrap.css" rel="stylesheet" media="screen">
|
||||
<script src="bootstrap/js/jquery.js"></script>
|
||||
<script src="bootstrap/js/bootstrap.min.js"></script>
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
/* Custom container */
|
||||
.container-narrow {
|
||||
margin: 0 auto;
|
||||
max-width: 700px;
|
||||
}
|
||||
.container-narrow > hr {
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
/* Main marketing message and sign up button */
|
||||
.jumbotron {
|
||||
margin: 60px 0;
|
||||
text-align: center;
|
||||
}
|
||||
.jumbotron h1 {
|
||||
font-size: 72px;
|
||||
line-height: 1;
|
||||
}
|
||||
.jumbotron .btn {
|
||||
font-size: 21px;
|
||||
padding: 14px 24px;
|
||||
}
|
||||
|
||||
/* Supporting marketing content */
|
||||
.marketing {
|
||||
margin: 60px 0;
|
||||
}
|
||||
.marketing p + h4 {
|
||||
margin-top: 28px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-narrow">
|
||||
|
||||
<div class="masthead">
|
||||
<ul class="nav nav-pills pull-right">
|
||||
<li><a href="mailto:robertnduati.karanja@gmail.com">robertnduati.karanja@gmail.com</a></li>
|
||||
</ul>
|
||||
<h3 class="muted">TinyMCE 4 Image Manager</h3>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>About</h2>
|
||||
<p>This is a TinyMCE plugin that replaces the default one that comes with the editor and makes that editor more useful in CSMs by adding features to it. It makes it easier to added images when using the popular wysiwyg editor. This plugin only works with the updated and stylish TinyMCE 4 versions.</p>
|
||||
<p><span class="label">tinymce</span> <span class="label">plugin</span> <span class="label">wysiwyg</span> <span class="label">html editor</span> <span class="label">Images</span> <span class="label">Manage Images</span> <span class="label">CMS</span></p>
|
||||
<br/>
|
||||
<h2>Features:</h2>
|
||||
<ul>
|
||||
<li><b>Image Preview</b>: When adding an image from a link, the plugin will retrieve the image and show a preview so that you are sure of the image that you are adding.</li>
|
||||
<li><b>Permission</b>: The plugin has a configuration file <code>config.php</code> that you can use to determine who can upload images or view the defined library of images. User with no permissions can only insert images from links.</li>
|
||||
<li><b>Multiple Uploads</b>: You will be able to upload multiple images at once by selecting them or draging and dropping.</li>
|
||||
<li><b>Ajax Upload</b>: The upload feature uses ajax and so no page refreshing when uploading.</li>
|
||||
<li><b>Recent List of Files</b>: When you insert images from an url or upload the or get them from the library, the plugin in saves them in a session and you can be able to view them the next time you open the dialog for the plugin.</li>
|
||||
<li><b>Define an Image Library</b>: During installation you will be able to define a path to an image library. This will be a folder with images that you can access from the plugin and also the folder to which files are uploaded to.</li>
|
||||
<li><b>Traverse the Library Subfolder</b>: If the library folder has nested subfolders the plugin will be able to handle them.</li>
|
||||
<li><b>Search the Library</b>: This plugin has a search feature for the library that allows you to search it and the subfolders for an image using the image's name.</li>
|
||||
<li><b>Bootstrap CSS and HTML</b>: If you wish to change any of the styling and are familiar with the Twitter Bootstrap framework, you will have no difficulty.</li>
|
||||
<li><b>Image Alignment</b>: When inserting images, you will be able to define the alignment relative to the text around it. The plugin in uses float rather than the align(deprecated in HTML5)</li>
|
||||
<li><b>Wrap Images in a Link</b>: You can easily choose to wrap an image in a link when adding it.</li>
|
||||
<li><b>Image Dimensions</b>: When you add an image it is possible to define the dimension that it will be added with. You can easily keep the image's aspec ratio.</li>
|
||||
<li><b>Quick Install</b>: Just modify the configuration file(if you want) and then upload to the tinymce plugins' folder. That is it.</li>
|
||||
<li><b>Source Code</b>: Nothing is hidden.</li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<h2>Installation</h2>
|
||||
<ol>
|
||||
<li>Unzip the file</li>
|
||||
<li>Open the file <code>config.php</code> and define the library path and url and also the permissions. There are comments in the php file to help you with this.</li>
|
||||
<li>Upload the files to the tinymce plugins' folder replacing the default image plugin</li>
|
||||
</ol>
|
||||
|
||||
<hr>
|
||||
<h2>Usage</h2>
|
||||
<p>When using the editor, click on the <i class="icon-picture"></i> icon to activate the dialog for this plugin.</p>
|
||||
<h4>1. Insert from Url</h4>
|
||||
<p>When you click on the icon to select this plugin you will be presented with a form like the one below.</p>
|
||||
<p><img src="userguide_files/img1.jpg"></p>
|
||||
<ul>
|
||||
<li><b>URL</b>: this is the url to the img that you want to add. Please use a full url that includes the protocol.</li>
|
||||
<li><b>Title</b>: this is the text that will be displayed when the image is hovered.</li>
|
||||
<li><b>Description</b>: this is the alternative text that will be displayed if the image can not be loaded.</li>
|
||||
<li><b>Width and Height</b>: these are the dimensions that the image will be added with. When you provide a URL these fields are automatically populated. You can change them.</li>
|
||||
<li><b>Force original aspect ratio</b>: when this is check and you change either the width or height, the other dimension will be calculated based in the original aspect ratio of the image.</li>
|
||||
<li><b>Alignment</b>: this is the url to the image that you want to add. Please use a full url that includes the protocol.</li>
|
||||
<li><b>Wrap image in a link</b>: check this if you want to link the image to something.</li>
|
||||
<li><b>Link URL</b>: this is the url to link the image too.</li>
|
||||
<li><b>Target</b>: if the image is wrapped in a link, this determines if the link will be opened in a new window or not when clicked</li>
|
||||
<li><b>Preview</b>: when you input an image url in the first field, the image will be loaded here for preview.</li>
|
||||
</ul>
|
||||
|
||||
<br/>
|
||||
<h4>2. Get from Library</h4>
|
||||
<p>When you click on the tab titled "Get from Library" you will be presented with the following.</p>
|
||||
<p><img src="userguide_files/img2.jpg"></p>
|
||||
<ul>
|
||||
<li><b>Folders</b>: when you click on a folder thumbnail, the content of the folder will be displayed.</li>
|
||||
<li><b>Images</b>: when you click on an image you will be taken to the page for inserting it..</li>
|
||||
<li><b>Back</b>: there is a "Back" button at the top left. When you are in a folder use this to go back up one level at a time.</li>
|
||||
<li><b>Search</b>: you can search for images using the input at the top right. Just type the term you want to search using.</li>
|
||||
<li><b>Refresh</b>: when you click the <i class="icon-refresh"></i> icon, the contents of the current folder are refreshed.</li>
|
||||
</ul>
|
||||
|
||||
<br/>
|
||||
<h4>3. Upload Now</h4>
|
||||
<p>When you click on the tab titled "Upload Now" you will be presented with the following.</p>
|
||||
<p><img src="userguide_files/img3.jpg"></p>
|
||||
<ul>
|
||||
<li><b>Uploading</b>: click on the button or drag and drop the files in the area with a dotted boarder</li>
|
||||
<li><b>Errors</b>: errors appear in red under the upload are and the reason is in square brackets.</li>
|
||||
<li><b>Success</b>: when an image is uploaded successfully, its thumbnail is displayed under the upload area. You will then need to click on the image and you will be taken to the form for inserting the image.</li>
|
||||
</ul>
|
||||
|
||||
<br/>
|
||||
<h4>4. Recent</h4>
|
||||
<p>These are images that you have uploaded or inserted from URL during the current session.</p>
|
||||
<p>When you click on the tab titled "Recent" you will be presented with the following.</p>
|
||||
<p><img src="userguide_files/img4.jpg"></p>
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="footer">
|
||||
<p>© robertnduati 2013</p>
|
||||
</div>
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
54
index.php
|
@ -1,34 +1,17 @@
|
|||
<?php
|
||||
namespace start;
|
||||
$start_site = microtime(true);
|
||||
|
||||
|
||||
|
||||
function compress($buffer) {
|
||||
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
|
||||
$buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer);
|
||||
return $buffer;
|
||||
}
|
||||
header('Content-type: text/html');
|
||||
header("Cache-Control: public");
|
||||
header("Expires: " . date("r", time() + 86400));
|
||||
ob_start("compress");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ini_set('display_errors', 0 );
|
||||
|
||||
|
||||
require_once 'redirect.php';
|
||||
|
||||
require_once('api/php/db.php');
|
||||
require_once('api/php/json.php');
|
||||
require_once('api/php/core.php');
|
||||
require_once('api/php/clean.php');
|
||||
require 'set/' . $_SERVER['SERVER_NAME'] . '.php';
|
||||
#if (file_exists('set/install/install_' . $db['type'] . '.php'))require_once 'set/install/install_' . $db['type'] . '.php';
|
||||
//if (file_exists('set/install/install_' . $db['type'] . '.php'))require_once 'set/install/install_' . $db['type'] . '.php';
|
||||
/* ----------------------------------------------------------------------
|
||||
09.12.2022
|
||||
Выбираем модуль по умолчанию
|
||||
|
@ -57,16 +40,10 @@ if ( !@$_SESSION['user_id'] ) \core::loginCookies();
|
|||
17.12.2022
|
||||
Берем данные корзины
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
$cart=\core::getCart();
|
||||
$smarty -> assign( 'cart', $cart );
|
||||
|
||||
/*
|
||||
function compress($buffer) {
|
||||
$buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer);
|
||||
return $buffer;
|
||||
}
|
||||
ob_start('compress');
|
||||
*/
|
||||
/* ----------------------------------------------------------------------
|
||||
09.12.2022
|
||||
Выбираем шаблон модуля
|
||||
|
@ -79,7 +56,28 @@ else
|
|||
$user_id = ( $_SESSION['user_id'] ? $_SESSION['user_id'] : session_id() );
|
||||
$time_site = round( microtime(true) - $start_site, 5 );
|
||||
\DB::add( "INSERT INTO `site_speed` ( `t`, `mod`, `mod_id`, `speed`, `user_id` ) VALUES ( ?, ?, ?, ?, ? )", array( time(), MOD, $_GET['id'], $time_site, $user_id ) );
|
||||
|
||||
ob_end_flush();
|
||||
//ob_end_flush();
|
||||
/*if ($_SERVER['SERVER_NAME']=='tk-ligat.ru'){
|
||||
\DB::$type='mysql';
|
||||
\DB::$dsn='mysql:dbname=tk-ligat;host=127.0.0.1';
|
||||
\DB::$user='admin';
|
||||
\DB::$pass='32143214';
|
||||
\DB::set("CREATE TABLE `tovar` (
|
||||
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`title` varchar(400) NULL,
|
||||
`txt` longtext NULL,
|
||||
`keywords` longtext NULL,
|
||||
`artikul` varchar(10) NULL,
|
||||
`description` longtext NULL,
|
||||
`tovar_id_1c` varchar(50) NULL,
|
||||
`tovar_cat_1c` varchar(50) NULL,
|
||||
`status` int(1) NULL,
|
||||
`category` int(10) NULL,
|
||||
`countImg` int(10) NULL,
|
||||
`partner` varchar(400) NULL,
|
||||
`json` longtext NULL,
|
||||
`brand_id` int(10) NULL,
|
||||
`check_img` int(1) NULL,
|
||||
`code` varchar(10) NULL
|
||||
) ENGINE='InnoDB' COLLATE 'utf8_general_ci';");
|
||||
}*/
|
||||
?>
|
|
@ -1,6 +1,41 @@
|
|||
<?php
|
||||
/*
|
||||
mysql -u admin -p tk-ligat < adminer.sql
|
||||
*/
|
||||
|
||||
|
||||
|
||||
\DB::set("CREATE TABLE IF NOT EXISTS `tovar` (
|
||||
`id` int(10)NULL,
|
||||
`title` varchar(300) NULL,
|
||||
`txt` longtext NULL,
|
||||
`keywords` longtext NULL,
|
||||
`artikul` varchar(50) NULL,
|
||||
`description` longtext NULL,
|
||||
`tovar_id_1c` varchar(100) NULL,
|
||||
`tovar_cat_1c` varchar(100) NULL,
|
||||
`status` int(1)NULL,
|
||||
`category` int(10)NULL,
|
||||
`countImg` int(2)NULL,
|
||||
`partner` varchar(100) NULL,
|
||||
`json` longtext NULL,
|
||||
`brand_id` int(10)NULL,
|
||||
`check_img` int(1)NULL,
|
||||
`code` varchar(30) NULL);");
|
||||
|
||||
|
||||
\DB::set("CREATE TABLE IF NOT EXISTS `tovar_img` (
|
||||
`id` int(10)NULL,
|
||||
`filename` varchar(30) NULL,
|
||||
|
||||
|
||||
`tovar_id` int(10)NULL,
|
||||
`md5` varchar(30) NULL,
|
||||
`title` varchar(300) NULL,
|
||||
`alt` varchar(300) NULL);");
|
||||
|
||||
/*
|
||||
|
||||
\DB::set("CREATE TABLE IF NOT EXISTS `blog_category` (
|
||||
`id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`title` varchar(250) NULL,
|
||||
|
@ -52,4 +87,6 @@
|
|||
`user_id` int(10) NULL,
|
||||
`reyt` int(10) NULL DEFAULT '0',
|
||||
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
|
||||
) ENGINE='InnoDB' COLLATE 'utf8_general_ci';");
|
||||
) ENGINE='InnoDB' COLLATE 'utf8_general_ci';");
|
||||
|
||||
*/
|
|
@ -299,6 +299,8 @@
|
|||
\DB::alterTable("ALTER TABLE `tovar_category` ADD `keywords` TEXT");
|
||||
\DB::alterTable("ALTER TABLE `tovar_category` ADD `description` TEXT");
|
||||
\DB::alterTable("ALTER TABLE `site_speed` ADD `user_id` TEXT");
|
||||
\DB::alterTable("ALTER TABLE `pages` ADD `d` TEXT");
|
||||
|
||||
// \DB::alterTable("ALTER TABLE `tovar_brand` ADD `description` TEXT");
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
/*
|
||||
Настройки подключения к БД
|
||||
*/
|
||||
$db['type']='sqlite3';
|
||||
$db['type']='mysql';
|
||||
$db['host']='127.0.0.1';
|
||||
$db['db']='p007';
|
||||
$db['db']='tk-ligat';
|
||||
$db['user']='admin';
|
||||
$db['password']='32143214';
|
||||
$db['path']='';
|
||||
|
|
|
@ -27,78 +27,20 @@
|
|||
<div class="row">
|
||||
<div class="col-12 d-flex justify-content-between align-items-center">
|
||||
<!-- Start Logo -->
|
||||
<div class="header__logo">
|
||||
<a href="/" class="header__logo-link img-responsive" style="font-size: 16pt;color:#000;">Торговая компания Лигат</a>
|
||||
</div>
|
||||
|
||||
<!-- End Logo -->
|
||||
<!-- Start Header Menu -->
|
||||
<div class="header-menu">
|
||||
<nav>
|
||||
<ul class="header__nav">
|
||||
<!--Start Single Nav link-->
|
||||
{* п1 *}
|
||||
<li class="header__nav-item pos-relative">
|
||||
<a href="/" class="header__nav-link">Главная</a>
|
||||
</li>
|
||||
{* п2 *}
|
||||
<li class="header__nav-item pos-relative">
|
||||
<a href="/tovar_cat/0-1.html" class="header__nav-link">Каталог</a>
|
||||
</li>
|
||||
<!-- End Single Nav link-->
|
||||
|
||||
<!--Start Single Nav link-->
|
||||
<li class="header__nav-item pos-relative">
|
||||
<a href="#" class="header__nav-link">Контакты <i class="fal fa-chevron-down"></i></a>
|
||||
<!-- Megamenu Menu-->
|
||||
<ul class="mega-menu pos-absolute">
|
||||
<li class="mega-menu__box">
|
||||
<!--Single Megamenu Item Menu-->
|
||||
<div class="mega-menu__item-box">
|
||||
<span class="mega-menu__title">Women Is Clothes & Fashion</span>
|
||||
<ul class="mega-menu__item">
|
||||
<li>
|
||||
<p>Shop Women Is Clothing And Accessories And Get Inspired By The Latest Fashion Trends.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--Single Megamenu Item Menu-->
|
||||
|
||||
|
||||
</li>
|
||||
<!--Megamenu Item Banner-->
|
||||
<li class="mega-menu__banner m-t-30">
|
||||
<a href="product-single-default.html" class="mega-menu__banner-link">
|
||||
<img src="assets/img/banner/menu-banner-2.png" alt="" class="mega-menu__banner-img mega-menu__banner-img--horaizontal">
|
||||
</a>
|
||||
</li>
|
||||
<!--Megamenu Item Banner-->
|
||||
</ul>
|
||||
<!-- Megamenu Menu-->
|
||||
</li>
|
||||
<!-- Start Single Nav link-->
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- End Header Menu -->
|
||||
<!-- Start Wishlist-AddCart -->
|
||||
<ul class="header__user-action-icon">
|
||||
<!-- Start Header Wishlist Box -->
|
||||
<li>
|
||||
<a href="/lk/">
|
||||
<i class="icon-users"></i>
|
||||
</a>
|
||||
</li>
|
||||
<!-- End Header Wishlist Box -->
|
||||
|
||||
<!-- Start Header Add Cart Box -->
|
||||
<li>
|
||||
<a href="/cart/" class="offcanvas-toggle" id="cart_icon">
|
||||
<i class="icon-shopping-cart"></i>
|
||||
<span class="wishlist-item-count pos-absolute">3</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- End Header Add Cart Box -->
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -108,7 +50,44 @@
|
|||
<!-- Start Header bottom area -->
|
||||
<div class="header__bottom p-tb-30" style="background-color: #fff;">
|
||||
<div class="container">
|
||||
<div class="row justify-content-between align-items-center mb-3">
|
||||
|
||||
<div class="header__logo col-xl-3 col-lg-3">
|
||||
<a href="/" class="header__logo-link img-responsive" style="font-size: 14pt;color:#000;">Торговая компания Лигат</a>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-5">
|
||||
<form class="header-search" action="/new_find/" method="post">
|
||||
<div class="header-search__content pos-relative">
|
||||
<input type="search" name="txt" value="{$smarty.post.txt}" placeholder="Поиск" required style="border: 1px solid black; border-radius: 10px;">
|
||||
<button class="pos-absolute" type="submit"><i class="icon-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-xl-3 col-lg-3">
|
||||
<div class="header-phone text-right"><span>+7 (3435) 40-55-50<br>+7 (3435) 40-55-05</span></div>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-2 col-lg-2">
|
||||
<ul class="header__user-action-icon">
|
||||
<li>
|
||||
<a href="/lk/">
|
||||
<i class="icon-users"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/cart/" class="offcanvas-toggle" id="cart_icon">
|
||||
<i class="icon-shopping-cart"></i>
|
||||
<span class="wishlist-item-count pos-absolute">3</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row justify-content-between align-items-center">
|
||||
|
||||
<div class="col-xl-3 col-lg-3">
|
||||
<div class="header-menu-vertical pos-relative">
|
||||
<h4 class="menu-title link--icon-left"><i class="far fa-align-left"></i>Ассортимент</h4>
|
||||
|
@ -123,18 +102,45 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-7 col-lg-6">
|
||||
<form class="header-search" action="/new_find/" method="post">
|
||||
<div class="header-search__content pos-relative">
|
||||
<input type="search" name="txt" value="{$smarty.post.txt}" placeholder="Поиск" required>
|
||||
<button class="pos-absolute" type="submit"><i class="icon-search"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-xl-2 col-lg-3">
|
||||
<div class="header-phone text-right"><span>Тел: +7 3435 *** ***</span></div>
|
||||
|
||||
|
||||
<div class="col-xl-9 col-lg-9">
|
||||
|
||||
<nav style="margin: 0px; padding: 0px;">
|
||||
<ul class="header__nav" style="background-color: #2D9CEE; border-radius: 20px; padding-left: 20px; padding-bottom: 3px; padding-top: 3px;">
|
||||
|
||||
{* п1 *}
|
||||
<li class="header__nav-item pos-relative" style="border-right: 1px solif #fff;">
|
||||
<a href="/" class="header__nav-link" style="color:#fff;line-height:42px;">Главная</a>
|
||||
</li>
|
||||
|
||||
{* п1 *}
|
||||
<li class="header__nav-item pos-relative" style="border-right: 1px solif #fff;">
|
||||
<a href="/" class="header__nav-link" style="color:#fff;line-height:42px;">О копании</a>
|
||||
</li>
|
||||
{* п1 *}
|
||||
<li class="header__nav-item pos-relative" style="border-right: 1px solif #fff;">
|
||||
<a href="/" class="header__nav-link" style="color:#fff;line-height:42px;">Доставка</a>
|
||||
</li>
|
||||
<li class="header__nav-item pos-relative" style="border-right: 1px solif #fff;">
|
||||
<a href="/" class="header__nav-link" style="color:#fff;line-height:42px;">Скачать прайс-лист</a>
|
||||
</li>
|
||||
{* п2 *}
|
||||
<li class="header__nav-item pos-relative">
|
||||
<a href="/tovar_cat/0-1.html" class="header__nav-link" style="color:#fff;line-height:42px;">Каталог</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Header bottom area -->
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
<!-- :::::: Start Hero Section :::::: -->
|
||||
{include file=$header h1="Доступ запрещен" title="Доступ к странице запрещен"}
|
||||
<!-- :::::: Start Breadcrumb Section :::::: -->
|
||||
<div class="page-breadcrumb" style="background-image: url(/img/{$smarty.server.SERVER_NAME}/tovar_cat/{$catImg}.jpg); background-position: -40%; background-size: 100%; margin-bottom: 0px;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<!--ul class="page-breadcrumb__menu">
|
||||
<li class="page-breadcrumb__nav"><a href="/">Главная</a></li>
|
||||
<li class="page-breadcrumb__nav active">{$page_info[0].title}</li>
|
||||
</ul -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/">Главная</a></li>
|
||||
|
||||
{section name=customer loop=$Breadcrumb}{if ($Breadcrumb[customer].id && $Breadcrumb[customer].id!=$smarty.get.id)}
|
||||
<li class="breadcrumb-item"><a href="/tovar_cat/{$Breadcrumb[customer].id}-1.html">{$Breadcrumb[customer].title}</a></li>
|
||||
{/if}{/section}
|
||||
<li class="breadcrumb-item active" aria-current="page">Доступ к странице запрещен</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<!-- :::::: End Breadcrumb Section :::::: -->
|
||||
|
||||
<!-- :::::: Start Main Container Wrapper :::::: -->
|
||||
<main id="main-container" class="main-container">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
<h1>Доступ к запрашиваемой странице запрещен!</h1>
|
||||
|
||||
<img src="/img/tk-ligat.ru/pages/user/1/24857433-privacy-concept-pixelated-words-access-denied-on-digital-background-3d-render.jpg" style="width: 100%; margin-bottom: 30px;">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!-- :::::: End MainContainer Wrapper :::::: -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{include file=$footer}
|
|
@ -0,0 +1,55 @@
|
|||
<!-- :::::: Start Hero Section :::::: -->
|
||||
{include file=$header h1=$page[0].title title=$page[0].title keywords=$page[0].keywords description=$page[0].description}
|
||||
<!-- :::::: Start Breadcrumb Section :::::: -->
|
||||
<div class="page-breadcrumb" style="background-image: url(/img/{$smarty.server.SERVER_NAME}/tovar_cat/{$catImg}.jpg); background-position: -40%; background-size: 100%; margin-bottom: 0px;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<!--ul class="page-breadcrumb__menu">
|
||||
<li class="page-breadcrumb__nav"><a href="/">Главная</a></li>
|
||||
<li class="page-breadcrumb__nav active">{$page_info[0].title}</li>
|
||||
</ul -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/">Главная</a></li>
|
||||
|
||||
{section name=customer loop=$Breadcrumb}{if ($Breadcrumb[customer].id && $Breadcrumb[customer].id!=$smarty.get.id)}
|
||||
<li class="breadcrumb-item"><a href="/tovar_cat/{$Breadcrumb[customer].id}-1.html">{$Breadcrumb[customer].title}</a></li>
|
||||
{/if}{/section}
|
||||
<li class="breadcrumb-item active" aria-current="page">{$page[0].title}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<!-- :::::: End Breadcrumb Section :::::: -->
|
||||
|
||||
<!-- :::::: Start Main Container Wrapper :::::: -->
|
||||
<main id="main-container" class="main-container">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!-- Start Rightside - Content -->
|
||||
<!--div class="img-responsive">
|
||||
<img src="assets/img/banner/size-wide/banner-shop-1-img-1-wide.jpg" alt="">
|
||||
</div -->
|
||||
<!-- :::::: Start Sort Box Section :::::: -->
|
||||
<h1 class="text-center">{$page[0].title}</h1>
|
||||
|
||||
<div>{$page[0].txt}</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!-- :::::: End MainContainer Wrapper :::::: -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{include file=$footer}
|
|
@ -46,7 +46,7 @@
|
|||
<h3>Категории</h3>
|
||||
<div class="row">
|
||||
{section name=customer loop=$list}{if $list[customer].id}
|
||||
<div class="col-xxl-3 col-xl-3 col-lg-2 col-md-2 col-sm-6 col-12">
|
||||
<div class="col-xxl-3 col-xl-3 col-lg-2 col-md-3 col-sm-3 col-12">
|
||||
<!-- Start Single Default Product -->
|
||||
<div class="product__box product__default--single text-center">
|
||||
<!-- Start Product Image -->
|
||||
|
@ -79,7 +79,7 @@
|
|||
<h3>Продукция</h3>
|
||||
<div class="row">
|
||||
{section name=customer loop=$list2}{if $list2[customer].img}
|
||||
<div class="col-xxl-3 col-xl-3 col-lg-2 col-md-2 col-sm-6 col-12">
|
||||
<div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
|
||||
|
||||
<!-- Start Single Default Product -->
|
||||
<div class="product__box product__default--single text-center">
|
||||
|
|
|
@ -283,4 +283,35 @@
|
|||
<!-- :::::: End MainContainer Wrapper :::::: -->
|
||||
|
||||
|
||||
{*
|
||||
<div itemscope itemtype="https://schema.org/Product">
|
||||
<img itemprop="image" src="dell-30in-lcd.jpg" alt="A Dell UltraSharp monitor"/>
|
||||
<span itemprop="name">Dell UltraSharp 30" LCD Monitor</span>
|
||||
|
||||
<div itemprop="aggregateRating"
|
||||
itemscope itemtype="https://schema.org/AggregateRating">
|
||||
<span itemprop="ratingValue">87</span>
|
||||
out of <span itemprop="bestRating">100</span>
|
||||
based on <span itemprop="ratingCount">24</span> user ratings
|
||||
</div>
|
||||
|
||||
<div itemprop="offers" itemscope itemtype="https://schema.org/AggregateOffer">
|
||||
<span itemprop="lowPrice">$1250</span>
|
||||
to <span itemprop="highPrice">$1495</span>
|
||||
from <span itemprop="offerCount">8</span> sellers
|
||||
|
||||
Sellers:
|
||||
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
|
||||
<a itemprop="url" href="save-a-lot-monitors.com/dell-30.html">
|
||||
Save A Lot Monitors - $1250</a>
|
||||
</div>
|
||||
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
|
||||
<a itemprop="url" href="jondoe-gadgets.com/dell-30.html">
|
||||
Jon Doe's Gadgets - $1350</a>
|
||||
</div>
|
||||
</div>
|
||||
...
|
||||
</div>
|
||||
|
||||
*}
|
||||
{include file=$footer}
|