forked from craigk5n/webcalendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontrolpanel.php
81 lines (68 loc) · 2.32 KB
/
controlpanel.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/* $Id: controlpanel.php,v 1.15 2009/10/11 16:29:59 bbannon Exp $
*
* Description:
* This page generates the JNLP contents
* that Java Web Start uses to start the application.
*
* For more info on Java Web Start:
* http://www.java.com/en/download/faq/5000070700.xml
*
* This starts up the us.k5n.webcalendar.ui.ControlPanel.Main application.
* The ControlPanel application may eventually take over as the
* primary way of administering parts of WebCalendar.
*
* Security:
* This page doesn't really need securing since it just passes info to the
* web start app. The web start app then does its own authenticating since
* the web services require authentication to do anything.
*
**************************************************************************/
include_once 'includes/translate.php';
require_once 'includes/classes/WebCalendar.class';
require_once 'includes/classes/Event.class';
require_once 'includes/classes/RptEvent.class';
$WebCalendar = new WebCalendar( __FILE__ );
include 'includes/config.php';
include 'includes/dbi4php.php';
include 'includes/formvars.php';
include 'includes/functions.php';
$WebCalendar->initializeFirstPhase ();
include 'includes/' . $user_inc;
$WebCalendar->initializeSecondPhase ();
load_global_settings ();
$WebCalendar->setLanguage ();
// Set content type for java web start
header ( "Content-type: application/x-java-jnlp-file" );
// Make sure app name is set
$appStr = generate_application_name ();
echo '<?xml version="1.0" encoding="utf-8"?>
<jnlp
spec="1.0+"
codebase="' . $SERVER_URL . '"
href="controlpanel.php">
<information>
<title>' . translate ( 'Control Panel' ) . ': ' . htmlentities ( $appStr );
?></title>
<vendor>k5n.us</vendor>
<homepage href="http://www.k5n.us"/>
<description>WebCalendar Control Panel</description>
<!-- <icon href="images/xxx.gif"/> -->
</information>
<security>
</security>
<resources>
<j2se version="1.4+"/>
<jar href="ws/webcalendar.jar"/>
</resources>
<application-desc main-class="us.k5n.webcalendar.ui.ControlPanel.Main"
width="600" height="500">
<argument>-url=<?php echo $SERVER_URL . '</argument>'
. ( $use_http_auth
? '
<argument>-httpusername=' . $login . '</argument>'
: ( ! empty ( $login ) ? '
<argument>-user=' . $login . '</argument>' : '' ) )
?>
</application-desc>
</jnlp>