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

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

            if($tb){
                $tbDate = $tb->getDateObject();
                $this->setValue( "tbYear", $tbDate->getYear());
                $this->setValue( "tbMonth", $tbDate->getMonth());
                $this->setValue( "tbDay", $tbDate->getDay());
                $this->setValue( "tbHour", $tbDate->getHour());
                $this->setValue( "tbMinutes", $tbDate->getMinutes());
            }

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

			parent::render();
		}
	}
?>