Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F390581
motd.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
motd.php
View Options
<?php
/**
* MOTD
* Zed. The immensity of stars. The HyperShip. The people.
*
* (c) 2010, Dereckson, some rights reserved.
* Released under BSD license.
*
* This controller handle the /push "secret" URL.
*
* It allows to add a message in the MOTD (messages printed in the header on
* the top of each page).
*
* It uses the motd_add.tpl view and the MOTD class.
*
* @package Zed
* @subpackage Controllers
* @author Sébastien Santoro aka Dereckson <dereckson@espace-win.org>
* @copyright 2010 Sébastien Santoro aka Dereckson
* @license http://www.opensource.org/licenses/bsd-license.php BSD
* @version 0.1
* @link http://scherzo.dereckson.be/doc/zed
* @link http://zed.dereckson.be/
* @filesource
*/
//
// Handles form
//
if
(
isset
(
$_REQUEST
[
'text'
]))
{
require_once
(
'includes/objects/motd.php'
);
$motd
=
new
MOTD
();
$motd
->
text
=
$_REQUEST
[
'text'
];
$motd
->
perso_id
=
$CurrentPerso
->
id
;
$motd
->
save_to_database
();
$smarty
->
assign
(
'WAP'
,
lang_get
(
'Published'
));
}
//
// HTML output
//
//Serves header
$smarty
->
assign
(
'PAGE_TITLE'
,
lang_get
(
'PushMessage'
));
include
(
'header.php'
);
//Serves content
$smarty
->
display
(
'motd_add.tpl'
);
//Servers footer
include
(
'footer.php'
);
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Feb 22, 15:27 (7 h, 46 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
22432
Default Alt Text
motd.php (1 KB)
Attached To
rZED Zed
Event Timeline
Log In to Comment