home *** CD-ROM | disk | FTP | other *** search
- <?php
- /*
- Copyright Intermesh 2003
- Author: Merijn Schering <mschering@intermesh.nl>
- Version: 1.0 Release date: 08 July 2003
-
- 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 2 of the License, or (at your
- option) any later version.
- */
-
-
- require($GO_CONFIG->class_path.'cms_site.class.inc');
- $cms_site_module = $GO_MODULES->get_module('cms');
-
- require_once($GO_LANGUAGE->get_language_file('cms'));
-
- if(!isset($site_id) || !$cms_site = new cms_site($site_id))
- {
- die('No site or invalid site requested');
- }
-
- if ($cms_site->site['acl_read'] > 0)
- {
- //authenticate the user
- $GO_SECURITY->authenticate();
-
- if (!$GO_SECURITY->has_permission($GO_SECURITY->user_id, $cms_site->site['acl_read']) && !$GO_SECURITY->has_permission($GO_SECURITY->user_id, $cms_site->site['acl_write']))
- {
- require($GO_THEME->theme_path."header.inc");
- require($GO_CONFIG->root_path.'error_docs/403.inc');
- require($GO_THEME->theme_path."footer.inc");
- exit();
- }
- }
-
- $publish_path = $GO_CONFIG->get_setting('cms_publish_path');
- if (isset($published) && $publish_path != '' && $cms_site->site['publish_style'] == '0')
- {
- die($cms_site_offline);
- }
-
- //set the folder id we are in
- $folder_id = isset($_REQUEST['folder_id']) ? $_REQUEST['folder_id'] : $cms_site->site['root_folder_id'];
- $file_id = isset($_REQUEST['file_id']) ? $_REQUEST['file_id'] : 0;
- if ($file_id == 0)
- {
- $cms_site->get_files($folder_id, 'priority', 'ASC');
- while($cms_site->next_record())
- {
- if (eregi('htm',$cms_site->f('extension')))
- {
- $file_id = $cms_site->f('id');
- break;
- }
- }
- }
-
- $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
- $search_word_id = isset($_REQUEST['search_word_id']) ? $_REQUEST['search_word_id'] : '';
- echo $cms_site->generate_page($file_id, $task, $search_word_id);
- ?>
-