All pastes #829698 Raw Edit

Anonymous

public text v1 · immutable
#829698 ·published 2007-12-23 11:46 UTC
rendered paste body
<?php

include("../ajax_config.php");

$id = $_POST["id"];
$title = str_replace("'", "\'", $_POST["title"]);
$image = str_replace("'", "\'", $_POST["image"]);
$content = str_replace("'", "\'", $_POST["content"]);

$contentBox = new ContentBox($id);
$contentBox->setProperties($title, $content, $image, false);

echo $contentBox->modify();

?>


method setProperties in class:   


    function setProperties($title, $content, $image, $link, $type = "content"){
        $this->title = $title;
        $this->content = $content;
        $this->image = basename($image);
        $this->link = $link;
        $this->type = $type;
        $this->user = $_SESSION["uid"];
        $this->date = date("Y-m-d");
    }