예제 #1
0
 public static function INSERT()
 {
     $row = parent::INSERT();
     $row->setBackground(Image::INSERT('resources/default-image.png'));
     $row->setTitle(Label::INSERT());
     $row->setText(SimpleText::INSERT());
     $row->setEnabled(1);
     return $row;
 }
예제 #2
0
 public static function INSERT()
 {
     $row = parent::INSERT();
     $row->setAuthor(Session::getUser());
     $row->setTitle(Label::INSERT());
     $row->setContent(SimpleText::INSERT());
     $row->setCreation(time());
     $row->setPublication(time() + 365 * 24 * 3600 * 3);
     return $row;
 }
예제 #3
0
파일: index.php 프로젝트: fulldump/8
<?php

$id = '';
eval('$id=' . var_export($data['id'], true) . ';');
$edit = !in_array('noedit', $flags);
$simpletext = SimpleText::getByName($id);
if (null === $simpletext) {
    $simpletext = SimpleText::INSERT();
    $simpletext->setName($id);
    $simpletext->setText($data['text']);
}
$text = $simpletext->getText();
if (array_key_exists('edit', $_GET) && Session::isLoggedIn() && $edit) {
    ?>
<div component="SimpleText" edit_id="<?php 
    echo $id;
    ?>
"></div>
<?php 
} else {
    echo '<div class="SimpleText">' . $text . '</div>';
}