Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F883327
header.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
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, p.perso_name as name, 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
[
'name'
]);
$smarty
->
assign
(
'WALL_USER_URL'
,
get_url
(
'who'
,
$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
Sat, Apr 5, 00:38 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
22332
Default Alt Text
header.php (1 KB)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment