/**
 *
 * Function list folders in this folder event free
 * This function is used in the folder properties tab to display content
 * @param string $folder_id = The id of the folder we are checking
 * @version 1.0
 * @author Patrick Lockley
 */
function list_folders_in_this_folder_event_free($folder_id, $path = '', $item = false, $input_method = 'link')
{
    global $xerte_toolkits_site, $level;
    $query = "select folder_id, folder_name from " . $xerte_toolkits_site->database_table_prefix . "folderdetails where login_id =\"" . $_SESSION['toolkits_logon_id'] . "\" and folder_parent=\"" . $folder_id . "\"";
    $query_response = mysql_query($query);
    while ($row = mysql_fetch_array($query_response)) {
        $extra = '<p>';
        $extra1 = '</p>';
        $extra2 = '';
        if ($item !== false) {
            $extra = '';
            $extra1 = '';
            $extra2 = " style=\"padding-left:" . $level * 10 . "px\" ";
        }
        echo "<div id=\"dynamic_area_folder\" {$extra2}>{$extra}<img style=\"\" src=\"{$path}website_code/images/Icon_Folder.gif\" />" . str_replace("_", " ", $row['folder_name']) . "{$extra1}</div><div id=\"dynamic_area_folder_content\">";
        $item = list_folder_contents_event_free($row['folder_id'], $path, $item, $input_method);
        echo "</div>";
    }
    return $item;
}
/**
 *
 * Function list folders in this folder event free
 * This function is used in the folder properties tab to display content
 * @param string $folder_id = The id of the folder we are checking
 * @version 1.0
 * @author Patrick Lockley
 */
function list_folders_in_this_folder_event_free($folder_id, $path = '', $item = false, $input_method = 'link')
{
    global $xerte_toolkits_site, $level;
    $prefix = $xerte_toolkits_site->database_table_prefix;
    $query = "SELECT folder_id, folder_name FROM {$prefix}folderdetails WHERE login_id = ? AND folder_parent = ?";
    $rows = db_query($query, array($_SESSION['toolkits_logon_id'], $folder_id));
    foreach ($rows as $row) {
        $extra = '<p>';
        $extra1 = '</p>';
        $extra2 = '';
        if ($item !== false) {
            $extra = '';
            $extra1 = '';
            $extra2 = " style=\"padding-left:" . $level * 10 . "px\" ";
        }
        echo "<div id=\"dynamic_area_folder\" {$extra2}>{$extra}<img style=\"\" src=\"{$path}website_code/images/Icon_Folder.gif\" />" . str_replace("_", " ", $row['folder_name']) . "{$extra1}</div><div id=\"dynamic_area_folder_content\">";
        $item = list_folder_contents_event_free($row['folder_id'], $path, $item, $input_method);
        echo "</div>";
    }
    return $item;
}
<?php

/**
 * 
 * folder content page, used by the site to display a folder's contents
 *
 * @author Patrick Lockley
 * @version 1.0
 * @copyright Copyright (c) 2008,2009 University of Nottingham
 * @package
 */
require_once "../../../config.php";
_load_language_file("/website_code/php/folderproperties/folder_content_template.inc");
include "../display_library.php";
/**
 * connect to the database
 */
if (is_numeric($_POST['folder_id'])) {
    $database_connect_id = database_connect("Folder_content_template.php connect success", "Folder_content_template.php connect failed");
    echo "<p class=\"header\"><span>" . FOLDER_CONTENT_TEMPLATE_CONTENTS . "</span></p>";
    echo "<div class=\"mini_folder_content\">";
    list_folder_contents_event_free(mysql_real_escape_string($_POST['folder_id']));
    echo "</div>";
}
Пример #4
0
\t\t\t<div id="demoParent">
\t\t\t\t<div style="overflow: auto;" id="demoDIV"><div>






END;
        require_once '../' . $xerte_toolkits_site->php_library_path . "display_library.php";
        echo "<form method=\"post\">";
        //echo "<div class=\"folder\" id=\"folder_workspace\" ondblclick=\"folder_open_close(this)\" onclick=\"highlight_main_toggle(this)\">";
        //echo "</div>\r\n<div id=\"folderchild_workspace\" class=\"workspace\">";
        $level = 1;
        $item = 1;
        $item = list_folder_contents_event_free(get_user_root_folder(), '../', $item, 'radio');
        print <<<END
</div></div>
\t\t\t</div>
\t\t\t<div class="demoHeader"></div>

\t\t\t<div id="styleDIV">
<input type="submit" name="submit" value="Select"></form>
\t\t\t</div>
\t\t</div>
\t\t<div style="clear:both;"></div>



\t\t<div style="clear:both;"></div>
\t</div>
 * The Apereo Foundation licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * 
 * folder content page, used by the site to display a folder's contents
 *
 * @author Patrick Lockley
 * @version 1.0
 * @package
 */
require_once "../../../config.php";
_load_language_file("/website_code/php/folderproperties/folder_content_template.inc");
include "../display_library.php";
/**
 * connect to the database
 */
if (is_numeric($_POST['folder_id'])) {
    $database_connect_id = database_connect("Folder_content_template.php connect success", "Folder_content_template.php connect failed");
    echo "<p class=\"header\"><span>" . FOLDER_CONTENT_TEMPLATE_CONTENTS . "</span></p>";
    list_folder_contents_event_free($_POST['folder_id']);
}