add files
1
vendor/akdelf/akdmin/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.DS_Store
|
||||
15
vendor/akdelf/akdmin/composer.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "akdelf/akdmin",
|
||||
"description": "php autoadmin",
|
||||
"keywords": ["admin"],
|
||||
"version": "1.4.0",
|
||||
|
||||
"require":{
|
||||
"php": ">=5.2.0"
|
||||
},
|
||||
|
||||
"autoload": {
|
||||
"files": ["lib/akdmin.php"]
|
||||
}
|
||||
|
||||
}
|
||||
11
vendor/akdelf/akdmin/example/admins.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
require 'vendor/korm/korm.php';
|
||||
require 'vendor/akdmin/lib/akdmin.php';
|
||||
|
||||
|
||||
include 'config/ini.php';
|
||||
|
||||
|
||||
$admin = new AKdmin();
|
||||
$admin->init();
|
||||
31
vendor/akdelf/akdmin/example/config/ini.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
error_reporting(E_ERROR);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
|
||||
// for agreements
|
||||
define("site", 'http://admin.my/');
|
||||
define("AD", site);
|
||||
define("site_fold", '/home/user/Sites/adanar/');
|
||||
define("site_fold_ad", site_fold);
|
||||
define('APPPATH', '/home/user/Sites/adanar/app/');
|
||||
define("site_ad", AD);
|
||||
|
||||
define('psite', '/home/user/Sites/'); // попка сайта
|
||||
define('sysfold', psite.'system/'); // папка ядра
|
||||
define('THEME', APPPATH.'themes/office/');
|
||||
define("PUB", THEME.'/pub/');
|
||||
|
||||
|
||||
define('maintitle', 'Аргументы Недели');
|
||||
|
||||
|
||||
kORM::config('default', 'localhost', 'root', '', 'argumentiru');
|
||||
|
||||
//$link=@mysql_connect('localhost', 'argumentiru', 'Qx6UFnvjpRC3MwxQ') or die ('Нет связи с базой : ' . mysql_error());
|
||||
$link=@mysql_connect('localhost', 'root', '') or die ('Нет связи с базой : ' . mysql_error());
|
||||
|
||||
|
||||
mysql_select_db('argumentiru', $link) or die ('Can\'t use foo : ' . mysql_error());
|
||||
mysql_query("SET NAMES UTF8");
|
||||
21
vendor/akdelf/akdmin/example/ex_composer.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
|
||||
"repositories":[
|
||||
{
|
||||
"type":"git",
|
||||
"url":"https://github.com/akdelf/korm.git"
|
||||
},
|
||||
{
|
||||
"type":"git",
|
||||
"url":"https://github.com/akdelf/akdmin.git"
|
||||
}
|
||||
|
||||
],
|
||||
|
||||
"require":{
|
||||
"php":">=5.2.0",
|
||||
"akdelf/korm":"dev-master",
|
||||
"akdelf/akdmin":"dev-master"
|
||||
}
|
||||
|
||||
}
|
||||
3
vendor/akdelf/akdmin/example/index.php
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<?
|
||||
|
||||
include 'admins.php';
|
||||
3
vendor/akdelf/akdmin/lib/acess.php
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
$group['region'] = 'rnews';
|
||||
?>
|
||||
2374
vendor/akdelf/akdmin/lib/akdmin.php
vendored
Normal file
1910
vendor/akdelf/akdmin/lib/akdmin_10_07_14.php
vendored
Normal file
2114
vendor/akdelf/akdmin/lib/akdmin_12.php
vendored
Normal file
2144
vendor/akdelf/akdmin/lib/akdmin_19_02_18.php
vendored
Normal file
106
vendor/akdelf/akdmin/lib/akdmin_2.php
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
require('fAKdb.php');
|
||||
|
||||
class AKdmin {
|
||||
|
||||
private $main = array(); # главные настройки
|
||||
private $order = null; # текущие параметры сортировки
|
||||
private $limit = 15; # текущее кол-во элементов в таблице
|
||||
private $select = array(); #список полей которые участвуют в запросе
|
||||
|
||||
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#фильтр xss уязвимостей
|
||||
function xss($value) {
|
||||
$value = htmlentities($value, ENT_QUOTES, 'UTF-8');
|
||||
$value = htmlspecialchars($value);
|
||||
$value = strip_tags($value);
|
||||
$value = stripslashes ($value);
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
||||
#входящие параметры
|
||||
function gets() {
|
||||
|
||||
$map = $this->gparam('ad', ''); # текущая схема
|
||||
if ($map == '')
|
||||
$this->erexit();
|
||||
else
|
||||
$this->map = $map;
|
||||
|
||||
$this->limit = $this->gparam('l', 15, 'int'); # кол-во записей на старнице
|
||||
$this->order = $this->gparam('ord', ''); # текущая сортировка
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
# обработка входящего параметра
|
||||
function gparam($name, $default = null, $type = 'str') {
|
||||
|
||||
if (isset($_GET[$name])) {
|
||||
$value = $_GET[$name];
|
||||
if ($type == 'str')
|
||||
return $this->xss($value);
|
||||
elseif($type == 'int')
|
||||
return (int)$value;
|
||||
}
|
||||
else
|
||||
return $default;
|
||||
}
|
||||
|
||||
# загружаем модель
|
||||
function load($map) {
|
||||
|
||||
$f_xml = site_fold_ad.'xml/'. $map.'.xml';
|
||||
|
||||
if (!file_exists($f_xml)){
|
||||
echo('not found shema');
|
||||
exit;
|
||||
}
|
||||
|
||||
return simplexml_load_file($f_xml);
|
||||
|
||||
}
|
||||
|
||||
|
||||
# иницилиазция главных настроек схемы
|
||||
function mainitems() {
|
||||
|
||||
foreach ($xml->xpath('/items/main') as $key => $mainitem) {
|
||||
$this->main[$key];
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
# получаем все записи текущей таблицы
|
||||
function list() {
|
||||
|
||||
$maintable = Table($this->main('table')); # формируем запрос к таблице
|
||||
$maintable->order($this->order); # текущая сортировка
|
||||
$maintable->limit($this->limit); # количество записей
|
||||
|
||||
|
||||
}
|
||||
|
||||
#выход с критической ошибкой
|
||||
function erexit($errstr){
|
||||
echo $errstr;
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
2014
vendor/akdelf/akdmin/lib/akdmin_5_02_15.php
vendored
Normal file
1984
vendor/akdelf/akdmin/lib/akdmin_5_14.php
vendored
Normal file
2143
vendor/akdelf/akdmin/lib/akdmin_an.php
vendored
Normal file
2001
vendor/akdelf/akdmin/lib/akdmin_old.php
vendored
Normal file
47
vendor/akdelf/akdmin/lib/auth.lib.php
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<? class auth
|
||||
{
|
||||
|
||||
var $suser = 'Auth_User';
|
||||
var $spw = 'Auth_PSWRD';
|
||||
|
||||
|
||||
function action()
|
||||
{
|
||||
if(!$this->check()) $this->authorized();
|
||||
|
||||
}
|
||||
|
||||
//вызываем автороизацию
|
||||
function authorized()
|
||||
{
|
||||
header('WWW-Authenticate: Basic realm="Argumenti: authorized"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
header('status: 401 Unauthorized');
|
||||
echo 'нет доступа';
|
||||
exit();
|
||||
/*http://loginassword@www.domain.ru/page.php*/
|
||||
}
|
||||
|
||||
//проверяем данные
|
||||
function check()
|
||||
{
|
||||
|
||||
if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']))
|
||||
return False;
|
||||
|
||||
return True;
|
||||
|
||||
}
|
||||
|
||||
function save()
|
||||
{
|
||||
$_SESSION['Auth_User'] = $_SERVER['PHP_AUTH_USER'];
|
||||
$_SESSION['Auth_PSWRD'] = $_SESSION['Auth_PSWRD'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
64
vendor/akdelf/akdmin/lib/create.php
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
if (!isset($argv[1]))
|
||||
exit;
|
||||
|
||||
$table = $argv[1];
|
||||
|
||||
|
||||
require_once ('../config/ini.php');
|
||||
|
||||
|
||||
$result = mysql_query('SHOW COLUMNS FROM '.$table);
|
||||
|
||||
if (mysql_num_rows($result) == 0) exit;
|
||||
|
||||
|
||||
while ($row = mysql_fetch_assoc($result)) {
|
||||
$xml .= " <item>\n";
|
||||
$xml .= " <column>".$row['Field']."</column>\n
|
||||
<title>".$row['Field']."</title>\n";
|
||||
if ($row['Extra'] == 'auto_increment')
|
||||
$xml .= " <type>increment</type>\n";
|
||||
elseif ($row['Type'] == 'tinyint(1)')
|
||||
$xml .= " <type>checkbox</type>\n";
|
||||
elseif ($row['Type'] == 'varchar(4)')
|
||||
$xml .= " <type>file</type>\n";
|
||||
elseif ($row['Type'] == 'text')
|
||||
$xml .= " <type>textareatiny</type>\n";
|
||||
elseif ($row['Type'] == 'datetime')
|
||||
$xml .= " <type>datetime</type>\n";
|
||||
else
|
||||
$xml .= " <type>text</type>\n";
|
||||
|
||||
$xml .= " <view>\n";
|
||||
$xml .= " <table>True</table>\n";
|
||||
if ($row['Extra'] == 'auto_increment'){
|
||||
$xml .= " <form>False</form>\n";
|
||||
$increment = $row['Field'];
|
||||
}
|
||||
else
|
||||
$xml .= " <form>True</form>\n";
|
||||
|
||||
$xml .= " </view>\n";
|
||||
$xml .= " </item>\n";
|
||||
}
|
||||
|
||||
|
||||
$xml = '<?xml version="1.0" encoding="UTF8"?>'."\n".
|
||||
'<items>
|
||||
<main>
|
||||
<table>'.$table.'</table>
|
||||
<order>'.$increment.'</order>
|
||||
<order_type>DESC</order_type>
|
||||
<increment>'.$increment.'</increment>
|
||||
<title>'.$table.'</title>
|
||||
</main>'."\n".$xml.'</items>';
|
||||
|
||||
$xfile = site_fold_ad.'xml/'.$table.'.xml';
|
||||
echo $xfile;
|
||||
$file = fopen($xfile,'w');
|
||||
fwrite($file, $xml);
|
||||
fclose($file);
|
||||
|
||||
77
vendor/akdelf/akdmin/lib/day_and_week.php
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
<?
|
||||
|
||||
function monthName($nmonth)
|
||||
{
|
||||
$mese[1]="января";
|
||||
$mese[2]="февраля";
|
||||
$mese[3]="марта";
|
||||
$mese[4]="апреля";
|
||||
$mese[5]="мая";
|
||||
$mese[6]="июня";
|
||||
$mese[7]="июля";
|
||||
$mese[8]="августа";
|
||||
$mese[9]="сентября";
|
||||
$mese[10]="октября";
|
||||
$mese[11]="ноября";
|
||||
$mese[12]="декабря";
|
||||
|
||||
$mes1 = (int)$nmonth;
|
||||
if ($mes1 != 0)
|
||||
return $mese[$mes1];
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function AddNull($num)
|
||||
{
|
||||
if ((int)$num < 10)
|
||||
return '0'.$num;
|
||||
else
|
||||
return $num;
|
||||
}
|
||||
|
||||
function weekName($nweek)
|
||||
{
|
||||
|
||||
$giorno[0]="Воскресенье";
|
||||
$giorno[1]="Понедельник";
|
||||
$giorno[2]="Вторник";
|
||||
$giorno[3]="Среда";
|
||||
$giorno[4]="Четверг";
|
||||
$giorno[5]="Пятница";
|
||||
$giorno[6]="Суббота";
|
||||
|
||||
return $giorno[$nweek];
|
||||
}
|
||||
|
||||
function DateNotNull($dd)
|
||||
{
|
||||
$d1 = (int)$dd;
|
||||
return (string)$d1;
|
||||
|
||||
}
|
||||
|
||||
//преобразование даты в формат RFC 822
|
||||
function DateToRFC822($date)
|
||||
{
|
||||
$datatime = explode(" ",$date); //Вместо date() результат из базы
|
||||
$dater = explode("-",$datatime[0]);
|
||||
$timer = explode(":",$datatime[1]);
|
||||
|
||||
return date('r', mktime($timer[0], $timer[1], $timer[2], $dater[1], $dater[2], $dater[0]));
|
||||
|
||||
}
|
||||
|
||||
|
||||
function DateToStr($date)
|
||||
{
|
||||
|
||||
$begin_date = explode('-',$date);
|
||||
return DateNotNull($begin_date[2]).' '.monthName(DateNotNull($begin_date[1])).' '. $begin_date[0];
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
36
vendor/akdelf/akdmin/lib/deletefile.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<? header("Content-Type: text/html;charset=windows-1251");
|
||||
session_start();
|
||||
|
||||
//0 - файла нет
|
||||
//1 - файл удален
|
||||
//2 - невозможно удалить файл
|
||||
|
||||
if (isset($_GET['file']))
|
||||
$file = $_SERVER['DOCUMENT_ROOT'].'/'.strip_tags($_GET['file']);
|
||||
if (isset($_GET['id']))
|
||||
$id = $_GET['id'];
|
||||
|
||||
if (isset($_GET['column']))
|
||||
$column = $_GET['column'];
|
||||
|
||||
if(file_exists($file)) {
|
||||
if (unlink($file)){
|
||||
$message = 'файл удален!';
|
||||
$status = 1;
|
||||
}
|
||||
else
|
||||
$status = 2;
|
||||
}
|
||||
else{
|
||||
$message = 'файл не существует!';
|
||||
$status = 0;
|
||||
}
|
||||
|
||||
|
||||
if ($status == 2){
|
||||
echo('<INPUT TYPE = "button" VALUE = "Удалить файл" onClick = "'."sendRequest('".site_ad."/deletefile?file=".$file."&id=".$id."', 'fl".$id."', getRequest);".'" /> <i>файл не удален!</i>');
|
||||
}
|
||||
else
|
||||
echo '<i>'.$message.'</i><INPUT NAME = "DFile_'.$column.'" TYPE = "hidden" VALUE = "'.$status.'">'
|
||||
|
||||
?>
|
||||
71
vendor/akdelf/akdmin/lib/file.php
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
//сохранить файл
|
||||
function save($filename, $content, $mode = null)
|
||||
{
|
||||
|
||||
$dir = dirname($filename);
|
||||
|
||||
if (!is_dir($dir))
|
||||
mkdir($dir, 0777, True);
|
||||
|
||||
|
||||
$file = fopen($filename,'w');
|
||||
if ($file) {
|
||||
|
||||
flock($file, LOCK_EX);
|
||||
if (fwrite($file, $content))
|
||||
$result = True;
|
||||
else
|
||||
$result = False;
|
||||
flock($file, LOCK_UN);
|
||||
fclose($file);
|
||||
if ($mode) // права доступа
|
||||
chmod($filename, '0'.$mode);
|
||||
}
|
||||
else
|
||||
$result = False;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//рубим директорию вместе с файлом
|
||||
function full_del_dir ($directory)
|
||||
{
|
||||
|
||||
if (!is_dir($directory)) exit;
|
||||
|
||||
$dir = opendir($directory);
|
||||
while(($file = readdir($dir))){
|
||||
if ( is_file ($directory."/".$file))
|
||||
{
|
||||
unlink ($directory."/".$file);
|
||||
}
|
||||
else if ( is_dir ($directory."/".$file) &&
|
||||
($file != ".") && ($file != ".."))
|
||||
{
|
||||
full_del_dir ($directory."/".$file);
|
||||
}
|
||||
}
|
||||
closedir ($dir);
|
||||
rmdir ($directory);
|
||||
}
|
||||
|
||||
|
||||
function crdir($dir)
|
||||
{
|
||||
//создаем каталог
|
||||
if (!is_dir($dir)){
|
||||
if (!mkdir($dir, 0775, True)) {
|
||||
echo('Невозможно создать каталог'.$dir.'!');
|
||||
return False;
|
||||
}
|
||||
else
|
||||
return True;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
?>
|
||||
831
vendor/akdelf/akdmin/lib/filter.php
vendored
Normal file
@@ -0,0 +1,831 @@
|
||||
<?php
|
||||
|
||||
|
||||
require_once ('utf8_ents.php');
|
||||
|
||||
|
||||
function filter($text)
|
||||
{
|
||||
$result = new filter($text);
|
||||
return $result;
|
||||
}
|
||||
|
||||
class filter
|
||||
{
|
||||
|
||||
const TAGBEGIN = "\x01"; // признак начала тега
|
||||
const TAGEND = "\x02"; // признак конца тега
|
||||
|
||||
const NOBRSPACE = "\x03";
|
||||
const NOBRHYPHEN = "\x04";
|
||||
const THINSP = "\x05";
|
||||
const DASH = "\x06";
|
||||
const NUMDASH = "\x07";
|
||||
|
||||
const PUNCT = '\.|,|\!|\?|…|;|\:'; // знаки пунктуации
|
||||
const SPACE = '\ |\s'; //все пустые символы
|
||||
|
||||
const TEXTSPACE = ' | |\t';
|
||||
|
||||
const PARAGRAF = "\n[\r]?";
|
||||
|
||||
const TAGALL = '</?[a-z]+[^>]*?>'; //цепочка всевозможных тегов
|
||||
|
||||
|
||||
|
||||
//экранирование тегов
|
||||
var $refs = array();
|
||||
var $refscntr = 0;
|
||||
|
||||
var $tags = '';
|
||||
var $text = '';
|
||||
|
||||
|
||||
function __construct($text = '')
|
||||
{
|
||||
$this->text = $text;
|
||||
}
|
||||
|
||||
|
||||
function source($text)
|
||||
{
|
||||
$this->text = trim($text);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
function __toString()
|
||||
{
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
|
||||
//преобразовываем теги
|
||||
private function putTag($x)
|
||||
{
|
||||
$this->refs[] = $x[0];
|
||||
return filter::TAGBEGIN.($this->refscntr++).filter::TAGEND;
|
||||
}
|
||||
|
||||
//возвращаем теги на место
|
||||
private function getTag($x)
|
||||
{
|
||||
return $this->refs[$x[1]];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//преобразовываем теги
|
||||
private function putTag1($x)
|
||||
{
|
||||
$this->refs[] = $x[0];
|
||||
return filter::TAGBEGIN;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private function retag($replace)
|
||||
{
|
||||
|
||||
if ($replace) //вырезаем теги
|
||||
$this->text = preg_replace_callback('/<(?:[^\'"\>]+|".*?"|\'.*?\')+>/s', array($this, 'putTag'), $this->text);
|
||||
else {
|
||||
$revers = '/'.filter::TAGBEGIN.'(\d+)'.filter::TAGEND.'/';
|
||||
|
||||
while(preg_match($revers, $this->text)) {
|
||||
$this->text = preg_replace_callback($revers, array($this, 'getTag'), $this->text);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
function html()
|
||||
{
|
||||
//вырезаем все теги
|
||||
$this->retag(True);
|
||||
|
||||
|
||||
//замена на кавычки-елочки
|
||||
$this->quotes();
|
||||
|
||||
//возвращаем
|
||||
$this->retag(False);
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//получаем короткий текст с учетом абзацев, в случае неудачи возвращаем null
|
||||
function short($len)
|
||||
{
|
||||
|
||||
if ($len >= mb_strlen($this->text))
|
||||
return null;
|
||||
|
||||
|
||||
//$this->entity('text'); //преобразовываем сущности
|
||||
|
||||
$nn = 0; //текущий сивол кода
|
||||
$currlen = 0; //текущий символ текста
|
||||
$op_tag = False;
|
||||
|
||||
$nn = 0;
|
||||
while ($currlen < $len) { //находим символ для обреза
|
||||
$s = mb_substr($this->text, $nn , 1);
|
||||
$nn ++; //текущий символ
|
||||
if ($s=='<') {//открытый тег
|
||||
if($op_tag) //это был не тег
|
||||
$currlen = $nn;
|
||||
$op_tag = True;
|
||||
}
|
||||
else if ($s == '>') //закрытие тега {
|
||||
$op_tag = False;
|
||||
else {
|
||||
if (!$op_tag)
|
||||
$currlen ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$tags = array('</p>', '<br />', '<br>', '</pre>'); //теги окончания абзаца
|
||||
|
||||
$currend = null;
|
||||
|
||||
$van_str = mb_substr($this->text, 0, $nn); // начало текста
|
||||
$obrezok = mb_substr($this->text, $nn); //вторая часть
|
||||
$len_obrezok = mb_strlen($obrezok); //кол-во символов после последнего символа
|
||||
$currend = $len_obrezok;
|
||||
|
||||
foreach ($tags as $tag) { //ищем признак окончания абзаца
|
||||
$tag_pos = strpos($obrezok, $tag);
|
||||
if ($tag_pos > 0 and $currend > $tag_pos) { //выбираем самый близкий закрывающий тег
|
||||
$currend = $tag_pos; //позиция тега
|
||||
$taglen = mb_strlen($tag); //размер тега
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if ($currend < $len_obrezok) {
|
||||
$endpos = $currend + $taglen; //узнаем последний символ с закрывающим тегом
|
||||
if ($endpos == $len_obrezok)
|
||||
return null;
|
||||
return $van_str.mb_substr($obrezok, 0, $endpos); //получаем обрезанный текст
|
||||
}
|
||||
else
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//корректный перевод строки
|
||||
private function correct_return()
|
||||
{
|
||||
|
||||
if (strtoupper(substr(PHP_OS,0,3)) === 'WIN')
|
||||
$this->correct_return = "\r\n"; // перевод строки для Windows-систем
|
||||
else
|
||||
$this->correct_return = "\n"; // перевод строки для UNIX-систем
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function text($entity = 'text')
|
||||
{
|
||||
|
||||
$this->entity('cp1251');
|
||||
$this->html2text();
|
||||
$this->space_text(); # убиваем лишние пробелы
|
||||
$this->special(); # спецзнаки
|
||||
//$this->text_edit();
|
||||
|
||||
if ($entity = 'text')
|
||||
return $this;
|
||||
else if ($entity = 'xml')
|
||||
$this->entity('xml');
|
||||
else if ($entity = 'html')
|
||||
$this->entity('html');
|
||||
|
||||
$this->html2text();
|
||||
$this->space_text(); # убиваем лишние пробелы
|
||||
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function xml()
|
||||
{
|
||||
|
||||
$this->strip_bak_tag(); # лишние и вредоносные теги
|
||||
$this->clean();//убиваем стайлы
|
||||
$this->space(); # убиваем лишние пробелы
|
||||
$this->space_text();
|
||||
$this->special(); # спецзнаки
|
||||
$this->html_edit();
|
||||
$this->entity('cp1251');
|
||||
//$this->text_edit();
|
||||
$this->xmltags(); # оставляем тока разрешенные теги
|
||||
$this->retag(True); # выкусываем теги
|
||||
$this->entity('xml'); # преобразовываем сущности не затрагивая теги
|
||||
$this->retag(False); # теги обратно
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function plaintext()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function html2()
|
||||
{
|
||||
|
||||
$this->space(); # убиваем лишние пробелы
|
||||
$this->strip_bak_tag(); # лишние и вредоносные теги
|
||||
$this->clean();//убиваем стайлы
|
||||
$this->special(); # спецзнаки
|
||||
$this->html_edit();
|
||||
$this->entity('cp1251');
|
||||
//$this->text_edit();
|
||||
$this->retag(True); # выкусываем теги
|
||||
$this->entity('html'); # преобразовываем сущности не затрагивая теги
|
||||
$this->retag(False); # теги обратно
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function entity_tiny()
|
||||
{
|
||||
|
||||
//удаление html-комментариев
|
||||
$this->text = preg_replace('/<!--.*-->/Uis', '', $this->text);
|
||||
|
||||
$this->retag(True); # выкусываем теги
|
||||
$this->entity('html'); # преобразовываем сущности не затрагивая теги
|
||||
$this->retag(False); # теги обратно
|
||||
|
||||
return $this->text;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#отделяем аперанд от сущностей
|
||||
function entity_amp()
|
||||
{
|
||||
$this->text = preg_replace('"/\&(?![^&][^;]+;)/u"', '&', $this->text);
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//преобразовываемсущности в рамках HTML
|
||||
function entity($type, $amp = False)
|
||||
{
|
||||
|
||||
if ($type == 'cp1251') {
|
||||
$this->text = utf8_html_entity_decode($this->text);
|
||||
}
|
||||
else if($type == 'html'){
|
||||
$this->entity_amp(); //экранируем аперанд от сущностей
|
||||
$this->text = utf8_html_entity_encode($this->text);
|
||||
}
|
||||
else if($type == 'xml') {
|
||||
|
||||
$this->text = utf8_html_entity_decode($this->text, True);
|
||||
|
||||
//с аперандом
|
||||
$xmlentsamp = array(
|
||||
"\x26"=>'&',
|
||||
"\x22"=>'&quot;',
|
||||
"\x3c"=>'&lt;',
|
||||
"\x3e"=>'&gt;',
|
||||
' '=>'&#160;'
|
||||
);
|
||||
|
||||
//без аперанда
|
||||
$xmlents = array(
|
||||
"\x26"=>'&',
|
||||
"\x22"=>'"',
|
||||
"\x3c"=>'<',
|
||||
"\x3e"=>'>',
|
||||
' '=>' '
|
||||
);
|
||||
|
||||
|
||||
if ($amp) {
|
||||
foreach ($xmlentsamp as $key=>$element)
|
||||
$this->text = str_replace($key, $element, $this->text);
|
||||
}
|
||||
else { // без аперанда
|
||||
foreach ($xmlents as $key=>$element)
|
||||
$this->text = str_replace($key, $element, $this->text);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//преобразовываем p в ик
|
||||
function p2br($col = 1)
|
||||
{
|
||||
|
||||
$br = '<br />';
|
||||
|
||||
if ($col == 1)
|
||||
$r = $br;
|
||||
else {
|
||||
for ($i = 1; $i <= $col; $i++)
|
||||
$r .= $br;
|
||||
}
|
||||
|
||||
$this->text = preg_replace("!<p[^>]*?>(.*?)</p>!si","\\1".$r, $this->text);
|
||||
//плохие теги
|
||||
$this->text = preg_replace("'</?p[^>]*?>'",$r, $this->text);
|
||||
|
||||
//брейки в начале
|
||||
$this->text = preg_replace("'^(<br[^>]*>)+'",'', $this->text);
|
||||
|
||||
//брейки в конце
|
||||
$this->text = preg_replace("'(<br[^>]*>)+$'",'', $this->text);
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function delete_gap_tag()
|
||||
{
|
||||
$this->text = preg_replace_callback('/(<s*/*s*)([a-z]+)(s*>)/im', create_function('$tag', 'return preg_replace("/s/i", "", $tag[0]);'), $this->CONTENT[$this->id]);
|
||||
|
||||
return $this->text;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function preg_rec($preg, $repl)
|
||||
{
|
||||
while (preg_match($preg, $this->text))
|
||||
$this->text = preg_replace($preg, $repl, $this->text);
|
||||
|
||||
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
function text2p($type = 'p') {
|
||||
|
||||
$currtext = '<p>'.$this->text;
|
||||
|
||||
$txtlen = strlen($currtext) - 1;
|
||||
|
||||
$p_open = True; //открыт ли тег
|
||||
$pos = 0;
|
||||
|
||||
while ($pos !== False) {
|
||||
|
||||
$pos = strpos($currtext, chr(13).chr(10), $pos);
|
||||
|
||||
if ($pos !== False) {
|
||||
$rep_pos = $pos;
|
||||
$pos = $pos + 2;
|
||||
if ($txtlen == $pos) {
|
||||
$rep_simbol = '</p>';
|
||||
$p_open = False;
|
||||
}
|
||||
else {
|
||||
$rep_simbol = '</p><p>';
|
||||
$p_open = True;
|
||||
}
|
||||
$currtext = substr_replace($currtext, $rep_simbol, $rep_pos, 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($p_open)
|
||||
$currtext = $currtext.'</p>';
|
||||
|
||||
$this->text = $currtext;
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function space_text()
|
||||
{
|
||||
|
||||
// Убираем лишние пустые символы
|
||||
$this->text = preg_replace( '"('.filter::TEXTSPACE.')+"', ' ', $this->text );
|
||||
|
||||
//пустые символы в начале строки
|
||||
$this->text = preg_replace('"^('.filter::TEXTSPACE.')+"', '',$this->text);
|
||||
|
||||
//пустые символы в конце строки
|
||||
$this->text = preg_replace('"('.filter::TEXTSPACE.')+$"', '',$this->text);
|
||||
$this->text = preg_replace('/['.filter::TEXTSPACE.']+('.filter::PARAGRAF.')/', '\\1', $this->text);
|
||||
$this->text = preg_replace('/('.filter::PARAGRAF.')['.filter::TEXTSPACE.']+$/', '\\1', $this->text);
|
||||
$this->text = preg_replace('/['.filter::TEXTSPACE.']+('.filter::PARAGRAF.')/', "\\1", $this->text);
|
||||
$this->text = preg_replace('/('.filter::PARAGRAF.')['.filter::TEXTSPACE.']+/', "\\1", $this->text);
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function space()
|
||||
{
|
||||
|
||||
|
||||
|
||||
$nospace_tags = 'span|b|strong|i|em|a'; //теги с нежелетаелтельными начальными и конечными пробелами
|
||||
|
||||
|
||||
// кон. и нач. пробелы за пределы тега
|
||||
$this->text = preg_replace( '!(<('.$nospace_tags.')[^>]*?>)(('.filter::SPACE.')+)!si', '\\3\\1', $this->text );
|
||||
$this->text = preg_replace( '!(('.filter::SPACE.')+)(</('.$nospace_tags.')>)!si', '\\3\\1', $this->text );
|
||||
|
||||
//пробелы в начале цепочки тегов
|
||||
$this->text = $this->preg_rec('!^(('.filter::TAGALL.')+)('.filter::SPACE.')+!si', '\\1', $this->text);
|
||||
|
||||
//пробелы в конце цепочки тегов
|
||||
$this->text = $this->preg_rec('!('.filter::SPACE.')+(('.filter::TAGALL.')+)$!si', '\\2', $this->text);
|
||||
|
||||
|
||||
# ------------------- парагарфы и абазцы --------------------------------------------------------------------
|
||||
|
||||
$paragraph = 'p|pre|h1|h2|h3|h4|h5|h6|address|blockquote|center|li';
|
||||
|
||||
//бессмысленные пробелы перед br
|
||||
$this->text = preg_replace('!('.filter::SPACE.')+(<br ?/?>)!si', '\\2', $this->text);
|
||||
|
||||
//бессмысленные пробелы после br
|
||||
$this->text = preg_replace('!(<br ?/?>)('.filter::SPACE.')+!si', '\\1', $this->text);
|
||||
|
||||
|
||||
//бессмысленные пробелы перед параграфом
|
||||
$this->text = preg_replace('!('.filter::SPACE.')+(<'.$paragraph.'[^>]*?>)!si', '\\2', $this->text);
|
||||
|
||||
|
||||
//бессмысленные пробелы после параграфа
|
||||
$this->text = preg_replace('!(<\/('.$paragraph.')>)('.filter::SPACE.')+!si', '\\1', $this->text);
|
||||
|
||||
//бессмысленные пробелы в начале параграфа
|
||||
$this->text = preg_replace('!(<('.$paragraph.')[^>]*?>)('.filter::SPACE.')+!si', '\\1', $this->text);
|
||||
|
||||
//пробелы в конце параграфа
|
||||
$this->text = preg_replace('!<('.$paragraph.')[^>]*?>(.*?)('.filter::SPACE.')+</\\1>!si', '<\\1>\\2</\\1>', $this->text);
|
||||
|
||||
//бессмысленные пробелы в начале параграфа в куче тегов
|
||||
$this->text = $this->preg_rec('!(<('.$paragraph.')[^>]*?>)(('.filter::TAGALL.')+)('.filter::SPACE.')+!si', '\\1\\3', $this->text);
|
||||
|
||||
//бессмысленные пробелы в конце параграфа в куче тегов
|
||||
$this->text = $this->preg_rec('!('.filter::SPACE.')+(('.filter::TAGALL.')+)(</'.$paragraph.'>)!si', '\\2\\3', $this->text);
|
||||
|
||||
|
||||
# ---------- дочищаем хвосты ---------------------------------
|
||||
|
||||
//убиваем пустые теги
|
||||
$this->text = preg_replace('!<([a-z]+)[^>]*?><\/\\1>!si', '', $this->text);
|
||||
|
||||
// Убираем лишние пустые символы
|
||||
$this->text = preg_replace( '/[\s]+/', ' ', $this->text );
|
||||
|
||||
//если попадает
|
||||
$this->text = preg_replace( "'[\s]*(\ )+[\s]*'", ' ', $this->text);
|
||||
|
||||
//удаление начальных пробелов строки
|
||||
$this->text = preg_replace('"^('.filter::SPACE.')+"', '',$this->text);
|
||||
|
||||
//удаление пробелов в конце строки
|
||||
$this->text = preg_replace('"('.filter::SPACE.')+$"', '',$this->text);
|
||||
|
||||
|
||||
return $this->text;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// теги, которые вырезаются вместе с содержимым
|
||||
function strip_bak_tag()
|
||||
{
|
||||
$tags = 'script|style|pre|code|textarea';
|
||||
/* $tags .= 'applet|base|basefont|bgsound|blink|body|embed|frame|frameset|head|ilayer|layer|link|meta|object|title|input|form';*/
|
||||
$this->text = preg_replace('/< *('.$tags.').*?>.*?< *\/ *\1 *>/is', '', $this->text);
|
||||
|
||||
return $this;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function html_edit()
|
||||
{
|
||||
|
||||
//удаление html-комментариев
|
||||
$this->text = preg_replace('/<!--.*-->/Uis', '', $this->text);
|
||||
|
||||
|
||||
//$this->text = preg_replace( "'([а-яА-ЯёЁa-zA-Z]+)-([а-яА-ЯёЁa-zA-Z]+)'", '<nobr>$1-$2</nobr>', $this->text); //не обрывать слова, написанные через дефис
|
||||
|
||||
|
||||
$this->setUrls();//ссылки превращаем в ссылки
|
||||
|
||||
$this->text = preg_replace('"\n[\r]?"', '<br />', $this->text);
|
||||
|
||||
//праивльное обозначение размера
|
||||
$this->text = preg_replace( '~(\d+)[x|X|х|Х|*](\d+)~','$1×$2', $this->text );
|
||||
|
||||
//все за пределы ссылок
|
||||
$this->text = preg_replace( '/<a +href([^>]*)>(['.filter::PUNCT.']+)/', '\\2<a href\\1>', $this->text );
|
||||
$this->text = preg_replace( '/(!\.\.|\?\.\.)<\/a>/', '</a>\\1', $this->text );
|
||||
$this->text = preg_replace( '/(['.filter::PUNCT.']+)<\/a>/', '</a>\\1', $this->text );
|
||||
|
||||
|
||||
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// теги, которые вырезаются вместе с содержимым
|
||||
function replacetag($stags)
|
||||
{
|
||||
$tags = split(',',$stags);
|
||||
$nn = 0;
|
||||
|
||||
foreach ($tags as $tag){
|
||||
$nn++;
|
||||
if($nn > 0) $tg .= '|';
|
||||
$tg .= trim($tag);
|
||||
}
|
||||
|
||||
$this->text = preg_replace('/< *('.$tg.').*?>.*?< *\/ *\1 *>/is', '', $this->text);
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Расстановка кавычек-"елочек"
|
||||
function quotes()
|
||||
{
|
||||
$this->text = preg_replace( '/(['.TAGEND.'\( ]|^)"([^"]*)([^ "\(])"/', '\\1«\\2\\3»', $this->text );
|
||||
if (stristr($this->text, '"' )) // Если есть вложенные кавычки
|
||||
{
|
||||
$text = preg_replace( '/(['.TAGEND.'( ]|^)"([^"]*)([^ "(])"/', '\\1«\\2\\3»', $this->text );
|
||||
while( preg_match( '/«[^»]*«[^»]*»/', $this->text ) )
|
||||
$text = preg_replace( '/«([^»]*)«([^»]*)»/', '«\\1„\\2“', $this->text);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function text_edit()
|
||||
{
|
||||
|
||||
|
||||
$this->text = str_replace( '',' ', $this->text ); //косяки верстки
|
||||
$this->text = str_replace( '',' ', $this->text );
|
||||
|
||||
$this->text = preg_replace('[^:print:]', '',$this->text); //вырезаем непечатные символы
|
||||
|
||||
|
||||
|
||||
$this->quotes();
|
||||
|
||||
|
||||
//знаки припинания
|
||||
//$this->text = preg_replace('"'.filter::PUNCT.'?('.filter::PUNCT.')"','\\1', $this->text );
|
||||
// $this->text = preg_replace('"(\w+)['.filter::PUNCT.'](\w+)"','\\1, \\2', $this->text);
|
||||
|
||||
|
||||
|
||||
//$this->text = $this->specialchars(0); //замены сущностей
|
||||
|
||||
//работа с текстом
|
||||
|
||||
$this->text = preg_replace( "'\.{3}'", '…', $this->text); //Многоточие
|
||||
|
||||
// $this->text = preg_replace("'\.+'",'.',$this->text); // двойные точки
|
||||
$this->text = preg_replace("'\,+'",',',$this->text); // двойные запятые
|
||||
$this->text = preg_replace("'\;+'",';',$this->text); // двойные ;
|
||||
$this->text = preg_replace("'\:+'",':',$this->text); // двойные :
|
||||
$this->text = preg_replace( "' +'", ' ', $this->text); // Убираем лишние пробелы
|
||||
$this->text = preg_replace( "'\t+'", ' ', $this->text); // Убираем лишние табуляторы
|
||||
|
||||
$this->text = str_replace( ','.NOBRSPACE.DASH.' ',','.DASH.' ', $this->text );
|
||||
$this->text = str_replace( '.'.NOBRSPACE.DASH.' ','.'.DASH.' ', $this->text );
|
||||
|
||||
|
||||
// пробелы
|
||||
$this->text = preg_replace( '/\( *([^)]+?) *\)/', '(\\1)', $this->text ); // удаляем пробелы после открывающей скобки и перед закрыващей скобкой
|
||||
$this->text = preg_replace( '/([а-яА-ЯёЁa-zA-Z.,!?:;…])\(/', '\\1 (', $this->text ); // добавляем пробел между словом и открывающей скобкой, если его
|
||||
|
||||
|
||||
// Русские денежные суммы, расставляя пробелы в нужных местах.
|
||||
$this->text = preg_replace( '~(\d+)\s?(руб.)~s','$1 $2', $this->text );
|
||||
$this->text = preg_replace( '~(\d+)\s?(млн.|тыс.){1}\s?(руб.)~s','$1 $2 $3', $this->text );
|
||||
|
||||
|
||||
//неразрывать
|
||||
$this->text = preg_replace( "'(\w\.)\s?(\w\.)\s(\w\w+)'", '$1 $2 $3', $this->text ); // Инициалы + фамилия
|
||||
$this->text = preg_replace( "'(\w\w+)\s?(\w\.)\s(\w\.)'", '$1 $2 $3', $this->text ); // фамилия + инициалы
|
||||
$this->text = preg_replace("'(\W\w\.)\s(\w\w+)'",'$1 $2',$this->text); //один инициал + фамилия
|
||||
|
||||
//последние обработки
|
||||
$this->text = str_replace( '!?','?!', $this->text ); // Правильно в таком порядке
|
||||
$this->text = str_replace( '№ №', '№№', $this->text ); // слитное написание "№№"
|
||||
$this->text = str_replace( '§ §', '§§', $this->text ); // слитное написание "§§"
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function strip($tags)
|
||||
{
|
||||
$this->text = preg_replace("!<р[^>]*?>!si",'',$this->text);
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
function replace_tag($t1, $t2)
|
||||
{
|
||||
|
||||
$this->text = preg_replace("!<".$t1."[^>]*?>(.*?)</".$t1.">!usi","<".$t2.">\\1</".$t2.">",$this->text);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// замена обилие тегов на разрешенные в xml или свои
|
||||
function xmltags()
|
||||
{
|
||||
|
||||
$this->replace_tag('div','p');
|
||||
$this->replace_tag('strong','b');
|
||||
$this->replace_tag('em','i');
|
||||
|
||||
|
||||
$this->text = strip_tags($this->text, '<p>, <br>, <li>, <table>, <tr>, <td>, <ol>, <ul>, <i>, <b>, <iframe>');
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//превращаем в ссылки
|
||||
private function setUrls()
|
||||
{
|
||||
|
||||
$prefix='(http|https|ftp|telnet|news|gopher|file|wais)://';
|
||||
$pureUrl='([[:alnum:]/\n+-=%&:_.~?]+[#[:alnum:]+]*)';
|
||||
$this->text=eregi_replace($prefix.$pureUrl, '<a href="\\1://\\2">\\1://\\2</a>', $this->text);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
//спецсимволика
|
||||
function special($revers = True)
|
||||
{
|
||||
|
||||
$special = array(
|
||||
'(tm)'=>'™', '(TM)'=>'™',
|
||||
'(r)'=>'®', '(R)'=>'®',
|
||||
'(c)'=>'©', '(C)'=>'©', '(с)'=>'©', '(С)'=>'©',
|
||||
'EUR'=>'€', 'eur'=>'€',
|
||||
'+/-'=>'±');
|
||||
|
||||
if ($revers) // на спецзнаки
|
||||
$this->text = strtr($this->text, $special);
|
||||
else //на обычные
|
||||
$this->text = strtr($this->text, array_flip($special));
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//очищаем теги от стилей идов и классов
|
||||
function clean()
|
||||
{
|
||||
|
||||
$this->text = preg_replace('!<([a-z]+)[\s]+[^>]*?>!si','<\\1>', $this->text);
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function html2text($plain = False)
|
||||
{
|
||||
|
||||
$this->text = strip_tags($this->text);
|
||||
$this->text = trim($this->text);
|
||||
return $this;
|
||||
|
||||
//$params['wrap'] = 20, $params['br'] = 2;
|
||||
|
||||
//преобразования абзацев
|
||||
$para_repl = ($plain) ? "\n\n\t" : "\n\n";
|
||||
$this->text = preg_replace('/<p[^>]*>/ui',$para_repl , $this->text);
|
||||
|
||||
|
||||
$this->text = preg_replace('/<br[^>]*>/ui', "\n", $this->text);
|
||||
|
||||
$this->text = preg_replace('/<hr[^>]*>/ui',"\n-------------------------\n", $this->text);
|
||||
|
||||
//заголовки
|
||||
if ($plain){
|
||||
$this->text = preg_replace('/<h[123][^>]*>(.*?)<\/h[123]>/uie', "strtoupper(\"\n\n\\1\n\n\")", $this->text);
|
||||
$this->text = preg_replace('/<h[456][^>]*>(.*?)<\/h[456]>/uie', "ucwords(\"\n\n\\1\n\n\")", $this->text);
|
||||
}
|
||||
else
|
||||
$this->text = preg_replace('/<h[123456][^>]*>(.*?)<\/h[123456]>/uie', "strtoupper(\"\n\n\\1\n\n\")", $this->text);
|
||||
|
||||
//преобразования таблицы
|
||||
$this->text = preg_replace('/(<table[^>]*>|<\/table>)/ui',"\n\n",$this->text);
|
||||
$this->text = preg_replace('/<thead[^>]*>(.*?)<\/thead>/ui', "\\1\n", $this->text);
|
||||
|
||||
if ($plain)
|
||||
$this->text = preg_replace('/<th[^>]*>(.*?)<\/th>/ui', "strtoupper(\"\t\\1\")", $this->text);
|
||||
else
|
||||
$this->text = preg_replace('/<th[^>]*>(.*?)<\/th>/ui', "\t\\1", $this->text);
|
||||
|
||||
$this->text = preg_replace('/(<tr[^>]*>|<\/tr>)/ui', "\n", $this->text);
|
||||
$this->text = preg_replace('/<td[^>]*>(.*?)<\/td>/ui', "\t\\1", $this->text);
|
||||
|
||||
//списки
|
||||
$this->text = preg_replace('/(<ul[^>]*>|<\/ul>)/ui', "\n\n", $this->text);
|
||||
$this->text = preg_replace('/(<ol[^>]*>|<\/ol>)/iu', "\n\n", $this->text);
|
||||
|
||||
$this->text = preg_replace('/<li[^>]*>(.*?)<\/li>/ui', "\t* \\1\n", $this->text);
|
||||
|
||||
$this->text = preg_replace('/<li[^>]*>/ui', "\n\t* ", $this->text);
|
||||
|
||||
// ссылки
|
||||
$this->text = preg_replace('/<a [^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/uie','\\1',$this->text);
|
||||
|
||||
|
||||
$this->text = trim($this->text);
|
||||
|
||||
|
||||
return $this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
15
vendor/akdelf/akdmin/lib/log.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?function write_log($value, $file = 'log/error.log')
|
||||
{
|
||||
$log = set('site_fold_ad').$file;
|
||||
|
||||
if (file_exists($log))
|
||||
$fp = fopen($log,'a+');
|
||||
else {
|
||||
$fp = fopen($log,'w');
|
||||
chmod($log, 0660);
|
||||
}
|
||||
|
||||
fwrite($fp, '['.date('d.m.y\ H:i:s').'] '.$value.chr(13));
|
||||
fclose($fp);
|
||||
}
|
||||
?>
|
||||
5748
vendor/akdelf/akdmin/lib/pclzip.lib.2.5.php
vendored
Normal file
213
vendor/akdelf/akdmin/lib/photos.php
vendored
Normal file
@@ -0,0 +1,213 @@
|
||||
<?
|
||||
|
||||
function showphotocadr($f, $newF, $type)
|
||||
{
|
||||
// f - имя файла
|
||||
// type - способ масштабирования
|
||||
// q - качество сжатия
|
||||
// src - исходное изображение
|
||||
// dest - результирующее изображение
|
||||
// w - ширниа изображения
|
||||
// ratio - коэффициент пропорциональности
|
||||
// str - текстовая строка
|
||||
|
||||
// тип преобразования, если не указаны размеры
|
||||
if ($type == 's') $w = 120;
|
||||
else if ($type == 'b') $w = 180;
|
||||
else if ($type == 'm') $w = 180;
|
||||
else return false;
|
||||
|
||||
|
||||
// качество jpeg по умолчанию
|
||||
if (!isset($q)) $q = 100;
|
||||
|
||||
|
||||
$src = imagecreatefromjpeg($f);
|
||||
$w_src = imagesx($src);
|
||||
$h_src = imagesy($src);
|
||||
|
||||
// если размер исходного изображения
|
||||
// отличается от требуемого размера
|
||||
if ($w_src != $w)
|
||||
{
|
||||
// операции для получения прямоугольного файла
|
||||
if ($type=='m')
|
||||
{
|
||||
// вычисление пропорц ий
|
||||
$ratio = $w_src/$w;
|
||||
$w_dest = round($w_src/$ratio);
|
||||
$h_dest = round($h_src/$ratio);
|
||||
|
||||
// создаём пустую картинку
|
||||
// важно именно truecolor!, иначе будем иметь 8-битный результат
|
||||
$dest = imagecreatetruecolor($w_dest,$h_dest);
|
||||
imagecopyresampled($dest, $src, 0, 0, 0, 0, $w_dest, $h_dest, $w_src, $h_src);
|
||||
}
|
||||
|
||||
|
||||
// операции для получения квадратного файла
|
||||
if (($type=='s')||($type=='b'))
|
||||
{
|
||||
// создаём пустую квадратную картинку
|
||||
// важно именно truecolor!, иначе будем иметь 8-битный результат
|
||||
$dest = imagecreatetruecolor($w,$w);
|
||||
|
||||
// вырезаем квадратную серединку по x, если фото горизонтальное
|
||||
if ($w_src>$h_src)
|
||||
imagecopyresampled($dest, $src, 0, 0,
|
||||
round((max($w_src,$h_src)-min($w_src,$h_src))/2),
|
||||
0, $w, $w, min($w_src,$h_src), min($w_src,$h_src));
|
||||
|
||||
// вырезаем квадратную верхушку по y,
|
||||
// если фото вертикальное (хотя можно тоже серединку)
|
||||
if ($w_src<$h_src)
|
||||
imagecopyresampled($dest, $src, 0, 0, 0, 0, $w, $w,
|
||||
min($w_src,$h_src), min($w_src,$h_src));
|
||||
|
||||
// квадратная картинка масштабируется без вырезок
|
||||
if ($w_src==$h_src)
|
||||
imagecopyresampled($dest, $src, 0, 0, 0, 0, $w, $w, $w_src, $w_src);
|
||||
}
|
||||
|
||||
// вывод картинки и очистка памяти
|
||||
imagejpeg($dest,$newF,$q);
|
||||
imagedestroy($dest);
|
||||
imagedestroy($src);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function img_resize($src, $dest, $width, $height, $rgb=0xFFFFFF, $quality=100)
|
||||
{
|
||||
// if (!file_exists($src)) return false;
|
||||
|
||||
$size = getimagesize($src);
|
||||
|
||||
if ($size == false) return false;
|
||||
|
||||
// Определяем исходный формат по MIME-информации, предоставленной
|
||||
// функцией getimagesize, и выбираем соответствующую формату
|
||||
// imagecreatefrom-функцию.
|
||||
$format = strtolower(substr($size['mime'], strpos($size['mime'], '/')+1));
|
||||
$icfunc = "imagecreatefrom" . $format;
|
||||
if (!function_exists($icfunc)) return false;
|
||||
|
||||
$x_ratio = $width / $size[0];
|
||||
$y_ratio = $height / $size[1];
|
||||
|
||||
$ratio = min($x_ratio, $y_ratio);
|
||||
$use_x_ratio = ($x_ratio == $ratio);
|
||||
|
||||
$new_width = $use_x_ratio ? $width : floor($size[0] * $ratio);
|
||||
$new_height = !$use_x_ratio ? $height : floor($size[1] * $ratio);
|
||||
$new_left = $use_x_ratio ? 0 : floor(($width - $new_width) / 2);
|
||||
$new_top = !$use_x_ratio ? 0 : floor(($height - $new_height) / 2);
|
||||
|
||||
|
||||
$isrc = $icfunc($src);
|
||||
$idest = imagecreatetruecolor($width, $height);
|
||||
|
||||
imagefill($idest, 0, 0, $rgb);
|
||||
imagecopyresampled($idest, $isrc, $new_left, $new_top, 0, 0, $new_width, $new_height, $size[0], $size[1]);
|
||||
|
||||
// echo($format);
|
||||
imagejpeg($idest,$dest,$quality);
|
||||
imagedestroy($isrc);
|
||||
imagedestroy($idest);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showphoto($publ_id, $number_id, $typeimg)
|
||||
{
|
||||
|
||||
if ($number_id < 54){
|
||||
$Folder = 'big';
|
||||
if ($typeimg == 'b')
|
||||
$typeimg = 's';
|
||||
}
|
||||
else
|
||||
$Folder = 'cashe';
|
||||
|
||||
$search = False;
|
||||
$filename = '';
|
||||
|
||||
if(file_exists(site_fold.'images/'.$Folder.'/'.$publ_id.$typeimg.'.jpg')){
|
||||
//$filename = 'http://www.argumenti.ru/images/'.$Folder.'/'.$publ_id.$typeimg.'.jpg';
|
||||
$filename = site.'images/'.$Folder.'/'.$publ_id.$typeimg.'.jpg';
|
||||
$search = True;
|
||||
}
|
||||
else if (file_exists(site_fold.'images/'.$Folder.'/'.$publ_id.$typeimg.'.JPG')){
|
||||
//$filename = 'http://www.argumenti.ru/images/'.$Folder.'/'.$publ_id.$typeimg.'.jpg';
|
||||
$filename = site.'images/'.$Folder.'/'.$publ_id.$typeimg.'.JPG';
|
||||
$search = True;
|
||||
}
|
||||
else if (file_exists(site_fold.'images/'.$Folder.'/'.$publ_id.$typeimg.'.gif')){
|
||||
// $filename = 'http://www.argumenti.ru/images/'.$Folder.'/'.$publ_id.$typeimg.'.jpg';
|
||||
$filename = site.'images/'.$Folder.'/'.$publ_id.$typeimg.'.gif';
|
||||
$search = True;
|
||||
}
|
||||
else if (file_exists(site_fold.'images/'.$Folder.'/'.$publ_id.$typeimg.'.GIF')){
|
||||
// $filename = 'http://www.argumenti.ru/images/'.$Folder.'/'.$publ_id.$typeimg.'.jpg';
|
||||
$filename = site.'images/'.$Folder.'/'.$publ_id.$typeimg.'.GIF';
|
||||
$search = True;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!$search) {
|
||||
if ($typeimg == 's'){
|
||||
$width = 120;
|
||||
$height = 120;
|
||||
}
|
||||
else if ($typeimg == 'm'){
|
||||
$width = 200;
|
||||
$height = 200;
|
||||
}
|
||||
else if ($typeimg == 'b'){
|
||||
$width = 180;
|
||||
$height = 180;
|
||||
}
|
||||
|
||||
|
||||
if(file_exists(site_fold.'images/news/'.$publ_id.'.jpg')){
|
||||
if (showphotocadr(site_fold.'images/news/'.$publ_id.'.jpg', site_fold.'/images/cashe/'.$publ_id.$typeimg.'.jpg',$typeimg))
|
||||
//$filename = site.'images/cashe/'.$publ_id.$typeimg.'.jpg';
|
||||
$filename = site_fold.'images/cashe/'.$publ_id.$typeimg.'.jpg';
|
||||
}
|
||||
|
||||
if(file_exists(site_fold.'images/news/'.$publ_id.'.JPG')){
|
||||
if (showphotocadr(site_fold.'images/news/'.$publ_id.'.JPG', site_fold.'/images/cashe/'.$publ_id.$typeimg.'.JPG',$typeimg))
|
||||
// $filename = site.'images/cashe/'.$publ_id.$typeimg.'.JPG';
|
||||
$filename = site_fold.'images/cashe/'.$publ_id.$typeimg.'.JPG';
|
||||
}
|
||||
|
||||
if(file_exists(site_fold.'images/news/'.$publ_id.'.JPG')){
|
||||
if (showphotocadr(site_fold.'images/news/'.$publ_id.'.gif', site_fold.'/images/cashe/'.$publ_id.$typeimg.'.gif',$typeimg))
|
||||
//$filename = site.'images/cashe/'.$publ_id.$typeimg.'.gif';
|
||||
$filename = site_fold.'images/cashe/'.$publ_id.$typeimg.'.gif';
|
||||
}
|
||||
|
||||
if(file_exists(site_fold.'images/news/'.$publ_id.'.GIF')){
|
||||
if (showphotocadr(site_fold.'images/news/'.$publ_id.'.GIF', site_fold.'/images/cashe/'.$publ_id.$typeimg.'.GIF',$typeimg))
|
||||
//$filename = site.'images/cashe/'.$publ_id.$typeimg.'.GIF';
|
||||
$filename = site_fold.'images/cashe/'.$publ_id.$typeimg.'.GIF';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $filename;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
32
vendor/akdelf/akdmin/lib/rabbit.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
|
||||
function add_q($table, $id) {
|
||||
|
||||
$fconfig = '/vhosts/adanar.argumenti.ru/config/config.json';
|
||||
|
||||
$set = json_decode(file_get_contents($fconfig), True);
|
||||
$config = $set['rabbit'];
|
||||
|
||||
$data = json_encode(['table' => $table, 'id' => $id]);
|
||||
|
||||
return;
|
||||
|
||||
$rabbit_key = 'adanar_update';
|
||||
|
||||
$rabbit = new AMQPConnection($config);
|
||||
$rabbit->connect();
|
||||
|
||||
$testChannel = new AMQPChannel($rabbit);
|
||||
$testExchange = new AMQPExchange($testChannel);
|
||||
|
||||
$testExchange->setName('amq.direct');
|
||||
|
||||
$data = json_encode(['table' => $table, 'id' => $id]);
|
||||
|
||||
$testExchange->publish($data, $rabbit_key);
|
||||
|
||||
$rabbit->disconnect();
|
||||
|
||||
|
||||
}
|
||||
152
vendor/akdelf/akdmin/lib/table.php
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
|
||||
class ORM {
|
||||
|
||||
|
||||
static $config = array(); //конфиги подключения к базе
|
||||
static $conn = array(); // все подключения
|
||||
|
||||
private $ORM = '';
|
||||
private $conf = 'default';
|
||||
private $filters = array();
|
||||
private $sort = array();
|
||||
private $limit = null;
|
||||
private $columns = '*';
|
||||
|
||||
static function from($ORM, $conf = 'default') {
|
||||
return new ORM($ORM, $conf);
|
||||
}
|
||||
|
||||
|
||||
function __construct($ORM, $conf = 'default'){
|
||||
$this->ORM = $ORM;
|
||||
$this->config = $conf; //текущая конфигурация
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* добавляем конфигурацию подключения к базе
|
||||
*/
|
||||
static function config($name, $host, $user, $pswd){
|
||||
ORM::$config[$name] = array('host'=>$host, 'user'=>$user, 'pswd'=>$pswd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function conn($conf){
|
||||
|
||||
if (!isset(ORM::$conn[$conf])){
|
||||
if (is_array(ORM::$config[$conf])){
|
||||
$config =ORM::$config[$conf];
|
||||
ORM::$conn[$conf] = new mysqli($config['dbhost'], $config['dbuser'],$config['dbpswd'], $config['dbname']);
|
||||
return True;
|
||||
}
|
||||
}
|
||||
|
||||
return False;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* функции добавления
|
||||
*/
|
||||
|
||||
function separ($value){
|
||||
return '`'.$value.'`';
|
||||
}
|
||||
|
||||
function quote($value){
|
||||
return chr(39).$value.chr(39);
|
||||
}
|
||||
|
||||
function add($column){
|
||||
$this->columns[] = $column;
|
||||
return $this;
|
||||
}
|
||||
|
||||
function columns($columns = array()){
|
||||
$this->columns = $columns;
|
||||
return $this;
|
||||
}
|
||||
|
||||
function filter($column, $value, $op ='=', $type = 'AND') {
|
||||
$this->filters[] = array('column'=>$column, 'value'=>$value, 'op'=>$op, 'type'=>$type);
|
||||
return $this;
|
||||
}
|
||||
|
||||
function sort($column, $type = 'ASC') {
|
||||
$this->sort[$column] = $type;
|
||||
return $this;
|
||||
}
|
||||
|
||||
function build(){
|
||||
|
||||
$sql = 'SELECT';
|
||||
|
||||
|
||||
$sql .= ' '.$this->columns.' FROM '.$this->separ($this->ORM);
|
||||
$sql .= $this->build_filters();
|
||||
$sql .= $this->build_sort();
|
||||
|
||||
if ($this->limit !== null)
|
||||
$sql .= 'LIMIT '.$this->limit;
|
||||
|
||||
$sql .= ';';
|
||||
|
||||
return $sql;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function build_filters(){
|
||||
|
||||
$res = '';
|
||||
|
||||
foreach ($this->filters as $filter){
|
||||
|
||||
if ($res !== '')
|
||||
$res .= ' '.$filter['type'].' ';
|
||||
|
||||
$res .= $this->separ($filter['column']).$filter['op'].$this->quote($filter['value']);
|
||||
|
||||
}
|
||||
|
||||
return ' WHERE '.$res;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function build_sort(){
|
||||
|
||||
$res = '';
|
||||
|
||||
foreach ($this->sort as $key => $sort){
|
||||
|
||||
if ($res !== '')
|
||||
$res = ',';
|
||||
|
||||
$res .= $this->separ($key).' '.$sort;
|
||||
}
|
||||
|
||||
return ' ORDER BY '.$res;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function all() {
|
||||
|
||||
$sql = $this->build();
|
||||
$result = $this->query($sql)->fetch();
|
||||
var_dump($result);
|
||||
|
||||
}
|
||||
|
||||
|
||||
static function query($sql){
|
||||
$this->conn();
|
||||
return ORM::$conn[$conf]->query($sql);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
128
vendor/akdelf/akdmin/lib/tipograf.php
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
<?
|
||||
|
||||
error_reporting(E_ERROR);
|
||||
|
||||
|
||||
define('NOBRSPACE', "\x03");
|
||||
define('NOBRHYPHEN', "\x04");
|
||||
define('THINSP', "\x05");
|
||||
define('DASH', "\x06");
|
||||
define('NUMDASH', "\x07");
|
||||
|
||||
|
||||
|
||||
function entity_code($text,$ctype){
|
||||
$htmlents = array(
|
||||
'„'=>'„','‛'=>'“','“'=>'”','‘'=>'‘','’'=>'’',
|
||||
'«'=>'«','»'=>'»','…'=>'…','€'=>'€','‰'=>'‰',
|
||||
'•'=>'•','·'=>'·','–'=>'–','—'=>'—',' '=>' ',
|
||||
'™'=>'™','©'=>'©','®'=>'®','§'=>'§','№'=>'№',
|
||||
'±'=>'±','°'=>'°');
|
||||
|
||||
if (ctype == 0)
|
||||
$text = strtr($text, $htmlents ); // Делаем замены html entity на символы из cp1251
|
||||
else {
|
||||
$text = strtr($text, array_flip($htmlents)); // Делаем замены на html-entity
|
||||
$text = str_replace( '"','"', $text ); // Заменяем " на "
|
||||
$text = str_replace( "'",''', $text ); // Заменяем ' на '
|
||||
}
|
||||
|
||||
return $text;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function tipograf($text, $type, $stylekill)
|
||||
{
|
||||
|
||||
|
||||
//ОБЩИЕ
|
||||
// $text = entity_code($text,0); //замены сущностей
|
||||
// $text = str_replace( ' ',' ', $text);//преобразовываем пробелы
|
||||
$text = trim($text); // начальные и конечные пробелы
|
||||
|
||||
|
||||
//обработка стилистики тегов
|
||||
if ($stylekill) {
|
||||
//работа с тегами
|
||||
$text = preg_replace("!<div[^>]*?>(.*?)</div>!si","<p>\\1</p>",$text);
|
||||
$text = preg_replace("!<strong[^>]*?>(.*?)</strong>!si","<b>\\1</b>",$text);
|
||||
$text = preg_replace("!<em[^>]*?>(.*?)</em>!si","<i>\\1</i>",$text);
|
||||
|
||||
//вырезаем ненужные теги
|
||||
$text = strip_tags($text,"<b><i><p><br><ul><ol><li><img>");
|
||||
}
|
||||
|
||||
|
||||
if ($type == 'tags') {
|
||||
$text = nl2br($text);// разрывы строк на <br />
|
||||
$text = preg_replace( "'<br ?/?>'", '</p><p>', $text ); //преобразуем переносы в параграфы
|
||||
$text = preg_replace("'<p.*?>(.*?)</p>'si","<p>\\1</p>",$text); //убиваем стилистики абзацев
|
||||
$text = preg_replace( "'<p>(.*?)<(.*?)> *</\\2>(.*?)</p>'si", '<p>\\1\\3</p>', $text ); //убиваем пустые вложенные теги
|
||||
$text = preg_replace("'<p> +(.*?)</p>'",'<p> \\1</p>', $text);//пробелы в начале абазца преобразовываем в табуляцию<p>
|
||||
$text = preg_replace("'<p>(.*?) +</p>'",'<p>\\1</p>', $text);//убиваем пробелы в конце <p>
|
||||
$text = preg_replace( "'</p> +<p>'", '</p><p>', $text );//убиваем пробелы между параграфами
|
||||
$text = preg_replace( "'<([a-zA-Z]+)>[ | ]*</\\1>'", '', $text ); //убиваем пустые теги или теги из пробелов
|
||||
}
|
||||
|
||||
|
||||
//работа с текстом
|
||||
$text = preg_replace( "'\.{3}'", '…', $text); //Многоточие
|
||||
// $text = preg_replace("'\.+'",'.',$text); // двойные точки
|
||||
$text = preg_replace("'\,+'",',',$text); // двойные запятые
|
||||
$text = preg_replace("'\;+'",';',$text); // двойные ;
|
||||
$text = preg_replace("'\:+'",':',$text); // двойные :
|
||||
|
||||
$text = preg_replace( "' +'", ' ', $text); // Убираем лишние пробелы
|
||||
$text = preg_replace( "'\t+'", ' ', $text); // Убираем лишние табуляторы
|
||||
$text = preg_replace( '/\( *([^)]+?) *\)/', '(\\1)', $text ); // удаляем пробелы после открывающей скобки и перед закрыващей скобкой
|
||||
$text = preg_replace( '/([а-яА-ЯёЁa-zA-Z.,!?:;…])\(/', '\\1 (', $text ); // добавляем пробел между словом и открывающей скобкой, если его
|
||||
|
||||
//знаки припинания
|
||||
$text = preg_replace("' ?(\.|,|\!|\?)'",'\\1', $text ); // Убираем пробелы перед знаками препинания*/
|
||||
$text = preg_replace("'(\w+),(\w+)'",'\\1, \\2', $text); // Пробелы после знаков препинания
|
||||
$text = preg_replace("'(\d+), ?(\d+)'",'\\1,\\2', $text); // Пробелы между цифрами
|
||||
|
||||
//$text = preg_replace( "'(\S+)-(\S+)'", '<nobr>$1-$2</nobr>', $text ); //не обрывать слова, написанные через дефис
|
||||
|
||||
|
||||
// Русские денежные суммы, расставляя пробелы в нужных местах.
|
||||
$text = preg_replace( '~(\d+)\s?(руб.)~s','$1 $2', $text );
|
||||
$text = preg_replace( '~(\d+)\s?(млн.|тыс.)?\s?(руб.)~s','$1 $2 $3', $text );
|
||||
|
||||
//праивльное обозначение размера
|
||||
$text = preg_replace( '~(\d+)[x|X|х|Х|*](\d+)~','$1×$2', $text );
|
||||
|
||||
//спецсимволы
|
||||
$text = preg_replace( '/\((c|C|с|С)\)/','©', $text);//копирант
|
||||
$text = str_replace( '(tm)','™', $text );
|
||||
$text = str_replace( '(TM)','™', $text ); // trademark
|
||||
|
||||
//неразрывать
|
||||
$text = preg_replace( "'(\w\.)\s?(\w\.)\s(\w\w+)'", '$1 $2 $3', $text ); // Инициалы + фамилия
|
||||
$text = preg_replace( "'(\w\w+)\s?(\w\.)\s(\w\.)'", '$1 $2 $3', $text ); // фамилия + инициалы
|
||||
$text = preg_replace("'(\W\w\.)\s(\w\w+)'",'$1 $2',$text); //один инициал + фамилия
|
||||
|
||||
//последние обработки
|
||||
$text = str_replace( '!?','?!', $text ); // Правильно в таком порядке
|
||||
$text = str_replace( '№ №', '№№', $text ); // слитное написание "№№"
|
||||
$text = str_replace( '§ §', '§§', $text ); // слитное написание "§§"
|
||||
|
||||
$text = entity_code($text,1); //обратные замены
|
||||
|
||||
$text = str_replace( '',' ', $text);//старые косяки
|
||||
$text = str_replace( '',' ', $text);//старые косяки
|
||||
|
||||
return $text;
|
||||
|
||||
|
||||
//убийца шрифтов
|
||||
/*$text = preg_replace("!<font[^>]*?>(.*?)</font>!si","\\1",$text); //убиваем стилистики абзацев
|
||||
$text = preg_replace("!<span[^>]*?>(.*?)</span>!si","\\1",$text); //убиваем стилистики абзацев*/
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
653
vendor/akdelf/akdmin/lib/utf8_ents.php
vendored
Normal file
@@ -0,0 +1,653 @@
|
||||
<?
|
||||
/**
|
||||
* Converts a UNICODE codepoint to a UTF-8 character
|
||||
*
|
||||
* @param int $cp Unicode codepoint
|
||||
* @return string UTF-8 character
|
||||
*
|
||||
* @license http://creativecommons.org/licenses/by-sa/3.0/
|
||||
* @author Nasibullin Rinat, http://orangetie.ru/
|
||||
* @charset ANSI
|
||||
* @version 1.0.0
|
||||
*/
|
||||
function utf8_chr($cp) # = utf8_from_unicode() or unicode_to_utf8()
|
||||
{
|
||||
static $cache = array();
|
||||
$cp = intval($cp);
|
||||
if (array_key_exists($cp, $cache)) return $cache[$cp]; #speed improve
|
||||
|
||||
if ($cp <= 0x7f) return $cache[$cp] = chr($cp);
|
||||
if ($cp <= 0x7ff) return $cache[$cp] = chr(0xc0 | ($cp >> 6)) .
|
||||
chr(0x80 | ($cp & 0x3f));
|
||||
if ($cp <= 0xffff) return $cache[$cp] = chr(0xe0 | ($cp >> 12)) .
|
||||
chr(0x80 | (($cp >> 6) & 0x3f)) .
|
||||
chr(0x80 | ($cp & 0x3f));
|
||||
if ($cp <= 0x10ffff) return $cache[$cp] = chr(0xf0 | ($cp >> 18)) .
|
||||
chr(0x80 | (($cp >> 12) & 0x3f)) .
|
||||
chr(0x80 | (($cp >> 6) & 0x3f)) .
|
||||
chr(0x80 | ($cp & 0x3f));
|
||||
#U+FFFD REPLACEMENT CHARACTER
|
||||
return $cache[$cp] = "\xEF\xBF\xBD";
|
||||
}
|
||||
|
||||
|
||||
function utf8_html_entity_encode($s)
|
||||
{
|
||||
$table = array_flip(array(
|
||||
#Latin-1 Entities:
|
||||
' ' => "\xc2\xa0", #no-break space = non-breaking space
|
||||
'¡' => "\xc2\xa1", #inverted exclamation mark
|
||||
'¢' => "\xc2\xa2", #cent sign
|
||||
'£' => "\xc2\xa3", #pound sign
|
||||
'¤' => "\xc2\xa4", #currency sign
|
||||
'¥' => "\xc2\xa5", #yen sign = yuan sign
|
||||
'¦' => "\xc2\xa6", #broken bar = broken vertical bar
|
||||
'§' => "\xc2\xa7", #section sign
|
||||
'¨' => "\xc2\xa8", #diaeresis = spacing diaeresis
|
||||
'©' => "\xc2\xa9", #copyright sign
|
||||
'ª' => "\xc2\xaa", #feminine ordinal indicator
|
||||
'«' => "\xc2\xab", #left-pointing double angle quotation mark = left pointing guillemet («)
|
||||
'¬' => "\xc2\xac", #not sign
|
||||
'­' => "\xc2\xad", #soft hyphen = discretionary hyphen;
|
||||
#non-breaking hyphen (неразрывный дефис): "\xe2\x80\x91" (U+2011)
|
||||
'®' => "\xc2\xae", #registered sign = registered trade mark sign
|
||||
'¯' => "\xc2\xaf", #macron = spacing macron = overline = APL overbar
|
||||
'°' => "\xc2\xb0", #degree sign
|
||||
'±' => "\xc2\xb1", #plus-minus sign = plus-or-minus sign
|
||||
'²' => "\xc2\xb2", #superscript two = superscript digit two = squared
|
||||
'³' => "\xc2\xb3", #superscript three = superscript digit three = cubed
|
||||
'´' => "\xc2\xb4", #acute accent = spacing acute
|
||||
'µ' => "\xc2\xb5", #micro sign
|
||||
'¶' => "\xc2\xb6", #pilcrow sign = paragraph sign
|
||||
'·' => "\xc2\xb7", #middle dot = Georgian comma = Greek middle dot
|
||||
'¸' => "\xc2\xb8", #cedilla = spacing cedilla
|
||||
'¹' => "\xc2\xb9", #superscript one = superscript digit one
|
||||
'º' => "\xc2\xba", #masculine ordinal indicator
|
||||
'»' => "\xc2\xbb", #right-pointing double angle quotation mark = right pointing guillemet (ї)
|
||||
'¼' => "\xc2\xbc", #vulgar fraction one quarter = fraction one quarter
|
||||
'½' => "\xc2\xbd", #vulgar fraction one half = fraction one half
|
||||
'¾' => "\xc2\xbe", #vulgar fraction three quarters = fraction three quarters
|
||||
'¿' => "\xc2\xbf", #inverted question mark = turned question mark
|
||||
#Latin capital letter
|
||||
'À' => "\xc3\x80", #Latin capital letter A with grave = Latin capital letter A grave
|
||||
'Á' => "\xc3\x81", #Latin capital letter A with acute
|
||||
'Â' => "\xc3\x82", #Latin capital letter A with circumflex
|
||||
'Ã' => "\xc3\x83", #Latin capital letter A with tilde
|
||||
'Ä' => "\xc3\x84", #Latin capital letter A with diaeresis
|
||||
'Å' => "\xc3\x85", #Latin capital letter A with ring above = Latin capital letter A ring
|
||||
'Æ' => "\xc3\x86", #Latin capital letter AE = Latin capital ligature AE
|
||||
'Ç' => "\xc3\x87", #Latin capital letter C with cedilla
|
||||
'È' => "\xc3\x88", #Latin capital letter E with grave
|
||||
'É' => "\xc3\x89", #Latin capital letter E with acute
|
||||
'Ê' => "\xc3\x8a", #Latin capital letter E with circumflex
|
||||
'Ë' => "\xc3\x8b", #Latin capital letter E with diaeresis
|
||||
'Ì' => "\xc3\x8c", #Latin capital letter I with grave
|
||||
'Í' => "\xc3\x8d", #Latin capital letter I with acute
|
||||
'Î' => "\xc3\x8e", #Latin capital letter I with circumflex
|
||||
'Ï' => "\xc3\x8f", #Latin capital letter I with diaeresis
|
||||
'Ð' => "\xc3\x90", #Latin capital letter ETH
|
||||
'Ñ' => "\xc3\x91", #Latin capital letter N with tilde
|
||||
'Ò' => "\xc3\x92", #Latin capital letter O with grave
|
||||
'Ó' => "\xc3\x93", #Latin capital letter O with acute
|
||||
'Ô' => "\xc3\x94", #Latin capital letter O with circumflex
|
||||
'Õ' => "\xc3\x95", #Latin capital letter O with tilde
|
||||
'Ö' => "\xc3\x96", #Latin capital letter O with diaeresis
|
||||
'×' => "\xc3\x97", #multiplication sign
|
||||
'Ø' => "\xc3\x98", #Latin capital letter O with stroke = Latin capital letter O slash
|
||||
'Ù' => "\xc3\x99", #Latin capital letter U with grave
|
||||
'Ú' => "\xc3\x9a", #Latin capital letter U with acute
|
||||
'Û' => "\xc3\x9b", #Latin capital letter U with circumflex
|
||||
'Ü' => "\xc3\x9c", #Latin capital letter U with diaeresis
|
||||
'Ý' => "\xc3\x9d", #Latin capital letter Y with acute
|
||||
'Þ' => "\xc3\x9e", #Latin capital letter THORN
|
||||
#Latin small letter
|
||||
'ß' => "\xc3\x9f", #Latin small letter sharp s = ess-zed
|
||||
'à' => "\xc3\xa0", #Latin small letter a with grave = Latin small letter a grave
|
||||
'á' => "\xc3\xa1", #Latin small letter a with acute
|
||||
'â' => "\xc3\xa2", #Latin small letter a with circumflex
|
||||
'ã' => "\xc3\xa3", #Latin small letter a with tilde
|
||||
'ä' => "\xc3\xa4", #Latin small letter a with diaeresis
|
||||
'å' => "\xc3\xa5", #Latin small letter a with ring above = Latin small letter a ring
|
||||
'æ' => "\xc3\xa6", #Latin small letter ae = Latin small ligature ae
|
||||
'ç' => "\xc3\xa7", #Latin small letter c with cedilla
|
||||
'è' => "\xc3\xa8", #Latin small letter e with grave
|
||||
'é' => "\xc3\xa9", #Latin small letter e with acute
|
||||
'ê' => "\xc3\xaa", #Latin small letter e with circumflex
|
||||
'ë' => "\xc3\xab", #Latin small letter e with diaeresis
|
||||
'ì' => "\xc3\xac", #Latin small letter i with grave
|
||||
'í' => "\xc3\xad", #Latin small letter i with acute
|
||||
'î' => "\xc3\xae", #Latin small letter i with circumflex
|
||||
'ï' => "\xc3\xaf", #Latin small letter i with diaeresis
|
||||
'ð' => "\xc3\xb0", #Latin small letter eth
|
||||
'ñ' => "\xc3\xb1", #Latin small letter n with tilde
|
||||
'ò' => "\xc3\xb2", #Latin small letter o with grave
|
||||
'ó' => "\xc3\xb3", #Latin small letter o with acute
|
||||
'ô' => "\xc3\xb4", #Latin small letter o with circumflex
|
||||
'õ' => "\xc3\xb5", #Latin small letter o with tilde
|
||||
'ö' => "\xc3\xb6", #Latin small letter o with diaeresis
|
||||
'÷' => "\xc3\xb7", #division sign
|
||||
'ø' => "\xc3\xb8", #Latin small letter o with stroke = Latin small letter o slash
|
||||
'ù' => "\xc3\xb9", #Latin small letter u with grave
|
||||
'ú' => "\xc3\xba", #Latin small letter u with acute
|
||||
'û' => "\xc3\xbb", #Latin small letter u with circumflex
|
||||
'ü' => "\xc3\xbc", #Latin small letter u with diaeresis
|
||||
'ý' => "\xc3\xbd", #Latin small letter y with acute
|
||||
'þ' => "\xc3\xbe", #Latin small letter thorn
|
||||
'ÿ' => "\xc3\xbf", #Latin small letter y with diaeresis
|
||||
#Symbols and Greek Letters:
|
||||
'ƒ' => "\xc6\x92", #Latin small f with hook = function = florin
|
||||
'Α' => "\xce\x91", #Greek capital letter alpha
|
||||
'Β' => "\xce\x92", #Greek capital letter beta
|
||||
'Γ' => "\xce\x93", #Greek capital letter gamma
|
||||
'Δ' => "\xce\x94", #Greek capital letter delta
|
||||
'Ε' => "\xce\x95", #Greek capital letter epsilon
|
||||
'Ζ' => "\xce\x96", #Greek capital letter zeta
|
||||
'Η' => "\xce\x97", #Greek capital letter eta
|
||||
'Θ' => "\xce\x98", #Greek capital letter theta
|
||||
'Ι' => "\xce\x99", #Greek capital letter iota
|
||||
'Κ' => "\xce\x9a", #Greek capital letter kappa
|
||||
'Λ' => "\xce\x9b", #Greek capital letter lambda
|
||||
'Μ' => "\xce\x9c", #Greek capital letter mu
|
||||
'Ν' => "\xce\x9d", #Greek capital letter nu
|
||||
'Ξ' => "\xce\x9e", #Greek capital letter xi
|
||||
'Ο' => "\xce\x9f", #Greek capital letter omicron
|
||||
'Π' => "\xce\xa0", #Greek capital letter pi
|
||||
'Ρ' => "\xce\xa1", #Greek capital letter rho
|
||||
'Σ' => "\xce\xa3", #Greek capital letter sigma
|
||||
'Τ' => "\xce\xa4", #Greek capital letter tau
|
||||
'Υ' => "\xce\xa5", #Greek capital letter upsilon
|
||||
'Φ' => "\xce\xa6", #Greek capital letter phi
|
||||
'Χ' => "\xce\xa7", #Greek capital letter chi
|
||||
'Ψ' => "\xce\xa8", #Greek capital letter psi
|
||||
'Ω' => "\xce\xa9", #Greek capital letter omega
|
||||
'α' => "\xce\xb1", #Greek small letter alpha
|
||||
'β' => "\xce\xb2", #Greek small letter beta
|
||||
'γ' => "\xce\xb3", #Greek small letter gamma
|
||||
'δ' => "\xce\xb4", #Greek small letter delta
|
||||
'ε' => "\xce\xb5", #Greek small letter epsilon
|
||||
'ζ' => "\xce\xb6", #Greek small letter zeta
|
||||
'η' => "\xce\xb7", #Greek small letter eta
|
||||
'θ' => "\xce\xb8", #Greek small letter theta
|
||||
'ι' => "\xce\xb9", #Greek small letter iota
|
||||
'κ' => "\xce\xba", #Greek small letter kappa
|
||||
'λ' => "\xce\xbb", #Greek small letter lambda
|
||||
'μ' => "\xce\xbc", #Greek small letter mu
|
||||
'ν' => "\xce\xbd", #Greek small letter nu
|
||||
'ξ' => "\xce\xbe", #Greek small letter xi
|
||||
'ο' => "\xce\xbf", #Greek small letter omicron
|
||||
'π' => "\xcf\x80", #Greek small letter pi
|
||||
'ρ' => "\xcf\x81", #Greek small letter rho
|
||||
'ς' => "\xcf\x82", #Greek small letter final sigma
|
||||
'σ' => "\xcf\x83", #Greek small letter sigma
|
||||
'τ' => "\xcf\x84", #Greek small letter tau
|
||||
'υ' => "\xcf\x85", #Greek small letter upsilon
|
||||
'φ' => "\xcf\x86", #Greek small letter phi
|
||||
'χ' => "\xcf\x87", #Greek small letter chi
|
||||
'ψ' => "\xcf\x88", #Greek small letter psi
|
||||
'ω' => "\xcf\x89", #Greek small letter omega
|
||||
'ϑ'=> "\xcf\x91", #Greek small letter theta symbol
|
||||
'ϒ' => "\xcf\x92", #Greek upsilon with hook symbol
|
||||
'ϖ' => "\xcf\x96", #Greek pi symbol
|
||||
|
||||
'•' => "\xe2\x80\xa2", #bullet = black small circle
|
||||
'…' => "\xe2\x80\xa6", #horizontal ellipsis = three dot leader
|
||||
'′' => "\xe2\x80\xb2", #prime = minutes = feet (для обозначения минут и футов)
|
||||
'″' => "\xe2\x80\xb3", #double prime = seconds = inches (для обозначения секунд и діймов).
|
||||
'‾' => "\xe2\x80\xbe", #overline = spacing overscore
|
||||
'⁄' => "\xe2\x81\x84", #fraction slash
|
||||
'℘' => "\xe2\x84\x98", #script capital P = power set = Weierstrass p
|
||||
'ℑ' => "\xe2\x84\x91", #blackletter capital I = imaginary part
|
||||
'ℜ' => "\xe2\x84\x9c", #blackletter capital R = real part symbol
|
||||
'™' => "\xe2\x84\xa2", #trade mark sign
|
||||
'ℵ' => "\xe2\x84\xb5", #alef symbol = first transfinite cardinal
|
||||
'←' => "\xe2\x86\x90", #leftwards arrow
|
||||
'↑' => "\xe2\x86\x91", #upwards arrow
|
||||
'→' => "\xe2\x86\x92", #rightwards arrow
|
||||
'↓' => "\xe2\x86\x93", #downwards arrow
|
||||
'↔' => "\xe2\x86\x94", #left right arrow
|
||||
'↵' => "\xe2\x86\xb5", #downwards arrow with corner leftwards = carriage return
|
||||
'⇐' => "\xe2\x87\x90", #leftwards double arrow
|
||||
'⇑' => "\xe2\x87\x91", #upwards double arrow
|
||||
'⇒' => "\xe2\x87\x92", #rightwards double arrow
|
||||
'⇓' => "\xe2\x87\x93", #downwards double arrow
|
||||
'⇔' => "\xe2\x87\x94", #left right double arrow
|
||||
'∀' => "\xe2\x88\x80", #for all
|
||||
'∂' => "\xe2\x88\x82", #partial differential
|
||||
'∃' => "\xe2\x88\x83", #there exists
|
||||
'∅' => "\xe2\x88\x85", #empty set = null set = diameter
|
||||
'∇' => "\xe2\x88\x87", #nabla = backward difference
|
||||
'∈' => "\xe2\x88\x88", #element of
|
||||
'∉' => "\xe2\x88\x89", #not an element of
|
||||
'∋' => "\xe2\x88\x8b", #contains as member
|
||||
'∏' => "\xe2\x88\x8f", #n-ary product = product sign
|
||||
'∑' => "\xe2\x88\x91", #n-ary sumation
|
||||
'−' => "\xe2\x88\x92", #minus sign
|
||||
'∗' => "\xe2\x88\x97", #asterisk operator
|
||||
'√' => "\xe2\x88\x9a", #square root = radical sign
|
||||
'∝' => "\xe2\x88\x9d", #proportional to
|
||||
'∞' => "\xe2\x88\x9e", #infinity
|
||||
'∠' => "\xe2\x88\xa0", #angle
|
||||
'∧' => "\xe2\x88\xa7", #logical and = wedge
|
||||
'∨' => "\xe2\x88\xa8", #logical or = vee
|
||||
'∩' => "\xe2\x88\xa9", #intersection = cap
|
||||
'∪' => "\xe2\x88\xaa", #union = cup
|
||||
'∫' => "\xe2\x88\xab", #integral
|
||||
'∴' => "\xe2\x88\xb4", #therefore
|
||||
'∼' => "\xe2\x88\xbc", #tilde operator = varies with = similar to
|
||||
'≅' => "\xe2\x89\x85", #approximately equal to
|
||||
'≈' => "\xe2\x89\x88", #almost equal to = asymptotic to
|
||||
'≠' => "\xe2\x89\xa0", #not equal to
|
||||
'≡' => "\xe2\x89\xa1", #identical to
|
||||
'≤' => "\xe2\x89\xa4", #less-than or equal to
|
||||
'≥' => "\xe2\x89\xa5", #greater-than or equal to
|
||||
'⊂' => "\xe2\x8a\x82", #subset of
|
||||
'⊃' => "\xe2\x8a\x83", #superset of
|
||||
'⊄' => "\xe2\x8a\x84", #not a subset of
|
||||
'⊆' => "\xe2\x8a\x86", #subset of or equal to
|
||||
'⊇' => "\xe2\x8a\x87", #superset of or equal to
|
||||
'⊕' => "\xe2\x8a\x95", #circled plus = direct sum
|
||||
'⊗' => "\xe2\x8a\x97", #circled times = vector product
|
||||
'⊥' => "\xe2\x8a\xa5", #up tack = orthogonal to = perpendicular
|
||||
'⋅' => "\xe2\x8b\x85", #dot operator
|
||||
'⌈' => "\xe2\x8c\x88", #left ceiling = APL upstile
|
||||
'⌉' => "\xe2\x8c\x89", #right ceiling
|
||||
'⌊' => "\xe2\x8c\x8a", #left floor = APL downstile
|
||||
'⌋' => "\xe2\x8c\x8b", #right floor
|
||||
'⟨' => "\xe2\x8c\xa9", #left-pointing angle bracket = bra
|
||||
'⟩' => "\xe2\x8c\xaa", #right-pointing angle bracket = ket
|
||||
'◊' => "\xe2\x97\x8a", #lozenge
|
||||
'♠' => "\xe2\x99\xa0", #black spade suit
|
||||
'♣' => "\xe2\x99\xa3", #black club suit = shamrock
|
||||
'♥' => "\xe2\x99\xa5", #black heart suit = valentine
|
||||
'♦' => "\xe2\x99\xa6", #black diamond suit
|
||||
#Other Special Characters:
|
||||
'Œ' => "\xc5\x92", #Latin capital ligature OE
|
||||
'œ' => "\xc5\x93", #Latin small ligature oe
|
||||
'Š' => "\xc5\xa0", #Latin capital letter S with caron
|
||||
'š' => "\xc5\xa1", #Latin small letter s with caron
|
||||
'Ÿ' => "\xc5\xb8", #Latin capital letter Y with diaeresis
|
||||
'ˆ' => "\xcb\x86", #modifier letter circumflex accent
|
||||
'˜' => "\xcb\x9c", #small tilde
|
||||
' ' => "\xe2\x80\x82", #en space
|
||||
' ' => "\xe2\x80\x83", #em space
|
||||
' ' => "\xe2\x80\x89", #thin space
|
||||
'‌' => "\xe2\x80\x8c", #zero width non-joiner
|
||||
'‍' => "\xe2\x80\x8d", #zero width joiner
|
||||
'‎' => "\xe2\x80\x8e", #left-to-right mark
|
||||
'‏' => "\xe2\x80\x8f", #right-to-left mark
|
||||
'–' => "\xe2\x80\x93", #en dash
|
||||
'—' => "\xe2\x80\x94", #em dash
|
||||
'‘' => "\xe2\x80\x98", #left single quotation mark
|
||||
'’' => "\xe2\x80\x99", #right single quotation mark (and apostrophe!)
|
||||
'‚' => "\xe2\x80\x9a", #single low-9 quotation mark
|
||||
'“' => "\xe2\x80\x9c", #left double quotation mark
|
||||
'”' => "\xe2\x80\x9d", #right double quotation mark
|
||||
'„' => "\xe2\x80\x9e", #double low-9 quotation mark
|
||||
'†' => "\xe2\x80\xa0", #dagger
|
||||
'‡' => "\xe2\x80\xa1", #double dagger
|
||||
'‰' => "\xe2\x80\xb0", #per mille sign
|
||||
'‹' => "\xe2\x80\xb9", #single left-pointing angle quotation mark
|
||||
'›' => "\xe2\x80\xba", #single right-pointing angle quotation mark
|
||||
'€' => "\xe2\x82\xac"
|
||||
));
|
||||
|
||||
|
||||
$s = str_replace("\x22", '"', $s);
|
||||
//$s = str_replace("\x3c", '<', $s);
|
||||
//$s = str_replace("\x3e", '>', $s);
|
||||
|
||||
#заменяем utf8-символы на именованные сущности:
|
||||
#оптимизация скорости: заменяем только те символы, которые используются в html коде!
|
||||
preg_match_all('/ [\xc2\xc3\xc5\xc6\xcb\xce\xcf][\x80-\xbf] #2 bytes
|
||||
| \xe2[\x80-\x99][\x82-\xac] #3 bytes
|
||||
/sxSX', $s, $m);
|
||||
foreach (array_unique($m[0]) as $char)
|
||||
{
|
||||
if (array_key_exists($char, $table)) $s = str_replace($char, $table[$char], $s);
|
||||
}#foreach
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Convert all HTML entities to native UTF-8 characters
|
||||
* Функция декодирует гораздо больше именованных сущностей, чем стандартная html_entity_decode()
|
||||
* Все dec и hex сущности так же переводятся в UTF-8.
|
||||
*
|
||||
* Example: '"' or '"' or '"' will be converted to '"'.
|
||||
*
|
||||
* @param string $s
|
||||
* @param bool $is_htmlspecialchars обрабатывать специальные html сущности? (< > & ")
|
||||
* @return string
|
||||
* @link http://www.htmlhelp.com/reference/html40/entities/
|
||||
* @link http://www.alanwood.net/demos/ent4_frame.html (HTML 4.01 Character Entity References)
|
||||
* @link http://msdn.microsoft.com/workshop/author/dhtml/reference/charsets/charset1.asp?frame=true
|
||||
* @link http://msdn.microsoft.com/workshop/author/dhtml/reference/charsets/charset2.asp?frame=true
|
||||
* @link http://msdn.microsoft.com/workshop/author/dhtml/reference/charsets/charset3.asp?frame=true
|
||||
*
|
||||
* @license http://creativecommons.org/licenses/by-sa/3.0/
|
||||
* @author Nasibullin Rinat, http://orangetie.ru/
|
||||
* @charset ANSI
|
||||
* @version 2.1.12
|
||||
*/
|
||||
function utf8_html_entity_decode($s, $is_htmlspecialchars = false)
|
||||
{
|
||||
#оптимизация скорости
|
||||
if (strlen($s) < 4 #по минимальной длине сущности - 4 байта: &#d; &xx;
|
||||
|| ($pos = strpos($s, '&') === false) || strpos($s, ';', $pos) === false) return $s;
|
||||
$table = array(
|
||||
#Latin-1 Entities:
|
||||
' ' => "\xc2\xa0", #no-break space = non-breaking space
|
||||
'¡' => "\xc2\xa1", #inverted exclamation mark
|
||||
'¢' => "\xc2\xa2", #cent sign
|
||||
'£' => "\xc2\xa3", #pound sign
|
||||
'¤' => "\xc2\xa4", #currency sign
|
||||
'¥' => "\xc2\xa5", #yen sign = yuan sign
|
||||
'¦' => "\xc2\xa6", #broken bar = broken vertical bar
|
||||
'§' => "\xc2\xa7", #section sign
|
||||
'¨' => "\xc2\xa8", #diaeresis = spacing diaeresis
|
||||
'©' => "\xc2\xa9", #copyright sign
|
||||
'ª' => "\xc2\xaa", #feminine ordinal indicator
|
||||
'«' => "\xc2\xab", #left-pointing double angle quotation mark = left pointing guillemet («)
|
||||
'¬' => "\xc2\xac", #not sign
|
||||
'­' => "\xc2\xad", #soft hyphen = discretionary hyphen
|
||||
'®' => "\xc2\xae", #registered sign = registered trade mark sign
|
||||
'¯' => "\xc2\xaf", #macron = spacing macron = overline = APL overbar
|
||||
'°' => "\xc2\xb0", #degree sign
|
||||
'±' => "\xc2\xb1", #plus-minus sign = plus-or-minus sign
|
||||
'²' => "\xc2\xb2", #superscript two = superscript digit two = squared
|
||||
'³' => "\xc2\xb3", #superscript three = superscript digit three = cubed
|
||||
'´' => "\xc2\xb4", #acute accent = spacing acute
|
||||
'µ' => "\xc2\xb5", #micro sign
|
||||
'¶' => "\xc2\xb6", #pilcrow sign = paragraph sign
|
||||
'·' => "\xc2\xb7", #middle dot = Georgian comma = Greek middle dot
|
||||
'¸' => "\xc2\xb8", #cedilla = spacing cedilla
|
||||
'¹' => "\xc2\xb9", #superscript one = superscript digit one
|
||||
'º' => "\xc2\xba", #masculine ordinal indicator
|
||||
'»' => "\xc2\xbb", #right-pointing double angle quotation mark = right pointing guillemet (»)
|
||||
'¼' => "\xc2\xbc", #vulgar fraction one quarter = fraction one quarter
|
||||
'½' => "\xc2\xbd", #vulgar fraction one half = fraction one half
|
||||
'¾' => "\xc2\xbe", #vulgar fraction three quarters = fraction three quarters
|
||||
'¿' => "\xc2\xbf", #inverted question mark = turned question mark
|
||||
#Latin capital letter
|
||||
'À' => "\xc3\x80", #Latin capital letter A with grave = Latin capital letter A grave
|
||||
'Á' => "\xc3\x81", #Latin capital letter A with acute
|
||||
'Â' => "\xc3\x82", #Latin capital letter A with circumflex
|
||||
'Ã' => "\xc3\x83", #Latin capital letter A with tilde
|
||||
'Ä' => "\xc3\x84", #Latin capital letter A with diaeresis
|
||||
'Å' => "\xc3\x85", #Latin capital letter A with ring above = Latin capital letter A ring
|
||||
'Æ' => "\xc3\x86", #Latin capital letter AE = Latin capital ligature AE
|
||||
'Ç' => "\xc3\x87", #Latin capital letter C with cedilla
|
||||
'È' => "\xc3\x88", #Latin capital letter E with grave
|
||||
'É' => "\xc3\x89", #Latin capital letter E with acute
|
||||
'Ê' => "\xc3\x8a", #Latin capital letter E with circumflex
|
||||
'Ë' => "\xc3\x8b", #Latin capital letter E with diaeresis
|
||||
'Ì' => "\xc3\x8c", #Latin capital letter I with grave
|
||||
'Í' => "\xc3\x8d", #Latin capital letter I with acute
|
||||
'Î' => "\xc3\x8e", #Latin capital letter I with circumflex
|
||||
'Ï' => "\xc3\x8f", #Latin capital letter I with diaeresis
|
||||
'Ð' => "\xc3\x90", #Latin capital letter ETH
|
||||
'Ñ' => "\xc3\x91", #Latin capital letter N with tilde
|
||||
'Ò' => "\xc3\x92", #Latin capital letter O with grave
|
||||
'Ó' => "\xc3\x93", #Latin capital letter O with acute
|
||||
'Ô' => "\xc3\x94", #Latin capital letter O with circumflex
|
||||
'Õ' => "\xc3\x95", #Latin capital letter O with tilde
|
||||
'Ö' => "\xc3\x96", #Latin capital letter O with diaeresis
|
||||
'×' => "\xc3\x97", #multiplication sign
|
||||
'Ø' => "\xc3\x98", #Latin capital letter O with stroke = Latin capital letter O slash
|
||||
'Ù' => "\xc3\x99", #Latin capital letter U with grave
|
||||
'Ú' => "\xc3\x9a", #Latin capital letter U with acute
|
||||
'Û' => "\xc3\x9b", #Latin capital letter U with circumflex
|
||||
'Ü' => "\xc3\x9c", #Latin capital letter U with diaeresis
|
||||
'Ý' => "\xc3\x9d", #Latin capital letter Y with acute
|
||||
'Þ' => "\xc3\x9e", #Latin capital letter THORN
|
||||
#Latin small letter
|
||||
'ß' => "\xc3\x9f", #Latin small letter sharp s = ess-zed
|
||||
'à' => "\xc3\xa0", #Latin small letter a with grave = Latin small letter a grave
|
||||
'á' => "\xc3\xa1", #Latin small letter a with acute
|
||||
'â' => "\xc3\xa2", #Latin small letter a with circumflex
|
||||
'ã' => "\xc3\xa3", #Latin small letter a with tilde
|
||||
'ä' => "\xc3\xa4", #Latin small letter a with diaeresis
|
||||
'å' => "\xc3\xa5", #Latin small letter a with ring above = Latin small letter a ring
|
||||
'æ' => "\xc3\xa6", #Latin small letter ae = Latin small ligature ae
|
||||
'ç' => "\xc3\xa7", #Latin small letter c with cedilla
|
||||
'è' => "\xc3\xa8", #Latin small letter e with grave
|
||||
'é' => "\xc3\xa9", #Latin small letter e with acute
|
||||
'ê' => "\xc3\xaa", #Latin small letter e with circumflex
|
||||
'ë' => "\xc3\xab", #Latin small letter e with diaeresis
|
||||
'ì' => "\xc3\xac", #Latin small letter i with grave
|
||||
'í' => "\xc3\xad", #Latin small letter i with acute
|
||||
'î' => "\xc3\xae", #Latin small letter i with circumflex
|
||||
'ï' => "\xc3\xaf", #Latin small letter i with diaeresis
|
||||
'ð' => "\xc3\xb0", #Latin small letter eth
|
||||
'ñ' => "\xc3\xb1", #Latin small letter n with tilde
|
||||
'ò' => "\xc3\xb2", #Latin small letter o with grave
|
||||
'ó' => "\xc3\xb3", #Latin small letter o with acute
|
||||
'ô' => "\xc3\xb4", #Latin small letter o with circumflex
|
||||
'õ' => "\xc3\xb5", #Latin small letter o with tilde
|
||||
'ö' => "\xc3\xb6", #Latin small letter o with diaeresis
|
||||
'÷' => "\xc3\xb7", #division sign
|
||||
'ø' => "\xc3\xb8", #Latin small letter o with stroke = Latin small letter o slash
|
||||
'ù' => "\xc3\xb9", #Latin small letter u with grave
|
||||
'ú' => "\xc3\xba", #Latin small letter u with acute
|
||||
'û' => "\xc3\xbb", #Latin small letter u with circumflex
|
||||
'ü' => "\xc3\xbc", #Latin small letter u with diaeresis
|
||||
'ý' => "\xc3\xbd", #Latin small letter y with acute
|
||||
'þ' => "\xc3\xbe", #Latin small letter thorn
|
||||
'ÿ' => "\xc3\xbf", #Latin small letter y with diaeresis
|
||||
#Symbols and Greek Letters:
|
||||
'ƒ' => "\xc6\x92", #Latin small f with hook = function = florin
|
||||
'Α' => "\xce\x91", #Greek capital letter alpha
|
||||
'Β' => "\xce\x92", #Greek capital letter beta
|
||||
'Γ' => "\xce\x93", #Greek capital letter gamma
|
||||
'Δ' => "\xce\x94", #Greek capital letter delta
|
||||
'Ε' => "\xce\x95", #Greek capital letter epsilon
|
||||
'Ζ' => "\xce\x96", #Greek capital letter zeta
|
||||
'Η' => "\xce\x97", #Greek capital letter eta
|
||||
'Θ' => "\xce\x98", #Greek capital letter theta
|
||||
'Ι' => "\xce\x99", #Greek capital letter iota
|
||||
'Κ' => "\xce\x9a", #Greek capital letter kappa
|
||||
'Λ' => "\xce\x9b", #Greek capital letter lambda
|
||||
'Μ' => "\xce\x9c", #Greek capital letter mu
|
||||
'Ν' => "\xce\x9d", #Greek capital letter nu
|
||||
'Ξ' => "\xce\x9e", #Greek capital letter xi
|
||||
'Ο' => "\xce\x9f", #Greek capital letter omicron
|
||||
'Π' => "\xce\xa0", #Greek capital letter pi
|
||||
'Ρ' => "\xce\xa1", #Greek capital letter rho
|
||||
'Σ' => "\xce\xa3", #Greek capital letter sigma
|
||||
'Τ' => "\xce\xa4", #Greek capital letter tau
|
||||
'Υ' => "\xce\xa5", #Greek capital letter upsilon
|
||||
'Φ' => "\xce\xa6", #Greek capital letter phi
|
||||
'Χ' => "\xce\xa7", #Greek capital letter chi
|
||||
'Ψ' => "\xce\xa8", #Greek capital letter psi
|
||||
'Ω' => "\xce\xa9", #Greek capital letter omega
|
||||
'α' => "\xce\xb1", #Greek small letter alpha
|
||||
'β' => "\xce\xb2", #Greek small letter beta
|
||||
'γ' => "\xce\xb3", #Greek small letter gamma
|
||||
'δ' => "\xce\xb4", #Greek small letter delta
|
||||
'ε' => "\xce\xb5", #Greek small letter epsilon
|
||||
'ζ' => "\xce\xb6", #Greek small letter zeta
|
||||
'η' => "\xce\xb7", #Greek small letter eta
|
||||
'θ' => "\xce\xb8", #Greek small letter theta
|
||||
'ι' => "\xce\xb9", #Greek small letter iota
|
||||
'κ' => "\xce\xba", #Greek small letter kappa
|
||||
'λ' => "\xce\xbb", #Greek small letter lambda
|
||||
'μ' => "\xce\xbc", #Greek small letter mu
|
||||
'ν' => "\xce\xbd", #Greek small letter nu
|
||||
'ξ' => "\xce\xbe", #Greek small letter xi
|
||||
'ο' => "\xce\xbf", #Greek small letter omicron
|
||||
'π' => "\xcf\x80", #Greek small letter pi
|
||||
'ρ' => "\xcf\x81", #Greek small letter rho
|
||||
'ς' => "\xcf\x82", #Greek small letter final sigma
|
||||
'σ' => "\xcf\x83", #Greek small letter sigma
|
||||
'τ' => "\xcf\x84", #Greek small letter tau
|
||||
'υ' => "\xcf\x85", #Greek small letter upsilon
|
||||
'φ' => "\xcf\x86", #Greek small letter phi
|
||||
'χ' => "\xcf\x87", #Greek small letter chi
|
||||
'ψ' => "\xcf\x88", #Greek small letter psi
|
||||
'ω' => "\xcf\x89", #Greek small letter omega
|
||||
'ϑ'=> "\xcf\x91", #Greek small letter theta symbol
|
||||
'ϒ' => "\xcf\x92", #Greek upsilon with hook symbol
|
||||
'ϖ' => "\xcf\x96", #Greek pi symbol
|
||||
|
||||
'•' => "\xe2\x80\xa2", #bullet = black small circle
|
||||
'…' => "\xe2\x80\xa6", #horizontal ellipsis = three dot leader
|
||||
'′' => "\xe2\x80\xb2", #prime = minutes = feet (для обозначения минут и футов)
|
||||
'″' => "\xe2\x80\xb3", #double prime = seconds = inches (для обозначения секунд и дюймов).
|
||||
'‾' => "\xe2\x80\xbe", #overline = spacing overscore
|
||||
'⁄' => "\xe2\x81\x84", #fraction slash
|
||||
'℘' => "\xe2\x84\x98", #script capital P = power set = Weierstrass p
|
||||
'ℑ' => "\xe2\x84\x91", #blackletter capital I = imaginary part
|
||||
'ℜ' => "\xe2\x84\x9c", #blackletter capital R = real part symbol
|
||||
'™' => "\xe2\x84\xa2", #trade mark sign
|
||||
'ℵ' => "\xe2\x84\xb5", #alef symbol = first transfinite cardinal
|
||||
'←' => "\xe2\x86\x90", #leftwards arrow
|
||||
'↑' => "\xe2\x86\x91", #upwards arrow
|
||||
'→' => "\xe2\x86\x92", #rightwards arrow
|
||||
'↓' => "\xe2\x86\x93", #downwards arrow
|
||||
'↔' => "\xe2\x86\x94", #left right arrow
|
||||
'↵' => "\xe2\x86\xb5", #downwards arrow with corner leftwards = carriage return
|
||||
'⇐' => "\xe2\x87\x90", #leftwards double arrow
|
||||
'⇑' => "\xe2\x87\x91", #upwards double arrow
|
||||
'⇒' => "\xe2\x87\x92", #rightwards double arrow
|
||||
'⇓' => "\xe2\x87\x93", #downwards double arrow
|
||||
'⇔' => "\xe2\x87\x94", #left right double arrow
|
||||
'∀' => "\xe2\x88\x80", #for all
|
||||
'∂' => "\xe2\x88\x82", #partial differential
|
||||
'∃' => "\xe2\x88\x83", #there exists
|
||||
'∅' => "\xe2\x88\x85", #empty set = null set = diameter
|
||||
'∇' => "\xe2\x88\x87", #nabla = backward difference
|
||||
'∈' => "\xe2\x88\x88", #element of
|
||||
'∉' => "\xe2\x88\x89", #not an element of
|
||||
'∋' => "\xe2\x88\x8b", #contains as member
|
||||
'∏' => "\xe2\x88\x8f", #n-ary product = product sign
|
||||
'∑' => "\xe2\x88\x91", #n-ary sumation
|
||||
'−' => "\xe2\x88\x92", #minus sign
|
||||
'∗' => "\xe2\x88\x97", #asterisk operator
|
||||
'√' => "\xe2\x88\x9a", #square root = radical sign
|
||||
'∝' => "\xe2\x88\x9d", #proportional to
|
||||
'∞' => "\xe2\x88\x9e", #infinity
|
||||
'∠' => "\xe2\x88\xa0", #angle
|
||||
'∧' => "\xe2\x88\xa7", #logical and = wedge
|
||||
'∨' => "\xe2\x88\xa8", #logical or = vee
|
||||
'∩' => "\xe2\x88\xa9", #intersection = cap
|
||||
'∪' => "\xe2\x88\xaa", #union = cup
|
||||
'∫' => "\xe2\x88\xab", #integral
|
||||
'∴' => "\xe2\x88\xb4", #therefore
|
||||
'∼' => "\xe2\x88\xbc", #tilde operator = varies with = similar to
|
||||
'≅' => "\xe2\x89\x85", #approximately equal to
|
||||
'≈' => "\xe2\x89\x88", #almost equal to = asymptotic to
|
||||
'≠' => "\xe2\x89\xa0", #not equal to
|
||||
'≡' => "\xe2\x89\xa1", #identical to
|
||||
'≤' => "\xe2\x89\xa4", #less-than or equal to
|
||||
'≥' => "\xe2\x89\xa5", #greater-than or equal to
|
||||
'⊂' => "\xe2\x8a\x82", #subset of
|
||||
'⊃' => "\xe2\x8a\x83", #superset of
|
||||
'⊄' => "\xe2\x8a\x84", #not a subset of
|
||||
'⊆' => "\xe2\x8a\x86", #subset of or equal to
|
||||
'⊇' => "\xe2\x8a\x87", #superset of or equal to
|
||||
'⊕' => "\xe2\x8a\x95", #circled plus = direct sum
|
||||
'⊗' => "\xe2\x8a\x97", #circled times = vector product
|
||||
'⊥' => "\xe2\x8a\xa5", #up tack = orthogonal to = perpendicular
|
||||
'⋅' => "\xe2\x8b\x85", #dot operator
|
||||
'⌈' => "\xe2\x8c\x88", #left ceiling = APL upstile
|
||||
'⌉' => "\xe2\x8c\x89", #right ceiling
|
||||
'⌊' => "\xe2\x8c\x8a", #left floor = APL downstile
|
||||
'⌋' => "\xe2\x8c\x8b", #right floor
|
||||
'⟨' => "\xe2\x8c\xa9", #left-pointing angle bracket = bra
|
||||
'⟩' => "\xe2\x8c\xaa", #right-pointing angle bracket = ket
|
||||
'◊' => "\xe2\x97\x8a", #lozenge
|
||||
'♠' => "\xe2\x99\xa0", #black spade suit
|
||||
'♣' => "\xe2\x99\xa3", #black club suit = shamrock
|
||||
'♥' => "\xe2\x99\xa5", #black heart suit = valentine
|
||||
'♦' => "\xe2\x99\xa6", #black diamond suit
|
||||
#Other Special Characters:
|
||||
'Œ' => "\xc5\x92", #Latin capital ligature OE
|
||||
'œ' => "\xc5\x93", #Latin small ligature oe
|
||||
'Š' => "\xc5\xa0", #Latin capital letter S with caron
|
||||
'š' => "\xc5\xa1", #Latin small letter s with caron
|
||||
'Ÿ' => "\xc5\xb8", #Latin capital letter Y with diaeresis
|
||||
'ˆ' => "\xcb\x86", #modifier letter circumflex accent
|
||||
'˜' => "\xcb\x9c", #small tilde
|
||||
' ' => "\xe2\x80\x82", #en space
|
||||
' ' => "\xe2\x80\x83", #em space
|
||||
' ' => "\xe2\x80\x89", #thin space
|
||||
'‌' => "\xe2\x80\x8c", #zero width non-joiner
|
||||
'‍' => "\xe2\x80\x8d", #zero width joiner
|
||||
'‎' => "\xe2\x80\x8e", #left-to-right mark
|
||||
'‏' => "\xe2\x80\x8f", #right-to-left mark
|
||||
'–' => "\xe2\x80\x93", #en dash
|
||||
'—' => "\xe2\x80\x94", #em dash
|
||||
'‘' => "\xe2\x80\x98", #left single quotation mark
|
||||
'’' => "\xe2\x80\x99", #right single quotation mark (and apostrophe!)
|
||||
'‚' => "\xe2\x80\x9a", #single low-9 quotation mark
|
||||
'“' => "\xe2\x80\x9c", #left double quotation mark
|
||||
'”' => "\xe2\x80\x9d", #right double quotation mark
|
||||
'„' => "\xe2\x80\x9e", #double low-9 quotation mark
|
||||
'†' => "\xe2\x80\xa0", #dagger
|
||||
'‡' => "\xe2\x80\xa1", #double dagger
|
||||
'‰' => "\xe2\x80\xb0", #per mille sign
|
||||
'‹' => "\xe2\x80\xb9", #single left-pointing angle quotation mark
|
||||
'›' => "\xe2\x80\xba", #single right-pointing angle quotation mark
|
||||
'€' => "\xe2\x82\xac", #euro sign
|
||||
);
|
||||
$htmlspecialchars = array(
|
||||
'"' => "\x22", #quotation mark = APL quote (") "
|
||||
'&' => "\x26", #ampersand (&) &
|
||||
'<' => "\x3c", #less-than sign (<) <
|
||||
'>' => "\x3e", #greater-than sign (>) >
|
||||
);
|
||||
|
||||
if ($is_htmlspecialchars) $table += $htmlspecialchars;
|
||||
|
||||
#заменяем именованные сущности:
|
||||
#оптимизация скорости: заменяем только те сущности, которые используются в html коде!
|
||||
#эта часть кода работает быстрее, чем $s = strtr($s, $table);
|
||||
preg_match_all('/&[a-zA-Z]++\d*+;/sSX', $s, $m, null, $pos);
|
||||
foreach (array_unique($m[0]) as $entity)
|
||||
{
|
||||
if (array_key_exists($entity, $table)) $s = str_replace($entity, $table[$entity], $s);
|
||||
}#foreach
|
||||
|
||||
if (($pos = strpos($s, '&#')) !== false) #speed optimization
|
||||
{
|
||||
#заменяем числовые dec и hex сущности:
|
||||
$htmlspecialchars_flip = array_flip($htmlspecialchars);
|
||||
$s = preg_replace('/&#((x)[\da-fA-F]{1,6}+|\d{1,7}+);/seS', #1,114,112 sumbols total in UTF-16
|
||||
'(array_key_exists($char = pack("C", $codepoint = ("$2") ? hexdec("$1") : "$1"),
|
||||
$htmlspecialchars_flip
|
||||
)
|
||||
&& ! $is_htmlspecialchars
|
||||
) ? $htmlspecialchars_flip[$char]
|
||||
: utf8_chr($codepoint)', $s, -1, $pos);
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (!function_exists('mb_str_replace')) {
|
||||
function mb_str_replace($search, $replace, $subject) {
|
||||
if (is_array($subject)) {
|
||||
foreach ($subject as $key => $val) {
|
||||
$subject[$key] = mb_str_replace((string)$search, $replace, $subject[$key]);
|
||||
}
|
||||
return $subject;
|
||||
}
|
||||
$pattern = '/['.preg_quote(implode('', (array)$search), '/').']/u';
|
||||
if (is_array($search)) {
|
||||
if (is_array($replace)) {
|
||||
$len = min(count($search), count($replace));
|
||||
$table = array_combine(array_slice($search, 0, $len), array_slice($replace, 0, $len));
|
||||
$f = create_function('$match', '$table = '.var_export($table, true).'; return array_key_exists($match[0], $table) ? $table[$match[0]] : $match[0];');
|
||||
$subject = preg_replace_callback($pattern, $f, $subject);
|
||||
return $subject;
|
||||
}
|
||||
}
|
||||
$subject = preg_replace($pattern, (string)$replace, $subject);
|
||||
return $subject;
|
||||
}
|
||||
}?>
|
||||
25
vendor/akdelf/akdmin/lib/validate.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?
|
||||
|
||||
function validate($txt, $vald_type)
|
||||
{
|
||||
|
||||
switch (strtolower(trim($vald_type))) {
|
||||
case 'notnull':
|
||||
return ($txt == '') ? 0 : 1;
|
||||
break;
|
||||
case 'mail':
|
||||
return (!eregi("^[a-z]+[a-z0-9_-]*(([.]{1})|([a-z0-9_-]*))[a-z0-9_-]+[@]{1}[a-z0-9_-]+[.](([a-z]{2,3})|([a-z]{3}[.]{1}[a-z]{2}))$", $txt)) ? 0 : 1;
|
||||
break;
|
||||
case 'phone':
|
||||
return (!eregi("^[0-9]{3}-*[0-9]{3}-*[0-9]{4}$", $txt)) ? 0 : 1;
|
||||
break;
|
||||
case 'mysqldate':
|
||||
return (!eregi("^[0-9]{4}-*[0-9]{2}-*[0-9]{2}$", $txt)) ? 0 : 1;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
172
vendor/akdelf/akdmin/themes/office/pub/THEMES/CLASSIC/classic.css
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
Menu related selectors
|
||||
*/
|
||||
.jsdomenudiv {
|
||||
background-color: #CCCCCC;
|
||||
border: 2px outset;
|
||||
border-bottom-color: #000000;
|
||||
border-left-color: #FFFFFF;
|
||||
border-right-color: #000000;
|
||||
border-top-color: #FFFFFF;
|
||||
cursor: default;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
visibility: hidden;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.jsdomenuitem {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
color: #000000;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 22px;
|
||||
padding-right: 15px;
|
||||
padding-top: 2px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
}
|
||||
|
||||
.jsdomenuitemover {
|
||||
background-color: #000099;
|
||||
border: none;
|
||||
color: #FFFFFF;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 22px;
|
||||
padding-right: 15px;
|
||||
padding-top: 2px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
}
|
||||
|
||||
.jsdomenuarrow {
|
||||
background-image: url(classic_arrow.png);
|
||||
background-repeat: no-repeat; /* Do not alter this line! */
|
||||
height: 7px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
right: 8px;
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.jsdomenuarrowover {
|
||||
background-image: url(classic_arrow_o.png);
|
||||
background-repeat: no-repeat; /* Do not alter this line! */
|
||||
height: 7px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
right: 8px;
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.jsdomenusep {
|
||||
}
|
||||
|
||||
.jsdomenusep hr {
|
||||
text-align: center;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
/*
|
||||
Menu bar related selectors
|
||||
*/
|
||||
.jsdomenubardiv {
|
||||
background-color: #CCCCCC;
|
||||
background-image: url(classic_divider.png);
|
||||
background-position: left;
|
||||
background-repeat: no-repeat;
|
||||
border: 2px outset;
|
||||
border-bottom-color: #000000;
|
||||
border-left-color: #FFFFFF;
|
||||
border-right-color: #000000;
|
||||
border-top-color: #FFFFFF;
|
||||
cursor: default;
|
||||
padding-bottom: 3px;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
padding-top: 3px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.jsdomenubardragdiv {
|
||||
cursor: move;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
padding-top: 2px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
visibility: hidden;
|
||||
width: 9px;
|
||||
}
|
||||
|
||||
.jsdomenubaritem {
|
||||
background-color: #CCCCCC;
|
||||
border: none;
|
||||
color: #000000;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 22px;
|
||||
padding-right: 10px;
|
||||
padding-top: 2px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
}
|
||||
|
||||
.jsdomenubaritemover {
|
||||
background-color: #CCCCCC;
|
||||
border: 1px outset;
|
||||
color: #000000;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 21px;
|
||||
padding-right: 9px;
|
||||
padding-top: 2px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
}
|
||||
|
||||
.jsdomenubaritemclick {
|
||||
background-color: #000099;
|
||||
border: 1px solid #000099;
|
||||
color: #FFFFFF;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 21px;
|
||||
padding-right: 9px;
|
||||
padding-top: 2px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
}
|
||||
|
||||
/*
|
||||
Example of selectors for icons. Change the height and width to match the actual
|
||||
height and width of the icon image.
|
||||
*/
|
||||
.icon1 {
|
||||
background-image: url(icon1.png);
|
||||
background-repeat: no-repeat; /* Do not alter this line! */
|
||||
height: 16px;
|
||||
left: 2px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.icon2 {
|
||||
background-image: url(icon2.png);
|
||||
background-repeat: no-repeat; /* Do not alter this line! */
|
||||
height: 16px;
|
||||
left: 2px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.icon3 {
|
||||
background-image: url(icon3.png);
|
||||
background-repeat: no-repeat; /* Do not alter this line! */
|
||||
height: 16px;
|
||||
left: 2px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
width: 16px;
|
||||
}
|
||||
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/CLASSIC/classic_arrow.png
vendored
Normal file
|
After Width: | Height: | Size: 185 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/CLASSIC/classic_arrow_o.png
vendored
Normal file
|
After Width: | Height: | Size: 183 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/CLASSIC/classic_divider.png
vendored
Normal file
|
After Width: | Height: | Size: 455 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/CLASSIC/icon1.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/CLASSIC/icon2.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/CLASSIC/icon3.png
vendored
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/OFFICE_XP/icon1.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/OFFICE_XP/icon2.png
vendored
Normal file
|
After Width: | Height: | Size: 1015 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/OFFICE_XP/icon3.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
173
vendor/akdelf/akdmin/themes/office/pub/THEMES/OFFICE_XP/office_xp.css
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
Menu related selectors
|
||||
*/
|
||||
.jsdomenudiv {
|
||||
background-color: #FFFFFF;
|
||||
background-image: url(office_xp_menu_left.png);
|
||||
background-repeat: repeat-y;
|
||||
border: 1px solid #8A867A;
|
||||
cursor: default;
|
||||
padding-bottom: 1px;
|
||||
padding-top: 1px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
visibility: hidden;
|
||||
|
||||
}
|
||||
|
||||
.jsdomenuitem {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #000000;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding-bottom: 3px;
|
||||
padding-left: 30px;
|
||||
padding-right: 15px;
|
||||
padding-top: 3px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
}
|
||||
|
||||
.jsdomenuitemover {
|
||||
background-color: #C1D2EE;
|
||||
border: 1px solid #316AC5;
|
||||
color: #000000;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
margin-left: 1px;
|
||||
margin-right: 1px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 28px;
|
||||
padding-right: 15px;
|
||||
padding-top: 2px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
}
|
||||
|
||||
.jsdomenuarrow {
|
||||
background-image: url(office_xp_arrow.png);
|
||||
background-repeat: no-repeat; /* Do not alter this line! */
|
||||
height: 7px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
right: 8px;
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.jsdomenuarrowover {
|
||||
background-image: url(office_xp_arrow_o.png);
|
||||
background-repeat: no-repeat; /* Do not alter this line! */
|
||||
height: 7px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
right: 8px;
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.jsdomenusep {
|
||||
padding-left: 28px;
|
||||
}
|
||||
|
||||
.jsdomenusep hr {
|
||||
}
|
||||
|
||||
/*
|
||||
Menu bar related selectors
|
||||
*/
|
||||
.jsdomenubardiv {
|
||||
background-color: #ECE9D8;
|
||||
background-image: url(office_xp_divider.png);
|
||||
background-position: left;
|
||||
background-repeat: no-repeat;
|
||||
border: 1px outset;
|
||||
cursor: default;
|
||||
padding-bottom: 3px;
|
||||
padding-left: 1px;
|
||||
padding-right: 1px;
|
||||
padding-top: 3px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.jsdomenubardragdiv {
|
||||
cursor: move;
|
||||
display: inline;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
padding-top: 2px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
visibility: hidden;
|
||||
width: 9px;
|
||||
}
|
||||
|
||||
.jsdomenubaritem {
|
||||
background-color: #EFEDDE;
|
||||
border: none;
|
||||
color: #000000;
|
||||
display: inline;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 24px;
|
||||
padding-right: 10px;
|
||||
padding-top: 2px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
}
|
||||
|
||||
.jsdomenubaritemover {
|
||||
background-color: #C1D2EE;
|
||||
border: 1px solid #316AC5;
|
||||
color: #000000;
|
||||
display: inline;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 23px;
|
||||
padding-right: 9px;
|
||||
padding-top: 2px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
}
|
||||
|
||||
.jsdomenubaritemclick {
|
||||
background-color: #EFEDDE;
|
||||
border: 1px solid #8A867A;
|
||||
color: #000000;
|
||||
display: inline;
|
||||
font-family: Tahoma, Helvetica, sans, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 23px;
|
||||
padding-right: 9px;
|
||||
padding-top: 2px;
|
||||
position: relative; /* Do not alter this line! */
|
||||
}
|
||||
|
||||
/*
|
||||
Example of selectors for icons. Change the height and width to match the actual
|
||||
height and width of the icon image.
|
||||
*/
|
||||
.icon1 {
|
||||
background-image: url(icon1.png);
|
||||
background-repeat: no-repeat; /* Do not alter this line! */
|
||||
height: 16px;
|
||||
left: 4px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.icon2 {
|
||||
background-image: url(icon2.png);
|
||||
background-repeat: no-repeat; /* Do not alter this line! */
|
||||
height: 16px;
|
||||
left: 4px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.icon3 {
|
||||
background-image: url(icon3.png);
|
||||
background-repeat: no-repeat; /* Do not alter this line! */
|
||||
height: 16px;
|
||||
left: 4px;
|
||||
position: absolute; /* Do not alter this line! */
|
||||
width: 16px;
|
||||
}
|
||||
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/OFFICE_XP/office_xp_arrow.png
vendored
Normal file
|
After Width: | Height: | Size: 182 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/OFFICE_XP/office_xp_arrow_o.png
vendored
Normal file
|
After Width: | Height: | Size: 184 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/OFFICE_XP/office_xp_divider.png
vendored
Normal file
|
After Width: | Height: | Size: 249 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/THEMES/OFFICE_XP/office_xp_menu_left.png
vendored
Normal file
|
After Width: | Height: | Size: 136 B |
5
vendor/akdelf/akdmin/themes/office/pub/docs/photobank.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<p><strong>Забрать фото<br /><br /></strong>На базе нашего редактора мы сделали прототип фотобазы. Элементы управление такие же как и при редактировании новостей. Итак, для того чтобы найти и воспользоваться нужной фотографией вам необходимо:<br /><br />1. Найти пункт в меню “Фотобанк”<br /><br />2. Выбираем подпункт - “Фото”<br /><br />3. Воспользуйтесь поиском, введите ключевое слово (например “Путин”). В списке должны появится необходимые иллюстрации если такое ключевое слово присутствует. Листайте фотографии, выбирая номера страниц внизу<br /><br />4. Также вы можете отфильтровать фотографии по тематике (фильтр “Тематика”)<br /><br />5. Для того чтобы использовать фотографию по назначению можно щелкнуть по ее превьюшке. Полноразмерное фото отобразится в отдельном окне браузере. Далее нужно, как обычно, сохранить фотографию на своем компьютере и залить ее в новость привычным способом.<strong><br /><br /><br /><br />Залить фото<br /><br /></strong>Возможно, в будущем кто-то из вас с разрешения руководства захочет пополнять нашу фотобазу своими снимками или фотографиями из открытых источников. Поэтому небольшая инструкция как это сделать:<br /><br />1. Воспользоваться кнопкой “Добавить”<br /><br />2. Выбираем файл фотографии с нашего компьютера (обязательно заливайте фото только в формате jpg/jpeg)<br /><br />3. Указываем подходящую тематику по смыслу<br /><br />4. Грамотно указывайте ключевые слова, именно по ним производится поиск <br /><br />5. Если вы хотите указать автора или публикуете фото из открытого источника заполняйте поле “Копирайт”<br /><br />6. Сохраняем заполненную форму</p>
|
||||
</body>
|
||||
</html>
|
||||
16
vendor/akdelf/akdmin/themes/office/pub/html/blank.htm
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>Blank Page</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link rel="stylesheet" type="text/css" href="demo.css" />
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
This page is intentionally left blank for testing purposes.
|
||||
</p>
|
||||
<p>
|
||||
<a href="javascript: history.back();">Go Back</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
157
vendor/akdelf/akdmin/themes/office/pub/html/calendar.html
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
<!--
|
||||
Title: Tigra Calendar
|
||||
URL: http://www.softcomplex.com/products/tigra_calendar/
|
||||
Version: 3.2
|
||||
Date: 05/18/2006
|
||||
Feedback: feedback@softcomplex.com (specify product title in the subject)
|
||||
Note: Permission given to use this script in ANY kind of applications if
|
||||
header lines are left unchanged.
|
||||
Note: Script consists of two files: calendar?.js and calendar.html
|
||||
About us: Our company provides offshore IT consulting services.
|
||||
Contact us at sales@softcomplex.com if you have any programming task you
|
||||
want to be handled by professionals. Our typical hourly rate is $20.
|
||||
-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Select Date, Please.</title>
|
||||
<style>
|
||||
td {font-family: Tahoma, Verdana, sans-serif; font-size: 12px;}
|
||||
</style>
|
||||
<script language="JavaScript">
|
||||
|
||||
// months as they appear in the calendar's title
|
||||
var ARR_MONTHS = ["January", "February", "March", "April", "May", "June",
|
||||
"July", "August", "September", "October", "November", "December"];
|
||||
// week day titles as they appear on the calendar
|
||||
var ARR_WEEKDAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
||||
// day week starts from (normally 0-Su or 1-Mo)
|
||||
var NUM_WEEKSTART = 1;
|
||||
// path to the directory where calendar images are stored. trailing slash req.
|
||||
var STR_ICONPATH = 'img/';
|
||||
|
||||
var re_url = new RegExp('datetime=(\\-?\\d+)');
|
||||
var dt_current = (re_url.exec(String(window.location))
|
||||
? new Date(new Number(RegExp.$1)) : new Date());
|
||||
var re_id = new RegExp('id=(\\d+)');
|
||||
var num_id = (re_id.exec(String(window.location))
|
||||
? new Number(RegExp.$1) : 0);
|
||||
var obj_caller = (window.opener ? window.opener.calendars[num_id] : null);
|
||||
|
||||
if (obj_caller && obj_caller.year_scroll) {
|
||||
// get same date in the previous year
|
||||
var dt_prev_year = new Date(dt_current);
|
||||
dt_prev_year.setFullYear(dt_prev_year.getFullYear() - 1);
|
||||
if (dt_prev_year.getDate() != dt_current.getDate())
|
||||
dt_prev_year.setDate(0);
|
||||
|
||||
// get same date in the next year
|
||||
var dt_next_year = new Date(dt_current);
|
||||
dt_next_year.setFullYear(dt_next_year.getFullYear() + 1);
|
||||
if (dt_next_year.getDate() != dt_current.getDate())
|
||||
dt_next_year.setDate(0);
|
||||
}
|
||||
|
||||
// get same date in the previous month
|
||||
var dt_prev_month = new Date(dt_current);
|
||||
dt_prev_month.setMonth(dt_prev_month.getMonth() - 1);
|
||||
if (dt_prev_month.getDate() != dt_current.getDate())
|
||||
dt_prev_month.setDate(0);
|
||||
|
||||
// get same date in the next month
|
||||
var dt_next_month = new Date(dt_current);
|
||||
dt_next_month.setMonth(dt_next_month.getMonth() + 1);
|
||||
if (dt_next_month.getDate() != dt_current.getDate())
|
||||
dt_next_month.setDate(0);
|
||||
|
||||
// get first day to display in the grid for current month
|
||||
var dt_firstday = new Date(dt_current);
|
||||
dt_firstday.setDate(1);
|
||||
dt_firstday.setDate(1 - (7 + dt_firstday.getDay() - NUM_WEEKSTART) % 7);
|
||||
|
||||
// function passing selected date to calling window
|
||||
function set_datetime(n_datetime, b_close) {
|
||||
if (!obj_caller) return;
|
||||
|
||||
var dt_datetime = obj_caller.prs_time(
|
||||
(document.cal ? document.cal.time.value : ''),
|
||||
new Date(n_datetime)
|
||||
);
|
||||
|
||||
if (!dt_datetime) return;
|
||||
if (b_close) {
|
||||
|
||||
obj_caller.target.value = (document.cal
|
||||
? obj_caller.gen_tsmp(dt_datetime)
|
||||
: obj_caller.gen_date(dt_datetime)
|
||||
);window.close();
|
||||
}
|
||||
else obj_caller.popup(dt_datetime.valueOf());
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" marginheight="5" marginwidth="5" topmargin="5" leftmargin="5" rightmargin="5">
|
||||
<table class="clsOTable" cellspacing="0" border="0" width="100%">
|
||||
<tr><td bgcolor="#4682B4">
|
||||
<table cellspacing="1" cellpadding="3" border="0" width="100%">
|
||||
<tr><td colspan="7"><table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<script language="JavaScript">
|
||||
document.write(
|
||||
'<td>'+(obj_caller&&obj_caller.year_scroll?'<a href="javascript:set_datetime('+dt_prev_year.valueOf()+')"><img src="'+STR_ICONPATH+'prev_year.gif" width="16" height="16" border="0" alt="previous year"></a> ':'')+'<a href="javascript:set_datetime('+dt_prev_month.valueOf()+')"><img src="'+STR_ICONPATH+'prev.gif" width="16" height="16" border="0" alt="previous month"></a></td>'+
|
||||
'<td align="center" width="100%"><font color="#ffffff">'+ARR_MONTHS[dt_current.getMonth()]+' '+dt_current.getFullYear() + '</font></td>'+
|
||||
'<td><a href="javascript:set_datetime('+dt_next_month.valueOf()+')"><img src="'+STR_ICONPATH+'next.gif" width="16" height="16" border="0" alt="next month"></a>'+(obj_caller && obj_caller.year_scroll?' <a href="javascript:set_datetime('+dt_next_year.valueOf()+')"><img src="'+STR_ICONPATH+'next_year.gif" width="16" height="16" border="0" alt="next year"></a>':'')+'</td>'
|
||||
);
|
||||
</script>
|
||||
</tr>
|
||||
</table></td></tr>
|
||||
<tr>
|
||||
<script language="JavaScript">
|
||||
|
||||
// print weekdays titles
|
||||
for (var n=0; n<7; n++)
|
||||
document.write('<td bgcolor="#87cefa" align="center"><font color="#ffffff">'+ARR_WEEKDAYS[(NUM_WEEKSTART+n)%7]+'</font></td>');
|
||||
document.write('</tr>');
|
||||
|
||||
// print calendar table
|
||||
var dt_current_day = new Date(dt_firstday);
|
||||
while (dt_current_day.getMonth() == dt_current.getMonth() ||
|
||||
dt_current_day.getMonth() == dt_firstday.getMonth()) {
|
||||
// print row heder
|
||||
document.write('<tr>');
|
||||
for (var n_current_wday=0; n_current_wday<7; n_current_wday++) {
|
||||
if (dt_current_day.getDate() == dt_current.getDate() &&
|
||||
dt_current_day.getMonth() == dt_current.getMonth())
|
||||
// print current date
|
||||
document.write('<td bgcolor="#ffb6c1" align="center" width="14%">');
|
||||
else if (dt_current_day.getDay() == 0 || dt_current_day.getDay() == 6)
|
||||
// weekend days
|
||||
document.write('<td bgcolor="#dbeaf5" align="center" width="14%">');
|
||||
else
|
||||
// print working days of current month
|
||||
document.write('<td bgcolor="#ffffff" align="center" width="14%">');
|
||||
|
||||
document.write('<a href="javascript:set_datetime('+dt_current_day.valueOf() +', true);">');
|
||||
|
||||
if (dt_current_day.getMonth() == this.dt_current.getMonth())
|
||||
// print days of current month
|
||||
document.write('<font color="#000000">');
|
||||
else
|
||||
// print days of other months
|
||||
document.write('<font color="#606060">');
|
||||
|
||||
document.write(dt_current_day.getDate()+'</font></a></td>');
|
||||
dt_current_day.setDate(dt_current_day.getDate()+1);
|
||||
}
|
||||
// print row footer
|
||||
document.write('</tr>');
|
||||
}
|
||||
if (obj_caller && obj_caller.time_comp)
|
||||
document.write('<form onsubmit="javascript:set_datetime('+dt_current.valueOf()+', true)" name="cal"><tr><td colspan="7" bgcolor="#87CEFA"><font color="White" face="tahoma, verdana" size="2">Time: <input type="text" name="time" value="'+obj_caller.gen_time(this.dt_current)+'" size="8" maxlength="8"></font></td></tr></form>');
|
||||
</script>
|
||||
</table></tr></td>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
vendor/akdelf/akdmin/themes/office/pub/img/b_drop.png
vendored
Normal file
|
After Width: | Height: | Size: 311 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/img/b_edit.png
vendored
Normal file
|
After Width: | Height: | Size: 451 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/img/export.png
vendored
Normal file
|
After Width: | Height: | Size: 999 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/img/filequickprint.png
vendored
Normal file
|
After Width: | Height: | Size: 911 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/img/lupa.png
vendored
Normal file
|
After Width: | Height: | Size: 605 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/img/s_asc.png
vendored
Normal file
|
After Width: | Height: | Size: 213 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/img/s_desc.png
vendored
Normal file
|
After Width: | Height: | Size: 221 B |
298
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/ajax/php/ajax.php
vendored
Normal file
@@ -0,0 +1,298 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajex.FileManager
|
||||
* http://demphest.ru/ajex-filemanager
|
||||
*
|
||||
* @version
|
||||
* 1.0 (1 Oct 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2009 Demphest Gorphek
|
||||
*
|
||||
* @license
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* Ajex.FileManager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This file is part of Ajex.FileManager.
|
||||
*/
|
||||
|
||||
header('Expires: Sun, 13 Sep 2009 00:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache') ;
|
||||
//header('Content-Type: text/json; charset=utf-8');
|
||||
|
||||
define('DEV', false);
|
||||
if (DEV) {
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 'on');
|
||||
ini_set('display_startup_errors', 'on');
|
||||
} else {
|
||||
error_reporting(0);
|
||||
ini_set('display_errors', 'off');
|
||||
ini_set('display_startup_errors', 'off');
|
||||
}
|
||||
|
||||
|
||||
//if (!isset($_SESSION['admin'])) {exit;} // Do not forget to add your user authorization
|
||||
|
||||
|
||||
define('DIR_SEP', '/');
|
||||
mb_internal_encoding('utf-8');
|
||||
date_default_timezone_set('Europe/Moscow');
|
||||
|
||||
|
||||
$cfg['url'] = 'upd';
|
||||
$cfg['root'] = $_SERVER['DOCUMENT_ROOT'] . DIR_SEP . $cfg['url']; // http://www.yousite.com/upload/ absolute path
|
||||
$cfg['quickdir'] = ''; //$cfg['quickdir'] = 'quick-folder'; // for CKEditor
|
||||
|
||||
|
||||
$cfg['lang'] = 'en';
|
||||
|
||||
$cfg['thumb']['width'] = 150;
|
||||
$cfg['thumb']['height'] = 120;
|
||||
$cfg['thumb']['quality'] = 80;
|
||||
$cfg['thumb']['cut'] = true;
|
||||
$cfg['thumb']['auto'] = true;
|
||||
$cfg['thumb']['dir'] = '_thumb';
|
||||
$cfg['thumb']['date'] = "j.m.Y, H:i";
|
||||
|
||||
$cfg['hide']['file'] = array('.htaccess');
|
||||
$cfg['hide']['folder'] = array('.', '..', $cfg['thumb']['dir'], '.svn', '.cvs');
|
||||
|
||||
$cfg['chmod']['file'] = 0777;
|
||||
$cfg['chmod']['folder'] = 0777;
|
||||
|
||||
$cfg['deny'] = array(
|
||||
'file' => array('php','php3','php4','php5','phtml','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg','cgi'),
|
||||
'flash' => array(),
|
||||
'image' => array(),
|
||||
'media' => array(),
|
||||
|
||||
'folder' => array(
|
||||
$cfg['url'] . DIR_SEP . 'file',
|
||||
$cfg['url'] . DIR_SEP . 'flash',
|
||||
$cfg['url'] . DIR_SEP . 'image',
|
||||
$cfg['url'] . DIR_SEP . 'media')
|
||||
);
|
||||
|
||||
$cfg['allow'] = array(
|
||||
'file' => array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip'),
|
||||
'flash' => array('swf', 'flv'),
|
||||
'image' => array('jpg', 'jpeg', 'gif', 'png', 'bmp'),
|
||||
'media' => array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv')
|
||||
);
|
||||
|
||||
|
||||
$cfg['nameRegAllow'] = '/^[a-z0-9-_#~\$%()\[\]&=]+/i';
|
||||
|
||||
// ------------------
|
||||
$cfg['url'] = trim($cfg['url'], '/\\');
|
||||
$cfg['root'] = rtrim($cfg['root'], '/\\') . DIR_SEP;
|
||||
|
||||
$dir = isset($_POST['dir'])? urldecode($_POST['dir']) : '';
|
||||
$dir = trim($dir, '/\\') . DIR_SEP;
|
||||
|
||||
$rpath = str_replace('\\', DIR_SEP, realpath($cfg['root'] . $dir) . DIR_SEP);
|
||||
if (false === strpos($rpath, str_replace('\\', DIR_SEP, $dir))) {$dir = '';}
|
||||
|
||||
|
||||
$mode = isset($_GET['mode'])? $_GET['mode'] : 'getDirs';
|
||||
$cfg['type'] = isset($_POST['type'])? $_POST['type'] : (isset($_GET['type']) && 'QuickUpload' == $mode? $_GET['type'] : 'file');
|
||||
$cfg['sort'] = isset($_POST['sort'])? $_POST['sort'] : 'name';
|
||||
|
||||
$cfg['type'] = strtolower($cfg['type']);
|
||||
|
||||
$reply = array(
|
||||
'dirs' => array(),
|
||||
'files' => array()
|
||||
);
|
||||
|
||||
// ------------------
|
||||
|
||||
require_once 'lib.php';
|
||||
switch($mode) {
|
||||
case 'cfg':
|
||||
$rootDir = listDirs('');
|
||||
$children = array();
|
||||
for ($i=-1, $iCount=count($rootDir); ++$i<$iCount;) {
|
||||
$children[] = (object) $rootDir[$i];
|
||||
}
|
||||
|
||||
$reply['config'] = array(
|
||||
'lang' => $cfg['lang'],
|
||||
'type' => $cfg['type'],
|
||||
'url' => '/' . $cfg['url'] . '/',
|
||||
'thumb' => $cfg['thumb']['dir'],
|
||||
'thumbWidth' => $cfg['thumb']['width'],
|
||||
'thumbHeight' => $cfg['thumb']['height'],
|
||||
'maxUpload' => ini_get('upload_max_filesize'),
|
||||
'allow' => implode('|', $cfg['allow'][$cfg['type']]),
|
||||
'children' => $children
|
||||
);
|
||||
break;
|
||||
|
||||
case 'renameFile':
|
||||
$file = trim(urldecode($_POST['oldname']), '/\\.');
|
||||
$name = urldecode($_POST['newname']);
|
||||
|
||||
if ($file != $name && preg_match($cfg['nameRegAllow'], $name) && file_exists($cfg['root']) . $dir . $file) {
|
||||
if (file_exists($_thumb = $cfg['root'] . $cfg['thumb']['dir'] . DIR_SEP . $dir . DIR_SEP . $file)) {
|
||||
unlink($_thumb);
|
||||
}
|
||||
if (file_exists($cfg['root'] . $dir . $name)) {
|
||||
$name = getFreeFileName($name, $cfg['root'] . $dir);
|
||||
}
|
||||
if (false !== strpos($name, '.')) {
|
||||
$ext = substr($name, strrpos($name, '.') + 1);
|
||||
$ext = strtolower($ext);
|
||||
if (in_array($ext, $cfg['allow']['image'])) {
|
||||
rename($cfg['root'] . $dir . $file, $cfg['root'] . $dir . $name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$reply['files'] = listFiles($dir);
|
||||
break;
|
||||
|
||||
case 'createFolder':
|
||||
$path = trim(urldecode($_POST['oldname']), '/\\.');
|
||||
$name = urldecode($_POST['newname']);
|
||||
|
||||
$reply['isSuccess'] = false;
|
||||
if (preg_match($cfg['nameRegAllow'], $name)) {
|
||||
if (!file_exists($cfg['root'] . $path . DIR_SEP . $name)) {
|
||||
$reply['isSuccess'] = mkdir($cfg['root'] . $path . DIR_SEP . $name, $cfg['chmod']['folder']);
|
||||
} else {
|
||||
$reply['isSuccess'] = 'exist';
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'renameFolder':
|
||||
$folder = urldecode($_POST['oldname']);
|
||||
$name = urldecode($_POST['newname']);
|
||||
$folder = trim($folder, '/\\.');
|
||||
|
||||
$reply['isSuccess'] = false;
|
||||
if (!empty($folder) && $cfg['url'] != $folder && $folder != $name && !in_array($cfg['url'] . DIR_SEP . $folder, $cfg['deny']['folder']) && preg_match($cfg['nameRegAllow'], $name) && is_dir($cfg['root']) . $folder) {
|
||||
$reply['isSuccess'] = rename($cfg['root'] . $folder, $cfg['root'] . substr($folder, 0, strrpos($folder, '/')) . DIR_SEP . $name);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'deleteFolder':
|
||||
$reply['isDelete'] = false;
|
||||
$folder = trim($dir, '/\\');
|
||||
|
||||
if (!empty($folder) && $cfg['url'] != $folder && !in_array($cfg['url'] . DIR_SEP . $folder, $cfg['deny']['folder'])) {
|
||||
deleteDir($cfg['root'] . $cfg['thumb']['dir'] . DIR_SEP. $folder);
|
||||
$reply['isDelete'] = deleteDir($cfg['root'] . $folder);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'uploads':
|
||||
$reply['downloaded'] = array();
|
||||
$width = isset($_POST['resizeWidth'])? intval($_POST['resizeWidth']) : 0;
|
||||
$height = isset($_POST['resizeHeight'])? intval($_POST['resizeHeight']): 0;
|
||||
|
||||
$key = 'uploadFiles';
|
||||
if (!empty($dir) && '/' != $dir && !empty($_FILES[$key])) {
|
||||
for ($i=-1, $iCount=count($_FILES[$key]['name']); ++$i<$iCount;) {
|
||||
$ext = substr($_FILES[$key]['name'][$i], strrpos($_FILES[$key]['name'][$i], '.') + 1);
|
||||
$ext = strtolower($ext);
|
||||
if (!in_array($ext, $cfg['deny'][$cfg['type']]) && in_array($ext, $cfg['allow'][$cfg['type']])) {
|
||||
$freeName = getFreeFileName($_FILES[$key]['name'][$i], $cfg['root'] . $dir);
|
||||
if (in_array($ext, $cfg['allow']['image'])) {
|
||||
if ($width || $height) {
|
||||
create_thumbnail($_FILES[$key]['tmp_name'][$i], $cfg['root'] . $dir . $freeName, $width, $height, 100, false, true);
|
||||
chmod($cfg['root'] . $dir . $freeName, $cfg['chmod']['file']);
|
||||
} else {
|
||||
if (move_uploaded_file($_FILES[$key]['tmp_name'][$i], $cfg['root'] . $dir . $freeName)) {
|
||||
chmod($cfg['root'] . $dir . $freeName, $cfg['chmod']['file']);
|
||||
if ($cfg['thumb']['auto']) {
|
||||
create_thumbnail($cfg['root'] . $dir . $freeName, $cfg['root'] . $cfg['thumb']['dir'] . DIR_SEP . $dir . DIR_SEP. $freeName);
|
||||
chmod($cfg['root'] . $cfg['thumb']['dir'] . DIR_SEP . $dir . DIR_SEP. $freeName, $cfg['chmod']['file']);
|
||||
}
|
||||
$reply['downloaded'][] = array(true, $freeName);
|
||||
} else {
|
||||
$reply['downloaded'][] = array(false, $freeName);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (move_uploaded_file($_FILES[$key]['tmp_name'][$i], $cfg['root'] . $dir . $freeName)) {
|
||||
chmod($cfg['root'] . $dir . $freeName, $cfg['chmod']['file']);
|
||||
$reply['downloaded'][] = array(true, $freeName);
|
||||
} else {
|
||||
$reply['downloaded'][] = array(false, $freeName);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$reply['downloaded'][] = array(false, $_FILES[$key]['name'][$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'QuickUpload':
|
||||
switch ($cfg['type']) {
|
||||
case 'file':
|
||||
case 'flash':
|
||||
case 'image':
|
||||
case 'media':
|
||||
$dir = $cfg['type'];
|
||||
break;
|
||||
default:
|
||||
exit; // exit for not supported type
|
||||
break;
|
||||
}
|
||||
if (!is_dir(is_dir($toDir = $cfg['root'] . $dir . DIR_SEP . $cfg['quickdir']))) {
|
||||
mkdir($toDir, $cfg['chmod']['folder']);
|
||||
}
|
||||
|
||||
if (0 == ($_FILES['upload']['error'])) {
|
||||
$fileName = getFreeFileName($_FILES['upload']['name'], $toDir);
|
||||
$ext = substr($fileName, strrpos($fileName, '.') + 1);
|
||||
$ext = strtolower($ext);
|
||||
if (!in_array($ext, $cfg['deny'][$cfg['type']]) && in_array($ext, $cfg['allow'][$cfg['type']]) && move_uploaded_file($_FILES['upload']['tmp_name'], $toDir . DIR_SEP . $fileName)) {
|
||||
$result = "<script type=\"text/javascript\">window.parent.CKEDITOR.tools.callFunction(1, '/". $cfg['url'] . '/' . $dir . '/' . (empty($cfg['quickdir'])? '' : trim($cfg['quickdir'], '/\\') . '/') . $fileName."', '');</script>";
|
||||
} else {
|
||||
$result = 'Error loading or banned file type';
|
||||
}
|
||||
}
|
||||
|
||||
exit($result);
|
||||
break;
|
||||
|
||||
case 'deleteFiles':
|
||||
$files = urldecode($_POST['files']);
|
||||
$files = explode('::', $files);
|
||||
for ($i=-1, $iCount=count($files); ++$i<$iCount;) {
|
||||
unlink($cfg['root'] . $dir . $files[$i]);
|
||||
file_exists($_thumb = $cfg['root'] . $cfg['thumb']['dir'] . DIR_SEP. $dir . DIR_SEP . $files[$i])? unlink($_thumb): null;
|
||||
}
|
||||
|
||||
$reply['files'] = listFiles($dir);
|
||||
break;
|
||||
|
||||
case 'getFiles':
|
||||
$reply['files'] = listFiles($dir);
|
||||
break;
|
||||
|
||||
case 'getDirs':
|
||||
$reply['dirs'] = listDirs($dir);
|
||||
break;
|
||||
|
||||
default:
|
||||
exit;
|
||||
break;
|
||||
}
|
||||
|
||||
if (isset($_GET['noJson'])) {echo'<pre>';print_r($reply);echo'</pre>';exit;}
|
||||
exit( json_encode( $reply ) );
|
||||
25
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/ajax/php/lang/ru.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
function translit($input_string)
|
||||
{
|
||||
$trans = array();
|
||||
$ch1 = "/\r\n-абвгдеёзийклмнопрстуфхцыэАБВГДЕЁЗИЙКЛМНОПРСТУФХЦЫЭABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
$ch2 = " abvgdeeziyklmnoprstufhcyeabvgdeeziyklmnoprstufhcyeabcdefghijklmnopqrstuvwxyz";
|
||||
for($i=0; $i<mb_strlen($ch1); $i++)
|
||||
$trans[mb_substr($ch1, $i, 1)] = mb_substr($ch2, $i, 1);
|
||||
$trans["Ж"] = "zh"; $trans["ж"] = "zh";
|
||||
$trans["Ч"] = "ch"; $trans["ч"] = "ch";
|
||||
$trans["Ш"] = "sh"; $trans["ш"] = "sh";
|
||||
$trans["Щ"] = "sch"; $trans["щ"] = "sch";
|
||||
$trans["Ъ"] = ""; $trans["ъ"] = "";
|
||||
$trans["Ь"] = ""; $trans["ь"] = "";
|
||||
$trans["Ю"] = "yu"; $trans["ю"] = "yu";
|
||||
$trans["Я"] = "ya"; $trans["я"] = "ya";
|
||||
$trans["\\\\"] = " ";
|
||||
$trans["[^\. a-z0-9]"] = " ";
|
||||
$trans["^[ ]+|[ ]+$"] = "";
|
||||
$trans["[ ]+"] = "_";
|
||||
foreach($trans as $from=>$to)
|
||||
$input_string = mb_ereg_replace(str_replace("\\", "\\", $from), $to, $input_string);
|
||||
return $input_string;
|
||||
}
|
||||
437
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/ajax/php/lib.php
vendored
Normal file
@@ -0,0 +1,437 @@
|
||||
<?php
|
||||
/**
|
||||
* Ajex.FileManager
|
||||
* http://demphest.ru/ajex-filemanager
|
||||
*
|
||||
* @version
|
||||
* 1.1 (15 Dec 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2009 Demphest Gorphek
|
||||
*
|
||||
* @license
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* Ajex.FileManager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This file is part of Ajex.FileManager.
|
||||
*/
|
||||
|
||||
|
||||
isset($_GET['isWork'])? isWork() : null;
|
||||
|
||||
if (isset($_GET['downloadFile'])) {
|
||||
|
||||
$file = realpath($cfg['root'] . trim($_GET['downloadFile'], '/\\'));
|
||||
$file = str_replace('\\', DIR_SEP, $file);
|
||||
if (empty($file) || false === strpos($file, str_replace('\\', DIR_SEP, $cfg['root']))) {
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
exit;
|
||||
}
|
||||
|
||||
$inf = pathinfo($file);
|
||||
if (!in_array(strtolower($inf['extension']), $cfg['allow']['file'])) {
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
exit;
|
||||
}
|
||||
$inf['size'] = filesize($file);
|
||||
|
||||
header("Pragma: public");
|
||||
header("Expires: 0");
|
||||
header("Cache-Control: private", false);
|
||||
header("Content-Disposition: attachment; filename=" . urlencode($inf['basename']));
|
||||
header("Content-Type: application/force-download");
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Type: application/download");
|
||||
header("Content-Description: File Transfer");
|
||||
header("Content-Length: " . $inf['size']);
|
||||
|
||||
if (50000000 > $inf['size']) {
|
||||
flush();
|
||||
$fp = fopen($file, "r");
|
||||
while (!feof($fp)) {
|
||||
echo fread($fp, 65536);
|
||||
flush();
|
||||
}
|
||||
fclose($fp);
|
||||
} else {
|
||||
readfile($file);
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
function listDirs($dir)
|
||||
{
|
||||
global $cfg;
|
||||
$list = array();
|
||||
|
||||
$full = $cfg['root'] . trim($dir, '/\\') . DIR_SEP;
|
||||
$dirs = scandir($full);
|
||||
for ($i=-1, $iCount=count($dirs); ++$i<$iCount;) {
|
||||
if (is_dir($full . $dirs[$i]) && !in_array($dirs[$i], $cfg['hide']['folder'])) {
|
||||
$stats = getSize($full . $dirs[$i] . DIR_SEP, 'dir');
|
||||
$list[] = array(
|
||||
'title' => $dirs[$i] . ' <i>' . $stats['_size'] . '</i>',
|
||||
'key' => urlencode($dir . $dirs[$i]),
|
||||
'isLazy' => true,
|
||||
'isFolder' => true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
function listFiles($dir)
|
||||
{
|
||||
global $cfg;
|
||||
$list = array();
|
||||
|
||||
$full = $cfg['root'] . trim($dir, '/\\') . DIR_SEP;
|
||||
$thumb = $cfg['root'] . $cfg['thumb']['dir'] . DIR_SEP . trim($dir, '/\\') . DIR_SEP;
|
||||
|
||||
$files = scandir($full);
|
||||
natcasesort($files);
|
||||
for ($i=-1, $iCount=count($files); ++$i<$iCount;) {
|
||||
$ext = substr($files[$i], strrpos($files[$i], '.') + 1);
|
||||
$ext = strtolower($ext);
|
||||
if (!in_array($files[$i], $cfg['hide']['file']) && !in_array($ext, $cfg['deny'][$cfg['type']]) && in_array($ext, $cfg['allow'][$cfg['type']]) && is_file($full . $files[$i])) {
|
||||
|
||||
$imgSize = array(0, 0);
|
||||
if (in_array($ext, $cfg['allow']['image'])) {
|
||||
if ($cfg['thumb']['auto'] && !file_exists($thumb . $files[$i])) {
|
||||
create_thumbnail($full . $files[$i], $thumb . $files[$i]);
|
||||
}
|
||||
$imgSize = getimagesize($full . $files[$i]);
|
||||
}
|
||||
|
||||
$stats = getSize($full . $files[$i]);
|
||||
|
||||
$list[] = array( 'name' => $files[$i],
|
||||
'ext' => $ext,
|
||||
'width' => $imgSize[0],
|
||||
'height' => $imgSize[1],
|
||||
'size' => $stats['_size'],
|
||||
'date' => date($cfg['thumb']['date'], $stats['mtime']),
|
||||
'r_size' => $stats['size'],
|
||||
'mtime' => $stats['mtime'],
|
||||
'thumb' => '/' . $cfg['url'] . '/' . $cfg['thumb']['dir'] . '/' . $dir . $files[$i]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
switch($cfg['sort']) {
|
||||
case 'size':
|
||||
usort($list, 'sortSize');
|
||||
break;
|
||||
case 'date':
|
||||
usort($list, 'sortDate');
|
||||
break;
|
||||
default: //name
|
||||
break;
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
function dirSize($dirFile)
|
||||
{
|
||||
$size = 0;
|
||||
$dir = opendir($dirFile);
|
||||
if (!$dir) return false;
|
||||
|
||||
while (false !== ($f = readdir($dir))) {
|
||||
if ($f[0] == '.') continue;
|
||||
if (is_dir($dirFile . $f)) {
|
||||
$size += dirSize($dirFile . $f . DIR_SEP);
|
||||
} else {
|
||||
$size += filesize($dirFile . $f);
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
return $size;
|
||||
}
|
||||
|
||||
function getSize($dirFile, $mode = 'file')
|
||||
{
|
||||
if ('file' == $mode) {
|
||||
$stats = stat($dirFile);
|
||||
} elseif ('dir' == $mode) {
|
||||
$stats['size'] = dirSize($dirFile);
|
||||
}
|
||||
|
||||
if (empty($stats['size'])) {
|
||||
$stats['_size'] = '';
|
||||
} elseif ($stats['size'] < 1024) {
|
||||
$stats['_size'] .= ' B';
|
||||
} elseif ($stats['size'] < 1048576) {
|
||||
$stats['_size'] = round($stats['size'] / 1024) . ' KB';
|
||||
} else {
|
||||
$stats['_size'] = round($stats['size'] / 1048576, 2) . ' MB';
|
||||
}
|
||||
|
||||
return $stats;
|
||||
}
|
||||
|
||||
|
||||
function create_thumbnail($orig_fname, $thum_fname, $thumb_width = null, $thumb_height = null, $quality = null, $do_cut = null, $uploadResize = false)
|
||||
{
|
||||
if (!mkdirs(dirname($thum_fname))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$size = @getimagesize($orig_fname);
|
||||
if (false === $size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$rgb = 0xFFFFFF;
|
||||
$src_x = $src_y = 0;
|
||||
|
||||
$format = strtolower(substr($size['mime'], strpos($size['mime'], '/') + 1));
|
||||
$icfunc = 'imagecreatefrom' . $format;
|
||||
if (!function_exists($icfunc)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
0 === $thumb_width? $thumb_width = $size[0] : null;
|
||||
0 === $thumb_height? $thumb_height = $size[1] : null;
|
||||
|
||||
global $cfg;
|
||||
null === $thumb_width? $thumb_width = $cfg['thumb']['width'] : null;
|
||||
null === $thumb_height? $thumb_height = $cfg['thumb']['height']: null;
|
||||
null === $quality? $quality = $cfg['thumb']['quality'] : null;
|
||||
null === $do_cut? $do_cut = $cfg['thumb']['cut'] : null;
|
||||
|
||||
$path = pathinfo($thum_fname);
|
||||
if (!is_dir($path['dirname'])) {
|
||||
$is = mkdir($path['dirname'], $cfg['chmod']['folder']);
|
||||
if (!$is) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$orig_img = $icfunc($orig_fname);
|
||||
if (($size[0] <= $thumb_width) && ($size[1] <= $thumb_height)) {
|
||||
$width = $size[0];
|
||||
$height = $size[1];
|
||||
|
||||
} else {
|
||||
$width = $thumb_width;
|
||||
$height = $thumb_height;
|
||||
|
||||
$ratio_width = $size[0] / $thumb_width;
|
||||
$ratio_height = $size[1] / $thumb_height;
|
||||
|
||||
if ($ratio_width < $ratio_height) {
|
||||
if ($do_cut) {
|
||||
$src_y = ($size[1] - $thumb_height * $ratio_width) / 2;
|
||||
$size[1] = $thumb_height * $ratio_width;
|
||||
} else {
|
||||
$width = $size[0] / $ratio_height;
|
||||
$height = $thumb_height;
|
||||
}
|
||||
|
||||
} else {
|
||||
if ($do_cut) {
|
||||
$src_x = ($size[0] - $thumb_width * $ratio_height) / 2;
|
||||
$size[0] = $thumb_width * $ratio_height;
|
||||
} else {
|
||||
$width = $thumb_width;
|
||||
$height = $size[1] / $ratio_width;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$thum_img = imagecreatetruecolor($width, $height);
|
||||
imagefill($thum_img, 0, 0, $rgb);
|
||||
imagecopyresampled($thum_img, $orig_img, 0, 0, $src_x, $src_y, $width, $height, $size[0], $size[1]);
|
||||
|
||||
//if (function_exists($image_ = 'image' . $format)) {
|
||||
//$image_($thum_img, $thum_fname, $quality);
|
||||
//} else {
|
||||
imagejpeg($thum_img, $thum_fname, $quality);
|
||||
//}
|
||||
|
||||
flush();
|
||||
imagedestroy($orig_img);
|
||||
imagedestroy($thum_img);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function getFreeFileName($fileName, $dir)
|
||||
{
|
||||
global $cfg;
|
||||
$dir = rtrim($dir, DIR_SEP) . DIR_SEP;
|
||||
|
||||
$strlen = mb_strlen($fileName, 'utf-8');
|
||||
$dotPos= mb_strrpos($fileName, '.', null, 'utf-8');
|
||||
|
||||
$fname = mb_substr($fileName, 0, mb_strrpos($fileName, '.', null, 'utf-8'), 'utf-8');
|
||||
$format = mb_substr($fileName, $dotPos+1, ($strlen-$dotPos), 'utf-8');
|
||||
|
||||
$langDir = dirname(__FILE__);
|
||||
if (file_exists($langPhp = $langDir . DIR_SEP . 'lang' . DIR_SEP . $cfg['lang'] . '.php')) {
|
||||
require_once $langPhp;
|
||||
}
|
||||
if (!function_exists('translit')) {
|
||||
function translit($str) {
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
$fname = translit($fname);
|
||||
$f = $fname . '.' . $format;
|
||||
|
||||
if (file_exists($dir . $f)) {
|
||||
|
||||
|
||||
if (false !== ($pos = strrpos($f, '_')) && !in_array($f{$pos+1}, array(0,1,2,3,4,5,6,7,8,9))) {
|
||||
$symname = substr($f, 0, $pos);
|
||||
} else {
|
||||
$symname = $fname;
|
||||
}
|
||||
|
||||
|
||||
$symname = $fname;
|
||||
|
||||
$i = 0;
|
||||
$exist = true;
|
||||
while ($exist && ++$i < 777) {// :)
|
||||
$new_name = $symname . '_(' . $i . ').' . $format;
|
||||
if (!file_exists($dir . $new_name)) {
|
||||
$exist = false;
|
||||
$f = $new_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $f;
|
||||
}
|
||||
|
||||
function deleteDir($dirname)
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
if (!file_exists($dirname)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_file($dirname)) {
|
||||
return unlink($dirname);
|
||||
}
|
||||
|
||||
$dir = dir($dirname);
|
||||
while (false !== $entry = $dir->read()) {
|
||||
if ('.' == $entry || '..' == $entry) {
|
||||
continue;
|
||||
}
|
||||
|
||||
deleteDir($dirname . DIR_SEP . $entry);
|
||||
}
|
||||
|
||||
$dir->close();
|
||||
|
||||
return rmdir($dirname);
|
||||
}
|
||||
|
||||
function mkdirs($dir, $mode=0777)
|
||||
{
|
||||
if (empty($dir)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_dir($dir) || '/' === $dir) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mkdirs(dirname($dir), $mode)) {
|
||||
return mkdir($dir, $mode);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function sortDate($a, $b)
|
||||
{
|
||||
if ($a['mtime'] == $b['mtime']) return -1;
|
||||
if ($a['mtime'] < $b['mtime']) return 1;
|
||||
return 0;
|
||||
}
|
||||
function sortSize($a, $b)
|
||||
{
|
||||
if ($a['r_size'] == $b['r_size']) return -1;
|
||||
if ($a['r_size'] < $b['r_size']) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!function_exists('scandir')) {
|
||||
function scandir($dir)
|
||||
{
|
||||
$dh = opendir($dir);
|
||||
$files = array();
|
||||
while (false !== ($filename = readdir($dh))) {
|
||||
$files[] = $filename;
|
||||
}
|
||||
|
||||
return $files;
|
||||
}
|
||||
}
|
||||
|
||||
function isWork()
|
||||
{
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
global $cfg;
|
||||
if (!is_dir($cfg['root'])) {
|
||||
echo 'Directory not found: ' . $cfg['root'], '<br />';
|
||||
if (mkdirs($cfg['root'], $cfg['chmod']['folder'])) {
|
||||
echo 'Successfully created';
|
||||
} else {
|
||||
echo 'Failed created, You need to create the folder manually, or set the right<br />Вам необходимо создать папку вручную, или выставить права';
|
||||
exit;
|
||||
}
|
||||
} elseif (!is_writable($cfg['root'])) {
|
||||
echo 'No write access to folder: ' . $cfg['root'], '<br />Нет доступа на запись.';
|
||||
} else {
|
||||
echo '<font color=green>Root directory in order<br />Корневая директория в порядке.</font>';
|
||||
}
|
||||
echo '<hr />';
|
||||
|
||||
$type = array($cfg['thumb']['dir'], 'file', 'flash', 'image');
|
||||
for ($i=-1;++$i<4;) {
|
||||
$d = $cfg['root'] . $type[$i];
|
||||
if (!is_dir($d)) {
|
||||
echo 'Directory not found: ' . $d, '<br />';
|
||||
if (mkdirs($d, $cfg['chmod']['folder'])) {
|
||||
echo 'Successfully created';
|
||||
} else {
|
||||
echo 'Failed created, You need to create the folder manually, or set the right<br />Вам необходимо создать папку вручную, или выставить права';
|
||||
exit;
|
||||
}
|
||||
} elseif (!is_writable($d)) {
|
||||
echo 'No write access to folder: ' . $d, '<br />Нет доступа на запись.';
|
||||
} else {
|
||||
echo $type[$i] . ' - <font color=green>normal</font>';
|
||||
}
|
||||
echo '<br />';
|
||||
}
|
||||
echo '<hr />';
|
||||
|
||||
echo 'Check available extensions: ';
|
||||
$ext = array('json_encode', 'mb_internal_encoding', 'mb_substr', 'mb_ereg_replace', 'mb_strlen', 'imagecreatetruecolor', 'imagefill', 'imagecopyresampled', 'imagejpeg', 'imagedestroy');
|
||||
for ($i=-1, $iCount=count($ext); ++$i<$iCount;) {
|
||||
echo '<br />';
|
||||
echo function_exists($ext[$i])? $ext[$i] . ' - <font color=green>yes</font> ' : $ext[$i] . ' - <font color=red>no</font>';
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
24
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/ajex.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Ajex.FileManager
|
||||
* http://demphest.ru/ajex-filemanager
|
||||
*
|
||||
* @version
|
||||
* 1.0 (1 Oct 2009)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2009 Demphest Gorphek
|
||||
*
|
||||
* @license
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* Ajex.FileManager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This file is part of Ajex.FileManager.
|
||||
*/
|
||||
|
||||
eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c+'\\b','g'),k[c])}}return p}('17 27={51:38(3){15(\'20\'==22(3))3={};2.6=3.6||38(){17 31=65.66(\'64\');40(17 9=-1;++9<31.36;){15(31[9].46(\'19\')&&-1!=(19=31[9].46(\'19\')).63(\'/61.62\')){21 19.34(0,19.67(\'/\'))}}42(\'60 44 "6" 32 27.51({6:"/6/53/27/"});\');21 68}();15(\'/\'==2.6.34(2.6.36-1)){2.6=2.6.34(0,2.6.36-1)}2.5=3.5||\'39\';2.7=3.7||\'73\';2.14=3.14||72;2.16=3.16||71;2.12=3.12||\'69\';2.11=3.11||\'70\';15(\'20\'!=22(3.8)&&45===3.8){2.8=45}18{2.8=74}15(\'39\'==2.5){15(\'20\'!=22(3.10)){3.10.13[\'58\']=2.14;3.10.13[\'56\']=2.16;3.10.13[\'54\']=2.6+\'/26.25?4=37&7=\'+2.7+\'&11=\'+2.11+\'&5=\'+2.5+\'&12=\'+2.12+\'&8=\'+2.8;3.10.13[\'59\']=2.6+\'/23/\'+2.7+\'/23.\'+2.7+\'?4=37&52=41\';17 4=[\'55\',\'57\'];40(17 9 32 4){3.10.13[\'29\'+4[9]+\'98\']=2.14;3.10.13[\'29\'+4[9]+\'94\']=2.16;3.10.13[\'29\'+4[9]+\'95\']=2.6+\'/26.25?4=\'+4[9].24()+\'&7=\'+2.7+\'&11=\'+2.11+\'&5=\'+2.5+\'&12=\'+2.12+\'&8=\'+2.8;3.10.13[\'29\'+4[9]+\'93\']=2.6+\'/23/\'+2.7+\'/23.\'+2.7+\'?52=41&4=\'+4[9].24()}}18{42(\'92 90 53 91 43 96 32 43 44 "10"\')}}18 15(\'50\'==2.5){}18{2.4=3.4||\'37\';2.28=2.6+\'/26.25?4=\'+2.4.24()+\'&7=\'+2.7+\'&11=\'+2.11+\'&12=\'+2.12+\'&8=\'+2.8;2.48=\'14=\'+2.14+\',16=\'+2.16+\'97=1,75=0,101=0,100=1,99=0,89=0,88=,80=\'}21},35:38(3,28,4,30){15(\'20\'!=22(3.5)){5=3.5}18{5=2.5}79(5){49\'39\':33;49\'50\':78.76.77.35({28:2.6+\'/26.25?4=\'+4.24()+\'&7=\'+2.7+\'&5=\'+2.5+\'&11=\'+2.11+\'&12=\'+2.12+\'&8=\'+2.8,14:2.14,16:2.16,81:\'82\',87:\'86\'},{47:30,85:3});33;83:17 30=47.35(2.28+\'&5=\'+5,\'27\',2.48);30.84();33}21}}',10,102,'||this|params|type|returnTo|path|connector|contextmenu|i|editor|lang|skin|config|width|if|height|var|else|src|undefined|return|typeof|ajax|toLowerCase|html|index|AjexFileManager|url|filebrowser|win|s|in|break|substring|open|length|file|function|ckeditor|for|QuickUpload|alert|the|variable|false|getAttribute|window|args|case|tinymce|init|mode|to|filebrowserBrowseUrl|Flash|filebrowserWindowHeight|Image|filebrowserWindowWidth|filebrowserUploadUrl|Undefined|ajex|js|indexOf|script|document|getElementsByTagName|lastIndexOf|null|dark|ru|660|1000|php|true|menubar|activeEditor|windowManager|tinyMCE|switch|screeny|inline|yes|default|focus|input|no|close_previous|screenx|top|need|pass|You|UploadUrl|WindowHeight|BrowseUrl|object|resizable|WindowWidth|left|location|scrollbars'.split('|')))
|
||||
97
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/index.html
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Ajex.FileManager v1.0</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="author" content="Demphest Gorphek" />
|
||||
<meta name="copyright" content="<22> 2009 demphest.ru" />
|
||||
<link type="text/css" href="lib/dynatree/skin/ui.dynatree.css" rel="stylesheet" />
|
||||
<script type="text/javascript" src="lib/pack.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="dirs">
|
||||
<div class="dirsMenu">
|
||||
<div class="about"><a href="">About</a></div>
|
||||
<div class="folderMenu"></div>
|
||||
</div>
|
||||
<div id="dirsList"></div>
|
||||
<form id="filesUploadForm" action="" enctype="multipart/form-data">
|
||||
<input type="hidden" name="dir" value="" />
|
||||
<input type="hidden" name="type" value="file" />
|
||||
<div id="uploadList">
|
||||
<div class="selectLang"><span lang="chooseFileUpload">Choose file</span></div>
|
||||
<div class="selectFile"><div><input type="file" name="uploadFiles[]" class="multi" /></div></div>
|
||||
</div>
|
||||
<div class="resizeGraph">
|
||||
<span lang="resizeGraph">Resize graphics files to</span>:<br />
|
||||
<span lang="width" class="txtBlock">Width</span>: <input type="text" id="resizeWidth" name="resizeWidth" value="" />
|
||||
<span lang="or">or</span><br />
|
||||
<span lang="height" class="txtBlock">Height</span>: <input type="text" id="resizeHeight" name="resizeHeight" value="" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="files">
|
||||
<div id="menu">
|
||||
<div class="view">
|
||||
<span lang="view">View:</span>
|
||||
<label for="viewlist"><input type="radio" id="viewlist" name="view" value="" /> <span lang="list">List</span></label>
|
||||
<label for="viewthumb"><input type="radio" id="viewthumb" name="view" value="" checked="checked" /> <span lang="images">Images</span></label>
|
||||
</div>
|
||||
<div class="display">
|
||||
<!--span lang="display">Display:</span-->
|
||||
<label for="fileName"><input type="checkbox" id="fileName" name="fileName" value="" checked="checked" /> <span lang="fileName">File Name</span> </label>
|
||||
<label for="fileDate"><input type="checkbox" id="fileDate" name="fileDate" value="" /> <span lang="fileDate">Date</span> </label>
|
||||
<label for="fileSize"><input type="checkbox" id="fileSize" name="fileSize" value="" /> <span lang="fileSize">Size</span></label>
|
||||
</div>
|
||||
<div class="sort">
|
||||
<span lang="sort">Sort:</span>
|
||||
<label for="sortName"><input type="radio" id="sortName" name="sort" value="" checked="checked" /> <span lang="sortName">Name</span> </label>
|
||||
<label for="sortDate"><input type="radio" id="sortDate" name="sort" value="" /> <span lang="sortDate">Date</span> </label>
|
||||
<label for="sortSize"><input type="radio" id="sortSize" name="sort" value="" /> <span lang="sortSize">Size</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="fileList">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><input type="checkbox" id="checkAll" name="checkAll" value="1" /></td>
|
||||
<td><span lang="fileName">File Name</span></td>
|
||||
<td><span lang="fileDate">Date</span></td>
|
||||
<td><span lang="fileSize">Size</span></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div id="fileThumb"></div>
|
||||
</div>
|
||||
<div id="status"><div class="l"></div><div id="loading"></div><div class="r"><div></div></div></div>
|
||||
<div id="dialog" title=""><div class="c"></div></div>
|
||||
<div id="dowloaded"></div>
|
||||
|
||||
<div id="author"><div>
|
||||
<strong>Author Demphest Gorphek (<a href="http://demphest.ru/ajex-filemanager">demphest.ru</a>)</strong>
|
||||
<br />
|
||||
<br />In the process of creation used the following components, for which it separate thanks ;-)
|
||||
<br /><br />
|
||||
<ul>
|
||||
<li>jQuery (<a href="http://jquery.com/">jquery.com</a>)
|
||||
<ul>
|
||||
<li>jQuery UI (<a href="http://jqueryui.com/about">jqueryui.com</a>)</li>
|
||||
<li>jquery.dynatree - Martin Wendt (<a href="http://wwWendt.de">wwWendt.de</a>)</li>
|
||||
<li>jquery.contextmenu - Matt Kruse (<a href="http://www.JavascriptToolbox.com/lib/contextmenu/">JavascriptToolbox.com</a>)</li>
|
||||
<li>jquery.cookie - Klaus Hartl (<a href="http://stilbuero.de">stilbuero.de</a>)</li>
|
||||
<li>jquery.multifile - Fyneworks.com (<a href="http://www.fyneworks.com/">fyneworks.com</a>)</li>
|
||||
<li>jquery.form - Form Plugin (<a href="http://malsup.com/jquery/form/">malsup.com</a>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Jordan Michael - "120 different file extension icons" (<a href="http://www.jordan-michael.com">jordan-michael.com</a>)</li>
|
||||
<li>Mark James - "Icons used in menu" (<a href="http://www.famfamfam.com/">famfamfam.com</a>)</li>
|
||||
</ul>
|
||||
</div></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
60
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lang/en.js
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
$lang = {
|
||||
'location': 'Location',
|
||||
'allowRegSymbol': 'Allowed to use the Latin alphabet, numbers, and symbols:<br />- _ = # ~ $ % & ( ) [ ]',
|
||||
'send': 'Send',
|
||||
'cancel': 'Cancel',
|
||||
'or': 'or',
|
||||
'successUpload': 'Download successful',
|
||||
'chooseDownloads': 'First, choose downloads',
|
||||
'deleteChecked': 'Remove Checked',
|
||||
|
||||
'folderExist': 'This folder already exists',
|
||||
'enterNameCreateFolder': 'Enter the name of new folder',
|
||||
'enterNewNameFile': 'Enter the new file name',
|
||||
'enterNewNameFolder': 'Enter the new folder name',
|
||||
|
||||
'successDeleteFolder': 'The folder and all contents therein are removed',
|
||||
'failedDeleteFolder' : 'Unable to delete a folder or not',
|
||||
|
||||
'size': 'Size',
|
||||
'fileOf': ' files',
|
||||
|
||||
'chooseFileUpload': 'Select files',
|
||||
'deniedExt': 'Files of this type are prohibited: $ext',
|
||||
'selected': 'Selected: $file',
|
||||
'removeFile': '<img src="skin/_ico/cross.png" alt="X" />',
|
||||
'duplicate': 'This file is already in the list:\n $file',
|
||||
|
||||
'width': 'Width',
|
||||
'height': 'Height',
|
||||
'resizeGraph': 'Resize images to',
|
||||
|
||||
'view': 'View: ',
|
||||
'list': 'List',
|
||||
'images': 'Images',
|
||||
|
||||
'display': 'Display: ',
|
||||
'fileName': 'Filename',
|
||||
'fileDate': 'Date',
|
||||
'fileSize': 'Size',
|
||||
|
||||
'sort': 'Ordering: ',
|
||||
'sortName': 'Name',
|
||||
'sortDate': 'Date',
|
||||
'sortSize': 'Size',
|
||||
|
||||
'select': 'Select',
|
||||
'selectThumb': 'Choose a thumbnail',
|
||||
'lookAt': 'Look',
|
||||
'downloadFile': 'Download file',
|
||||
'renameFile': 'Rename file',
|
||||
'deleteFile' : 'Delete file',
|
||||
'deleteCheckedFile': 'Delete selected files',
|
||||
|
||||
'update': 'Refresh',
|
||||
'createFolder': 'Create subfolder',
|
||||
'renameFolder': 'Rename folder',
|
||||
'deleteFolder': 'Delete folder',
|
||||
'uploadSelectFiles' : 'Download selected files',
|
||||
'resultUpload': 'Result upload'
|
||||
}
|
||||
60
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lang/pt.js
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
$lang = {
|
||||
'location': 'Local',
|
||||
'allowRegSymbol': 'Permitido usar alfabeto latino, números e símbolos:<br />- _ = # ~ $ % & ( ) [ ]',
|
||||
'send': 'Enviar',
|
||||
'cancel': 'Cancelar',
|
||||
'or': 'ou',
|
||||
'successUpload': 'Carregamento realizado com sucesso',
|
||||
'chooseDownloads': 'Primeiro, escolha o arquivo',
|
||||
'deleteChecked': 'Deselecionar',
|
||||
|
||||
'folderExist': 'Esta pasta já existe',
|
||||
'enterNameCreateFolder': 'Entre com o nome da pasta',
|
||||
'enterNewNameFile': 'Entre com o nome do arquivo',
|
||||
'enterNewNameFolder': 'Entre com o nome da nova pasta',
|
||||
|
||||
'successDeleteFolder': 'A pasta e todos os conteúdos nele são removidos',
|
||||
'failedDeleteFolder' : 'Não é possível excluir uma pasta ou não',
|
||||
|
||||
'size': 'Tamanho',
|
||||
'fileOf': ' arquivos',
|
||||
|
||||
'chooseFileUpload': 'Carregar',
|
||||
'deniedExt': 'Arquivos deste tipo são proibidos: $ext',
|
||||
'selected': 'Selecionado: $file',
|
||||
'removeFile': '<img src="skin/_ico/cross.png" alt="X" />',
|
||||
'duplicate': 'Este arquivo já existe na lista:\n $file',
|
||||
|
||||
'width': 'Largura',
|
||||
'height': 'Altura',
|
||||
'resizeGraph': 'Redimensionar',
|
||||
|
||||
'view': 'Ver: ',
|
||||
'list': 'Lista',
|
||||
'images': 'Imagens',
|
||||
|
||||
'display': 'Display: ',
|
||||
'fileName': 'Nome',
|
||||
'fileDate': 'Data',
|
||||
'fileSize': 'Tamanho',
|
||||
|
||||
'sort': 'Ordem: ',
|
||||
'sortName': 'Nome',
|
||||
'sortDate': 'Date',
|
||||
'sortSize': 'Tamanho',
|
||||
|
||||
'select': 'Selecionar',
|
||||
'selectThumb': 'Selecionar miniatura',
|
||||
'lookAt': 'Visualizar',
|
||||
'downloadFile': 'Baixar arquivo',
|
||||
'renameFile': 'Renomear arquivo',
|
||||
'deleteFile' : 'Apagar arquivo',
|
||||
'deleteCheckedFile': 'Apagar arquivos selecionados',
|
||||
|
||||
"update":"Atualizar",
|
||||
"createFolder":"Criar subpasta",
|
||||
"renameFolder":"Renomear pasta",
|
||||
"deleteFolder":"Apagar pasta",
|
||||
"uploadSelectFiles":"Carregar arquivos selecionados",
|
||||
"resultUpload":"Resultados do carregamento"
|
||||
}
|
||||
60
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lang/ru.js
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
$lang = {
|
||||
'location': 'Расположение',
|
||||
'allowRegSymbol': 'Разрешeно использовать латиницу, цифры, а также символы:<br />- _ = # ~ $ % & ( ) [ ]',
|
||||
'send': 'Отправить',
|
||||
'cancel': 'Отмена',
|
||||
'or': 'или',
|
||||
'successUpload': 'Загрузка прошла успешно',
|
||||
'chooseDownloads': 'Сначала выберите загружаемые файлы',
|
||||
'deleteChecked': 'Удалить отмеченное',
|
||||
|
||||
'folderExist': 'Такая папка уже существует',
|
||||
'enterNameCreateFolder': 'Введите имя создаваемой папки',
|
||||
'enterNewNameFile': 'Введите новое имя файла',
|
||||
'enterNewNameFolder': 'Введите новое имя папки',
|
||||
|
||||
'successDeleteFolder': 'Папка и всё содержимое в ней удалены',
|
||||
'failedDeleteFolder' : 'Не удалось удалить папку или невозможно',
|
||||
|
||||
'size': 'Размер',
|
||||
'fileOf': ' файл(ов)',
|
||||
|
||||
'chooseFileUpload': 'Выбрать файлы',
|
||||
'deniedExt': '$ext - файлы запрещены для загрузки',
|
||||
'selected': 'Выбран: $file',
|
||||
'removeFile': '<img src="skin/_ico/cross.png" alt="X" />',
|
||||
'duplicate': 'Этот файл уже в списке:\n $file',
|
||||
|
||||
'width': 'Ширины',
|
||||
'height': 'Высоты',
|
||||
'resizeGraph': 'Сжать изображения до',
|
||||
|
||||
'view': 'Вид: ',
|
||||
'list': 'Список',
|
||||
'images': 'Изображения',
|
||||
|
||||
'display': 'Отображать: ',
|
||||
'fileName': 'Имя файла',
|
||||
'fileDate': 'Дата',
|
||||
'fileSize': 'Размер',
|
||||
|
||||
'sort': 'Сортировать по: ',
|
||||
'sortName': 'Имени',
|
||||
'sortDate': 'Дате',
|
||||
'sortSize': 'Размеру',
|
||||
|
||||
'select': 'Выбрать',
|
||||
'selectThumb': 'Выбрать это превью',
|
||||
'lookAt': 'Посмотреть',
|
||||
'downloadFile': 'Скачать файл',
|
||||
'renameFile': 'Переименовать файл',
|
||||
'deleteFile' : 'Удалить файл',
|
||||
'deleteCheckedFile': 'Удалить отмеченные файлы',
|
||||
|
||||
'update': 'Обновить',
|
||||
'createFolder': 'Создать подпапку',
|
||||
'renameFolder': 'Переименовать папку',
|
||||
'deleteFolder': 'Удалить папку',
|
||||
'uploadSelectFiles' : 'Загрузить выбранные файлы',
|
||||
'resultUpload': 'Результат загрузки'
|
||||
}
|
||||
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/cbChecked.gif
vendored
Normal file
|
After Width: | Height: | Size: 887 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/cbChecked_hover.gif
vendored
Normal file
|
After Width: | Height: | Size: 880 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/cbIntermediate.gif
vendored
Normal file
|
After Width: | Height: | Size: 922 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/cbIntermediate_hover.gif
vendored
Normal file
|
After Width: | Height: | Size: 885 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/cbUnchecked.gif
vendored
Normal file
|
After Width: | Height: | Size: 877 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/cbUnchecked_hover.gif
vendored
Normal file
|
After Width: | Height: | Size: 873 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/customDoc1.gif
vendored
Normal file
|
After Width: | Height: | Size: 960 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/customFolder1.gif
vendored
Normal file
|
After Width: | Height: | Size: 1004 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/folder_docs.gif
vendored
Normal file
|
After Width: | Height: | Size: 1007 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/folder_images.gif
vendored
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltD_ne.gif
vendored
Normal file
|
After Width: | Height: | Size: 876 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltD_nes.gif
vendored
Normal file
|
After Width: | Height: | Size: 877 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltDoc.gif
vendored
Normal file
|
After Width: | Height: | Size: 875 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltError.gif
vendored
Normal file
|
After Width: | Height: | Size: 862 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltFld.gif
vendored
Normal file
|
After Width: | Height: | Size: 260 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltFld_o.gif
vendored
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltL_.gif
vendored
Normal file
|
After Width: | Height: | Size: 832 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltL_ne.gif
vendored
Normal file
|
After Width: | Height: | Size: 843 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltL_nes.gif
vendored
Normal file
|
After Width: | Height: | Size: 846 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltL_ns.gif
vendored
Normal file
|
After Width: | Height: | Size: 844 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltM_ne.gif
vendored
Normal file
|
After Width: | Height: | Size: 872 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltM_nes.gif
vendored
Normal file
|
After Width: | Height: | Size: 873 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltP_ne.gif
vendored
Normal file
|
After Width: | Height: | Size: 875 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltP_nes.gif
vendored
Normal file
|
After Width: | Height: | Size: 876 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ltWait.gif
vendored
Normal file
|
After Width: | Height: | Size: 570 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/rbChecked.gif
vendored
Normal file
|
After Width: | Height: | Size: 373 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/rbChecked_hover.gif
vendored
Normal file
|
After Width: | Height: | Size: 945 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/rbIntermediate.gif
vendored
Normal file
|
After Width: | Height: | Size: 306 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/rbIntermediate_hover.gif
vendored
Normal file
|
After Width: | Height: | Size: 906 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/rbUnchecked.gif
vendored
Normal file
|
After Width: | Height: | Size: 356 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/rbUnchecked_hover.gif
vendored
Normal file
|
After Width: | Height: | Size: 941 B |
287
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/dynatree/skin/ui.dynatree.css
vendored
Normal file
@@ -0,0 +1,287 @@
|
||||
/*******************************************************************************
|
||||
* Tree container
|
||||
*/
|
||||
div.ui-dynatree-container
|
||||
{
|
||||
font-family: tahoma, arial, helvetica;
|
||||
font-size: 10pt; /* font size should not be too big */
|
||||
white-space: nowrap;
|
||||
padding: 3px;
|
||||
|
||||
background-color: white;
|
||||
border: 1px dotted gray;
|
||||
}
|
||||
|
||||
/* Style, when control is disabled */
|
||||
.ui-dynatree-disabled div.ui-dynatree-container
|
||||
{
|
||||
opacity: 0.5;
|
||||
/* filter: alpha(opacity=50); /* Yields a css warning */
|
||||
background-color: silver;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Vertical line image
|
||||
*/
|
||||
div.ui-dynatree-container img
|
||||
{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-left: 3px;
|
||||
vertical-align: top;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Common icon definitions
|
||||
*/
|
||||
span.ui-dynatree-empty,
|
||||
span.ui-dynatree-vline,
|
||||
span.ui-dynatree-connector,
|
||||
span.ui-dynatree-expander,
|
||||
span.ui-dynatree-icon,
|
||||
span.ui-dynatree-checkbox,
|
||||
span.ui-dynatree-radio
|
||||
{
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: -moz-inline-box; /* @ FF 1+2 */
|
||||
display: inline-block; /* Required to make a span sizeable */
|
||||
vertical-align: top;
|
||||
background-repeat: no-repeat;
|
||||
background-position: left;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Lines and connectors
|
||||
*/
|
||||
span.ui-dynatree-empty
|
||||
{
|
||||
}
|
||||
span.ui-dynatree-vline
|
||||
{
|
||||
background-image: url("ltL_ns.gif");
|
||||
}
|
||||
span.ui-dynatree-connector
|
||||
{
|
||||
background-image: url("ltL_nes.gif");
|
||||
}
|
||||
.ui-dynatree-lastsib span.ui-dynatree-connector
|
||||
{
|
||||
background-image: url("ltL_ne.gif");
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Expander icon
|
||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||
* so we create combined class names that can be used in the CSS.
|
||||
*
|
||||
* Prefix: ui-dynatree-exp-
|
||||
* 1st character: 'e': expanded, 'c': collapsed
|
||||
* 2nd character (optional): 'd': lazy (Delayed)
|
||||
* 3rd character (optional): 'l': Last sibling
|
||||
*/
|
||||
|
||||
span.ui-dynatree-expander
|
||||
{
|
||||
background-image: url("ltP_nes.gif");
|
||||
cursor: pointer;
|
||||
}
|
||||
.ui-dynatree-exp-cl span.ui-dynatree-expander /* Collapsed, not delayed, last sibling */
|
||||
{
|
||||
background-image: url("ltP_ne.gif");
|
||||
}
|
||||
.ui-dynatree-exp-cd span.ui-dynatree-expander /* Collapsed, delayed, not last sibling */
|
||||
{
|
||||
background-image: url("ltD_nes.gif");
|
||||
}
|
||||
.ui-dynatree-exp-cdl span.ui-dynatree-expander /* Collapsed, delayed, last sibling */
|
||||
{
|
||||
background-image: url("ltD_ne.gif");
|
||||
}
|
||||
.ui-dynatree-exp-e span.ui-dynatree-expander, /* Expanded, not delayed, not last sibling */
|
||||
.ui-dynatree-exp-ed span.ui-dynatree-expander /* Expanded, delayed, not last sibling */
|
||||
{
|
||||
background-image: url("ltM_nes.gif");
|
||||
}
|
||||
.ui-dynatree-exp-el span.ui-dynatree-expander, /* Expanded, not delayed, last sibling */
|
||||
.ui-dynatree-exp-edl span.ui-dynatree-expander /* Expanded, delayed, last sibling */
|
||||
{
|
||||
background-image: url("ltM_ne.gif");
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Checkbox icon
|
||||
*/
|
||||
span.ui-dynatree-checkbox
|
||||
{
|
||||
margin-left: 3px;
|
||||
background-image: url("cbUnchecked.gif");
|
||||
}
|
||||
span.ui-dynatree-checkbox:hover
|
||||
{
|
||||
background-image: url("cbUnchecked_hover.gif");
|
||||
}
|
||||
|
||||
.ui-dynatree-partsel span.ui-dynatree-checkbox
|
||||
{
|
||||
background-image: url("cbIntermediate.gif");
|
||||
}
|
||||
.ui-dynatree-partsel span.ui-dynatree-checkbox:hover
|
||||
{
|
||||
background-image: url("cbIntermediate_hover.gif");
|
||||
}
|
||||
|
||||
.ui-dynatree-selected span.ui-dynatree-checkbox
|
||||
{
|
||||
background-image: url("cbChecked.gif");
|
||||
}
|
||||
.ui-dynatree-selected span.ui-dynatree-checkbox:hover
|
||||
{
|
||||
background-image: url("cbChecked_hover.gif");
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Radiobutton icon
|
||||
* This is a customization, that may be activated by overriding the 'checkbox'
|
||||
* class name as 'ui-dynatree-radio' in the tree options.
|
||||
*/
|
||||
span.ui-dynatree-radio
|
||||
{
|
||||
margin-left: 3px;
|
||||
background-image: url("rbUnchecked.gif");
|
||||
}
|
||||
span.ui-dynatree-radio:hover
|
||||
{
|
||||
background-image: url("rbUnchecked_hover.gif");
|
||||
}
|
||||
|
||||
.ui-dynatree-partsel span.ui-dynatree-radio
|
||||
{
|
||||
background-image: url("rbIntermediate.gif");
|
||||
}
|
||||
.ui-dynatree-partsel span.ui-dynatree-radio:hover
|
||||
{
|
||||
background-image: url("rbIntermediate_hover.gif");
|
||||
}
|
||||
|
||||
.ui-dynatree-selected span.ui-dynatree-radio
|
||||
{
|
||||
background-image: url("rbChecked.gif");
|
||||
}
|
||||
.ui-dynatree-selected span.ui-dynatree-radio:hover
|
||||
{
|
||||
background-image: url("rbChecked_hover.gif");
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Node type icon
|
||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||
* so we create combined class names that can be used in the CSS.
|
||||
*
|
||||
* Prefix: ui-dynatree-ico-
|
||||
* 1st character: 'e': expanded, 'c': collapsed
|
||||
* 2nd character (optional): 'f': folder
|
||||
*/
|
||||
|
||||
span.ui-dynatree-icon /* Default icon */
|
||||
{
|
||||
margin-left: 3px;
|
||||
background-image: url("ltDoc.gif");
|
||||
}
|
||||
|
||||
.ui-dynatree-ico-cf span.ui-dynatree-icon /* Collapsed Folder */
|
||||
{
|
||||
background-image: url("ltFld.gif");
|
||||
}
|
||||
|
||||
.ui-dynatree-ico-ef span.ui-dynatree-icon /* Expanded Folder */
|
||||
{
|
||||
background-image: url("ltFld_o.gif");
|
||||
}
|
||||
|
||||
/* Status node icons */
|
||||
|
||||
.ui-dynatree-statusnode-wait span.ui-dynatree-icon
|
||||
{
|
||||
background-image: url("ltWait.gif");
|
||||
}
|
||||
|
||||
.ui-dynatree-statusnode-error span.ui-dynatree-icon
|
||||
{
|
||||
background-image: url("ltError.gif");
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Node titles
|
||||
*/
|
||||
|
||||
/* Remove blue color and underline from title links */
|
||||
div.ui-dynatree-container a
|
||||
/*, div.ui-dynatree-container a:visited*/
|
||||
{
|
||||
color: black; /* inherit doesn't work on IE */
|
||||
text-decoration: none;
|
||||
vertical-align: top;
|
||||
margin: 0px;
|
||||
margin-left: 3px;
|
||||
/* outline: 0; /* @ Firefox, prevent dotted border after click */
|
||||
}
|
||||
|
||||
div.ui-dynatree-container a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
span.ui-dynatree-document a,
|
||||
span.ui-dynatree-folder a
|
||||
{
|
||||
display: inline-block; /* Better alignment, when title contains <br> */
|
||||
/* vertical-align: top;*/
|
||||
padding-left: 3px;
|
||||
padding-right: 3px; /* Otherwise italic font will be outside bounds */
|
||||
/* line-height: 16px; /* should be the same as img height, in case 16 px */
|
||||
}
|
||||
span.ui-dynatree-folder a
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.ui-dynatree-container a:focus,
|
||||
span.ui-dynatree-focused a:link /* @IE */
|
||||
{
|
||||
background-color: #EFEBDE; /* gray */
|
||||
}
|
||||
|
||||
|
||||
span.ui-dynatree-has-children a
|
||||
{
|
||||
}
|
||||
|
||||
span.ui-dynatree-expanded a
|
||||
{
|
||||
}
|
||||
|
||||
span.ui-dynatree-selected a
|
||||
{
|
||||
color: green;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
span.ui-dynatree-active a
|
||||
{
|
||||
background-color: #3169C6 !important;
|
||||
color: white !important; /* @ IE6 */
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Custom node classes (sample)
|
||||
*/
|
||||
|
||||
span.custom1 a
|
||||
{
|
||||
background-color: maroon;
|
||||
color: yellow;
|
||||
}
|
||||
331
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/lib/pack.js
vendored
Normal file
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/skin/.gif
vendored
Normal file
|
After Width: | Height: | Size: 43 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/skin/_ico/accept.png
vendored
Normal file
|
After Width: | Height: | Size: 781 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/skin/_ico/application_xp_terminal.png
vendored
Normal file
|
After Width: | Height: | Size: 507 B |
BIN
vendor/akdelf/akdmin/themes/office/pub/js/AjexFileManager/skin/_ico/arrow_down.png
vendored
Normal file
|
After Width: | Height: | Size: 379 B |