Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 3
0
Archivo: index.php Proyecto: 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>';
}
Ejemplo n.º 4
0
 public function getText()
 {
     if ($this->row['Text'] == 0) {
         return null;
     } else {
         return SimpleText::ROW($this->row['Text']);
     }
 }
Ejemplo n.º 5
0
<?php

$id = $_POST['id'];
echo SimpleText::getByName($_POST['id'])->getText();
Ejemplo n.º 6
0
<?php

if (Session::isLoggedIn()) {
    SimpleText::getByName($_POST['id'])->setText($_POST['text']);
}