public function getHtml()
    {
        $users = $this->users->getAll();
        $userGroups = new UserGroups();
        $html = '';
        foreach ($users as $user) {
            $user_groups = $this->users->getUserGroups($user['id']);
            $user_groups_html = '';
            if ($user_groups !== false) {
                if (count($user_groups) > 0) {
                    foreach ($user_groups as $user_group_id) {
                        $user_group_data = $this->user_groups->getById($user_group_id);
                        if ($user_groups_html != '') {
                            $user_groups_html .= ', ';
                        }
                        $user_groups_html .= $user_group_data['name'];
                    }
                }
            }
            $html .= '
					<tr data-id="' . $user['id'] . '">
						<td><input type="checkbox" name="users[' . $user['id'] . ']" value="1" id="user_' . $user['id'] . '"></td>
						<td>' . $user['screenname'] . '</td>
						<td>' . ($user['privileges'] == Auth::PRIVILEGES_ADMIN ? Translate::get('Administrator') : Translate::get('User')) . '</td>
						<td>' . $user['login'] . '</td>
						<td>' . $user_groups_html . '</td>
					</tr>
				';
        }
        return $html;
    }
function smarty_function_translate($params, Smarty_Internal_Template $template)
{
    $output = '';
    if (isset($params['text'])) {
        $output = Translate::get($params['text']);
    }
    return $output;
}
    public function getHtml()
    {
        $userGroups = $this->userGroups->getAll();
        $html = '';
        $yes = Translate::get('Yes');
        $no = Translate::get('No');
        if ($userGroups !== false) {
            if (count($userGroups) > 0) {
                foreach ($userGroups as $userGroup) {
                    $modules_text = '';
                    $modules = $this->userGroups->getAclResources($userGroup['id']);
                    if ($modules !== false) {
                        if (count($modules) > 0) {
                            foreach ($modules as $module_acl_resource_id) {
                                $module_acl_resource = Acl::getResourceDataById($module_acl_resource_id);
                                if ($module_acl_resource !== false) {
                                    $modules_text .= ($modules_text != '' ? ', ' : '') . $module_acl_resource['description'];
                                }
                            }
                        }
                    }
                    if (UTF8String::strlen($modules_text) > 75) {
                        $modules_text = UTF8String::substr($modules_text, 0, 75) . '...';
                    }
                    $html .= '
							<tr data-id="' . $userGroup['id'] . '">
								<td><input type="checkbox" name="usergroups[' . $userGroup['id'] . ']" value="1" id="usergroup_' . $userGroup['id'] . '"></td>
								<td>' . $userGroup['name'] . '</td>
								<td>' . $userGroup['level'] . '</td>
								<td>' . ($userGroup['action-create'] > 0 ? $yes : $no) . '</td>
								<td>' . ($userGroup['action-edit'] > 0 ? $yes : $no) . '</td>
								<td>' . ($userGroup['action-publish'] > 0 ? $yes : $no) . '</td>
								<td>' . ($userGroup['action-delete'] > 0 ? $yes : $no) . '</td>
								<td>' . $modules_text . '</td>
							</tr>
						';
                }
            }
        }
        return $html;
    }
?>
"><span
                        class="glyphicon glyphicon-chevron-up"></span></button>
            </div>
            <?php 
if (!$var->isGlobalElementsPage) {
    ?>
                <button id="btn_preview" class="btn btn-sm btn-inverse" disabled><span
                        class="glyphicon glyphicon-eye-open icon-white"></span> <?php 
    echo Translate::get('Save and preview');
    ?>
                </button>
            <?php 
}
?>
            <button id="btn_save" class="btn btn-sm btn-success" disabled><span
                    class="glyphicon glyphicon-ok icon-white"></span> <?php 
echo Translate::get('Save and close');
?>
            </button>
            <button id="btn_close" class="btn btn-sm btn-danger"><span
                    class="glyphicon glyphicon-remove icon-white"></span> <?php 
echo Translate::get('_BTN_CANCEL_');
?>
            </button>
        </div>
    </div>
</div>
</body>
</html>
 public function infoAction()
 {
     $id = Request::postParam('pageId');
     $languageId = Request::postParam('languageId');
     // �berpr�fen, ob die Lebenswichtigen Parameter gesetzt sind
     if ($id === null || $languageId === null) {
         $this->error(self::RESULT_ERROR_BAD_REQUEST);
         return;
     }
     // �berpr�fen, ob die Seite �berhaupt (noch) existiert
     $properties = $this->pages->getProperties($id);
     if ($properties === false) {
         $this->error(self::RESULT_ERROR_DOES_NOT_EXIST);
         return;
     }
     // Name des Templates auslesen
     $pages = DataStructure::pagesArray();
     if ($properties['template-id'] === null) {
         $template_name = Translate::get('Link / Redirection');
     } else {
         if (isset($pages[$properties['template-id']])) {
             $template_name = $pages[$properties['template-id']]['name'];
         } else {
             $template_name = Translate::get('Unknown');
         }
     }
     // Infos sammeln
     $result = array(array('description' => Translate::get('Title'), 'value' => $this->pages->getAnyCaption($id, $languageId)), array('description' => Translate::get('Status'), 'value' => $this->getStatusString($properties['status'])), array('description' => Translate::get('Active'), 'value' => $properties['active'] > 0 ? Translate::get('Yes') : Translate::get('No')), array('description' => Translate::get('Visible'), 'value' => $this->pages->isPageVisible($id, $languageId) ? Translate::get('Yes') : Translate::get('No')), array('description' => Translate::get('Last change'), 'value' => $this->getDateString($properties['last-change-date']) . '&nbsp;&nbsp;(' . Translate::get('by') . ' ' . $this->getUserName($properties['last-change-user-id'], $properties['last-change-user-name']) . ')'), array('description' => Translate::get('Created'), 'value' => $this->getDateString($properties['creation-date']) . '&nbsp;&nbsp;(' . Translate::get('by') . ' ' . $this->getUserName($properties['creation-user-id'], $properties['creation-user-name']) . ')'), array('description' => Translate::get('Subpages'), 'value' => $this->pages->getSubpageCount($id)), array('description' => Translate::get('Template'), 'value' => $template_name));
     // Infos zur�ckgeben
     $this->success(array('infos' => $result));
 }
Beispiel #6
0
 /**
  * Make string of list HTML TABLE if data and header are not empty
  *
  * @param $header array
  *            1D with name of columns
  * @param $data array
  *            2D with data to show in table
  * @param $config array
  *            array with defined keys and validated by self::validateConfig
  * @return string
  */
 private static function makeListTableString($header, $data, $config)
 {
     $s = "";
     if (count($header) > 0 && count($data) > 0 && count($header) == count($data[0])) {
         // page size box
         if ($config[self::KEY_CONFIG_DISABLE_SET_PAGE_SIZE] === false) {
             $s .= sprintf("<form method=\"post\" enctype=\"application/x-www-form-urlencoded\" action=\"%s\" %s %s>", $config[self::KEY_URL_FORM_ACTION], !empty($config[self::KEY_STYLE_PAGE_SIZE_BOX_ID]) ? " id=\"" . $config[self::KEY_STYLE_PAGE_SIZE_BOX_ID] . "\"" : "", !empty($config[self::KEY_STYLE_PAGE_SIZE_BOX_CLASS]) ? " class=\"" . $config[self::KEY_STYLE_PAGE_SIZE_BOX_CLASS] . "\"" : "");
             $s .= sprintf("<div><span>%s</span><select name=\"%s\">", Translate::get(Translator::PAGINATION_PAGE_SIZE), $config[self::KEY_STYLE_PAGE_SIZE_SELECT_NAME]);
             foreach (System::$page_size as $v) {
                 $s .= sprintf("<option value=\"%d\"%s>%d</option>", $v, $v == $config[self::KEY_CONFIG_PAGE_SIZE] ? " selected=\"selected\"" : "", $v);
             }
             $s .= sprintf("</select><input type=\"submit\" value=\"%s\"/><div class=\"cleaner_micro\">&nbsp;</div></div></form>", Translate::get(Translator::BTN_SEND));
         }
         // select action box
         if ($config[self::KEY_CONFIG_DISABLE_SELECT_ACTION] === false) {
             $s .= sprintf("<form method=\"post\" enctype=\"application/x-www-form-urlencoded\" action=\"%s\" %s %s>", $config[self::KEY_URL_FORM_ACTION], !empty($config[self::KEY_STYLE_SELECT_ACTION_ID]) ? " id=\"" . $config[self::KEY_STYLE_SELECT_ACTION_ID] . "\"" : "", !empty($config[self::KEY_STYLE_SELECT_ACTION_CLASS]) ? " class=\"" . $config[self::KEY_STYLE_SELECT_ACTION_CLASS] . "\"" : "");
             $s .= sprintf("<div><select name=\"%s\">", $config[self::KEY_STYLE_SELECT_ACTION_NAME]);
             foreach ($config[self::KEY_SELECT_ACTION] as $k => $v) {
                 $s .= sprintf("<option value=\"%s\">%s</option>", $v[self::KEY_SELECT_ACTION_VALUE], $v[self::KEY_SELECT_ACTION_TITLE]);
             }
             $s .= sprintf("</select><input type=\"submit\" value=\"%s\"/><div class=\"cleaner_micro\">&nbsp;</div></div>", Translate::get(Translator::BTN_SEND));
         }
         // data table
         $s .= sprintf("<table%s%s>", !empty($config[self::KEY_STYLE_TABLE_ID]) ? " id=\"" . $config[self::KEY_STYLE_TABLE_ID] . "\"" : "", !empty($config[self::KEY_STYLE_TABLE_CLASS]) ? " class=\"" . $config[self::KEY_STYLE_TABLE_CLASS] . "\"" : "");
         $s .= sprintf("<thead><tr%s>", !empty($config[self::KEY_STYLE_TABLE_HEADER_CLASS]) ? " class=\"" . $config[self::KEY_STYLE_TABLE_HEADER_CLASS] . "\"" : "");
         if ($config[self::KEY_CONFIG_DISABLE_SELECT_ACTION] === false) {
             // add select action column
             $s .= sprintf("<th class=\"%s\">&nbsp;</th>", self::COLUMN_PREFIX . self::COLUMN_SELECT_ACTION_SUFFIX);
         }
         // table header
         $j = 0;
         foreach ($header as $k => $v) {
             $sort_next_direction = $k == $config[self::KEY_CONFIG_COLUMN] ? $config[self::KEY_CONFIG_SORT_DIRECTION] == System::SORT_ASC ? System::SORT_DES : ($config[self::KEY_CONFIG_SORT_DIRECTION] == System::SORT_DES ? System::SORT_ASC : "") : System::SORT_ASC;
             $sort_show = $k == $config[self::KEY_CONFIG_COLUMN] ? $config[self::KEY_CONFIG_SORT_DIRECTION] == System::SORT_ASC ? System::SORT_ASC : ($config[self::KEY_CONFIG_SORT_DIRECTION] == System::SORT_DES ? System::SORT_DES : "") : "";
             $sort_show = $sort_show == System::SORT_ASC ? self::SYMBOL_SORT_ASC : self::SYMBOL_SORT_DES;
             $s .= sprintf("<th class=\"%s\"><a href=\"%s\">%s</a></th>", self::COLUMN_PREFIX . $j, sprintf($config[self::KEY_URL_HEADER_SORT], $config[self::KEY_CONFIG_PAGE], $k, $sort_next_direction), $v . "&nbsp;" . $sort_show);
             // add empty columns for ROW_MENU_ITEM
             if ($j == count($header) - 1 && $config[self::KEY_CONFIG_DISABLE_ROW_MENU] === false) {
                 foreach ($config[self::KEY_ROW_MENU] as $k => $v) {
                     $s .= sprintf("<th class=\"%s\">&nbsp;</th>", $v[self::KEY_STYLE_ROW_MENU_CLASS]);
                 }
             }
             ++$j;
         }
         $s .= "</tr></thead><tbody>";
         // table data rows
         for ($i = 0; $i < count($data); $i++) {
             $s .= sprintf("<tr%s>", $i % 2 == 0 ? sprintf(" class=\"%s\"", !empty($config[self::KEY_STYLE_TABLE_MARKED_ROW_CLASS]) ? $config[self::KEY_STYLE_TABLE_MARKED_ROW_CLASS] : "") : "");
             for ($j = 0; $j < count($data[$i]); $j++) {
                 if ($config[self::KEY_CONFIG_DISABLE_SELECT_ACTION] === false && $j == 0) {
                     $s .= sprintf("<td class=\"%s\"><input type=\"checkbox\" name=\"%s\" /></th>", self::COLUMN_PREFIX . self::COLUMN_SELECT_ACTION_SUFFIX, self::ROW_PREFIX . $i . "_" . $data[$i][$j]);
                 }
                 $s .= sprintf("<td class=\"%s\">%s</td>", self::COLUMN_PREFIX . $j, $data[$i][$j]);
                 // add ROW_MENU_ITEM columns
                 if ($j == count($data[$i]) - 1 && $config[self::KEY_CONFIG_DISABLE_ROW_MENU] === false) {
                     foreach ($config[self::KEY_ROW_MENU] as $k => $v) {
                         $s .= sprintf("<td class=\"%s\"><a%shref=\"%s\"%s>%s</a></td>", $config[self::KEY_STYLE_ROW_MENU_CLASS], !empty($v[self::KEY_ROW_MENU_ITEM_TITLE]) ? " title=\"" . $v[self::KEY_ROW_MENU_ITEM_TITLE] . "\"" : " ", sprintf($v[self::KEY_ROW_MENU_ITEM_URL], $data[$i][0]), !empty($v[self::KEY_ROW_MENU_ITEM_CLASS]) ? " class=\"" . $v[self::KEY_ROW_MENU_ITEM_CLASS] . "\"" : " ", "<span>" . $v[self::KEY_ROW_MENU_ITEM_BODY] . "</span>");
                     }
                 }
             }
             $s .= "</tr>";
         }
         $s .= "</tbody></table>";
         if ($config[self::KEY_CONFIG_DISABLE_SELECT_ACTION] === false) {
             $s .= "</form>";
         }
         // pagination box
         $s .= "<div>";
         $s .= sprintf("<div%s%s><span>%s: %d | %s: %d | %s: %d/%d</span></div>", !empty($config[self::KEY_STYLE_SUMMARY_BOX_ID]) ? sprintf(" id=\"%s\"", $config[self::KEY_STYLE_SUMMARY_BOX_ID]) : "", !empty($config[self::KEY_STYLE_SUMMARY_BOX_CLASS]) ? sprintf(" class=\"%s\"", $config[self::KEY_STYLE_SUMMARY_BOX_CLASS]) : "", Translate::get(Translator::PAGINATION_DISPLAYED_ROWS), count($data), Translate::get(Translator::PAGINATION_FOUND_ROWS), $config[self::KEY_CONFIG_DATA_COUNT], Translate::get(Translator::PAGINATION_ACTUAL_PAGE), $config[self::KEY_CONFIG_PAGE], $config[self::KEY_CONFIG_PAGES_COUNT]);
         // box with page numbers
         $s .= sprintf("<div%s%s><ul%s>", !empty($config[self::KEY_STYLE_PAGINATION_BOX_ID]) ? sprintf(" id=\"%s\"", $config[self::KEY_STYLE_PAGINATION_BOX_ID]) : "", !empty($config[self::KEY_STYLE_PAGINATION_BOX_CLASS]) ? sprintf(" class=\"%s\"", $config[self::KEY_STYLE_PAGINATION_BOX_CLASS]) : "", !empty($config[self::KEY_STYLE_PAGINATION_UL_CLASS]) ? sprintf(" class=\"%s\"", $config[self::KEY_STYLE_PAGINATION_UL_CLASS]) : "");
         // to first page
         $s .= sprintf("<li><a href=\"%s\">%s</a></li>", sprintf($config[self::KEY_URL_PAGE], System::PAGE_MIN_PAGE, $config[self::KEY_CONFIG_COLUMN], $config[self::KEY_CONFIG_SORT_DIRECTION]), self::SYMBOL_BEGIN);
         // 1 step back
         $s .= sprintf("<li><a href=\"%s\">%s</a></li>", sprintf($config[self::KEY_URL_PAGE], $config[self::KEY_CONFIG_PAGE] > System::PAGE_MIN_PAGE ? $config[self::KEY_CONFIG_PAGE] - 1 : System::PAGE_MIN_PAGE, $config[self::KEY_CONFIG_COLUMN], $config[self::KEY_CONFIG_SORT_DIRECTION]), self::SYMBOL_STEP_BACK);
         $start = $config[self::KEY_CONFIG_PAGES_COUNT] > self::PAGINATION_PAGE_COUNT_LIMIT ? ($m = $config[self::KEY_CONFIG_PAGE] - self::PAGINATION_PAGE_COUNT_LIMIT / 2) > 1 ? $m : 1 : 1;
         $end = $config[self::KEY_CONFIG_PAGES_COUNT] > self::PAGINATION_PAGE_COUNT_LIMIT ? ($m = $config[self::KEY_CONFIG_PAGE] + self::PAGINATION_PAGE_COUNT_LIMIT / 2) < $config[self::KEY_CONFIG_PAGES_COUNT] ? $m : $config[self::KEY_CONFIG_PAGES_COUNT] : $config[self::KEY_CONFIG_PAGES_COUNT];
         for ($i = $start; $i <= $end; $i++) {
             $url = !empty($config[self::KEY_URL_PAGE]) ? sprintf($config[self::KEY_URL_PAGE], $i, $config[self::KEY_CONFIG_COLUMN], $config[self::KEY_CONFIG_SORT_DIRECTION]) : "";
             $s .= sprintf("<li><a href=\"%s\"%s>%d</a></li>", $url, !empty($config[self::KEY_STYLE_PAGINATION_ACIVE_PAGE_CLASS]) && $i == $config[self::KEY_CONFIG_PAGE] ? sprintf(" class=\"%s\"", $config[self::KEY_STYLE_PAGINATION_ACIVE_PAGE_CLASS]) : "", $i);
         }
         // 1 step forward
         $s .= sprintf("<li><a href=\"%s\">%s</a></li>", sprintf($config[self::KEY_URL_PAGE], $config[self::KEY_CONFIG_PAGE] < $config[self::KEY_CONFIG_PAGES_COUNT] ? $config[self::KEY_CONFIG_PAGE] + 1 : $config[self::KEY_CONFIG_PAGES_COUNT], $config[self::KEY_CONFIG_COLUMN], $config[self::KEY_CONFIG_SORT_DIRECTION]), self::SYMBOL_STEP_FWD);
         // to last page
         $s .= sprintf("<li><a href=\"%s\">%s</a></li>", sprintf($config[self::KEY_URL_PAGE], $config[self::KEY_CONFIG_PAGES_COUNT], $config[self::KEY_CONFIG_COLUMN], $config[self::KEY_CONFIG_SORT_DIRECTION]), self::SYMBOL_END);
         $s .= "</ul></div>";
         $s .= "</div>";
     }
     return $s;
 }
 public function gettabcontentAction()
 {
     $config = Config::getArray();
     $html = '';
     if ($config['showBackendModulesTab'] === true) {
         if (count($config['backendModules']) > 0) {
             $groups = $this->getModuleGroups();
             if (count($groups) > 0) {
                 foreach ($groups as $group_id => $group) {
                     if (count($group['modules']) > 0) {
                         $html .= '<div class="pixelmanager-backend-modules-group-heading">' . Helpers::htmlEntities($group['caption']) . '</div>' . '<div class="list-group">';
                         foreach ($group['modules'] as $module_id => $module) {
                             $module_name = Translate::get($module['name']);
                             $caption = $module_name;
                             $plugin_parameters = array('moduleId' => $module_id, 'moduleConfig' => $module);
                             Plugins::call(Plugins::GET_BACKEND_MODULES_TAB_CAPTION, $plugin_parameters, $caption);
                             $html .= '<a href="javascript:;" class="list-group-item open-module-in-tab" data-module-id="' . Helpers::htmlEntities($module_id) . '" data-module-url="' . Helpers::htmlEntities($module['url']) . '" data-module-name="' . Helpers::htmlEntities($module_name) . '">' . $caption . '</a>';
                         }
                         $html .= '</div>';
                     }
                 }
             }
         }
     }
     $this->success($html);
 }
echo Translate::get('Select page');
?>
            </button>
            <button id="btn_expand_all"
                    class="btn btn-default btn-sm"><?php 
echo Translate::get('Expand all');
?>
</button>
            <button id="btn_close_all"
                    class="btn btn-default btn-sm"><?php 
echo Translate::get('Close all');
?>
</button>
				<span class="pixelmanager-link-selector-language">
					<?php 
echo Translate::get('Target language');
?>
                    <select id="create-link-to-language-id">
                        <?php 
foreach (Config::get()->languages->list as $key => $language) {
    echo '<option value="' . $key . '">' . $language["name"] . '</option>';
}
?>
                    </select>
				</span>
        </div>
    </div>

</div>

</body>
?>
css/style.css">

    <script src="<?php 
echo $var->publicUrl;
?>
js/libs/modernizr.js"></script>
</head>

<body>

<div class="pixelmanager-iframe-wrapper">

    <div class="pixelmanager-iframe-content">
        <div
            class="alert alert-danger"><?php 
echo Translate::get('The requested page / data does not exist (anymore).');
?>
</div>
        <div class="well">
            <?php 
echo Translate::get('Maybe it was deleted by another user in the meantime.');
?>
        </div>
    </div>

</div>

</body>
</html>
Beispiel #10
0
 /**
  * Echos a translation
  * 
  * @param $key
  * @param null $lang
  * @return null
  */
 public function say($key, $lang = null)
 {
     echo Translate::get($key, $lang);
     return null;
 }
</h3>
                    </div>
                    <div class="modal-body">
                        <?php 
    echo Translate::get('Do you really want to download the live data? This can not be undone.');
    ?>
                    </div>
                    <div class="modal-footer">
                        <a href="javascript:;"
                           class="btn btn-primary btn-ok"><?php 
    echo Translate::get('Synchronize');
    ?>
</a>
                        <a href="javascript:;"
                           class="btn btn-default btn-cancel"><?php 
    echo Translate::get('Cancel');
    ?>
</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
<?php 
}
?>

<div id="page-tree-info">
    <span id="page-tree-info-icon"></span>

    <div id="page-tree-info-content"></div>
        <p>&nbsp;</p>

        <h3><?php 
echo Translate::get('This software is Open Source (licensed under GPL 3.0)');
?>
</h3>

        <p>This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
        <p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.</p>
        <p>You should have received a copy of the GNU General Public License along with this program.  If not, see <a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>.</p>

        <p>&nbsp;</p>

        <h3><?php 
echo Translate::get('Pixelmanager CMS uses the following open source software');
?>
:</h3>

        <p>
            <strong>Bootstrap</strong> (<a href="http://getbootstrap.com/" target="_blank">http://getbootstrap.com/</a>)<br>
            <strong>elFinder</strong> (<a href="http://elfinder.org" target="_blank">http://elfinder.org</a>)<br>
            <strong>HTML5 Boilerplate</strong> (<a href="http://html5boilerplate.com" target="_blank">http://html5boilerplate.com</a>)<br>
            <strong>JSON2</strong> (<a href="https://github.com/douglascrockford/JSON-js" target="_blank">https://github.com/douglascrockford/JSON-js</a>)<br>
            <strong>jQuery</strong> (<a href="http://jquery.com" target="_blank">http://jquery.com</a>)<br>
            <strong>jQuery UI</strong> (<a href="http://jqueryui.com" target="_blank">http://jqueryui.com</a>)<br>
            <strong>jsTree</strong> (<a href="http://www.jstree.com" target="_blank">http://www.jstree.com</a>)<br>
            <strong>RequireJS</strong> (<a href="http://requirejs.org" target="_blank">http://requirejs.org</a>)<br>
            <strong>Smarty Template Engine</strong> (<a href="http://www.smarty.net" target="_blank">http://www.smarty.net</a>)<br>
            <strong>TinyMCE</strong> (<a href="http://www.tinymce.com" target="_blank">http://www.tinymce.com</a>)<br>
            <strong>Portable PHP password hashing framework</strong> (<a href="http://www.openwall.com/phpass"
Beispiel #13
0
 /**
  * Permet d'afficher du gros contenu pris des fichiers php dans les dossiers de lang.
  * @param $file
  * @param $params array
  * @param null $lang
  */
 public static function getContent($file, $params = [], $lang = null)
 {
     if ($lang === null) {
         $lang = Translate::get('lang');
     }
     if (!is_null($file)) {
         extract($params);
         include __DIR__ . '/../public/local/' . $lang . '/content/' . $file . '.php';
     }
 }
// include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elFinderVolumeMySQL.class.php';
// Required for FTP connector support
// include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elFinderVolumeFTP.class.php';
/**
 * Simple function to demonstrate how to control file access using "accessControl" callback.
 * This method will disable accessing files/folders starting from  '.' (dot)
 *
 * @param  UTF8String $attr attribute name (read|write|locked|hidden)
 * @param  UTF8String $path file path relative to volume root directory started with directory separator
 *
 * @return bool|null
 **/
function access($attr, $path, $data, $volume)
{
    return UTF8String::strpos(basename($path), '.') === 0 ? !($attr == 'read' || $attr == 'write') : null;
    // else elFinder decide it itself
}
$opts = array('roots' => array(array('driver' => 'LocalFileSystem', 'path' => APPLICATION_ROOT . 'user-data/images/', 'alias' => Translate::get('Images'), 'URL' => Config::get()->baseUrl . 'user-data/images/', 'accessControl' => 'access', 'uploadAllow' => array('image'), 'uploadOrder' => array('allow', 'deny'), 'mimeDetect' => 'internal', 'mimefile' => APPLICATION_ROOT . 'core/library/elfinder/mime.types', 'tmbSize' => Config::get()->elFinderThumbnailSize, 'tmbCrop' => false)));
if (isset($_GET['folder'])) {
    $opts['roots'][0]['startPath'] = APPLICATION_ROOT . 'user-data/images/' . $_GET['folder'];
}
if (Config::get()->fileUtils->useChmod) {
    $opts['roots'][0]['dirMode'] = Config::get()->fileUtils->directoryMode;
    $opts['roots'][0]['fileMode'] = Config::get()->fileUtils->fileMode;
}
// Ab hier sollte kein Fehler mehr auftauchen, weil stammt ja nicht von mir... :-)
// Und sonst zickt E_STRICT, (wenn in der Config gesetzt) rum...
error_reporting(0);
// run elFinder
$connector = new elFinderConnector(new elFinder($opts));
$connector->run();
require_once realpath(dirname(__FILE__) . '/../../../library/elfinder/elFinder.class.php');
require_once realpath(dirname(__FILE__) . '/../../../library/elfinder/elFinderVolumeDriver.class.php');
require_once realpath(dirname(__FILE__) . '/../../../library/elfinder/elFinderVolumeLocalFileSystem.class.php');
/**
 * Simple function to demonstrate how to control file access using "accessControl" callback.
 * This method will disable accessing files/folders starting from  '.' (dot)
 *
 * @param  UTF8String $attr attribute name (read|write|locked|hidden)
 * @param  UTF8String $path file path relative to volume root directory started with directory separator
 *
 * @return bool|null
 **/
function access($attr, $path, $data, $volume)
{
    return UTF8String::strpos(basename($path), '.') === 0 ? !($attr == 'read' || $attr == 'write') : null;
    // else elFinder decide it itself
}
$opts = array('roots' => array(array('driver' => 'LocalFileSystem', 'path' => APPLICATION_ROOT . 'user-data/downloads/', 'alias' => Translate::get('Downloads'), 'URL' => Config::get()->baseUrl . 'user-data/downloads/', 'accessControl' => 'access', 'uploadDeny' => array(), 'uploadOrder' => array('deny', 'allow'), 'mimeDetect' => 'internal', 'mimefile' => APPLICATION_ROOT . 'core/library/elfinder/mime.types', 'tmbSize' => 48, 'tmbCrop' => false)));
if (isset($_GET['folder'])) {
    $opts['roots'][0]['startPath'] = APPLICATION_ROOT . 'user-data/downloads/' . $_GET['folder'];
}
if (Config::get()->fileUtils->useChmod) {
    $opts['roots'][0]['dirMode'] = Config::get()->fileUtils->directoryMode;
    $opts['roots'][0]['fileMode'] = Config::get()->fileUtils->fileMode;
}
// Ab hier sollte kein Fehler mehr auftauchen, weil stammt ja nicht von mir... :-)
// Und sonst zickt E_STRICT, (wenn in der Config gesetzt) rum...
error_reporting(0);
// run elFinder
$connector = new elFinderConnector(new elFinder($opts));
$connector->run();
Beispiel #16
0
 /**
  * Make breadcrumbs item string.
  *
  * @param string $url            
  * @param string $body            
  * @param string $title            
  * @param string $activeClass            
  * @return string
  */
 private static function makeBreadcrumbsItemString($url, $body, $title, $activeClass)
 {
     return sprintf("<li><a href=\"%s\"%s%s>%s</a></li>", $url, !empty($title) ? " title=\"" . Translate::get($title) . "\"" : "", !empty($activeClass) ? " class=\"" . $activeClass . "\"" : "", Translate::get($body));
 }
 public function getLastQueryErrorMessage()
 {
     if (trim($this->last_query_error_message) != '') {
         return $this->last_query_error_message;
     } else {
         return Translate::get('Sorry, the data can not be saved. Please fill out all fields correctly and try again.');
     }
 }
?>
css/style.css">

    <script src="<?php 
echo $var->publicUrl;
?>
js/libs/modernizr.js"></script>
</head>

<body>

<div class="pixelmanager-iframe-wrapper">

    <div class="pixelmanager-iframe-content">
        <div
            class="alert alert-danger"><?php 
echo Translate::get('You do not have the necessary privileges to open this page.');
?>
</div>
        <div class="well">
            <?php 
echo Translate::get('Please direct an administrator if you are certain that you should have access to this page / action.');
?>
        </div>
    </div>

</div>

</body>
</html>