Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
transformations.lib.php
Содержимое
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Set of functions used with the relation and pdf feature * * @version $Id$ */ /** * returns array of options from string with options separated by comma, removes quotes * * <code> * PMA_transformation_getOptions("'option ,, quoted',abd,'2,3',"); * // array { * // 'option ,, quoted', * // 'abc', * // '2,3', * // '', * // } * </code> * * @uses preg_split() * @uses array_shift() * @uses trim() * @uses rtrim() * @uses ltrim() * @uses strlen() * @uses substr() * @uses stripslashes() * @param string $option_string comma separated options * @return array options */ function PMA_transformation_getOptions($option_string) { $result = array(); if (! strlen($option_string) || ! $transform_options = preg_split('/,/', $option_string)) { return $result; } while (($option = array_shift($transform_options)) !== null) { $trimmed = trim($option); if (strlen($trimmed) > 1 && $trimmed[0] == "'" && $trimmed[strlen($trimmed) - 1] == "'") { // '...' $option = substr($trimmed, 1, -1); } elseif (isset($trimmed[0]) && $trimmed[0] == "'") { // '..., $trimmed = ltrim($option); while (($option = array_shift($transform_options)) !== null) { // ..., $trimmed .= ',' . $option; $rtrimmed = rtrim($trimmed); if ($rtrimmed[strlen($rtrimmed) - 1] == "'") { // ,...' break; } } $option = substr($rtrimmed, 1, -1); } $result[] = stripslashes($option); } return $result; } /** * Gets all available MIME-types * * @access public * @author Garvin Hicking <me@supergarv.de> * @uses opendir() * @uses readdir() * @uses closedir() * @uses sort() * @uses preg_match() * @uses explode() * @uses str_replace() * @staticvar array mimetypes * @return array array[mimetype], array[transformation] */ function PMA_getAvailableMIMEtypes() { static $stack = null; if (null !== $stack) { return $stack; } $stack = array(); $filestack = array(); $handle = opendir('./libraries/transformations'); if (! $handle) { return $stack; } while ($file = readdir($handle)) { $filestack[] = $file; } closedir($handle); sort($filestack); foreach ($filestack as $file) { if (preg_match('|^.*__.*\.inc\.php$|', $file)) { // File contains transformation functions. $base = explode('__', str_replace('.inc.php', '', $file)); $mimetype = str_replace('_', '/', $base[0]); $stack['mimetype'][$mimetype] = $mimetype; $stack['transformation'][] = $mimetype . ': ' . $base[1]; $stack['transformation_file'][] = $file; } elseif (preg_match('|^.*\.inc\.php$|', $file)) { // File is a plain mimetype, no functions. $base = str_replace('.inc.php', '', $file); if ($base != 'global') { $mimetype = str_replace('_', '/', $base); $stack['mimetype'][$mimetype] = $mimetype; $stack['empty_mimetype'][$mimetype] = $mimetype; } } } return $stack; } /** * Gets the mimetypes for all rows of a table * * @uses $GLOBALS['controllink'] * @uses PMA_getRelationsParam() * @uses PMA_backquote() * @uses PMA_sqlAddslashes() * @uses PMA_DBI_fetch_result() * @author Mike Beck <mikebeck@users.sourceforge.net> * @author Garvin Hicking <me@supergarv.de> * @access public * @param string $db the name of the db to check for * @param string $table the name of the table to check for * @param string $strict whether to include only results having a mimetype set * @return array [field_name][field_key] = field_value */ function PMA_getMIME($db, $table, $strict = false) { $cfgRelation = PMA_getRelationsParam(); if (! $cfgRelation['commwork']) { return false; } $com_qry = ' SELECT `column_name`, `mimetype`, `transformation`, `transformation_options` FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']) . ' WHERE `db_name` = \'' . PMA_sqlAddslashes($db) . '\' AND `table_name` = \'' . PMA_sqlAddslashes($table) . '\' AND ( `mimetype` != \'\'' . (!$strict ? ' OR `transformation` != \'\' OR `transformation_options` != \'\'' : '') . ')'; return PMA_DBI_fetch_result($com_qry, 'column_name', null, $GLOBALS['controllink']); } // end of the 'PMA_getMIME()' function /** * Set a single mimetype to a certain value. * * @uses PMA_DBI_QUERY_STORE * @uses PMA_getRelationsParam() * @uses PMA_backquote() * @uses PMA_sqlAddslashes() * @uses PMA_query_as_cu() * @uses PMA_DBI_num_rows() * @uses PMA_DBI_fetch_assoc() * @uses PMA_DBI_free_result() * @uses strlen() * @access public * @param string $db the name of the db * @param string $table the name of the table * @param string $key the name of the column * @param string $mimetype the mimetype of the column * @param string $transformation the transformation of the column * @param string $transformation_options the transformation options of the column * @param string $forcedelete force delete, will erase any existing comments for this column * @return boolean true, if comment-query was made. */ function PMA_setMIME($db, $table, $key, $mimetype, $transformation, $transformation_options, $forcedelete = false) { $cfgRelation = PMA_getRelationsParam(); if (! $cfgRelation['commwork']) { return false; } $test_qry = ' SELECT `mimetype`, `comment` FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']) . ' WHERE `db_name` = \'' . PMA_sqlAddslashes($db) . '\' AND `table_name` = \'' . PMA_sqlAddslashes($table) . '\' AND `column_name` = \'' . PMA_sqlAddslashes($key) . '\''; $test_rs = PMA_query_as_cu($test_qry, true, PMA_DBI_QUERY_STORE); if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) { $row = @PMA_DBI_fetch_assoc($test_rs); PMA_DBI_free_result($test_rs); if (! $forcedelete && (strlen($mimetype) || strlen($transformation) || strlen($transformation_options) || strlen($row['comment']))) { $upd_query = ' UPDATE ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']) . ' SET `mimetype` = \'' . PMA_sqlAddslashes($mimetype) . '\', `transformation` = \'' . PMA_sqlAddslashes($transformation) . '\', `transformation_options` = \'' . PMA_sqlAddslashes($transformation_options) . '\''; } else { $upd_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']); } $upd_query .= ' WHERE `db_name` = \'' . PMA_sqlAddslashes($db) . '\' AND `table_name` = \'' . PMA_sqlAddslashes($table) . '\' AND `column_name` = \'' . PMA_sqlAddslashes($key) . '\''; } elseif (strlen($mimetype) || strlen($transformation) || strlen($transformation_options)) { $upd_query = 'INSERT INTO ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']) . ' (db_name, table_name, column_name, mimetype, transformation, transformation_options) ' . ' VALUES(' . '\'' . PMA_sqlAddslashes($db) . '\',' . '\'' . PMA_sqlAddslashes($table) . '\',' . '\'' . PMA_sqlAddslashes($key) . '\',' . '\'' . PMA_sqlAddslashes($mimetype) . '\',' . '\'' . PMA_sqlAddslashes($transformation) . '\',' . '\'' . PMA_sqlAddslashes($transformation_options) . '\')'; } if (isset($upd_query)){ return PMA_query_as_cu($upd_query); } else { return false; } } // end of 'PMA_setMIME()' function /** * Returns the real filename of a configured transformation * * in fact: it just replaces old php3 with php extension * * garvin: for security, never allow to break out from transformations directory * * @uses PMA_securePath() * @uses preg_replace() * @uses strlen() * @uses file_exists() * @access public * @param string $filename the current filename * @return string the new filename */ function PMA_sanitizeTransformationFile(&$filename) { $include_file = PMA_securePath($filename); // This value can also contain a 'php3' value, in which case we map this filename to our new 'php' variant $testfile = preg_replace('@\.inc\.php3$@', '.inc.php', $include_file); if ($include_file{strlen($include_file)-1} == '3' && file_exists('./libraries/transformations/' . $testfile)) { $include_file = $testfile; $filename = $testfile; // Corrects the referenced variable for further actions on the filename; } return $include_file; } // end of 'PMA_sanitizeTransformationFile()' function ?>
/admin/myadmin2/libraries/
Имя
Дата
Размер
..
2013-06-28
auth
2013-06-28
dbg
2013-06-28
dbi
2013-06-28
engines
2013-06-28
export
2013-06-28
import
2013-06-28
tcpdf
2013-06-28
transformations
2013-06-28
.htaccess
2015-04-04
118 байт
Config.class.php
2013-06-28
34 кб.
File.class.php
2013-06-28
25 кб.
List.class.php
2013-06-28
4 кб.
List_Database.class.php
2013-06-28
18 кб.
StorageEngine.class.php
2013-06-28
15 кб.
Table.class.php
2013-06-28
44 кб.
Theme.class.php
2013-06-28
9 кб.
Theme_Manager.class.php
2013-06-28
10 кб.
blowfish.php
2013-06-28
27 кб.
bookmark.lib.php
2013-06-28
6 кб.
charset_conversion.lib.php
2013-06-28
11 кб.
check_user_privileges.lib.php
2013-06-28
8 кб.
cleanup.lib.php
2013-06-28
1 кб.
common.inc.php
2013-06-28
27 кб.
common.lib.php
2013-06-28
80 кб.
config.default.php
2013-06-28
51 кб.
core.lib.php
2013-06-28
18 кб.
database_interface.lib.php
2013-06-28
49 кб.
db_common.inc.php
2013-06-28
2 кб.
db_info.inc.php
2013-06-28
8 кб.
db_links.inc.php
2013-06-28
4 кб.
db_routines.inc.php
2013-06-28
4 кб.
db_table_exists.lib.php
2013-06-28
3 кб.
display_change_password.lib.php
2013-06-28
3 кб.
display_create_database.lib.php
2013-06-28
2 кб.
display_create_table.lib.php
2013-06-28
4 кб.
display_export.lib.php
2013-06-28
9 кб.
display_import.lib.php
2013-06-28
7 кб.
display_select_lang.lib.php
2013-06-28
4 кб.
display_tbl.lib.php
2013-06-28
102 кб.
display_tbl_links.lib.php
2013-06-28
2 кб.
file_listing.php
2013-06-28
2 кб.
footer.inc.php
2013-06-28
6 кб.
get_foreign.lib.php
2013-06-28
3 кб.
grab_globals.lib.php
2013-06-28
4 кб.
header.inc.php
2013-06-28
12 кб.
header_http.inc.php
2013-06-28
740 байт
header_meta_style.inc.php
2013-06-28
2 кб.
header_printview.inc.php
2013-06-28
3 кб.
iconv_wrapper.lib.php
2013-06-28
3 кб.
import.lib.php
2013-06-28
11 кб.
information_schema_relations.lib.php
2013-06-28
4 кб.
ip_allow_deny.lib.php
2013-06-28
5 кб.
js_escape.lib.php
2013-06-28
2 кб.
kanji-encoding.lib.php
2013-06-28
4 кб.
language.lib.php
2013-06-28
354 байт
mcrypt.lib.php
2013-06-28
3 кб.
mult_submits.inc.php
2013-06-28
16 кб.
mysql_charsets.lib.php
2013-06-28
14 кб.
navigation_header.inc.php
2013-06-28
4 кб.
ob.lib.php
2013-06-28
3 кб.
opendocument.lib.php
2013-06-28
8 кб.
parse_analyze.lib.php
2013-06-28
2 кб.
plugin_interface.lib.php
2013-06-28
14 кб.
relation.lib.php
2013-06-28
37 кб.
relation_cleanup.lib.php
2013-06-28
8 кб.
sanitizing.lib.php
2013-06-28
2 кб.
select_lang.lib.php
2013-06-28
22 кб.
select_server.lib.php
2013-06-28
4 кб.
server_common.inc.php
2013-06-28
1 кб.
server_links.inc.php
2013-06-28
2 кб.
session.inc.php
2013-06-28
4 кб.
sql_query_form.lib.php
2013-06-28
21 кб.
sqlparser.data.php
2013-06-28
27 кб.
sqlparser.lib.php
2013-06-28
100 кб.
sqlvalidator.class.php
2013-06-28
13 кб.
sqlvalidator.lib.php
2013-06-28
3 кб.
string.lib.php
2013-06-28
6 кб.
string_mb.lib.php
2013-06-28
2 кб.
string_native.lib.php
2013-06-28
2 кб.
string_type_ctype.lib.php
2013-06-28
3 кб.
string_type_native.lib.php
2013-06-28
4 кб.
tbl_common.php
2013-06-28
1018 байт
tbl_indexes.lib.php
2013-06-28
11 кб.
tbl_info.inc.php
2013-06-28
3 кб.
tbl_links.inc.php
2013-06-28
4 кб.
tbl_properties.inc.php
2013-06-28
30 кб.
tbl_replace_fields.inc.php
2013-06-28
4 кб.
tbl_triggers.lib.php
2013-06-28
2 кб.
transformations.lib.php
2013-06-28
9 кб.
unzip.lib.php
2013-06-28
16 кб.
url_generating.lib.php
2013-06-28
6 кб.
zip.lib.php
2013-06-28
6 кб.
/admin/myadmin2/libraries
Загрузить файлы
Файл 1
Файл 2
Файл 3