Project

General

Profile

« Previous | Next » 

Revision 571

Added by thorn almost 17 years ago

adapted news-module to use the new jscalendar, removed old one

View differences:

wb-setup.php
1 1
<?php
2 2

  
3
// $Id: $
3
// $Id$
4 4

  
5 5
/*
6 6

  
......
35 35
?>
36 36
<style type="text/css">
37 37
<?php
38
require_once(WB_PATH."/include/jscalendar/calendar-system.css");
38
require_once(WB_PATH.'/include/jscalendar/calendar-system.css');
39 39
?>
40 40
</style>
41 41
<script type="text/javascript" src="<?php echo WB_URL ?>/include/jscalendar/calendar.js"></script>
42 42
<?php // some stuff for jscalendar
43 43
	// language
44
	$jscal_lang = defined('LANGUAGE')?strtolower(LANGUAGE):"en";
45
	$jscal_lang = $jscal_lang!=""?$jscal_lang:"en";
44
	$jscal_lang = defined('LANGUAGE')?strtolower(LANGUAGE):'en';
45
	$jscal_lang = $jscal_lang!=''?$jscal_lang:'en';
46 46
	if(!file_exists(WB_PATH."/include/jscalendar/lang/calendar-$jscal_lang.js")) {
47
		$jscal_lang = "en";
47
		$jscal_lang = 'en';
48 48
	}
49 49
	// today
50
	$jscal_today = date("Y/m/d");
50
	$jscal_today = date('Y/m/d');
51 51
	// first-day-of-week
52
	$jscal_firstday = "1"; // monday
53
	if(LANGUAGE=="EN")
54
		$jscal_firstday = "0"; // sunday
52
	$jscal_firstday = '1'; // monday
53
	if(LANGUAGE=='EN')
54
		$jscal_firstday = '0'; // sunday
55 55
	// date and time format for the text-field and for jscal's "ifFormat". We offer dd.mm.yyyy or yyyy-mm-dd or mm/dd/yyyy
56 56
	switch(DATE_FORMAT) {
57 57
		case 'd.m.Y':
......
61 61
		case 'D M d, Y':
62 62
		case 'd-m-Y':
63 63
		case 'd/m/Y':
64
			$jscal_format = "d.m.Y H:i"; // dd.mm.yyyy hh:mm
65
			$jscal_ifformat = "%d.%m.%Y %H:%M";
64
			$jscal_format = 'd.m.Y'; // dd.mm.yyyy hh:mm
65
			$jscal_ifformat = '%d.%m.%Y';
66 66
			break;
67 67
		case 'm/d/Y':
68 68
		case 'm-d-Y':
69 69
		case 'M d Y':
70 70
		case 'm.d.Y':
71
			$jscal_format = "m/d/Y H:i"; // mm/dd/yyyy hh:mm
72
			$jscal_ifformat = "%m/%d/%Y %H:%M";
71
			$jscal_format = 'm/d/Y'; // mm/dd/yyyy hh:mm
72
			$jscal_ifformat = '%m/%d/%Y';
73 73
			break;
74 74
		default:
75
			$jscal_format = "Y-m-d H:i"; // yyyy-mm-dd hh:mm
76
			$jscal_ifformat = "%Y-%m-%d %H:%M";
75
			$jscal_format = 'Y-m-d'; // yyyy-mm-dd hh:mm
76
			$jscal_ifformat = '%Y-%m-%d';
77 77
			break;
78 78
	}
79
	if(isset($jscal_use_time) && $jscal_use_time==TRUE) {
80
		$jscal_format .= ' H:i';
81
		$jscal_ifformat .= ' %H:%M';
82
	}
79 83
	// load scripts for jscalendar
80 84
?>
81 85
<script type="text/javascript" src="<?php echo WB_URL ?>/include/jscalendar/lang/calendar-<?php echo $jscal_lang ?>.js"></script>

Also available in: Unified diff