Пример #1
0
function ShowSubFolders($dir_root, $dir, $depth, $treemenu)
{
    global $SESSION;
    global $GET2;
    if ($depth >= 1) {
        $folders = GetFolders($dir, explode(",", $SESSION["hidden_subfolder"]));
    } else {
        $folders = GetFolders($dir, explode(",", $SESSION["hidden_folder"]));
    }
    if (count($folders) == 0) {
        return;
    }
    if ($depth >= 1) {
        echo "<div class=\"sub_tree_menu\"><ul>";
    } else {
        echo "<div><ul>";
    }
    for ($i = 0; $i < count($folders); $i++) {
        if ($SESSION["dir"] == $dir . $folders[$i] . "/") {
            echo "<li><a id=\"active\" href=\"javascript:;\">";
            $SESSION["folder"] = $folders[$i];
        } else {
            echo "<li><a href=\"javascript:;\" onclick=\"SMExplorer_OpenFolder('" . bin2hex(RC4("id=1&treemenu=" . $treemenu . "&dir=" . $dir . $folders[$i] . "/&" . $GET2)) . "'); if (window.event){ window.event.returnValue = false; }\">";
        }
        echo "<img style=\"margin:0px; margin-left:4px;\" src=\"img/icon_tree_16x16.png\" border=\"0\" /><img src=\"img/icon_folder_16x16.png\" border=\"0\" />" . $folders[$i];
        if ($SESSION["show_chmod"] == 1) {
            echo "<span style=\"margin-left:3px; font-size:7pt; color:#c4d3f6; font-weight:normal;\">[" . GetChmod($dir_root) . "]</span>";
        }
        echo "</a></li>";
        // Unterordner anzeigen
        ShowSubFolders($dir_root, $dir . $folders[$i] . "/", $depth + 1, $treemenu);
    }
    echo "</ul></div>";
}
/**
 * Подключает группу системных плагинов.
 * @param  $group группа
 * @param string $function подгруппа(если есть)
 * @param bool $return возвратить имена файлов плагинов вместо их автоматического подключения
 * @param bool $return_full возвращать вместо имен файлов массив с полной информацией по плагинам
 * @return array
 */
function SystemPluginsIncludeGroup($group, $function = '', $return = false, $return_full = false)
{
    global $config;
    $result = array();
    // Поиск плагинов
    $group_dir = System::config('sys_plug_dir') . $group;
    if (!is_dir($group_dir)) {
        return array();
    }
    $plugins = GetFolders($group_dir . '/');
    // Подготавливаем результат
    foreach ($plugins as $plugin) {
        if ($function != '') {
            $plugin_name = RealPath2($group_dir . '/' . $plugin . '/' . $function) . '/';
        } else {
            $plugin_name = RealPath2($group_dir . '/' . $plugin) . '/';
        }
        global $include_plugin_path;
        // эта переменная будет доступна из плагина
        $include_plugin_path = $plugin_name;
        if ($return) {
            $result[] = $include_plugin_path;
        } else {
            include $include_plugin_path . 'index.php';
        }
    }
    return $result;
}
Пример #3
0
function DoResponse()
{
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    // Get the main request informaiton.
    $sCommand = $_GET['Command'];
    $sResourceType = $_GET['Type'];
    $sCurrentFolder = $_GET['CurrentFolder'];
    // Check if it is an allowed type.
    if (!in_array($sResourceType, array('File', 'Image', 'Flash', 'Media'))) {
        return;
    }
    // Check the current folder syntax (must begin and start with a slash).
    if (!ereg('/$', $sCurrentFolder)) {
        $sCurrentFolder .= '/';
    }
    if (strpos($sCurrentFolder, '/') !== 0) {
        $sCurrentFolder = '/' . $sCurrentFolder;
    }
    // File Upload doesn't have to Return XML, so it must be intercepted before anything.
    if ($sCommand == 'FileUpload') {
        FileUpload($sResourceType, $sCurrentFolder);
        return;
    }
    // Prevent the browser from caching the result.
    // Date in the past
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    // always modified
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    // HTTP/1.1
    header('Cache-Control: no-store, no-cache, must-revalidate');
    header('Cache-Control: post-check=0, pre-check=0', false);
    // HTTP/1.0
    header('Pragma: no-cache');
    // Set the response format.
    header('Content-Type:text/xml; charset=utf-8');
    CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
    // Execute the required command.
    switch ($sCommand) {
        case 'GetFolders':
            GetFolders($sResourceType, $sCurrentFolder);
            break;
        case 'GetFoldersAndFiles':
            GetFoldersAndFiles($sResourceType, $sCurrentFolder);
            break;
        case 'CreateFolder':
            CreateFolder($sResourceType, $sCurrentFolder);
            break;
    }
    CreateXmlFooter();
    exit;
}
Пример #4
0
function DoResponse()
{
    global $Config;
    if (!isset($_GET)) {
        global $_GET;
    }
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    // Get the main request informaiton.
    $sCommand = $_GET['Command'];
    $sResourceType = $_GET['Type'];
    $sCurrentFolder = GetCurrentFolder();
    // Check if it is an allowed command
    if (!IsAllowedCommand($sCommand)) {
        SendError(1, 'Команда "' . $sCommand . '" недоступна');
    }
    // Check if it is an allowed type.
    if (!IsAllowedType($sResourceType)) {
        SendError(1, 'Неверный тип');
    }
    // File Upload doesn't have to Return XML, so it must be intercepted before anything.
    if ($sCommand == 'FileUpload') {
        FileUpload($sResourceType, $sCurrentFolder, $sCommand);
        return;
    }
    CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
    // Execute the required command.
    switch ($sCommand) {
        case 'GetFolders':
            GetFolders($sResourceType, $sCurrentFolder);
            break;
        case 'GetFoldersAndFiles':
            GetFoldersAndFiles($sResourceType, $sCurrentFolder);
            break;
        case 'CreateFolder':
            CreateFolder($sResourceType, $sCurrentFolder);
            break;
        case 'FileDelete':
            if ($Config['Delete']) {
                FileDelete($sResourceType, $sCurrentFolder, $sCommand);
            }
            break;
        case 'FolderDelete':
            if ($Config['Delete']) {
                FolderDelete($sResourceType, $sCurrentFolder, $sCommand);
            }
            break;
    }
    CreateXmlFooter();
    exit;
}
Пример #5
0
function DoResponse()
{
    if (!isset($_GET)) {
        global $_GET;
    }
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    // Get the main request informaiton.
    $sCommand = urlencode($_GET['Command']);
    $sResourceType = urlencode($_GET['Type']);
    $sCurrentFolder = GetCurrentFolder();
    // Check if it is an allowed command
    if (!IsAllowedCommand($sCommand)) {
        SendError(1, 'FileBrowserError_Command' . ';;' . $sCommand);
    }
    // Check if it is an allowed type.
    if (!IsAllowedType($sResourceType)) {
        SendError(1, 'FileBrowserError_Type' . ';;' . $sResourceType);
    }
    // File Upload doesn't have to Return XML, so it must be intercepted before anything.
    if ($sCommand == 'FileUpload') {
        FileUpload($sResourceType, $sCurrentFolder, $sCommand);
        return;
    }
    if ($sCommand == 'GetDwfckNs') {
        GetDwfckNs();
        return;
    }
    CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
    // Execute the required command.
    switch ($sCommand) {
        case 'GetFolders':
            GetFolders($sResourceType, $sCurrentFolder);
            break;
        case 'GetFoldersAndFiles':
            GetFoldersAndFiles($sResourceType, $sCurrentFolder);
            break;
        case 'CreateFolder':
            CreateFolder($sResourceType, $sCurrentFolder);
            break;
        case 'UnlinkFile':
            UnlinkFile($sResourceType, $sCurrentFolder, $sCommand, $_GET['file']);
            break;
    }
    CreateXmlFooter();
    exit;
}
Пример #6
0
function DoResponse()
{
    if (!isset($_GET)) {
        global $_GET;
    }
    if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
        return ;

    // Get the main request informaiton.
    $sCommand        = $_GET['Command'] ;
    $sResourceType    = $_GET['Type'] ;
    $sCurrentFolder    = GetCurrentFolder() ;

    // Check if it is an allowed command
    if ( ! IsAllowedCommand( $sCommand ) )
        SendError( 1, 'The "' . $sCommand . '" command isn\'t allowed' ) ;

    // Check if it is an allowed type.
    if ( !IsAllowedType( $sResourceType ) )
        SendError( 1, 'Invalid type specified' ) ;

    // File Upload doesn't have to Return XML, so it must be intercepted before anything.
    if ( $sCommand == 'FileUpload' )
    {
        FileUpload( $sResourceType, $sCurrentFolder, $sCommand ) ;
        return ;
    }

    CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;

    // Execute the required command.
    switch ( $sCommand )
    {
        case 'GetFolders' :
            GetFolders( $sResourceType, $sCurrentFolder ) ;
            break ;
        case 'GetFoldersAndFiles' :
            GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
            break ;
        case 'CreateFolder' :
            CreateFolder( $sResourceType, $sCurrentFolder ) ;
            break ;
    }

    CreateXmlFooter() ;

    exit ;
}
function DoResponse()
{
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    // Get the main request informaiton.
    $sCommand = $_GET['Command'];
    $sResourceType = $_GET['Type'];
    $sCurrentFolder = $_GET['CurrentFolder'];
    // Check if it is an allowed type.
    if (!in_array($sResourceType, array('File', 'Image', 'Flash', 'Media'))) {
        return;
    }
    // Check the current folder syntax (must begin and start with a slash).
    if (!ereg('/$', $sCurrentFolder)) {
        $sCurrentFolder .= '/';
    }
    if (strpos($sCurrentFolder, '/') !== 0) {
        $sCurrentFolder = '/' . $sCurrentFolder;
    }
    // Check for invalid folder paths (..)
    if (strpos($sCurrentFolder, '..')) {
        SendError(102, "");
    }
    // File Upload doesn't have to Return XML, so it must be intercepted before anything.
    if ($sCommand == 'FileUpload') {
        FileUpload($sResourceType, $sCurrentFolder);
        return;
    }
    CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
    // Execute the required command.
    switch ($sCommand) {
        case 'GetFolders':
            GetFolders($sResourceType, $sCurrentFolder);
            break;
        case 'GetFoldersAndFiles':
            GetFoldersAndFiles($sResourceType, $sCurrentFolder);
            break;
        case 'CreateFolder':
            CreateFolder($sResourceType, $sCurrentFolder);
            break;
    }
    CreateXmlFooter();
    exit;
}
Пример #8
0
function DoResponse()
{
    if (!isset($_GET)) {
        global $_GET;
    }
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    //require_once(GetRootPath() . '\\conlive_8_12\\site\\config\\project.php');
    //$con = new Project();
    $f = fopen("cok2.txt", "w");
    fprintf($f, $_SESSION['em']);
    // Get the main request informaiton.
    $sCommand = $_GET['Command'];
    $sResourceType = $_GET['Type'];
    $sCurrentFolder = GetCurrentFolder();
    // Check if it is an allowed command
    if (!IsAllowedCommand($sCommand)) {
        SendError(1, 'The "' . $sCommand . '" command isn\'t allowed');
    }
    // Check if it is an allowed type.
    if (!IsAllowedType($sResourceType)) {
        SendError(1, 'Invalid type specified');
    }
    // File Upload doesn't have to Return XML, so it must be intercepted before anything.
    if ($sCommand == 'FileUpload') {
        FileUpload($sResourceType, $sCurrentFolder, $sCommand);
        return;
    }
    CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
    // Execute the required command.
    switch ($sCommand) {
        case 'GetFolders':
            GetFolders($sResourceType, $sCurrentFolder);
            break;
        case 'GetFoldersAndFiles':
            GetFoldersAndFiles($sResourceType, $sCurrentFolder);
            break;
        case 'CreateFolder':
            CreateFolder($sResourceType, $sCurrentFolder);
            break;
    }
    CreateXmlFooter();
    exit;
}
Пример #9
0
function DoResponse()
{
    if (!isset($_GET)) {
        global $_GET;
    }
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    $sCommand = $_GET['Command'];
    $sResourceType = $_GET['Type'];
    $sCurrentFolder = GetCurrentFolder();
    if (!IsAllowedCommand($sCommand)) {
        SendError(1, 'The "' . $sCommand . '" command isn\'t allowed');
    }
    if (!IsAllowedType($sResourceType)) {
        SendError(1, 'Invalid type specified');
    }
    if ($sCommand == 'FileUpload') {
        FileUpload($sResourceType, $sCurrentFolder, $sCommand);
        return;
    }
    CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
    switch ($sCommand) {
        case 'GetFolders':
            GetFolders($sResourceType, $sCurrentFolder);
            break;
        case 'GetFoldersAndFiles':
            GetFoldersAndFiles($sResourceType, $sCurrentFolder);
            break;
        case 'CreateFolder':
            CreateFolder($sResourceType, $sCurrentFolder);
            break;
    }
    CreateXmlFooter();
    exit;
}
 /**
  * Возвращает список всех кэш групп.
  */
 public function GetGroups()
 {
     return GetFolders($this->Path);
 }
function AdminExtensionsInstallList()
{
    global $config;
    $mod_dir = $config['mod_dir'];
    $plug_dir = $config['plug_dir'];
    $block_dir = $config['blocks_dir'];
    $temp_dir = $config['tpl_dir'];
    $list = array();
    $title = 'Установка расширений';
    System::admin()->AddSubTitle($title);
    // Загружаем информацию об установленных модулях
    $installed_mods = array();
    $installed_plugins = array();
    $installed_blocks = array();
    $installed_templates = array();
    System::database()->Select('modules');
    while ($mod = System::database()->FetchRow()) {
        $installed_mods[] = $mod['folder'];
    }
    System::database()->Select('plugins');
    while ($mod = System::database()->FetchRow()) {
        $installed_plugins[] = ($mod['group'] != '' ? $mod['group'] . '/' : '') . $mod['name'];
    }
    System::database()->Select('block_types');
    while ($mod = System::database()->FetchRow()) {
        $installed_blocks[] = $mod['folder'];
    }
    System::database()->Select('templates');
    while ($mod = System::database()->FetchRow()) {
        $installed_templates[] = $mod['folder'];
    }
    // Поиск модулей
    $mod_folders = GetFolders($mod_dir);
    foreach ($mod_folders as $folder) {
        if (!in_array($folder, $installed_mods)) {
            $info = ExtLoadInfo($mod_dir . $folder);
            if ($info !== false) {
                $info['type'] = EXT_MODULE;
                $info['path'] = $mod_dir . $folder . '/';
                $info['folder'] = $folder;
                if (is_file($info['path'] . 'install.php') && is_file($info['path'] . 'uninstall.php')) {
                    $list[] = $info;
                }
            }
        }
    }
    // Поиск плагинов
    $plug_folders = GetFolders($plug_dir);
    foreach ($plug_folders as $folder) {
        $info = false;
        if (is_file($plug_dir . $folder . '/info.php')) {
            // Возможно группа
            $info = ExtLoadInfo($plug_dir . $folder);
        }
        if (isset($info['1.3_old_plugins_group']) || $info === false) {
            // Группа
            $plug_folders2 = GetFolders($plug_dir . $folder . '/');
            foreach ($plug_folders2 as $folder2) {
                if (!in_array($folder . '/' . $folder2, $installed_plugins)) {
                    $info = ExtLoadInfo($plug_dir . $folder . '/' . $folder2);
                    if ($info !== false) {
                        $info['type'] = EXT_PLUGIN;
                        $info['path'] = $plug_dir . $folder . '/' . $folder2 . '/';
                        $info['group'] = $folder;
                        $info['folder'] = $folder2;
                        if (isset($info['1.3']) || is_file($info['path'] . 'install.php') && is_file($info['path'] . 'uninstall.php')) {
                            $list[] = $info;
                        }
                    }
                }
            }
        } else {
            // Отдельный плагин
            if (!in_array($folder, $installed_plugins)) {
                if ($info !== false) {
                    $info['type'] = EXT_PLUGIN;
                    $info['path'] = $plug_dir . $folder . '/';
                    $info['folder'] = $folder;
                    if (isset($info['1.3']) || is_file($info['path'] . 'install.php') && is_file($info['path'] . 'uninstall.php')) {
                        $list[] = $info;
                    }
                }
            }
        }
    }
    // Поиск блоков
    $block_folders = GetFolders($block_dir);
    foreach ($block_folders as $folder) {
        if (!in_array($folder, $installed_blocks)) {
            $info = ExtLoadInfo($block_dir . $folder);
            if ($info !== false) {
                $info['type'] = EXT_BLOCK;
                $info['path'] = $block_dir . $folder . '/';
                $info['folder'] = $folder;
                if (is_file($info['path'] . 'install.php') && is_file($info['path'] . 'uninstall.php')) {
                    $list[] = $info;
                }
            }
        }
    }
    // Поиск шаблонов
    $temp_folders = GetFolders($temp_dir);
    foreach ($temp_folders as $folder) {
        if (!in_array($folder, $installed_templates)) {
            $info = ExtLoadInfo($temp_dir . $folder);
            if ($info === false) {
                $info = array('name' => $folder, 'description' => '', 'author' => '', 'site' => '', 'version' => '1.0', 'admin' => false);
            }
            $info['type'] = EXT_TEMPLATE;
            $info['path'] = $temp_dir . $folder . '/';
            $info['folder'] = $folder;
            $list[] = $info;
        }
    }
    $count = count($list);
    $text = '<form action="' . ADMIN_FILE . '?exe=extensions&a=install" method="post">';
    $text .= '<table cellspacing="0" cellpadding="0" class="cfgtable">';
    $text .= '<tr><th>Установка</th><th>Тип</th><th>Имя</th><th>Описание</th><th>Автор</th><th>Сайт</th></tr>';
    if (count($list) > 0) {
        foreach ($list as $i => $ext) {
            switch ($ext['type']) {
                case 1:
                    if (is_file($ext['path'] . 'icon.png')) {
                        $type = '<img src="' . $ext['path'] . 'icon.png" title="Модуль">';
                    } else {
                        $type = '<img src="' . MOD_DIR . 'icon.png" title="Модуль">';
                    }
                    break;
                case 2:
                    $type = '<img src="images/plugins.png" title="Плагин">';
                    break;
                case 3:
                    $type = '<img src="images/blocks.png" title="Блок">';
                    break;
                case 4:
                    $type = '<img src="images/skins.png" title="Шаблон">';
                    break;
            }
            $text .= Indent('
				<tr>
					<td>' . System::site()->Check('install_' . $i, '1') . System::site()->Hidden('folder_' . $i, $ext['folder']) . System::site()->Hidden('type_' . $i, $ext['type']) . ($ext['type'] == EXT_PLUGIN && isset($ext['group']) ? System::site()->Hidden('group_' . $i, $ext['group']) : '') . '</td>
					<td>' . $type . '</td>
					<td>' . SafeDB($ext['name'], 255, str) . '</td>
					<td>' . (isset($ext['description']) && $ext['description'] != '' && $ext['description'] != ' - ' ? SafeDB($ext['description'], 255, str) : 'Нет описания') . '</td>
					<td>' . (isset($ext['author']) && $ext['author'] != '' ? SafeDB($ext['author'], 255, str) : '&nbsp;') . '</td>
					<td>' . (isset($ext['site']) && $ext['site'] != '' ? '<a href="' . HtmlChars($ext['site']) . '" title="' . HtmlChars($ext['site']) . '" target="_blank">Перейти</a>' : 'Нет') . '</td>
				</tr>
			');
        }
        $text .= '</table>';
        $text .= '<div style="margin-bottom: 25px;">' . System::site()->Hidden('count', $count) . System::site()->Submit('Установить выделенные') . '</div>';
        $text .= '</form>';
    } else {
        $text .= '<tr><td colspan="6" style="text-align: left;">Нет не установленных модулей.</td></tr>';
        $text .= '</table>';
        $text .= '</form>';
    }
    System::admin()->AddCenterBox($title . ' (' . $count . ' готово к установке)');
    System::admin()->AddText($text);
}
 * © 2012 LinkorCMS Development Group
 */
if (!defined('VALID_RUN')) {
    header("HTTP/1.1 404 Not Found");
    exit;
}
if (isset($_GET['p'])) {
    $p = SafeEnv($_GET['p'], 1, int);
} else {
    $p = 1;
}
switch ($p) {
    case 1:
        // Заставка и тихая сборка скриптов, если они не собраны
        // Проверяем собраны ли скрипты
        $scripts = GetFolders('scripts');
        if (count($scripts) == 0 || !is_dir('scripts/admin')) {
            $_GET['task'] = 'build';
            $_GET['script'] = '';
            $_GET['silent'] = '1';
            include 'build.php';
            if ($BuildErrors > 0) {
                echo "Произошли ошибки при сборке скриптов. Лог сборки:<br>";
                foreach ($build_log as $value) {
                    echo $value . '<br>';
                }
                exit;
            }
            UseScript('jquery_ui');
        }
        // Показываем заставку
Пример #13
0
}
if (substr($sCurrentFolder, 0, 1) !== '/') {
    $sCurrentFolder = '/' . $sCurrentFolder;
}
// Execute the required command.
switch ($sCommand) {
    case 'FileUpload':
        FileUpload($sCurrentFolder);
        break;
    case 'DeleteFile':
        CreateXmlHeader('DeleteFile', $sCurrentFolder);
        DeleteFile($sCurrentFolder, $sType);
        CreateXmlFooter();
        break;
    case 'GetFoldersAndFiles':
        CreateXmlHeader('GetFoldersAndFiles', $sCurrentFolder);
        GetFoldersAndFiles($sCurrentFolder, $sType);
        CreateXmlFooter();
        break;
    case 'CreateFolder':
        CreateXmlHeader('CreateFolder', $sCurrentFolder);
        CreateFolder($sCurrentFolder, $sType);
        CreateXmlFooter();
        break;
    default:
    case 'GetFolders':
        CreateXmlHeader('GetFolders', $sCurrentFolder);
        GetFolders($sCurrentFolder, $sType);
        CreateXmlFooter();
        break;
}
System::database()->Update('plugins_config', "`value`='bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,sub,sup,|,bullist,numlist,outdent,indent,blockquote,|,charmap,link,unlink,anchor,image,images,media,hr,insertcode'", "`name`='theme_advanced_buttons2'");
//System::database()->Update('plugins_config', "`value`=''", "`name`='theme_advanced_buttons3'");
//System::database()->Update('plugins_config', "`value`=''", "`name`='theme_advanced_buttons4'");
System::database()->Insert('plugins_config', "'','{$group_tinymce}','extra_plugins','','1','Дополнительные плагины','Названия папок плагинов через запятую.','edit:w400px','','','0,string,false','1'");
// Обновление таблицы rewrite_rules
System::database()->Truncate('rewrite_rules');
// Обновление таблицы snippets
System::database()->Insert('snippets', "'','Select - выборка из базы данных','return System::database()->Select(\\'plugins\\', \"`hidden`=\\'0\\'\");\nif(true){\n\techo \"Hello!\";\n}else{\n\techo \"Bye!\";\n}','php'");
System::database()->Insert('snippets', "'','Echo - простой пример вывода данных','echo \\'New snippet!!!\\';','php'");
System::database()->Insert('snippets', "'','Alert - вывод сообщения на JS','alert(\"Hello!\");','js'");
// Обновление таблицы templates
$standart_templates = explode(',', 'IgrimTheme,default,default_admin');
System::database()->Insert('templates', "'','Igrim Theme','IgrimTheme','0','0'");
System::database()->Insert('templates', "'','Default','default','0','1'");
System::database()->Insert('templates', "'','Default Admin','default_admin','1','1'");
$templates_dirs = GetFolders(System::config('tpl_dir'));
foreach ($templates_dirs as $tm) {
    // Устанавливаем все найденные шаблоны
    if (!in_array($tm, $standart_templates)) {
        $tm = SafeDB($tm, 255, str);
        System::database()->Insert('templates', "'','{$tm}','{$tm}','0','0'");
    }
}
// Очищаем весь кэш
System::cache()->ClearAll();
// Создаём бекап базы данных
$backupfilename = System::config('backup_dir') . '0_update_end_' . date("Y.m.d_H.i.s_") . GenRandomString(8, 'abcdefghijklmnopqrstuvwxyz0123456789') . '.' . System::database()->Name . '.zip';
System::database()->CreateBackupFile($backupfilename);
//////////////////////////////////////////////////////////////==========================================================
// LinkorCMS 1.4.1
// Изменяем настройки
Пример #15
0
<?php

error_reporting(0);
include "php/tools.php";
include "php/config.php";
include "php/session.php";
include "php/image.php";
// Verzeichnispfad
$IMAGE_PATH = GetDocumentRoot() . $SESSION["dir"];
$IMAGE_PATH_2 = $SESSION["dir"];
include "php/action.php";
// Verzeichnis lesen
if ($SESSION["id"] == 1) {
    $FOLDERS = GetFolders($IMAGE_PATH);
    $FILES = GetFiles($IMAGE_PATH, $SESSION["orderby"]);
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>SMImage</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<meta name="author" content="Jens Stolinski" />
<meta name="publisher" content="Jens Stolinski" />
<meta name="company" content="SYNASYS MEDIA" />

<?php 
// Webbrowser-Cache löschen