<?php
	
	lt_include( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
	lt_include( PLOG_CLASS_PATH."class/dao/trackbacks.class.php" );

	class AdminEditTrackbackView extends AdminPluginTemplatedView
	{
        var $_trackbackId;
        
		function AdminEditTrackbackView($blogInfo, $trackbackId=0){
            $this->_trackbackId = $trackbackId;
			$this->AdminPluginTemplatedView( $blogInfo, "editcomments", "edittrackback" );
		}
		
		function render(){
                // fetch trackback
			$trackbacks = new Trackbacks();
			$tb = $trackbacks->getTrackBack($this->_trackbackId);

            if($tb){
                $t = $tb->getDateObject();
                $this->setValue( "commentDateTime", $t->getDay()."/".
                                 $t->getMonth()."/".$t->getYear()." ".
                                 $t->getHour().":".$t->getMinutes());
            }

            $statusList = ArticleCommentStatus::getStatusList();
            $this->setValue( "tbstatus", $statusList );
			$this->setValue( "edittrackback", $tb );

			parent::render();
		}
	}
?>