Project

General

Profile

« Previous | Next » 

Revision 1378

Added by Dietmar almost 14 years ago

fixed inclusion of SecureForm
added IDNA/Punycode to wb::validate_email()

View differences:

class.frontend.php
22 22
}
23 23

  
24 24
require_once(WB_PATH.'/framework/class.wb.php');
25
require_once(WB_PATH.'/framework/SecureForm.php');
25 26

  
26 27
class frontend extends wb {
27 28
	// defaults
28
	var $default_link,$default_page_id;
29
	public $default_link,$default_page_id;
29 30
	// when multiple blocks are used, show home page blocks on 
30 31
	// pages where no content is defined (search, login, ...)
31
	var $default_block_content=true;
32
	public $default_block_content=true;
32 33

  
33 34
	// page details
34 35
	// page database row
35
	var $page;
36
	var $page_id,$page_title,$menu_title,$parent,$root_parent,$level,$visibility;
37
	var $page_description,$page_keywords,$page_link;
38
	var $page_trail=array();
36
	public $page;
37
	public $page_id,$page_title,$menu_title,$parent,$root_parent,$level,$visibility;
38
	public $page_description,$page_keywords,$page_link;
39
	public $page_trail=array();
39 40
	
40
	var $page_access_denied;
41
	var $page_no_active_sections;
41
	public $page_access_denied;
42
	public $page_no_active_sections;
42 43
	
43 44
	// website settings
44
	var $website_title,$website_description,$website_keywords,$website_header,$website_footer;
45
	public $website_title,$website_description,$website_keywords,$website_header,$website_footer;
45 46

  
46 47
	// ugly database stuff
47
	var $extra_where_sql, $sql_where_language;
48
	public $extra_where_sql, $sql_where_language;
49
	
50
	public function __construct() {
51
		parent::__construct(SecureForm::FRONTEND);
52
	}
48 53

  
49
	function page_select() {
54
	public function page_select() {
50 55
		global $page_id,$no_intro;
51 56
		global $database;
52 57
		// We have no page id and are supposed to show the intro page
......
114 119
		return true;
115 120
	}
116 121

  
117
	function get_page_details() {
122
	public function get_page_details() {
118 123
		global $database;
119 124
	    if($this->page_id != 0) {
120 125
			// Query page details
......
220 225
		}
221 226
	}
222 227

  
223
	function get_website_settings()
228
	public function get_website_settings()
224 229
    {
225 230
		global $database;
226 231

  
......
271 276
 * @return void
272 277
 * @history 100216 17:00:00 optimise errorhandling, speed, SQL-strict
273 278
 */
274
	function preprocess(&$content)
279
	public function preprocess(&$content)
275 280
	{
276 281
		global $database;
277 282
		$replace_list = array();
......
311 316
		}
312 317
	}
313 318
*/
314
	function menu() {
319
	public function menu() {
315 320
		global $wb;
316 321
	   if (!isset($wb->menu_number)) {
317 322
	   	$wb->menu_number = 1;
......
349 354
	   $wb->show_menu();
350 355
	}
351 356
	
352
	function show_menu() {
357
	public function show_menu() {
353 358
		global $database;
354 359
		if ($this->menu_start_level>0) {
355 360
			$key_array=array_keys($this->page_trail);
......
418 423

  
419 424

  
420 425
	// Function to show the "Under Construction" page
421
	function print_under_construction() {
426
	public function print_under_construction() {
422 427
		global $MESSAGE;
423 428
		require_once(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php');
424 429
		echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Also available in: Unified diff