Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F1138873
header.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1018 B
Subscribers
None
header.php
View Options
<?php
/*
* Zed
* (c) 2010, Dereckson, some rights reserved
* Released under BSD license
*
* Header
*/
//
// Graffiti wall
//
//TODO: this is a potentially very intensive SQL query
$sql
=
'SELECT p.perso_nickname as username, m.motd_text FROM '
.
TABLE_PERSOS
.
' p, '
.
TABLE_MOTD
.
' m WHERE p.perso_id = m.perso_id ORDER BY rand() LIMIT 1'
;
if
(!
$result
=
$db
->
sql_query
(
$sql
))
message_die
(
SQL_ERROR
,
"Can't query MOTD"
,
''
,
__LINE__
,
__FILE__
,
$sql
);
$row
=
$db
->
sql_fetchrow
(
$result
);
$smarty
->
assign
(
'WALL_TEXT'
,
$row
[
'motd_text'
]);
$smarty
->
assign
(
'WALL_USER'
,
$row
[
'username'
]);
$smarty
->
assign
(
'WALL_USER_URL'
,
get_url
(
'user'
,
$row
[
'username'
]));
//
// HTML output
//
//Defines DOJO if needed, and assigns DOJO/DIJIT smarty variables
if
(!
defined
(
'DOJO'
))
define
(
'DOJO'
,
defined
(
'DIJIT'
));
if
(
defined
(
'DIJIT'
))
$smarty
->
assign
(
'DIJIT'
,
true
);
$smarty
->
assign
(
'DOJO'
,
DOJO
);
//Prints the template
$smarty
->
display
(
'header.tpl'
);
define
(
'HEADER_PRINTED'
,
true
);
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jul 16, 15:27 (1 w, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25285
Default Alt Text
header.php (1018 B)
Attached To
rZED Zed
Event Timeline
Log In to Comment