-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlogged_out_content.php
130 lines (115 loc) · 3.83 KB
/
logged_out_content.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?
/*========================================================================
* Open eClass 2.3
* E-learning and Course Management System
* ========================================================================
* Copyright(c) 2003-2010 Greek Universities Network - GUnet
* A full copyright notice can be read in "/info/copyright.txt".
*
* Developers Group: Costas Tsibanis <k.tsibanis@noc.uoa.gr>
* Yannis Exidaridis <jexi@noc.uoa.gr>
* Alexandros Diamantidis <adia@noc.uoa.gr>
* Tilemachos Raptis <traptis@noc.uoa.gr>
*
* For a full list of contributors, see "credits.txt".
*
* Open eClass is an open platform distributed in the hope that it will
* be useful (without any warranty), under the terms of the GNU (General
* Public License) as published by the Free Software Foundation.
* The full license can be read in "/info/license/license_gpl.txt".
*
* Contact address: GUnet Asynchronous eLearning Group,
* Network Operations Center, University of Athens,
* Panepistimiopolis Ilissia, 15784, Athens, Greece
* eMail: info@openeclass.org
* =========================================================================*/
/*
* Logged Out Component
*
* @author Evelthon Prodromou <eprodromou@upnet.gr>
* @version $Id: logged_out_content.php,v 1.2 2009-12-15 12:45:02 jexi Exp $
*
* @abstract This component creates the content of the index page when the
* user is not logged in
* It includes:
* 1. The login form,
* 2. an optional content below the login form,
* 3. The introductory message
* 4. Platform announcements (If there are any)
*
*/
if (!defined('INDEX_START')) {
die("Action not allowed!");
}
if (isset($_SESSION['langswitch'])) {
$language = $_SESSION['langswitch'];
}
$tool_content .= <<<lCont
<div id="container_login">
<div id="wrapper">
<div id="content_login">
<p align='justify'>$langInfoAbout</p>
lCont;
$tool_content .='<br />';
$qlang = ($language == "greek")? 'gr': 'en';
$sql = "SELECT `date`, `{$qlang}_title` , `{$qlang}_body` , `{$qlang}_comment`
FROM `admin_announcements`
WHERE `visible` = 'V' ORDER BY `date` DESC";
$result = db_query($sql, $mysqlMainDb);
if (mysql_num_rows($result) > 0) {
$announceArr = array();
while ($eclassAnnounce = mysql_fetch_array($result)) {
array_push($announceArr, $eclassAnnounce);
}
$tool_content .= "<br/>
<table width='99%' class='AnnouncementsList'>
<thead><tr><th width='180'>$langAnnouncements</th><th> </th></tr></thead>
<tbody>";
$numOfAnnouncements = count($announceArr);
for($i=0; $i < $numOfAnnouncements; $i++) {
$tool_content .= "<tr><td colspan='2'>
<img style='border:0px;' src='${urlAppend}/template/classic/img/arrow_grey.gif' alt='' />
<b>".$announceArr[$i][1]."</b>
(".greek_format($announceArr[$i][0]).")
<p>
".$announceArr[$i][2]."<br />
<i>".$announceArr[$i][3]."</i></p>
</td>
</tr>";
}
$tool_content .= "</tbody></table>";
}
$shibactive = mysql_fetch_array(db_query("SELECT auth_default FROM auth WHERE auth_name='shibboleth'"));
if ($shibactive['auth_default'] == 1) {
$shibboleth_link = "<a href='{$urlServer}secure/index.php'>$langShibboleth</a><br /><br />";
} else {
$shibboleth_link = "";
}
$tool_content .= <<<lCont2
</div>
</div>
<div id="navigation">
<table width="99%">
<tr>
<th class="LoginHead"><b>$langUserLogin </b></th>
</tr>
<tr>
<td class="LoginData">
<form action="${urlSecure}index.php" method="post">
$langUsername <br />
<input class="Login" name="uname" size="20" /><br />
$langPass <br />
<input class="Login" name="pass" type="password" size="20" /><br /><br />
<input class="Login" name="submit" type="submit" size="20" value="$langEnter" /><br />
$warning<br />$shibboleth_link
<a href="modules/auth/lostpass.php">$lang_forgot_pass</a>
</form>
</td>
</tr>
</table>
</div>
<div id="extra">
{ECLASS_HOME_EXTRAS_RIGHT}
</div>
</div>
lCont2;