Exemplo n.º 1
0
    }
    return $path;
}
require "../../Group-Office.php";
//authenticate the user
$GO_SECURITY->authenticate();
//see if the user has access to this module
//for this to work there must be a module named 'example'
$GO_MODULES->authenticate('cms');
//get the language file
require $GO_LANGUAGE->get_language_file('cms');
require $GO_MODULES->class_path . 'cms.class.inc';
$cms = new cms();
$cms_settings = $cms->get_settings($GO_SECURITY->user_id);
if (isset($_REQUEST['new_sort_order']) && $_REQUEST['new_sort_order'] != $cms_settings['sort_order']) {
    $cms->set_sorting($GO_SECURITY->user_id, $_REQUEST['new_sort_field'], $_REQUEST['new_sort_order']);
    $cms_settings['sort_order'] = $_REQUEST['new_sort_order'];
    $cms_settings['sort_field'] = $_REQUEST['new_sort_field'];
}
if ($cms_settings['sort_order'] == "DESC") {
    $image_string = '&nbsp;<img src="' . $GO_THEME->image_url . 'buttons/arrow_down.gif" border="0" />';
    $new_sort_order = "ASC";
} else {
    $image_string = '&nbsp;<img src="' . $GO_THEME->image_url . 'buttons/arrow_up.gif" border="0" />';
    $new_sort_order = "DESC";
}
//adjust sorting because folders because they lack some columns
switch ($cms_settings['sort_field']) {
    case 'cms_files.priority':
        $folders_sort = "priority";
        break;